From 5eccf41755b56c83e60915706e21d2a8f93e0a71 Mon Sep 17 00:00:00 2001 From: Min Jin Date: Fri, 1 Dec 2023 11:41:31 -0800 Subject: [PATCH 1/2] regenerate from k8s 1.28 using v4.3.1 generator Signed-off-by: Min Jin --- .../kubernetes/client/fluent/BaseFluent.java | 135 +- .../io/kubernetes/client/fluent/Builder.java | 7 +- .../client/fluent/DelegatingVisitor.java | 8 +- .../io/kubernetes/client/fluent/Editable.java | 3 + .../io/kubernetes/client/fluent/Fluent.java | 5 - .../io/kubernetes/client/fluent/Nested.java | 3 + .../client/fluent/PathAwareTypedVisitor.java | 15 +- .../client/fluent/TypedVisitor.java | 4 + .../kubernetes/client/fluent/Visitable.java | 92 +- .../client/fluent/VisitableBuilder.java | 2 + .../client/fluent/VisitableMap.java | 14 +- .../io/kubernetes/client/fluent/Visitor.java | 89 +- .../client/fluent/VisitorListener.java | 42 +- .../client/fluent/VisitorWiretap.java | 49 +- .../io/kubernetes/client/fluent/Visitors.java | 163 +- ...registrationV1ServiceReferenceBuilder.java | 45 +- ...nregistrationV1ServiceReferenceFluent.java | 127 +- ...istrationV1ServiceReferenceFluentImpl.java | 94 - ...istrationV1WebhookClientConfigBuilder.java | 45 +- ...gistrationV1WebhookClientConfigFluent.java | 220 +- ...rationV1WebhookClientConfigFluentImpl.java | 161 - ...piextensionsV1ServiceReferenceBuilder.java | 45 +- ...ApiextensionsV1ServiceReferenceFluent.java | 127 +- ...xtensionsV1ServiceReferenceFluentImpl.java | 94 - ...xtensionsV1WebhookClientConfigBuilder.java | 45 +- ...extensionsV1WebhookClientConfigFluent.java | 220 +- ...nsionsV1WebhookClientConfigFluentImpl.java | 161 - ...registrationV1ServiceReferenceBuilder.java | 43 +- ...iregistrationV1ServiceReferenceFluent.java | 107 +- ...istrationV1ServiceReferenceFluentImpl.java | 80 - .../AuthenticationV1TokenRequestBuilder.java | 53 +- .../AuthenticationV1TokenRequestFluent.java | 317 +- ...uthenticationV1TokenRequestFluentImpl.java | 232 - .../models/CoreV1EndpointPortBuilder.java | 45 +- .../models/CoreV1EndpointPortFluent.java | 127 +- .../models/CoreV1EndpointPortFluentImpl.java | 94 - .../openapi/models/CoreV1EventBuilder.java | 81 +- .../openapi/models/CoreV1EventFluent.java | 669 +- .../openapi/models/CoreV1EventFluentImpl.java | 484 - .../models/CoreV1EventListBuilder.java | 49 +- .../openapi/models/CoreV1EventListFluent.java | 369 +- .../models/CoreV1EventListFluentImpl.java | 259 - .../models/CoreV1EventSeriesBuilder.java | 41 +- .../models/CoreV1EventSeriesFluent.java | 88 +- .../models/CoreV1EventSeriesFluentImpl.java | 67 - .../DiscoveryV1EndpointPortBuilder.java | 45 +- .../models/DiscoveryV1EndpointPortFluent.java | 127 +- .../DiscoveryV1EndpointPortFluentImpl.java | 94 - .../openapi/models/EventsV1EventBuilder.java | 81 +- .../openapi/models/EventsV1EventFluent.java | 669 +- .../models/EventsV1EventFluentImpl.java | 484 - .../models/EventsV1EventListBuilder.java | 49 +- .../models/EventsV1EventListFluent.java | 369 +- .../models/EventsV1EventListFluentImpl.java | 259 - .../models/EventsV1EventSeriesBuilder.java | 41 +- .../models/EventsV1EventSeriesFluent.java | 88 +- .../models/EventsV1EventSeriesFluentImpl.java | 67 - .../models/StorageV1TokenRequestBuilder.java | 41 +- .../models/StorageV1TokenRequestFluent.java | 87 +- .../StorageV1TokenRequestFluentImpl.java | 66 - .../openapi/models/V1APIGroupBuilder.java | 55 +- .../openapi/models/V1APIGroupFluent.java | 595 +- .../openapi/models/V1APIGroupFluentImpl.java | 404 - .../openapi/models/V1APIGroupListBuilder.java | 45 +- .../openapi/models/V1APIGroupListFluent.java | 293 +- .../models/V1APIGroupListFluentImpl.java | 204 - .../openapi/models/V1APIResourceBuilder.java | 57 +- .../openapi/models/V1APIResourceFluent.java | 530 +- .../models/V1APIResourceFluentImpl.java | 310 - .../models/V1APIResourceListBuilder.java | 47 +- .../models/V1APIResourceListFluent.java | 313 +- .../models/V1APIResourceListFluentImpl.java | 218 - .../openapi/models/V1APIServiceBuilder.java | 53 +- .../models/V1APIServiceConditionBuilder.java | 47 +- .../models/V1APIServiceConditionFluent.java | 147 +- .../V1APIServiceConditionFluentImpl.java | 108 - .../openapi/models/V1APIServiceFluent.java | 317 +- .../models/V1APIServiceFluentImpl.java | 232 - .../models/V1APIServiceListBuilder.java | 49 +- .../models/V1APIServiceListFluent.java | 369 +- .../models/V1APIServiceListFluentImpl.java | 259 - .../models/V1APIServiceSpecBuilder.java | 53 +- .../models/V1APIServiceSpecFluent.java | 304 +- .../models/V1APIServiceSpecFluentImpl.java | 221 - .../models/V1APIServiceStatusBuilder.java | 41 +- .../models/V1APIServiceStatusFluent.java | 254 +- .../models/V1APIServiceStatusFluentImpl.java | 176 - .../openapi/models/V1APIVersionsBuilder.java | 47 +- .../openapi/models/V1APIVersionsFluent.java | 406 +- .../models/V1APIVersionsFluentImpl.java | 260 - ...SElasticBlockStoreVolumeSourceBuilder.java | 45 +- ...WSElasticBlockStoreVolumeSourceFluent.java | 131 +- ...asticBlockStoreVolumeSourceFluentImpl.java | 97 - .../openapi/models/V1AffinityBuilder.java | 49 +- .../openapi/models/V1AffinityFluent.java | 278 +- .../openapi/models/V1AffinityFluentImpl.java | 204 - .../models/V1AggregationRuleBuilder.java | 41 +- .../models/V1AggregationRuleFluent.java | 254 +- .../models/V1AggregationRuleFluentImpl.java | 176 - .../models/V1AttachedVolumeBuilder.java | 41 +- .../models/V1AttachedVolumeFluent.java | 87 +- .../models/V1AttachedVolumeFluentImpl.java | 65 - .../V1AzureDiskVolumeSourceBuilder.java | 49 +- .../models/V1AzureDiskVolumeSourceFluent.java | 171 +- .../V1AzureDiskVolumeSourceFluentImpl.java | 124 - ...zureFilePersistentVolumeSourceBuilder.java | 45 +- ...AzureFilePersistentVolumeSourceFluent.java | 131 +- ...eFilePersistentVolumeSourceFluentImpl.java | 96 - .../V1AzureFileVolumeSourceBuilder.java | 43 +- .../models/V1AzureFileVolumeSourceFluent.java | 111 +- .../V1AzureFileVolumeSourceFluentImpl.java | 82 - .../openapi/models/V1BindingBuilder.java | 49 +- .../openapi/models/V1BindingFluent.java | 241 +- .../openapi/models/V1BindingFluentImpl.java | 177 - .../models/V1BoundObjectReferenceBuilder.java | 45 +- .../models/V1BoundObjectReferenceFluent.java | 127 +- .../V1BoundObjectReferenceFluentImpl.java | 93 - .../openapi/models/V1CSIDriverBuilder.java | 49 +- .../openapi/models/V1CSIDriverFluent.java | 241 +- .../openapi/models/V1CSIDriverFluentImpl.java | 177 - .../models/V1CSIDriverListBuilder.java | 49 +- .../openapi/models/V1CSIDriverListFluent.java | 369 +- .../models/V1CSIDriverListFluentImpl.java | 259 - .../models/V1CSIDriverSpecBuilder.java | 55 +- .../openapi/models/V1CSIDriverSpecFluent.java | 510 +- .../models/V1CSIDriverSpecFluentImpl.java | 331 - .../openapi/models/V1CSINodeBuilder.java | 49 +- .../models/V1CSINodeDriverBuilder.java | 47 +- .../openapi/models/V1CSINodeDriverFluent.java | 278 +- .../models/V1CSINodeDriverFluentImpl.java | 182 - .../openapi/models/V1CSINodeFluent.java | 241 +- .../openapi/models/V1CSINodeFluentImpl.java | 177 - .../openapi/models/V1CSINodeListBuilder.java | 49 +- .../openapi/models/V1CSINodeListFluent.java | 369 +- .../models/V1CSINodeListFluentImpl.java | 259 - .../openapi/models/V1CSINodeSpecBuilder.java | 41 +- .../openapi/models/V1CSINodeSpecFluent.java | 254 +- .../models/V1CSINodeSpecFluentImpl.java | 176 - .../V1CSIPersistentVolumeSourceBuilder.java | 67 +- .../V1CSIPersistentVolumeSourceFluent.java | 561 +- ...V1CSIPersistentVolumeSourceFluentImpl.java | 405 - .../models/V1CSIStorageCapacityBuilder.java | 55 +- .../models/V1CSIStorageCapacityFluent.java | 311 +- .../V1CSIStorageCapacityFluentImpl.java | 226 - .../V1CSIStorageCapacityListBuilder.java | 49 +- .../V1CSIStorageCapacityListFluent.java | 369 +- .../V1CSIStorageCapacityListFluentImpl.java | 259 - .../models/V1CSIVolumeSourceBuilder.java | 49 +- .../models/V1CSIVolumeSourceFluent.java | 239 +- .../models/V1CSIVolumeSourceFluentImpl.java | 171 - .../openapi/models/V1CapabilitiesBuilder.java | 41 +- .../openapi/models/V1CapabilitiesFluent.java | 273 +- .../models/V1CapabilitiesFluentImpl.java | 153 - ...V1CephFSPersistentVolumeSourceBuilder.java | 51 +- .../V1CephFSPersistentVolumeSourceFluent.java | 322 +- ...ephFSPersistentVolumeSourceFluentImpl.java | 213 - .../models/V1CephFSVolumeSourceBuilder.java | 51 +- .../models/V1CephFSVolumeSourceFluent.java | 322 +- .../V1CephFSVolumeSourceFluentImpl.java | 213 - .../V1CertificateSigningRequestBuilder.java | 53 +- ...ificateSigningRequestConditionBuilder.java | 49 +- ...tificateSigningRequestConditionFluent.java | 167 +- ...cateSigningRequestConditionFluentImpl.java | 122 - .../V1CertificateSigningRequestFluent.java | 317 +- ...V1CertificateSigningRequestFluentImpl.java | 232 - ...1CertificateSigningRequestListBuilder.java | 49 +- ...V1CertificateSigningRequestListFluent.java | 369 +- ...rtificateSigningRequestListFluentImpl.java | 259 - ...1CertificateSigningRequestSpecBuilder.java | 53 +- ...V1CertificateSigningRequestSpecFluent.java | 475 +- ...rtificateSigningRequestSpecFluentImpl.java | 292 - ...ertificateSigningRequestStatusBuilder.java | 43 +- ...CertificateSigningRequestStatusFluent.java | 328 +- ...ificateSigningRequestStatusFluentImpl.java | 226 - ...V1CinderPersistentVolumeSourceBuilder.java | 47 +- .../V1CinderPersistentVolumeSourceFluent.java | 189 +- ...inderPersistentVolumeSourceFluentImpl.java | 139 - .../models/V1CinderVolumeSourceBuilder.java | 47 +- .../models/V1CinderVolumeSourceFluent.java | 189 +- .../V1CinderVolumeSourceFluentImpl.java | 139 - .../openapi/models/V1ClaimSourceBuilder.java | 41 +- .../openapi/models/V1ClaimSourceFluent.java | 87 +- .../models/V1ClaimSourceFluentImpl.java | 65 - .../models/V1ClientIPConfigBuilder.java | 39 +- .../models/V1ClientIPConfigFluent.java | 68 +- .../models/V1ClientIPConfigFluentImpl.java | 52 - .../models/V1ClusterRoleBindingBuilder.java | 53 +- .../models/V1ClusterRoleBindingFluent.java | 447 +- .../V1ClusterRoleBindingFluentImpl.java | 314 - .../V1ClusterRoleBindingListBuilder.java | 49 +- .../V1ClusterRoleBindingListFluent.java | 369 +- .../V1ClusterRoleBindingListFluentImpl.java | 259 - .../openapi/models/V1ClusterRoleBuilder.java | 53 +- .../openapi/models/V1ClusterRoleFluent.java | 447 +- .../models/V1ClusterRoleFluentImpl.java | 314 - .../models/V1ClusterRoleListBuilder.java | 49 +- .../models/V1ClusterRoleListFluent.java | 369 +- .../models/V1ClusterRoleListFluentImpl.java | 259 - .../models/V1ComponentConditionBuilder.java | 45 +- .../models/V1ComponentConditionFluent.java | 127 +- .../V1ComponentConditionFluentImpl.java | 93 - .../models/V1ComponentStatusBuilder.java | 49 +- .../models/V1ComponentStatusFluent.java | 369 +- .../models/V1ComponentStatusFluentImpl.java | 259 - .../models/V1ComponentStatusListBuilder.java | 49 +- .../models/V1ComponentStatusListFluent.java | 369 +- .../V1ComponentStatusListFluentImpl.java | 259 - .../openapi/models/V1ConditionBuilder.java | 49 +- .../openapi/models/V1ConditionFluent.java | 167 +- .../openapi/models/V1ConditionFluentImpl.java | 123 - .../openapi/models/V1ConfigMapBuilder.java | 51 +- .../models/V1ConfigMapEnvSourceBuilder.java | 41 +- .../models/V1ConfigMapEnvSourceFluent.java | 91 +- .../V1ConfigMapEnvSourceFluentImpl.java | 68 - .../openapi/models/V1ConfigMapFluent.java | 287 +- .../openapi/models/V1ConfigMapFluentImpl.java | 201 - .../models/V1ConfigMapKeySelectorBuilder.java | 43 +- .../models/V1ConfigMapKeySelectorFluent.java | 111 +- .../V1ConfigMapKeySelectorFluentImpl.java | 82 - .../models/V1ConfigMapListBuilder.java | 49 +- .../openapi/models/V1ConfigMapListFluent.java | 369 +- .../models/V1ConfigMapListFluentImpl.java | 259 - .../V1ConfigMapNodeConfigSourceBuilder.java | 47 +- .../V1ConfigMapNodeConfigSourceFluent.java | 147 +- ...V1ConfigMapNodeConfigSourceFluentImpl.java | 107 - .../models/V1ConfigMapProjectionBuilder.java | 45 +- .../models/V1ConfigMapProjectionFluent.java | 297 +- .../V1ConfigMapProjectionFluentImpl.java | 207 - .../V1ConfigMapVolumeSourceBuilder.java | 47 +- .../models/V1ConfigMapVolumeSourceFluent.java | 317 +- .../V1ConfigMapVolumeSourceFluentImpl.java | 222 - .../openapi/models/V1ContainerBuilder.java | 108 +- .../openapi/models/V1ContainerFluent.java | 2206 +- .../openapi/models/V1ContainerFluentImpl.java | 1408 - .../models/V1ContainerImageBuilder.java | 41 +- .../models/V1ContainerImageFluent.java | 180 +- .../models/V1ContainerImageFluentImpl.java | 112 - .../models/V1ContainerPortBuilder.java | 47 +- .../openapi/models/V1ContainerPortFluent.java | 147 +- .../models/V1ContainerPortFluentImpl.java | 108 - .../V1ContainerResizePolicyBuilder.java | 41 +- .../models/V1ContainerResizePolicyFluent.java | 87 +- .../V1ContainerResizePolicyFluentImpl.java | 65 - .../models/V1ContainerStateBuilder.java | 49 +- .../models/V1ContainerStateFluent.java | 278 +- .../models/V1ContainerStateFluentImpl.java | 204 - .../V1ContainerStateRunningBuilder.java | 39 +- .../models/V1ContainerStateRunningFluent.java | 68 +- .../V1ContainerStateRunningFluentImpl.java | 52 - .../V1ContainerStateTerminatedBuilder.java | 51 +- .../V1ContainerStateTerminatedFluent.java | 187 +- .../V1ContainerStateTerminatedFluentImpl.java | 137 - .../V1ContainerStateWaitingBuilder.java | 41 +- .../models/V1ContainerStateWaitingFluent.java | 87 +- .../V1ContainerStateWaitingFluentImpl.java | 65 - .../models/V1ContainerStatusBuilder.java | 65 +- .../models/V1ContainerStatusFluent.java | 474 +- .../models/V1ContainerStatusFluentImpl.java | 342 - .../models/V1ControllerRevisionBuilder.java | 49 +- .../models/V1ControllerRevisionFluent.java | 206 +- .../V1ControllerRevisionFluentImpl.java | 151 - .../V1ControllerRevisionListBuilder.java | 49 +- .../V1ControllerRevisionListFluent.java | 369 +- .../V1ControllerRevisionListFluentImpl.java | 259 - .../openapi/models/V1CronJobBuilder.java | 53 +- .../openapi/models/V1CronJobFluent.java | 317 +- .../openapi/models/V1CronJobFluentImpl.java | 232 - .../openapi/models/V1CronJobListBuilder.java | 49 +- .../openapi/models/V1CronJobListFluent.java | 369 +- .../models/V1CronJobListFluentImpl.java | 259 - .../openapi/models/V1CronJobSpecBuilder.java | 55 +- .../openapi/models/V1CronJobSpecFluent.java | 273 +- .../models/V1CronJobSpecFluentImpl.java | 197 - .../models/V1CronJobStatusBuilder.java | 45 +- .../openapi/models/V1CronJobStatusFluent.java | 294 +- .../models/V1CronJobStatusFluentImpl.java | 205 - .../V1CrossVersionObjectReferenceBuilder.java | 43 +- .../V1CrossVersionObjectReferenceFluent.java | 107 +- ...CrossVersionObjectReferenceFluentImpl.java | 79 - ...CustomResourceColumnDefinitionBuilder.java | 49 +- ...1CustomResourceColumnDefinitionFluent.java | 167 +- ...tomResourceColumnDefinitionFluentImpl.java | 122 - .../V1CustomResourceConversionBuilder.java | 43 +- .../V1CustomResourceConversionFluent.java | 145 +- .../V1CustomResourceConversionFluentImpl.java | 108 - .../V1CustomResourceDefinitionBuilder.java | 53 +- ...tomResourceDefinitionConditionBuilder.java | 47 +- ...stomResourceDefinitionConditionFluent.java | 147 +- ...ResourceDefinitionConditionFluentImpl.java | 108 - .../V1CustomResourceDefinitionFluent.java | 317 +- .../V1CustomResourceDefinitionFluentImpl.java | 232 - ...V1CustomResourceDefinitionListBuilder.java | 49 +- .../V1CustomResourceDefinitionListFluent.java | 369 +- ...ustomResourceDefinitionListFluentImpl.java | 259 - ...1CustomResourceDefinitionNamesBuilder.java | 49 +- ...V1CustomResourceDefinitionNamesFluent.java | 353 +- ...stomResourceDefinitionNamesFluentImpl.java | 209 - ...V1CustomResourceDefinitionSpecBuilder.java | 55 +- .../V1CustomResourceDefinitionSpecFluent.java | 471 +- ...ustomResourceDefinitionSpecFluentImpl.java | 331 - ...CustomResourceDefinitionStatusBuilder.java | 47 +- ...1CustomResourceDefinitionStatusFluent.java | 442 +- ...tomResourceDefinitionStatusFluentImpl.java | 287 - ...ustomResourceDefinitionVersionBuilder.java | 59 +- ...CustomResourceDefinitionVersionFluent.java | 521 +- ...omResourceDefinitionVersionFluentImpl.java | 365 - ...CustomResourceSubresourceScaleBuilder.java | 43 +- ...1CustomResourceSubresourceScaleFluent.java | 107 +- ...tomResourceSubresourceScaleFluentImpl.java | 79 - .../V1CustomResourceSubresourcesBuilder.java | 43 +- .../V1CustomResourceSubresourcesFluent.java | 145 +- ...1CustomResourceSubresourcesFluentImpl.java | 108 - .../V1CustomResourceValidationBuilder.java | 41 +- .../V1CustomResourceValidationFluent.java | 126 +- .../V1CustomResourceValidationFluentImpl.java | 94 - .../models/V1DaemonEndpointBuilder.java | 39 +- .../models/V1DaemonEndpointFluent.java | 68 +- .../models/V1DaemonEndpointFluentImpl.java | 52 - .../openapi/models/V1DaemonSetBuilder.java | 53 +- .../models/V1DaemonSetConditionBuilder.java | 47 +- .../models/V1DaemonSetConditionFluent.java | 147 +- .../V1DaemonSetConditionFluentImpl.java | 108 - .../openapi/models/V1DaemonSetFluent.java | 317 +- .../openapi/models/V1DaemonSetFluentImpl.java | 232 - .../models/V1DaemonSetListBuilder.java | 49 +- .../openapi/models/V1DaemonSetListFluent.java | 369 +- .../models/V1DaemonSetListFluentImpl.java | 259 - .../models/V1DaemonSetSpecBuilder.java | 53 +- .../openapi/models/V1DaemonSetSpecFluent.java | 318 +- .../models/V1DaemonSetSpecFluentImpl.java | 233 - .../models/V1DaemonSetStatusBuilder.java | 59 +- .../models/V1DaemonSetStatusFluent.java | 434 +- .../models/V1DaemonSetStatusFluentImpl.java | 304 - .../V1DaemonSetUpdateStrategyBuilder.java | 43 +- .../V1DaemonSetUpdateStrategyFluent.java | 145 +- .../V1DaemonSetUpdateStrategyFluentImpl.java | 108 - .../models/V1DeleteOptionsBuilder.java | 53 +- .../openapi/models/V1DeleteOptionsFluent.java | 342 +- .../models/V1DeleteOptionsFluentImpl.java | 228 - .../openapi/models/V1DeploymentBuilder.java | 53 +- .../models/V1DeploymentConditionBuilder.java | 49 +- .../models/V1DeploymentConditionFluent.java | 167 +- .../V1DeploymentConditionFluentImpl.java | 122 - .../openapi/models/V1DeploymentFluent.java | 317 +- .../models/V1DeploymentFluentImpl.java | 232 - .../models/V1DeploymentListBuilder.java | 49 +- .../models/V1DeploymentListFluent.java | 369 +- .../models/V1DeploymentListFluentImpl.java | 259 - .../models/V1DeploymentSpecBuilder.java | 59 +- .../models/V1DeploymentSpecFluent.java | 382 +- .../models/V1DeploymentSpecFluentImpl.java | 278 - .../models/V1DeploymentStatusBuilder.java | 55 +- .../models/V1DeploymentStatusFluent.java | 394 +- .../models/V1DeploymentStatusFluentImpl.java | 276 - .../models/V1DeploymentStrategyBuilder.java | 43 +- .../models/V1DeploymentStrategyFluent.java | 145 +- .../V1DeploymentStrategyFluentImpl.java | 108 - .../V1DownwardAPIProjectionBuilder.java | 41 +- .../models/V1DownwardAPIProjectionFluent.java | 254 +- .../V1DownwardAPIProjectionFluentImpl.java | 176 - .../V1DownwardAPIVolumeFileBuilder.java | 49 +- .../models/V1DownwardAPIVolumeFileFluent.java | 241 +- .../V1DownwardAPIVolumeFileFluentImpl.java | 178 - .../V1DownwardAPIVolumeSourceBuilder.java | 43 +- .../V1DownwardAPIVolumeSourceFluent.java | 274 +- .../V1DownwardAPIVolumeSourceFluentImpl.java | 191 - .../models/V1EmptyDirVolumeSourceBuilder.java | 41 +- .../models/V1EmptyDirVolumeSourceFluent.java | 92 +- .../V1EmptyDirVolumeSourceFluentImpl.java | 69 - .../models/V1EndpointAddressBuilder.java | 47 +- .../models/V1EndpointAddressFluent.java | 185 +- .../models/V1EndpointAddressFluentImpl.java | 136 - .../openapi/models/V1EndpointBuilder.java | 59 +- .../models/V1EndpointConditionsBuilder.java | 43 +- .../models/V1EndpointConditionsFluent.java | 122 +- .../V1EndpointConditionsFluentImpl.java | 88 - .../openapi/models/V1EndpointFluent.java | 500 +- .../openapi/models/V1EndpointFluentImpl.java | 338 - .../models/V1EndpointHintsBuilder.java | 41 +- .../openapi/models/V1EndpointHintsFluent.java | 254 +- .../models/V1EndpointHintsFluentImpl.java | 176 - .../models/V1EndpointSliceBuilder.java | 55 +- .../openapi/models/V1EndpointSliceFluent.java | 595 +- .../models/V1EndpointSliceFluentImpl.java | 404 - .../models/V1EndpointSliceListBuilder.java | 49 +- .../models/V1EndpointSliceListFluent.java | 369 +- .../models/V1EndpointSliceListFluentImpl.java | 259 - .../models/V1EndpointSubsetBuilder.java | 49 +- .../models/V1EndpointSubsetFluent.java | 664 +- .../models/V1EndpointSubsetFluentImpl.java | 438 - .../openapi/models/V1EndpointsBuilder.java | 49 +- .../openapi/models/V1EndpointsFluent.java | 369 +- .../openapi/models/V1EndpointsFluentImpl.java | 259 - .../models/V1EndpointsListBuilder.java | 49 +- .../openapi/models/V1EndpointsListFluent.java | 369 +- .../models/V1EndpointsListFluentImpl.java | 259 - .../models/V1EnvFromSourceBuilder.java | 47 +- .../openapi/models/V1EnvFromSourceFluent.java | 221 +- .../models/V1EnvFromSourceFluentImpl.java | 163 - .../openapi/models/V1EnvVarBuilder.java | 45 +- .../client/openapi/models/V1EnvVarFluent.java | 165 +- .../openapi/models/V1EnvVarFluentImpl.java | 122 - .../openapi/models/V1EnvVarSourceBuilder.java | 53 +- .../openapi/models/V1EnvVarSourceFluent.java | 354 +- .../models/V1EnvVarSourceFluentImpl.java | 259 - .../models/V1EphemeralContainerBuilder.java | 110 +- .../models/V1EphemeralContainerFluent.java | 2226 +- .../V1EphemeralContainerFluentImpl.java | 1422 - .../V1EphemeralVolumeSourceBuilder.java | 41 +- .../models/V1EphemeralVolumeSourceFluent.java | 126 +- .../V1EphemeralVolumeSourceFluentImpl.java | 94 - .../openapi/models/V1EventSourceBuilder.java | 41 +- .../openapi/models/V1EventSourceFluent.java | 87 +- .../models/V1EventSourceFluentImpl.java | 65 - .../openapi/models/V1EvictionBuilder.java | 49 +- .../openapi/models/V1EvictionFluent.java | 241 +- .../openapi/models/V1EvictionFluentImpl.java | 177 - .../openapi/models/V1ExecActionBuilder.java | 39 +- .../openapi/models/V1ExecActionFluent.java | 160 +- .../models/V1ExecActionFluentImpl.java | 97 - .../V1ExternalDocumentationBuilder.java | 41 +- .../models/V1ExternalDocumentationFluent.java | 87 +- .../V1ExternalDocumentationFluentImpl.java | 65 - .../models/V1FCVolumeSourceBuilder.java | 47 +- .../models/V1FCVolumeSourceFluent.java | 337 +- .../models/V1FCVolumeSourceFluentImpl.java | 199 - .../V1FlexPersistentVolumeSourceBuilder.java | 49 +- .../V1FlexPersistentVolumeSourceFluent.java | 239 +- ...1FlexPersistentVolumeSourceFluentImpl.java | 171 - .../models/V1FlexVolumeSourceBuilder.java | 49 +- .../models/V1FlexVolumeSourceFluent.java | 239 +- .../models/V1FlexVolumeSourceFluentImpl.java | 171 - .../models/V1FlockerVolumeSourceBuilder.java | 41 +- .../models/V1FlockerVolumeSourceFluent.java | 87 +- .../V1FlockerVolumeSourceFluentImpl.java | 65 - .../openapi/models/V1ForZoneBuilder.java | 39 +- .../openapi/models/V1ForZoneFluent.java | 67 +- .../openapi/models/V1ForZoneFluentImpl.java | 51 - ...1GCEPersistentDiskVolumeSourceBuilder.java | 45 +- ...V1GCEPersistentDiskVolumeSourceFluent.java | 131 +- ...EPersistentDiskVolumeSourceFluentImpl.java | 97 - .../openapi/models/V1GRPCActionBuilder.java | 41 +- .../openapi/models/V1GRPCActionFluent.java | 87 +- .../models/V1GRPCActionFluentImpl.java | 66 - .../models/V1GitRepoVolumeSourceBuilder.java | 43 +- .../models/V1GitRepoVolumeSourceFluent.java | 107 +- .../V1GitRepoVolumeSourceFluentImpl.java | 79 - ...lusterfsPersistentVolumeSourceBuilder.java | 45 +- ...GlusterfsPersistentVolumeSourceFluent.java | 131 +- ...terfsPersistentVolumeSourceFluentImpl.java | 96 - .../V1GlusterfsVolumeSourceBuilder.java | 43 +- .../models/V1GlusterfsVolumeSourceFluent.java | 111 +- .../V1GlusterfsVolumeSourceFluentImpl.java | 82 - .../V1GroupVersionForDiscoveryBuilder.java | 41 +- .../V1GroupVersionForDiscoveryFluent.java | 87 +- .../V1GroupVersionForDiscoveryFluentImpl.java | 65 - .../models/V1HTTPGetActionBuilder.java | 49 +- .../openapi/models/V1HTTPGetActionFluent.java | 343 +- .../models/V1HTTPGetActionFluentImpl.java | 239 - .../openapi/models/V1HTTPHeaderBuilder.java | 41 +- .../openapi/models/V1HTTPHeaderFluent.java | 87 +- .../models/V1HTTPHeaderFluentImpl.java | 65 - .../models/V1HTTPIngressPathBuilder.java | 45 +- .../models/V1HTTPIngressPathFluent.java | 165 +- .../models/V1HTTPIngressPathFluentImpl.java | 122 - .../models/V1HTTPIngressRuleValueBuilder.java | 41 +- .../models/V1HTTPIngressRuleValueFluent.java | 254 +- .../V1HTTPIngressRuleValueFluentImpl.java | 176 - .../V1HorizontalPodAutoscalerBuilder.java | 53 +- .../V1HorizontalPodAutoscalerFluent.java | 317 +- .../V1HorizontalPodAutoscalerFluentImpl.java | 232 - .../V1HorizontalPodAutoscalerListBuilder.java | 49 +- .../V1HorizontalPodAutoscalerListFluent.java | 369 +- ...HorizontalPodAutoscalerListFluentImpl.java | 259 - .../V1HorizontalPodAutoscalerSpecBuilder.java | 47 +- .../V1HorizontalPodAutoscalerSpecFluent.java | 188 +- ...HorizontalPodAutoscalerSpecFluentImpl.java | 137 - ...1HorizontalPodAutoscalerStatusBuilder.java | 47 +- ...V1HorizontalPodAutoscalerStatusFluent.java | 148 +- ...rizontalPodAutoscalerStatusFluentImpl.java | 110 - .../openapi/models/V1HostAliasBuilder.java | 41 +- .../openapi/models/V1HostAliasFluent.java | 180 +- .../openapi/models/V1HostAliasFluentImpl.java | 111 - .../openapi/models/V1HostIPBuilder.java | 31 + ...dIPFluentImpl.java => V1HostIPFluent.java} | 44 +- .../models/V1HostPathVolumeSourceBuilder.java | 41 +- .../models/V1HostPathVolumeSourceFluent.java | 87 +- .../V1HostPathVolumeSourceFluentImpl.java | 65 - .../openapi/models/V1IPBlockBuilder.java | 41 +- .../openapi/models/V1IPBlockFluent.java | 180 +- .../openapi/models/V1IPBlockFluentImpl.java | 111 - .../V1ISCSIPersistentVolumeSourceBuilder.java | 61 +- .../V1ISCSIPersistentVolumeSourceFluent.java | 432 +- ...ISCSIPersistentVolumeSourceFluentImpl.java | 290 - .../models/V1ISCSIVolumeSourceBuilder.java | 61 +- .../models/V1ISCSIVolumeSourceFluent.java | 432 +- .../models/V1ISCSIVolumeSourceFluentImpl.java | 290 - .../models/V1IngressBackendBuilder.java | 45 +- .../models/V1IngressBackendFluent.java | 202 +- .../models/V1IngressBackendFluentImpl.java | 149 - .../openapi/models/V1IngressBuilder.java | 53 +- .../openapi/models/V1IngressClassBuilder.java | 49 +- .../openapi/models/V1IngressClassFluent.java | 241 +- .../models/V1IngressClassFluentImpl.java | 177 - .../models/V1IngressClassListBuilder.java | 49 +- .../models/V1IngressClassListFluent.java | 369 +- .../models/V1IngressClassListFluentImpl.java | 259 - ...ngressClassParametersReferenceBuilder.java | 47 +- ...IngressClassParametersReferenceFluent.java | 147 +- ...essClassParametersReferenceFluentImpl.java | 107 - .../models/V1IngressClassSpecBuilder.java | 43 +- .../models/V1IngressClassSpecFluent.java | 145 +- .../models/V1IngressClassSpecFluentImpl.java | 108 - .../openapi/models/V1IngressFluent.java | 317 +- .../openapi/models/V1IngressFluentImpl.java | 232 - .../openapi/models/V1IngressListBuilder.java | 49 +- .../openapi/models/V1IngressListFluent.java | 369 +- .../models/V1IngressListFluentImpl.java | 259 - .../V1IngressLoadBalancerIngressBuilder.java | 45 +- .../V1IngressLoadBalancerIngressFluent.java | 293 +- ...1IngressLoadBalancerIngressFluentImpl.java | 204 - .../V1IngressLoadBalancerStatusBuilder.java | 41 +- .../V1IngressLoadBalancerStatusFluent.java | 254 +- ...V1IngressLoadBalancerStatusFluentImpl.java | 176 - .../models/V1IngressPortStatusBuilder.java | 43 +- .../models/V1IngressPortStatusFluent.java | 107 +- .../models/V1IngressPortStatusFluentImpl.java | 80 - .../openapi/models/V1IngressRuleBuilder.java | 43 +- .../openapi/models/V1IngressRuleFluent.java | 145 +- .../models/V1IngressRuleFluentImpl.java | 108 - .../V1IngressServiceBackendBuilder.java | 43 +- .../models/V1IngressServiceBackendFluent.java | 145 +- .../V1IngressServiceBackendFluentImpl.java | 108 - .../openapi/models/V1IngressSpecBuilder.java | 51 +- .../openapi/models/V1IngressSpecFluent.java | 555 +- .../models/V1IngressSpecFluentImpl.java | 376 - .../models/V1IngressStatusBuilder.java | 41 +- .../openapi/models/V1IngressStatusFluent.java | 126 +- .../models/V1IngressStatusFluentImpl.java | 94 - .../openapi/models/V1IngressTLSBuilder.java | 41 +- .../openapi/models/V1IngressTLSFluent.java | 180 +- .../models/V1IngressTLSFluentImpl.java | 111 - .../models/V1JSONSchemaPropsBuilder.java | 121 +- .../models/V1JSONSchemaPropsFluent.java | 1769 +- .../models/V1JSONSchemaPropsFluentImpl.java | 1160 - .../client/openapi/models/V1JobBuilder.java | 53 +- .../openapi/models/V1JobConditionBuilder.java | 49 +- .../openapi/models/V1JobConditionFluent.java | 167 +- .../models/V1JobConditionFluentImpl.java | 122 - .../client/openapi/models/V1JobFluent.java | 317 +- .../openapi/models/V1JobFluentImpl.java | 232 - .../openapi/models/V1JobListBuilder.java | 49 +- .../openapi/models/V1JobListFluent.java | 369 +- .../openapi/models/V1JobListFluentImpl.java | 259 - .../openapi/models/V1JobSpecBuilder.java | 68 +- .../openapi/models/V1JobSpecFluent.java | 499 +- .../openapi/models/V1JobSpecFluentImpl.java | 324 - .../openapi/models/V1JobStatusBuilder.java | 61 +- .../openapi/models/V1JobStatusFluent.java | 507 +- .../openapi/models/V1JobStatusFluentImpl.java | 331 - .../models/V1JobTemplateSpecBuilder.java | 45 +- .../models/V1JobTemplateSpecFluent.java | 202 +- .../models/V1JobTemplateSpecFluentImpl.java | 149 - .../openapi/models/V1KeyToPathBuilder.java | 43 +- .../openapi/models/V1KeyToPathFluent.java | 107 +- .../openapi/models/V1KeyToPathFluentImpl.java | 80 - .../models/V1LabelSelectorBuilder.java | 43 +- .../openapi/models/V1LabelSelectorFluent.java | 301 +- .../models/V1LabelSelectorFluentImpl.java | 208 - .../V1LabelSelectorRequirementBuilder.java | 43 +- .../V1LabelSelectorRequirementFluent.java | 200 +- .../V1LabelSelectorRequirementFluentImpl.java | 125 - .../client/openapi/models/V1LeaseBuilder.java | 49 +- .../client/openapi/models/V1LeaseFluent.java | 241 +- .../openapi/models/V1LeaseFluentImpl.java | 177 - .../openapi/models/V1LeaseListBuilder.java | 49 +- .../openapi/models/V1LeaseListFluent.java | 369 +- .../openapi/models/V1LeaseListFluentImpl.java | 259 - .../openapi/models/V1LeaseSpecBuilder.java | 47 +- .../openapi/models/V1LeaseSpecFluent.java | 147 +- .../openapi/models/V1LeaseSpecFluentImpl.java | 109 - .../openapi/models/V1LifecycleBuilder.java | 45 +- .../openapi/models/V1LifecycleFluent.java | 202 +- .../openapi/models/V1LifecycleFluentImpl.java | 149 - .../models/V1LifecycleHandlerBuilder.java | 49 +- .../models/V1LifecycleHandlerFluent.java | 278 +- .../models/V1LifecycleHandlerFluentImpl.java | 204 - .../openapi/models/V1LimitRangeBuilder.java | 49 +- .../openapi/models/V1LimitRangeFluent.java | 241 +- .../models/V1LimitRangeFluentImpl.java | 177 - .../models/V1LimitRangeItemBuilder.java | 49 +- .../models/V1LimitRangeItemFluent.java | 307 +- .../models/V1LimitRangeItemFluentImpl.java | 204 - .../models/V1LimitRangeListBuilder.java | 49 +- .../models/V1LimitRangeListFluent.java | 369 +- .../models/V1LimitRangeListFluentImpl.java | 259 - .../models/V1LimitRangeSpecBuilder.java | 41 +- .../models/V1LimitRangeSpecFluent.java | 254 +- .../models/V1LimitRangeSpecFluentImpl.java | 176 - .../openapi/models/V1ListMetaBuilder.java | 45 +- .../openapi/models/V1ListMetaFluent.java | 127 +- .../openapi/models/V1ListMetaFluentImpl.java | 94 - .../models/V1LoadBalancerIngressBuilder.java | 45 +- .../models/V1LoadBalancerIngressFluent.java | 293 +- .../V1LoadBalancerIngressFluentImpl.java | 204 - .../models/V1LoadBalancerStatusBuilder.java | 41 +- .../models/V1LoadBalancerStatusFluent.java | 254 +- .../V1LoadBalancerStatusFluentImpl.java | 176 - .../models/V1LocalObjectReferenceBuilder.java | 39 +- .../models/V1LocalObjectReferenceFluent.java | 67 +- .../V1LocalObjectReferenceFluentImpl.java | 51 - .../V1LocalSubjectAccessReviewBuilder.java | 53 +- .../V1LocalSubjectAccessReviewFluent.java | 317 +- .../V1LocalSubjectAccessReviewFluentImpl.java | 232 - .../models/V1LocalVolumeSourceBuilder.java | 41 +- .../models/V1LocalVolumeSourceFluent.java | 87 +- .../models/V1LocalVolumeSourceFluentImpl.java | 65 - .../models/V1ManagedFieldsEntryBuilder.java | 51 +- .../models/V1ManagedFieldsEntryFluent.java | 186 +- .../V1ManagedFieldsEntryFluentImpl.java | 136 - .../models/V1MatchConditionBuilder.java | 41 +- .../models/V1MatchConditionFluent.java | 87 +- .../models/V1MutatingWebhookBuilder.java | 71 +- ...V1MutatingWebhookConfigurationBuilder.java | 49 +- .../V1MutatingWebhookConfigurationFluent.java | 369 +- ...utatingWebhookConfigurationFluentImpl.java | 259 - ...tatingWebhookConfigurationListBuilder.java | 49 +- ...utatingWebhookConfigurationListFluent.java | 369 +- ...ingWebhookConfigurationListFluentImpl.java | 259 - .../models/V1MutatingWebhookFluent.java | 918 +- .../models/V1MutatingWebhookFluentImpl.java | 613 - .../models/V1NFSVolumeSourceBuilder.java | 43 +- .../models/V1NFSVolumeSourceFluent.java | 111 +- .../models/V1NFSVolumeSourceFluentImpl.java | 82 - .../openapi/models/V1NamespaceBuilder.java | 53 +- .../models/V1NamespaceConditionBuilder.java | 47 +- .../models/V1NamespaceConditionFluent.java | 147 +- .../V1NamespaceConditionFluentImpl.java | 108 - .../openapi/models/V1NamespaceFluent.java | 317 +- .../openapi/models/V1NamespaceFluentImpl.java | 232 - .../models/V1NamespaceListBuilder.java | 49 +- .../openapi/models/V1NamespaceListFluent.java | 369 +- .../models/V1NamespaceListFluentImpl.java | 259 - .../models/V1NamespaceSpecBuilder.java | 39 +- .../openapi/models/V1NamespaceSpecFluent.java | 160 +- .../models/V1NamespaceSpecFluentImpl.java | 97 - .../models/V1NamespaceStatusBuilder.java | 43 +- .../models/V1NamespaceStatusFluent.java | 273 +- .../models/V1NamespaceStatusFluentImpl.java | 190 - .../models/V1NetworkPolicyBuilder.java | 52 +- .../V1NetworkPolicyEgressRuleBuilder.java | 45 +- .../V1NetworkPolicyEgressRuleFluent.java | 458 +- .../V1NetworkPolicyEgressRuleFluentImpl.java | 307 - .../openapi/models/V1NetworkPolicyFluent.java | 259 +- .../models/V1NetworkPolicyFluentImpl.java | 232 - .../V1NetworkPolicyIngressRuleBuilder.java | 45 +- .../V1NetworkPolicyIngressRuleFluent.java | 458 +- .../V1NetworkPolicyIngressRuleFluentImpl.java | 307 - .../models/V1NetworkPolicyListBuilder.java | 49 +- .../models/V1NetworkPolicyListFluent.java | 369 +- .../models/V1NetworkPolicyListFluentImpl.java | 259 - .../models/V1NetworkPolicyPeerBuilder.java | 49 +- .../models/V1NetworkPolicyPeerFluent.java | 278 +- .../models/V1NetworkPolicyPeerFluentImpl.java | 204 - .../models/V1NetworkPolicyPortBuilder.java | 43 +- .../models/V1NetworkPolicyPortFluent.java | 117 +- .../models/V1NetworkPolicyPortFluentImpl.java | 87 - .../models/V1NetworkPolicySpecBuilder.java | 51 +- .../models/V1NetworkPolicySpecFluent.java | 648 +- .../models/V1NetworkPolicySpecFluentImpl.java | 418 - .../models/V1NetworkPolicyStatusBuilder.java | 46 - .../models/V1NetworkPolicyStatusFluent.java | 55 - .../V1NetworkPolicyStatusFluentImpl.java | 176 - .../openapi/models/V1NodeAddressBuilder.java | 41 +- .../openapi/models/V1NodeAddressFluent.java | 87 +- .../models/V1NodeAddressFluentImpl.java | 65 - .../openapi/models/V1NodeAffinityBuilder.java | 45 +- .../openapi/models/V1NodeAffinityFluent.java | 330 +- .../models/V1NodeAffinityFluentImpl.java | 231 - .../client/openapi/models/V1NodeBuilder.java | 53 +- .../models/V1NodeConditionBuilder.java | 49 +- .../openapi/models/V1NodeConditionFluent.java | 167 +- .../models/V1NodeConditionFluentImpl.java | 122 - .../models/V1NodeConfigSourceBuilder.java | 41 +- .../models/V1NodeConfigSourceFluent.java | 126 +- .../models/V1NodeConfigSourceFluentImpl.java | 94 - .../models/V1NodeConfigStatusBuilder.java | 51 +- .../models/V1NodeConfigStatusFluent.java | 297 +- .../models/V1NodeConfigStatusFluentImpl.java | 218 - .../models/V1NodeDaemonEndpointsBuilder.java | 41 +- .../models/V1NodeDaemonEndpointsFluent.java | 126 +- .../V1NodeDaemonEndpointsFluentImpl.java | 94 - .../client/openapi/models/V1NodeFluent.java | 317 +- .../openapi/models/V1NodeFluentImpl.java | 232 - .../openapi/models/V1NodeListBuilder.java | 49 +- .../openapi/models/V1NodeListFluent.java | 369 +- .../openapi/models/V1NodeListFluentImpl.java | 259 - .../openapi/models/V1NodeSelectorBuilder.java | 41 +- .../openapi/models/V1NodeSelectorFluent.java | 254 +- .../models/V1NodeSelectorFluentImpl.java | 176 - .../V1NodeSelectorRequirementBuilder.java | 43 +- .../V1NodeSelectorRequirementFluent.java | 200 +- .../V1NodeSelectorRequirementFluentImpl.java | 125 - .../models/V1NodeSelectorTermBuilder.java | 45 +- .../models/V1NodeSelectorTermFluent.java | 458 +- .../models/V1NodeSelectorTermFluentImpl.java | 307 - .../openapi/models/V1NodeSpecBuilder.java | 55 +- .../openapi/models/V1NodeSpecFluent.java | 526 +- .../openapi/models/V1NodeSpecFluentImpl.java | 346 - .../openapi/models/V1NodeStatusBuilder.java | 73 +- .../openapi/models/V1NodeStatusFluent.java | 1328 +- .../models/V1NodeStatusFluentImpl.java | 867 - .../models/V1NodeSystemInfoBuilder.java | 57 +- .../models/V1NodeSystemInfoFluent.java | 247 +- .../models/V1NodeSystemInfoFluentImpl.java | 177 - .../V1NonResourceAttributesBuilder.java | 41 +- .../models/V1NonResourceAttributesFluent.java | 87 +- .../V1NonResourceAttributesFluentImpl.java | 65 - .../models/V1NonResourceRuleBuilder.java | 41 +- .../models/V1NonResourceRuleFluent.java | 273 +- .../models/V1NonResourceRuleFluentImpl.java | 153 - .../models/V1ObjectFieldSelectorBuilder.java | 41 +- .../models/V1ObjectFieldSelectorFluent.java | 87 +- .../V1ObjectFieldSelectorFluentImpl.java | 65 - .../openapi/models/V1ObjectMetaBuilder.java | 71 +- .../openapi/models/V1ObjectMetaFluent.java | 866 +- .../models/V1ObjectMetaFluentImpl.java | 567 - .../models/V1ObjectReferenceBuilder.java | 51 +- .../models/V1ObjectReferenceFluent.java | 187 +- .../models/V1ObjectReferenceFluentImpl.java | 135 - .../openapi/models/V1OverheadBuilder.java | 39 +- .../openapi/models/V1OverheadFluent.java | 95 +- .../openapi/models/V1OverheadFluentImpl.java | 70 - .../models/V1OwnerReferenceBuilder.java | 49 +- .../models/V1OwnerReferenceFluent.java | 176 +- .../models/V1OwnerReferenceFluentImpl.java | 127 - .../models/V1PersistentVolumeBuilder.java | 53 +- .../V1PersistentVolumeClaimBuilder.java | 53 +- ...PersistentVolumeClaimConditionBuilder.java | 49 +- ...1PersistentVolumeClaimConditionFluent.java | 167 +- ...sistentVolumeClaimConditionFluentImpl.java | 122 - .../models/V1PersistentVolumeClaimFluent.java | 317 +- .../V1PersistentVolumeClaimFluentImpl.java | 232 - .../V1PersistentVolumeClaimListBuilder.java | 49 +- .../V1PersistentVolumeClaimListFluent.java | 369 +- ...V1PersistentVolumeClaimListFluentImpl.java | 259 - .../V1PersistentVolumeClaimSpecBuilder.java | 61 +- .../V1PersistentVolumeClaimSpecFluent.java | 528 +- ...V1PersistentVolumeClaimSpecFluentImpl.java | 361 - .../V1PersistentVolumeClaimStatusBuilder.java | 53 +- .../V1PersistentVolumeClaimStatusFluent.java | 526 +- ...PersistentVolumeClaimStatusFluentImpl.java | 323 - ...1PersistentVolumeClaimTemplateBuilder.java | 45 +- ...V1PersistentVolumeClaimTemplateFluent.java | 202 +- ...rsistentVolumeClaimTemplateFluentImpl.java | 149 - ...sistentVolumeClaimVolumeSourceBuilder.java | 41 +- ...rsistentVolumeClaimVolumeSourceFluent.java | 91 +- ...tentVolumeClaimVolumeSourceFluentImpl.java | 68 - .../models/V1PersistentVolumeFluent.java | 317 +- .../models/V1PersistentVolumeFluentImpl.java | 232 - .../models/V1PersistentVolumeListBuilder.java | 49 +- .../models/V1PersistentVolumeListFluent.java | 369 +- .../V1PersistentVolumeListFluentImpl.java | 259 - .../models/V1PersistentVolumeSpecBuilder.java | 145 +- .../models/V1PersistentVolumeSpecFluent.java | 2215 +- .../V1PersistentVolumeSpecFluentImpl.java | 1550 - .../V1PersistentVolumeStatusBuilder.java | 44 +- .../V1PersistentVolumeStatusFluent.java | 125 +- .../V1PersistentVolumeStatusFluentImpl.java | 79 - ...otonPersistentDiskVolumeSourceBuilder.java | 41 +- ...hotonPersistentDiskVolumeSourceFluent.java | 87 +- ...nPersistentDiskVolumeSourceFluentImpl.java | 65 - .../openapi/models/V1PodAffinityBuilder.java | 45 +- .../openapi/models/V1PodAffinityFluent.java | 458 +- .../models/V1PodAffinityFluentImpl.java | 307 - .../models/V1PodAffinityTermBuilder.java | 49 +- .../models/V1PodAffinityTermFluent.java | 334 +- .../models/V1PodAffinityTermFluentImpl.java | 223 - .../models/V1PodAntiAffinityBuilder.java | 45 +- .../models/V1PodAntiAffinityFluent.java | 458 +- .../models/V1PodAntiAffinityFluentImpl.java | 307 - .../client/openapi/models/V1PodBuilder.java | 53 +- .../openapi/models/V1PodConditionBuilder.java | 49 +- .../openapi/models/V1PodConditionFluent.java | 167 +- .../models/V1PodConditionFluentImpl.java | 122 - .../openapi/models/V1PodDNSConfigBuilder.java | 45 +- .../openapi/models/V1PodDNSConfigFluent.java | 479 +- .../models/V1PodDNSConfigFluentImpl.java | 288 - .../models/V1PodDNSConfigOptionBuilder.java | 41 +- .../models/V1PodDNSConfigOptionFluent.java | 87 +- .../V1PodDNSConfigOptionFluentImpl.java | 65 - .../models/V1PodDisruptionBudgetBuilder.java | 53 +- .../models/V1PodDisruptionBudgetFluent.java | 317 +- .../V1PodDisruptionBudgetFluentImpl.java | 232 - .../V1PodDisruptionBudgetListBuilder.java | 49 +- .../V1PodDisruptionBudgetListFluent.java | 369 +- .../V1PodDisruptionBudgetListFluentImpl.java | 259 - .../V1PodDisruptionBudgetSpecBuilder.java | 47 +- .../V1PodDisruptionBudgetSpecFluent.java | 205 +- .../V1PodDisruptionBudgetSpecFluentImpl.java | 149 - .../V1PodDisruptionBudgetStatusBuilder.java | 53 +- .../V1PodDisruptionBudgetStatusFluent.java | 401 +- ...V1PodDisruptionBudgetStatusFluentImpl.java | 281 - .../models/V1PodFailurePolicyBuilder.java | 41 +- .../models/V1PodFailurePolicyFluent.java | 254 +- .../models/V1PodFailurePolicyFluentImpl.java | 176 - ...rePolicyOnExitCodesRequirementBuilder.java | 43 +- ...urePolicyOnExitCodesRequirementFluent.java | 200 +- ...olicyOnExitCodesRequirementFluentImpl.java | 126 - ...rePolicyOnPodConditionsPatternBuilder.java | 41 +- ...urePolicyOnPodConditionsPatternFluent.java | 87 +- ...olicyOnPodConditionsPatternFluentImpl.java | 65 - .../models/V1PodFailurePolicyRuleBuilder.java | 47 +- .../models/V1PodFailurePolicyRuleFluent.java | 349 +- .../V1PodFailurePolicyRuleFluentImpl.java | 245 - .../client/openapi/models/V1PodFluent.java | 317 +- .../openapi/models/V1PodFluentImpl.java | 232 - .../client/openapi/models/V1PodIPBuilder.java | 39 +- .../client/openapi/models/V1PodIPFluent.java | 67 +- .../openapi/models/V1PodListBuilder.java | 49 +- .../openapi/models/V1PodListFluent.java | 369 +- .../openapi/models/V1PodListFluentImpl.java | 259 - .../client/openapi/models/V1PodOSBuilder.java | 39 +- .../client/openapi/models/V1PodOSFluent.java | 67 +- .../openapi/models/V1PodOSFluentImpl.java | 51 - .../models/V1PodReadinessGateBuilder.java | 39 +- .../models/V1PodReadinessGateFluent.java | 67 +- .../models/V1PodReadinessGateFluentImpl.java | 51 - .../models/V1PodResourceClaimBuilder.java | 43 +- .../models/V1PodResourceClaimFluent.java | 145 +- .../models/V1PodResourceClaimFluentImpl.java | 108 - .../V1PodResourceClaimStatusBuilder.java | 32 + .../V1PodResourceClaimStatusFluent.java | 80 + .../models/V1PodSchedulingGateBuilder.java | 39 +- .../models/V1PodSchedulingGateFluent.java | 67 +- .../models/V1PodSchedulingGateFluentImpl.java | 51 - .../models/V1PodSecurityContextBuilder.java | 65 +- .../models/V1PodSecurityContextFluent.java | 698 +- .../V1PodSecurityContextFluentImpl.java | 471 - .../openapi/models/V1PodSpecBuilder.java | 145 +- .../openapi/models/V1PodSpecFluent.java | 3206 +- .../openapi/models/V1PodSpecFluentImpl.java | 2103 - .../openapi/models/V1PodStatusBuilder.java | 77 +- .../openapi/models/V1PodStatusFluent.java | 1609 +- .../openapi/models/V1PodStatusFluentImpl.java | 827 - .../openapi/models/V1PodTemplateBuilder.java | 49 +- .../openapi/models/V1PodTemplateFluent.java | 241 +- .../models/V1PodTemplateFluentImpl.java | 177 - .../models/V1PodTemplateListBuilder.java | 49 +- .../models/V1PodTemplateListFluent.java | 369 +- .../models/V1PodTemplateListFluentImpl.java | 259 - .../models/V1PodTemplateSpecBuilder.java | 45 +- .../models/V1PodTemplateSpecFluent.java | 202 +- .../models/V1PodTemplateSpecFluentImpl.java | 149 - .../openapi/models/V1PolicyRuleBuilder.java | 47 +- .../openapi/models/V1PolicyRuleFluent.java | 612 +- .../models/V1PolicyRuleFluentImpl.java | 321 - .../openapi/models/V1PortStatusBuilder.java | 43 +- .../openapi/models/V1PortStatusFluent.java | 107 +- .../models/V1PortStatusFluentImpl.java | 80 - .../models/V1PortworxVolumeSourceBuilder.java | 43 +- .../models/V1PortworxVolumeSourceFluent.java | 111 +- .../V1PortworxVolumeSourceFluentImpl.java | 82 - .../models/V1PreconditionsBuilder.java | 41 +- .../openapi/models/V1PreconditionsFluent.java | 87 +- .../models/V1PreconditionsFluentImpl.java | 65 - .../V1PreferredSchedulingTermBuilder.java | 43 +- .../V1PreferredSchedulingTermFluent.java | 148 +- .../V1PreferredSchedulingTermFluentImpl.java | 109 - .../models/V1PriorityClassBuilder.java | 53 +- .../openapi/models/V1PriorityClassFluent.java | 251 +- .../models/V1PriorityClassFluentImpl.java | 182 - .../models/V1PriorityClassListBuilder.java | 49 +- .../models/V1PriorityClassListFluent.java | 369 +- .../models/V1PriorityClassListFluentImpl.java | 259 - .../client/openapi/models/V1ProbeBuilder.java | 65 +- .../client/openapi/models/V1ProbeFluent.java | 474 +- .../openapi/models/V1ProbeFluentImpl.java | 345 - .../V1ProjectedVolumeSourceBuilder.java | 43 +- .../models/V1ProjectedVolumeSourceFluent.java | 274 +- .../V1ProjectedVolumeSourceFluentImpl.java | 191 - .../models/V1QuobyteVolumeSourceBuilder.java | 49 +- .../models/V1QuobyteVolumeSourceFluent.java | 171 +- .../V1QuobyteVolumeSourceFluentImpl.java | 124 - .../V1RBDPersistentVolumeSourceBuilder.java | 55 +- .../V1RBDPersistentVolumeSourceFluent.java | 362 +- ...V1RBDPersistentVolumeSourceFluentImpl.java | 241 - .../models/V1RBDVolumeSourceBuilder.java | 55 +- .../models/V1RBDVolumeSourceFluent.java | 362 +- .../models/V1RBDVolumeSourceFluentImpl.java | 241 - .../openapi/models/V1ReplicaSetBuilder.java | 53 +- .../models/V1ReplicaSetConditionBuilder.java | 47 +- .../models/V1ReplicaSetConditionFluent.java | 147 +- .../V1ReplicaSetConditionFluentImpl.java | 108 - .../openapi/models/V1ReplicaSetFluent.java | 317 +- .../models/V1ReplicaSetFluentImpl.java | 232 - .../models/V1ReplicaSetListBuilder.java | 49 +- .../models/V1ReplicaSetListFluent.java | 369 +- .../models/V1ReplicaSetListFluentImpl.java | 259 - .../models/V1ReplicaSetSpecBuilder.java | 49 +- .../models/V1ReplicaSetSpecFluent.java | 242 +- .../models/V1ReplicaSetSpecFluentImpl.java | 178 - .../models/V1ReplicaSetStatusBuilder.java | 51 +- .../models/V1ReplicaSetStatusFluent.java | 354 +- .../models/V1ReplicaSetStatusFluentImpl.java | 248 - .../V1ReplicationControllerBuilder.java | 53 +- ...ReplicationControllerConditionBuilder.java | 47 +- ...1ReplicationControllerConditionFluent.java | 147 +- ...licationControllerConditionFluentImpl.java | 108 - .../models/V1ReplicationControllerFluent.java | 317 +- .../V1ReplicationControllerFluentImpl.java | 232 - .../V1ReplicationControllerListBuilder.java | 49 +- .../V1ReplicationControllerListFluent.java | 369 +- ...V1ReplicationControllerListFluentImpl.java | 259 - .../V1ReplicationControllerSpecBuilder.java | 47 +- .../V1ReplicationControllerSpecFluent.java | 213 +- ...V1ReplicationControllerSpecFluentImpl.java | 155 - .../V1ReplicationControllerStatusBuilder.java | 51 +- .../V1ReplicationControllerStatusFluent.java | 354 +- ...ReplicationControllerStatusFluentImpl.java | 248 - .../models/V1ResourceAttributesBuilder.java | 51 +- .../models/V1ResourceAttributesFluent.java | 187 +- .../V1ResourceAttributesFluentImpl.java | 135 - .../models/V1ResourceClaimBuilder.java | 39 +- .../openapi/models/V1ResourceClaimFluent.java | 67 +- .../models/V1ResourceClaimFluentImpl.java | 51 - .../V1ResourceFieldSelectorBuilder.java | 43 +- .../models/V1ResourceFieldSelectorFluent.java | 112 +- .../V1ResourceFieldSelectorFluentImpl.java | 83 - .../models/V1ResourceQuotaBuilder.java | 53 +- .../openapi/models/V1ResourceQuotaFluent.java | 317 +- .../models/V1ResourceQuotaFluentImpl.java | 232 - .../models/V1ResourceQuotaListBuilder.java | 49 +- .../models/V1ResourceQuotaListFluent.java | 369 +- .../models/V1ResourceQuotaListFluentImpl.java | 259 - .../models/V1ResourceQuotaSpecBuilder.java | 45 +- .../models/V1ResourceQuotaSpecFluent.java | 286 +- .../models/V1ResourceQuotaSpecFluentImpl.java | 187 - .../models/V1ResourceQuotaStatusBuilder.java | 41 +- .../models/V1ResourceQuotaStatusFluent.java | 143 +- .../V1ResourceQuotaStatusFluentImpl.java | 100 - .../models/V1ResourceRequirementsBuilder.java | 45 +- .../models/V1ResourceRequirementsFluent.java | 349 +- .../V1ResourceRequirementsFluentImpl.java | 239 - .../openapi/models/V1ResourceRuleBuilder.java | 45 +- .../openapi/models/V1ResourceRuleFluent.java | 499 +- .../models/V1ResourceRuleFluentImpl.java | 265 - .../openapi/models/V1RoleBindingBuilder.java | 53 +- .../openapi/models/V1RoleBindingFluent.java | 447 +- .../models/V1RoleBindingFluentImpl.java | 314 - .../models/V1RoleBindingListBuilder.java | 49 +- .../models/V1RoleBindingListFluent.java | 369 +- .../models/V1RoleBindingListFluentImpl.java | 259 - .../client/openapi/models/V1RoleBuilder.java | 49 +- .../client/openapi/models/V1RoleFluent.java | 369 +- .../openapi/models/V1RoleFluentImpl.java | 259 - .../openapi/models/V1RoleListBuilder.java | 49 +- .../openapi/models/V1RoleListFluent.java | 369 +- .../openapi/models/V1RoleListFluentImpl.java | 259 - .../openapi/models/V1RoleRefBuilder.java | 43 +- .../openapi/models/V1RoleRefFluent.java | 107 +- .../openapi/models/V1RoleRefFluentImpl.java | 79 - .../V1RollingUpdateDaemonSetBuilder.java | 41 +- .../V1RollingUpdateDaemonSetFluent.java | 107 +- .../V1RollingUpdateDaemonSetFluentImpl.java | 78 - .../V1RollingUpdateDeploymentBuilder.java | 41 +- .../V1RollingUpdateDeploymentFluent.java | 107 +- .../V1RollingUpdateDeploymentFluentImpl.java | 78 - ...llingUpdateStatefulSetStrategyBuilder.java | 41 +- ...ollingUpdateStatefulSetStrategyFluent.java | 97 +- ...ngUpdateStatefulSetStrategyFluentImpl.java | 73 - .../models/V1RuleWithOperationsBuilder.java | 47 +- .../models/V1RuleWithOperationsFluent.java | 519 +- .../V1RuleWithOperationsFluentImpl.java | 279 - .../openapi/models/V1RuntimeClassBuilder.java | 55 +- .../openapi/models/V1RuntimeClassFluent.java | 337 +- .../models/V1RuntimeClassFluentImpl.java | 246 - .../models/V1RuntimeClassListBuilder.java | 49 +- .../models/V1RuntimeClassListFluent.java | 369 +- .../models/V1RuntimeClassListFluentImpl.java | 259 - .../models/V1SELinuxOptionsBuilder.java | 45 +- .../models/V1SELinuxOptionsFluent.java | 127 +- .../models/V1SELinuxOptionsFluentImpl.java | 93 - .../client/openapi/models/V1ScaleBuilder.java | 53 +- .../client/openapi/models/V1ScaleFluent.java | 317 +- .../openapi/models/V1ScaleFluentImpl.java | 232 - ...1ScaleIOPersistentVolumeSourceBuilder.java | 59 +- ...V1ScaleIOPersistentVolumeSourceFluent.java | 314 +- ...aleIOPersistentVolumeSourceFluentImpl.java | 226 - .../models/V1ScaleIOVolumeSourceBuilder.java | 59 +- .../models/V1ScaleIOVolumeSourceFluent.java | 314 +- .../V1ScaleIOVolumeSourceFluentImpl.java | 226 - .../openapi/models/V1ScaleSpecBuilder.java | 39 +- .../openapi/models/V1ScaleSpecFluent.java | 68 +- .../openapi/models/V1ScaleSpecFluentImpl.java | 52 - .../openapi/models/V1ScaleStatusBuilder.java | 41 +- .../openapi/models/V1ScaleStatusFluent.java | 87 +- .../models/V1ScaleStatusFluentImpl.java | 66 - .../openapi/models/V1SchedulingBuilder.java | 43 +- .../openapi/models/V1SchedulingFluent.java | 301 +- .../models/V1SchedulingFluentImpl.java | 208 - .../models/V1ScopeSelectorBuilder.java | 41 +- .../openapi/models/V1ScopeSelectorFluent.java | 254 +- .../models/V1ScopeSelectorFluentImpl.java | 176 - ...pedResourceSelectorRequirementBuilder.java | 43 +- ...opedResourceSelectorRequirementFluent.java | 200 +- ...ResourceSelectorRequirementFluentImpl.java | 125 - .../models/V1SeccompProfileBuilder.java | 41 +- .../models/V1SeccompProfileFluent.java | 87 +- .../models/V1SeccompProfileFluentImpl.java | 65 - .../openapi/models/V1SecretBuilder.java | 53 +- .../models/V1SecretEnvSourceBuilder.java | 41 +- .../models/V1SecretEnvSourceFluent.java | 91 +- .../models/V1SecretEnvSourceFluentImpl.java | 68 - .../client/openapi/models/V1SecretFluent.java | 307 +- .../openapi/models/V1SecretFluentImpl.java | 215 - .../models/V1SecretKeySelectorBuilder.java | 43 +- .../models/V1SecretKeySelectorFluent.java | 111 +- .../models/V1SecretKeySelectorFluentImpl.java | 82 - .../openapi/models/V1SecretListBuilder.java | 49 +- .../openapi/models/V1SecretListFluent.java | 369 +- .../models/V1SecretListFluentImpl.java | 259 - .../models/V1SecretProjectionBuilder.java | 45 +- .../models/V1SecretProjectionFluent.java | 297 +- .../models/V1SecretProjectionFluentImpl.java | 207 - .../models/V1SecretReferenceBuilder.java | 41 +- .../models/V1SecretReferenceFluent.java | 87 +- .../models/V1SecretReferenceFluentImpl.java | 65 - .../models/V1SecretVolumeSourceBuilder.java | 47 +- .../models/V1SecretVolumeSourceFluent.java | 317 +- .../V1SecretVolumeSourceFluentImpl.java | 222 - .../models/V1SecurityContextBuilder.java | 67 +- .../models/V1SecurityContextFluent.java | 514 +- .../models/V1SecurityContextFluentImpl.java | 370 - .../V1SelfSubjectAccessReviewBuilder.java | 53 +- .../V1SelfSubjectAccessReviewFluent.java | 317 +- .../V1SelfSubjectAccessReviewFluentImpl.java | 232 - .../V1SelfSubjectAccessReviewSpecBuilder.java | 45 +- .../V1SelfSubjectAccessReviewSpecFluent.java | 202 +- ...SelfSubjectAccessReviewSpecFluentImpl.java | 149 - .../models/V1SelfSubjectReviewBuilder.java | 34 + .../models/V1SelfSubjectReviewFluent.java | 200 + .../V1SelfSubjectReviewStatusBuilder.java | 31 + .../V1SelfSubjectReviewStatusFluent.java | 106 + .../V1SelfSubjectRulesReviewBuilder.java | 53 +- .../V1SelfSubjectRulesReviewFluent.java | 317 +- .../V1SelfSubjectRulesReviewFluentImpl.java | 232 - .../V1SelfSubjectRulesReviewSpecBuilder.java | 39 +- .../V1SelfSubjectRulesReviewSpecFluent.java | 67 +- ...1SelfSubjectRulesReviewSpecFluentImpl.java | 51 - .../V1ServerAddressByClientCIDRBuilder.java | 41 +- .../V1ServerAddressByClientCIDRFluent.java | 87 +- ...V1ServerAddressByClientCIDRFluentImpl.java | 65 - .../models/V1ServiceAccountBuilder.java | 55 +- .../models/V1ServiceAccountFluent.java | 599 +- .../models/V1ServiceAccountFluentImpl.java | 407 - .../models/V1ServiceAccountListBuilder.java | 49 +- .../models/V1ServiceAccountListFluent.java | 369 +- .../V1ServiceAccountListFluentImpl.java | 259 - ...1ServiceAccountTokenProjectionBuilder.java | 43 +- ...V1ServiceAccountTokenProjectionFluent.java | 107 +- ...rviceAccountTokenProjectionFluentImpl.java | 80 - .../models/V1ServiceBackendPortBuilder.java | 41 +- .../models/V1ServiceBackendPortFluent.java | 87 +- .../V1ServiceBackendPortFluentImpl.java | 66 - .../openapi/models/V1ServiceBuilder.java | 53 +- .../openapi/models/V1ServiceFluent.java | 317 +- .../openapi/models/V1ServiceFluentImpl.java | 232 - .../openapi/models/V1ServiceListBuilder.java | 49 +- .../openapi/models/V1ServiceListFluent.java | 369 +- .../models/V1ServiceListFluentImpl.java | 259 - .../openapi/models/V1ServicePortBuilder.java | 49 +- .../openapi/models/V1ServicePortFluent.java | 177 +- .../models/V1ServicePortFluentImpl.java | 129 - .../openapi/models/V1ServiceSpecBuilder.java | 79 +- .../openapi/models/V1ServiceSpecFluent.java | 1082 +- .../models/V1ServiceSpecFluentImpl.java | 662 - .../models/V1ServiceStatusBuilder.java | 45 +- .../openapi/models/V1ServiceStatusFluent.java | 330 +- .../models/V1ServiceStatusFluentImpl.java | 231 - .../V1SessionAffinityConfigBuilder.java | 41 +- .../models/V1SessionAffinityConfigFluent.java | 126 +- .../V1SessionAffinityConfigFluentImpl.java | 94 - .../openapi/models/V1StatefulSetBuilder.java | 53 +- .../models/V1StatefulSetConditionBuilder.java | 47 +- .../models/V1StatefulSetConditionFluent.java | 147 +- .../V1StatefulSetConditionFluentImpl.java | 108 - .../openapi/models/V1StatefulSetFluent.java | 317 +- .../models/V1StatefulSetFluentImpl.java | 232 - .../models/V1StatefulSetListBuilder.java | 49 +- .../models/V1StatefulSetListFluent.java | 369 +- .../models/V1StatefulSetListFluentImpl.java | 259 - .../models/V1StatefulSetOrdinalsBuilder.java | 39 +- .../models/V1StatefulSetOrdinalsFluent.java | 68 +- .../V1StatefulSetOrdinalsFluentImpl.java | 52 - ...tentVolumeClaimRetentionPolicyBuilder.java | 41 +- ...stentVolumeClaimRetentionPolicyFluent.java | 87 +- ...tVolumeClaimRetentionPolicyFluentImpl.java | 65 - .../models/V1StatefulSetSpecBuilder.java | 71 +- .../models/V1StatefulSetSpecFluent.java | 751 +- .../models/V1StatefulSetSpecFluentImpl.java | 522 - .../models/V1StatefulSetStatusBuilder.java | 59 +- .../models/V1StatefulSetStatusFluent.java | 433 +- .../models/V1StatefulSetStatusFluentImpl.java | 304 - .../V1StatefulSetUpdateStrategyBuilder.java | 43 +- .../V1StatefulSetUpdateStrategyFluent.java | 145 +- ...V1StatefulSetUpdateStrategyFluentImpl.java | 108 - .../openapi/models/V1StatusBuilder.java | 57 +- .../openapi/models/V1StatusCauseBuilder.java | 43 +- .../openapi/models/V1StatusCauseFluent.java | 107 +- .../models/V1StatusCauseFluentImpl.java | 79 - .../models/V1StatusDetailsBuilder.java | 51 +- .../openapi/models/V1StatusDetailsFluent.java | 353 +- .../models/V1StatusDetailsFluentImpl.java | 247 - .../client/openapi/models/V1StatusFluent.java | 321 +- .../openapi/models/V1StatusFluentImpl.java | 234 - .../openapi/models/V1StorageClassBuilder.java | 61 +- .../openapi/models/V1StorageClassFluent.java | 616 +- .../models/V1StorageClassFluentImpl.java | 406 - .../models/V1StorageClassListBuilder.java | 49 +- .../models/V1StorageClassListFluent.java | 369 +- .../models/V1StorageClassListFluentImpl.java | 259 - ...torageOSPersistentVolumeSourceBuilder.java | 49 +- ...StorageOSPersistentVolumeSourceFluent.java | 209 +- ...ageOSPersistentVolumeSourceFluentImpl.java | 153 - .../V1StorageOSVolumeSourceBuilder.java | 49 +- .../models/V1StorageOSVolumeSourceFluent.java | 209 +- .../V1StorageOSVolumeSourceFluentImpl.java | 153 - .../models/V1SubjectAccessReviewBuilder.java | 53 +- .../models/V1SubjectAccessReviewFluent.java | 317 +- .../V1SubjectAccessReviewFluentImpl.java | 232 - .../V1SubjectAccessReviewSpecBuilder.java | 53 +- .../V1SubjectAccessReviewSpecFluent.java | 402 +- .../V1SubjectAccessReviewSpecFluentImpl.java | 269 - .../V1SubjectAccessReviewStatusBuilder.java | 45 +- .../V1SubjectAccessReviewStatusFluent.java | 136 +- ...V1SubjectAccessReviewStatusFluentImpl.java | 99 - .../openapi/models/V1SubjectBuilder.java | 45 +- .../openapi/models/V1SubjectFluent.java | 127 +- .../openapi/models/V1SubjectFluentImpl.java | 93 - .../V1SubjectRulesReviewStatusBuilder.java | 49 +- .../V1SubjectRulesReviewStatusFluent.java | 501 +- .../V1SubjectRulesReviewStatusFluentImpl.java | 338 - .../openapi/models/V1SysctlBuilder.java | 41 +- .../client/openapi/models/V1SysctlFluent.java | 87 +- .../openapi/models/V1SysctlFluentImpl.java | 65 - .../models/V1TCPSocketActionBuilder.java | 41 +- .../models/V1TCPSocketActionFluent.java | 97 +- .../models/V1TCPSocketActionFluentImpl.java | 72 - .../client/openapi/models/V1TaintBuilder.java | 45 +- .../client/openapi/models/V1TaintFluent.java | 127 +- .../openapi/models/V1TaintFluentImpl.java | 94 - .../models/V1TokenRequestSpecBuilder.java | 45 +- .../models/V1TokenRequestSpecFluent.java | 258 +- .../models/V1TokenRequestSpecFluentImpl.java | 169 - .../models/V1TokenRequestStatusBuilder.java | 41 +- .../models/V1TokenRequestStatusFluent.java | 87 +- .../V1TokenRequestStatusFluentImpl.java | 66 - .../openapi/models/V1TokenReviewBuilder.java | 53 +- .../openapi/models/V1TokenReviewFluent.java | 317 +- .../models/V1TokenReviewFluentImpl.java | 232 - .../models/V1TokenReviewSpecBuilder.java | 41 +- .../models/V1TokenReviewSpecFluent.java | 180 +- .../models/V1TokenReviewSpecFluentImpl.java | 111 - .../models/V1TokenReviewStatusBuilder.java | 47 +- .../models/V1TokenReviewStatusFluent.java | 282 +- .../models/V1TokenReviewStatusFluentImpl.java | 185 - .../openapi/models/V1TolerationBuilder.java | 47 +- .../openapi/models/V1TolerationFluent.java | 147 +- .../models/V1TolerationFluentImpl.java | 108 - ...pologySelectorLabelRequirementBuilder.java | 41 +- ...opologySelectorLabelRequirementFluent.java | 180 +- ...ogySelectorLabelRequirementFluentImpl.java | 111 - .../models/V1TopologySelectorTermBuilder.java | 41 +- .../models/V1TopologySelectorTermFluent.java | 254 +- .../V1TopologySelectorTermFluentImpl.java | 176 - .../V1TopologySpreadConstraintBuilder.java | 55 +- .../V1TopologySpreadConstraintFluent.java | 358 +- .../V1TopologySpreadConstraintFluentImpl.java | 239 - .../V1TypedLocalObjectReferenceBuilder.java | 43 +- .../V1TypedLocalObjectReferenceFluent.java | 107 +- ...V1TypedLocalObjectReferenceFluentImpl.java | 79 - .../models/V1TypedObjectReferenceBuilder.java | 45 +- .../models/V1TypedObjectReferenceFluent.java | 127 +- .../V1TypedObjectReferenceFluentImpl.java | 93 - .../V1UncountedTerminatedPodsBuilder.java | 41 +- .../V1UncountedTerminatedPodsFluent.java | 273 +- .../V1UncountedTerminatedPodsFluentImpl.java | 153 - .../openapi/models/V1UserInfoBuilder.java | 45 +- .../openapi/models/V1UserInfoFluent.java | 248 +- .../openapi/models/V1UserInfoFluentImpl.java | 157 - .../models/V1ValidatingWebhookBuilder.java | 69 +- ...ValidatingWebhookConfigurationBuilder.java | 49 +- ...1ValidatingWebhookConfigurationFluent.java | 369 +- ...idatingWebhookConfigurationFluentImpl.java | 259 - ...datingWebhookConfigurationListBuilder.java | 49 +- ...idatingWebhookConfigurationListFluent.java | 369 +- ...ingWebhookConfigurationListFluentImpl.java | 259 - .../models/V1ValidatingWebhookFluent.java | 898 +- .../models/V1ValidatingWebhookFluentImpl.java | 599 - .../models/V1ValidationRuleBuilder.java | 45 +- .../models/V1ValidationRuleFluent.java | 141 +- .../models/V1ValidationRuleFluentImpl.java | 79 - .../models/V1VolumeAttachmentBuilder.java | 53 +- .../models/V1VolumeAttachmentFluent.java | 317 +- .../models/V1VolumeAttachmentFluentImpl.java | 232 - .../models/V1VolumeAttachmentListBuilder.java | 49 +- .../models/V1VolumeAttachmentListFluent.java | 369 +- .../V1VolumeAttachmentListFluentImpl.java | 259 - .../V1VolumeAttachmentSourceBuilder.java | 43 +- .../V1VolumeAttachmentSourceFluent.java | 145 +- .../V1VolumeAttachmentSourceFluentImpl.java | 108 - .../models/V1VolumeAttachmentSpecBuilder.java | 45 +- .../models/V1VolumeAttachmentSpecFluent.java | 165 +- .../V1VolumeAttachmentSpecFluentImpl.java | 122 - .../V1VolumeAttachmentStatusBuilder.java | 49 +- .../V1VolumeAttachmentStatusFluent.java | 273 +- .../V1VolumeAttachmentStatusFluentImpl.java | 198 - .../openapi/models/V1VolumeBuilder.java | 155 +- .../openapi/models/V1VolumeDeviceBuilder.java | 41 +- .../openapi/models/V1VolumeDeviceFluent.java | 87 +- .../models/V1VolumeDeviceFluentImpl.java | 65 - .../openapi/models/V1VolumeErrorBuilder.java | 41 +- .../openapi/models/V1VolumeErrorFluent.java | 87 +- .../models/V1VolumeErrorFluentImpl.java | 66 - .../client/openapi/models/V1VolumeFluent.java | 2277 +- .../openapi/models/V1VolumeFluentImpl.java | 1648 - .../openapi/models/V1VolumeMountBuilder.java | 49 +- .../openapi/models/V1VolumeMountFluent.java | 171 +- .../models/V1VolumeMountFluentImpl.java | 124 - .../models/V1VolumeNodeAffinityBuilder.java | 41 +- .../models/V1VolumeNodeAffinityFluent.java | 126 +- .../V1VolumeNodeAffinityFluentImpl.java | 94 - .../models/V1VolumeNodeResourcesBuilder.java | 39 +- .../models/V1VolumeNodeResourcesFluent.java | 68 +- .../V1VolumeNodeResourcesFluentImpl.java | 52 - .../models/V1VolumeProjectionBuilder.java | 53 +- .../models/V1VolumeProjectionFluent.java | 354 +- .../models/V1VolumeProjectionFluentImpl.java | 259 - ...VsphereVirtualDiskVolumeSourceBuilder.java | 45 +- ...1VsphereVirtualDiskVolumeSourceFluent.java | 127 +- ...hereVirtualDiskVolumeSourceFluentImpl.java | 93 - .../openapi/models/V1WatchEventBuilder.java | 41 +- .../openapi/models/V1WatchEventFluent.java | 86 +- .../models/V1WatchEventFluentImpl.java | 65 - .../models/V1WebhookConversionBuilder.java | 43 +- .../models/V1WebhookConversionFluent.java | 238 +- .../models/V1WebhookConversionFluentImpl.java | 154 - .../V1WeightedPodAffinityTermBuilder.java | 43 +- .../V1WeightedPodAffinityTermFluent.java | 148 +- .../V1WeightedPodAffinityTermFluentImpl.java | 109 - ...1WindowsSecurityContextOptionsBuilder.java | 45 +- ...V1WindowsSecurityContextOptionsFluent.java | 131 +- ...ndowsSecurityContextOptionsFluentImpl.java | 96 - .../V1alpha1AuditAnnotationBuilder.java | 41 +- .../models/V1alpha1AuditAnnotationFluent.java | 87 +- .../models/V1alpha1ClusterCIDRBuilder.java | 49 +- .../models/V1alpha1ClusterCIDRFluent.java | 241 +- .../models/V1alpha1ClusterCIDRFluentImpl.java | 177 - .../V1alpha1ClusterCIDRListBuilder.java | 49 +- .../models/V1alpha1ClusterCIDRListFluent.java | 369 +- .../V1alpha1ClusterCIDRListFluentImpl.java | 259 - .../V1alpha1ClusterCIDRSpecBuilder.java | 47 +- .../models/V1alpha1ClusterCIDRSpecFluent.java | 187 +- .../V1alpha1ClusterCIDRSpecFluentImpl.java | 137 - .../V1alpha1ClusterTrustBundleBuilder.java | 49 +- .../V1alpha1ClusterTrustBundleFluent.java | 241 +- .../V1alpha1ClusterTrustBundleFluentImpl.java | 177 - ...V1alpha1ClusterTrustBundleListBuilder.java | 49 +- .../V1alpha1ClusterTrustBundleListFluent.java | 369 +- ...lpha1ClusterTrustBundleListFluentImpl.java | 259 - ...V1alpha1ClusterTrustBundleSpecBuilder.java | 41 +- .../V1alpha1ClusterTrustBundleSpecFluent.java | 87 +- ...lpha1ClusterTrustBundleSpecFluentImpl.java | 65 - .../V1alpha1ExpressionWarningBuilder.java | 41 +- .../V1alpha1ExpressionWarningFluent.java | 87 +- .../models/V1alpha1IPAddressBuilder.java | 49 +- .../models/V1alpha1IPAddressFluent.java | 241 +- .../models/V1alpha1IPAddressFluentImpl.java | 177 - .../models/V1alpha1IPAddressListBuilder.java | 49 +- .../models/V1alpha1IPAddressListFluent.java | 369 +- .../V1alpha1IPAddressListFluentImpl.java | 259 - .../models/V1alpha1IPAddressSpecBuilder.java | 41 +- .../models/V1alpha1IPAddressSpecFluent.java | 126 +- .../V1alpha1IPAddressSpecFluentImpl.java | 94 - .../models/V1alpha1MatchConditionBuilder.java | 41 +- .../models/V1alpha1MatchConditionFluent.java | 87 +- .../models/V1alpha1MatchResourcesBuilder.java | 55 +- .../models/V1alpha1MatchResourcesFluent.java | 631 +- .../V1alpha1MatchResourcesFluentImpl.java | 431 - ...1alpha1NamedRuleWithOperationsBuilder.java | 49 +- ...V1alpha1NamedRuleWithOperationsFluent.java | 632 +- .../models/V1alpha1ParamKindBuilder.java | 41 +- .../models/V1alpha1ParamKindFluent.java | 87 +- .../models/V1alpha1ParamRefBuilder.java | 43 +- .../models/V1alpha1ParamRefFluent.java | 164 +- .../models/V1alpha1ParamRefFluentImpl.java | 65 - .../V1alpha1ParentReferenceBuilder.java | 47 +- .../models/V1alpha1ParentReferenceFluent.java | 147 +- .../V1alpha1ParentReferenceFluentImpl.java | 107 - .../V1alpha1SelfSubjectReviewBuilder.java | 49 +- .../V1alpha1SelfSubjectReviewFluent.java | 241 +- .../V1alpha1SelfSubjectReviewFluentImpl.java | 177 - ...1alpha1SelfSubjectReviewStatusBuilder.java | 41 +- ...V1alpha1SelfSubjectReviewStatusFluent.java | 126 +- ...pha1SelfSubjectReviewStatusFluentImpl.java | 94 - .../V1alpha1ServerStorageVersionBuilder.java | 44 +- .../V1alpha1ServerStorageVersionFluent.java | 298 +- ...1alpha1ServerStorageVersionFluentImpl.java | 125 - .../models/V1alpha1StorageVersionBuilder.java | 51 +- ...1alpha1StorageVersionConditionBuilder.java | 49 +- ...V1alpha1StorageVersionConditionFluent.java | 167 +- ...pha1StorageVersionConditionFluentImpl.java | 123 - .../models/V1alpha1StorageVersionFluent.java | 260 +- .../V1alpha1StorageVersionFluentImpl.java | 191 - .../V1alpha1StorageVersionListBuilder.java | 49 +- .../V1alpha1StorageVersionListFluent.java | 369 +- .../V1alpha1StorageVersionListFluentImpl.java | 259 - .../V1alpha1StorageVersionStatusBuilder.java | 47 +- .../V1alpha1StorageVersionStatusFluent.java | 477 +- ...1alpha1StorageVersionStatusFluentImpl.java | 321 - .../models/V1alpha1TypeCheckingBuilder.java | 41 +- .../models/V1alpha1TypeCheckingFluent.java | 254 +- .../V1alpha1TypeCheckingFluentImpl.java | 176 - ...lidatingAdmissionPolicyBindingBuilder.java | 49 +- ...alidatingAdmissionPolicyBindingFluent.java | 241 +- ...atingAdmissionPolicyBindingFluentImpl.java | 177 - ...tingAdmissionPolicyBindingListBuilder.java | 49 +- ...atingAdmissionPolicyBindingListFluent.java | 369 +- ...gAdmissionPolicyBindingListFluentImpl.java | 259 - ...tingAdmissionPolicyBindingSpecBuilder.java | 49 +- ...atingAdmissionPolicyBindingSpecFluent.java | 334 +- ...gAdmissionPolicyBindingSpecFluentImpl.java | 223 - ...lpha1ValidatingAdmissionPolicyBuilder.java | 53 +- ...alpha1ValidatingAdmissionPolicyFluent.java | 317 +- ...a1ValidatingAdmissionPolicyFluentImpl.java | 232 - ...1ValidatingAdmissionPolicyListBuilder.java | 49 +- ...a1ValidatingAdmissionPolicyListFluent.java | 369 +- ...lidatingAdmissionPolicyListFluentImpl.java | 259 - ...1ValidatingAdmissionPolicySpecBuilder.java | 60 +- ...a1ValidatingAdmissionPolicySpecFluent.java | 1020 +- ...lidatingAdmissionPolicySpecFluentImpl.java | 562 - ...alidatingAdmissionPolicyStatusBuilder.java | 47 +- ...ValidatingAdmissionPolicyStatusFluent.java | 350 +- ...datingAdmissionPolicyStatusFluentImpl.java | 246 - .../models/V1alpha1ValidationBuilder.java | 45 +- .../models/V1alpha1ValidationFluent.java | 127 +- .../models/V1alpha1VariableBuilder.java | 32 + ...tImpl.java => V1alpha1VariableFluent.java} | 53 +- .../V1alpha2AllocationResultBuilder.java | 47 +- .../V1alpha2AllocationResultFluent.java | 354 +- .../V1alpha2AllocationResultFluentImpl.java | 248 - .../V1alpha2PodSchedulingContextBuilder.java | 53 +- .../V1alpha2PodSchedulingContextFluent.java | 317 +- ...1alpha2PodSchedulingContextFluentImpl.java | 232 - ...alpha2PodSchedulingContextListBuilder.java | 49 +- ...1alpha2PodSchedulingContextListFluent.java | 369 +- ...ha2PodSchedulingContextListFluentImpl.java | 259 - ...alpha2PodSchedulingContextSpecBuilder.java | 41 +- ...1alpha2PodSchedulingContextSpecFluent.java | 180 +- ...ha2PodSchedulingContextSpecFluentImpl.java | 111 - ...pha2PodSchedulingContextStatusBuilder.java | 41 +- ...lpha2PodSchedulingContextStatusFluent.java | 254 +- ...2PodSchedulingContextStatusFluentImpl.java | 176 - .../models/V1alpha2ResourceClaimBuilder.java | 53 +- ...ResourceClaimConsumerReferenceBuilder.java | 45 +- ...2ResourceClaimConsumerReferenceFluent.java | 127 +- ...ourceClaimConsumerReferenceFluentImpl.java | 93 - .../models/V1alpha2ResourceClaimFluent.java | 317 +- .../V1alpha2ResourceClaimFluentImpl.java | 232 - .../V1alpha2ResourceClaimListBuilder.java | 49 +- .../V1alpha2ResourceClaimListFluent.java | 369 +- .../V1alpha2ResourceClaimListFluentImpl.java | 259 - ...sourceClaimParametersReferenceBuilder.java | 43 +- ...esourceClaimParametersReferenceFluent.java | 107 +- ...rceClaimParametersReferenceFluentImpl.java | 79 - ...2ResourceClaimSchedulingStatusBuilder.java | 41 +- ...a2ResourceClaimSchedulingStatusFluent.java | 180 +- ...sourceClaimSchedulingStatusFluentImpl.java | 111 - .../V1alpha2ResourceClaimSpecBuilder.java | 45 +- .../V1alpha2ResourceClaimSpecFluent.java | 165 +- .../V1alpha2ResourceClaimSpecFluentImpl.java | 122 - .../V1alpha2ResourceClaimStatusBuilder.java | 49 +- .../V1alpha2ResourceClaimStatusFluent.java | 373 +- ...V1alpha2ResourceClaimStatusFluentImpl.java | 262 - .../V1alpha2ResourceClaimTemplateBuilder.java | 49 +- .../V1alpha2ResourceClaimTemplateFluent.java | 241 +- ...alpha2ResourceClaimTemplateFluentImpl.java | 177 - ...lpha2ResourceClaimTemplateListBuilder.java | 49 +- ...alpha2ResourceClaimTemplateListFluent.java | 369 +- ...a2ResourceClaimTemplateListFluentImpl.java | 259 - ...lpha2ResourceClaimTemplateSpecBuilder.java | 45 +- ...alpha2ResourceClaimTemplateSpecFluent.java | 202 +- ...a2ResourceClaimTemplateSpecFluentImpl.java | 149 - .../models/V1alpha2ResourceClassBuilder.java | 55 +- .../models/V1alpha2ResourceClassFluent.java | 337 +- .../V1alpha2ResourceClassFluentImpl.java | 246 - .../V1alpha2ResourceClassListBuilder.java | 49 +- .../V1alpha2ResourceClassListFluent.java | 369 +- .../V1alpha2ResourceClassListFluentImpl.java | 259 - ...sourceClassParametersReferenceBuilder.java | 45 +- ...esourceClassParametersReferenceFluent.java | 127 +- ...rceClassParametersReferenceFluentImpl.java | 93 - .../models/V1alpha2ResourceHandleBuilder.java | 41 +- .../models/V1alpha2ResourceHandleFluent.java | 87 +- .../V1alpha2ResourceHandleFluentImpl.java | 65 - .../models/V1beta1AuditAnnotationBuilder.java | 32 + ...java => V1beta1AuditAnnotationFluent.java} | 53 +- .../V1beta1ExpressionWarningBuilder.java | 32 + ...va => V1beta1ExpressionWarningFluent.java} | 53 +- .../models/V1beta1MatchConditionBuilder.java | 32 + .../models/V1beta1MatchConditionFluent.java | 80 + .../models/V1beta1MatchResourcesBuilder.java | 35 + .../models/V1beta1MatchResourcesFluent.java | 535 + ...V1beta1NamedRuleWithOperationsBuilder.java | 36 + ...V1beta1NamedRuleWithOperationsFluent.java} | 374 +- .../models/V1beta1ParamKindBuilder.java | 32 + ...tImpl.java => V1beta1ParamKindFluent.java} | 53 +- .../models/V1beta1ParamRefBuilder.java | 34 + .../openapi/models/V1beta1ParamRefFluent.java | 157 + .../V1beta1SelfSubjectReviewBuilder.java | 49 +- .../V1beta1SelfSubjectReviewFluent.java | 241 +- .../V1beta1SelfSubjectReviewFluentImpl.java | 177 - ...V1beta1SelfSubjectReviewStatusBuilder.java | 41 +- .../V1beta1SelfSubjectReviewStatusFluent.java | 126 +- ...eta1SelfSubjectReviewStatusFluentImpl.java | 94 - .../models/V1beta1TypeCheckingBuilder.java | 31 + .../models/V1beta1TypeCheckingFluent.java | 225 + ...lidatingAdmissionPolicyBindingBuilder.java | 34 + ...alidatingAdmissionPolicyBindingFluent.java | 200 + ...tingAdmissionPolicyBindingListBuilder.java | 34 + ...atingAdmissionPolicyBindingListFluent.java | 319 + ...tingAdmissionPolicyBindingSpecBuilder.java | 34 + ...atingAdmissionPolicyBindingSpecFluent.java | 285 + ...beta1ValidatingAdmissionPolicyBuilder.java | 35 + ...1beta1ValidatingAdmissionPolicyFluent.java | 260 + ...1ValidatingAdmissionPolicyListBuilder.java | 34 + ...a1ValidatingAdmissionPolicyListFluent.java | 319 + ...1ValidatingAdmissionPolicySpecBuilder.java | 37 + ...a1ValidatingAdmissionPolicySpecFluent.java | 881 + ...alidatingAdmissionPolicyStatusBuilder.java | 33 + ...ValidatingAdmissionPolicyStatusFluent.java | 303 + .../models/V1beta1ValidationBuilder.java | 34 + ...Impl.java => V1beta1ValidationFluent.java} | 77 +- .../models/V1beta1VariableBuilder.java | 32 + ...ntImpl.java => V1beta1VariableFluent.java} | 53 +- ...emptPriorityLevelConfigurationBuilder.java | 32 + ...xemptPriorityLevelConfigurationFluent.java | 81 + ...V1beta2FlowDistinguisherMethodBuilder.java | 39 +- .../V1beta2FlowDistinguisherMethodFluent.java | 67 +- ...eta2FlowDistinguisherMethodFluentImpl.java | 51 - .../models/V1beta2FlowSchemaBuilder.java | 53 +- .../V1beta2FlowSchemaConditionBuilder.java | 47 +- .../V1beta2FlowSchemaConditionFluent.java | 147 +- .../V1beta2FlowSchemaConditionFluentImpl.java | 108 - .../models/V1beta2FlowSchemaFluent.java | 317 +- .../models/V1beta2FlowSchemaFluentImpl.java | 232 - .../models/V1beta2FlowSchemaListBuilder.java | 49 +- .../models/V1beta2FlowSchemaListFluent.java | 369 +- .../V1beta2FlowSchemaListFluentImpl.java | 259 - .../models/V1beta2FlowSchemaSpecBuilder.java | 51 +- .../models/V1beta2FlowSchemaSpecFluent.java | 430 +- .../V1beta2FlowSchemaSpecFluentImpl.java | 301 - .../V1beta2FlowSchemaStatusBuilder.java | 41 +- .../models/V1beta2FlowSchemaStatusFluent.java | 254 +- .../V1beta2FlowSchemaStatusFluentImpl.java | 176 - .../models/V1beta2GroupSubjectBuilder.java | 39 +- .../models/V1beta2GroupSubjectFluent.java | 67 +- .../models/V1beta2GroupSubjectFluentImpl.java | 51 - .../models/V1beta2LimitResponseBuilder.java | 43 +- .../models/V1beta2LimitResponseFluent.java | 145 +- .../V1beta2LimitResponseFluentImpl.java | 108 - ...itedPriorityLevelConfigurationBuilder.java | 47 +- ...mitedPriorityLevelConfigurationFluent.java | 188 +- ...dPriorityLevelConfigurationFluentImpl.java | 137 - .../V1beta2NonResourcePolicyRuleBuilder.java | 41 +- .../V1beta2NonResourcePolicyRuleFluent.java | 273 +- ...1beta2NonResourcePolicyRuleFluentImpl.java | 153 - ...V1beta2PolicyRulesWithSubjectsBuilder.java | 49 +- .../V1beta2PolicyRulesWithSubjectsFluent.java | 664 +- ...eta2PolicyRulesWithSubjectsFluentImpl.java | 438 - ...eta2PriorityLevelConfigurationBuilder.java | 53 +- ...ityLevelConfigurationConditionBuilder.java | 47 +- ...rityLevelConfigurationConditionFluent.java | 147 +- ...LevelConfigurationConditionFluentImpl.java | 108 - ...beta2PriorityLevelConfigurationFluent.java | 317 +- ...2PriorityLevelConfigurationFluentImpl.java | 232 - ...PriorityLevelConfigurationListBuilder.java | 49 +- ...2PriorityLevelConfigurationListFluent.java | 369 +- ...orityLevelConfigurationListFluentImpl.java | 259 - ...ityLevelConfigurationReferenceBuilder.java | 39 +- ...rityLevelConfigurationReferenceFluent.java | 67 +- ...LevelConfigurationReferenceFluentImpl.java | 51 - ...PriorityLevelConfigurationSpecBuilder.java | 44 +- ...2PriorityLevelConfigurationSpecFluent.java | 203 +- ...orityLevelConfigurationSpecFluentImpl.java | 108 - ...iorityLevelConfigurationStatusBuilder.java | 41 +- ...riorityLevelConfigurationStatusFluent.java | 254 +- ...ityLevelConfigurationStatusFluentImpl.java | 176 - .../V1beta2QueuingConfigurationBuilder.java | 43 +- .../V1beta2QueuingConfigurationFluent.java | 108 +- ...V1beta2QueuingConfigurationFluentImpl.java | 80 - .../V1beta2ResourcePolicyRuleBuilder.java | 47 +- .../V1beta2ResourcePolicyRuleFluent.java | 523 +- .../V1beta2ResourcePolicyRuleFluentImpl.java | 282 - .../V1beta2ServiceAccountSubjectBuilder.java | 41 +- .../V1beta2ServiceAccountSubjectFluent.java | 87 +- ...1beta2ServiceAccountSubjectFluentImpl.java | 65 - .../openapi/models/V1beta2SubjectBuilder.java | 51 +- .../openapi/models/V1beta2SubjectFluent.java | 297 +- .../models/V1beta2SubjectFluentImpl.java | 218 - .../models/V1beta2UserSubjectBuilder.java | 39 +- .../models/V1beta2UserSubjectFluent.java | 67 +- .../models/V1beta2UserSubjectFluentImpl.java | 51 - ...emptPriorityLevelConfigurationBuilder.java | 32 + ...xemptPriorityLevelConfigurationFluent.java | 81 + ...V1beta3FlowDistinguisherMethodBuilder.java | 39 +- .../V1beta3FlowDistinguisherMethodFluent.java | 67 +- ...eta3FlowDistinguisherMethodFluentImpl.java | 51 - .../models/V1beta3FlowSchemaBuilder.java | 53 +- .../V1beta3FlowSchemaConditionBuilder.java | 47 +- .../V1beta3FlowSchemaConditionFluent.java | 147 +- .../V1beta3FlowSchemaConditionFluentImpl.java | 108 - .../models/V1beta3FlowSchemaFluent.java | 317 +- .../models/V1beta3FlowSchemaFluentImpl.java | 232 - .../models/V1beta3FlowSchemaListBuilder.java | 49 +- .../models/V1beta3FlowSchemaListFluent.java | 369 +- .../V1beta3FlowSchemaListFluentImpl.java | 259 - .../models/V1beta3FlowSchemaSpecBuilder.java | 51 +- .../models/V1beta3FlowSchemaSpecFluent.java | 430 +- .../V1beta3FlowSchemaSpecFluentImpl.java | 301 - .../V1beta3FlowSchemaStatusBuilder.java | 41 +- .../models/V1beta3FlowSchemaStatusFluent.java | 254 +- .../V1beta3FlowSchemaStatusFluentImpl.java | 176 - .../models/V1beta3GroupSubjectBuilder.java | 39 +- .../models/V1beta3GroupSubjectFluent.java | 67 +- .../models/V1beta3GroupSubjectFluentImpl.java | 51 - .../models/V1beta3LimitResponseBuilder.java | 43 +- .../models/V1beta3LimitResponseFluent.java | 145 +- .../V1beta3LimitResponseFluentImpl.java | 108 - ...itedPriorityLevelConfigurationBuilder.java | 47 +- ...mitedPriorityLevelConfigurationFluent.java | 188 +- ...dPriorityLevelConfigurationFluentImpl.java | 137 - .../V1beta3NonResourcePolicyRuleBuilder.java | 41 +- .../V1beta3NonResourcePolicyRuleFluent.java | 273 +- ...1beta3NonResourcePolicyRuleFluentImpl.java | 153 - ...V1beta3PolicyRulesWithSubjectsBuilder.java | 49 +- .../V1beta3PolicyRulesWithSubjectsFluent.java | 664 +- ...eta3PolicyRulesWithSubjectsFluentImpl.java | 438 - ...eta3PriorityLevelConfigurationBuilder.java | 53 +- ...ityLevelConfigurationConditionBuilder.java | 47 +- ...rityLevelConfigurationConditionFluent.java | 147 +- ...LevelConfigurationConditionFluentImpl.java | 108 - ...beta3PriorityLevelConfigurationFluent.java | 317 +- ...3PriorityLevelConfigurationFluentImpl.java | 232 - ...PriorityLevelConfigurationListBuilder.java | 49 +- ...3PriorityLevelConfigurationListFluent.java | 369 +- ...orityLevelConfigurationListFluentImpl.java | 259 - ...ityLevelConfigurationReferenceBuilder.java | 39 +- ...rityLevelConfigurationReferenceFluent.java | 67 +- ...LevelConfigurationReferenceFluentImpl.java | 51 - ...PriorityLevelConfigurationSpecBuilder.java | 44 +- ...3PriorityLevelConfigurationSpecFluent.java | 203 +- ...orityLevelConfigurationSpecFluentImpl.java | 108 - ...iorityLevelConfigurationStatusBuilder.java | 41 +- ...riorityLevelConfigurationStatusFluent.java | 254 +- ...ityLevelConfigurationStatusFluentImpl.java | 176 - .../V1beta3QueuingConfigurationBuilder.java | 43 +- .../V1beta3QueuingConfigurationFluent.java | 108 +- ...V1beta3QueuingConfigurationFluentImpl.java | 80 - .../V1beta3ResourcePolicyRuleBuilder.java | 47 +- .../V1beta3ResourcePolicyRuleFluent.java | 523 +- .../V1beta3ResourcePolicyRuleFluentImpl.java | 282 - .../V1beta3ServiceAccountSubjectBuilder.java | 41 +- .../V1beta3ServiceAccountSubjectFluent.java | 87 +- ...1beta3ServiceAccountSubjectFluentImpl.java | 65 - .../openapi/models/V1beta3SubjectBuilder.java | 51 +- .../openapi/models/V1beta3SubjectFluent.java | 297 +- .../models/V1beta3SubjectFluentImpl.java | 218 - .../models/V1beta3UserSubjectBuilder.java | 39 +- .../models/V1beta3UserSubjectFluent.java | 67 +- .../models/V1beta3UserSubjectFluentImpl.java | 51 - ...2ContainerResourceMetricSourceBuilder.java | 45 +- ...V2ContainerResourceMetricSourceFluent.java | 165 +- ...ntainerResourceMetricSourceFluentImpl.java | 122 - ...2ContainerResourceMetricStatusBuilder.java | 45 +- ...V2ContainerResourceMetricStatusFluent.java | 165 +- ...ntainerResourceMetricStatusFluentImpl.java | 122 - .../V2CrossVersionObjectReferenceBuilder.java | 43 +- .../V2CrossVersionObjectReferenceFluent.java | 107 +- ...CrossVersionObjectReferenceFluentImpl.java | 79 - .../models/V2ExternalMetricSourceBuilder.java | 45 +- .../models/V2ExternalMetricSourceFluent.java | 202 +- .../V2ExternalMetricSourceFluentImpl.java | 149 - .../models/V2ExternalMetricStatusBuilder.java | 45 +- .../models/V2ExternalMetricStatusFluent.java | 202 +- .../V2ExternalMetricStatusFluentImpl.java | 149 - .../models/V2HPAScalingPolicyBuilder.java | 43 +- .../models/V2HPAScalingPolicyFluent.java | 107 +- .../models/V2HPAScalingPolicyFluentImpl.java | 80 - .../models/V2HPAScalingRulesBuilder.java | 45 +- .../models/V2HPAScalingRulesFluent.java | 293 +- .../models/V2HPAScalingRulesFluentImpl.java | 205 - ...orizontalPodAutoscalerBehaviorBuilder.java | 45 +- ...HorizontalPodAutoscalerBehaviorFluent.java | 202 +- ...zontalPodAutoscalerBehaviorFluentImpl.java | 149 - .../V2HorizontalPodAutoscalerBuilder.java | 53 +- ...rizontalPodAutoscalerConditionBuilder.java | 47 +- ...orizontalPodAutoscalerConditionFluent.java | 147 +- ...ontalPodAutoscalerConditionFluentImpl.java | 108 - .../V2HorizontalPodAutoscalerFluent.java | 317 +- .../V2HorizontalPodAutoscalerFluentImpl.java | 232 - .../V2HorizontalPodAutoscalerListBuilder.java | 49 +- .../V2HorizontalPodAutoscalerListFluent.java | 369 +- ...HorizontalPodAutoscalerListFluentImpl.java | 259 - .../V2HorizontalPodAutoscalerSpecBuilder.java | 53 +- .../V2HorizontalPodAutoscalerSpecFluent.java | 450 +- ...HorizontalPodAutoscalerSpecFluentImpl.java | 315 - ...2HorizontalPodAutoscalerStatusBuilder.java | 53 +- ...V2HorizontalPodAutoscalerStatusFluent.java | 542 +- ...rizontalPodAutoscalerStatusFluentImpl.java | 366 - .../models/V2MetricIdentifierBuilder.java | 43 +- .../models/V2MetricIdentifierFluent.java | 145 +- .../models/V2MetricIdentifierFluentImpl.java | 108 - .../openapi/models/V2MetricSpecBuilder.java | 59 +- .../openapi/models/V2MetricSpecFluent.java | 449 +- .../models/V2MetricSpecFluentImpl.java | 328 - .../openapi/models/V2MetricStatusBuilder.java | 59 +- .../openapi/models/V2MetricStatusFluent.java | 449 +- .../models/V2MetricStatusFluentImpl.java | 328 - .../openapi/models/V2MetricTargetBuilder.java | 45 +- .../openapi/models/V2MetricTargetFluent.java | 137 +- .../models/V2MetricTargetFluentImpl.java | 101 - .../models/V2MetricValueStatusBuilder.java | 43 +- .../models/V2MetricValueStatusFluent.java | 117 +- .../models/V2MetricValueStatusFluentImpl.java | 87 - .../models/V2ObjectMetricSourceBuilder.java | 49 +- .../models/V2ObjectMetricSourceFluent.java | 278 +- .../V2ObjectMetricSourceFluentImpl.java | 204 - .../models/V2ObjectMetricStatusBuilder.java | 49 +- .../models/V2ObjectMetricStatusFluent.java | 278 +- .../V2ObjectMetricStatusFluentImpl.java | 204 - .../models/V2PodsMetricSourceBuilder.java | 45 +- .../models/V2PodsMetricSourceFluent.java | 202 +- .../models/V2PodsMetricSourceFluentImpl.java | 149 - .../models/V2PodsMetricStatusBuilder.java | 45 +- .../models/V2PodsMetricStatusFluent.java | 202 +- .../models/V2PodsMetricStatusFluentImpl.java | 149 - .../models/V2ResourceMetricSourceBuilder.java | 43 +- .../models/V2ResourceMetricSourceFluent.java | 145 +- .../V2ResourceMetricSourceFluentImpl.java | 108 - .../models/V2ResourceMetricStatusBuilder.java | 43 +- .../models/V2ResourceMetricStatusFluent.java | 145 +- .../V2ResourceMetricStatusFluentImpl.java | 108 - .../openapi/models/VersionInfoBuilder.java | 55 +- .../openapi/models/VersionInfoFluent.java | 227 +- .../openapi/models/VersionInfoFluentImpl.java | 163 - kubernetes/.openapi-generator/COMMIT | 4 +- .../.openapi-generator/swagger.json.sha256 | 2 +- kubernetes/api/openapi.yaml | 32328 +++++++++------- kubernetes/docs/AdmissionregistrationV1Api.md | 20 +- .../docs/AdmissionregistrationV1alpha1Api.md | 24 +- .../docs/AdmissionregistrationV1beta1Api.md | 1498 + kubernetes/docs/ApiextensionsV1Api.md | 14 +- kubernetes/docs/ApiregistrationV1Api.md | 14 +- kubernetes/docs/AppsV1Api.md | 78 +- kubernetes/docs/AuthenticationV1Api.md | 83 +- kubernetes/docs/AuthenticationV1alpha1Api.md | 2 +- kubernetes/docs/AuthenticationV1beta1Api.md | 2 +- kubernetes/docs/AuthorizationV1Api.md | 8 +- kubernetes/docs/AutoscalingV1Api.md | 14 +- kubernetes/docs/AutoscalingV2Api.md | 14 +- kubernetes/docs/BatchV1Api.md | 28 +- kubernetes/docs/CertificatesV1Api.md | 18 +- kubernetes/docs/CertificatesV1alpha1Api.md | 10 +- kubernetes/docs/CoordinationV1Api.md | 10 +- kubernetes/docs/CoreV1Api.md | 198 +- kubernetes/docs/CoreV1EndpointPort.md | 2 +- kubernetes/docs/CustomObjectsApi.md | 36 +- kubernetes/docs/DiscoveryV1Api.md | 10 +- kubernetes/docs/DiscoveryV1EndpointPort.md | 2 +- kubernetes/docs/EventsV1Api.md | 10 +- .../docs/FlowcontrolApiserverV1beta2Api.md | 28 +- .../docs/FlowcontrolApiserverV1beta3Api.md | 28 +- .../docs/InternalApiserverV1alpha1Api.md | 14 +- kubernetes/docs/NetworkingV1Api.md | 279 +- kubernetes/docs/NetworkingV1alpha1Api.md | 20 +- kubernetes/docs/NodeV1Api.md | 10 +- kubernetes/docs/OpenidApi.md | 2 +- kubernetes/docs/PolicyV1Api.md | 14 +- kubernetes/docs/RbacAuthorizationV1Api.md | 40 +- kubernetes/docs/ResourceV1alpha2Api.md | 48 +- kubernetes/docs/SchedulingV1Api.md | 10 +- kubernetes/docs/StorageV1Api.md | 54 +- kubernetes/docs/V1ClaimSource.md | 2 +- kubernetes/docs/V1Container.md | 1 + kubernetes/docs/V1EphemeralContainer.md | 1 + kubernetes/docs/V1HostIP.md | 13 + kubernetes/docs/V1JobSpec.md | 3 + kubernetes/docs/V1JobStatus.md | 2 + kubernetes/docs/V1MutatingWebhook.md | 2 +- kubernetes/docs/V1NetworkPolicy.md | 1 - kubernetes/docs/V1NetworkPolicyStatus.md | 13 - .../docs/V1PersistentVolumeClaimStatus.md | 4 +- kubernetes/docs/V1PersistentVolumeStatus.md | 1 + kubernetes/docs/V1PodFailurePolicyRule.md | 4 +- kubernetes/docs/V1PodIP.md | 4 +- kubernetes/docs/V1PodResourceClaimStatus.md | 14 + kubernetes/docs/V1PodStatus.md | 6 +- kubernetes/docs/V1SeccompProfile.md | 2 +- kubernetes/docs/V1SelfSubjectReview.md | 20 + kubernetes/docs/V1SelfSubjectReviewStatus.md | 13 + kubernetes/docs/V1ServicePort.md | 2 +- kubernetes/docs/V1ServiceSpec.md | 2 +- kubernetes/docs/V1ValidatingWebhook.md | 2 +- kubernetes/docs/V1ValidationRule.md | 2 + .../docs/V1WindowsSecurityContextOptions.md | 2 +- kubernetes/docs/V1alpha1ParamRef.md | 8 +- .../docs/V1alpha1ServerStorageVersion.md | 1 + ...1alpha1ValidatingAdmissionPolicyBinding.md | 2 +- .../V1alpha1ValidatingAdmissionPolicySpec.md | 1 + kubernetes/docs/V1alpha1Validation.md | 2 +- kubernetes/docs/V1alpha1Variable.md | 14 + kubernetes/docs/V1beta1AuditAnnotation.md | 14 + kubernetes/docs/V1beta1ExpressionWarning.md | 14 + kubernetes/docs/V1beta1MatchCondition.md | 14 + kubernetes/docs/V1beta1MatchResources.md | 17 + .../docs/V1beta1NamedRuleWithOperations.md | 18 + kubernetes/docs/V1beta1ParamKind.md | 14 + kubernetes/docs/V1beta1ParamRef.md | 16 + kubernetes/docs/V1beta1TypeChecking.md | 13 + .../docs/V1beta1ValidatingAdmissionPolicy.md | 21 + ...V1beta1ValidatingAdmissionPolicyBinding.md | 20 + ...ta1ValidatingAdmissionPolicyBindingList.md | 20 + ...ta1ValidatingAdmissionPolicyBindingSpec.md | 16 + .../V1beta1ValidatingAdmissionPolicyList.md | 20 + .../V1beta1ValidatingAdmissionPolicySpec.md | 19 + .../V1beta1ValidatingAdmissionPolicyStatus.md | 15 + kubernetes/docs/V1beta1Validation.md | 16 + kubernetes/docs/V1beta1Variable.md | 14 + ...V1beta2ExemptPriorityLevelConfiguration.md | 14 + .../V1beta2PriorityLevelConfigurationSpec.md | 1 + ...V1beta3ExemptPriorityLevelConfiguration.md | 14 + ...1beta3LimitedPriorityLevelConfiguration.md | 2 +- .../V1beta3PriorityLevelConfigurationSpec.md | 1 + kubernetes/docs/WellKnownApi.md | 2 +- .../client/openapi/ApiException.java | 2 +- .../client/openapi/Configuration.java | 2 +- .../io/kubernetes/client/openapi/JSON.java | 642 +- .../io/kubernetes/client/openapi/Pair.java | 2 +- .../kubernetes/client/openapi/StringUtil.java | 2 +- .../apis/AdmissionregistrationV1Api.java | 20 +- .../AdmissionregistrationV1alpha1Api.java | 24 +- .../apis/AdmissionregistrationV1beta1Api.java | 2967 ++ .../openapi/apis/ApiextensionsV1Api.java | 14 +- .../openapi/apis/ApiregistrationV1Api.java | 14 +- .../client/openapi/apis/AppsV1Api.java | 78 +- .../openapi/apis/AuthenticationV1Api.java | 157 +- .../apis/AuthenticationV1alpha1Api.java | 2 +- .../apis/AuthenticationV1beta1Api.java | 2 +- .../openapi/apis/AuthorizationV1Api.java | 8 +- .../client/openapi/apis/AutoscalingV1Api.java | 14 +- .../client/openapi/apis/AutoscalingV2Api.java | 14 +- .../client/openapi/apis/BatchV1Api.java | 28 +- .../openapi/apis/CertificatesV1Api.java | 18 +- .../openapi/apis/CertificatesV1alpha1Api.java | 10 +- .../openapi/apis/CoordinationV1Api.java | 10 +- .../client/openapi/apis/CoreV1Api.java | 198 +- .../client/openapi/apis/CustomObjectsApi.java | 36 +- .../client/openapi/apis/DiscoveryV1Api.java | 10 +- .../client/openapi/apis/EventsV1Api.java | 10 +- .../apis/FlowcontrolApiserverV1beta2Api.java | 28 +- .../apis/FlowcontrolApiserverV1beta3Api.java | 28 +- .../apis/InternalApiserverV1alpha1Api.java | 14 +- .../client/openapi/apis/NetworkingV1Api.java | 515 +- .../openapi/apis/NetworkingV1alpha1Api.java | 20 +- .../client/openapi/apis/NodeV1Api.java | 10 +- .../client/openapi/apis/OpenidApi.java | 2 +- .../client/openapi/apis/PolicyV1Api.java | 14 +- .../openapi/apis/RbacAuthorizationV1Api.java | 40 +- .../openapi/apis/ResourceV1alpha2Api.java | 48 +- .../client/openapi/apis/SchedulingV1Api.java | 10 +- .../client/openapi/apis/StorageV1Api.java | 54 +- .../client/openapi/apis/WellKnownApi.java | 2 +- .../client/openapi/auth/ApiKeyAuth.java | 2 +- .../client/openapi/auth/HttpBearerAuth.java | 2 +- ...missionregistrationV1ServiceReference.java | 2 +- ...sionregistrationV1WebhookClientConfig.java | 2 +- .../ApiextensionsV1ServiceReference.java | 2 +- .../ApiextensionsV1WebhookClientConfig.java | 2 +- .../ApiregistrationV1ServiceReference.java | 2 +- .../models/AuthenticationV1TokenRequest.java | 2 +- .../openapi/models/CoreV1EndpointPort.java | 6 +- .../client/openapi/models/CoreV1Event.java | 2 +- .../openapi/models/CoreV1EventList.java | 2 +- .../openapi/models/CoreV1EventSeries.java | 2 +- .../models/DiscoveryV1EndpointPort.java | 6 +- .../client/openapi/models/EventsV1Event.java | 2 +- .../openapi/models/EventsV1EventList.java | 2 +- .../openapi/models/EventsV1EventSeries.java | 2 +- .../openapi/models/StorageV1TokenRequest.java | 2 +- .../client/openapi/models/V1APIGroup.java | 2 +- .../client/openapi/models/V1APIGroupList.java | 2 +- .../client/openapi/models/V1APIResource.java | 2 +- .../openapi/models/V1APIResourceList.java | 2 +- .../client/openapi/models/V1APIService.java | 2 +- .../openapi/models/V1APIServiceCondition.java | 2 +- .../openapi/models/V1APIServiceList.java | 2 +- .../openapi/models/V1APIServiceSpec.java | 2 +- .../openapi/models/V1APIServiceStatus.java | 2 +- .../client/openapi/models/V1APIVersions.java | 2 +- .../V1AWSElasticBlockStoreVolumeSource.java | 2 +- .../client/openapi/models/V1Affinity.java | 2 +- .../openapi/models/V1AggregationRule.java | 2 +- .../openapi/models/V1AttachedVolume.java | 2 +- .../models/V1AzureDiskVolumeSource.java | 2 +- .../V1AzureFilePersistentVolumeSource.java | 2 +- .../models/V1AzureFileVolumeSource.java | 2 +- .../client/openapi/models/V1Binding.java | 2 +- .../models/V1BoundObjectReference.java | 2 +- .../client/openapi/models/V1CSIDriver.java | 2 +- .../openapi/models/V1CSIDriverList.java | 2 +- .../openapi/models/V1CSIDriverSpec.java | 2 +- .../client/openapi/models/V1CSINode.java | 2 +- .../openapi/models/V1CSINodeDriver.java | 2 +- .../client/openapi/models/V1CSINodeList.java | 2 +- .../client/openapi/models/V1CSINodeSpec.java | 2 +- .../models/V1CSIPersistentVolumeSource.java | 2 +- .../openapi/models/V1CSIStorageCapacity.java | 2 +- .../models/V1CSIStorageCapacityList.java | 2 +- .../openapi/models/V1CSIVolumeSource.java | 2 +- .../client/openapi/models/V1Capabilities.java | 2 +- .../V1CephFSPersistentVolumeSource.java | 2 +- .../openapi/models/V1CephFSVolumeSource.java | 2 +- .../models/V1CertificateSigningRequest.java | 2 +- .../V1CertificateSigningRequestCondition.java | 2 +- .../V1CertificateSigningRequestList.java | 2 +- .../V1CertificateSigningRequestSpec.java | 2 +- .../V1CertificateSigningRequestStatus.java | 2 +- .../V1CinderPersistentVolumeSource.java | 2 +- .../openapi/models/V1CinderVolumeSource.java | 2 +- .../client/openapi/models/V1ClaimSource.java | 6 +- .../openapi/models/V1ClientIPConfig.java | 2 +- .../client/openapi/models/V1ClusterRole.java | 2 +- .../openapi/models/V1ClusterRoleBinding.java | 2 +- .../models/V1ClusterRoleBindingList.java | 2 +- .../openapi/models/V1ClusterRoleList.java | 2 +- .../openapi/models/V1ComponentCondition.java | 2 +- .../openapi/models/V1ComponentStatus.java | 2 +- .../openapi/models/V1ComponentStatusList.java | 2 +- .../client/openapi/models/V1Condition.java | 2 +- .../client/openapi/models/V1ConfigMap.java | 2 +- .../openapi/models/V1ConfigMapEnvSource.java | 2 +- .../models/V1ConfigMapKeySelector.java | 2 +- .../openapi/models/V1ConfigMapList.java | 2 +- .../models/V1ConfigMapNodeConfigSource.java | 2 +- .../openapi/models/V1ConfigMapProjection.java | 2 +- .../models/V1ConfigMapVolumeSource.java | 2 +- .../client/openapi/models/V1Container.java | 33 +- .../openapi/models/V1ContainerImage.java | 2 +- .../openapi/models/V1ContainerPort.java | 2 +- .../models/V1ContainerResizePolicy.java | 2 +- .../openapi/models/V1ContainerState.java | 2 +- .../models/V1ContainerStateRunning.java | 2 +- .../models/V1ContainerStateTerminated.java | 2 +- .../models/V1ContainerStateWaiting.java | 2 +- .../openapi/models/V1ContainerStatus.java | 2 +- .../openapi/models/V1ControllerRevision.java | 2 +- .../models/V1ControllerRevisionList.java | 2 +- .../client/openapi/models/V1CronJob.java | 2 +- .../client/openapi/models/V1CronJobList.java | 2 +- .../client/openapi/models/V1CronJobSpec.java | 2 +- .../openapi/models/V1CronJobStatus.java | 2 +- .../models/V1CrossVersionObjectReference.java | 2 +- .../V1CustomResourceColumnDefinition.java | 2 +- .../models/V1CustomResourceConversion.java | 2 +- .../models/V1CustomResourceDefinition.java | 2 +- .../V1CustomResourceDefinitionCondition.java | 2 +- .../V1CustomResourceDefinitionList.java | 2 +- .../V1CustomResourceDefinitionNames.java | 2 +- .../V1CustomResourceDefinitionSpec.java | 2 +- .../V1CustomResourceDefinitionStatus.java | 2 +- .../V1CustomResourceDefinitionVersion.java | 2 +- .../V1CustomResourceSubresourceScale.java | 2 +- .../models/V1CustomResourceSubresources.java | 2 +- .../models/V1CustomResourceValidation.java | 2 +- .../openapi/models/V1DaemonEndpoint.java | 2 +- .../client/openapi/models/V1DaemonSet.java | 2 +- .../openapi/models/V1DaemonSetCondition.java | 2 +- .../openapi/models/V1DaemonSetList.java | 2 +- .../openapi/models/V1DaemonSetSpec.java | 2 +- .../openapi/models/V1DaemonSetStatus.java | 2 +- .../models/V1DaemonSetUpdateStrategy.java | 2 +- .../openapi/models/V1DeleteOptions.java | 2 +- .../client/openapi/models/V1Deployment.java | 2 +- .../openapi/models/V1DeploymentCondition.java | 2 +- .../openapi/models/V1DeploymentList.java | 2 +- .../openapi/models/V1DeploymentSpec.java | 2 +- .../openapi/models/V1DeploymentStatus.java | 2 +- .../openapi/models/V1DeploymentStrategy.java | 2 +- .../models/V1DownwardAPIProjection.java | 2 +- .../models/V1DownwardAPIVolumeFile.java | 2 +- .../models/V1DownwardAPIVolumeSource.java | 2 +- .../models/V1EmptyDirVolumeSource.java | 2 +- .../client/openapi/models/V1Endpoint.java | 2 +- .../openapi/models/V1EndpointAddress.java | 2 +- .../openapi/models/V1EndpointConditions.java | 2 +- .../openapi/models/V1EndpointHints.java | 2 +- .../openapi/models/V1EndpointSlice.java | 2 +- .../openapi/models/V1EndpointSliceList.java | 2 +- .../openapi/models/V1EndpointSubset.java | 2 +- .../client/openapi/models/V1Endpoints.java | 2 +- .../openapi/models/V1EndpointsList.java | 2 +- .../openapi/models/V1EnvFromSource.java | 2 +- .../client/openapi/models/V1EnvVar.java | 2 +- .../client/openapi/models/V1EnvVarSource.java | 2 +- .../openapi/models/V1EphemeralContainer.java | 33 +- .../models/V1EphemeralVolumeSource.java | 2 +- .../client/openapi/models/V1EventSource.java | 2 +- .../client/openapi/models/V1Eviction.java | 2 +- .../client/openapi/models/V1ExecAction.java | 2 +- .../models/V1ExternalDocumentation.java | 2 +- .../openapi/models/V1FCVolumeSource.java | 2 +- .../models/V1FlexPersistentVolumeSource.java | 2 +- .../openapi/models/V1FlexVolumeSource.java | 2 +- .../openapi/models/V1FlockerVolumeSource.java | 2 +- .../client/openapi/models/V1ForZone.java | 2 +- .../V1GCEPersistentDiskVolumeSource.java | 2 +- .../client/openapi/models/V1GRPCAction.java | 2 +- .../openapi/models/V1GitRepoVolumeSource.java | 2 +- .../V1GlusterfsPersistentVolumeSource.java | 2 +- .../models/V1GlusterfsVolumeSource.java | 2 +- .../models/V1GroupVersionForDiscovery.java | 2 +- .../openapi/models/V1HTTPGetAction.java | 2 +- .../client/openapi/models/V1HTTPHeader.java | 2 +- .../openapi/models/V1HTTPIngressPath.java | 2 +- .../models/V1HTTPIngressRuleValue.java | 2 +- .../models/V1HorizontalPodAutoscaler.java | 2 +- .../models/V1HorizontalPodAutoscalerList.java | 2 +- .../models/V1HorizontalPodAutoscalerSpec.java | 2 +- .../V1HorizontalPodAutoscalerStatus.java | 2 +- .../client/openapi/models/V1HostAlias.java | 2 +- ...NetworkPolicyStatus.java => V1HostIP.java} | 53 +- .../models/V1HostPathVolumeSource.java | 2 +- .../client/openapi/models/V1IPBlock.java | 2 +- .../models/V1ISCSIPersistentVolumeSource.java | 2 +- .../openapi/models/V1ISCSIVolumeSource.java | 2 +- .../client/openapi/models/V1Ingress.java | 2 +- .../openapi/models/V1IngressBackend.java | 2 +- .../client/openapi/models/V1IngressClass.java | 2 +- .../openapi/models/V1IngressClassList.java | 2 +- .../V1IngressClassParametersReference.java | 2 +- .../openapi/models/V1IngressClassSpec.java | 2 +- .../client/openapi/models/V1IngressList.java | 2 +- .../models/V1IngressLoadBalancerIngress.java | 2 +- .../models/V1IngressLoadBalancerStatus.java | 2 +- .../openapi/models/V1IngressPortStatus.java | 2 +- .../client/openapi/models/V1IngressRule.java | 2 +- .../models/V1IngressServiceBackend.java | 2 +- .../client/openapi/models/V1IngressSpec.java | 2 +- .../openapi/models/V1IngressStatus.java | 2 +- .../client/openapi/models/V1IngressTLS.java | 2 +- .../openapi/models/V1JSONSchemaProps.java | 2 +- .../client/openapi/models/V1Job.java | 2 +- .../client/openapi/models/V1JobCondition.java | 2 +- .../client/openapi/models/V1JobList.java | 2 +- .../client/openapi/models/V1JobSpec.java | 91 +- .../client/openapi/models/V1JobStatus.java | 62 +- .../openapi/models/V1JobTemplateSpec.java | 2 +- .../client/openapi/models/V1KeyToPath.java | 2 +- .../openapi/models/V1LabelSelector.java | 2 +- .../models/V1LabelSelectorRequirement.java | 2 +- .../client/openapi/models/V1Lease.java | 2 +- .../client/openapi/models/V1LeaseList.java | 2 +- .../client/openapi/models/V1LeaseSpec.java | 2 +- .../client/openapi/models/V1Lifecycle.java | 2 +- .../openapi/models/V1LifecycleHandler.java | 2 +- .../client/openapi/models/V1LimitRange.java | 2 +- .../openapi/models/V1LimitRangeItem.java | 2 +- .../openapi/models/V1LimitRangeList.java | 2 +- .../openapi/models/V1LimitRangeSpec.java | 2 +- .../client/openapi/models/V1ListMeta.java | 2 +- .../openapi/models/V1LoadBalancerIngress.java | 2 +- .../openapi/models/V1LoadBalancerStatus.java | 2 +- .../models/V1LocalObjectReference.java | 2 +- .../models/V1LocalSubjectAccessReview.java | 2 +- .../openapi/models/V1LocalVolumeSource.java | 2 +- .../openapi/models/V1ManagedFieldsEntry.java | 2 +- .../openapi/models/V1MatchCondition.java | 2 +- .../openapi/models/V1MutatingWebhook.java | 6 +- .../V1MutatingWebhookConfiguration.java | 2 +- .../V1MutatingWebhookConfigurationList.java | 2 +- .../openapi/models/V1NFSVolumeSource.java | 2 +- .../client/openapi/models/V1Namespace.java | 2 +- .../openapi/models/V1NamespaceCondition.java | 2 +- .../openapi/models/V1NamespaceList.java | 2 +- .../openapi/models/V1NamespaceSpec.java | 2 +- .../openapi/models/V1NamespaceStatus.java | 2 +- .../openapi/models/V1NetworkPolicy.java | 36 +- .../models/V1NetworkPolicyEgressRule.java | 2 +- .../models/V1NetworkPolicyIngressRule.java | 2 +- .../openapi/models/V1NetworkPolicyList.java | 2 +- .../openapi/models/V1NetworkPolicyPeer.java | 2 +- .../openapi/models/V1NetworkPolicyPort.java | 2 +- .../openapi/models/V1NetworkPolicySpec.java | 2 +- .../client/openapi/models/V1Node.java | 2 +- .../client/openapi/models/V1NodeAddress.java | 2 +- .../client/openapi/models/V1NodeAffinity.java | 2 +- .../openapi/models/V1NodeCondition.java | 2 +- .../openapi/models/V1NodeConfigSource.java | 2 +- .../openapi/models/V1NodeConfigStatus.java | 2 +- .../openapi/models/V1NodeDaemonEndpoints.java | 2 +- .../client/openapi/models/V1NodeList.java | 2 +- .../client/openapi/models/V1NodeSelector.java | 2 +- .../models/V1NodeSelectorRequirement.java | 2 +- .../openapi/models/V1NodeSelectorTerm.java | 2 +- .../client/openapi/models/V1NodeSpec.java | 2 +- .../client/openapi/models/V1NodeStatus.java | 2 +- .../openapi/models/V1NodeSystemInfo.java | 2 +- .../models/V1NonResourceAttributes.java | 2 +- .../openapi/models/V1NonResourceRule.java | 2 +- .../openapi/models/V1ObjectFieldSelector.java | 2 +- .../client/openapi/models/V1ObjectMeta.java | 2 +- .../openapi/models/V1ObjectReference.java | 2 +- .../client/openapi/models/V1Overhead.java | 2 +- .../openapi/models/V1OwnerReference.java | 2 +- .../openapi/models/V1PersistentVolume.java | 2 +- .../models/V1PersistentVolumeClaim.java | 2 +- .../V1PersistentVolumeClaimCondition.java | 2 +- .../models/V1PersistentVolumeClaimList.java | 2 +- .../models/V1PersistentVolumeClaimSpec.java | 2 +- .../models/V1PersistentVolumeClaimStatus.java | 76 +- .../V1PersistentVolumeClaimTemplate.java | 2 +- .../V1PersistentVolumeClaimVolumeSource.java | 2 +- .../models/V1PersistentVolumeList.java | 2 +- .../models/V1PersistentVolumeSpec.java | 2 +- .../models/V1PersistentVolumeStatus.java | 36 +- .../V1PhotonPersistentDiskVolumeSource.java | 2 +- .../client/openapi/models/V1Pod.java | 2 +- .../client/openapi/models/V1PodAffinity.java | 2 +- .../openapi/models/V1PodAffinityTerm.java | 2 +- .../openapi/models/V1PodAntiAffinity.java | 2 +- .../client/openapi/models/V1PodCondition.java | 2 +- .../client/openapi/models/V1PodDNSConfig.java | 2 +- .../openapi/models/V1PodDNSConfigOption.java | 2 +- .../openapi/models/V1PodDisruptionBudget.java | 2 +- .../models/V1PodDisruptionBudgetList.java | 2 +- .../models/V1PodDisruptionBudgetSpec.java | 2 +- .../models/V1PodDisruptionBudgetStatus.java | 2 +- .../openapi/models/V1PodFailurePolicy.java | 2 +- ...odFailurePolicyOnExitCodesRequirement.java | 2 +- ...odFailurePolicyOnPodConditionsPattern.java | 2 +- .../models/V1PodFailurePolicyRule.java | 14 +- .../client/openapi/models/V1PodIP.java | 10 +- .../client/openapi/models/V1PodList.java | 2 +- .../client/openapi/models/V1PodOS.java | 2 +- .../openapi/models/V1PodReadinessGate.java | 2 +- .../openapi/models/V1PodResourceClaim.java | 2 +- .../models/V1PodResourceClaimStatus.java | 126 + .../openapi/models/V1PodSchedulingGate.java | 2 +- .../openapi/models/V1PodSecurityContext.java | 2 +- .../client/openapi/models/V1PodSpec.java | 2 +- .../client/openapi/models/V1PodStatus.java | 88 +- .../client/openapi/models/V1PodTemplate.java | 2 +- .../openapi/models/V1PodTemplateList.java | 2 +- .../openapi/models/V1PodTemplateSpec.java | 2 +- .../client/openapi/models/V1PolicyRule.java | 2 +- .../client/openapi/models/V1PortStatus.java | 2 +- .../models/V1PortworxVolumeSource.java | 2 +- .../openapi/models/V1Preconditions.java | 2 +- .../models/V1PreferredSchedulingTerm.java | 2 +- .../openapi/models/V1PriorityClass.java | 2 +- .../openapi/models/V1PriorityClassList.java | 2 +- .../client/openapi/models/V1Probe.java | 2 +- .../models/V1ProjectedVolumeSource.java | 2 +- .../openapi/models/V1QuobyteVolumeSource.java | 2 +- .../models/V1RBDPersistentVolumeSource.java | 2 +- .../openapi/models/V1RBDVolumeSource.java | 2 +- .../client/openapi/models/V1ReplicaSet.java | 2 +- .../openapi/models/V1ReplicaSetCondition.java | 2 +- .../openapi/models/V1ReplicaSetList.java | 2 +- .../openapi/models/V1ReplicaSetSpec.java | 2 +- .../openapi/models/V1ReplicaSetStatus.java | 2 +- .../models/V1ReplicationController.java | 2 +- .../V1ReplicationControllerCondition.java | 2 +- .../models/V1ReplicationControllerList.java | 2 +- .../models/V1ReplicationControllerSpec.java | 2 +- .../models/V1ReplicationControllerStatus.java | 2 +- .../openapi/models/V1ResourceAttributes.java | 2 +- .../openapi/models/V1ResourceClaim.java | 2 +- .../models/V1ResourceFieldSelector.java | 2 +- .../openapi/models/V1ResourceQuota.java | 2 +- .../openapi/models/V1ResourceQuotaList.java | 2 +- .../openapi/models/V1ResourceQuotaSpec.java | 2 +- .../openapi/models/V1ResourceQuotaStatus.java | 2 +- .../models/V1ResourceRequirements.java | 2 +- .../client/openapi/models/V1ResourceRule.java | 2 +- .../client/openapi/models/V1Role.java | 2 +- .../client/openapi/models/V1RoleBinding.java | 2 +- .../openapi/models/V1RoleBindingList.java | 2 +- .../client/openapi/models/V1RoleList.java | 2 +- .../client/openapi/models/V1RoleRef.java | 2 +- .../models/V1RollingUpdateDaemonSet.java | 2 +- .../models/V1RollingUpdateDeployment.java | 2 +- .../V1RollingUpdateStatefulSetStrategy.java | 2 +- .../openapi/models/V1RuleWithOperations.java | 2 +- .../client/openapi/models/V1RuntimeClass.java | 2 +- .../openapi/models/V1RuntimeClassList.java | 2 +- .../openapi/models/V1SELinuxOptions.java | 2 +- .../client/openapi/models/V1Scale.java | 2 +- .../V1ScaleIOPersistentVolumeSource.java | 2 +- .../openapi/models/V1ScaleIOVolumeSource.java | 2 +- .../client/openapi/models/V1ScaleSpec.java | 2 +- .../client/openapi/models/V1ScaleStatus.java | 2 +- .../client/openapi/models/V1Scheduling.java | 2 +- .../openapi/models/V1ScopeSelector.java | 2 +- .../V1ScopedResourceSelectorRequirement.java | 2 +- .../openapi/models/V1SeccompProfile.java | 6 +- .../client/openapi/models/V1Secret.java | 2 +- .../openapi/models/V1SecretEnvSource.java | 2 +- .../openapi/models/V1SecretKeySelector.java | 2 +- .../client/openapi/models/V1SecretList.java | 2 +- .../openapi/models/V1SecretProjection.java | 2 +- .../openapi/models/V1SecretReference.java | 2 +- .../openapi/models/V1SecretVolumeSource.java | 2 +- .../openapi/models/V1SecurityContext.java | 2 +- .../models/V1SelfSubjectAccessReview.java | 2 +- .../models/V1SelfSubjectAccessReviewSpec.java | 2 +- .../openapi/models/V1SelfSubjectReview.java | 187 + .../models/V1SelfSubjectReviewStatus.java | 99 + .../models/V1SelfSubjectRulesReview.java | 2 +- .../models/V1SelfSubjectRulesReviewSpec.java | 2 +- .../models/V1ServerAddressByClientCIDR.java | 2 +- .../client/openapi/models/V1Service.java | 2 +- .../openapi/models/V1ServiceAccount.java | 2 +- .../openapi/models/V1ServiceAccountList.java | 2 +- .../V1ServiceAccountTokenProjection.java | 2 +- .../openapi/models/V1ServiceBackendPort.java | 2 +- .../client/openapi/models/V1ServiceList.java | 2 +- .../client/openapi/models/V1ServicePort.java | 6 +- .../client/openapi/models/V1ServiceSpec.java | 6 +- .../openapi/models/V1ServiceStatus.java | 2 +- .../models/V1SessionAffinityConfig.java | 2 +- .../client/openapi/models/V1StatefulSet.java | 2 +- .../models/V1StatefulSetCondition.java | 2 +- .../openapi/models/V1StatefulSetList.java | 2 +- .../openapi/models/V1StatefulSetOrdinals.java | 2 +- ...tPersistentVolumeClaimRetentionPolicy.java | 2 +- .../openapi/models/V1StatefulSetSpec.java | 2 +- .../openapi/models/V1StatefulSetStatus.java | 2 +- .../models/V1StatefulSetUpdateStrategy.java | 2 +- .../client/openapi/models/V1Status.java | 2 +- .../client/openapi/models/V1StatusCause.java | 2 +- .../openapi/models/V1StatusDetails.java | 2 +- .../client/openapi/models/V1StorageClass.java | 2 +- .../openapi/models/V1StorageClassList.java | 2 +- .../V1StorageOSPersistentVolumeSource.java | 2 +- .../models/V1StorageOSVolumeSource.java | 2 +- .../client/openapi/models/V1Subject.java | 2 +- .../openapi/models/V1SubjectAccessReview.java | 2 +- .../models/V1SubjectAccessReviewSpec.java | 2 +- .../models/V1SubjectAccessReviewStatus.java | 2 +- .../models/V1SubjectRulesReviewStatus.java | 2 +- .../client/openapi/models/V1Sysctl.java | 2 +- .../openapi/models/V1TCPSocketAction.java | 2 +- .../client/openapi/models/V1Taint.java | 2 +- .../openapi/models/V1TokenRequestSpec.java | 2 +- .../openapi/models/V1TokenRequestStatus.java | 2 +- .../client/openapi/models/V1TokenReview.java | 2 +- .../openapi/models/V1TokenReviewSpec.java | 2 +- .../openapi/models/V1TokenReviewStatus.java | 2 +- .../client/openapi/models/V1Toleration.java | 2 +- .../V1TopologySelectorLabelRequirement.java | 2 +- .../models/V1TopologySelectorTerm.java | 2 +- .../models/V1TopologySpreadConstraint.java | 2 +- .../models/V1TypedLocalObjectReference.java | 2 +- .../models/V1TypedObjectReference.java | 2 +- .../models/V1UncountedTerminatedPods.java | 2 +- .../client/openapi/models/V1UserInfo.java | 2 +- .../openapi/models/V1ValidatingWebhook.java | 6 +- .../V1ValidatingWebhookConfiguration.java | 2 +- .../V1ValidatingWebhookConfigurationList.java | 2 +- .../openapi/models/V1ValidationRule.java | 64 +- .../client/openapi/models/V1Volume.java | 2 +- .../openapi/models/V1VolumeAttachment.java | 2 +- .../models/V1VolumeAttachmentList.java | 2 +- .../models/V1VolumeAttachmentSource.java | 2 +- .../models/V1VolumeAttachmentSpec.java | 2 +- .../models/V1VolumeAttachmentStatus.java | 2 +- .../client/openapi/models/V1VolumeDevice.java | 2 +- .../client/openapi/models/V1VolumeError.java | 2 +- .../client/openapi/models/V1VolumeMount.java | 2 +- .../openapi/models/V1VolumeNodeAffinity.java | 2 +- .../openapi/models/V1VolumeNodeResources.java | 2 +- .../openapi/models/V1VolumeProjection.java | 2 +- .../V1VsphereVirtualDiskVolumeSource.java | 2 +- .../client/openapi/models/V1WatchEvent.java | 2 +- .../openapi/models/V1WebhookConversion.java | 2 +- .../models/V1WeightedPodAffinityTerm.java | 2 +- .../V1WindowsSecurityContextOptions.java | 6 +- .../models/V1alpha1AuditAnnotation.java | 2 +- .../openapi/models/V1alpha1ClusterCIDR.java | 2 +- .../models/V1alpha1ClusterCIDRList.java | 2 +- .../models/V1alpha1ClusterCIDRSpec.java | 2 +- .../models/V1alpha1ClusterTrustBundle.java | 2 +- .../V1alpha1ClusterTrustBundleList.java | 2 +- .../V1alpha1ClusterTrustBundleSpec.java | 2 +- .../models/V1alpha1ExpressionWarning.java | 2 +- .../openapi/models/V1alpha1IPAddress.java | 2 +- .../openapi/models/V1alpha1IPAddressList.java | 2 +- .../openapi/models/V1alpha1IPAddressSpec.java | 2 +- .../models/V1alpha1MatchCondition.java | 2 +- .../models/V1alpha1MatchResources.java | 2 +- .../V1alpha1NamedRuleWithOperations.java | 2 +- .../openapi/models/V1alpha1ParamKind.java | 2 +- .../openapi/models/V1alpha1ParamRef.java | 77 +- .../models/V1alpha1ParentReference.java | 2 +- .../models/V1alpha1SelfSubjectReview.java | 2 +- .../V1alpha1SelfSubjectReviewStatus.java | 2 +- .../models/V1alpha1ServerStorageVersion.java | 43 +- .../models/V1alpha1StorageVersion.java | 2 +- .../V1alpha1StorageVersionCondition.java | 2 +- .../models/V1alpha1StorageVersionList.java | 2 +- .../models/V1alpha1StorageVersionStatus.java | 2 +- .../openapi/models/V1alpha1TypeChecking.java | 2 +- .../V1alpha1ValidatingAdmissionPolicy.java | 2 +- ...lpha1ValidatingAdmissionPolicyBinding.java | 6 +- ...1ValidatingAdmissionPolicyBindingList.java | 2 +- ...1ValidatingAdmissionPolicyBindingSpec.java | 2 +- ...V1alpha1ValidatingAdmissionPolicyList.java | 2 +- ...V1alpha1ValidatingAdmissionPolicySpec.java | 44 +- ...alpha1ValidatingAdmissionPolicyStatus.java | 2 +- .../openapi/models/V1alpha1Validation.java | 6 +- .../openapi/models/V1alpha1Variable.java | 125 + .../models/V1alpha2AllocationResult.java | 2 +- .../models/V1alpha2PodSchedulingContext.java | 2 +- .../V1alpha2PodSchedulingContextList.java | 2 +- .../V1alpha2PodSchedulingContextSpec.java | 2 +- .../V1alpha2PodSchedulingContextStatus.java | 2 +- .../openapi/models/V1alpha2ResourceClaim.java | 2 +- ...1alpha2ResourceClaimConsumerReference.java | 2 +- .../models/V1alpha2ResourceClaimList.java | 2 +- ...lpha2ResourceClaimParametersReference.java | 2 +- ...V1alpha2ResourceClaimSchedulingStatus.java | 2 +- .../models/V1alpha2ResourceClaimSpec.java | 2 +- .../models/V1alpha2ResourceClaimStatus.java | 2 +- .../models/V1alpha2ResourceClaimTemplate.java | 2 +- .../V1alpha2ResourceClaimTemplateList.java | 2 +- .../V1alpha2ResourceClaimTemplateSpec.java | 2 +- .../openapi/models/V1alpha2ResourceClass.java | 2 +- .../models/V1alpha2ResourceClassList.java | 2 +- ...lpha2ResourceClassParametersReference.java | 2 +- .../models/V1alpha2ResourceHandle.java | 2 +- .../models/V1beta1AuditAnnotation.java | 125 + .../models/V1beta1ExpressionWarning.java | 125 + .../openapi/models/V1beta1MatchCondition.java | 125 + .../openapi/models/V1beta1MatchResources.java | 234 + .../V1beta1NamedRuleWithOperations.java | 285 + .../openapi/models/V1beta1ParamKind.java | 127 + .../openapi/models/V1beta1ParamRef.java | 186 + .../models/V1beta1SelfSubjectReview.java | 2 +- .../V1beta1SelfSubjectReviewStatus.java | 2 +- .../openapi/models/V1beta1TypeChecking.java | 109 + .../V1beta1ValidatingAdmissionPolicy.java | 217 + ...beta1ValidatingAdmissionPolicyBinding.java | 187 + ...1ValidatingAdmissionPolicyBindingList.java | 197 + ...1ValidatingAdmissionPolicyBindingSpec.java | 197 + .../V1beta1ValidatingAdmissionPolicyList.java | 197 + .../V1beta1ValidatingAdmissionPolicySpec.java | 312 + ...1beta1ValidatingAdmissionPolicyStatus.java | 168 + .../openapi/models/V1beta1Validation.java | 184 + .../openapi/models/V1beta1Variable.java | 125 + ...beta2ExemptPriorityLevelConfiguration.java | 127 + .../V1beta2FlowDistinguisherMethod.java | 2 +- .../openapi/models/V1beta2FlowSchema.java | 2 +- .../models/V1beta2FlowSchemaCondition.java | 2 +- .../openapi/models/V1beta2FlowSchemaList.java | 2 +- .../openapi/models/V1beta2FlowSchemaSpec.java | 2 +- .../models/V1beta2FlowSchemaStatus.java | 2 +- .../openapi/models/V1beta2GroupSubject.java | 2 +- .../openapi/models/V1beta2LimitResponse.java | 2 +- ...eta2LimitedPriorityLevelConfiguration.java | 2 +- .../models/V1beta2NonResourcePolicyRule.java | 2 +- .../V1beta2PolicyRulesWithSubjects.java | 2 +- .../V1beta2PriorityLevelConfiguration.java | 2 +- ...a2PriorityLevelConfigurationCondition.java | 2 +- ...V1beta2PriorityLevelConfigurationList.java | 2 +- ...a2PriorityLevelConfigurationReference.java | 2 +- ...V1beta2PriorityLevelConfigurationSpec.java | 36 +- ...beta2PriorityLevelConfigurationStatus.java | 2 +- .../models/V1beta2QueuingConfiguration.java | 2 +- .../models/V1beta2ResourcePolicyRule.java | 2 +- .../models/V1beta2ServiceAccountSubject.java | 2 +- .../client/openapi/models/V1beta2Subject.java | 2 +- .../openapi/models/V1beta2UserSubject.java | 2 +- ...beta3ExemptPriorityLevelConfiguration.java | 127 + .../V1beta3FlowDistinguisherMethod.java | 2 +- .../openapi/models/V1beta3FlowSchema.java | 2 +- .../models/V1beta3FlowSchemaCondition.java | 2 +- .../openapi/models/V1beta3FlowSchemaList.java | 2 +- .../openapi/models/V1beta3FlowSchemaSpec.java | 2 +- .../models/V1beta3FlowSchemaStatus.java | 2 +- .../openapi/models/V1beta3GroupSubject.java | 2 +- .../openapi/models/V1beta3LimitResponse.java | 2 +- ...eta3LimitedPriorityLevelConfiguration.java | 6 +- .../models/V1beta3NonResourcePolicyRule.java | 2 +- .../V1beta3PolicyRulesWithSubjects.java | 2 +- .../V1beta3PriorityLevelConfiguration.java | 2 +- ...a3PriorityLevelConfigurationCondition.java | 2 +- ...V1beta3PriorityLevelConfigurationList.java | 2 +- ...a3PriorityLevelConfigurationReference.java | 2 +- ...V1beta3PriorityLevelConfigurationSpec.java | 36 +- ...beta3PriorityLevelConfigurationStatus.java | 2 +- .../models/V1beta3QueuingConfiguration.java | 2 +- .../models/V1beta3ResourcePolicyRule.java | 2 +- .../models/V1beta3ServiceAccountSubject.java | 2 +- .../client/openapi/models/V1beta3Subject.java | 2 +- .../openapi/models/V1beta3UserSubject.java | 2 +- .../V2ContainerResourceMetricSource.java | 2 +- .../V2ContainerResourceMetricStatus.java | 2 +- .../models/V2CrossVersionObjectReference.java | 2 +- .../models/V2ExternalMetricSource.java | 2 +- .../models/V2ExternalMetricStatus.java | 2 +- .../openapi/models/V2HPAScalingPolicy.java | 2 +- .../openapi/models/V2HPAScalingRules.java | 2 +- .../models/V2HorizontalPodAutoscaler.java | 2 +- .../V2HorizontalPodAutoscalerBehavior.java | 2 +- .../V2HorizontalPodAutoscalerCondition.java | 2 +- .../models/V2HorizontalPodAutoscalerList.java | 2 +- .../models/V2HorizontalPodAutoscalerSpec.java | 2 +- .../V2HorizontalPodAutoscalerStatus.java | 2 +- .../openapi/models/V2MetricIdentifier.java | 2 +- .../client/openapi/models/V2MetricSpec.java | 2 +- .../client/openapi/models/V2MetricStatus.java | 2 +- .../client/openapi/models/V2MetricTarget.java | 2 +- .../openapi/models/V2MetricValueStatus.java | 2 +- .../openapi/models/V2ObjectMetricSource.java | 2 +- .../openapi/models/V2ObjectMetricStatus.java | 2 +- .../openapi/models/V2PodsMetricSource.java | 2 +- .../openapi/models/V2PodsMetricStatus.java | 2 +- .../models/V2ResourceMetricSource.java | 2 +- .../models/V2ResourceMetricStatus.java | 2 +- .../client/openapi/models/VersionInfo.java | 2 +- kubernetes/swagger.json | 5522 ++- 2344 files changed, 172954 insertions(+), 171636 deletions(-) delete mode 100644 fluent/src/main/java/io/kubernetes/client/fluent/Fluent.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasFluentImpl.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostIPBuilder.java rename fluent/src/main/java/io/kubernetes/client/openapi/models/{V1PodIPFluentImpl.java => V1HostIPFluent.java} (62%) delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusBuilder.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusFluent.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimFluentImpl.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatusBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatusFluent.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecFluentImpl.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatusBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatusFluent.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VariableBuilder.java rename fluent/src/main/java/io/kubernetes/client/openapi/models/{V1alpha1MatchConditionFluentImpl.java => V1alpha1VariableFluent.java} (62%) delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleFluentImpl.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotationBuilder.java rename fluent/src/main/java/io/kubernetes/client/openapi/models/{V1alpha1AuditAnnotationFluentImpl.java => V1beta1AuditAnnotationFluent.java} (61%) create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarningBuilder.java rename fluent/src/main/java/io/kubernetes/client/openapi/models/{V1alpha1ExpressionWarningFluentImpl.java => V1beta1ExpressionWarningFluent.java} (60%) create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchConditionBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchConditionFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResourcesBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResourcesFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperationsBuilder.java rename fluent/src/main/java/io/kubernetes/client/openapi/models/{V1alpha1NamedRuleWithOperationsFluentImpl.java => V1beta1NamedRuleWithOperationsFluent.java} (57%) create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKindBuilder.java rename fluent/src/main/java/io/kubernetes/client/openapi/models/{V1alpha1ParamKindFluentImpl.java => V1beta1ParamKindFluent.java} (62%) create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRefBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRefFluent.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusFluentImpl.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeCheckingBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeCheckingFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingListBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingListFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpecBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpecFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyListBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyListFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpecBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpecFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatusBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatusFluent.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidationBuilder.java rename fluent/src/main/java/io/kubernetes/client/openapi/models/{V1alpha1ValidationFluentImpl.java => V1beta1ValidationFluent.java} (64%) create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1VariableBuilder.java rename fluent/src/main/java/io/kubernetes/client/openapi/models/{V1MatchConditionFluentImpl.java => V1beta1VariableFluent.java} (62%) create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfigurationBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfigurationFluent.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectFluentImpl.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfigurationBuilder.java create mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfigurationFluent.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusFluentImpl.java delete mode 100644 fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoFluentImpl.java create mode 100644 kubernetes/docs/AdmissionregistrationV1beta1Api.md create mode 100644 kubernetes/docs/V1HostIP.md delete mode 100644 kubernetes/docs/V1NetworkPolicyStatus.md create mode 100644 kubernetes/docs/V1PodResourceClaimStatus.md create mode 100644 kubernetes/docs/V1SelfSubjectReview.md create mode 100644 kubernetes/docs/V1SelfSubjectReviewStatus.md create mode 100644 kubernetes/docs/V1alpha1Variable.md create mode 100644 kubernetes/docs/V1beta1AuditAnnotation.md create mode 100644 kubernetes/docs/V1beta1ExpressionWarning.md create mode 100644 kubernetes/docs/V1beta1MatchCondition.md create mode 100644 kubernetes/docs/V1beta1MatchResources.md create mode 100644 kubernetes/docs/V1beta1NamedRuleWithOperations.md create mode 100644 kubernetes/docs/V1beta1ParamKind.md create mode 100644 kubernetes/docs/V1beta1ParamRef.md create mode 100644 kubernetes/docs/V1beta1TypeChecking.md create mode 100644 kubernetes/docs/V1beta1ValidatingAdmissionPolicy.md create mode 100644 kubernetes/docs/V1beta1ValidatingAdmissionPolicyBinding.md create mode 100644 kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingList.md create mode 100644 kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingSpec.md create mode 100644 kubernetes/docs/V1beta1ValidatingAdmissionPolicyList.md create mode 100644 kubernetes/docs/V1beta1ValidatingAdmissionPolicySpec.md create mode 100644 kubernetes/docs/V1beta1ValidatingAdmissionPolicyStatus.md create mode 100644 kubernetes/docs/V1beta1Validation.md create mode 100644 kubernetes/docs/V1beta1Variable.md create mode 100644 kubernetes/docs/V1beta2ExemptPriorityLevelConfiguration.md create mode 100644 kubernetes/docs/V1beta3ExemptPriorityLevelConfiguration.md create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1beta1Api.java rename kubernetes/src/main/java/io/kubernetes/client/openapi/models/{V1NetworkPolicyStatus.java => V1HostIP.java} (52%) create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatus.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReview.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatus.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Variable.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotation.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarning.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchCondition.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResources.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperations.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKind.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRef.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeChecking.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicy.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBinding.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingList.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpec.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyList.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpec.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatus.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Validation.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Variable.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfiguration.java create mode 100644 kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfiguration.java diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/BaseFluent.java b/fluent/src/main/java/io/kubernetes/client/fluent/BaseFluent.java index 1b1bce3d2a..bedf6ab2b0 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/BaseFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/BaseFluent.java @@ -1,128 +1,79 @@ package io.kubernetes.client.fluent; import java.util.LinkedHashSet; -import java.util.Map.Entry; import java.util.stream.Collectors; import java.util.Set; +import java.util.Optional; import java.util.ArrayList; -import java.lang.String; -import java.util.AbstractMap; import java.util.Objects; -import java.lang.Class; import java.lang.Object; import java.util.List; +import java.lang.String; import java.util.Arrays; -import java.util.Collections; -public class BaseFluent> implements Fluent,Visitable{ +public class BaseFluent{ + public static final String VISIT = "visit"; public final VisitableMap _visitables = new VisitableMap(); + public static VisitableBuilder builderOf(T item) { if (item instanceof Editable) { - Object editor = ((Editable) item).edit(); - if (editor instanceof VisitableBuilder) { - return (VisitableBuilder) editor; - } - } - - try { - return (VisitableBuilder) Class.forName(item.getClass().getName() + "Builder", true, item.getClass().getClassLoader()).getConstructor(item.getClass()) - .newInstance(item); - } catch (Exception e) { - try { - return (VisitableBuilder) Class.forName(item.getClass().getName() + "Builder").getConstructor(item.getClass()) - .newInstance(item); - } catch (Exception e1) { - throw new IllegalStateException("Failed to create builder for: " + item.getClass(), e1); - } - } + Object editor = ((Editable) item).edit(); + if (editor instanceof VisitableBuilder) { + return (VisitableBuilder) editor; + } + } + + try { + return (VisitableBuilder) Class + .forName(item.getClass().getName() + "Builder", true, item.getClass().getClassLoader()) + .getConstructor(item.getClass()) + .newInstance(item); + } catch (Exception e) { + try { + return (VisitableBuilder) Class.forName(item.getClass().getName() + "Builder").getConstructor(item.getClass()) + .newInstance(item); + } catch (Exception e1) { + throw new IllegalStateException("Failed to create builder for: " + item.getClass(), e1); + } + } } + public static List build(List> list) { return list == null ? null : list.stream().map(Builder::build).collect(Collectors.toList()); } + public static Set build(Set> set) { return set == null ? null : new LinkedHashSet(set.stream().map(Builder::build).collect(Collectors.toSet())); } + public static List aggregate(List... lists) { return new ArrayList(Arrays.stream(lists).filter(Objects::nonNull).collect(Collectors.toList())); } + public static Set aggregate(Set... sets) { return new LinkedHashSet(Arrays.stream(sets).filter(Objects::nonNull).collect(Collectors.toSet())); } - public F accept(io.kubernetes.client.fluent.Visitor... visitors) { - return accept(Collections.emptyList(), visitors); - } - public F accept(Class type,Visitor visitor) { - return accept(Collections.emptyList(), new Visitor() { - @Override - public Class getType() { - return type; - } - - @Override - public void visit(List> path, V element) { - visitor.visit(path, element); - } - - @Override - public void visit(V element) { - visitor.visit(element); - } - }); - } - public F accept(List> path,io.kubernetes.client.fluent.Visitor... visitors) { - return accept(path, "", visitors); - } - public F accept(List> path,String currentKey,io.kubernetes.client.fluent.Visitor... visitors) { - List sortedVisitor = new ArrayList<>(); - for (Visitor visitor : visitors) { - visitor = VisitorListener.wrap(visitor); - if (!visitor.canVisit(path, this)) { - continue; - } - sortedVisitor.add(visitor); - } - sortedVisitor.sort((l, r) -> ((Visitor) r).order() - ((Visitor) l).order()); - for (Visitor visitor : sortedVisitor) { - visitor.visit(path, this); - } - - List> copyOfPath = path != null ? new ArrayList(path) : new ArrayList<>(); - copyOfPath.add(new AbstractMap.SimpleEntry<>(currentKey, this)); - - for (Entry entry : _visitables.entrySet()) { - List> newPath = Collections.unmodifiableList(copyOfPath); - - // Copy visitables to avoid ConcurrentModificationException when Visitors add/remove Visitables - for (Visitable visitable : new ArrayList<>((List>) entry.getValue())) { - for (Visitor visitor : visitors) { - if (visitor.getType() != null && visitor.getType().isAssignableFrom(visitable.getClass())) { - visitable.accept(newPath, entry.getKey(), visitor); - } - } - - for (Visitor visitor : visitors) { - if (visitor.getType() == null || !visitor.getType().isAssignableFrom(visitable.getClass())) { - visitable.accept(newPath, entry.getKey(), visitor); - } - } - } - } - return (F) this; + + public Optional getVisitableMap() { + return Optional.of(_visitables); } + public int hashCode() { final int prime = 31; - int result = 1; - result = prime * result + 0; - return result; + int result = 1; + result = prime * result + 0; + return result; } + public boolean equals(Object obj) { if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - return true; + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + return true; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/Builder.java b/fluent/src/main/java/io/kubernetes/client/fluent/Builder.java index dfe60382bb..d9824c870e 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/Builder.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/Builder.java @@ -1,8 +1,11 @@ package io.kubernetes.client.fluent; import java.lang.FunctionalInterface; - @FunctionalInterface - public interface Builder{ +@FunctionalInterface +public interface Builder{ + + T build(); + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/DelegatingVisitor.java b/fluent/src/main/java/io/kubernetes/client/fluent/DelegatingVisitor.java index fa32884318..2c1807446b 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/DelegatingVisitor.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/DelegatingVisitor.java @@ -9,24 +9,30 @@ public class DelegatingVisitor implements Visitor{ DelegatingVisitor(Class type,Visitor delegate) { this.type = type; - this.delegate = delegate; + this.delegate = delegate; } private final Class type; private final Visitor delegate; + public Class getType() { return type; } + public void visit(T target) { delegate.visit(target); } + public int order() { return delegate.order(); } + public void visit(List> path,T target) { delegate.visit(path, target); } + public Predicate>> getRequirement() { return delegate.getRequirement(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/Editable.java b/fluent/src/main/java/io/kubernetes/client/fluent/Editable.java index 1d4922af27..5eb7423ea4 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/Editable.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/Editable.java @@ -1,6 +1,9 @@ package io.kubernetes.client.fluent; public interface Editable{ + + T edit(); + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/Fluent.java b/fluent/src/main/java/io/kubernetes/client/fluent/Fluent.java deleted file mode 100644 index 01f01f4f86..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/fluent/Fluent.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.kubernetes.client.fluent; - -public interface Fluent>{ - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/Nested.java b/fluent/src/main/java/io/kubernetes/client/fluent/Nested.java index edeb4d4e7e..fb100d52f0 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/Nested.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/Nested.java @@ -1,6 +1,9 @@ package io.kubernetes.client.fluent; public interface Nested{ + + F and(); + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/PathAwareTypedVisitor.java b/fluent/src/main/java/io/kubernetes/client/fluent/PathAwareTypedVisitor.java index f605cb92a7..3a185e0881 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/PathAwareTypedVisitor.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/PathAwareTypedVisitor.java @@ -9,25 +9,30 @@ public class PathAwareTypedVisitor extends TypedVisitor{ PathAwareTypedVisitor() { List args = Visitors.getTypeArguments(PathAwareTypedVisitor.class, getClass()); - if (args == null || args.isEmpty()) { - throw new IllegalStateException("Could not determine type arguments for path aware typed visitor."); - } - this.type = (Class) args.get(0); - this.parentType = (Class

) args.get(1); + if (args == null || args.isEmpty()) { + throw new IllegalStateException("Could not determine type arguments for path aware typed visitor."); + } + this.type = (Class) args.get(0); + this.parentType = (Class

) args.get(1); } private final Class type; private final Class

parentType; + public void visit(V element) { } + public void visit(List> path,V element) { visit(element); } + public P getParent(List> path) { return path.size() - 1 >= 0 ? (P) path.get(path.size() - 1) : null; } + public Class

getParentType() { return parentType; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/TypedVisitor.java b/fluent/src/main/java/io/kubernetes/client/fluent/TypedVisitor.java index b8e8257f0e..aa6806d083 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/TypedVisitor.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/TypedVisitor.java @@ -2,8 +2,12 @@ import java.lang.Class; public abstract class TypedVisitor implements Visitor{ + + + public Class getType() { return (Class) Visitors.getTypeArguments(TypedVisitor.class, getClass()).get(0); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/Visitable.java b/fluent/src/main/java/io/kubernetes/client/fluent/Visitable.java index 328092d661..ddbdac942e 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/Visitable.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/Visitable.java @@ -1,46 +1,92 @@ package io.kubernetes.client.fluent; +import java.util.AbstractMap; import java.util.Map.Entry; +import java.util.Optional; +import java.util.ArrayList; import java.lang.Class; import java.lang.Object; import java.util.List; import java.lang.String; import java.util.Collections; public interface Visitable{ + + default T accept(Class type,Visitor visitor) { - return accept(new Visitor() { - @Override - public Class getType() { - return type; - } - - @Override - public void visit(V element) { - visitor.visit(element); - } - }); + return accept(Collections.emptyList(), new Visitor() { + @Override + public Class getType() { + return type; + } + + @Override + public void visit(List> path, V element) { + visitor.visit(path, element); + } + + @Override + public void visit(V element) { + visitor.visit(element); + } + }); } + default T accept(io.kubernetes.client.fluent.Visitor... visitors) { - for (Visitor visitor : visitors) { - if (visitor.canVisit(Collections.emptyList(), this)) { - visitor.visit(this); - } - } - return getTarget(this); + return accept(Collections.emptyList(), visitors); } + default T accept(List> path,io.kubernetes.client.fluent.Visitor... visitors) { return accept(path, "", visitors); } + default T accept(List> path,String currentKey,io.kubernetes.client.fluent.Visitor... visitors) { - for (Visitor visitor : visitors) { - if (visitor.canVisit(path, this)) { - visitor.visit(path, this); - } - } - return getTarget(this); + List sortedVisitor = new ArrayList<>(); + for (Visitor visitor : visitors) { + visitor = VisitorListener.wrap(visitor); + if (!visitor.canVisit(path, this)) { + continue; + } + sortedVisitor.add(visitor); + } + sortedVisitor.sort((l, r) -> ((Visitor) r).order() - ((Visitor) l).order()); + for (Visitor visitor : sortedVisitor) { + visitor.visit(path, this); + } + + List> copyOfPath = path != null ? new ArrayList(path) : new ArrayList<>(); + copyOfPath.add(new AbstractMap.SimpleEntry<>(currentKey, this)); + + getVisitableMap().ifPresent(vm -> { + for (Entry entry : vm.entrySet()) { + List> newPath = Collections.unmodifiableList(copyOfPath); + + // Copy visitables to avoid ConcurrentModificationException when Visitors add/remove Visitables + for (Visitable visitable : new ArrayList<>((List>) entry.getValue())) { + for (Visitor visitor : visitors) { + if (visitor.getType() != null && visitor.getType().isAssignableFrom(visitable.getClass())) { + visitable.accept(newPath, entry.getKey(), visitor); + } + } + + for (Visitor visitor : visitors) { + if (visitor.getType() == null || !visitor.getType().isAssignableFrom(visitable.getClass())) { + visitable.accept(newPath, entry.getKey(), visitor); + } + } + } + } + }); + + return (T) this; } + default T getTarget(Visitable visitable) { return (T) visitable; } + default Optional getVisitableMap() { + return Optional.empty(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/VisitableBuilder.java b/fluent/src/main/java/io/kubernetes/client/fluent/VisitableBuilder.java index 6c5172906b..bca1a069e1 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/VisitableBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/VisitableBuilder.java @@ -2,4 +2,6 @@ public interface VisitableBuilder> extends Builder,Visitable{ + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/VisitableMap.java b/fluent/src/main/java/io/kubernetes/client/fluent/VisitableMap.java index d889f05d2b..8cbaa1d798 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/VisitableMap.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/VisitableMap.java @@ -11,23 +11,31 @@ import java.lang.String; import java.util.Spliterator; public class VisitableMap extends HashMap>> implements Iterable>{ + + + public List> get(Object key) { if (!containsKey(key)) { - put(String.valueOf(key), new ArrayList()); - } - return super.get(key); + put(String.valueOf(key), new ArrayList()); + } + return super.get(key); } + public List> aggregate() { return values().stream().flatMap(l -> l.stream()).collect(Collectors.toList()); } + public Iterator> iterator() { return aggregate().iterator(); } + public void forEach(Consumer> action) { aggregate().forEach(action); } + public Spliterator spliterator() { return aggregate().spliterator(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/Visitor.java b/fluent/src/main/java/io/kubernetes/client/fluent/Visitor.java index 1070725dfe..3ccb13b5ee 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/Visitor.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/Visitor.java @@ -9,73 +9,84 @@ import java.lang.reflect.Method; import java.lang.Boolean; import java.util.function.Predicate; - @FunctionalInterface - public interface Visitor{ +@FunctionalInterface +public interface Visitor{ + + default Class getType() { List args = Visitors.getTypeArguments(Visitor.class, getClass()); - if (args == null || args.isEmpty()) { - return null; - } - return (Class) args.get(0); + if (args == null || args.isEmpty()) { + return null; + } + return (Class) args.get(0); } + void visit(T element); default int order() { return 0; } + default void visit(List> path,T element) { visit(element); } + default Boolean canVisit(List> path,F target) { if (target == null) { - return false; - } - - if (getType() == null) { - return hasVisitMethodMatching(target); - } else if (!getType().isAssignableFrom(target.getClass())) { - return false; - } - - try { - return getRequirement().test(path); - } catch (ClassCastException e) { - // This will happen if predicte does not match the Object. - // So, instead of using reflection to determine that, let's just catch the error - return false; - } + return false; + } + + if (getType() == null) { + return hasVisitMethodMatching(target); + } else if (!getType().isAssignableFrom(target.getClass())) { + return false; + } + + try { + return getRequirement().test(path); + } catch (ClassCastException e) { + // This will happen if predicte does not match the Object. + // So, instead of using reflection to determine that, let's just catch the error + return false; + } } + default Boolean hasVisitMethodMatching(F target) { for (Method method : getClass().getMethods()) { - if (!method.getName().equals("visit") || method.getParameterTypes().length != 1) { - continue; - } - Class visitorType = method.getParameterTypes()[0]; - if (visitorType.isAssignableFrom(target.getClass())) { - return true; - } else { + if (!method.getName().equals("visit") || method.getParameterTypes().length != 1) { + continue; + } + Class visitorType = method.getParameterTypes()[0]; + if (visitorType.isAssignableFrom(target.getClass())) { + return true; + } else { + return false; + } + } return false; - } - } - return false; } + default Predicate>> getRequirement() { return p -> true; } + default Predicate>> hasItem(Class type,Predicate predicate) { Predicate>> result = l -> l.stream().map(Entry::getValue).filter(i -> type.isInstance(i)) - .map(i -> type.cast(i)).anyMatch(predicate); - return result; + .map(i -> type.cast(i)).anyMatch(predicate); + return result; } + default

Visitor addRequirement(Class

type,Predicate

predicate) { return addRequirement(predicate); } + default Visitor addRequirement(Predicate predicate) { return new DelegatingVisitor(getType(), this) { - @Override - public Predicate> getRequirement() { - return Visitor.this.getRequirement().and(predicate); - } - }; + @Override + public Predicate> getRequirement() { + return Visitor.this.getRequirement().and(predicate); + } + }; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/VisitorListener.java b/fluent/src/main/java/io/kubernetes/client/fluent/VisitorListener.java index c977b940ce..9060426abe 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/VisitorListener.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/VisitorListener.java @@ -11,44 +11,52 @@ public interface VisitorListener{ static AtomicBoolean loaded = new AtomicBoolean(); static Set listeners = new HashSet<>(); + public static Set getListeners() { if (loaded.get()) { - return listeners; - } - synchronized (loaded) { - listeners.add(new VisitorListener() { - }); - for (VisitorListener listener : ServiceLoader.load(VisitorListener.class, - VisitorListener.class.getClassLoader())) { - listeners.add(listener); - } - if (Thread.currentThread().getContextClassLoader() != null) { - for (VisitorListener listener : ServiceLoader.load(VisitorListener.class, - Thread.currentThread().getContextClassLoader())) { - listeners.add(listener); + return listeners; + } + synchronized (loaded) { + listeners.add(new VisitorListener() { + }); + for (VisitorListener listener : ServiceLoader.load(VisitorListener.class, + VisitorListener.class.getClassLoader())) { + listeners.add(listener); + } + if (Thread.currentThread().getContextClassLoader() != null) { + for (VisitorListener listener : ServiceLoader.load(VisitorListener.class, + Thread.currentThread().getContextClassLoader())) { + listeners.add(listener); + } + } + loaded.set(true); } - } - loaded.set(true); - } - return listeners; + return listeners; } + public static Visitor wrap(Visitor visitor) { return VisitorWiretap.create(visitor, getListeners()); } + public static void register(VisitorListener listener) { listeners.add(listener); } + public static void unregister(VisitorListener listener) { listeners.add(listener); } + default void beforeVisit(Visitor v,List> path,T target) { } + default void afterVisit(Visitor v,List> path,T target) { } + default void onCheck(Visitor v,boolean canVisit,T target) { } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/VisitorWiretap.java b/fluent/src/main/java/io/kubernetes/client/fluent/VisitorWiretap.java index 2ac7833d95..d00e7725e4 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/VisitorWiretap.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/VisitorWiretap.java @@ -12,47 +12,54 @@ public final class VisitorWiretap implements Visitor{ private VisitorWiretap(Visitor delegate,Collection listeners) { this.delegate = delegate; - this.listeners = listeners; + this.listeners = listeners; } private final Collection listeners; private final Visitor delegate; + public static VisitorWiretap create(Visitor visitor,Collection listeners) { if (visitor instanceof VisitorWiretap) { - return (VisitorWiretap) visitor; - } - return new VisitorWiretap(visitor, listeners); + return (VisitorWiretap) visitor; + } + return new VisitorWiretap(visitor, listeners); } + public Class getType() { return delegate.getType(); } + public void visit(T target) { for (VisitorListener l : listeners) { - l.beforeVisit(delegate, Collections.emptyList(), target); - } - delegate.visit(target); - for (VisitorListener l : listeners) { - l.afterVisit(delegate, Collections.emptyList(), target); - } + l.beforeVisit(delegate, Collections.emptyList(), target); + } + delegate.visit(target); + for (VisitorListener l : listeners) { + l.afterVisit(delegate, Collections.emptyList(), target); + } } + public int order() { return delegate.order(); } + public void visit(List> path,T target) { for (VisitorListener l : listeners) { - l.beforeVisit(delegate, path, target); - } - delegate.visit(path, target); - for (VisitorListener l : listeners) { - l.afterVisit(delegate, path, target); - } + l.beforeVisit(delegate, path, target); + } + delegate.visit(path, target); + for (VisitorListener l : listeners) { + l.afterVisit(delegate, path, target); + } } + public Boolean canVisit(List> path,F target) { boolean canVisit = delegate.canVisit(path, target); - for (VisitorListener l : listeners) { - l.onCheck(delegate, canVisit, target); - } - - return canVisit; + for (VisitorListener l : listeners) { + l.onCheck(delegate, canVisit, target); + } + + return canVisit; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/fluent/Visitors.java b/fluent/src/main/java/io/kubernetes/client/fluent/Visitors.java index 7a2a53d475..e030bb4311 100644 --- a/fluent/src/main/java/io/kubernetes/client/fluent/Visitors.java +++ b/fluent/src/main/java/io/kubernetes/client/fluent/Visitors.java @@ -17,104 +17,111 @@ public final class Visitors{ private Visitors() { //Utility Class } + + public static Visitor newVisitor(Class type,Visitor visitor) { return new DelegatingVisitor(type, visitor); } + protected static List getTypeArguments(Class baseClass,Class childClass) { Map resolvedTypes = new LinkedHashMap(); - Type type = childClass; - // start walking up the inheritance hierarchy until we hit baseClass - for (Class cl = getClass(type); cl != null && cl != Object.class - && !baseClass.getName().equals(cl.getName()); cl = getClass(type)) { - if (type instanceof Class) { - Class c = (Class) type; - Optional nextInterface = baseClass.isInterface() ? getMatchingInterface(baseClass, c.getGenericInterfaces()) - : Optional.empty(); - if (nextInterface.isPresent()) { - type = nextInterface.get(); + Type type = childClass; + // start walking up the inheritance hierarchy until we hit baseClass + for (Class cl = getClass(type); cl != null && cl != Object.class + && !baseClass.getName().equals(cl.getName()); cl = getClass(type)) { + if (type instanceof Class) { + Class c = (Class) type; + Optional nextInterface = baseClass.isInterface() ? getMatchingInterface(baseClass, c.getGenericInterfaces()) + : Optional.empty(); + if (nextInterface.isPresent()) { + type = nextInterface.get(); + } else { + // there is no useful information for us in raw types, so just keep going. + type = ((Class) type).getGenericSuperclass(); + } + } else if (type instanceof ParameterizedType) { + ParameterizedType parameterizedType = (ParameterizedType) type; + Type t = parameterizedType.getRawType(); + if (t instanceof Class) { + Class rawType = (Class) parameterizedType.getRawType(); + + Type[] actualTypeArguments = parameterizedType.getActualTypeArguments(); + TypeVariable[] typeParameters = rawType.getTypeParameters(); + for (int i = 0; i < actualTypeArguments.length; i++) { + resolvedTypes.put(typeParameters[i], actualTypeArguments[i]); + } + + if (!baseClass.equals(rawType)) { + type = rawType.getGenericSuperclass(); + } + } else { + break; + } + } + } + + // finally, for each actual type argument provided to baseClass, determine (if possible) + // the raw class for that type argument. + Type[] actualTypeArguments; + if (type instanceof Class) { + actualTypeArguments = ((Class) type).getTypeParameters(); } else { - // there is no useful information for us in raw types, so just keep going. - type = ((Class) type).getGenericSuperclass(); + actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments(); } - } else if (type instanceof ParameterizedType) { - ParameterizedType parameterizedType = (ParameterizedType) type; - Type t = parameterizedType.getRawType(); - if (t instanceof Class) { - Class rawType = (Class) parameterizedType.getRawType(); - - Type[] actualTypeArguments = parameterizedType.getActualTypeArguments(); - TypeVariable[] typeParameters = rawType.getTypeParameters(); - for (int i = 0; i < actualTypeArguments.length; i++) { - resolvedTypes.put(typeParameters[i], actualTypeArguments[i]); - } - - if (!baseClass.equals(rawType)) { - type = rawType.getGenericSuperclass(); + List typeArgumentsAsClasses = new ArrayList(); + // resolve types by chasing down type variables. + for (Type baseType : actualTypeArguments) { + while (resolvedTypes.containsKey(baseType)) { + baseType = resolvedTypes.get(baseType); } - } else { - break; + typeArgumentsAsClasses.add(getClass(baseType)); } - } - } - - // finally, for each actual type argument provided to baseClass, determine (if possible) - // the raw class for that type argument. - Type[] actualTypeArguments; - if (type instanceof Class) { - actualTypeArguments = ((Class) type).getTypeParameters(); - } else { - actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments(); - } - List typeArgumentsAsClasses = new ArrayList(); - // resolve types by chasing down type variables. - for (Type baseType : actualTypeArguments) { - while (resolvedTypes.containsKey(baseType)) { - baseType = resolvedTypes.get(baseType); - } - typeArgumentsAsClasses.add(getClass(baseType)); - } - return typeArgumentsAsClasses; + return typeArgumentsAsClasses; } + private static String getRawName(Type type) { return type instanceof ParameterizedType ? ((ParameterizedType) type).getRawType().getTypeName() : type.getTypeName(); } + private static Class getClass(Type type) { if (type instanceof Class) { - return (Class) type; - } else if (type instanceof ParameterizedType) { - return getClass(((ParameterizedType) type).getRawType()); - } else if (type instanceof GenericArrayType) { - Type componentType = ((GenericArrayType) type).getGenericComponentType(); - Class componentClass = getClass(componentType); - if (componentClass != null) { - return Array.newInstance(componentClass, 0).getClass(); - } else { - return null; - } - } else { - return null; - } + return (Class) type; + } else if (type instanceof ParameterizedType) { + return getClass(((ParameterizedType) type).getRawType()); + } else if (type instanceof GenericArrayType) { + Type componentType = ((GenericArrayType) type).getGenericComponentType(); + Class componentClass = getClass(componentType); + if (componentClass != null) { + return Array.newInstance(componentClass, 0).getClass(); + } else { + return null; + } + } else { + return null; + } } + private static Optional getMatchingInterface(Class targetInterface,java.lang.reflect.Type... candidates) { if (candidates == null || candidates.length == 0) { - return Optional.empty(); - } - Optional match = Arrays.stream(candidates).filter(c -> getRawName(c).equals(targetInterface.getTypeName())) - .findFirst(); - if (match.isPresent()) { - return match; - } else { - for (Type candidate : candidates) { - if (candidate instanceof Class) { - Class c = (Class) candidate; - Optional next = getMatchingInterface(targetInterface, c.getGenericInterfaces()); - if (next.isPresent()) { - return Optional.of(c); + return Optional.empty(); + } + Optional match = Arrays.stream(candidates).filter(c -> getRawName(c).equals(targetInterface.getTypeName())) + .findFirst(); + if (match.isPresent()) { + return match; + } else { + for (Type candidate : candidates) { + if (candidate instanceof Class) { + Class c = (Class) candidate; + Optional next = getMatchingInterface(targetInterface, c.getGenericInterfaces()); + if (next.isPresent()) { + return Optional.of(c); + } + } } + return Optional.empty(); } - } - return Optional.empty(); - } } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceBuilder.java index 65499755f6..8eb0f4d786 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class AdmissionregistrationV1ServiceReferenceBuilder extends AdmissionregistrationV1ServiceReferenceFluentImpl implements VisitableBuilder{ +public class AdmissionregistrationV1ServiceReferenceBuilder extends AdmissionregistrationV1ServiceReferenceFluent implements VisitableBuilder{ public AdmissionregistrationV1ServiceReferenceBuilder() { - this(false); - } - public AdmissionregistrationV1ServiceReferenceBuilder(Boolean validationEnabled) { - this(new AdmissionregistrationV1ServiceReference(), validationEnabled); + this(new AdmissionregistrationV1ServiceReference()); } + public AdmissionregistrationV1ServiceReferenceBuilder(AdmissionregistrationV1ServiceReferenceFluent fluent) { - this(fluent, false); - } - public AdmissionregistrationV1ServiceReferenceBuilder(AdmissionregistrationV1ServiceReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new AdmissionregistrationV1ServiceReference(), validationEnabled); + this(fluent, new AdmissionregistrationV1ServiceReference()); } + public AdmissionregistrationV1ServiceReferenceBuilder(AdmissionregistrationV1ServiceReferenceFluent fluent,AdmissionregistrationV1ServiceReference instance) { - this(fluent, instance, false); - } - public AdmissionregistrationV1ServiceReferenceBuilder(AdmissionregistrationV1ServiceReferenceFluent fluent,AdmissionregistrationV1ServiceReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - fluent.withPath(instance.getPath()); - fluent.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public AdmissionregistrationV1ServiceReferenceBuilder(AdmissionregistrationV1ServiceReference instance) { - this(instance,false); - } - public AdmissionregistrationV1ServiceReferenceBuilder(AdmissionregistrationV1ServiceReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withPath(instance.getPath()); - this.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } AdmissionregistrationV1ServiceReferenceFluent fluent; - Boolean validationEnabled; + public AdmissionregistrationV1ServiceReference build() { AdmissionregistrationV1ServiceReference buildable = new AdmissionregistrationV1ServiceReference(); buildable.setName(fluent.getName()); @@ -52,4 +30,5 @@ public AdmissionregistrationV1ServiceReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceFluent.java index 650bae01b5..9796629ebd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceFluent.java @@ -1,26 +1,115 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface AdmissionregistrationV1ServiceReferenceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class AdmissionregistrationV1ServiceReferenceFluent> extends BaseFluent{ + public AdmissionregistrationV1ServiceReferenceFluent() { + } + public AdmissionregistrationV1ServiceReferenceFluent(AdmissionregistrationV1ServiceReference instance) { + this.copyInstance(instance); + } + private String name; + private String namespace; + private String path; + private Integer port; + + protected void copyInstance(AdmissionregistrationV1ServiceReference instance) { + instance = (instance != null ? instance : new AdmissionregistrationV1ServiceReference()); + if (instance != null) { + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withPath(instance.getPath()); + this.withPort(instance.getPort()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + AdmissionregistrationV1ServiceReferenceFluent that = (AdmissionregistrationV1ServiceReferenceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, namespace, path, port, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (port != null) { sb.append("port:"); sb.append(port); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceFluentImpl.java deleted file mode 100644 index 277115654a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class AdmissionregistrationV1ServiceReferenceFluentImpl> extends BaseFluent implements AdmissionregistrationV1ServiceReferenceFluent{ - public AdmissionregistrationV1ServiceReferenceFluentImpl() { - } - public AdmissionregistrationV1ServiceReferenceFluentImpl(AdmissionregistrationV1ServiceReference instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withPath(instance.getPath()); - this.withPort(instance.getPort()); - } - } - private String name; - private String namespace; - private String path; - private Integer port; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - AdmissionregistrationV1ServiceReferenceFluentImpl that = (AdmissionregistrationV1ServiceReferenceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, namespace, path, port, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (port != null) { sb.append("port:"); sb.append(port); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigBuilder.java index 7576537f1e..5aa59fe2a1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class AdmissionregistrationV1WebhookClientConfigBuilder extends AdmissionregistrationV1WebhookClientConfigFluentImpl implements VisitableBuilder{ +public class AdmissionregistrationV1WebhookClientConfigBuilder extends AdmissionregistrationV1WebhookClientConfigFluent implements VisitableBuilder{ public AdmissionregistrationV1WebhookClientConfigBuilder() { - this(false); - } - public AdmissionregistrationV1WebhookClientConfigBuilder(Boolean validationEnabled) { - this(new AdmissionregistrationV1WebhookClientConfig(), validationEnabled); + this(new AdmissionregistrationV1WebhookClientConfig()); } + public AdmissionregistrationV1WebhookClientConfigBuilder(AdmissionregistrationV1WebhookClientConfigFluent fluent) { - this(fluent, false); - } - public AdmissionregistrationV1WebhookClientConfigBuilder(AdmissionregistrationV1WebhookClientConfigFluent fluent,Boolean validationEnabled) { - this(fluent, new AdmissionregistrationV1WebhookClientConfig(), validationEnabled); + this(fluent, new AdmissionregistrationV1WebhookClientConfig()); } + public AdmissionregistrationV1WebhookClientConfigBuilder(AdmissionregistrationV1WebhookClientConfigFluent fluent,AdmissionregistrationV1WebhookClientConfig instance) { - this(fluent, instance, false); - } - public AdmissionregistrationV1WebhookClientConfigBuilder(AdmissionregistrationV1WebhookClientConfigFluent fluent,AdmissionregistrationV1WebhookClientConfig instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCaBundle(instance.getCaBundle()); - fluent.withService(instance.getService()); - fluent.withUrl(instance.getUrl()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public AdmissionregistrationV1WebhookClientConfigBuilder(AdmissionregistrationV1WebhookClientConfig instance) { - this(instance,false); - } - public AdmissionregistrationV1WebhookClientConfigBuilder(AdmissionregistrationV1WebhookClientConfig instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCaBundle(instance.getCaBundle()); - this.withService(instance.getService()); - this.withUrl(instance.getUrl()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } AdmissionregistrationV1WebhookClientConfigFluent fluent; - Boolean validationEnabled; + public AdmissionregistrationV1WebhookClientConfig build() { AdmissionregistrationV1WebhookClientConfig buildable = new AdmissionregistrationV1WebhookClientConfig(); buildable.setCaBundle(fluent.getCaBundle()); - buildable.setService(fluent.getService()); + buildable.setService(fluent.buildService()); buildable.setUrl(fluent.getUrl()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigFluent.java index e769dd369b..d84420cd45 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigFluent.java @@ -1,50 +1,192 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; -import java.lang.Deprecated; import java.lang.Byte; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; -import java.lang.Boolean; +import java.lang.Object; +import java.util.List; - /** - * Generated - */ -public interface AdmissionregistrationV1WebhookClientConfigFluent> extends Fluent{ - public A withCaBundle(byte... caBundle); - public byte[] getCaBundle(); - public A addToCaBundle(int index,Byte item); - public A setToCaBundle(int index,Byte item); - public A addToCaBundle(java.lang.Byte... items); - public A addAllToCaBundle(Collection items); - public A removeFromCaBundle(java.lang.Byte... items); - public A removeAllFromCaBundle(Collection items); - public Boolean hasCaBundle(); - - /** - * This method has been deprecated, please use method buildService instead. - * @return The buildable object. - */ - @Deprecated - public AdmissionregistrationV1ServiceReference getService(); - public AdmissionregistrationV1ServiceReference buildService(); - public A withService(AdmissionregistrationV1ServiceReference service); - public Boolean hasService(); - public AdmissionregistrationV1WebhookClientConfigFluent.ServiceNested withNewService(); - public AdmissionregistrationV1WebhookClientConfigFluent.ServiceNested withNewServiceLike(AdmissionregistrationV1ServiceReference item); - public AdmissionregistrationV1WebhookClientConfigFluent.ServiceNested editService(); - public AdmissionregistrationV1WebhookClientConfigFluent.ServiceNested editOrNewService(); - public AdmissionregistrationV1WebhookClientConfigFluent.ServiceNested editOrNewServiceLike(AdmissionregistrationV1ServiceReference item); - public String getUrl(); - public A withUrl(String url); - public Boolean hasUrl(); - public interface ServiceNested extends Nested,AdmissionregistrationV1ServiceReferenceFluent>{ - public N and(); - public N endService(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class AdmissionregistrationV1WebhookClientConfigFluent> extends BaseFluent{ + public AdmissionregistrationV1WebhookClientConfigFluent() { + } + + public AdmissionregistrationV1WebhookClientConfigFluent(AdmissionregistrationV1WebhookClientConfig instance) { + this.copyInstance(instance); + } + private List caBundle; + private AdmissionregistrationV1ServiceReferenceBuilder service; + private String url; + + protected void copyInstance(AdmissionregistrationV1WebhookClientConfig instance) { + instance = (instance != null ? instance : new AdmissionregistrationV1WebhookClientConfig()); + if (instance != null) { + this.withCaBundle(instance.getCaBundle()); + this.withService(instance.getService()); + this.withUrl(instance.getUrl()); + } + } + + public A withCaBundle(byte... caBundle) { + if (this.caBundle != null) { + this.caBundle.clear(); + _visitables.remove("caBundle"); + } + if (caBundle != null) { + for (byte item : caBundle) { + this.addToCaBundle(item); + } + } + return (A) this; + } + + public byte[] getCaBundle() { + int size = caBundle != null ? caBundle.size() : 0;; + byte[] result = new byte[size];; + if (size == 0) { + return result; + } + int index = 0;; + for (byte item : caBundle) { + result[index++] = item; + } + return result; + } + + public A addToCaBundle(int index,Byte item) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + this.caBundle.add(index, item); + return (A)this; + } + + public A setToCaBundle(int index,Byte item) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + this.caBundle.set(index, item); return (A)this; + } + + public A addToCaBundle(java.lang.Byte... items) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + for (Byte item : items) {this.caBundle.add(item);} return (A)this; + } + + public A addAllToCaBundle(Collection items) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + for (Byte item : items) {this.caBundle.add(item);} return (A)this; + } + + public A removeFromCaBundle(java.lang.Byte... items) { + if (this.caBundle == null) return (A)this; + for (Byte item : items) { this.caBundle.remove(item);} return (A)this; + } + + public A removeAllFromCaBundle(Collection items) { + if (this.caBundle == null) return (A)this; + for (Byte item : items) { this.caBundle.remove(item);} return (A)this; + } + + public boolean hasCaBundle() { + return this.caBundle != null && !this.caBundle.isEmpty(); + } + + public AdmissionregistrationV1ServiceReference buildService() { + return this.service != null ? this.service.build() : null; + } + + public A withService(AdmissionregistrationV1ServiceReference service) { + this._visitables.remove("service"); + if (service != null) { + this.service = new AdmissionregistrationV1ServiceReferenceBuilder(service); + this._visitables.get("service").add(this.service); + } else { + this.service = null; + this._visitables.get("service").remove(this.service); + } + return (A) this; + } + + public boolean hasService() { + return this.service != null; + } + + public ServiceNested withNewService() { + return new ServiceNested(null); + } + + public ServiceNested withNewServiceLike(AdmissionregistrationV1ServiceReference item) { + return new ServiceNested(item); + } + + public ServiceNested editService() { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(null)); + } + + public ServiceNested editOrNewService() { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(new AdmissionregistrationV1ServiceReferenceBuilder().build())); + } + + public ServiceNested editOrNewServiceLike(AdmissionregistrationV1ServiceReference item) { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(item)); + } + + public String getUrl() { + return this.url; + } + + public A withUrl(String url) { + this.url = url; + return (A) this; + } + + public boolean hasUrl() { + return this.url != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + AdmissionregistrationV1WebhookClientConfigFluent that = (AdmissionregistrationV1WebhookClientConfigFluent) o; + if (!java.util.Objects.equals(caBundle, that.caBundle)) return false; + if (!java.util.Objects.equals(service, that.service)) return false; + if (!java.util.Objects.equals(url, that.url)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(caBundle, service, url, super.hashCode()); } + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (caBundle != null && !caBundle.isEmpty()) { sb.append("caBundle:"); sb.append(caBundle + ","); } + if (service != null) { sb.append("service:"); sb.append(service + ","); } + if (url != null) { sb.append("url:"); sb.append(url); } + sb.append("}"); + return sb.toString(); + } + public class ServiceNested extends AdmissionregistrationV1ServiceReferenceFluent> implements Nested{ + ServiceNested(AdmissionregistrationV1ServiceReference item) { + this.builder = new AdmissionregistrationV1ServiceReferenceBuilder(this, item); + } + AdmissionregistrationV1ServiceReferenceBuilder builder; + + public N and() { + return (N) AdmissionregistrationV1WebhookClientConfigFluent.this.withService(builder.build()); + } + + public N endService() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigFluentImpl.java deleted file mode 100644 index 4817fb83a8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigFluentImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.lang.Deprecated; -import java.lang.Byte; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class AdmissionregistrationV1WebhookClientConfigFluentImpl> extends BaseFluent implements AdmissionregistrationV1WebhookClientConfigFluent{ - public AdmissionregistrationV1WebhookClientConfigFluentImpl() { - } - public AdmissionregistrationV1WebhookClientConfigFluentImpl(AdmissionregistrationV1WebhookClientConfig instance) { - if (instance != null) { - this.withCaBundle(instance.getCaBundle()); - this.withService(instance.getService()); - this.withUrl(instance.getUrl()); - } - } - private List caBundle; - private AdmissionregistrationV1ServiceReferenceBuilder service; - private String url; - public A withCaBundle(byte... caBundle) { - if (this.caBundle != null) {this.caBundle.clear(); _visitables.remove("caBundle"); } - if (caBundle != null) {for (byte item :caBundle){ this.addToCaBundle(item);}} return (A) this; - } - public byte[] getCaBundle() { - //This needs to work with primitives, so we use arrays. -int size = caBundle != null ? caBundle.size() : 0; -byte[] result = new byte[size]; -if (size == 0) { - return result; -} -int index = 0; -for (byte item : caBundle) { - result[index++]=item; -} -return result; - - } - public A addToCaBundle(int index,Byte item) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - this.caBundle.add(index, item); - return (A)this; - } - public A setToCaBundle(int index,Byte item) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - this.caBundle.set(index, item); return (A)this; - } - public A addToCaBundle(java.lang.Byte... items) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - for (Byte item : items) {this.caBundle.add(item);} return (A)this; - } - public A addAllToCaBundle(Collection items) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - for (Byte item : items) {this.caBundle.add(item);} return (A)this; - } - public A removeFromCaBundle(java.lang.Byte... items) { - for (Byte item : items) {if (this.caBundle!= null){ this.caBundle.remove(item);}} return (A)this; - } - public A removeAllFromCaBundle(Collection items) { - for (Byte item : items) {if (this.caBundle!= null){ this.caBundle.remove(item);}} return (A)this; - } - public Boolean hasCaBundle() { - return caBundle != null && !caBundle.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildService instead. - * @return The buildable object. - */ - @Deprecated - public AdmissionregistrationV1ServiceReference getService() { - return this.service!=null ?this.service.build():null; - } - public AdmissionregistrationV1ServiceReference buildService() { - return this.service!=null ?this.service.build():null; - } - public A withService(AdmissionregistrationV1ServiceReference service) { - _visitables.get("service").remove(this.service); - if (service!=null){ this.service= new AdmissionregistrationV1ServiceReferenceBuilder(service); _visitables.get("service").add(this.service);} else { this.service = null; _visitables.get("service").remove(this.service); } return (A) this; - } - public Boolean hasService() { - return this.service != null; - } - public AdmissionregistrationV1WebhookClientConfigFluentImpl.ServiceNested withNewService() { - return new AdmissionregistrationV1WebhookClientConfigFluentImpl.ServiceNestedImpl(); - } - public AdmissionregistrationV1WebhookClientConfigFluentImpl.ServiceNested withNewServiceLike(AdmissionregistrationV1ServiceReference item) { - return new AdmissionregistrationV1WebhookClientConfigFluentImpl.ServiceNestedImpl(item); - } - public AdmissionregistrationV1WebhookClientConfigFluentImpl.ServiceNested editService() { - return withNewServiceLike(getService()); - } - public AdmissionregistrationV1WebhookClientConfigFluentImpl.ServiceNested editOrNewService() { - return withNewServiceLike(getService() != null ? getService(): new AdmissionregistrationV1ServiceReferenceBuilder().build()); - } - public AdmissionregistrationV1WebhookClientConfigFluentImpl.ServiceNested editOrNewServiceLike(AdmissionregistrationV1ServiceReference item) { - return withNewServiceLike(getService() != null ? getService(): item); - } - public String getUrl() { - return this.url; - } - public A withUrl(String url) { - this.url=url; return (A) this; - } - public Boolean hasUrl() { - return this.url != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - AdmissionregistrationV1WebhookClientConfigFluentImpl that = (AdmissionregistrationV1WebhookClientConfigFluentImpl) o; - if (!java.util.Objects.equals(caBundle, that.caBundle)) return false; - - if (!java.util.Objects.equals(service, that.service)) return false; - - if (!java.util.Objects.equals(url, that.url)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(caBundle, service, url, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (caBundle != null && !caBundle.isEmpty()) { sb.append("caBundle:"); sb.append(caBundle + ","); } - if (service != null) { sb.append("service:"); sb.append(service + ","); } - if (url != null) { sb.append("url:"); sb.append(url); } - sb.append("}"); - return sb.toString(); - } - class ServiceNestedImpl extends AdmissionregistrationV1ServiceReferenceFluentImpl> implements AdmissionregistrationV1WebhookClientConfigFluentImpl.ServiceNested,Nested{ - ServiceNestedImpl(AdmissionregistrationV1ServiceReference item) { - this.builder = new AdmissionregistrationV1ServiceReferenceBuilder(this, item); - } - ServiceNestedImpl() { - this.builder = new AdmissionregistrationV1ServiceReferenceBuilder(this); - } - AdmissionregistrationV1ServiceReferenceBuilder builder; - public N and() { - return (N) AdmissionregistrationV1WebhookClientConfigFluentImpl.this.withService(builder.build()); - } - public N endService() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceBuilder.java index 2a611fc73a..8a71cbaa1a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class ApiextensionsV1ServiceReferenceBuilder extends ApiextensionsV1ServiceReferenceFluentImpl implements VisitableBuilder{ +public class ApiextensionsV1ServiceReferenceBuilder extends ApiextensionsV1ServiceReferenceFluent implements VisitableBuilder{ public ApiextensionsV1ServiceReferenceBuilder() { - this(false); - } - public ApiextensionsV1ServiceReferenceBuilder(Boolean validationEnabled) { - this(new ApiextensionsV1ServiceReference(), validationEnabled); + this(new ApiextensionsV1ServiceReference()); } + public ApiextensionsV1ServiceReferenceBuilder(ApiextensionsV1ServiceReferenceFluent fluent) { - this(fluent, false); - } - public ApiextensionsV1ServiceReferenceBuilder(ApiextensionsV1ServiceReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new ApiextensionsV1ServiceReference(), validationEnabled); + this(fluent, new ApiextensionsV1ServiceReference()); } + public ApiextensionsV1ServiceReferenceBuilder(ApiextensionsV1ServiceReferenceFluent fluent,ApiextensionsV1ServiceReference instance) { - this(fluent, instance, false); - } - public ApiextensionsV1ServiceReferenceBuilder(ApiextensionsV1ServiceReferenceFluent fluent,ApiextensionsV1ServiceReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - fluent.withPath(instance.getPath()); - fluent.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public ApiextensionsV1ServiceReferenceBuilder(ApiextensionsV1ServiceReference instance) { - this(instance,false); - } - public ApiextensionsV1ServiceReferenceBuilder(ApiextensionsV1ServiceReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withPath(instance.getPath()); - this.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } ApiextensionsV1ServiceReferenceFluent fluent; - Boolean validationEnabled; + public ApiextensionsV1ServiceReference build() { ApiextensionsV1ServiceReference buildable = new ApiextensionsV1ServiceReference(); buildable.setName(fluent.getName()); @@ -52,4 +30,5 @@ public ApiextensionsV1ServiceReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceFluent.java index dff12fef36..1edcd968da 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceFluent.java @@ -1,26 +1,115 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface ApiextensionsV1ServiceReferenceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class ApiextensionsV1ServiceReferenceFluent> extends BaseFluent{ + public ApiextensionsV1ServiceReferenceFluent() { + } + public ApiextensionsV1ServiceReferenceFluent(ApiextensionsV1ServiceReference instance) { + this.copyInstance(instance); + } + private String name; + private String namespace; + private String path; + private Integer port; + + protected void copyInstance(ApiextensionsV1ServiceReference instance) { + instance = (instance != null ? instance : new ApiextensionsV1ServiceReference()); + if (instance != null) { + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withPath(instance.getPath()); + this.withPort(instance.getPort()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + ApiextensionsV1ServiceReferenceFluent that = (ApiextensionsV1ServiceReferenceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, namespace, path, port, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (port != null) { sb.append("port:"); sb.append(port); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceFluentImpl.java deleted file mode 100644 index 1a4d239944..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class ApiextensionsV1ServiceReferenceFluentImpl> extends BaseFluent implements ApiextensionsV1ServiceReferenceFluent{ - public ApiextensionsV1ServiceReferenceFluentImpl() { - } - public ApiextensionsV1ServiceReferenceFluentImpl(ApiextensionsV1ServiceReference instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withPath(instance.getPath()); - this.withPort(instance.getPort()); - } - } - private String name; - private String namespace; - private String path; - private Integer port; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - ApiextensionsV1ServiceReferenceFluentImpl that = (ApiextensionsV1ServiceReferenceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, namespace, path, port, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (port != null) { sb.append("port:"); sb.append(port); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigBuilder.java index 50060f5019..a49e24858f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class ApiextensionsV1WebhookClientConfigBuilder extends ApiextensionsV1WebhookClientConfigFluentImpl implements VisitableBuilder{ +public class ApiextensionsV1WebhookClientConfigBuilder extends ApiextensionsV1WebhookClientConfigFluent implements VisitableBuilder{ public ApiextensionsV1WebhookClientConfigBuilder() { - this(false); - } - public ApiextensionsV1WebhookClientConfigBuilder(Boolean validationEnabled) { - this(new ApiextensionsV1WebhookClientConfig(), validationEnabled); + this(new ApiextensionsV1WebhookClientConfig()); } + public ApiextensionsV1WebhookClientConfigBuilder(ApiextensionsV1WebhookClientConfigFluent fluent) { - this(fluent, false); - } - public ApiextensionsV1WebhookClientConfigBuilder(ApiextensionsV1WebhookClientConfigFluent fluent,Boolean validationEnabled) { - this(fluent, new ApiextensionsV1WebhookClientConfig(), validationEnabled); + this(fluent, new ApiextensionsV1WebhookClientConfig()); } + public ApiextensionsV1WebhookClientConfigBuilder(ApiextensionsV1WebhookClientConfigFluent fluent,ApiextensionsV1WebhookClientConfig instance) { - this(fluent, instance, false); - } - public ApiextensionsV1WebhookClientConfigBuilder(ApiextensionsV1WebhookClientConfigFluent fluent,ApiextensionsV1WebhookClientConfig instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCaBundle(instance.getCaBundle()); - fluent.withService(instance.getService()); - fluent.withUrl(instance.getUrl()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public ApiextensionsV1WebhookClientConfigBuilder(ApiextensionsV1WebhookClientConfig instance) { - this(instance,false); - } - public ApiextensionsV1WebhookClientConfigBuilder(ApiextensionsV1WebhookClientConfig instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCaBundle(instance.getCaBundle()); - this.withService(instance.getService()); - this.withUrl(instance.getUrl()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } ApiextensionsV1WebhookClientConfigFluent fluent; - Boolean validationEnabled; + public ApiextensionsV1WebhookClientConfig build() { ApiextensionsV1WebhookClientConfig buildable = new ApiextensionsV1WebhookClientConfig(); buildable.setCaBundle(fluent.getCaBundle()); - buildable.setService(fluent.getService()); + buildable.setService(fluent.buildService()); buildable.setUrl(fluent.getUrl()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigFluent.java index 9c9644bb6e..9ac6fd8474 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigFluent.java @@ -1,50 +1,192 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; -import java.lang.Deprecated; import java.lang.Byte; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; -import java.lang.Boolean; +import java.lang.Object; +import java.util.List; - /** - * Generated - */ -public interface ApiextensionsV1WebhookClientConfigFluent> extends Fluent{ - public A withCaBundle(byte... caBundle); - public byte[] getCaBundle(); - public A addToCaBundle(int index,Byte item); - public A setToCaBundle(int index,Byte item); - public A addToCaBundle(java.lang.Byte... items); - public A addAllToCaBundle(Collection items); - public A removeFromCaBundle(java.lang.Byte... items); - public A removeAllFromCaBundle(Collection items); - public Boolean hasCaBundle(); - - /** - * This method has been deprecated, please use method buildService instead. - * @return The buildable object. - */ - @Deprecated - public ApiextensionsV1ServiceReference getService(); - public ApiextensionsV1ServiceReference buildService(); - public A withService(ApiextensionsV1ServiceReference service); - public Boolean hasService(); - public ApiextensionsV1WebhookClientConfigFluent.ServiceNested withNewService(); - public ApiextensionsV1WebhookClientConfigFluent.ServiceNested withNewServiceLike(ApiextensionsV1ServiceReference item); - public ApiextensionsV1WebhookClientConfigFluent.ServiceNested editService(); - public ApiextensionsV1WebhookClientConfigFluent.ServiceNested editOrNewService(); - public ApiextensionsV1WebhookClientConfigFluent.ServiceNested editOrNewServiceLike(ApiextensionsV1ServiceReference item); - public String getUrl(); - public A withUrl(String url); - public Boolean hasUrl(); - public interface ServiceNested extends Nested,ApiextensionsV1ServiceReferenceFluent>{ - public N and(); - public N endService(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class ApiextensionsV1WebhookClientConfigFluent> extends BaseFluent{ + public ApiextensionsV1WebhookClientConfigFluent() { + } + + public ApiextensionsV1WebhookClientConfigFluent(ApiextensionsV1WebhookClientConfig instance) { + this.copyInstance(instance); + } + private List caBundle; + private ApiextensionsV1ServiceReferenceBuilder service; + private String url; + + protected void copyInstance(ApiextensionsV1WebhookClientConfig instance) { + instance = (instance != null ? instance : new ApiextensionsV1WebhookClientConfig()); + if (instance != null) { + this.withCaBundle(instance.getCaBundle()); + this.withService(instance.getService()); + this.withUrl(instance.getUrl()); + } + } + + public A withCaBundle(byte... caBundle) { + if (this.caBundle != null) { + this.caBundle.clear(); + _visitables.remove("caBundle"); + } + if (caBundle != null) { + for (byte item : caBundle) { + this.addToCaBundle(item); + } + } + return (A) this; + } + + public byte[] getCaBundle() { + int size = caBundle != null ? caBundle.size() : 0;; + byte[] result = new byte[size];; + if (size == 0) { + return result; + } + int index = 0;; + for (byte item : caBundle) { + result[index++] = item; + } + return result; + } + + public A addToCaBundle(int index,Byte item) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + this.caBundle.add(index, item); + return (A)this; + } + + public A setToCaBundle(int index,Byte item) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + this.caBundle.set(index, item); return (A)this; + } + + public A addToCaBundle(java.lang.Byte... items) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + for (Byte item : items) {this.caBundle.add(item);} return (A)this; + } + + public A addAllToCaBundle(Collection items) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + for (Byte item : items) {this.caBundle.add(item);} return (A)this; + } + + public A removeFromCaBundle(java.lang.Byte... items) { + if (this.caBundle == null) return (A)this; + for (Byte item : items) { this.caBundle.remove(item);} return (A)this; + } + + public A removeAllFromCaBundle(Collection items) { + if (this.caBundle == null) return (A)this; + for (Byte item : items) { this.caBundle.remove(item);} return (A)this; + } + + public boolean hasCaBundle() { + return this.caBundle != null && !this.caBundle.isEmpty(); + } + + public ApiextensionsV1ServiceReference buildService() { + return this.service != null ? this.service.build() : null; + } + + public A withService(ApiextensionsV1ServiceReference service) { + this._visitables.remove("service"); + if (service != null) { + this.service = new ApiextensionsV1ServiceReferenceBuilder(service); + this._visitables.get("service").add(this.service); + } else { + this.service = null; + this._visitables.get("service").remove(this.service); + } + return (A) this; + } + + public boolean hasService() { + return this.service != null; + } + + public ServiceNested withNewService() { + return new ServiceNested(null); + } + + public ServiceNested withNewServiceLike(ApiextensionsV1ServiceReference item) { + return new ServiceNested(item); + } + + public ServiceNested editService() { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(null)); + } + + public ServiceNested editOrNewService() { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(new ApiextensionsV1ServiceReferenceBuilder().build())); + } + + public ServiceNested editOrNewServiceLike(ApiextensionsV1ServiceReference item) { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(item)); + } + + public String getUrl() { + return this.url; + } + + public A withUrl(String url) { + this.url = url; + return (A) this; + } + + public boolean hasUrl() { + return this.url != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + ApiextensionsV1WebhookClientConfigFluent that = (ApiextensionsV1WebhookClientConfigFluent) o; + if (!java.util.Objects.equals(caBundle, that.caBundle)) return false; + if (!java.util.Objects.equals(service, that.service)) return false; + if (!java.util.Objects.equals(url, that.url)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(caBundle, service, url, super.hashCode()); } + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (caBundle != null && !caBundle.isEmpty()) { sb.append("caBundle:"); sb.append(caBundle + ","); } + if (service != null) { sb.append("service:"); sb.append(service + ","); } + if (url != null) { sb.append("url:"); sb.append(url); } + sb.append("}"); + return sb.toString(); + } + public class ServiceNested extends ApiextensionsV1ServiceReferenceFluent> implements Nested{ + ServiceNested(ApiextensionsV1ServiceReference item) { + this.builder = new ApiextensionsV1ServiceReferenceBuilder(this, item); + } + ApiextensionsV1ServiceReferenceBuilder builder; + + public N and() { + return (N) ApiextensionsV1WebhookClientConfigFluent.this.withService(builder.build()); + } + + public N endService() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigFluentImpl.java deleted file mode 100644 index 2bb67e8712..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1WebhookClientConfigFluentImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.lang.Deprecated; -import java.lang.Byte; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class ApiextensionsV1WebhookClientConfigFluentImpl> extends BaseFluent implements ApiextensionsV1WebhookClientConfigFluent{ - public ApiextensionsV1WebhookClientConfigFluentImpl() { - } - public ApiextensionsV1WebhookClientConfigFluentImpl(ApiextensionsV1WebhookClientConfig instance) { - if (instance != null) { - this.withCaBundle(instance.getCaBundle()); - this.withService(instance.getService()); - this.withUrl(instance.getUrl()); - } - } - private List caBundle; - private ApiextensionsV1ServiceReferenceBuilder service; - private String url; - public A withCaBundle(byte... caBundle) { - if (this.caBundle != null) {this.caBundle.clear(); _visitables.remove("caBundle"); } - if (caBundle != null) {for (byte item :caBundle){ this.addToCaBundle(item);}} return (A) this; - } - public byte[] getCaBundle() { - //This needs to work with primitives, so we use arrays. -int size = caBundle != null ? caBundle.size() : 0; -byte[] result = new byte[size]; -if (size == 0) { - return result; -} -int index = 0; -for (byte item : caBundle) { - result[index++]=item; -} -return result; - - } - public A addToCaBundle(int index,Byte item) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - this.caBundle.add(index, item); - return (A)this; - } - public A setToCaBundle(int index,Byte item) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - this.caBundle.set(index, item); return (A)this; - } - public A addToCaBundle(java.lang.Byte... items) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - for (Byte item : items) {this.caBundle.add(item);} return (A)this; - } - public A addAllToCaBundle(Collection items) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - for (Byte item : items) {this.caBundle.add(item);} return (A)this; - } - public A removeFromCaBundle(java.lang.Byte... items) { - for (Byte item : items) {if (this.caBundle!= null){ this.caBundle.remove(item);}} return (A)this; - } - public A removeAllFromCaBundle(Collection items) { - for (Byte item : items) {if (this.caBundle!= null){ this.caBundle.remove(item);}} return (A)this; - } - public Boolean hasCaBundle() { - return caBundle != null && !caBundle.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildService instead. - * @return The buildable object. - */ - @Deprecated - public ApiextensionsV1ServiceReference getService() { - return this.service!=null ?this.service.build():null; - } - public ApiextensionsV1ServiceReference buildService() { - return this.service!=null ?this.service.build():null; - } - public A withService(ApiextensionsV1ServiceReference service) { - _visitables.get("service").remove(this.service); - if (service!=null){ this.service= new ApiextensionsV1ServiceReferenceBuilder(service); _visitables.get("service").add(this.service);} else { this.service = null; _visitables.get("service").remove(this.service); } return (A) this; - } - public Boolean hasService() { - return this.service != null; - } - public ApiextensionsV1WebhookClientConfigFluentImpl.ServiceNested withNewService() { - return new ApiextensionsV1WebhookClientConfigFluentImpl.ServiceNestedImpl(); - } - public ApiextensionsV1WebhookClientConfigFluentImpl.ServiceNested withNewServiceLike(ApiextensionsV1ServiceReference item) { - return new ApiextensionsV1WebhookClientConfigFluentImpl.ServiceNestedImpl(item); - } - public ApiextensionsV1WebhookClientConfigFluentImpl.ServiceNested editService() { - return withNewServiceLike(getService()); - } - public ApiextensionsV1WebhookClientConfigFluentImpl.ServiceNested editOrNewService() { - return withNewServiceLike(getService() != null ? getService(): new ApiextensionsV1ServiceReferenceBuilder().build()); - } - public ApiextensionsV1WebhookClientConfigFluentImpl.ServiceNested editOrNewServiceLike(ApiextensionsV1ServiceReference item) { - return withNewServiceLike(getService() != null ? getService(): item); - } - public String getUrl() { - return this.url; - } - public A withUrl(String url) { - this.url=url; return (A) this; - } - public Boolean hasUrl() { - return this.url != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - ApiextensionsV1WebhookClientConfigFluentImpl that = (ApiextensionsV1WebhookClientConfigFluentImpl) o; - if (!java.util.Objects.equals(caBundle, that.caBundle)) return false; - - if (!java.util.Objects.equals(service, that.service)) return false; - - if (!java.util.Objects.equals(url, that.url)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(caBundle, service, url, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (caBundle != null && !caBundle.isEmpty()) { sb.append("caBundle:"); sb.append(caBundle + ","); } - if (service != null) { sb.append("service:"); sb.append(service + ","); } - if (url != null) { sb.append("url:"); sb.append(url); } - sb.append("}"); - return sb.toString(); - } - class ServiceNestedImpl extends ApiextensionsV1ServiceReferenceFluentImpl> implements ApiextensionsV1WebhookClientConfigFluentImpl.ServiceNested,Nested{ - ServiceNestedImpl(ApiextensionsV1ServiceReference item) { - this.builder = new ApiextensionsV1ServiceReferenceBuilder(this, item); - } - ServiceNestedImpl() { - this.builder = new ApiextensionsV1ServiceReferenceBuilder(this); - } - ApiextensionsV1ServiceReferenceBuilder builder; - public N and() { - return (N) ApiextensionsV1WebhookClientConfigFluentImpl.this.withService(builder.build()); - } - public N endService() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceBuilder.java index d6583fe723..74490c67a7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class ApiregistrationV1ServiceReferenceBuilder extends ApiregistrationV1ServiceReferenceFluentImpl implements VisitableBuilder{ +public class ApiregistrationV1ServiceReferenceBuilder extends ApiregistrationV1ServiceReferenceFluent implements VisitableBuilder{ public ApiregistrationV1ServiceReferenceBuilder() { - this(false); - } - public ApiregistrationV1ServiceReferenceBuilder(Boolean validationEnabled) { - this(new ApiregistrationV1ServiceReference(), validationEnabled); + this(new ApiregistrationV1ServiceReference()); } + public ApiregistrationV1ServiceReferenceBuilder(ApiregistrationV1ServiceReferenceFluent fluent) { - this(fluent, false); - } - public ApiregistrationV1ServiceReferenceBuilder(ApiregistrationV1ServiceReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new ApiregistrationV1ServiceReference(), validationEnabled); + this(fluent, new ApiregistrationV1ServiceReference()); } + public ApiregistrationV1ServiceReferenceBuilder(ApiregistrationV1ServiceReferenceFluent fluent,ApiregistrationV1ServiceReference instance) { - this(fluent, instance, false); - } - public ApiregistrationV1ServiceReferenceBuilder(ApiregistrationV1ServiceReferenceFluent fluent,ApiregistrationV1ServiceReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - fluent.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public ApiregistrationV1ServiceReferenceBuilder(ApiregistrationV1ServiceReference instance) { - this(instance,false); - } - public ApiregistrationV1ServiceReferenceBuilder(ApiregistrationV1ServiceReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } ApiregistrationV1ServiceReferenceFluent fluent; - Boolean validationEnabled; + public ApiregistrationV1ServiceReference build() { ApiregistrationV1ServiceReference buildable = new ApiregistrationV1ServiceReference(); buildable.setName(fluent.getName()); @@ -49,4 +29,5 @@ public ApiregistrationV1ServiceReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceFluent.java index b1af7847c3..066259ab41 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceFluent.java @@ -1,23 +1,98 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface ApiregistrationV1ServiceReferenceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class ApiregistrationV1ServiceReferenceFluent> extends BaseFluent{ + public ApiregistrationV1ServiceReferenceFluent() { + } + public ApiregistrationV1ServiceReferenceFluent(ApiregistrationV1ServiceReference instance) { + this.copyInstance(instance); + } + private String name; + private String namespace; + private Integer port; + + protected void copyInstance(ApiregistrationV1ServiceReference instance) { + instance = (instance != null ? instance : new ApiregistrationV1ServiceReference()); + if (instance != null) { + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withPort(instance.getPort()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + ApiregistrationV1ServiceReferenceFluent that = (ApiregistrationV1ServiceReferenceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, namespace, port, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (port != null) { sb.append("port:"); sb.append(port); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceFluentImpl.java deleted file mode 100644 index ab8e6cf9cf..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/ApiregistrationV1ServiceReferenceFluentImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class ApiregistrationV1ServiceReferenceFluentImpl> extends BaseFluent implements ApiregistrationV1ServiceReferenceFluent{ - public ApiregistrationV1ServiceReferenceFluentImpl() { - } - public ApiregistrationV1ServiceReferenceFluentImpl(ApiregistrationV1ServiceReference instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withPort(instance.getPort()); - } - } - private String name; - private String namespace; - private Integer port; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - ApiregistrationV1ServiceReferenceFluentImpl that = (ApiregistrationV1ServiceReferenceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, namespace, port, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } - if (port != null) { sb.append("port:"); sb.append(port); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestBuilder.java index 02eb1e381c..c0595e25c9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class AuthenticationV1TokenRequestBuilder extends AuthenticationV1TokenRequestFluentImpl implements VisitableBuilder{ +public class AuthenticationV1TokenRequestBuilder extends AuthenticationV1TokenRequestFluent implements VisitableBuilder{ public AuthenticationV1TokenRequestBuilder() { - this(false); - } - public AuthenticationV1TokenRequestBuilder(Boolean validationEnabled) { - this(new AuthenticationV1TokenRequest(), validationEnabled); + this(new AuthenticationV1TokenRequest()); } + public AuthenticationV1TokenRequestBuilder(AuthenticationV1TokenRequestFluent fluent) { - this(fluent, false); - } - public AuthenticationV1TokenRequestBuilder(AuthenticationV1TokenRequestFluent fluent,Boolean validationEnabled) { - this(fluent, new AuthenticationV1TokenRequest(), validationEnabled); + this(fluent, new AuthenticationV1TokenRequest()); } + public AuthenticationV1TokenRequestBuilder(AuthenticationV1TokenRequestFluent fluent,AuthenticationV1TokenRequest instance) { - this(fluent, instance, false); - } - public AuthenticationV1TokenRequestBuilder(AuthenticationV1TokenRequestFluent fluent,AuthenticationV1TokenRequest instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public AuthenticationV1TokenRequestBuilder(AuthenticationV1TokenRequest instance) { - this(instance,false); - } - public AuthenticationV1TokenRequestBuilder(AuthenticationV1TokenRequest instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } AuthenticationV1TokenRequestFluent fluent; - Boolean validationEnabled; + public AuthenticationV1TokenRequest build() { AuthenticationV1TokenRequest buildable = new AuthenticationV1TokenRequest(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestFluent.java index d9a1d6fd85..d1a26bbc3b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface AuthenticationV1TokenRequestFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public AuthenticationV1TokenRequestFluent.MetadataNested withNewMetadata(); - public AuthenticationV1TokenRequestFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public AuthenticationV1TokenRequestFluent.MetadataNested editMetadata(); - public AuthenticationV1TokenRequestFluent.MetadataNested editOrNewMetadata(); - public AuthenticationV1TokenRequestFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1TokenRequestSpec getSpec(); - public V1TokenRequestSpec buildSpec(); - public A withSpec(V1TokenRequestSpec spec); - public Boolean hasSpec(); - public AuthenticationV1TokenRequestFluent.SpecNested withNewSpec(); - public AuthenticationV1TokenRequestFluent.SpecNested withNewSpecLike(V1TokenRequestSpec item); - public AuthenticationV1TokenRequestFluent.SpecNested editSpec(); - public AuthenticationV1TokenRequestFluent.SpecNested editOrNewSpec(); - public AuthenticationV1TokenRequestFluent.SpecNested editOrNewSpecLike(V1TokenRequestSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1TokenRequestStatus getStatus(); - public V1TokenRequestStatus buildStatus(); - public A withStatus(V1TokenRequestStatus status); - public Boolean hasStatus(); - public AuthenticationV1TokenRequestFluent.StatusNested withNewStatus(); - public AuthenticationV1TokenRequestFluent.StatusNested withNewStatusLike(V1TokenRequestStatus item); - public AuthenticationV1TokenRequestFluent.StatusNested editStatus(); - public AuthenticationV1TokenRequestFluent.StatusNested editOrNewStatus(); - public AuthenticationV1TokenRequestFluent.StatusNested editOrNewStatusLike(V1TokenRequestStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class AuthenticationV1TokenRequestFluent> extends BaseFluent{ + public AuthenticationV1TokenRequestFluent() { + } + + public AuthenticationV1TokenRequestFluent(AuthenticationV1TokenRequest instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1TokenRequestSpecBuilder spec; + private V1TokenRequestStatusBuilder status; + + protected void copyInstance(AuthenticationV1TokenRequest instance) { + instance = (instance != null ? instance : new AuthenticationV1TokenRequest()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1TokenRequestSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1TokenRequestSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1TokenRequestSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1TokenRequestSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1TokenRequestSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1TokenRequestSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1TokenRequestSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1TokenRequestStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1TokenRequestStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1TokenRequestStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1TokenRequestStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1TokenRequestStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1TokenRequestStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + AuthenticationV1TokenRequestFluent that = (AuthenticationV1TokenRequestFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) AuthenticationV1TokenRequestFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1TokenRequestStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1TokenRequestSpecFluent> implements Nested{ + SpecNested(V1TokenRequestSpec item) { + this.builder = new V1TokenRequestSpecBuilder(this, item); + } + V1TokenRequestSpecBuilder builder; + + public N and() { + return (N) AuthenticationV1TokenRequestFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1TokenRequestStatusFluent> implements Nested{ + StatusNested(V1TokenRequestStatus item) { + this.builder = new V1TokenRequestStatusBuilder(this, item); + } + V1TokenRequestStatusBuilder builder; + + public N and() { + return (N) AuthenticationV1TokenRequestFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestFluentImpl.java deleted file mode 100644 index 4152d58262..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/AuthenticationV1TokenRequestFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class AuthenticationV1TokenRequestFluentImpl> extends BaseFluent implements AuthenticationV1TokenRequestFluent{ - public AuthenticationV1TokenRequestFluentImpl() { - } - public AuthenticationV1TokenRequestFluentImpl(AuthenticationV1TokenRequest instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1TokenRequestSpecBuilder spec; - private V1TokenRequestStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public AuthenticationV1TokenRequestFluentImpl.MetadataNested withNewMetadata() { - return new AuthenticationV1TokenRequestFluentImpl.MetadataNestedImpl(); - } - public AuthenticationV1TokenRequestFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new AuthenticationV1TokenRequestFluentImpl.MetadataNestedImpl(item); - } - public AuthenticationV1TokenRequestFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public AuthenticationV1TokenRequestFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public AuthenticationV1TokenRequestFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1TokenRequestSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1TokenRequestSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1TokenRequestSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1TokenRequestSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public AuthenticationV1TokenRequestFluentImpl.SpecNested withNewSpec() { - return new AuthenticationV1TokenRequestFluentImpl.SpecNestedImpl(); - } - public AuthenticationV1TokenRequestFluentImpl.SpecNested withNewSpecLike(V1TokenRequestSpec item) { - return new AuthenticationV1TokenRequestFluentImpl.SpecNestedImpl(item); - } - public AuthenticationV1TokenRequestFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public AuthenticationV1TokenRequestFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1TokenRequestSpecBuilder().build()); - } - public AuthenticationV1TokenRequestFluentImpl.SpecNested editOrNewSpecLike(V1TokenRequestSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1TokenRequestStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1TokenRequestStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1TokenRequestStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1TokenRequestStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public AuthenticationV1TokenRequestFluentImpl.StatusNested withNewStatus() { - return new AuthenticationV1TokenRequestFluentImpl.StatusNestedImpl(); - } - public AuthenticationV1TokenRequestFluentImpl.StatusNested withNewStatusLike(V1TokenRequestStatus item) { - return new AuthenticationV1TokenRequestFluentImpl.StatusNestedImpl(item); - } - public AuthenticationV1TokenRequestFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public AuthenticationV1TokenRequestFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1TokenRequestStatusBuilder().build()); - } - public AuthenticationV1TokenRequestFluentImpl.StatusNested editOrNewStatusLike(V1TokenRequestStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - AuthenticationV1TokenRequestFluentImpl that = (AuthenticationV1TokenRequestFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements AuthenticationV1TokenRequestFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) AuthenticationV1TokenRequestFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1TokenRequestSpecFluentImpl> implements AuthenticationV1TokenRequestFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1TokenRequestSpec item) { - this.builder = new V1TokenRequestSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1TokenRequestSpecBuilder(this); - } - V1TokenRequestSpecBuilder builder; - public N and() { - return (N) AuthenticationV1TokenRequestFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1TokenRequestStatusFluentImpl> implements AuthenticationV1TokenRequestFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1TokenRequestStatus item) { - this.builder = new V1TokenRequestStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1TokenRequestStatusBuilder(this); - } - V1TokenRequestStatusBuilder builder; - public N and() { - return (N) AuthenticationV1TokenRequestFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortBuilder.java index 0bbd7a0df4..e1661163b0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class CoreV1EndpointPortBuilder extends CoreV1EndpointPortFluentImpl implements VisitableBuilder{ +public class CoreV1EndpointPortBuilder extends CoreV1EndpointPortFluent implements VisitableBuilder{ public CoreV1EndpointPortBuilder() { - this(false); - } - public CoreV1EndpointPortBuilder(Boolean validationEnabled) { - this(new CoreV1EndpointPort(), validationEnabled); + this(new CoreV1EndpointPort()); } + public CoreV1EndpointPortBuilder(CoreV1EndpointPortFluent fluent) { - this(fluent, false); - } - public CoreV1EndpointPortBuilder(CoreV1EndpointPortFluent fluent,Boolean validationEnabled) { - this(fluent, new CoreV1EndpointPort(), validationEnabled); + this(fluent, new CoreV1EndpointPort()); } + public CoreV1EndpointPortBuilder(CoreV1EndpointPortFluent fluent,CoreV1EndpointPort instance) { - this(fluent, instance, false); - } - public CoreV1EndpointPortBuilder(CoreV1EndpointPortFluent fluent,CoreV1EndpointPort instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAppProtocol(instance.getAppProtocol()); - fluent.withName(instance.getName()); - fluent.withPort(instance.getPort()); - fluent.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public CoreV1EndpointPortBuilder(CoreV1EndpointPort instance) { - this(instance,false); - } - public CoreV1EndpointPortBuilder(CoreV1EndpointPort instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAppProtocol(instance.getAppProtocol()); - this.withName(instance.getName()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } CoreV1EndpointPortFluent fluent; - Boolean validationEnabled; + public CoreV1EndpointPort build() { CoreV1EndpointPort buildable = new CoreV1EndpointPort(); buildable.setAppProtocol(fluent.getAppProtocol()); @@ -52,4 +30,5 @@ public CoreV1EndpointPort build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortFluent.java index 5bbb0f32cf..9c4214ea25 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortFluent.java @@ -1,26 +1,115 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface CoreV1EndpointPortFluent> extends Fluent{ - public String getAppProtocol(); - public A withAppProtocol(String appProtocol); - public Boolean hasAppProtocol(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); - public String getProtocol(); - public A withProtocol(String protocol); - public Boolean hasProtocol(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class CoreV1EndpointPortFluent> extends BaseFluent{ + public CoreV1EndpointPortFluent() { + } + public CoreV1EndpointPortFluent(CoreV1EndpointPort instance) { + this.copyInstance(instance); + } + private String appProtocol; + private String name; + private Integer port; + private String protocol; + + protected void copyInstance(CoreV1EndpointPort instance) { + instance = (instance != null ? instance : new CoreV1EndpointPort()); + if (instance != null) { + this.withAppProtocol(instance.getAppProtocol()); + this.withName(instance.getName()); + this.withPort(instance.getPort()); + this.withProtocol(instance.getProtocol()); + } + } + + public String getAppProtocol() { + return this.appProtocol; + } + + public A withAppProtocol(String appProtocol) { + this.appProtocol = appProtocol; + return (A) this; + } + + public boolean hasAppProtocol() { + return this.appProtocol != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public String getProtocol() { + return this.protocol; + } + + public A withProtocol(String protocol) { + this.protocol = protocol; + return (A) this; + } + + public boolean hasProtocol() { + return this.protocol != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + CoreV1EndpointPortFluent that = (CoreV1EndpointPortFluent) o; + if (!java.util.Objects.equals(appProtocol, that.appProtocol)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + if (!java.util.Objects.equals(protocol, that.protocol)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(appProtocol, name, port, protocol, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (appProtocol != null) { sb.append("appProtocol:"); sb.append(appProtocol + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (port != null) { sb.append("port:"); sb.append(port + ","); } + if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortFluentImpl.java deleted file mode 100644 index 652704ef38..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EndpointPortFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class CoreV1EndpointPortFluentImpl> extends BaseFluent implements CoreV1EndpointPortFluent{ - public CoreV1EndpointPortFluentImpl() { - } - public CoreV1EndpointPortFluentImpl(CoreV1EndpointPort instance) { - if (instance != null) { - this.withAppProtocol(instance.getAppProtocol()); - this.withName(instance.getName()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - } - private String appProtocol; - private String name; - private Integer port; - private String protocol; - public String getAppProtocol() { - return this.appProtocol; - } - public A withAppProtocol(String appProtocol) { - this.appProtocol=appProtocol; return (A) this; - } - public Boolean hasAppProtocol() { - return this.appProtocol != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public String getProtocol() { - return this.protocol; - } - public A withProtocol(String protocol) { - this.protocol=protocol; return (A) this; - } - public Boolean hasProtocol() { - return this.protocol != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - CoreV1EndpointPortFluentImpl that = (CoreV1EndpointPortFluentImpl) o; - if (!java.util.Objects.equals(appProtocol, that.appProtocol)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - if (!java.util.Objects.equals(protocol, that.protocol)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(appProtocol, name, port, protocol, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (appProtocol != null) { sb.append("appProtocol:"); sb.append(appProtocol + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (port != null) { sb.append("port:"); sb.append(port + ","); } - if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventBuilder.java index ccab70dcee..6def31bdb1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventBuilder.java @@ -1,74 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class CoreV1EventBuilder extends CoreV1EventFluentImpl implements VisitableBuilder{ +public class CoreV1EventBuilder extends CoreV1EventFluent implements VisitableBuilder{ public CoreV1EventBuilder() { - this(false); - } - public CoreV1EventBuilder(Boolean validationEnabled) { - this(new CoreV1Event(), validationEnabled); + this(new CoreV1Event()); } + public CoreV1EventBuilder(CoreV1EventFluent fluent) { - this(fluent, false); - } - public CoreV1EventBuilder(CoreV1EventFluent fluent,Boolean validationEnabled) { - this(fluent, new CoreV1Event(), validationEnabled); + this(fluent, new CoreV1Event()); } + public CoreV1EventBuilder(CoreV1EventFluent fluent,CoreV1Event instance) { - this(fluent, instance, false); - } - public CoreV1EventBuilder(CoreV1EventFluent fluent,CoreV1Event instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAction(instance.getAction()); - fluent.withApiVersion(instance.getApiVersion()); - fluent.withCount(instance.getCount()); - fluent.withEventTime(instance.getEventTime()); - fluent.withFirstTimestamp(instance.getFirstTimestamp()); - fluent.withInvolvedObject(instance.getInvolvedObject()); - fluent.withKind(instance.getKind()); - fluent.withLastTimestamp(instance.getLastTimestamp()); - fluent.withMessage(instance.getMessage()); - fluent.withMetadata(instance.getMetadata()); - fluent.withReason(instance.getReason()); - fluent.withRelated(instance.getRelated()); - fluent.withReportingComponent(instance.getReportingComponent()); - fluent.withReportingInstance(instance.getReportingInstance()); - fluent.withSeries(instance.getSeries()); - fluent.withSource(instance.getSource()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public CoreV1EventBuilder(CoreV1Event instance) { - this(instance,false); - } - public CoreV1EventBuilder(CoreV1Event instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAction(instance.getAction()); - this.withApiVersion(instance.getApiVersion()); - this.withCount(instance.getCount()); - this.withEventTime(instance.getEventTime()); - this.withFirstTimestamp(instance.getFirstTimestamp()); - this.withInvolvedObject(instance.getInvolvedObject()); - this.withKind(instance.getKind()); - this.withLastTimestamp(instance.getLastTimestamp()); - this.withMessage(instance.getMessage()); - this.withMetadata(instance.getMetadata()); - this.withReason(instance.getReason()); - this.withRelated(instance.getRelated()); - this.withReportingComponent(instance.getReportingComponent()); - this.withReportingInstance(instance.getReportingInstance()); - this.withSeries(instance.getSeries()); - this.withSource(instance.getSource()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } CoreV1EventFluent fluent; - Boolean validationEnabled; + public CoreV1Event build() { CoreV1Event buildable = new CoreV1Event(); buildable.setAction(fluent.getAction()); @@ -76,19 +28,20 @@ public CoreV1Event build() { buildable.setCount(fluent.getCount()); buildable.setEventTime(fluent.getEventTime()); buildable.setFirstTimestamp(fluent.getFirstTimestamp()); - buildable.setInvolvedObject(fluent.getInvolvedObject()); + buildable.setInvolvedObject(fluent.buildInvolvedObject()); buildable.setKind(fluent.getKind()); buildable.setLastTimestamp(fluent.getLastTimestamp()); buildable.setMessage(fluent.getMessage()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); buildable.setReason(fluent.getReason()); - buildable.setRelated(fluent.getRelated()); + buildable.setRelated(fluent.buildRelated()); buildable.setReportingComponent(fluent.getReportingComponent()); buildable.setReportingInstance(fluent.getReportingInstance()); - buildable.setSeries(fluent.getSeries()); - buildable.setSource(fluent.getSource()); + buildable.setSeries(fluent.buildSeries()); + buildable.setSource(fluent.buildSource()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventFluent.java index 9d580aaf33..080cd47540 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventFluent.java @@ -1,153 +1,552 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Integer; -import java.lang.Deprecated; import java.time.OffsetDateTime; -import java.lang.Boolean; +import java.lang.Object; - /** - * Generated - */ -public interface CoreV1EventFluent> extends Fluent{ - public String getAction(); - public A withAction(String action); - public Boolean hasAction(); - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public Integer getCount(); - public A withCount(Integer count); - public Boolean hasCount(); - public OffsetDateTime getEventTime(); - public A withEventTime(OffsetDateTime eventTime); - public Boolean hasEventTime(); - public OffsetDateTime getFirstTimestamp(); - public A withFirstTimestamp(OffsetDateTime firstTimestamp); - public Boolean hasFirstTimestamp(); - - /** - * This method has been deprecated, please use method buildInvolvedObject instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getInvolvedObject(); - public V1ObjectReference buildInvolvedObject(); - public A withInvolvedObject(V1ObjectReference involvedObject); - public Boolean hasInvolvedObject(); - public CoreV1EventFluent.InvolvedObjectNested withNewInvolvedObject(); - public CoreV1EventFluent.InvolvedObjectNested withNewInvolvedObjectLike(V1ObjectReference item); - public CoreV1EventFluent.InvolvedObjectNested editInvolvedObject(); - public CoreV1EventFluent.InvolvedObjectNested editOrNewInvolvedObject(); - public CoreV1EventFluent.InvolvedObjectNested editOrNewInvolvedObjectLike(V1ObjectReference item); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public OffsetDateTime getLastTimestamp(); - public A withLastTimestamp(OffsetDateTime lastTimestamp); - public Boolean hasLastTimestamp(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public CoreV1EventFluent.MetadataNested withNewMetadata(); - public CoreV1EventFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public CoreV1EventFluent.MetadataNested editMetadata(); - public CoreV1EventFluent.MetadataNested editOrNewMetadata(); - public CoreV1EventFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - - /** - * This method has been deprecated, please use method buildRelated instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getRelated(); - public V1ObjectReference buildRelated(); - public A withRelated(V1ObjectReference related); - public Boolean hasRelated(); - public CoreV1EventFluent.RelatedNested withNewRelated(); - public CoreV1EventFluent.RelatedNested withNewRelatedLike(V1ObjectReference item); - public CoreV1EventFluent.RelatedNested editRelated(); - public CoreV1EventFluent.RelatedNested editOrNewRelated(); - public CoreV1EventFluent.RelatedNested editOrNewRelatedLike(V1ObjectReference item); - public String getReportingComponent(); - public A withReportingComponent(String reportingComponent); - public Boolean hasReportingComponent(); - public String getReportingInstance(); - public A withReportingInstance(String reportingInstance); - public Boolean hasReportingInstance(); - - /** - * This method has been deprecated, please use method buildSeries instead. - * @return The buildable object. - */ - @Deprecated - public CoreV1EventSeries getSeries(); - public CoreV1EventSeries buildSeries(); - public A withSeries(CoreV1EventSeries series); - public Boolean hasSeries(); - public CoreV1EventFluent.SeriesNested withNewSeries(); - public CoreV1EventFluent.SeriesNested withNewSeriesLike(CoreV1EventSeries item); - public CoreV1EventFluent.SeriesNested editSeries(); - public CoreV1EventFluent.SeriesNested editOrNewSeries(); - public CoreV1EventFluent.SeriesNested editOrNewSeriesLike(CoreV1EventSeries item); - - /** - * This method has been deprecated, please use method buildSource instead. - * @return The buildable object. - */ - @Deprecated - public V1EventSource getSource(); - public V1EventSource buildSource(); - public A withSource(V1EventSource source); - public Boolean hasSource(); - public CoreV1EventFluent.SourceNested withNewSource(); - public CoreV1EventFluent.SourceNested withNewSourceLike(V1EventSource item); - public CoreV1EventFluent.SourceNested editSource(); - public CoreV1EventFluent.SourceNested editOrNewSource(); - public CoreV1EventFluent.SourceNested editOrNewSourceLike(V1EventSource item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface InvolvedObjectNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endInvolvedObject(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class CoreV1EventFluent> extends BaseFluent{ + public CoreV1EventFluent() { + } + + public CoreV1EventFluent(CoreV1Event instance) { + this.copyInstance(instance); + } + private String action; + private String apiVersion; + private Integer count; + private OffsetDateTime eventTime; + private OffsetDateTime firstTimestamp; + private V1ObjectReferenceBuilder involvedObject; + private String kind; + private OffsetDateTime lastTimestamp; + private String message; + private V1ObjectMetaBuilder metadata; + private String reason; + private V1ObjectReferenceBuilder related; + private String reportingComponent; + private String reportingInstance; + private CoreV1EventSeriesBuilder series; + private V1EventSourceBuilder source; + private String type; + + protected void copyInstance(CoreV1Event instance) { + instance = (instance != null ? instance : new CoreV1Event()); + if (instance != null) { + this.withAction(instance.getAction()); + this.withApiVersion(instance.getApiVersion()); + this.withCount(instance.getCount()); + this.withEventTime(instance.getEventTime()); + this.withFirstTimestamp(instance.getFirstTimestamp()); + this.withInvolvedObject(instance.getInvolvedObject()); + this.withKind(instance.getKind()); + this.withLastTimestamp(instance.getLastTimestamp()); + this.withMessage(instance.getMessage()); + this.withMetadata(instance.getMetadata()); + this.withReason(instance.getReason()); + this.withRelated(instance.getRelated()); + this.withReportingComponent(instance.getReportingComponent()); + this.withReportingInstance(instance.getReportingInstance()); + this.withSeries(instance.getSeries()); + this.withSource(instance.getSource()); + this.withType(instance.getType()); + } + } + + public String getAction() { + return this.action; + } + + public A withAction(String action) { + this.action = action; + return (A) this; + } + + public boolean hasAction() { + return this.action != null; + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public Integer getCount() { + return this.count; + } + + public A withCount(Integer count) { + this.count = count; + return (A) this; + } + + public boolean hasCount() { + return this.count != null; + } + + public OffsetDateTime getEventTime() { + return this.eventTime; + } + + public A withEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return (A) this; + } + + public boolean hasEventTime() { + return this.eventTime != null; + } + + public OffsetDateTime getFirstTimestamp() { + return this.firstTimestamp; + } + + public A withFirstTimestamp(OffsetDateTime firstTimestamp) { + this.firstTimestamp = firstTimestamp; + return (A) this; + } + + public boolean hasFirstTimestamp() { + return this.firstTimestamp != null; + } + + public V1ObjectReference buildInvolvedObject() { + return this.involvedObject != null ? this.involvedObject.build() : null; + } + + public A withInvolvedObject(V1ObjectReference involvedObject) { + this._visitables.remove("involvedObject"); + if (involvedObject != null) { + this.involvedObject = new V1ObjectReferenceBuilder(involvedObject); + this._visitables.get("involvedObject").add(this.involvedObject); + } else { + this.involvedObject = null; + this._visitables.get("involvedObject").remove(this.involvedObject); + } + return (A) this; + } + + public boolean hasInvolvedObject() { + return this.involvedObject != null; + } + + public InvolvedObjectNested withNewInvolvedObject() { + return new InvolvedObjectNested(null); + } + + public InvolvedObjectNested withNewInvolvedObjectLike(V1ObjectReference item) { + return new InvolvedObjectNested(item); + } + + public InvolvedObjectNested editInvolvedObject() { + return withNewInvolvedObjectLike(java.util.Optional.ofNullable(buildInvolvedObject()).orElse(null)); + } + + public InvolvedObjectNested editOrNewInvolvedObject() { + return withNewInvolvedObjectLike(java.util.Optional.ofNullable(buildInvolvedObject()).orElse(new V1ObjectReferenceBuilder().build())); + } + + public InvolvedObjectNested editOrNewInvolvedObjectLike(V1ObjectReference item) { + return withNewInvolvedObjectLike(java.util.Optional.ofNullable(buildInvolvedObject()).orElse(item)); + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public OffsetDateTime getLastTimestamp() { + return this.lastTimestamp; + } + + public A withLastTimestamp(OffsetDateTime lastTimestamp) { + this.lastTimestamp = lastTimestamp; + return (A) this; + } + + public boolean hasLastTimestamp() { + return this.lastTimestamp != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public V1ObjectReference buildRelated() { + return this.related != null ? this.related.build() : null; + } + + public A withRelated(V1ObjectReference related) { + this._visitables.remove("related"); + if (related != null) { + this.related = new V1ObjectReferenceBuilder(related); + this._visitables.get("related").add(this.related); + } else { + this.related = null; + this._visitables.get("related").remove(this.related); + } + return (A) this; + } + + public boolean hasRelated() { + return this.related != null; + } + + public RelatedNested withNewRelated() { + return new RelatedNested(null); + } + + public RelatedNested withNewRelatedLike(V1ObjectReference item) { + return new RelatedNested(item); + } + + public RelatedNested editRelated() { + return withNewRelatedLike(java.util.Optional.ofNullable(buildRelated()).orElse(null)); + } + + public RelatedNested editOrNewRelated() { + return withNewRelatedLike(java.util.Optional.ofNullable(buildRelated()).orElse(new V1ObjectReferenceBuilder().build())); + } + + public RelatedNested editOrNewRelatedLike(V1ObjectReference item) { + return withNewRelatedLike(java.util.Optional.ofNullable(buildRelated()).orElse(item)); + } + + public String getReportingComponent() { + return this.reportingComponent; + } + + public A withReportingComponent(String reportingComponent) { + this.reportingComponent = reportingComponent; + return (A) this; + } + + public boolean hasReportingComponent() { + return this.reportingComponent != null; + } + + public String getReportingInstance() { + return this.reportingInstance; + } + + public A withReportingInstance(String reportingInstance) { + this.reportingInstance = reportingInstance; + return (A) this; + } + + public boolean hasReportingInstance() { + return this.reportingInstance != null; + } + + public CoreV1EventSeries buildSeries() { + return this.series != null ? this.series.build() : null; + } + + public A withSeries(CoreV1EventSeries series) { + this._visitables.remove("series"); + if (series != null) { + this.series = new CoreV1EventSeriesBuilder(series); + this._visitables.get("series").add(this.series); + } else { + this.series = null; + this._visitables.get("series").remove(this.series); + } + return (A) this; + } + + public boolean hasSeries() { + return this.series != null; + } + + public SeriesNested withNewSeries() { + return new SeriesNested(null); + } + + public SeriesNested withNewSeriesLike(CoreV1EventSeries item) { + return new SeriesNested(item); + } + + public SeriesNested editSeries() { + return withNewSeriesLike(java.util.Optional.ofNullable(buildSeries()).orElse(null)); + } + + public SeriesNested editOrNewSeries() { + return withNewSeriesLike(java.util.Optional.ofNullable(buildSeries()).orElse(new CoreV1EventSeriesBuilder().build())); + } + + public SeriesNested editOrNewSeriesLike(CoreV1EventSeries item) { + return withNewSeriesLike(java.util.Optional.ofNullable(buildSeries()).orElse(item)); } - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); + + public V1EventSource buildSource() { + return this.source != null ? this.source.build() : null; + } + + public A withSource(V1EventSource source) { + this._visitables.remove("source"); + if (source != null) { + this.source = new V1EventSourceBuilder(source); + this._visitables.get("source").add(this.source); + } else { + this.source = null; + this._visitables.get("source").remove(this.source); + } + return (A) this; + } + + public boolean hasSource() { + return this.source != null; + } + + public SourceNested withNewSource() { + return new SourceNested(null); + } + + public SourceNested withNewSourceLike(V1EventSource item) { + return new SourceNested(item); + } + + public SourceNested editSource() { + return withNewSourceLike(java.util.Optional.ofNullable(buildSource()).orElse(null)); + } + + public SourceNested editOrNewSource() { + return withNewSourceLike(java.util.Optional.ofNullable(buildSource()).orElse(new V1EventSourceBuilder().build())); + } + + public SourceNested editOrNewSourceLike(V1EventSource item) { + return withNewSourceLike(java.util.Optional.ofNullable(buildSource()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + CoreV1EventFluent that = (CoreV1EventFluent) o; + if (!java.util.Objects.equals(action, that.action)) return false; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(count, that.count)) return false; + if (!java.util.Objects.equals(eventTime, that.eventTime)) return false; + if (!java.util.Objects.equals(firstTimestamp, that.firstTimestamp)) return false; + if (!java.util.Objects.equals(involvedObject, that.involvedObject)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(lastTimestamp, that.lastTimestamp)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(related, that.related)) return false; + if (!java.util.Objects.equals(reportingComponent, that.reportingComponent)) return false; + if (!java.util.Objects.equals(reportingInstance, that.reportingInstance)) return false; + if (!java.util.Objects.equals(series, that.series)) return false; + if (!java.util.Objects.equals(source, that.source)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(action, apiVersion, count, eventTime, firstTimestamp, involvedObject, kind, lastTimestamp, message, metadata, reason, related, reportingComponent, reportingInstance, series, source, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (action != null) { sb.append("action:"); sb.append(action + ","); } + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (count != null) { sb.append("count:"); sb.append(count + ","); } + if (eventTime != null) { sb.append("eventTime:"); sb.append(eventTime + ","); } + if (firstTimestamp != null) { sb.append("firstTimestamp:"); sb.append(firstTimestamp + ","); } + if (involvedObject != null) { sb.append("involvedObject:"); sb.append(involvedObject + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (lastTimestamp != null) { sb.append("lastTimestamp:"); sb.append(lastTimestamp + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (related != null) { sb.append("related:"); sb.append(related + ","); } + if (reportingComponent != null) { sb.append("reportingComponent:"); sb.append(reportingComponent + ","); } + if (reportingInstance != null) { sb.append("reportingInstance:"); sb.append(reportingInstance + ","); } + if (series != null) { sb.append("series:"); sb.append(series + ","); } + if (source != null) { sb.append("source:"); sb.append(source + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class InvolvedObjectNested extends V1ObjectReferenceFluent> implements Nested{ + InvolvedObjectNested(V1ObjectReference item) { + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + + public N and() { + return (N) CoreV1EventFluent.this.withInvolvedObject(builder.build()); + } + public N endInvolvedObject() { + return and(); + } + + } - public interface RelatedNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endRelated(); + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) CoreV1EventFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface SeriesNested extends Nested,CoreV1EventSeriesFluent>{ - public N and(); - public N endSeries(); + public class RelatedNested extends V1ObjectReferenceFluent> implements Nested{ + RelatedNested(V1ObjectReference item) { + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + public N and() { + return (N) CoreV1EventFluent.this.withRelated(builder.build()); + } + + public N endRelated() { + return and(); + } + + } - public interface SourceNested extends Nested,V1EventSourceFluent>{ - public N and(); - public N endSource(); + public class SeriesNested extends CoreV1EventSeriesFluent> implements Nested{ + SeriesNested(CoreV1EventSeries item) { + this.builder = new CoreV1EventSeriesBuilder(this, item); + } + CoreV1EventSeriesBuilder builder; + public N and() { + return (N) CoreV1EventFluent.this.withSeries(builder.build()); + } + + public N endSeries() { + return and(); + } + + } + public class SourceNested extends V1EventSourceFluent> implements Nested{ + SourceNested(V1EventSource item) { + this.builder = new V1EventSourceBuilder(this, item); + } + V1EventSourceBuilder builder; + + public N and() { + return (N) CoreV1EventFluent.this.withSource(builder.build()); + } + + public N endSource() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventFluentImpl.java deleted file mode 100644 index f9866e5238..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventFluentImpl.java +++ /dev/null @@ -1,484 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class CoreV1EventFluentImpl> extends BaseFluent implements CoreV1EventFluent{ - public CoreV1EventFluentImpl() { - } - public CoreV1EventFluentImpl(CoreV1Event instance) { - if (instance != null) { - this.withAction(instance.getAction()); - this.withApiVersion(instance.getApiVersion()); - this.withCount(instance.getCount()); - this.withEventTime(instance.getEventTime()); - this.withFirstTimestamp(instance.getFirstTimestamp()); - this.withInvolvedObject(instance.getInvolvedObject()); - this.withKind(instance.getKind()); - this.withLastTimestamp(instance.getLastTimestamp()); - this.withMessage(instance.getMessage()); - this.withMetadata(instance.getMetadata()); - this.withReason(instance.getReason()); - this.withRelated(instance.getRelated()); - this.withReportingComponent(instance.getReportingComponent()); - this.withReportingInstance(instance.getReportingInstance()); - this.withSeries(instance.getSeries()); - this.withSource(instance.getSource()); - this.withType(instance.getType()); - } - } - private String action; - private String apiVersion; - private Integer count; - private OffsetDateTime eventTime; - private OffsetDateTime firstTimestamp; - private V1ObjectReferenceBuilder involvedObject; - private String kind; - private OffsetDateTime lastTimestamp; - private String message; - private V1ObjectMetaBuilder metadata; - private String reason; - private V1ObjectReferenceBuilder related; - private String reportingComponent; - private String reportingInstance; - private CoreV1EventSeriesBuilder series; - private V1EventSourceBuilder source; - private String type; - public String getAction() { - return this.action; - } - public A withAction(String action) { - this.action=action; return (A) this; - } - public Boolean hasAction() { - return this.action != null; - } - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public Integer getCount() { - return this.count; - } - public A withCount(Integer count) { - this.count=count; return (A) this; - } - public Boolean hasCount() { - return this.count != null; - } - public OffsetDateTime getEventTime() { - return this.eventTime; - } - public A withEventTime(OffsetDateTime eventTime) { - this.eventTime=eventTime; return (A) this; - } - public Boolean hasEventTime() { - return this.eventTime != null; - } - public OffsetDateTime getFirstTimestamp() { - return this.firstTimestamp; - } - public A withFirstTimestamp(OffsetDateTime firstTimestamp) { - this.firstTimestamp=firstTimestamp; return (A) this; - } - public Boolean hasFirstTimestamp() { - return this.firstTimestamp != null; - } - - /** - * This method has been deprecated, please use method buildInvolvedObject instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getInvolvedObject() { - return this.involvedObject!=null ?this.involvedObject.build():null; - } - public V1ObjectReference buildInvolvedObject() { - return this.involvedObject!=null ?this.involvedObject.build():null; - } - public A withInvolvedObject(V1ObjectReference involvedObject) { - _visitables.get("involvedObject").remove(this.involvedObject); - if (involvedObject!=null){ this.involvedObject= new V1ObjectReferenceBuilder(involvedObject); _visitables.get("involvedObject").add(this.involvedObject);} else { this.involvedObject = null; _visitables.get("involvedObject").remove(this.involvedObject); } return (A) this; - } - public Boolean hasInvolvedObject() { - return this.involvedObject != null; - } - public CoreV1EventFluentImpl.InvolvedObjectNested withNewInvolvedObject() { - return new CoreV1EventFluentImpl.InvolvedObjectNestedImpl(); - } - public CoreV1EventFluentImpl.InvolvedObjectNested withNewInvolvedObjectLike(V1ObjectReference item) { - return new CoreV1EventFluentImpl.InvolvedObjectNestedImpl(item); - } - public CoreV1EventFluentImpl.InvolvedObjectNested editInvolvedObject() { - return withNewInvolvedObjectLike(getInvolvedObject()); - } - public CoreV1EventFluentImpl.InvolvedObjectNested editOrNewInvolvedObject() { - return withNewInvolvedObjectLike(getInvolvedObject() != null ? getInvolvedObject(): new V1ObjectReferenceBuilder().build()); - } - public CoreV1EventFluentImpl.InvolvedObjectNested editOrNewInvolvedObjectLike(V1ObjectReference item) { - return withNewInvolvedObjectLike(getInvolvedObject() != null ? getInvolvedObject(): item); - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public OffsetDateTime getLastTimestamp() { - return this.lastTimestamp; - } - public A withLastTimestamp(OffsetDateTime lastTimestamp) { - this.lastTimestamp=lastTimestamp; return (A) this; - } - public Boolean hasLastTimestamp() { - return this.lastTimestamp != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public CoreV1EventFluentImpl.MetadataNested withNewMetadata() { - return new CoreV1EventFluentImpl.MetadataNestedImpl(); - } - public CoreV1EventFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new CoreV1EventFluentImpl.MetadataNestedImpl(item); - } - public CoreV1EventFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public CoreV1EventFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public CoreV1EventFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - - /** - * This method has been deprecated, please use method buildRelated instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getRelated() { - return this.related!=null ?this.related.build():null; - } - public V1ObjectReference buildRelated() { - return this.related!=null ?this.related.build():null; - } - public A withRelated(V1ObjectReference related) { - _visitables.get("related").remove(this.related); - if (related!=null){ this.related= new V1ObjectReferenceBuilder(related); _visitables.get("related").add(this.related);} else { this.related = null; _visitables.get("related").remove(this.related); } return (A) this; - } - public Boolean hasRelated() { - return this.related != null; - } - public CoreV1EventFluentImpl.RelatedNested withNewRelated() { - return new CoreV1EventFluentImpl.RelatedNestedImpl(); - } - public CoreV1EventFluentImpl.RelatedNested withNewRelatedLike(V1ObjectReference item) { - return new CoreV1EventFluentImpl.RelatedNestedImpl(item); - } - public CoreV1EventFluentImpl.RelatedNested editRelated() { - return withNewRelatedLike(getRelated()); - } - public CoreV1EventFluentImpl.RelatedNested editOrNewRelated() { - return withNewRelatedLike(getRelated() != null ? getRelated(): new V1ObjectReferenceBuilder().build()); - } - public CoreV1EventFluentImpl.RelatedNested editOrNewRelatedLike(V1ObjectReference item) { - return withNewRelatedLike(getRelated() != null ? getRelated(): item); - } - public String getReportingComponent() { - return this.reportingComponent; - } - public A withReportingComponent(String reportingComponent) { - this.reportingComponent=reportingComponent; return (A) this; - } - public Boolean hasReportingComponent() { - return this.reportingComponent != null; - } - public String getReportingInstance() { - return this.reportingInstance; - } - public A withReportingInstance(String reportingInstance) { - this.reportingInstance=reportingInstance; return (A) this; - } - public Boolean hasReportingInstance() { - return this.reportingInstance != null; - } - - /** - * This method has been deprecated, please use method buildSeries instead. - * @return The buildable object. - */ - @Deprecated - public CoreV1EventSeries getSeries() { - return this.series!=null ?this.series.build():null; - } - public CoreV1EventSeries buildSeries() { - return this.series!=null ?this.series.build():null; - } - public A withSeries(CoreV1EventSeries series) { - _visitables.get("series").remove(this.series); - if (series!=null){ this.series= new CoreV1EventSeriesBuilder(series); _visitables.get("series").add(this.series);} else { this.series = null; _visitables.get("series").remove(this.series); } return (A) this; - } - public Boolean hasSeries() { - return this.series != null; - } - public CoreV1EventFluentImpl.SeriesNested withNewSeries() { - return new CoreV1EventFluentImpl.SeriesNestedImpl(); - } - public CoreV1EventFluentImpl.SeriesNested withNewSeriesLike(CoreV1EventSeries item) { - return new CoreV1EventFluentImpl.SeriesNestedImpl(item); - } - public CoreV1EventFluentImpl.SeriesNested editSeries() { - return withNewSeriesLike(getSeries()); - } - public CoreV1EventFluentImpl.SeriesNested editOrNewSeries() { - return withNewSeriesLike(getSeries() != null ? getSeries(): new CoreV1EventSeriesBuilder().build()); - } - public CoreV1EventFluentImpl.SeriesNested editOrNewSeriesLike(CoreV1EventSeries item) { - return withNewSeriesLike(getSeries() != null ? getSeries(): item); - } - - /** - * This method has been deprecated, please use method buildSource instead. - * @return The buildable object. - */ - @Deprecated - public V1EventSource getSource() { - return this.source!=null ?this.source.build():null; - } - public V1EventSource buildSource() { - return this.source!=null ?this.source.build():null; - } - public A withSource(V1EventSource source) { - _visitables.get("source").remove(this.source); - if (source!=null){ this.source= new V1EventSourceBuilder(source); _visitables.get("source").add(this.source);} else { this.source = null; _visitables.get("source").remove(this.source); } return (A) this; - } - public Boolean hasSource() { - return this.source != null; - } - public CoreV1EventFluentImpl.SourceNested withNewSource() { - return new CoreV1EventFluentImpl.SourceNestedImpl(); - } - public CoreV1EventFluentImpl.SourceNested withNewSourceLike(V1EventSource item) { - return new CoreV1EventFluentImpl.SourceNestedImpl(item); - } - public CoreV1EventFluentImpl.SourceNested editSource() { - return withNewSourceLike(getSource()); - } - public CoreV1EventFluentImpl.SourceNested editOrNewSource() { - return withNewSourceLike(getSource() != null ? getSource(): new V1EventSourceBuilder().build()); - } - public CoreV1EventFluentImpl.SourceNested editOrNewSourceLike(V1EventSource item) { - return withNewSourceLike(getSource() != null ? getSource(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - CoreV1EventFluentImpl that = (CoreV1EventFluentImpl) o; - if (!java.util.Objects.equals(action, that.action)) return false; - - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(count, that.count)) return false; - - if (!java.util.Objects.equals(eventTime, that.eventTime)) return false; - - if (!java.util.Objects.equals(firstTimestamp, that.firstTimestamp)) return false; - - if (!java.util.Objects.equals(involvedObject, that.involvedObject)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(lastTimestamp, that.lastTimestamp)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(related, that.related)) return false; - - if (!java.util.Objects.equals(reportingComponent, that.reportingComponent)) return false; - - if (!java.util.Objects.equals(reportingInstance, that.reportingInstance)) return false; - - if (!java.util.Objects.equals(series, that.series)) return false; - - if (!java.util.Objects.equals(source, that.source)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(action, apiVersion, count, eventTime, firstTimestamp, involvedObject, kind, lastTimestamp, message, metadata, reason, related, reportingComponent, reportingInstance, series, source, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (action != null) { sb.append("action:"); sb.append(action + ","); } - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (count != null) { sb.append("count:"); sb.append(count + ","); } - if (eventTime != null) { sb.append("eventTime:"); sb.append(eventTime + ","); } - if (firstTimestamp != null) { sb.append("firstTimestamp:"); sb.append(firstTimestamp + ","); } - if (involvedObject != null) { sb.append("involvedObject:"); sb.append(involvedObject + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (lastTimestamp != null) { sb.append("lastTimestamp:"); sb.append(lastTimestamp + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (related != null) { sb.append("related:"); sb.append(related + ","); } - if (reportingComponent != null) { sb.append("reportingComponent:"); sb.append(reportingComponent + ","); } - if (reportingInstance != null) { sb.append("reportingInstance:"); sb.append(reportingInstance + ","); } - if (series != null) { sb.append("series:"); sb.append(series + ","); } - if (source != null) { sb.append("source:"); sb.append(source + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class InvolvedObjectNestedImpl extends V1ObjectReferenceFluentImpl> implements CoreV1EventFluentImpl.InvolvedObjectNested,Nested{ - InvolvedObjectNestedImpl(V1ObjectReference item) { - this.builder = new V1ObjectReferenceBuilder(this, item); - } - InvolvedObjectNestedImpl() { - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - public N and() { - return (N) CoreV1EventFluentImpl.this.withInvolvedObject(builder.build()); - } - public N endInvolvedObject() { - return and(); - } - - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements CoreV1EventFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) CoreV1EventFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class RelatedNestedImpl extends V1ObjectReferenceFluentImpl> implements CoreV1EventFluentImpl.RelatedNested,Nested{ - RelatedNestedImpl(V1ObjectReference item) { - this.builder = new V1ObjectReferenceBuilder(this, item); - } - RelatedNestedImpl() { - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - public N and() { - return (N) CoreV1EventFluentImpl.this.withRelated(builder.build()); - } - public N endRelated() { - return and(); - } - - } - class SeriesNestedImpl extends CoreV1EventSeriesFluentImpl> implements CoreV1EventFluentImpl.SeriesNested,Nested{ - SeriesNestedImpl(CoreV1EventSeries item) { - this.builder = new CoreV1EventSeriesBuilder(this, item); - } - SeriesNestedImpl() { - this.builder = new CoreV1EventSeriesBuilder(this); - } - CoreV1EventSeriesBuilder builder; - public N and() { - return (N) CoreV1EventFluentImpl.this.withSeries(builder.build()); - } - public N endSeries() { - return and(); - } - - } - class SourceNestedImpl extends V1EventSourceFluentImpl> implements CoreV1EventFluentImpl.SourceNested,Nested{ - SourceNestedImpl(V1EventSource item) { - this.builder = new V1EventSourceBuilder(this, item); - } - SourceNestedImpl() { - this.builder = new V1EventSourceBuilder(this); - } - V1EventSourceBuilder builder; - public N and() { - return (N) CoreV1EventFluentImpl.this.withSource(builder.build()); - } - public N endSource() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListBuilder.java index ed5417a132..00a567cc7d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class CoreV1EventListBuilder extends CoreV1EventListFluentImpl implements VisitableBuilder{ +public class CoreV1EventListBuilder extends CoreV1EventListFluent implements VisitableBuilder{ public CoreV1EventListBuilder() { - this(false); - } - public CoreV1EventListBuilder(Boolean validationEnabled) { - this(new CoreV1EventList(), validationEnabled); + this(new CoreV1EventList()); } + public CoreV1EventListBuilder(CoreV1EventListFluent fluent) { - this(fluent, false); - } - public CoreV1EventListBuilder(CoreV1EventListFluent fluent,Boolean validationEnabled) { - this(fluent, new CoreV1EventList(), validationEnabled); + this(fluent, new CoreV1EventList()); } + public CoreV1EventListBuilder(CoreV1EventListFluent fluent,CoreV1EventList instance) { - this(fluent, instance, false); - } - public CoreV1EventListBuilder(CoreV1EventListFluent fluent,CoreV1EventList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public CoreV1EventListBuilder(CoreV1EventList instance) { - this(instance,false); - } - public CoreV1EventListBuilder(CoreV1EventList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } CoreV1EventListFluent fluent; - Boolean validationEnabled; + public CoreV1EventList build() { CoreV1EventList buildable = new CoreV1EventList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListFluent.java index 88075a3dc5..d99778674b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface CoreV1EventListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,CoreV1Event item); - public A setToItems(int index,CoreV1Event item); - public A addToItems(io.kubernetes.client.openapi.models.CoreV1Event... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.CoreV1Event... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public CoreV1Event buildItem(int index); - public CoreV1Event buildFirstItem(); - public CoreV1Event buildLastItem(); - public CoreV1Event buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.CoreV1Event... items); - public Boolean hasItems(); - public CoreV1EventListFluent.ItemsNested addNewItem(); - public CoreV1EventListFluent.ItemsNested addNewItemLike(CoreV1Event item); - public CoreV1EventListFluent.ItemsNested setNewItemLike(int index,CoreV1Event item); - public CoreV1EventListFluent.ItemsNested editItem(int index); - public CoreV1EventListFluent.ItemsNested editFirstItem(); - public CoreV1EventListFluent.ItemsNested editLastItem(); - public CoreV1EventListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public CoreV1EventListFluent.MetadataNested withNewMetadata(); - public CoreV1EventListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public CoreV1EventListFluent.MetadataNested editMetadata(); - public CoreV1EventListFluent.MetadataNested editOrNewMetadata(); - public CoreV1EventListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,CoreV1EventFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class CoreV1EventListFluent> extends BaseFluent{ + public CoreV1EventListFluent() { + } + + public CoreV1EventListFluent(CoreV1EventList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(CoreV1EventList instance) { + instance = (instance != null ? instance : new CoreV1EventList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,CoreV1Event item) { + if (this.items == null) {this.items = new ArrayList();} + CoreV1EventBuilder builder = new CoreV1EventBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,CoreV1Event item) { + if (this.items == null) {this.items = new ArrayList();} + CoreV1EventBuilder builder = new CoreV1EventBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.CoreV1Event... items) { + if (this.items == null) {this.items = new ArrayList();} + for (CoreV1Event item : items) {CoreV1EventBuilder builder = new CoreV1EventBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (CoreV1Event item : items) {CoreV1EventBuilder builder = new CoreV1EventBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.CoreV1Event... items) { + if (this.items == null) return (A)this; + for (CoreV1Event item : items) {CoreV1EventBuilder builder = new CoreV1EventBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (CoreV1Event item : items) {CoreV1EventBuilder builder = new CoreV1EventBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + CoreV1EventBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public CoreV1Event buildItem(int index) { + return this.items.get(index).build(); + } + + public CoreV1Event buildFirstItem() { + return this.items.get(0).build(); + } + + public CoreV1Event buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public CoreV1Event buildMatchingItem(Predicate predicate) { + for (CoreV1EventBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (CoreV1EventBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (CoreV1Event item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.CoreV1Event... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (CoreV1Event item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(CoreV1Event item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,CoreV1Event item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + CoreV1EventListFluent that = (CoreV1EventListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends CoreV1EventFluent> implements Nested{ + ItemsNested(int index,CoreV1Event item) { + this.index = index; + this.builder = new CoreV1EventBuilder(this, item); + } + CoreV1EventBuilder builder; + int index; + public N and() { + return (N) CoreV1EventListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) CoreV1EventListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListFluentImpl.java deleted file mode 100644 index 90f0e2d888..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class CoreV1EventListFluentImpl> extends BaseFluent implements CoreV1EventListFluent{ - public CoreV1EventListFluentImpl() { - } - public CoreV1EventListFluentImpl(CoreV1EventList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,CoreV1Event item) { - if (this.items == null) {this.items = new ArrayList();} - CoreV1EventBuilder builder = new CoreV1EventBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,CoreV1Event item) { - if (this.items == null) {this.items = new ArrayList();} - CoreV1EventBuilder builder = new CoreV1EventBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.CoreV1Event... items) { - if (this.items == null) {this.items = new ArrayList();} - for (CoreV1Event item : items) {CoreV1EventBuilder builder = new CoreV1EventBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (CoreV1Event item : items) {CoreV1EventBuilder builder = new CoreV1EventBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.CoreV1Event... items) { - for (CoreV1Event item : items) {CoreV1EventBuilder builder = new CoreV1EventBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (CoreV1Event item : items) {CoreV1EventBuilder builder = new CoreV1EventBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - CoreV1EventBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public CoreV1Event buildItem(int index) { - return this.items.get(index).build(); - } - public CoreV1Event buildFirstItem() { - return this.items.get(0).build(); - } - public CoreV1Event buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public CoreV1Event buildMatchingItem(Predicate predicate) { - for (CoreV1EventBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (CoreV1EventBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (CoreV1Event item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.CoreV1Event... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (CoreV1Event item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public CoreV1EventListFluentImpl.ItemsNested addNewItem() { - return new CoreV1EventListFluentImpl.ItemsNestedImpl(); - } - public CoreV1EventListFluentImpl.ItemsNested addNewItemLike(CoreV1Event item) { - return new CoreV1EventListFluentImpl.ItemsNestedImpl(-1, item); - } - public CoreV1EventListFluentImpl.ItemsNested setNewItemLike(int index,CoreV1Event item) { - return new CoreV1EventListFluentImpl.ItemsNestedImpl(index, item); - } - public CoreV1EventListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public CoreV1EventListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public CoreV1EventListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public CoreV1EventListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new CoreV1EventListFluentImpl.MetadataNestedImpl(); - } - public CoreV1EventListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new CoreV1EventListFluentImpl.MetadataNestedImpl(item); - } - public CoreV1EventListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public CoreV1EventListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public CoreV1EventListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - CoreV1EventListFluentImpl that = (CoreV1EventListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends CoreV1EventFluentImpl> implements CoreV1EventListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,CoreV1Event item) { - this.index = index; - this.builder = new CoreV1EventBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new CoreV1EventBuilder(this); - } - CoreV1EventBuilder builder; - int index; - public N and() { - return (N) CoreV1EventListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements CoreV1EventListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) CoreV1EventListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesBuilder.java index c74aa9e62d..63472fb6c0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class CoreV1EventSeriesBuilder extends CoreV1EventSeriesFluentImpl implements VisitableBuilder{ +public class CoreV1EventSeriesBuilder extends CoreV1EventSeriesFluent implements VisitableBuilder{ public CoreV1EventSeriesBuilder() { - this(false); - } - public CoreV1EventSeriesBuilder(Boolean validationEnabled) { - this(new CoreV1EventSeries(), validationEnabled); + this(new CoreV1EventSeries()); } + public CoreV1EventSeriesBuilder(CoreV1EventSeriesFluent fluent) { - this(fluent, false); - } - public CoreV1EventSeriesBuilder(CoreV1EventSeriesFluent fluent,Boolean validationEnabled) { - this(fluent, new CoreV1EventSeries(), validationEnabled); + this(fluent, new CoreV1EventSeries()); } + public CoreV1EventSeriesBuilder(CoreV1EventSeriesFluent fluent,CoreV1EventSeries instance) { - this(fluent, instance, false); - } - public CoreV1EventSeriesBuilder(CoreV1EventSeriesFluent fluent,CoreV1EventSeries instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCount(instance.getCount()); - fluent.withLastObservedTime(instance.getLastObservedTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public CoreV1EventSeriesBuilder(CoreV1EventSeries instance) { - this(instance,false); - } - public CoreV1EventSeriesBuilder(CoreV1EventSeries instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCount(instance.getCount()); - this.withLastObservedTime(instance.getLastObservedTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } CoreV1EventSeriesFluent fluent; - Boolean validationEnabled; + public CoreV1EventSeries build() { CoreV1EventSeries buildable = new CoreV1EventSeries(); buildable.setCount(fluent.getCount()); @@ -46,4 +28,5 @@ public CoreV1EventSeries build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesFluent.java index 5ac67f1b40..62557be302 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesFluent.java @@ -2,19 +2,81 @@ import java.lang.Integer; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface CoreV1EventSeriesFluent> extends Fluent{ - public Integer getCount(); - public A withCount(Integer count); - public Boolean hasCount(); - public OffsetDateTime getLastObservedTime(); - public A withLastObservedTime(OffsetDateTime lastObservedTime); - public Boolean hasLastObservedTime(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class CoreV1EventSeriesFluent> extends BaseFluent{ + public CoreV1EventSeriesFluent() { + } + public CoreV1EventSeriesFluent(CoreV1EventSeries instance) { + this.copyInstance(instance); + } + private Integer count; + private OffsetDateTime lastObservedTime; + + protected void copyInstance(CoreV1EventSeries instance) { + instance = (instance != null ? instance : new CoreV1EventSeries()); + if (instance != null) { + this.withCount(instance.getCount()); + this.withLastObservedTime(instance.getLastObservedTime()); + } + } + + public Integer getCount() { + return this.count; + } + + public A withCount(Integer count) { + this.count = count; + return (A) this; + } + + public boolean hasCount() { + return this.count != null; + } + + public OffsetDateTime getLastObservedTime() { + return this.lastObservedTime; + } + + public A withLastObservedTime(OffsetDateTime lastObservedTime) { + this.lastObservedTime = lastObservedTime; + return (A) this; + } + + public boolean hasLastObservedTime() { + return this.lastObservedTime != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + CoreV1EventSeriesFluent that = (CoreV1EventSeriesFluent) o; + if (!java.util.Objects.equals(count, that.count)) return false; + if (!java.util.Objects.equals(lastObservedTime, that.lastObservedTime)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(count, lastObservedTime, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (count != null) { sb.append("count:"); sb.append(count + ","); } + if (lastObservedTime != null) { sb.append("lastObservedTime:"); sb.append(lastObservedTime); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesFluentImpl.java deleted file mode 100644 index 3f5cdf2759..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/CoreV1EventSeriesFluentImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class CoreV1EventSeriesFluentImpl> extends BaseFluent implements CoreV1EventSeriesFluent{ - public CoreV1EventSeriesFluentImpl() { - } - public CoreV1EventSeriesFluentImpl(CoreV1EventSeries instance) { - if (instance != null) { - this.withCount(instance.getCount()); - this.withLastObservedTime(instance.getLastObservedTime()); - } - } - private Integer count; - private OffsetDateTime lastObservedTime; - public Integer getCount() { - return this.count; - } - public A withCount(Integer count) { - this.count=count; return (A) this; - } - public Boolean hasCount() { - return this.count != null; - } - public OffsetDateTime getLastObservedTime() { - return this.lastObservedTime; - } - public A withLastObservedTime(OffsetDateTime lastObservedTime) { - this.lastObservedTime=lastObservedTime; return (A) this; - } - public Boolean hasLastObservedTime() { - return this.lastObservedTime != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - CoreV1EventSeriesFluentImpl that = (CoreV1EventSeriesFluentImpl) o; - if (!java.util.Objects.equals(count, that.count)) return false; - - if (!java.util.Objects.equals(lastObservedTime, that.lastObservedTime)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(count, lastObservedTime, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (count != null) { sb.append("count:"); sb.append(count + ","); } - if (lastObservedTime != null) { sb.append("lastObservedTime:"); sb.append(lastObservedTime); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortBuilder.java index 109ed2203e..89534de2a1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class DiscoveryV1EndpointPortBuilder extends DiscoveryV1EndpointPortFluentImpl implements VisitableBuilder{ +public class DiscoveryV1EndpointPortBuilder extends DiscoveryV1EndpointPortFluent implements VisitableBuilder{ public DiscoveryV1EndpointPortBuilder() { - this(false); - } - public DiscoveryV1EndpointPortBuilder(Boolean validationEnabled) { - this(new DiscoveryV1EndpointPort(), validationEnabled); + this(new DiscoveryV1EndpointPort()); } + public DiscoveryV1EndpointPortBuilder(DiscoveryV1EndpointPortFluent fluent) { - this(fluent, false); - } - public DiscoveryV1EndpointPortBuilder(DiscoveryV1EndpointPortFluent fluent,Boolean validationEnabled) { - this(fluent, new DiscoveryV1EndpointPort(), validationEnabled); + this(fluent, new DiscoveryV1EndpointPort()); } + public DiscoveryV1EndpointPortBuilder(DiscoveryV1EndpointPortFluent fluent,DiscoveryV1EndpointPort instance) { - this(fluent, instance, false); - } - public DiscoveryV1EndpointPortBuilder(DiscoveryV1EndpointPortFluent fluent,DiscoveryV1EndpointPort instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAppProtocol(instance.getAppProtocol()); - fluent.withName(instance.getName()); - fluent.withPort(instance.getPort()); - fluent.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public DiscoveryV1EndpointPortBuilder(DiscoveryV1EndpointPort instance) { - this(instance,false); - } - public DiscoveryV1EndpointPortBuilder(DiscoveryV1EndpointPort instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAppProtocol(instance.getAppProtocol()); - this.withName(instance.getName()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } DiscoveryV1EndpointPortFluent fluent; - Boolean validationEnabled; + public DiscoveryV1EndpointPort build() { DiscoveryV1EndpointPort buildable = new DiscoveryV1EndpointPort(); buildable.setAppProtocol(fluent.getAppProtocol()); @@ -52,4 +30,5 @@ public DiscoveryV1EndpointPort build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortFluent.java index a83743f00b..38652a7d35 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortFluent.java @@ -1,26 +1,115 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface DiscoveryV1EndpointPortFluent> extends Fluent{ - public String getAppProtocol(); - public A withAppProtocol(String appProtocol); - public Boolean hasAppProtocol(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); - public String getProtocol(); - public A withProtocol(String protocol); - public Boolean hasProtocol(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class DiscoveryV1EndpointPortFluent> extends BaseFluent{ + public DiscoveryV1EndpointPortFluent() { + } + public DiscoveryV1EndpointPortFluent(DiscoveryV1EndpointPort instance) { + this.copyInstance(instance); + } + private String appProtocol; + private String name; + private Integer port; + private String protocol; + + protected void copyInstance(DiscoveryV1EndpointPort instance) { + instance = (instance != null ? instance : new DiscoveryV1EndpointPort()); + if (instance != null) { + this.withAppProtocol(instance.getAppProtocol()); + this.withName(instance.getName()); + this.withPort(instance.getPort()); + this.withProtocol(instance.getProtocol()); + } + } + + public String getAppProtocol() { + return this.appProtocol; + } + + public A withAppProtocol(String appProtocol) { + this.appProtocol = appProtocol; + return (A) this; + } + + public boolean hasAppProtocol() { + return this.appProtocol != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public String getProtocol() { + return this.protocol; + } + + public A withProtocol(String protocol) { + this.protocol = protocol; + return (A) this; + } + + public boolean hasProtocol() { + return this.protocol != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + DiscoveryV1EndpointPortFluent that = (DiscoveryV1EndpointPortFluent) o; + if (!java.util.Objects.equals(appProtocol, that.appProtocol)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + if (!java.util.Objects.equals(protocol, that.protocol)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(appProtocol, name, port, protocol, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (appProtocol != null) { sb.append("appProtocol:"); sb.append(appProtocol + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (port != null) { sb.append("port:"); sb.append(port + ","); } + if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortFluentImpl.java deleted file mode 100644 index 81d28e3fd2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/DiscoveryV1EndpointPortFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class DiscoveryV1EndpointPortFluentImpl> extends BaseFluent implements DiscoveryV1EndpointPortFluent{ - public DiscoveryV1EndpointPortFluentImpl() { - } - public DiscoveryV1EndpointPortFluentImpl(DiscoveryV1EndpointPort instance) { - if (instance != null) { - this.withAppProtocol(instance.getAppProtocol()); - this.withName(instance.getName()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - } - private String appProtocol; - private String name; - private Integer port; - private String protocol; - public String getAppProtocol() { - return this.appProtocol; - } - public A withAppProtocol(String appProtocol) { - this.appProtocol=appProtocol; return (A) this; - } - public Boolean hasAppProtocol() { - return this.appProtocol != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public String getProtocol() { - return this.protocol; - } - public A withProtocol(String protocol) { - this.protocol=protocol; return (A) this; - } - public Boolean hasProtocol() { - return this.protocol != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - DiscoveryV1EndpointPortFluentImpl that = (DiscoveryV1EndpointPortFluentImpl) o; - if (!java.util.Objects.equals(appProtocol, that.appProtocol)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - if (!java.util.Objects.equals(protocol, that.protocol)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(appProtocol, name, port, protocol, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (appProtocol != null) { sb.append("appProtocol:"); sb.append(appProtocol + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (port != null) { sb.append("port:"); sb.append(port + ","); } - if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventBuilder.java index f6d1b6f7fd..82c1140473 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventBuilder.java @@ -1,74 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class EventsV1EventBuilder extends EventsV1EventFluentImpl implements VisitableBuilder{ +public class EventsV1EventBuilder extends EventsV1EventFluent implements VisitableBuilder{ public EventsV1EventBuilder() { - this(false); - } - public EventsV1EventBuilder(Boolean validationEnabled) { - this(new EventsV1Event(), validationEnabled); + this(new EventsV1Event()); } + public EventsV1EventBuilder(EventsV1EventFluent fluent) { - this(fluent, false); - } - public EventsV1EventBuilder(EventsV1EventFluent fluent,Boolean validationEnabled) { - this(fluent, new EventsV1Event(), validationEnabled); + this(fluent, new EventsV1Event()); } + public EventsV1EventBuilder(EventsV1EventFluent fluent,EventsV1Event instance) { - this(fluent, instance, false); - } - public EventsV1EventBuilder(EventsV1EventFluent fluent,EventsV1Event instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAction(instance.getAction()); - fluent.withApiVersion(instance.getApiVersion()); - fluent.withDeprecatedCount(instance.getDeprecatedCount()); - fluent.withDeprecatedFirstTimestamp(instance.getDeprecatedFirstTimestamp()); - fluent.withDeprecatedLastTimestamp(instance.getDeprecatedLastTimestamp()); - fluent.withDeprecatedSource(instance.getDeprecatedSource()); - fluent.withEventTime(instance.getEventTime()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withNote(instance.getNote()); - fluent.withReason(instance.getReason()); - fluent.withRegarding(instance.getRegarding()); - fluent.withRelated(instance.getRelated()); - fluent.withReportingController(instance.getReportingController()); - fluent.withReportingInstance(instance.getReportingInstance()); - fluent.withSeries(instance.getSeries()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public EventsV1EventBuilder(EventsV1Event instance) { - this(instance,false); - } - public EventsV1EventBuilder(EventsV1Event instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAction(instance.getAction()); - this.withApiVersion(instance.getApiVersion()); - this.withDeprecatedCount(instance.getDeprecatedCount()); - this.withDeprecatedFirstTimestamp(instance.getDeprecatedFirstTimestamp()); - this.withDeprecatedLastTimestamp(instance.getDeprecatedLastTimestamp()); - this.withDeprecatedSource(instance.getDeprecatedSource()); - this.withEventTime(instance.getEventTime()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withNote(instance.getNote()); - this.withReason(instance.getReason()); - this.withRegarding(instance.getRegarding()); - this.withRelated(instance.getRelated()); - this.withReportingController(instance.getReportingController()); - this.withReportingInstance(instance.getReportingInstance()); - this.withSeries(instance.getSeries()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } EventsV1EventFluent fluent; - Boolean validationEnabled; + public EventsV1Event build() { EventsV1Event buildable = new EventsV1Event(); buildable.setAction(fluent.getAction()); @@ -76,19 +28,20 @@ public EventsV1Event build() { buildable.setDeprecatedCount(fluent.getDeprecatedCount()); buildable.setDeprecatedFirstTimestamp(fluent.getDeprecatedFirstTimestamp()); buildable.setDeprecatedLastTimestamp(fluent.getDeprecatedLastTimestamp()); - buildable.setDeprecatedSource(fluent.getDeprecatedSource()); + buildable.setDeprecatedSource(fluent.buildDeprecatedSource()); buildable.setEventTime(fluent.getEventTime()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); buildable.setNote(fluent.getNote()); buildable.setReason(fluent.getReason()); - buildable.setRegarding(fluent.getRegarding()); - buildable.setRelated(fluent.getRelated()); + buildable.setRegarding(fluent.buildRegarding()); + buildable.setRelated(fluent.buildRelated()); buildable.setReportingController(fluent.getReportingController()); buildable.setReportingInstance(fluent.getReportingInstance()); - buildable.setSeries(fluent.getSeries()); + buildable.setSeries(fluent.buildSeries()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventFluent.java index fb036685b2..9bcc496a81 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventFluent.java @@ -1,153 +1,552 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Integer; -import java.lang.Deprecated; import java.time.OffsetDateTime; -import java.lang.Boolean; +import java.lang.Object; - /** - * Generated - */ -public interface EventsV1EventFluent> extends Fluent{ - public String getAction(); - public A withAction(String action); - public Boolean hasAction(); - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public Integer getDeprecatedCount(); - public A withDeprecatedCount(Integer deprecatedCount); - public Boolean hasDeprecatedCount(); - public OffsetDateTime getDeprecatedFirstTimestamp(); - public A withDeprecatedFirstTimestamp(OffsetDateTime deprecatedFirstTimestamp); - public Boolean hasDeprecatedFirstTimestamp(); - public OffsetDateTime getDeprecatedLastTimestamp(); - public A withDeprecatedLastTimestamp(OffsetDateTime deprecatedLastTimestamp); - public Boolean hasDeprecatedLastTimestamp(); - - /** - * This method has been deprecated, please use method buildDeprecatedSource instead. - * @return The buildable object. - */ - @Deprecated - public V1EventSource getDeprecatedSource(); - public V1EventSource buildDeprecatedSource(); - public A withDeprecatedSource(V1EventSource deprecatedSource); - public Boolean hasDeprecatedSource(); - public EventsV1EventFluent.DeprecatedSourceNested withNewDeprecatedSource(); - public EventsV1EventFluent.DeprecatedSourceNested withNewDeprecatedSourceLike(V1EventSource item); - public EventsV1EventFluent.DeprecatedSourceNested editDeprecatedSource(); - public EventsV1EventFluent.DeprecatedSourceNested editOrNewDeprecatedSource(); - public EventsV1EventFluent.DeprecatedSourceNested editOrNewDeprecatedSourceLike(V1EventSource item); - public OffsetDateTime getEventTime(); - public A withEventTime(OffsetDateTime eventTime); - public Boolean hasEventTime(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public EventsV1EventFluent.MetadataNested withNewMetadata(); - public EventsV1EventFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public EventsV1EventFluent.MetadataNested editMetadata(); - public EventsV1EventFluent.MetadataNested editOrNewMetadata(); - public EventsV1EventFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public String getNote(); - public A withNote(String note); - public Boolean hasNote(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - - /** - * This method has been deprecated, please use method buildRegarding instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getRegarding(); - public V1ObjectReference buildRegarding(); - public A withRegarding(V1ObjectReference regarding); - public Boolean hasRegarding(); - public EventsV1EventFluent.RegardingNested withNewRegarding(); - public EventsV1EventFluent.RegardingNested withNewRegardingLike(V1ObjectReference item); - public EventsV1EventFluent.RegardingNested editRegarding(); - public EventsV1EventFluent.RegardingNested editOrNewRegarding(); - public EventsV1EventFluent.RegardingNested editOrNewRegardingLike(V1ObjectReference item); - - /** - * This method has been deprecated, please use method buildRelated instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getRelated(); - public V1ObjectReference buildRelated(); - public A withRelated(V1ObjectReference related); - public Boolean hasRelated(); - public EventsV1EventFluent.RelatedNested withNewRelated(); - public EventsV1EventFluent.RelatedNested withNewRelatedLike(V1ObjectReference item); - public EventsV1EventFluent.RelatedNested editRelated(); - public EventsV1EventFluent.RelatedNested editOrNewRelated(); - public EventsV1EventFluent.RelatedNested editOrNewRelatedLike(V1ObjectReference item); - public String getReportingController(); - public A withReportingController(String reportingController); - public Boolean hasReportingController(); - public String getReportingInstance(); - public A withReportingInstance(String reportingInstance); - public Boolean hasReportingInstance(); - - /** - * This method has been deprecated, please use method buildSeries instead. - * @return The buildable object. - */ - @Deprecated - public EventsV1EventSeries getSeries(); - public EventsV1EventSeries buildSeries(); - public A withSeries(EventsV1EventSeries series); - public Boolean hasSeries(); - public EventsV1EventFluent.SeriesNested withNewSeries(); - public EventsV1EventFluent.SeriesNested withNewSeriesLike(EventsV1EventSeries item); - public EventsV1EventFluent.SeriesNested editSeries(); - public EventsV1EventFluent.SeriesNested editOrNewSeries(); - public EventsV1EventFluent.SeriesNested editOrNewSeriesLike(EventsV1EventSeries item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface DeprecatedSourceNested extends Nested,V1EventSourceFluent>{ - public N and(); - public N endDeprecatedSource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class EventsV1EventFluent> extends BaseFluent{ + public EventsV1EventFluent() { + } + + public EventsV1EventFluent(EventsV1Event instance) { + this.copyInstance(instance); + } + private String action; + private String apiVersion; + private Integer deprecatedCount; + private OffsetDateTime deprecatedFirstTimestamp; + private OffsetDateTime deprecatedLastTimestamp; + private V1EventSourceBuilder deprecatedSource; + private OffsetDateTime eventTime; + private String kind; + private V1ObjectMetaBuilder metadata; + private String note; + private String reason; + private V1ObjectReferenceBuilder regarding; + private V1ObjectReferenceBuilder related; + private String reportingController; + private String reportingInstance; + private EventsV1EventSeriesBuilder series; + private String type; + + protected void copyInstance(EventsV1Event instance) { + instance = (instance != null ? instance : new EventsV1Event()); + if (instance != null) { + this.withAction(instance.getAction()); + this.withApiVersion(instance.getApiVersion()); + this.withDeprecatedCount(instance.getDeprecatedCount()); + this.withDeprecatedFirstTimestamp(instance.getDeprecatedFirstTimestamp()); + this.withDeprecatedLastTimestamp(instance.getDeprecatedLastTimestamp()); + this.withDeprecatedSource(instance.getDeprecatedSource()); + this.withEventTime(instance.getEventTime()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withNote(instance.getNote()); + this.withReason(instance.getReason()); + this.withRegarding(instance.getRegarding()); + this.withRelated(instance.getRelated()); + this.withReportingController(instance.getReportingController()); + this.withReportingInstance(instance.getReportingInstance()); + this.withSeries(instance.getSeries()); + this.withType(instance.getType()); + } + } + + public String getAction() { + return this.action; + } + + public A withAction(String action) { + this.action = action; + return (A) this; + } + + public boolean hasAction() { + return this.action != null; + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public Integer getDeprecatedCount() { + return this.deprecatedCount; + } + + public A withDeprecatedCount(Integer deprecatedCount) { + this.deprecatedCount = deprecatedCount; + return (A) this; + } + + public boolean hasDeprecatedCount() { + return this.deprecatedCount != null; + } + + public OffsetDateTime getDeprecatedFirstTimestamp() { + return this.deprecatedFirstTimestamp; + } + + public A withDeprecatedFirstTimestamp(OffsetDateTime deprecatedFirstTimestamp) { + this.deprecatedFirstTimestamp = deprecatedFirstTimestamp; + return (A) this; + } + + public boolean hasDeprecatedFirstTimestamp() { + return this.deprecatedFirstTimestamp != null; + } + + public OffsetDateTime getDeprecatedLastTimestamp() { + return this.deprecatedLastTimestamp; + } + + public A withDeprecatedLastTimestamp(OffsetDateTime deprecatedLastTimestamp) { + this.deprecatedLastTimestamp = deprecatedLastTimestamp; + return (A) this; + } + + public boolean hasDeprecatedLastTimestamp() { + return this.deprecatedLastTimestamp != null; + } + + public V1EventSource buildDeprecatedSource() { + return this.deprecatedSource != null ? this.deprecatedSource.build() : null; + } + + public A withDeprecatedSource(V1EventSource deprecatedSource) { + this._visitables.remove("deprecatedSource"); + if (deprecatedSource != null) { + this.deprecatedSource = new V1EventSourceBuilder(deprecatedSource); + this._visitables.get("deprecatedSource").add(this.deprecatedSource); + } else { + this.deprecatedSource = null; + this._visitables.get("deprecatedSource").remove(this.deprecatedSource); + } + return (A) this; + } + + public boolean hasDeprecatedSource() { + return this.deprecatedSource != null; + } + + public DeprecatedSourceNested withNewDeprecatedSource() { + return new DeprecatedSourceNested(null); + } + + public DeprecatedSourceNested withNewDeprecatedSourceLike(V1EventSource item) { + return new DeprecatedSourceNested(item); + } + + public DeprecatedSourceNested editDeprecatedSource() { + return withNewDeprecatedSourceLike(java.util.Optional.ofNullable(buildDeprecatedSource()).orElse(null)); + } + + public DeprecatedSourceNested editOrNewDeprecatedSource() { + return withNewDeprecatedSourceLike(java.util.Optional.ofNullable(buildDeprecatedSource()).orElse(new V1EventSourceBuilder().build())); + } + + public DeprecatedSourceNested editOrNewDeprecatedSourceLike(V1EventSource item) { + return withNewDeprecatedSourceLike(java.util.Optional.ofNullable(buildDeprecatedSource()).orElse(item)); + } + + public OffsetDateTime getEventTime() { + return this.eventTime; + } + + public A withEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return (A) this; + } + + public boolean hasEventTime() { + return this.eventTime != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public String getNote() { + return this.note; + } + + public A withNote(String note) { + this.note = note; + return (A) this; + } + + public boolean hasNote() { + return this.note != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public V1ObjectReference buildRegarding() { + return this.regarding != null ? this.regarding.build() : null; + } + + public A withRegarding(V1ObjectReference regarding) { + this._visitables.remove("regarding"); + if (regarding != null) { + this.regarding = new V1ObjectReferenceBuilder(regarding); + this._visitables.get("regarding").add(this.regarding); + } else { + this.regarding = null; + this._visitables.get("regarding").remove(this.regarding); + } + return (A) this; + } + + public boolean hasRegarding() { + return this.regarding != null; + } + + public RegardingNested withNewRegarding() { + return new RegardingNested(null); + } + + public RegardingNested withNewRegardingLike(V1ObjectReference item) { + return new RegardingNested(item); + } + + public RegardingNested editRegarding() { + return withNewRegardingLike(java.util.Optional.ofNullable(buildRegarding()).orElse(null)); + } + + public RegardingNested editOrNewRegarding() { + return withNewRegardingLike(java.util.Optional.ofNullable(buildRegarding()).orElse(new V1ObjectReferenceBuilder().build())); + } + + public RegardingNested editOrNewRegardingLike(V1ObjectReference item) { + return withNewRegardingLike(java.util.Optional.ofNullable(buildRegarding()).orElse(item)); + } + + public V1ObjectReference buildRelated() { + return this.related != null ? this.related.build() : null; + } + + public A withRelated(V1ObjectReference related) { + this._visitables.remove("related"); + if (related != null) { + this.related = new V1ObjectReferenceBuilder(related); + this._visitables.get("related").add(this.related); + } else { + this.related = null; + this._visitables.get("related").remove(this.related); + } + return (A) this; + } + + public boolean hasRelated() { + return this.related != null; + } + + public RelatedNested withNewRelated() { + return new RelatedNested(null); + } + + public RelatedNested withNewRelatedLike(V1ObjectReference item) { + return new RelatedNested(item); + } + + public RelatedNested editRelated() { + return withNewRelatedLike(java.util.Optional.ofNullable(buildRelated()).orElse(null)); + } + + public RelatedNested editOrNewRelated() { + return withNewRelatedLike(java.util.Optional.ofNullable(buildRelated()).orElse(new V1ObjectReferenceBuilder().build())); + } + + public RelatedNested editOrNewRelatedLike(V1ObjectReference item) { + return withNewRelatedLike(java.util.Optional.ofNullable(buildRelated()).orElse(item)); + } + + public String getReportingController() { + return this.reportingController; + } + + public A withReportingController(String reportingController) { + this.reportingController = reportingController; + return (A) this; + } + + public boolean hasReportingController() { + return this.reportingController != null; + } + + public String getReportingInstance() { + return this.reportingInstance; + } + + public A withReportingInstance(String reportingInstance) { + this.reportingInstance = reportingInstance; + return (A) this; + } + + public boolean hasReportingInstance() { + return this.reportingInstance != null; } - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); + + public EventsV1EventSeries buildSeries() { + return this.series != null ? this.series.build() : null; + } + + public A withSeries(EventsV1EventSeries series) { + this._visitables.remove("series"); + if (series != null) { + this.series = new EventsV1EventSeriesBuilder(series); + this._visitables.get("series").add(this.series); + } else { + this.series = null; + this._visitables.get("series").remove(this.series); + } + return (A) this; + } + + public boolean hasSeries() { + return this.series != null; + } + + public SeriesNested withNewSeries() { + return new SeriesNested(null); + } + + public SeriesNested withNewSeriesLike(EventsV1EventSeries item) { + return new SeriesNested(item); + } + + public SeriesNested editSeries() { + return withNewSeriesLike(java.util.Optional.ofNullable(buildSeries()).orElse(null)); + } + + public SeriesNested editOrNewSeries() { + return withNewSeriesLike(java.util.Optional.ofNullable(buildSeries()).orElse(new EventsV1EventSeriesBuilder().build())); + } + + public SeriesNested editOrNewSeriesLike(EventsV1EventSeries item) { + return withNewSeriesLike(java.util.Optional.ofNullable(buildSeries()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + EventsV1EventFluent that = (EventsV1EventFluent) o; + if (!java.util.Objects.equals(action, that.action)) return false; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(deprecatedCount, that.deprecatedCount)) return false; + if (!java.util.Objects.equals(deprecatedFirstTimestamp, that.deprecatedFirstTimestamp)) return false; + if (!java.util.Objects.equals(deprecatedLastTimestamp, that.deprecatedLastTimestamp)) return false; + if (!java.util.Objects.equals(deprecatedSource, that.deprecatedSource)) return false; + if (!java.util.Objects.equals(eventTime, that.eventTime)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(note, that.note)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(regarding, that.regarding)) return false; + if (!java.util.Objects.equals(related, that.related)) return false; + if (!java.util.Objects.equals(reportingController, that.reportingController)) return false; + if (!java.util.Objects.equals(reportingInstance, that.reportingInstance)) return false; + if (!java.util.Objects.equals(series, that.series)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(action, apiVersion, deprecatedCount, deprecatedFirstTimestamp, deprecatedLastTimestamp, deprecatedSource, eventTime, kind, metadata, note, reason, regarding, related, reportingController, reportingInstance, series, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (action != null) { sb.append("action:"); sb.append(action + ","); } + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (deprecatedCount != null) { sb.append("deprecatedCount:"); sb.append(deprecatedCount + ","); } + if (deprecatedFirstTimestamp != null) { sb.append("deprecatedFirstTimestamp:"); sb.append(deprecatedFirstTimestamp + ","); } + if (deprecatedLastTimestamp != null) { sb.append("deprecatedLastTimestamp:"); sb.append(deprecatedLastTimestamp + ","); } + if (deprecatedSource != null) { sb.append("deprecatedSource:"); sb.append(deprecatedSource + ","); } + if (eventTime != null) { sb.append("eventTime:"); sb.append(eventTime + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (note != null) { sb.append("note:"); sb.append(note + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (regarding != null) { sb.append("regarding:"); sb.append(regarding + ","); } + if (related != null) { sb.append("related:"); sb.append(related + ","); } + if (reportingController != null) { sb.append("reportingController:"); sb.append(reportingController + ","); } + if (reportingInstance != null) { sb.append("reportingInstance:"); sb.append(reportingInstance + ","); } + if (series != null) { sb.append("series:"); sb.append(series + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class DeprecatedSourceNested extends V1EventSourceFluent> implements Nested{ + DeprecatedSourceNested(V1EventSource item) { + this.builder = new V1EventSourceBuilder(this, item); + } + V1EventSourceBuilder builder; + + public N and() { + return (N) EventsV1EventFluent.this.withDeprecatedSource(builder.build()); + } + public N endDeprecatedSource() { + return and(); + } + + } - public interface RegardingNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endRegarding(); + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) EventsV1EventFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface RelatedNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endRelated(); + public class RegardingNested extends V1ObjectReferenceFluent> implements Nested{ + RegardingNested(V1ObjectReference item) { + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + public N and() { + return (N) EventsV1EventFluent.this.withRegarding(builder.build()); + } + + public N endRegarding() { + return and(); + } + + } - public interface SeriesNested extends Nested,EventsV1EventSeriesFluent>{ - public N and(); - public N endSeries(); + public class RelatedNested extends V1ObjectReferenceFluent> implements Nested{ + RelatedNested(V1ObjectReference item) { + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + public N and() { + return (N) EventsV1EventFluent.this.withRelated(builder.build()); + } + + public N endRelated() { + return and(); + } + + } + public class SeriesNested extends EventsV1EventSeriesFluent> implements Nested{ + SeriesNested(EventsV1EventSeries item) { + this.builder = new EventsV1EventSeriesBuilder(this, item); + } + EventsV1EventSeriesBuilder builder; + + public N and() { + return (N) EventsV1EventFluent.this.withSeries(builder.build()); + } + + public N endSeries() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventFluentImpl.java deleted file mode 100644 index 3cb7af4f95..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventFluentImpl.java +++ /dev/null @@ -1,484 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class EventsV1EventFluentImpl> extends BaseFluent implements EventsV1EventFluent{ - public EventsV1EventFluentImpl() { - } - public EventsV1EventFluentImpl(EventsV1Event instance) { - if (instance != null) { - this.withAction(instance.getAction()); - this.withApiVersion(instance.getApiVersion()); - this.withDeprecatedCount(instance.getDeprecatedCount()); - this.withDeprecatedFirstTimestamp(instance.getDeprecatedFirstTimestamp()); - this.withDeprecatedLastTimestamp(instance.getDeprecatedLastTimestamp()); - this.withDeprecatedSource(instance.getDeprecatedSource()); - this.withEventTime(instance.getEventTime()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withNote(instance.getNote()); - this.withReason(instance.getReason()); - this.withRegarding(instance.getRegarding()); - this.withRelated(instance.getRelated()); - this.withReportingController(instance.getReportingController()); - this.withReportingInstance(instance.getReportingInstance()); - this.withSeries(instance.getSeries()); - this.withType(instance.getType()); - } - } - private String action; - private String apiVersion; - private Integer deprecatedCount; - private OffsetDateTime deprecatedFirstTimestamp; - private OffsetDateTime deprecatedLastTimestamp; - private V1EventSourceBuilder deprecatedSource; - private OffsetDateTime eventTime; - private String kind; - private V1ObjectMetaBuilder metadata; - private String note; - private String reason; - private V1ObjectReferenceBuilder regarding; - private V1ObjectReferenceBuilder related; - private String reportingController; - private String reportingInstance; - private EventsV1EventSeriesBuilder series; - private String type; - public String getAction() { - return this.action; - } - public A withAction(String action) { - this.action=action; return (A) this; - } - public Boolean hasAction() { - return this.action != null; - } - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public Integer getDeprecatedCount() { - return this.deprecatedCount; - } - public A withDeprecatedCount(Integer deprecatedCount) { - this.deprecatedCount=deprecatedCount; return (A) this; - } - public Boolean hasDeprecatedCount() { - return this.deprecatedCount != null; - } - public OffsetDateTime getDeprecatedFirstTimestamp() { - return this.deprecatedFirstTimestamp; - } - public A withDeprecatedFirstTimestamp(OffsetDateTime deprecatedFirstTimestamp) { - this.deprecatedFirstTimestamp=deprecatedFirstTimestamp; return (A) this; - } - public Boolean hasDeprecatedFirstTimestamp() { - return this.deprecatedFirstTimestamp != null; - } - public OffsetDateTime getDeprecatedLastTimestamp() { - return this.deprecatedLastTimestamp; - } - public A withDeprecatedLastTimestamp(OffsetDateTime deprecatedLastTimestamp) { - this.deprecatedLastTimestamp=deprecatedLastTimestamp; return (A) this; - } - public Boolean hasDeprecatedLastTimestamp() { - return this.deprecatedLastTimestamp != null; - } - - /** - * This method has been deprecated, please use method buildDeprecatedSource instead. - * @return The buildable object. - */ - @Deprecated - public V1EventSource getDeprecatedSource() { - return this.deprecatedSource!=null ?this.deprecatedSource.build():null; - } - public V1EventSource buildDeprecatedSource() { - return this.deprecatedSource!=null ?this.deprecatedSource.build():null; - } - public A withDeprecatedSource(V1EventSource deprecatedSource) { - _visitables.get("deprecatedSource").remove(this.deprecatedSource); - if (deprecatedSource!=null){ this.deprecatedSource= new V1EventSourceBuilder(deprecatedSource); _visitables.get("deprecatedSource").add(this.deprecatedSource);} else { this.deprecatedSource = null; _visitables.get("deprecatedSource").remove(this.deprecatedSource); } return (A) this; - } - public Boolean hasDeprecatedSource() { - return this.deprecatedSource != null; - } - public EventsV1EventFluentImpl.DeprecatedSourceNested withNewDeprecatedSource() { - return new EventsV1EventFluentImpl.DeprecatedSourceNestedImpl(); - } - public EventsV1EventFluentImpl.DeprecatedSourceNested withNewDeprecatedSourceLike(V1EventSource item) { - return new EventsV1EventFluentImpl.DeprecatedSourceNestedImpl(item); - } - public EventsV1EventFluentImpl.DeprecatedSourceNested editDeprecatedSource() { - return withNewDeprecatedSourceLike(getDeprecatedSource()); - } - public EventsV1EventFluentImpl.DeprecatedSourceNested editOrNewDeprecatedSource() { - return withNewDeprecatedSourceLike(getDeprecatedSource() != null ? getDeprecatedSource(): new V1EventSourceBuilder().build()); - } - public EventsV1EventFluentImpl.DeprecatedSourceNested editOrNewDeprecatedSourceLike(V1EventSource item) { - return withNewDeprecatedSourceLike(getDeprecatedSource() != null ? getDeprecatedSource(): item); - } - public OffsetDateTime getEventTime() { - return this.eventTime; - } - public A withEventTime(OffsetDateTime eventTime) { - this.eventTime=eventTime; return (A) this; - } - public Boolean hasEventTime() { - return this.eventTime != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public EventsV1EventFluentImpl.MetadataNested withNewMetadata() { - return new EventsV1EventFluentImpl.MetadataNestedImpl(); - } - public EventsV1EventFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new EventsV1EventFluentImpl.MetadataNestedImpl(item); - } - public EventsV1EventFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public EventsV1EventFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public EventsV1EventFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public String getNote() { - return this.note; - } - public A withNote(String note) { - this.note=note; return (A) this; - } - public Boolean hasNote() { - return this.note != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - - /** - * This method has been deprecated, please use method buildRegarding instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getRegarding() { - return this.regarding!=null ?this.regarding.build():null; - } - public V1ObjectReference buildRegarding() { - return this.regarding!=null ?this.regarding.build():null; - } - public A withRegarding(V1ObjectReference regarding) { - _visitables.get("regarding").remove(this.regarding); - if (regarding!=null){ this.regarding= new V1ObjectReferenceBuilder(regarding); _visitables.get("regarding").add(this.regarding);} else { this.regarding = null; _visitables.get("regarding").remove(this.regarding); } return (A) this; - } - public Boolean hasRegarding() { - return this.regarding != null; - } - public EventsV1EventFluentImpl.RegardingNested withNewRegarding() { - return new EventsV1EventFluentImpl.RegardingNestedImpl(); - } - public EventsV1EventFluentImpl.RegardingNested withNewRegardingLike(V1ObjectReference item) { - return new EventsV1EventFluentImpl.RegardingNestedImpl(item); - } - public EventsV1EventFluentImpl.RegardingNested editRegarding() { - return withNewRegardingLike(getRegarding()); - } - public EventsV1EventFluentImpl.RegardingNested editOrNewRegarding() { - return withNewRegardingLike(getRegarding() != null ? getRegarding(): new V1ObjectReferenceBuilder().build()); - } - public EventsV1EventFluentImpl.RegardingNested editOrNewRegardingLike(V1ObjectReference item) { - return withNewRegardingLike(getRegarding() != null ? getRegarding(): item); - } - - /** - * This method has been deprecated, please use method buildRelated instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getRelated() { - return this.related!=null ?this.related.build():null; - } - public V1ObjectReference buildRelated() { - return this.related!=null ?this.related.build():null; - } - public A withRelated(V1ObjectReference related) { - _visitables.get("related").remove(this.related); - if (related!=null){ this.related= new V1ObjectReferenceBuilder(related); _visitables.get("related").add(this.related);} else { this.related = null; _visitables.get("related").remove(this.related); } return (A) this; - } - public Boolean hasRelated() { - return this.related != null; - } - public EventsV1EventFluentImpl.RelatedNested withNewRelated() { - return new EventsV1EventFluentImpl.RelatedNestedImpl(); - } - public EventsV1EventFluentImpl.RelatedNested withNewRelatedLike(V1ObjectReference item) { - return new EventsV1EventFluentImpl.RelatedNestedImpl(item); - } - public EventsV1EventFluentImpl.RelatedNested editRelated() { - return withNewRelatedLike(getRelated()); - } - public EventsV1EventFluentImpl.RelatedNested editOrNewRelated() { - return withNewRelatedLike(getRelated() != null ? getRelated(): new V1ObjectReferenceBuilder().build()); - } - public EventsV1EventFluentImpl.RelatedNested editOrNewRelatedLike(V1ObjectReference item) { - return withNewRelatedLike(getRelated() != null ? getRelated(): item); - } - public String getReportingController() { - return this.reportingController; - } - public A withReportingController(String reportingController) { - this.reportingController=reportingController; return (A) this; - } - public Boolean hasReportingController() { - return this.reportingController != null; - } - public String getReportingInstance() { - return this.reportingInstance; - } - public A withReportingInstance(String reportingInstance) { - this.reportingInstance=reportingInstance; return (A) this; - } - public Boolean hasReportingInstance() { - return this.reportingInstance != null; - } - - /** - * This method has been deprecated, please use method buildSeries instead. - * @return The buildable object. - */ - @Deprecated - public EventsV1EventSeries getSeries() { - return this.series!=null ?this.series.build():null; - } - public EventsV1EventSeries buildSeries() { - return this.series!=null ?this.series.build():null; - } - public A withSeries(EventsV1EventSeries series) { - _visitables.get("series").remove(this.series); - if (series!=null){ this.series= new EventsV1EventSeriesBuilder(series); _visitables.get("series").add(this.series);} else { this.series = null; _visitables.get("series").remove(this.series); } return (A) this; - } - public Boolean hasSeries() { - return this.series != null; - } - public EventsV1EventFluentImpl.SeriesNested withNewSeries() { - return new EventsV1EventFluentImpl.SeriesNestedImpl(); - } - public EventsV1EventFluentImpl.SeriesNested withNewSeriesLike(EventsV1EventSeries item) { - return new EventsV1EventFluentImpl.SeriesNestedImpl(item); - } - public EventsV1EventFluentImpl.SeriesNested editSeries() { - return withNewSeriesLike(getSeries()); - } - public EventsV1EventFluentImpl.SeriesNested editOrNewSeries() { - return withNewSeriesLike(getSeries() != null ? getSeries(): new EventsV1EventSeriesBuilder().build()); - } - public EventsV1EventFluentImpl.SeriesNested editOrNewSeriesLike(EventsV1EventSeries item) { - return withNewSeriesLike(getSeries() != null ? getSeries(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - EventsV1EventFluentImpl that = (EventsV1EventFluentImpl) o; - if (!java.util.Objects.equals(action, that.action)) return false; - - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(deprecatedCount, that.deprecatedCount)) return false; - - if (!java.util.Objects.equals(deprecatedFirstTimestamp, that.deprecatedFirstTimestamp)) return false; - - if (!java.util.Objects.equals(deprecatedLastTimestamp, that.deprecatedLastTimestamp)) return false; - - if (!java.util.Objects.equals(deprecatedSource, that.deprecatedSource)) return false; - - if (!java.util.Objects.equals(eventTime, that.eventTime)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(note, that.note)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(regarding, that.regarding)) return false; - - if (!java.util.Objects.equals(related, that.related)) return false; - - if (!java.util.Objects.equals(reportingController, that.reportingController)) return false; - - if (!java.util.Objects.equals(reportingInstance, that.reportingInstance)) return false; - - if (!java.util.Objects.equals(series, that.series)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(action, apiVersion, deprecatedCount, deprecatedFirstTimestamp, deprecatedLastTimestamp, deprecatedSource, eventTime, kind, metadata, note, reason, regarding, related, reportingController, reportingInstance, series, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (action != null) { sb.append("action:"); sb.append(action + ","); } - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (deprecatedCount != null) { sb.append("deprecatedCount:"); sb.append(deprecatedCount + ","); } - if (deprecatedFirstTimestamp != null) { sb.append("deprecatedFirstTimestamp:"); sb.append(deprecatedFirstTimestamp + ","); } - if (deprecatedLastTimestamp != null) { sb.append("deprecatedLastTimestamp:"); sb.append(deprecatedLastTimestamp + ","); } - if (deprecatedSource != null) { sb.append("deprecatedSource:"); sb.append(deprecatedSource + ","); } - if (eventTime != null) { sb.append("eventTime:"); sb.append(eventTime + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (note != null) { sb.append("note:"); sb.append(note + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (regarding != null) { sb.append("regarding:"); sb.append(regarding + ","); } - if (related != null) { sb.append("related:"); sb.append(related + ","); } - if (reportingController != null) { sb.append("reportingController:"); sb.append(reportingController + ","); } - if (reportingInstance != null) { sb.append("reportingInstance:"); sb.append(reportingInstance + ","); } - if (series != null) { sb.append("series:"); sb.append(series + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class DeprecatedSourceNestedImpl extends V1EventSourceFluentImpl> implements EventsV1EventFluentImpl.DeprecatedSourceNested,Nested{ - DeprecatedSourceNestedImpl(V1EventSource item) { - this.builder = new V1EventSourceBuilder(this, item); - } - DeprecatedSourceNestedImpl() { - this.builder = new V1EventSourceBuilder(this); - } - V1EventSourceBuilder builder; - public N and() { - return (N) EventsV1EventFluentImpl.this.withDeprecatedSource(builder.build()); - } - public N endDeprecatedSource() { - return and(); - } - - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements EventsV1EventFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) EventsV1EventFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class RegardingNestedImpl extends V1ObjectReferenceFluentImpl> implements EventsV1EventFluentImpl.RegardingNested,Nested{ - RegardingNestedImpl(V1ObjectReference item) { - this.builder = new V1ObjectReferenceBuilder(this, item); - } - RegardingNestedImpl() { - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - public N and() { - return (N) EventsV1EventFluentImpl.this.withRegarding(builder.build()); - } - public N endRegarding() { - return and(); - } - - } - class RelatedNestedImpl extends V1ObjectReferenceFluentImpl> implements EventsV1EventFluentImpl.RelatedNested,Nested{ - RelatedNestedImpl(V1ObjectReference item) { - this.builder = new V1ObjectReferenceBuilder(this, item); - } - RelatedNestedImpl() { - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - public N and() { - return (N) EventsV1EventFluentImpl.this.withRelated(builder.build()); - } - public N endRelated() { - return and(); - } - - } - class SeriesNestedImpl extends EventsV1EventSeriesFluentImpl> implements EventsV1EventFluentImpl.SeriesNested,Nested{ - SeriesNestedImpl(EventsV1EventSeries item) { - this.builder = new EventsV1EventSeriesBuilder(this, item); - } - SeriesNestedImpl() { - this.builder = new EventsV1EventSeriesBuilder(this); - } - EventsV1EventSeriesBuilder builder; - public N and() { - return (N) EventsV1EventFluentImpl.this.withSeries(builder.build()); - } - public N endSeries() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListBuilder.java index 4f25b7db14..af7d918ab6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class EventsV1EventListBuilder extends EventsV1EventListFluentImpl implements VisitableBuilder{ +public class EventsV1EventListBuilder extends EventsV1EventListFluent implements VisitableBuilder{ public EventsV1EventListBuilder() { - this(false); - } - public EventsV1EventListBuilder(Boolean validationEnabled) { - this(new EventsV1EventList(), validationEnabled); + this(new EventsV1EventList()); } + public EventsV1EventListBuilder(EventsV1EventListFluent fluent) { - this(fluent, false); - } - public EventsV1EventListBuilder(EventsV1EventListFluent fluent,Boolean validationEnabled) { - this(fluent, new EventsV1EventList(), validationEnabled); + this(fluent, new EventsV1EventList()); } + public EventsV1EventListBuilder(EventsV1EventListFluent fluent,EventsV1EventList instance) { - this(fluent, instance, false); - } - public EventsV1EventListBuilder(EventsV1EventListFluent fluent,EventsV1EventList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public EventsV1EventListBuilder(EventsV1EventList instance) { - this(instance,false); - } - public EventsV1EventListBuilder(EventsV1EventList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } EventsV1EventListFluent fluent; - Boolean validationEnabled; + public EventsV1EventList build() { EventsV1EventList buildable = new EventsV1EventList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListFluent.java index e84a32198d..c95dacce3f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface EventsV1EventListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,EventsV1Event item); - public A setToItems(int index,EventsV1Event item); - public A addToItems(io.kubernetes.client.openapi.models.EventsV1Event... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.EventsV1Event... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public EventsV1Event buildItem(int index); - public EventsV1Event buildFirstItem(); - public EventsV1Event buildLastItem(); - public EventsV1Event buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.EventsV1Event... items); - public Boolean hasItems(); - public EventsV1EventListFluent.ItemsNested addNewItem(); - public EventsV1EventListFluent.ItemsNested addNewItemLike(EventsV1Event item); - public EventsV1EventListFluent.ItemsNested setNewItemLike(int index,EventsV1Event item); - public EventsV1EventListFluent.ItemsNested editItem(int index); - public EventsV1EventListFluent.ItemsNested editFirstItem(); - public EventsV1EventListFluent.ItemsNested editLastItem(); - public EventsV1EventListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public EventsV1EventListFluent.MetadataNested withNewMetadata(); - public EventsV1EventListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public EventsV1EventListFluent.MetadataNested editMetadata(); - public EventsV1EventListFluent.MetadataNested editOrNewMetadata(); - public EventsV1EventListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,EventsV1EventFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class EventsV1EventListFluent> extends BaseFluent{ + public EventsV1EventListFluent() { + } + + public EventsV1EventListFluent(EventsV1EventList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(EventsV1EventList instance) { + instance = (instance != null ? instance : new EventsV1EventList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,EventsV1Event item) { + if (this.items == null) {this.items = new ArrayList();} + EventsV1EventBuilder builder = new EventsV1EventBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,EventsV1Event item) { + if (this.items == null) {this.items = new ArrayList();} + EventsV1EventBuilder builder = new EventsV1EventBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.EventsV1Event... items) { + if (this.items == null) {this.items = new ArrayList();} + for (EventsV1Event item : items) {EventsV1EventBuilder builder = new EventsV1EventBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (EventsV1Event item : items) {EventsV1EventBuilder builder = new EventsV1EventBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.EventsV1Event... items) { + if (this.items == null) return (A)this; + for (EventsV1Event item : items) {EventsV1EventBuilder builder = new EventsV1EventBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (EventsV1Event item : items) {EventsV1EventBuilder builder = new EventsV1EventBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + EventsV1EventBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public EventsV1Event buildItem(int index) { + return this.items.get(index).build(); + } + + public EventsV1Event buildFirstItem() { + return this.items.get(0).build(); + } + + public EventsV1Event buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public EventsV1Event buildMatchingItem(Predicate predicate) { + for (EventsV1EventBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (EventsV1EventBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (EventsV1Event item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.EventsV1Event... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (EventsV1Event item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(EventsV1Event item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,EventsV1Event item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + EventsV1EventListFluent that = (EventsV1EventListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends EventsV1EventFluent> implements Nested{ + ItemsNested(int index,EventsV1Event item) { + this.index = index; + this.builder = new EventsV1EventBuilder(this, item); + } + EventsV1EventBuilder builder; + int index; + public N and() { + return (N) EventsV1EventListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) EventsV1EventListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListFluentImpl.java deleted file mode 100644 index aec5e5ba55..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class EventsV1EventListFluentImpl> extends BaseFluent implements EventsV1EventListFluent{ - public EventsV1EventListFluentImpl() { - } - public EventsV1EventListFluentImpl(EventsV1EventList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,EventsV1Event item) { - if (this.items == null) {this.items = new ArrayList();} - EventsV1EventBuilder builder = new EventsV1EventBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,EventsV1Event item) { - if (this.items == null) {this.items = new ArrayList();} - EventsV1EventBuilder builder = new EventsV1EventBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.EventsV1Event... items) { - if (this.items == null) {this.items = new ArrayList();} - for (EventsV1Event item : items) {EventsV1EventBuilder builder = new EventsV1EventBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (EventsV1Event item : items) {EventsV1EventBuilder builder = new EventsV1EventBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.EventsV1Event... items) { - for (EventsV1Event item : items) {EventsV1EventBuilder builder = new EventsV1EventBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (EventsV1Event item : items) {EventsV1EventBuilder builder = new EventsV1EventBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - EventsV1EventBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public EventsV1Event buildItem(int index) { - return this.items.get(index).build(); - } - public EventsV1Event buildFirstItem() { - return this.items.get(0).build(); - } - public EventsV1Event buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public EventsV1Event buildMatchingItem(Predicate predicate) { - for (EventsV1EventBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (EventsV1EventBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (EventsV1Event item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.EventsV1Event... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (EventsV1Event item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public EventsV1EventListFluentImpl.ItemsNested addNewItem() { - return new EventsV1EventListFluentImpl.ItemsNestedImpl(); - } - public EventsV1EventListFluentImpl.ItemsNested addNewItemLike(EventsV1Event item) { - return new EventsV1EventListFluentImpl.ItemsNestedImpl(-1, item); - } - public EventsV1EventListFluentImpl.ItemsNested setNewItemLike(int index,EventsV1Event item) { - return new EventsV1EventListFluentImpl.ItemsNestedImpl(index, item); - } - public EventsV1EventListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public EventsV1EventListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public EventsV1EventListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public EventsV1EventListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new EventsV1EventListFluentImpl.MetadataNestedImpl(); - } - public EventsV1EventListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new EventsV1EventListFluentImpl.MetadataNestedImpl(item); - } - public EventsV1EventListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public EventsV1EventListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public EventsV1EventListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - EventsV1EventListFluentImpl that = (EventsV1EventListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends EventsV1EventFluentImpl> implements EventsV1EventListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,EventsV1Event item) { - this.index = index; - this.builder = new EventsV1EventBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new EventsV1EventBuilder(this); - } - EventsV1EventBuilder builder; - int index; - public N and() { - return (N) EventsV1EventListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements EventsV1EventListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) EventsV1EventListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesBuilder.java index 4599b2e263..b932f79264 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class EventsV1EventSeriesBuilder extends EventsV1EventSeriesFluentImpl implements VisitableBuilder{ +public class EventsV1EventSeriesBuilder extends EventsV1EventSeriesFluent implements VisitableBuilder{ public EventsV1EventSeriesBuilder() { - this(false); - } - public EventsV1EventSeriesBuilder(Boolean validationEnabled) { - this(new EventsV1EventSeries(), validationEnabled); + this(new EventsV1EventSeries()); } + public EventsV1EventSeriesBuilder(EventsV1EventSeriesFluent fluent) { - this(fluent, false); - } - public EventsV1EventSeriesBuilder(EventsV1EventSeriesFluent fluent,Boolean validationEnabled) { - this(fluent, new EventsV1EventSeries(), validationEnabled); + this(fluent, new EventsV1EventSeries()); } + public EventsV1EventSeriesBuilder(EventsV1EventSeriesFluent fluent,EventsV1EventSeries instance) { - this(fluent, instance, false); - } - public EventsV1EventSeriesBuilder(EventsV1EventSeriesFluent fluent,EventsV1EventSeries instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCount(instance.getCount()); - fluent.withLastObservedTime(instance.getLastObservedTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public EventsV1EventSeriesBuilder(EventsV1EventSeries instance) { - this(instance,false); - } - public EventsV1EventSeriesBuilder(EventsV1EventSeries instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCount(instance.getCount()); - this.withLastObservedTime(instance.getLastObservedTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } EventsV1EventSeriesFluent fluent; - Boolean validationEnabled; + public EventsV1EventSeries build() { EventsV1EventSeries buildable = new EventsV1EventSeries(); buildable.setCount(fluent.getCount()); @@ -46,4 +28,5 @@ public EventsV1EventSeries build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesFluent.java index dee827f23c..d951164bf7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesFluent.java @@ -2,19 +2,81 @@ import java.lang.Integer; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface EventsV1EventSeriesFluent> extends Fluent{ - public Integer getCount(); - public A withCount(Integer count); - public Boolean hasCount(); - public OffsetDateTime getLastObservedTime(); - public A withLastObservedTime(OffsetDateTime lastObservedTime); - public Boolean hasLastObservedTime(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class EventsV1EventSeriesFluent> extends BaseFluent{ + public EventsV1EventSeriesFluent() { + } + public EventsV1EventSeriesFluent(EventsV1EventSeries instance) { + this.copyInstance(instance); + } + private Integer count; + private OffsetDateTime lastObservedTime; + + protected void copyInstance(EventsV1EventSeries instance) { + instance = (instance != null ? instance : new EventsV1EventSeries()); + if (instance != null) { + this.withCount(instance.getCount()); + this.withLastObservedTime(instance.getLastObservedTime()); + } + } + + public Integer getCount() { + return this.count; + } + + public A withCount(Integer count) { + this.count = count; + return (A) this; + } + + public boolean hasCount() { + return this.count != null; + } + + public OffsetDateTime getLastObservedTime() { + return this.lastObservedTime; + } + + public A withLastObservedTime(OffsetDateTime lastObservedTime) { + this.lastObservedTime = lastObservedTime; + return (A) this; + } + + public boolean hasLastObservedTime() { + return this.lastObservedTime != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + EventsV1EventSeriesFluent that = (EventsV1EventSeriesFluent) o; + if (!java.util.Objects.equals(count, that.count)) return false; + if (!java.util.Objects.equals(lastObservedTime, that.lastObservedTime)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(count, lastObservedTime, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (count != null) { sb.append("count:"); sb.append(count + ","); } + if (lastObservedTime != null) { sb.append("lastObservedTime:"); sb.append(lastObservedTime); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesFluentImpl.java deleted file mode 100644 index 9febff7281..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/EventsV1EventSeriesFluentImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class EventsV1EventSeriesFluentImpl> extends BaseFluent implements EventsV1EventSeriesFluent{ - public EventsV1EventSeriesFluentImpl() { - } - public EventsV1EventSeriesFluentImpl(EventsV1EventSeries instance) { - if (instance != null) { - this.withCount(instance.getCount()); - this.withLastObservedTime(instance.getLastObservedTime()); - } - } - private Integer count; - private OffsetDateTime lastObservedTime; - public Integer getCount() { - return this.count; - } - public A withCount(Integer count) { - this.count=count; return (A) this; - } - public Boolean hasCount() { - return this.count != null; - } - public OffsetDateTime getLastObservedTime() { - return this.lastObservedTime; - } - public A withLastObservedTime(OffsetDateTime lastObservedTime) { - this.lastObservedTime=lastObservedTime; return (A) this; - } - public Boolean hasLastObservedTime() { - return this.lastObservedTime != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - EventsV1EventSeriesFluentImpl that = (EventsV1EventSeriesFluentImpl) o; - if (!java.util.Objects.equals(count, that.count)) return false; - - if (!java.util.Objects.equals(lastObservedTime, that.lastObservedTime)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(count, lastObservedTime, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (count != null) { sb.append("count:"); sb.append(count + ","); } - if (lastObservedTime != null) { sb.append("lastObservedTime:"); sb.append(lastObservedTime); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestBuilder.java index cbc828e698..e968ead6d5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class StorageV1TokenRequestBuilder extends StorageV1TokenRequestFluentImpl implements VisitableBuilder{ +public class StorageV1TokenRequestBuilder extends StorageV1TokenRequestFluent implements VisitableBuilder{ public StorageV1TokenRequestBuilder() { - this(false); - } - public StorageV1TokenRequestBuilder(Boolean validationEnabled) { - this(new StorageV1TokenRequest(), validationEnabled); + this(new StorageV1TokenRequest()); } + public StorageV1TokenRequestBuilder(StorageV1TokenRequestFluent fluent) { - this(fluent, false); - } - public StorageV1TokenRequestBuilder(StorageV1TokenRequestFluent fluent,Boolean validationEnabled) { - this(fluent, new StorageV1TokenRequest(), validationEnabled); + this(fluent, new StorageV1TokenRequest()); } + public StorageV1TokenRequestBuilder(StorageV1TokenRequestFluent fluent,StorageV1TokenRequest instance) { - this(fluent, instance, false); - } - public StorageV1TokenRequestBuilder(StorageV1TokenRequestFluent fluent,StorageV1TokenRequest instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAudience(instance.getAudience()); - fluent.withExpirationSeconds(instance.getExpirationSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public StorageV1TokenRequestBuilder(StorageV1TokenRequest instance) { - this(instance,false); - } - public StorageV1TokenRequestBuilder(StorageV1TokenRequest instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAudience(instance.getAudience()); - this.withExpirationSeconds(instance.getExpirationSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } StorageV1TokenRequestFluent fluent; - Boolean validationEnabled; + public StorageV1TokenRequest build() { StorageV1TokenRequest buildable = new StorageV1TokenRequest(); buildable.setAudience(fluent.getAudience()); @@ -46,4 +28,5 @@ public StorageV1TokenRequest build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestFluent.java index a186085049..0adb288b93 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestFluent.java @@ -1,20 +1,81 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface StorageV1TokenRequestFluent> extends Fluent{ - public String getAudience(); - public A withAudience(String audience); - public Boolean hasAudience(); - public Long getExpirationSeconds(); - public A withExpirationSeconds(Long expirationSeconds); - public Boolean hasExpirationSeconds(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class StorageV1TokenRequestFluent> extends BaseFluent{ + public StorageV1TokenRequestFluent() { + } + public StorageV1TokenRequestFluent(StorageV1TokenRequest instance) { + this.copyInstance(instance); + } + private String audience; + private Long expirationSeconds; + + protected void copyInstance(StorageV1TokenRequest instance) { + instance = (instance != null ? instance : new StorageV1TokenRequest()); + if (instance != null) { + this.withAudience(instance.getAudience()); + this.withExpirationSeconds(instance.getExpirationSeconds()); + } + } + + public String getAudience() { + return this.audience; + } + + public A withAudience(String audience) { + this.audience = audience; + return (A) this; + } + + public boolean hasAudience() { + return this.audience != null; + } + + public Long getExpirationSeconds() { + return this.expirationSeconds; + } + + public A withExpirationSeconds(Long expirationSeconds) { + this.expirationSeconds = expirationSeconds; + return (A) this; + } + + public boolean hasExpirationSeconds() { + return this.expirationSeconds != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + StorageV1TokenRequestFluent that = (StorageV1TokenRequestFluent) o; + if (!java.util.Objects.equals(audience, that.audience)) return false; + if (!java.util.Objects.equals(expirationSeconds, that.expirationSeconds)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(audience, expirationSeconds, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (audience != null) { sb.append("audience:"); sb.append(audience + ","); } + if (expirationSeconds != null) { sb.append("expirationSeconds:"); sb.append(expirationSeconds); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestFluentImpl.java deleted file mode 100644 index 820a017ec1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/StorageV1TokenRequestFluentImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class StorageV1TokenRequestFluentImpl> extends BaseFluent implements StorageV1TokenRequestFluent{ - public StorageV1TokenRequestFluentImpl() { - } - public StorageV1TokenRequestFluentImpl(StorageV1TokenRequest instance) { - if (instance != null) { - this.withAudience(instance.getAudience()); - this.withExpirationSeconds(instance.getExpirationSeconds()); - } - } - private String audience; - private Long expirationSeconds; - public String getAudience() { - return this.audience; - } - public A withAudience(String audience) { - this.audience=audience; return (A) this; - } - public Boolean hasAudience() { - return this.audience != null; - } - public Long getExpirationSeconds() { - return this.expirationSeconds; - } - public A withExpirationSeconds(Long expirationSeconds) { - this.expirationSeconds=expirationSeconds; return (A) this; - } - public Boolean hasExpirationSeconds() { - return this.expirationSeconds != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - StorageV1TokenRequestFluentImpl that = (StorageV1TokenRequestFluentImpl) o; - if (!java.util.Objects.equals(audience, that.audience)) return false; - - if (!java.util.Objects.equals(expirationSeconds, that.expirationSeconds)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(audience, expirationSeconds, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (audience != null) { sb.append("audience:"); sb.append(audience + ","); } - if (expirationSeconds != null) { sb.append("expirationSeconds:"); sb.append(expirationSeconds); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupBuilder.java index e25a10566d..61bea7c6b1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIGroupBuilder extends V1APIGroupFluentImpl implements VisitableBuilder{ +public class V1APIGroupBuilder extends V1APIGroupFluent implements VisitableBuilder{ public V1APIGroupBuilder() { - this(false); - } - public V1APIGroupBuilder(Boolean validationEnabled) { - this(new V1APIGroup(), validationEnabled); + this(new V1APIGroup()); } + public V1APIGroupBuilder(V1APIGroupFluent fluent) { - this(fluent, false); - } - public V1APIGroupBuilder(V1APIGroupFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIGroup(), validationEnabled); + this(fluent, new V1APIGroup()); } + public V1APIGroupBuilder(V1APIGroupFluent fluent,V1APIGroup instance) { - this(fluent, instance, false); - } - public V1APIGroupBuilder(V1APIGroupFluent fluent,V1APIGroup instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withPreferredVersion(instance.getPreferredVersion()); - fluent.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs()); - fluent.withVersions(instance.getVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIGroupBuilder(V1APIGroup instance) { - this(instance,false); - } - public V1APIGroupBuilder(V1APIGroup instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withPreferredVersion(instance.getPreferredVersion()); - this.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs()); - this.withVersions(instance.getVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIGroupFluent fluent; - Boolean validationEnabled; + public V1APIGroup build() { V1APIGroup buildable = new V1APIGroup(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); buildable.setName(fluent.getName()); - buildable.setPreferredVersion(fluent.getPreferredVersion()); - buildable.setServerAddressByClientCIDRs(fluent.getServerAddressByClientCIDRs()); - buildable.setVersions(fluent.getVersions()); + buildable.setPreferredVersion(fluent.buildPreferredVersion()); + buildable.setServerAddressByClientCIDRs(fluent.buildServerAddressByClientCIDRs()); + buildable.setVersions(fluent.buildVersions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupFluent.java index 90f4835120..875f4c278d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupFluent.java @@ -1,120 +1,509 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1APIGroupFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildPreferredVersion instead. - * @return The buildable object. - */ - @Deprecated - public V1GroupVersionForDiscovery getPreferredVersion(); - public V1GroupVersionForDiscovery buildPreferredVersion(); - public A withPreferredVersion(V1GroupVersionForDiscovery preferredVersion); - public Boolean hasPreferredVersion(); - public V1APIGroupFluent.PreferredVersionNested withNewPreferredVersion(); - public V1APIGroupFluent.PreferredVersionNested withNewPreferredVersionLike(V1GroupVersionForDiscovery item); - public V1APIGroupFluent.PreferredVersionNested editPreferredVersion(); - public V1APIGroupFluent.PreferredVersionNested editOrNewPreferredVersion(); - public V1APIGroupFluent.PreferredVersionNested editOrNewPreferredVersionLike(V1GroupVersionForDiscovery item); - public A addToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item); - public A setToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item); - public A addToServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items); - public A addAllToServerAddressByClientCIDRs(Collection items); - public A removeFromServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items); - public A removeAllFromServerAddressByClientCIDRs(Collection items); - public A removeMatchingFromServerAddressByClientCIDRs(Predicate predicate); - - /** - * This method has been deprecated, please use method buildServerAddressByClientCIDRs instead. - * @return The buildable object. - */ - @Deprecated - public List getServerAddressByClientCIDRs(); - public List buildServerAddressByClientCIDRs(); - public V1ServerAddressByClientCIDR buildServerAddressByClientCIDR(int index); - public V1ServerAddressByClientCIDR buildFirstServerAddressByClientCIDR(); - public V1ServerAddressByClientCIDR buildLastServerAddressByClientCIDR(); - public V1ServerAddressByClientCIDR buildMatchingServerAddressByClientCIDR(Predicate predicate); - public Boolean hasMatchingServerAddressByClientCIDR(Predicate predicate); - public A withServerAddressByClientCIDRs(List serverAddressByClientCIDRs); - public A withServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... serverAddressByClientCIDRs); - public Boolean hasServerAddressByClientCIDRs(); - public V1APIGroupFluent.ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDR(); - public V1APIGroupFluent.ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDRLike(V1ServerAddressByClientCIDR item); - public V1APIGroupFluent.ServerAddressByClientCIDRsNested setNewServerAddressByClientCIDRLike(int index,V1ServerAddressByClientCIDR item); - public V1APIGroupFluent.ServerAddressByClientCIDRsNested editServerAddressByClientCIDR(int index); - public V1APIGroupFluent.ServerAddressByClientCIDRsNested editFirstServerAddressByClientCIDR(); - public V1APIGroupFluent.ServerAddressByClientCIDRsNested editLastServerAddressByClientCIDR(); - public V1APIGroupFluent.ServerAddressByClientCIDRsNested editMatchingServerAddressByClientCIDR(Predicate predicate); - public A addToVersions(int index,V1GroupVersionForDiscovery item); - public A setToVersions(int index,V1GroupVersionForDiscovery item); - public A addToVersions(io.kubernetes.client.openapi.models.V1GroupVersionForDiscovery... items); - public A addAllToVersions(Collection items); - public A removeFromVersions(io.kubernetes.client.openapi.models.V1GroupVersionForDiscovery... items); - public A removeAllFromVersions(Collection items); - public A removeMatchingFromVersions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildVersions instead. - * @return The buildable object. - */ - @Deprecated - public List getVersions(); - public List buildVersions(); - public V1GroupVersionForDiscovery buildVersion(int index); - public V1GroupVersionForDiscovery buildFirstVersion(); - public V1GroupVersionForDiscovery buildLastVersion(); - public V1GroupVersionForDiscovery buildMatchingVersion(Predicate predicate); - public Boolean hasMatchingVersion(Predicate predicate); - public A withVersions(List versions); - public A withVersions(io.kubernetes.client.openapi.models.V1GroupVersionForDiscovery... versions); - public Boolean hasVersions(); - public V1APIGroupFluent.VersionsNested addNewVersion(); - public V1APIGroupFluent.VersionsNested addNewVersionLike(V1GroupVersionForDiscovery item); - public V1APIGroupFluent.VersionsNested setNewVersionLike(int index,V1GroupVersionForDiscovery item); - public V1APIGroupFluent.VersionsNested editVersion(int index); - public V1APIGroupFluent.VersionsNested editFirstVersion(); - public V1APIGroupFluent.VersionsNested editLastVersion(); - public V1APIGroupFluent.VersionsNested editMatchingVersion(Predicate predicate); - public interface PreferredVersionNested extends Nested,V1GroupVersionForDiscoveryFluent>{ - public N and(); - public N endPreferredVersion(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIGroupFluent> extends BaseFluent{ + public V1APIGroupFluent() { + } + + public V1APIGroupFluent(V1APIGroup instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private String name; + private V1GroupVersionForDiscoveryBuilder preferredVersion; + private ArrayList serverAddressByClientCIDRs; + private ArrayList versions; + + protected void copyInstance(V1APIGroup instance) { + instance = (instance != null ? instance : new V1APIGroup()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withPreferredVersion(instance.getPreferredVersion()); + this.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs()); + this.withVersions(instance.getVersions()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public V1GroupVersionForDiscovery buildPreferredVersion() { + return this.preferredVersion != null ? this.preferredVersion.build() : null; + } + + public A withPreferredVersion(V1GroupVersionForDiscovery preferredVersion) { + this._visitables.remove("preferredVersion"); + if (preferredVersion != null) { + this.preferredVersion = new V1GroupVersionForDiscoveryBuilder(preferredVersion); + this._visitables.get("preferredVersion").add(this.preferredVersion); + } else { + this.preferredVersion = null; + this._visitables.get("preferredVersion").remove(this.preferredVersion); + } + return (A) this; + } + + public boolean hasPreferredVersion() { + return this.preferredVersion != null; + } + + public PreferredVersionNested withNewPreferredVersion() { + return new PreferredVersionNested(null); + } + + public PreferredVersionNested withNewPreferredVersionLike(V1GroupVersionForDiscovery item) { + return new PreferredVersionNested(item); + } + + public PreferredVersionNested editPreferredVersion() { + return withNewPreferredVersionLike(java.util.Optional.ofNullable(buildPreferredVersion()).orElse(null)); + } + + public PreferredVersionNested editOrNewPreferredVersion() { + return withNewPreferredVersionLike(java.util.Optional.ofNullable(buildPreferredVersion()).orElse(new V1GroupVersionForDiscoveryBuilder().build())); + } + + public PreferredVersionNested editOrNewPreferredVersionLike(V1GroupVersionForDiscovery item) { + return withNewPreferredVersionLike(java.util.Optional.ofNullable(buildPreferredVersion()).orElse(item)); + } + + public A addToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item) { + if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} + V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item); + if (index < 0 || index >= serverAddressByClientCIDRs.size()) { _visitables.get("serverAddressByClientCIDRs").add(builder); serverAddressByClientCIDRs.add(builder); } else { _visitables.get("serverAddressByClientCIDRs").add(index, builder); serverAddressByClientCIDRs.add(index, builder);} + return (A)this; + } + + public A setToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item) { + if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} + V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item); + if (index < 0 || index >= serverAddressByClientCIDRs.size()) { _visitables.get("serverAddressByClientCIDRs").add(builder); serverAddressByClientCIDRs.add(builder); } else { _visitables.get("serverAddressByClientCIDRs").set(index, builder); serverAddressByClientCIDRs.set(index, builder);} + return (A)this; + } + + public A addToServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items) { + if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} + for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").add(builder);this.serverAddressByClientCIDRs.add(builder);} return (A)this; + } + + public A addAllToServerAddressByClientCIDRs(Collection items) { + if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} + for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").add(builder);this.serverAddressByClientCIDRs.add(builder);} return (A)this; + } + + public A removeFromServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items) { + if (this.serverAddressByClientCIDRs == null) return (A)this; + for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").remove(builder); this.serverAddressByClientCIDRs.remove(builder);} return (A)this; + } + + public A removeAllFromServerAddressByClientCIDRs(Collection items) { + if (this.serverAddressByClientCIDRs == null) return (A)this; + for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").remove(builder); this.serverAddressByClientCIDRs.remove(builder);} return (A)this; + } + + public A removeMatchingFromServerAddressByClientCIDRs(Predicate predicate) { + if (serverAddressByClientCIDRs == null) return (A) this; + final Iterator each = serverAddressByClientCIDRs.iterator(); + final List visitables = _visitables.get("serverAddressByClientCIDRs"); + while (each.hasNext()) { + V1ServerAddressByClientCIDRBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildServerAddressByClientCIDRs() { + return this.serverAddressByClientCIDRs != null ? build(serverAddressByClientCIDRs) : null; + } + + public V1ServerAddressByClientCIDR buildServerAddressByClientCIDR(int index) { + return this.serverAddressByClientCIDRs.get(index).build(); + } + + public V1ServerAddressByClientCIDR buildFirstServerAddressByClientCIDR() { + return this.serverAddressByClientCIDRs.get(0).build(); + } + + public V1ServerAddressByClientCIDR buildLastServerAddressByClientCIDR() { + return this.serverAddressByClientCIDRs.get(serverAddressByClientCIDRs.size() - 1).build(); + } + + public V1ServerAddressByClientCIDR buildMatchingServerAddressByClientCIDR(Predicate predicate) { + for (V1ServerAddressByClientCIDRBuilder item : serverAddressByClientCIDRs) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingServerAddressByClientCIDR(Predicate predicate) { + for (V1ServerAddressByClientCIDRBuilder item : serverAddressByClientCIDRs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withServerAddressByClientCIDRs(List serverAddressByClientCIDRs) { + if (this.serverAddressByClientCIDRs != null) { + this._visitables.get("serverAddressByClientCIDRs").clear(); + } + if (serverAddressByClientCIDRs != null) { + this.serverAddressByClientCIDRs = new ArrayList(); + for (V1ServerAddressByClientCIDR item : serverAddressByClientCIDRs) { + this.addToServerAddressByClientCIDRs(item); + } + } else { + this.serverAddressByClientCIDRs = null; + } + return (A) this; + } + + public A withServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... serverAddressByClientCIDRs) { + if (this.serverAddressByClientCIDRs != null) { + this.serverAddressByClientCIDRs.clear(); + _visitables.remove("serverAddressByClientCIDRs"); + } + if (serverAddressByClientCIDRs != null) { + for (V1ServerAddressByClientCIDR item : serverAddressByClientCIDRs) { + this.addToServerAddressByClientCIDRs(item); + } + } + return (A) this; + } + + public boolean hasServerAddressByClientCIDRs() { + return this.serverAddressByClientCIDRs != null && !this.serverAddressByClientCIDRs.isEmpty(); + } + + public ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDR() { + return new ServerAddressByClientCIDRsNested(-1, null); } - public interface ServerAddressByClientCIDRsNested extends Nested,V1ServerAddressByClientCIDRFluent>{ - public N and(); - public N endServerAddressByClientCIDR(); + + public ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDRLike(V1ServerAddressByClientCIDR item) { + return new ServerAddressByClientCIDRsNested(-1, item); + } + + public ServerAddressByClientCIDRsNested setNewServerAddressByClientCIDRLike(int index,V1ServerAddressByClientCIDR item) { + return new ServerAddressByClientCIDRsNested(index, item); + } + + public ServerAddressByClientCIDRsNested editServerAddressByClientCIDR(int index) { + if (serverAddressByClientCIDRs.size() <= index) throw new RuntimeException("Can't edit serverAddressByClientCIDRs. Index exceeds size."); + return setNewServerAddressByClientCIDRLike(index, buildServerAddressByClientCIDR(index)); + } + + public ServerAddressByClientCIDRsNested editFirstServerAddressByClientCIDR() { + if (serverAddressByClientCIDRs.size() == 0) throw new RuntimeException("Can't edit first serverAddressByClientCIDRs. The list is empty."); + return setNewServerAddressByClientCIDRLike(0, buildServerAddressByClientCIDR(0)); + } + + public ServerAddressByClientCIDRsNested editLastServerAddressByClientCIDR() { + int index = serverAddressByClientCIDRs.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last serverAddressByClientCIDRs. The list is empty."); + return setNewServerAddressByClientCIDRLike(index, buildServerAddressByClientCIDR(index)); + } + + public ServerAddressByClientCIDRsNested editMatchingServerAddressByClientCIDR(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item); + if (index < 0 || index >= versions.size()) { _visitables.get("versions").add(builder); versions.add(builder); } else { _visitables.get("versions").add(index, builder); versions.add(index, builder);} + return (A)this; + } + + public A setToVersions(int index,V1GroupVersionForDiscovery item) { + if (this.versions == null) {this.versions = new ArrayList();} + V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item); + if (index < 0 || index >= versions.size()) { _visitables.get("versions").add(builder); versions.add(builder); } else { _visitables.get("versions").set(index, builder); versions.set(index, builder);} + return (A)this; + } + + public A addToVersions(io.kubernetes.client.openapi.models.V1GroupVersionForDiscovery... items) { + if (this.versions == null) {this.versions = new ArrayList();} + for (V1GroupVersionForDiscovery item : items) {V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item);_visitables.get("versions").add(builder);this.versions.add(builder);} return (A)this; + } + + public A addAllToVersions(Collection items) { + if (this.versions == null) {this.versions = new ArrayList();} + for (V1GroupVersionForDiscovery item : items) {V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item);_visitables.get("versions").add(builder);this.versions.add(builder);} return (A)this; + } + + public A removeFromVersions(io.kubernetes.client.openapi.models.V1GroupVersionForDiscovery... items) { + if (this.versions == null) return (A)this; + for (V1GroupVersionForDiscovery item : items) {V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item);_visitables.get("versions").remove(builder); this.versions.remove(builder);} return (A)this; + } + + public A removeAllFromVersions(Collection items) { + if (this.versions == null) return (A)this; + for (V1GroupVersionForDiscovery item : items) {V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item);_visitables.get("versions").remove(builder); this.versions.remove(builder);} return (A)this; + } + + public A removeMatchingFromVersions(Predicate predicate) { + if (versions == null) return (A) this; + final Iterator each = versions.iterator(); + final List visitables = _visitables.get("versions"); + while (each.hasNext()) { + V1GroupVersionForDiscoveryBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVersions() { + return this.versions != null ? build(versions) : null; + } + + public V1GroupVersionForDiscovery buildVersion(int index) { + return this.versions.get(index).build(); + } + + public V1GroupVersionForDiscovery buildFirstVersion() { + return this.versions.get(0).build(); + } + + public V1GroupVersionForDiscovery buildLastVersion() { + return this.versions.get(versions.size() - 1).build(); + } + + public V1GroupVersionForDiscovery buildMatchingVersion(Predicate predicate) { + for (V1GroupVersionForDiscoveryBuilder item : versions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVersion(Predicate predicate) { + for (V1GroupVersionForDiscoveryBuilder item : versions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVersions(List versions) { + if (this.versions != null) { + this._visitables.get("versions").clear(); + } + if (versions != null) { + this.versions = new ArrayList(); + for (V1GroupVersionForDiscovery item : versions) { + this.addToVersions(item); + } + } else { + this.versions = null; + } + return (A) this; + } + + public A withVersions(io.kubernetes.client.openapi.models.V1GroupVersionForDiscovery... versions) { + if (this.versions != null) { + this.versions.clear(); + _visitables.remove("versions"); + } + if (versions != null) { + for (V1GroupVersionForDiscovery item : versions) { + this.addToVersions(item); + } + } + return (A) this; + } + + public boolean hasVersions() { + return this.versions != null && !this.versions.isEmpty(); + } + + public VersionsNested addNewVersion() { + return new VersionsNested(-1, null); + } + + public VersionsNested addNewVersionLike(V1GroupVersionForDiscovery item) { + return new VersionsNested(-1, item); + } + + public VersionsNested setNewVersionLike(int index,V1GroupVersionForDiscovery item) { + return new VersionsNested(index, item); + } + + public VersionsNested editVersion(int index) { + if (versions.size() <= index) throw new RuntimeException("Can't edit versions. Index exceeds size."); + return setNewVersionLike(index, buildVersion(index)); + } + + public VersionsNested editFirstVersion() { + if (versions.size() == 0) throw new RuntimeException("Can't edit first versions. The list is empty."); + return setNewVersionLike(0, buildVersion(0)); + } + + public VersionsNested editLastVersion() { + int index = versions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last versions. The list is empty."); + return setNewVersionLike(index, buildVersion(index)); + } + + public VersionsNested editMatchingVersion(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1GroupVersionForDiscoveryFluent> implements Nested{ + PreferredVersionNested(V1GroupVersionForDiscovery item) { + this.builder = new V1GroupVersionForDiscoveryBuilder(this, item); + } + V1GroupVersionForDiscoveryBuilder builder; + + public N and() { + return (N) V1APIGroupFluent.this.withPreferredVersion(builder.build()); + } + + public N endPreferredVersion() { + return and(); + } + } - public interface VersionsNested extends Nested,V1GroupVersionForDiscoveryFluent>{ - public N and(); - public N endVersion(); + public class ServerAddressByClientCIDRsNested extends V1ServerAddressByClientCIDRFluent> implements Nested{ + ServerAddressByClientCIDRsNested(int index,V1ServerAddressByClientCIDR item) { + this.index = index; + this.builder = new V1ServerAddressByClientCIDRBuilder(this, item); + } + V1ServerAddressByClientCIDRBuilder builder; + int index; + + public N and() { + return (N) V1APIGroupFluent.this.setToServerAddressByClientCIDRs(index,builder.build()); + } + + public N endServerAddressByClientCIDR() { + return and(); + } + } + public class VersionsNested extends V1GroupVersionForDiscoveryFluent> implements Nested{ + VersionsNested(int index,V1GroupVersionForDiscovery item) { + this.index = index; + this.builder = new V1GroupVersionForDiscoveryBuilder(this, item); + } + V1GroupVersionForDiscoveryBuilder builder; + int index; + + public N and() { + return (N) V1APIGroupFluent.this.setToVersions(index,builder.build()); + } + + public N endVersion() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupFluentImpl.java deleted file mode 100644 index 741e7bf2e2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupFluentImpl.java +++ /dev/null @@ -1,404 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIGroupFluentImpl> extends BaseFluent implements V1APIGroupFluent{ - public V1APIGroupFluentImpl() { - } - public V1APIGroupFluentImpl(V1APIGroup instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withPreferredVersion(instance.getPreferredVersion()); - this.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs()); - this.withVersions(instance.getVersions()); - } - } - private String apiVersion; - private String kind; - private String name; - private V1GroupVersionForDiscoveryBuilder preferredVersion; - private ArrayList serverAddressByClientCIDRs; - private ArrayList versions; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - - /** - * This method has been deprecated, please use method buildPreferredVersion instead. - * @return The buildable object. - */ - @Deprecated - public V1GroupVersionForDiscovery getPreferredVersion() { - return this.preferredVersion!=null ?this.preferredVersion.build():null; - } - public V1GroupVersionForDiscovery buildPreferredVersion() { - return this.preferredVersion!=null ?this.preferredVersion.build():null; - } - public A withPreferredVersion(V1GroupVersionForDiscovery preferredVersion) { - _visitables.get("preferredVersion").remove(this.preferredVersion); - if (preferredVersion!=null){ this.preferredVersion= new V1GroupVersionForDiscoveryBuilder(preferredVersion); _visitables.get("preferredVersion").add(this.preferredVersion);} else { this.preferredVersion = null; _visitables.get("preferredVersion").remove(this.preferredVersion); } return (A) this; - } - public Boolean hasPreferredVersion() { - return this.preferredVersion != null; - } - public V1APIGroupFluentImpl.PreferredVersionNested withNewPreferredVersion() { - return new V1APIGroupFluentImpl.PreferredVersionNestedImpl(); - } - public V1APIGroupFluentImpl.PreferredVersionNested withNewPreferredVersionLike(V1GroupVersionForDiscovery item) { - return new V1APIGroupFluentImpl.PreferredVersionNestedImpl(item); - } - public V1APIGroupFluentImpl.PreferredVersionNested editPreferredVersion() { - return withNewPreferredVersionLike(getPreferredVersion()); - } - public V1APIGroupFluentImpl.PreferredVersionNested editOrNewPreferredVersion() { - return withNewPreferredVersionLike(getPreferredVersion() != null ? getPreferredVersion(): new V1GroupVersionForDiscoveryBuilder().build()); - } - public V1APIGroupFluentImpl.PreferredVersionNested editOrNewPreferredVersionLike(V1GroupVersionForDiscovery item) { - return withNewPreferredVersionLike(getPreferredVersion() != null ? getPreferredVersion(): item); - } - public A addToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item) { - if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} - V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item); - if (index < 0 || index >= serverAddressByClientCIDRs.size()) { _visitables.get("serverAddressByClientCIDRs").add(builder); serverAddressByClientCIDRs.add(builder); } else { _visitables.get("serverAddressByClientCIDRs").add(index, builder); serverAddressByClientCIDRs.add(index, builder);} - return (A)this; - } - public A setToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item) { - if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} - V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item); - if (index < 0 || index >= serverAddressByClientCIDRs.size()) { _visitables.get("serverAddressByClientCIDRs").add(builder); serverAddressByClientCIDRs.add(builder); } else { _visitables.get("serverAddressByClientCIDRs").set(index, builder); serverAddressByClientCIDRs.set(index, builder);} - return (A)this; - } - public A addToServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items) { - if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} - for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").add(builder);this.serverAddressByClientCIDRs.add(builder);} return (A)this; - } - public A addAllToServerAddressByClientCIDRs(Collection items) { - if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} - for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").add(builder);this.serverAddressByClientCIDRs.add(builder);} return (A)this; - } - public A removeFromServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items) { - for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").remove(builder);if (this.serverAddressByClientCIDRs != null) {this.serverAddressByClientCIDRs.remove(builder);}} return (A)this; - } - public A removeAllFromServerAddressByClientCIDRs(Collection items) { - for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").remove(builder);if (this.serverAddressByClientCIDRs != null) {this.serverAddressByClientCIDRs.remove(builder);}} return (A)this; - } - public A removeMatchingFromServerAddressByClientCIDRs(Predicate predicate) { - if (serverAddressByClientCIDRs == null) return (A) this; - final Iterator each = serverAddressByClientCIDRs.iterator(); - final List visitables = _visitables.get("serverAddressByClientCIDRs"); - while (each.hasNext()) { - V1ServerAddressByClientCIDRBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildServerAddressByClientCIDRs instead. - * @return The buildable object. - */ - @Deprecated - public List getServerAddressByClientCIDRs() { - return serverAddressByClientCIDRs != null ? build(serverAddressByClientCIDRs) : null; - } - public List buildServerAddressByClientCIDRs() { - return serverAddressByClientCIDRs != null ? build(serverAddressByClientCIDRs) : null; - } - public V1ServerAddressByClientCIDR buildServerAddressByClientCIDR(int index) { - return this.serverAddressByClientCIDRs.get(index).build(); - } - public V1ServerAddressByClientCIDR buildFirstServerAddressByClientCIDR() { - return this.serverAddressByClientCIDRs.get(0).build(); - } - public V1ServerAddressByClientCIDR buildLastServerAddressByClientCIDR() { - return this.serverAddressByClientCIDRs.get(serverAddressByClientCIDRs.size() - 1).build(); - } - public V1ServerAddressByClientCIDR buildMatchingServerAddressByClientCIDR(Predicate predicate) { - for (V1ServerAddressByClientCIDRBuilder item: serverAddressByClientCIDRs) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingServerAddressByClientCIDR(Predicate predicate) { - for (V1ServerAddressByClientCIDRBuilder item: serverAddressByClientCIDRs) { if(predicate.test(item)){ return true;} } return false; - } - public A withServerAddressByClientCIDRs(List serverAddressByClientCIDRs) { - if (this.serverAddressByClientCIDRs != null) { _visitables.get("serverAddressByClientCIDRs").clear();} - if (serverAddressByClientCIDRs != null) {this.serverAddressByClientCIDRs = new ArrayList(); for (V1ServerAddressByClientCIDR item : serverAddressByClientCIDRs){this.addToServerAddressByClientCIDRs(item);}} else { this.serverAddressByClientCIDRs = null;} return (A) this; - } - public A withServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... serverAddressByClientCIDRs) { - if (this.serverAddressByClientCIDRs != null) {this.serverAddressByClientCIDRs.clear(); _visitables.remove("serverAddressByClientCIDRs"); } - if (serverAddressByClientCIDRs != null) {for (V1ServerAddressByClientCIDR item :serverAddressByClientCIDRs){ this.addToServerAddressByClientCIDRs(item);}} return (A) this; - } - public Boolean hasServerAddressByClientCIDRs() { - return serverAddressByClientCIDRs != null && !serverAddressByClientCIDRs.isEmpty(); - } - public V1APIGroupFluentImpl.ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDR() { - return new V1APIGroupFluentImpl.ServerAddressByClientCIDRsNestedImpl(); - } - public V1APIGroupFluentImpl.ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDRLike(V1ServerAddressByClientCIDR item) { - return new V1APIGroupFluentImpl.ServerAddressByClientCIDRsNestedImpl(-1, item); - } - public V1APIGroupFluentImpl.ServerAddressByClientCIDRsNested setNewServerAddressByClientCIDRLike(int index,V1ServerAddressByClientCIDR item) { - return new V1APIGroupFluentImpl.ServerAddressByClientCIDRsNestedImpl(index, item); - } - public V1APIGroupFluentImpl.ServerAddressByClientCIDRsNested editServerAddressByClientCIDR(int index) { - if (serverAddressByClientCIDRs.size() <= index) throw new RuntimeException("Can't edit serverAddressByClientCIDRs. Index exceeds size."); - return setNewServerAddressByClientCIDRLike(index, buildServerAddressByClientCIDR(index)); - } - public V1APIGroupFluentImpl.ServerAddressByClientCIDRsNested editFirstServerAddressByClientCIDR() { - if (serverAddressByClientCIDRs.size() == 0) throw new RuntimeException("Can't edit first serverAddressByClientCIDRs. The list is empty."); - return setNewServerAddressByClientCIDRLike(0, buildServerAddressByClientCIDR(0)); - } - public V1APIGroupFluentImpl.ServerAddressByClientCIDRsNested editLastServerAddressByClientCIDR() { - int index = serverAddressByClientCIDRs.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last serverAddressByClientCIDRs. The list is empty."); - return setNewServerAddressByClientCIDRLike(index, buildServerAddressByClientCIDR(index)); - } - public V1APIGroupFluentImpl.ServerAddressByClientCIDRsNested editMatchingServerAddressByClientCIDR(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item); - if (index < 0 || index >= versions.size()) { _visitables.get("versions").add(builder); versions.add(builder); } else { _visitables.get("versions").add(index, builder); versions.add(index, builder);} - return (A)this; - } - public A setToVersions(int index,V1GroupVersionForDiscovery item) { - if (this.versions == null) {this.versions = new ArrayList();} - V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item); - if (index < 0 || index >= versions.size()) { _visitables.get("versions").add(builder); versions.add(builder); } else { _visitables.get("versions").set(index, builder); versions.set(index, builder);} - return (A)this; - } - public A addToVersions(io.kubernetes.client.openapi.models.V1GroupVersionForDiscovery... items) { - if (this.versions == null) {this.versions = new ArrayList();} - for (V1GroupVersionForDiscovery item : items) {V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item);_visitables.get("versions").add(builder);this.versions.add(builder);} return (A)this; - } - public A addAllToVersions(Collection items) { - if (this.versions == null) {this.versions = new ArrayList();} - for (V1GroupVersionForDiscovery item : items) {V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item);_visitables.get("versions").add(builder);this.versions.add(builder);} return (A)this; - } - public A removeFromVersions(io.kubernetes.client.openapi.models.V1GroupVersionForDiscovery... items) { - for (V1GroupVersionForDiscovery item : items) {V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item);_visitables.get("versions").remove(builder);if (this.versions != null) {this.versions.remove(builder);}} return (A)this; - } - public A removeAllFromVersions(Collection items) { - for (V1GroupVersionForDiscovery item : items) {V1GroupVersionForDiscoveryBuilder builder = new V1GroupVersionForDiscoveryBuilder(item);_visitables.get("versions").remove(builder);if (this.versions != null) {this.versions.remove(builder);}} return (A)this; - } - public A removeMatchingFromVersions(Predicate predicate) { - if (versions == null) return (A) this; - final Iterator each = versions.iterator(); - final List visitables = _visitables.get("versions"); - while (each.hasNext()) { - V1GroupVersionForDiscoveryBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildVersions instead. - * @return The buildable object. - */ - @Deprecated - public List getVersions() { - return versions != null ? build(versions) : null; - } - public List buildVersions() { - return versions != null ? build(versions) : null; - } - public V1GroupVersionForDiscovery buildVersion(int index) { - return this.versions.get(index).build(); - } - public V1GroupVersionForDiscovery buildFirstVersion() { - return this.versions.get(0).build(); - } - public V1GroupVersionForDiscovery buildLastVersion() { - return this.versions.get(versions.size() - 1).build(); - } - public V1GroupVersionForDiscovery buildMatchingVersion(Predicate predicate) { - for (V1GroupVersionForDiscoveryBuilder item: versions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingVersion(Predicate predicate) { - for (V1GroupVersionForDiscoveryBuilder item: versions) { if(predicate.test(item)){ return true;} } return false; - } - public A withVersions(List versions) { - if (this.versions != null) { _visitables.get("versions").clear();} - if (versions != null) {this.versions = new ArrayList(); for (V1GroupVersionForDiscovery item : versions){this.addToVersions(item);}} else { this.versions = null;} return (A) this; - } - public A withVersions(io.kubernetes.client.openapi.models.V1GroupVersionForDiscovery... versions) { - if (this.versions != null) {this.versions.clear(); _visitables.remove("versions"); } - if (versions != null) {for (V1GroupVersionForDiscovery item :versions){ this.addToVersions(item);}} return (A) this; - } - public Boolean hasVersions() { - return versions != null && !versions.isEmpty(); - } - public V1APIGroupFluentImpl.VersionsNested addNewVersion() { - return new V1APIGroupFluentImpl.VersionsNestedImpl(); - } - public V1APIGroupFluentImpl.VersionsNested addNewVersionLike(V1GroupVersionForDiscovery item) { - return new V1APIGroupFluentImpl.VersionsNestedImpl(-1, item); - } - public V1APIGroupFluentImpl.VersionsNested setNewVersionLike(int index,V1GroupVersionForDiscovery item) { - return new V1APIGroupFluentImpl.VersionsNestedImpl(index, item); - } - public V1APIGroupFluentImpl.VersionsNested editVersion(int index) { - if (versions.size() <= index) throw new RuntimeException("Can't edit versions. Index exceeds size."); - return setNewVersionLike(index, buildVersion(index)); - } - public V1APIGroupFluentImpl.VersionsNested editFirstVersion() { - if (versions.size() == 0) throw new RuntimeException("Can't edit first versions. The list is empty."); - return setNewVersionLike(0, buildVersion(0)); - } - public V1APIGroupFluentImpl.VersionsNested editLastVersion() { - int index = versions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last versions. The list is empty."); - return setNewVersionLike(index, buildVersion(index)); - } - public V1APIGroupFluentImpl.VersionsNested editMatchingVersion(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1GroupVersionForDiscoveryFluentImpl> implements V1APIGroupFluentImpl.PreferredVersionNested,Nested{ - PreferredVersionNestedImpl(V1GroupVersionForDiscovery item) { - this.builder = new V1GroupVersionForDiscoveryBuilder(this, item); - } - PreferredVersionNestedImpl() { - this.builder = new V1GroupVersionForDiscoveryBuilder(this); - } - V1GroupVersionForDiscoveryBuilder builder; - public N and() { - return (N) V1APIGroupFluentImpl.this.withPreferredVersion(builder.build()); - } - public N endPreferredVersion() { - return and(); - } - - } - class ServerAddressByClientCIDRsNestedImpl extends V1ServerAddressByClientCIDRFluentImpl> implements V1APIGroupFluentImpl.ServerAddressByClientCIDRsNested,Nested{ - ServerAddressByClientCIDRsNestedImpl(int index,V1ServerAddressByClientCIDR item) { - this.index = index; - this.builder = new V1ServerAddressByClientCIDRBuilder(this, item); - } - ServerAddressByClientCIDRsNestedImpl() { - this.index = -1; - this.builder = new V1ServerAddressByClientCIDRBuilder(this); - } - V1ServerAddressByClientCIDRBuilder builder; - int index; - public N and() { - return (N) V1APIGroupFluentImpl.this.setToServerAddressByClientCIDRs(index,builder.build()); - } - public N endServerAddressByClientCIDR() { - return and(); - } - - } - class VersionsNestedImpl extends V1GroupVersionForDiscoveryFluentImpl> implements V1APIGroupFluentImpl.VersionsNested,Nested{ - VersionsNestedImpl(int index,V1GroupVersionForDiscovery item) { - this.index = index; - this.builder = new V1GroupVersionForDiscoveryBuilder(this, item); - } - VersionsNestedImpl() { - this.index = -1; - this.builder = new V1GroupVersionForDiscoveryBuilder(this); - } - V1GroupVersionForDiscoveryBuilder builder; - int index; - public N and() { - return (N) V1APIGroupFluentImpl.this.setToVersions(index,builder.build()); - } - public N endVersion() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListBuilder.java index 09f300da27..1f781f6353 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIGroupListBuilder extends V1APIGroupListFluentImpl implements VisitableBuilder{ +public class V1APIGroupListBuilder extends V1APIGroupListFluent implements VisitableBuilder{ public V1APIGroupListBuilder() { - this(false); - } - public V1APIGroupListBuilder(Boolean validationEnabled) { - this(new V1APIGroupList(), validationEnabled); + this(new V1APIGroupList()); } + public V1APIGroupListBuilder(V1APIGroupListFluent fluent) { - this(fluent, false); - } - public V1APIGroupListBuilder(V1APIGroupListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIGroupList(), validationEnabled); + this(fluent, new V1APIGroupList()); } + public V1APIGroupListBuilder(V1APIGroupListFluent fluent,V1APIGroupList instance) { - this(fluent, instance, false); - } - public V1APIGroupListBuilder(V1APIGroupListFluent fluent,V1APIGroupList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withGroups(instance.getGroups()); - fluent.withKind(instance.getKind()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIGroupListBuilder(V1APIGroupList instance) { - this(instance,false); - } - public V1APIGroupListBuilder(V1APIGroupList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withGroups(instance.getGroups()); - this.withKind(instance.getKind()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIGroupListFluent fluent; - Boolean validationEnabled; + public V1APIGroupList build() { V1APIGroupList buildable = new V1APIGroupList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setGroups(fluent.getGroups()); + buildable.setGroups(fluent.buildGroups()); buildable.setKind(fluent.getKind()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListFluent.java index 0dfdbb9ca9..d60e3d8b8d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListFluent.java @@ -1,62 +1,259 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1APIGroupListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToGroups(int index,V1APIGroup item); - public A setToGroups(int index,V1APIGroup item); - public A addToGroups(io.kubernetes.client.openapi.models.V1APIGroup... items); - public A addAllToGroups(Collection items); - public A removeFromGroups(io.kubernetes.client.openapi.models.V1APIGroup... items); - public A removeAllFromGroups(Collection items); - public A removeMatchingFromGroups(Predicate predicate); - - /** - * This method has been deprecated, please use method buildGroups instead. - * @return The buildable object. - */ - @Deprecated - public List getGroups(); - public List buildGroups(); - public V1APIGroup buildGroup(int index); - public V1APIGroup buildFirstGroup(); - public V1APIGroup buildLastGroup(); - public V1APIGroup buildMatchingGroup(Predicate predicate); - public Boolean hasMatchingGroup(Predicate predicate); - public A withGroups(List groups); - public A withGroups(io.kubernetes.client.openapi.models.V1APIGroup... groups); - public Boolean hasGroups(); - public V1APIGroupListFluent.GroupsNested addNewGroup(); - public V1APIGroupListFluent.GroupsNested addNewGroupLike(V1APIGroup item); - public V1APIGroupListFluent.GroupsNested setNewGroupLike(int index,V1APIGroup item); - public V1APIGroupListFluent.GroupsNested editGroup(int index); - public V1APIGroupListFluent.GroupsNested editFirstGroup(); - public V1APIGroupListFluent.GroupsNested editLastGroup(); - public V1APIGroupListFluent.GroupsNested editMatchingGroup(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public interface GroupsNested extends Nested,V1APIGroupFluent>{ - public N and(); - public N endGroup(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIGroupListFluent> extends BaseFluent{ + public V1APIGroupListFluent() { + } + + public V1APIGroupListFluent(V1APIGroupList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList groups; + private String kind; + + protected void copyInstance(V1APIGroupList instance) { + instance = (instance != null ? instance : new V1APIGroupList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withGroups(instance.getGroups()); + this.withKind(instance.getKind()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToGroups(int index,V1APIGroup item) { + if (this.groups == null) {this.groups = new ArrayList();} + V1APIGroupBuilder builder = new V1APIGroupBuilder(item); + if (index < 0 || index >= groups.size()) { _visitables.get("groups").add(builder); groups.add(builder); } else { _visitables.get("groups").add(index, builder); groups.add(index, builder);} + return (A)this; + } + + public A setToGroups(int index,V1APIGroup item) { + if (this.groups == null) {this.groups = new ArrayList();} + V1APIGroupBuilder builder = new V1APIGroupBuilder(item); + if (index < 0 || index >= groups.size()) { _visitables.get("groups").add(builder); groups.add(builder); } else { _visitables.get("groups").set(index, builder); groups.set(index, builder);} + return (A)this; + } + + public A addToGroups(io.kubernetes.client.openapi.models.V1APIGroup... items) { + if (this.groups == null) {this.groups = new ArrayList();} + for (V1APIGroup item : items) {V1APIGroupBuilder builder = new V1APIGroupBuilder(item);_visitables.get("groups").add(builder);this.groups.add(builder);} return (A)this; + } + + public A addAllToGroups(Collection items) { + if (this.groups == null) {this.groups = new ArrayList();} + for (V1APIGroup item : items) {V1APIGroupBuilder builder = new V1APIGroupBuilder(item);_visitables.get("groups").add(builder);this.groups.add(builder);} return (A)this; + } + + public A removeFromGroups(io.kubernetes.client.openapi.models.V1APIGroup... items) { + if (this.groups == null) return (A)this; + for (V1APIGroup item : items) {V1APIGroupBuilder builder = new V1APIGroupBuilder(item);_visitables.get("groups").remove(builder); this.groups.remove(builder);} return (A)this; + } + + public A removeAllFromGroups(Collection items) { + if (this.groups == null) return (A)this; + for (V1APIGroup item : items) {V1APIGroupBuilder builder = new V1APIGroupBuilder(item);_visitables.get("groups").remove(builder); this.groups.remove(builder);} return (A)this; + } + + public A removeMatchingFromGroups(Predicate predicate) { + if (groups == null) return (A) this; + final Iterator each = groups.iterator(); + final List visitables = _visitables.get("groups"); + while (each.hasNext()) { + V1APIGroupBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildGroups() { + return this.groups != null ? build(groups) : null; + } + + public V1APIGroup buildGroup(int index) { + return this.groups.get(index).build(); + } + + public V1APIGroup buildFirstGroup() { + return this.groups.get(0).build(); + } + + public V1APIGroup buildLastGroup() { + return this.groups.get(groups.size() - 1).build(); + } + + public V1APIGroup buildMatchingGroup(Predicate predicate) { + for (V1APIGroupBuilder item : groups) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingGroup(Predicate predicate) { + for (V1APIGroupBuilder item : groups) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withGroups(List groups) { + if (this.groups != null) { + this._visitables.get("groups").clear(); + } + if (groups != null) { + this.groups = new ArrayList(); + for (V1APIGroup item : groups) { + this.addToGroups(item); + } + } else { + this.groups = null; + } + return (A) this; + } + + public A withGroups(io.kubernetes.client.openapi.models.V1APIGroup... groups) { + if (this.groups != null) { + this.groups.clear(); + _visitables.remove("groups"); + } + if (groups != null) { + for (V1APIGroup item : groups) { + this.addToGroups(item); + } + } + return (A) this; + } + + public boolean hasGroups() { + return this.groups != null && !this.groups.isEmpty(); + } + + public GroupsNested addNewGroup() { + return new GroupsNested(-1, null); + } + + public GroupsNested addNewGroupLike(V1APIGroup item) { + return new GroupsNested(-1, item); + } + + public GroupsNested setNewGroupLike(int index,V1APIGroup item) { + return new GroupsNested(index, item); + } + + public GroupsNested editGroup(int index) { + if (groups.size() <= index) throw new RuntimeException("Can't edit groups. Index exceeds size."); + return setNewGroupLike(index, buildGroup(index)); + } + + public GroupsNested editFirstGroup() { + if (groups.size() == 0) throw new RuntimeException("Can't edit first groups. The list is empty."); + return setNewGroupLike(0, buildGroup(0)); + } + + public GroupsNested editLastGroup() { + int index = groups.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last groups. The list is empty."); + return setNewGroupLike(index, buildGroup(index)); + } + + public GroupsNested editMatchingGroup(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1APIGroupFluent> implements Nested{ + GroupsNested(int index,V1APIGroup item) { + this.index = index; + this.builder = new V1APIGroupBuilder(this, item); + } + V1APIGroupBuilder builder; + int index; + + public N and() { + return (N) V1APIGroupListFluent.this.setToGroups(index,builder.build()); + } + + public N endGroup() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListFluentImpl.java deleted file mode 100644 index b9b4ef5082..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIGroupListFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIGroupListFluentImpl> extends BaseFluent implements V1APIGroupListFluent{ - public V1APIGroupListFluentImpl() { - } - public V1APIGroupListFluentImpl(V1APIGroupList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withGroups(instance.getGroups()); - this.withKind(instance.getKind()); - } - } - private String apiVersion; - private ArrayList groups; - private String kind; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToGroups(int index,V1APIGroup item) { - if (this.groups == null) {this.groups = new ArrayList();} - V1APIGroupBuilder builder = new V1APIGroupBuilder(item); - if (index < 0 || index >= groups.size()) { _visitables.get("groups").add(builder); groups.add(builder); } else { _visitables.get("groups").add(index, builder); groups.add(index, builder);} - return (A)this; - } - public A setToGroups(int index,V1APIGroup item) { - if (this.groups == null) {this.groups = new ArrayList();} - V1APIGroupBuilder builder = new V1APIGroupBuilder(item); - if (index < 0 || index >= groups.size()) { _visitables.get("groups").add(builder); groups.add(builder); } else { _visitables.get("groups").set(index, builder); groups.set(index, builder);} - return (A)this; - } - public A addToGroups(io.kubernetes.client.openapi.models.V1APIGroup... items) { - if (this.groups == null) {this.groups = new ArrayList();} - for (V1APIGroup item : items) {V1APIGroupBuilder builder = new V1APIGroupBuilder(item);_visitables.get("groups").add(builder);this.groups.add(builder);} return (A)this; - } - public A addAllToGroups(Collection items) { - if (this.groups == null) {this.groups = new ArrayList();} - for (V1APIGroup item : items) {V1APIGroupBuilder builder = new V1APIGroupBuilder(item);_visitables.get("groups").add(builder);this.groups.add(builder);} return (A)this; - } - public A removeFromGroups(io.kubernetes.client.openapi.models.V1APIGroup... items) { - for (V1APIGroup item : items) {V1APIGroupBuilder builder = new V1APIGroupBuilder(item);_visitables.get("groups").remove(builder);if (this.groups != null) {this.groups.remove(builder);}} return (A)this; - } - public A removeAllFromGroups(Collection items) { - for (V1APIGroup item : items) {V1APIGroupBuilder builder = new V1APIGroupBuilder(item);_visitables.get("groups").remove(builder);if (this.groups != null) {this.groups.remove(builder);}} return (A)this; - } - public A removeMatchingFromGroups(Predicate predicate) { - if (groups == null) return (A) this; - final Iterator each = groups.iterator(); - final List visitables = _visitables.get("groups"); - while (each.hasNext()) { - V1APIGroupBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildGroups instead. - * @return The buildable object. - */ - @Deprecated - public List getGroups() { - return groups != null ? build(groups) : null; - } - public List buildGroups() { - return groups != null ? build(groups) : null; - } - public V1APIGroup buildGroup(int index) { - return this.groups.get(index).build(); - } - public V1APIGroup buildFirstGroup() { - return this.groups.get(0).build(); - } - public V1APIGroup buildLastGroup() { - return this.groups.get(groups.size() - 1).build(); - } - public V1APIGroup buildMatchingGroup(Predicate predicate) { - for (V1APIGroupBuilder item: groups) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingGroup(Predicate predicate) { - for (V1APIGroupBuilder item: groups) { if(predicate.test(item)){ return true;} } return false; - } - public A withGroups(List groups) { - if (this.groups != null) { _visitables.get("groups").clear();} - if (groups != null) {this.groups = new ArrayList(); for (V1APIGroup item : groups){this.addToGroups(item);}} else { this.groups = null;} return (A) this; - } - public A withGroups(io.kubernetes.client.openapi.models.V1APIGroup... groups) { - if (this.groups != null) {this.groups.clear(); _visitables.remove("groups"); } - if (groups != null) {for (V1APIGroup item :groups){ this.addToGroups(item);}} return (A) this; - } - public Boolean hasGroups() { - return groups != null && !groups.isEmpty(); - } - public V1APIGroupListFluentImpl.GroupsNested addNewGroup() { - return new V1APIGroupListFluentImpl.GroupsNestedImpl(); - } - public V1APIGroupListFluentImpl.GroupsNested addNewGroupLike(V1APIGroup item) { - return new V1APIGroupListFluentImpl.GroupsNestedImpl(-1, item); - } - public V1APIGroupListFluentImpl.GroupsNested setNewGroupLike(int index,V1APIGroup item) { - return new V1APIGroupListFluentImpl.GroupsNestedImpl(index, item); - } - public V1APIGroupListFluentImpl.GroupsNested editGroup(int index) { - if (groups.size() <= index) throw new RuntimeException("Can't edit groups. Index exceeds size."); - return setNewGroupLike(index, buildGroup(index)); - } - public V1APIGroupListFluentImpl.GroupsNested editFirstGroup() { - if (groups.size() == 0) throw new RuntimeException("Can't edit first groups. The list is empty."); - return setNewGroupLike(0, buildGroup(0)); - } - public V1APIGroupListFluentImpl.GroupsNested editLastGroup() { - int index = groups.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last groups. The list is empty."); - return setNewGroupLike(index, buildGroup(index)); - } - public V1APIGroupListFluentImpl.GroupsNested editMatchingGroup(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1APIGroupFluentImpl> implements V1APIGroupListFluentImpl.GroupsNested,Nested{ - GroupsNestedImpl(int index,V1APIGroup item) { - this.index = index; - this.builder = new V1APIGroupBuilder(this, item); - } - GroupsNestedImpl() { - this.index = -1; - this.builder = new V1APIGroupBuilder(this); - } - V1APIGroupBuilder builder; - int index; - public N and() { - return (N) V1APIGroupListFluentImpl.this.setToGroups(index,builder.build()); - } - public N endGroup() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceBuilder.java index 669ec18e3c..be36f56ed5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceBuilder.java @@ -1,60 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIResourceBuilder extends V1APIResourceFluentImpl implements VisitableBuilder{ +public class V1APIResourceBuilder extends V1APIResourceFluent implements VisitableBuilder{ public V1APIResourceBuilder() { - this(false); - } - public V1APIResourceBuilder(Boolean validationEnabled) { - this(new V1APIResource(), validationEnabled); + this(new V1APIResource()); } + public V1APIResourceBuilder(V1APIResourceFluent fluent) { - this(fluent, false); - } - public V1APIResourceBuilder(V1APIResourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIResource(), validationEnabled); + this(fluent, new V1APIResource()); } + public V1APIResourceBuilder(V1APIResourceFluent fluent,V1APIResource instance) { - this(fluent, instance, false); - } - public V1APIResourceBuilder(V1APIResourceFluent fluent,V1APIResource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCategories(instance.getCategories()); - fluent.withGroup(instance.getGroup()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withNamespaced(instance.getNamespaced()); - fluent.withShortNames(instance.getShortNames()); - fluent.withSingularName(instance.getSingularName()); - fluent.withStorageVersionHash(instance.getStorageVersionHash()); - fluent.withVerbs(instance.getVerbs()); - fluent.withVersion(instance.getVersion()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIResourceBuilder(V1APIResource instance) { - this(instance,false); - } - public V1APIResourceBuilder(V1APIResource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCategories(instance.getCategories()); - this.withGroup(instance.getGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespaced(instance.getNamespaced()); - this.withShortNames(instance.getShortNames()); - this.withSingularName(instance.getSingularName()); - this.withStorageVersionHash(instance.getStorageVersionHash()); - this.withVerbs(instance.getVerbs()); - this.withVersion(instance.getVersion()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIResourceFluent fluent; - Boolean validationEnabled; + public V1APIResource build() { V1APIResource buildable = new V1APIResource(); buildable.setCategories(fluent.getCategories()); @@ -70,4 +36,5 @@ public V1APIResource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceFluent.java index 46e915f998..6df5372208 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceFluent.java @@ -1,84 +1,468 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1APIResourceFluent> extends Fluent{ - public A addToCategories(int index,String item); - public A setToCategories(int index,String item); - public A addToCategories(java.lang.String... items); - public A addAllToCategories(Collection items); - public A removeFromCategories(java.lang.String... items); - public A removeAllFromCategories(Collection items); - public List getCategories(); - public String getCategory(int index); - public String getFirstCategory(); - public String getLastCategory(); - public String getMatchingCategory(Predicate predicate); - public Boolean hasMatchingCategory(Predicate predicate); - public A withCategories(List categories); - public A withCategories(java.lang.String... categories); - public Boolean hasCategories(); - public String getGroup(); - public A withGroup(String group); - public Boolean hasGroup(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getNamespaced(); - public A withNamespaced(Boolean namespaced); - public Boolean hasNamespaced(); - public A addToShortNames(int index,String item); - public A setToShortNames(int index,String item); - public A addToShortNames(java.lang.String... items); - public A addAllToShortNames(Collection items); - public A removeFromShortNames(java.lang.String... items); - public A removeAllFromShortNames(Collection items); - public List getShortNames(); - public String getShortName(int index); - public String getFirstShortName(); - public String getLastShortName(); - public String getMatchingShortName(Predicate predicate); - public Boolean hasMatchingShortName(Predicate predicate); - public A withShortNames(List shortNames); - public A withShortNames(java.lang.String... shortNames); - public Boolean hasShortNames(); - public String getSingularName(); - public A withSingularName(String singularName); - public Boolean hasSingularName(); - public String getStorageVersionHash(); - public A withStorageVersionHash(String storageVersionHash); - public Boolean hasStorageVersionHash(); - public A addToVerbs(int index,String item); - public A setToVerbs(int index,String item); - public A addToVerbs(java.lang.String... items); - public A addAllToVerbs(Collection items); - public A removeFromVerbs(java.lang.String... items); - public A removeAllFromVerbs(Collection items); - public List getVerbs(); - public String getVerb(int index); - public String getFirstVerb(); - public String getLastVerb(); - public String getMatchingVerb(Predicate predicate); - public Boolean hasMatchingVerb(Predicate predicate); - public A withVerbs(List verbs); - public A withVerbs(java.lang.String... verbs); - public Boolean hasVerbs(); - public String getVersion(); - public A withVersion(String version); - public Boolean hasVersion(); - public A withNamespaced(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIResourceFluent> extends BaseFluent{ + public V1APIResourceFluent() { + } + public V1APIResourceFluent(V1APIResource instance) { + this.copyInstance(instance); + } + private List categories; + private String group; + private String kind; + private String name; + private Boolean namespaced; + private List shortNames; + private String singularName; + private String storageVersionHash; + private List verbs; + private String version; + + protected void copyInstance(V1APIResource instance) { + instance = (instance != null ? instance : new V1APIResource()); + if (instance != null) { + this.withCategories(instance.getCategories()); + this.withGroup(instance.getGroup()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withNamespaced(instance.getNamespaced()); + this.withShortNames(instance.getShortNames()); + this.withSingularName(instance.getSingularName()); + this.withStorageVersionHash(instance.getStorageVersionHash()); + this.withVerbs(instance.getVerbs()); + this.withVersion(instance.getVersion()); + } + } + + public A addToCategories(int index,String item) { + if (this.categories == null) {this.categories = new ArrayList();} + this.categories.add(index, item); + return (A)this; + } + + public A setToCategories(int index,String item) { + if (this.categories == null) {this.categories = new ArrayList();} + this.categories.set(index, item); return (A)this; + } + + public A addToCategories(java.lang.String... items) { + if (this.categories == null) {this.categories = new ArrayList();} + for (String item : items) {this.categories.add(item);} return (A)this; + } + + public A addAllToCategories(Collection items) { + if (this.categories == null) {this.categories = new ArrayList();} + for (String item : items) {this.categories.add(item);} return (A)this; + } + + public A removeFromCategories(java.lang.String... items) { + if (this.categories == null) return (A)this; + for (String item : items) { this.categories.remove(item);} return (A)this; + } + + public A removeAllFromCategories(Collection items) { + if (this.categories == null) return (A)this; + for (String item : items) { this.categories.remove(item);} return (A)this; + } + + public List getCategories() { + return this.categories; + } + + public String getCategory(int index) { + return this.categories.get(index); + } + + public String getFirstCategory() { + return this.categories.get(0); + } + + public String getLastCategory() { + return this.categories.get(categories.size() - 1); + } + + public String getMatchingCategory(Predicate predicate) { + for (String item : categories) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingCategory(Predicate predicate) { + for (String item : categories) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withCategories(List categories) { + if (categories != null) { + this.categories = new ArrayList(); + for (String item : categories) { + this.addToCategories(item); + } + } else { + this.categories = null; + } + return (A) this; + } + + public A withCategories(java.lang.String... categories) { + if (this.categories != null) { + this.categories.clear(); + _visitables.remove("categories"); + } + if (categories != null) { + for (String item : categories) { + this.addToCategories(item); + } + } + return (A) this; + } + + public boolean hasCategories() { + return this.categories != null && !this.categories.isEmpty(); + } + + public String getGroup() { + return this.group; + } + + public A withGroup(String group) { + this.group = group; + return (A) this; + } + + public boolean hasGroup() { + return this.group != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Boolean getNamespaced() { + return this.namespaced; + } + + public A withNamespaced(Boolean namespaced) { + this.namespaced = namespaced; + return (A) this; + } + + public boolean hasNamespaced() { + return this.namespaced != null; + } + + public A addToShortNames(int index,String item) { + if (this.shortNames == null) {this.shortNames = new ArrayList();} + this.shortNames.add(index, item); + return (A)this; + } + + public A setToShortNames(int index,String item) { + if (this.shortNames == null) {this.shortNames = new ArrayList();} + this.shortNames.set(index, item); return (A)this; + } + + public A addToShortNames(java.lang.String... items) { + if (this.shortNames == null) {this.shortNames = new ArrayList();} + for (String item : items) {this.shortNames.add(item);} return (A)this; + } + + public A addAllToShortNames(Collection items) { + if (this.shortNames == null) {this.shortNames = new ArrayList();} + for (String item : items) {this.shortNames.add(item);} return (A)this; + } + + public A removeFromShortNames(java.lang.String... items) { + if (this.shortNames == null) return (A)this; + for (String item : items) { this.shortNames.remove(item);} return (A)this; + } + + public A removeAllFromShortNames(Collection items) { + if (this.shortNames == null) return (A)this; + for (String item : items) { this.shortNames.remove(item);} return (A)this; + } + + public List getShortNames() { + return this.shortNames; + } + + public String getShortName(int index) { + return this.shortNames.get(index); + } + + public String getFirstShortName() { + return this.shortNames.get(0); + } + + public String getLastShortName() { + return this.shortNames.get(shortNames.size() - 1); + } + + public String getMatchingShortName(Predicate predicate) { + for (String item : shortNames) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingShortName(Predicate predicate) { + for (String item : shortNames) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withShortNames(List shortNames) { + if (shortNames != null) { + this.shortNames = new ArrayList(); + for (String item : shortNames) { + this.addToShortNames(item); + } + } else { + this.shortNames = null; + } + return (A) this; + } + + public A withShortNames(java.lang.String... shortNames) { + if (this.shortNames != null) { + this.shortNames.clear(); + _visitables.remove("shortNames"); + } + if (shortNames != null) { + for (String item : shortNames) { + this.addToShortNames(item); + } + } + return (A) this; + } + + public boolean hasShortNames() { + return this.shortNames != null && !this.shortNames.isEmpty(); + } + + public String getSingularName() { + return this.singularName; + } + + public A withSingularName(String singularName) { + this.singularName = singularName; + return (A) this; + } + + public boolean hasSingularName() { + return this.singularName != null; + } + + public String getStorageVersionHash() { + return this.storageVersionHash; + } + + public A withStorageVersionHash(String storageVersionHash) { + this.storageVersionHash = storageVersionHash; + return (A) this; + } + + public boolean hasStorageVersionHash() { + return this.storageVersionHash != null; + } + + public A addToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.add(index, item); + return (A)this; + } + + public A setToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.set(index, item); return (A)this; + } + + public A addToVerbs(java.lang.String... items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A addAllToVerbs(Collection items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A removeFromVerbs(java.lang.String... items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public A removeAllFromVerbs(Collection items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public List getVerbs() { + return this.verbs; + } + + public String getVerb(int index) { + return this.verbs.get(index); + } + + public String getFirstVerb() { + return this.verbs.get(0); + } + + public String getLastVerb() { + return this.verbs.get(verbs.size() - 1); + } + + public String getMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVerbs(List verbs) { + if (verbs != null) { + this.verbs = new ArrayList(); + for (String item : verbs) { + this.addToVerbs(item); + } + } else { + this.verbs = null; + } + return (A) this; + } + + public A withVerbs(java.lang.String... verbs) { + if (this.verbs != null) { + this.verbs.clear(); + _visitables.remove("verbs"); + } + if (verbs != null) { + for (String item : verbs) { + this.addToVerbs(item); + } + } + return (A) this; + } + + public boolean hasVerbs() { + return this.verbs != null && !this.verbs.isEmpty(); + } + + public String getVersion() { + return this.version; + } + + public A withVersion(String version) { + this.version = version; + return (A) this; + } + + public boolean hasVersion() { + return this.version != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1APIResourceFluent that = (V1APIResourceFluent) o; + if (!java.util.Objects.equals(categories, that.categories)) return false; + if (!java.util.Objects.equals(group, that.group)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespaced, that.namespaced)) return false; + if (!java.util.Objects.equals(shortNames, that.shortNames)) return false; + if (!java.util.Objects.equals(singularName, that.singularName)) return false; + if (!java.util.Objects.equals(storageVersionHash, that.storageVersionHash)) return false; + if (!java.util.Objects.equals(verbs, that.verbs)) return false; + if (!java.util.Objects.equals(version, that.version)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(categories, group, kind, name, namespaced, shortNames, singularName, storageVersionHash, verbs, version, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (categories != null && !categories.isEmpty()) { sb.append("categories:"); sb.append(categories + ","); } + if (group != null) { sb.append("group:"); sb.append(group + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespaced != null) { sb.append("namespaced:"); sb.append(namespaced + ","); } + if (shortNames != null && !shortNames.isEmpty()) { sb.append("shortNames:"); sb.append(shortNames + ","); } + if (singularName != null) { sb.append("singularName:"); sb.append(singularName + ","); } + if (storageVersionHash != null) { sb.append("storageVersionHash:"); sb.append(storageVersionHash + ","); } + if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs + ","); } + if (version != null) { sb.append("version:"); sb.append(version); } + sb.append("}"); + return sb.toString(); + } + + public A withNamespaced() { + return withNamespaced(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceFluentImpl.java deleted file mode 100644 index b66ae9cf34..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceFluentImpl.java +++ /dev/null @@ -1,310 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIResourceFluentImpl> extends BaseFluent implements V1APIResourceFluent{ - public V1APIResourceFluentImpl() { - } - public V1APIResourceFluentImpl(V1APIResource instance) { - if (instance != null) { - this.withCategories(instance.getCategories()); - this.withGroup(instance.getGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespaced(instance.getNamespaced()); - this.withShortNames(instance.getShortNames()); - this.withSingularName(instance.getSingularName()); - this.withStorageVersionHash(instance.getStorageVersionHash()); - this.withVerbs(instance.getVerbs()); - this.withVersion(instance.getVersion()); - } - } - private List categories; - private String group; - private String kind; - private String name; - private Boolean namespaced; - private List shortNames; - private String singularName; - private String storageVersionHash; - private List verbs; - private String version; - public A addToCategories(int index,String item) { - if (this.categories == null) {this.categories = new ArrayList();} - this.categories.add(index, item); - return (A)this; - } - public A setToCategories(int index,String item) { - if (this.categories == null) {this.categories = new ArrayList();} - this.categories.set(index, item); return (A)this; - } - public A addToCategories(java.lang.String... items) { - if (this.categories == null) {this.categories = new ArrayList();} - for (String item : items) {this.categories.add(item);} return (A)this; - } - public A addAllToCategories(Collection items) { - if (this.categories == null) {this.categories = new ArrayList();} - for (String item : items) {this.categories.add(item);} return (A)this; - } - public A removeFromCategories(java.lang.String... items) { - for (String item : items) {if (this.categories!= null){ this.categories.remove(item);}} return (A)this; - } - public A removeAllFromCategories(Collection items) { - for (String item : items) {if (this.categories!= null){ this.categories.remove(item);}} return (A)this; - } - public List getCategories() { - return this.categories; - } - public String getCategory(int index) { - return this.categories.get(index); - } - public String getFirstCategory() { - return this.categories.get(0); - } - public String getLastCategory() { - return this.categories.get(categories.size() - 1); - } - public String getMatchingCategory(Predicate predicate) { - for (String item: categories) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingCategory(Predicate predicate) { - for (String item: categories) { if(predicate.test(item)){ return true;} } return false; - } - public A withCategories(List categories) { - if (categories != null) {this.categories = new ArrayList(); for (String item : categories){this.addToCategories(item);}} else { this.categories = null;} return (A) this; - } - public A withCategories(java.lang.String... categories) { - if (this.categories != null) {this.categories.clear(); _visitables.remove("categories"); } - if (categories != null) {for (String item :categories){ this.addToCategories(item);}} return (A) this; - } - public Boolean hasCategories() { - return categories != null && !categories.isEmpty(); - } - public String getGroup() { - return this.group; - } - public A withGroup(String group) { - this.group=group; return (A) this; - } - public Boolean hasGroup() { - return this.group != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Boolean getNamespaced() { - return this.namespaced; - } - public A withNamespaced(Boolean namespaced) { - this.namespaced=namespaced; return (A) this; - } - public Boolean hasNamespaced() { - return this.namespaced != null; - } - public A addToShortNames(int index,String item) { - if (this.shortNames == null) {this.shortNames = new ArrayList();} - this.shortNames.add(index, item); - return (A)this; - } - public A setToShortNames(int index,String item) { - if (this.shortNames == null) {this.shortNames = new ArrayList();} - this.shortNames.set(index, item); return (A)this; - } - public A addToShortNames(java.lang.String... items) { - if (this.shortNames == null) {this.shortNames = new ArrayList();} - for (String item : items) {this.shortNames.add(item);} return (A)this; - } - public A addAllToShortNames(Collection items) { - if (this.shortNames == null) {this.shortNames = new ArrayList();} - for (String item : items) {this.shortNames.add(item);} return (A)this; - } - public A removeFromShortNames(java.lang.String... items) { - for (String item : items) {if (this.shortNames!= null){ this.shortNames.remove(item);}} return (A)this; - } - public A removeAllFromShortNames(Collection items) { - for (String item : items) {if (this.shortNames!= null){ this.shortNames.remove(item);}} return (A)this; - } - public List getShortNames() { - return this.shortNames; - } - public String getShortName(int index) { - return this.shortNames.get(index); - } - public String getFirstShortName() { - return this.shortNames.get(0); - } - public String getLastShortName() { - return this.shortNames.get(shortNames.size() - 1); - } - public String getMatchingShortName(Predicate predicate) { - for (String item: shortNames) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingShortName(Predicate predicate) { - for (String item: shortNames) { if(predicate.test(item)){ return true;} } return false; - } - public A withShortNames(List shortNames) { - if (shortNames != null) {this.shortNames = new ArrayList(); for (String item : shortNames){this.addToShortNames(item);}} else { this.shortNames = null;} return (A) this; - } - public A withShortNames(java.lang.String... shortNames) { - if (this.shortNames != null) {this.shortNames.clear(); _visitables.remove("shortNames"); } - if (shortNames != null) {for (String item :shortNames){ this.addToShortNames(item);}} return (A) this; - } - public Boolean hasShortNames() { - return shortNames != null && !shortNames.isEmpty(); - } - public String getSingularName() { - return this.singularName; - } - public A withSingularName(String singularName) { - this.singularName=singularName; return (A) this; - } - public Boolean hasSingularName() { - return this.singularName != null; - } - public String getStorageVersionHash() { - return this.storageVersionHash; - } - public A withStorageVersionHash(String storageVersionHash) { - this.storageVersionHash=storageVersionHash; return (A) this; - } - public Boolean hasStorageVersionHash() { - return this.storageVersionHash != null; - } - public A addToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.add(index, item); - return (A)this; - } - public A setToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.set(index, item); return (A)this; - } - public A addToVerbs(java.lang.String... items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A addAllToVerbs(Collection items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A removeFromVerbs(java.lang.String... items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public A removeAllFromVerbs(Collection items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public List getVerbs() { - return this.verbs; - } - public String getVerb(int index) { - return this.verbs.get(index); - } - public String getFirstVerb() { - return this.verbs.get(0); - } - public String getLastVerb() { - return this.verbs.get(verbs.size() - 1); - } - public String getMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return true;} } return false; - } - public A withVerbs(List verbs) { - if (verbs != null) {this.verbs = new ArrayList(); for (String item : verbs){this.addToVerbs(item);}} else { this.verbs = null;} return (A) this; - } - public A withVerbs(java.lang.String... verbs) { - if (this.verbs != null) {this.verbs.clear(); _visitables.remove("verbs"); } - if (verbs != null) {for (String item :verbs){ this.addToVerbs(item);}} return (A) this; - } - public Boolean hasVerbs() { - return verbs != null && !verbs.isEmpty(); - } - public String getVersion() { - return this.version; - } - public A withVersion(String version) { - this.version=version; return (A) this; - } - public Boolean hasVersion() { - return this.version != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1APIResourceFluentImpl that = (V1APIResourceFluentImpl) o; - if (!java.util.Objects.equals(categories, that.categories)) return false; - - if (!java.util.Objects.equals(group, that.group)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespaced, that.namespaced)) return false; - - if (!java.util.Objects.equals(shortNames, that.shortNames)) return false; - - if (!java.util.Objects.equals(singularName, that.singularName)) return false; - - if (!java.util.Objects.equals(storageVersionHash, that.storageVersionHash)) return false; - - if (!java.util.Objects.equals(verbs, that.verbs)) return false; - - if (!java.util.Objects.equals(version, that.version)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(categories, group, kind, name, namespaced, shortNames, singularName, storageVersionHash, verbs, version, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (categories != null && !categories.isEmpty()) { sb.append("categories:"); sb.append(categories + ","); } - if (group != null) { sb.append("group:"); sb.append(group + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespaced != null) { sb.append("namespaced:"); sb.append(namespaced + ","); } - if (shortNames != null && !shortNames.isEmpty()) { sb.append("shortNames:"); sb.append(shortNames + ","); } - if (singularName != null) { sb.append("singularName:"); sb.append(singularName + ","); } - if (storageVersionHash != null) { sb.append("storageVersionHash:"); sb.append(storageVersionHash + ","); } - if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs + ","); } - if (version != null) { sb.append("version:"); sb.append(version); } - sb.append("}"); - return sb.toString(); - } - public A withNamespaced() { - return withNamespaced(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListBuilder.java index b2ce494e29..f32a940d62 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIResourceListBuilder extends V1APIResourceListFluentImpl implements VisitableBuilder{ +public class V1APIResourceListBuilder extends V1APIResourceListFluent implements VisitableBuilder{ public V1APIResourceListBuilder() { - this(false); - } - public V1APIResourceListBuilder(Boolean validationEnabled) { - this(new V1APIResourceList(), validationEnabled); + this(new V1APIResourceList()); } + public V1APIResourceListBuilder(V1APIResourceListFluent fluent) { - this(fluent, false); - } - public V1APIResourceListBuilder(V1APIResourceListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIResourceList(), validationEnabled); + this(fluent, new V1APIResourceList()); } + public V1APIResourceListBuilder(V1APIResourceListFluent fluent,V1APIResourceList instance) { - this(fluent, instance, false); - } - public V1APIResourceListBuilder(V1APIResourceListFluent fluent,V1APIResourceList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withGroupVersion(instance.getGroupVersion()); - fluent.withKind(instance.getKind()); - fluent.withResources(instance.getResources()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIResourceListBuilder(V1APIResourceList instance) { - this(instance,false); - } - public V1APIResourceListBuilder(V1APIResourceList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withGroupVersion(instance.getGroupVersion()); - this.withKind(instance.getKind()); - this.withResources(instance.getResources()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIResourceListFluent fluent; - Boolean validationEnabled; + public V1APIResourceList build() { V1APIResourceList buildable = new V1APIResourceList(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setGroupVersion(fluent.getGroupVersion()); buildable.setKind(fluent.getKind()); - buildable.setResources(fluent.getResources()); + buildable.setResources(fluent.buildResources()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListFluent.java index 758d7b55d9..489fca8a00 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListFluent.java @@ -1,65 +1,276 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1APIResourceListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getGroupVersion(); - public A withGroupVersion(String groupVersion); - public Boolean hasGroupVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public A addToResources(int index,V1APIResource item); - public A setToResources(int index,V1APIResource item); - public A addToResources(io.kubernetes.client.openapi.models.V1APIResource... items); - public A addAllToResources(Collection items); - public A removeFromResources(io.kubernetes.client.openapi.models.V1APIResource... items); - public A removeAllFromResources(Collection items); - public A removeMatchingFromResources(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResources instead. - * @return The buildable object. - */ - @Deprecated - public List getResources(); - public List buildResources(); - public V1APIResource buildResource(int index); - public V1APIResource buildFirstResource(); - public V1APIResource buildLastResource(); - public V1APIResource buildMatchingResource(Predicate predicate); - public Boolean hasMatchingResource(Predicate predicate); - public A withResources(List resources); - public A withResources(io.kubernetes.client.openapi.models.V1APIResource... resources); - public Boolean hasResources(); - public V1APIResourceListFluent.ResourcesNested addNewResource(); - public V1APIResourceListFluent.ResourcesNested addNewResourceLike(V1APIResource item); - public V1APIResourceListFluent.ResourcesNested setNewResourceLike(int index,V1APIResource item); - public V1APIResourceListFluent.ResourcesNested editResource(int index); - public V1APIResourceListFluent.ResourcesNested editFirstResource(); - public V1APIResourceListFluent.ResourcesNested editLastResource(); - public V1APIResourceListFluent.ResourcesNested editMatchingResource(Predicate predicate); - public interface ResourcesNested extends Nested,V1APIResourceFluent>{ - public N and(); - public N endResource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIResourceListFluent> extends BaseFluent{ + public V1APIResourceListFluent() { + } + + public V1APIResourceListFluent(V1APIResourceList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String groupVersion; + private String kind; + private ArrayList resources; + + protected void copyInstance(V1APIResourceList instance) { + instance = (instance != null ? instance : new V1APIResourceList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withGroupVersion(instance.getGroupVersion()); + this.withKind(instance.getKind()); + this.withResources(instance.getResources()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getGroupVersion() { + return this.groupVersion; + } + + public A withGroupVersion(String groupVersion) { + this.groupVersion = groupVersion; + return (A) this; + } + + public boolean hasGroupVersion() { + return this.groupVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public A addToResources(int index,V1APIResource item) { + if (this.resources == null) {this.resources = new ArrayList();} + V1APIResourceBuilder builder = new V1APIResourceBuilder(item); + if (index < 0 || index >= resources.size()) { _visitables.get("resources").add(builder); resources.add(builder); } else { _visitables.get("resources").add(index, builder); resources.add(index, builder);} + return (A)this; + } + + public A setToResources(int index,V1APIResource item) { + if (this.resources == null) {this.resources = new ArrayList();} + V1APIResourceBuilder builder = new V1APIResourceBuilder(item); + if (index < 0 || index >= resources.size()) { _visitables.get("resources").add(builder); resources.add(builder); } else { _visitables.get("resources").set(index, builder); resources.set(index, builder);} + return (A)this; + } + + public A addToResources(io.kubernetes.client.openapi.models.V1APIResource... items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (V1APIResource item : items) {V1APIResourceBuilder builder = new V1APIResourceBuilder(item);_visitables.get("resources").add(builder);this.resources.add(builder);} return (A)this; + } + + public A addAllToResources(Collection items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (V1APIResource item : items) {V1APIResourceBuilder builder = new V1APIResourceBuilder(item);_visitables.get("resources").add(builder);this.resources.add(builder);} return (A)this; + } + + public A removeFromResources(io.kubernetes.client.openapi.models.V1APIResource... items) { + if (this.resources == null) return (A)this; + for (V1APIResource item : items) {V1APIResourceBuilder builder = new V1APIResourceBuilder(item);_visitables.get("resources").remove(builder); this.resources.remove(builder);} return (A)this; + } + + public A removeAllFromResources(Collection items) { + if (this.resources == null) return (A)this; + for (V1APIResource item : items) {V1APIResourceBuilder builder = new V1APIResourceBuilder(item);_visitables.get("resources").remove(builder); this.resources.remove(builder);} return (A)this; + } + + public A removeMatchingFromResources(Predicate predicate) { + if (resources == null) return (A) this; + final Iterator each = resources.iterator(); + final List visitables = _visitables.get("resources"); + while (each.hasNext()) { + V1APIResourceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResources() { + return this.resources != null ? build(resources) : null; + } + + public V1APIResource buildResource(int index) { + return this.resources.get(index).build(); + } + + public V1APIResource buildFirstResource() { + return this.resources.get(0).build(); + } + + public V1APIResource buildLastResource() { + return this.resources.get(resources.size() - 1).build(); + } + + public V1APIResource buildMatchingResource(Predicate predicate) { + for (V1APIResourceBuilder item : resources) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResource(Predicate predicate) { + for (V1APIResourceBuilder item : resources) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResources(List resources) { + if (this.resources != null) { + this._visitables.get("resources").clear(); + } + if (resources != null) { + this.resources = new ArrayList(); + for (V1APIResource item : resources) { + this.addToResources(item); + } + } else { + this.resources = null; + } + return (A) this; + } + + public A withResources(io.kubernetes.client.openapi.models.V1APIResource... resources) { + if (this.resources != null) { + this.resources.clear(); + _visitables.remove("resources"); + } + if (resources != null) { + for (V1APIResource item : resources) { + this.addToResources(item); + } + } + return (A) this; + } + + public boolean hasResources() { + return this.resources != null && !this.resources.isEmpty(); + } + + public ResourcesNested addNewResource() { + return new ResourcesNested(-1, null); + } + + public ResourcesNested addNewResourceLike(V1APIResource item) { + return new ResourcesNested(-1, item); + } + + public ResourcesNested setNewResourceLike(int index,V1APIResource item) { + return new ResourcesNested(index, item); + } + + public ResourcesNested editResource(int index) { + if (resources.size() <= index) throw new RuntimeException("Can't edit resources. Index exceeds size."); + return setNewResourceLike(index, buildResource(index)); + } + + public ResourcesNested editFirstResource() { + if (resources.size() == 0) throw new RuntimeException("Can't edit first resources. The list is empty."); + return setNewResourceLike(0, buildResource(0)); + } + + public ResourcesNested editLastResource() { + int index = resources.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resources. The list is empty."); + return setNewResourceLike(index, buildResource(index)); + } + + public ResourcesNested editMatchingResource(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1APIResourceFluent> implements Nested{ + ResourcesNested(int index,V1APIResource item) { + this.index = index; + this.builder = new V1APIResourceBuilder(this, item); + } + V1APIResourceBuilder builder; + int index; + + public N and() { + return (N) V1APIResourceListFluent.this.setToResources(index,builder.build()); + } + + public N endResource() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListFluentImpl.java deleted file mode 100644 index e35077a294..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIResourceListFluentImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIResourceListFluentImpl> extends BaseFluent implements V1APIResourceListFluent{ - public V1APIResourceListFluentImpl() { - } - public V1APIResourceListFluentImpl(V1APIResourceList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withGroupVersion(instance.getGroupVersion()); - this.withKind(instance.getKind()); - this.withResources(instance.getResources()); - } - } - private String apiVersion; - private String groupVersion; - private String kind; - private ArrayList resources; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getGroupVersion() { - return this.groupVersion; - } - public A withGroupVersion(String groupVersion) { - this.groupVersion=groupVersion; return (A) this; - } - public Boolean hasGroupVersion() { - return this.groupVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public A addToResources(int index,V1APIResource item) { - if (this.resources == null) {this.resources = new ArrayList();} - V1APIResourceBuilder builder = new V1APIResourceBuilder(item); - if (index < 0 || index >= resources.size()) { _visitables.get("resources").add(builder); resources.add(builder); } else { _visitables.get("resources").add(index, builder); resources.add(index, builder);} - return (A)this; - } - public A setToResources(int index,V1APIResource item) { - if (this.resources == null) {this.resources = new ArrayList();} - V1APIResourceBuilder builder = new V1APIResourceBuilder(item); - if (index < 0 || index >= resources.size()) { _visitables.get("resources").add(builder); resources.add(builder); } else { _visitables.get("resources").set(index, builder); resources.set(index, builder);} - return (A)this; - } - public A addToResources(io.kubernetes.client.openapi.models.V1APIResource... items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (V1APIResource item : items) {V1APIResourceBuilder builder = new V1APIResourceBuilder(item);_visitables.get("resources").add(builder);this.resources.add(builder);} return (A)this; - } - public A addAllToResources(Collection items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (V1APIResource item : items) {V1APIResourceBuilder builder = new V1APIResourceBuilder(item);_visitables.get("resources").add(builder);this.resources.add(builder);} return (A)this; - } - public A removeFromResources(io.kubernetes.client.openapi.models.V1APIResource... items) { - for (V1APIResource item : items) {V1APIResourceBuilder builder = new V1APIResourceBuilder(item);_visitables.get("resources").remove(builder);if (this.resources != null) {this.resources.remove(builder);}} return (A)this; - } - public A removeAllFromResources(Collection items) { - for (V1APIResource item : items) {V1APIResourceBuilder builder = new V1APIResourceBuilder(item);_visitables.get("resources").remove(builder);if (this.resources != null) {this.resources.remove(builder);}} return (A)this; - } - public A removeMatchingFromResources(Predicate predicate) { - if (resources == null) return (A) this; - final Iterator each = resources.iterator(); - final List visitables = _visitables.get("resources"); - while (each.hasNext()) { - V1APIResourceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResources instead. - * @return The buildable object. - */ - @Deprecated - public List getResources() { - return resources != null ? build(resources) : null; - } - public List buildResources() { - return resources != null ? build(resources) : null; - } - public V1APIResource buildResource(int index) { - return this.resources.get(index).build(); - } - public V1APIResource buildFirstResource() { - return this.resources.get(0).build(); - } - public V1APIResource buildLastResource() { - return this.resources.get(resources.size() - 1).build(); - } - public V1APIResource buildMatchingResource(Predicate predicate) { - for (V1APIResourceBuilder item: resources) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResource(Predicate predicate) { - for (V1APIResourceBuilder item: resources) { if(predicate.test(item)){ return true;} } return false; - } - public A withResources(List resources) { - if (this.resources != null) { _visitables.get("resources").clear();} - if (resources != null) {this.resources = new ArrayList(); for (V1APIResource item : resources){this.addToResources(item);}} else { this.resources = null;} return (A) this; - } - public A withResources(io.kubernetes.client.openapi.models.V1APIResource... resources) { - if (this.resources != null) {this.resources.clear(); _visitables.remove("resources"); } - if (resources != null) {for (V1APIResource item :resources){ this.addToResources(item);}} return (A) this; - } - public Boolean hasResources() { - return resources != null && !resources.isEmpty(); - } - public V1APIResourceListFluentImpl.ResourcesNested addNewResource() { - return new V1APIResourceListFluentImpl.ResourcesNestedImpl(); - } - public V1APIResourceListFluentImpl.ResourcesNested addNewResourceLike(V1APIResource item) { - return new V1APIResourceListFluentImpl.ResourcesNestedImpl(-1, item); - } - public V1APIResourceListFluentImpl.ResourcesNested setNewResourceLike(int index,V1APIResource item) { - return new V1APIResourceListFluentImpl.ResourcesNestedImpl(index, item); - } - public V1APIResourceListFluentImpl.ResourcesNested editResource(int index) { - if (resources.size() <= index) throw new RuntimeException("Can't edit resources. Index exceeds size."); - return setNewResourceLike(index, buildResource(index)); - } - public V1APIResourceListFluentImpl.ResourcesNested editFirstResource() { - if (resources.size() == 0) throw new RuntimeException("Can't edit first resources. The list is empty."); - return setNewResourceLike(0, buildResource(0)); - } - public V1APIResourceListFluentImpl.ResourcesNested editLastResource() { - int index = resources.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resources. The list is empty."); - return setNewResourceLike(index, buildResource(index)); - } - public V1APIResourceListFluentImpl.ResourcesNested editMatchingResource(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1APIResourceFluentImpl> implements V1APIResourceListFluentImpl.ResourcesNested,Nested{ - ResourcesNestedImpl(int index,V1APIResource item) { - this.index = index; - this.builder = new V1APIResourceBuilder(this, item); - } - ResourcesNestedImpl() { - this.index = -1; - this.builder = new V1APIResourceBuilder(this); - } - V1APIResourceBuilder builder; - int index; - public N and() { - return (N) V1APIResourceListFluentImpl.this.setToResources(index,builder.build()); - } - public N endResource() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceBuilder.java index 65d1ad9e92..8af4088674 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIServiceBuilder extends V1APIServiceFluentImpl implements VisitableBuilder{ +public class V1APIServiceBuilder extends V1APIServiceFluent implements VisitableBuilder{ public V1APIServiceBuilder() { - this(false); - } - public V1APIServiceBuilder(Boolean validationEnabled) { - this(new V1APIService(), validationEnabled); + this(new V1APIService()); } + public V1APIServiceBuilder(V1APIServiceFluent fluent) { - this(fluent, false); - } - public V1APIServiceBuilder(V1APIServiceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIService(), validationEnabled); + this(fluent, new V1APIService()); } + public V1APIServiceBuilder(V1APIServiceFluent fluent,V1APIService instance) { - this(fluent, instance, false); - } - public V1APIServiceBuilder(V1APIServiceFluent fluent,V1APIService instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIServiceBuilder(V1APIService instance) { - this(instance,false); - } - public V1APIServiceBuilder(V1APIService instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIServiceFluent fluent; - Boolean validationEnabled; + public V1APIService build() { V1APIService buildable = new V1APIService(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionBuilder.java index 0c61094afa..ca0ebd5176 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIServiceConditionBuilder extends V1APIServiceConditionFluentImpl implements VisitableBuilder{ +public class V1APIServiceConditionBuilder extends V1APIServiceConditionFluent implements VisitableBuilder{ public V1APIServiceConditionBuilder() { - this(false); - } - public V1APIServiceConditionBuilder(Boolean validationEnabled) { - this(new V1APIServiceCondition(), validationEnabled); + this(new V1APIServiceCondition()); } + public V1APIServiceConditionBuilder(V1APIServiceConditionFluent fluent) { - this(fluent, false); - } - public V1APIServiceConditionBuilder(V1APIServiceConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIServiceCondition(), validationEnabled); + this(fluent, new V1APIServiceCondition()); } + public V1APIServiceConditionBuilder(V1APIServiceConditionFluent fluent,V1APIServiceCondition instance) { - this(fluent, instance, false); - } - public V1APIServiceConditionBuilder(V1APIServiceConditionFluent fluent,V1APIServiceCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIServiceConditionBuilder(V1APIServiceCondition instance) { - this(instance,false); - } - public V1APIServiceConditionBuilder(V1APIServiceCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIServiceConditionFluent fluent; - Boolean validationEnabled; + public V1APIServiceCondition build() { V1APIServiceCondition buildable = new V1APIServiceCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1APIServiceCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionFluent.java index aa76489552..797bab8e55 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1APIServiceConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIServiceConditionFluent> extends BaseFluent{ + public V1APIServiceConditionFluent() { + } + public V1APIServiceConditionFluent(V1APIServiceCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1APIServiceCondition instance) { + instance = (instance != null ? instance : new V1APIServiceCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1APIServiceConditionFluent that = (V1APIServiceConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionFluentImpl.java deleted file mode 100644 index fa27b16317..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIServiceConditionFluentImpl> extends BaseFluent implements V1APIServiceConditionFluent{ - public V1APIServiceConditionFluentImpl() { - } - public V1APIServiceConditionFluentImpl(V1APIServiceCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1APIServiceConditionFluentImpl that = (V1APIServiceConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceFluent.java index 7e746c6d8a..37125a0970 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1APIServiceFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1APIServiceFluent.MetadataNested withNewMetadata(); - public V1APIServiceFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1APIServiceFluent.MetadataNested editMetadata(); - public V1APIServiceFluent.MetadataNested editOrNewMetadata(); - public V1APIServiceFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1APIServiceSpec getSpec(); - public V1APIServiceSpec buildSpec(); - public A withSpec(V1APIServiceSpec spec); - public Boolean hasSpec(); - public V1APIServiceFluent.SpecNested withNewSpec(); - public V1APIServiceFluent.SpecNested withNewSpecLike(V1APIServiceSpec item); - public V1APIServiceFluent.SpecNested editSpec(); - public V1APIServiceFluent.SpecNested editOrNewSpec(); - public V1APIServiceFluent.SpecNested editOrNewSpecLike(V1APIServiceSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1APIServiceStatus getStatus(); - public V1APIServiceStatus buildStatus(); - public A withStatus(V1APIServiceStatus status); - public Boolean hasStatus(); - public V1APIServiceFluent.StatusNested withNewStatus(); - public V1APIServiceFluent.StatusNested withNewStatusLike(V1APIServiceStatus item); - public V1APIServiceFluent.StatusNested editStatus(); - public V1APIServiceFluent.StatusNested editOrNewStatus(); - public V1APIServiceFluent.StatusNested editOrNewStatusLike(V1APIServiceStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIServiceFluent> extends BaseFluent{ + public V1APIServiceFluent() { + } + + public V1APIServiceFluent(V1APIService instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1APIServiceSpecBuilder spec; + private V1APIServiceStatusBuilder status; + + protected void copyInstance(V1APIService instance) { + instance = (instance != null ? instance : new V1APIService()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1APIServiceSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1APIServiceSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1APIServiceSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1APIServiceSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1APIServiceSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1APIServiceSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1APIServiceSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1APIServiceStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1APIServiceStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1APIServiceStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1APIServiceStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1APIServiceStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1APIServiceStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1APIServiceFluent that = (V1APIServiceFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1APIServiceFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1APIServiceStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1APIServiceSpecFluent> implements Nested{ + SpecNested(V1APIServiceSpec item) { + this.builder = new V1APIServiceSpecBuilder(this, item); + } + V1APIServiceSpecBuilder builder; + + public N and() { + return (N) V1APIServiceFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1APIServiceStatusFluent> implements Nested{ + StatusNested(V1APIServiceStatus item) { + this.builder = new V1APIServiceStatusBuilder(this, item); + } + V1APIServiceStatusBuilder builder; + + public N and() { + return (N) V1APIServiceFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceFluentImpl.java deleted file mode 100644 index c12272ba83..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIServiceFluentImpl> extends BaseFluent implements V1APIServiceFluent{ - public V1APIServiceFluentImpl() { - } - public V1APIServiceFluentImpl(V1APIService instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1APIServiceSpecBuilder spec; - private V1APIServiceStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1APIServiceFluentImpl.MetadataNested withNewMetadata() { - return new V1APIServiceFluentImpl.MetadataNestedImpl(); - } - public V1APIServiceFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1APIServiceFluentImpl.MetadataNestedImpl(item); - } - public V1APIServiceFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1APIServiceFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1APIServiceFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1APIServiceSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1APIServiceSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1APIServiceSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1APIServiceSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1APIServiceFluentImpl.SpecNested withNewSpec() { - return new V1APIServiceFluentImpl.SpecNestedImpl(); - } - public V1APIServiceFluentImpl.SpecNested withNewSpecLike(V1APIServiceSpec item) { - return new V1APIServiceFluentImpl.SpecNestedImpl(item); - } - public V1APIServiceFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1APIServiceFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1APIServiceSpecBuilder().build()); - } - public V1APIServiceFluentImpl.SpecNested editOrNewSpecLike(V1APIServiceSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1APIServiceStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1APIServiceStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1APIServiceStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1APIServiceStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1APIServiceFluentImpl.StatusNested withNewStatus() { - return new V1APIServiceFluentImpl.StatusNestedImpl(); - } - public V1APIServiceFluentImpl.StatusNested withNewStatusLike(V1APIServiceStatus item) { - return new V1APIServiceFluentImpl.StatusNestedImpl(item); - } - public V1APIServiceFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1APIServiceFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1APIServiceStatusBuilder().build()); - } - public V1APIServiceFluentImpl.StatusNested editOrNewStatusLike(V1APIServiceStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1APIServiceFluentImpl that = (V1APIServiceFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1APIServiceFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1APIServiceFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1APIServiceSpecFluentImpl> implements V1APIServiceFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1APIServiceSpec item) { - this.builder = new V1APIServiceSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1APIServiceSpecBuilder(this); - } - V1APIServiceSpecBuilder builder; - public N and() { - return (N) V1APIServiceFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1APIServiceStatusFluentImpl> implements V1APIServiceFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1APIServiceStatus item) { - this.builder = new V1APIServiceStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1APIServiceStatusBuilder(this); - } - V1APIServiceStatusBuilder builder; - public N and() { - return (N) V1APIServiceFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListBuilder.java index 52a9983377..1c8bb41124 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIServiceListBuilder extends V1APIServiceListFluentImpl implements VisitableBuilder{ +public class V1APIServiceListBuilder extends V1APIServiceListFluent implements VisitableBuilder{ public V1APIServiceListBuilder() { - this(false); - } - public V1APIServiceListBuilder(Boolean validationEnabled) { - this(new V1APIServiceList(), validationEnabled); + this(new V1APIServiceList()); } + public V1APIServiceListBuilder(V1APIServiceListFluent fluent) { - this(fluent, false); - } - public V1APIServiceListBuilder(V1APIServiceListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIServiceList(), validationEnabled); + this(fluent, new V1APIServiceList()); } + public V1APIServiceListBuilder(V1APIServiceListFluent fluent,V1APIServiceList instance) { - this(fluent, instance, false); - } - public V1APIServiceListBuilder(V1APIServiceListFluent fluent,V1APIServiceList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIServiceListBuilder(V1APIServiceList instance) { - this(instance,false); - } - public V1APIServiceListBuilder(V1APIServiceList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIServiceListFluent fluent; - Boolean validationEnabled; + public V1APIServiceList build() { V1APIServiceList buildable = new V1APIServiceList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListFluent.java index 5edc53fc3d..abc026424b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1APIServiceListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1APIService item); - public A setToItems(int index,V1APIService item); - public A addToItems(io.kubernetes.client.openapi.models.V1APIService... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1APIService... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1APIService buildItem(int index); - public V1APIService buildFirstItem(); - public V1APIService buildLastItem(); - public V1APIService buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1APIService... items); - public Boolean hasItems(); - public V1APIServiceListFluent.ItemsNested addNewItem(); - public V1APIServiceListFluent.ItemsNested addNewItemLike(V1APIService item); - public V1APIServiceListFluent.ItemsNested setNewItemLike(int index,V1APIService item); - public V1APIServiceListFluent.ItemsNested editItem(int index); - public V1APIServiceListFluent.ItemsNested editFirstItem(); - public V1APIServiceListFluent.ItemsNested editLastItem(); - public V1APIServiceListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1APIServiceListFluent.MetadataNested withNewMetadata(); - public V1APIServiceListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1APIServiceListFluent.MetadataNested editMetadata(); - public V1APIServiceListFluent.MetadataNested editOrNewMetadata(); - public V1APIServiceListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1APIServiceFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIServiceListFluent> extends BaseFluent{ + public V1APIServiceListFluent() { + } + + public V1APIServiceListFluent(V1APIServiceList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1APIServiceList instance) { + instance = (instance != null ? instance : new V1APIServiceList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1APIService item) { + if (this.items == null) {this.items = new ArrayList();} + V1APIServiceBuilder builder = new V1APIServiceBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1APIService item) { + if (this.items == null) {this.items = new ArrayList();} + V1APIServiceBuilder builder = new V1APIServiceBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1APIService... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1APIService item : items) {V1APIServiceBuilder builder = new V1APIServiceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1APIService item : items) {V1APIServiceBuilder builder = new V1APIServiceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1APIService... items) { + if (this.items == null) return (A)this; + for (V1APIService item : items) {V1APIServiceBuilder builder = new V1APIServiceBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1APIService item : items) {V1APIServiceBuilder builder = new V1APIServiceBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1APIServiceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1APIService buildItem(int index) { + return this.items.get(index).build(); + } + + public V1APIService buildFirstItem() { + return this.items.get(0).build(); + } + + public V1APIService buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1APIService buildMatchingItem(Predicate predicate) { + for (V1APIServiceBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1APIServiceBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1APIService item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1APIService... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1APIService item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1APIService item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1APIService item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1APIServiceListFluent that = (V1APIServiceListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1APIServiceFluent> implements Nested{ + ItemsNested(int index,V1APIService item) { + this.index = index; + this.builder = new V1APIServiceBuilder(this, item); + } + V1APIServiceBuilder builder; + int index; + public N and() { + return (N) V1APIServiceListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1APIServiceListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListFluentImpl.java deleted file mode 100644 index e29b0c87a7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIServiceListFluentImpl> extends BaseFluent implements V1APIServiceListFluent{ - public V1APIServiceListFluentImpl() { - } - public V1APIServiceListFluentImpl(V1APIServiceList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1APIService item) { - if (this.items == null) {this.items = new ArrayList();} - V1APIServiceBuilder builder = new V1APIServiceBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1APIService item) { - if (this.items == null) {this.items = new ArrayList();} - V1APIServiceBuilder builder = new V1APIServiceBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1APIService... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1APIService item : items) {V1APIServiceBuilder builder = new V1APIServiceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1APIService item : items) {V1APIServiceBuilder builder = new V1APIServiceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1APIService... items) { - for (V1APIService item : items) {V1APIServiceBuilder builder = new V1APIServiceBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1APIService item : items) {V1APIServiceBuilder builder = new V1APIServiceBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1APIServiceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1APIService buildItem(int index) { - return this.items.get(index).build(); - } - public V1APIService buildFirstItem() { - return this.items.get(0).build(); - } - public V1APIService buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1APIService buildMatchingItem(Predicate predicate) { - for (V1APIServiceBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1APIServiceBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1APIService item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1APIService... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1APIService item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1APIServiceListFluentImpl.ItemsNested addNewItem() { - return new V1APIServiceListFluentImpl.ItemsNestedImpl(); - } - public V1APIServiceListFluentImpl.ItemsNested addNewItemLike(V1APIService item) { - return new V1APIServiceListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1APIServiceListFluentImpl.ItemsNested setNewItemLike(int index,V1APIService item) { - return new V1APIServiceListFluentImpl.ItemsNestedImpl(index, item); - } - public V1APIServiceListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1APIServiceListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1APIServiceListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1APIServiceListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1APIServiceListFluentImpl.MetadataNestedImpl(); - } - public V1APIServiceListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1APIServiceListFluentImpl.MetadataNestedImpl(item); - } - public V1APIServiceListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1APIServiceListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1APIServiceListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1APIServiceListFluentImpl that = (V1APIServiceListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1APIServiceFluentImpl> implements V1APIServiceListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1APIService item) { - this.index = index; - this.builder = new V1APIServiceBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1APIServiceBuilder(this); - } - V1APIServiceBuilder builder; - int index; - public N and() { - return (N) V1APIServiceListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1APIServiceListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1APIServiceListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecBuilder.java index 165186a7f1..34eacfd44f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecBuilder.java @@ -1,64 +1,37 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIServiceSpecBuilder extends V1APIServiceSpecFluentImpl implements VisitableBuilder{ +public class V1APIServiceSpecBuilder extends V1APIServiceSpecFluent implements VisitableBuilder{ public V1APIServiceSpecBuilder() { - this(false); - } - public V1APIServiceSpecBuilder(Boolean validationEnabled) { - this(new V1APIServiceSpec(), validationEnabled); + this(new V1APIServiceSpec()); } + public V1APIServiceSpecBuilder(V1APIServiceSpecFluent fluent) { - this(fluent, false); - } - public V1APIServiceSpecBuilder(V1APIServiceSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIServiceSpec(), validationEnabled); + this(fluent, new V1APIServiceSpec()); } + public V1APIServiceSpecBuilder(V1APIServiceSpecFluent fluent,V1APIServiceSpec instance) { - this(fluent, instance, false); - } - public V1APIServiceSpecBuilder(V1APIServiceSpecFluent fluent,V1APIServiceSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCaBundle(instance.getCaBundle()); - fluent.withGroup(instance.getGroup()); - fluent.withGroupPriorityMinimum(instance.getGroupPriorityMinimum()); - fluent.withInsecureSkipTLSVerify(instance.getInsecureSkipTLSVerify()); - fluent.withService(instance.getService()); - fluent.withVersion(instance.getVersion()); - fluent.withVersionPriority(instance.getVersionPriority()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIServiceSpecBuilder(V1APIServiceSpec instance) { - this(instance,false); - } - public V1APIServiceSpecBuilder(V1APIServiceSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCaBundle(instance.getCaBundle()); - this.withGroup(instance.getGroup()); - this.withGroupPriorityMinimum(instance.getGroupPriorityMinimum()); - this.withInsecureSkipTLSVerify(instance.getInsecureSkipTLSVerify()); - this.withService(instance.getService()); - this.withVersion(instance.getVersion()); - this.withVersionPriority(instance.getVersionPriority()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIServiceSpecFluent fluent; - Boolean validationEnabled; + public V1APIServiceSpec build() { V1APIServiceSpec buildable = new V1APIServiceSpec(); buildable.setCaBundle(fluent.getCaBundle()); buildable.setGroup(fluent.getGroup()); buildable.setGroupPriorityMinimum(fluent.getGroupPriorityMinimum()); buildable.setInsecureSkipTLSVerify(fluent.getInsecureSkipTLSVerify()); - buildable.setService(fluent.getService()); + buildable.setService(fluent.buildService()); buildable.setVersion(fluent.getVersion()); buildable.setVersionPriority(fluent.getVersionPriority()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecFluent.java index bc18b2683a..c8ff0038df 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecFluent.java @@ -1,64 +1,266 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.lang.Integer; -import java.lang.Deprecated; import java.lang.Byte; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; +import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1APIServiceSpecFluent> extends Fluent{ - public A withCaBundle(byte... caBundle); - public byte[] getCaBundle(); - public A addToCaBundle(int index,Byte item); - public A setToCaBundle(int index,Byte item); - public A addToCaBundle(java.lang.Byte... items); - public A addAllToCaBundle(Collection items); - public A removeFromCaBundle(java.lang.Byte... items); - public A removeAllFromCaBundle(Collection items); - public Boolean hasCaBundle(); - public String getGroup(); - public A withGroup(String group); - public Boolean hasGroup(); - public Integer getGroupPriorityMinimum(); - public A withGroupPriorityMinimum(Integer groupPriorityMinimum); - public Boolean hasGroupPriorityMinimum(); - public Boolean getInsecureSkipTLSVerify(); - public A withInsecureSkipTLSVerify(Boolean insecureSkipTLSVerify); - public Boolean hasInsecureSkipTLSVerify(); - - /** - * This method has been deprecated, please use method buildService instead. - * @return The buildable object. - */ - @Deprecated - public ApiregistrationV1ServiceReference getService(); - public ApiregistrationV1ServiceReference buildService(); - public A withService(ApiregistrationV1ServiceReference service); - public Boolean hasService(); - public V1APIServiceSpecFluent.ServiceNested withNewService(); - public V1APIServiceSpecFluent.ServiceNested withNewServiceLike(ApiregistrationV1ServiceReference item); - public V1APIServiceSpecFluent.ServiceNested editService(); - public V1APIServiceSpecFluent.ServiceNested editOrNewService(); - public V1APIServiceSpecFluent.ServiceNested editOrNewServiceLike(ApiregistrationV1ServiceReference item); - public String getVersion(); - public A withVersion(String version); - public Boolean hasVersion(); - public Integer getVersionPriority(); - public A withVersionPriority(Integer versionPriority); - public Boolean hasVersionPriority(); - public A withInsecureSkipTLSVerify(); - public interface ServiceNested extends Nested,ApiregistrationV1ServiceReferenceFluent>{ - public N and(); - public N endService(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIServiceSpecFluent> extends BaseFluent{ + public V1APIServiceSpecFluent() { + } + + public V1APIServiceSpecFluent(V1APIServiceSpec instance) { + this.copyInstance(instance); + } + private List caBundle; + private String group; + private Integer groupPriorityMinimum; + private Boolean insecureSkipTLSVerify; + private ApiregistrationV1ServiceReferenceBuilder service; + private String version; + private Integer versionPriority; + + protected void copyInstance(V1APIServiceSpec instance) { + instance = (instance != null ? instance : new V1APIServiceSpec()); + if (instance != null) { + this.withCaBundle(instance.getCaBundle()); + this.withGroup(instance.getGroup()); + this.withGroupPriorityMinimum(instance.getGroupPriorityMinimum()); + this.withInsecureSkipTLSVerify(instance.getInsecureSkipTLSVerify()); + this.withService(instance.getService()); + this.withVersion(instance.getVersion()); + this.withVersionPriority(instance.getVersionPriority()); + } + } + + public A withCaBundle(byte... caBundle) { + if (this.caBundle != null) { + this.caBundle.clear(); + _visitables.remove("caBundle"); + } + if (caBundle != null) { + for (byte item : caBundle) { + this.addToCaBundle(item); + } + } + return (A) this; + } + + public byte[] getCaBundle() { + int size = caBundle != null ? caBundle.size() : 0;; + byte[] result = new byte[size];; + if (size == 0) { + return result; + } + int index = 0;; + for (byte item : caBundle) { + result[index++] = item; + } + return result; + } + + public A addToCaBundle(int index,Byte item) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + this.caBundle.add(index, item); + return (A)this; + } + + public A setToCaBundle(int index,Byte item) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + this.caBundle.set(index, item); return (A)this; + } + + public A addToCaBundle(java.lang.Byte... items) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + for (Byte item : items) {this.caBundle.add(item);} return (A)this; + } + + public A addAllToCaBundle(Collection items) { + if (this.caBundle == null) {this.caBundle = new ArrayList();} + for (Byte item : items) {this.caBundle.add(item);} return (A)this; + } + + public A removeFromCaBundle(java.lang.Byte... items) { + if (this.caBundle == null) return (A)this; + for (Byte item : items) { this.caBundle.remove(item);} return (A)this; + } + + public A removeAllFromCaBundle(Collection items) { + if (this.caBundle == null) return (A)this; + for (Byte item : items) { this.caBundle.remove(item);} return (A)this; + } + + public boolean hasCaBundle() { + return this.caBundle != null && !this.caBundle.isEmpty(); + } + + public String getGroup() { + return this.group; + } + + public A withGroup(String group) { + this.group = group; + return (A) this; + } + + public boolean hasGroup() { + return this.group != null; + } + + public Integer getGroupPriorityMinimum() { + return this.groupPriorityMinimum; + } + + public A withGroupPriorityMinimum(Integer groupPriorityMinimum) { + this.groupPriorityMinimum = groupPriorityMinimum; + return (A) this; + } + + public boolean hasGroupPriorityMinimum() { + return this.groupPriorityMinimum != null; + } + + public Boolean getInsecureSkipTLSVerify() { + return this.insecureSkipTLSVerify; + } + + public A withInsecureSkipTLSVerify(Boolean insecureSkipTLSVerify) { + this.insecureSkipTLSVerify = insecureSkipTLSVerify; + return (A) this; + } + + public boolean hasInsecureSkipTLSVerify() { + return this.insecureSkipTLSVerify != null; } + public ApiregistrationV1ServiceReference buildService() { + return this.service != null ? this.service.build() : null; + } + + public A withService(ApiregistrationV1ServiceReference service) { + this._visitables.remove("service"); + if (service != null) { + this.service = new ApiregistrationV1ServiceReferenceBuilder(service); + this._visitables.get("service").add(this.service); + } else { + this.service = null; + this._visitables.get("service").remove(this.service); + } + return (A) this; + } + + public boolean hasService() { + return this.service != null; + } + + public ServiceNested withNewService() { + return new ServiceNested(null); + } + + public ServiceNested withNewServiceLike(ApiregistrationV1ServiceReference item) { + return new ServiceNested(item); + } + + public ServiceNested editService() { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(null)); + } + + public ServiceNested editOrNewService() { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(new ApiregistrationV1ServiceReferenceBuilder().build())); + } + + public ServiceNested editOrNewServiceLike(ApiregistrationV1ServiceReference item) { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(item)); + } + + public String getVersion() { + return this.version; + } + + public A withVersion(String version) { + this.version = version; + return (A) this; + } + + public boolean hasVersion() { + return this.version != null; + } + + public Integer getVersionPriority() { + return this.versionPriority; + } + + public A withVersionPriority(Integer versionPriority) { + this.versionPriority = versionPriority; + return (A) this; + } + + public boolean hasVersionPriority() { + return this.versionPriority != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1APIServiceSpecFluent that = (V1APIServiceSpecFluent) o; + if (!java.util.Objects.equals(caBundle, that.caBundle)) return false; + if (!java.util.Objects.equals(group, that.group)) return false; + if (!java.util.Objects.equals(groupPriorityMinimum, that.groupPriorityMinimum)) return false; + if (!java.util.Objects.equals(insecureSkipTLSVerify, that.insecureSkipTLSVerify)) return false; + if (!java.util.Objects.equals(service, that.service)) return false; + if (!java.util.Objects.equals(version, that.version)) return false; + if (!java.util.Objects.equals(versionPriority, that.versionPriority)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(caBundle, group, groupPriorityMinimum, insecureSkipTLSVerify, service, version, versionPriority, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (caBundle != null && !caBundle.isEmpty()) { sb.append("caBundle:"); sb.append(caBundle + ","); } + if (group != null) { sb.append("group:"); sb.append(group + ","); } + if (groupPriorityMinimum != null) { sb.append("groupPriorityMinimum:"); sb.append(groupPriorityMinimum + ","); } + if (insecureSkipTLSVerify != null) { sb.append("insecureSkipTLSVerify:"); sb.append(insecureSkipTLSVerify + ","); } + if (service != null) { sb.append("service:"); sb.append(service + ","); } + if (version != null) { sb.append("version:"); sb.append(version + ","); } + if (versionPriority != null) { sb.append("versionPriority:"); sb.append(versionPriority); } + sb.append("}"); + return sb.toString(); + } + + public A withInsecureSkipTLSVerify() { + return withInsecureSkipTLSVerify(true); + } + public class ServiceNested extends ApiregistrationV1ServiceReferenceFluent> implements Nested{ + ServiceNested(ApiregistrationV1ServiceReference item) { + this.builder = new ApiregistrationV1ServiceReferenceBuilder(this, item); + } + ApiregistrationV1ServiceReferenceBuilder builder; + + public N and() { + return (N) V1APIServiceSpecFluent.this.withService(builder.build()); + } + + public N endService() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecFluentImpl.java deleted file mode 100644 index 3e45bc9d59..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceSpecFluentImpl.java +++ /dev/null @@ -1,221 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import java.lang.Byte; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIServiceSpecFluentImpl> extends BaseFluent implements V1APIServiceSpecFluent{ - public V1APIServiceSpecFluentImpl() { - } - public V1APIServiceSpecFluentImpl(V1APIServiceSpec instance) { - if (instance != null) { - this.withCaBundle(instance.getCaBundle()); - this.withGroup(instance.getGroup()); - this.withGroupPriorityMinimum(instance.getGroupPriorityMinimum()); - this.withInsecureSkipTLSVerify(instance.getInsecureSkipTLSVerify()); - this.withService(instance.getService()); - this.withVersion(instance.getVersion()); - this.withVersionPriority(instance.getVersionPriority()); - } - } - private List caBundle; - private String group; - private Integer groupPriorityMinimum; - private Boolean insecureSkipTLSVerify; - private ApiregistrationV1ServiceReferenceBuilder service; - private String version; - private Integer versionPriority; - public A withCaBundle(byte... caBundle) { - if (this.caBundle != null) {this.caBundle.clear(); _visitables.remove("caBundle"); } - if (caBundle != null) {for (byte item :caBundle){ this.addToCaBundle(item);}} return (A) this; - } - public byte[] getCaBundle() { - //This needs to work with primitives, so we use arrays. -int size = caBundle != null ? caBundle.size() : 0; -byte[] result = new byte[size]; -if (size == 0) { - return result; -} -int index = 0; -for (byte item : caBundle) { - result[index++]=item; -} -return result; - - } - public A addToCaBundle(int index,Byte item) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - this.caBundle.add(index, item); - return (A)this; - } - public A setToCaBundle(int index,Byte item) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - this.caBundle.set(index, item); return (A)this; - } - public A addToCaBundle(java.lang.Byte... items) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - for (Byte item : items) {this.caBundle.add(item);} return (A)this; - } - public A addAllToCaBundle(Collection items) { - if (this.caBundle == null) {this.caBundle = new ArrayList();} - for (Byte item : items) {this.caBundle.add(item);} return (A)this; - } - public A removeFromCaBundle(java.lang.Byte... items) { - for (Byte item : items) {if (this.caBundle!= null){ this.caBundle.remove(item);}} return (A)this; - } - public A removeAllFromCaBundle(Collection items) { - for (Byte item : items) {if (this.caBundle!= null){ this.caBundle.remove(item);}} return (A)this; - } - public Boolean hasCaBundle() { - return caBundle != null && !caBundle.isEmpty(); - } - public String getGroup() { - return this.group; - } - public A withGroup(String group) { - this.group=group; return (A) this; - } - public Boolean hasGroup() { - return this.group != null; - } - public Integer getGroupPriorityMinimum() { - return this.groupPriorityMinimum; - } - public A withGroupPriorityMinimum(Integer groupPriorityMinimum) { - this.groupPriorityMinimum=groupPriorityMinimum; return (A) this; - } - public Boolean hasGroupPriorityMinimum() { - return this.groupPriorityMinimum != null; - } - public Boolean getInsecureSkipTLSVerify() { - return this.insecureSkipTLSVerify; - } - public A withInsecureSkipTLSVerify(Boolean insecureSkipTLSVerify) { - this.insecureSkipTLSVerify=insecureSkipTLSVerify; return (A) this; - } - public Boolean hasInsecureSkipTLSVerify() { - return this.insecureSkipTLSVerify != null; - } - - /** - * This method has been deprecated, please use method buildService instead. - * @return The buildable object. - */ - @Deprecated - public ApiregistrationV1ServiceReference getService() { - return this.service!=null ?this.service.build():null; - } - public ApiregistrationV1ServiceReference buildService() { - return this.service!=null ?this.service.build():null; - } - public A withService(ApiregistrationV1ServiceReference service) { - _visitables.get("service").remove(this.service); - if (service!=null){ this.service= new ApiregistrationV1ServiceReferenceBuilder(service); _visitables.get("service").add(this.service);} else { this.service = null; _visitables.get("service").remove(this.service); } return (A) this; - } - public Boolean hasService() { - return this.service != null; - } - public V1APIServiceSpecFluentImpl.ServiceNested withNewService() { - return new V1APIServiceSpecFluentImpl.ServiceNestedImpl(); - } - public V1APIServiceSpecFluentImpl.ServiceNested withNewServiceLike(ApiregistrationV1ServiceReference item) { - return new V1APIServiceSpecFluentImpl.ServiceNestedImpl(item); - } - public V1APIServiceSpecFluentImpl.ServiceNested editService() { - return withNewServiceLike(getService()); - } - public V1APIServiceSpecFluentImpl.ServiceNested editOrNewService() { - return withNewServiceLike(getService() != null ? getService(): new ApiregistrationV1ServiceReferenceBuilder().build()); - } - public V1APIServiceSpecFluentImpl.ServiceNested editOrNewServiceLike(ApiregistrationV1ServiceReference item) { - return withNewServiceLike(getService() != null ? getService(): item); - } - public String getVersion() { - return this.version; - } - public A withVersion(String version) { - this.version=version; return (A) this; - } - public Boolean hasVersion() { - return this.version != null; - } - public Integer getVersionPriority() { - return this.versionPriority; - } - public A withVersionPriority(Integer versionPriority) { - this.versionPriority=versionPriority; return (A) this; - } - public Boolean hasVersionPriority() { - return this.versionPriority != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1APIServiceSpecFluentImpl that = (V1APIServiceSpecFluentImpl) o; - if (!java.util.Objects.equals(caBundle, that.caBundle)) return false; - - if (!java.util.Objects.equals(group, that.group)) return false; - - if (!java.util.Objects.equals(groupPriorityMinimum, that.groupPriorityMinimum)) return false; - - if (!java.util.Objects.equals(insecureSkipTLSVerify, that.insecureSkipTLSVerify)) return false; - - if (!java.util.Objects.equals(service, that.service)) return false; - - if (!java.util.Objects.equals(version, that.version)) return false; - - if (!java.util.Objects.equals(versionPriority, that.versionPriority)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(caBundle, group, groupPriorityMinimum, insecureSkipTLSVerify, service, version, versionPriority, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (caBundle != null && !caBundle.isEmpty()) { sb.append("caBundle:"); sb.append(caBundle + ","); } - if (group != null) { sb.append("group:"); sb.append(group + ","); } - if (groupPriorityMinimum != null) { sb.append("groupPriorityMinimum:"); sb.append(groupPriorityMinimum + ","); } - if (insecureSkipTLSVerify != null) { sb.append("insecureSkipTLSVerify:"); sb.append(insecureSkipTLSVerify + ","); } - if (service != null) { sb.append("service:"); sb.append(service + ","); } - if (version != null) { sb.append("version:"); sb.append(version + ","); } - if (versionPriority != null) { sb.append("versionPriority:"); sb.append(versionPriority); } - sb.append("}"); - return sb.toString(); - } - public A withInsecureSkipTLSVerify() { - return withInsecureSkipTLSVerify(true); - } - class ServiceNestedImpl extends ApiregistrationV1ServiceReferenceFluentImpl> implements V1APIServiceSpecFluentImpl.ServiceNested,Nested{ - ServiceNestedImpl(ApiregistrationV1ServiceReference item) { - this.builder = new ApiregistrationV1ServiceReferenceBuilder(this, item); - } - ServiceNestedImpl() { - this.builder = new ApiregistrationV1ServiceReferenceBuilder(this); - } - ApiregistrationV1ServiceReferenceBuilder builder; - public N and() { - return (N) V1APIServiceSpecFluentImpl.this.withService(builder.build()); - } - public N endService() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusBuilder.java index d0dba9f3ff..a438d3c03c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIServiceStatusBuilder extends V1APIServiceStatusFluentImpl implements VisitableBuilder{ +public class V1APIServiceStatusBuilder extends V1APIServiceStatusFluent implements VisitableBuilder{ public V1APIServiceStatusBuilder() { - this(false); - } - public V1APIServiceStatusBuilder(Boolean validationEnabled) { - this(new V1APIServiceStatus(), validationEnabled); + this(new V1APIServiceStatus()); } + public V1APIServiceStatusBuilder(V1APIServiceStatusFluent fluent) { - this(fluent, false); - } - public V1APIServiceStatusBuilder(V1APIServiceStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIServiceStatus(), validationEnabled); + this(fluent, new V1APIServiceStatus()); } + public V1APIServiceStatusBuilder(V1APIServiceStatusFluent fluent,V1APIServiceStatus instance) { - this(fluent, instance, false); - } - public V1APIServiceStatusBuilder(V1APIServiceStatusFluent fluent,V1APIServiceStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIServiceStatusBuilder(V1APIServiceStatus instance) { - this(instance,false); - } - public V1APIServiceStatusBuilder(V1APIServiceStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIServiceStatusFluent fluent; - Boolean validationEnabled; + public V1APIServiceStatus build() { V1APIServiceStatus buildable = new V1APIServiceStatus(); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusFluent.java index c1cac2bd31..c7329a52a1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1APIServiceStatusFluent> extends Fluent{ - public A addToConditions(int index,V1APIServiceCondition item); - public A setToConditions(int index,V1APIServiceCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1APIServiceCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1APIServiceCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1APIServiceCondition buildCondition(int index); - public V1APIServiceCondition buildFirstCondition(); - public V1APIServiceCondition buildLastCondition(); - public V1APIServiceCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1APIServiceCondition... conditions); - public Boolean hasConditions(); - public V1APIServiceStatusFluent.ConditionsNested addNewCondition(); - public V1APIServiceStatusFluent.ConditionsNested addNewConditionLike(V1APIServiceCondition item); - public V1APIServiceStatusFluent.ConditionsNested setNewConditionLike(int index,V1APIServiceCondition item); - public V1APIServiceStatusFluent.ConditionsNested editCondition(int index); - public V1APIServiceStatusFluent.ConditionsNested editFirstCondition(); - public V1APIServiceStatusFluent.ConditionsNested editLastCondition(); - public V1APIServiceStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public interface ConditionsNested extends Nested,V1APIServiceConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIServiceStatusFluent> extends BaseFluent{ + public V1APIServiceStatusFluent() { + } + + public V1APIServiceStatusFluent(V1APIServiceStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + + protected void copyInstance(V1APIServiceStatus instance) { + instance = (instance != null ? instance : new V1APIServiceStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + } + } + + public A addToConditions(int index,V1APIServiceCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1APIServiceCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1APIServiceCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1APIServiceCondition item : items) {V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1APIServiceCondition item : items) {V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1APIServiceCondition... items) { + if (this.conditions == null) return (A)this; + for (V1APIServiceCondition item : items) {V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1APIServiceCondition item : items) {V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1APIServiceConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1APIServiceCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1APIServiceCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1APIServiceCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1APIServiceCondition buildMatchingCondition(Predicate predicate) { + for (V1APIServiceConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1APIServiceConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1APIServiceCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1APIServiceCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1APIServiceCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1APIServiceCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1APIServiceCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1APIServiceConditionFluent> implements Nested{ + ConditionsNested(int index,V1APIServiceCondition item) { + this.index = index; + this.builder = new V1APIServiceConditionBuilder(this, item); + } + V1APIServiceConditionBuilder builder; + int index; + + public N and() { + return (N) V1APIServiceStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusFluentImpl.java deleted file mode 100644 index 5d50440373..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIServiceStatusFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIServiceStatusFluentImpl> extends BaseFluent implements V1APIServiceStatusFluent{ - public V1APIServiceStatusFluentImpl() { - } - public V1APIServiceStatusFluentImpl(V1APIServiceStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - } - } - private ArrayList conditions; - public A addToConditions(int index,V1APIServiceCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1APIServiceCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1APIServiceCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1APIServiceCondition item : items) {V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1APIServiceCondition item : items) {V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1APIServiceCondition... items) { - for (V1APIServiceCondition item : items) {V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1APIServiceCondition item : items) {V1APIServiceConditionBuilder builder = new V1APIServiceConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1APIServiceConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1APIServiceCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1APIServiceCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1APIServiceCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1APIServiceCondition buildMatchingCondition(Predicate predicate) { - for (V1APIServiceConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1APIServiceConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1APIServiceCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1APIServiceCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1APIServiceCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1APIServiceStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1APIServiceStatusFluentImpl.ConditionsNestedImpl(); - } - public V1APIServiceStatusFluentImpl.ConditionsNested addNewConditionLike(V1APIServiceCondition item) { - return new V1APIServiceStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1APIServiceStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1APIServiceCondition item) { - return new V1APIServiceStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1APIServiceStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1APIServiceStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1APIServiceStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1APIServiceStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1APIServiceConditionFluentImpl> implements V1APIServiceStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1APIServiceCondition item) { - this.index = index; - this.builder = new V1APIServiceConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1APIServiceConditionBuilder(this); - } - V1APIServiceConditionBuilder builder; - int index; - public N and() { - return (N) V1APIServiceStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsBuilder.java index ddb953962b..5b7609f10c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1APIVersionsBuilder extends V1APIVersionsFluentImpl implements VisitableBuilder{ +public class V1APIVersionsBuilder extends V1APIVersionsFluent implements VisitableBuilder{ public V1APIVersionsBuilder() { - this(false); - } - public V1APIVersionsBuilder(Boolean validationEnabled) { - this(new V1APIVersions(), validationEnabled); + this(new V1APIVersions()); } + public V1APIVersionsBuilder(V1APIVersionsFluent fluent) { - this(fluent, false); - } - public V1APIVersionsBuilder(V1APIVersionsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1APIVersions(), validationEnabled); + this(fluent, new V1APIVersions()); } + public V1APIVersionsBuilder(V1APIVersionsFluent fluent,V1APIVersions instance) { - this(fluent, instance, false); - } - public V1APIVersionsBuilder(V1APIVersionsFluent fluent,V1APIVersions instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs()); - fluent.withVersions(instance.getVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1APIVersionsBuilder(V1APIVersions instance) { - this(instance,false); - } - public V1APIVersionsBuilder(V1APIVersions instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs()); - this.withVersions(instance.getVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1APIVersionsFluent fluent; - Boolean validationEnabled; + public V1APIVersions build() { V1APIVersions buildable = new V1APIVersions(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setServerAddressByClientCIDRs(fluent.getServerAddressByClientCIDRs()); + buildable.setServerAddressByClientCIDRs(fluent.buildServerAddressByClientCIDRs()); buildable.setVersions(fluent.getVersions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsFluent.java index 773515e098..6c573b738a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsFluent.java @@ -1,77 +1,357 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1APIVersionsFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public A addToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item); - public A setToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item); - public A addToServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items); - public A addAllToServerAddressByClientCIDRs(Collection items); - public A removeFromServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items); - public A removeAllFromServerAddressByClientCIDRs(Collection items); - public A removeMatchingFromServerAddressByClientCIDRs(Predicate predicate); - - /** - * This method has been deprecated, please use method buildServerAddressByClientCIDRs instead. - * @return The buildable object. - */ - @Deprecated - public List getServerAddressByClientCIDRs(); - public List buildServerAddressByClientCIDRs(); - public V1ServerAddressByClientCIDR buildServerAddressByClientCIDR(int index); - public V1ServerAddressByClientCIDR buildFirstServerAddressByClientCIDR(); - public V1ServerAddressByClientCIDR buildLastServerAddressByClientCIDR(); - public V1ServerAddressByClientCIDR buildMatchingServerAddressByClientCIDR(Predicate predicate); - public Boolean hasMatchingServerAddressByClientCIDR(Predicate predicate); - public A withServerAddressByClientCIDRs(List serverAddressByClientCIDRs); - public A withServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... serverAddressByClientCIDRs); - public Boolean hasServerAddressByClientCIDRs(); - public V1APIVersionsFluent.ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDR(); - public V1APIVersionsFluent.ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDRLike(V1ServerAddressByClientCIDR item); - public V1APIVersionsFluent.ServerAddressByClientCIDRsNested setNewServerAddressByClientCIDRLike(int index,V1ServerAddressByClientCIDR item); - public V1APIVersionsFluent.ServerAddressByClientCIDRsNested editServerAddressByClientCIDR(int index); - public V1APIVersionsFluent.ServerAddressByClientCIDRsNested editFirstServerAddressByClientCIDR(); - public V1APIVersionsFluent.ServerAddressByClientCIDRsNested editLastServerAddressByClientCIDR(); - public V1APIVersionsFluent.ServerAddressByClientCIDRsNested editMatchingServerAddressByClientCIDR(Predicate predicate); - public A addToVersions(int index,String item); - public A setToVersions(int index,String item); - public A addToVersions(java.lang.String... items); - public A addAllToVersions(Collection items); - public A removeFromVersions(java.lang.String... items); - public A removeAllFromVersions(Collection items); - public List getVersions(); - public String getVersion(int index); - public String getFirstVersion(); - public String getLastVersion(); - public String getMatchingVersion(Predicate predicate); - public Boolean hasMatchingVersion(Predicate predicate); - public A withVersions(List versions); - public A withVersions(java.lang.String... versions); - public Boolean hasVersions(); - public interface ServerAddressByClientCIDRsNested extends Nested,V1ServerAddressByClientCIDRFluent>{ - public N and(); - public N endServerAddressByClientCIDR(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1APIVersionsFluent> extends BaseFluent{ + public V1APIVersionsFluent() { + } + + public V1APIVersionsFluent(V1APIVersions instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private ArrayList serverAddressByClientCIDRs; + private List versions; + + protected void copyInstance(V1APIVersions instance) { + instance = (instance != null ? instance : new V1APIVersions()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs()); + this.withVersions(instance.getVersions()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public A addToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item) { + if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} + V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item); + if (index < 0 || index >= serverAddressByClientCIDRs.size()) { _visitables.get("serverAddressByClientCIDRs").add(builder); serverAddressByClientCIDRs.add(builder); } else { _visitables.get("serverAddressByClientCIDRs").add(index, builder); serverAddressByClientCIDRs.add(index, builder);} + return (A)this; + } + + public A setToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item) { + if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} + V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item); + if (index < 0 || index >= serverAddressByClientCIDRs.size()) { _visitables.get("serverAddressByClientCIDRs").add(builder); serverAddressByClientCIDRs.add(builder); } else { _visitables.get("serverAddressByClientCIDRs").set(index, builder); serverAddressByClientCIDRs.set(index, builder);} + return (A)this; + } + + public A addToServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items) { + if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} + for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").add(builder);this.serverAddressByClientCIDRs.add(builder);} return (A)this; + } + + public A addAllToServerAddressByClientCIDRs(Collection items) { + if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} + for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").add(builder);this.serverAddressByClientCIDRs.add(builder);} return (A)this; + } + + public A removeFromServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items) { + if (this.serverAddressByClientCIDRs == null) return (A)this; + for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").remove(builder); this.serverAddressByClientCIDRs.remove(builder);} return (A)this; + } + + public A removeAllFromServerAddressByClientCIDRs(Collection items) { + if (this.serverAddressByClientCIDRs == null) return (A)this; + for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").remove(builder); this.serverAddressByClientCIDRs.remove(builder);} return (A)this; + } + + public A removeMatchingFromServerAddressByClientCIDRs(Predicate predicate) { + if (serverAddressByClientCIDRs == null) return (A) this; + final Iterator each = serverAddressByClientCIDRs.iterator(); + final List visitables = _visitables.get("serverAddressByClientCIDRs"); + while (each.hasNext()) { + V1ServerAddressByClientCIDRBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildServerAddressByClientCIDRs() { + return this.serverAddressByClientCIDRs != null ? build(serverAddressByClientCIDRs) : null; + } + + public V1ServerAddressByClientCIDR buildServerAddressByClientCIDR(int index) { + return this.serverAddressByClientCIDRs.get(index).build(); + } + + public V1ServerAddressByClientCIDR buildFirstServerAddressByClientCIDR() { + return this.serverAddressByClientCIDRs.get(0).build(); + } + + public V1ServerAddressByClientCIDR buildLastServerAddressByClientCIDR() { + return this.serverAddressByClientCIDRs.get(serverAddressByClientCIDRs.size() - 1).build(); + } + + public V1ServerAddressByClientCIDR buildMatchingServerAddressByClientCIDR(Predicate predicate) { + for (V1ServerAddressByClientCIDRBuilder item : serverAddressByClientCIDRs) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingServerAddressByClientCIDR(Predicate predicate) { + for (V1ServerAddressByClientCIDRBuilder item : serverAddressByClientCIDRs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withServerAddressByClientCIDRs(List serverAddressByClientCIDRs) { + if (this.serverAddressByClientCIDRs != null) { + this._visitables.get("serverAddressByClientCIDRs").clear(); + } + if (serverAddressByClientCIDRs != null) { + this.serverAddressByClientCIDRs = new ArrayList(); + for (V1ServerAddressByClientCIDR item : serverAddressByClientCIDRs) { + this.addToServerAddressByClientCIDRs(item); + } + } else { + this.serverAddressByClientCIDRs = null; + } + return (A) this; + } + + public A withServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... serverAddressByClientCIDRs) { + if (this.serverAddressByClientCIDRs != null) { + this.serverAddressByClientCIDRs.clear(); + _visitables.remove("serverAddressByClientCIDRs"); + } + if (serverAddressByClientCIDRs != null) { + for (V1ServerAddressByClientCIDR item : serverAddressByClientCIDRs) { + this.addToServerAddressByClientCIDRs(item); + } + } + return (A) this; + } + + public boolean hasServerAddressByClientCIDRs() { + return this.serverAddressByClientCIDRs != null && !this.serverAddressByClientCIDRs.isEmpty(); + } + + public ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDR() { + return new ServerAddressByClientCIDRsNested(-1, null); + } + + public ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDRLike(V1ServerAddressByClientCIDR item) { + return new ServerAddressByClientCIDRsNested(-1, item); + } + + public ServerAddressByClientCIDRsNested setNewServerAddressByClientCIDRLike(int index,V1ServerAddressByClientCIDR item) { + return new ServerAddressByClientCIDRsNested(index, item); + } + + public ServerAddressByClientCIDRsNested editServerAddressByClientCIDR(int index) { + if (serverAddressByClientCIDRs.size() <= index) throw new RuntimeException("Can't edit serverAddressByClientCIDRs. Index exceeds size."); + return setNewServerAddressByClientCIDRLike(index, buildServerAddressByClientCIDR(index)); + } + + public ServerAddressByClientCIDRsNested editFirstServerAddressByClientCIDR() { + if (serverAddressByClientCIDRs.size() == 0) throw new RuntimeException("Can't edit first serverAddressByClientCIDRs. The list is empty."); + return setNewServerAddressByClientCIDRLike(0, buildServerAddressByClientCIDR(0)); + } + + public ServerAddressByClientCIDRsNested editLastServerAddressByClientCIDR() { + int index = serverAddressByClientCIDRs.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last serverAddressByClientCIDRs. The list is empty."); + return setNewServerAddressByClientCIDRLike(index, buildServerAddressByClientCIDR(index)); + } + + public ServerAddressByClientCIDRsNested editMatchingServerAddressByClientCIDR(Predicate predicate) { + int index = -1; + for (int i=0;i();} + this.versions.add(index, item); + return (A)this; + } + + public A setToVersions(int index,String item) { + if (this.versions == null) {this.versions = new ArrayList();} + this.versions.set(index, item); return (A)this; + } + + public A addToVersions(java.lang.String... items) { + if (this.versions == null) {this.versions = new ArrayList();} + for (String item : items) {this.versions.add(item);} return (A)this; + } + + public A addAllToVersions(Collection items) { + if (this.versions == null) {this.versions = new ArrayList();} + for (String item : items) {this.versions.add(item);} return (A)this; + } + + public A removeFromVersions(java.lang.String... items) { + if (this.versions == null) return (A)this; + for (String item : items) { this.versions.remove(item);} return (A)this; + } + + public A removeAllFromVersions(Collection items) { + if (this.versions == null) return (A)this; + for (String item : items) { this.versions.remove(item);} return (A)this; + } + + public List getVersions() { + return this.versions; + } + + public String getVersion(int index) { + return this.versions.get(index); + } + + public String getFirstVersion() { + return this.versions.get(0); + } + + public String getLastVersion() { + return this.versions.get(versions.size() - 1); + } + + public String getMatchingVersion(Predicate predicate) { + for (String item : versions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVersion(Predicate predicate) { + for (String item : versions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVersions(List versions) { + if (versions != null) { + this.versions = new ArrayList(); + for (String item : versions) { + this.addToVersions(item); + } + } else { + this.versions = null; + } + return (A) this; + } + + public A withVersions(java.lang.String... versions) { + if (this.versions != null) { + this.versions.clear(); + _visitables.remove("versions"); + } + if (versions != null) { + for (String item : versions) { + this.addToVersions(item); + } + } + return (A) this; } + public boolean hasVersions() { + return this.versions != null && !this.versions.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1APIVersionsFluent that = (V1APIVersionsFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(serverAddressByClientCIDRs, that.serverAddressByClientCIDRs)) return false; + if (!java.util.Objects.equals(versions, that.versions)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, serverAddressByClientCIDRs, versions, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (serverAddressByClientCIDRs != null && !serverAddressByClientCIDRs.isEmpty()) { sb.append("serverAddressByClientCIDRs:"); sb.append(serverAddressByClientCIDRs + ","); } + if (versions != null && !versions.isEmpty()) { sb.append("versions:"); sb.append(versions); } + sb.append("}"); + return sb.toString(); + } + public class ServerAddressByClientCIDRsNested extends V1ServerAddressByClientCIDRFluent> implements Nested{ + ServerAddressByClientCIDRsNested(int index,V1ServerAddressByClientCIDR item) { + this.index = index; + this.builder = new V1ServerAddressByClientCIDRBuilder(this, item); + } + V1ServerAddressByClientCIDRBuilder builder; + int index; + + public N and() { + return (N) V1APIVersionsFluent.this.setToServerAddressByClientCIDRs(index,builder.build()); + } + + public N endServerAddressByClientCIDR() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsFluentImpl.java deleted file mode 100644 index aab3455fc1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1APIVersionsFluentImpl.java +++ /dev/null @@ -1,260 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1APIVersionsFluentImpl> extends BaseFluent implements V1APIVersionsFluent{ - public V1APIVersionsFluentImpl() { - } - public V1APIVersionsFluentImpl(V1APIVersions instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs()); - this.withVersions(instance.getVersions()); - } - } - private String apiVersion; - private String kind; - private ArrayList serverAddressByClientCIDRs; - private List versions; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public A addToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item) { - if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} - V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item); - if (index < 0 || index >= serverAddressByClientCIDRs.size()) { _visitables.get("serverAddressByClientCIDRs").add(builder); serverAddressByClientCIDRs.add(builder); } else { _visitables.get("serverAddressByClientCIDRs").add(index, builder); serverAddressByClientCIDRs.add(index, builder);} - return (A)this; - } - public A setToServerAddressByClientCIDRs(int index,V1ServerAddressByClientCIDR item) { - if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} - V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item); - if (index < 0 || index >= serverAddressByClientCIDRs.size()) { _visitables.get("serverAddressByClientCIDRs").add(builder); serverAddressByClientCIDRs.add(builder); } else { _visitables.get("serverAddressByClientCIDRs").set(index, builder); serverAddressByClientCIDRs.set(index, builder);} - return (A)this; - } - public A addToServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items) { - if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} - for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").add(builder);this.serverAddressByClientCIDRs.add(builder);} return (A)this; - } - public A addAllToServerAddressByClientCIDRs(Collection items) { - if (this.serverAddressByClientCIDRs == null) {this.serverAddressByClientCIDRs = new ArrayList();} - for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").add(builder);this.serverAddressByClientCIDRs.add(builder);} return (A)this; - } - public A removeFromServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... items) { - for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").remove(builder);if (this.serverAddressByClientCIDRs != null) {this.serverAddressByClientCIDRs.remove(builder);}} return (A)this; - } - public A removeAllFromServerAddressByClientCIDRs(Collection items) { - for (V1ServerAddressByClientCIDR item : items) {V1ServerAddressByClientCIDRBuilder builder = new V1ServerAddressByClientCIDRBuilder(item);_visitables.get("serverAddressByClientCIDRs").remove(builder);if (this.serverAddressByClientCIDRs != null) {this.serverAddressByClientCIDRs.remove(builder);}} return (A)this; - } - public A removeMatchingFromServerAddressByClientCIDRs(Predicate predicate) { - if (serverAddressByClientCIDRs == null) return (A) this; - final Iterator each = serverAddressByClientCIDRs.iterator(); - final List visitables = _visitables.get("serverAddressByClientCIDRs"); - while (each.hasNext()) { - V1ServerAddressByClientCIDRBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildServerAddressByClientCIDRs instead. - * @return The buildable object. - */ - @Deprecated - public List getServerAddressByClientCIDRs() { - return serverAddressByClientCIDRs != null ? build(serverAddressByClientCIDRs) : null; - } - public List buildServerAddressByClientCIDRs() { - return serverAddressByClientCIDRs != null ? build(serverAddressByClientCIDRs) : null; - } - public V1ServerAddressByClientCIDR buildServerAddressByClientCIDR(int index) { - return this.serverAddressByClientCIDRs.get(index).build(); - } - public V1ServerAddressByClientCIDR buildFirstServerAddressByClientCIDR() { - return this.serverAddressByClientCIDRs.get(0).build(); - } - public V1ServerAddressByClientCIDR buildLastServerAddressByClientCIDR() { - return this.serverAddressByClientCIDRs.get(serverAddressByClientCIDRs.size() - 1).build(); - } - public V1ServerAddressByClientCIDR buildMatchingServerAddressByClientCIDR(Predicate predicate) { - for (V1ServerAddressByClientCIDRBuilder item: serverAddressByClientCIDRs) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingServerAddressByClientCIDR(Predicate predicate) { - for (V1ServerAddressByClientCIDRBuilder item: serverAddressByClientCIDRs) { if(predicate.test(item)){ return true;} } return false; - } - public A withServerAddressByClientCIDRs(List serverAddressByClientCIDRs) { - if (this.serverAddressByClientCIDRs != null) { _visitables.get("serverAddressByClientCIDRs").clear();} - if (serverAddressByClientCIDRs != null) {this.serverAddressByClientCIDRs = new ArrayList(); for (V1ServerAddressByClientCIDR item : serverAddressByClientCIDRs){this.addToServerAddressByClientCIDRs(item);}} else { this.serverAddressByClientCIDRs = null;} return (A) this; - } - public A withServerAddressByClientCIDRs(io.kubernetes.client.openapi.models.V1ServerAddressByClientCIDR... serverAddressByClientCIDRs) { - if (this.serverAddressByClientCIDRs != null) {this.serverAddressByClientCIDRs.clear(); _visitables.remove("serverAddressByClientCIDRs"); } - if (serverAddressByClientCIDRs != null) {for (V1ServerAddressByClientCIDR item :serverAddressByClientCIDRs){ this.addToServerAddressByClientCIDRs(item);}} return (A) this; - } - public Boolean hasServerAddressByClientCIDRs() { - return serverAddressByClientCIDRs != null && !serverAddressByClientCIDRs.isEmpty(); - } - public V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDR() { - return new V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNestedImpl(); - } - public V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNested addNewServerAddressByClientCIDRLike(V1ServerAddressByClientCIDR item) { - return new V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNestedImpl(-1, item); - } - public V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNested setNewServerAddressByClientCIDRLike(int index,V1ServerAddressByClientCIDR item) { - return new V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNestedImpl(index, item); - } - public V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNested editServerAddressByClientCIDR(int index) { - if (serverAddressByClientCIDRs.size() <= index) throw new RuntimeException("Can't edit serverAddressByClientCIDRs. Index exceeds size."); - return setNewServerAddressByClientCIDRLike(index, buildServerAddressByClientCIDR(index)); - } - public V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNested editFirstServerAddressByClientCIDR() { - if (serverAddressByClientCIDRs.size() == 0) throw new RuntimeException("Can't edit first serverAddressByClientCIDRs. The list is empty."); - return setNewServerAddressByClientCIDRLike(0, buildServerAddressByClientCIDR(0)); - } - public V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNested editLastServerAddressByClientCIDR() { - int index = serverAddressByClientCIDRs.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last serverAddressByClientCIDRs. The list is empty."); - return setNewServerAddressByClientCIDRLike(index, buildServerAddressByClientCIDR(index)); - } - public V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNested editMatchingServerAddressByClientCIDR(Predicate predicate) { - int index = -1; - for (int i=0;i();} - this.versions.add(index, item); - return (A)this; - } - public A setToVersions(int index,String item) { - if (this.versions == null) {this.versions = new ArrayList();} - this.versions.set(index, item); return (A)this; - } - public A addToVersions(java.lang.String... items) { - if (this.versions == null) {this.versions = new ArrayList();} - for (String item : items) {this.versions.add(item);} return (A)this; - } - public A addAllToVersions(Collection items) { - if (this.versions == null) {this.versions = new ArrayList();} - for (String item : items) {this.versions.add(item);} return (A)this; - } - public A removeFromVersions(java.lang.String... items) { - for (String item : items) {if (this.versions!= null){ this.versions.remove(item);}} return (A)this; - } - public A removeAllFromVersions(Collection items) { - for (String item : items) {if (this.versions!= null){ this.versions.remove(item);}} return (A)this; - } - public List getVersions() { - return this.versions; - } - public String getVersion(int index) { - return this.versions.get(index); - } - public String getFirstVersion() { - return this.versions.get(0); - } - public String getLastVersion() { - return this.versions.get(versions.size() - 1); - } - public String getMatchingVersion(Predicate predicate) { - for (String item: versions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVersion(Predicate predicate) { - for (String item: versions) { if(predicate.test(item)){ return true;} } return false; - } - public A withVersions(List versions) { - if (versions != null) {this.versions = new ArrayList(); for (String item : versions){this.addToVersions(item);}} else { this.versions = null;} return (A) this; - } - public A withVersions(java.lang.String... versions) { - if (this.versions != null) {this.versions.clear(); _visitables.remove("versions"); } - if (versions != null) {for (String item :versions){ this.addToVersions(item);}} return (A) this; - } - public Boolean hasVersions() { - return versions != null && !versions.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1APIVersionsFluentImpl that = (V1APIVersionsFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(serverAddressByClientCIDRs, that.serverAddressByClientCIDRs)) return false; - - if (!java.util.Objects.equals(versions, that.versions)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, serverAddressByClientCIDRs, versions, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (serverAddressByClientCIDRs != null) { sb.append("serverAddressByClientCIDRs:"); sb.append(serverAddressByClientCIDRs + ","); } - if (versions != null && !versions.isEmpty()) { sb.append("versions:"); sb.append(versions); } - sb.append("}"); - return sb.toString(); - } - class ServerAddressByClientCIDRsNestedImpl extends V1ServerAddressByClientCIDRFluentImpl> implements V1APIVersionsFluentImpl.ServerAddressByClientCIDRsNested,Nested{ - ServerAddressByClientCIDRsNestedImpl(int index,V1ServerAddressByClientCIDR item) { - this.index = index; - this.builder = new V1ServerAddressByClientCIDRBuilder(this, item); - } - ServerAddressByClientCIDRsNestedImpl() { - this.index = -1; - this.builder = new V1ServerAddressByClientCIDRBuilder(this); - } - V1ServerAddressByClientCIDRBuilder builder; - int index; - public N and() { - return (N) V1APIVersionsFluentImpl.this.setToServerAddressByClientCIDRs(index,builder.build()); - } - public N endServerAddressByClientCIDR() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceBuilder.java index d11628e5f1..e1aa8d47eb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1AWSElasticBlockStoreVolumeSourceBuilder extends V1AWSElasticBlockStoreVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1AWSElasticBlockStoreVolumeSourceBuilder extends V1AWSElasticBlockStoreVolumeSourceFluent implements VisitableBuilder{ public V1AWSElasticBlockStoreVolumeSourceBuilder() { - this(false); - } - public V1AWSElasticBlockStoreVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1AWSElasticBlockStoreVolumeSource(), validationEnabled); + this(new V1AWSElasticBlockStoreVolumeSource()); } + public V1AWSElasticBlockStoreVolumeSourceBuilder(V1AWSElasticBlockStoreVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1AWSElasticBlockStoreVolumeSourceBuilder(V1AWSElasticBlockStoreVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1AWSElasticBlockStoreVolumeSource(), validationEnabled); + this(fluent, new V1AWSElasticBlockStoreVolumeSource()); } + public V1AWSElasticBlockStoreVolumeSourceBuilder(V1AWSElasticBlockStoreVolumeSourceFluent fluent,V1AWSElasticBlockStoreVolumeSource instance) { - this(fluent, instance, false); - } - public V1AWSElasticBlockStoreVolumeSourceBuilder(V1AWSElasticBlockStoreVolumeSourceFluent fluent,V1AWSElasticBlockStoreVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withPartition(instance.getPartition()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withVolumeID(instance.getVolumeID()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1AWSElasticBlockStoreVolumeSourceBuilder(V1AWSElasticBlockStoreVolumeSource instance) { - this(instance,false); - } - public V1AWSElasticBlockStoreVolumeSourceBuilder(V1AWSElasticBlockStoreVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withPartition(instance.getPartition()); - this.withReadOnly(instance.getReadOnly()); - this.withVolumeID(instance.getVolumeID()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1AWSElasticBlockStoreVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1AWSElasticBlockStoreVolumeSource build() { V1AWSElasticBlockStoreVolumeSource buildable = new V1AWSElasticBlockStoreVolumeSource(); buildable.setFsType(fluent.getFsType()); @@ -52,4 +30,5 @@ public V1AWSElasticBlockStoreVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceFluent.java index 6664ae612e..47cc5dcc46 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceFluent.java @@ -1,27 +1,120 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1AWSElasticBlockStoreVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public Integer getPartition(); - public A withPartition(Integer partition); - public Boolean hasPartition(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public String getVolumeID(); - public A withVolumeID(String volumeID); - public Boolean hasVolumeID(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1AWSElasticBlockStoreVolumeSourceFluent> extends BaseFluent{ + public V1AWSElasticBlockStoreVolumeSourceFluent() { + } + public V1AWSElasticBlockStoreVolumeSourceFluent(V1AWSElasticBlockStoreVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private Integer partition; + private Boolean readOnly; + private String volumeID; + + protected void copyInstance(V1AWSElasticBlockStoreVolumeSource instance) { + instance = (instance != null ? instance : new V1AWSElasticBlockStoreVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withPartition(instance.getPartition()); + this.withReadOnly(instance.getReadOnly()); + this.withVolumeID(instance.getVolumeID()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public Integer getPartition() { + return this.partition; + } + + public A withPartition(Integer partition) { + this.partition = partition; + return (A) this; + } + + public boolean hasPartition() { + return this.partition != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public String getVolumeID() { + return this.volumeID; + } + + public A withVolumeID(String volumeID) { + this.volumeID = volumeID; + return (A) this; + } + + public boolean hasVolumeID() { + return this.volumeID != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1AWSElasticBlockStoreVolumeSourceFluent that = (V1AWSElasticBlockStoreVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(partition, that.partition)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(volumeID, that.volumeID)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, partition, readOnly, volumeID, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (partition != null) { sb.append("partition:"); sb.append(partition + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (volumeID != null) { sb.append("volumeID:"); sb.append(volumeID); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceFluentImpl.java deleted file mode 100644 index 9794ed15ee..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AWSElasticBlockStoreVolumeSourceFluentImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1AWSElasticBlockStoreVolumeSourceFluentImpl> extends BaseFluent implements V1AWSElasticBlockStoreVolumeSourceFluent{ - public V1AWSElasticBlockStoreVolumeSourceFluentImpl() { - } - public V1AWSElasticBlockStoreVolumeSourceFluentImpl(V1AWSElasticBlockStoreVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withPartition(instance.getPartition()); - this.withReadOnly(instance.getReadOnly()); - this.withVolumeID(instance.getVolumeID()); - } - } - private String fsType; - private Integer partition; - private Boolean readOnly; - private String volumeID; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public Integer getPartition() { - return this.partition; - } - public A withPartition(Integer partition) { - this.partition=partition; return (A) this; - } - public Boolean hasPartition() { - return this.partition != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public String getVolumeID() { - return this.volumeID; - } - public A withVolumeID(String volumeID) { - this.volumeID=volumeID; return (A) this; - } - public Boolean hasVolumeID() { - return this.volumeID != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1AWSElasticBlockStoreVolumeSourceFluentImpl that = (V1AWSElasticBlockStoreVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(partition, that.partition)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(volumeID, that.volumeID)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, partition, readOnly, volumeID, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (partition != null) { sb.append("partition:"); sb.append(partition + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (volumeID != null) { sb.append("volumeID:"); sb.append(volumeID); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityBuilder.java index 769f429546..1693c475dd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1AffinityBuilder extends V1AffinityFluentImpl implements VisitableBuilder{ +public class V1AffinityBuilder extends V1AffinityFluent implements VisitableBuilder{ public V1AffinityBuilder() { - this(false); - } - public V1AffinityBuilder(Boolean validationEnabled) { - this(new V1Affinity(), validationEnabled); + this(new V1Affinity()); } + public V1AffinityBuilder(V1AffinityFluent fluent) { - this(fluent, false); - } - public V1AffinityBuilder(V1AffinityFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Affinity(), validationEnabled); + this(fluent, new V1Affinity()); } + public V1AffinityBuilder(V1AffinityFluent fluent,V1Affinity instance) { - this(fluent, instance, false); - } - public V1AffinityBuilder(V1AffinityFluent fluent,V1Affinity instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNodeAffinity(instance.getNodeAffinity()); - fluent.withPodAffinity(instance.getPodAffinity()); - fluent.withPodAntiAffinity(instance.getPodAntiAffinity()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1AffinityBuilder(V1Affinity instance) { - this(instance,false); - } - public V1AffinityBuilder(V1Affinity instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNodeAffinity(instance.getNodeAffinity()); - this.withPodAffinity(instance.getPodAffinity()); - this.withPodAntiAffinity(instance.getPodAntiAffinity()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1AffinityFluent fluent; - Boolean validationEnabled; + public V1Affinity build() { V1Affinity buildable = new V1Affinity(); - buildable.setNodeAffinity(fluent.getNodeAffinity()); - buildable.setPodAffinity(fluent.getPodAffinity()); - buildable.setPodAntiAffinity(fluent.getPodAntiAffinity()); + buildable.setNodeAffinity(fluent.buildNodeAffinity()); + buildable.setPodAffinity(fluent.buildPodAffinity()); + buildable.setPodAntiAffinity(fluent.buildPodAntiAffinity()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityFluent.java index b2af32b684..797c091bfc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityFluent.java @@ -1,74 +1,226 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1AffinityFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildNodeAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeAffinity getNodeAffinity(); - public V1NodeAffinity buildNodeAffinity(); - public A withNodeAffinity(V1NodeAffinity nodeAffinity); - public Boolean hasNodeAffinity(); - public V1AffinityFluent.NodeAffinityNested withNewNodeAffinity(); - public V1AffinityFluent.NodeAffinityNested withNewNodeAffinityLike(V1NodeAffinity item); - public V1AffinityFluent.NodeAffinityNested editNodeAffinity(); - public V1AffinityFluent.NodeAffinityNested editOrNewNodeAffinity(); - public V1AffinityFluent.NodeAffinityNested editOrNewNodeAffinityLike(V1NodeAffinity item); - - /** - * This method has been deprecated, please use method buildPodAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1PodAffinity getPodAffinity(); - public V1PodAffinity buildPodAffinity(); - public A withPodAffinity(V1PodAffinity podAffinity); - public Boolean hasPodAffinity(); - public V1AffinityFluent.PodAffinityNested withNewPodAffinity(); - public V1AffinityFluent.PodAffinityNested withNewPodAffinityLike(V1PodAffinity item); - public V1AffinityFluent.PodAffinityNested editPodAffinity(); - public V1AffinityFluent.PodAffinityNested editOrNewPodAffinity(); - public V1AffinityFluent.PodAffinityNested editOrNewPodAffinityLike(V1PodAffinity item); - - /** - * This method has been deprecated, please use method buildPodAntiAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1PodAntiAffinity getPodAntiAffinity(); - public V1PodAntiAffinity buildPodAntiAffinity(); - public A withPodAntiAffinity(V1PodAntiAffinity podAntiAffinity); - public Boolean hasPodAntiAffinity(); - public V1AffinityFluent.PodAntiAffinityNested withNewPodAntiAffinity(); - public V1AffinityFluent.PodAntiAffinityNested withNewPodAntiAffinityLike(V1PodAntiAffinity item); - public V1AffinityFluent.PodAntiAffinityNested editPodAntiAffinity(); - public V1AffinityFluent.PodAntiAffinityNested editOrNewPodAntiAffinity(); - public V1AffinityFluent.PodAntiAffinityNested editOrNewPodAntiAffinityLike(V1PodAntiAffinity item); - public interface NodeAffinityNested extends Nested,V1NodeAffinityFluent>{ - public N and(); - public N endNodeAffinity(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1AffinityFluent> extends BaseFluent{ + public V1AffinityFluent() { + } + + public V1AffinityFluent(V1Affinity instance) { + this.copyInstance(instance); + } + private V1NodeAffinityBuilder nodeAffinity; + private V1PodAffinityBuilder podAffinity; + private V1PodAntiAffinityBuilder podAntiAffinity; + + protected void copyInstance(V1Affinity instance) { + instance = (instance != null ? instance : new V1Affinity()); + if (instance != null) { + this.withNodeAffinity(instance.getNodeAffinity()); + this.withPodAffinity(instance.getPodAffinity()); + this.withPodAntiAffinity(instance.getPodAntiAffinity()); + } + } + + public V1NodeAffinity buildNodeAffinity() { + return this.nodeAffinity != null ? this.nodeAffinity.build() : null; + } + + public A withNodeAffinity(V1NodeAffinity nodeAffinity) { + this._visitables.remove("nodeAffinity"); + if (nodeAffinity != null) { + this.nodeAffinity = new V1NodeAffinityBuilder(nodeAffinity); + this._visitables.get("nodeAffinity").add(this.nodeAffinity); + } else { + this.nodeAffinity = null; + this._visitables.get("nodeAffinity").remove(this.nodeAffinity); + } + return (A) this; + } + + public boolean hasNodeAffinity() { + return this.nodeAffinity != null; + } + + public NodeAffinityNested withNewNodeAffinity() { + return new NodeAffinityNested(null); + } + + public NodeAffinityNested withNewNodeAffinityLike(V1NodeAffinity item) { + return new NodeAffinityNested(item); + } + + public NodeAffinityNested editNodeAffinity() { + return withNewNodeAffinityLike(java.util.Optional.ofNullable(buildNodeAffinity()).orElse(null)); + } + + public NodeAffinityNested editOrNewNodeAffinity() { + return withNewNodeAffinityLike(java.util.Optional.ofNullable(buildNodeAffinity()).orElse(new V1NodeAffinityBuilder().build())); + } + + public NodeAffinityNested editOrNewNodeAffinityLike(V1NodeAffinity item) { + return withNewNodeAffinityLike(java.util.Optional.ofNullable(buildNodeAffinity()).orElse(item)); + } + + public V1PodAffinity buildPodAffinity() { + return this.podAffinity != null ? this.podAffinity.build() : null; + } + + public A withPodAffinity(V1PodAffinity podAffinity) { + this._visitables.remove("podAffinity"); + if (podAffinity != null) { + this.podAffinity = new V1PodAffinityBuilder(podAffinity); + this._visitables.get("podAffinity").add(this.podAffinity); + } else { + this.podAffinity = null; + this._visitables.get("podAffinity").remove(this.podAffinity); + } + return (A) this; + } + + public boolean hasPodAffinity() { + return this.podAffinity != null; + } + + public PodAffinityNested withNewPodAffinity() { + return new PodAffinityNested(null); + } + + public PodAffinityNested withNewPodAffinityLike(V1PodAffinity item) { + return new PodAffinityNested(item); + } + + public PodAffinityNested editPodAffinity() { + return withNewPodAffinityLike(java.util.Optional.ofNullable(buildPodAffinity()).orElse(null)); + } + + public PodAffinityNested editOrNewPodAffinity() { + return withNewPodAffinityLike(java.util.Optional.ofNullable(buildPodAffinity()).orElse(new V1PodAffinityBuilder().build())); } - public interface PodAffinityNested extends Nested,V1PodAffinityFluent>{ - public N and(); - public N endPodAffinity(); + + public PodAffinityNested editOrNewPodAffinityLike(V1PodAffinity item) { + return withNewPodAffinityLike(java.util.Optional.ofNullable(buildPodAffinity()).orElse(item)); + } + + public V1PodAntiAffinity buildPodAntiAffinity() { + return this.podAntiAffinity != null ? this.podAntiAffinity.build() : null; + } + + public A withPodAntiAffinity(V1PodAntiAffinity podAntiAffinity) { + this._visitables.remove("podAntiAffinity"); + if (podAntiAffinity != null) { + this.podAntiAffinity = new V1PodAntiAffinityBuilder(podAntiAffinity); + this._visitables.get("podAntiAffinity").add(this.podAntiAffinity); + } else { + this.podAntiAffinity = null; + this._visitables.get("podAntiAffinity").remove(this.podAntiAffinity); + } + return (A) this; + } + + public boolean hasPodAntiAffinity() { + return this.podAntiAffinity != null; + } + + public PodAntiAffinityNested withNewPodAntiAffinity() { + return new PodAntiAffinityNested(null); + } + + public PodAntiAffinityNested withNewPodAntiAffinityLike(V1PodAntiAffinity item) { + return new PodAntiAffinityNested(item); + } + + public PodAntiAffinityNested editPodAntiAffinity() { + return withNewPodAntiAffinityLike(java.util.Optional.ofNullable(buildPodAntiAffinity()).orElse(null)); + } + + public PodAntiAffinityNested editOrNewPodAntiAffinity() { + return withNewPodAntiAffinityLike(java.util.Optional.ofNullable(buildPodAntiAffinity()).orElse(new V1PodAntiAffinityBuilder().build())); + } + + public PodAntiAffinityNested editOrNewPodAntiAffinityLike(V1PodAntiAffinity item) { + return withNewPodAntiAffinityLike(java.util.Optional.ofNullable(buildPodAntiAffinity()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1AffinityFluent that = (V1AffinityFluent) o; + if (!java.util.Objects.equals(nodeAffinity, that.nodeAffinity)) return false; + if (!java.util.Objects.equals(podAffinity, that.podAffinity)) return false; + if (!java.util.Objects.equals(podAntiAffinity, that.podAntiAffinity)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(nodeAffinity, podAffinity, podAntiAffinity, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (nodeAffinity != null) { sb.append("nodeAffinity:"); sb.append(nodeAffinity + ","); } + if (podAffinity != null) { sb.append("podAffinity:"); sb.append(podAffinity + ","); } + if (podAntiAffinity != null) { sb.append("podAntiAffinity:"); sb.append(podAntiAffinity); } + sb.append("}"); + return sb.toString(); + } + public class NodeAffinityNested extends V1NodeAffinityFluent> implements Nested{ + NodeAffinityNested(V1NodeAffinity item) { + this.builder = new V1NodeAffinityBuilder(this, item); + } + V1NodeAffinityBuilder builder; + + public N and() { + return (N) V1AffinityFluent.this.withNodeAffinity(builder.build()); + } + public N endNodeAffinity() { + return and(); + } + + } - public interface PodAntiAffinityNested extends Nested,V1PodAntiAffinityFluent>{ - public N and(); - public N endPodAntiAffinity(); + public class PodAffinityNested extends V1PodAffinityFluent> implements Nested{ + PodAffinityNested(V1PodAffinity item) { + this.builder = new V1PodAffinityBuilder(this, item); + } + V1PodAffinityBuilder builder; + public N and() { + return (N) V1AffinityFluent.this.withPodAffinity(builder.build()); + } + + public N endPodAffinity() { + return and(); + } + + } + public class PodAntiAffinityNested extends V1PodAntiAffinityFluent> implements Nested{ + PodAntiAffinityNested(V1PodAntiAffinity item) { + this.builder = new V1PodAntiAffinityBuilder(this, item); + } + V1PodAntiAffinityBuilder builder; + + public N and() { + return (N) V1AffinityFluent.this.withPodAntiAffinity(builder.build()); + } + + public N endPodAntiAffinity() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityFluentImpl.java deleted file mode 100644 index 7fea62ac7a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AffinityFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1AffinityFluentImpl> extends BaseFluent implements V1AffinityFluent{ - public V1AffinityFluentImpl() { - } - public V1AffinityFluentImpl(V1Affinity instance) { - if (instance != null) { - this.withNodeAffinity(instance.getNodeAffinity()); - this.withPodAffinity(instance.getPodAffinity()); - this.withPodAntiAffinity(instance.getPodAntiAffinity()); - } - } - private V1NodeAffinityBuilder nodeAffinity; - private V1PodAffinityBuilder podAffinity; - private V1PodAntiAffinityBuilder podAntiAffinity; - - /** - * This method has been deprecated, please use method buildNodeAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeAffinity getNodeAffinity() { - return this.nodeAffinity!=null ?this.nodeAffinity.build():null; - } - public V1NodeAffinity buildNodeAffinity() { - return this.nodeAffinity!=null ?this.nodeAffinity.build():null; - } - public A withNodeAffinity(V1NodeAffinity nodeAffinity) { - _visitables.get("nodeAffinity").remove(this.nodeAffinity); - if (nodeAffinity!=null){ this.nodeAffinity= new V1NodeAffinityBuilder(nodeAffinity); _visitables.get("nodeAffinity").add(this.nodeAffinity);} else { this.nodeAffinity = null; _visitables.get("nodeAffinity").remove(this.nodeAffinity); } return (A) this; - } - public Boolean hasNodeAffinity() { - return this.nodeAffinity != null; - } - public V1AffinityFluentImpl.NodeAffinityNested withNewNodeAffinity() { - return new V1AffinityFluentImpl.NodeAffinityNestedImpl(); - } - public V1AffinityFluentImpl.NodeAffinityNested withNewNodeAffinityLike(V1NodeAffinity item) { - return new V1AffinityFluentImpl.NodeAffinityNestedImpl(item); - } - public V1AffinityFluentImpl.NodeAffinityNested editNodeAffinity() { - return withNewNodeAffinityLike(getNodeAffinity()); - } - public V1AffinityFluentImpl.NodeAffinityNested editOrNewNodeAffinity() { - return withNewNodeAffinityLike(getNodeAffinity() != null ? getNodeAffinity(): new V1NodeAffinityBuilder().build()); - } - public V1AffinityFluentImpl.NodeAffinityNested editOrNewNodeAffinityLike(V1NodeAffinity item) { - return withNewNodeAffinityLike(getNodeAffinity() != null ? getNodeAffinity(): item); - } - - /** - * This method has been deprecated, please use method buildPodAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1PodAffinity getPodAffinity() { - return this.podAffinity!=null ?this.podAffinity.build():null; - } - public V1PodAffinity buildPodAffinity() { - return this.podAffinity!=null ?this.podAffinity.build():null; - } - public A withPodAffinity(V1PodAffinity podAffinity) { - _visitables.get("podAffinity").remove(this.podAffinity); - if (podAffinity!=null){ this.podAffinity= new V1PodAffinityBuilder(podAffinity); _visitables.get("podAffinity").add(this.podAffinity);} else { this.podAffinity = null; _visitables.get("podAffinity").remove(this.podAffinity); } return (A) this; - } - public Boolean hasPodAffinity() { - return this.podAffinity != null; - } - public V1AffinityFluentImpl.PodAffinityNested withNewPodAffinity() { - return new V1AffinityFluentImpl.PodAffinityNestedImpl(); - } - public V1AffinityFluentImpl.PodAffinityNested withNewPodAffinityLike(V1PodAffinity item) { - return new V1AffinityFluentImpl.PodAffinityNestedImpl(item); - } - public V1AffinityFluentImpl.PodAffinityNested editPodAffinity() { - return withNewPodAffinityLike(getPodAffinity()); - } - public V1AffinityFluentImpl.PodAffinityNested editOrNewPodAffinity() { - return withNewPodAffinityLike(getPodAffinity() != null ? getPodAffinity(): new V1PodAffinityBuilder().build()); - } - public V1AffinityFluentImpl.PodAffinityNested editOrNewPodAffinityLike(V1PodAffinity item) { - return withNewPodAffinityLike(getPodAffinity() != null ? getPodAffinity(): item); - } - - /** - * This method has been deprecated, please use method buildPodAntiAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1PodAntiAffinity getPodAntiAffinity() { - return this.podAntiAffinity!=null ?this.podAntiAffinity.build():null; - } - public V1PodAntiAffinity buildPodAntiAffinity() { - return this.podAntiAffinity!=null ?this.podAntiAffinity.build():null; - } - public A withPodAntiAffinity(V1PodAntiAffinity podAntiAffinity) { - _visitables.get("podAntiAffinity").remove(this.podAntiAffinity); - if (podAntiAffinity!=null){ this.podAntiAffinity= new V1PodAntiAffinityBuilder(podAntiAffinity); _visitables.get("podAntiAffinity").add(this.podAntiAffinity);} else { this.podAntiAffinity = null; _visitables.get("podAntiAffinity").remove(this.podAntiAffinity); } return (A) this; - } - public Boolean hasPodAntiAffinity() { - return this.podAntiAffinity != null; - } - public V1AffinityFluentImpl.PodAntiAffinityNested withNewPodAntiAffinity() { - return new V1AffinityFluentImpl.PodAntiAffinityNestedImpl(); - } - public V1AffinityFluentImpl.PodAntiAffinityNested withNewPodAntiAffinityLike(V1PodAntiAffinity item) { - return new V1AffinityFluentImpl.PodAntiAffinityNestedImpl(item); - } - public V1AffinityFluentImpl.PodAntiAffinityNested editPodAntiAffinity() { - return withNewPodAntiAffinityLike(getPodAntiAffinity()); - } - public V1AffinityFluentImpl.PodAntiAffinityNested editOrNewPodAntiAffinity() { - return withNewPodAntiAffinityLike(getPodAntiAffinity() != null ? getPodAntiAffinity(): new V1PodAntiAffinityBuilder().build()); - } - public V1AffinityFluentImpl.PodAntiAffinityNested editOrNewPodAntiAffinityLike(V1PodAntiAffinity item) { - return withNewPodAntiAffinityLike(getPodAntiAffinity() != null ? getPodAntiAffinity(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1AffinityFluentImpl that = (V1AffinityFluentImpl) o; - if (!java.util.Objects.equals(nodeAffinity, that.nodeAffinity)) return false; - - if (!java.util.Objects.equals(podAffinity, that.podAffinity)) return false; - - if (!java.util.Objects.equals(podAntiAffinity, that.podAntiAffinity)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(nodeAffinity, podAffinity, podAntiAffinity, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (nodeAffinity != null) { sb.append("nodeAffinity:"); sb.append(nodeAffinity + ","); } - if (podAffinity != null) { sb.append("podAffinity:"); sb.append(podAffinity + ","); } - if (podAntiAffinity != null) { sb.append("podAntiAffinity:"); sb.append(podAntiAffinity); } - sb.append("}"); - return sb.toString(); - } - class NodeAffinityNestedImpl extends V1NodeAffinityFluentImpl> implements V1AffinityFluentImpl.NodeAffinityNested,Nested{ - NodeAffinityNestedImpl(V1NodeAffinity item) { - this.builder = new V1NodeAffinityBuilder(this, item); - } - NodeAffinityNestedImpl() { - this.builder = new V1NodeAffinityBuilder(this); - } - V1NodeAffinityBuilder builder; - public N and() { - return (N) V1AffinityFluentImpl.this.withNodeAffinity(builder.build()); - } - public N endNodeAffinity() { - return and(); - } - - } - class PodAffinityNestedImpl extends V1PodAffinityFluentImpl> implements V1AffinityFluentImpl.PodAffinityNested,Nested{ - PodAffinityNestedImpl(V1PodAffinity item) { - this.builder = new V1PodAffinityBuilder(this, item); - } - PodAffinityNestedImpl() { - this.builder = new V1PodAffinityBuilder(this); - } - V1PodAffinityBuilder builder; - public N and() { - return (N) V1AffinityFluentImpl.this.withPodAffinity(builder.build()); - } - public N endPodAffinity() { - return and(); - } - - } - class PodAntiAffinityNestedImpl extends V1PodAntiAffinityFluentImpl> implements V1AffinityFluentImpl.PodAntiAffinityNested,Nested{ - PodAntiAffinityNestedImpl(V1PodAntiAffinity item) { - this.builder = new V1PodAntiAffinityBuilder(this, item); - } - PodAntiAffinityNestedImpl() { - this.builder = new V1PodAntiAffinityBuilder(this); - } - V1PodAntiAffinityBuilder builder; - public N and() { - return (N) V1AffinityFluentImpl.this.withPodAntiAffinity(builder.build()); - } - public N endPodAntiAffinity() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleBuilder.java index 2c492a578c..8da8617b10 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1AggregationRuleBuilder extends V1AggregationRuleFluentImpl implements VisitableBuilder{ +public class V1AggregationRuleBuilder extends V1AggregationRuleFluent implements VisitableBuilder{ public V1AggregationRuleBuilder() { - this(false); - } - public V1AggregationRuleBuilder(Boolean validationEnabled) { - this(new V1AggregationRule(), validationEnabled); + this(new V1AggregationRule()); } + public V1AggregationRuleBuilder(V1AggregationRuleFluent fluent) { - this(fluent, false); - } - public V1AggregationRuleBuilder(V1AggregationRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1AggregationRule(), validationEnabled); + this(fluent, new V1AggregationRule()); } + public V1AggregationRuleBuilder(V1AggregationRuleFluent fluent,V1AggregationRule instance) { - this(fluent, instance, false); - } - public V1AggregationRuleBuilder(V1AggregationRuleFluent fluent,V1AggregationRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withClusterRoleSelectors(instance.getClusterRoleSelectors()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1AggregationRuleBuilder(V1AggregationRule instance) { - this(instance,false); - } - public V1AggregationRuleBuilder(V1AggregationRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withClusterRoleSelectors(instance.getClusterRoleSelectors()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1AggregationRuleFluent fluent; - Boolean validationEnabled; + public V1AggregationRule build() { V1AggregationRule buildable = new V1AggregationRule(); - buildable.setClusterRoleSelectors(fluent.getClusterRoleSelectors()); + buildable.setClusterRoleSelectors(fluent.buildClusterRoleSelectors()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleFluent.java index efbb1328de..5861b381e9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1AggregationRuleFluent> extends Fluent{ - public A addToClusterRoleSelectors(int index,V1LabelSelector item); - public A setToClusterRoleSelectors(int index,V1LabelSelector item); - public A addToClusterRoleSelectors(io.kubernetes.client.openapi.models.V1LabelSelector... items); - public A addAllToClusterRoleSelectors(Collection items); - public A removeFromClusterRoleSelectors(io.kubernetes.client.openapi.models.V1LabelSelector... items); - public A removeAllFromClusterRoleSelectors(Collection items); - public A removeMatchingFromClusterRoleSelectors(Predicate predicate); - - /** - * This method has been deprecated, please use method buildClusterRoleSelectors instead. - * @return The buildable object. - */ - @Deprecated - public List getClusterRoleSelectors(); - public List buildClusterRoleSelectors(); - public V1LabelSelector buildClusterRoleSelector(int index); - public V1LabelSelector buildFirstClusterRoleSelector(); - public V1LabelSelector buildLastClusterRoleSelector(); - public V1LabelSelector buildMatchingClusterRoleSelector(Predicate predicate); - public Boolean hasMatchingClusterRoleSelector(Predicate predicate); - public A withClusterRoleSelectors(List clusterRoleSelectors); - public A withClusterRoleSelectors(io.kubernetes.client.openapi.models.V1LabelSelector... clusterRoleSelectors); - public Boolean hasClusterRoleSelectors(); - public V1AggregationRuleFluent.ClusterRoleSelectorsNested addNewClusterRoleSelector(); - public V1AggregationRuleFluent.ClusterRoleSelectorsNested addNewClusterRoleSelectorLike(V1LabelSelector item); - public V1AggregationRuleFluent.ClusterRoleSelectorsNested setNewClusterRoleSelectorLike(int index,V1LabelSelector item); - public V1AggregationRuleFluent.ClusterRoleSelectorsNested editClusterRoleSelector(int index); - public V1AggregationRuleFluent.ClusterRoleSelectorsNested editFirstClusterRoleSelector(); - public V1AggregationRuleFluent.ClusterRoleSelectorsNested editLastClusterRoleSelector(); - public V1AggregationRuleFluent.ClusterRoleSelectorsNested editMatchingClusterRoleSelector(Predicate predicate); - public interface ClusterRoleSelectorsNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endClusterRoleSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1AggregationRuleFluent> extends BaseFluent{ + public V1AggregationRuleFluent() { + } + + public V1AggregationRuleFluent(V1AggregationRule instance) { + this.copyInstance(instance); + } + private ArrayList clusterRoleSelectors; + + protected void copyInstance(V1AggregationRule instance) { + instance = (instance != null ? instance : new V1AggregationRule()); + if (instance != null) { + this.withClusterRoleSelectors(instance.getClusterRoleSelectors()); + } + } + + public A addToClusterRoleSelectors(int index,V1LabelSelector item) { + if (this.clusterRoleSelectors == null) {this.clusterRoleSelectors = new ArrayList();} + V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item); + if (index < 0 || index >= clusterRoleSelectors.size()) { _visitables.get("clusterRoleSelectors").add(builder); clusterRoleSelectors.add(builder); } else { _visitables.get("clusterRoleSelectors").add(index, builder); clusterRoleSelectors.add(index, builder);} + return (A)this; + } + + public A setToClusterRoleSelectors(int index,V1LabelSelector item) { + if (this.clusterRoleSelectors == null) {this.clusterRoleSelectors = new ArrayList();} + V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item); + if (index < 0 || index >= clusterRoleSelectors.size()) { _visitables.get("clusterRoleSelectors").add(builder); clusterRoleSelectors.add(builder); } else { _visitables.get("clusterRoleSelectors").set(index, builder); clusterRoleSelectors.set(index, builder);} + return (A)this; + } + + public A addToClusterRoleSelectors(io.kubernetes.client.openapi.models.V1LabelSelector... items) { + if (this.clusterRoleSelectors == null) {this.clusterRoleSelectors = new ArrayList();} + for (V1LabelSelector item : items) {V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item);_visitables.get("clusterRoleSelectors").add(builder);this.clusterRoleSelectors.add(builder);} return (A)this; + } + + public A addAllToClusterRoleSelectors(Collection items) { + if (this.clusterRoleSelectors == null) {this.clusterRoleSelectors = new ArrayList();} + for (V1LabelSelector item : items) {V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item);_visitables.get("clusterRoleSelectors").add(builder);this.clusterRoleSelectors.add(builder);} return (A)this; + } + + public A removeFromClusterRoleSelectors(io.kubernetes.client.openapi.models.V1LabelSelector... items) { + if (this.clusterRoleSelectors == null) return (A)this; + for (V1LabelSelector item : items) {V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item);_visitables.get("clusterRoleSelectors").remove(builder); this.clusterRoleSelectors.remove(builder);} return (A)this; + } + + public A removeAllFromClusterRoleSelectors(Collection items) { + if (this.clusterRoleSelectors == null) return (A)this; + for (V1LabelSelector item : items) {V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item);_visitables.get("clusterRoleSelectors").remove(builder); this.clusterRoleSelectors.remove(builder);} return (A)this; + } + + public A removeMatchingFromClusterRoleSelectors(Predicate predicate) { + if (clusterRoleSelectors == null) return (A) this; + final Iterator each = clusterRoleSelectors.iterator(); + final List visitables = _visitables.get("clusterRoleSelectors"); + while (each.hasNext()) { + V1LabelSelectorBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildClusterRoleSelectors() { + return this.clusterRoleSelectors != null ? build(clusterRoleSelectors) : null; + } + + public V1LabelSelector buildClusterRoleSelector(int index) { + return this.clusterRoleSelectors.get(index).build(); + } + + public V1LabelSelector buildFirstClusterRoleSelector() { + return this.clusterRoleSelectors.get(0).build(); + } + + public V1LabelSelector buildLastClusterRoleSelector() { + return this.clusterRoleSelectors.get(clusterRoleSelectors.size() - 1).build(); + } + + public V1LabelSelector buildMatchingClusterRoleSelector(Predicate predicate) { + for (V1LabelSelectorBuilder item : clusterRoleSelectors) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingClusterRoleSelector(Predicate predicate) { + for (V1LabelSelectorBuilder item : clusterRoleSelectors) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withClusterRoleSelectors(List clusterRoleSelectors) { + if (this.clusterRoleSelectors != null) { + this._visitables.get("clusterRoleSelectors").clear(); + } + if (clusterRoleSelectors != null) { + this.clusterRoleSelectors = new ArrayList(); + for (V1LabelSelector item : clusterRoleSelectors) { + this.addToClusterRoleSelectors(item); + } + } else { + this.clusterRoleSelectors = null; + } + return (A) this; + } + + public A withClusterRoleSelectors(io.kubernetes.client.openapi.models.V1LabelSelector... clusterRoleSelectors) { + if (this.clusterRoleSelectors != null) { + this.clusterRoleSelectors.clear(); + _visitables.remove("clusterRoleSelectors"); + } + if (clusterRoleSelectors != null) { + for (V1LabelSelector item : clusterRoleSelectors) { + this.addToClusterRoleSelectors(item); + } + } + return (A) this; + } + + public boolean hasClusterRoleSelectors() { + return this.clusterRoleSelectors != null && !this.clusterRoleSelectors.isEmpty(); + } + + public ClusterRoleSelectorsNested addNewClusterRoleSelector() { + return new ClusterRoleSelectorsNested(-1, null); + } + + public ClusterRoleSelectorsNested addNewClusterRoleSelectorLike(V1LabelSelector item) { + return new ClusterRoleSelectorsNested(-1, item); + } + + public ClusterRoleSelectorsNested setNewClusterRoleSelectorLike(int index,V1LabelSelector item) { + return new ClusterRoleSelectorsNested(index, item); + } + + public ClusterRoleSelectorsNested editClusterRoleSelector(int index) { + if (clusterRoleSelectors.size() <= index) throw new RuntimeException("Can't edit clusterRoleSelectors. Index exceeds size."); + return setNewClusterRoleSelectorLike(index, buildClusterRoleSelector(index)); + } + + public ClusterRoleSelectorsNested editFirstClusterRoleSelector() { + if (clusterRoleSelectors.size() == 0) throw new RuntimeException("Can't edit first clusterRoleSelectors. The list is empty."); + return setNewClusterRoleSelectorLike(0, buildClusterRoleSelector(0)); + } + + public ClusterRoleSelectorsNested editLastClusterRoleSelector() { + int index = clusterRoleSelectors.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last clusterRoleSelectors. The list is empty."); + return setNewClusterRoleSelectorLike(index, buildClusterRoleSelector(index)); + } + + public ClusterRoleSelectorsNested editMatchingClusterRoleSelector(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1LabelSelectorFluent> implements Nested{ + ClusterRoleSelectorsNested(int index,V1LabelSelector item) { + this.index = index; + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + int index; + + public N and() { + return (N) V1AggregationRuleFluent.this.setToClusterRoleSelectors(index,builder.build()); + } + + public N endClusterRoleSelector() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleFluentImpl.java deleted file mode 100644 index 7faa8289c7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AggregationRuleFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1AggregationRuleFluentImpl> extends BaseFluent implements V1AggregationRuleFluent{ - public V1AggregationRuleFluentImpl() { - } - public V1AggregationRuleFluentImpl(V1AggregationRule instance) { - if (instance != null) { - this.withClusterRoleSelectors(instance.getClusterRoleSelectors()); - } - } - private ArrayList clusterRoleSelectors; - public A addToClusterRoleSelectors(int index,V1LabelSelector item) { - if (this.clusterRoleSelectors == null) {this.clusterRoleSelectors = new ArrayList();} - V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item); - if (index < 0 || index >= clusterRoleSelectors.size()) { _visitables.get("clusterRoleSelectors").add(builder); clusterRoleSelectors.add(builder); } else { _visitables.get("clusterRoleSelectors").add(index, builder); clusterRoleSelectors.add(index, builder);} - return (A)this; - } - public A setToClusterRoleSelectors(int index,V1LabelSelector item) { - if (this.clusterRoleSelectors == null) {this.clusterRoleSelectors = new ArrayList();} - V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item); - if (index < 0 || index >= clusterRoleSelectors.size()) { _visitables.get("clusterRoleSelectors").add(builder); clusterRoleSelectors.add(builder); } else { _visitables.get("clusterRoleSelectors").set(index, builder); clusterRoleSelectors.set(index, builder);} - return (A)this; - } - public A addToClusterRoleSelectors(io.kubernetes.client.openapi.models.V1LabelSelector... items) { - if (this.clusterRoleSelectors == null) {this.clusterRoleSelectors = new ArrayList();} - for (V1LabelSelector item : items) {V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item);_visitables.get("clusterRoleSelectors").add(builder);this.clusterRoleSelectors.add(builder);} return (A)this; - } - public A addAllToClusterRoleSelectors(Collection items) { - if (this.clusterRoleSelectors == null) {this.clusterRoleSelectors = new ArrayList();} - for (V1LabelSelector item : items) {V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item);_visitables.get("clusterRoleSelectors").add(builder);this.clusterRoleSelectors.add(builder);} return (A)this; - } - public A removeFromClusterRoleSelectors(io.kubernetes.client.openapi.models.V1LabelSelector... items) { - for (V1LabelSelector item : items) {V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item);_visitables.get("clusterRoleSelectors").remove(builder);if (this.clusterRoleSelectors != null) {this.clusterRoleSelectors.remove(builder);}} return (A)this; - } - public A removeAllFromClusterRoleSelectors(Collection items) { - for (V1LabelSelector item : items) {V1LabelSelectorBuilder builder = new V1LabelSelectorBuilder(item);_visitables.get("clusterRoleSelectors").remove(builder);if (this.clusterRoleSelectors != null) {this.clusterRoleSelectors.remove(builder);}} return (A)this; - } - public A removeMatchingFromClusterRoleSelectors(Predicate predicate) { - if (clusterRoleSelectors == null) return (A) this; - final Iterator each = clusterRoleSelectors.iterator(); - final List visitables = _visitables.get("clusterRoleSelectors"); - while (each.hasNext()) { - V1LabelSelectorBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildClusterRoleSelectors instead. - * @return The buildable object. - */ - @Deprecated - public List getClusterRoleSelectors() { - return clusterRoleSelectors != null ? build(clusterRoleSelectors) : null; - } - public List buildClusterRoleSelectors() { - return clusterRoleSelectors != null ? build(clusterRoleSelectors) : null; - } - public V1LabelSelector buildClusterRoleSelector(int index) { - return this.clusterRoleSelectors.get(index).build(); - } - public V1LabelSelector buildFirstClusterRoleSelector() { - return this.clusterRoleSelectors.get(0).build(); - } - public V1LabelSelector buildLastClusterRoleSelector() { - return this.clusterRoleSelectors.get(clusterRoleSelectors.size() - 1).build(); - } - public V1LabelSelector buildMatchingClusterRoleSelector(Predicate predicate) { - for (V1LabelSelectorBuilder item: clusterRoleSelectors) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingClusterRoleSelector(Predicate predicate) { - for (V1LabelSelectorBuilder item: clusterRoleSelectors) { if(predicate.test(item)){ return true;} } return false; - } - public A withClusterRoleSelectors(List clusterRoleSelectors) { - if (this.clusterRoleSelectors != null) { _visitables.get("clusterRoleSelectors").clear();} - if (clusterRoleSelectors != null) {this.clusterRoleSelectors = new ArrayList(); for (V1LabelSelector item : clusterRoleSelectors){this.addToClusterRoleSelectors(item);}} else { this.clusterRoleSelectors = null;} return (A) this; - } - public A withClusterRoleSelectors(io.kubernetes.client.openapi.models.V1LabelSelector... clusterRoleSelectors) { - if (this.clusterRoleSelectors != null) {this.clusterRoleSelectors.clear(); _visitables.remove("clusterRoleSelectors"); } - if (clusterRoleSelectors != null) {for (V1LabelSelector item :clusterRoleSelectors){ this.addToClusterRoleSelectors(item);}} return (A) this; - } - public Boolean hasClusterRoleSelectors() { - return clusterRoleSelectors != null && !clusterRoleSelectors.isEmpty(); - } - public V1AggregationRuleFluentImpl.ClusterRoleSelectorsNested addNewClusterRoleSelector() { - return new V1AggregationRuleFluentImpl.ClusterRoleSelectorsNestedImpl(); - } - public V1AggregationRuleFluentImpl.ClusterRoleSelectorsNested addNewClusterRoleSelectorLike(V1LabelSelector item) { - return new V1AggregationRuleFluentImpl.ClusterRoleSelectorsNestedImpl(-1, item); - } - public V1AggregationRuleFluentImpl.ClusterRoleSelectorsNested setNewClusterRoleSelectorLike(int index,V1LabelSelector item) { - return new V1AggregationRuleFluentImpl.ClusterRoleSelectorsNestedImpl(index, item); - } - public V1AggregationRuleFluentImpl.ClusterRoleSelectorsNested editClusterRoleSelector(int index) { - if (clusterRoleSelectors.size() <= index) throw new RuntimeException("Can't edit clusterRoleSelectors. Index exceeds size."); - return setNewClusterRoleSelectorLike(index, buildClusterRoleSelector(index)); - } - public V1AggregationRuleFluentImpl.ClusterRoleSelectorsNested editFirstClusterRoleSelector() { - if (clusterRoleSelectors.size() == 0) throw new RuntimeException("Can't edit first clusterRoleSelectors. The list is empty."); - return setNewClusterRoleSelectorLike(0, buildClusterRoleSelector(0)); - } - public V1AggregationRuleFluentImpl.ClusterRoleSelectorsNested editLastClusterRoleSelector() { - int index = clusterRoleSelectors.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last clusterRoleSelectors. The list is empty."); - return setNewClusterRoleSelectorLike(index, buildClusterRoleSelector(index)); - } - public V1AggregationRuleFluentImpl.ClusterRoleSelectorsNested editMatchingClusterRoleSelector(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1LabelSelectorFluentImpl> implements V1AggregationRuleFluentImpl.ClusterRoleSelectorsNested,Nested{ - ClusterRoleSelectorsNestedImpl(int index,V1LabelSelector item) { - this.index = index; - this.builder = new V1LabelSelectorBuilder(this, item); - } - ClusterRoleSelectorsNestedImpl() { - this.index = -1; - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - int index; - public N and() { - return (N) V1AggregationRuleFluentImpl.this.setToClusterRoleSelectors(index,builder.build()); - } - public N endClusterRoleSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeBuilder.java index d0a75516eb..618a93d9ec 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1AttachedVolumeBuilder extends V1AttachedVolumeFluentImpl implements VisitableBuilder{ +public class V1AttachedVolumeBuilder extends V1AttachedVolumeFluent implements VisitableBuilder{ public V1AttachedVolumeBuilder() { - this(false); - } - public V1AttachedVolumeBuilder(Boolean validationEnabled) { - this(new V1AttachedVolume(), validationEnabled); + this(new V1AttachedVolume()); } + public V1AttachedVolumeBuilder(V1AttachedVolumeFluent fluent) { - this(fluent, false); - } - public V1AttachedVolumeBuilder(V1AttachedVolumeFluent fluent,Boolean validationEnabled) { - this(fluent, new V1AttachedVolume(), validationEnabled); + this(fluent, new V1AttachedVolume()); } + public V1AttachedVolumeBuilder(V1AttachedVolumeFluent fluent,V1AttachedVolume instance) { - this(fluent, instance, false); - } - public V1AttachedVolumeBuilder(V1AttachedVolumeFluent fluent,V1AttachedVolume instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDevicePath(instance.getDevicePath()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1AttachedVolumeBuilder(V1AttachedVolume instance) { - this(instance,false); - } - public V1AttachedVolumeBuilder(V1AttachedVolume instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDevicePath(instance.getDevicePath()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1AttachedVolumeFluent fluent; - Boolean validationEnabled; + public V1AttachedVolume build() { V1AttachedVolume buildable = new V1AttachedVolume(); buildable.setDevicePath(fluent.getDevicePath()); @@ -46,4 +28,5 @@ public V1AttachedVolume build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeFluent.java index 406135511c..2dfe72387c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1AttachedVolumeFluent> extends Fluent{ - public String getDevicePath(); - public A withDevicePath(String devicePath); - public Boolean hasDevicePath(); - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1AttachedVolumeFluent> extends BaseFluent{ + public V1AttachedVolumeFluent() { + } + public V1AttachedVolumeFluent(V1AttachedVolume instance) { + this.copyInstance(instance); + } + private String devicePath; + private String name; + + protected void copyInstance(V1AttachedVolume instance) { + instance = (instance != null ? instance : new V1AttachedVolume()); + if (instance != null) { + this.withDevicePath(instance.getDevicePath()); + this.withName(instance.getName()); + } + } + + public String getDevicePath() { + return this.devicePath; + } + + public A withDevicePath(String devicePath) { + this.devicePath = devicePath; + return (A) this; + } + + public boolean hasDevicePath() { + return this.devicePath != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1AttachedVolumeFluent that = (V1AttachedVolumeFluent) o; + if (!java.util.Objects.equals(devicePath, that.devicePath)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(devicePath, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (devicePath != null) { sb.append("devicePath:"); sb.append(devicePath + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeFluentImpl.java deleted file mode 100644 index 788a9ac3b2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AttachedVolumeFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1AttachedVolumeFluentImpl> extends BaseFluent implements V1AttachedVolumeFluent{ - public V1AttachedVolumeFluentImpl() { - } - public V1AttachedVolumeFluentImpl(V1AttachedVolume instance) { - if (instance != null) { - this.withDevicePath(instance.getDevicePath()); - this.withName(instance.getName()); - } - } - private String devicePath; - private String name; - public String getDevicePath() { - return this.devicePath; - } - public A withDevicePath(String devicePath) { - this.devicePath=devicePath; return (A) this; - } - public Boolean hasDevicePath() { - return this.devicePath != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1AttachedVolumeFluentImpl that = (V1AttachedVolumeFluentImpl) o; - if (!java.util.Objects.equals(devicePath, that.devicePath)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(devicePath, name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (devicePath != null) { sb.append("devicePath:"); sb.append(devicePath + ","); } - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceBuilder.java index ae66095b81..b552e3a00f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1AzureDiskVolumeSourceBuilder extends V1AzureDiskVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1AzureDiskVolumeSourceBuilder extends V1AzureDiskVolumeSourceFluent implements VisitableBuilder{ public V1AzureDiskVolumeSourceBuilder() { - this(false); - } - public V1AzureDiskVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1AzureDiskVolumeSource(), validationEnabled); + this(new V1AzureDiskVolumeSource()); } + public V1AzureDiskVolumeSourceBuilder(V1AzureDiskVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1AzureDiskVolumeSourceBuilder(V1AzureDiskVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1AzureDiskVolumeSource(), validationEnabled); + this(fluent, new V1AzureDiskVolumeSource()); } + public V1AzureDiskVolumeSourceBuilder(V1AzureDiskVolumeSourceFluent fluent,V1AzureDiskVolumeSource instance) { - this(fluent, instance, false); - } - public V1AzureDiskVolumeSourceBuilder(V1AzureDiskVolumeSourceFluent fluent,V1AzureDiskVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCachingMode(instance.getCachingMode()); - fluent.withDiskName(instance.getDiskName()); - fluent.withDiskURI(instance.getDiskURI()); - fluent.withFsType(instance.getFsType()); - fluent.withKind(instance.getKind()); - fluent.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1AzureDiskVolumeSourceBuilder(V1AzureDiskVolumeSource instance) { - this(instance,false); - } - public V1AzureDiskVolumeSourceBuilder(V1AzureDiskVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCachingMode(instance.getCachingMode()); - this.withDiskName(instance.getDiskName()); - this.withDiskURI(instance.getDiskURI()); - this.withFsType(instance.getFsType()); - this.withKind(instance.getKind()); - this.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1AzureDiskVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1AzureDiskVolumeSource build() { V1AzureDiskVolumeSource buildable = new V1AzureDiskVolumeSource(); buildable.setCachingMode(fluent.getCachingMode()); @@ -58,4 +32,5 @@ public V1AzureDiskVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceFluent.java index 9cbc18e8bc..e9dbf9d540 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceFluent.java @@ -1,32 +1,153 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1AzureDiskVolumeSourceFluent> extends Fluent{ - public String getCachingMode(); - public A withCachingMode(String cachingMode); - public Boolean hasCachingMode(); - public String getDiskName(); - public A withDiskName(String diskName); - public Boolean hasDiskName(); - public String getDiskURI(); - public A withDiskURI(String diskURI); - public Boolean hasDiskURI(); - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1AzureDiskVolumeSourceFluent> extends BaseFluent{ + public V1AzureDiskVolumeSourceFluent() { + } + public V1AzureDiskVolumeSourceFluent(V1AzureDiskVolumeSource instance) { + this.copyInstance(instance); + } + private String cachingMode; + private String diskName; + private String diskURI; + private String fsType; + private String kind; + private Boolean readOnly; + + protected void copyInstance(V1AzureDiskVolumeSource instance) { + instance = (instance != null ? instance : new V1AzureDiskVolumeSource()); + if (instance != null) { + this.withCachingMode(instance.getCachingMode()); + this.withDiskName(instance.getDiskName()); + this.withDiskURI(instance.getDiskURI()); + this.withFsType(instance.getFsType()); + this.withKind(instance.getKind()); + this.withReadOnly(instance.getReadOnly()); + } + } + + public String getCachingMode() { + return this.cachingMode; + } + + public A withCachingMode(String cachingMode) { + this.cachingMode = cachingMode; + return (A) this; + } + + public boolean hasCachingMode() { + return this.cachingMode != null; + } + + public String getDiskName() { + return this.diskName; + } + + public A withDiskName(String diskName) { + this.diskName = diskName; + return (A) this; + } + + public boolean hasDiskName() { + return this.diskName != null; + } + + public String getDiskURI() { + return this.diskURI; + } + + public A withDiskURI(String diskURI) { + this.diskURI = diskURI; + return (A) this; + } + + public boolean hasDiskURI() { + return this.diskURI != null; + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1AzureDiskVolumeSourceFluent that = (V1AzureDiskVolumeSourceFluent) o; + if (!java.util.Objects.equals(cachingMode, that.cachingMode)) return false; + if (!java.util.Objects.equals(diskName, that.diskName)) return false; + if (!java.util.Objects.equals(diskURI, that.diskURI)) return false; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(cachingMode, diskName, diskURI, fsType, kind, readOnly, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (cachingMode != null) { sb.append("cachingMode:"); sb.append(cachingMode + ","); } + if (diskName != null) { sb.append("diskName:"); sb.append(diskName + ","); } + if (diskURI != null) { sb.append("diskURI:"); sb.append(diskURI + ","); } + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceFluentImpl.java deleted file mode 100644 index fd092c685b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureDiskVolumeSourceFluentImpl.java +++ /dev/null @@ -1,124 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1AzureDiskVolumeSourceFluentImpl> extends BaseFluent implements V1AzureDiskVolumeSourceFluent{ - public V1AzureDiskVolumeSourceFluentImpl() { - } - public V1AzureDiskVolumeSourceFluentImpl(V1AzureDiskVolumeSource instance) { - if (instance != null) { - this.withCachingMode(instance.getCachingMode()); - this.withDiskName(instance.getDiskName()); - this.withDiskURI(instance.getDiskURI()); - this.withFsType(instance.getFsType()); - this.withKind(instance.getKind()); - this.withReadOnly(instance.getReadOnly()); - } - } - private String cachingMode; - private String diskName; - private String diskURI; - private String fsType; - private String kind; - private Boolean readOnly; - public String getCachingMode() { - return this.cachingMode; - } - public A withCachingMode(String cachingMode) { - this.cachingMode=cachingMode; return (A) this; - } - public Boolean hasCachingMode() { - return this.cachingMode != null; - } - public String getDiskName() { - return this.diskName; - } - public A withDiskName(String diskName) { - this.diskName=diskName; return (A) this; - } - public Boolean hasDiskName() { - return this.diskName != null; - } - public String getDiskURI() { - return this.diskURI; - } - public A withDiskURI(String diskURI) { - this.diskURI=diskURI; return (A) this; - } - public Boolean hasDiskURI() { - return this.diskURI != null; - } - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1AzureDiskVolumeSourceFluentImpl that = (V1AzureDiskVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(cachingMode, that.cachingMode)) return false; - - if (!java.util.Objects.equals(diskName, that.diskName)) return false; - - if (!java.util.Objects.equals(diskURI, that.diskURI)) return false; - - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(cachingMode, diskName, diskURI, fsType, kind, readOnly, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (cachingMode != null) { sb.append("cachingMode:"); sb.append(cachingMode + ","); } - if (diskName != null) { sb.append("diskName:"); sb.append(diskName + ","); } - if (diskURI != null) { sb.append("diskURI:"); sb.append(diskURI + ","); } - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceBuilder.java index 0aa5132b6f..3a962245b6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1AzureFilePersistentVolumeSourceBuilder extends V1AzureFilePersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1AzureFilePersistentVolumeSourceBuilder extends V1AzureFilePersistentVolumeSourceFluent implements VisitableBuilder{ public V1AzureFilePersistentVolumeSourceBuilder() { - this(false); - } - public V1AzureFilePersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1AzureFilePersistentVolumeSource(), validationEnabled); + this(new V1AzureFilePersistentVolumeSource()); } + public V1AzureFilePersistentVolumeSourceBuilder(V1AzureFilePersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1AzureFilePersistentVolumeSourceBuilder(V1AzureFilePersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1AzureFilePersistentVolumeSource(), validationEnabled); + this(fluent, new V1AzureFilePersistentVolumeSource()); } + public V1AzureFilePersistentVolumeSourceBuilder(V1AzureFilePersistentVolumeSourceFluent fluent,V1AzureFilePersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1AzureFilePersistentVolumeSourceBuilder(V1AzureFilePersistentVolumeSourceFluent fluent,V1AzureFilePersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretName(instance.getSecretName()); - fluent.withSecretNamespace(instance.getSecretNamespace()); - fluent.withShareName(instance.getShareName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1AzureFilePersistentVolumeSourceBuilder(V1AzureFilePersistentVolumeSource instance) { - this(instance,false); - } - public V1AzureFilePersistentVolumeSourceBuilder(V1AzureFilePersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withReadOnly(instance.getReadOnly()); - this.withSecretName(instance.getSecretName()); - this.withSecretNamespace(instance.getSecretNamespace()); - this.withShareName(instance.getShareName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1AzureFilePersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1AzureFilePersistentVolumeSource build() { V1AzureFilePersistentVolumeSource buildable = new V1AzureFilePersistentVolumeSource(); buildable.setReadOnly(fluent.getReadOnly()); @@ -52,4 +30,5 @@ public V1AzureFilePersistentVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceFluent.java index 2962e1caea..ddf2a57685 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceFluent.java @@ -1,26 +1,119 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1AzureFilePersistentVolumeSourceFluent> extends Fluent{ - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public String getSecretName(); - public A withSecretName(String secretName); - public Boolean hasSecretName(); - public String getSecretNamespace(); - public A withSecretNamespace(String secretNamespace); - public Boolean hasSecretNamespace(); - public String getShareName(); - public A withShareName(String shareName); - public Boolean hasShareName(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1AzureFilePersistentVolumeSourceFluent> extends BaseFluent{ + public V1AzureFilePersistentVolumeSourceFluent() { + } + public V1AzureFilePersistentVolumeSourceFluent(V1AzureFilePersistentVolumeSource instance) { + this.copyInstance(instance); + } + private Boolean readOnly; + private String secretName; + private String secretNamespace; + private String shareName; + + protected void copyInstance(V1AzureFilePersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1AzureFilePersistentVolumeSource()); + if (instance != null) { + this.withReadOnly(instance.getReadOnly()); + this.withSecretName(instance.getSecretName()); + this.withSecretNamespace(instance.getSecretNamespace()); + this.withShareName(instance.getShareName()); + } + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public String getSecretName() { + return this.secretName; + } + + public A withSecretName(String secretName) { + this.secretName = secretName; + return (A) this; + } + + public boolean hasSecretName() { + return this.secretName != null; + } + + public String getSecretNamespace() { + return this.secretNamespace; + } + + public A withSecretNamespace(String secretNamespace) { + this.secretNamespace = secretNamespace; + return (A) this; + } + + public boolean hasSecretNamespace() { + return this.secretNamespace != null; + } + + public String getShareName() { + return this.shareName; + } + + public A withShareName(String shareName) { + this.shareName = shareName; + return (A) this; + } + + public boolean hasShareName() { + return this.shareName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1AzureFilePersistentVolumeSourceFluent that = (V1AzureFilePersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretName, that.secretName)) return false; + if (!java.util.Objects.equals(secretNamespace, that.secretNamespace)) return false; + if (!java.util.Objects.equals(shareName, that.shareName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(readOnly, secretName, secretNamespace, shareName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretName != null) { sb.append("secretName:"); sb.append(secretName + ","); } + if (secretNamespace != null) { sb.append("secretNamespace:"); sb.append(secretNamespace + ","); } + if (shareName != null) { sb.append("shareName:"); sb.append(shareName); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceFluentImpl.java deleted file mode 100644 index e01a949ba6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFilePersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1AzureFilePersistentVolumeSourceFluentImpl> extends BaseFluent implements V1AzureFilePersistentVolumeSourceFluent{ - public V1AzureFilePersistentVolumeSourceFluentImpl() { - } - public V1AzureFilePersistentVolumeSourceFluentImpl(V1AzureFilePersistentVolumeSource instance) { - if (instance != null) { - this.withReadOnly(instance.getReadOnly()); - this.withSecretName(instance.getSecretName()); - this.withSecretNamespace(instance.getSecretNamespace()); - this.withShareName(instance.getShareName()); - } - } - private Boolean readOnly; - private String secretName; - private String secretNamespace; - private String shareName; - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public String getSecretName() { - return this.secretName; - } - public A withSecretName(String secretName) { - this.secretName=secretName; return (A) this; - } - public Boolean hasSecretName() { - return this.secretName != null; - } - public String getSecretNamespace() { - return this.secretNamespace; - } - public A withSecretNamespace(String secretNamespace) { - this.secretNamespace=secretNamespace; return (A) this; - } - public Boolean hasSecretNamespace() { - return this.secretNamespace != null; - } - public String getShareName() { - return this.shareName; - } - public A withShareName(String shareName) { - this.shareName=shareName; return (A) this; - } - public Boolean hasShareName() { - return this.shareName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1AzureFilePersistentVolumeSourceFluentImpl that = (V1AzureFilePersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretName, that.secretName)) return false; - - if (!java.util.Objects.equals(secretNamespace, that.secretNamespace)) return false; - - if (!java.util.Objects.equals(shareName, that.shareName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(readOnly, secretName, secretNamespace, shareName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretName != null) { sb.append("secretName:"); sb.append(secretName + ","); } - if (secretNamespace != null) { sb.append("secretNamespace:"); sb.append(secretNamespace + ","); } - if (shareName != null) { sb.append("shareName:"); sb.append(shareName); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceBuilder.java index fc07584726..c658905f18 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1AzureFileVolumeSourceBuilder extends V1AzureFileVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1AzureFileVolumeSourceBuilder extends V1AzureFileVolumeSourceFluent implements VisitableBuilder{ public V1AzureFileVolumeSourceBuilder() { - this(false); - } - public V1AzureFileVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1AzureFileVolumeSource(), validationEnabled); + this(new V1AzureFileVolumeSource()); } + public V1AzureFileVolumeSourceBuilder(V1AzureFileVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1AzureFileVolumeSourceBuilder(V1AzureFileVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1AzureFileVolumeSource(), validationEnabled); + this(fluent, new V1AzureFileVolumeSource()); } + public V1AzureFileVolumeSourceBuilder(V1AzureFileVolumeSourceFluent fluent,V1AzureFileVolumeSource instance) { - this(fluent, instance, false); - } - public V1AzureFileVolumeSourceBuilder(V1AzureFileVolumeSourceFluent fluent,V1AzureFileVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretName(instance.getSecretName()); - fluent.withShareName(instance.getShareName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1AzureFileVolumeSourceBuilder(V1AzureFileVolumeSource instance) { - this(instance,false); - } - public V1AzureFileVolumeSourceBuilder(V1AzureFileVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withReadOnly(instance.getReadOnly()); - this.withSecretName(instance.getSecretName()); - this.withShareName(instance.getShareName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1AzureFileVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1AzureFileVolumeSource build() { V1AzureFileVolumeSource buildable = new V1AzureFileVolumeSource(); buildable.setReadOnly(fluent.getReadOnly()); @@ -49,4 +29,5 @@ public V1AzureFileVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceFluent.java index 9e3a8bfd93..17a3222b7d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceFluent.java @@ -1,23 +1,102 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1AzureFileVolumeSourceFluent> extends Fluent{ - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public String getSecretName(); - public A withSecretName(String secretName); - public Boolean hasSecretName(); - public String getShareName(); - public A withShareName(String shareName); - public Boolean hasShareName(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1AzureFileVolumeSourceFluent> extends BaseFluent{ + public V1AzureFileVolumeSourceFluent() { + } + public V1AzureFileVolumeSourceFluent(V1AzureFileVolumeSource instance) { + this.copyInstance(instance); + } + private Boolean readOnly; + private String secretName; + private String shareName; + + protected void copyInstance(V1AzureFileVolumeSource instance) { + instance = (instance != null ? instance : new V1AzureFileVolumeSource()); + if (instance != null) { + this.withReadOnly(instance.getReadOnly()); + this.withSecretName(instance.getSecretName()); + this.withShareName(instance.getShareName()); + } + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public String getSecretName() { + return this.secretName; + } + + public A withSecretName(String secretName) { + this.secretName = secretName; + return (A) this; + } + + public boolean hasSecretName() { + return this.secretName != null; + } + + public String getShareName() { + return this.shareName; + } + + public A withShareName(String shareName) { + this.shareName = shareName; + return (A) this; + } + + public boolean hasShareName() { + return this.shareName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1AzureFileVolumeSourceFluent that = (V1AzureFileVolumeSourceFluent) o; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretName, that.secretName)) return false; + if (!java.util.Objects.equals(shareName, that.shareName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(readOnly, secretName, shareName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretName != null) { sb.append("secretName:"); sb.append(secretName + ","); } + if (shareName != null) { sb.append("shareName:"); sb.append(shareName); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceFluentImpl.java deleted file mode 100644 index 1963e5cd8e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1AzureFileVolumeSourceFluentImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1AzureFileVolumeSourceFluentImpl> extends BaseFluent implements V1AzureFileVolumeSourceFluent{ - public V1AzureFileVolumeSourceFluentImpl() { - } - public V1AzureFileVolumeSourceFluentImpl(V1AzureFileVolumeSource instance) { - if (instance != null) { - this.withReadOnly(instance.getReadOnly()); - this.withSecretName(instance.getSecretName()); - this.withShareName(instance.getShareName()); - } - } - private Boolean readOnly; - private String secretName; - private String shareName; - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public String getSecretName() { - return this.secretName; - } - public A withSecretName(String secretName) { - this.secretName=secretName; return (A) this; - } - public Boolean hasSecretName() { - return this.secretName != null; - } - public String getShareName() { - return this.shareName; - } - public A withShareName(String shareName) { - this.shareName=shareName; return (A) this; - } - public Boolean hasShareName() { - return this.shareName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1AzureFileVolumeSourceFluentImpl that = (V1AzureFileVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretName, that.secretName)) return false; - - if (!java.util.Objects.equals(shareName, that.shareName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(readOnly, secretName, shareName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretName != null) { sb.append("secretName:"); sb.append(secretName + ","); } - if (shareName != null) { sb.append("shareName:"); sb.append(shareName); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingBuilder.java index 84bd269f75..be90038b36 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1BindingBuilder extends V1BindingFluentImpl implements VisitableBuilder{ +public class V1BindingBuilder extends V1BindingFluent implements VisitableBuilder{ public V1BindingBuilder() { - this(false); - } - public V1BindingBuilder(Boolean validationEnabled) { - this(new V1Binding(), validationEnabled); + this(new V1Binding()); } + public V1BindingBuilder(V1BindingFluent fluent) { - this(fluent, false); - } - public V1BindingBuilder(V1BindingFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Binding(), validationEnabled); + this(fluent, new V1Binding()); } + public V1BindingBuilder(V1BindingFluent fluent,V1Binding instance) { - this(fluent, instance, false); - } - public V1BindingBuilder(V1BindingFluent fluent,V1Binding instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1BindingBuilder(V1Binding instance) { - this(instance,false); - } - public V1BindingBuilder(V1Binding instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1BindingFluent fluent; - Boolean validationEnabled; + public V1Binding build() { V1Binding buildable = new V1Binding(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setTarget(fluent.getTarget()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setTarget(fluent.buildTarget()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingFluent.java index 2c11f46a16..e598cdd9b0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1BindingFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1BindingFluent.MetadataNested withNewMetadata(); - public V1BindingFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1BindingFluent.MetadataNested editMetadata(); - public V1BindingFluent.MetadataNested editOrNewMetadata(); - public V1BindingFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getTarget(); - public V1ObjectReference buildTarget(); - public A withTarget(V1ObjectReference target); - public Boolean hasTarget(); - public V1BindingFluent.TargetNested withNewTarget(); - public V1BindingFluent.TargetNested withNewTargetLike(V1ObjectReference item); - public V1BindingFluent.TargetNested editTarget(); - public V1BindingFluent.TargetNested editOrNewTarget(); - public V1BindingFluent.TargetNested editOrNewTargetLike(V1ObjectReference item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1BindingFluent> extends BaseFluent{ + public V1BindingFluent() { + } + + public V1BindingFluent(V1Binding instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1ObjectReferenceBuilder target; + + protected void copyInstance(V1Binding instance) { + instance = (instance != null ? instance : new V1Binding()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withTarget(instance.getTarget()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface TargetNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endTarget(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1ObjectReference buildTarget() { + return this.target != null ? this.target.build() : null; + } + + public A withTarget(V1ObjectReference target) { + this._visitables.remove("target"); + if (target != null) { + this.target = new V1ObjectReferenceBuilder(target); + this._visitables.get("target").add(this.target); + } else { + this.target = null; + this._visitables.get("target").remove(this.target); + } + return (A) this; + } + + public boolean hasTarget() { + return this.target != null; + } + + public TargetNested withNewTarget() { + return new TargetNested(null); + } + + public TargetNested withNewTargetLike(V1ObjectReference item) { + return new TargetNested(item); + } + + public TargetNested editTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(null)); + } + + public TargetNested editOrNewTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(new V1ObjectReferenceBuilder().build())); + } + + public TargetNested editOrNewTargetLike(V1ObjectReference item) { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1BindingFluent that = (V1BindingFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(target, that.target)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, target, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (target != null) { sb.append("target:"); sb.append(target); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1BindingFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class TargetNested extends V1ObjectReferenceFluent> implements Nested{ + TargetNested(V1ObjectReference item) { + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + + public N and() { + return (N) V1BindingFluent.this.withTarget(builder.build()); + } + + public N endTarget() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingFluentImpl.java deleted file mode 100644 index 91910eb3ae..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BindingFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1BindingFluentImpl> extends BaseFluent implements V1BindingFluent{ - public V1BindingFluentImpl() { - } - public V1BindingFluentImpl(V1Binding instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withTarget(instance.getTarget()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1ObjectReferenceBuilder target; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1BindingFluentImpl.MetadataNested withNewMetadata() { - return new V1BindingFluentImpl.MetadataNestedImpl(); - } - public V1BindingFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1BindingFluentImpl.MetadataNestedImpl(item); - } - public V1BindingFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1BindingFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1BindingFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getTarget() { - return this.target!=null ?this.target.build():null; - } - public V1ObjectReference buildTarget() { - return this.target!=null ?this.target.build():null; - } - public A withTarget(V1ObjectReference target) { - _visitables.get("target").remove(this.target); - if (target!=null){ this.target= new V1ObjectReferenceBuilder(target); _visitables.get("target").add(this.target);} else { this.target = null; _visitables.get("target").remove(this.target); } return (A) this; - } - public Boolean hasTarget() { - return this.target != null; - } - public V1BindingFluentImpl.TargetNested withNewTarget() { - return new V1BindingFluentImpl.TargetNestedImpl(); - } - public V1BindingFluentImpl.TargetNested withNewTargetLike(V1ObjectReference item) { - return new V1BindingFluentImpl.TargetNestedImpl(item); - } - public V1BindingFluentImpl.TargetNested editTarget() { - return withNewTargetLike(getTarget()); - } - public V1BindingFluentImpl.TargetNested editOrNewTarget() { - return withNewTargetLike(getTarget() != null ? getTarget(): new V1ObjectReferenceBuilder().build()); - } - public V1BindingFluentImpl.TargetNested editOrNewTargetLike(V1ObjectReference item) { - return withNewTargetLike(getTarget() != null ? getTarget(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1BindingFluentImpl that = (V1BindingFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(target, that.target)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, target, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (target != null) { sb.append("target:"); sb.append(target); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1BindingFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1BindingFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class TargetNestedImpl extends V1ObjectReferenceFluentImpl> implements V1BindingFluentImpl.TargetNested,Nested{ - TargetNestedImpl(V1ObjectReference item) { - this.builder = new V1ObjectReferenceBuilder(this, item); - } - TargetNestedImpl() { - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - public N and() { - return (N) V1BindingFluentImpl.this.withTarget(builder.build()); - } - public N endTarget() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceBuilder.java index cc2ab027b8..305584d6f7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1BoundObjectReferenceBuilder extends V1BoundObjectReferenceFluentImpl implements VisitableBuilder{ +public class V1BoundObjectReferenceBuilder extends V1BoundObjectReferenceFluent implements VisitableBuilder{ public V1BoundObjectReferenceBuilder() { - this(false); - } - public V1BoundObjectReferenceBuilder(Boolean validationEnabled) { - this(new V1BoundObjectReference(), validationEnabled); + this(new V1BoundObjectReference()); } + public V1BoundObjectReferenceBuilder(V1BoundObjectReferenceFluent fluent) { - this(fluent, false); - } - public V1BoundObjectReferenceBuilder(V1BoundObjectReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1BoundObjectReference(), validationEnabled); + this(fluent, new V1BoundObjectReference()); } + public V1BoundObjectReferenceBuilder(V1BoundObjectReferenceFluent fluent,V1BoundObjectReference instance) { - this(fluent, instance, false); - } - public V1BoundObjectReferenceBuilder(V1BoundObjectReferenceFluent fluent,V1BoundObjectReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1BoundObjectReferenceBuilder(V1BoundObjectReference instance) { - this(instance,false); - } - public V1BoundObjectReferenceBuilder(V1BoundObjectReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1BoundObjectReferenceFluent fluent; - Boolean validationEnabled; + public V1BoundObjectReference build() { V1BoundObjectReference buildable = new V1BoundObjectReference(); buildable.setApiVersion(fluent.getApiVersion()); @@ -52,4 +30,5 @@ public V1BoundObjectReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceFluent.java index 236f11cbbd..42b3b0506a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceFluent.java @@ -1,25 +1,114 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1BoundObjectReferenceFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1BoundObjectReferenceFluent> extends BaseFluent{ + public V1BoundObjectReferenceFluent() { + } + public V1BoundObjectReferenceFluent(V1BoundObjectReference instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private String name; + private String uid; + + protected void copyInstance(V1BoundObjectReference instance) { + instance = (instance != null ? instance : new V1BoundObjectReference()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withUid(instance.getUid()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1BoundObjectReferenceFluent that = (V1BoundObjectReferenceFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, name, uid, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceFluentImpl.java deleted file mode 100644 index 6d303247a9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1BoundObjectReferenceFluentImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1BoundObjectReferenceFluentImpl> extends BaseFluent implements V1BoundObjectReferenceFluent{ - public V1BoundObjectReferenceFluentImpl() { - } - public V1BoundObjectReferenceFluentImpl(V1BoundObjectReference instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withUid(instance.getUid()); - } - } - private String apiVersion; - private String kind; - private String name; - private String uid; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1BoundObjectReferenceFluentImpl that = (V1BoundObjectReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, name, uid, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverBuilder.java index 67318c14bf..2d883d7e6e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSIDriverBuilder extends V1CSIDriverFluentImpl implements VisitableBuilder{ +public class V1CSIDriverBuilder extends V1CSIDriverFluent implements VisitableBuilder{ public V1CSIDriverBuilder() { - this(false); - } - public V1CSIDriverBuilder(Boolean validationEnabled) { - this(new V1CSIDriver(), validationEnabled); + this(new V1CSIDriver()); } + public V1CSIDriverBuilder(V1CSIDriverFluent fluent) { - this(fluent, false); - } - public V1CSIDriverBuilder(V1CSIDriverFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSIDriver(), validationEnabled); + this(fluent, new V1CSIDriver()); } + public V1CSIDriverBuilder(V1CSIDriverFluent fluent,V1CSIDriver instance) { - this(fluent, instance, false); - } - public V1CSIDriverBuilder(V1CSIDriverFluent fluent,V1CSIDriver instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSIDriverBuilder(V1CSIDriver instance) { - this(instance,false); - } - public V1CSIDriverBuilder(V1CSIDriver instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSIDriverFluent fluent; - Boolean validationEnabled; + public V1CSIDriver build() { V1CSIDriver buildable = new V1CSIDriver(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverFluent.java index 4684dfad9d..ea10910a02 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1CSIDriverFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1CSIDriverFluent.MetadataNested withNewMetadata(); - public V1CSIDriverFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1CSIDriverFluent.MetadataNested editMetadata(); - public V1CSIDriverFluent.MetadataNested editOrNewMetadata(); - public V1CSIDriverFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CSIDriverSpec getSpec(); - public V1CSIDriverSpec buildSpec(); - public A withSpec(V1CSIDriverSpec spec); - public Boolean hasSpec(); - public V1CSIDriverFluent.SpecNested withNewSpec(); - public V1CSIDriverFluent.SpecNested withNewSpecLike(V1CSIDriverSpec item); - public V1CSIDriverFluent.SpecNested editSpec(); - public V1CSIDriverFluent.SpecNested editOrNewSpec(); - public V1CSIDriverFluent.SpecNested editOrNewSpecLike(V1CSIDriverSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSIDriverFluent> extends BaseFluent{ + public V1CSIDriverFluent() { + } + + public V1CSIDriverFluent(V1CSIDriver instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1CSIDriverSpecBuilder spec; + + protected void copyInstance(V1CSIDriver instance) { + instance = (instance != null ? instance : new V1CSIDriver()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1CSIDriverSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1CSIDriverSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1CSIDriverSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1CSIDriverSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1CSIDriverSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1CSIDriverSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1CSIDriverSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSIDriverFluent that = (V1CSIDriverFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1CSIDriverFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1CSIDriverSpecFluent> implements Nested{ + SpecNested(V1CSIDriverSpec item) { + this.builder = new V1CSIDriverSpecBuilder(this, item); + } + V1CSIDriverSpecBuilder builder; + + public N and() { + return (N) V1CSIDriverFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverFluentImpl.java deleted file mode 100644 index c7bdd7b9de..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSIDriverFluentImpl> extends BaseFluent implements V1CSIDriverFluent{ - public V1CSIDriverFluentImpl() { - } - public V1CSIDriverFluentImpl(V1CSIDriver instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1CSIDriverSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1CSIDriverFluentImpl.MetadataNested withNewMetadata() { - return new V1CSIDriverFluentImpl.MetadataNestedImpl(); - } - public V1CSIDriverFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1CSIDriverFluentImpl.MetadataNestedImpl(item); - } - public V1CSIDriverFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CSIDriverFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1CSIDriverFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CSIDriverSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1CSIDriverSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1CSIDriverSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1CSIDriverSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1CSIDriverFluentImpl.SpecNested withNewSpec() { - return new V1CSIDriverFluentImpl.SpecNestedImpl(); - } - public V1CSIDriverFluentImpl.SpecNested withNewSpecLike(V1CSIDriverSpec item) { - return new V1CSIDriverFluentImpl.SpecNestedImpl(item); - } - public V1CSIDriverFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1CSIDriverFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1CSIDriverSpecBuilder().build()); - } - public V1CSIDriverFluentImpl.SpecNested editOrNewSpecLike(V1CSIDriverSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSIDriverFluentImpl that = (V1CSIDriverFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1CSIDriverFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1CSIDriverFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1CSIDriverSpecFluentImpl> implements V1CSIDriverFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1CSIDriverSpec item) { - this.builder = new V1CSIDriverSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1CSIDriverSpecBuilder(this); - } - V1CSIDriverSpecBuilder builder; - public N and() { - return (N) V1CSIDriverFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListBuilder.java index f0642785a1..104e102bbe 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSIDriverListBuilder extends V1CSIDriverListFluentImpl implements VisitableBuilder{ +public class V1CSIDriverListBuilder extends V1CSIDriverListFluent implements VisitableBuilder{ public V1CSIDriverListBuilder() { - this(false); - } - public V1CSIDriverListBuilder(Boolean validationEnabled) { - this(new V1CSIDriverList(), validationEnabled); + this(new V1CSIDriverList()); } + public V1CSIDriverListBuilder(V1CSIDriverListFluent fluent) { - this(fluent, false); - } - public V1CSIDriverListBuilder(V1CSIDriverListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSIDriverList(), validationEnabled); + this(fluent, new V1CSIDriverList()); } + public V1CSIDriverListBuilder(V1CSIDriverListFluent fluent,V1CSIDriverList instance) { - this(fluent, instance, false); - } - public V1CSIDriverListBuilder(V1CSIDriverListFluent fluent,V1CSIDriverList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSIDriverListBuilder(V1CSIDriverList instance) { - this(instance,false); - } - public V1CSIDriverListBuilder(V1CSIDriverList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSIDriverListFluent fluent; - Boolean validationEnabled; + public V1CSIDriverList build() { V1CSIDriverList buildable = new V1CSIDriverList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListFluent.java index 1bd99ba481..2f4f1e6a25 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CSIDriverListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1CSIDriver item); - public A setToItems(int index,V1CSIDriver item); - public A addToItems(io.kubernetes.client.openapi.models.V1CSIDriver... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1CSIDriver... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1CSIDriver buildItem(int index); - public V1CSIDriver buildFirstItem(); - public V1CSIDriver buildLastItem(); - public V1CSIDriver buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1CSIDriver... items); - public Boolean hasItems(); - public V1CSIDriverListFluent.ItemsNested addNewItem(); - public V1CSIDriverListFluent.ItemsNested addNewItemLike(V1CSIDriver item); - public V1CSIDriverListFluent.ItemsNested setNewItemLike(int index,V1CSIDriver item); - public V1CSIDriverListFluent.ItemsNested editItem(int index); - public V1CSIDriverListFluent.ItemsNested editFirstItem(); - public V1CSIDriverListFluent.ItemsNested editLastItem(); - public V1CSIDriverListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1CSIDriverListFluent.MetadataNested withNewMetadata(); - public V1CSIDriverListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1CSIDriverListFluent.MetadataNested editMetadata(); - public V1CSIDriverListFluent.MetadataNested editOrNewMetadata(); - public V1CSIDriverListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1CSIDriverFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSIDriverListFluent> extends BaseFluent{ + public V1CSIDriverListFluent() { + } + + public V1CSIDriverListFluent(V1CSIDriverList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1CSIDriverList instance) { + instance = (instance != null ? instance : new V1CSIDriverList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1CSIDriver item) { + if (this.items == null) {this.items = new ArrayList();} + V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1CSIDriver item) { + if (this.items == null) {this.items = new ArrayList();} + V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1CSIDriver... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CSIDriver item : items) {V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CSIDriver item : items) {V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1CSIDriver... items) { + if (this.items == null) return (A)this; + for (V1CSIDriver item : items) {V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1CSIDriver item : items) {V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1CSIDriverBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1CSIDriver buildItem(int index) { + return this.items.get(index).build(); + } + + public V1CSIDriver buildFirstItem() { + return this.items.get(0).build(); + } + + public V1CSIDriver buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1CSIDriver buildMatchingItem(Predicate predicate) { + for (V1CSIDriverBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1CSIDriverBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1CSIDriver item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1CSIDriver... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1CSIDriver item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1CSIDriver item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1CSIDriver item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSIDriverListFluent that = (V1CSIDriverListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1CSIDriverFluent> implements Nested{ + ItemsNested(int index,V1CSIDriver item) { + this.index = index; + this.builder = new V1CSIDriverBuilder(this, item); + } + V1CSIDriverBuilder builder; + int index; + public N and() { + return (N) V1CSIDriverListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1CSIDriverListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListFluentImpl.java deleted file mode 100644 index 9c2b29a3bd..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSIDriverListFluentImpl> extends BaseFluent implements V1CSIDriverListFluent{ - public V1CSIDriverListFluentImpl() { - } - public V1CSIDriverListFluentImpl(V1CSIDriverList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1CSIDriver item) { - if (this.items == null) {this.items = new ArrayList();} - V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1CSIDriver item) { - if (this.items == null) {this.items = new ArrayList();} - V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1CSIDriver... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CSIDriver item : items) {V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CSIDriver item : items) {V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1CSIDriver... items) { - for (V1CSIDriver item : items) {V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1CSIDriver item : items) {V1CSIDriverBuilder builder = new V1CSIDriverBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1CSIDriverBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1CSIDriver buildItem(int index) { - return this.items.get(index).build(); - } - public V1CSIDriver buildFirstItem() { - return this.items.get(0).build(); - } - public V1CSIDriver buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1CSIDriver buildMatchingItem(Predicate predicate) { - for (V1CSIDriverBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1CSIDriverBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1CSIDriver item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1CSIDriver... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1CSIDriver item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1CSIDriverListFluentImpl.ItemsNested addNewItem() { - return new V1CSIDriverListFluentImpl.ItemsNestedImpl(); - } - public V1CSIDriverListFluentImpl.ItemsNested addNewItemLike(V1CSIDriver item) { - return new V1CSIDriverListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1CSIDriverListFluentImpl.ItemsNested setNewItemLike(int index,V1CSIDriver item) { - return new V1CSIDriverListFluentImpl.ItemsNestedImpl(index, item); - } - public V1CSIDriverListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1CSIDriverListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1CSIDriverListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1CSIDriverListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1CSIDriverListFluentImpl.MetadataNestedImpl(); - } - public V1CSIDriverListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1CSIDriverListFluentImpl.MetadataNestedImpl(item); - } - public V1CSIDriverListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CSIDriverListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1CSIDriverListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSIDriverListFluentImpl that = (V1CSIDriverListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1CSIDriverFluentImpl> implements V1CSIDriverListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1CSIDriver item) { - this.index = index; - this.builder = new V1CSIDriverBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1CSIDriverBuilder(this); - } - V1CSIDriverBuilder builder; - int index; - public N and() { - return (N) V1CSIDriverListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1CSIDriverListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1CSIDriverListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecBuilder.java index 9ff5b70ba4..49c119e80d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecBuilder.java @@ -1,56 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSIDriverSpecBuilder extends V1CSIDriverSpecFluentImpl implements VisitableBuilder{ +public class V1CSIDriverSpecBuilder extends V1CSIDriverSpecFluent implements VisitableBuilder{ public V1CSIDriverSpecBuilder() { - this(false); - } - public V1CSIDriverSpecBuilder(Boolean validationEnabled) { - this(new V1CSIDriverSpec(), validationEnabled); + this(new V1CSIDriverSpec()); } + public V1CSIDriverSpecBuilder(V1CSIDriverSpecFluent fluent) { - this(fluent, false); - } - public V1CSIDriverSpecBuilder(V1CSIDriverSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSIDriverSpec(), validationEnabled); + this(fluent, new V1CSIDriverSpec()); } + public V1CSIDriverSpecBuilder(V1CSIDriverSpecFluent fluent,V1CSIDriverSpec instance) { - this(fluent, instance, false); - } - public V1CSIDriverSpecBuilder(V1CSIDriverSpecFluent fluent,V1CSIDriverSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAttachRequired(instance.getAttachRequired()); - fluent.withFsGroupPolicy(instance.getFsGroupPolicy()); - fluent.withPodInfoOnMount(instance.getPodInfoOnMount()); - fluent.withRequiresRepublish(instance.getRequiresRepublish()); - fluent.withSeLinuxMount(instance.getSeLinuxMount()); - fluent.withStorageCapacity(instance.getStorageCapacity()); - fluent.withTokenRequests(instance.getTokenRequests()); - fluent.withVolumeLifecycleModes(instance.getVolumeLifecycleModes()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSIDriverSpecBuilder(V1CSIDriverSpec instance) { - this(instance,false); - } - public V1CSIDriverSpecBuilder(V1CSIDriverSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAttachRequired(instance.getAttachRequired()); - this.withFsGroupPolicy(instance.getFsGroupPolicy()); - this.withPodInfoOnMount(instance.getPodInfoOnMount()); - this.withRequiresRepublish(instance.getRequiresRepublish()); - this.withSeLinuxMount(instance.getSeLinuxMount()); - this.withStorageCapacity(instance.getStorageCapacity()); - this.withTokenRequests(instance.getTokenRequests()); - this.withVolumeLifecycleModes(instance.getVolumeLifecycleModes()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSIDriverSpecFluent fluent; - Boolean validationEnabled; + public V1CSIDriverSpec build() { V1CSIDriverSpec buildable = new V1CSIDriverSpec(); buildable.setAttachRequired(fluent.getAttachRequired()); @@ -59,9 +29,10 @@ public V1CSIDriverSpec build() { buildable.setRequiresRepublish(fluent.getRequiresRepublish()); buildable.setSeLinuxMount(fluent.getSeLinuxMount()); buildable.setStorageCapacity(fluent.getStorageCapacity()); - buildable.setTokenRequests(fluent.getTokenRequests()); + buildable.setTokenRequests(fluent.buildTokenRequests()); buildable.setVolumeLifecycleModes(fluent.getVolumeLifecycleModes()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecFluent.java index c424af179e..9956a1edb3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecFluent.java @@ -1,94 +1,446 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1CSIDriverSpecFluent> extends Fluent{ - public Boolean getAttachRequired(); - public A withAttachRequired(Boolean attachRequired); - public Boolean hasAttachRequired(); - public String getFsGroupPolicy(); - public A withFsGroupPolicy(String fsGroupPolicy); - public Boolean hasFsGroupPolicy(); - public Boolean getPodInfoOnMount(); - public A withPodInfoOnMount(Boolean podInfoOnMount); - public Boolean hasPodInfoOnMount(); - public Boolean getRequiresRepublish(); - public A withRequiresRepublish(Boolean requiresRepublish); - public Boolean hasRequiresRepublish(); - public Boolean getSeLinuxMount(); - public A withSeLinuxMount(Boolean seLinuxMount); - public Boolean hasSeLinuxMount(); - public Boolean getStorageCapacity(); - public A withStorageCapacity(Boolean storageCapacity); - public Boolean hasStorageCapacity(); - public A addToTokenRequests(int index,StorageV1TokenRequest item); - public A setToTokenRequests(int index,StorageV1TokenRequest item); - public A addToTokenRequests(io.kubernetes.client.openapi.models.StorageV1TokenRequest... items); - public A addAllToTokenRequests(Collection items); - public A removeFromTokenRequests(io.kubernetes.client.openapi.models.StorageV1TokenRequest... items); - public A removeAllFromTokenRequests(Collection items); - public A removeMatchingFromTokenRequests(Predicate predicate); - - /** - * This method has been deprecated, please use method buildTokenRequests instead. - * @return The buildable object. - */ - @Deprecated - public List getTokenRequests(); - public List buildTokenRequests(); - public StorageV1TokenRequest buildTokenRequest(int index); - public StorageV1TokenRequest buildFirstTokenRequest(); - public StorageV1TokenRequest buildLastTokenRequest(); - public StorageV1TokenRequest buildMatchingTokenRequest(Predicate predicate); - public Boolean hasMatchingTokenRequest(Predicate predicate); - public A withTokenRequests(List tokenRequests); - public A withTokenRequests(io.kubernetes.client.openapi.models.StorageV1TokenRequest... tokenRequests); - public Boolean hasTokenRequests(); - public V1CSIDriverSpecFluent.TokenRequestsNested addNewTokenRequest(); - public V1CSIDriverSpecFluent.TokenRequestsNested addNewTokenRequestLike(StorageV1TokenRequest item); - public V1CSIDriverSpecFluent.TokenRequestsNested setNewTokenRequestLike(int index,StorageV1TokenRequest item); - public V1CSIDriverSpecFluent.TokenRequestsNested editTokenRequest(int index); - public V1CSIDriverSpecFluent.TokenRequestsNested editFirstTokenRequest(); - public V1CSIDriverSpecFluent.TokenRequestsNested editLastTokenRequest(); - public V1CSIDriverSpecFluent.TokenRequestsNested editMatchingTokenRequest(Predicate predicate); - public A addToVolumeLifecycleModes(int index,String item); - public A setToVolumeLifecycleModes(int index,String item); - public A addToVolumeLifecycleModes(java.lang.String... items); - public A addAllToVolumeLifecycleModes(Collection items); - public A removeFromVolumeLifecycleModes(java.lang.String... items); - public A removeAllFromVolumeLifecycleModes(Collection items); - public List getVolumeLifecycleModes(); - public String getVolumeLifecycleMode(int index); - public String getFirstVolumeLifecycleMode(); - public String getLastVolumeLifecycleMode(); - public String getMatchingVolumeLifecycleMode(Predicate predicate); - public Boolean hasMatchingVolumeLifecycleMode(Predicate predicate); - public A withVolumeLifecycleModes(List volumeLifecycleModes); - public A withVolumeLifecycleModes(java.lang.String... volumeLifecycleModes); - public Boolean hasVolumeLifecycleModes(); - public A withAttachRequired(); - public A withPodInfoOnMount(); - public A withRequiresRepublish(); - public A withSeLinuxMount(); - public A withStorageCapacity(); - public interface TokenRequestsNested extends Nested,StorageV1TokenRequestFluent>{ - public N and(); - public N endTokenRequest(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSIDriverSpecFluent> extends BaseFluent{ + public V1CSIDriverSpecFluent() { + } + + public V1CSIDriverSpecFluent(V1CSIDriverSpec instance) { + this.copyInstance(instance); + } + private Boolean attachRequired; + private String fsGroupPolicy; + private Boolean podInfoOnMount; + private Boolean requiresRepublish; + private Boolean seLinuxMount; + private Boolean storageCapacity; + private ArrayList tokenRequests; + private List volumeLifecycleModes; + + protected void copyInstance(V1CSIDriverSpec instance) { + instance = (instance != null ? instance : new V1CSIDriverSpec()); + if (instance != null) { + this.withAttachRequired(instance.getAttachRequired()); + this.withFsGroupPolicy(instance.getFsGroupPolicy()); + this.withPodInfoOnMount(instance.getPodInfoOnMount()); + this.withRequiresRepublish(instance.getRequiresRepublish()); + this.withSeLinuxMount(instance.getSeLinuxMount()); + this.withStorageCapacity(instance.getStorageCapacity()); + this.withTokenRequests(instance.getTokenRequests()); + this.withVolumeLifecycleModes(instance.getVolumeLifecycleModes()); + } + } + + public Boolean getAttachRequired() { + return this.attachRequired; + } + + public A withAttachRequired(Boolean attachRequired) { + this.attachRequired = attachRequired; + return (A) this; + } + + public boolean hasAttachRequired() { + return this.attachRequired != null; + } + + public String getFsGroupPolicy() { + return this.fsGroupPolicy; + } + + public A withFsGroupPolicy(String fsGroupPolicy) { + this.fsGroupPolicy = fsGroupPolicy; + return (A) this; + } + + public boolean hasFsGroupPolicy() { + return this.fsGroupPolicy != null; + } + + public Boolean getPodInfoOnMount() { + return this.podInfoOnMount; + } + + public A withPodInfoOnMount(Boolean podInfoOnMount) { + this.podInfoOnMount = podInfoOnMount; + return (A) this; + } + + public boolean hasPodInfoOnMount() { + return this.podInfoOnMount != null; + } + + public Boolean getRequiresRepublish() { + return this.requiresRepublish; + } + + public A withRequiresRepublish(Boolean requiresRepublish) { + this.requiresRepublish = requiresRepublish; + return (A) this; + } + + public boolean hasRequiresRepublish() { + return this.requiresRepublish != null; + } + + public Boolean getSeLinuxMount() { + return this.seLinuxMount; + } + + public A withSeLinuxMount(Boolean seLinuxMount) { + this.seLinuxMount = seLinuxMount; + return (A) this; + } + + public boolean hasSeLinuxMount() { + return this.seLinuxMount != null; + } + + public Boolean getStorageCapacity() { + return this.storageCapacity; + } + + public A withStorageCapacity(Boolean storageCapacity) { + this.storageCapacity = storageCapacity; + return (A) this; + } + + public boolean hasStorageCapacity() { + return this.storageCapacity != null; + } + + public A addToTokenRequests(int index,StorageV1TokenRequest item) { + if (this.tokenRequests == null) {this.tokenRequests = new ArrayList();} + StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item); + if (index < 0 || index >= tokenRequests.size()) { _visitables.get("tokenRequests").add(builder); tokenRequests.add(builder); } else { _visitables.get("tokenRequests").add(index, builder); tokenRequests.add(index, builder);} + return (A)this; + } + + public A setToTokenRequests(int index,StorageV1TokenRequest item) { + if (this.tokenRequests == null) {this.tokenRequests = new ArrayList();} + StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item); + if (index < 0 || index >= tokenRequests.size()) { _visitables.get("tokenRequests").add(builder); tokenRequests.add(builder); } else { _visitables.get("tokenRequests").set(index, builder); tokenRequests.set(index, builder);} + return (A)this; + } + + public A addToTokenRequests(io.kubernetes.client.openapi.models.StorageV1TokenRequest... items) { + if (this.tokenRequests == null) {this.tokenRequests = new ArrayList();} + for (StorageV1TokenRequest item : items) {StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item);_visitables.get("tokenRequests").add(builder);this.tokenRequests.add(builder);} return (A)this; + } + + public A addAllToTokenRequests(Collection items) { + if (this.tokenRequests == null) {this.tokenRequests = new ArrayList();} + for (StorageV1TokenRequest item : items) {StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item);_visitables.get("tokenRequests").add(builder);this.tokenRequests.add(builder);} return (A)this; + } + + public A removeFromTokenRequests(io.kubernetes.client.openapi.models.StorageV1TokenRequest... items) { + if (this.tokenRequests == null) return (A)this; + for (StorageV1TokenRequest item : items) {StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item);_visitables.get("tokenRequests").remove(builder); this.tokenRequests.remove(builder);} return (A)this; + } + + public A removeAllFromTokenRequests(Collection items) { + if (this.tokenRequests == null) return (A)this; + for (StorageV1TokenRequest item : items) {StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item);_visitables.get("tokenRequests").remove(builder); this.tokenRequests.remove(builder);} return (A)this; + } + + public A removeMatchingFromTokenRequests(Predicate predicate) { + if (tokenRequests == null) return (A) this; + final Iterator each = tokenRequests.iterator(); + final List visitables = _visitables.get("tokenRequests"); + while (each.hasNext()) { + StorageV1TokenRequestBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildTokenRequests() { + return this.tokenRequests != null ? build(tokenRequests) : null; + } + + public StorageV1TokenRequest buildTokenRequest(int index) { + return this.tokenRequests.get(index).build(); + } + + public StorageV1TokenRequest buildFirstTokenRequest() { + return this.tokenRequests.get(0).build(); + } + + public StorageV1TokenRequest buildLastTokenRequest() { + return this.tokenRequests.get(tokenRequests.size() - 1).build(); + } + + public StorageV1TokenRequest buildMatchingTokenRequest(Predicate predicate) { + for (StorageV1TokenRequestBuilder item : tokenRequests) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingTokenRequest(Predicate predicate) { + for (StorageV1TokenRequestBuilder item : tokenRequests) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withTokenRequests(List tokenRequests) { + if (this.tokenRequests != null) { + this._visitables.get("tokenRequests").clear(); + } + if (tokenRequests != null) { + this.tokenRequests = new ArrayList(); + for (StorageV1TokenRequest item : tokenRequests) { + this.addToTokenRequests(item); + } + } else { + this.tokenRequests = null; + } + return (A) this; } + public A withTokenRequests(io.kubernetes.client.openapi.models.StorageV1TokenRequest... tokenRequests) { + if (this.tokenRequests != null) { + this.tokenRequests.clear(); + _visitables.remove("tokenRequests"); + } + if (tokenRequests != null) { + for (StorageV1TokenRequest item : tokenRequests) { + this.addToTokenRequests(item); + } + } + return (A) this; + } + + public boolean hasTokenRequests() { + return this.tokenRequests != null && !this.tokenRequests.isEmpty(); + } + + public TokenRequestsNested addNewTokenRequest() { + return new TokenRequestsNested(-1, null); + } + + public TokenRequestsNested addNewTokenRequestLike(StorageV1TokenRequest item) { + return new TokenRequestsNested(-1, item); + } + + public TokenRequestsNested setNewTokenRequestLike(int index,StorageV1TokenRequest item) { + return new TokenRequestsNested(index, item); + } + + public TokenRequestsNested editTokenRequest(int index) { + if (tokenRequests.size() <= index) throw new RuntimeException("Can't edit tokenRequests. Index exceeds size."); + return setNewTokenRequestLike(index, buildTokenRequest(index)); + } + + public TokenRequestsNested editFirstTokenRequest() { + if (tokenRequests.size() == 0) throw new RuntimeException("Can't edit first tokenRequests. The list is empty."); + return setNewTokenRequestLike(0, buildTokenRequest(0)); + } + + public TokenRequestsNested editLastTokenRequest() { + int index = tokenRequests.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last tokenRequests. The list is empty."); + return setNewTokenRequestLike(index, buildTokenRequest(index)); + } + + public TokenRequestsNested editMatchingTokenRequest(Predicate predicate) { + int index = -1; + for (int i=0;i();} + this.volumeLifecycleModes.add(index, item); + return (A)this; + } + + public A setToVolumeLifecycleModes(int index,String item) { + if (this.volumeLifecycleModes == null) {this.volumeLifecycleModes = new ArrayList();} + this.volumeLifecycleModes.set(index, item); return (A)this; + } + + public A addToVolumeLifecycleModes(java.lang.String... items) { + if (this.volumeLifecycleModes == null) {this.volumeLifecycleModes = new ArrayList();} + for (String item : items) {this.volumeLifecycleModes.add(item);} return (A)this; + } + + public A addAllToVolumeLifecycleModes(Collection items) { + if (this.volumeLifecycleModes == null) {this.volumeLifecycleModes = new ArrayList();} + for (String item : items) {this.volumeLifecycleModes.add(item);} return (A)this; + } + + public A removeFromVolumeLifecycleModes(java.lang.String... items) { + if (this.volumeLifecycleModes == null) return (A)this; + for (String item : items) { this.volumeLifecycleModes.remove(item);} return (A)this; + } + + public A removeAllFromVolumeLifecycleModes(Collection items) { + if (this.volumeLifecycleModes == null) return (A)this; + for (String item : items) { this.volumeLifecycleModes.remove(item);} return (A)this; + } + + public List getVolumeLifecycleModes() { + return this.volumeLifecycleModes; + } + + public String getVolumeLifecycleMode(int index) { + return this.volumeLifecycleModes.get(index); + } + + public String getFirstVolumeLifecycleMode() { + return this.volumeLifecycleModes.get(0); + } + + public String getLastVolumeLifecycleMode() { + return this.volumeLifecycleModes.get(volumeLifecycleModes.size() - 1); + } + + public String getMatchingVolumeLifecycleMode(Predicate predicate) { + for (String item : volumeLifecycleModes) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVolumeLifecycleMode(Predicate predicate) { + for (String item : volumeLifecycleModes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVolumeLifecycleModes(List volumeLifecycleModes) { + if (volumeLifecycleModes != null) { + this.volumeLifecycleModes = new ArrayList(); + for (String item : volumeLifecycleModes) { + this.addToVolumeLifecycleModes(item); + } + } else { + this.volumeLifecycleModes = null; + } + return (A) this; + } + + public A withVolumeLifecycleModes(java.lang.String... volumeLifecycleModes) { + if (this.volumeLifecycleModes != null) { + this.volumeLifecycleModes.clear(); + _visitables.remove("volumeLifecycleModes"); + } + if (volumeLifecycleModes != null) { + for (String item : volumeLifecycleModes) { + this.addToVolumeLifecycleModes(item); + } + } + return (A) this; + } + + public boolean hasVolumeLifecycleModes() { + return this.volumeLifecycleModes != null && !this.volumeLifecycleModes.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSIDriverSpecFluent that = (V1CSIDriverSpecFluent) o; + if (!java.util.Objects.equals(attachRequired, that.attachRequired)) return false; + if (!java.util.Objects.equals(fsGroupPolicy, that.fsGroupPolicy)) return false; + if (!java.util.Objects.equals(podInfoOnMount, that.podInfoOnMount)) return false; + if (!java.util.Objects.equals(requiresRepublish, that.requiresRepublish)) return false; + if (!java.util.Objects.equals(seLinuxMount, that.seLinuxMount)) return false; + if (!java.util.Objects.equals(storageCapacity, that.storageCapacity)) return false; + if (!java.util.Objects.equals(tokenRequests, that.tokenRequests)) return false; + if (!java.util.Objects.equals(volumeLifecycleModes, that.volumeLifecycleModes)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(attachRequired, fsGroupPolicy, podInfoOnMount, requiresRepublish, seLinuxMount, storageCapacity, tokenRequests, volumeLifecycleModes, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (attachRequired != null) { sb.append("attachRequired:"); sb.append(attachRequired + ","); } + if (fsGroupPolicy != null) { sb.append("fsGroupPolicy:"); sb.append(fsGroupPolicy + ","); } + if (podInfoOnMount != null) { sb.append("podInfoOnMount:"); sb.append(podInfoOnMount + ","); } + if (requiresRepublish != null) { sb.append("requiresRepublish:"); sb.append(requiresRepublish + ","); } + if (seLinuxMount != null) { sb.append("seLinuxMount:"); sb.append(seLinuxMount + ","); } + if (storageCapacity != null) { sb.append("storageCapacity:"); sb.append(storageCapacity + ","); } + if (tokenRequests != null && !tokenRequests.isEmpty()) { sb.append("tokenRequests:"); sb.append(tokenRequests + ","); } + if (volumeLifecycleModes != null && !volumeLifecycleModes.isEmpty()) { sb.append("volumeLifecycleModes:"); sb.append(volumeLifecycleModes); } + sb.append("}"); + return sb.toString(); + } + + public A withAttachRequired() { + return withAttachRequired(true); + } + + public A withPodInfoOnMount() { + return withPodInfoOnMount(true); + } + + public A withRequiresRepublish() { + return withRequiresRepublish(true); + } + + public A withSeLinuxMount() { + return withSeLinuxMount(true); + } + + public A withStorageCapacity() { + return withStorageCapacity(true); + } + public class TokenRequestsNested extends StorageV1TokenRequestFluent> implements Nested{ + TokenRequestsNested(int index,StorageV1TokenRequest item) { + this.index = index; + this.builder = new StorageV1TokenRequestBuilder(this, item); + } + StorageV1TokenRequestBuilder builder; + int index; + + public N and() { + return (N) V1CSIDriverSpecFluent.this.setToTokenRequests(index,builder.build()); + } + + public N endTokenRequest() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecFluentImpl.java deleted file mode 100644 index d2520eae64..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIDriverSpecFluentImpl.java +++ /dev/null @@ -1,331 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSIDriverSpecFluentImpl> extends BaseFluent implements V1CSIDriverSpecFluent{ - public V1CSIDriverSpecFluentImpl() { - } - public V1CSIDriverSpecFluentImpl(V1CSIDriverSpec instance) { - if (instance != null) { - this.withAttachRequired(instance.getAttachRequired()); - this.withFsGroupPolicy(instance.getFsGroupPolicy()); - this.withPodInfoOnMount(instance.getPodInfoOnMount()); - this.withRequiresRepublish(instance.getRequiresRepublish()); - this.withSeLinuxMount(instance.getSeLinuxMount()); - this.withStorageCapacity(instance.getStorageCapacity()); - this.withTokenRequests(instance.getTokenRequests()); - this.withVolumeLifecycleModes(instance.getVolumeLifecycleModes()); - } - } - private Boolean attachRequired; - private String fsGroupPolicy; - private Boolean podInfoOnMount; - private Boolean requiresRepublish; - private Boolean seLinuxMount; - private Boolean storageCapacity; - private ArrayList tokenRequests; - private List volumeLifecycleModes; - public Boolean getAttachRequired() { - return this.attachRequired; - } - public A withAttachRequired(Boolean attachRequired) { - this.attachRequired=attachRequired; return (A) this; - } - public Boolean hasAttachRequired() { - return this.attachRequired != null; - } - public String getFsGroupPolicy() { - return this.fsGroupPolicy; - } - public A withFsGroupPolicy(String fsGroupPolicy) { - this.fsGroupPolicy=fsGroupPolicy; return (A) this; - } - public Boolean hasFsGroupPolicy() { - return this.fsGroupPolicy != null; - } - public Boolean getPodInfoOnMount() { - return this.podInfoOnMount; - } - public A withPodInfoOnMount(Boolean podInfoOnMount) { - this.podInfoOnMount=podInfoOnMount; return (A) this; - } - public Boolean hasPodInfoOnMount() { - return this.podInfoOnMount != null; - } - public Boolean getRequiresRepublish() { - return this.requiresRepublish; - } - public A withRequiresRepublish(Boolean requiresRepublish) { - this.requiresRepublish=requiresRepublish; return (A) this; - } - public Boolean hasRequiresRepublish() { - return this.requiresRepublish != null; - } - public Boolean getSeLinuxMount() { - return this.seLinuxMount; - } - public A withSeLinuxMount(Boolean seLinuxMount) { - this.seLinuxMount=seLinuxMount; return (A) this; - } - public Boolean hasSeLinuxMount() { - return this.seLinuxMount != null; - } - public Boolean getStorageCapacity() { - return this.storageCapacity; - } - public A withStorageCapacity(Boolean storageCapacity) { - this.storageCapacity=storageCapacity; return (A) this; - } - public Boolean hasStorageCapacity() { - return this.storageCapacity != null; - } - public A addToTokenRequests(int index,StorageV1TokenRequest item) { - if (this.tokenRequests == null) {this.tokenRequests = new ArrayList();} - StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item); - if (index < 0 || index >= tokenRequests.size()) { _visitables.get("tokenRequests").add(builder); tokenRequests.add(builder); } else { _visitables.get("tokenRequests").add(index, builder); tokenRequests.add(index, builder);} - return (A)this; - } - public A setToTokenRequests(int index,StorageV1TokenRequest item) { - if (this.tokenRequests == null) {this.tokenRequests = new ArrayList();} - StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item); - if (index < 0 || index >= tokenRequests.size()) { _visitables.get("tokenRequests").add(builder); tokenRequests.add(builder); } else { _visitables.get("tokenRequests").set(index, builder); tokenRequests.set(index, builder);} - return (A)this; - } - public A addToTokenRequests(io.kubernetes.client.openapi.models.StorageV1TokenRequest... items) { - if (this.tokenRequests == null) {this.tokenRequests = new ArrayList();} - for (StorageV1TokenRequest item : items) {StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item);_visitables.get("tokenRequests").add(builder);this.tokenRequests.add(builder);} return (A)this; - } - public A addAllToTokenRequests(Collection items) { - if (this.tokenRequests == null) {this.tokenRequests = new ArrayList();} - for (StorageV1TokenRequest item : items) {StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item);_visitables.get("tokenRequests").add(builder);this.tokenRequests.add(builder);} return (A)this; - } - public A removeFromTokenRequests(io.kubernetes.client.openapi.models.StorageV1TokenRequest... items) { - for (StorageV1TokenRequest item : items) {StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item);_visitables.get("tokenRequests").remove(builder);if (this.tokenRequests != null) {this.tokenRequests.remove(builder);}} return (A)this; - } - public A removeAllFromTokenRequests(Collection items) { - for (StorageV1TokenRequest item : items) {StorageV1TokenRequestBuilder builder = new StorageV1TokenRequestBuilder(item);_visitables.get("tokenRequests").remove(builder);if (this.tokenRequests != null) {this.tokenRequests.remove(builder);}} return (A)this; - } - public A removeMatchingFromTokenRequests(Predicate predicate) { - if (tokenRequests == null) return (A) this; - final Iterator each = tokenRequests.iterator(); - final List visitables = _visitables.get("tokenRequests"); - while (each.hasNext()) { - StorageV1TokenRequestBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildTokenRequests instead. - * @return The buildable object. - */ - @Deprecated - public List getTokenRequests() { - return tokenRequests != null ? build(tokenRequests) : null; - } - public List buildTokenRequests() { - return tokenRequests != null ? build(tokenRequests) : null; - } - public StorageV1TokenRequest buildTokenRequest(int index) { - return this.tokenRequests.get(index).build(); - } - public StorageV1TokenRequest buildFirstTokenRequest() { - return this.tokenRequests.get(0).build(); - } - public StorageV1TokenRequest buildLastTokenRequest() { - return this.tokenRequests.get(tokenRequests.size() - 1).build(); - } - public StorageV1TokenRequest buildMatchingTokenRequest(Predicate predicate) { - for (StorageV1TokenRequestBuilder item: tokenRequests) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingTokenRequest(Predicate predicate) { - for (StorageV1TokenRequestBuilder item: tokenRequests) { if(predicate.test(item)){ return true;} } return false; - } - public A withTokenRequests(List tokenRequests) { - if (this.tokenRequests != null) { _visitables.get("tokenRequests").clear();} - if (tokenRequests != null) {this.tokenRequests = new ArrayList(); for (StorageV1TokenRequest item : tokenRequests){this.addToTokenRequests(item);}} else { this.tokenRequests = null;} return (A) this; - } - public A withTokenRequests(io.kubernetes.client.openapi.models.StorageV1TokenRequest... tokenRequests) { - if (this.tokenRequests != null) {this.tokenRequests.clear(); _visitables.remove("tokenRequests"); } - if (tokenRequests != null) {for (StorageV1TokenRequest item :tokenRequests){ this.addToTokenRequests(item);}} return (A) this; - } - public Boolean hasTokenRequests() { - return tokenRequests != null && !tokenRequests.isEmpty(); - } - public V1CSIDriverSpecFluentImpl.TokenRequestsNested addNewTokenRequest() { - return new V1CSIDriverSpecFluentImpl.TokenRequestsNestedImpl(); - } - public V1CSIDriverSpecFluentImpl.TokenRequestsNested addNewTokenRequestLike(StorageV1TokenRequest item) { - return new V1CSIDriverSpecFluentImpl.TokenRequestsNestedImpl(-1, item); - } - public V1CSIDriverSpecFluentImpl.TokenRequestsNested setNewTokenRequestLike(int index,StorageV1TokenRequest item) { - return new V1CSIDriverSpecFluentImpl.TokenRequestsNestedImpl(index, item); - } - public V1CSIDriverSpecFluentImpl.TokenRequestsNested editTokenRequest(int index) { - if (tokenRequests.size() <= index) throw new RuntimeException("Can't edit tokenRequests. Index exceeds size."); - return setNewTokenRequestLike(index, buildTokenRequest(index)); - } - public V1CSIDriverSpecFluentImpl.TokenRequestsNested editFirstTokenRequest() { - if (tokenRequests.size() == 0) throw new RuntimeException("Can't edit first tokenRequests. The list is empty."); - return setNewTokenRequestLike(0, buildTokenRequest(0)); - } - public V1CSIDriverSpecFluentImpl.TokenRequestsNested editLastTokenRequest() { - int index = tokenRequests.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last tokenRequests. The list is empty."); - return setNewTokenRequestLike(index, buildTokenRequest(index)); - } - public V1CSIDriverSpecFluentImpl.TokenRequestsNested editMatchingTokenRequest(Predicate predicate) { - int index = -1; - for (int i=0;i();} - this.volumeLifecycleModes.add(index, item); - return (A)this; - } - public A setToVolumeLifecycleModes(int index,String item) { - if (this.volumeLifecycleModes == null) {this.volumeLifecycleModes = new ArrayList();} - this.volumeLifecycleModes.set(index, item); return (A)this; - } - public A addToVolumeLifecycleModes(java.lang.String... items) { - if (this.volumeLifecycleModes == null) {this.volumeLifecycleModes = new ArrayList();} - for (String item : items) {this.volumeLifecycleModes.add(item);} return (A)this; - } - public A addAllToVolumeLifecycleModes(Collection items) { - if (this.volumeLifecycleModes == null) {this.volumeLifecycleModes = new ArrayList();} - for (String item : items) {this.volumeLifecycleModes.add(item);} return (A)this; - } - public A removeFromVolumeLifecycleModes(java.lang.String... items) { - for (String item : items) {if (this.volumeLifecycleModes!= null){ this.volumeLifecycleModes.remove(item);}} return (A)this; - } - public A removeAllFromVolumeLifecycleModes(Collection items) { - for (String item : items) {if (this.volumeLifecycleModes!= null){ this.volumeLifecycleModes.remove(item);}} return (A)this; - } - public List getVolumeLifecycleModes() { - return this.volumeLifecycleModes; - } - public String getVolumeLifecycleMode(int index) { - return this.volumeLifecycleModes.get(index); - } - public String getFirstVolumeLifecycleMode() { - return this.volumeLifecycleModes.get(0); - } - public String getLastVolumeLifecycleMode() { - return this.volumeLifecycleModes.get(volumeLifecycleModes.size() - 1); - } - public String getMatchingVolumeLifecycleMode(Predicate predicate) { - for (String item: volumeLifecycleModes) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVolumeLifecycleMode(Predicate predicate) { - for (String item: volumeLifecycleModes) { if(predicate.test(item)){ return true;} } return false; - } - public A withVolumeLifecycleModes(List volumeLifecycleModes) { - if (volumeLifecycleModes != null) {this.volumeLifecycleModes = new ArrayList(); for (String item : volumeLifecycleModes){this.addToVolumeLifecycleModes(item);}} else { this.volumeLifecycleModes = null;} return (A) this; - } - public A withVolumeLifecycleModes(java.lang.String... volumeLifecycleModes) { - if (this.volumeLifecycleModes != null) {this.volumeLifecycleModes.clear(); _visitables.remove("volumeLifecycleModes"); } - if (volumeLifecycleModes != null) {for (String item :volumeLifecycleModes){ this.addToVolumeLifecycleModes(item);}} return (A) this; - } - public Boolean hasVolumeLifecycleModes() { - return volumeLifecycleModes != null && !volumeLifecycleModes.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSIDriverSpecFluentImpl that = (V1CSIDriverSpecFluentImpl) o; - if (!java.util.Objects.equals(attachRequired, that.attachRequired)) return false; - - if (!java.util.Objects.equals(fsGroupPolicy, that.fsGroupPolicy)) return false; - - if (!java.util.Objects.equals(podInfoOnMount, that.podInfoOnMount)) return false; - - if (!java.util.Objects.equals(requiresRepublish, that.requiresRepublish)) return false; - - if (!java.util.Objects.equals(seLinuxMount, that.seLinuxMount)) return false; - - if (!java.util.Objects.equals(storageCapacity, that.storageCapacity)) return false; - - if (!java.util.Objects.equals(tokenRequests, that.tokenRequests)) return false; - - if (!java.util.Objects.equals(volumeLifecycleModes, that.volumeLifecycleModes)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(attachRequired, fsGroupPolicy, podInfoOnMount, requiresRepublish, seLinuxMount, storageCapacity, tokenRequests, volumeLifecycleModes, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (attachRequired != null) { sb.append("attachRequired:"); sb.append(attachRequired + ","); } - if (fsGroupPolicy != null) { sb.append("fsGroupPolicy:"); sb.append(fsGroupPolicy + ","); } - if (podInfoOnMount != null) { sb.append("podInfoOnMount:"); sb.append(podInfoOnMount + ","); } - if (requiresRepublish != null) { sb.append("requiresRepublish:"); sb.append(requiresRepublish + ","); } - if (seLinuxMount != null) { sb.append("seLinuxMount:"); sb.append(seLinuxMount + ","); } - if (storageCapacity != null) { sb.append("storageCapacity:"); sb.append(storageCapacity + ","); } - if (tokenRequests != null) { sb.append("tokenRequests:"); sb.append(tokenRequests + ","); } - if (volumeLifecycleModes != null && !volumeLifecycleModes.isEmpty()) { sb.append("volumeLifecycleModes:"); sb.append(volumeLifecycleModes); } - sb.append("}"); - return sb.toString(); - } - public A withAttachRequired() { - return withAttachRequired(true); - } - public A withPodInfoOnMount() { - return withPodInfoOnMount(true); - } - public A withRequiresRepublish() { - return withRequiresRepublish(true); - } - public A withSeLinuxMount() { - return withSeLinuxMount(true); - } - public A withStorageCapacity() { - return withStorageCapacity(true); - } - class TokenRequestsNestedImpl extends StorageV1TokenRequestFluentImpl> implements V1CSIDriverSpecFluentImpl.TokenRequestsNested,Nested{ - TokenRequestsNestedImpl(int index,StorageV1TokenRequest item) { - this.index = index; - this.builder = new StorageV1TokenRequestBuilder(this, item); - } - TokenRequestsNestedImpl() { - this.index = -1; - this.builder = new StorageV1TokenRequestBuilder(this); - } - StorageV1TokenRequestBuilder builder; - int index; - public N and() { - return (N) V1CSIDriverSpecFluentImpl.this.setToTokenRequests(index,builder.build()); - } - public N endTokenRequest() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeBuilder.java index 71bf933f0f..aeb0a5a08e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSINodeBuilder extends V1CSINodeFluentImpl implements VisitableBuilder{ +public class V1CSINodeBuilder extends V1CSINodeFluent implements VisitableBuilder{ public V1CSINodeBuilder() { - this(false); - } - public V1CSINodeBuilder(Boolean validationEnabled) { - this(new V1CSINode(), validationEnabled); + this(new V1CSINode()); } + public V1CSINodeBuilder(V1CSINodeFluent fluent) { - this(fluent, false); - } - public V1CSINodeBuilder(V1CSINodeFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSINode(), validationEnabled); + this(fluent, new V1CSINode()); } + public V1CSINodeBuilder(V1CSINodeFluent fluent,V1CSINode instance) { - this(fluent, instance, false); - } - public V1CSINodeBuilder(V1CSINodeFluent fluent,V1CSINode instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSINodeBuilder(V1CSINode instance) { - this(instance,false); - } - public V1CSINodeBuilder(V1CSINode instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSINodeFluent fluent; - Boolean validationEnabled; + public V1CSINode build() { V1CSINode buildable = new V1CSINode(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverBuilder.java index 346d0d0ed6..37193ff54b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSINodeDriverBuilder extends V1CSINodeDriverFluentImpl implements VisitableBuilder{ +public class V1CSINodeDriverBuilder extends V1CSINodeDriverFluent implements VisitableBuilder{ public V1CSINodeDriverBuilder() { - this(false); - } - public V1CSINodeDriverBuilder(Boolean validationEnabled) { - this(new V1CSINodeDriver(), validationEnabled); + this(new V1CSINodeDriver()); } + public V1CSINodeDriverBuilder(V1CSINodeDriverFluent fluent) { - this(fluent, false); - } - public V1CSINodeDriverBuilder(V1CSINodeDriverFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSINodeDriver(), validationEnabled); + this(fluent, new V1CSINodeDriver()); } + public V1CSINodeDriverBuilder(V1CSINodeDriverFluent fluent,V1CSINodeDriver instance) { - this(fluent, instance, false); - } - public V1CSINodeDriverBuilder(V1CSINodeDriverFluent fluent,V1CSINodeDriver instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAllocatable(instance.getAllocatable()); - fluent.withName(instance.getName()); - fluent.withNodeID(instance.getNodeID()); - fluent.withTopologyKeys(instance.getTopologyKeys()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSINodeDriverBuilder(V1CSINodeDriver instance) { - this(instance,false); - } - public V1CSINodeDriverBuilder(V1CSINodeDriver instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAllocatable(instance.getAllocatable()); - this.withName(instance.getName()); - this.withNodeID(instance.getNodeID()); - this.withTopologyKeys(instance.getTopologyKeys()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSINodeDriverFluent fluent; - Boolean validationEnabled; + public V1CSINodeDriver build() { V1CSINodeDriver buildable = new V1CSINodeDriver(); - buildable.setAllocatable(fluent.getAllocatable()); + buildable.setAllocatable(fluent.buildAllocatable()); buildable.setName(fluent.getName()); buildable.setNodeID(fluent.getNodeID()); buildable.setTopologyKeys(fluent.getTopologyKeys()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverFluent.java index 021c312387..c1a54158aa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverFluent.java @@ -1,60 +1,242 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CSINodeDriverFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildAllocatable instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeNodeResources getAllocatable(); - public V1VolumeNodeResources buildAllocatable(); - public A withAllocatable(V1VolumeNodeResources allocatable); - public Boolean hasAllocatable(); - public V1CSINodeDriverFluent.AllocatableNested withNewAllocatable(); - public V1CSINodeDriverFluent.AllocatableNested withNewAllocatableLike(V1VolumeNodeResources item); - public V1CSINodeDriverFluent.AllocatableNested editAllocatable(); - public V1CSINodeDriverFluent.AllocatableNested editOrNewAllocatable(); - public V1CSINodeDriverFluent.AllocatableNested editOrNewAllocatableLike(V1VolumeNodeResources item); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNodeID(); - public A withNodeID(String nodeID); - public Boolean hasNodeID(); - public A addToTopologyKeys(int index,String item); - public A setToTopologyKeys(int index,String item); - public A addToTopologyKeys(java.lang.String... items); - public A addAllToTopologyKeys(Collection items); - public A removeFromTopologyKeys(java.lang.String... items); - public A removeAllFromTopologyKeys(Collection items); - public List getTopologyKeys(); - public String getTopologyKey(int index); - public String getFirstTopologyKey(); - public String getLastTopologyKey(); - public String getMatchingTopologyKey(Predicate predicate); - public Boolean hasMatchingTopologyKey(Predicate predicate); - public A withTopologyKeys(List topologyKeys); - public A withTopologyKeys(java.lang.String... topologyKeys); - public Boolean hasTopologyKeys(); - public interface AllocatableNested extends Nested,V1VolumeNodeResourcesFluent>{ - public N and(); - public N endAllocatable(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSINodeDriverFluent> extends BaseFluent{ + public V1CSINodeDriverFluent() { + } + + public V1CSINodeDriverFluent(V1CSINodeDriver instance) { + this.copyInstance(instance); + } + private V1VolumeNodeResourcesBuilder allocatable; + private String name; + private String nodeID; + private List topologyKeys; + + protected void copyInstance(V1CSINodeDriver instance) { + instance = (instance != null ? instance : new V1CSINodeDriver()); + if (instance != null) { + this.withAllocatable(instance.getAllocatable()); + this.withName(instance.getName()); + this.withNodeID(instance.getNodeID()); + this.withTopologyKeys(instance.getTopologyKeys()); + } + } + + public V1VolumeNodeResources buildAllocatable() { + return this.allocatable != null ? this.allocatable.build() : null; + } + + public A withAllocatable(V1VolumeNodeResources allocatable) { + this._visitables.remove("allocatable"); + if (allocatable != null) { + this.allocatable = new V1VolumeNodeResourcesBuilder(allocatable); + this._visitables.get("allocatable").add(this.allocatable); + } else { + this.allocatable = null; + this._visitables.get("allocatable").remove(this.allocatable); + } + return (A) this; + } + + public boolean hasAllocatable() { + return this.allocatable != null; + } + + public AllocatableNested withNewAllocatable() { + return new AllocatableNested(null); + } + + public AllocatableNested withNewAllocatableLike(V1VolumeNodeResources item) { + return new AllocatableNested(item); + } + + public AllocatableNested editAllocatable() { + return withNewAllocatableLike(java.util.Optional.ofNullable(buildAllocatable()).orElse(null)); + } + + public AllocatableNested editOrNewAllocatable() { + return withNewAllocatableLike(java.util.Optional.ofNullable(buildAllocatable()).orElse(new V1VolumeNodeResourcesBuilder().build())); + } + + public AllocatableNested editOrNewAllocatableLike(V1VolumeNodeResources item) { + return withNewAllocatableLike(java.util.Optional.ofNullable(buildAllocatable()).orElse(item)); + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNodeID() { + return this.nodeID; + } + + public A withNodeID(String nodeID) { + this.nodeID = nodeID; + return (A) this; + } + + public boolean hasNodeID() { + return this.nodeID != null; + } + + public A addToTopologyKeys(int index,String item) { + if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();} + this.topologyKeys.add(index, item); + return (A)this; + } + + public A setToTopologyKeys(int index,String item) { + if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();} + this.topologyKeys.set(index, item); return (A)this; } + public A addToTopologyKeys(java.lang.String... items) { + if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();} + for (String item : items) {this.topologyKeys.add(item);} return (A)this; + } + + public A addAllToTopologyKeys(Collection items) { + if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();} + for (String item : items) {this.topologyKeys.add(item);} return (A)this; + } + + public A removeFromTopologyKeys(java.lang.String... items) { + if (this.topologyKeys == null) return (A)this; + for (String item : items) { this.topologyKeys.remove(item);} return (A)this; + } + + public A removeAllFromTopologyKeys(Collection items) { + if (this.topologyKeys == null) return (A)this; + for (String item : items) { this.topologyKeys.remove(item);} return (A)this; + } + + public List getTopologyKeys() { + return this.topologyKeys; + } + + public String getTopologyKey(int index) { + return this.topologyKeys.get(index); + } + + public String getFirstTopologyKey() { + return this.topologyKeys.get(0); + } + + public String getLastTopologyKey() { + return this.topologyKeys.get(topologyKeys.size() - 1); + } + + public String getMatchingTopologyKey(Predicate predicate) { + for (String item : topologyKeys) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingTopologyKey(Predicate predicate) { + for (String item : topologyKeys) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withTopologyKeys(List topologyKeys) { + if (topologyKeys != null) { + this.topologyKeys = new ArrayList(); + for (String item : topologyKeys) { + this.addToTopologyKeys(item); + } + } else { + this.topologyKeys = null; + } + return (A) this; + } + + public A withTopologyKeys(java.lang.String... topologyKeys) { + if (this.topologyKeys != null) { + this.topologyKeys.clear(); + _visitables.remove("topologyKeys"); + } + if (topologyKeys != null) { + for (String item : topologyKeys) { + this.addToTopologyKeys(item); + } + } + return (A) this; + } + + public boolean hasTopologyKeys() { + return this.topologyKeys != null && !this.topologyKeys.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSINodeDriverFluent that = (V1CSINodeDriverFluent) o; + if (!java.util.Objects.equals(allocatable, that.allocatable)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(nodeID, that.nodeID)) return false; + if (!java.util.Objects.equals(topologyKeys, that.topologyKeys)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(allocatable, name, nodeID, topologyKeys, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (allocatable != null) { sb.append("allocatable:"); sb.append(allocatable + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (nodeID != null) { sb.append("nodeID:"); sb.append(nodeID + ","); } + if (topologyKeys != null && !topologyKeys.isEmpty()) { sb.append("topologyKeys:"); sb.append(topologyKeys); } + sb.append("}"); + return sb.toString(); + } + public class AllocatableNested extends V1VolumeNodeResourcesFluent> implements Nested{ + AllocatableNested(V1VolumeNodeResources item) { + this.builder = new V1VolumeNodeResourcesBuilder(this, item); + } + V1VolumeNodeResourcesBuilder builder; + + public N and() { + return (N) V1CSINodeDriverFluent.this.withAllocatable(builder.build()); + } + + public N endAllocatable() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverFluentImpl.java deleted file mode 100644 index 1240a850e0..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeDriverFluentImpl.java +++ /dev/null @@ -1,182 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSINodeDriverFluentImpl> extends BaseFluent implements V1CSINodeDriverFluent{ - public V1CSINodeDriverFluentImpl() { - } - public V1CSINodeDriverFluentImpl(V1CSINodeDriver instance) { - if (instance != null) { - this.withAllocatable(instance.getAllocatable()); - this.withName(instance.getName()); - this.withNodeID(instance.getNodeID()); - this.withTopologyKeys(instance.getTopologyKeys()); - } - } - private V1VolumeNodeResourcesBuilder allocatable; - private String name; - private String nodeID; - private List topologyKeys; - - /** - * This method has been deprecated, please use method buildAllocatable instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeNodeResources getAllocatable() { - return this.allocatable!=null ?this.allocatable.build():null; - } - public V1VolumeNodeResources buildAllocatable() { - return this.allocatable!=null ?this.allocatable.build():null; - } - public A withAllocatable(V1VolumeNodeResources allocatable) { - _visitables.get("allocatable").remove(this.allocatable); - if (allocatable!=null){ this.allocatable= new V1VolumeNodeResourcesBuilder(allocatable); _visitables.get("allocatable").add(this.allocatable);} else { this.allocatable = null; _visitables.get("allocatable").remove(this.allocatable); } return (A) this; - } - public Boolean hasAllocatable() { - return this.allocatable != null; - } - public V1CSINodeDriverFluentImpl.AllocatableNested withNewAllocatable() { - return new V1CSINodeDriverFluentImpl.AllocatableNestedImpl(); - } - public V1CSINodeDriverFluentImpl.AllocatableNested withNewAllocatableLike(V1VolumeNodeResources item) { - return new V1CSINodeDriverFluentImpl.AllocatableNestedImpl(item); - } - public V1CSINodeDriverFluentImpl.AllocatableNested editAllocatable() { - return withNewAllocatableLike(getAllocatable()); - } - public V1CSINodeDriverFluentImpl.AllocatableNested editOrNewAllocatable() { - return withNewAllocatableLike(getAllocatable() != null ? getAllocatable(): new V1VolumeNodeResourcesBuilder().build()); - } - public V1CSINodeDriverFluentImpl.AllocatableNested editOrNewAllocatableLike(V1VolumeNodeResources item) { - return withNewAllocatableLike(getAllocatable() != null ? getAllocatable(): item); - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNodeID() { - return this.nodeID; - } - public A withNodeID(String nodeID) { - this.nodeID=nodeID; return (A) this; - } - public Boolean hasNodeID() { - return this.nodeID != null; - } - public A addToTopologyKeys(int index,String item) { - if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();} - this.topologyKeys.add(index, item); - return (A)this; - } - public A setToTopologyKeys(int index,String item) { - if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();} - this.topologyKeys.set(index, item); return (A)this; - } - public A addToTopologyKeys(java.lang.String... items) { - if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();} - for (String item : items) {this.topologyKeys.add(item);} return (A)this; - } - public A addAllToTopologyKeys(Collection items) { - if (this.topologyKeys == null) {this.topologyKeys = new ArrayList();} - for (String item : items) {this.topologyKeys.add(item);} return (A)this; - } - public A removeFromTopologyKeys(java.lang.String... items) { - for (String item : items) {if (this.topologyKeys!= null){ this.topologyKeys.remove(item);}} return (A)this; - } - public A removeAllFromTopologyKeys(Collection items) { - for (String item : items) {if (this.topologyKeys!= null){ this.topologyKeys.remove(item);}} return (A)this; - } - public List getTopologyKeys() { - return this.topologyKeys; - } - public String getTopologyKey(int index) { - return this.topologyKeys.get(index); - } - public String getFirstTopologyKey() { - return this.topologyKeys.get(0); - } - public String getLastTopologyKey() { - return this.topologyKeys.get(topologyKeys.size() - 1); - } - public String getMatchingTopologyKey(Predicate predicate) { - for (String item: topologyKeys) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingTopologyKey(Predicate predicate) { - for (String item: topologyKeys) { if(predicate.test(item)){ return true;} } return false; - } - public A withTopologyKeys(List topologyKeys) { - if (topologyKeys != null) {this.topologyKeys = new ArrayList(); for (String item : topologyKeys){this.addToTopologyKeys(item);}} else { this.topologyKeys = null;} return (A) this; - } - public A withTopologyKeys(java.lang.String... topologyKeys) { - if (this.topologyKeys != null) {this.topologyKeys.clear(); _visitables.remove("topologyKeys"); } - if (topologyKeys != null) {for (String item :topologyKeys){ this.addToTopologyKeys(item);}} return (A) this; - } - public Boolean hasTopologyKeys() { - return topologyKeys != null && !topologyKeys.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSINodeDriverFluentImpl that = (V1CSINodeDriverFluentImpl) o; - if (!java.util.Objects.equals(allocatable, that.allocatable)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(nodeID, that.nodeID)) return false; - - if (!java.util.Objects.equals(topologyKeys, that.topologyKeys)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(allocatable, name, nodeID, topologyKeys, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (allocatable != null) { sb.append("allocatable:"); sb.append(allocatable + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (nodeID != null) { sb.append("nodeID:"); sb.append(nodeID + ","); } - if (topologyKeys != null && !topologyKeys.isEmpty()) { sb.append("topologyKeys:"); sb.append(topologyKeys); } - sb.append("}"); - return sb.toString(); - } - class AllocatableNestedImpl extends V1VolumeNodeResourcesFluentImpl> implements V1CSINodeDriverFluentImpl.AllocatableNested,Nested{ - AllocatableNestedImpl(V1VolumeNodeResources item) { - this.builder = new V1VolumeNodeResourcesBuilder(this, item); - } - AllocatableNestedImpl() { - this.builder = new V1VolumeNodeResourcesBuilder(this); - } - V1VolumeNodeResourcesBuilder builder; - public N and() { - return (N) V1CSINodeDriverFluentImpl.this.withAllocatable(builder.build()); - } - public N endAllocatable() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeFluent.java index 09c7614f63..e2374be65e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1CSINodeFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1CSINodeFluent.MetadataNested withNewMetadata(); - public V1CSINodeFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1CSINodeFluent.MetadataNested editMetadata(); - public V1CSINodeFluent.MetadataNested editOrNewMetadata(); - public V1CSINodeFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CSINodeSpec getSpec(); - public V1CSINodeSpec buildSpec(); - public A withSpec(V1CSINodeSpec spec); - public Boolean hasSpec(); - public V1CSINodeFluent.SpecNested withNewSpec(); - public V1CSINodeFluent.SpecNested withNewSpecLike(V1CSINodeSpec item); - public V1CSINodeFluent.SpecNested editSpec(); - public V1CSINodeFluent.SpecNested editOrNewSpec(); - public V1CSINodeFluent.SpecNested editOrNewSpecLike(V1CSINodeSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSINodeFluent> extends BaseFluent{ + public V1CSINodeFluent() { + } + + public V1CSINodeFluent(V1CSINode instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1CSINodeSpecBuilder spec; + + protected void copyInstance(V1CSINode instance) { + instance = (instance != null ? instance : new V1CSINode()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1CSINodeSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1CSINodeSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1CSINodeSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1CSINodeSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1CSINodeSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1CSINodeSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1CSINodeSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSINodeFluent that = (V1CSINodeFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1CSINodeFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1CSINodeSpecFluent> implements Nested{ + SpecNested(V1CSINodeSpec item) { + this.builder = new V1CSINodeSpecBuilder(this, item); + } + V1CSINodeSpecBuilder builder; + + public N and() { + return (N) V1CSINodeFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeFluentImpl.java deleted file mode 100644 index ed6ee9c5ce..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSINodeFluentImpl> extends BaseFluent implements V1CSINodeFluent{ - public V1CSINodeFluentImpl() { - } - public V1CSINodeFluentImpl(V1CSINode instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1CSINodeSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1CSINodeFluentImpl.MetadataNested withNewMetadata() { - return new V1CSINodeFluentImpl.MetadataNestedImpl(); - } - public V1CSINodeFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1CSINodeFluentImpl.MetadataNestedImpl(item); - } - public V1CSINodeFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CSINodeFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1CSINodeFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CSINodeSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1CSINodeSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1CSINodeSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1CSINodeSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1CSINodeFluentImpl.SpecNested withNewSpec() { - return new V1CSINodeFluentImpl.SpecNestedImpl(); - } - public V1CSINodeFluentImpl.SpecNested withNewSpecLike(V1CSINodeSpec item) { - return new V1CSINodeFluentImpl.SpecNestedImpl(item); - } - public V1CSINodeFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1CSINodeFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1CSINodeSpecBuilder().build()); - } - public V1CSINodeFluentImpl.SpecNested editOrNewSpecLike(V1CSINodeSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSINodeFluentImpl that = (V1CSINodeFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1CSINodeFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1CSINodeFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1CSINodeSpecFluentImpl> implements V1CSINodeFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1CSINodeSpec item) { - this.builder = new V1CSINodeSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1CSINodeSpecBuilder(this); - } - V1CSINodeSpecBuilder builder; - public N and() { - return (N) V1CSINodeFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListBuilder.java index cae85ba8f4..3aa4c9a1fc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSINodeListBuilder extends V1CSINodeListFluentImpl implements VisitableBuilder{ +public class V1CSINodeListBuilder extends V1CSINodeListFluent implements VisitableBuilder{ public V1CSINodeListBuilder() { - this(false); - } - public V1CSINodeListBuilder(Boolean validationEnabled) { - this(new V1CSINodeList(), validationEnabled); + this(new V1CSINodeList()); } + public V1CSINodeListBuilder(V1CSINodeListFluent fluent) { - this(fluent, false); - } - public V1CSINodeListBuilder(V1CSINodeListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSINodeList(), validationEnabled); + this(fluent, new V1CSINodeList()); } + public V1CSINodeListBuilder(V1CSINodeListFluent fluent,V1CSINodeList instance) { - this(fluent, instance, false); - } - public V1CSINodeListBuilder(V1CSINodeListFluent fluent,V1CSINodeList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSINodeListBuilder(V1CSINodeList instance) { - this(instance,false); - } - public V1CSINodeListBuilder(V1CSINodeList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSINodeListFluent fluent; - Boolean validationEnabled; + public V1CSINodeList build() { V1CSINodeList buildable = new V1CSINodeList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListFluent.java index e49d2f50b9..3199e0216c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CSINodeListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1CSINode item); - public A setToItems(int index,V1CSINode item); - public A addToItems(io.kubernetes.client.openapi.models.V1CSINode... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1CSINode... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1CSINode buildItem(int index); - public V1CSINode buildFirstItem(); - public V1CSINode buildLastItem(); - public V1CSINode buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1CSINode... items); - public Boolean hasItems(); - public V1CSINodeListFluent.ItemsNested addNewItem(); - public V1CSINodeListFluent.ItemsNested addNewItemLike(V1CSINode item); - public V1CSINodeListFluent.ItemsNested setNewItemLike(int index,V1CSINode item); - public V1CSINodeListFluent.ItemsNested editItem(int index); - public V1CSINodeListFluent.ItemsNested editFirstItem(); - public V1CSINodeListFluent.ItemsNested editLastItem(); - public V1CSINodeListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1CSINodeListFluent.MetadataNested withNewMetadata(); - public V1CSINodeListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1CSINodeListFluent.MetadataNested editMetadata(); - public V1CSINodeListFluent.MetadataNested editOrNewMetadata(); - public V1CSINodeListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1CSINodeFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSINodeListFluent> extends BaseFluent{ + public V1CSINodeListFluent() { + } + + public V1CSINodeListFluent(V1CSINodeList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1CSINodeList instance) { + instance = (instance != null ? instance : new V1CSINodeList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1CSINode item) { + if (this.items == null) {this.items = new ArrayList();} + V1CSINodeBuilder builder = new V1CSINodeBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1CSINode item) { + if (this.items == null) {this.items = new ArrayList();} + V1CSINodeBuilder builder = new V1CSINodeBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1CSINode... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CSINode item : items) {V1CSINodeBuilder builder = new V1CSINodeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CSINode item : items) {V1CSINodeBuilder builder = new V1CSINodeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1CSINode... items) { + if (this.items == null) return (A)this; + for (V1CSINode item : items) {V1CSINodeBuilder builder = new V1CSINodeBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1CSINode item : items) {V1CSINodeBuilder builder = new V1CSINodeBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1CSINodeBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1CSINode buildItem(int index) { + return this.items.get(index).build(); + } + + public V1CSINode buildFirstItem() { + return this.items.get(0).build(); + } + + public V1CSINode buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1CSINode buildMatchingItem(Predicate predicate) { + for (V1CSINodeBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1CSINodeBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1CSINode item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1CSINode... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1CSINode item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1CSINode item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1CSINode item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSINodeListFluent that = (V1CSINodeListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1CSINodeFluent> implements Nested{ + ItemsNested(int index,V1CSINode item) { + this.index = index; + this.builder = new V1CSINodeBuilder(this, item); + } + V1CSINodeBuilder builder; + int index; + public N and() { + return (N) V1CSINodeListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1CSINodeListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListFluentImpl.java deleted file mode 100644 index 336bda7ee7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSINodeListFluentImpl> extends BaseFluent implements V1CSINodeListFluent{ - public V1CSINodeListFluentImpl() { - } - public V1CSINodeListFluentImpl(V1CSINodeList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1CSINode item) { - if (this.items == null) {this.items = new ArrayList();} - V1CSINodeBuilder builder = new V1CSINodeBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1CSINode item) { - if (this.items == null) {this.items = new ArrayList();} - V1CSINodeBuilder builder = new V1CSINodeBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1CSINode... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CSINode item : items) {V1CSINodeBuilder builder = new V1CSINodeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CSINode item : items) {V1CSINodeBuilder builder = new V1CSINodeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1CSINode... items) { - for (V1CSINode item : items) {V1CSINodeBuilder builder = new V1CSINodeBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1CSINode item : items) {V1CSINodeBuilder builder = new V1CSINodeBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1CSINodeBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1CSINode buildItem(int index) { - return this.items.get(index).build(); - } - public V1CSINode buildFirstItem() { - return this.items.get(0).build(); - } - public V1CSINode buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1CSINode buildMatchingItem(Predicate predicate) { - for (V1CSINodeBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1CSINodeBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1CSINode item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1CSINode... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1CSINode item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1CSINodeListFluentImpl.ItemsNested addNewItem() { - return new V1CSINodeListFluentImpl.ItemsNestedImpl(); - } - public V1CSINodeListFluentImpl.ItemsNested addNewItemLike(V1CSINode item) { - return new V1CSINodeListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1CSINodeListFluentImpl.ItemsNested setNewItemLike(int index,V1CSINode item) { - return new V1CSINodeListFluentImpl.ItemsNestedImpl(index, item); - } - public V1CSINodeListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1CSINodeListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1CSINodeListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1CSINodeListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1CSINodeListFluentImpl.MetadataNestedImpl(); - } - public V1CSINodeListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1CSINodeListFluentImpl.MetadataNestedImpl(item); - } - public V1CSINodeListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CSINodeListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1CSINodeListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSINodeListFluentImpl that = (V1CSINodeListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1CSINodeFluentImpl> implements V1CSINodeListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1CSINode item) { - this.index = index; - this.builder = new V1CSINodeBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1CSINodeBuilder(this); - } - V1CSINodeBuilder builder; - int index; - public N and() { - return (N) V1CSINodeListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1CSINodeListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1CSINodeListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecBuilder.java index 26918c8d6a..0a52e95229 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSINodeSpecBuilder extends V1CSINodeSpecFluentImpl implements VisitableBuilder{ +public class V1CSINodeSpecBuilder extends V1CSINodeSpecFluent implements VisitableBuilder{ public V1CSINodeSpecBuilder() { - this(false); - } - public V1CSINodeSpecBuilder(Boolean validationEnabled) { - this(new V1CSINodeSpec(), validationEnabled); + this(new V1CSINodeSpec()); } + public V1CSINodeSpecBuilder(V1CSINodeSpecFluent fluent) { - this(fluent, false); - } - public V1CSINodeSpecBuilder(V1CSINodeSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSINodeSpec(), validationEnabled); + this(fluent, new V1CSINodeSpec()); } + public V1CSINodeSpecBuilder(V1CSINodeSpecFluent fluent,V1CSINodeSpec instance) { - this(fluent, instance, false); - } - public V1CSINodeSpecBuilder(V1CSINodeSpecFluent fluent,V1CSINodeSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDrivers(instance.getDrivers()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSINodeSpecBuilder(V1CSINodeSpec instance) { - this(instance,false); - } - public V1CSINodeSpecBuilder(V1CSINodeSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDrivers(instance.getDrivers()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSINodeSpecFluent fluent; - Boolean validationEnabled; + public V1CSINodeSpec build() { V1CSINodeSpec buildable = new V1CSINodeSpec(); - buildable.setDrivers(fluent.getDrivers()); + buildable.setDrivers(fluent.buildDrivers()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecFluent.java index 5d676bda0e..9cebd63fe5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CSINodeSpecFluent> extends Fluent{ - public A addToDrivers(int index,V1CSINodeDriver item); - public A setToDrivers(int index,V1CSINodeDriver item); - public A addToDrivers(io.kubernetes.client.openapi.models.V1CSINodeDriver... items); - public A addAllToDrivers(Collection items); - public A removeFromDrivers(io.kubernetes.client.openapi.models.V1CSINodeDriver... items); - public A removeAllFromDrivers(Collection items); - public A removeMatchingFromDrivers(Predicate predicate); - - /** - * This method has been deprecated, please use method buildDrivers instead. - * @return The buildable object. - */ - @Deprecated - public List getDrivers(); - public List buildDrivers(); - public V1CSINodeDriver buildDriver(int index); - public V1CSINodeDriver buildFirstDriver(); - public V1CSINodeDriver buildLastDriver(); - public V1CSINodeDriver buildMatchingDriver(Predicate predicate); - public Boolean hasMatchingDriver(Predicate predicate); - public A withDrivers(List drivers); - public A withDrivers(io.kubernetes.client.openapi.models.V1CSINodeDriver... drivers); - public Boolean hasDrivers(); - public V1CSINodeSpecFluent.DriversNested addNewDriver(); - public V1CSINodeSpecFluent.DriversNested addNewDriverLike(V1CSINodeDriver item); - public V1CSINodeSpecFluent.DriversNested setNewDriverLike(int index,V1CSINodeDriver item); - public V1CSINodeSpecFluent.DriversNested editDriver(int index); - public V1CSINodeSpecFluent.DriversNested editFirstDriver(); - public V1CSINodeSpecFluent.DriversNested editLastDriver(); - public V1CSINodeSpecFluent.DriversNested editMatchingDriver(Predicate predicate); - public interface DriversNested extends Nested,V1CSINodeDriverFluent>{ - public N and(); - public N endDriver(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSINodeSpecFluent> extends BaseFluent{ + public V1CSINodeSpecFluent() { + } + + public V1CSINodeSpecFluent(V1CSINodeSpec instance) { + this.copyInstance(instance); + } + private ArrayList drivers; + + protected void copyInstance(V1CSINodeSpec instance) { + instance = (instance != null ? instance : new V1CSINodeSpec()); + if (instance != null) { + this.withDrivers(instance.getDrivers()); + } + } + + public A addToDrivers(int index,V1CSINodeDriver item) { + if (this.drivers == null) {this.drivers = new ArrayList();} + V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item); + if (index < 0 || index >= drivers.size()) { _visitables.get("drivers").add(builder); drivers.add(builder); } else { _visitables.get("drivers").add(index, builder); drivers.add(index, builder);} + return (A)this; + } + + public A setToDrivers(int index,V1CSINodeDriver item) { + if (this.drivers == null) {this.drivers = new ArrayList();} + V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item); + if (index < 0 || index >= drivers.size()) { _visitables.get("drivers").add(builder); drivers.add(builder); } else { _visitables.get("drivers").set(index, builder); drivers.set(index, builder);} + return (A)this; + } + + public A addToDrivers(io.kubernetes.client.openapi.models.V1CSINodeDriver... items) { + if (this.drivers == null) {this.drivers = new ArrayList();} + for (V1CSINodeDriver item : items) {V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item);_visitables.get("drivers").add(builder);this.drivers.add(builder);} return (A)this; + } + + public A addAllToDrivers(Collection items) { + if (this.drivers == null) {this.drivers = new ArrayList();} + for (V1CSINodeDriver item : items) {V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item);_visitables.get("drivers").add(builder);this.drivers.add(builder);} return (A)this; + } + + public A removeFromDrivers(io.kubernetes.client.openapi.models.V1CSINodeDriver... items) { + if (this.drivers == null) return (A)this; + for (V1CSINodeDriver item : items) {V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item);_visitables.get("drivers").remove(builder); this.drivers.remove(builder);} return (A)this; + } + + public A removeAllFromDrivers(Collection items) { + if (this.drivers == null) return (A)this; + for (V1CSINodeDriver item : items) {V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item);_visitables.get("drivers").remove(builder); this.drivers.remove(builder);} return (A)this; + } + + public A removeMatchingFromDrivers(Predicate predicate) { + if (drivers == null) return (A) this; + final Iterator each = drivers.iterator(); + final List visitables = _visitables.get("drivers"); + while (each.hasNext()) { + V1CSINodeDriverBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildDrivers() { + return this.drivers != null ? build(drivers) : null; + } + + public V1CSINodeDriver buildDriver(int index) { + return this.drivers.get(index).build(); + } + + public V1CSINodeDriver buildFirstDriver() { + return this.drivers.get(0).build(); + } + + public V1CSINodeDriver buildLastDriver() { + return this.drivers.get(drivers.size() - 1).build(); + } + + public V1CSINodeDriver buildMatchingDriver(Predicate predicate) { + for (V1CSINodeDriverBuilder item : drivers) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingDriver(Predicate predicate) { + for (V1CSINodeDriverBuilder item : drivers) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withDrivers(List drivers) { + if (this.drivers != null) { + this._visitables.get("drivers").clear(); + } + if (drivers != null) { + this.drivers = new ArrayList(); + for (V1CSINodeDriver item : drivers) { + this.addToDrivers(item); + } + } else { + this.drivers = null; + } + return (A) this; + } + + public A withDrivers(io.kubernetes.client.openapi.models.V1CSINodeDriver... drivers) { + if (this.drivers != null) { + this.drivers.clear(); + _visitables.remove("drivers"); + } + if (drivers != null) { + for (V1CSINodeDriver item : drivers) { + this.addToDrivers(item); + } + } + return (A) this; + } + + public boolean hasDrivers() { + return this.drivers != null && !this.drivers.isEmpty(); + } + + public DriversNested addNewDriver() { + return new DriversNested(-1, null); + } + + public DriversNested addNewDriverLike(V1CSINodeDriver item) { + return new DriversNested(-1, item); + } + + public DriversNested setNewDriverLike(int index,V1CSINodeDriver item) { + return new DriversNested(index, item); + } + + public DriversNested editDriver(int index) { + if (drivers.size() <= index) throw new RuntimeException("Can't edit drivers. Index exceeds size."); + return setNewDriverLike(index, buildDriver(index)); + } + + public DriversNested editFirstDriver() { + if (drivers.size() == 0) throw new RuntimeException("Can't edit first drivers. The list is empty."); + return setNewDriverLike(0, buildDriver(0)); + } + + public DriversNested editLastDriver() { + int index = drivers.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last drivers. The list is empty."); + return setNewDriverLike(index, buildDriver(index)); + } + + public DriversNested editMatchingDriver(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1CSINodeDriverFluent> implements Nested{ + DriversNested(int index,V1CSINodeDriver item) { + this.index = index; + this.builder = new V1CSINodeDriverBuilder(this, item); + } + V1CSINodeDriverBuilder builder; + int index; + + public N and() { + return (N) V1CSINodeSpecFluent.this.setToDrivers(index,builder.build()); + } + + public N endDriver() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecFluentImpl.java deleted file mode 100644 index c9313b3d38..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSINodeSpecFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSINodeSpecFluentImpl> extends BaseFluent implements V1CSINodeSpecFluent{ - public V1CSINodeSpecFluentImpl() { - } - public V1CSINodeSpecFluentImpl(V1CSINodeSpec instance) { - if (instance != null) { - this.withDrivers(instance.getDrivers()); - } - } - private ArrayList drivers; - public A addToDrivers(int index,V1CSINodeDriver item) { - if (this.drivers == null) {this.drivers = new ArrayList();} - V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item); - if (index < 0 || index >= drivers.size()) { _visitables.get("drivers").add(builder); drivers.add(builder); } else { _visitables.get("drivers").add(index, builder); drivers.add(index, builder);} - return (A)this; - } - public A setToDrivers(int index,V1CSINodeDriver item) { - if (this.drivers == null) {this.drivers = new ArrayList();} - V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item); - if (index < 0 || index >= drivers.size()) { _visitables.get("drivers").add(builder); drivers.add(builder); } else { _visitables.get("drivers").set(index, builder); drivers.set(index, builder);} - return (A)this; - } - public A addToDrivers(io.kubernetes.client.openapi.models.V1CSINodeDriver... items) { - if (this.drivers == null) {this.drivers = new ArrayList();} - for (V1CSINodeDriver item : items) {V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item);_visitables.get("drivers").add(builder);this.drivers.add(builder);} return (A)this; - } - public A addAllToDrivers(Collection items) { - if (this.drivers == null) {this.drivers = new ArrayList();} - for (V1CSINodeDriver item : items) {V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item);_visitables.get("drivers").add(builder);this.drivers.add(builder);} return (A)this; - } - public A removeFromDrivers(io.kubernetes.client.openapi.models.V1CSINodeDriver... items) { - for (V1CSINodeDriver item : items) {V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item);_visitables.get("drivers").remove(builder);if (this.drivers != null) {this.drivers.remove(builder);}} return (A)this; - } - public A removeAllFromDrivers(Collection items) { - for (V1CSINodeDriver item : items) {V1CSINodeDriverBuilder builder = new V1CSINodeDriverBuilder(item);_visitables.get("drivers").remove(builder);if (this.drivers != null) {this.drivers.remove(builder);}} return (A)this; - } - public A removeMatchingFromDrivers(Predicate predicate) { - if (drivers == null) return (A) this; - final Iterator each = drivers.iterator(); - final List visitables = _visitables.get("drivers"); - while (each.hasNext()) { - V1CSINodeDriverBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildDrivers instead. - * @return The buildable object. - */ - @Deprecated - public List getDrivers() { - return drivers != null ? build(drivers) : null; - } - public List buildDrivers() { - return drivers != null ? build(drivers) : null; - } - public V1CSINodeDriver buildDriver(int index) { - return this.drivers.get(index).build(); - } - public V1CSINodeDriver buildFirstDriver() { - return this.drivers.get(0).build(); - } - public V1CSINodeDriver buildLastDriver() { - return this.drivers.get(drivers.size() - 1).build(); - } - public V1CSINodeDriver buildMatchingDriver(Predicate predicate) { - for (V1CSINodeDriverBuilder item: drivers) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingDriver(Predicate predicate) { - for (V1CSINodeDriverBuilder item: drivers) { if(predicate.test(item)){ return true;} } return false; - } - public A withDrivers(List drivers) { - if (this.drivers != null) { _visitables.get("drivers").clear();} - if (drivers != null) {this.drivers = new ArrayList(); for (V1CSINodeDriver item : drivers){this.addToDrivers(item);}} else { this.drivers = null;} return (A) this; - } - public A withDrivers(io.kubernetes.client.openapi.models.V1CSINodeDriver... drivers) { - if (this.drivers != null) {this.drivers.clear(); _visitables.remove("drivers"); } - if (drivers != null) {for (V1CSINodeDriver item :drivers){ this.addToDrivers(item);}} return (A) this; - } - public Boolean hasDrivers() { - return drivers != null && !drivers.isEmpty(); - } - public V1CSINodeSpecFluentImpl.DriversNested addNewDriver() { - return new V1CSINodeSpecFluentImpl.DriversNestedImpl(); - } - public V1CSINodeSpecFluentImpl.DriversNested addNewDriverLike(V1CSINodeDriver item) { - return new V1CSINodeSpecFluentImpl.DriversNestedImpl(-1, item); - } - public V1CSINodeSpecFluentImpl.DriversNested setNewDriverLike(int index,V1CSINodeDriver item) { - return new V1CSINodeSpecFluentImpl.DriversNestedImpl(index, item); - } - public V1CSINodeSpecFluentImpl.DriversNested editDriver(int index) { - if (drivers.size() <= index) throw new RuntimeException("Can't edit drivers. Index exceeds size."); - return setNewDriverLike(index, buildDriver(index)); - } - public V1CSINodeSpecFluentImpl.DriversNested editFirstDriver() { - if (drivers.size() == 0) throw new RuntimeException("Can't edit first drivers. The list is empty."); - return setNewDriverLike(0, buildDriver(0)); - } - public V1CSINodeSpecFluentImpl.DriversNested editLastDriver() { - int index = drivers.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last drivers. The list is empty."); - return setNewDriverLike(index, buildDriver(index)); - } - public V1CSINodeSpecFluentImpl.DriversNested editMatchingDriver(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1CSINodeDriverFluentImpl> implements V1CSINodeSpecFluentImpl.DriversNested,Nested{ - DriversNestedImpl(int index,V1CSINodeDriver item) { - this.index = index; - this.builder = new V1CSINodeDriverBuilder(this, item); - } - DriversNestedImpl() { - this.index = -1; - this.builder = new V1CSINodeDriverBuilder(this); - } - V1CSINodeDriverBuilder builder; - int index; - public N and() { - return (N) V1CSINodeSpecFluentImpl.this.setToDrivers(index,builder.build()); - } - public N endDriver() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceBuilder.java index d212f63dd3..601391a624 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceBuilder.java @@ -1,73 +1,40 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSIPersistentVolumeSourceBuilder extends V1CSIPersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1CSIPersistentVolumeSourceBuilder extends V1CSIPersistentVolumeSourceFluent implements VisitableBuilder{ public V1CSIPersistentVolumeSourceBuilder() { - this(false); - } - public V1CSIPersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1CSIPersistentVolumeSource(), validationEnabled); + this(new V1CSIPersistentVolumeSource()); } + public V1CSIPersistentVolumeSourceBuilder(V1CSIPersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1CSIPersistentVolumeSourceBuilder(V1CSIPersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSIPersistentVolumeSource(), validationEnabled); + this(fluent, new V1CSIPersistentVolumeSource()); } + public V1CSIPersistentVolumeSourceBuilder(V1CSIPersistentVolumeSourceFluent fluent,V1CSIPersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1CSIPersistentVolumeSourceBuilder(V1CSIPersistentVolumeSourceFluent fluent,V1CSIPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withControllerExpandSecretRef(instance.getControllerExpandSecretRef()); - fluent.withControllerPublishSecretRef(instance.getControllerPublishSecretRef()); - fluent.withDriver(instance.getDriver()); - fluent.withFsType(instance.getFsType()); - fluent.withNodeExpandSecretRef(instance.getNodeExpandSecretRef()); - fluent.withNodePublishSecretRef(instance.getNodePublishSecretRef()); - fluent.withNodeStageSecretRef(instance.getNodeStageSecretRef()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withVolumeAttributes(instance.getVolumeAttributes()); - fluent.withVolumeHandle(instance.getVolumeHandle()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSIPersistentVolumeSourceBuilder(V1CSIPersistentVolumeSource instance) { - this(instance,false); - } - public V1CSIPersistentVolumeSourceBuilder(V1CSIPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withControllerExpandSecretRef(instance.getControllerExpandSecretRef()); - this.withControllerPublishSecretRef(instance.getControllerPublishSecretRef()); - this.withDriver(instance.getDriver()); - this.withFsType(instance.getFsType()); - this.withNodeExpandSecretRef(instance.getNodeExpandSecretRef()); - this.withNodePublishSecretRef(instance.getNodePublishSecretRef()); - this.withNodeStageSecretRef(instance.getNodeStageSecretRef()); - this.withReadOnly(instance.getReadOnly()); - this.withVolumeAttributes(instance.getVolumeAttributes()); - this.withVolumeHandle(instance.getVolumeHandle()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSIPersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1CSIPersistentVolumeSource build() { V1CSIPersistentVolumeSource buildable = new V1CSIPersistentVolumeSource(); - buildable.setControllerExpandSecretRef(fluent.getControllerExpandSecretRef()); - buildable.setControllerPublishSecretRef(fluent.getControllerPublishSecretRef()); + buildable.setControllerExpandSecretRef(fluent.buildControllerExpandSecretRef()); + buildable.setControllerPublishSecretRef(fluent.buildControllerPublishSecretRef()); buildable.setDriver(fluent.getDriver()); buildable.setFsType(fluent.getFsType()); - buildable.setNodeExpandSecretRef(fluent.getNodeExpandSecretRef()); - buildable.setNodePublishSecretRef(fluent.getNodePublishSecretRef()); - buildable.setNodeStageSecretRef(fluent.getNodeStageSecretRef()); + buildable.setNodeExpandSecretRef(fluent.buildNodeExpandSecretRef()); + buildable.setNodePublishSecretRef(fluent.buildNodePublishSecretRef()); + buildable.setNodeStageSecretRef(fluent.buildNodeStageSecretRef()); buildable.setReadOnly(fluent.getReadOnly()); buildable.setVolumeAttributes(fluent.getVolumeAttributes()); buildable.setVolumeHandle(fluent.getVolumeHandle()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceFluent.java index 994dba1795..d6d0f81f42 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceFluent.java @@ -1,137 +1,462 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; import java.util.LinkedHashMap; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1CSIPersistentVolumeSourceFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildControllerExpandSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getControllerExpandSecretRef(); - public V1SecretReference buildControllerExpandSecretRef(); - public A withControllerExpandSecretRef(V1SecretReference controllerExpandSecretRef); - public Boolean hasControllerExpandSecretRef(); - public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested withNewControllerExpandSecretRef(); - public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested withNewControllerExpandSecretRefLike(V1SecretReference item); - public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested editControllerExpandSecretRef(); - public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested editOrNewControllerExpandSecretRef(); - public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested editOrNewControllerExpandSecretRefLike(V1SecretReference item); - - /** - * This method has been deprecated, please use method buildControllerPublishSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getControllerPublishSecretRef(); - public V1SecretReference buildControllerPublishSecretRef(); - public A withControllerPublishSecretRef(V1SecretReference controllerPublishSecretRef); - public Boolean hasControllerPublishSecretRef(); - public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested withNewControllerPublishSecretRef(); - public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested withNewControllerPublishSecretRefLike(V1SecretReference item); - public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested editControllerPublishSecretRef(); - public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested editOrNewControllerPublishSecretRef(); - public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested editOrNewControllerPublishSecretRefLike(V1SecretReference item); - public String getDriver(); - public A withDriver(String driver); - public Boolean hasDriver(); - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - - /** - * This method has been deprecated, please use method buildNodeExpandSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getNodeExpandSecretRef(); - public V1SecretReference buildNodeExpandSecretRef(); - public A withNodeExpandSecretRef(V1SecretReference nodeExpandSecretRef); - public Boolean hasNodeExpandSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodeExpandSecretRefNested withNewNodeExpandSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodeExpandSecretRefNested withNewNodeExpandSecretRefLike(V1SecretReference item); - public V1CSIPersistentVolumeSourceFluent.NodeExpandSecretRefNested editNodeExpandSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodeExpandSecretRefNested editOrNewNodeExpandSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodeExpandSecretRefNested editOrNewNodeExpandSecretRefLike(V1SecretReference item); - - /** - * This method has been deprecated, please use method buildNodePublishSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getNodePublishSecretRef(); - public V1SecretReference buildNodePublishSecretRef(); - public A withNodePublishSecretRef(V1SecretReference nodePublishSecretRef); - public Boolean hasNodePublishSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested withNewNodePublishSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested withNewNodePublishSecretRefLike(V1SecretReference item); - public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested editNodePublishSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested editOrNewNodePublishSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested editOrNewNodePublishSecretRefLike(V1SecretReference item); - - /** - * This method has been deprecated, please use method buildNodeStageSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getNodeStageSecretRef(); - public V1SecretReference buildNodeStageSecretRef(); - public A withNodeStageSecretRef(V1SecretReference nodeStageSecretRef); - public Boolean hasNodeStageSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested withNewNodeStageSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested withNewNodeStageSecretRefLike(V1SecretReference item); - public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested editNodeStageSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested editOrNewNodeStageSecretRef(); - public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested editOrNewNodeStageSecretRefLike(V1SecretReference item); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public A addToVolumeAttributes(String key,String value); - public A addToVolumeAttributes(Map map); - public A removeFromVolumeAttributes(String key); - public A removeFromVolumeAttributes(Map map); - public Map getVolumeAttributes(); - public A withVolumeAttributes(Map volumeAttributes); - public Boolean hasVolumeAttributes(); - public String getVolumeHandle(); - public A withVolumeHandle(String volumeHandle); - public Boolean hasVolumeHandle(); - public A withReadOnly(); - public interface ControllerExpandSecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endControllerExpandSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSIPersistentVolumeSourceFluent> extends BaseFluent{ + public V1CSIPersistentVolumeSourceFluent() { + } + + public V1CSIPersistentVolumeSourceFluent(V1CSIPersistentVolumeSource instance) { + this.copyInstance(instance); + } + private V1SecretReferenceBuilder controllerExpandSecretRef; + private V1SecretReferenceBuilder controllerPublishSecretRef; + private String driver; + private String fsType; + private V1SecretReferenceBuilder nodeExpandSecretRef; + private V1SecretReferenceBuilder nodePublishSecretRef; + private V1SecretReferenceBuilder nodeStageSecretRef; + private Boolean readOnly; + private Map volumeAttributes; + private String volumeHandle; + + protected void copyInstance(V1CSIPersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1CSIPersistentVolumeSource()); + if (instance != null) { + this.withControllerExpandSecretRef(instance.getControllerExpandSecretRef()); + this.withControllerPublishSecretRef(instance.getControllerPublishSecretRef()); + this.withDriver(instance.getDriver()); + this.withFsType(instance.getFsType()); + this.withNodeExpandSecretRef(instance.getNodeExpandSecretRef()); + this.withNodePublishSecretRef(instance.getNodePublishSecretRef()); + this.withNodeStageSecretRef(instance.getNodeStageSecretRef()); + this.withReadOnly(instance.getReadOnly()); + this.withVolumeAttributes(instance.getVolumeAttributes()); + this.withVolumeHandle(instance.getVolumeHandle()); + } + } + + public V1SecretReference buildControllerExpandSecretRef() { + return this.controllerExpandSecretRef != null ? this.controllerExpandSecretRef.build() : null; + } + + public A withControllerExpandSecretRef(V1SecretReference controllerExpandSecretRef) { + this._visitables.remove("controllerExpandSecretRef"); + if (controllerExpandSecretRef != null) { + this.controllerExpandSecretRef = new V1SecretReferenceBuilder(controllerExpandSecretRef); + this._visitables.get("controllerExpandSecretRef").add(this.controllerExpandSecretRef); + } else { + this.controllerExpandSecretRef = null; + this._visitables.get("controllerExpandSecretRef").remove(this.controllerExpandSecretRef); + } + return (A) this; + } + + public boolean hasControllerExpandSecretRef() { + return this.controllerExpandSecretRef != null; + } + + public ControllerExpandSecretRefNested withNewControllerExpandSecretRef() { + return new ControllerExpandSecretRefNested(null); + } + + public ControllerExpandSecretRefNested withNewControllerExpandSecretRefLike(V1SecretReference item) { + return new ControllerExpandSecretRefNested(item); + } + + public ControllerExpandSecretRefNested editControllerExpandSecretRef() { + return withNewControllerExpandSecretRefLike(java.util.Optional.ofNullable(buildControllerExpandSecretRef()).orElse(null)); + } + + public ControllerExpandSecretRefNested editOrNewControllerExpandSecretRef() { + return withNewControllerExpandSecretRefLike(java.util.Optional.ofNullable(buildControllerExpandSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public ControllerExpandSecretRefNested editOrNewControllerExpandSecretRefLike(V1SecretReference item) { + return withNewControllerExpandSecretRefLike(java.util.Optional.ofNullable(buildControllerExpandSecretRef()).orElse(item)); + } + + public V1SecretReference buildControllerPublishSecretRef() { + return this.controllerPublishSecretRef != null ? this.controllerPublishSecretRef.build() : null; + } + + public A withControllerPublishSecretRef(V1SecretReference controllerPublishSecretRef) { + this._visitables.remove("controllerPublishSecretRef"); + if (controllerPublishSecretRef != null) { + this.controllerPublishSecretRef = new V1SecretReferenceBuilder(controllerPublishSecretRef); + this._visitables.get("controllerPublishSecretRef").add(this.controllerPublishSecretRef); + } else { + this.controllerPublishSecretRef = null; + this._visitables.get("controllerPublishSecretRef").remove(this.controllerPublishSecretRef); + } + return (A) this; + } + + public boolean hasControllerPublishSecretRef() { + return this.controllerPublishSecretRef != null; + } + + public ControllerPublishSecretRefNested withNewControllerPublishSecretRef() { + return new ControllerPublishSecretRefNested(null); + } + + public ControllerPublishSecretRefNested withNewControllerPublishSecretRefLike(V1SecretReference item) { + return new ControllerPublishSecretRefNested(item); + } + + public ControllerPublishSecretRefNested editControllerPublishSecretRef() { + return withNewControllerPublishSecretRefLike(java.util.Optional.ofNullable(buildControllerPublishSecretRef()).orElse(null)); + } + + public ControllerPublishSecretRefNested editOrNewControllerPublishSecretRef() { + return withNewControllerPublishSecretRefLike(java.util.Optional.ofNullable(buildControllerPublishSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public ControllerPublishSecretRefNested editOrNewControllerPublishSecretRefLike(V1SecretReference item) { + return withNewControllerPublishSecretRefLike(java.util.Optional.ofNullable(buildControllerPublishSecretRef()).orElse(item)); + } + + public String getDriver() { + return this.driver; + } + + public A withDriver(String driver) { + this.driver = driver; + return (A) this; + } + + public boolean hasDriver() { + return this.driver != null; + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public V1SecretReference buildNodeExpandSecretRef() { + return this.nodeExpandSecretRef != null ? this.nodeExpandSecretRef.build() : null; + } + + public A withNodeExpandSecretRef(V1SecretReference nodeExpandSecretRef) { + this._visitables.remove("nodeExpandSecretRef"); + if (nodeExpandSecretRef != null) { + this.nodeExpandSecretRef = new V1SecretReferenceBuilder(nodeExpandSecretRef); + this._visitables.get("nodeExpandSecretRef").add(this.nodeExpandSecretRef); + } else { + this.nodeExpandSecretRef = null; + this._visitables.get("nodeExpandSecretRef").remove(this.nodeExpandSecretRef); + } + return (A) this; + } + + public boolean hasNodeExpandSecretRef() { + return this.nodeExpandSecretRef != null; + } + + public NodeExpandSecretRefNested withNewNodeExpandSecretRef() { + return new NodeExpandSecretRefNested(null); + } + + public NodeExpandSecretRefNested withNewNodeExpandSecretRefLike(V1SecretReference item) { + return new NodeExpandSecretRefNested(item); + } + + public NodeExpandSecretRefNested editNodeExpandSecretRef() { + return withNewNodeExpandSecretRefLike(java.util.Optional.ofNullable(buildNodeExpandSecretRef()).orElse(null)); + } + + public NodeExpandSecretRefNested editOrNewNodeExpandSecretRef() { + return withNewNodeExpandSecretRefLike(java.util.Optional.ofNullable(buildNodeExpandSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public NodeExpandSecretRefNested editOrNewNodeExpandSecretRefLike(V1SecretReference item) { + return withNewNodeExpandSecretRefLike(java.util.Optional.ofNullable(buildNodeExpandSecretRef()).orElse(item)); + } + + public V1SecretReference buildNodePublishSecretRef() { + return this.nodePublishSecretRef != null ? this.nodePublishSecretRef.build() : null; + } + + public A withNodePublishSecretRef(V1SecretReference nodePublishSecretRef) { + this._visitables.remove("nodePublishSecretRef"); + if (nodePublishSecretRef != null) { + this.nodePublishSecretRef = new V1SecretReferenceBuilder(nodePublishSecretRef); + this._visitables.get("nodePublishSecretRef").add(this.nodePublishSecretRef); + } else { + this.nodePublishSecretRef = null; + this._visitables.get("nodePublishSecretRef").remove(this.nodePublishSecretRef); + } + return (A) this; + } + + public boolean hasNodePublishSecretRef() { + return this.nodePublishSecretRef != null; + } + + public NodePublishSecretRefNested withNewNodePublishSecretRef() { + return new NodePublishSecretRefNested(null); + } + + public NodePublishSecretRefNested withNewNodePublishSecretRefLike(V1SecretReference item) { + return new NodePublishSecretRefNested(item); + } + + public NodePublishSecretRefNested editNodePublishSecretRef() { + return withNewNodePublishSecretRefLike(java.util.Optional.ofNullable(buildNodePublishSecretRef()).orElse(null)); + } + + public NodePublishSecretRefNested editOrNewNodePublishSecretRef() { + return withNewNodePublishSecretRefLike(java.util.Optional.ofNullable(buildNodePublishSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public NodePublishSecretRefNested editOrNewNodePublishSecretRefLike(V1SecretReference item) { + return withNewNodePublishSecretRefLike(java.util.Optional.ofNullable(buildNodePublishSecretRef()).orElse(item)); + } + + public V1SecretReference buildNodeStageSecretRef() { + return this.nodeStageSecretRef != null ? this.nodeStageSecretRef.build() : null; + } + + public A withNodeStageSecretRef(V1SecretReference nodeStageSecretRef) { + this._visitables.remove("nodeStageSecretRef"); + if (nodeStageSecretRef != null) { + this.nodeStageSecretRef = new V1SecretReferenceBuilder(nodeStageSecretRef); + this._visitables.get("nodeStageSecretRef").add(this.nodeStageSecretRef); + } else { + this.nodeStageSecretRef = null; + this._visitables.get("nodeStageSecretRef").remove(this.nodeStageSecretRef); + } + return (A) this; + } + + public boolean hasNodeStageSecretRef() { + return this.nodeStageSecretRef != null; + } + + public NodeStageSecretRefNested withNewNodeStageSecretRef() { + return new NodeStageSecretRefNested(null); + } + + public NodeStageSecretRefNested withNewNodeStageSecretRefLike(V1SecretReference item) { + return new NodeStageSecretRefNested(item); + } + + public NodeStageSecretRefNested editNodeStageSecretRef() { + return withNewNodeStageSecretRefLike(java.util.Optional.ofNullable(buildNodeStageSecretRef()).orElse(null)); + } + + public NodeStageSecretRefNested editOrNewNodeStageSecretRef() { + return withNewNodeStageSecretRefLike(java.util.Optional.ofNullable(buildNodeStageSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public NodeStageSecretRefNested editOrNewNodeStageSecretRefLike(V1SecretReference item) { + return withNewNodeStageSecretRefLike(java.util.Optional.ofNullable(buildNodeStageSecretRef()).orElse(item)); + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public A addToVolumeAttributes(String key,String value) { + if(this.volumeAttributes == null && key != null && value != null) { this.volumeAttributes = new LinkedHashMap(); } + if(key != null && value != null) {this.volumeAttributes.put(key, value);} return (A)this; + } + + public A addToVolumeAttributes(Map map) { + if(this.volumeAttributes == null && map != null) { this.volumeAttributes = new LinkedHashMap(); } + if(map != null) { this.volumeAttributes.putAll(map);} return (A)this; + } + + public A removeFromVolumeAttributes(String key) { + if(this.volumeAttributes == null) { return (A) this; } + if(key != null && this.volumeAttributes != null) {this.volumeAttributes.remove(key);} return (A)this; + } + + public A removeFromVolumeAttributes(Map map) { + if(this.volumeAttributes == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.volumeAttributes != null){this.volumeAttributes.remove(key);}}} return (A)this; } - public interface ControllerPublishSecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endControllerPublishSecretRef(); + + public Map getVolumeAttributes() { + return this.volumeAttributes; + } + + public A withVolumeAttributes(Map volumeAttributes) { + if (volumeAttributes == null) { + this.volumeAttributes = null; + } else { + this.volumeAttributes = new LinkedHashMap(volumeAttributes); + } + return (A) this; + } + + public boolean hasVolumeAttributes() { + return this.volumeAttributes != null; + } + + public String getVolumeHandle() { + return this.volumeHandle; + } + + public A withVolumeHandle(String volumeHandle) { + this.volumeHandle = volumeHandle; + return (A) this; + } + + public boolean hasVolumeHandle() { + return this.volumeHandle != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSIPersistentVolumeSourceFluent that = (V1CSIPersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(controllerExpandSecretRef, that.controllerExpandSecretRef)) return false; + if (!java.util.Objects.equals(controllerPublishSecretRef, that.controllerPublishSecretRef)) return false; + if (!java.util.Objects.equals(driver, that.driver)) return false; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(nodeExpandSecretRef, that.nodeExpandSecretRef)) return false; + if (!java.util.Objects.equals(nodePublishSecretRef, that.nodePublishSecretRef)) return false; + if (!java.util.Objects.equals(nodeStageSecretRef, that.nodeStageSecretRef)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(volumeAttributes, that.volumeAttributes)) return false; + if (!java.util.Objects.equals(volumeHandle, that.volumeHandle)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(controllerExpandSecretRef, controllerPublishSecretRef, driver, fsType, nodeExpandSecretRef, nodePublishSecretRef, nodeStageSecretRef, readOnly, volumeAttributes, volumeHandle, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (controllerExpandSecretRef != null) { sb.append("controllerExpandSecretRef:"); sb.append(controllerExpandSecretRef + ","); } + if (controllerPublishSecretRef != null) { sb.append("controllerPublishSecretRef:"); sb.append(controllerPublishSecretRef + ","); } + if (driver != null) { sb.append("driver:"); sb.append(driver + ","); } + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (nodeExpandSecretRef != null) { sb.append("nodeExpandSecretRef:"); sb.append(nodeExpandSecretRef + ","); } + if (nodePublishSecretRef != null) { sb.append("nodePublishSecretRef:"); sb.append(nodePublishSecretRef + ","); } + if (nodeStageSecretRef != null) { sb.append("nodeStageSecretRef:"); sb.append(nodeStageSecretRef + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (volumeAttributes != null && !volumeAttributes.isEmpty()) { sb.append("volumeAttributes:"); sb.append(volumeAttributes + ","); } + if (volumeHandle != null) { sb.append("volumeHandle:"); sb.append(volumeHandle); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class ControllerExpandSecretRefNested extends V1SecretReferenceFluent> implements Nested{ + ControllerExpandSecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1CSIPersistentVolumeSourceFluent.this.withControllerExpandSecretRef(builder.build()); + } + + public N endControllerExpandSecretRef() { + return and(); + } + } - public interface NodeExpandSecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endNodeExpandSecretRef(); + public class ControllerPublishSecretRefNested extends V1SecretReferenceFluent> implements Nested{ + ControllerPublishSecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1CSIPersistentVolumeSourceFluent.this.withControllerPublishSecretRef(builder.build()); + } + public N endControllerPublishSecretRef() { + return and(); + } + + } - public interface NodePublishSecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endNodePublishSecretRef(); + public class NodeExpandSecretRefNested extends V1SecretReferenceFluent> implements Nested{ + NodeExpandSecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1CSIPersistentVolumeSourceFluent.this.withNodeExpandSecretRef(builder.build()); + } + + public N endNodeExpandSecretRef() { + return and(); + } + } - public interface NodeStageSecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endNodeStageSecretRef(); + public class NodePublishSecretRefNested extends V1SecretReferenceFluent> implements Nested{ + NodePublishSecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1CSIPersistentVolumeSourceFluent.this.withNodePublishSecretRef(builder.build()); + } + + public N endNodePublishSecretRef() { + return and(); + } + } + public class NodeStageSecretRefNested extends V1SecretReferenceFluent> implements Nested{ + NodeStageSecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1CSIPersistentVolumeSourceFluent.this.withNodeStageSecretRef(builder.build()); + } + + public N endNodeStageSecretRef() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceFluentImpl.java deleted file mode 100644 index 9c1d024d51..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIPersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,405 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.util.LinkedHashMap; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSIPersistentVolumeSourceFluentImpl> extends BaseFluent implements V1CSIPersistentVolumeSourceFluent{ - public V1CSIPersistentVolumeSourceFluentImpl() { - } - public V1CSIPersistentVolumeSourceFluentImpl(V1CSIPersistentVolumeSource instance) { - if (instance != null) { - this.withControllerExpandSecretRef(instance.getControllerExpandSecretRef()); - this.withControllerPublishSecretRef(instance.getControllerPublishSecretRef()); - this.withDriver(instance.getDriver()); - this.withFsType(instance.getFsType()); - this.withNodeExpandSecretRef(instance.getNodeExpandSecretRef()); - this.withNodePublishSecretRef(instance.getNodePublishSecretRef()); - this.withNodeStageSecretRef(instance.getNodeStageSecretRef()); - this.withReadOnly(instance.getReadOnly()); - this.withVolumeAttributes(instance.getVolumeAttributes()); - this.withVolumeHandle(instance.getVolumeHandle()); - } - } - private V1SecretReferenceBuilder controllerExpandSecretRef; - private V1SecretReferenceBuilder controllerPublishSecretRef; - private String driver; - private String fsType; - private V1SecretReferenceBuilder nodeExpandSecretRef; - private V1SecretReferenceBuilder nodePublishSecretRef; - private V1SecretReferenceBuilder nodeStageSecretRef; - private Boolean readOnly; - private Map volumeAttributes; - private String volumeHandle; - - /** - * This method has been deprecated, please use method buildControllerExpandSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getControllerExpandSecretRef() { - return this.controllerExpandSecretRef!=null ?this.controllerExpandSecretRef.build():null; - } - public V1SecretReference buildControllerExpandSecretRef() { - return this.controllerExpandSecretRef!=null ?this.controllerExpandSecretRef.build():null; - } - public A withControllerExpandSecretRef(V1SecretReference controllerExpandSecretRef) { - _visitables.get("controllerExpandSecretRef").remove(this.controllerExpandSecretRef); - if (controllerExpandSecretRef!=null){ this.controllerExpandSecretRef= new V1SecretReferenceBuilder(controllerExpandSecretRef); _visitables.get("controllerExpandSecretRef").add(this.controllerExpandSecretRef);} else { this.controllerExpandSecretRef = null; _visitables.get("controllerExpandSecretRef").remove(this.controllerExpandSecretRef); } return (A) this; - } - public Boolean hasControllerExpandSecretRef() { - return this.controllerExpandSecretRef != null; - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerExpandSecretRefNested withNewControllerExpandSecretRef() { - return new V1CSIPersistentVolumeSourceFluentImpl.ControllerExpandSecretRefNestedImpl(); - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerExpandSecretRefNested withNewControllerExpandSecretRefLike(V1SecretReference item) { - return new V1CSIPersistentVolumeSourceFluentImpl.ControllerExpandSecretRefNestedImpl(item); - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerExpandSecretRefNested editControllerExpandSecretRef() { - return withNewControllerExpandSecretRefLike(getControllerExpandSecretRef()); - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerExpandSecretRefNested editOrNewControllerExpandSecretRef() { - return withNewControllerExpandSecretRefLike(getControllerExpandSecretRef() != null ? getControllerExpandSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerExpandSecretRefNested editOrNewControllerExpandSecretRefLike(V1SecretReference item) { - return withNewControllerExpandSecretRefLike(getControllerExpandSecretRef() != null ? getControllerExpandSecretRef(): item); - } - - /** - * This method has been deprecated, please use method buildControllerPublishSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getControllerPublishSecretRef() { - return this.controllerPublishSecretRef!=null ?this.controllerPublishSecretRef.build():null; - } - public V1SecretReference buildControllerPublishSecretRef() { - return this.controllerPublishSecretRef!=null ?this.controllerPublishSecretRef.build():null; - } - public A withControllerPublishSecretRef(V1SecretReference controllerPublishSecretRef) { - _visitables.get("controllerPublishSecretRef").remove(this.controllerPublishSecretRef); - if (controllerPublishSecretRef!=null){ this.controllerPublishSecretRef= new V1SecretReferenceBuilder(controllerPublishSecretRef); _visitables.get("controllerPublishSecretRef").add(this.controllerPublishSecretRef);} else { this.controllerPublishSecretRef = null; _visitables.get("controllerPublishSecretRef").remove(this.controllerPublishSecretRef); } return (A) this; - } - public Boolean hasControllerPublishSecretRef() { - return this.controllerPublishSecretRef != null; - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerPublishSecretRefNested withNewControllerPublishSecretRef() { - return new V1CSIPersistentVolumeSourceFluentImpl.ControllerPublishSecretRefNestedImpl(); - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerPublishSecretRefNested withNewControllerPublishSecretRefLike(V1SecretReference item) { - return new V1CSIPersistentVolumeSourceFluentImpl.ControllerPublishSecretRefNestedImpl(item); - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerPublishSecretRefNested editControllerPublishSecretRef() { - return withNewControllerPublishSecretRefLike(getControllerPublishSecretRef()); - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerPublishSecretRefNested editOrNewControllerPublishSecretRef() { - return withNewControllerPublishSecretRefLike(getControllerPublishSecretRef() != null ? getControllerPublishSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1CSIPersistentVolumeSourceFluentImpl.ControllerPublishSecretRefNested editOrNewControllerPublishSecretRefLike(V1SecretReference item) { - return withNewControllerPublishSecretRefLike(getControllerPublishSecretRef() != null ? getControllerPublishSecretRef(): item); - } - public String getDriver() { - return this.driver; - } - public A withDriver(String driver) { - this.driver=driver; return (A) this; - } - public Boolean hasDriver() { - return this.driver != null; - } - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - - /** - * This method has been deprecated, please use method buildNodeExpandSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getNodeExpandSecretRef() { - return this.nodeExpandSecretRef!=null ?this.nodeExpandSecretRef.build():null; - } - public V1SecretReference buildNodeExpandSecretRef() { - return this.nodeExpandSecretRef!=null ?this.nodeExpandSecretRef.build():null; - } - public A withNodeExpandSecretRef(V1SecretReference nodeExpandSecretRef) { - _visitables.get("nodeExpandSecretRef").remove(this.nodeExpandSecretRef); - if (nodeExpandSecretRef!=null){ this.nodeExpandSecretRef= new V1SecretReferenceBuilder(nodeExpandSecretRef); _visitables.get("nodeExpandSecretRef").add(this.nodeExpandSecretRef);} else { this.nodeExpandSecretRef = null; _visitables.get("nodeExpandSecretRef").remove(this.nodeExpandSecretRef); } return (A) this; - } - public Boolean hasNodeExpandSecretRef() { - return this.nodeExpandSecretRef != null; - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeExpandSecretRefNested withNewNodeExpandSecretRef() { - return new V1CSIPersistentVolumeSourceFluentImpl.NodeExpandSecretRefNestedImpl(); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeExpandSecretRefNested withNewNodeExpandSecretRefLike(V1SecretReference item) { - return new V1CSIPersistentVolumeSourceFluentImpl.NodeExpandSecretRefNestedImpl(item); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeExpandSecretRefNested editNodeExpandSecretRef() { - return withNewNodeExpandSecretRefLike(getNodeExpandSecretRef()); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeExpandSecretRefNested editOrNewNodeExpandSecretRef() { - return withNewNodeExpandSecretRefLike(getNodeExpandSecretRef() != null ? getNodeExpandSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeExpandSecretRefNested editOrNewNodeExpandSecretRefLike(V1SecretReference item) { - return withNewNodeExpandSecretRefLike(getNodeExpandSecretRef() != null ? getNodeExpandSecretRef(): item); - } - - /** - * This method has been deprecated, please use method buildNodePublishSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getNodePublishSecretRef() { - return this.nodePublishSecretRef!=null ?this.nodePublishSecretRef.build():null; - } - public V1SecretReference buildNodePublishSecretRef() { - return this.nodePublishSecretRef!=null ?this.nodePublishSecretRef.build():null; - } - public A withNodePublishSecretRef(V1SecretReference nodePublishSecretRef) { - _visitables.get("nodePublishSecretRef").remove(this.nodePublishSecretRef); - if (nodePublishSecretRef!=null){ this.nodePublishSecretRef= new V1SecretReferenceBuilder(nodePublishSecretRef); _visitables.get("nodePublishSecretRef").add(this.nodePublishSecretRef);} else { this.nodePublishSecretRef = null; _visitables.get("nodePublishSecretRef").remove(this.nodePublishSecretRef); } return (A) this; - } - public Boolean hasNodePublishSecretRef() { - return this.nodePublishSecretRef != null; - } - public V1CSIPersistentVolumeSourceFluentImpl.NodePublishSecretRefNested withNewNodePublishSecretRef() { - return new V1CSIPersistentVolumeSourceFluentImpl.NodePublishSecretRefNestedImpl(); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodePublishSecretRefNested withNewNodePublishSecretRefLike(V1SecretReference item) { - return new V1CSIPersistentVolumeSourceFluentImpl.NodePublishSecretRefNestedImpl(item); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodePublishSecretRefNested editNodePublishSecretRef() { - return withNewNodePublishSecretRefLike(getNodePublishSecretRef()); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodePublishSecretRefNested editOrNewNodePublishSecretRef() { - return withNewNodePublishSecretRefLike(getNodePublishSecretRef() != null ? getNodePublishSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodePublishSecretRefNested editOrNewNodePublishSecretRefLike(V1SecretReference item) { - return withNewNodePublishSecretRefLike(getNodePublishSecretRef() != null ? getNodePublishSecretRef(): item); - } - - /** - * This method has been deprecated, please use method buildNodeStageSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getNodeStageSecretRef() { - return this.nodeStageSecretRef!=null ?this.nodeStageSecretRef.build():null; - } - public V1SecretReference buildNodeStageSecretRef() { - return this.nodeStageSecretRef!=null ?this.nodeStageSecretRef.build():null; - } - public A withNodeStageSecretRef(V1SecretReference nodeStageSecretRef) { - _visitables.get("nodeStageSecretRef").remove(this.nodeStageSecretRef); - if (nodeStageSecretRef!=null){ this.nodeStageSecretRef= new V1SecretReferenceBuilder(nodeStageSecretRef); _visitables.get("nodeStageSecretRef").add(this.nodeStageSecretRef);} else { this.nodeStageSecretRef = null; _visitables.get("nodeStageSecretRef").remove(this.nodeStageSecretRef); } return (A) this; - } - public Boolean hasNodeStageSecretRef() { - return this.nodeStageSecretRef != null; - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeStageSecretRefNested withNewNodeStageSecretRef() { - return new V1CSIPersistentVolumeSourceFluentImpl.NodeStageSecretRefNestedImpl(); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeStageSecretRefNested withNewNodeStageSecretRefLike(V1SecretReference item) { - return new V1CSIPersistentVolumeSourceFluentImpl.NodeStageSecretRefNestedImpl(item); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeStageSecretRefNested editNodeStageSecretRef() { - return withNewNodeStageSecretRefLike(getNodeStageSecretRef()); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeStageSecretRefNested editOrNewNodeStageSecretRef() { - return withNewNodeStageSecretRefLike(getNodeStageSecretRef() != null ? getNodeStageSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1CSIPersistentVolumeSourceFluentImpl.NodeStageSecretRefNested editOrNewNodeStageSecretRefLike(V1SecretReference item) { - return withNewNodeStageSecretRefLike(getNodeStageSecretRef() != null ? getNodeStageSecretRef(): item); - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public A addToVolumeAttributes(String key,String value) { - if(this.volumeAttributes == null && key != null && value != null) { this.volumeAttributes = new LinkedHashMap(); } - if(key != null && value != null) {this.volumeAttributes.put(key, value);} return (A)this; - } - public A addToVolumeAttributes(Map map) { - if(this.volumeAttributes == null && map != null) { this.volumeAttributes = new LinkedHashMap(); } - if(map != null) { this.volumeAttributes.putAll(map);} return (A)this; - } - public A removeFromVolumeAttributes(String key) { - if(this.volumeAttributes == null) { return (A) this; } - if(key != null && this.volumeAttributes != null) {this.volumeAttributes.remove(key);} return (A)this; - } - public A removeFromVolumeAttributes(Map map) { - if(this.volumeAttributes == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.volumeAttributes != null){this.volumeAttributes.remove(key);}}} return (A)this; - } - public Map getVolumeAttributes() { - return this.volumeAttributes; - } - public A withVolumeAttributes(Map volumeAttributes) { - if (volumeAttributes == null) { this.volumeAttributes = null;} else {this.volumeAttributes = new LinkedHashMap(volumeAttributes);} return (A) this; - } - public Boolean hasVolumeAttributes() { - return this.volumeAttributes != null; - } - public String getVolumeHandle() { - return this.volumeHandle; - } - public A withVolumeHandle(String volumeHandle) { - this.volumeHandle=volumeHandle; return (A) this; - } - public Boolean hasVolumeHandle() { - return this.volumeHandle != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSIPersistentVolumeSourceFluentImpl that = (V1CSIPersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(controllerExpandSecretRef, that.controllerExpandSecretRef)) return false; - - if (!java.util.Objects.equals(controllerPublishSecretRef, that.controllerPublishSecretRef)) return false; - - if (!java.util.Objects.equals(driver, that.driver)) return false; - - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(nodeExpandSecretRef, that.nodeExpandSecretRef)) return false; - - if (!java.util.Objects.equals(nodePublishSecretRef, that.nodePublishSecretRef)) return false; - - if (!java.util.Objects.equals(nodeStageSecretRef, that.nodeStageSecretRef)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(volumeAttributes, that.volumeAttributes)) return false; - - if (!java.util.Objects.equals(volumeHandle, that.volumeHandle)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(controllerExpandSecretRef, controllerPublishSecretRef, driver, fsType, nodeExpandSecretRef, nodePublishSecretRef, nodeStageSecretRef, readOnly, volumeAttributes, volumeHandle, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (controllerExpandSecretRef != null) { sb.append("controllerExpandSecretRef:"); sb.append(controllerExpandSecretRef + ","); } - if (controllerPublishSecretRef != null) { sb.append("controllerPublishSecretRef:"); sb.append(controllerPublishSecretRef + ","); } - if (driver != null) { sb.append("driver:"); sb.append(driver + ","); } - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (nodeExpandSecretRef != null) { sb.append("nodeExpandSecretRef:"); sb.append(nodeExpandSecretRef + ","); } - if (nodePublishSecretRef != null) { sb.append("nodePublishSecretRef:"); sb.append(nodePublishSecretRef + ","); } - if (nodeStageSecretRef != null) { sb.append("nodeStageSecretRef:"); sb.append(nodeStageSecretRef + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (volumeAttributes != null && !volumeAttributes.isEmpty()) { sb.append("volumeAttributes:"); sb.append(volumeAttributes + ","); } - if (volumeHandle != null) { sb.append("volumeHandle:"); sb.append(volumeHandle); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class ControllerExpandSecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CSIPersistentVolumeSourceFluentImpl.ControllerExpandSecretRefNested,Nested{ - ControllerExpandSecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - ControllerExpandSecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1CSIPersistentVolumeSourceFluentImpl.this.withControllerExpandSecretRef(builder.build()); - } - public N endControllerExpandSecretRef() { - return and(); - } - - } - class ControllerPublishSecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CSIPersistentVolumeSourceFluentImpl.ControllerPublishSecretRefNested,Nested{ - ControllerPublishSecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - ControllerPublishSecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1CSIPersistentVolumeSourceFluentImpl.this.withControllerPublishSecretRef(builder.build()); - } - public N endControllerPublishSecretRef() { - return and(); - } - - } - class NodeExpandSecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CSIPersistentVolumeSourceFluentImpl.NodeExpandSecretRefNested,Nested{ - NodeExpandSecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - NodeExpandSecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1CSIPersistentVolumeSourceFluentImpl.this.withNodeExpandSecretRef(builder.build()); - } - public N endNodeExpandSecretRef() { - return and(); - } - - } - class NodePublishSecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CSIPersistentVolumeSourceFluentImpl.NodePublishSecretRefNested,Nested{ - NodePublishSecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - NodePublishSecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1CSIPersistentVolumeSourceFluentImpl.this.withNodePublishSecretRef(builder.build()); - } - public N endNodePublishSecretRef() { - return and(); - } - - } - class NodeStageSecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CSIPersistentVolumeSourceFluentImpl.NodeStageSecretRefNested,Nested{ - NodeStageSecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - NodeStageSecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1CSIPersistentVolumeSourceFluentImpl.this.withNodeStageSecretRef(builder.build()); - } - public N endNodeStageSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityBuilder.java index 87b9f9cc1b..868663f6aa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityBuilder.java @@ -1,64 +1,37 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSIStorageCapacityBuilder extends V1CSIStorageCapacityFluentImpl implements VisitableBuilder{ +public class V1CSIStorageCapacityBuilder extends V1CSIStorageCapacityFluent implements VisitableBuilder{ public V1CSIStorageCapacityBuilder() { - this(false); - } - public V1CSIStorageCapacityBuilder(Boolean validationEnabled) { - this(new V1CSIStorageCapacity(), validationEnabled); + this(new V1CSIStorageCapacity()); } + public V1CSIStorageCapacityBuilder(V1CSIStorageCapacityFluent fluent) { - this(fluent, false); - } - public V1CSIStorageCapacityBuilder(V1CSIStorageCapacityFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSIStorageCapacity(), validationEnabled); + this(fluent, new V1CSIStorageCapacity()); } + public V1CSIStorageCapacityBuilder(V1CSIStorageCapacityFluent fluent,V1CSIStorageCapacity instance) { - this(fluent, instance, false); - } - public V1CSIStorageCapacityBuilder(V1CSIStorageCapacityFluent fluent,V1CSIStorageCapacity instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withCapacity(instance.getCapacity()); - fluent.withKind(instance.getKind()); - fluent.withMaximumVolumeSize(instance.getMaximumVolumeSize()); - fluent.withMetadata(instance.getMetadata()); - fluent.withNodeTopology(instance.getNodeTopology()); - fluent.withStorageClassName(instance.getStorageClassName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSIStorageCapacityBuilder(V1CSIStorageCapacity instance) { - this(instance,false); - } - public V1CSIStorageCapacityBuilder(V1CSIStorageCapacity instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withCapacity(instance.getCapacity()); - this.withKind(instance.getKind()); - this.withMaximumVolumeSize(instance.getMaximumVolumeSize()); - this.withMetadata(instance.getMetadata()); - this.withNodeTopology(instance.getNodeTopology()); - this.withStorageClassName(instance.getStorageClassName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSIStorageCapacityFluent fluent; - Boolean validationEnabled; + public V1CSIStorageCapacity build() { V1CSIStorageCapacity buildable = new V1CSIStorageCapacity(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setCapacity(fluent.getCapacity()); buildable.setKind(fluent.getKind()); buildable.setMaximumVolumeSize(fluent.getMaximumVolumeSize()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setNodeTopology(fluent.getNodeTopology()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setNodeTopology(fluent.buildNodeTopology()); buildable.setStorageClassName(fluent.getStorageClassName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityFluent.java index ac175f1b88..5ea78d6e7a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityFluent.java @@ -1,73 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import io.kubernetes.client.custom.Quantity; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1CSIStorageCapacityFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public Quantity getCapacity(); - public A withCapacity(Quantity capacity); - public Boolean hasCapacity(); - public A withNewCapacity(String value); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public Quantity getMaximumVolumeSize(); - public A withMaximumVolumeSize(Quantity maximumVolumeSize); - public Boolean hasMaximumVolumeSize(); - public A withNewMaximumVolumeSize(String value); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1CSIStorageCapacityFluent.MetadataNested withNewMetadata(); - public V1CSIStorageCapacityFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1CSIStorageCapacityFluent.MetadataNested editMetadata(); - public V1CSIStorageCapacityFluent.MetadataNested editOrNewMetadata(); - public V1CSIStorageCapacityFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildNodeTopology instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getNodeTopology(); - public V1LabelSelector buildNodeTopology(); - public A withNodeTopology(V1LabelSelector nodeTopology); - public Boolean hasNodeTopology(); - public V1CSIStorageCapacityFluent.NodeTopologyNested withNewNodeTopology(); - public V1CSIStorageCapacityFluent.NodeTopologyNested withNewNodeTopologyLike(V1LabelSelector item); - public V1CSIStorageCapacityFluent.NodeTopologyNested editNodeTopology(); - public V1CSIStorageCapacityFluent.NodeTopologyNested editOrNewNodeTopology(); - public V1CSIStorageCapacityFluent.NodeTopologyNested editOrNewNodeTopologyLike(V1LabelSelector item); - public String getStorageClassName(); - public A withStorageClassName(String storageClassName); - public Boolean hasStorageClassName(); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSIStorageCapacityFluent> extends BaseFluent{ + public V1CSIStorageCapacityFluent() { + } + + public V1CSIStorageCapacityFluent(V1CSIStorageCapacity instance) { + this.copyInstance(instance); + } + private String apiVersion; + private Quantity capacity; + private String kind; + private Quantity maximumVolumeSize; + private V1ObjectMetaBuilder metadata; + private V1LabelSelectorBuilder nodeTopology; + private String storageClassName; + + protected void copyInstance(V1CSIStorageCapacity instance) { + instance = (instance != null ? instance : new V1CSIStorageCapacity()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withCapacity(instance.getCapacity()); + this.withKind(instance.getKind()); + this.withMaximumVolumeSize(instance.getMaximumVolumeSize()); + this.withMetadata(instance.getMetadata()); + this.withNodeTopology(instance.getNodeTopology()); + this.withStorageClassName(instance.getStorageClassName()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public Quantity getCapacity() { + return this.capacity; + } + + public A withCapacity(Quantity capacity) { + this.capacity = capacity; + return (A) this; + } + + public boolean hasCapacity() { + return this.capacity != null; + } + + public A withNewCapacity(String value) { + return (A)withCapacity(new Quantity(value)); + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public Quantity getMaximumVolumeSize() { + return this.maximumVolumeSize; + } + + public A withMaximumVolumeSize(Quantity maximumVolumeSize) { + this.maximumVolumeSize = maximumVolumeSize; + return (A) this; + } + + public boolean hasMaximumVolumeSize() { + return this.maximumVolumeSize != null; + } + + public A withNewMaximumVolumeSize(String value) { + return (A)withMaximumVolumeSize(new Quantity(value)); + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); } - public interface NodeTopologyNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endNodeTopology(); + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1LabelSelector buildNodeTopology() { + return this.nodeTopology != null ? this.nodeTopology.build() : null; + } + + public A withNodeTopology(V1LabelSelector nodeTopology) { + this._visitables.remove("nodeTopology"); + if (nodeTopology != null) { + this.nodeTopology = new V1LabelSelectorBuilder(nodeTopology); + this._visitables.get("nodeTopology").add(this.nodeTopology); + } else { + this.nodeTopology = null; + this._visitables.get("nodeTopology").remove(this.nodeTopology); + } + return (A) this; + } + + public boolean hasNodeTopology() { + return this.nodeTopology != null; + } + + public NodeTopologyNested withNewNodeTopology() { + return new NodeTopologyNested(null); + } + + public NodeTopologyNested withNewNodeTopologyLike(V1LabelSelector item) { + return new NodeTopologyNested(item); + } + + public NodeTopologyNested editNodeTopology() { + return withNewNodeTopologyLike(java.util.Optional.ofNullable(buildNodeTopology()).orElse(null)); + } + + public NodeTopologyNested editOrNewNodeTopology() { + return withNewNodeTopologyLike(java.util.Optional.ofNullable(buildNodeTopology()).orElse(new V1LabelSelectorBuilder().build())); + } + + public NodeTopologyNested editOrNewNodeTopologyLike(V1LabelSelector item) { + return withNewNodeTopologyLike(java.util.Optional.ofNullable(buildNodeTopology()).orElse(item)); + } + + public String getStorageClassName() { + return this.storageClassName; + } + + public A withStorageClassName(String storageClassName) { + this.storageClassName = storageClassName; + return (A) this; + } + + public boolean hasStorageClassName() { + return this.storageClassName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSIStorageCapacityFluent that = (V1CSIStorageCapacityFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(capacity, that.capacity)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(maximumVolumeSize, that.maximumVolumeSize)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(nodeTopology, that.nodeTopology)) return false; + if (!java.util.Objects.equals(storageClassName, that.storageClassName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, capacity, kind, maximumVolumeSize, metadata, nodeTopology, storageClassName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (capacity != null) { sb.append("capacity:"); sb.append(capacity + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (maximumVolumeSize != null) { sb.append("maximumVolumeSize:"); sb.append(maximumVolumeSize + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (nodeTopology != null) { sb.append("nodeTopology:"); sb.append(nodeTopology + ","); } + if (storageClassName != null) { sb.append("storageClassName:"); sb.append(storageClassName); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1CSIStorageCapacityFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class NodeTopologyNested extends V1LabelSelectorFluent> implements Nested{ + NodeTopologyNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1CSIStorageCapacityFluent.this.withNodeTopology(builder.build()); + } + + public N endNodeTopology() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityFluentImpl.java deleted file mode 100644 index 1bf997c92a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityFluentImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import io.kubernetes.client.custom.Quantity; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSIStorageCapacityFluentImpl> extends BaseFluent implements V1CSIStorageCapacityFluent{ - public V1CSIStorageCapacityFluentImpl() { - } - public V1CSIStorageCapacityFluentImpl(V1CSIStorageCapacity instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withCapacity(instance.getCapacity()); - this.withKind(instance.getKind()); - this.withMaximumVolumeSize(instance.getMaximumVolumeSize()); - this.withMetadata(instance.getMetadata()); - this.withNodeTopology(instance.getNodeTopology()); - this.withStorageClassName(instance.getStorageClassName()); - } - } - private String apiVersion; - private Quantity capacity; - private String kind; - private Quantity maximumVolumeSize; - private V1ObjectMetaBuilder metadata; - private V1LabelSelectorBuilder nodeTopology; - private String storageClassName; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public Quantity getCapacity() { - return this.capacity; - } - public A withCapacity(Quantity capacity) { - this.capacity=capacity; return (A) this; - } - public Boolean hasCapacity() { - return this.capacity != null; - } - public A withNewCapacity(String value) { - return (A)withCapacity(new Quantity(value)); - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public Quantity getMaximumVolumeSize() { - return this.maximumVolumeSize; - } - public A withMaximumVolumeSize(Quantity maximumVolumeSize) { - this.maximumVolumeSize=maximumVolumeSize; return (A) this; - } - public Boolean hasMaximumVolumeSize() { - return this.maximumVolumeSize != null; - } - public A withNewMaximumVolumeSize(String value) { - return (A)withMaximumVolumeSize(new Quantity(value)); - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1CSIStorageCapacityFluentImpl.MetadataNested withNewMetadata() { - return new V1CSIStorageCapacityFluentImpl.MetadataNestedImpl(); - } - public V1CSIStorageCapacityFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1CSIStorageCapacityFluentImpl.MetadataNestedImpl(item); - } - public V1CSIStorageCapacityFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CSIStorageCapacityFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1CSIStorageCapacityFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildNodeTopology instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getNodeTopology() { - return this.nodeTopology!=null ?this.nodeTopology.build():null; - } - public V1LabelSelector buildNodeTopology() { - return this.nodeTopology!=null ?this.nodeTopology.build():null; - } - public A withNodeTopology(V1LabelSelector nodeTopology) { - _visitables.get("nodeTopology").remove(this.nodeTopology); - if (nodeTopology!=null){ this.nodeTopology= new V1LabelSelectorBuilder(nodeTopology); _visitables.get("nodeTopology").add(this.nodeTopology);} else { this.nodeTopology = null; _visitables.get("nodeTopology").remove(this.nodeTopology); } return (A) this; - } - public Boolean hasNodeTopology() { - return this.nodeTopology != null; - } - public V1CSIStorageCapacityFluentImpl.NodeTopologyNested withNewNodeTopology() { - return new V1CSIStorageCapacityFluentImpl.NodeTopologyNestedImpl(); - } - public V1CSIStorageCapacityFluentImpl.NodeTopologyNested withNewNodeTopologyLike(V1LabelSelector item) { - return new V1CSIStorageCapacityFluentImpl.NodeTopologyNestedImpl(item); - } - public V1CSIStorageCapacityFluentImpl.NodeTopologyNested editNodeTopology() { - return withNewNodeTopologyLike(getNodeTopology()); - } - public V1CSIStorageCapacityFluentImpl.NodeTopologyNested editOrNewNodeTopology() { - return withNewNodeTopologyLike(getNodeTopology() != null ? getNodeTopology(): new V1LabelSelectorBuilder().build()); - } - public V1CSIStorageCapacityFluentImpl.NodeTopologyNested editOrNewNodeTopologyLike(V1LabelSelector item) { - return withNewNodeTopologyLike(getNodeTopology() != null ? getNodeTopology(): item); - } - public String getStorageClassName() { - return this.storageClassName; - } - public A withStorageClassName(String storageClassName) { - this.storageClassName=storageClassName; return (A) this; - } - public Boolean hasStorageClassName() { - return this.storageClassName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSIStorageCapacityFluentImpl that = (V1CSIStorageCapacityFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(capacity, that.capacity)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(maximumVolumeSize, that.maximumVolumeSize)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(nodeTopology, that.nodeTopology)) return false; - - if (!java.util.Objects.equals(storageClassName, that.storageClassName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, capacity, kind, maximumVolumeSize, metadata, nodeTopology, storageClassName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (capacity != null) { sb.append("capacity:"); sb.append(capacity + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (maximumVolumeSize != null) { sb.append("maximumVolumeSize:"); sb.append(maximumVolumeSize + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (nodeTopology != null) { sb.append("nodeTopology:"); sb.append(nodeTopology + ","); } - if (storageClassName != null) { sb.append("storageClassName:"); sb.append(storageClassName); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1CSIStorageCapacityFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1CSIStorageCapacityFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class NodeTopologyNestedImpl extends V1LabelSelectorFluentImpl> implements V1CSIStorageCapacityFluentImpl.NodeTopologyNested,Nested{ - NodeTopologyNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - NodeTopologyNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1CSIStorageCapacityFluentImpl.this.withNodeTopology(builder.build()); - } - public N endNodeTopology() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListBuilder.java index 78813a12cc..d160837dcc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSIStorageCapacityListBuilder extends V1CSIStorageCapacityListFluentImpl implements VisitableBuilder{ +public class V1CSIStorageCapacityListBuilder extends V1CSIStorageCapacityListFluent implements VisitableBuilder{ public V1CSIStorageCapacityListBuilder() { - this(false); - } - public V1CSIStorageCapacityListBuilder(Boolean validationEnabled) { - this(new V1CSIStorageCapacityList(), validationEnabled); + this(new V1CSIStorageCapacityList()); } + public V1CSIStorageCapacityListBuilder(V1CSIStorageCapacityListFluent fluent) { - this(fluent, false); - } - public V1CSIStorageCapacityListBuilder(V1CSIStorageCapacityListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSIStorageCapacityList(), validationEnabled); + this(fluent, new V1CSIStorageCapacityList()); } + public V1CSIStorageCapacityListBuilder(V1CSIStorageCapacityListFluent fluent,V1CSIStorageCapacityList instance) { - this(fluent, instance, false); - } - public V1CSIStorageCapacityListBuilder(V1CSIStorageCapacityListFluent fluent,V1CSIStorageCapacityList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSIStorageCapacityListBuilder(V1CSIStorageCapacityList instance) { - this(instance,false); - } - public V1CSIStorageCapacityListBuilder(V1CSIStorageCapacityList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSIStorageCapacityListFluent fluent; - Boolean validationEnabled; + public V1CSIStorageCapacityList build() { V1CSIStorageCapacityList buildable = new V1CSIStorageCapacityList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListFluent.java index 8a726d646c..4c8bdb074f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CSIStorageCapacityListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1CSIStorageCapacity item); - public A setToItems(int index,V1CSIStorageCapacity item); - public A addToItems(io.kubernetes.client.openapi.models.V1CSIStorageCapacity... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1CSIStorageCapacity... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1CSIStorageCapacity buildItem(int index); - public V1CSIStorageCapacity buildFirstItem(); - public V1CSIStorageCapacity buildLastItem(); - public V1CSIStorageCapacity buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1CSIStorageCapacity... items); - public Boolean hasItems(); - public V1CSIStorageCapacityListFluent.ItemsNested addNewItem(); - public V1CSIStorageCapacityListFluent.ItemsNested addNewItemLike(V1CSIStorageCapacity item); - public V1CSIStorageCapacityListFluent.ItemsNested setNewItemLike(int index,V1CSIStorageCapacity item); - public V1CSIStorageCapacityListFluent.ItemsNested editItem(int index); - public V1CSIStorageCapacityListFluent.ItemsNested editFirstItem(); - public V1CSIStorageCapacityListFluent.ItemsNested editLastItem(); - public V1CSIStorageCapacityListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1CSIStorageCapacityListFluent.MetadataNested withNewMetadata(); - public V1CSIStorageCapacityListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1CSIStorageCapacityListFluent.MetadataNested editMetadata(); - public V1CSIStorageCapacityListFluent.MetadataNested editOrNewMetadata(); - public V1CSIStorageCapacityListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1CSIStorageCapacityFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSIStorageCapacityListFluent> extends BaseFluent{ + public V1CSIStorageCapacityListFluent() { + } + + public V1CSIStorageCapacityListFluent(V1CSIStorageCapacityList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1CSIStorageCapacityList instance) { + instance = (instance != null ? instance : new V1CSIStorageCapacityList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1CSIStorageCapacity item) { + if (this.items == null) {this.items = new ArrayList();} + V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1CSIStorageCapacity item) { + if (this.items == null) {this.items = new ArrayList();} + V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1CSIStorageCapacity... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CSIStorageCapacity item : items) {V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CSIStorageCapacity item : items) {V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1CSIStorageCapacity... items) { + if (this.items == null) return (A)this; + for (V1CSIStorageCapacity item : items) {V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1CSIStorageCapacity item : items) {V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1CSIStorageCapacityBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1CSIStorageCapacity buildItem(int index) { + return this.items.get(index).build(); + } + + public V1CSIStorageCapacity buildFirstItem() { + return this.items.get(0).build(); + } + + public V1CSIStorageCapacity buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1CSIStorageCapacity buildMatchingItem(Predicate predicate) { + for (V1CSIStorageCapacityBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1CSIStorageCapacityBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1CSIStorageCapacity item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1CSIStorageCapacity... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1CSIStorageCapacity item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1CSIStorageCapacity item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1CSIStorageCapacity item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSIStorageCapacityListFluent that = (V1CSIStorageCapacityListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1CSIStorageCapacityFluent> implements Nested{ + ItemsNested(int index,V1CSIStorageCapacity item) { + this.index = index; + this.builder = new V1CSIStorageCapacityBuilder(this, item); + } + V1CSIStorageCapacityBuilder builder; + int index; + public N and() { + return (N) V1CSIStorageCapacityListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1CSIStorageCapacityListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListFluentImpl.java deleted file mode 100644 index 63a7a76f47..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIStorageCapacityListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSIStorageCapacityListFluentImpl> extends BaseFluent implements V1CSIStorageCapacityListFluent{ - public V1CSIStorageCapacityListFluentImpl() { - } - public V1CSIStorageCapacityListFluentImpl(V1CSIStorageCapacityList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1CSIStorageCapacity item) { - if (this.items == null) {this.items = new ArrayList();} - V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1CSIStorageCapacity item) { - if (this.items == null) {this.items = new ArrayList();} - V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1CSIStorageCapacity... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CSIStorageCapacity item : items) {V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CSIStorageCapacity item : items) {V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1CSIStorageCapacity... items) { - for (V1CSIStorageCapacity item : items) {V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1CSIStorageCapacity item : items) {V1CSIStorageCapacityBuilder builder = new V1CSIStorageCapacityBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1CSIStorageCapacityBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1CSIStorageCapacity buildItem(int index) { - return this.items.get(index).build(); - } - public V1CSIStorageCapacity buildFirstItem() { - return this.items.get(0).build(); - } - public V1CSIStorageCapacity buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1CSIStorageCapacity buildMatchingItem(Predicate predicate) { - for (V1CSIStorageCapacityBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1CSIStorageCapacityBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1CSIStorageCapacity item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1CSIStorageCapacity... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1CSIStorageCapacity item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1CSIStorageCapacityListFluentImpl.ItemsNested addNewItem() { - return new V1CSIStorageCapacityListFluentImpl.ItemsNestedImpl(); - } - public V1CSIStorageCapacityListFluentImpl.ItemsNested addNewItemLike(V1CSIStorageCapacity item) { - return new V1CSIStorageCapacityListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1CSIStorageCapacityListFluentImpl.ItemsNested setNewItemLike(int index,V1CSIStorageCapacity item) { - return new V1CSIStorageCapacityListFluentImpl.ItemsNestedImpl(index, item); - } - public V1CSIStorageCapacityListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1CSIStorageCapacityListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1CSIStorageCapacityListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1CSIStorageCapacityListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1CSIStorageCapacityListFluentImpl.MetadataNestedImpl(); - } - public V1CSIStorageCapacityListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1CSIStorageCapacityListFluentImpl.MetadataNestedImpl(item); - } - public V1CSIStorageCapacityListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CSIStorageCapacityListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1CSIStorageCapacityListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSIStorageCapacityListFluentImpl that = (V1CSIStorageCapacityListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1CSIStorageCapacityFluentImpl> implements V1CSIStorageCapacityListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1CSIStorageCapacity item) { - this.index = index; - this.builder = new V1CSIStorageCapacityBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1CSIStorageCapacityBuilder(this); - } - V1CSIStorageCapacityBuilder builder; - int index; - public N and() { - return (N) V1CSIStorageCapacityListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1CSIStorageCapacityListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1CSIStorageCapacityListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceBuilder.java index 10aa433256..e4c123b5d5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CSIVolumeSourceBuilder extends V1CSIVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1CSIVolumeSourceBuilder extends V1CSIVolumeSourceFluent implements VisitableBuilder{ public V1CSIVolumeSourceBuilder() { - this(false); - } - public V1CSIVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1CSIVolumeSource(), validationEnabled); + this(new V1CSIVolumeSource()); } + public V1CSIVolumeSourceBuilder(V1CSIVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1CSIVolumeSourceBuilder(V1CSIVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CSIVolumeSource(), validationEnabled); + this(fluent, new V1CSIVolumeSource()); } + public V1CSIVolumeSourceBuilder(V1CSIVolumeSourceFluent fluent,V1CSIVolumeSource instance) { - this(fluent, instance, false); - } - public V1CSIVolumeSourceBuilder(V1CSIVolumeSourceFluent fluent,V1CSIVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDriver(instance.getDriver()); - fluent.withFsType(instance.getFsType()); - fluent.withNodePublishSecretRef(instance.getNodePublishSecretRef()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withVolumeAttributes(instance.getVolumeAttributes()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CSIVolumeSourceBuilder(V1CSIVolumeSource instance) { - this(instance,false); - } - public V1CSIVolumeSourceBuilder(V1CSIVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDriver(instance.getDriver()); - this.withFsType(instance.getFsType()); - this.withNodePublishSecretRef(instance.getNodePublishSecretRef()); - this.withReadOnly(instance.getReadOnly()); - this.withVolumeAttributes(instance.getVolumeAttributes()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CSIVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1CSIVolumeSource build() { V1CSIVolumeSource buildable = new V1CSIVolumeSource(); buildable.setDriver(fluent.getDriver()); buildable.setFsType(fluent.getFsType()); - buildable.setNodePublishSecretRef(fluent.getNodePublishSecretRef()); + buildable.setNodePublishSecretRef(fluent.buildNodePublishSecretRef()); buildable.setReadOnly(fluent.getReadOnly()); buildable.setVolumeAttributes(fluent.getVolumeAttributes()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceFluent.java index 6a987e53a4..e2b497d715 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceFluent.java @@ -1,54 +1,205 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import java.util.LinkedHashMap; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; import java.util.Map; -import java.util.LinkedHashMap; - /** - * Generated - */ -public interface V1CSIVolumeSourceFluent> extends Fluent{ - public String getDriver(); - public A withDriver(String driver); - public Boolean hasDriver(); - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - - /** - * This method has been deprecated, please use method buildNodePublishSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getNodePublishSecretRef(); - public V1LocalObjectReference buildNodePublishSecretRef(); - public A withNodePublishSecretRef(V1LocalObjectReference nodePublishSecretRef); - public Boolean hasNodePublishSecretRef(); - public V1CSIVolumeSourceFluent.NodePublishSecretRefNested withNewNodePublishSecretRef(); - public V1CSIVolumeSourceFluent.NodePublishSecretRefNested withNewNodePublishSecretRefLike(V1LocalObjectReference item); - public V1CSIVolumeSourceFluent.NodePublishSecretRefNested editNodePublishSecretRef(); - public V1CSIVolumeSourceFluent.NodePublishSecretRefNested editOrNewNodePublishSecretRef(); - public V1CSIVolumeSourceFluent.NodePublishSecretRefNested editOrNewNodePublishSecretRefLike(V1LocalObjectReference item); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public A addToVolumeAttributes(String key,String value); - public A addToVolumeAttributes(Map map); - public A removeFromVolumeAttributes(String key); - public A removeFromVolumeAttributes(Map map); - public Map getVolumeAttributes(); - public A withVolumeAttributes(Map volumeAttributes); - public Boolean hasVolumeAttributes(); - public A withReadOnly(); - public interface NodePublishSecretRefNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endNodePublishSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CSIVolumeSourceFluent> extends BaseFluent{ + public V1CSIVolumeSourceFluent() { + } + + public V1CSIVolumeSourceFluent(V1CSIVolumeSource instance) { + this.copyInstance(instance); + } + private String driver; + private String fsType; + private V1LocalObjectReferenceBuilder nodePublishSecretRef; + private Boolean readOnly; + private Map volumeAttributes; + + protected void copyInstance(V1CSIVolumeSource instance) { + instance = (instance != null ? instance : new V1CSIVolumeSource()); + if (instance != null) { + this.withDriver(instance.getDriver()); + this.withFsType(instance.getFsType()); + this.withNodePublishSecretRef(instance.getNodePublishSecretRef()); + this.withReadOnly(instance.getReadOnly()); + this.withVolumeAttributes(instance.getVolumeAttributes()); + } + } + + public String getDriver() { + return this.driver; + } + + public A withDriver(String driver) { + this.driver = driver; + return (A) this; + } + + public boolean hasDriver() { + return this.driver != null; + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public V1LocalObjectReference buildNodePublishSecretRef() { + return this.nodePublishSecretRef != null ? this.nodePublishSecretRef.build() : null; + } + + public A withNodePublishSecretRef(V1LocalObjectReference nodePublishSecretRef) { + this._visitables.remove("nodePublishSecretRef"); + if (nodePublishSecretRef != null) { + this.nodePublishSecretRef = new V1LocalObjectReferenceBuilder(nodePublishSecretRef); + this._visitables.get("nodePublishSecretRef").add(this.nodePublishSecretRef); + } else { + this.nodePublishSecretRef = null; + this._visitables.get("nodePublishSecretRef").remove(this.nodePublishSecretRef); + } + return (A) this; + } + + public boolean hasNodePublishSecretRef() { + return this.nodePublishSecretRef != null; + } + + public NodePublishSecretRefNested withNewNodePublishSecretRef() { + return new NodePublishSecretRefNested(null); + } + + public NodePublishSecretRefNested withNewNodePublishSecretRefLike(V1LocalObjectReference item) { + return new NodePublishSecretRefNested(item); + } + + public NodePublishSecretRefNested editNodePublishSecretRef() { + return withNewNodePublishSecretRefLike(java.util.Optional.ofNullable(buildNodePublishSecretRef()).orElse(null)); + } + + public NodePublishSecretRefNested editOrNewNodePublishSecretRef() { + return withNewNodePublishSecretRefLike(java.util.Optional.ofNullable(buildNodePublishSecretRef()).orElse(new V1LocalObjectReferenceBuilder().build())); + } + + public NodePublishSecretRefNested editOrNewNodePublishSecretRefLike(V1LocalObjectReference item) { + return withNewNodePublishSecretRefLike(java.util.Optional.ofNullable(buildNodePublishSecretRef()).orElse(item)); + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public A addToVolumeAttributes(String key,String value) { + if(this.volumeAttributes == null && key != null && value != null) { this.volumeAttributes = new LinkedHashMap(); } + if(key != null && value != null) {this.volumeAttributes.put(key, value);} return (A)this; + } + + public A addToVolumeAttributes(Map map) { + if(this.volumeAttributes == null && map != null) { this.volumeAttributes = new LinkedHashMap(); } + if(map != null) { this.volumeAttributes.putAll(map);} return (A)this; + } + + public A removeFromVolumeAttributes(String key) { + if(this.volumeAttributes == null) { return (A) this; } + if(key != null && this.volumeAttributes != null) {this.volumeAttributes.remove(key);} return (A)this; + } + + public A removeFromVolumeAttributes(Map map) { + if(this.volumeAttributes == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.volumeAttributes != null){this.volumeAttributes.remove(key);}}} return (A)this; + } + + public Map getVolumeAttributes() { + return this.volumeAttributes; } + public A withVolumeAttributes(Map volumeAttributes) { + if (volumeAttributes == null) { + this.volumeAttributes = null; + } else { + this.volumeAttributes = new LinkedHashMap(volumeAttributes); + } + return (A) this; + } + + public boolean hasVolumeAttributes() { + return this.volumeAttributes != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CSIVolumeSourceFluent that = (V1CSIVolumeSourceFluent) o; + if (!java.util.Objects.equals(driver, that.driver)) return false; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(nodePublishSecretRef, that.nodePublishSecretRef)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(volumeAttributes, that.volumeAttributes)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(driver, fsType, nodePublishSecretRef, readOnly, volumeAttributes, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (driver != null) { sb.append("driver:"); sb.append(driver + ","); } + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (nodePublishSecretRef != null) { sb.append("nodePublishSecretRef:"); sb.append(nodePublishSecretRef + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (volumeAttributes != null && !volumeAttributes.isEmpty()) { sb.append("volumeAttributes:"); sb.append(volumeAttributes); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class NodePublishSecretRefNested extends V1LocalObjectReferenceFluent> implements Nested{ + NodePublishSecretRefNested(V1LocalObjectReference item) { + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1CSIVolumeSourceFluent.this.withNodePublishSecretRef(builder.build()); + } + + public N endNodePublishSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceFluentImpl.java deleted file mode 100644 index 37d0d51baa..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CSIVolumeSourceFluentImpl.java +++ /dev/null @@ -1,171 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.util.LinkedHashMap; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CSIVolumeSourceFluentImpl> extends BaseFluent implements V1CSIVolumeSourceFluent{ - public V1CSIVolumeSourceFluentImpl() { - } - public V1CSIVolumeSourceFluentImpl(V1CSIVolumeSource instance) { - if (instance != null) { - this.withDriver(instance.getDriver()); - this.withFsType(instance.getFsType()); - this.withNodePublishSecretRef(instance.getNodePublishSecretRef()); - this.withReadOnly(instance.getReadOnly()); - this.withVolumeAttributes(instance.getVolumeAttributes()); - } - } - private String driver; - private String fsType; - private V1LocalObjectReferenceBuilder nodePublishSecretRef; - private Boolean readOnly; - private Map volumeAttributes; - public String getDriver() { - return this.driver; - } - public A withDriver(String driver) { - this.driver=driver; return (A) this; - } - public Boolean hasDriver() { - return this.driver != null; - } - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - - /** - * This method has been deprecated, please use method buildNodePublishSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getNodePublishSecretRef() { - return this.nodePublishSecretRef!=null ?this.nodePublishSecretRef.build():null; - } - public V1LocalObjectReference buildNodePublishSecretRef() { - return this.nodePublishSecretRef!=null ?this.nodePublishSecretRef.build():null; - } - public A withNodePublishSecretRef(V1LocalObjectReference nodePublishSecretRef) { - _visitables.get("nodePublishSecretRef").remove(this.nodePublishSecretRef); - if (nodePublishSecretRef!=null){ this.nodePublishSecretRef= new V1LocalObjectReferenceBuilder(nodePublishSecretRef); _visitables.get("nodePublishSecretRef").add(this.nodePublishSecretRef);} else { this.nodePublishSecretRef = null; _visitables.get("nodePublishSecretRef").remove(this.nodePublishSecretRef); } return (A) this; - } - public Boolean hasNodePublishSecretRef() { - return this.nodePublishSecretRef != null; - } - public V1CSIVolumeSourceFluentImpl.NodePublishSecretRefNested withNewNodePublishSecretRef() { - return new V1CSIVolumeSourceFluentImpl.NodePublishSecretRefNestedImpl(); - } - public V1CSIVolumeSourceFluentImpl.NodePublishSecretRefNested withNewNodePublishSecretRefLike(V1LocalObjectReference item) { - return new V1CSIVolumeSourceFluentImpl.NodePublishSecretRefNestedImpl(item); - } - public V1CSIVolumeSourceFluentImpl.NodePublishSecretRefNested editNodePublishSecretRef() { - return withNewNodePublishSecretRefLike(getNodePublishSecretRef()); - } - public V1CSIVolumeSourceFluentImpl.NodePublishSecretRefNested editOrNewNodePublishSecretRef() { - return withNewNodePublishSecretRefLike(getNodePublishSecretRef() != null ? getNodePublishSecretRef(): new V1LocalObjectReferenceBuilder().build()); - } - public V1CSIVolumeSourceFluentImpl.NodePublishSecretRefNested editOrNewNodePublishSecretRefLike(V1LocalObjectReference item) { - return withNewNodePublishSecretRefLike(getNodePublishSecretRef() != null ? getNodePublishSecretRef(): item); - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public A addToVolumeAttributes(String key,String value) { - if(this.volumeAttributes == null && key != null && value != null) { this.volumeAttributes = new LinkedHashMap(); } - if(key != null && value != null) {this.volumeAttributes.put(key, value);} return (A)this; - } - public A addToVolumeAttributes(Map map) { - if(this.volumeAttributes == null && map != null) { this.volumeAttributes = new LinkedHashMap(); } - if(map != null) { this.volumeAttributes.putAll(map);} return (A)this; - } - public A removeFromVolumeAttributes(String key) { - if(this.volumeAttributes == null) { return (A) this; } - if(key != null && this.volumeAttributes != null) {this.volumeAttributes.remove(key);} return (A)this; - } - public A removeFromVolumeAttributes(Map map) { - if(this.volumeAttributes == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.volumeAttributes != null){this.volumeAttributes.remove(key);}}} return (A)this; - } - public Map getVolumeAttributes() { - return this.volumeAttributes; - } - public A withVolumeAttributes(Map volumeAttributes) { - if (volumeAttributes == null) { this.volumeAttributes = null;} else {this.volumeAttributes = new LinkedHashMap(volumeAttributes);} return (A) this; - } - public Boolean hasVolumeAttributes() { - return this.volumeAttributes != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CSIVolumeSourceFluentImpl that = (V1CSIVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(driver, that.driver)) return false; - - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(nodePublishSecretRef, that.nodePublishSecretRef)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(volumeAttributes, that.volumeAttributes)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(driver, fsType, nodePublishSecretRef, readOnly, volumeAttributes, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (driver != null) { sb.append("driver:"); sb.append(driver + ","); } - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (nodePublishSecretRef != null) { sb.append("nodePublishSecretRef:"); sb.append(nodePublishSecretRef + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (volumeAttributes != null && !volumeAttributes.isEmpty()) { sb.append("volumeAttributes:"); sb.append(volumeAttributes); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class NodePublishSecretRefNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1CSIVolumeSourceFluentImpl.NodePublishSecretRefNested,Nested{ - NodePublishSecretRefNestedImpl(V1LocalObjectReference item) { - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - NodePublishSecretRefNestedImpl() { - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - public N and() { - return (N) V1CSIVolumeSourceFluentImpl.this.withNodePublishSecretRef(builder.build()); - } - public N endNodePublishSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesBuilder.java index 6f4f7f9a7d..f445840273 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CapabilitiesBuilder extends V1CapabilitiesFluentImpl implements VisitableBuilder{ +public class V1CapabilitiesBuilder extends V1CapabilitiesFluent implements VisitableBuilder{ public V1CapabilitiesBuilder() { - this(false); - } - public V1CapabilitiesBuilder(Boolean validationEnabled) { - this(new V1Capabilities(), validationEnabled); + this(new V1Capabilities()); } + public V1CapabilitiesBuilder(V1CapabilitiesFluent fluent) { - this(fluent, false); - } - public V1CapabilitiesBuilder(V1CapabilitiesFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Capabilities(), validationEnabled); + this(fluent, new V1Capabilities()); } + public V1CapabilitiesBuilder(V1CapabilitiesFluent fluent,V1Capabilities instance) { - this(fluent, instance, false); - } - public V1CapabilitiesBuilder(V1CapabilitiesFluent fluent,V1Capabilities instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAdd(instance.getAdd()); - fluent.withDrop(instance.getDrop()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CapabilitiesBuilder(V1Capabilities instance) { - this(instance,false); - } - public V1CapabilitiesBuilder(V1Capabilities instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAdd(instance.getAdd()); - this.withDrop(instance.getDrop()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CapabilitiesFluent fluent; - Boolean validationEnabled; + public V1Capabilities build() { V1Capabilities buildable = new V1Capabilities(); buildable.setAdd(fluent.getAdd()); @@ -46,4 +28,5 @@ public V1Capabilities build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesFluent.java index 3e1af3e083..8e1ad92a02 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesFluent.java @@ -1,47 +1,246 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1CapabilitiesFluent> extends Fluent{ - public A addToAdd(int index,String item); - public A setToAdd(int index,String item); - public A addToAdd(java.lang.String... items); - public A addAllToAdd(Collection items); - public A removeFromAdd(java.lang.String... items); - public A removeAllFromAdd(Collection items); - public List getAdd(); - public String getAdd(int index); - public String getFirstAdd(); - public String getLastAdd(); - public String getMatchingAdd(Predicate predicate); - public Boolean hasMatchingAdd(Predicate predicate); - public A withAdd(List add); - public A withAdd(java.lang.String... add); - public Boolean hasAdd(); - public A addToDrop(int index,String item); - public A setToDrop(int index,String item); - public A addToDrop(java.lang.String... items); - public A addAllToDrop(Collection items); - public A removeFromDrop(java.lang.String... items); - public A removeAllFromDrop(Collection items); - public List getDrop(); - public String getDrop(int index); - public String getFirstDrop(); - public String getLastDrop(); - public String getMatchingDrop(Predicate predicate); - public Boolean hasMatchingDrop(Predicate predicate); - public A withDrop(List drop); - public A withDrop(java.lang.String... drop); - public Boolean hasDrop(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CapabilitiesFluent> extends BaseFluent{ + public V1CapabilitiesFluent() { + } + public V1CapabilitiesFluent(V1Capabilities instance) { + this.copyInstance(instance); + } + private List add; + private List drop; + + protected void copyInstance(V1Capabilities instance) { + instance = (instance != null ? instance : new V1Capabilities()); + if (instance != null) { + this.withAdd(instance.getAdd()); + this.withDrop(instance.getDrop()); + } + } + + public A addToAdd(int index,String item) { + if (this.add == null) {this.add = new ArrayList();} + this.add.add(index, item); + return (A)this; + } + + public A setToAdd(int index,String item) { + if (this.add == null) {this.add = new ArrayList();} + this.add.set(index, item); return (A)this; + } + + public A addToAdd(java.lang.String... items) { + if (this.add == null) {this.add = new ArrayList();} + for (String item : items) {this.add.add(item);} return (A)this; + } + + public A addAllToAdd(Collection items) { + if (this.add == null) {this.add = new ArrayList();} + for (String item : items) {this.add.add(item);} return (A)this; + } + + public A removeFromAdd(java.lang.String... items) { + if (this.add == null) return (A)this; + for (String item : items) { this.add.remove(item);} return (A)this; + } + + public A removeAllFromAdd(Collection items) { + if (this.add == null) return (A)this; + for (String item : items) { this.add.remove(item);} return (A)this; + } + + public List getAdd() { + return this.add; + } + + public String getAdd(int index) { + return this.add.get(index); + } + + public String getFirstAdd() { + return this.add.get(0); + } + + public String getLastAdd() { + return this.add.get(add.size() - 1); + } + + public String getMatchingAdd(Predicate predicate) { + for (String item : add) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAdd(Predicate predicate) { + for (String item : add) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAdd(List add) { + if (add != null) { + this.add = new ArrayList(); + for (String item : add) { + this.addToAdd(item); + } + } else { + this.add = null; + } + return (A) this; + } + + public A withAdd(java.lang.String... add) { + if (this.add != null) { + this.add.clear(); + _visitables.remove("add"); + } + if (add != null) { + for (String item : add) { + this.addToAdd(item); + } + } + return (A) this; + } + + public boolean hasAdd() { + return this.add != null && !this.add.isEmpty(); + } + + public A addToDrop(int index,String item) { + if (this.drop == null) {this.drop = new ArrayList();} + this.drop.add(index, item); + return (A)this; + } + + public A setToDrop(int index,String item) { + if (this.drop == null) {this.drop = new ArrayList();} + this.drop.set(index, item); return (A)this; + } + + public A addToDrop(java.lang.String... items) { + if (this.drop == null) {this.drop = new ArrayList();} + for (String item : items) {this.drop.add(item);} return (A)this; + } + + public A addAllToDrop(Collection items) { + if (this.drop == null) {this.drop = new ArrayList();} + for (String item : items) {this.drop.add(item);} return (A)this; + } + + public A removeFromDrop(java.lang.String... items) { + if (this.drop == null) return (A)this; + for (String item : items) { this.drop.remove(item);} return (A)this; + } + + public A removeAllFromDrop(Collection items) { + if (this.drop == null) return (A)this; + for (String item : items) { this.drop.remove(item);} return (A)this; + } + + public List getDrop() { + return this.drop; + } + + public String getDrop(int index) { + return this.drop.get(index); + } + + public String getFirstDrop() { + return this.drop.get(0); + } + + public String getLastDrop() { + return this.drop.get(drop.size() - 1); + } + + public String getMatchingDrop(Predicate predicate) { + for (String item : drop) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingDrop(Predicate predicate) { + for (String item : drop) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withDrop(List drop) { + if (drop != null) { + this.drop = new ArrayList(); + for (String item : drop) { + this.addToDrop(item); + } + } else { + this.drop = null; + } + return (A) this; + } + + public A withDrop(java.lang.String... drop) { + if (this.drop != null) { + this.drop.clear(); + _visitables.remove("drop"); + } + if (drop != null) { + for (String item : drop) { + this.addToDrop(item); + } + } + return (A) this; + } + + public boolean hasDrop() { + return this.drop != null && !this.drop.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CapabilitiesFluent that = (V1CapabilitiesFluent) o; + if (!java.util.Objects.equals(add, that.add)) return false; + if (!java.util.Objects.equals(drop, that.drop)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(add, drop, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (add != null && !add.isEmpty()) { sb.append("add:"); sb.append(add + ","); } + if (drop != null && !drop.isEmpty()) { sb.append("drop:"); sb.append(drop); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesFluentImpl.java deleted file mode 100644 index 6e053612f5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CapabilitiesFluentImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CapabilitiesFluentImpl> extends BaseFluent implements V1CapabilitiesFluent{ - public V1CapabilitiesFluentImpl() { - } - public V1CapabilitiesFluentImpl(V1Capabilities instance) { - if (instance != null) { - this.withAdd(instance.getAdd()); - this.withDrop(instance.getDrop()); - } - } - private List add; - private List drop; - public A addToAdd(int index,String item) { - if (this.add == null) {this.add = new ArrayList();} - this.add.add(index, item); - return (A)this; - } - public A setToAdd(int index,String item) { - if (this.add == null) {this.add = new ArrayList();} - this.add.set(index, item); return (A)this; - } - public A addToAdd(java.lang.String... items) { - if (this.add == null) {this.add = new ArrayList();} - for (String item : items) {this.add.add(item);} return (A)this; - } - public A addAllToAdd(Collection items) { - if (this.add == null) {this.add = new ArrayList();} - for (String item : items) {this.add.add(item);} return (A)this; - } - public A removeFromAdd(java.lang.String... items) { - for (String item : items) {if (this.add!= null){ this.add.remove(item);}} return (A)this; - } - public A removeAllFromAdd(Collection items) { - for (String item : items) {if (this.add!= null){ this.add.remove(item);}} return (A)this; - } - public List getAdd() { - return this.add; - } - public String getAdd(int index) { - return this.add.get(index); - } - public String getFirstAdd() { - return this.add.get(0); - } - public String getLastAdd() { - return this.add.get(add.size() - 1); - } - public String getMatchingAdd(Predicate predicate) { - for (String item: add) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAdd(Predicate predicate) { - for (String item: add) { if(predicate.test(item)){ return true;} } return false; - } - public A withAdd(List add) { - if (add != null) {this.add = new ArrayList(); for (String item : add){this.addToAdd(item);}} else { this.add = null;} return (A) this; - } - public A withAdd(java.lang.String... add) { - if (this.add != null) {this.add.clear(); _visitables.remove("add"); } - if (add != null) {for (String item :add){ this.addToAdd(item);}} return (A) this; - } - public Boolean hasAdd() { - return add != null && !add.isEmpty(); - } - public A addToDrop(int index,String item) { - if (this.drop == null) {this.drop = new ArrayList();} - this.drop.add(index, item); - return (A)this; - } - public A setToDrop(int index,String item) { - if (this.drop == null) {this.drop = new ArrayList();} - this.drop.set(index, item); return (A)this; - } - public A addToDrop(java.lang.String... items) { - if (this.drop == null) {this.drop = new ArrayList();} - for (String item : items) {this.drop.add(item);} return (A)this; - } - public A addAllToDrop(Collection items) { - if (this.drop == null) {this.drop = new ArrayList();} - for (String item : items) {this.drop.add(item);} return (A)this; - } - public A removeFromDrop(java.lang.String... items) { - for (String item : items) {if (this.drop!= null){ this.drop.remove(item);}} return (A)this; - } - public A removeAllFromDrop(Collection items) { - for (String item : items) {if (this.drop!= null){ this.drop.remove(item);}} return (A)this; - } - public List getDrop() { - return this.drop; - } - public String getDrop(int index) { - return this.drop.get(index); - } - public String getFirstDrop() { - return this.drop.get(0); - } - public String getLastDrop() { - return this.drop.get(drop.size() - 1); - } - public String getMatchingDrop(Predicate predicate) { - for (String item: drop) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingDrop(Predicate predicate) { - for (String item: drop) { if(predicate.test(item)){ return true;} } return false; - } - public A withDrop(List drop) { - if (drop != null) {this.drop = new ArrayList(); for (String item : drop){this.addToDrop(item);}} else { this.drop = null;} return (A) this; - } - public A withDrop(java.lang.String... drop) { - if (this.drop != null) {this.drop.clear(); _visitables.remove("drop"); } - if (drop != null) {for (String item :drop){ this.addToDrop(item);}} return (A) this; - } - public Boolean hasDrop() { - return drop != null && !drop.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CapabilitiesFluentImpl that = (V1CapabilitiesFluentImpl) o; - if (!java.util.Objects.equals(add, that.add)) return false; - - if (!java.util.Objects.equals(drop, that.drop)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(add, drop, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (add != null && !add.isEmpty()) { sb.append("add:"); sb.append(add + ","); } - if (drop != null && !drop.isEmpty()) { sb.append("drop:"); sb.append(drop); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceBuilder.java index e16ee58310..8debc4eddd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CephFSPersistentVolumeSourceBuilder extends V1CephFSPersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1CephFSPersistentVolumeSourceBuilder extends V1CephFSPersistentVolumeSourceFluent implements VisitableBuilder{ public V1CephFSPersistentVolumeSourceBuilder() { - this(false); - } - public V1CephFSPersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1CephFSPersistentVolumeSource(), validationEnabled); + this(new V1CephFSPersistentVolumeSource()); } + public V1CephFSPersistentVolumeSourceBuilder(V1CephFSPersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1CephFSPersistentVolumeSourceBuilder(V1CephFSPersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CephFSPersistentVolumeSource(), validationEnabled); + this(fluent, new V1CephFSPersistentVolumeSource()); } + public V1CephFSPersistentVolumeSourceBuilder(V1CephFSPersistentVolumeSourceFluent fluent,V1CephFSPersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1CephFSPersistentVolumeSourceBuilder(V1CephFSPersistentVolumeSourceFluent fluent,V1CephFSPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMonitors(instance.getMonitors()); - fluent.withPath(instance.getPath()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretFile(instance.getSecretFile()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CephFSPersistentVolumeSourceBuilder(V1CephFSPersistentVolumeSource instance) { - this(instance,false); - } - public V1CephFSPersistentVolumeSourceBuilder(V1CephFSPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMonitors(instance.getMonitors()); - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretFile(instance.getSecretFile()); - this.withSecretRef(instance.getSecretRef()); - this.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CephFSPersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1CephFSPersistentVolumeSource build() { V1CephFSPersistentVolumeSource buildable = new V1CephFSPersistentVolumeSource(); buildable.setMonitors(fluent.getMonitors()); buildable.setPath(fluent.getPath()); buildable.setReadOnly(fluent.getReadOnly()); buildable.setSecretFile(fluent.getSecretFile()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setUser(fluent.getUser()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceFluent.java index a993e2e103..1f6f5ec51b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceFluent.java @@ -1,67 +1,281 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1CephFSPersistentVolumeSourceFluent> extends Fluent{ - public A addToMonitors(int index,String item); - public A setToMonitors(int index,String item); - public A addToMonitors(java.lang.String... items); - public A addAllToMonitors(Collection items); - public A removeFromMonitors(java.lang.String... items); - public A removeAllFromMonitors(Collection items); - public List getMonitors(); - public String getMonitor(int index); - public String getFirstMonitor(); - public String getLastMonitor(); - public String getMatchingMonitor(Predicate predicate); - public Boolean hasMatchingMonitor(Predicate predicate); - public A withMonitors(List monitors); - public A withMonitors(java.lang.String... monitors); - public Boolean hasMonitors(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public String getSecretFile(); - public A withSecretFile(String secretFile); - public Boolean hasSecretFile(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef(); - public V1SecretReference buildSecretRef(); - public A withSecretRef(V1SecretReference secretRef); - public Boolean hasSecretRef(); - public V1CephFSPersistentVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1CephFSPersistentVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1SecretReference item); - public V1CephFSPersistentVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1CephFSPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1CephFSPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1SecretReference item); - public String getUser(); - public A withUser(String user); - public Boolean hasUser(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CephFSPersistentVolumeSourceFluent> extends BaseFluent{ + public V1CephFSPersistentVolumeSourceFluent() { + } + + public V1CephFSPersistentVolumeSourceFluent(V1CephFSPersistentVolumeSource instance) { + this.copyInstance(instance); + } + private List monitors; + private String path; + private Boolean readOnly; + private String secretFile; + private V1SecretReferenceBuilder secretRef; + private String user; + + protected void copyInstance(V1CephFSPersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1CephFSPersistentVolumeSource()); + if (instance != null) { + this.withMonitors(instance.getMonitors()); + this.withPath(instance.getPath()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretFile(instance.getSecretFile()); + this.withSecretRef(instance.getSecretRef()); + this.withUser(instance.getUser()); + } + } + + public A addToMonitors(int index,String item) { + if (this.monitors == null) {this.monitors = new ArrayList();} + this.monitors.add(index, item); + return (A)this; + } + + public A setToMonitors(int index,String item) { + if (this.monitors == null) {this.monitors = new ArrayList();} + this.monitors.set(index, item); return (A)this; + } + + public A addToMonitors(java.lang.String... items) { + if (this.monitors == null) {this.monitors = new ArrayList();} + for (String item : items) {this.monitors.add(item);} return (A)this; + } + + public A addAllToMonitors(Collection items) { + if (this.monitors == null) {this.monitors = new ArrayList();} + for (String item : items) {this.monitors.add(item);} return (A)this; + } + + public A removeFromMonitors(java.lang.String... items) { + if (this.monitors == null) return (A)this; + for (String item : items) { this.monitors.remove(item);} return (A)this; + } + + public A removeAllFromMonitors(Collection items) { + if (this.monitors == null) return (A)this; + for (String item : items) { this.monitors.remove(item);} return (A)this; + } + + public List getMonitors() { + return this.monitors; + } + + public String getMonitor(int index) { + return this.monitors.get(index); + } + + public String getFirstMonitor() { + return this.monitors.get(0); + } + + public String getLastMonitor() { + return this.monitors.get(monitors.size() - 1); + } + + public String getMatchingMonitor(Predicate predicate) { + for (String item : monitors) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingMonitor(Predicate predicate) { + for (String item : monitors) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMonitors(List monitors) { + if (monitors != null) { + this.monitors = new ArrayList(); + for (String item : monitors) { + this.addToMonitors(item); + } + } else { + this.monitors = null; + } + return (A) this; + } + + public A withMonitors(java.lang.String... monitors) { + if (this.monitors != null) { + this.monitors.clear(); + _visitables.remove("monitors"); + } + if (monitors != null) { + for (String item : monitors) { + this.addToMonitors(item); + } + } + return (A) this; + } + + public boolean hasMonitors() { + return this.monitors != null && !this.monitors.isEmpty(); + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public String getSecretFile() { + return this.secretFile; + } + + public A withSecretFile(String secretFile) { + this.secretFile = secretFile; + return (A) this; + } + + public boolean hasSecretFile() { + return this.secretFile != null; + } + + public V1SecretReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1SecretReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1SecretReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1SecretReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getUser() { + return this.user; + } + + public A withUser(String user) { + this.user = user; + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CephFSPersistentVolumeSourceFluent that = (V1CephFSPersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(monitors, that.monitors)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretFile, that.secretFile)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + return true; } + public int hashCode() { + return java.util.Objects.hash(monitors, path, readOnly, secretFile, secretRef, user, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (monitors != null && !monitors.isEmpty()) { sb.append("monitors:"); sb.append(monitors + ","); } + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretFile != null) { sb.append("secretFile:"); sb.append(secretFile + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (user != null) { sb.append("user:"); sb.append(user); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1SecretReferenceFluent> implements Nested{ + SecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1CephFSPersistentVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceFluentImpl.java deleted file mode 100644 index 598c9c3b46..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSPersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,213 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CephFSPersistentVolumeSourceFluentImpl> extends BaseFluent implements V1CephFSPersistentVolumeSourceFluent{ - public V1CephFSPersistentVolumeSourceFluentImpl() { - } - public V1CephFSPersistentVolumeSourceFluentImpl(V1CephFSPersistentVolumeSource instance) { - if (instance != null) { - this.withMonitors(instance.getMonitors()); - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretFile(instance.getSecretFile()); - this.withSecretRef(instance.getSecretRef()); - this.withUser(instance.getUser()); - } - } - private List monitors; - private String path; - private Boolean readOnly; - private String secretFile; - private V1SecretReferenceBuilder secretRef; - private String user; - public A addToMonitors(int index,String item) { - if (this.monitors == null) {this.monitors = new ArrayList();} - this.monitors.add(index, item); - return (A)this; - } - public A setToMonitors(int index,String item) { - if (this.monitors == null) {this.monitors = new ArrayList();} - this.monitors.set(index, item); return (A)this; - } - public A addToMonitors(java.lang.String... items) { - if (this.monitors == null) {this.monitors = new ArrayList();} - for (String item : items) {this.monitors.add(item);} return (A)this; - } - public A addAllToMonitors(Collection items) { - if (this.monitors == null) {this.monitors = new ArrayList();} - for (String item : items) {this.monitors.add(item);} return (A)this; - } - public A removeFromMonitors(java.lang.String... items) { - for (String item : items) {if (this.monitors!= null){ this.monitors.remove(item);}} return (A)this; - } - public A removeAllFromMonitors(Collection items) { - for (String item : items) {if (this.monitors!= null){ this.monitors.remove(item);}} return (A)this; - } - public List getMonitors() { - return this.monitors; - } - public String getMonitor(int index) { - return this.monitors.get(index); - } - public String getFirstMonitor() { - return this.monitors.get(0); - } - public String getLastMonitor() { - return this.monitors.get(monitors.size() - 1); - } - public String getMatchingMonitor(Predicate predicate) { - for (String item: monitors) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingMonitor(Predicate predicate) { - for (String item: monitors) { if(predicate.test(item)){ return true;} } return false; - } - public A withMonitors(List monitors) { - if (monitors != null) {this.monitors = new ArrayList(); for (String item : monitors){this.addToMonitors(item);}} else { this.monitors = null;} return (A) this; - } - public A withMonitors(java.lang.String... monitors) { - if (this.monitors != null) {this.monitors.clear(); _visitables.remove("monitors"); } - if (monitors != null) {for (String item :monitors){ this.addToMonitors(item);}} return (A) this; - } - public Boolean hasMonitors() { - return monitors != null && !monitors.isEmpty(); - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public String getSecretFile() { - return this.secretFile; - } - public A withSecretFile(String secretFile) { - this.secretFile=secretFile; return (A) this; - } - public Boolean hasSecretFile() { - return this.secretFile != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1SecretReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1SecretReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1SecretReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1CephFSPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1CephFSPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1CephFSPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1SecretReference item) { - return new V1CephFSPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1CephFSPersistentVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1CephFSPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1CephFSPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getUser() { - return this.user; - } - public A withUser(String user) { - this.user=user; return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CephFSPersistentVolumeSourceFluentImpl that = (V1CephFSPersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(monitors, that.monitors)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretFile, that.secretFile)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(monitors, path, readOnly, secretFile, secretRef, user, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (monitors != null && !monitors.isEmpty()) { sb.append("monitors:"); sb.append(monitors + ","); } - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretFile != null) { sb.append("secretFile:"); sb.append(secretFile + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (user != null) { sb.append("user:"); sb.append(user); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CephFSPersistentVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1CephFSPersistentVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceBuilder.java index c7068f2574..3d59580ee0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CephFSVolumeSourceBuilder extends V1CephFSVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1CephFSVolumeSourceBuilder extends V1CephFSVolumeSourceFluent implements VisitableBuilder{ public V1CephFSVolumeSourceBuilder() { - this(false); - } - public V1CephFSVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1CephFSVolumeSource(), validationEnabled); + this(new V1CephFSVolumeSource()); } + public V1CephFSVolumeSourceBuilder(V1CephFSVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1CephFSVolumeSourceBuilder(V1CephFSVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CephFSVolumeSource(), validationEnabled); + this(fluent, new V1CephFSVolumeSource()); } + public V1CephFSVolumeSourceBuilder(V1CephFSVolumeSourceFluent fluent,V1CephFSVolumeSource instance) { - this(fluent, instance, false); - } - public V1CephFSVolumeSourceBuilder(V1CephFSVolumeSourceFluent fluent,V1CephFSVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMonitors(instance.getMonitors()); - fluent.withPath(instance.getPath()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretFile(instance.getSecretFile()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CephFSVolumeSourceBuilder(V1CephFSVolumeSource instance) { - this(instance,false); - } - public V1CephFSVolumeSourceBuilder(V1CephFSVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMonitors(instance.getMonitors()); - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretFile(instance.getSecretFile()); - this.withSecretRef(instance.getSecretRef()); - this.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CephFSVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1CephFSVolumeSource build() { V1CephFSVolumeSource buildable = new V1CephFSVolumeSource(); buildable.setMonitors(fluent.getMonitors()); buildable.setPath(fluent.getPath()); buildable.setReadOnly(fluent.getReadOnly()); buildable.setSecretFile(fluent.getSecretFile()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setUser(fluent.getUser()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceFluent.java index 2eee5246d2..05e3a71537 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceFluent.java @@ -1,67 +1,281 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1CephFSVolumeSourceFluent> extends Fluent{ - public A addToMonitors(int index,String item); - public A setToMonitors(int index,String item); - public A addToMonitors(java.lang.String... items); - public A addAllToMonitors(Collection items); - public A removeFromMonitors(java.lang.String... items); - public A removeAllFromMonitors(Collection items); - public List getMonitors(); - public String getMonitor(int index); - public String getFirstMonitor(); - public String getLastMonitor(); - public String getMatchingMonitor(Predicate predicate); - public Boolean hasMatchingMonitor(Predicate predicate); - public A withMonitors(List monitors); - public A withMonitors(java.lang.String... monitors); - public Boolean hasMonitors(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public String getSecretFile(); - public A withSecretFile(String secretFile); - public Boolean hasSecretFile(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef(); - public V1LocalObjectReference buildSecretRef(); - public A withSecretRef(V1LocalObjectReference secretRef); - public Boolean hasSecretRef(); - public V1CephFSVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1CephFSVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item); - public V1CephFSVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1CephFSVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1CephFSVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item); - public String getUser(); - public A withUser(String user); - public Boolean hasUser(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CephFSVolumeSourceFluent> extends BaseFluent{ + public V1CephFSVolumeSourceFluent() { + } + + public V1CephFSVolumeSourceFluent(V1CephFSVolumeSource instance) { + this.copyInstance(instance); + } + private List monitors; + private String path; + private Boolean readOnly; + private String secretFile; + private V1LocalObjectReferenceBuilder secretRef; + private String user; + + protected void copyInstance(V1CephFSVolumeSource instance) { + instance = (instance != null ? instance : new V1CephFSVolumeSource()); + if (instance != null) { + this.withMonitors(instance.getMonitors()); + this.withPath(instance.getPath()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretFile(instance.getSecretFile()); + this.withSecretRef(instance.getSecretRef()); + this.withUser(instance.getUser()); + } + } + + public A addToMonitors(int index,String item) { + if (this.monitors == null) {this.monitors = new ArrayList();} + this.monitors.add(index, item); + return (A)this; + } + + public A setToMonitors(int index,String item) { + if (this.monitors == null) {this.monitors = new ArrayList();} + this.monitors.set(index, item); return (A)this; + } + + public A addToMonitors(java.lang.String... items) { + if (this.monitors == null) {this.monitors = new ArrayList();} + for (String item : items) {this.monitors.add(item);} return (A)this; + } + + public A addAllToMonitors(Collection items) { + if (this.monitors == null) {this.monitors = new ArrayList();} + for (String item : items) {this.monitors.add(item);} return (A)this; + } + + public A removeFromMonitors(java.lang.String... items) { + if (this.monitors == null) return (A)this; + for (String item : items) { this.monitors.remove(item);} return (A)this; + } + + public A removeAllFromMonitors(Collection items) { + if (this.monitors == null) return (A)this; + for (String item : items) { this.monitors.remove(item);} return (A)this; + } + + public List getMonitors() { + return this.monitors; + } + + public String getMonitor(int index) { + return this.monitors.get(index); + } + + public String getFirstMonitor() { + return this.monitors.get(0); + } + + public String getLastMonitor() { + return this.monitors.get(monitors.size() - 1); + } + + public String getMatchingMonitor(Predicate predicate) { + for (String item : monitors) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingMonitor(Predicate predicate) { + for (String item : monitors) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMonitors(List monitors) { + if (monitors != null) { + this.monitors = new ArrayList(); + for (String item : monitors) { + this.addToMonitors(item); + } + } else { + this.monitors = null; + } + return (A) this; + } + + public A withMonitors(java.lang.String... monitors) { + if (this.monitors != null) { + this.monitors.clear(); + _visitables.remove("monitors"); + } + if (monitors != null) { + for (String item : monitors) { + this.addToMonitors(item); + } + } + return (A) this; + } + + public boolean hasMonitors() { + return this.monitors != null && !this.monitors.isEmpty(); + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public String getSecretFile() { + return this.secretFile; + } + + public A withSecretFile(String secretFile) { + this.secretFile = secretFile; + return (A) this; + } + + public boolean hasSecretFile() { + return this.secretFile != null; + } + + public V1LocalObjectReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1LocalObjectReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1LocalObjectReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1LocalObjectReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getUser() { + return this.user; + } + + public A withUser(String user) { + this.user = user; + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CephFSVolumeSourceFluent that = (V1CephFSVolumeSourceFluent) o; + if (!java.util.Objects.equals(monitors, that.monitors)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretFile, that.secretFile)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + return true; } + public int hashCode() { + return java.util.Objects.hash(monitors, path, readOnly, secretFile, secretRef, user, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (monitors != null && !monitors.isEmpty()) { sb.append("monitors:"); sb.append(monitors + ","); } + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretFile != null) { sb.append("secretFile:"); sb.append(secretFile + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (user != null) { sb.append("user:"); sb.append(user); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1LocalObjectReferenceFluent> implements Nested{ + SecretRefNested(V1LocalObjectReference item) { + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1CephFSVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceFluentImpl.java deleted file mode 100644 index 984fe42478..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CephFSVolumeSourceFluentImpl.java +++ /dev/null @@ -1,213 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CephFSVolumeSourceFluentImpl> extends BaseFluent implements V1CephFSVolumeSourceFluent{ - public V1CephFSVolumeSourceFluentImpl() { - } - public V1CephFSVolumeSourceFluentImpl(V1CephFSVolumeSource instance) { - if (instance != null) { - this.withMonitors(instance.getMonitors()); - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretFile(instance.getSecretFile()); - this.withSecretRef(instance.getSecretRef()); - this.withUser(instance.getUser()); - } - } - private List monitors; - private String path; - private Boolean readOnly; - private String secretFile; - private V1LocalObjectReferenceBuilder secretRef; - private String user; - public A addToMonitors(int index,String item) { - if (this.monitors == null) {this.monitors = new ArrayList();} - this.monitors.add(index, item); - return (A)this; - } - public A setToMonitors(int index,String item) { - if (this.monitors == null) {this.monitors = new ArrayList();} - this.monitors.set(index, item); return (A)this; - } - public A addToMonitors(java.lang.String... items) { - if (this.monitors == null) {this.monitors = new ArrayList();} - for (String item : items) {this.monitors.add(item);} return (A)this; - } - public A addAllToMonitors(Collection items) { - if (this.monitors == null) {this.monitors = new ArrayList();} - for (String item : items) {this.monitors.add(item);} return (A)this; - } - public A removeFromMonitors(java.lang.String... items) { - for (String item : items) {if (this.monitors!= null){ this.monitors.remove(item);}} return (A)this; - } - public A removeAllFromMonitors(Collection items) { - for (String item : items) {if (this.monitors!= null){ this.monitors.remove(item);}} return (A)this; - } - public List getMonitors() { - return this.monitors; - } - public String getMonitor(int index) { - return this.monitors.get(index); - } - public String getFirstMonitor() { - return this.monitors.get(0); - } - public String getLastMonitor() { - return this.monitors.get(monitors.size() - 1); - } - public String getMatchingMonitor(Predicate predicate) { - for (String item: monitors) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingMonitor(Predicate predicate) { - for (String item: monitors) { if(predicate.test(item)){ return true;} } return false; - } - public A withMonitors(List monitors) { - if (monitors != null) {this.monitors = new ArrayList(); for (String item : monitors){this.addToMonitors(item);}} else { this.monitors = null;} return (A) this; - } - public A withMonitors(java.lang.String... monitors) { - if (this.monitors != null) {this.monitors.clear(); _visitables.remove("monitors"); } - if (monitors != null) {for (String item :monitors){ this.addToMonitors(item);}} return (A) this; - } - public Boolean hasMonitors() { - return monitors != null && !monitors.isEmpty(); - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public String getSecretFile() { - return this.secretFile; - } - public A withSecretFile(String secretFile) { - this.secretFile=secretFile; return (A) this; - } - public Boolean hasSecretFile() { - return this.secretFile != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1LocalObjectReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1LocalObjectReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1LocalObjectReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1CephFSVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1CephFSVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1CephFSVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { - return new V1CephFSVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1CephFSVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1CephFSVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1LocalObjectReferenceBuilder().build()); - } - public V1CephFSVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getUser() { - return this.user; - } - public A withUser(String user) { - this.user=user; return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CephFSVolumeSourceFluentImpl that = (V1CephFSVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(monitors, that.monitors)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretFile, that.secretFile)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(monitors, path, readOnly, secretFile, secretRef, user, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (monitors != null && !monitors.isEmpty()) { sb.append("monitors:"); sb.append(monitors + ","); } - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretFile != null) { sb.append("secretFile:"); sb.append(secretFile + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (user != null) { sb.append("user:"); sb.append(user); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1CephFSVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1LocalObjectReference item) { - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - public N and() { - return (N) V1CephFSVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestBuilder.java index 1b51aca569..985cc53ef4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CertificateSigningRequestBuilder extends V1CertificateSigningRequestFluentImpl implements VisitableBuilder{ +public class V1CertificateSigningRequestBuilder extends V1CertificateSigningRequestFluent implements VisitableBuilder{ public V1CertificateSigningRequestBuilder() { - this(false); - } - public V1CertificateSigningRequestBuilder(Boolean validationEnabled) { - this(new V1CertificateSigningRequest(), validationEnabled); + this(new V1CertificateSigningRequest()); } + public V1CertificateSigningRequestBuilder(V1CertificateSigningRequestFluent fluent) { - this(fluent, false); - } - public V1CertificateSigningRequestBuilder(V1CertificateSigningRequestFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CertificateSigningRequest(), validationEnabled); + this(fluent, new V1CertificateSigningRequest()); } + public V1CertificateSigningRequestBuilder(V1CertificateSigningRequestFluent fluent,V1CertificateSigningRequest instance) { - this(fluent, instance, false); - } - public V1CertificateSigningRequestBuilder(V1CertificateSigningRequestFluent fluent,V1CertificateSigningRequest instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CertificateSigningRequestBuilder(V1CertificateSigningRequest instance) { - this(instance,false); - } - public V1CertificateSigningRequestBuilder(V1CertificateSigningRequest instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CertificateSigningRequestFluent fluent; - Boolean validationEnabled; + public V1CertificateSigningRequest build() { V1CertificateSigningRequest buildable = new V1CertificateSigningRequest(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionBuilder.java index bb96564641..92f6f4175b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CertificateSigningRequestConditionBuilder extends V1CertificateSigningRequestConditionFluentImpl implements VisitableBuilder{ +public class V1CertificateSigningRequestConditionBuilder extends V1CertificateSigningRequestConditionFluent implements VisitableBuilder{ public V1CertificateSigningRequestConditionBuilder() { - this(false); - } - public V1CertificateSigningRequestConditionBuilder(Boolean validationEnabled) { - this(new V1CertificateSigningRequestCondition(), validationEnabled); + this(new V1CertificateSigningRequestCondition()); } + public V1CertificateSigningRequestConditionBuilder(V1CertificateSigningRequestConditionFluent fluent) { - this(fluent, false); - } - public V1CertificateSigningRequestConditionBuilder(V1CertificateSigningRequestConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CertificateSigningRequestCondition(), validationEnabled); + this(fluent, new V1CertificateSigningRequestCondition()); } + public V1CertificateSigningRequestConditionBuilder(V1CertificateSigningRequestConditionFluent fluent,V1CertificateSigningRequestCondition instance) { - this(fluent, instance, false); - } - public V1CertificateSigningRequestConditionBuilder(V1CertificateSigningRequestConditionFluent fluent,V1CertificateSigningRequestCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withLastUpdateTime(instance.getLastUpdateTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CertificateSigningRequestConditionBuilder(V1CertificateSigningRequestCondition instance) { - this(instance,false); - } - public V1CertificateSigningRequestConditionBuilder(V1CertificateSigningRequestCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withLastUpdateTime(instance.getLastUpdateTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CertificateSigningRequestConditionFluent fluent; - Boolean validationEnabled; + public V1CertificateSigningRequestCondition build() { V1CertificateSigningRequestCondition buildable = new V1CertificateSigningRequestCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -58,4 +32,5 @@ public V1CertificateSigningRequestCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionFluent.java index 01a4e9d9cf..1f732988e3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionFluent.java @@ -1,32 +1,149 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CertificateSigningRequestConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public OffsetDateTime getLastUpdateTime(); - public A withLastUpdateTime(OffsetDateTime lastUpdateTime); - public Boolean hasLastUpdateTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CertificateSigningRequestConditionFluent> extends BaseFluent{ + public V1CertificateSigningRequestConditionFluent() { + } + public V1CertificateSigningRequestConditionFluent(V1CertificateSigningRequestCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private OffsetDateTime lastUpdateTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1CertificateSigningRequestCondition instance) { + instance = (instance != null ? instance : new V1CertificateSigningRequestCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withLastUpdateTime(instance.getLastUpdateTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public OffsetDateTime getLastUpdateTime() { + return this.lastUpdateTime; + } + + public A withLastUpdateTime(OffsetDateTime lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + return (A) this; + } + + public boolean hasLastUpdateTime() { + return this.lastUpdateTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CertificateSigningRequestConditionFluent that = (V1CertificateSigningRequestConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(lastUpdateTime, that.lastUpdateTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, lastUpdateTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (lastUpdateTime != null) { sb.append("lastUpdateTime:"); sb.append(lastUpdateTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionFluentImpl.java deleted file mode 100644 index e47f007956..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestConditionFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CertificateSigningRequestConditionFluentImpl> extends BaseFluent implements V1CertificateSigningRequestConditionFluent{ - public V1CertificateSigningRequestConditionFluentImpl() { - } - public V1CertificateSigningRequestConditionFluentImpl(V1CertificateSigningRequestCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withLastUpdateTime(instance.getLastUpdateTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private OffsetDateTime lastUpdateTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public OffsetDateTime getLastUpdateTime() { - return this.lastUpdateTime; - } - public A withLastUpdateTime(OffsetDateTime lastUpdateTime) { - this.lastUpdateTime=lastUpdateTime; return (A) this; - } - public Boolean hasLastUpdateTime() { - return this.lastUpdateTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CertificateSigningRequestConditionFluentImpl that = (V1CertificateSigningRequestConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(lastUpdateTime, that.lastUpdateTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, lastUpdateTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (lastUpdateTime != null) { sb.append("lastUpdateTime:"); sb.append(lastUpdateTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestFluent.java index 75fed93891..aad4a2ae62 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1CertificateSigningRequestFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1CertificateSigningRequestFluent.MetadataNested withNewMetadata(); - public V1CertificateSigningRequestFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1CertificateSigningRequestFluent.MetadataNested editMetadata(); - public V1CertificateSigningRequestFluent.MetadataNested editOrNewMetadata(); - public V1CertificateSigningRequestFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CertificateSigningRequestSpec getSpec(); - public V1CertificateSigningRequestSpec buildSpec(); - public A withSpec(V1CertificateSigningRequestSpec spec); - public Boolean hasSpec(); - public V1CertificateSigningRequestFluent.SpecNested withNewSpec(); - public V1CertificateSigningRequestFluent.SpecNested withNewSpecLike(V1CertificateSigningRequestSpec item); - public V1CertificateSigningRequestFluent.SpecNested editSpec(); - public V1CertificateSigningRequestFluent.SpecNested editOrNewSpec(); - public V1CertificateSigningRequestFluent.SpecNested editOrNewSpecLike(V1CertificateSigningRequestSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1CertificateSigningRequestStatus getStatus(); - public V1CertificateSigningRequestStatus buildStatus(); - public A withStatus(V1CertificateSigningRequestStatus status); - public Boolean hasStatus(); - public V1CertificateSigningRequestFluent.StatusNested withNewStatus(); - public V1CertificateSigningRequestFluent.StatusNested withNewStatusLike(V1CertificateSigningRequestStatus item); - public V1CertificateSigningRequestFluent.StatusNested editStatus(); - public V1CertificateSigningRequestFluent.StatusNested editOrNewStatus(); - public V1CertificateSigningRequestFluent.StatusNested editOrNewStatusLike(V1CertificateSigningRequestStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CertificateSigningRequestFluent> extends BaseFluent{ + public V1CertificateSigningRequestFluent() { + } + + public V1CertificateSigningRequestFluent(V1CertificateSigningRequest instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1CertificateSigningRequestSpecBuilder spec; + private V1CertificateSigningRequestStatusBuilder status; + + protected void copyInstance(V1CertificateSigningRequest instance) { + instance = (instance != null ? instance : new V1CertificateSigningRequest()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1CertificateSigningRequestSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1CertificateSigningRequestSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1CertificateSigningRequestSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1CertificateSigningRequestSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1CertificateSigningRequestSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1CertificateSigningRequestSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1CertificateSigningRequestSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1CertificateSigningRequestStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1CertificateSigningRequestStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1CertificateSigningRequestStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1CertificateSigningRequestStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1CertificateSigningRequestStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1CertificateSigningRequestStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CertificateSigningRequestFluent that = (V1CertificateSigningRequestFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1CertificateSigningRequestFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1CertificateSigningRequestStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1CertificateSigningRequestSpecFluent> implements Nested{ + SpecNested(V1CertificateSigningRequestSpec item) { + this.builder = new V1CertificateSigningRequestSpecBuilder(this, item); + } + V1CertificateSigningRequestSpecBuilder builder; + + public N and() { + return (N) V1CertificateSigningRequestFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1CertificateSigningRequestStatusFluent> implements Nested{ + StatusNested(V1CertificateSigningRequestStatus item) { + this.builder = new V1CertificateSigningRequestStatusBuilder(this, item); + } + V1CertificateSigningRequestStatusBuilder builder; + + public N and() { + return (N) V1CertificateSigningRequestFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestFluentImpl.java deleted file mode 100644 index f7d00cab00..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CertificateSigningRequestFluentImpl> extends BaseFluent implements V1CertificateSigningRequestFluent{ - public V1CertificateSigningRequestFluentImpl() { - } - public V1CertificateSigningRequestFluentImpl(V1CertificateSigningRequest instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1CertificateSigningRequestSpecBuilder spec; - private V1CertificateSigningRequestStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1CertificateSigningRequestFluentImpl.MetadataNested withNewMetadata() { - return new V1CertificateSigningRequestFluentImpl.MetadataNestedImpl(); - } - public V1CertificateSigningRequestFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1CertificateSigningRequestFluentImpl.MetadataNestedImpl(item); - } - public V1CertificateSigningRequestFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CertificateSigningRequestFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1CertificateSigningRequestFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CertificateSigningRequestSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1CertificateSigningRequestSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1CertificateSigningRequestSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1CertificateSigningRequestSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1CertificateSigningRequestFluentImpl.SpecNested withNewSpec() { - return new V1CertificateSigningRequestFluentImpl.SpecNestedImpl(); - } - public V1CertificateSigningRequestFluentImpl.SpecNested withNewSpecLike(V1CertificateSigningRequestSpec item) { - return new V1CertificateSigningRequestFluentImpl.SpecNestedImpl(item); - } - public V1CertificateSigningRequestFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1CertificateSigningRequestFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1CertificateSigningRequestSpecBuilder().build()); - } - public V1CertificateSigningRequestFluentImpl.SpecNested editOrNewSpecLike(V1CertificateSigningRequestSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1CertificateSigningRequestStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1CertificateSigningRequestStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1CertificateSigningRequestStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1CertificateSigningRequestStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1CertificateSigningRequestFluentImpl.StatusNested withNewStatus() { - return new V1CertificateSigningRequestFluentImpl.StatusNestedImpl(); - } - public V1CertificateSigningRequestFluentImpl.StatusNested withNewStatusLike(V1CertificateSigningRequestStatus item) { - return new V1CertificateSigningRequestFluentImpl.StatusNestedImpl(item); - } - public V1CertificateSigningRequestFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1CertificateSigningRequestFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1CertificateSigningRequestStatusBuilder().build()); - } - public V1CertificateSigningRequestFluentImpl.StatusNested editOrNewStatusLike(V1CertificateSigningRequestStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CertificateSigningRequestFluentImpl that = (V1CertificateSigningRequestFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1CertificateSigningRequestFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1CertificateSigningRequestFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1CertificateSigningRequestSpecFluentImpl> implements V1CertificateSigningRequestFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1CertificateSigningRequestSpec item) { - this.builder = new V1CertificateSigningRequestSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1CertificateSigningRequestSpecBuilder(this); - } - V1CertificateSigningRequestSpecBuilder builder; - public N and() { - return (N) V1CertificateSigningRequestFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1CertificateSigningRequestStatusFluentImpl> implements V1CertificateSigningRequestFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1CertificateSigningRequestStatus item) { - this.builder = new V1CertificateSigningRequestStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1CertificateSigningRequestStatusBuilder(this); - } - V1CertificateSigningRequestStatusBuilder builder; - public N and() { - return (N) V1CertificateSigningRequestFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListBuilder.java index 9653c89a55..3d7f9e30d7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CertificateSigningRequestListBuilder extends V1CertificateSigningRequestListFluentImpl implements VisitableBuilder{ +public class V1CertificateSigningRequestListBuilder extends V1CertificateSigningRequestListFluent implements VisitableBuilder{ public V1CertificateSigningRequestListBuilder() { - this(false); - } - public V1CertificateSigningRequestListBuilder(Boolean validationEnabled) { - this(new V1CertificateSigningRequestList(), validationEnabled); + this(new V1CertificateSigningRequestList()); } + public V1CertificateSigningRequestListBuilder(V1CertificateSigningRequestListFluent fluent) { - this(fluent, false); - } - public V1CertificateSigningRequestListBuilder(V1CertificateSigningRequestListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CertificateSigningRequestList(), validationEnabled); + this(fluent, new V1CertificateSigningRequestList()); } + public V1CertificateSigningRequestListBuilder(V1CertificateSigningRequestListFluent fluent,V1CertificateSigningRequestList instance) { - this(fluent, instance, false); - } - public V1CertificateSigningRequestListBuilder(V1CertificateSigningRequestListFluent fluent,V1CertificateSigningRequestList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CertificateSigningRequestListBuilder(V1CertificateSigningRequestList instance) { - this(instance,false); - } - public V1CertificateSigningRequestListBuilder(V1CertificateSigningRequestList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CertificateSigningRequestListFluent fluent; - Boolean validationEnabled; + public V1CertificateSigningRequestList build() { V1CertificateSigningRequestList buildable = new V1CertificateSigningRequestList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListFluent.java index df97d4aff7..f578f55581 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CertificateSigningRequestListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1CertificateSigningRequest item); - public A setToItems(int index,V1CertificateSigningRequest item); - public A addToItems(io.kubernetes.client.openapi.models.V1CertificateSigningRequest... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1CertificateSigningRequest... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1CertificateSigningRequest buildItem(int index); - public V1CertificateSigningRequest buildFirstItem(); - public V1CertificateSigningRequest buildLastItem(); - public V1CertificateSigningRequest buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1CertificateSigningRequest... items); - public Boolean hasItems(); - public V1CertificateSigningRequestListFluent.ItemsNested addNewItem(); - public V1CertificateSigningRequestListFluent.ItemsNested addNewItemLike(V1CertificateSigningRequest item); - public V1CertificateSigningRequestListFluent.ItemsNested setNewItemLike(int index,V1CertificateSigningRequest item); - public V1CertificateSigningRequestListFluent.ItemsNested editItem(int index); - public V1CertificateSigningRequestListFluent.ItemsNested editFirstItem(); - public V1CertificateSigningRequestListFluent.ItemsNested editLastItem(); - public V1CertificateSigningRequestListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1CertificateSigningRequestListFluent.MetadataNested withNewMetadata(); - public V1CertificateSigningRequestListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1CertificateSigningRequestListFluent.MetadataNested editMetadata(); - public V1CertificateSigningRequestListFluent.MetadataNested editOrNewMetadata(); - public V1CertificateSigningRequestListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1CertificateSigningRequestFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CertificateSigningRequestListFluent> extends BaseFluent{ + public V1CertificateSigningRequestListFluent() { + } + + public V1CertificateSigningRequestListFluent(V1CertificateSigningRequestList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1CertificateSigningRequestList instance) { + instance = (instance != null ? instance : new V1CertificateSigningRequestList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1CertificateSigningRequest item) { + if (this.items == null) {this.items = new ArrayList();} + V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1CertificateSigningRequest item) { + if (this.items == null) {this.items = new ArrayList();} + V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1CertificateSigningRequest... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CertificateSigningRequest item : items) {V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CertificateSigningRequest item : items) {V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1CertificateSigningRequest... items) { + if (this.items == null) return (A)this; + for (V1CertificateSigningRequest item : items) {V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1CertificateSigningRequest item : items) {V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1CertificateSigningRequestBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1CertificateSigningRequest buildItem(int index) { + return this.items.get(index).build(); + } + + public V1CertificateSigningRequest buildFirstItem() { + return this.items.get(0).build(); + } + + public V1CertificateSigningRequest buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1CertificateSigningRequest buildMatchingItem(Predicate predicate) { + for (V1CertificateSigningRequestBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1CertificateSigningRequestBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1CertificateSigningRequest item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1CertificateSigningRequest... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1CertificateSigningRequest item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1CertificateSigningRequest item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1CertificateSigningRequest item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CertificateSigningRequestListFluent that = (V1CertificateSigningRequestListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1CertificateSigningRequestFluent> implements Nested{ + ItemsNested(int index,V1CertificateSigningRequest item) { + this.index = index; + this.builder = new V1CertificateSigningRequestBuilder(this, item); + } + V1CertificateSigningRequestBuilder builder; + int index; + public N and() { + return (N) V1CertificateSigningRequestListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1CertificateSigningRequestListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListFluentImpl.java deleted file mode 100644 index 957cf4b72c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CertificateSigningRequestListFluentImpl> extends BaseFluent implements V1CertificateSigningRequestListFluent{ - public V1CertificateSigningRequestListFluentImpl() { - } - public V1CertificateSigningRequestListFluentImpl(V1CertificateSigningRequestList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1CertificateSigningRequest item) { - if (this.items == null) {this.items = new ArrayList();} - V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1CertificateSigningRequest item) { - if (this.items == null) {this.items = new ArrayList();} - V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1CertificateSigningRequest... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CertificateSigningRequest item : items) {V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CertificateSigningRequest item : items) {V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1CertificateSigningRequest... items) { - for (V1CertificateSigningRequest item : items) {V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1CertificateSigningRequest item : items) {V1CertificateSigningRequestBuilder builder = new V1CertificateSigningRequestBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1CertificateSigningRequestBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1CertificateSigningRequest buildItem(int index) { - return this.items.get(index).build(); - } - public V1CertificateSigningRequest buildFirstItem() { - return this.items.get(0).build(); - } - public V1CertificateSigningRequest buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1CertificateSigningRequest buildMatchingItem(Predicate predicate) { - for (V1CertificateSigningRequestBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1CertificateSigningRequestBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1CertificateSigningRequest item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1CertificateSigningRequest... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1CertificateSigningRequest item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1CertificateSigningRequestListFluentImpl.ItemsNested addNewItem() { - return new V1CertificateSigningRequestListFluentImpl.ItemsNestedImpl(); - } - public V1CertificateSigningRequestListFluentImpl.ItemsNested addNewItemLike(V1CertificateSigningRequest item) { - return new V1CertificateSigningRequestListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1CertificateSigningRequestListFluentImpl.ItemsNested setNewItemLike(int index,V1CertificateSigningRequest item) { - return new V1CertificateSigningRequestListFluentImpl.ItemsNestedImpl(index, item); - } - public V1CertificateSigningRequestListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1CertificateSigningRequestListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1CertificateSigningRequestListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1CertificateSigningRequestListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1CertificateSigningRequestListFluentImpl.MetadataNestedImpl(); - } - public V1CertificateSigningRequestListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1CertificateSigningRequestListFluentImpl.MetadataNestedImpl(item); - } - public V1CertificateSigningRequestListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CertificateSigningRequestListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1CertificateSigningRequestListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CertificateSigningRequestListFluentImpl that = (V1CertificateSigningRequestListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1CertificateSigningRequestFluentImpl> implements V1CertificateSigningRequestListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1CertificateSigningRequest item) { - this.index = index; - this.builder = new V1CertificateSigningRequestBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1CertificateSigningRequestBuilder(this); - } - V1CertificateSigningRequestBuilder builder; - int index; - public N and() { - return (N) V1CertificateSigningRequestListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1CertificateSigningRequestListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1CertificateSigningRequestListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecBuilder.java index c6ee8a3967..9135e3539e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecBuilder.java @@ -1,56 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CertificateSigningRequestSpecBuilder extends V1CertificateSigningRequestSpecFluentImpl implements VisitableBuilder{ +public class V1CertificateSigningRequestSpecBuilder extends V1CertificateSigningRequestSpecFluent implements VisitableBuilder{ public V1CertificateSigningRequestSpecBuilder() { - this(false); - } - public V1CertificateSigningRequestSpecBuilder(Boolean validationEnabled) { - this(new V1CertificateSigningRequestSpec(), validationEnabled); + this(new V1CertificateSigningRequestSpec()); } + public V1CertificateSigningRequestSpecBuilder(V1CertificateSigningRequestSpecFluent fluent) { - this(fluent, false); - } - public V1CertificateSigningRequestSpecBuilder(V1CertificateSigningRequestSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CertificateSigningRequestSpec(), validationEnabled); + this(fluent, new V1CertificateSigningRequestSpec()); } + public V1CertificateSigningRequestSpecBuilder(V1CertificateSigningRequestSpecFluent fluent,V1CertificateSigningRequestSpec instance) { - this(fluent, instance, false); - } - public V1CertificateSigningRequestSpecBuilder(V1CertificateSigningRequestSpecFluent fluent,V1CertificateSigningRequestSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExpirationSeconds(instance.getExpirationSeconds()); - fluent.withExtra(instance.getExtra()); - fluent.withGroups(instance.getGroups()); - fluent.withRequest(instance.getRequest()); - fluent.withSignerName(instance.getSignerName()); - fluent.withUid(instance.getUid()); - fluent.withUsages(instance.getUsages()); - fluent.withUsername(instance.getUsername()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CertificateSigningRequestSpecBuilder(V1CertificateSigningRequestSpec instance) { - this(instance,false); - } - public V1CertificateSigningRequestSpecBuilder(V1CertificateSigningRequestSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExpirationSeconds(instance.getExpirationSeconds()); - this.withExtra(instance.getExtra()); - this.withGroups(instance.getGroups()); - this.withRequest(instance.getRequest()); - this.withSignerName(instance.getSignerName()); - this.withUid(instance.getUid()); - this.withUsages(instance.getUsages()); - this.withUsername(instance.getUsername()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CertificateSigningRequestSpecFluent fluent; - Boolean validationEnabled; + public V1CertificateSigningRequestSpec build() { V1CertificateSigningRequestSpec buildable = new V1CertificateSigningRequestSpec(); buildable.setExpirationSeconds(fluent.getExpirationSeconds()); @@ -64,4 +34,5 @@ public V1CertificateSigningRequestSpec build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecFluent.java index 4059123729..3dbee21550 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecFluent.java @@ -1,79 +1,424 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; import java.lang.Integer; import java.lang.Byte; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1CertificateSigningRequestSpecFluent> extends Fluent{ - public Integer getExpirationSeconds(); - public A withExpirationSeconds(Integer expirationSeconds); - public Boolean hasExpirationSeconds(); - public A addToExtra(String key,List value); - public A addToExtra(Map> map); - public A removeFromExtra(String key); - public A removeFromExtra(Map> map); - public Map> getExtra(); - public A withExtra(Map> extra); - public Boolean hasExtra(); - public A addToGroups(int index,String item); - public A setToGroups(int index,String item); - public A addToGroups(java.lang.String... items); - public A addAllToGroups(Collection items); - public A removeFromGroups(java.lang.String... items); - public A removeAllFromGroups(Collection items); - public List getGroups(); - public String getGroup(int index); - public String getFirstGroup(); - public String getLastGroup(); - public String getMatchingGroup(Predicate predicate); - public Boolean hasMatchingGroup(Predicate predicate); - public A withGroups(List groups); - public A withGroups(java.lang.String... groups); - public Boolean hasGroups(); - public A withRequest(byte... request); - public byte[] getRequest(); - public A addToRequest(int index,Byte item); - public A setToRequest(int index,Byte item); - public A addToRequest(java.lang.Byte... items); - public A addAllToRequest(Collection items); - public A removeFromRequest(java.lang.Byte... items); - public A removeAllFromRequest(Collection items); - public Boolean hasRequest(); - public String getSignerName(); - public A withSignerName(String signerName); - public Boolean hasSignerName(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); - public A addToUsages(int index,String item); - public A setToUsages(int index,String item); - public A addToUsages(java.lang.String... items); - public A addAllToUsages(Collection items); - public A removeFromUsages(java.lang.String... items); - public A removeAllFromUsages(Collection items); - public List getUsages(); - public String getUsage(int index); - public String getFirstUsage(); - public String getLastUsage(); - public String getMatchingUsage(Predicate predicate); - public Boolean hasMatchingUsage(Predicate predicate); - public A withUsages(List usages); - public A withUsages(java.lang.String... usages); - public Boolean hasUsages(); - public String getUsername(); - public A withUsername(String username); - public Boolean hasUsername(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CertificateSigningRequestSpecFluent> extends BaseFluent{ + public V1CertificateSigningRequestSpecFluent() { + } + public V1CertificateSigningRequestSpecFluent(V1CertificateSigningRequestSpec instance) { + this.copyInstance(instance); + } + private Integer expirationSeconds; + private Map> extra; + private List groups; + private List request; + private String signerName; + private String uid; + private List usages; + private String username; + + protected void copyInstance(V1CertificateSigningRequestSpec instance) { + instance = (instance != null ? instance : new V1CertificateSigningRequestSpec()); + if (instance != null) { + this.withExpirationSeconds(instance.getExpirationSeconds()); + this.withExtra(instance.getExtra()); + this.withGroups(instance.getGroups()); + this.withRequest(instance.getRequest()); + this.withSignerName(instance.getSignerName()); + this.withUid(instance.getUid()); + this.withUsages(instance.getUsages()); + this.withUsername(instance.getUsername()); + } + } + + public Integer getExpirationSeconds() { + return this.expirationSeconds; + } + + public A withExpirationSeconds(Integer expirationSeconds) { + this.expirationSeconds = expirationSeconds; + return (A) this; + } + + public boolean hasExpirationSeconds() { + return this.expirationSeconds != null; + } + + public A addToExtra(String key,List value) { + if(this.extra == null && key != null && value != null) { this.extra = new LinkedHashMap(); } + if(key != null && value != null) {this.extra.put(key, value);} return (A)this; + } + + public A addToExtra(Map> map) { + if(this.extra == null && map != null) { this.extra = new LinkedHashMap(); } + if(map != null) { this.extra.putAll(map);} return (A)this; + } + + public A removeFromExtra(String key) { + if(this.extra == null) { return (A) this; } + if(key != null && this.extra != null) {this.extra.remove(key);} return (A)this; + } + + public A removeFromExtra(Map> map) { + if(this.extra == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.extra != null){this.extra.remove(key);}}} return (A)this; + } + + public Map> getExtra() { + return this.extra; + } + + public A withExtra(Map> extra) { + if (extra == null) { + this.extra = null; + } else { + this.extra = new LinkedHashMap(extra); + } + return (A) this; + } + + public boolean hasExtra() { + return this.extra != null; + } + + public A addToGroups(int index,String item) { + if (this.groups == null) {this.groups = new ArrayList();} + this.groups.add(index, item); + return (A)this; + } + + public A setToGroups(int index,String item) { + if (this.groups == null) {this.groups = new ArrayList();} + this.groups.set(index, item); return (A)this; + } + + public A addToGroups(java.lang.String... items) { + if (this.groups == null) {this.groups = new ArrayList();} + for (String item : items) {this.groups.add(item);} return (A)this; + } + + public A addAllToGroups(Collection items) { + if (this.groups == null) {this.groups = new ArrayList();} + for (String item : items) {this.groups.add(item);} return (A)this; + } + + public A removeFromGroups(java.lang.String... items) { + if (this.groups == null) return (A)this; + for (String item : items) { this.groups.remove(item);} return (A)this; + } + + public A removeAllFromGroups(Collection items) { + if (this.groups == null) return (A)this; + for (String item : items) { this.groups.remove(item);} return (A)this; + } + + public List getGroups() { + return this.groups; + } + + public String getGroup(int index) { + return this.groups.get(index); + } + + public String getFirstGroup() { + return this.groups.get(0); + } + + public String getLastGroup() { + return this.groups.get(groups.size() - 1); + } + + public String getMatchingGroup(Predicate predicate) { + for (String item : groups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingGroup(Predicate predicate) { + for (String item : groups) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withGroups(List groups) { + if (groups != null) { + this.groups = new ArrayList(); + for (String item : groups) { + this.addToGroups(item); + } + } else { + this.groups = null; + } + return (A) this; + } + + public A withGroups(java.lang.String... groups) { + if (this.groups != null) { + this.groups.clear(); + _visitables.remove("groups"); + } + if (groups != null) { + for (String item : groups) { + this.addToGroups(item); + } + } + return (A) this; + } + + public boolean hasGroups() { + return this.groups != null && !this.groups.isEmpty(); + } + + public A withRequest(byte... request) { + if (this.request != null) { + this.request.clear(); + _visitables.remove("request"); + } + if (request != null) { + for (byte item : request) { + this.addToRequest(item); + } + } + return (A) this; + } + + public byte[] getRequest() { + int size = request != null ? request.size() : 0;; + byte[] result = new byte[size];; + if (size == 0) { + return result; + } + int index = 0;; + for (byte item : request) { + result[index++] = item; + } + return result; + } + + public A addToRequest(int index,Byte item) { + if (this.request == null) {this.request = new ArrayList();} + this.request.add(index, item); + return (A)this; + } + + public A setToRequest(int index,Byte item) { + if (this.request == null) {this.request = new ArrayList();} + this.request.set(index, item); return (A)this; + } + + public A addToRequest(java.lang.Byte... items) { + if (this.request == null) {this.request = new ArrayList();} + for (Byte item : items) {this.request.add(item);} return (A)this; + } + + public A addAllToRequest(Collection items) { + if (this.request == null) {this.request = new ArrayList();} + for (Byte item : items) {this.request.add(item);} return (A)this; + } + + public A removeFromRequest(java.lang.Byte... items) { + if (this.request == null) return (A)this; + for (Byte item : items) { this.request.remove(item);} return (A)this; + } + + public A removeAllFromRequest(Collection items) { + if (this.request == null) return (A)this; + for (Byte item : items) { this.request.remove(item);} return (A)this; + } + + public boolean hasRequest() { + return this.request != null && !this.request.isEmpty(); + } + + public String getSignerName() { + return this.signerName; + } + + public A withSignerName(String signerName) { + this.signerName = signerName; + return (A) this; + } + + public boolean hasSignerName() { + return this.signerName != null; + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public A addToUsages(int index,String item) { + if (this.usages == null) {this.usages = new ArrayList();} + this.usages.add(index, item); + return (A)this; + } + + public A setToUsages(int index,String item) { + if (this.usages == null) {this.usages = new ArrayList();} + this.usages.set(index, item); return (A)this; + } + + public A addToUsages(java.lang.String... items) { + if (this.usages == null) {this.usages = new ArrayList();} + for (String item : items) {this.usages.add(item);} return (A)this; + } + + public A addAllToUsages(Collection items) { + if (this.usages == null) {this.usages = new ArrayList();} + for (String item : items) {this.usages.add(item);} return (A)this; + } + + public A removeFromUsages(java.lang.String... items) { + if (this.usages == null) return (A)this; + for (String item : items) { this.usages.remove(item);} return (A)this; + } + + public A removeAllFromUsages(Collection items) { + if (this.usages == null) return (A)this; + for (String item : items) { this.usages.remove(item);} return (A)this; + } + + public List getUsages() { + return this.usages; + } + + public String getUsage(int index) { + return this.usages.get(index); + } + + public String getFirstUsage() { + return this.usages.get(0); + } + + public String getLastUsage() { + return this.usages.get(usages.size() - 1); + } + + public String getMatchingUsage(Predicate predicate) { + for (String item : usages) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingUsage(Predicate predicate) { + for (String item : usages) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withUsages(List usages) { + if (usages != null) { + this.usages = new ArrayList(); + for (String item : usages) { + this.addToUsages(item); + } + } else { + this.usages = null; + } + return (A) this; + } + + public A withUsages(java.lang.String... usages) { + if (this.usages != null) { + this.usages.clear(); + _visitables.remove("usages"); + } + if (usages != null) { + for (String item : usages) { + this.addToUsages(item); + } + } + return (A) this; + } + + public boolean hasUsages() { + return this.usages != null && !this.usages.isEmpty(); + } + + public String getUsername() { + return this.username; + } + + public A withUsername(String username) { + this.username = username; + return (A) this; + } + + public boolean hasUsername() { + return this.username != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CertificateSigningRequestSpecFluent that = (V1CertificateSigningRequestSpecFluent) o; + if (!java.util.Objects.equals(expirationSeconds, that.expirationSeconds)) return false; + if (!java.util.Objects.equals(extra, that.extra)) return false; + if (!java.util.Objects.equals(groups, that.groups)) return false; + if (!java.util.Objects.equals(request, that.request)) return false; + if (!java.util.Objects.equals(signerName, that.signerName)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + if (!java.util.Objects.equals(usages, that.usages)) return false; + if (!java.util.Objects.equals(username, that.username)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(expirationSeconds, extra, groups, request, signerName, uid, usages, username, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (expirationSeconds != null) { sb.append("expirationSeconds:"); sb.append(expirationSeconds + ","); } + if (extra != null && !extra.isEmpty()) { sb.append("extra:"); sb.append(extra + ","); } + if (groups != null && !groups.isEmpty()) { sb.append("groups:"); sb.append(groups + ","); } + if (request != null && !request.isEmpty()) { sb.append("request:"); sb.append(request + ","); } + if (signerName != null) { sb.append("signerName:"); sb.append(signerName + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid + ","); } + if (usages != null && !usages.isEmpty()) { sb.append("usages:"); sb.append(usages + ","); } + if (username != null) { sb.append("username:"); sb.append(username); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecFluentImpl.java deleted file mode 100644 index 57bd95efec..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestSpecFluentImpl.java +++ /dev/null @@ -1,292 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Byte; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CertificateSigningRequestSpecFluentImpl> extends BaseFluent implements V1CertificateSigningRequestSpecFluent{ - public V1CertificateSigningRequestSpecFluentImpl() { - } - public V1CertificateSigningRequestSpecFluentImpl(V1CertificateSigningRequestSpec instance) { - if (instance != null) { - this.withExpirationSeconds(instance.getExpirationSeconds()); - this.withExtra(instance.getExtra()); - this.withGroups(instance.getGroups()); - this.withRequest(instance.getRequest()); - this.withSignerName(instance.getSignerName()); - this.withUid(instance.getUid()); - this.withUsages(instance.getUsages()); - this.withUsername(instance.getUsername()); - } - } - private Integer expirationSeconds; - private Map> extra; - private List groups; - private List request; - private String signerName; - private String uid; - private List usages; - private String username; - public Integer getExpirationSeconds() { - return this.expirationSeconds; - } - public A withExpirationSeconds(Integer expirationSeconds) { - this.expirationSeconds=expirationSeconds; return (A) this; - } - public Boolean hasExpirationSeconds() { - return this.expirationSeconds != null; - } - public A addToExtra(String key,List value) { - if(this.extra == null && key != null && value != null) { this.extra = new LinkedHashMap(); } - if(key != null && value != null) {this.extra.put(key, value);} return (A)this; - } - public A addToExtra(Map> map) { - if(this.extra == null && map != null) { this.extra = new LinkedHashMap(); } - if(map != null) { this.extra.putAll(map);} return (A)this; - } - public A removeFromExtra(String key) { - if(this.extra == null) { return (A) this; } - if(key != null && this.extra != null) {this.extra.remove(key);} return (A)this; - } - public A removeFromExtra(Map> map) { - if(this.extra == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.extra != null){this.extra.remove(key);}}} return (A)this; - } - public Map> getExtra() { - return this.extra; - } - public A withExtra(Map> extra) { - if (extra == null) { this.extra = null;} else {this.extra = new LinkedHashMap(extra);} return (A) this; - } - public Boolean hasExtra() { - return this.extra != null; - } - public A addToGroups(int index,String item) { - if (this.groups == null) {this.groups = new ArrayList();} - this.groups.add(index, item); - return (A)this; - } - public A setToGroups(int index,String item) { - if (this.groups == null) {this.groups = new ArrayList();} - this.groups.set(index, item); return (A)this; - } - public A addToGroups(java.lang.String... items) { - if (this.groups == null) {this.groups = new ArrayList();} - for (String item : items) {this.groups.add(item);} return (A)this; - } - public A addAllToGroups(Collection items) { - if (this.groups == null) {this.groups = new ArrayList();} - for (String item : items) {this.groups.add(item);} return (A)this; - } - public A removeFromGroups(java.lang.String... items) { - for (String item : items) {if (this.groups!= null){ this.groups.remove(item);}} return (A)this; - } - public A removeAllFromGroups(Collection items) { - for (String item : items) {if (this.groups!= null){ this.groups.remove(item);}} return (A)this; - } - public List getGroups() { - return this.groups; - } - public String getGroup(int index) { - return this.groups.get(index); - } - public String getFirstGroup() { - return this.groups.get(0); - } - public String getLastGroup() { - return this.groups.get(groups.size() - 1); - } - public String getMatchingGroup(Predicate predicate) { - for (String item: groups) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingGroup(Predicate predicate) { - for (String item: groups) { if(predicate.test(item)){ return true;} } return false; - } - public A withGroups(List groups) { - if (groups != null) {this.groups = new ArrayList(); for (String item : groups){this.addToGroups(item);}} else { this.groups = null;} return (A) this; - } - public A withGroups(java.lang.String... groups) { - if (this.groups != null) {this.groups.clear(); _visitables.remove("groups"); } - if (groups != null) {for (String item :groups){ this.addToGroups(item);}} return (A) this; - } - public Boolean hasGroups() { - return groups != null && !groups.isEmpty(); - } - public A withRequest(byte... request) { - if (this.request != null) {this.request.clear(); _visitables.remove("request"); } - if (request != null) {for (byte item :request){ this.addToRequest(item);}} return (A) this; - } - public byte[] getRequest() { - //This needs to work with primitives, so we use arrays. -int size = request != null ? request.size() : 0; -byte[] result = new byte[size]; -if (size == 0) { - return result; -} -int index = 0; -for (byte item : request) { - result[index++]=item; -} -return result; - - } - public A addToRequest(int index,Byte item) { - if (this.request == null) {this.request = new ArrayList();} - this.request.add(index, item); - return (A)this; - } - public A setToRequest(int index,Byte item) { - if (this.request == null) {this.request = new ArrayList();} - this.request.set(index, item); return (A)this; - } - public A addToRequest(java.lang.Byte... items) { - if (this.request == null) {this.request = new ArrayList();} - for (Byte item : items) {this.request.add(item);} return (A)this; - } - public A addAllToRequest(Collection items) { - if (this.request == null) {this.request = new ArrayList();} - for (Byte item : items) {this.request.add(item);} return (A)this; - } - public A removeFromRequest(java.lang.Byte... items) { - for (Byte item : items) {if (this.request!= null){ this.request.remove(item);}} return (A)this; - } - public A removeAllFromRequest(Collection items) { - for (Byte item : items) {if (this.request!= null){ this.request.remove(item);}} return (A)this; - } - public Boolean hasRequest() { - return request != null && !request.isEmpty(); - } - public String getSignerName() { - return this.signerName; - } - public A withSignerName(String signerName) { - this.signerName=signerName; return (A) this; - } - public Boolean hasSignerName() { - return this.signerName != null; - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public A addToUsages(int index,String item) { - if (this.usages == null) {this.usages = new ArrayList();} - this.usages.add(index, item); - return (A)this; - } - public A setToUsages(int index,String item) { - if (this.usages == null) {this.usages = new ArrayList();} - this.usages.set(index, item); return (A)this; - } - public A addToUsages(java.lang.String... items) { - if (this.usages == null) {this.usages = new ArrayList();} - for (String item : items) {this.usages.add(item);} return (A)this; - } - public A addAllToUsages(Collection items) { - if (this.usages == null) {this.usages = new ArrayList();} - for (String item : items) {this.usages.add(item);} return (A)this; - } - public A removeFromUsages(java.lang.String... items) { - for (String item : items) {if (this.usages!= null){ this.usages.remove(item);}} return (A)this; - } - public A removeAllFromUsages(Collection items) { - for (String item : items) {if (this.usages!= null){ this.usages.remove(item);}} return (A)this; - } - public List getUsages() { - return this.usages; - } - public String getUsage(int index) { - return this.usages.get(index); - } - public String getFirstUsage() { - return this.usages.get(0); - } - public String getLastUsage() { - return this.usages.get(usages.size() - 1); - } - public String getMatchingUsage(Predicate predicate) { - for (String item: usages) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingUsage(Predicate predicate) { - for (String item: usages) { if(predicate.test(item)){ return true;} } return false; - } - public A withUsages(List usages) { - if (usages != null) {this.usages = new ArrayList(); for (String item : usages){this.addToUsages(item);}} else { this.usages = null;} return (A) this; - } - public A withUsages(java.lang.String... usages) { - if (this.usages != null) {this.usages.clear(); _visitables.remove("usages"); } - if (usages != null) {for (String item :usages){ this.addToUsages(item);}} return (A) this; - } - public Boolean hasUsages() { - return usages != null && !usages.isEmpty(); - } - public String getUsername() { - return this.username; - } - public A withUsername(String username) { - this.username=username; return (A) this; - } - public Boolean hasUsername() { - return this.username != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CertificateSigningRequestSpecFluentImpl that = (V1CertificateSigningRequestSpecFluentImpl) o; - if (!java.util.Objects.equals(expirationSeconds, that.expirationSeconds)) return false; - - if (!java.util.Objects.equals(extra, that.extra)) return false; - - if (!java.util.Objects.equals(groups, that.groups)) return false; - - if (!java.util.Objects.equals(request, that.request)) return false; - - if (!java.util.Objects.equals(signerName, that.signerName)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - if (!java.util.Objects.equals(usages, that.usages)) return false; - - if (!java.util.Objects.equals(username, that.username)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(expirationSeconds, extra, groups, request, signerName, uid, usages, username, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (expirationSeconds != null) { sb.append("expirationSeconds:"); sb.append(expirationSeconds + ","); } - if (extra != null && !extra.isEmpty()) { sb.append("extra:"); sb.append(extra + ","); } - if (groups != null && !groups.isEmpty()) { sb.append("groups:"); sb.append(groups + ","); } - if (request != null && !request.isEmpty()) { sb.append("request:"); sb.append(request + ","); } - if (signerName != null) { sb.append("signerName:"); sb.append(signerName + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid + ","); } - if (usages != null && !usages.isEmpty()) { sb.append("usages:"); sb.append(usages + ","); } - if (username != null) { sb.append("username:"); sb.append(username); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusBuilder.java index e5f8f772d7..61d2f62116 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CertificateSigningRequestStatusBuilder extends V1CertificateSigningRequestStatusFluentImpl implements VisitableBuilder{ +public class V1CertificateSigningRequestStatusBuilder extends V1CertificateSigningRequestStatusFluent implements VisitableBuilder{ public V1CertificateSigningRequestStatusBuilder() { - this(false); - } - public V1CertificateSigningRequestStatusBuilder(Boolean validationEnabled) { - this(new V1CertificateSigningRequestStatus(), validationEnabled); + this(new V1CertificateSigningRequestStatus()); } + public V1CertificateSigningRequestStatusBuilder(V1CertificateSigningRequestStatusFluent fluent) { - this(fluent, false); - } - public V1CertificateSigningRequestStatusBuilder(V1CertificateSigningRequestStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CertificateSigningRequestStatus(), validationEnabled); + this(fluent, new V1CertificateSigningRequestStatus()); } + public V1CertificateSigningRequestStatusBuilder(V1CertificateSigningRequestStatusFluent fluent,V1CertificateSigningRequestStatus instance) { - this(fluent, instance, false); - } - public V1CertificateSigningRequestStatusBuilder(V1CertificateSigningRequestStatusFluent fluent,V1CertificateSigningRequestStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCertificate(instance.getCertificate()); - fluent.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CertificateSigningRequestStatusBuilder(V1CertificateSigningRequestStatus instance) { - this(instance,false); - } - public V1CertificateSigningRequestStatusBuilder(V1CertificateSigningRequestStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCertificate(instance.getCertificate()); - this.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CertificateSigningRequestStatusFluent fluent; - Boolean validationEnabled; + public V1CertificateSigningRequestStatus build() { V1CertificateSigningRequestStatus buildable = new V1CertificateSigningRequestStatus(); buildable.setCertificate(fluent.getCertificate()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusFluent.java index 117614e2a2..12cc0067e7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusFluent.java @@ -1,65 +1,291 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; import java.lang.Byte; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CertificateSigningRequestStatusFluent> extends Fluent{ - public A withCertificate(byte... certificate); - public byte[] getCertificate(); - public A addToCertificate(int index,Byte item); - public A setToCertificate(int index,Byte item); - public A addToCertificate(java.lang.Byte... items); - public A addAllToCertificate(Collection items); - public A removeFromCertificate(java.lang.Byte... items); - public A removeAllFromCertificate(Collection items); - public Boolean hasCertificate(); - public A addToConditions(int index,V1CertificateSigningRequestCondition item); - public A setToConditions(int index,V1CertificateSigningRequestCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1CertificateSigningRequestCondition buildCondition(int index); - public V1CertificateSigningRequestCondition buildFirstCondition(); - public V1CertificateSigningRequestCondition buildLastCondition(); - public V1CertificateSigningRequestCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition... conditions); - public Boolean hasConditions(); - public V1CertificateSigningRequestStatusFluent.ConditionsNested addNewCondition(); - public V1CertificateSigningRequestStatusFluent.ConditionsNested addNewConditionLike(V1CertificateSigningRequestCondition item); - public V1CertificateSigningRequestStatusFluent.ConditionsNested setNewConditionLike(int index,V1CertificateSigningRequestCondition item); - public V1CertificateSigningRequestStatusFluent.ConditionsNested editCondition(int index); - public V1CertificateSigningRequestStatusFluent.ConditionsNested editFirstCondition(); - public V1CertificateSigningRequestStatusFluent.ConditionsNested editLastCondition(); - public V1CertificateSigningRequestStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public interface ConditionsNested extends Nested,V1CertificateSigningRequestConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CertificateSigningRequestStatusFluent> extends BaseFluent{ + public V1CertificateSigningRequestStatusFluent() { + } + + public V1CertificateSigningRequestStatusFluent(V1CertificateSigningRequestStatus instance) { + this.copyInstance(instance); + } + private List certificate; + private ArrayList conditions; + + protected void copyInstance(V1CertificateSigningRequestStatus instance) { + instance = (instance != null ? instance : new V1CertificateSigningRequestStatus()); + if (instance != null) { + this.withCertificate(instance.getCertificate()); + this.withConditions(instance.getConditions()); + } + } + + public A withCertificate(byte... certificate) { + if (this.certificate != null) { + this.certificate.clear(); + _visitables.remove("certificate"); + } + if (certificate != null) { + for (byte item : certificate) { + this.addToCertificate(item); + } + } + return (A) this; + } + + public byte[] getCertificate() { + int size = certificate != null ? certificate.size() : 0;; + byte[] result = new byte[size];; + if (size == 0) { + return result; + } + int index = 0;; + for (byte item : certificate) { + result[index++] = item; + } + return result; + } + + public A addToCertificate(int index,Byte item) { + if (this.certificate == null) {this.certificate = new ArrayList();} + this.certificate.add(index, item); + return (A)this; + } + + public A setToCertificate(int index,Byte item) { + if (this.certificate == null) {this.certificate = new ArrayList();} + this.certificate.set(index, item); return (A)this; + } + + public A addToCertificate(java.lang.Byte... items) { + if (this.certificate == null) {this.certificate = new ArrayList();} + for (Byte item : items) {this.certificate.add(item);} return (A)this; + } + + public A addAllToCertificate(Collection items) { + if (this.certificate == null) {this.certificate = new ArrayList();} + for (Byte item : items) {this.certificate.add(item);} return (A)this; + } + + public A removeFromCertificate(java.lang.Byte... items) { + if (this.certificate == null) return (A)this; + for (Byte item : items) { this.certificate.remove(item);} return (A)this; + } + + public A removeAllFromCertificate(Collection items) { + if (this.certificate == null) return (A)this; + for (Byte item : items) { this.certificate.remove(item);} return (A)this; + } + + public boolean hasCertificate() { + return this.certificate != null && !this.certificate.isEmpty(); + } + + public A addToConditions(int index,V1CertificateSigningRequestCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1CertificateSigningRequestCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1CertificateSigningRequestCondition item : items) {V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1CertificateSigningRequestCondition item : items) {V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition... items) { + if (this.conditions == null) return (A)this; + for (V1CertificateSigningRequestCondition item : items) {V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1CertificateSigningRequestCondition item : items) {V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1CertificateSigningRequestConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1CertificateSigningRequestCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1CertificateSigningRequestCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1CertificateSigningRequestCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1CertificateSigningRequestCondition buildMatchingCondition(Predicate predicate) { + for (V1CertificateSigningRequestConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1CertificateSigningRequestConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1CertificateSigningRequestCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1CertificateSigningRequestCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1CertificateSigningRequestCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1CertificateSigningRequestCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1CertificateSigningRequestConditionFluent> implements Nested{ + ConditionsNested(int index,V1CertificateSigningRequestCondition item) { + this.index = index; + this.builder = new V1CertificateSigningRequestConditionBuilder(this, item); + } + V1CertificateSigningRequestConditionBuilder builder; + int index; + + public N and() { + return (N) V1CertificateSigningRequestStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusFluentImpl.java deleted file mode 100644 index 9322deb610..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CertificateSigningRequestStatusFluentImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import java.lang.Byte; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CertificateSigningRequestStatusFluentImpl> extends BaseFluent implements V1CertificateSigningRequestStatusFluent{ - public V1CertificateSigningRequestStatusFluentImpl() { - } - public V1CertificateSigningRequestStatusFluentImpl(V1CertificateSigningRequestStatus instance) { - if (instance != null) { - this.withCertificate(instance.getCertificate()); - this.withConditions(instance.getConditions()); - } - } - private List certificate; - private ArrayList conditions; - public A withCertificate(byte... certificate) { - if (this.certificate != null) {this.certificate.clear(); _visitables.remove("certificate"); } - if (certificate != null) {for (byte item :certificate){ this.addToCertificate(item);}} return (A) this; - } - public byte[] getCertificate() { - //This needs to work with primitives, so we use arrays. -int size = certificate != null ? certificate.size() : 0; -byte[] result = new byte[size]; -if (size == 0) { - return result; -} -int index = 0; -for (byte item : certificate) { - result[index++]=item; -} -return result; - - } - public A addToCertificate(int index,Byte item) { - if (this.certificate == null) {this.certificate = new ArrayList();} - this.certificate.add(index, item); - return (A)this; - } - public A setToCertificate(int index,Byte item) { - if (this.certificate == null) {this.certificate = new ArrayList();} - this.certificate.set(index, item); return (A)this; - } - public A addToCertificate(java.lang.Byte... items) { - if (this.certificate == null) {this.certificate = new ArrayList();} - for (Byte item : items) {this.certificate.add(item);} return (A)this; - } - public A addAllToCertificate(Collection items) { - if (this.certificate == null) {this.certificate = new ArrayList();} - for (Byte item : items) {this.certificate.add(item);} return (A)this; - } - public A removeFromCertificate(java.lang.Byte... items) { - for (Byte item : items) {if (this.certificate!= null){ this.certificate.remove(item);}} return (A)this; - } - public A removeAllFromCertificate(Collection items) { - for (Byte item : items) {if (this.certificate!= null){ this.certificate.remove(item);}} return (A)this; - } - public Boolean hasCertificate() { - return certificate != null && !certificate.isEmpty(); - } - public A addToConditions(int index,V1CertificateSigningRequestCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1CertificateSigningRequestCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1CertificateSigningRequestCondition item : items) {V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1CertificateSigningRequestCondition item : items) {V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition... items) { - for (V1CertificateSigningRequestCondition item : items) {V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1CertificateSigningRequestCondition item : items) {V1CertificateSigningRequestConditionBuilder builder = new V1CertificateSigningRequestConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1CertificateSigningRequestConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1CertificateSigningRequestCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1CertificateSigningRequestCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1CertificateSigningRequestCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1CertificateSigningRequestCondition buildMatchingCondition(Predicate predicate) { - for (V1CertificateSigningRequestConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1CertificateSigningRequestConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1CertificateSigningRequestCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1CertificateSigningRequestCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1CertificateSigningRequestCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1CertificateSigningRequestStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1CertificateSigningRequestStatusFluentImpl.ConditionsNestedImpl(); - } - public V1CertificateSigningRequestStatusFluentImpl.ConditionsNested addNewConditionLike(V1CertificateSigningRequestCondition item) { - return new V1CertificateSigningRequestStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1CertificateSigningRequestStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1CertificateSigningRequestCondition item) { - return new V1CertificateSigningRequestStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1CertificateSigningRequestStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1CertificateSigningRequestStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1CertificateSigningRequestStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1CertificateSigningRequestStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1CertificateSigningRequestConditionFluentImpl> implements V1CertificateSigningRequestStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1CertificateSigningRequestCondition item) { - this.index = index; - this.builder = new V1CertificateSigningRequestConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1CertificateSigningRequestConditionBuilder(this); - } - V1CertificateSigningRequestConditionBuilder builder; - int index; - public N and() { - return (N) V1CertificateSigningRequestStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceBuilder.java index 9dbb56f4a5..cc8cca8a00 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CinderPersistentVolumeSourceBuilder extends V1CinderPersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1CinderPersistentVolumeSourceBuilder extends V1CinderPersistentVolumeSourceFluent implements VisitableBuilder{ public V1CinderPersistentVolumeSourceBuilder() { - this(false); - } - public V1CinderPersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1CinderPersistentVolumeSource(), validationEnabled); + this(new V1CinderPersistentVolumeSource()); } + public V1CinderPersistentVolumeSourceBuilder(V1CinderPersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1CinderPersistentVolumeSourceBuilder(V1CinderPersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CinderPersistentVolumeSource(), validationEnabled); + this(fluent, new V1CinderPersistentVolumeSource()); } + public V1CinderPersistentVolumeSourceBuilder(V1CinderPersistentVolumeSourceFluent fluent,V1CinderPersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1CinderPersistentVolumeSourceBuilder(V1CinderPersistentVolumeSourceFluent fluent,V1CinderPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withVolumeID(instance.getVolumeID()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CinderPersistentVolumeSourceBuilder(V1CinderPersistentVolumeSource instance) { - this(instance,false); - } - public V1CinderPersistentVolumeSourceBuilder(V1CinderPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withVolumeID(instance.getVolumeID()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CinderPersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1CinderPersistentVolumeSource build() { V1CinderPersistentVolumeSource buildable = new V1CinderPersistentVolumeSource(); buildable.setFsType(fluent.getFsType()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setVolumeID(fluent.getVolumeID()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceFluent.java index fcb438f3b9..77b7d41e5f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceFluent.java @@ -1,45 +1,162 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; - /** - * Generated - */ -public interface V1CinderPersistentVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef(); - public V1SecretReference buildSecretRef(); - public A withSecretRef(V1SecretReference secretRef); - public Boolean hasSecretRef(); - public V1CinderPersistentVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1CinderPersistentVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1SecretReference item); - public V1CinderPersistentVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1CinderPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1CinderPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1SecretReference item); - public String getVolumeID(); - public A withVolumeID(String volumeID); - public Boolean hasVolumeID(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CinderPersistentVolumeSourceFluent> extends BaseFluent{ + public V1CinderPersistentVolumeSourceFluent() { + } + + public V1CinderPersistentVolumeSourceFluent(V1CinderPersistentVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private Boolean readOnly; + private V1SecretReferenceBuilder secretRef; + private String volumeID; + + protected void copyInstance(V1CinderPersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1CinderPersistentVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withVolumeID(instance.getVolumeID()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1SecretReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1SecretReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1SecretReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1SecretReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getVolumeID() { + return this.volumeID; + } + + public A withVolumeID(String volumeID) { + this.volumeID = volumeID; + return (A) this; + } + + public boolean hasVolumeID() { + return this.volumeID != null; } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CinderPersistentVolumeSourceFluent that = (V1CinderPersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(volumeID, that.volumeID)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, readOnly, secretRef, volumeID, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (volumeID != null) { sb.append("volumeID:"); sb.append(volumeID); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1SecretReferenceFluent> implements Nested{ + SecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1CinderPersistentVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceFluentImpl.java deleted file mode 100644 index 9ae8ed7bf6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,139 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CinderPersistentVolumeSourceFluentImpl> extends BaseFluent implements V1CinderPersistentVolumeSourceFluent{ - public V1CinderPersistentVolumeSourceFluentImpl() { - } - public V1CinderPersistentVolumeSourceFluentImpl(V1CinderPersistentVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withVolumeID(instance.getVolumeID()); - } - } - private String fsType; - private Boolean readOnly; - private V1SecretReferenceBuilder secretRef; - private String volumeID; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1SecretReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1SecretReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1SecretReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1CinderPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1CinderPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1CinderPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1SecretReference item) { - return new V1CinderPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1CinderPersistentVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1CinderPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1CinderPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getVolumeID() { - return this.volumeID; - } - public A withVolumeID(String volumeID) { - this.volumeID=volumeID; return (A) this; - } - public Boolean hasVolumeID() { - return this.volumeID != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CinderPersistentVolumeSourceFluentImpl that = (V1CinderPersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(volumeID, that.volumeID)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, readOnly, secretRef, volumeID, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (volumeID != null) { sb.append("volumeID:"); sb.append(volumeID); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CinderPersistentVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1CinderPersistentVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceBuilder.java index dfc2152d64..7e8bef0d80 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CinderVolumeSourceBuilder extends V1CinderVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1CinderVolumeSourceBuilder extends V1CinderVolumeSourceFluent implements VisitableBuilder{ public V1CinderVolumeSourceBuilder() { - this(false); - } - public V1CinderVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1CinderVolumeSource(), validationEnabled); + this(new V1CinderVolumeSource()); } + public V1CinderVolumeSourceBuilder(V1CinderVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1CinderVolumeSourceBuilder(V1CinderVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CinderVolumeSource(), validationEnabled); + this(fluent, new V1CinderVolumeSource()); } + public V1CinderVolumeSourceBuilder(V1CinderVolumeSourceFluent fluent,V1CinderVolumeSource instance) { - this(fluent, instance, false); - } - public V1CinderVolumeSourceBuilder(V1CinderVolumeSourceFluent fluent,V1CinderVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withVolumeID(instance.getVolumeID()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CinderVolumeSourceBuilder(V1CinderVolumeSource instance) { - this(instance,false); - } - public V1CinderVolumeSourceBuilder(V1CinderVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withVolumeID(instance.getVolumeID()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CinderVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1CinderVolumeSource build() { V1CinderVolumeSource buildable = new V1CinderVolumeSource(); buildable.setFsType(fluent.getFsType()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setVolumeID(fluent.getVolumeID()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceFluent.java index 2ed3a95625..f55af79f5b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceFluent.java @@ -1,45 +1,162 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; - /** - * Generated - */ -public interface V1CinderVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef(); - public V1LocalObjectReference buildSecretRef(); - public A withSecretRef(V1LocalObjectReference secretRef); - public Boolean hasSecretRef(); - public V1CinderVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1CinderVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item); - public V1CinderVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1CinderVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1CinderVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item); - public String getVolumeID(); - public A withVolumeID(String volumeID); - public Boolean hasVolumeID(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CinderVolumeSourceFluent> extends BaseFluent{ + public V1CinderVolumeSourceFluent() { + } + + public V1CinderVolumeSourceFluent(V1CinderVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private Boolean readOnly; + private V1LocalObjectReferenceBuilder secretRef; + private String volumeID; + + protected void copyInstance(V1CinderVolumeSource instance) { + instance = (instance != null ? instance : new V1CinderVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withVolumeID(instance.getVolumeID()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1LocalObjectReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1LocalObjectReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1LocalObjectReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1LocalObjectReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getVolumeID() { + return this.volumeID; + } + + public A withVolumeID(String volumeID) { + this.volumeID = volumeID; + return (A) this; + } + + public boolean hasVolumeID() { + return this.volumeID != null; } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CinderVolumeSourceFluent that = (V1CinderVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(volumeID, that.volumeID)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, readOnly, secretRef, volumeID, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (volumeID != null) { sb.append("volumeID:"); sb.append(volumeID); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1LocalObjectReferenceFluent> implements Nested{ + SecretRefNested(V1LocalObjectReference item) { + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1CinderVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceFluentImpl.java deleted file mode 100644 index f8f79ab80f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CinderVolumeSourceFluentImpl.java +++ /dev/null @@ -1,139 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CinderVolumeSourceFluentImpl> extends BaseFluent implements V1CinderVolumeSourceFluent{ - public V1CinderVolumeSourceFluentImpl() { - } - public V1CinderVolumeSourceFluentImpl(V1CinderVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withVolumeID(instance.getVolumeID()); - } - } - private String fsType; - private Boolean readOnly; - private V1LocalObjectReferenceBuilder secretRef; - private String volumeID; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1LocalObjectReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1LocalObjectReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1LocalObjectReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1CinderVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1CinderVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1CinderVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { - return new V1CinderVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1CinderVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1CinderVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1LocalObjectReferenceBuilder().build()); - } - public V1CinderVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getVolumeID() { - return this.volumeID; - } - public A withVolumeID(String volumeID) { - this.volumeID=volumeID; return (A) this; - } - public Boolean hasVolumeID() { - return this.volumeID != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CinderVolumeSourceFluentImpl that = (V1CinderVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(volumeID, that.volumeID)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, readOnly, secretRef, volumeID, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (volumeID != null) { sb.append("volumeID:"); sb.append(volumeID); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1CinderVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1LocalObjectReference item) { - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - public N and() { - return (N) V1CinderVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceBuilder.java index 870c8a596d..af06c7eea8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ClaimSourceBuilder extends V1ClaimSourceFluentImpl implements VisitableBuilder{ +public class V1ClaimSourceBuilder extends V1ClaimSourceFluent implements VisitableBuilder{ public V1ClaimSourceBuilder() { - this(false); - } - public V1ClaimSourceBuilder(Boolean validationEnabled) { - this(new V1ClaimSource(), validationEnabled); + this(new V1ClaimSource()); } + public V1ClaimSourceBuilder(V1ClaimSourceFluent fluent) { - this(fluent, false); - } - public V1ClaimSourceBuilder(V1ClaimSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ClaimSource(), validationEnabled); + this(fluent, new V1ClaimSource()); } + public V1ClaimSourceBuilder(V1ClaimSourceFluent fluent,V1ClaimSource instance) { - this(fluent, instance, false); - } - public V1ClaimSourceBuilder(V1ClaimSourceFluent fluent,V1ClaimSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withResourceClaimName(instance.getResourceClaimName()); - fluent.withResourceClaimTemplateName(instance.getResourceClaimTemplateName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ClaimSourceBuilder(V1ClaimSource instance) { - this(instance,false); - } - public V1ClaimSourceBuilder(V1ClaimSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withResourceClaimName(instance.getResourceClaimName()); - this.withResourceClaimTemplateName(instance.getResourceClaimTemplateName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ClaimSourceFluent fluent; - Boolean validationEnabled; + public V1ClaimSource build() { V1ClaimSource buildable = new V1ClaimSource(); buildable.setResourceClaimName(fluent.getResourceClaimName()); @@ -46,4 +28,5 @@ public V1ClaimSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceFluent.java index 252b4dfc08..c91ddb7043 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ClaimSourceFluent> extends Fluent{ - public String getResourceClaimName(); - public A withResourceClaimName(String resourceClaimName); - public Boolean hasResourceClaimName(); - public String getResourceClaimTemplateName(); - public A withResourceClaimTemplateName(String resourceClaimTemplateName); - public Boolean hasResourceClaimTemplateName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ClaimSourceFluent> extends BaseFluent{ + public V1ClaimSourceFluent() { + } + public V1ClaimSourceFluent(V1ClaimSource instance) { + this.copyInstance(instance); + } + private String resourceClaimName; + private String resourceClaimTemplateName; + + protected void copyInstance(V1ClaimSource instance) { + instance = (instance != null ? instance : new V1ClaimSource()); + if (instance != null) { + this.withResourceClaimName(instance.getResourceClaimName()); + this.withResourceClaimTemplateName(instance.getResourceClaimTemplateName()); + } + } + + public String getResourceClaimName() { + return this.resourceClaimName; + } + + public A withResourceClaimName(String resourceClaimName) { + this.resourceClaimName = resourceClaimName; + return (A) this; + } + + public boolean hasResourceClaimName() { + return this.resourceClaimName != null; + } + + public String getResourceClaimTemplateName() { + return this.resourceClaimTemplateName; + } + + public A withResourceClaimTemplateName(String resourceClaimTemplateName) { + this.resourceClaimTemplateName = resourceClaimTemplateName; + return (A) this; + } + + public boolean hasResourceClaimTemplateName() { + return this.resourceClaimTemplateName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ClaimSourceFluent that = (V1ClaimSourceFluent) o; + if (!java.util.Objects.equals(resourceClaimName, that.resourceClaimName)) return false; + if (!java.util.Objects.equals(resourceClaimTemplateName, that.resourceClaimTemplateName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(resourceClaimName, resourceClaimTemplateName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (resourceClaimName != null) { sb.append("resourceClaimName:"); sb.append(resourceClaimName + ","); } + if (resourceClaimTemplateName != null) { sb.append("resourceClaimTemplateName:"); sb.append(resourceClaimTemplateName); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceFluentImpl.java deleted file mode 100644 index 8e3915ae09..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClaimSourceFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ClaimSourceFluentImpl> extends BaseFluent implements V1ClaimSourceFluent{ - public V1ClaimSourceFluentImpl() { - } - public V1ClaimSourceFluentImpl(V1ClaimSource instance) { - if (instance != null) { - this.withResourceClaimName(instance.getResourceClaimName()); - this.withResourceClaimTemplateName(instance.getResourceClaimTemplateName()); - } - } - private String resourceClaimName; - private String resourceClaimTemplateName; - public String getResourceClaimName() { - return this.resourceClaimName; - } - public A withResourceClaimName(String resourceClaimName) { - this.resourceClaimName=resourceClaimName; return (A) this; - } - public Boolean hasResourceClaimName() { - return this.resourceClaimName != null; - } - public String getResourceClaimTemplateName() { - return this.resourceClaimTemplateName; - } - public A withResourceClaimTemplateName(String resourceClaimTemplateName) { - this.resourceClaimTemplateName=resourceClaimTemplateName; return (A) this; - } - public Boolean hasResourceClaimTemplateName() { - return this.resourceClaimTemplateName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ClaimSourceFluentImpl that = (V1ClaimSourceFluentImpl) o; - if (!java.util.Objects.equals(resourceClaimName, that.resourceClaimName)) return false; - - if (!java.util.Objects.equals(resourceClaimTemplateName, that.resourceClaimTemplateName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(resourceClaimName, resourceClaimTemplateName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (resourceClaimName != null) { sb.append("resourceClaimName:"); sb.append(resourceClaimName + ","); } - if (resourceClaimTemplateName != null) { sb.append("resourceClaimTemplateName:"); sb.append(resourceClaimTemplateName); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigBuilder.java index 4147038ab7..739a65c16c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ClientIPConfigBuilder extends V1ClientIPConfigFluentImpl implements VisitableBuilder{ +public class V1ClientIPConfigBuilder extends V1ClientIPConfigFluent implements VisitableBuilder{ public V1ClientIPConfigBuilder() { - this(false); - } - public V1ClientIPConfigBuilder(Boolean validationEnabled) { - this(new V1ClientIPConfig(), validationEnabled); + this(new V1ClientIPConfig()); } + public V1ClientIPConfigBuilder(V1ClientIPConfigFluent fluent) { - this(fluent, false); - } - public V1ClientIPConfigBuilder(V1ClientIPConfigFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ClientIPConfig(), validationEnabled); + this(fluent, new V1ClientIPConfig()); } + public V1ClientIPConfigBuilder(V1ClientIPConfigFluent fluent,V1ClientIPConfig instance) { - this(fluent, instance, false); - } - public V1ClientIPConfigBuilder(V1ClientIPConfigFluent fluent,V1ClientIPConfig instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ClientIPConfigBuilder(V1ClientIPConfig instance) { - this(instance,false); - } - public V1ClientIPConfigBuilder(V1ClientIPConfig instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ClientIPConfigFluent fluent; - Boolean validationEnabled; + public V1ClientIPConfig build() { V1ClientIPConfig buildable = new V1ClientIPConfig(); buildable.setTimeoutSeconds(fluent.getTimeoutSeconds()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigFluent.java index b7a235d47c..79f9bde607 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigFluent.java @@ -1,16 +1,64 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1ClientIPConfigFluent> extends Fluent{ - public Integer getTimeoutSeconds(); - public A withTimeoutSeconds(Integer timeoutSeconds); - public Boolean hasTimeoutSeconds(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ClientIPConfigFluent> extends BaseFluent{ + public V1ClientIPConfigFluent() { + } + public V1ClientIPConfigFluent(V1ClientIPConfig instance) { + this.copyInstance(instance); + } + private Integer timeoutSeconds; + + protected void copyInstance(V1ClientIPConfig instance) { + instance = (instance != null ? instance : new V1ClientIPConfig()); + if (instance != null) { + this.withTimeoutSeconds(instance.getTimeoutSeconds()); + } + } + + public Integer getTimeoutSeconds() { + return this.timeoutSeconds; + } + + public A withTimeoutSeconds(Integer timeoutSeconds) { + this.timeoutSeconds = timeoutSeconds; + return (A) this; + } + + public boolean hasTimeoutSeconds() { + return this.timeoutSeconds != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ClientIPConfigFluent that = (V1ClientIPConfigFluent) o; + if (!java.util.Objects.equals(timeoutSeconds, that.timeoutSeconds)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(timeoutSeconds, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (timeoutSeconds != null) { sb.append("timeoutSeconds:"); sb.append(timeoutSeconds); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigFluentImpl.java deleted file mode 100644 index 61ef321793..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClientIPConfigFluentImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ClientIPConfigFluentImpl> extends BaseFluent implements V1ClientIPConfigFluent{ - public V1ClientIPConfigFluentImpl() { - } - public V1ClientIPConfigFluentImpl(V1ClientIPConfig instance) { - if (instance != null) { - this.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - } - private Integer timeoutSeconds; - public Integer getTimeoutSeconds() { - return this.timeoutSeconds; - } - public A withTimeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds=timeoutSeconds; return (A) this; - } - public Boolean hasTimeoutSeconds() { - return this.timeoutSeconds != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ClientIPConfigFluentImpl that = (V1ClientIPConfigFluentImpl) o; - if (!java.util.Objects.equals(timeoutSeconds, that.timeoutSeconds)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(timeoutSeconds, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (timeoutSeconds != null) { sb.append("timeoutSeconds:"); sb.append(timeoutSeconds); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingBuilder.java index 443a0e724d..96f566833f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ClusterRoleBindingBuilder extends V1ClusterRoleBindingFluentImpl implements VisitableBuilder{ +public class V1ClusterRoleBindingBuilder extends V1ClusterRoleBindingFluent implements VisitableBuilder{ public V1ClusterRoleBindingBuilder() { - this(false); - } - public V1ClusterRoleBindingBuilder(Boolean validationEnabled) { - this(new V1ClusterRoleBinding(), validationEnabled); + this(new V1ClusterRoleBinding()); } + public V1ClusterRoleBindingBuilder(V1ClusterRoleBindingFluent fluent) { - this(fluent, false); - } - public V1ClusterRoleBindingBuilder(V1ClusterRoleBindingFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ClusterRoleBinding(), validationEnabled); + this(fluent, new V1ClusterRoleBinding()); } + public V1ClusterRoleBindingBuilder(V1ClusterRoleBindingFluent fluent,V1ClusterRoleBinding instance) { - this(fluent, instance, false); - } - public V1ClusterRoleBindingBuilder(V1ClusterRoleBindingFluent fluent,V1ClusterRoleBinding instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withRoleRef(instance.getRoleRef()); - fluent.withSubjects(instance.getSubjects()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ClusterRoleBindingBuilder(V1ClusterRoleBinding instance) { - this(instance,false); - } - public V1ClusterRoleBindingBuilder(V1ClusterRoleBinding instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRoleRef(instance.getRoleRef()); - this.withSubjects(instance.getSubjects()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ClusterRoleBindingFluent fluent; - Boolean validationEnabled; + public V1ClusterRoleBinding build() { V1ClusterRoleBinding buildable = new V1ClusterRoleBinding(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setRoleRef(fluent.getRoleRef()); - buildable.setSubjects(fluent.getSubjects()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setRoleRef(fluent.buildRoleRef()); + buildable.setSubjects(fluent.buildSubjects()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingFluent.java index 2524b5a090..c8cac2aa71 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingFluent.java @@ -1,102 +1,379 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1ClusterRoleBindingFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ClusterRoleBindingFluent.MetadataNested withNewMetadata(); - public V1ClusterRoleBindingFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ClusterRoleBindingFluent.MetadataNested editMetadata(); - public V1ClusterRoleBindingFluent.MetadataNested editOrNewMetadata(); - public V1ClusterRoleBindingFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildRoleRef instead. - * @return The buildable object. - */ - @Deprecated - public V1RoleRef getRoleRef(); - public V1RoleRef buildRoleRef(); - public A withRoleRef(V1RoleRef roleRef); - public Boolean hasRoleRef(); - public V1ClusterRoleBindingFluent.RoleRefNested withNewRoleRef(); - public V1ClusterRoleBindingFluent.RoleRefNested withNewRoleRefLike(V1RoleRef item); - public V1ClusterRoleBindingFluent.RoleRefNested editRoleRef(); - public V1ClusterRoleBindingFluent.RoleRefNested editOrNewRoleRef(); - public V1ClusterRoleBindingFluent.RoleRefNested editOrNewRoleRefLike(V1RoleRef item); - public A addToSubjects(int index,V1Subject item); - public A setToSubjects(int index,V1Subject item); - public A addToSubjects(io.kubernetes.client.openapi.models.V1Subject... items); - public A addAllToSubjects(Collection items); - public A removeFromSubjects(io.kubernetes.client.openapi.models.V1Subject... items); - public A removeAllFromSubjects(Collection items); - public A removeMatchingFromSubjects(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSubjects instead. - * @return The buildable object. - */ - @Deprecated - public List getSubjects(); - public List buildSubjects(); - public V1Subject buildSubject(int index); - public V1Subject buildFirstSubject(); - public V1Subject buildLastSubject(); - public V1Subject buildMatchingSubject(Predicate predicate); - public Boolean hasMatchingSubject(Predicate predicate); - public A withSubjects(List subjects); - public A withSubjects(io.kubernetes.client.openapi.models.V1Subject... subjects); - public Boolean hasSubjects(); - public V1ClusterRoleBindingFluent.SubjectsNested addNewSubject(); - public V1ClusterRoleBindingFluent.SubjectsNested addNewSubjectLike(V1Subject item); - public V1ClusterRoleBindingFluent.SubjectsNested setNewSubjectLike(int index,V1Subject item); - public V1ClusterRoleBindingFluent.SubjectsNested editSubject(int index); - public V1ClusterRoleBindingFluent.SubjectsNested editFirstSubject(); - public V1ClusterRoleBindingFluent.SubjectsNested editLastSubject(); - public V1ClusterRoleBindingFluent.SubjectsNested editMatchingSubject(Predicate predicate); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ClusterRoleBindingFluent> extends BaseFluent{ + public V1ClusterRoleBindingFluent() { + } + + public V1ClusterRoleBindingFluent(V1ClusterRoleBinding instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1RoleRefBuilder roleRef; + private ArrayList subjects; + + protected void copyInstance(V1ClusterRoleBinding instance) { + instance = (instance != null ? instance : new V1ClusterRoleBinding()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withRoleRef(instance.getRoleRef()); + this.withSubjects(instance.getSubjects()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1RoleRef buildRoleRef() { + return this.roleRef != null ? this.roleRef.build() : null; + } + + public A withRoleRef(V1RoleRef roleRef) { + this._visitables.remove("roleRef"); + if (roleRef != null) { + this.roleRef = new V1RoleRefBuilder(roleRef); + this._visitables.get("roleRef").add(this.roleRef); + } else { + this.roleRef = null; + this._visitables.get("roleRef").remove(this.roleRef); + } + return (A) this; + } + + public boolean hasRoleRef() { + return this.roleRef != null; + } + + public RoleRefNested withNewRoleRef() { + return new RoleRefNested(null); + } + + public RoleRefNested withNewRoleRefLike(V1RoleRef item) { + return new RoleRefNested(item); + } + + public RoleRefNested editRoleRef() { + return withNewRoleRefLike(java.util.Optional.ofNullable(buildRoleRef()).orElse(null)); + } + + public RoleRefNested editOrNewRoleRef() { + return withNewRoleRefLike(java.util.Optional.ofNullable(buildRoleRef()).orElse(new V1RoleRefBuilder().build())); + } + + public RoleRefNested editOrNewRoleRefLike(V1RoleRef item) { + return withNewRoleRefLike(java.util.Optional.ofNullable(buildRoleRef()).orElse(item)); + } + + public A addToSubjects(int index,V1Subject item) { + if (this.subjects == null) {this.subjects = new ArrayList();} + V1SubjectBuilder builder = new V1SubjectBuilder(item); + if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").add(index, builder); subjects.add(index, builder);} + return (A)this; + } + + public A setToSubjects(int index,V1Subject item) { + if (this.subjects == null) {this.subjects = new ArrayList();} + V1SubjectBuilder builder = new V1SubjectBuilder(item); + if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").set(index, builder); subjects.set(index, builder);} + return (A)this; + } + + public A addToSubjects(io.kubernetes.client.openapi.models.V1Subject... items) { + if (this.subjects == null) {this.subjects = new ArrayList();} + for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; } - public interface RoleRefNested extends Nested,V1RoleRefFluent>{ - public N and(); - public N endRoleRef(); + + public A addAllToSubjects(Collection items) { + if (this.subjects == null) {this.subjects = new ArrayList();} + for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; + } + + public A removeFromSubjects(io.kubernetes.client.openapi.models.V1Subject... items) { + if (this.subjects == null) return (A)this; + for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").remove(builder); this.subjects.remove(builder);} return (A)this; + } + + public A removeAllFromSubjects(Collection items) { + if (this.subjects == null) return (A)this; + for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").remove(builder); this.subjects.remove(builder);} return (A)this; + } + + public A removeMatchingFromSubjects(Predicate predicate) { + if (subjects == null) return (A) this; + final Iterator each = subjects.iterator(); + final List visitables = _visitables.get("subjects"); + while (each.hasNext()) { + V1SubjectBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildSubjects() { + return this.subjects != null ? build(subjects) : null; + } + + public V1Subject buildSubject(int index) { + return this.subjects.get(index).build(); + } + + public V1Subject buildFirstSubject() { + return this.subjects.get(0).build(); + } + + public V1Subject buildLastSubject() { + return this.subjects.get(subjects.size() - 1).build(); + } + + public V1Subject buildMatchingSubject(Predicate predicate) { + for (V1SubjectBuilder item : subjects) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingSubject(Predicate predicate) { + for (V1SubjectBuilder item : subjects) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSubjects(List subjects) { + if (this.subjects != null) { + this._visitables.get("subjects").clear(); + } + if (subjects != null) { + this.subjects = new ArrayList(); + for (V1Subject item : subjects) { + this.addToSubjects(item); + } + } else { + this.subjects = null; + } + return (A) this; + } + + public A withSubjects(io.kubernetes.client.openapi.models.V1Subject... subjects) { + if (this.subjects != null) { + this.subjects.clear(); + _visitables.remove("subjects"); + } + if (subjects != null) { + for (V1Subject item : subjects) { + this.addToSubjects(item); + } + } + return (A) this; + } + + public boolean hasSubjects() { + return this.subjects != null && !this.subjects.isEmpty(); + } + + public SubjectsNested addNewSubject() { + return new SubjectsNested(-1, null); + } + + public SubjectsNested addNewSubjectLike(V1Subject item) { + return new SubjectsNested(-1, item); + } + + public SubjectsNested setNewSubjectLike(int index,V1Subject item) { + return new SubjectsNested(index, item); + } + + public SubjectsNested editSubject(int index) { + if (subjects.size() <= index) throw new RuntimeException("Can't edit subjects. Index exceeds size."); + return setNewSubjectLike(index, buildSubject(index)); + } + + public SubjectsNested editFirstSubject() { + if (subjects.size() == 0) throw new RuntimeException("Can't edit first subjects. The list is empty."); + return setNewSubjectLike(0, buildSubject(0)); + } + + public SubjectsNested editLastSubject() { + int index = subjects.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last subjects. The list is empty."); + return setNewSubjectLike(index, buildSubject(index)); + } + + public SubjectsNested editMatchingSubject(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ClusterRoleBindingFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface SubjectsNested extends Nested,V1SubjectFluent>{ - public N and(); - public N endSubject(); + public class RoleRefNested extends V1RoleRefFluent> implements Nested{ + RoleRefNested(V1RoleRef item) { + this.builder = new V1RoleRefBuilder(this, item); + } + V1RoleRefBuilder builder; + + public N and() { + return (N) V1ClusterRoleBindingFluent.this.withRoleRef(builder.build()); + } + public N endRoleRef() { + return and(); + } + + } + public class SubjectsNested extends V1SubjectFluent> implements Nested{ + SubjectsNested(int index,V1Subject item) { + this.index = index; + this.builder = new V1SubjectBuilder(this, item); + } + V1SubjectBuilder builder; + int index; + + public N and() { + return (N) V1ClusterRoleBindingFluent.this.setToSubjects(index,builder.build()); + } + + public N endSubject() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingFluentImpl.java deleted file mode 100644 index c8d3924673..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingFluentImpl.java +++ /dev/null @@ -1,314 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ClusterRoleBindingFluentImpl> extends BaseFluent implements V1ClusterRoleBindingFluent{ - public V1ClusterRoleBindingFluentImpl() { - } - public V1ClusterRoleBindingFluentImpl(V1ClusterRoleBinding instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRoleRef(instance.getRoleRef()); - this.withSubjects(instance.getSubjects()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1RoleRefBuilder roleRef; - private ArrayList subjects; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ClusterRoleBindingFluentImpl.MetadataNested withNewMetadata() { - return new V1ClusterRoleBindingFluentImpl.MetadataNestedImpl(); - } - public V1ClusterRoleBindingFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ClusterRoleBindingFluentImpl.MetadataNestedImpl(item); - } - public V1ClusterRoleBindingFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ClusterRoleBindingFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ClusterRoleBindingFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildRoleRef instead. - * @return The buildable object. - */ - @Deprecated - public V1RoleRef getRoleRef() { - return this.roleRef!=null ?this.roleRef.build():null; - } - public V1RoleRef buildRoleRef() { - return this.roleRef!=null ?this.roleRef.build():null; - } - public A withRoleRef(V1RoleRef roleRef) { - _visitables.get("roleRef").remove(this.roleRef); - if (roleRef!=null){ this.roleRef= new V1RoleRefBuilder(roleRef); _visitables.get("roleRef").add(this.roleRef);} else { this.roleRef = null; _visitables.get("roleRef").remove(this.roleRef); } return (A) this; - } - public Boolean hasRoleRef() { - return this.roleRef != null; - } - public V1ClusterRoleBindingFluentImpl.RoleRefNested withNewRoleRef() { - return new V1ClusterRoleBindingFluentImpl.RoleRefNestedImpl(); - } - public V1ClusterRoleBindingFluentImpl.RoleRefNested withNewRoleRefLike(V1RoleRef item) { - return new V1ClusterRoleBindingFluentImpl.RoleRefNestedImpl(item); - } - public V1ClusterRoleBindingFluentImpl.RoleRefNested editRoleRef() { - return withNewRoleRefLike(getRoleRef()); - } - public V1ClusterRoleBindingFluentImpl.RoleRefNested editOrNewRoleRef() { - return withNewRoleRefLike(getRoleRef() != null ? getRoleRef(): new V1RoleRefBuilder().build()); - } - public V1ClusterRoleBindingFluentImpl.RoleRefNested editOrNewRoleRefLike(V1RoleRef item) { - return withNewRoleRefLike(getRoleRef() != null ? getRoleRef(): item); - } - public A addToSubjects(int index,V1Subject item) { - if (this.subjects == null) {this.subjects = new ArrayList();} - V1SubjectBuilder builder = new V1SubjectBuilder(item); - if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").add(index, builder); subjects.add(index, builder);} - return (A)this; - } - public A setToSubjects(int index,V1Subject item) { - if (this.subjects == null) {this.subjects = new ArrayList();} - V1SubjectBuilder builder = new V1SubjectBuilder(item); - if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").set(index, builder); subjects.set(index, builder);} - return (A)this; - } - public A addToSubjects(io.kubernetes.client.openapi.models.V1Subject... items) { - if (this.subjects == null) {this.subjects = new ArrayList();} - for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; - } - public A addAllToSubjects(Collection items) { - if (this.subjects == null) {this.subjects = new ArrayList();} - for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; - } - public A removeFromSubjects(io.kubernetes.client.openapi.models.V1Subject... items) { - for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").remove(builder);if (this.subjects != null) {this.subjects.remove(builder);}} return (A)this; - } - public A removeAllFromSubjects(Collection items) { - for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").remove(builder);if (this.subjects != null) {this.subjects.remove(builder);}} return (A)this; - } - public A removeMatchingFromSubjects(Predicate predicate) { - if (subjects == null) return (A) this; - final Iterator each = subjects.iterator(); - final List visitables = _visitables.get("subjects"); - while (each.hasNext()) { - V1SubjectBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildSubjects instead. - * @return The buildable object. - */ - @Deprecated - public List getSubjects() { - return subjects != null ? build(subjects) : null; - } - public List buildSubjects() { - return subjects != null ? build(subjects) : null; - } - public V1Subject buildSubject(int index) { - return this.subjects.get(index).build(); - } - public V1Subject buildFirstSubject() { - return this.subjects.get(0).build(); - } - public V1Subject buildLastSubject() { - return this.subjects.get(subjects.size() - 1).build(); - } - public V1Subject buildMatchingSubject(Predicate predicate) { - for (V1SubjectBuilder item: subjects) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingSubject(Predicate predicate) { - for (V1SubjectBuilder item: subjects) { if(predicate.test(item)){ return true;} } return false; - } - public A withSubjects(List subjects) { - if (this.subjects != null) { _visitables.get("subjects").clear();} - if (subjects != null) {this.subjects = new ArrayList(); for (V1Subject item : subjects){this.addToSubjects(item);}} else { this.subjects = null;} return (A) this; - } - public A withSubjects(io.kubernetes.client.openapi.models.V1Subject... subjects) { - if (this.subjects != null) {this.subjects.clear(); _visitables.remove("subjects"); } - if (subjects != null) {for (V1Subject item :subjects){ this.addToSubjects(item);}} return (A) this; - } - public Boolean hasSubjects() { - return subjects != null && !subjects.isEmpty(); - } - public V1ClusterRoleBindingFluentImpl.SubjectsNested addNewSubject() { - return new V1ClusterRoleBindingFluentImpl.SubjectsNestedImpl(); - } - public V1ClusterRoleBindingFluentImpl.SubjectsNested addNewSubjectLike(V1Subject item) { - return new V1ClusterRoleBindingFluentImpl.SubjectsNestedImpl(-1, item); - } - public V1ClusterRoleBindingFluentImpl.SubjectsNested setNewSubjectLike(int index,V1Subject item) { - return new V1ClusterRoleBindingFluentImpl.SubjectsNestedImpl(index, item); - } - public V1ClusterRoleBindingFluentImpl.SubjectsNested editSubject(int index) { - if (subjects.size() <= index) throw new RuntimeException("Can't edit subjects. Index exceeds size."); - return setNewSubjectLike(index, buildSubject(index)); - } - public V1ClusterRoleBindingFluentImpl.SubjectsNested editFirstSubject() { - if (subjects.size() == 0) throw new RuntimeException("Can't edit first subjects. The list is empty."); - return setNewSubjectLike(0, buildSubject(0)); - } - public V1ClusterRoleBindingFluentImpl.SubjectsNested editLastSubject() { - int index = subjects.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last subjects. The list is empty."); - return setNewSubjectLike(index, buildSubject(index)); - } - public V1ClusterRoleBindingFluentImpl.SubjectsNested editMatchingSubject(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ObjectMetaFluentImpl> implements V1ClusterRoleBindingFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ClusterRoleBindingFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class RoleRefNestedImpl extends V1RoleRefFluentImpl> implements V1ClusterRoleBindingFluentImpl.RoleRefNested,Nested{ - RoleRefNestedImpl(V1RoleRef item) { - this.builder = new V1RoleRefBuilder(this, item); - } - RoleRefNestedImpl() { - this.builder = new V1RoleRefBuilder(this); - } - V1RoleRefBuilder builder; - public N and() { - return (N) V1ClusterRoleBindingFluentImpl.this.withRoleRef(builder.build()); - } - public N endRoleRef() { - return and(); - } - - } - class SubjectsNestedImpl extends V1SubjectFluentImpl> implements V1ClusterRoleBindingFluentImpl.SubjectsNested,Nested{ - SubjectsNestedImpl(int index,V1Subject item) { - this.index = index; - this.builder = new V1SubjectBuilder(this, item); - } - SubjectsNestedImpl() { - this.index = -1; - this.builder = new V1SubjectBuilder(this); - } - V1SubjectBuilder builder; - int index; - public N and() { - return (N) V1ClusterRoleBindingFluentImpl.this.setToSubjects(index,builder.build()); - } - public N endSubject() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListBuilder.java index 0b595aafc4..0eea4fdf1e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ClusterRoleBindingListBuilder extends V1ClusterRoleBindingListFluentImpl implements VisitableBuilder{ +public class V1ClusterRoleBindingListBuilder extends V1ClusterRoleBindingListFluent implements VisitableBuilder{ public V1ClusterRoleBindingListBuilder() { - this(false); - } - public V1ClusterRoleBindingListBuilder(Boolean validationEnabled) { - this(new V1ClusterRoleBindingList(), validationEnabled); + this(new V1ClusterRoleBindingList()); } + public V1ClusterRoleBindingListBuilder(V1ClusterRoleBindingListFluent fluent) { - this(fluent, false); - } - public V1ClusterRoleBindingListBuilder(V1ClusterRoleBindingListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ClusterRoleBindingList(), validationEnabled); + this(fluent, new V1ClusterRoleBindingList()); } + public V1ClusterRoleBindingListBuilder(V1ClusterRoleBindingListFluent fluent,V1ClusterRoleBindingList instance) { - this(fluent, instance, false); - } - public V1ClusterRoleBindingListBuilder(V1ClusterRoleBindingListFluent fluent,V1ClusterRoleBindingList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ClusterRoleBindingListBuilder(V1ClusterRoleBindingList instance) { - this(instance,false); - } - public V1ClusterRoleBindingListBuilder(V1ClusterRoleBindingList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ClusterRoleBindingListFluent fluent; - Boolean validationEnabled; + public V1ClusterRoleBindingList build() { V1ClusterRoleBindingList buildable = new V1ClusterRoleBindingList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListFluent.java index b34e14f670..512606fbe1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ClusterRoleBindingListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ClusterRoleBinding item); - public A setToItems(int index,V1ClusterRoleBinding item); - public A addToItems(io.kubernetes.client.openapi.models.V1ClusterRoleBinding... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ClusterRoleBinding... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ClusterRoleBinding buildItem(int index); - public V1ClusterRoleBinding buildFirstItem(); - public V1ClusterRoleBinding buildLastItem(); - public V1ClusterRoleBinding buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ClusterRoleBinding... items); - public Boolean hasItems(); - public V1ClusterRoleBindingListFluent.ItemsNested addNewItem(); - public V1ClusterRoleBindingListFluent.ItemsNested addNewItemLike(V1ClusterRoleBinding item); - public V1ClusterRoleBindingListFluent.ItemsNested setNewItemLike(int index,V1ClusterRoleBinding item); - public V1ClusterRoleBindingListFluent.ItemsNested editItem(int index); - public V1ClusterRoleBindingListFluent.ItemsNested editFirstItem(); - public V1ClusterRoleBindingListFluent.ItemsNested editLastItem(); - public V1ClusterRoleBindingListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ClusterRoleBindingListFluent.MetadataNested withNewMetadata(); - public V1ClusterRoleBindingListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ClusterRoleBindingListFluent.MetadataNested editMetadata(); - public V1ClusterRoleBindingListFluent.MetadataNested editOrNewMetadata(); - public V1ClusterRoleBindingListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ClusterRoleBindingFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ClusterRoleBindingListFluent> extends BaseFluent{ + public V1ClusterRoleBindingListFluent() { + } + + public V1ClusterRoleBindingListFluent(V1ClusterRoleBindingList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ClusterRoleBindingList instance) { + instance = (instance != null ? instance : new V1ClusterRoleBindingList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ClusterRoleBinding item) { + if (this.items == null) {this.items = new ArrayList();} + V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ClusterRoleBinding item) { + if (this.items == null) {this.items = new ArrayList();} + V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ClusterRoleBinding... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ClusterRoleBinding item : items) {V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ClusterRoleBinding item : items) {V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ClusterRoleBinding... items) { + if (this.items == null) return (A)this; + for (V1ClusterRoleBinding item : items) {V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ClusterRoleBinding item : items) {V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ClusterRoleBindingBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ClusterRoleBinding buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ClusterRoleBinding buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ClusterRoleBinding buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ClusterRoleBinding buildMatchingItem(Predicate predicate) { + for (V1ClusterRoleBindingBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ClusterRoleBindingBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ClusterRoleBinding item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ClusterRoleBinding... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ClusterRoleBinding item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ClusterRoleBinding item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ClusterRoleBinding item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ClusterRoleBindingListFluent that = (V1ClusterRoleBindingListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ClusterRoleBindingFluent> implements Nested{ + ItemsNested(int index,V1ClusterRoleBinding item) { + this.index = index; + this.builder = new V1ClusterRoleBindingBuilder(this, item); + } + V1ClusterRoleBindingBuilder builder; + int index; + public N and() { + return (N) V1ClusterRoleBindingListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ClusterRoleBindingListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListFluentImpl.java deleted file mode 100644 index fbd939e6ec..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBindingListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ClusterRoleBindingListFluentImpl> extends BaseFluent implements V1ClusterRoleBindingListFluent{ - public V1ClusterRoleBindingListFluentImpl() { - } - public V1ClusterRoleBindingListFluentImpl(V1ClusterRoleBindingList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ClusterRoleBinding item) { - if (this.items == null) {this.items = new ArrayList();} - V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ClusterRoleBinding item) { - if (this.items == null) {this.items = new ArrayList();} - V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ClusterRoleBinding... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ClusterRoleBinding item : items) {V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ClusterRoleBinding item : items) {V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ClusterRoleBinding... items) { - for (V1ClusterRoleBinding item : items) {V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ClusterRoleBinding item : items) {V1ClusterRoleBindingBuilder builder = new V1ClusterRoleBindingBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ClusterRoleBindingBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ClusterRoleBinding buildItem(int index) { - return this.items.get(index).build(); - } - public V1ClusterRoleBinding buildFirstItem() { - return this.items.get(0).build(); - } - public V1ClusterRoleBinding buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ClusterRoleBinding buildMatchingItem(Predicate predicate) { - for (V1ClusterRoleBindingBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ClusterRoleBindingBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ClusterRoleBinding item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ClusterRoleBinding... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ClusterRoleBinding item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ClusterRoleBindingListFluentImpl.ItemsNested addNewItem() { - return new V1ClusterRoleBindingListFluentImpl.ItemsNestedImpl(); - } - public V1ClusterRoleBindingListFluentImpl.ItemsNested addNewItemLike(V1ClusterRoleBinding item) { - return new V1ClusterRoleBindingListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ClusterRoleBindingListFluentImpl.ItemsNested setNewItemLike(int index,V1ClusterRoleBinding item) { - return new V1ClusterRoleBindingListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ClusterRoleBindingListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ClusterRoleBindingListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ClusterRoleBindingListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ClusterRoleBindingListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ClusterRoleBindingListFluentImpl.MetadataNestedImpl(); - } - public V1ClusterRoleBindingListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ClusterRoleBindingListFluentImpl.MetadataNestedImpl(item); - } - public V1ClusterRoleBindingListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ClusterRoleBindingListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ClusterRoleBindingListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ClusterRoleBindingListFluentImpl that = (V1ClusterRoleBindingListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ClusterRoleBindingFluentImpl> implements V1ClusterRoleBindingListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ClusterRoleBinding item) { - this.index = index; - this.builder = new V1ClusterRoleBindingBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ClusterRoleBindingBuilder(this); - } - V1ClusterRoleBindingBuilder builder; - int index; - public N and() { - return (N) V1ClusterRoleBindingListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ClusterRoleBindingListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ClusterRoleBindingListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBuilder.java index 8235154c1d..6f10dc2fde 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ClusterRoleBuilder extends V1ClusterRoleFluentImpl implements VisitableBuilder{ +public class V1ClusterRoleBuilder extends V1ClusterRoleFluent implements VisitableBuilder{ public V1ClusterRoleBuilder() { - this(false); - } - public V1ClusterRoleBuilder(Boolean validationEnabled) { - this(new V1ClusterRole(), validationEnabled); + this(new V1ClusterRole()); } + public V1ClusterRoleBuilder(V1ClusterRoleFluent fluent) { - this(fluent, false); - } - public V1ClusterRoleBuilder(V1ClusterRoleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ClusterRole(), validationEnabled); + this(fluent, new V1ClusterRole()); } + public V1ClusterRoleBuilder(V1ClusterRoleFluent fluent,V1ClusterRole instance) { - this(fluent, instance, false); - } - public V1ClusterRoleBuilder(V1ClusterRoleFluent fluent,V1ClusterRole instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAggregationRule(instance.getAggregationRule()); - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ClusterRoleBuilder(V1ClusterRole instance) { - this(instance,false); - } - public V1ClusterRoleBuilder(V1ClusterRole instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAggregationRule(instance.getAggregationRule()); - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ClusterRoleFluent fluent; - Boolean validationEnabled; + public V1ClusterRole build() { V1ClusterRole buildable = new V1ClusterRole(); - buildable.setAggregationRule(fluent.getAggregationRule()); + buildable.setAggregationRule(fluent.buildAggregationRule()); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setRules(fluent.getRules()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setRules(fluent.buildRules()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleFluent.java index 18ba337317..f74daa68fc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleFluent.java @@ -1,102 +1,379 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1ClusterRoleFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildAggregationRule instead. - * @return The buildable object. - */ - @Deprecated - public V1AggregationRule getAggregationRule(); - public V1AggregationRule buildAggregationRule(); - public A withAggregationRule(V1AggregationRule aggregationRule); - public Boolean hasAggregationRule(); - public V1ClusterRoleFluent.AggregationRuleNested withNewAggregationRule(); - public V1ClusterRoleFluent.AggregationRuleNested withNewAggregationRuleLike(V1AggregationRule item); - public V1ClusterRoleFluent.AggregationRuleNested editAggregationRule(); - public V1ClusterRoleFluent.AggregationRuleNested editOrNewAggregationRule(); - public V1ClusterRoleFluent.AggregationRuleNested editOrNewAggregationRuleLike(V1AggregationRule item); - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ClusterRoleFluent.MetadataNested withNewMetadata(); - public V1ClusterRoleFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ClusterRoleFluent.MetadataNested editMetadata(); - public V1ClusterRoleFluent.MetadataNested editOrNewMetadata(); - public V1ClusterRoleFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A addToRules(int index,V1PolicyRule item); - public A setToRules(int index,V1PolicyRule item); - public A addToRules(io.kubernetes.client.openapi.models.V1PolicyRule... items); - public A addAllToRules(Collection items); - public A removeFromRules(io.kubernetes.client.openapi.models.V1PolicyRule... items); - public A removeAllFromRules(Collection items); - public A removeMatchingFromRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules(); - public List buildRules(); - public V1PolicyRule buildRule(int index); - public V1PolicyRule buildFirstRule(); - public V1PolicyRule buildLastRule(); - public V1PolicyRule buildMatchingRule(Predicate predicate); - public Boolean hasMatchingRule(Predicate predicate); - public A withRules(List rules); - public A withRules(io.kubernetes.client.openapi.models.V1PolicyRule... rules); - public Boolean hasRules(); - public V1ClusterRoleFluent.RulesNested addNewRule(); - public V1ClusterRoleFluent.RulesNested addNewRuleLike(V1PolicyRule item); - public V1ClusterRoleFluent.RulesNested setNewRuleLike(int index,V1PolicyRule item); - public V1ClusterRoleFluent.RulesNested editRule(int index); - public V1ClusterRoleFluent.RulesNested editFirstRule(); - public V1ClusterRoleFluent.RulesNested editLastRule(); - public V1ClusterRoleFluent.RulesNested editMatchingRule(Predicate predicate); - public interface AggregationRuleNested extends Nested,V1AggregationRuleFluent>{ - public N and(); - public N endAggregationRule(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ClusterRoleFluent> extends BaseFluent{ + public V1ClusterRoleFluent() { + } + + public V1ClusterRoleFluent(V1ClusterRole instance) { + this.copyInstance(instance); + } + private V1AggregationRuleBuilder aggregationRule; + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private ArrayList rules; + + protected void copyInstance(V1ClusterRole instance) { + instance = (instance != null ? instance : new V1ClusterRole()); + if (instance != null) { + this.withAggregationRule(instance.getAggregationRule()); + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withRules(instance.getRules()); + } + } + + public V1AggregationRule buildAggregationRule() { + return this.aggregationRule != null ? this.aggregationRule.build() : null; + } + + public A withAggregationRule(V1AggregationRule aggregationRule) { + this._visitables.remove("aggregationRule"); + if (aggregationRule != null) { + this.aggregationRule = new V1AggregationRuleBuilder(aggregationRule); + this._visitables.get("aggregationRule").add(this.aggregationRule); + } else { + this.aggregationRule = null; + this._visitables.get("aggregationRule").remove(this.aggregationRule); + } + return (A) this; + } + + public boolean hasAggregationRule() { + return this.aggregationRule != null; + } + + public AggregationRuleNested withNewAggregationRule() { + return new AggregationRuleNested(null); + } + + public AggregationRuleNested withNewAggregationRuleLike(V1AggregationRule item) { + return new AggregationRuleNested(item); + } + + public AggregationRuleNested editAggregationRule() { + return withNewAggregationRuleLike(java.util.Optional.ofNullable(buildAggregationRule()).orElse(null)); + } + + public AggregationRuleNested editOrNewAggregationRule() { + return withNewAggregationRuleLike(java.util.Optional.ofNullable(buildAggregationRule()).orElse(new V1AggregationRuleBuilder().build())); + } + + public AggregationRuleNested editOrNewAggregationRuleLike(V1AggregationRule item) { + return withNewAggregationRuleLike(java.util.Optional.ofNullable(buildAggregationRule()).orElse(item)); + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public A addToRules(int index,V1PolicyRule item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} + return (A)this; + } + + public A setToRules(int index,V1PolicyRule item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} + return (A)this; + } + + public A addToRules(io.kubernetes.client.openapi.models.V1PolicyRule... items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; } - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); + + public A addAllToRules(Collection items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A removeFromRules(io.kubernetes.client.openapi.models.V1PolicyRule... items) { + if (this.rules == null) return (A)this; + for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeAllFromRules(Collection items) { + if (this.rules == null) return (A)this; + for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeMatchingFromRules(Predicate predicate) { + if (rules == null) return (A) this; + final Iterator each = rules.iterator(); + final List visitables = _visitables.get("rules"); + while (each.hasNext()) { + V1PolicyRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildRules() { + return this.rules != null ? build(rules) : null; + } + + public V1PolicyRule buildRule(int index) { + return this.rules.get(index).build(); + } + + public V1PolicyRule buildFirstRule() { + return this.rules.get(0).build(); + } + + public V1PolicyRule buildLastRule() { + return this.rules.get(rules.size() - 1).build(); + } + + public V1PolicyRule buildMatchingRule(Predicate predicate) { + for (V1PolicyRuleBuilder item : rules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingRule(Predicate predicate) { + for (V1PolicyRuleBuilder item : rules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRules(List rules) { + if (this.rules != null) { + this._visitables.get("rules").clear(); + } + if (rules != null) { + this.rules = new ArrayList(); + for (V1PolicyRule item : rules) { + this.addToRules(item); + } + } else { + this.rules = null; + } + return (A) this; + } + + public A withRules(io.kubernetes.client.openapi.models.V1PolicyRule... rules) { + if (this.rules != null) { + this.rules.clear(); + _visitables.remove("rules"); + } + if (rules != null) { + for (V1PolicyRule item : rules) { + this.addToRules(item); + } + } + return (A) this; + } + + public boolean hasRules() { + return this.rules != null && !this.rules.isEmpty(); + } + + public RulesNested addNewRule() { + return new RulesNested(-1, null); + } + + public RulesNested addNewRuleLike(V1PolicyRule item) { + return new RulesNested(-1, item); + } + + public RulesNested setNewRuleLike(int index,V1PolicyRule item) { + return new RulesNested(index, item); + } + + public RulesNested editRule(int index) { + if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editFirstRule() { + if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); + return setNewRuleLike(0, buildRule(0)); + } + + public RulesNested editLastRule() { + int index = rules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editMatchingRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1AggregationRuleFluent> implements Nested{ + AggregationRuleNested(V1AggregationRule item) { + this.builder = new V1AggregationRuleBuilder(this, item); + } + V1AggregationRuleBuilder builder; + + public N and() { + return (N) V1ClusterRoleFluent.this.withAggregationRule(builder.build()); + } + public N endAggregationRule() { + return and(); + } + + } - public interface RulesNested extends Nested,V1PolicyRuleFluent>{ - public N and(); - public N endRule(); + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ClusterRoleFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class RulesNested extends V1PolicyRuleFluent> implements Nested{ + RulesNested(int index,V1PolicyRule item) { + this.index = index; + this.builder = new V1PolicyRuleBuilder(this, item); + } + V1PolicyRuleBuilder builder; + int index; + + public N and() { + return (N) V1ClusterRoleFluent.this.setToRules(index,builder.build()); + } + + public N endRule() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleFluentImpl.java deleted file mode 100644 index 80f68306b7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleFluentImpl.java +++ /dev/null @@ -1,314 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ClusterRoleFluentImpl> extends BaseFluent implements V1ClusterRoleFluent{ - public V1ClusterRoleFluentImpl() { - } - public V1ClusterRoleFluentImpl(V1ClusterRole instance) { - if (instance != null) { - this.withAggregationRule(instance.getAggregationRule()); - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRules(instance.getRules()); - } - } - private V1AggregationRuleBuilder aggregationRule; - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private ArrayList rules; - - /** - * This method has been deprecated, please use method buildAggregationRule instead. - * @return The buildable object. - */ - @Deprecated - public V1AggregationRule getAggregationRule() { - return this.aggregationRule!=null ?this.aggregationRule.build():null; - } - public V1AggregationRule buildAggregationRule() { - return this.aggregationRule!=null ?this.aggregationRule.build():null; - } - public A withAggregationRule(V1AggregationRule aggregationRule) { - _visitables.get("aggregationRule").remove(this.aggregationRule); - if (aggregationRule!=null){ this.aggregationRule= new V1AggregationRuleBuilder(aggregationRule); _visitables.get("aggregationRule").add(this.aggregationRule);} else { this.aggregationRule = null; _visitables.get("aggregationRule").remove(this.aggregationRule); } return (A) this; - } - public Boolean hasAggregationRule() { - return this.aggregationRule != null; - } - public V1ClusterRoleFluentImpl.AggregationRuleNested withNewAggregationRule() { - return new V1ClusterRoleFluentImpl.AggregationRuleNestedImpl(); - } - public V1ClusterRoleFluentImpl.AggregationRuleNested withNewAggregationRuleLike(V1AggregationRule item) { - return new V1ClusterRoleFluentImpl.AggregationRuleNestedImpl(item); - } - public V1ClusterRoleFluentImpl.AggregationRuleNested editAggregationRule() { - return withNewAggregationRuleLike(getAggregationRule()); - } - public V1ClusterRoleFluentImpl.AggregationRuleNested editOrNewAggregationRule() { - return withNewAggregationRuleLike(getAggregationRule() != null ? getAggregationRule(): new V1AggregationRuleBuilder().build()); - } - public V1ClusterRoleFluentImpl.AggregationRuleNested editOrNewAggregationRuleLike(V1AggregationRule item) { - return withNewAggregationRuleLike(getAggregationRule() != null ? getAggregationRule(): item); - } - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ClusterRoleFluentImpl.MetadataNested withNewMetadata() { - return new V1ClusterRoleFluentImpl.MetadataNestedImpl(); - } - public V1ClusterRoleFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ClusterRoleFluentImpl.MetadataNestedImpl(item); - } - public V1ClusterRoleFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ClusterRoleFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ClusterRoleFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public A addToRules(int index,V1PolicyRule item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} - return (A)this; - } - public A setToRules(int index,V1PolicyRule item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} - return (A)this; - } - public A addToRules(io.kubernetes.client.openapi.models.V1PolicyRule... items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A addAllToRules(Collection items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A removeFromRules(io.kubernetes.client.openapi.models.V1PolicyRule... items) { - for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeAllFromRules(Collection items) { - for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeMatchingFromRules(Predicate predicate) { - if (rules == null) return (A) this; - final Iterator each = rules.iterator(); - final List visitables = _visitables.get("rules"); - while (each.hasNext()) { - V1PolicyRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules() { - return rules != null ? build(rules) : null; - } - public List buildRules() { - return rules != null ? build(rules) : null; - } - public V1PolicyRule buildRule(int index) { - return this.rules.get(index).build(); - } - public V1PolicyRule buildFirstRule() { - return this.rules.get(0).build(); - } - public V1PolicyRule buildLastRule() { - return this.rules.get(rules.size() - 1).build(); - } - public V1PolicyRule buildMatchingRule(Predicate predicate) { - for (V1PolicyRuleBuilder item: rules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRule(Predicate predicate) { - for (V1PolicyRuleBuilder item: rules) { if(predicate.test(item)){ return true;} } return false; - } - public A withRules(List rules) { - if (this.rules != null) { _visitables.get("rules").clear();} - if (rules != null) {this.rules = new ArrayList(); for (V1PolicyRule item : rules){this.addToRules(item);}} else { this.rules = null;} return (A) this; - } - public A withRules(io.kubernetes.client.openapi.models.V1PolicyRule... rules) { - if (this.rules != null) {this.rules.clear(); _visitables.remove("rules"); } - if (rules != null) {for (V1PolicyRule item :rules){ this.addToRules(item);}} return (A) this; - } - public Boolean hasRules() { - return rules != null && !rules.isEmpty(); - } - public V1ClusterRoleFluentImpl.RulesNested addNewRule() { - return new V1ClusterRoleFluentImpl.RulesNestedImpl(); - } - public V1ClusterRoleFluentImpl.RulesNested addNewRuleLike(V1PolicyRule item) { - return new V1ClusterRoleFluentImpl.RulesNestedImpl(-1, item); - } - public V1ClusterRoleFluentImpl.RulesNested setNewRuleLike(int index,V1PolicyRule item) { - return new V1ClusterRoleFluentImpl.RulesNestedImpl(index, item); - } - public V1ClusterRoleFluentImpl.RulesNested editRule(int index) { - if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); - return setNewRuleLike(index, buildRule(index)); - } - public V1ClusterRoleFluentImpl.RulesNested editFirstRule() { - if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); - return setNewRuleLike(0, buildRule(0)); - } - public V1ClusterRoleFluentImpl.RulesNested editLastRule() { - int index = rules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); - return setNewRuleLike(index, buildRule(index)); - } - public V1ClusterRoleFluentImpl.RulesNested editMatchingRule(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1AggregationRuleFluentImpl> implements V1ClusterRoleFluentImpl.AggregationRuleNested,Nested{ - AggregationRuleNestedImpl(V1AggregationRule item) { - this.builder = new V1AggregationRuleBuilder(this, item); - } - AggregationRuleNestedImpl() { - this.builder = new V1AggregationRuleBuilder(this); - } - V1AggregationRuleBuilder builder; - public N and() { - return (N) V1ClusterRoleFluentImpl.this.withAggregationRule(builder.build()); - } - public N endAggregationRule() { - return and(); - } - - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ClusterRoleFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ClusterRoleFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class RulesNestedImpl extends V1PolicyRuleFluentImpl> implements V1ClusterRoleFluentImpl.RulesNested,Nested{ - RulesNestedImpl(int index,V1PolicyRule item) { - this.index = index; - this.builder = new V1PolicyRuleBuilder(this, item); - } - RulesNestedImpl() { - this.index = -1; - this.builder = new V1PolicyRuleBuilder(this); - } - V1PolicyRuleBuilder builder; - int index; - public N and() { - return (N) V1ClusterRoleFluentImpl.this.setToRules(index,builder.build()); - } - public N endRule() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListBuilder.java index 8dca168286..4216823371 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ClusterRoleListBuilder extends V1ClusterRoleListFluentImpl implements VisitableBuilder{ +public class V1ClusterRoleListBuilder extends V1ClusterRoleListFluent implements VisitableBuilder{ public V1ClusterRoleListBuilder() { - this(false); - } - public V1ClusterRoleListBuilder(Boolean validationEnabled) { - this(new V1ClusterRoleList(), validationEnabled); + this(new V1ClusterRoleList()); } + public V1ClusterRoleListBuilder(V1ClusterRoleListFluent fluent) { - this(fluent, false); - } - public V1ClusterRoleListBuilder(V1ClusterRoleListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ClusterRoleList(), validationEnabled); + this(fluent, new V1ClusterRoleList()); } + public V1ClusterRoleListBuilder(V1ClusterRoleListFluent fluent,V1ClusterRoleList instance) { - this(fluent, instance, false); - } - public V1ClusterRoleListBuilder(V1ClusterRoleListFluent fluent,V1ClusterRoleList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ClusterRoleListBuilder(V1ClusterRoleList instance) { - this(instance,false); - } - public V1ClusterRoleListBuilder(V1ClusterRoleList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ClusterRoleListFluent fluent; - Boolean validationEnabled; + public V1ClusterRoleList build() { V1ClusterRoleList buildable = new V1ClusterRoleList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListFluent.java index 76b4679c99..ff85a58d9e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ClusterRoleListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ClusterRole item); - public A setToItems(int index,V1ClusterRole item); - public A addToItems(io.kubernetes.client.openapi.models.V1ClusterRole... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ClusterRole... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ClusterRole buildItem(int index); - public V1ClusterRole buildFirstItem(); - public V1ClusterRole buildLastItem(); - public V1ClusterRole buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ClusterRole... items); - public Boolean hasItems(); - public V1ClusterRoleListFluent.ItemsNested addNewItem(); - public V1ClusterRoleListFluent.ItemsNested addNewItemLike(V1ClusterRole item); - public V1ClusterRoleListFluent.ItemsNested setNewItemLike(int index,V1ClusterRole item); - public V1ClusterRoleListFluent.ItemsNested editItem(int index); - public V1ClusterRoleListFluent.ItemsNested editFirstItem(); - public V1ClusterRoleListFluent.ItemsNested editLastItem(); - public V1ClusterRoleListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ClusterRoleListFluent.MetadataNested withNewMetadata(); - public V1ClusterRoleListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ClusterRoleListFluent.MetadataNested editMetadata(); - public V1ClusterRoleListFluent.MetadataNested editOrNewMetadata(); - public V1ClusterRoleListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ClusterRoleFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ClusterRoleListFluent> extends BaseFluent{ + public V1ClusterRoleListFluent() { + } + + public V1ClusterRoleListFluent(V1ClusterRoleList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ClusterRoleList instance) { + instance = (instance != null ? instance : new V1ClusterRoleList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ClusterRole item) { + if (this.items == null) {this.items = new ArrayList();} + V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ClusterRole item) { + if (this.items == null) {this.items = new ArrayList();} + V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ClusterRole... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ClusterRole item : items) {V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ClusterRole item : items) {V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ClusterRole... items) { + if (this.items == null) return (A)this; + for (V1ClusterRole item : items) {V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ClusterRole item : items) {V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ClusterRoleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ClusterRole buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ClusterRole buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ClusterRole buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ClusterRole buildMatchingItem(Predicate predicate) { + for (V1ClusterRoleBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ClusterRoleBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ClusterRole item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ClusterRole... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ClusterRole item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ClusterRole item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ClusterRole item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ClusterRoleListFluent that = (V1ClusterRoleListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ClusterRoleFluent> implements Nested{ + ItemsNested(int index,V1ClusterRole item) { + this.index = index; + this.builder = new V1ClusterRoleBuilder(this, item); + } + V1ClusterRoleBuilder builder; + int index; + public N and() { + return (N) V1ClusterRoleListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ClusterRoleListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListFluentImpl.java deleted file mode 100644 index 71572ffd4f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ClusterRoleListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ClusterRoleListFluentImpl> extends BaseFluent implements V1ClusterRoleListFluent{ - public V1ClusterRoleListFluentImpl() { - } - public V1ClusterRoleListFluentImpl(V1ClusterRoleList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ClusterRole item) { - if (this.items == null) {this.items = new ArrayList();} - V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ClusterRole item) { - if (this.items == null) {this.items = new ArrayList();} - V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ClusterRole... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ClusterRole item : items) {V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ClusterRole item : items) {V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ClusterRole... items) { - for (V1ClusterRole item : items) {V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ClusterRole item : items) {V1ClusterRoleBuilder builder = new V1ClusterRoleBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ClusterRoleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ClusterRole buildItem(int index) { - return this.items.get(index).build(); - } - public V1ClusterRole buildFirstItem() { - return this.items.get(0).build(); - } - public V1ClusterRole buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ClusterRole buildMatchingItem(Predicate predicate) { - for (V1ClusterRoleBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ClusterRoleBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ClusterRole item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ClusterRole... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ClusterRole item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ClusterRoleListFluentImpl.ItemsNested addNewItem() { - return new V1ClusterRoleListFluentImpl.ItemsNestedImpl(); - } - public V1ClusterRoleListFluentImpl.ItemsNested addNewItemLike(V1ClusterRole item) { - return new V1ClusterRoleListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ClusterRoleListFluentImpl.ItemsNested setNewItemLike(int index,V1ClusterRole item) { - return new V1ClusterRoleListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ClusterRoleListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ClusterRoleListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ClusterRoleListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ClusterRoleListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ClusterRoleListFluentImpl.MetadataNestedImpl(); - } - public V1ClusterRoleListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ClusterRoleListFluentImpl.MetadataNestedImpl(item); - } - public V1ClusterRoleListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ClusterRoleListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ClusterRoleListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ClusterRoleListFluentImpl that = (V1ClusterRoleListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ClusterRoleFluentImpl> implements V1ClusterRoleListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ClusterRole item) { - this.index = index; - this.builder = new V1ClusterRoleBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ClusterRoleBuilder(this); - } - V1ClusterRoleBuilder builder; - int index; - public N and() { - return (N) V1ClusterRoleListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ClusterRoleListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ClusterRoleListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionBuilder.java index 3b4d99990c..4bc06643f8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ComponentConditionBuilder extends V1ComponentConditionFluentImpl implements VisitableBuilder{ +public class V1ComponentConditionBuilder extends V1ComponentConditionFluent implements VisitableBuilder{ public V1ComponentConditionBuilder() { - this(false); - } - public V1ComponentConditionBuilder(Boolean validationEnabled) { - this(new V1ComponentCondition(), validationEnabled); + this(new V1ComponentCondition()); } + public V1ComponentConditionBuilder(V1ComponentConditionFluent fluent) { - this(fluent, false); - } - public V1ComponentConditionBuilder(V1ComponentConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ComponentCondition(), validationEnabled); + this(fluent, new V1ComponentCondition()); } + public V1ComponentConditionBuilder(V1ComponentConditionFluent fluent,V1ComponentCondition instance) { - this(fluent, instance, false); - } - public V1ComponentConditionBuilder(V1ComponentConditionFluent fluent,V1ComponentCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withError(instance.getError()); - fluent.withMessage(instance.getMessage()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ComponentConditionBuilder(V1ComponentCondition instance) { - this(instance,false); - } - public V1ComponentConditionBuilder(V1ComponentCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withError(instance.getError()); - this.withMessage(instance.getMessage()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ComponentConditionFluent fluent; - Boolean validationEnabled; + public V1ComponentCondition build() { V1ComponentCondition buildable = new V1ComponentCondition(); buildable.setError(fluent.getError()); @@ -52,4 +30,5 @@ public V1ComponentCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionFluent.java index b31aeef172..5ee80030d3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionFluent.java @@ -1,25 +1,114 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ComponentConditionFluent> extends Fluent{ - public String getError(); - public A withError(String error); - public Boolean hasError(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ComponentConditionFluent> extends BaseFluent{ + public V1ComponentConditionFluent() { + } + public V1ComponentConditionFluent(V1ComponentCondition instance) { + this.copyInstance(instance); + } + private String error; + private String message; + private String status; + private String type; + + protected void copyInstance(V1ComponentCondition instance) { + instance = (instance != null ? instance : new V1ComponentCondition()); + if (instance != null) { + this.withError(instance.getError()); + this.withMessage(instance.getMessage()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public String getError() { + return this.error; + } + + public A withError(String error) { + this.error = error; + return (A) this; + } + + public boolean hasError() { + return this.error != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ComponentConditionFluent that = (V1ComponentConditionFluent) o; + if (!java.util.Objects.equals(error, that.error)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(error, message, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (error != null) { sb.append("error:"); sb.append(error + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionFluentImpl.java deleted file mode 100644 index 3cfcd85137..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentConditionFluentImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ComponentConditionFluentImpl> extends BaseFluent implements V1ComponentConditionFluent{ - public V1ComponentConditionFluentImpl() { - } - public V1ComponentConditionFluentImpl(V1ComponentCondition instance) { - if (instance != null) { - this.withError(instance.getError()); - this.withMessage(instance.getMessage()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private String error; - private String message; - private String status; - private String type; - public String getError() { - return this.error; - } - public A withError(String error) { - this.error=error; return (A) this; - } - public Boolean hasError() { - return this.error != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ComponentConditionFluentImpl that = (V1ComponentConditionFluentImpl) o; - if (!java.util.Objects.equals(error, that.error)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(error, message, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (error != null) { sb.append("error:"); sb.append(error + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusBuilder.java index 8640b27287..cf1ef2e483 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ComponentStatusBuilder extends V1ComponentStatusFluentImpl implements VisitableBuilder{ +public class V1ComponentStatusBuilder extends V1ComponentStatusFluent implements VisitableBuilder{ public V1ComponentStatusBuilder() { - this(false); - } - public V1ComponentStatusBuilder(Boolean validationEnabled) { - this(new V1ComponentStatus(), validationEnabled); + this(new V1ComponentStatus()); } + public V1ComponentStatusBuilder(V1ComponentStatusFluent fluent) { - this(fluent, false); - } - public V1ComponentStatusBuilder(V1ComponentStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ComponentStatus(), validationEnabled); + this(fluent, new V1ComponentStatus()); } + public V1ComponentStatusBuilder(V1ComponentStatusFluent fluent,V1ComponentStatus instance) { - this(fluent, instance, false); - } - public V1ComponentStatusBuilder(V1ComponentStatusFluent fluent,V1ComponentStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withConditions(instance.getConditions()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ComponentStatusBuilder(V1ComponentStatus instance) { - this(instance,false); - } - public V1ComponentStatusBuilder(V1ComponentStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withConditions(instance.getConditions()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ComponentStatusFluent fluent; - Boolean validationEnabled; + public V1ComponentStatus build() { V1ComponentStatus buildable = new V1ComponentStatus(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusFluent.java index 428b6c6057..7af8fbdcd3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ComponentStatusFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToConditions(int index,V1ComponentCondition item); - public A setToConditions(int index,V1ComponentCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1ComponentCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1ComponentCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1ComponentCondition buildCondition(int index); - public V1ComponentCondition buildFirstCondition(); - public V1ComponentCondition buildLastCondition(); - public V1ComponentCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1ComponentCondition... conditions); - public Boolean hasConditions(); - public V1ComponentStatusFluent.ConditionsNested addNewCondition(); - public V1ComponentStatusFluent.ConditionsNested addNewConditionLike(V1ComponentCondition item); - public V1ComponentStatusFluent.ConditionsNested setNewConditionLike(int index,V1ComponentCondition item); - public V1ComponentStatusFluent.ConditionsNested editCondition(int index); - public V1ComponentStatusFluent.ConditionsNested editFirstCondition(); - public V1ComponentStatusFluent.ConditionsNested editLastCondition(); - public V1ComponentStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ComponentStatusFluent.MetadataNested withNewMetadata(); - public V1ComponentStatusFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ComponentStatusFluent.MetadataNested editMetadata(); - public V1ComponentStatusFluent.MetadataNested editOrNewMetadata(); - public V1ComponentStatusFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public interface ConditionsNested extends Nested,V1ComponentConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ComponentStatusFluent> extends BaseFluent{ + public V1ComponentStatusFluent() { + } + + public V1ComponentStatusFluent(V1ComponentStatus instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList conditions; + private String kind; + private V1ObjectMetaBuilder metadata; + + protected void copyInstance(V1ComponentStatus instance) { + instance = (instance != null ? instance : new V1ComponentStatus()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withConditions(instance.getConditions()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToConditions(int index,V1ComponentCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1ComponentCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1ComponentCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1ComponentCondition item : items) {V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1ComponentCondition item : items) {V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1ComponentCondition... items) { + if (this.conditions == null) return (A)this; + for (V1ComponentCondition item : items) {V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1ComponentCondition item : items) {V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1ComponentConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1ComponentCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1ComponentCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1ComponentCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1ComponentCondition buildMatchingCondition(Predicate predicate) { + for (V1ComponentConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1ComponentConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1ComponentCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1ComponentCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1ComponentCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1ComponentCondition item) { + return new ConditionsNested(-1, item); } - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); + + public ConditionsNested setNewConditionLike(int index,V1ComponentCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ComponentStatusFluent that = (V1ComponentStatusFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(conditions, that.conditions)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, conditions, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (conditions != null && !conditions.isEmpty()) { sb.append("conditions:"); sb.append(conditions + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ConditionsNested extends V1ComponentConditionFluent> implements Nested{ + ConditionsNested(int index,V1ComponentCondition item) { + this.index = index; + this.builder = new V1ComponentConditionBuilder(this, item); + } + V1ComponentConditionBuilder builder; + int index; + public N and() { + return (N) V1ComponentStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ComponentStatusFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusFluentImpl.java deleted file mode 100644 index a5299e4223..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ComponentStatusFluentImpl> extends BaseFluent implements V1ComponentStatusFluent{ - public V1ComponentStatusFluentImpl() { - } - public V1ComponentStatusFluentImpl(V1ComponentStatus instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withConditions(instance.getConditions()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList conditions; - private String kind; - private V1ObjectMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToConditions(int index,V1ComponentCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1ComponentCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1ComponentCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1ComponentCondition item : items) {V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1ComponentCondition item : items) {V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1ComponentCondition... items) { - for (V1ComponentCondition item : items) {V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1ComponentCondition item : items) {V1ComponentConditionBuilder builder = new V1ComponentConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1ComponentConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1ComponentCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1ComponentCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1ComponentCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1ComponentCondition buildMatchingCondition(Predicate predicate) { - for (V1ComponentConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1ComponentConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1ComponentCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1ComponentCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1ComponentCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1ComponentStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1ComponentStatusFluentImpl.ConditionsNestedImpl(); - } - public V1ComponentStatusFluentImpl.ConditionsNested addNewConditionLike(V1ComponentCondition item) { - return new V1ComponentStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1ComponentStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1ComponentCondition item) { - return new V1ComponentStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1ComponentStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1ComponentStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1ComponentStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1ComponentStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ComponentStatusFluentImpl.MetadataNestedImpl(); - } - public V1ComponentStatusFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ComponentStatusFluentImpl.MetadataNestedImpl(item); - } - public V1ComponentStatusFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ComponentStatusFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ComponentStatusFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ComponentStatusFluentImpl that = (V1ComponentStatusFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(conditions, that.conditions)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, conditions, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (conditions != null) { sb.append("conditions:"); sb.append(conditions + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ConditionsNestedImpl extends V1ComponentConditionFluentImpl> implements V1ComponentStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1ComponentCondition item) { - this.index = index; - this.builder = new V1ComponentConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1ComponentConditionBuilder(this); - } - V1ComponentConditionBuilder builder; - int index; - public N and() { - return (N) V1ComponentStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ComponentStatusFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ComponentStatusFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListBuilder.java index 30fb9ed4f8..8b4c18c0aa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ComponentStatusListBuilder extends V1ComponentStatusListFluentImpl implements VisitableBuilder{ +public class V1ComponentStatusListBuilder extends V1ComponentStatusListFluent implements VisitableBuilder{ public V1ComponentStatusListBuilder() { - this(false); - } - public V1ComponentStatusListBuilder(Boolean validationEnabled) { - this(new V1ComponentStatusList(), validationEnabled); + this(new V1ComponentStatusList()); } + public V1ComponentStatusListBuilder(V1ComponentStatusListFluent fluent) { - this(fluent, false); - } - public V1ComponentStatusListBuilder(V1ComponentStatusListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ComponentStatusList(), validationEnabled); + this(fluent, new V1ComponentStatusList()); } + public V1ComponentStatusListBuilder(V1ComponentStatusListFluent fluent,V1ComponentStatusList instance) { - this(fluent, instance, false); - } - public V1ComponentStatusListBuilder(V1ComponentStatusListFluent fluent,V1ComponentStatusList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ComponentStatusListBuilder(V1ComponentStatusList instance) { - this(instance,false); - } - public V1ComponentStatusListBuilder(V1ComponentStatusList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ComponentStatusListFluent fluent; - Boolean validationEnabled; + public V1ComponentStatusList build() { V1ComponentStatusList buildable = new V1ComponentStatusList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListFluent.java index 1092181310..3ad99c611a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ComponentStatusListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ComponentStatus item); - public A setToItems(int index,V1ComponentStatus item); - public A addToItems(io.kubernetes.client.openapi.models.V1ComponentStatus... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ComponentStatus... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ComponentStatus buildItem(int index); - public V1ComponentStatus buildFirstItem(); - public V1ComponentStatus buildLastItem(); - public V1ComponentStatus buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ComponentStatus... items); - public Boolean hasItems(); - public V1ComponentStatusListFluent.ItemsNested addNewItem(); - public V1ComponentStatusListFluent.ItemsNested addNewItemLike(V1ComponentStatus item); - public V1ComponentStatusListFluent.ItemsNested setNewItemLike(int index,V1ComponentStatus item); - public V1ComponentStatusListFluent.ItemsNested editItem(int index); - public V1ComponentStatusListFluent.ItemsNested editFirstItem(); - public V1ComponentStatusListFluent.ItemsNested editLastItem(); - public V1ComponentStatusListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ComponentStatusListFluent.MetadataNested withNewMetadata(); - public V1ComponentStatusListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ComponentStatusListFluent.MetadataNested editMetadata(); - public V1ComponentStatusListFluent.MetadataNested editOrNewMetadata(); - public V1ComponentStatusListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ComponentStatusFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ComponentStatusListFluent> extends BaseFluent{ + public V1ComponentStatusListFluent() { + } + + public V1ComponentStatusListFluent(V1ComponentStatusList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ComponentStatusList instance) { + instance = (instance != null ? instance : new V1ComponentStatusList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ComponentStatus item) { + if (this.items == null) {this.items = new ArrayList();} + V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ComponentStatus item) { + if (this.items == null) {this.items = new ArrayList();} + V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ComponentStatus... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ComponentStatus item : items) {V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ComponentStatus item : items) {V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ComponentStatus... items) { + if (this.items == null) return (A)this; + for (V1ComponentStatus item : items) {V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ComponentStatus item : items) {V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ComponentStatusBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ComponentStatus buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ComponentStatus buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ComponentStatus buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ComponentStatus buildMatchingItem(Predicate predicate) { + for (V1ComponentStatusBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ComponentStatusBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ComponentStatus item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ComponentStatus... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ComponentStatus item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ComponentStatus item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ComponentStatus item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ComponentStatusListFluent that = (V1ComponentStatusListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ComponentStatusFluent> implements Nested{ + ItemsNested(int index,V1ComponentStatus item) { + this.index = index; + this.builder = new V1ComponentStatusBuilder(this, item); + } + V1ComponentStatusBuilder builder; + int index; + public N and() { + return (N) V1ComponentStatusListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ComponentStatusListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListFluentImpl.java deleted file mode 100644 index cdab205b7e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ComponentStatusListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ComponentStatusListFluentImpl> extends BaseFluent implements V1ComponentStatusListFluent{ - public V1ComponentStatusListFluentImpl() { - } - public V1ComponentStatusListFluentImpl(V1ComponentStatusList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ComponentStatus item) { - if (this.items == null) {this.items = new ArrayList();} - V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ComponentStatus item) { - if (this.items == null) {this.items = new ArrayList();} - V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ComponentStatus... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ComponentStatus item : items) {V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ComponentStatus item : items) {V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ComponentStatus... items) { - for (V1ComponentStatus item : items) {V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ComponentStatus item : items) {V1ComponentStatusBuilder builder = new V1ComponentStatusBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ComponentStatusBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ComponentStatus buildItem(int index) { - return this.items.get(index).build(); - } - public V1ComponentStatus buildFirstItem() { - return this.items.get(0).build(); - } - public V1ComponentStatus buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ComponentStatus buildMatchingItem(Predicate predicate) { - for (V1ComponentStatusBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ComponentStatusBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ComponentStatus item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ComponentStatus... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ComponentStatus item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ComponentStatusListFluentImpl.ItemsNested addNewItem() { - return new V1ComponentStatusListFluentImpl.ItemsNestedImpl(); - } - public V1ComponentStatusListFluentImpl.ItemsNested addNewItemLike(V1ComponentStatus item) { - return new V1ComponentStatusListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ComponentStatusListFluentImpl.ItemsNested setNewItemLike(int index,V1ComponentStatus item) { - return new V1ComponentStatusListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ComponentStatusListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ComponentStatusListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ComponentStatusListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ComponentStatusListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ComponentStatusListFluentImpl.MetadataNestedImpl(); - } - public V1ComponentStatusListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ComponentStatusListFluentImpl.MetadataNestedImpl(item); - } - public V1ComponentStatusListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ComponentStatusListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ComponentStatusListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ComponentStatusListFluentImpl that = (V1ComponentStatusListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ComponentStatusFluentImpl> implements V1ComponentStatusListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ComponentStatus item) { - this.index = index; - this.builder = new V1ComponentStatusBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ComponentStatusBuilder(this); - } - V1ComponentStatusBuilder builder; - int index; - public N and() { - return (N) V1ComponentStatusListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ComponentStatusListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ComponentStatusListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionBuilder.java index b3103ceac6..0df0e4e609 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ConditionBuilder extends V1ConditionFluentImpl implements VisitableBuilder{ +public class V1ConditionBuilder extends V1ConditionFluent implements VisitableBuilder{ public V1ConditionBuilder() { - this(false); - } - public V1ConditionBuilder(Boolean validationEnabled) { - this(new V1Condition(), validationEnabled); + this(new V1Condition()); } + public V1ConditionBuilder(V1ConditionFluent fluent) { - this(fluent, false); - } - public V1ConditionBuilder(V1ConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Condition(), validationEnabled); + this(fluent, new V1Condition()); } + public V1ConditionBuilder(V1ConditionFluent fluent,V1Condition instance) { - this(fluent, instance, false); - } - public V1ConditionBuilder(V1ConditionFluent fluent,V1Condition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ConditionBuilder(V1Condition instance) { - this(instance,false); - } - public V1ConditionBuilder(V1Condition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ConditionFluent fluent; - Boolean validationEnabled; + public V1Condition build() { V1Condition buildable = new V1Condition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -58,4 +32,5 @@ public V1Condition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionFluent.java index 91091028db..6d2e490b4f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionFluent.java @@ -1,33 +1,150 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ConditionFluent> extends BaseFluent{ + public V1ConditionFluent() { + } + public V1ConditionFluent(V1Condition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private Long observedGeneration; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1Condition instance) { + instance = (instance != null ? instance : new V1Condition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withObservedGeneration(instance.getObservedGeneration()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public Long getObservedGeneration() { + return this.observedGeneration; + } + + public A withObservedGeneration(Long observedGeneration) { + this.observedGeneration = observedGeneration; + return (A) this; + } + + public boolean hasObservedGeneration() { + return this.observedGeneration != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ConditionFluent that = (V1ConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, observedGeneration, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionFluentImpl.java deleted file mode 100644 index 15bca66787..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConditionFluentImpl.java +++ /dev/null @@ -1,123 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ConditionFluentImpl> extends BaseFluent implements V1ConditionFluent{ - public V1ConditionFluentImpl() { - } - public V1ConditionFluentImpl(V1Condition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private Long observedGeneration; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public Long getObservedGeneration() { - return this.observedGeneration; - } - public A withObservedGeneration(Long observedGeneration) { - this.observedGeneration=observedGeneration; return (A) this; - } - public Boolean hasObservedGeneration() { - return this.observedGeneration != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ConditionFluentImpl that = (V1ConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, observedGeneration, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapBuilder.java index 72bbb8d136..48b9dcc705 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ConfigMapBuilder extends V1ConfigMapFluentImpl implements VisitableBuilder{ +public class V1ConfigMapBuilder extends V1ConfigMapFluent implements VisitableBuilder{ public V1ConfigMapBuilder() { - this(false); - } - public V1ConfigMapBuilder(Boolean validationEnabled) { - this(new V1ConfigMap(), validationEnabled); + this(new V1ConfigMap()); } + public V1ConfigMapBuilder(V1ConfigMapFluent fluent) { - this(fluent, false); - } - public V1ConfigMapBuilder(V1ConfigMapFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ConfigMap(), validationEnabled); + this(fluent, new V1ConfigMap()); } + public V1ConfigMapBuilder(V1ConfigMapFluent fluent,V1ConfigMap instance) { - this(fluent, instance, false); - } - public V1ConfigMapBuilder(V1ConfigMapFluent fluent,V1ConfigMap instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withBinaryData(instance.getBinaryData()); - fluent.withData(instance.getData()); - fluent.withImmutable(instance.getImmutable()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ConfigMapBuilder(V1ConfigMap instance) { - this(instance,false); - } - public V1ConfigMapBuilder(V1ConfigMap instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withBinaryData(instance.getBinaryData()); - this.withData(instance.getData()); - this.withImmutable(instance.getImmutable()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ConfigMapFluent fluent; - Boolean validationEnabled; + public V1ConfigMap build() { V1ConfigMap buildable = new V1ConfigMap(); buildable.setApiVersion(fluent.getApiVersion()); @@ -54,8 +28,9 @@ public V1ConfigMap build() { buildable.setData(fluent.getData()); buildable.setImmutable(fluent.getImmutable()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceBuilder.java index 5834ec0792..fa4a049340 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ConfigMapEnvSourceBuilder extends V1ConfigMapEnvSourceFluentImpl implements VisitableBuilder{ +public class V1ConfigMapEnvSourceBuilder extends V1ConfigMapEnvSourceFluent implements VisitableBuilder{ public V1ConfigMapEnvSourceBuilder() { - this(false); - } - public V1ConfigMapEnvSourceBuilder(Boolean validationEnabled) { - this(new V1ConfigMapEnvSource(), validationEnabled); + this(new V1ConfigMapEnvSource()); } + public V1ConfigMapEnvSourceBuilder(V1ConfigMapEnvSourceFluent fluent) { - this(fluent, false); - } - public V1ConfigMapEnvSourceBuilder(V1ConfigMapEnvSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ConfigMapEnvSource(), validationEnabled); + this(fluent, new V1ConfigMapEnvSource()); } + public V1ConfigMapEnvSourceBuilder(V1ConfigMapEnvSourceFluent fluent,V1ConfigMapEnvSource instance) { - this(fluent, instance, false); - } - public V1ConfigMapEnvSourceBuilder(V1ConfigMapEnvSourceFluent fluent,V1ConfigMapEnvSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ConfigMapEnvSourceBuilder(V1ConfigMapEnvSource instance) { - this(instance,false); - } - public V1ConfigMapEnvSourceBuilder(V1ConfigMapEnvSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ConfigMapEnvSourceFluent fluent; - Boolean validationEnabled; + public V1ConfigMapEnvSource build() { V1ConfigMapEnvSource buildable = new V1ConfigMapEnvSource(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1ConfigMapEnvSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceFluent.java index c695bd1688..e00cb38f58 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceFluent.java @@ -1,20 +1,85 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1ConfigMapEnvSourceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getOptional(); - public A withOptional(Boolean optional); - public Boolean hasOptional(); - public A withOptional(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ConfigMapEnvSourceFluent> extends BaseFluent{ + public V1ConfigMapEnvSourceFluent() { + } + public V1ConfigMapEnvSourceFluent(V1ConfigMapEnvSource instance) { + this.copyInstance(instance); + } + private String name; + private Boolean optional; + + protected void copyInstance(V1ConfigMapEnvSource instance) { + instance = (instance != null ? instance : new V1ConfigMapEnvSource()); + if (instance != null) { + this.withName(instance.getName()); + this.withOptional(instance.getOptional()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Boolean getOptional() { + return this.optional; + } + + public A withOptional(Boolean optional) { + this.optional = optional; + return (A) this; + } + + public boolean hasOptional() { + return this.optional != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ConfigMapEnvSourceFluent that = (V1ConfigMapEnvSourceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(optional, that.optional)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, optional, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (optional != null) { sb.append("optional:"); sb.append(optional); } + sb.append("}"); + return sb.toString(); + } + + public A withOptional() { + return withOptional(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceFluentImpl.java deleted file mode 100644 index 58e0da9c95..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapEnvSourceFluentImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ConfigMapEnvSourceFluentImpl> extends BaseFluent implements V1ConfigMapEnvSourceFluent{ - public V1ConfigMapEnvSourceFluentImpl() { - } - public V1ConfigMapEnvSourceFluentImpl(V1ConfigMapEnvSource instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - } - private String name; - private Boolean optional; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Boolean getOptional() { - return this.optional; - } - public A withOptional(Boolean optional) { - this.optional=optional; return (A) this; - } - public Boolean hasOptional() { - return this.optional != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ConfigMapEnvSourceFluentImpl that = (V1ConfigMapEnvSourceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(optional, that.optional)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, optional, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (optional != null) { sb.append("optional:"); sb.append(optional); } - sb.append("}"); - return sb.toString(); - } - public A withOptional() { - return withOptional(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapFluent.java index 88cced0e25..473267acc3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapFluent.java @@ -1,61 +1,246 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import java.util.LinkedHashMap; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; import java.util.Map; -import java.util.LinkedHashMap; - /** - * Generated - */ -public interface V1ConfigMapFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToBinaryData(String key,byte[] value); - public A addToBinaryData(Map map); - public A removeFromBinaryData(String key); - public A removeFromBinaryData(Map map); - public Map getBinaryData(); - public A withBinaryData(Map binaryData); - public Boolean hasBinaryData(); - public A addToData(String key,String value); - public A addToData(Map map); - public A removeFromData(String key); - public A removeFromData(Map map); - public Map getData(); - public A withData(Map data); - public Boolean hasData(); - public Boolean getImmutable(); - public A withImmutable(Boolean immutable); - public Boolean hasImmutable(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ConfigMapFluent.MetadataNested withNewMetadata(); - public V1ConfigMapFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ConfigMapFluent.MetadataNested editMetadata(); - public V1ConfigMapFluent.MetadataNested editOrNewMetadata(); - public V1ConfigMapFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A withImmutable(); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ConfigMapFluent> extends BaseFluent{ + public V1ConfigMapFluent() { + } + + public V1ConfigMapFluent(V1ConfigMap instance) { + this.copyInstance(instance); + } + private String apiVersion; + private Map binaryData; + private Map data; + private Boolean immutable; + private String kind; + private V1ObjectMetaBuilder metadata; + + protected void copyInstance(V1ConfigMap instance) { + instance = (instance != null ? instance : new V1ConfigMap()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withBinaryData(instance.getBinaryData()); + this.withData(instance.getData()); + this.withImmutable(instance.getImmutable()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToBinaryData(String key,byte[] value) { + if(this.binaryData == null && key != null && value != null) { this.binaryData = new LinkedHashMap(); } + if(key != null && value != null) {this.binaryData.put(key, value);} return (A)this; + } + + public A addToBinaryData(Map map) { + if(this.binaryData == null && map != null) { this.binaryData = new LinkedHashMap(); } + if(map != null) { this.binaryData.putAll(map);} return (A)this; + } + + public A removeFromBinaryData(String key) { + if(this.binaryData == null) { return (A) this; } + if(key != null && this.binaryData != null) {this.binaryData.remove(key);} return (A)this; + } + + public A removeFromBinaryData(Map map) { + if(this.binaryData == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.binaryData != null){this.binaryData.remove(key);}}} return (A)this; + } + + public Map getBinaryData() { + return this.binaryData; + } + + public A withBinaryData(Map binaryData) { + if (binaryData == null) { + this.binaryData = null; + } else { + this.binaryData = new LinkedHashMap(binaryData); + } + return (A) this; + } + + public boolean hasBinaryData() { + return this.binaryData != null; + } + + public A addToData(String key,String value) { + if(this.data == null && key != null && value != null) { this.data = new LinkedHashMap(); } + if(key != null && value != null) {this.data.put(key, value);} return (A)this; + } + + public A addToData(Map map) { + if(this.data == null && map != null) { this.data = new LinkedHashMap(); } + if(map != null) { this.data.putAll(map);} return (A)this; + } + + public A removeFromData(String key) { + if(this.data == null) { return (A) this; } + if(key != null && this.data != null) {this.data.remove(key);} return (A)this; + } + + public A removeFromData(Map map) { + if(this.data == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.data != null){this.data.remove(key);}}} return (A)this; + } + + public Map getData() { + return this.data; + } + + public A withData(Map data) { + if (data == null) { + this.data = null; + } else { + this.data = new LinkedHashMap(data); + } + return (A) this; + } + + public boolean hasData() { + return this.data != null; } + public Boolean getImmutable() { + return this.immutable; + } + + public A withImmutable(Boolean immutable) { + this.immutable = immutable; + return (A) this; + } + + public boolean hasImmutable() { + return this.immutable != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ConfigMapFluent that = (V1ConfigMapFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(binaryData, that.binaryData)) return false; + if (!java.util.Objects.equals(data, that.data)) return false; + if (!java.util.Objects.equals(immutable, that.immutable)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, binaryData, data, immutable, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (binaryData != null && !binaryData.isEmpty()) { sb.append("binaryData:"); sb.append(binaryData + ","); } + if (data != null && !data.isEmpty()) { sb.append("data:"); sb.append(data + ","); } + if (immutable != null) { sb.append("immutable:"); sb.append(immutable + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + + public A withImmutable() { + return withImmutable(true); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ConfigMapFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapFluentImpl.java deleted file mode 100644 index 9768939a30..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapFluentImpl.java +++ /dev/null @@ -1,201 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.util.LinkedHashMap; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ConfigMapFluentImpl> extends BaseFluent implements V1ConfigMapFluent{ - public V1ConfigMapFluentImpl() { - } - public V1ConfigMapFluentImpl(V1ConfigMap instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withBinaryData(instance.getBinaryData()); - this.withData(instance.getData()); - this.withImmutable(instance.getImmutable()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private Map binaryData; - private Map data; - private Boolean immutable; - private String kind; - private V1ObjectMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToBinaryData(String key,byte[] value) { - if(this.binaryData == null && key != null && value != null) { this.binaryData = new LinkedHashMap(); } - if(key != null && value != null) {this.binaryData.put(key, value);} return (A)this; - } - public A addToBinaryData(Map map) { - if(this.binaryData == null && map != null) { this.binaryData = new LinkedHashMap(); } - if(map != null) { this.binaryData.putAll(map);} return (A)this; - } - public A removeFromBinaryData(String key) { - if(this.binaryData == null) { return (A) this; } - if(key != null && this.binaryData != null) {this.binaryData.remove(key);} return (A)this; - } - public A removeFromBinaryData(Map map) { - if(this.binaryData == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.binaryData != null){this.binaryData.remove(key);}}} return (A)this; - } - public Map getBinaryData() { - return this.binaryData; - } - public A withBinaryData(Map binaryData) { - if (binaryData == null) { this.binaryData = null;} else {this.binaryData = new LinkedHashMap(binaryData);} return (A) this; - } - public Boolean hasBinaryData() { - return this.binaryData != null; - } - public A addToData(String key,String value) { - if(this.data == null && key != null && value != null) { this.data = new LinkedHashMap(); } - if(key != null && value != null) {this.data.put(key, value);} return (A)this; - } - public A addToData(Map map) { - if(this.data == null && map != null) { this.data = new LinkedHashMap(); } - if(map != null) { this.data.putAll(map);} return (A)this; - } - public A removeFromData(String key) { - if(this.data == null) { return (A) this; } - if(key != null && this.data != null) {this.data.remove(key);} return (A)this; - } - public A removeFromData(Map map) { - if(this.data == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.data != null){this.data.remove(key);}}} return (A)this; - } - public Map getData() { - return this.data; - } - public A withData(Map data) { - if (data == null) { this.data = null;} else {this.data = new LinkedHashMap(data);} return (A) this; - } - public Boolean hasData() { - return this.data != null; - } - public Boolean getImmutable() { - return this.immutable; - } - public A withImmutable(Boolean immutable) { - this.immutable=immutable; return (A) this; - } - public Boolean hasImmutable() { - return this.immutable != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ConfigMapFluentImpl.MetadataNested withNewMetadata() { - return new V1ConfigMapFluentImpl.MetadataNestedImpl(); - } - public V1ConfigMapFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ConfigMapFluentImpl.MetadataNestedImpl(item); - } - public V1ConfigMapFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ConfigMapFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ConfigMapFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ConfigMapFluentImpl that = (V1ConfigMapFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(binaryData, that.binaryData)) return false; - - if (!java.util.Objects.equals(data, that.data)) return false; - - if (!java.util.Objects.equals(immutable, that.immutable)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, binaryData, data, immutable, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (binaryData != null && !binaryData.isEmpty()) { sb.append("binaryData:"); sb.append(binaryData + ","); } - if (data != null && !data.isEmpty()) { sb.append("data:"); sb.append(data + ","); } - if (immutable != null) { sb.append("immutable:"); sb.append(immutable + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - public A withImmutable() { - return withImmutable(true); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ConfigMapFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ConfigMapFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorBuilder.java index da8d9e518c..9e612d3ed7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ConfigMapKeySelectorBuilder extends V1ConfigMapKeySelectorFluentImpl implements VisitableBuilder{ +public class V1ConfigMapKeySelectorBuilder extends V1ConfigMapKeySelectorFluent implements VisitableBuilder{ public V1ConfigMapKeySelectorBuilder() { - this(false); - } - public V1ConfigMapKeySelectorBuilder(Boolean validationEnabled) { - this(new V1ConfigMapKeySelector(), validationEnabled); + this(new V1ConfigMapKeySelector()); } + public V1ConfigMapKeySelectorBuilder(V1ConfigMapKeySelectorFluent fluent) { - this(fluent, false); - } - public V1ConfigMapKeySelectorBuilder(V1ConfigMapKeySelectorFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ConfigMapKeySelector(), validationEnabled); + this(fluent, new V1ConfigMapKeySelector()); } + public V1ConfigMapKeySelectorBuilder(V1ConfigMapKeySelectorFluent fluent,V1ConfigMapKeySelector instance) { - this(fluent, instance, false); - } - public V1ConfigMapKeySelectorBuilder(V1ConfigMapKeySelectorFluent fluent,V1ConfigMapKeySelector instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withKey(instance.getKey()); - fluent.withName(instance.getName()); - fluent.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ConfigMapKeySelectorBuilder(V1ConfigMapKeySelector instance) { - this(instance,false); - } - public V1ConfigMapKeySelectorBuilder(V1ConfigMapKeySelector instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withKey(instance.getKey()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ConfigMapKeySelectorFluent fluent; - Boolean validationEnabled; + public V1ConfigMapKeySelector build() { V1ConfigMapKeySelector buildable = new V1ConfigMapKeySelector(); buildable.setKey(fluent.getKey()); @@ -49,4 +29,5 @@ public V1ConfigMapKeySelector build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorFluent.java index 76d8bcbe20..11cdd6d52e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorFluent.java @@ -1,23 +1,102 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1ConfigMapKeySelectorFluent> extends Fluent{ - public String getKey(); - public A withKey(String key); - public Boolean hasKey(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getOptional(); - public A withOptional(Boolean optional); - public Boolean hasOptional(); - public A withOptional(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ConfigMapKeySelectorFluent> extends BaseFluent{ + public V1ConfigMapKeySelectorFluent() { + } + public V1ConfigMapKeySelectorFluent(V1ConfigMapKeySelector instance) { + this.copyInstance(instance); + } + private String key; + private String name; + private Boolean optional; + + protected void copyInstance(V1ConfigMapKeySelector instance) { + instance = (instance != null ? instance : new V1ConfigMapKeySelector()); + if (instance != null) { + this.withKey(instance.getKey()); + this.withName(instance.getName()); + this.withOptional(instance.getOptional()); + } + } + + public String getKey() { + return this.key; + } + + public A withKey(String key) { + this.key = key; + return (A) this; + } + + public boolean hasKey() { + return this.key != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Boolean getOptional() { + return this.optional; + } + + public A withOptional(Boolean optional) { + this.optional = optional; + return (A) this; + } + + public boolean hasOptional() { + return this.optional != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ConfigMapKeySelectorFluent that = (V1ConfigMapKeySelectorFluent) o; + if (!java.util.Objects.equals(key, that.key)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(optional, that.optional)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(key, name, optional, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (key != null) { sb.append("key:"); sb.append(key + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (optional != null) { sb.append("optional:"); sb.append(optional); } + sb.append("}"); + return sb.toString(); + } + + public A withOptional() { + return withOptional(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorFluentImpl.java deleted file mode 100644 index 5386c907b5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapKeySelectorFluentImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ConfigMapKeySelectorFluentImpl> extends BaseFluent implements V1ConfigMapKeySelectorFluent{ - public V1ConfigMapKeySelectorFluentImpl() { - } - public V1ConfigMapKeySelectorFluentImpl(V1ConfigMapKeySelector instance) { - if (instance != null) { - this.withKey(instance.getKey()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - } - private String key; - private String name; - private Boolean optional; - public String getKey() { - return this.key; - } - public A withKey(String key) { - this.key=key; return (A) this; - } - public Boolean hasKey() { - return this.key != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Boolean getOptional() { - return this.optional; - } - public A withOptional(Boolean optional) { - this.optional=optional; return (A) this; - } - public Boolean hasOptional() { - return this.optional != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ConfigMapKeySelectorFluentImpl that = (V1ConfigMapKeySelectorFluentImpl) o; - if (!java.util.Objects.equals(key, that.key)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(optional, that.optional)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(key, name, optional, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (key != null) { sb.append("key:"); sb.append(key + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (optional != null) { sb.append("optional:"); sb.append(optional); } - sb.append("}"); - return sb.toString(); - } - public A withOptional() { - return withOptional(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListBuilder.java index 37d54ecec3..0c3a54bc96 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ConfigMapListBuilder extends V1ConfigMapListFluentImpl implements VisitableBuilder{ +public class V1ConfigMapListBuilder extends V1ConfigMapListFluent implements VisitableBuilder{ public V1ConfigMapListBuilder() { - this(false); - } - public V1ConfigMapListBuilder(Boolean validationEnabled) { - this(new V1ConfigMapList(), validationEnabled); + this(new V1ConfigMapList()); } + public V1ConfigMapListBuilder(V1ConfigMapListFluent fluent) { - this(fluent, false); - } - public V1ConfigMapListBuilder(V1ConfigMapListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ConfigMapList(), validationEnabled); + this(fluent, new V1ConfigMapList()); } + public V1ConfigMapListBuilder(V1ConfigMapListFluent fluent,V1ConfigMapList instance) { - this(fluent, instance, false); - } - public V1ConfigMapListBuilder(V1ConfigMapListFluent fluent,V1ConfigMapList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ConfigMapListBuilder(V1ConfigMapList instance) { - this(instance,false); - } - public V1ConfigMapListBuilder(V1ConfigMapList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ConfigMapListFluent fluent; - Boolean validationEnabled; + public V1ConfigMapList build() { V1ConfigMapList buildable = new V1ConfigMapList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListFluent.java index aad2d816b1..4fddf5d3ef 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ConfigMapListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ConfigMap item); - public A setToItems(int index,V1ConfigMap item); - public A addToItems(io.kubernetes.client.openapi.models.V1ConfigMap... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ConfigMap... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ConfigMap buildItem(int index); - public V1ConfigMap buildFirstItem(); - public V1ConfigMap buildLastItem(); - public V1ConfigMap buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ConfigMap... items); - public Boolean hasItems(); - public V1ConfigMapListFluent.ItemsNested addNewItem(); - public V1ConfigMapListFluent.ItemsNested addNewItemLike(V1ConfigMap item); - public V1ConfigMapListFluent.ItemsNested setNewItemLike(int index,V1ConfigMap item); - public V1ConfigMapListFluent.ItemsNested editItem(int index); - public V1ConfigMapListFluent.ItemsNested editFirstItem(); - public V1ConfigMapListFluent.ItemsNested editLastItem(); - public V1ConfigMapListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ConfigMapListFluent.MetadataNested withNewMetadata(); - public V1ConfigMapListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ConfigMapListFluent.MetadataNested editMetadata(); - public V1ConfigMapListFluent.MetadataNested editOrNewMetadata(); - public V1ConfigMapListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ConfigMapFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ConfigMapListFluent> extends BaseFluent{ + public V1ConfigMapListFluent() { + } + + public V1ConfigMapListFluent(V1ConfigMapList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ConfigMapList instance) { + instance = (instance != null ? instance : new V1ConfigMapList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ConfigMap item) { + if (this.items == null) {this.items = new ArrayList();} + V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ConfigMap item) { + if (this.items == null) {this.items = new ArrayList();} + V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ConfigMap... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ConfigMap item : items) {V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ConfigMap item : items) {V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ConfigMap... items) { + if (this.items == null) return (A)this; + for (V1ConfigMap item : items) {V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ConfigMap item : items) {V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ConfigMapBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ConfigMap buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ConfigMap buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ConfigMap buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ConfigMap buildMatchingItem(Predicate predicate) { + for (V1ConfigMapBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ConfigMapBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ConfigMap item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ConfigMap... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ConfigMap item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ConfigMap item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ConfigMap item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ConfigMapListFluent that = (V1ConfigMapListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ConfigMapFluent> implements Nested{ + ItemsNested(int index,V1ConfigMap item) { + this.index = index; + this.builder = new V1ConfigMapBuilder(this, item); + } + V1ConfigMapBuilder builder; + int index; + public N and() { + return (N) V1ConfigMapListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ConfigMapListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListFluentImpl.java deleted file mode 100644 index d6ea7bc005..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ConfigMapListFluentImpl> extends BaseFluent implements V1ConfigMapListFluent{ - public V1ConfigMapListFluentImpl() { - } - public V1ConfigMapListFluentImpl(V1ConfigMapList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ConfigMap item) { - if (this.items == null) {this.items = new ArrayList();} - V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ConfigMap item) { - if (this.items == null) {this.items = new ArrayList();} - V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ConfigMap... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ConfigMap item : items) {V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ConfigMap item : items) {V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ConfigMap... items) { - for (V1ConfigMap item : items) {V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ConfigMap item : items) {V1ConfigMapBuilder builder = new V1ConfigMapBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ConfigMapBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ConfigMap buildItem(int index) { - return this.items.get(index).build(); - } - public V1ConfigMap buildFirstItem() { - return this.items.get(0).build(); - } - public V1ConfigMap buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ConfigMap buildMatchingItem(Predicate predicate) { - for (V1ConfigMapBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ConfigMapBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ConfigMap item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ConfigMap... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ConfigMap item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ConfigMapListFluentImpl.ItemsNested addNewItem() { - return new V1ConfigMapListFluentImpl.ItemsNestedImpl(); - } - public V1ConfigMapListFluentImpl.ItemsNested addNewItemLike(V1ConfigMap item) { - return new V1ConfigMapListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ConfigMapListFluentImpl.ItemsNested setNewItemLike(int index,V1ConfigMap item) { - return new V1ConfigMapListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ConfigMapListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ConfigMapListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ConfigMapListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ConfigMapListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ConfigMapListFluentImpl.MetadataNestedImpl(); - } - public V1ConfigMapListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ConfigMapListFluentImpl.MetadataNestedImpl(item); - } - public V1ConfigMapListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ConfigMapListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ConfigMapListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ConfigMapListFluentImpl that = (V1ConfigMapListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ConfigMapFluentImpl> implements V1ConfigMapListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ConfigMap item) { - this.index = index; - this.builder = new V1ConfigMapBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ConfigMapBuilder(this); - } - V1ConfigMapBuilder builder; - int index; - public N and() { - return (N) V1ConfigMapListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ConfigMapListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ConfigMapListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceBuilder.java index 95d405bfb0..f97c83f156 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ConfigMapNodeConfigSourceBuilder extends V1ConfigMapNodeConfigSourceFluentImpl implements VisitableBuilder{ +public class V1ConfigMapNodeConfigSourceBuilder extends V1ConfigMapNodeConfigSourceFluent implements VisitableBuilder{ public V1ConfigMapNodeConfigSourceBuilder() { - this(false); - } - public V1ConfigMapNodeConfigSourceBuilder(Boolean validationEnabled) { - this(new V1ConfigMapNodeConfigSource(), validationEnabled); + this(new V1ConfigMapNodeConfigSource()); } + public V1ConfigMapNodeConfigSourceBuilder(V1ConfigMapNodeConfigSourceFluent fluent) { - this(fluent, false); - } - public V1ConfigMapNodeConfigSourceBuilder(V1ConfigMapNodeConfigSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ConfigMapNodeConfigSource(), validationEnabled); + this(fluent, new V1ConfigMapNodeConfigSource()); } + public V1ConfigMapNodeConfigSourceBuilder(V1ConfigMapNodeConfigSourceFluent fluent,V1ConfigMapNodeConfigSource instance) { - this(fluent, instance, false); - } - public V1ConfigMapNodeConfigSourceBuilder(V1ConfigMapNodeConfigSourceFluent fluent,V1ConfigMapNodeConfigSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withKubeletConfigKey(instance.getKubeletConfigKey()); - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - fluent.withResourceVersion(instance.getResourceVersion()); - fluent.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ConfigMapNodeConfigSourceBuilder(V1ConfigMapNodeConfigSource instance) { - this(instance,false); - } - public V1ConfigMapNodeConfigSourceBuilder(V1ConfigMapNodeConfigSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withKubeletConfigKey(instance.getKubeletConfigKey()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withResourceVersion(instance.getResourceVersion()); - this.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ConfigMapNodeConfigSourceFluent fluent; - Boolean validationEnabled; + public V1ConfigMapNodeConfigSource build() { V1ConfigMapNodeConfigSource buildable = new V1ConfigMapNodeConfigSource(); buildable.setKubeletConfigKey(fluent.getKubeletConfigKey()); @@ -55,4 +31,5 @@ public V1ConfigMapNodeConfigSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceFluent.java index 1ebc19d85d..6f26c2348d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceFluent.java @@ -1,28 +1,131 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ConfigMapNodeConfigSourceFluent> extends Fluent{ - public String getKubeletConfigKey(); - public A withKubeletConfigKey(String kubeletConfigKey); - public Boolean hasKubeletConfigKey(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); - public String getResourceVersion(); - public A withResourceVersion(String resourceVersion); - public Boolean hasResourceVersion(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ConfigMapNodeConfigSourceFluent> extends BaseFluent{ + public V1ConfigMapNodeConfigSourceFluent() { + } + public V1ConfigMapNodeConfigSourceFluent(V1ConfigMapNodeConfigSource instance) { + this.copyInstance(instance); + } + private String kubeletConfigKey; + private String name; + private String namespace; + private String resourceVersion; + private String uid; + + protected void copyInstance(V1ConfigMapNodeConfigSource instance) { + instance = (instance != null ? instance : new V1ConfigMapNodeConfigSource()); + if (instance != null) { + this.withKubeletConfigKey(instance.getKubeletConfigKey()); + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withResourceVersion(instance.getResourceVersion()); + this.withUid(instance.getUid()); + } + } + + public String getKubeletConfigKey() { + return this.kubeletConfigKey; + } + + public A withKubeletConfigKey(String kubeletConfigKey) { + this.kubeletConfigKey = kubeletConfigKey; + return (A) this; + } + + public boolean hasKubeletConfigKey() { + return this.kubeletConfigKey != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public String getResourceVersion() { + return this.resourceVersion; + } + + public A withResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + return (A) this; + } + + public boolean hasResourceVersion() { + return this.resourceVersion != null; + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ConfigMapNodeConfigSourceFluent that = (V1ConfigMapNodeConfigSourceFluent) o; + if (!java.util.Objects.equals(kubeletConfigKey, that.kubeletConfigKey)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(resourceVersion, that.resourceVersion)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(kubeletConfigKey, name, namespace, resourceVersion, uid, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (kubeletConfigKey != null) { sb.append("kubeletConfigKey:"); sb.append(kubeletConfigKey + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (resourceVersion != null) { sb.append("resourceVersion:"); sb.append(resourceVersion + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceFluentImpl.java deleted file mode 100644 index 0528d024e1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapNodeConfigSourceFluentImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ConfigMapNodeConfigSourceFluentImpl> extends BaseFluent implements V1ConfigMapNodeConfigSourceFluent{ - public V1ConfigMapNodeConfigSourceFluentImpl() { - } - public V1ConfigMapNodeConfigSourceFluentImpl(V1ConfigMapNodeConfigSource instance) { - if (instance != null) { - this.withKubeletConfigKey(instance.getKubeletConfigKey()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withResourceVersion(instance.getResourceVersion()); - this.withUid(instance.getUid()); - } - } - private String kubeletConfigKey; - private String name; - private String namespace; - private String resourceVersion; - private String uid; - public String getKubeletConfigKey() { - return this.kubeletConfigKey; - } - public A withKubeletConfigKey(String kubeletConfigKey) { - this.kubeletConfigKey=kubeletConfigKey; return (A) this; - } - public Boolean hasKubeletConfigKey() { - return this.kubeletConfigKey != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public String getResourceVersion() { - return this.resourceVersion; - } - public A withResourceVersion(String resourceVersion) { - this.resourceVersion=resourceVersion; return (A) this; - } - public Boolean hasResourceVersion() { - return this.resourceVersion != null; - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ConfigMapNodeConfigSourceFluentImpl that = (V1ConfigMapNodeConfigSourceFluentImpl) o; - if (!java.util.Objects.equals(kubeletConfigKey, that.kubeletConfigKey)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - if (!java.util.Objects.equals(resourceVersion, that.resourceVersion)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(kubeletConfigKey, name, namespace, resourceVersion, uid, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (kubeletConfigKey != null) { sb.append("kubeletConfigKey:"); sb.append(kubeletConfigKey + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } - if (resourceVersion != null) { sb.append("resourceVersion:"); sb.append(resourceVersion + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionBuilder.java index 1aa121b8de..9c6b26c9b8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ConfigMapProjectionBuilder extends V1ConfigMapProjectionFluentImpl implements VisitableBuilder{ +public class V1ConfigMapProjectionBuilder extends V1ConfigMapProjectionFluent implements VisitableBuilder{ public V1ConfigMapProjectionBuilder() { - this(false); - } - public V1ConfigMapProjectionBuilder(Boolean validationEnabled) { - this(new V1ConfigMapProjection(), validationEnabled); + this(new V1ConfigMapProjection()); } + public V1ConfigMapProjectionBuilder(V1ConfigMapProjectionFluent fluent) { - this(fluent, false); - } - public V1ConfigMapProjectionBuilder(V1ConfigMapProjectionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ConfigMapProjection(), validationEnabled); + this(fluent, new V1ConfigMapProjection()); } + public V1ConfigMapProjectionBuilder(V1ConfigMapProjectionFluent fluent,V1ConfigMapProjection instance) { - this(fluent, instance, false); - } - public V1ConfigMapProjectionBuilder(V1ConfigMapProjectionFluent fluent,V1ConfigMapProjection instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withItems(instance.getItems()); - fluent.withName(instance.getName()); - fluent.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ConfigMapProjectionBuilder(V1ConfigMapProjection instance) { - this(instance,false); - } - public V1ConfigMapProjectionBuilder(V1ConfigMapProjection instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withItems(instance.getItems()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ConfigMapProjectionFluent fluent; - Boolean validationEnabled; + public V1ConfigMapProjection build() { V1ConfigMapProjection buildable = new V1ConfigMapProjection(); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setName(fluent.getName()); buildable.setOptional(fluent.getOptional()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionFluent.java index 3b09897c4b..5ff77dea09 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionFluent.java @@ -1,63 +1,264 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1ConfigMapProjectionFluent> extends Fluent{ - public A addToItems(int index,V1KeyToPath item); - public A setToItems(int index,V1KeyToPath item); - public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1KeyToPath buildItem(int index); - public V1KeyToPath buildFirstItem(); - public V1KeyToPath buildLastItem(); - public V1KeyToPath buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public Boolean hasItems(); - public V1ConfigMapProjectionFluent.ItemsNested addNewItem(); - public V1ConfigMapProjectionFluent.ItemsNested addNewItemLike(V1KeyToPath item); - public V1ConfigMapProjectionFluent.ItemsNested setNewItemLike(int index,V1KeyToPath item); - public V1ConfigMapProjectionFluent.ItemsNested editItem(int index); - public V1ConfigMapProjectionFluent.ItemsNested editFirstItem(); - public V1ConfigMapProjectionFluent.ItemsNested editLastItem(); - public V1ConfigMapProjectionFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getOptional(); - public A withOptional(Boolean optional); - public Boolean hasOptional(); - public A withOptional(); - public interface ItemsNested extends Nested,V1KeyToPathFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ConfigMapProjectionFluent> extends BaseFluent{ + public V1ConfigMapProjectionFluent() { + } + + public V1ConfigMapProjectionFluent(V1ConfigMapProjection instance) { + this.copyInstance(instance); + } + private ArrayList items; + private String name; + private Boolean optional; + + protected void copyInstance(V1ConfigMapProjection instance) { + instance = (instance != null ? instance : new V1ConfigMapProjection()); + if (instance != null) { + this.withItems(instance.getItems()); + this.withName(instance.getName()); + this.withOptional(instance.getOptional()); + } + } + + public A addToItems(int index,V1KeyToPath item) { + if (this.items == null) {this.items = new ArrayList();} + V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1KeyToPath item) { + if (this.items == null) {this.items = new ArrayList();} + V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items == null) return (A)this; + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1KeyToPathBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1KeyToPath buildItem(int index) { + return this.items.get(index).build(); + } + + public V1KeyToPath buildFirstItem() { + return this.items.get(0).build(); + } + + public V1KeyToPath buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1KeyToPath buildMatchingItem(Predicate predicate) { + for (V1KeyToPathBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1KeyToPathBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1KeyToPath item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1KeyToPath item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1KeyToPath item) { + return new ItemsNested(-1, item); + } + + public ItemsNested setNewItemLike(int index,V1KeyToPath item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1KeyToPathFluent> implements Nested{ + ItemsNested(int index,V1KeyToPath item) { + this.index = index; + this.builder = new V1KeyToPathBuilder(this, item); + } + V1KeyToPathBuilder builder; + int index; + + public N and() { + return (N) V1ConfigMapProjectionFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionFluentImpl.java deleted file mode 100644 index f1aa11a568..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapProjectionFluentImpl.java +++ /dev/null @@ -1,207 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ConfigMapProjectionFluentImpl> extends BaseFluent implements V1ConfigMapProjectionFluent{ - public V1ConfigMapProjectionFluentImpl() { - } - public V1ConfigMapProjectionFluentImpl(V1ConfigMapProjection instance) { - if (instance != null) { - this.withItems(instance.getItems()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - } - private ArrayList items; - private String name; - private Boolean optional; - public A addToItems(int index,V1KeyToPath item) { - if (this.items == null) {this.items = new ArrayList();} - V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1KeyToPath item) { - if (this.items == null) {this.items = new ArrayList();} - V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1KeyToPathBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1KeyToPath buildItem(int index) { - return this.items.get(index).build(); - } - public V1KeyToPath buildFirstItem() { - return this.items.get(0).build(); - } - public V1KeyToPath buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1KeyToPath buildMatchingItem(Predicate predicate) { - for (V1KeyToPathBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1KeyToPathBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1KeyToPath item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1KeyToPath item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ConfigMapProjectionFluentImpl.ItemsNested addNewItem() { - return new V1ConfigMapProjectionFluentImpl.ItemsNestedImpl(); - } - public V1ConfigMapProjectionFluentImpl.ItemsNested addNewItemLike(V1KeyToPath item) { - return new V1ConfigMapProjectionFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ConfigMapProjectionFluentImpl.ItemsNested setNewItemLike(int index,V1KeyToPath item) { - return new V1ConfigMapProjectionFluentImpl.ItemsNestedImpl(index, item); - } - public V1ConfigMapProjectionFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ConfigMapProjectionFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ConfigMapProjectionFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ConfigMapProjectionFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1KeyToPathFluentImpl> implements V1ConfigMapProjectionFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1KeyToPath item) { - this.index = index; - this.builder = new V1KeyToPathBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1KeyToPathBuilder(this); - } - V1KeyToPathBuilder builder; - int index; - public N and() { - return (N) V1ConfigMapProjectionFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceBuilder.java index ccffe29eaa..3c9fbefe1f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ConfigMapVolumeSourceBuilder extends V1ConfigMapVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1ConfigMapVolumeSourceBuilder extends V1ConfigMapVolumeSourceFluent implements VisitableBuilder{ public V1ConfigMapVolumeSourceBuilder() { - this(false); - } - public V1ConfigMapVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1ConfigMapVolumeSource(), validationEnabled); + this(new V1ConfigMapVolumeSource()); } + public V1ConfigMapVolumeSourceBuilder(V1ConfigMapVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1ConfigMapVolumeSourceBuilder(V1ConfigMapVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ConfigMapVolumeSource(), validationEnabled); + this(fluent, new V1ConfigMapVolumeSource()); } + public V1ConfigMapVolumeSourceBuilder(V1ConfigMapVolumeSourceFluent fluent,V1ConfigMapVolumeSource instance) { - this(fluent, instance, false); - } - public V1ConfigMapVolumeSourceBuilder(V1ConfigMapVolumeSourceFluent fluent,V1ConfigMapVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDefaultMode(instance.getDefaultMode()); - fluent.withItems(instance.getItems()); - fluent.withName(instance.getName()); - fluent.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ConfigMapVolumeSourceBuilder(V1ConfigMapVolumeSource instance) { - this(instance,false); - } - public V1ConfigMapVolumeSourceBuilder(V1ConfigMapVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDefaultMode(instance.getDefaultMode()); - this.withItems(instance.getItems()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ConfigMapVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1ConfigMapVolumeSource build() { V1ConfigMapVolumeSource buildable = new V1ConfigMapVolumeSource(); buildable.setDefaultMode(fluent.getDefaultMode()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setName(fluent.getName()); buildable.setOptional(fluent.getOptional()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceFluent.java index 06b165c7b7..5d22844b80 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceFluent.java @@ -1,67 +1,282 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1ConfigMapVolumeSourceFluent> extends Fluent{ - public Integer getDefaultMode(); - public A withDefaultMode(Integer defaultMode); - public Boolean hasDefaultMode(); - public A addToItems(int index,V1KeyToPath item); - public A setToItems(int index,V1KeyToPath item); - public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1KeyToPath buildItem(int index); - public V1KeyToPath buildFirstItem(); - public V1KeyToPath buildLastItem(); - public V1KeyToPath buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public Boolean hasItems(); - public V1ConfigMapVolumeSourceFluent.ItemsNested addNewItem(); - public V1ConfigMapVolumeSourceFluent.ItemsNested addNewItemLike(V1KeyToPath item); - public V1ConfigMapVolumeSourceFluent.ItemsNested setNewItemLike(int index,V1KeyToPath item); - public V1ConfigMapVolumeSourceFluent.ItemsNested editItem(int index); - public V1ConfigMapVolumeSourceFluent.ItemsNested editFirstItem(); - public V1ConfigMapVolumeSourceFluent.ItemsNested editLastItem(); - public V1ConfigMapVolumeSourceFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getOptional(); - public A withOptional(Boolean optional); - public Boolean hasOptional(); - public A withOptional(); - public interface ItemsNested extends Nested,V1KeyToPathFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ConfigMapVolumeSourceFluent> extends BaseFluent{ + public V1ConfigMapVolumeSourceFluent() { + } + + public V1ConfigMapVolumeSourceFluent(V1ConfigMapVolumeSource instance) { + this.copyInstance(instance); + } + private Integer defaultMode; + private ArrayList items; + private String name; + private Boolean optional; + + protected void copyInstance(V1ConfigMapVolumeSource instance) { + instance = (instance != null ? instance : new V1ConfigMapVolumeSource()); + if (instance != null) { + this.withDefaultMode(instance.getDefaultMode()); + this.withItems(instance.getItems()); + this.withName(instance.getName()); + this.withOptional(instance.getOptional()); + } + } + + public Integer getDefaultMode() { + return this.defaultMode; + } + + public A withDefaultMode(Integer defaultMode) { + this.defaultMode = defaultMode; + return (A) this; + } + + public boolean hasDefaultMode() { + return this.defaultMode != null; + } + + public A addToItems(int index,V1KeyToPath item) { + if (this.items == null) {this.items = new ArrayList();} + V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1KeyToPath item) { + if (this.items == null) {this.items = new ArrayList();} + V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items == null) return (A)this; + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1KeyToPathBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1KeyToPath buildItem(int index) { + return this.items.get(index).build(); + } + + public V1KeyToPath buildFirstItem() { + return this.items.get(0).build(); + } + + public V1KeyToPath buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1KeyToPath buildMatchingItem(Predicate predicate) { + for (V1KeyToPathBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1KeyToPathBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1KeyToPath item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1KeyToPath item : items) { + this.addToItems(item); + } + } + return (A) this; } + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1KeyToPath item) { + return new ItemsNested(-1, item); + } + + public ItemsNested setNewItemLike(int index,V1KeyToPath item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1KeyToPathFluent> implements Nested{ + ItemsNested(int index,V1KeyToPath item) { + this.index = index; + this.builder = new V1KeyToPathBuilder(this, item); + } + V1KeyToPathBuilder builder; + int index; + + public N and() { + return (N) V1ConfigMapVolumeSourceFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceFluentImpl.java deleted file mode 100644 index c04fe318ce..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ConfigMapVolumeSourceFluentImpl.java +++ /dev/null @@ -1,222 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ConfigMapVolumeSourceFluentImpl> extends BaseFluent implements V1ConfigMapVolumeSourceFluent{ - public V1ConfigMapVolumeSourceFluentImpl() { - } - public V1ConfigMapVolumeSourceFluentImpl(V1ConfigMapVolumeSource instance) { - if (instance != null) { - this.withDefaultMode(instance.getDefaultMode()); - this.withItems(instance.getItems()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - } - private Integer defaultMode; - private ArrayList items; - private String name; - private Boolean optional; - public Integer getDefaultMode() { - return this.defaultMode; - } - public A withDefaultMode(Integer defaultMode) { - this.defaultMode=defaultMode; return (A) this; - } - public Boolean hasDefaultMode() { - return this.defaultMode != null; - } - public A addToItems(int index,V1KeyToPath item) { - if (this.items == null) {this.items = new ArrayList();} - V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1KeyToPath item) { - if (this.items == null) {this.items = new ArrayList();} - V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1KeyToPathBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1KeyToPath buildItem(int index) { - return this.items.get(index).build(); - } - public V1KeyToPath buildFirstItem() { - return this.items.get(0).build(); - } - public V1KeyToPath buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1KeyToPath buildMatchingItem(Predicate predicate) { - for (V1KeyToPathBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1KeyToPathBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1KeyToPath item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1KeyToPath item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ConfigMapVolumeSourceFluentImpl.ItemsNested addNewItem() { - return new V1ConfigMapVolumeSourceFluentImpl.ItemsNestedImpl(); - } - public V1ConfigMapVolumeSourceFluentImpl.ItemsNested addNewItemLike(V1KeyToPath item) { - return new V1ConfigMapVolumeSourceFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ConfigMapVolumeSourceFluentImpl.ItemsNested setNewItemLike(int index,V1KeyToPath item) { - return new V1ConfigMapVolumeSourceFluentImpl.ItemsNestedImpl(index, item); - } - public V1ConfigMapVolumeSourceFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ConfigMapVolumeSourceFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ConfigMapVolumeSourceFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ConfigMapVolumeSourceFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1KeyToPathFluentImpl> implements V1ConfigMapVolumeSourceFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1KeyToPath item) { - this.index = index; - this.builder = new V1KeyToPathBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1KeyToPathBuilder(this); - } - V1KeyToPathBuilder builder; - int index; - public N and() { - return (N) V1ConfigMapVolumeSourceFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerBuilder.java index be1c4ee35d..d8dc7e5333 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerBuilder.java @@ -1,112 +1,54 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ContainerBuilder extends V1ContainerFluentImpl implements VisitableBuilder{ +public class V1ContainerBuilder extends V1ContainerFluent implements VisitableBuilder{ public V1ContainerBuilder() { - this(false); - } - public V1ContainerBuilder(Boolean validationEnabled) { - this(new V1Container(), validationEnabled); + this(new V1Container()); } + public V1ContainerBuilder(V1ContainerFluent fluent) { - this(fluent, false); - } - public V1ContainerBuilder(V1ContainerFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Container(), validationEnabled); + this(fluent, new V1Container()); } + public V1ContainerBuilder(V1ContainerFluent fluent,V1Container instance) { - this(fluent, instance, false); - } - public V1ContainerBuilder(V1ContainerFluent fluent,V1Container instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withArgs(instance.getArgs()); - fluent.withCommand(instance.getCommand()); - fluent.withEnv(instance.getEnv()); - fluent.withEnvFrom(instance.getEnvFrom()); - fluent.withImage(instance.getImage()); - fluent.withImagePullPolicy(instance.getImagePullPolicy()); - fluent.withLifecycle(instance.getLifecycle()); - fluent.withLivenessProbe(instance.getLivenessProbe()); - fluent.withName(instance.getName()); - fluent.withPorts(instance.getPorts()); - fluent.withReadinessProbe(instance.getReadinessProbe()); - fluent.withResizePolicy(instance.getResizePolicy()); - fluent.withResources(instance.getResources()); - fluent.withSecurityContext(instance.getSecurityContext()); - fluent.withStartupProbe(instance.getStartupProbe()); - fluent.withStdin(instance.getStdin()); - fluent.withStdinOnce(instance.getStdinOnce()); - fluent.withTerminationMessagePath(instance.getTerminationMessagePath()); - fluent.withTerminationMessagePolicy(instance.getTerminationMessagePolicy()); - fluent.withTty(instance.getTty()); - fluent.withVolumeDevices(instance.getVolumeDevices()); - fluent.withVolumeMounts(instance.getVolumeMounts()); - fluent.withWorkingDir(instance.getWorkingDir()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ContainerBuilder(V1Container instance) { - this(instance,false); - } - public V1ContainerBuilder(V1Container instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withArgs(instance.getArgs()); - this.withCommand(instance.getCommand()); - this.withEnv(instance.getEnv()); - this.withEnvFrom(instance.getEnvFrom()); - this.withImage(instance.getImage()); - this.withImagePullPolicy(instance.getImagePullPolicy()); - this.withLifecycle(instance.getLifecycle()); - this.withLivenessProbe(instance.getLivenessProbe()); - this.withName(instance.getName()); - this.withPorts(instance.getPorts()); - this.withReadinessProbe(instance.getReadinessProbe()); - this.withResizePolicy(instance.getResizePolicy()); - this.withResources(instance.getResources()); - this.withSecurityContext(instance.getSecurityContext()); - this.withStartupProbe(instance.getStartupProbe()); - this.withStdin(instance.getStdin()); - this.withStdinOnce(instance.getStdinOnce()); - this.withTerminationMessagePath(instance.getTerminationMessagePath()); - this.withTerminationMessagePolicy(instance.getTerminationMessagePolicy()); - this.withTty(instance.getTty()); - this.withVolumeDevices(instance.getVolumeDevices()); - this.withVolumeMounts(instance.getVolumeMounts()); - this.withWorkingDir(instance.getWorkingDir()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ContainerFluent fluent; - Boolean validationEnabled; + public V1Container build() { V1Container buildable = new V1Container(); buildable.setArgs(fluent.getArgs()); buildable.setCommand(fluent.getCommand()); - buildable.setEnv(fluent.getEnv()); - buildable.setEnvFrom(fluent.getEnvFrom()); + buildable.setEnv(fluent.buildEnv()); + buildable.setEnvFrom(fluent.buildEnvFrom()); buildable.setImage(fluent.getImage()); buildable.setImagePullPolicy(fluent.getImagePullPolicy()); - buildable.setLifecycle(fluent.getLifecycle()); - buildable.setLivenessProbe(fluent.getLivenessProbe()); + buildable.setLifecycle(fluent.buildLifecycle()); + buildable.setLivenessProbe(fluent.buildLivenessProbe()); buildable.setName(fluent.getName()); - buildable.setPorts(fluent.getPorts()); - buildable.setReadinessProbe(fluent.getReadinessProbe()); - buildable.setResizePolicy(fluent.getResizePolicy()); - buildable.setResources(fluent.getResources()); - buildable.setSecurityContext(fluent.getSecurityContext()); - buildable.setStartupProbe(fluent.getStartupProbe()); + buildable.setPorts(fluent.buildPorts()); + buildable.setReadinessProbe(fluent.buildReadinessProbe()); + buildable.setResizePolicy(fluent.buildResizePolicy()); + buildable.setResources(fluent.buildResources()); + buildable.setRestartPolicy(fluent.getRestartPolicy()); + buildable.setSecurityContext(fluent.buildSecurityContext()); + buildable.setStartupProbe(fluent.buildStartupProbe()); buildable.setStdin(fluent.getStdin()); buildable.setStdinOnce(fluent.getStdinOnce()); buildable.setTerminationMessagePath(fluent.getTerminationMessagePath()); buildable.setTerminationMessagePolicy(fluent.getTerminationMessagePolicy()); buildable.setTty(fluent.getTty()); - buildable.setVolumeDevices(fluent.getVolumeDevices()); - buildable.setVolumeMounts(fluent.getVolumeMounts()); + buildable.setVolumeDevices(fluent.buildVolumeDevices()); + buildable.setVolumeMounts(fluent.buildVolumeMounts()); buildable.setWorkingDir(fluent.getWorkingDir()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerFluent.java index 8f63fc5762..09339e3a03 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerFluent.java @@ -1,411 +1,1829 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; import java.util.List; import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.util.Collection; +import java.lang.Object; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; import java.util.Iterator; - /** - * Generated - */ -public interface V1ContainerFluent> extends Fluent{ - public A addToArgs(int index,String item); - public A setToArgs(int index,String item); - public A addToArgs(java.lang.String... items); - public A addAllToArgs(Collection items); - public A removeFromArgs(java.lang.String... items); - public A removeAllFromArgs(Collection items); - public List getArgs(); - public String getArg(int index); - public String getFirstArg(); - public String getLastArg(); - public String getMatchingArg(Predicate predicate); - public Boolean hasMatchingArg(Predicate predicate); - public A withArgs(List args); - public A withArgs(java.lang.String... args); - public Boolean hasArgs(); - public A addToCommand(int index,String item); - public A setToCommand(int index,String item); - public A addToCommand(java.lang.String... items); - public A addAllToCommand(Collection items); - public A removeFromCommand(java.lang.String... items); - public A removeAllFromCommand(Collection items); - public List getCommand(); - public String getCommand(int index); - public String getFirstCommand(); - public String getLastCommand(); - public String getMatchingCommand(Predicate predicate); - public Boolean hasMatchingCommand(Predicate predicate); - public A withCommand(List command); - public A withCommand(java.lang.String... command); - public Boolean hasCommand(); - public A addToEnv(int index,V1EnvVar item); - public A setToEnv(int index,V1EnvVar item); - public A addToEnv(io.kubernetes.client.openapi.models.V1EnvVar... items); - public A addAllToEnv(Collection items); - public A removeFromEnv(io.kubernetes.client.openapi.models.V1EnvVar... items); - public A removeAllFromEnv(Collection items); - public A removeMatchingFromEnv(Predicate predicate); - - /** - * This method has been deprecated, please use method buildEnv instead. - * @return The buildable object. - */ - @Deprecated - public List getEnv(); - public List buildEnv(); - public V1EnvVar buildEnv(int index); - public V1EnvVar buildFirstEnv(); - public V1EnvVar buildLastEnv(); - public V1EnvVar buildMatchingEnv(Predicate predicate); - public Boolean hasMatchingEnv(Predicate predicate); - public A withEnv(List env); - public A withEnv(io.kubernetes.client.openapi.models.V1EnvVar... env); - public Boolean hasEnv(); - public V1ContainerFluent.EnvNested addNewEnv(); - public V1ContainerFluent.EnvNested addNewEnvLike(V1EnvVar item); - public V1ContainerFluent.EnvNested setNewEnvLike(int index,V1EnvVar item); - public V1ContainerFluent.EnvNested editEnv(int index); - public V1ContainerFluent.EnvNested editFirstEnv(); - public V1ContainerFluent.EnvNested editLastEnv(); - public V1ContainerFluent.EnvNested editMatchingEnv(Predicate predicate); - public A addToEnvFrom(int index,V1EnvFromSource item); - public A setToEnvFrom(int index,V1EnvFromSource item); - public A addToEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items); - public A addAllToEnvFrom(Collection items); - public A removeFromEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items); - public A removeAllFromEnvFrom(Collection items); - public A removeMatchingFromEnvFrom(Predicate predicate); - - /** - * This method has been deprecated, please use method buildEnvFrom instead. - * @return The buildable object. - */ - @Deprecated - public List getEnvFrom(); - public List buildEnvFrom(); - public V1EnvFromSource buildEnvFrom(int index); - public V1EnvFromSource buildFirstEnvFrom(); - public V1EnvFromSource buildLastEnvFrom(); - public V1EnvFromSource buildMatchingEnvFrom(Predicate predicate); - public Boolean hasMatchingEnvFrom(Predicate predicate); - public A withEnvFrom(List envFrom); - public A withEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... envFrom); - public Boolean hasEnvFrom(); - public V1ContainerFluent.EnvFromNested addNewEnvFrom(); - public V1ContainerFluent.EnvFromNested addNewEnvFromLike(V1EnvFromSource item); - public V1ContainerFluent.EnvFromNested setNewEnvFromLike(int index,V1EnvFromSource item); - public V1ContainerFluent.EnvFromNested editEnvFrom(int index); - public V1ContainerFluent.EnvFromNested editFirstEnvFrom(); - public V1ContainerFluent.EnvFromNested editLastEnvFrom(); - public V1ContainerFluent.EnvFromNested editMatchingEnvFrom(Predicate predicate); - public String getImage(); - public A withImage(String image); - public Boolean hasImage(); - public String getImagePullPolicy(); - public A withImagePullPolicy(String imagePullPolicy); - public Boolean hasImagePullPolicy(); - - /** - * This method has been deprecated, please use method buildLifecycle instead. - * @return The buildable object. - */ - @Deprecated - public V1Lifecycle getLifecycle(); - public V1Lifecycle buildLifecycle(); - public A withLifecycle(V1Lifecycle lifecycle); - public Boolean hasLifecycle(); - public V1ContainerFluent.LifecycleNested withNewLifecycle(); - public V1ContainerFluent.LifecycleNested withNewLifecycleLike(V1Lifecycle item); - public V1ContainerFluent.LifecycleNested editLifecycle(); - public V1ContainerFluent.LifecycleNested editOrNewLifecycle(); - public V1ContainerFluent.LifecycleNested editOrNewLifecycleLike(V1Lifecycle item); - - /** - * This method has been deprecated, please use method buildLivenessProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getLivenessProbe(); - public V1Probe buildLivenessProbe(); - public A withLivenessProbe(V1Probe livenessProbe); - public Boolean hasLivenessProbe(); - public V1ContainerFluent.LivenessProbeNested withNewLivenessProbe(); - public V1ContainerFluent.LivenessProbeNested withNewLivenessProbeLike(V1Probe item); - public V1ContainerFluent.LivenessProbeNested editLivenessProbe(); - public V1ContainerFluent.LivenessProbeNested editOrNewLivenessProbe(); - public V1ContainerFluent.LivenessProbeNested editOrNewLivenessProbeLike(V1Probe item); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public A addToPorts(int index,V1ContainerPort item); - public A setToPorts(int index,V1ContainerPort item); - public A addToPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items); - public A addAllToPorts(Collection items); - public A removeFromPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items); - public A removeAllFromPorts(Collection items); - public A removeMatchingFromPorts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts(); - public List buildPorts(); - public V1ContainerPort buildPort(int index); - public V1ContainerPort buildFirstPort(); - public V1ContainerPort buildLastPort(); - public V1ContainerPort buildMatchingPort(Predicate predicate); - public Boolean hasMatchingPort(Predicate predicate); - public A withPorts(List ports); - public A withPorts(io.kubernetes.client.openapi.models.V1ContainerPort... ports); - public Boolean hasPorts(); - public V1ContainerFluent.PortsNested addNewPort(); - public V1ContainerFluent.PortsNested addNewPortLike(V1ContainerPort item); - public V1ContainerFluent.PortsNested setNewPortLike(int index,V1ContainerPort item); - public V1ContainerFluent.PortsNested editPort(int index); - public V1ContainerFluent.PortsNested editFirstPort(); - public V1ContainerFluent.PortsNested editLastPort(); - public V1ContainerFluent.PortsNested editMatchingPort(Predicate predicate); - - /** - * This method has been deprecated, please use method buildReadinessProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getReadinessProbe(); - public V1Probe buildReadinessProbe(); - public A withReadinessProbe(V1Probe readinessProbe); - public Boolean hasReadinessProbe(); - public V1ContainerFluent.ReadinessProbeNested withNewReadinessProbe(); - public V1ContainerFluent.ReadinessProbeNested withNewReadinessProbeLike(V1Probe item); - public V1ContainerFluent.ReadinessProbeNested editReadinessProbe(); - public V1ContainerFluent.ReadinessProbeNested editOrNewReadinessProbe(); - public V1ContainerFluent.ReadinessProbeNested editOrNewReadinessProbeLike(V1Probe item); - public A addToResizePolicy(int index,V1ContainerResizePolicy item); - public A setToResizePolicy(int index,V1ContainerResizePolicy item); - public A addToResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items); - public A addAllToResizePolicy(Collection items); - public A removeFromResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items); - public A removeAllFromResizePolicy(Collection items); - public A removeMatchingFromResizePolicy(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResizePolicy instead. - * @return The buildable object. - */ - @Deprecated - public List getResizePolicy(); - public List buildResizePolicy(); - public V1ContainerResizePolicy buildResizePolicy(int index); - public V1ContainerResizePolicy buildFirstResizePolicy(); - public V1ContainerResizePolicy buildLastResizePolicy(); - public V1ContainerResizePolicy buildMatchingResizePolicy(Predicate predicate); - public Boolean hasMatchingResizePolicy(Predicate predicate); - public A withResizePolicy(List resizePolicy); - public A withResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... resizePolicy); - public Boolean hasResizePolicy(); - public V1ContainerFluent.ResizePolicyNested addNewResizePolicy(); - public V1ContainerFluent.ResizePolicyNested addNewResizePolicyLike(V1ContainerResizePolicy item); - public V1ContainerFluent.ResizePolicyNested setNewResizePolicyLike(int index,V1ContainerResizePolicy item); - public V1ContainerFluent.ResizePolicyNested editResizePolicy(int index); - public V1ContainerFluent.ResizePolicyNested editFirstResizePolicy(); - public V1ContainerFluent.ResizePolicyNested editLastResizePolicy(); - public V1ContainerFluent.ResizePolicyNested editMatchingResizePolicy(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResources instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceRequirements getResources(); - public V1ResourceRequirements buildResources(); - public A withResources(V1ResourceRequirements resources); - public Boolean hasResources(); - public V1ContainerFluent.ResourcesNested withNewResources(); - public V1ContainerFluent.ResourcesNested withNewResourcesLike(V1ResourceRequirements item); - public V1ContainerFluent.ResourcesNested editResources(); - public V1ContainerFluent.ResourcesNested editOrNewResources(); - public V1ContainerFluent.ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item); - - /** - * This method has been deprecated, please use method buildSecurityContext instead. - * @return The buildable object. - */ - @Deprecated - public V1SecurityContext getSecurityContext(); - public V1SecurityContext buildSecurityContext(); - public A withSecurityContext(V1SecurityContext securityContext); - public Boolean hasSecurityContext(); - public V1ContainerFluent.SecurityContextNested withNewSecurityContext(); - public V1ContainerFluent.SecurityContextNested withNewSecurityContextLike(V1SecurityContext item); - public V1ContainerFluent.SecurityContextNested editSecurityContext(); - public V1ContainerFluent.SecurityContextNested editOrNewSecurityContext(); - public V1ContainerFluent.SecurityContextNested editOrNewSecurityContextLike(V1SecurityContext item); - - /** - * This method has been deprecated, please use method buildStartupProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getStartupProbe(); - public V1Probe buildStartupProbe(); - public A withStartupProbe(V1Probe startupProbe); - public Boolean hasStartupProbe(); - public V1ContainerFluent.StartupProbeNested withNewStartupProbe(); - public V1ContainerFluent.StartupProbeNested withNewStartupProbeLike(V1Probe item); - public V1ContainerFluent.StartupProbeNested editStartupProbe(); - public V1ContainerFluent.StartupProbeNested editOrNewStartupProbe(); - public V1ContainerFluent.StartupProbeNested editOrNewStartupProbeLike(V1Probe item); - public Boolean getStdin(); - public A withStdin(Boolean stdin); - public Boolean hasStdin(); - public Boolean getStdinOnce(); - public A withStdinOnce(Boolean stdinOnce); - public Boolean hasStdinOnce(); - public String getTerminationMessagePath(); - public A withTerminationMessagePath(String terminationMessagePath); - public Boolean hasTerminationMessagePath(); - public String getTerminationMessagePolicy(); - public A withTerminationMessagePolicy(String terminationMessagePolicy); - public Boolean hasTerminationMessagePolicy(); - public Boolean getTty(); - public A withTty(Boolean tty); - public Boolean hasTty(); - public A addToVolumeDevices(int index,V1VolumeDevice item); - public A setToVolumeDevices(int index,V1VolumeDevice item); - public A addToVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items); - public A addAllToVolumeDevices(Collection items); - public A removeFromVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items); - public A removeAllFromVolumeDevices(Collection items); - public A removeMatchingFromVolumeDevices(Predicate predicate); - - /** - * This method has been deprecated, please use method buildVolumeDevices instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeDevices(); - public List buildVolumeDevices(); - public V1VolumeDevice buildVolumeDevice(int index); - public V1VolumeDevice buildFirstVolumeDevice(); - public V1VolumeDevice buildLastVolumeDevice(); - public V1VolumeDevice buildMatchingVolumeDevice(Predicate predicate); - public Boolean hasMatchingVolumeDevice(Predicate predicate); - public A withVolumeDevices(List volumeDevices); - public A withVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... volumeDevices); - public Boolean hasVolumeDevices(); - public V1ContainerFluent.VolumeDevicesNested addNewVolumeDevice(); - public V1ContainerFluent.VolumeDevicesNested addNewVolumeDeviceLike(V1VolumeDevice item); - public V1ContainerFluent.VolumeDevicesNested setNewVolumeDeviceLike(int index,V1VolumeDevice item); - public V1ContainerFluent.VolumeDevicesNested editVolumeDevice(int index); - public V1ContainerFluent.VolumeDevicesNested editFirstVolumeDevice(); - public V1ContainerFluent.VolumeDevicesNested editLastVolumeDevice(); - public V1ContainerFluent.VolumeDevicesNested editMatchingVolumeDevice(Predicate predicate); - public A addToVolumeMounts(int index,V1VolumeMount item); - public A setToVolumeMounts(int index,V1VolumeMount item); - public A addToVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items); - public A addAllToVolumeMounts(Collection items); - public A removeFromVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items); - public A removeAllFromVolumeMounts(Collection items); - public A removeMatchingFromVolumeMounts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildVolumeMounts instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeMounts(); - public List buildVolumeMounts(); - public V1VolumeMount buildVolumeMount(int index); - public V1VolumeMount buildFirstVolumeMount(); - public V1VolumeMount buildLastVolumeMount(); - public V1VolumeMount buildMatchingVolumeMount(Predicate predicate); - public Boolean hasMatchingVolumeMount(Predicate predicate); - public A withVolumeMounts(List volumeMounts); - public A withVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... volumeMounts); - public Boolean hasVolumeMounts(); - public V1ContainerFluent.VolumeMountsNested addNewVolumeMount(); - public V1ContainerFluent.VolumeMountsNested addNewVolumeMountLike(V1VolumeMount item); - public V1ContainerFluent.VolumeMountsNested setNewVolumeMountLike(int index,V1VolumeMount item); - public V1ContainerFluent.VolumeMountsNested editVolumeMount(int index); - public V1ContainerFluent.VolumeMountsNested editFirstVolumeMount(); - public V1ContainerFluent.VolumeMountsNested editLastVolumeMount(); - public V1ContainerFluent.VolumeMountsNested editMatchingVolumeMount(Predicate predicate); - public String getWorkingDir(); - public A withWorkingDir(String workingDir); - public Boolean hasWorkingDir(); - public A withStdin(); - public A withStdinOnce(); - public A withTty(); - public interface EnvNested extends Nested,V1EnvVarFluent>{ - public N and(); - public N endEnv(); - - } - public interface EnvFromNested extends Nested,V1EnvFromSourceFluent>{ - public N and(); - public N endEnvFrom(); - - } - public interface LifecycleNested extends Nested,V1LifecycleFluent>{ - public N and(); - public N endLifecycle(); - - } - public interface LivenessProbeNested extends Nested,V1ProbeFluent>{ - public N and(); - public N endLivenessProbe(); - - } - public interface PortsNested extends Nested,V1ContainerPortFluent>{ - public N and(); - public N endPort(); - - } - public interface ReadinessProbeNested extends Nested,V1ProbeFluent>{ - public N and(); - public N endReadinessProbe(); - - } - public interface ResizePolicyNested extends Nested,V1ContainerResizePolicyFluent>{ - public N and(); - public N endResizePolicy(); - - } - public interface ResourcesNested extends Nested,V1ResourceRequirementsFluent>{ - public N and(); - public N endResources(); - - } - public interface SecurityContextNested extends Nested,V1SecurityContextFluent>{ - public N and(); - public N endSecurityContext(); - - } - public interface StartupProbeNested extends Nested,V1ProbeFluent>{ - public N and(); - public N endStartupProbe(); - - } - public interface VolumeDevicesNested extends Nested,V1VolumeDeviceFluent>{ - public N and(); - public N endVolumeDevice(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ContainerFluent> extends BaseFluent{ + public V1ContainerFluent() { } - public interface VolumeMountsNested extends Nested,V1VolumeMountFluent>{ - public N and(); - public N endVolumeMount(); + + public V1ContainerFluent(V1Container instance) { + this.copyInstance(instance); + } + private List args; + private List command; + private ArrayList env; + private ArrayList envFrom; + private String image; + private String imagePullPolicy; + private V1LifecycleBuilder lifecycle; + private V1ProbeBuilder livenessProbe; + private String name; + private ArrayList ports; + private V1ProbeBuilder readinessProbe; + private ArrayList resizePolicy; + private V1ResourceRequirementsBuilder resources; + private String restartPolicy; + private V1SecurityContextBuilder securityContext; + private V1ProbeBuilder startupProbe; + private Boolean stdin; + private Boolean stdinOnce; + private String terminationMessagePath; + private String terminationMessagePolicy; + private Boolean tty; + private ArrayList volumeDevices; + private ArrayList volumeMounts; + private String workingDir; + + protected void copyInstance(V1Container instance) { + instance = (instance != null ? instance : new V1Container()); + if (instance != null) { + this.withArgs(instance.getArgs()); + this.withCommand(instance.getCommand()); + this.withEnv(instance.getEnv()); + this.withEnvFrom(instance.getEnvFrom()); + this.withImage(instance.getImage()); + this.withImagePullPolicy(instance.getImagePullPolicy()); + this.withLifecycle(instance.getLifecycle()); + this.withLivenessProbe(instance.getLivenessProbe()); + this.withName(instance.getName()); + this.withPorts(instance.getPorts()); + this.withReadinessProbe(instance.getReadinessProbe()); + this.withResizePolicy(instance.getResizePolicy()); + this.withResources(instance.getResources()); + this.withRestartPolicy(instance.getRestartPolicy()); + this.withSecurityContext(instance.getSecurityContext()); + this.withStartupProbe(instance.getStartupProbe()); + this.withStdin(instance.getStdin()); + this.withStdinOnce(instance.getStdinOnce()); + this.withTerminationMessagePath(instance.getTerminationMessagePath()); + this.withTerminationMessagePolicy(instance.getTerminationMessagePolicy()); + this.withTty(instance.getTty()); + this.withVolumeDevices(instance.getVolumeDevices()); + this.withVolumeMounts(instance.getVolumeMounts()); + this.withWorkingDir(instance.getWorkingDir()); + } + } + + public A addToArgs(int index,String item) { + if (this.args == null) {this.args = new ArrayList();} + this.args.add(index, item); + return (A)this; + } + + public A setToArgs(int index,String item) { + if (this.args == null) {this.args = new ArrayList();} + this.args.set(index, item); return (A)this; + } + + public A addToArgs(java.lang.String... items) { + if (this.args == null) {this.args = new ArrayList();} + for (String item : items) {this.args.add(item);} return (A)this; + } + + public A addAllToArgs(Collection items) { + if (this.args == null) {this.args = new ArrayList();} + for (String item : items) {this.args.add(item);} return (A)this; + } + + public A removeFromArgs(java.lang.String... items) { + if (this.args == null) return (A)this; + for (String item : items) { this.args.remove(item);} return (A)this; + } + + public A removeAllFromArgs(Collection items) { + if (this.args == null) return (A)this; + for (String item : items) { this.args.remove(item);} return (A)this; + } + + public List getArgs() { + return this.args; + } + + public String getArg(int index) { + return this.args.get(index); + } + + public String getFirstArg() { + return this.args.get(0); + } + + public String getLastArg() { + return this.args.get(args.size() - 1); + } + + public String getMatchingArg(Predicate predicate) { + for (String item : args) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingArg(Predicate predicate) { + for (String item : args) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withArgs(List args) { + if (args != null) { + this.args = new ArrayList(); + for (String item : args) { + this.addToArgs(item); + } + } else { + this.args = null; + } + return (A) this; + } + + public A withArgs(java.lang.String... args) { + if (this.args != null) { + this.args.clear(); + _visitables.remove("args"); + } + if (args != null) { + for (String item : args) { + this.addToArgs(item); + } + } + return (A) this; + } + + public boolean hasArgs() { + return this.args != null && !this.args.isEmpty(); + } + + public A addToCommand(int index,String item) { + if (this.command == null) {this.command = new ArrayList();} + this.command.add(index, item); + return (A)this; + } + + public A setToCommand(int index,String item) { + if (this.command == null) {this.command = new ArrayList();} + this.command.set(index, item); return (A)this; + } + + public A addToCommand(java.lang.String... items) { + if (this.command == null) {this.command = new ArrayList();} + for (String item : items) {this.command.add(item);} return (A)this; + } + + public A addAllToCommand(Collection items) { + if (this.command == null) {this.command = new ArrayList();} + for (String item : items) {this.command.add(item);} return (A)this; + } + + public A removeFromCommand(java.lang.String... items) { + if (this.command == null) return (A)this; + for (String item : items) { this.command.remove(item);} return (A)this; + } + + public A removeAllFromCommand(Collection items) { + if (this.command == null) return (A)this; + for (String item : items) { this.command.remove(item);} return (A)this; + } + + public List getCommand() { + return this.command; + } + + public String getCommand(int index) { + return this.command.get(index); + } + + public String getFirstCommand() { + return this.command.get(0); + } + + public String getLastCommand() { + return this.command.get(command.size() - 1); + } + + public String getMatchingCommand(Predicate predicate) { + for (String item : command) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingCommand(Predicate predicate) { + for (String item : command) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withCommand(List command) { + if (command != null) { + this.command = new ArrayList(); + for (String item : command) { + this.addToCommand(item); + } + } else { + this.command = null; + } + return (A) this; + } + + public A withCommand(java.lang.String... command) { + if (this.command != null) { + this.command.clear(); + _visitables.remove("command"); + } + if (command != null) { + for (String item : command) { + this.addToCommand(item); + } + } + return (A) this; + } + + public boolean hasCommand() { + return this.command != null && !this.command.isEmpty(); + } + + public A addToEnv(int index,V1EnvVar item) { + if (this.env == null) {this.env = new ArrayList();} + V1EnvVarBuilder builder = new V1EnvVarBuilder(item); + if (index < 0 || index >= env.size()) { _visitables.get("env").add(builder); env.add(builder); } else { _visitables.get("env").add(index, builder); env.add(index, builder);} + return (A)this; + } + + public A setToEnv(int index,V1EnvVar item) { + if (this.env == null) {this.env = new ArrayList();} + V1EnvVarBuilder builder = new V1EnvVarBuilder(item); + if (index < 0 || index >= env.size()) { _visitables.get("env").add(builder); env.add(builder); } else { _visitables.get("env").set(index, builder); env.set(index, builder);} + return (A)this; + } + + public A addToEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) { + if (this.env == null) {this.env = new ArrayList();} + for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this; + } + + public A addAllToEnv(Collection items) { + if (this.env == null) {this.env = new ArrayList();} + for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this; + } + + public A removeFromEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) { + if (this.env == null) return (A)this; + for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder); this.env.remove(builder);} return (A)this; + } + + public A removeAllFromEnv(Collection items) { + if (this.env == null) return (A)this; + for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder); this.env.remove(builder);} return (A)this; + } + + public A removeMatchingFromEnv(Predicate predicate) { + if (env == null) return (A) this; + final Iterator each = env.iterator(); + final List visitables = _visitables.get("env"); + while (each.hasNext()) { + V1EnvVarBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildEnv() { + return this.env != null ? build(env) : null; + } + + public V1EnvVar buildEnv(int index) { + return this.env.get(index).build(); + } + + public V1EnvVar buildFirstEnv() { + return this.env.get(0).build(); + } + + public V1EnvVar buildLastEnv() { + return this.env.get(env.size() - 1).build(); + } + + public V1EnvVar buildMatchingEnv(Predicate predicate) { + for (V1EnvVarBuilder item : env) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingEnv(Predicate predicate) { + for (V1EnvVarBuilder item : env) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withEnv(List env) { + if (this.env != null) { + this._visitables.get("env").clear(); + } + if (env != null) { + this.env = new ArrayList(); + for (V1EnvVar item : env) { + this.addToEnv(item); + } + } else { + this.env = null; + } + return (A) this; + } + + public A withEnv(io.kubernetes.client.openapi.models.V1EnvVar... env) { + if (this.env != null) { + this.env.clear(); + _visitables.remove("env"); + } + if (env != null) { + for (V1EnvVar item : env) { + this.addToEnv(item); + } + } + return (A) this; + } + + public boolean hasEnv() { + return this.env != null && !this.env.isEmpty(); + } + + public EnvNested addNewEnv() { + return new EnvNested(-1, null); + } + + public EnvNested addNewEnvLike(V1EnvVar item) { + return new EnvNested(-1, item); + } + + public EnvNested setNewEnvLike(int index,V1EnvVar item) { + return new EnvNested(index, item); + } + + public EnvNested editEnv(int index) { + if (env.size() <= index) throw new RuntimeException("Can't edit env. Index exceeds size."); + return setNewEnvLike(index, buildEnv(index)); + } + + public EnvNested editFirstEnv() { + if (env.size() == 0) throw new RuntimeException("Can't edit first env. The list is empty."); + return setNewEnvLike(0, buildEnv(0)); + } + + public EnvNested editLastEnv() { + int index = env.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last env. The list is empty."); + return setNewEnvLike(index, buildEnv(index)); + } + + public EnvNested editMatchingEnv(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item); + if (index < 0 || index >= envFrom.size()) { _visitables.get("envFrom").add(builder); envFrom.add(builder); } else { _visitables.get("envFrom").add(index, builder); envFrom.add(index, builder);} + return (A)this; + } + + public A setToEnvFrom(int index,V1EnvFromSource item) { + if (this.envFrom == null) {this.envFrom = new ArrayList();} + V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item); + if (index < 0 || index >= envFrom.size()) { _visitables.get("envFrom").add(builder); envFrom.add(builder); } else { _visitables.get("envFrom").set(index, builder); envFrom.set(index, builder);} + return (A)this; + } + + public A addToEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) { + if (this.envFrom == null) {this.envFrom = new ArrayList();} + for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this; + } + + public A addAllToEnvFrom(Collection items) { + if (this.envFrom == null) {this.envFrom = new ArrayList();} + for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this; + } + + public A removeFromEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) { + if (this.envFrom == null) return (A)this; + for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder); this.envFrom.remove(builder);} return (A)this; + } + + public A removeAllFromEnvFrom(Collection items) { + if (this.envFrom == null) return (A)this; + for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder); this.envFrom.remove(builder);} return (A)this; + } + + public A removeMatchingFromEnvFrom(Predicate predicate) { + if (envFrom == null) return (A) this; + final Iterator each = envFrom.iterator(); + final List visitables = _visitables.get("envFrom"); + while (each.hasNext()) { + V1EnvFromSourceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildEnvFrom() { + return this.envFrom != null ? build(envFrom) : null; + } + + public V1EnvFromSource buildEnvFrom(int index) { + return this.envFrom.get(index).build(); + } + + public V1EnvFromSource buildFirstEnvFrom() { + return this.envFrom.get(0).build(); + } + + public V1EnvFromSource buildLastEnvFrom() { + return this.envFrom.get(envFrom.size() - 1).build(); + } + + public V1EnvFromSource buildMatchingEnvFrom(Predicate predicate) { + for (V1EnvFromSourceBuilder item : envFrom) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingEnvFrom(Predicate predicate) { + for (V1EnvFromSourceBuilder item : envFrom) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withEnvFrom(List envFrom) { + if (this.envFrom != null) { + this._visitables.get("envFrom").clear(); + } + if (envFrom != null) { + this.envFrom = new ArrayList(); + for (V1EnvFromSource item : envFrom) { + this.addToEnvFrom(item); + } + } else { + this.envFrom = null; + } + return (A) this; + } + + public A withEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... envFrom) { + if (this.envFrom != null) { + this.envFrom.clear(); + _visitables.remove("envFrom"); + } + if (envFrom != null) { + for (V1EnvFromSource item : envFrom) { + this.addToEnvFrom(item); + } + } + return (A) this; + } + + public boolean hasEnvFrom() { + return this.envFrom != null && !this.envFrom.isEmpty(); + } + + public EnvFromNested addNewEnvFrom() { + return new EnvFromNested(-1, null); + } + + public EnvFromNested addNewEnvFromLike(V1EnvFromSource item) { + return new EnvFromNested(-1, item); + } + + public EnvFromNested setNewEnvFromLike(int index,V1EnvFromSource item) { + return new EnvFromNested(index, item); + } + + public EnvFromNested editEnvFrom(int index) { + if (envFrom.size() <= index) throw new RuntimeException("Can't edit envFrom. Index exceeds size."); + return setNewEnvFromLike(index, buildEnvFrom(index)); + } + + public EnvFromNested editFirstEnvFrom() { + if (envFrom.size() == 0) throw new RuntimeException("Can't edit first envFrom. The list is empty."); + return setNewEnvFromLike(0, buildEnvFrom(0)); + } + + public EnvFromNested editLastEnvFrom() { + int index = envFrom.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last envFrom. The list is empty."); + return setNewEnvFromLike(index, buildEnvFrom(index)); + } + + public EnvFromNested editMatchingEnvFrom(Predicate predicate) { + int index = -1; + for (int i=0;i withNewLifecycle() { + return new LifecycleNested(null); + } + + public LifecycleNested withNewLifecycleLike(V1Lifecycle item) { + return new LifecycleNested(item); + } + + public LifecycleNested editLifecycle() { + return withNewLifecycleLike(java.util.Optional.ofNullable(buildLifecycle()).orElse(null)); + } + + public LifecycleNested editOrNewLifecycle() { + return withNewLifecycleLike(java.util.Optional.ofNullable(buildLifecycle()).orElse(new V1LifecycleBuilder().build())); + } + + public LifecycleNested editOrNewLifecycleLike(V1Lifecycle item) { + return withNewLifecycleLike(java.util.Optional.ofNullable(buildLifecycle()).orElse(item)); + } + + public V1Probe buildLivenessProbe() { + return this.livenessProbe != null ? this.livenessProbe.build() : null; + } + + public A withLivenessProbe(V1Probe livenessProbe) { + this._visitables.remove("livenessProbe"); + if (livenessProbe != null) { + this.livenessProbe = new V1ProbeBuilder(livenessProbe); + this._visitables.get("livenessProbe").add(this.livenessProbe); + } else { + this.livenessProbe = null; + this._visitables.get("livenessProbe").remove(this.livenessProbe); + } + return (A) this; + } + + public boolean hasLivenessProbe() { + return this.livenessProbe != null; + } + + public LivenessProbeNested withNewLivenessProbe() { + return new LivenessProbeNested(null); + } + + public LivenessProbeNested withNewLivenessProbeLike(V1Probe item) { + return new LivenessProbeNested(item); + } + + public LivenessProbeNested editLivenessProbe() { + return withNewLivenessProbeLike(java.util.Optional.ofNullable(buildLivenessProbe()).orElse(null)); + } + + public LivenessProbeNested editOrNewLivenessProbe() { + return withNewLivenessProbeLike(java.util.Optional.ofNullable(buildLivenessProbe()).orElse(new V1ProbeBuilder().build())); + } + + public LivenessProbeNested editOrNewLivenessProbeLike(V1Probe item) { + return withNewLivenessProbeLike(java.util.Optional.ofNullable(buildLivenessProbe()).orElse(item)); + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public A addToPorts(int index,V1ContainerPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} + return (A)this; + } + + public A setToPorts(int index,V1ContainerPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} + return (A)this; + } + + public A addToPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A addAllToPorts(Collection items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A removeFromPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) { + if (this.ports == null) return (A)this; + for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeAllFromPorts(Collection items) { + if (this.ports == null) return (A)this; + for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeMatchingFromPorts(Predicate predicate) { + if (ports == null) return (A) this; + final Iterator each = ports.iterator(); + final List visitables = _visitables.get("ports"); + while (each.hasNext()) { + V1ContainerPortBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPorts() { + return this.ports != null ? build(ports) : null; + } + + public V1ContainerPort buildPort(int index) { + return this.ports.get(index).build(); + } + + public V1ContainerPort buildFirstPort() { + return this.ports.get(0).build(); + } + + public V1ContainerPort buildLastPort() { + return this.ports.get(ports.size() - 1).build(); + } + + public V1ContainerPort buildMatchingPort(Predicate predicate) { + for (V1ContainerPortBuilder item : ports) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPort(Predicate predicate) { + for (V1ContainerPortBuilder item : ports) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPorts(List ports) { + if (this.ports != null) { + this._visitables.get("ports").clear(); + } + if (ports != null) { + this.ports = new ArrayList(); + for (V1ContainerPort item : ports) { + this.addToPorts(item); + } + } else { + this.ports = null; + } + return (A) this; + } + + public A withPorts(io.kubernetes.client.openapi.models.V1ContainerPort... ports) { + if (this.ports != null) { + this.ports.clear(); + _visitables.remove("ports"); + } + if (ports != null) { + for (V1ContainerPort item : ports) { + this.addToPorts(item); + } + } + return (A) this; + } + + public boolean hasPorts() { + return this.ports != null && !this.ports.isEmpty(); + } + + public PortsNested addNewPort() { + return new PortsNested(-1, null); + } + + public PortsNested addNewPortLike(V1ContainerPort item) { + return new PortsNested(-1, item); + } + + public PortsNested setNewPortLike(int index,V1ContainerPort item) { + return new PortsNested(index, item); + } + + public PortsNested editPort(int index) { + if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editFirstPort() { + if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); + return setNewPortLike(0, buildPort(0)); + } + + public PortsNested editLastPort() { + int index = ports.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editMatchingPort(Predicate predicate) { + int index = -1; + for (int i=0;i withNewReadinessProbe() { + return new ReadinessProbeNested(null); + } + + public ReadinessProbeNested withNewReadinessProbeLike(V1Probe item) { + return new ReadinessProbeNested(item); + } + + public ReadinessProbeNested editReadinessProbe() { + return withNewReadinessProbeLike(java.util.Optional.ofNullable(buildReadinessProbe()).orElse(null)); + } + + public ReadinessProbeNested editOrNewReadinessProbe() { + return withNewReadinessProbeLike(java.util.Optional.ofNullable(buildReadinessProbe()).orElse(new V1ProbeBuilder().build())); + } + + public ReadinessProbeNested editOrNewReadinessProbeLike(V1Probe item) { + return withNewReadinessProbeLike(java.util.Optional.ofNullable(buildReadinessProbe()).orElse(item)); + } + + public A addToResizePolicy(int index,V1ContainerResizePolicy item) { + if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} + V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item); + if (index < 0 || index >= resizePolicy.size()) { _visitables.get("resizePolicy").add(builder); resizePolicy.add(builder); } else { _visitables.get("resizePolicy").add(index, builder); resizePolicy.add(index, builder);} + return (A)this; + } + + public A setToResizePolicy(int index,V1ContainerResizePolicy item) { + if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} + V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item); + if (index < 0 || index >= resizePolicy.size()) { _visitables.get("resizePolicy").add(builder); resizePolicy.add(builder); } else { _visitables.get("resizePolicy").set(index, builder); resizePolicy.set(index, builder);} + return (A)this; + } + + public A addToResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items) { + if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} + for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").add(builder);this.resizePolicy.add(builder);} return (A)this; + } + + public A addAllToResizePolicy(Collection items) { + if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} + for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").add(builder);this.resizePolicy.add(builder);} return (A)this; + } + + public A removeFromResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items) { + if (this.resizePolicy == null) return (A)this; + for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").remove(builder); this.resizePolicy.remove(builder);} return (A)this; + } + + public A removeAllFromResizePolicy(Collection items) { + if (this.resizePolicy == null) return (A)this; + for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").remove(builder); this.resizePolicy.remove(builder);} return (A)this; + } + + public A removeMatchingFromResizePolicy(Predicate predicate) { + if (resizePolicy == null) return (A) this; + final Iterator each = resizePolicy.iterator(); + final List visitables = _visitables.get("resizePolicy"); + while (each.hasNext()) { + V1ContainerResizePolicyBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResizePolicy() { + return this.resizePolicy != null ? build(resizePolicy) : null; + } + + public V1ContainerResizePolicy buildResizePolicy(int index) { + return this.resizePolicy.get(index).build(); + } + + public V1ContainerResizePolicy buildFirstResizePolicy() { + return this.resizePolicy.get(0).build(); + } + + public V1ContainerResizePolicy buildLastResizePolicy() { + return this.resizePolicy.get(resizePolicy.size() - 1).build(); + } + + public V1ContainerResizePolicy buildMatchingResizePolicy(Predicate predicate) { + for (V1ContainerResizePolicyBuilder item : resizePolicy) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResizePolicy(Predicate predicate) { + for (V1ContainerResizePolicyBuilder item : resizePolicy) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResizePolicy(List resizePolicy) { + if (this.resizePolicy != null) { + this._visitables.get("resizePolicy").clear(); + } + if (resizePolicy != null) { + this.resizePolicy = new ArrayList(); + for (V1ContainerResizePolicy item : resizePolicy) { + this.addToResizePolicy(item); + } + } else { + this.resizePolicy = null; + } + return (A) this; + } + + public A withResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... resizePolicy) { + if (this.resizePolicy != null) { + this.resizePolicy.clear(); + _visitables.remove("resizePolicy"); + } + if (resizePolicy != null) { + for (V1ContainerResizePolicy item : resizePolicy) { + this.addToResizePolicy(item); + } + } + return (A) this; + } + + public boolean hasResizePolicy() { + return this.resizePolicy != null && !this.resizePolicy.isEmpty(); + } + + public ResizePolicyNested addNewResizePolicy() { + return new ResizePolicyNested(-1, null); + } + + public ResizePolicyNested addNewResizePolicyLike(V1ContainerResizePolicy item) { + return new ResizePolicyNested(-1, item); + } + + public ResizePolicyNested setNewResizePolicyLike(int index,V1ContainerResizePolicy item) { + return new ResizePolicyNested(index, item); + } + + public ResizePolicyNested editResizePolicy(int index) { + if (resizePolicy.size() <= index) throw new RuntimeException("Can't edit resizePolicy. Index exceeds size."); + return setNewResizePolicyLike(index, buildResizePolicy(index)); + } + + public ResizePolicyNested editFirstResizePolicy() { + if (resizePolicy.size() == 0) throw new RuntimeException("Can't edit first resizePolicy. The list is empty."); + return setNewResizePolicyLike(0, buildResizePolicy(0)); + } + + public ResizePolicyNested editLastResizePolicy() { + int index = resizePolicy.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resizePolicy. The list is empty."); + return setNewResizePolicyLike(index, buildResizePolicy(index)); + } + + public ResizePolicyNested editMatchingResizePolicy(Predicate predicate) { + int index = -1; + for (int i=0;i withNewResources() { + return new ResourcesNested(null); + } + + public ResourcesNested withNewResourcesLike(V1ResourceRequirements item) { + return new ResourcesNested(item); + } + + public ResourcesNested editResources() { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(null)); + } + + public ResourcesNested editOrNewResources() { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(new V1ResourceRequirementsBuilder().build())); + } + + public ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item) { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(item)); + } + + public String getRestartPolicy() { + return this.restartPolicy; + } + + public A withRestartPolicy(String restartPolicy) { + this.restartPolicy = restartPolicy; + return (A) this; + } + + public boolean hasRestartPolicy() { + return this.restartPolicy != null; + } + + public V1SecurityContext buildSecurityContext() { + return this.securityContext != null ? this.securityContext.build() : null; + } + + public A withSecurityContext(V1SecurityContext securityContext) { + this._visitables.remove("securityContext"); + if (securityContext != null) { + this.securityContext = new V1SecurityContextBuilder(securityContext); + this._visitables.get("securityContext").add(this.securityContext); + } else { + this.securityContext = null; + this._visitables.get("securityContext").remove(this.securityContext); + } + return (A) this; + } + + public boolean hasSecurityContext() { + return this.securityContext != null; + } + + public SecurityContextNested withNewSecurityContext() { + return new SecurityContextNested(null); + } + + public SecurityContextNested withNewSecurityContextLike(V1SecurityContext item) { + return new SecurityContextNested(item); + } + + public SecurityContextNested editSecurityContext() { + return withNewSecurityContextLike(java.util.Optional.ofNullable(buildSecurityContext()).orElse(null)); + } + + public SecurityContextNested editOrNewSecurityContext() { + return withNewSecurityContextLike(java.util.Optional.ofNullable(buildSecurityContext()).orElse(new V1SecurityContextBuilder().build())); + } + + public SecurityContextNested editOrNewSecurityContextLike(V1SecurityContext item) { + return withNewSecurityContextLike(java.util.Optional.ofNullable(buildSecurityContext()).orElse(item)); + } + + public V1Probe buildStartupProbe() { + return this.startupProbe != null ? this.startupProbe.build() : null; + } + + public A withStartupProbe(V1Probe startupProbe) { + this._visitables.remove("startupProbe"); + if (startupProbe != null) { + this.startupProbe = new V1ProbeBuilder(startupProbe); + this._visitables.get("startupProbe").add(this.startupProbe); + } else { + this.startupProbe = null; + this._visitables.get("startupProbe").remove(this.startupProbe); + } + return (A) this; + } + + public boolean hasStartupProbe() { + return this.startupProbe != null; + } + + public StartupProbeNested withNewStartupProbe() { + return new StartupProbeNested(null); + } + + public StartupProbeNested withNewStartupProbeLike(V1Probe item) { + return new StartupProbeNested(item); + } + + public StartupProbeNested editStartupProbe() { + return withNewStartupProbeLike(java.util.Optional.ofNullable(buildStartupProbe()).orElse(null)); + } + + public StartupProbeNested editOrNewStartupProbe() { + return withNewStartupProbeLike(java.util.Optional.ofNullable(buildStartupProbe()).orElse(new V1ProbeBuilder().build())); + } + + public StartupProbeNested editOrNewStartupProbeLike(V1Probe item) { + return withNewStartupProbeLike(java.util.Optional.ofNullable(buildStartupProbe()).orElse(item)); + } + + public Boolean getStdin() { + return this.stdin; + } + + public A withStdin(Boolean stdin) { + this.stdin = stdin; + return (A) this; + } + + public boolean hasStdin() { + return this.stdin != null; + } + + public Boolean getStdinOnce() { + return this.stdinOnce; + } + + public A withStdinOnce(Boolean stdinOnce) { + this.stdinOnce = stdinOnce; + return (A) this; + } + + public boolean hasStdinOnce() { + return this.stdinOnce != null; + } + + public String getTerminationMessagePath() { + return this.terminationMessagePath; + } + + public A withTerminationMessagePath(String terminationMessagePath) { + this.terminationMessagePath = terminationMessagePath; + return (A) this; + } + + public boolean hasTerminationMessagePath() { + return this.terminationMessagePath != null; + } + + public String getTerminationMessagePolicy() { + return this.terminationMessagePolicy; + } + + public A withTerminationMessagePolicy(String terminationMessagePolicy) { + this.terminationMessagePolicy = terminationMessagePolicy; + return (A) this; + } + + public boolean hasTerminationMessagePolicy() { + return this.terminationMessagePolicy != null; + } + + public Boolean getTty() { + return this.tty; + } + + public A withTty(Boolean tty) { + this.tty = tty; + return (A) this; + } + + public boolean hasTty() { + return this.tty != null; + } + + public A addToVolumeDevices(int index,V1VolumeDevice item) { + if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} + V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item); + if (index < 0 || index >= volumeDevices.size()) { _visitables.get("volumeDevices").add(builder); volumeDevices.add(builder); } else { _visitables.get("volumeDevices").add(index, builder); volumeDevices.add(index, builder);} + return (A)this; + } + + public A setToVolumeDevices(int index,V1VolumeDevice item) { + if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} + V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item); + if (index < 0 || index >= volumeDevices.size()) { _visitables.get("volumeDevices").add(builder); volumeDevices.add(builder); } else { _visitables.get("volumeDevices").set(index, builder); volumeDevices.set(index, builder);} + return (A)this; + } + + public A addToVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) { + if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} + for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this; + } + + public A addAllToVolumeDevices(Collection items) { + if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} + for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this; + } + + public A removeFromVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) { + if (this.volumeDevices == null) return (A)this; + for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder); this.volumeDevices.remove(builder);} return (A)this; + } + + public A removeAllFromVolumeDevices(Collection items) { + if (this.volumeDevices == null) return (A)this; + for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder); this.volumeDevices.remove(builder);} return (A)this; + } + + public A removeMatchingFromVolumeDevices(Predicate predicate) { + if (volumeDevices == null) return (A) this; + final Iterator each = volumeDevices.iterator(); + final List visitables = _visitables.get("volumeDevices"); + while (each.hasNext()) { + V1VolumeDeviceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVolumeDevices() { + return this.volumeDevices != null ? build(volumeDevices) : null; + } + + public V1VolumeDevice buildVolumeDevice(int index) { + return this.volumeDevices.get(index).build(); + } + + public V1VolumeDevice buildFirstVolumeDevice() { + return this.volumeDevices.get(0).build(); + } + + public V1VolumeDevice buildLastVolumeDevice() { + return this.volumeDevices.get(volumeDevices.size() - 1).build(); + } + + public V1VolumeDevice buildMatchingVolumeDevice(Predicate predicate) { + for (V1VolumeDeviceBuilder item : volumeDevices) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVolumeDevice(Predicate predicate) { + for (V1VolumeDeviceBuilder item : volumeDevices) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVolumeDevices(List volumeDevices) { + if (this.volumeDevices != null) { + this._visitables.get("volumeDevices").clear(); + } + if (volumeDevices != null) { + this.volumeDevices = new ArrayList(); + for (V1VolumeDevice item : volumeDevices) { + this.addToVolumeDevices(item); + } + } else { + this.volumeDevices = null; + } + return (A) this; + } + + public A withVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... volumeDevices) { + if (this.volumeDevices != null) { + this.volumeDevices.clear(); + _visitables.remove("volumeDevices"); + } + if (volumeDevices != null) { + for (V1VolumeDevice item : volumeDevices) { + this.addToVolumeDevices(item); + } + } + return (A) this; + } + + public boolean hasVolumeDevices() { + return this.volumeDevices != null && !this.volumeDevices.isEmpty(); + } + + public VolumeDevicesNested addNewVolumeDevice() { + return new VolumeDevicesNested(-1, null); + } + + public VolumeDevicesNested addNewVolumeDeviceLike(V1VolumeDevice item) { + return new VolumeDevicesNested(-1, item); + } + + public VolumeDevicesNested setNewVolumeDeviceLike(int index,V1VolumeDevice item) { + return new VolumeDevicesNested(index, item); + } + + public VolumeDevicesNested editVolumeDevice(int index) { + if (volumeDevices.size() <= index) throw new RuntimeException("Can't edit volumeDevices. Index exceeds size."); + return setNewVolumeDeviceLike(index, buildVolumeDevice(index)); + } + + public VolumeDevicesNested editFirstVolumeDevice() { + if (volumeDevices.size() == 0) throw new RuntimeException("Can't edit first volumeDevices. The list is empty."); + return setNewVolumeDeviceLike(0, buildVolumeDevice(0)); + } + + public VolumeDevicesNested editLastVolumeDevice() { + int index = volumeDevices.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last volumeDevices. The list is empty."); + return setNewVolumeDeviceLike(index, buildVolumeDevice(index)); + } + + public VolumeDevicesNested editMatchingVolumeDevice(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item); + if (index < 0 || index >= volumeMounts.size()) { _visitables.get("volumeMounts").add(builder); volumeMounts.add(builder); } else { _visitables.get("volumeMounts").add(index, builder); volumeMounts.add(index, builder);} + return (A)this; + } + + public A setToVolumeMounts(int index,V1VolumeMount item) { + if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} + V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item); + if (index < 0 || index >= volumeMounts.size()) { _visitables.get("volumeMounts").add(builder); volumeMounts.add(builder); } else { _visitables.get("volumeMounts").set(index, builder); volumeMounts.set(index, builder);} + return (A)this; + } + + public A addToVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) { + if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} + for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this; + } + + public A addAllToVolumeMounts(Collection items) { + if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} + for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this; + } + + public A removeFromVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) { + if (this.volumeMounts == null) return (A)this; + for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder); this.volumeMounts.remove(builder);} return (A)this; + } + + public A removeAllFromVolumeMounts(Collection items) { + if (this.volumeMounts == null) return (A)this; + for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder); this.volumeMounts.remove(builder);} return (A)this; + } + + public A removeMatchingFromVolumeMounts(Predicate predicate) { + if (volumeMounts == null) return (A) this; + final Iterator each = volumeMounts.iterator(); + final List visitables = _visitables.get("volumeMounts"); + while (each.hasNext()) { + V1VolumeMountBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVolumeMounts() { + return this.volumeMounts != null ? build(volumeMounts) : null; + } + + public V1VolumeMount buildVolumeMount(int index) { + return this.volumeMounts.get(index).build(); + } + + public V1VolumeMount buildFirstVolumeMount() { + return this.volumeMounts.get(0).build(); + } + + public V1VolumeMount buildLastVolumeMount() { + return this.volumeMounts.get(volumeMounts.size() - 1).build(); + } + + public V1VolumeMount buildMatchingVolumeMount(Predicate predicate) { + for (V1VolumeMountBuilder item : volumeMounts) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVolumeMount(Predicate predicate) { + for (V1VolumeMountBuilder item : volumeMounts) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVolumeMounts(List volumeMounts) { + if (this.volumeMounts != null) { + this._visitables.get("volumeMounts").clear(); + } + if (volumeMounts != null) { + this.volumeMounts = new ArrayList(); + for (V1VolumeMount item : volumeMounts) { + this.addToVolumeMounts(item); + } + } else { + this.volumeMounts = null; + } + return (A) this; + } + + public A withVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... volumeMounts) { + if (this.volumeMounts != null) { + this.volumeMounts.clear(); + _visitables.remove("volumeMounts"); + } + if (volumeMounts != null) { + for (V1VolumeMount item : volumeMounts) { + this.addToVolumeMounts(item); + } + } + return (A) this; + } + + public boolean hasVolumeMounts() { + return this.volumeMounts != null && !this.volumeMounts.isEmpty(); + } + + public VolumeMountsNested addNewVolumeMount() { + return new VolumeMountsNested(-1, null); + } + + public VolumeMountsNested addNewVolumeMountLike(V1VolumeMount item) { + return new VolumeMountsNested(-1, item); + } + + public VolumeMountsNested setNewVolumeMountLike(int index,V1VolumeMount item) { + return new VolumeMountsNested(index, item); + } + + public VolumeMountsNested editVolumeMount(int index) { + if (volumeMounts.size() <= index) throw new RuntimeException("Can't edit volumeMounts. Index exceeds size."); + return setNewVolumeMountLike(index, buildVolumeMount(index)); + } + + public VolumeMountsNested editFirstVolumeMount() { + if (volumeMounts.size() == 0) throw new RuntimeException("Can't edit first volumeMounts. The list is empty."); + return setNewVolumeMountLike(0, buildVolumeMount(0)); + } + + public VolumeMountsNested editLastVolumeMount() { + int index = volumeMounts.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last volumeMounts. The list is empty."); + return setNewVolumeMountLike(index, buildVolumeMount(index)); + } + + public VolumeMountsNested editMatchingVolumeMount(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1EnvVarFluent> implements Nested{ + EnvNested(int index,V1EnvVar item) { + this.index = index; + this.builder = new V1EnvVarBuilder(this, item); + } + V1EnvVarBuilder builder; + int index; + + public N and() { + return (N) V1ContainerFluent.this.setToEnv(index,builder.build()); + } + + public N endEnv() { + return and(); + } + + + } + public class EnvFromNested extends V1EnvFromSourceFluent> implements Nested{ + EnvFromNested(int index,V1EnvFromSource item) { + this.index = index; + this.builder = new V1EnvFromSourceBuilder(this, item); + } + V1EnvFromSourceBuilder builder; + int index; + + public N and() { + return (N) V1ContainerFluent.this.setToEnvFrom(index,builder.build()); + } + + public N endEnvFrom() { + return and(); + } + + + } + public class LifecycleNested extends V1LifecycleFluent> implements Nested{ + LifecycleNested(V1Lifecycle item) { + this.builder = new V1LifecycleBuilder(this, item); + } + V1LifecycleBuilder builder; + + public N and() { + return (N) V1ContainerFluent.this.withLifecycle(builder.build()); + } + + public N endLifecycle() { + return and(); + } + + + } + public class LivenessProbeNested extends V1ProbeFluent> implements Nested{ + LivenessProbeNested(V1Probe item) { + this.builder = new V1ProbeBuilder(this, item); + } + V1ProbeBuilder builder; + + public N and() { + return (N) V1ContainerFluent.this.withLivenessProbe(builder.build()); + } + + public N endLivenessProbe() { + return and(); + } + + + } + public class PortsNested extends V1ContainerPortFluent> implements Nested{ + PortsNested(int index,V1ContainerPort item) { + this.index = index; + this.builder = new V1ContainerPortBuilder(this, item); + } + V1ContainerPortBuilder builder; + int index; + + public N and() { + return (N) V1ContainerFluent.this.setToPorts(index,builder.build()); + } + + public N endPort() { + return and(); + } + + + } + public class ReadinessProbeNested extends V1ProbeFluent> implements Nested{ + ReadinessProbeNested(V1Probe item) { + this.builder = new V1ProbeBuilder(this, item); + } + V1ProbeBuilder builder; + + public N and() { + return (N) V1ContainerFluent.this.withReadinessProbe(builder.build()); + } + public N endReadinessProbe() { + return and(); + } + + + } + public class ResizePolicyNested extends V1ContainerResizePolicyFluent> implements Nested{ + ResizePolicyNested(int index,V1ContainerResizePolicy item) { + this.index = index; + this.builder = new V1ContainerResizePolicyBuilder(this, item); + } + V1ContainerResizePolicyBuilder builder; + int index; + + public N and() { + return (N) V1ContainerFluent.this.setToResizePolicy(index,builder.build()); + } + + public N endResizePolicy() { + return and(); + } + + + } + public class ResourcesNested extends V1ResourceRequirementsFluent> implements Nested{ + ResourcesNested(V1ResourceRequirements item) { + this.builder = new V1ResourceRequirementsBuilder(this, item); + } + V1ResourceRequirementsBuilder builder; + + public N and() { + return (N) V1ContainerFluent.this.withResources(builder.build()); + } + + public N endResources() { + return and(); + } + + + } + public class SecurityContextNested extends V1SecurityContextFluent> implements Nested{ + SecurityContextNested(V1SecurityContext item) { + this.builder = new V1SecurityContextBuilder(this, item); + } + V1SecurityContextBuilder builder; + + public N and() { + return (N) V1ContainerFluent.this.withSecurityContext(builder.build()); + } + + public N endSecurityContext() { + return and(); + } + + + } + public class StartupProbeNested extends V1ProbeFluent> implements Nested{ + StartupProbeNested(V1Probe item) { + this.builder = new V1ProbeBuilder(this, item); + } + V1ProbeBuilder builder; + + public N and() { + return (N) V1ContainerFluent.this.withStartupProbe(builder.build()); + } + + public N endStartupProbe() { + return and(); + } + + + } + public class VolumeDevicesNested extends V1VolumeDeviceFluent> implements Nested{ + VolumeDevicesNested(int index,V1VolumeDevice item) { + this.index = index; + this.builder = new V1VolumeDeviceBuilder(this, item); + } + V1VolumeDeviceBuilder builder; + int index; + + public N and() { + return (N) V1ContainerFluent.this.setToVolumeDevices(index,builder.build()); + } + + public N endVolumeDevice() { + return and(); + } + + } + public class VolumeMountsNested extends V1VolumeMountFluent> implements Nested{ + VolumeMountsNested(int index,V1VolumeMount item) { + this.index = index; + this.builder = new V1VolumeMountBuilder(this, item); + } + V1VolumeMountBuilder builder; + int index; + + public N and() { + return (N) V1ContainerFluent.this.setToVolumeMounts(index,builder.build()); + } + + public N endVolumeMount() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerFluentImpl.java deleted file mode 100644 index c7445a3764..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerFluentImpl.java +++ /dev/null @@ -1,1408 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.util.Iterator; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ContainerFluentImpl> extends BaseFluent implements V1ContainerFluent{ - public V1ContainerFluentImpl() { - } - public V1ContainerFluentImpl(V1Container instance) { - if (instance != null) { - this.withArgs(instance.getArgs()); - this.withCommand(instance.getCommand()); - this.withEnv(instance.getEnv()); - this.withEnvFrom(instance.getEnvFrom()); - this.withImage(instance.getImage()); - this.withImagePullPolicy(instance.getImagePullPolicy()); - this.withLifecycle(instance.getLifecycle()); - this.withLivenessProbe(instance.getLivenessProbe()); - this.withName(instance.getName()); - this.withPorts(instance.getPorts()); - this.withReadinessProbe(instance.getReadinessProbe()); - this.withResizePolicy(instance.getResizePolicy()); - this.withResources(instance.getResources()); - this.withSecurityContext(instance.getSecurityContext()); - this.withStartupProbe(instance.getStartupProbe()); - this.withStdin(instance.getStdin()); - this.withStdinOnce(instance.getStdinOnce()); - this.withTerminationMessagePath(instance.getTerminationMessagePath()); - this.withTerminationMessagePolicy(instance.getTerminationMessagePolicy()); - this.withTty(instance.getTty()); - this.withVolumeDevices(instance.getVolumeDevices()); - this.withVolumeMounts(instance.getVolumeMounts()); - this.withWorkingDir(instance.getWorkingDir()); - } - } - private List args; - private List command; - private ArrayList env; - private ArrayList envFrom; - private String image; - private String imagePullPolicy; - private V1LifecycleBuilder lifecycle; - private V1ProbeBuilder livenessProbe; - private String name; - private ArrayList ports; - private V1ProbeBuilder readinessProbe; - private ArrayList resizePolicy; - private V1ResourceRequirementsBuilder resources; - private V1SecurityContextBuilder securityContext; - private V1ProbeBuilder startupProbe; - private Boolean stdin; - private Boolean stdinOnce; - private String terminationMessagePath; - private String terminationMessagePolicy; - private Boolean tty; - private ArrayList volumeDevices; - private ArrayList volumeMounts; - private String workingDir; - public A addToArgs(int index,String item) { - if (this.args == null) {this.args = new ArrayList();} - this.args.add(index, item); - return (A)this; - } - public A setToArgs(int index,String item) { - if (this.args == null) {this.args = new ArrayList();} - this.args.set(index, item); return (A)this; - } - public A addToArgs(java.lang.String... items) { - if (this.args == null) {this.args = new ArrayList();} - for (String item : items) {this.args.add(item);} return (A)this; - } - public A addAllToArgs(Collection items) { - if (this.args == null) {this.args = new ArrayList();} - for (String item : items) {this.args.add(item);} return (A)this; - } - public A removeFromArgs(java.lang.String... items) { - for (String item : items) {if (this.args!= null){ this.args.remove(item);}} return (A)this; - } - public A removeAllFromArgs(Collection items) { - for (String item : items) {if (this.args!= null){ this.args.remove(item);}} return (A)this; - } - public List getArgs() { - return this.args; - } - public String getArg(int index) { - return this.args.get(index); - } - public String getFirstArg() { - return this.args.get(0); - } - public String getLastArg() { - return this.args.get(args.size() - 1); - } - public String getMatchingArg(Predicate predicate) { - for (String item: args) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingArg(Predicate predicate) { - for (String item: args) { if(predicate.test(item)){ return true;} } return false; - } - public A withArgs(List args) { - if (args != null) {this.args = new ArrayList(); for (String item : args){this.addToArgs(item);}} else { this.args = null;} return (A) this; - } - public A withArgs(java.lang.String... args) { - if (this.args != null) {this.args.clear(); _visitables.remove("args"); } - if (args != null) {for (String item :args){ this.addToArgs(item);}} return (A) this; - } - public Boolean hasArgs() { - return args != null && !args.isEmpty(); - } - public A addToCommand(int index,String item) { - if (this.command == null) {this.command = new ArrayList();} - this.command.add(index, item); - return (A)this; - } - public A setToCommand(int index,String item) { - if (this.command == null) {this.command = new ArrayList();} - this.command.set(index, item); return (A)this; - } - public A addToCommand(java.lang.String... items) { - if (this.command == null) {this.command = new ArrayList();} - for (String item : items) {this.command.add(item);} return (A)this; - } - public A addAllToCommand(Collection items) { - if (this.command == null) {this.command = new ArrayList();} - for (String item : items) {this.command.add(item);} return (A)this; - } - public A removeFromCommand(java.lang.String... items) { - for (String item : items) {if (this.command!= null){ this.command.remove(item);}} return (A)this; - } - public A removeAllFromCommand(Collection items) { - for (String item : items) {if (this.command!= null){ this.command.remove(item);}} return (A)this; - } - public List getCommand() { - return this.command; - } - public String getCommand(int index) { - return this.command.get(index); - } - public String getFirstCommand() { - return this.command.get(0); - } - public String getLastCommand() { - return this.command.get(command.size() - 1); - } - public String getMatchingCommand(Predicate predicate) { - for (String item: command) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingCommand(Predicate predicate) { - for (String item: command) { if(predicate.test(item)){ return true;} } return false; - } - public A withCommand(List command) { - if (command != null) {this.command = new ArrayList(); for (String item : command){this.addToCommand(item);}} else { this.command = null;} return (A) this; - } - public A withCommand(java.lang.String... command) { - if (this.command != null) {this.command.clear(); _visitables.remove("command"); } - if (command != null) {for (String item :command){ this.addToCommand(item);}} return (A) this; - } - public Boolean hasCommand() { - return command != null && !command.isEmpty(); - } - public A addToEnv(int index,V1EnvVar item) { - if (this.env == null) {this.env = new ArrayList();} - V1EnvVarBuilder builder = new V1EnvVarBuilder(item); - if (index < 0 || index >= env.size()) { _visitables.get("env").add(builder); env.add(builder); } else { _visitables.get("env").add(index, builder); env.add(index, builder);} - return (A)this; - } - public A setToEnv(int index,V1EnvVar item) { - if (this.env == null) {this.env = new ArrayList();} - V1EnvVarBuilder builder = new V1EnvVarBuilder(item); - if (index < 0 || index >= env.size()) { _visitables.get("env").add(builder); env.add(builder); } else { _visitables.get("env").set(index, builder); env.set(index, builder);} - return (A)this; - } - public A addToEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) { - if (this.env == null) {this.env = new ArrayList();} - for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this; - } - public A addAllToEnv(Collection items) { - if (this.env == null) {this.env = new ArrayList();} - for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this; - } - public A removeFromEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) { - for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder);if (this.env != null) {this.env.remove(builder);}} return (A)this; - } - public A removeAllFromEnv(Collection items) { - for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder);if (this.env != null) {this.env.remove(builder);}} return (A)this; - } - public A removeMatchingFromEnv(Predicate predicate) { - if (env == null) return (A) this; - final Iterator each = env.iterator(); - final List visitables = _visitables.get("env"); - while (each.hasNext()) { - V1EnvVarBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildEnv instead. - * @return The buildable object. - */ - @Deprecated - public List getEnv() { - return env != null ? build(env) : null; - } - public List buildEnv() { - return env != null ? build(env) : null; - } - public V1EnvVar buildEnv(int index) { - return this.env.get(index).build(); - } - public V1EnvVar buildFirstEnv() { - return this.env.get(0).build(); - } - public V1EnvVar buildLastEnv() { - return this.env.get(env.size() - 1).build(); - } - public V1EnvVar buildMatchingEnv(Predicate predicate) { - for (V1EnvVarBuilder item: env) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingEnv(Predicate predicate) { - for (V1EnvVarBuilder item: env) { if(predicate.test(item)){ return true;} } return false; - } - public A withEnv(List env) { - if (this.env != null) { _visitables.get("env").clear();} - if (env != null) {this.env = new ArrayList(); for (V1EnvVar item : env){this.addToEnv(item);}} else { this.env = null;} return (A) this; - } - public A withEnv(io.kubernetes.client.openapi.models.V1EnvVar... env) { - if (this.env != null) {this.env.clear(); _visitables.remove("env"); } - if (env != null) {for (V1EnvVar item :env){ this.addToEnv(item);}} return (A) this; - } - public Boolean hasEnv() { - return env != null && !env.isEmpty(); - } - public V1ContainerFluentImpl.EnvNested addNewEnv() { - return new V1ContainerFluentImpl.EnvNestedImpl(); - } - public V1ContainerFluentImpl.EnvNested addNewEnvLike(V1EnvVar item) { - return new V1ContainerFluentImpl.EnvNestedImpl(-1, item); - } - public V1ContainerFluentImpl.EnvNested setNewEnvLike(int index,V1EnvVar item) { - return new V1ContainerFluentImpl.EnvNestedImpl(index, item); - } - public V1ContainerFluentImpl.EnvNested editEnv(int index) { - if (env.size() <= index) throw new RuntimeException("Can't edit env. Index exceeds size."); - return setNewEnvLike(index, buildEnv(index)); - } - public V1ContainerFluentImpl.EnvNested editFirstEnv() { - if (env.size() == 0) throw new RuntimeException("Can't edit first env. The list is empty."); - return setNewEnvLike(0, buildEnv(0)); - } - public V1ContainerFluentImpl.EnvNested editLastEnv() { - int index = env.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last env. The list is empty."); - return setNewEnvLike(index, buildEnv(index)); - } - public V1ContainerFluentImpl.EnvNested editMatchingEnv(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item); - if (index < 0 || index >= envFrom.size()) { _visitables.get("envFrom").add(builder); envFrom.add(builder); } else { _visitables.get("envFrom").add(index, builder); envFrom.add(index, builder);} - return (A)this; - } - public A setToEnvFrom(int index,V1EnvFromSource item) { - if (this.envFrom == null) {this.envFrom = new ArrayList();} - V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item); - if (index < 0 || index >= envFrom.size()) { _visitables.get("envFrom").add(builder); envFrom.add(builder); } else { _visitables.get("envFrom").set(index, builder); envFrom.set(index, builder);} - return (A)this; - } - public A addToEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) { - if (this.envFrom == null) {this.envFrom = new ArrayList();} - for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this; - } - public A addAllToEnvFrom(Collection items) { - if (this.envFrom == null) {this.envFrom = new ArrayList();} - for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this; - } - public A removeFromEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) { - for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder);if (this.envFrom != null) {this.envFrom.remove(builder);}} return (A)this; - } - public A removeAllFromEnvFrom(Collection items) { - for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder);if (this.envFrom != null) {this.envFrom.remove(builder);}} return (A)this; - } - public A removeMatchingFromEnvFrom(Predicate predicate) { - if (envFrom == null) return (A) this; - final Iterator each = envFrom.iterator(); - final List visitables = _visitables.get("envFrom"); - while (each.hasNext()) { - V1EnvFromSourceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildEnvFrom instead. - * @return The buildable object. - */ - @Deprecated - public List getEnvFrom() { - return envFrom != null ? build(envFrom) : null; - } - public List buildEnvFrom() { - return envFrom != null ? build(envFrom) : null; - } - public V1EnvFromSource buildEnvFrom(int index) { - return this.envFrom.get(index).build(); - } - public V1EnvFromSource buildFirstEnvFrom() { - return this.envFrom.get(0).build(); - } - public V1EnvFromSource buildLastEnvFrom() { - return this.envFrom.get(envFrom.size() - 1).build(); - } - public V1EnvFromSource buildMatchingEnvFrom(Predicate predicate) { - for (V1EnvFromSourceBuilder item: envFrom) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingEnvFrom(Predicate predicate) { - for (V1EnvFromSourceBuilder item: envFrom) { if(predicate.test(item)){ return true;} } return false; - } - public A withEnvFrom(List envFrom) { - if (this.envFrom != null) { _visitables.get("envFrom").clear();} - if (envFrom != null) {this.envFrom = new ArrayList(); for (V1EnvFromSource item : envFrom){this.addToEnvFrom(item);}} else { this.envFrom = null;} return (A) this; - } - public A withEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... envFrom) { - if (this.envFrom != null) {this.envFrom.clear(); _visitables.remove("envFrom"); } - if (envFrom != null) {for (V1EnvFromSource item :envFrom){ this.addToEnvFrom(item);}} return (A) this; - } - public Boolean hasEnvFrom() { - return envFrom != null && !envFrom.isEmpty(); - } - public V1ContainerFluentImpl.EnvFromNested addNewEnvFrom() { - return new V1ContainerFluentImpl.EnvFromNestedImpl(); - } - public V1ContainerFluentImpl.EnvFromNested addNewEnvFromLike(V1EnvFromSource item) { - return new V1ContainerFluentImpl.EnvFromNestedImpl(-1, item); - } - public V1ContainerFluentImpl.EnvFromNested setNewEnvFromLike(int index,V1EnvFromSource item) { - return new V1ContainerFluentImpl.EnvFromNestedImpl(index, item); - } - public V1ContainerFluentImpl.EnvFromNested editEnvFrom(int index) { - if (envFrom.size() <= index) throw new RuntimeException("Can't edit envFrom. Index exceeds size."); - return setNewEnvFromLike(index, buildEnvFrom(index)); - } - public V1ContainerFluentImpl.EnvFromNested editFirstEnvFrom() { - if (envFrom.size() == 0) throw new RuntimeException("Can't edit first envFrom. The list is empty."); - return setNewEnvFromLike(0, buildEnvFrom(0)); - } - public V1ContainerFluentImpl.EnvFromNested editLastEnvFrom() { - int index = envFrom.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last envFrom. The list is empty."); - return setNewEnvFromLike(index, buildEnvFrom(index)); - } - public V1ContainerFluentImpl.EnvFromNested editMatchingEnvFrom(Predicate predicate) { - int index = -1; - for (int i=0;i withNewLifecycle() { - return new V1ContainerFluentImpl.LifecycleNestedImpl(); - } - public V1ContainerFluentImpl.LifecycleNested withNewLifecycleLike(V1Lifecycle item) { - return new V1ContainerFluentImpl.LifecycleNestedImpl(item); - } - public V1ContainerFluentImpl.LifecycleNested editLifecycle() { - return withNewLifecycleLike(getLifecycle()); - } - public V1ContainerFluentImpl.LifecycleNested editOrNewLifecycle() { - return withNewLifecycleLike(getLifecycle() != null ? getLifecycle(): new V1LifecycleBuilder().build()); - } - public V1ContainerFluentImpl.LifecycleNested editOrNewLifecycleLike(V1Lifecycle item) { - return withNewLifecycleLike(getLifecycle() != null ? getLifecycle(): item); - } - - /** - * This method has been deprecated, please use method buildLivenessProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getLivenessProbe() { - return this.livenessProbe!=null ?this.livenessProbe.build():null; - } - public V1Probe buildLivenessProbe() { - return this.livenessProbe!=null ?this.livenessProbe.build():null; - } - public A withLivenessProbe(V1Probe livenessProbe) { - _visitables.get("livenessProbe").remove(this.livenessProbe); - if (livenessProbe!=null){ this.livenessProbe= new V1ProbeBuilder(livenessProbe); _visitables.get("livenessProbe").add(this.livenessProbe);} else { this.livenessProbe = null; _visitables.get("livenessProbe").remove(this.livenessProbe); } return (A) this; - } - public Boolean hasLivenessProbe() { - return this.livenessProbe != null; - } - public V1ContainerFluentImpl.LivenessProbeNested withNewLivenessProbe() { - return new V1ContainerFluentImpl.LivenessProbeNestedImpl(); - } - public V1ContainerFluentImpl.LivenessProbeNested withNewLivenessProbeLike(V1Probe item) { - return new V1ContainerFluentImpl.LivenessProbeNestedImpl(item); - } - public V1ContainerFluentImpl.LivenessProbeNested editLivenessProbe() { - return withNewLivenessProbeLike(getLivenessProbe()); - } - public V1ContainerFluentImpl.LivenessProbeNested editOrNewLivenessProbe() { - return withNewLivenessProbeLike(getLivenessProbe() != null ? getLivenessProbe(): new V1ProbeBuilder().build()); - } - public V1ContainerFluentImpl.LivenessProbeNested editOrNewLivenessProbeLike(V1Probe item) { - return withNewLivenessProbeLike(getLivenessProbe() != null ? getLivenessProbe(): item); - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public A addToPorts(int index,V1ContainerPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} - return (A)this; - } - public A setToPorts(int index,V1ContainerPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} - return (A)this; - } - public A addToPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A addAllToPorts(Collection items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A removeFromPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) { - for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeAllFromPorts(Collection items) { - for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeMatchingFromPorts(Predicate predicate) { - if (ports == null) return (A) this; - final Iterator each = ports.iterator(); - final List visitables = _visitables.get("ports"); - while (each.hasNext()) { - V1ContainerPortBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts() { - return ports != null ? build(ports) : null; - } - public List buildPorts() { - return ports != null ? build(ports) : null; - } - public V1ContainerPort buildPort(int index) { - return this.ports.get(index).build(); - } - public V1ContainerPort buildFirstPort() { - return this.ports.get(0).build(); - } - public V1ContainerPort buildLastPort() { - return this.ports.get(ports.size() - 1).build(); - } - public V1ContainerPort buildMatchingPort(Predicate predicate) { - for (V1ContainerPortBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPort(Predicate predicate) { - for (V1ContainerPortBuilder item: ports) { if(predicate.test(item)){ return true;} } return false; - } - public A withPorts(List ports) { - if (this.ports != null) { _visitables.get("ports").clear();} - if (ports != null) {this.ports = new ArrayList(); for (V1ContainerPort item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this; - } - public A withPorts(io.kubernetes.client.openapi.models.V1ContainerPort... ports) { - if (this.ports != null) {this.ports.clear(); _visitables.remove("ports"); } - if (ports != null) {for (V1ContainerPort item :ports){ this.addToPorts(item);}} return (A) this; - } - public Boolean hasPorts() { - return ports != null && !ports.isEmpty(); - } - public V1ContainerFluentImpl.PortsNested addNewPort() { - return new V1ContainerFluentImpl.PortsNestedImpl(); - } - public V1ContainerFluentImpl.PortsNested addNewPortLike(V1ContainerPort item) { - return new V1ContainerFluentImpl.PortsNestedImpl(-1, item); - } - public V1ContainerFluentImpl.PortsNested setNewPortLike(int index,V1ContainerPort item) { - return new V1ContainerFluentImpl.PortsNestedImpl(index, item); - } - public V1ContainerFluentImpl.PortsNested editPort(int index) { - if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); - return setNewPortLike(index, buildPort(index)); - } - public V1ContainerFluentImpl.PortsNested editFirstPort() { - if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); - return setNewPortLike(0, buildPort(0)); - } - public V1ContainerFluentImpl.PortsNested editLastPort() { - int index = ports.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); - return setNewPortLike(index, buildPort(index)); - } - public V1ContainerFluentImpl.PortsNested editMatchingPort(Predicate predicate) { - int index = -1; - for (int i=0;i withNewReadinessProbe() { - return new V1ContainerFluentImpl.ReadinessProbeNestedImpl(); - } - public V1ContainerFluentImpl.ReadinessProbeNested withNewReadinessProbeLike(V1Probe item) { - return new V1ContainerFluentImpl.ReadinessProbeNestedImpl(item); - } - public V1ContainerFluentImpl.ReadinessProbeNested editReadinessProbe() { - return withNewReadinessProbeLike(getReadinessProbe()); - } - public V1ContainerFluentImpl.ReadinessProbeNested editOrNewReadinessProbe() { - return withNewReadinessProbeLike(getReadinessProbe() != null ? getReadinessProbe(): new V1ProbeBuilder().build()); - } - public V1ContainerFluentImpl.ReadinessProbeNested editOrNewReadinessProbeLike(V1Probe item) { - return withNewReadinessProbeLike(getReadinessProbe() != null ? getReadinessProbe(): item); - } - public A addToResizePolicy(int index,V1ContainerResizePolicy item) { - if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} - V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item); - if (index < 0 || index >= resizePolicy.size()) { _visitables.get("resizePolicy").add(builder); resizePolicy.add(builder); } else { _visitables.get("resizePolicy").add(index, builder); resizePolicy.add(index, builder);} - return (A)this; - } - public A setToResizePolicy(int index,V1ContainerResizePolicy item) { - if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} - V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item); - if (index < 0 || index >= resizePolicy.size()) { _visitables.get("resizePolicy").add(builder); resizePolicy.add(builder); } else { _visitables.get("resizePolicy").set(index, builder); resizePolicy.set(index, builder);} - return (A)this; - } - public A addToResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items) { - if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} - for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").add(builder);this.resizePolicy.add(builder);} return (A)this; - } - public A addAllToResizePolicy(Collection items) { - if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} - for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").add(builder);this.resizePolicy.add(builder);} return (A)this; - } - public A removeFromResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items) { - for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").remove(builder);if (this.resizePolicy != null) {this.resizePolicy.remove(builder);}} return (A)this; - } - public A removeAllFromResizePolicy(Collection items) { - for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").remove(builder);if (this.resizePolicy != null) {this.resizePolicy.remove(builder);}} return (A)this; - } - public A removeMatchingFromResizePolicy(Predicate predicate) { - if (resizePolicy == null) return (A) this; - final Iterator each = resizePolicy.iterator(); - final List visitables = _visitables.get("resizePolicy"); - while (each.hasNext()) { - V1ContainerResizePolicyBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResizePolicy instead. - * @return The buildable object. - */ - @Deprecated - public List getResizePolicy() { - return resizePolicy != null ? build(resizePolicy) : null; - } - public List buildResizePolicy() { - return resizePolicy != null ? build(resizePolicy) : null; - } - public V1ContainerResizePolicy buildResizePolicy(int index) { - return this.resizePolicy.get(index).build(); - } - public V1ContainerResizePolicy buildFirstResizePolicy() { - return this.resizePolicy.get(0).build(); - } - public V1ContainerResizePolicy buildLastResizePolicy() { - return this.resizePolicy.get(resizePolicy.size() - 1).build(); - } - public V1ContainerResizePolicy buildMatchingResizePolicy(Predicate predicate) { - for (V1ContainerResizePolicyBuilder item: resizePolicy) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResizePolicy(Predicate predicate) { - for (V1ContainerResizePolicyBuilder item: resizePolicy) { if(predicate.test(item)){ return true;} } return false; - } - public A withResizePolicy(List resizePolicy) { - if (this.resizePolicy != null) { _visitables.get("resizePolicy").clear();} - if (resizePolicy != null) {this.resizePolicy = new ArrayList(); for (V1ContainerResizePolicy item : resizePolicy){this.addToResizePolicy(item);}} else { this.resizePolicy = null;} return (A) this; - } - public A withResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... resizePolicy) { - if (this.resizePolicy != null) {this.resizePolicy.clear(); _visitables.remove("resizePolicy"); } - if (resizePolicy != null) {for (V1ContainerResizePolicy item :resizePolicy){ this.addToResizePolicy(item);}} return (A) this; - } - public Boolean hasResizePolicy() { - return resizePolicy != null && !resizePolicy.isEmpty(); - } - public V1ContainerFluentImpl.ResizePolicyNested addNewResizePolicy() { - return new V1ContainerFluentImpl.ResizePolicyNestedImpl(); - } - public V1ContainerFluentImpl.ResizePolicyNested addNewResizePolicyLike(V1ContainerResizePolicy item) { - return new V1ContainerFluentImpl.ResizePolicyNestedImpl(-1, item); - } - public V1ContainerFluentImpl.ResizePolicyNested setNewResizePolicyLike(int index,V1ContainerResizePolicy item) { - return new V1ContainerFluentImpl.ResizePolicyNestedImpl(index, item); - } - public V1ContainerFluentImpl.ResizePolicyNested editResizePolicy(int index) { - if (resizePolicy.size() <= index) throw new RuntimeException("Can't edit resizePolicy. Index exceeds size."); - return setNewResizePolicyLike(index, buildResizePolicy(index)); - } - public V1ContainerFluentImpl.ResizePolicyNested editFirstResizePolicy() { - if (resizePolicy.size() == 0) throw new RuntimeException("Can't edit first resizePolicy. The list is empty."); - return setNewResizePolicyLike(0, buildResizePolicy(0)); - } - public V1ContainerFluentImpl.ResizePolicyNested editLastResizePolicy() { - int index = resizePolicy.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resizePolicy. The list is empty."); - return setNewResizePolicyLike(index, buildResizePolicy(index)); - } - public V1ContainerFluentImpl.ResizePolicyNested editMatchingResizePolicy(Predicate predicate) { - int index = -1; - for (int i=0;i withNewResources() { - return new V1ContainerFluentImpl.ResourcesNestedImpl(); - } - public V1ContainerFluentImpl.ResourcesNested withNewResourcesLike(V1ResourceRequirements item) { - return new V1ContainerFluentImpl.ResourcesNestedImpl(item); - } - public V1ContainerFluentImpl.ResourcesNested editResources() { - return withNewResourcesLike(getResources()); - } - public V1ContainerFluentImpl.ResourcesNested editOrNewResources() { - return withNewResourcesLike(getResources() != null ? getResources(): new V1ResourceRequirementsBuilder().build()); - } - public V1ContainerFluentImpl.ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item) { - return withNewResourcesLike(getResources() != null ? getResources(): item); - } - - /** - * This method has been deprecated, please use method buildSecurityContext instead. - * @return The buildable object. - */ - @Deprecated - public V1SecurityContext getSecurityContext() { - return this.securityContext!=null ?this.securityContext.build():null; - } - public V1SecurityContext buildSecurityContext() { - return this.securityContext!=null ?this.securityContext.build():null; - } - public A withSecurityContext(V1SecurityContext securityContext) { - _visitables.get("securityContext").remove(this.securityContext); - if (securityContext!=null){ this.securityContext= new V1SecurityContextBuilder(securityContext); _visitables.get("securityContext").add(this.securityContext);} else { this.securityContext = null; _visitables.get("securityContext").remove(this.securityContext); } return (A) this; - } - public Boolean hasSecurityContext() { - return this.securityContext != null; - } - public V1ContainerFluentImpl.SecurityContextNested withNewSecurityContext() { - return new V1ContainerFluentImpl.SecurityContextNestedImpl(); - } - public V1ContainerFluentImpl.SecurityContextNested withNewSecurityContextLike(V1SecurityContext item) { - return new V1ContainerFluentImpl.SecurityContextNestedImpl(item); - } - public V1ContainerFluentImpl.SecurityContextNested editSecurityContext() { - return withNewSecurityContextLike(getSecurityContext()); - } - public V1ContainerFluentImpl.SecurityContextNested editOrNewSecurityContext() { - return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): new V1SecurityContextBuilder().build()); - } - public V1ContainerFluentImpl.SecurityContextNested editOrNewSecurityContextLike(V1SecurityContext item) { - return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): item); - } - - /** - * This method has been deprecated, please use method buildStartupProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getStartupProbe() { - return this.startupProbe!=null ?this.startupProbe.build():null; - } - public V1Probe buildStartupProbe() { - return this.startupProbe!=null ?this.startupProbe.build():null; - } - public A withStartupProbe(V1Probe startupProbe) { - _visitables.get("startupProbe").remove(this.startupProbe); - if (startupProbe!=null){ this.startupProbe= new V1ProbeBuilder(startupProbe); _visitables.get("startupProbe").add(this.startupProbe);} else { this.startupProbe = null; _visitables.get("startupProbe").remove(this.startupProbe); } return (A) this; - } - public Boolean hasStartupProbe() { - return this.startupProbe != null; - } - public V1ContainerFluentImpl.StartupProbeNested withNewStartupProbe() { - return new V1ContainerFluentImpl.StartupProbeNestedImpl(); - } - public V1ContainerFluentImpl.StartupProbeNested withNewStartupProbeLike(V1Probe item) { - return new V1ContainerFluentImpl.StartupProbeNestedImpl(item); - } - public V1ContainerFluentImpl.StartupProbeNested editStartupProbe() { - return withNewStartupProbeLike(getStartupProbe()); - } - public V1ContainerFluentImpl.StartupProbeNested editOrNewStartupProbe() { - return withNewStartupProbeLike(getStartupProbe() != null ? getStartupProbe(): new V1ProbeBuilder().build()); - } - public V1ContainerFluentImpl.StartupProbeNested editOrNewStartupProbeLike(V1Probe item) { - return withNewStartupProbeLike(getStartupProbe() != null ? getStartupProbe(): item); - } - public Boolean getStdin() { - return this.stdin; - } - public A withStdin(Boolean stdin) { - this.stdin=stdin; return (A) this; - } - public Boolean hasStdin() { - return this.stdin != null; - } - public Boolean getStdinOnce() { - return this.stdinOnce; - } - public A withStdinOnce(Boolean stdinOnce) { - this.stdinOnce=stdinOnce; return (A) this; - } - public Boolean hasStdinOnce() { - return this.stdinOnce != null; - } - public String getTerminationMessagePath() { - return this.terminationMessagePath; - } - public A withTerminationMessagePath(String terminationMessagePath) { - this.terminationMessagePath=terminationMessagePath; return (A) this; - } - public Boolean hasTerminationMessagePath() { - return this.terminationMessagePath != null; - } - public String getTerminationMessagePolicy() { - return this.terminationMessagePolicy; - } - public A withTerminationMessagePolicy(String terminationMessagePolicy) { - this.terminationMessagePolicy=terminationMessagePolicy; return (A) this; - } - public Boolean hasTerminationMessagePolicy() { - return this.terminationMessagePolicy != null; - } - public Boolean getTty() { - return this.tty; - } - public A withTty(Boolean tty) { - this.tty=tty; return (A) this; - } - public Boolean hasTty() { - return this.tty != null; - } - public A addToVolumeDevices(int index,V1VolumeDevice item) { - if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} - V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item); - if (index < 0 || index >= volumeDevices.size()) { _visitables.get("volumeDevices").add(builder); volumeDevices.add(builder); } else { _visitables.get("volumeDevices").add(index, builder); volumeDevices.add(index, builder);} - return (A)this; - } - public A setToVolumeDevices(int index,V1VolumeDevice item) { - if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} - V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item); - if (index < 0 || index >= volumeDevices.size()) { _visitables.get("volumeDevices").add(builder); volumeDevices.add(builder); } else { _visitables.get("volumeDevices").set(index, builder); volumeDevices.set(index, builder);} - return (A)this; - } - public A addToVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) { - if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} - for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this; - } - public A addAllToVolumeDevices(Collection items) { - if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} - for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this; - } - public A removeFromVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) { - for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder);if (this.volumeDevices != null) {this.volumeDevices.remove(builder);}} return (A)this; - } - public A removeAllFromVolumeDevices(Collection items) { - for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder);if (this.volumeDevices != null) {this.volumeDevices.remove(builder);}} return (A)this; - } - public A removeMatchingFromVolumeDevices(Predicate predicate) { - if (volumeDevices == null) return (A) this; - final Iterator each = volumeDevices.iterator(); - final List visitables = _visitables.get("volumeDevices"); - while (each.hasNext()) { - V1VolumeDeviceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildVolumeDevices instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeDevices() { - return volumeDevices != null ? build(volumeDevices) : null; - } - public List buildVolumeDevices() { - return volumeDevices != null ? build(volumeDevices) : null; - } - public V1VolumeDevice buildVolumeDevice(int index) { - return this.volumeDevices.get(index).build(); - } - public V1VolumeDevice buildFirstVolumeDevice() { - return this.volumeDevices.get(0).build(); - } - public V1VolumeDevice buildLastVolumeDevice() { - return this.volumeDevices.get(volumeDevices.size() - 1).build(); - } - public V1VolumeDevice buildMatchingVolumeDevice(Predicate predicate) { - for (V1VolumeDeviceBuilder item: volumeDevices) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingVolumeDevice(Predicate predicate) { - for (V1VolumeDeviceBuilder item: volumeDevices) { if(predicate.test(item)){ return true;} } return false; - } - public A withVolumeDevices(List volumeDevices) { - if (this.volumeDevices != null) { _visitables.get("volumeDevices").clear();} - if (volumeDevices != null) {this.volumeDevices = new ArrayList(); for (V1VolumeDevice item : volumeDevices){this.addToVolumeDevices(item);}} else { this.volumeDevices = null;} return (A) this; - } - public A withVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... volumeDevices) { - if (this.volumeDevices != null) {this.volumeDevices.clear(); _visitables.remove("volumeDevices"); } - if (volumeDevices != null) {for (V1VolumeDevice item :volumeDevices){ this.addToVolumeDevices(item);}} return (A) this; - } - public Boolean hasVolumeDevices() { - return volumeDevices != null && !volumeDevices.isEmpty(); - } - public V1ContainerFluentImpl.VolumeDevicesNested addNewVolumeDevice() { - return new V1ContainerFluentImpl.VolumeDevicesNestedImpl(); - } - public V1ContainerFluentImpl.VolumeDevicesNested addNewVolumeDeviceLike(V1VolumeDevice item) { - return new V1ContainerFluentImpl.VolumeDevicesNestedImpl(-1, item); - } - public V1ContainerFluentImpl.VolumeDevicesNested setNewVolumeDeviceLike(int index,V1VolumeDevice item) { - return new V1ContainerFluentImpl.VolumeDevicesNestedImpl(index, item); - } - public V1ContainerFluentImpl.VolumeDevicesNested editVolumeDevice(int index) { - if (volumeDevices.size() <= index) throw new RuntimeException("Can't edit volumeDevices. Index exceeds size."); - return setNewVolumeDeviceLike(index, buildVolumeDevice(index)); - } - public V1ContainerFluentImpl.VolumeDevicesNested editFirstVolumeDevice() { - if (volumeDevices.size() == 0) throw new RuntimeException("Can't edit first volumeDevices. The list is empty."); - return setNewVolumeDeviceLike(0, buildVolumeDevice(0)); - } - public V1ContainerFluentImpl.VolumeDevicesNested editLastVolumeDevice() { - int index = volumeDevices.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last volumeDevices. The list is empty."); - return setNewVolumeDeviceLike(index, buildVolumeDevice(index)); - } - public V1ContainerFluentImpl.VolumeDevicesNested editMatchingVolumeDevice(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item); - if (index < 0 || index >= volumeMounts.size()) { _visitables.get("volumeMounts").add(builder); volumeMounts.add(builder); } else { _visitables.get("volumeMounts").add(index, builder); volumeMounts.add(index, builder);} - return (A)this; - } - public A setToVolumeMounts(int index,V1VolumeMount item) { - if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} - V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item); - if (index < 0 || index >= volumeMounts.size()) { _visitables.get("volumeMounts").add(builder); volumeMounts.add(builder); } else { _visitables.get("volumeMounts").set(index, builder); volumeMounts.set(index, builder);} - return (A)this; - } - public A addToVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) { - if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} - for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this; - } - public A addAllToVolumeMounts(Collection items) { - if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} - for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this; - } - public A removeFromVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) { - for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder);if (this.volumeMounts != null) {this.volumeMounts.remove(builder);}} return (A)this; - } - public A removeAllFromVolumeMounts(Collection items) { - for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder);if (this.volumeMounts != null) {this.volumeMounts.remove(builder);}} return (A)this; - } - public A removeMatchingFromVolumeMounts(Predicate predicate) { - if (volumeMounts == null) return (A) this; - final Iterator each = volumeMounts.iterator(); - final List visitables = _visitables.get("volumeMounts"); - while (each.hasNext()) { - V1VolumeMountBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildVolumeMounts instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeMounts() { - return volumeMounts != null ? build(volumeMounts) : null; - } - public List buildVolumeMounts() { - return volumeMounts != null ? build(volumeMounts) : null; - } - public V1VolumeMount buildVolumeMount(int index) { - return this.volumeMounts.get(index).build(); - } - public V1VolumeMount buildFirstVolumeMount() { - return this.volumeMounts.get(0).build(); - } - public V1VolumeMount buildLastVolumeMount() { - return this.volumeMounts.get(volumeMounts.size() - 1).build(); - } - public V1VolumeMount buildMatchingVolumeMount(Predicate predicate) { - for (V1VolumeMountBuilder item: volumeMounts) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingVolumeMount(Predicate predicate) { - for (V1VolumeMountBuilder item: volumeMounts) { if(predicate.test(item)){ return true;} } return false; - } - public A withVolumeMounts(List volumeMounts) { - if (this.volumeMounts != null) { _visitables.get("volumeMounts").clear();} - if (volumeMounts != null) {this.volumeMounts = new ArrayList(); for (V1VolumeMount item : volumeMounts){this.addToVolumeMounts(item);}} else { this.volumeMounts = null;} return (A) this; - } - public A withVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... volumeMounts) { - if (this.volumeMounts != null) {this.volumeMounts.clear(); _visitables.remove("volumeMounts"); } - if (volumeMounts != null) {for (V1VolumeMount item :volumeMounts){ this.addToVolumeMounts(item);}} return (A) this; - } - public Boolean hasVolumeMounts() { - return volumeMounts != null && !volumeMounts.isEmpty(); - } - public V1ContainerFluentImpl.VolumeMountsNested addNewVolumeMount() { - return new V1ContainerFluentImpl.VolumeMountsNestedImpl(); - } - public V1ContainerFluentImpl.VolumeMountsNested addNewVolumeMountLike(V1VolumeMount item) { - return new V1ContainerFluentImpl.VolumeMountsNestedImpl(-1, item); - } - public V1ContainerFluentImpl.VolumeMountsNested setNewVolumeMountLike(int index,V1VolumeMount item) { - return new V1ContainerFluentImpl.VolumeMountsNestedImpl(index, item); - } - public V1ContainerFluentImpl.VolumeMountsNested editVolumeMount(int index) { - if (volumeMounts.size() <= index) throw new RuntimeException("Can't edit volumeMounts. Index exceeds size."); - return setNewVolumeMountLike(index, buildVolumeMount(index)); - } - public V1ContainerFluentImpl.VolumeMountsNested editFirstVolumeMount() { - if (volumeMounts.size() == 0) throw new RuntimeException("Can't edit first volumeMounts. The list is empty."); - return setNewVolumeMountLike(0, buildVolumeMount(0)); - } - public V1ContainerFluentImpl.VolumeMountsNested editLastVolumeMount() { - int index = volumeMounts.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last volumeMounts. The list is empty."); - return setNewVolumeMountLike(index, buildVolumeMount(index)); - } - public V1ContainerFluentImpl.VolumeMountsNested editMatchingVolumeMount(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1EnvVarFluentImpl> implements V1ContainerFluentImpl.EnvNested,Nested{ - EnvNestedImpl(int index,V1EnvVar item) { - this.index = index; - this.builder = new V1EnvVarBuilder(this, item); - } - EnvNestedImpl() { - this.index = -1; - this.builder = new V1EnvVarBuilder(this); - } - V1EnvVarBuilder builder; - int index; - public N and() { - return (N) V1ContainerFluentImpl.this.setToEnv(index,builder.build()); - } - public N endEnv() { - return and(); - } - - } - class EnvFromNestedImpl extends V1EnvFromSourceFluentImpl> implements V1ContainerFluentImpl.EnvFromNested,Nested{ - EnvFromNestedImpl(int index,V1EnvFromSource item) { - this.index = index; - this.builder = new V1EnvFromSourceBuilder(this, item); - } - EnvFromNestedImpl() { - this.index = -1; - this.builder = new V1EnvFromSourceBuilder(this); - } - V1EnvFromSourceBuilder builder; - int index; - public N and() { - return (N) V1ContainerFluentImpl.this.setToEnvFrom(index,builder.build()); - } - public N endEnvFrom() { - return and(); - } - - } - class LifecycleNestedImpl extends V1LifecycleFluentImpl> implements V1ContainerFluentImpl.LifecycleNested,Nested{ - LifecycleNestedImpl(V1Lifecycle item) { - this.builder = new V1LifecycleBuilder(this, item); - } - LifecycleNestedImpl() { - this.builder = new V1LifecycleBuilder(this); - } - V1LifecycleBuilder builder; - public N and() { - return (N) V1ContainerFluentImpl.this.withLifecycle(builder.build()); - } - public N endLifecycle() { - return and(); - } - - } - class LivenessProbeNestedImpl extends V1ProbeFluentImpl> implements V1ContainerFluentImpl.LivenessProbeNested,Nested{ - LivenessProbeNestedImpl(V1Probe item) { - this.builder = new V1ProbeBuilder(this, item); - } - LivenessProbeNestedImpl() { - this.builder = new V1ProbeBuilder(this); - } - V1ProbeBuilder builder; - public N and() { - return (N) V1ContainerFluentImpl.this.withLivenessProbe(builder.build()); - } - public N endLivenessProbe() { - return and(); - } - - } - class PortsNestedImpl extends V1ContainerPortFluentImpl> implements V1ContainerFluentImpl.PortsNested,Nested{ - PortsNestedImpl(int index,V1ContainerPort item) { - this.index = index; - this.builder = new V1ContainerPortBuilder(this, item); - } - PortsNestedImpl() { - this.index = -1; - this.builder = new V1ContainerPortBuilder(this); - } - V1ContainerPortBuilder builder; - int index; - public N and() { - return (N) V1ContainerFluentImpl.this.setToPorts(index,builder.build()); - } - public N endPort() { - return and(); - } - - } - class ReadinessProbeNestedImpl extends V1ProbeFluentImpl> implements V1ContainerFluentImpl.ReadinessProbeNested,Nested{ - ReadinessProbeNestedImpl(V1Probe item) { - this.builder = new V1ProbeBuilder(this, item); - } - ReadinessProbeNestedImpl() { - this.builder = new V1ProbeBuilder(this); - } - V1ProbeBuilder builder; - public N and() { - return (N) V1ContainerFluentImpl.this.withReadinessProbe(builder.build()); - } - public N endReadinessProbe() { - return and(); - } - - } - class ResizePolicyNestedImpl extends V1ContainerResizePolicyFluentImpl> implements V1ContainerFluentImpl.ResizePolicyNested,Nested{ - ResizePolicyNestedImpl(int index,V1ContainerResizePolicy item) { - this.index = index; - this.builder = new V1ContainerResizePolicyBuilder(this, item); - } - ResizePolicyNestedImpl() { - this.index = -1; - this.builder = new V1ContainerResizePolicyBuilder(this); - } - V1ContainerResizePolicyBuilder builder; - int index; - public N and() { - return (N) V1ContainerFluentImpl.this.setToResizePolicy(index,builder.build()); - } - public N endResizePolicy() { - return and(); - } - - } - class ResourcesNestedImpl extends V1ResourceRequirementsFluentImpl> implements V1ContainerFluentImpl.ResourcesNested,Nested{ - ResourcesNestedImpl(V1ResourceRequirements item) { - this.builder = new V1ResourceRequirementsBuilder(this, item); - } - ResourcesNestedImpl() { - this.builder = new V1ResourceRequirementsBuilder(this); - } - V1ResourceRequirementsBuilder builder; - public N and() { - return (N) V1ContainerFluentImpl.this.withResources(builder.build()); - } - public N endResources() { - return and(); - } - - } - class SecurityContextNestedImpl extends V1SecurityContextFluentImpl> implements V1ContainerFluentImpl.SecurityContextNested,Nested{ - SecurityContextNestedImpl(V1SecurityContext item) { - this.builder = new V1SecurityContextBuilder(this, item); - } - SecurityContextNestedImpl() { - this.builder = new V1SecurityContextBuilder(this); - } - V1SecurityContextBuilder builder; - public N and() { - return (N) V1ContainerFluentImpl.this.withSecurityContext(builder.build()); - } - public N endSecurityContext() { - return and(); - } - - } - class StartupProbeNestedImpl extends V1ProbeFluentImpl> implements V1ContainerFluentImpl.StartupProbeNested,Nested{ - StartupProbeNestedImpl(V1Probe item) { - this.builder = new V1ProbeBuilder(this, item); - } - StartupProbeNestedImpl() { - this.builder = new V1ProbeBuilder(this); - } - V1ProbeBuilder builder; - public N and() { - return (N) V1ContainerFluentImpl.this.withStartupProbe(builder.build()); - } - public N endStartupProbe() { - return and(); - } - - } - class VolumeDevicesNestedImpl extends V1VolumeDeviceFluentImpl> implements V1ContainerFluentImpl.VolumeDevicesNested,Nested{ - VolumeDevicesNestedImpl(int index,V1VolumeDevice item) { - this.index = index; - this.builder = new V1VolumeDeviceBuilder(this, item); - } - VolumeDevicesNestedImpl() { - this.index = -1; - this.builder = new V1VolumeDeviceBuilder(this); - } - V1VolumeDeviceBuilder builder; - int index; - public N and() { - return (N) V1ContainerFluentImpl.this.setToVolumeDevices(index,builder.build()); - } - public N endVolumeDevice() { - return and(); - } - - } - class VolumeMountsNestedImpl extends V1VolumeMountFluentImpl> implements V1ContainerFluentImpl.VolumeMountsNested,Nested{ - VolumeMountsNestedImpl(int index,V1VolumeMount item) { - this.index = index; - this.builder = new V1VolumeMountBuilder(this, item); - } - VolumeMountsNestedImpl() { - this.index = -1; - this.builder = new V1VolumeMountBuilder(this); - } - V1VolumeMountBuilder builder; - int index; - public N and() { - return (N) V1ContainerFluentImpl.this.setToVolumeMounts(index,builder.build()); - } - public N endVolumeMount() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageBuilder.java index 046b832b2a..e558dface8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ContainerImageBuilder extends V1ContainerImageFluentImpl implements VisitableBuilder{ +public class V1ContainerImageBuilder extends V1ContainerImageFluent implements VisitableBuilder{ public V1ContainerImageBuilder() { - this(false); - } - public V1ContainerImageBuilder(Boolean validationEnabled) { - this(new V1ContainerImage(), validationEnabled); + this(new V1ContainerImage()); } + public V1ContainerImageBuilder(V1ContainerImageFluent fluent) { - this(fluent, false); - } - public V1ContainerImageBuilder(V1ContainerImageFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ContainerImage(), validationEnabled); + this(fluent, new V1ContainerImage()); } + public V1ContainerImageBuilder(V1ContainerImageFluent fluent,V1ContainerImage instance) { - this(fluent, instance, false); - } - public V1ContainerImageBuilder(V1ContainerImageFluent fluent,V1ContainerImage instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNames(instance.getNames()); - fluent.withSizeBytes(instance.getSizeBytes()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ContainerImageBuilder(V1ContainerImage instance) { - this(instance,false); - } - public V1ContainerImageBuilder(V1ContainerImage instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNames(instance.getNames()); - this.withSizeBytes(instance.getSizeBytes()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ContainerImageFluent fluent; - Boolean validationEnabled; + public V1ContainerImage build() { V1ContainerImage buildable = new V1ContainerImage(); buildable.setNames(fluent.getNames()); @@ -46,4 +28,5 @@ public V1ContainerImage build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageFluent.java index 1a91e80830..d6dc942188 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageFluent.java @@ -1,36 +1,166 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1ContainerImageFluent> extends Fluent{ - public A addToNames(int index,String item); - public A setToNames(int index,String item); - public A addToNames(java.lang.String... items); - public A addAllToNames(Collection items); - public A removeFromNames(java.lang.String... items); - public A removeAllFromNames(Collection items); - public List getNames(); - public String getName(int index); - public String getFirstName(); - public String getLastName(); - public String getMatchingName(Predicate predicate); - public Boolean hasMatchingName(Predicate predicate); - public A withNames(List names); - public A withNames(java.lang.String... names); - public Boolean hasNames(); - public Long getSizeBytes(); - public A withSizeBytes(Long sizeBytes); - public Boolean hasSizeBytes(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ContainerImageFluent> extends BaseFluent{ + public V1ContainerImageFluent() { + } + public V1ContainerImageFluent(V1ContainerImage instance) { + this.copyInstance(instance); + } + private List names; + private Long sizeBytes; + + protected void copyInstance(V1ContainerImage instance) { + instance = (instance != null ? instance : new V1ContainerImage()); + if (instance != null) { + this.withNames(instance.getNames()); + this.withSizeBytes(instance.getSizeBytes()); + } + } + + public A addToNames(int index,String item) { + if (this.names == null) {this.names = new ArrayList();} + this.names.add(index, item); + return (A)this; + } + + public A setToNames(int index,String item) { + if (this.names == null) {this.names = new ArrayList();} + this.names.set(index, item); return (A)this; + } + + public A addToNames(java.lang.String... items) { + if (this.names == null) {this.names = new ArrayList();} + for (String item : items) {this.names.add(item);} return (A)this; + } + + public A addAllToNames(Collection items) { + if (this.names == null) {this.names = new ArrayList();} + for (String item : items) {this.names.add(item);} return (A)this; + } + + public A removeFromNames(java.lang.String... items) { + if (this.names == null) return (A)this; + for (String item : items) { this.names.remove(item);} return (A)this; + } + + public A removeAllFromNames(Collection items) { + if (this.names == null) return (A)this; + for (String item : items) { this.names.remove(item);} return (A)this; + } + + public List getNames() { + return this.names; + } + + public String getName(int index) { + return this.names.get(index); + } + + public String getFirstName() { + return this.names.get(0); + } + + public String getLastName() { + return this.names.get(names.size() - 1); + } + + public String getMatchingName(Predicate predicate) { + for (String item : names) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingName(Predicate predicate) { + for (String item : names) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNames(List names) { + if (names != null) { + this.names = new ArrayList(); + for (String item : names) { + this.addToNames(item); + } + } else { + this.names = null; + } + return (A) this; + } + + public A withNames(java.lang.String... names) { + if (this.names != null) { + this.names.clear(); + _visitables.remove("names"); + } + if (names != null) { + for (String item : names) { + this.addToNames(item); + } + } + return (A) this; + } + + public boolean hasNames() { + return this.names != null && !this.names.isEmpty(); + } + + public Long getSizeBytes() { + return this.sizeBytes; + } + + public A withSizeBytes(Long sizeBytes) { + this.sizeBytes = sizeBytes; + return (A) this; + } + + public boolean hasSizeBytes() { + return this.sizeBytes != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ContainerImageFluent that = (V1ContainerImageFluent) o; + if (!java.util.Objects.equals(names, that.names)) return false; + if (!java.util.Objects.equals(sizeBytes, that.sizeBytes)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(names, sizeBytes, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (names != null && !names.isEmpty()) { sb.append("names:"); sb.append(names + ","); } + if (sizeBytes != null) { sb.append("sizeBytes:"); sb.append(sizeBytes); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageFluentImpl.java deleted file mode 100644 index d452b877ae..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerImageFluentImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ContainerImageFluentImpl> extends BaseFluent implements V1ContainerImageFluent{ - public V1ContainerImageFluentImpl() { - } - public V1ContainerImageFluentImpl(V1ContainerImage instance) { - if (instance != null) { - this.withNames(instance.getNames()); - this.withSizeBytes(instance.getSizeBytes()); - } - } - private List names; - private Long sizeBytes; - public A addToNames(int index,String item) { - if (this.names == null) {this.names = new ArrayList();} - this.names.add(index, item); - return (A)this; - } - public A setToNames(int index,String item) { - if (this.names == null) {this.names = new ArrayList();} - this.names.set(index, item); return (A)this; - } - public A addToNames(java.lang.String... items) { - if (this.names == null) {this.names = new ArrayList();} - for (String item : items) {this.names.add(item);} return (A)this; - } - public A addAllToNames(Collection items) { - if (this.names == null) {this.names = new ArrayList();} - for (String item : items) {this.names.add(item);} return (A)this; - } - public A removeFromNames(java.lang.String... items) { - for (String item : items) {if (this.names!= null){ this.names.remove(item);}} return (A)this; - } - public A removeAllFromNames(Collection items) { - for (String item : items) {if (this.names!= null){ this.names.remove(item);}} return (A)this; - } - public List getNames() { - return this.names; - } - public String getName(int index) { - return this.names.get(index); - } - public String getFirstName() { - return this.names.get(0); - } - public String getLastName() { - return this.names.get(names.size() - 1); - } - public String getMatchingName(Predicate predicate) { - for (String item: names) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingName(Predicate predicate) { - for (String item: names) { if(predicate.test(item)){ return true;} } return false; - } - public A withNames(List names) { - if (names != null) {this.names = new ArrayList(); for (String item : names){this.addToNames(item);}} else { this.names = null;} return (A) this; - } - public A withNames(java.lang.String... names) { - if (this.names != null) {this.names.clear(); _visitables.remove("names"); } - if (names != null) {for (String item :names){ this.addToNames(item);}} return (A) this; - } - public Boolean hasNames() { - return names != null && !names.isEmpty(); - } - public Long getSizeBytes() { - return this.sizeBytes; - } - public A withSizeBytes(Long sizeBytes) { - this.sizeBytes=sizeBytes; return (A) this; - } - public Boolean hasSizeBytes() { - return this.sizeBytes != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ContainerImageFluentImpl that = (V1ContainerImageFluentImpl) o; - if (!java.util.Objects.equals(names, that.names)) return false; - - if (!java.util.Objects.equals(sizeBytes, that.sizeBytes)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(names, sizeBytes, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (names != null && !names.isEmpty()) { sb.append("names:"); sb.append(names + ","); } - if (sizeBytes != null) { sb.append("sizeBytes:"); sb.append(sizeBytes); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortBuilder.java index abad6c358e..274716d8d9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ContainerPortBuilder extends V1ContainerPortFluentImpl implements VisitableBuilder{ +public class V1ContainerPortBuilder extends V1ContainerPortFluent implements VisitableBuilder{ public V1ContainerPortBuilder() { - this(false); - } - public V1ContainerPortBuilder(Boolean validationEnabled) { - this(new V1ContainerPort(), validationEnabled); + this(new V1ContainerPort()); } + public V1ContainerPortBuilder(V1ContainerPortFluent fluent) { - this(fluent, false); - } - public V1ContainerPortBuilder(V1ContainerPortFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ContainerPort(), validationEnabled); + this(fluent, new V1ContainerPort()); } + public V1ContainerPortBuilder(V1ContainerPortFluent fluent,V1ContainerPort instance) { - this(fluent, instance, false); - } - public V1ContainerPortBuilder(V1ContainerPortFluent fluent,V1ContainerPort instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withContainerPort(instance.getContainerPort()); - fluent.withHostIP(instance.getHostIP()); - fluent.withHostPort(instance.getHostPort()); - fluent.withName(instance.getName()); - fluent.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ContainerPortBuilder(V1ContainerPort instance) { - this(instance,false); - } - public V1ContainerPortBuilder(V1ContainerPort instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withContainerPort(instance.getContainerPort()); - this.withHostIP(instance.getHostIP()); - this.withHostPort(instance.getHostPort()); - this.withName(instance.getName()); - this.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ContainerPortFluent fluent; - Boolean validationEnabled; + public V1ContainerPort build() { V1ContainerPort buildable = new V1ContainerPort(); buildable.setContainerPort(fluent.getContainerPort()); @@ -55,4 +31,5 @@ public V1ContainerPort build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortFluent.java index f110256993..3091526b16 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ContainerPortFluent> extends Fluent{ - public Integer getContainerPort(); - public A withContainerPort(Integer containerPort); - public Boolean hasContainerPort(); - public String getHostIP(); - public A withHostIP(String hostIP); - public Boolean hasHostIP(); - public Integer getHostPort(); - public A withHostPort(Integer hostPort); - public Boolean hasHostPort(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getProtocol(); - public A withProtocol(String protocol); - public Boolean hasProtocol(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ContainerPortFluent> extends BaseFluent{ + public V1ContainerPortFluent() { + } + public V1ContainerPortFluent(V1ContainerPort instance) { + this.copyInstance(instance); + } + private Integer containerPort; + private String hostIP; + private Integer hostPort; + private String name; + private String protocol; + + protected void copyInstance(V1ContainerPort instance) { + instance = (instance != null ? instance : new V1ContainerPort()); + if (instance != null) { + this.withContainerPort(instance.getContainerPort()); + this.withHostIP(instance.getHostIP()); + this.withHostPort(instance.getHostPort()); + this.withName(instance.getName()); + this.withProtocol(instance.getProtocol()); + } + } + + public Integer getContainerPort() { + return this.containerPort; + } + + public A withContainerPort(Integer containerPort) { + this.containerPort = containerPort; + return (A) this; + } + + public boolean hasContainerPort() { + return this.containerPort != null; + } + + public String getHostIP() { + return this.hostIP; + } + + public A withHostIP(String hostIP) { + this.hostIP = hostIP; + return (A) this; + } + + public boolean hasHostIP() { + return this.hostIP != null; + } + + public Integer getHostPort() { + return this.hostPort; + } + + public A withHostPort(Integer hostPort) { + this.hostPort = hostPort; + return (A) this; + } + + public boolean hasHostPort() { + return this.hostPort != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getProtocol() { + return this.protocol; + } + + public A withProtocol(String protocol) { + this.protocol = protocol; + return (A) this; + } + + public boolean hasProtocol() { + return this.protocol != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ContainerPortFluent that = (V1ContainerPortFluent) o; + if (!java.util.Objects.equals(containerPort, that.containerPort)) return false; + if (!java.util.Objects.equals(hostIP, that.hostIP)) return false; + if (!java.util.Objects.equals(hostPort, that.hostPort)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(protocol, that.protocol)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(containerPort, hostIP, hostPort, name, protocol, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (containerPort != null) { sb.append("containerPort:"); sb.append(containerPort + ","); } + if (hostIP != null) { sb.append("hostIP:"); sb.append(hostIP + ","); } + if (hostPort != null) { sb.append("hostPort:"); sb.append(hostPort + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortFluentImpl.java deleted file mode 100644 index 0d6593e85a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerPortFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ContainerPortFluentImpl> extends BaseFluent implements V1ContainerPortFluent{ - public V1ContainerPortFluentImpl() { - } - public V1ContainerPortFluentImpl(V1ContainerPort instance) { - if (instance != null) { - this.withContainerPort(instance.getContainerPort()); - this.withHostIP(instance.getHostIP()); - this.withHostPort(instance.getHostPort()); - this.withName(instance.getName()); - this.withProtocol(instance.getProtocol()); - } - } - private Integer containerPort; - private String hostIP; - private Integer hostPort; - private String name; - private String protocol; - public Integer getContainerPort() { - return this.containerPort; - } - public A withContainerPort(Integer containerPort) { - this.containerPort=containerPort; return (A) this; - } - public Boolean hasContainerPort() { - return this.containerPort != null; - } - public String getHostIP() { - return this.hostIP; - } - public A withHostIP(String hostIP) { - this.hostIP=hostIP; return (A) this; - } - public Boolean hasHostIP() { - return this.hostIP != null; - } - public Integer getHostPort() { - return this.hostPort; - } - public A withHostPort(Integer hostPort) { - this.hostPort=hostPort; return (A) this; - } - public Boolean hasHostPort() { - return this.hostPort != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getProtocol() { - return this.protocol; - } - public A withProtocol(String protocol) { - this.protocol=protocol; return (A) this; - } - public Boolean hasProtocol() { - return this.protocol != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ContainerPortFluentImpl that = (V1ContainerPortFluentImpl) o; - if (!java.util.Objects.equals(containerPort, that.containerPort)) return false; - - if (!java.util.Objects.equals(hostIP, that.hostIP)) return false; - - if (!java.util.Objects.equals(hostPort, that.hostPort)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(protocol, that.protocol)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(containerPort, hostIP, hostPort, name, protocol, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (containerPort != null) { sb.append("containerPort:"); sb.append(containerPort + ","); } - if (hostIP != null) { sb.append("hostIP:"); sb.append(hostIP + ","); } - if (hostPort != null) { sb.append("hostPort:"); sb.append(hostPort + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyBuilder.java index deccb1cbf3..40723cd8e1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ContainerResizePolicyBuilder extends V1ContainerResizePolicyFluentImpl implements VisitableBuilder{ +public class V1ContainerResizePolicyBuilder extends V1ContainerResizePolicyFluent implements VisitableBuilder{ public V1ContainerResizePolicyBuilder() { - this(false); - } - public V1ContainerResizePolicyBuilder(Boolean validationEnabled) { - this(new V1ContainerResizePolicy(), validationEnabled); + this(new V1ContainerResizePolicy()); } + public V1ContainerResizePolicyBuilder(V1ContainerResizePolicyFluent fluent) { - this(fluent, false); - } - public V1ContainerResizePolicyBuilder(V1ContainerResizePolicyFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ContainerResizePolicy(), validationEnabled); + this(fluent, new V1ContainerResizePolicy()); } + public V1ContainerResizePolicyBuilder(V1ContainerResizePolicyFluent fluent,V1ContainerResizePolicy instance) { - this(fluent, instance, false); - } - public V1ContainerResizePolicyBuilder(V1ContainerResizePolicyFluent fluent,V1ContainerResizePolicy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withResourceName(instance.getResourceName()); - fluent.withRestartPolicy(instance.getRestartPolicy()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ContainerResizePolicyBuilder(V1ContainerResizePolicy instance) { - this(instance,false); - } - public V1ContainerResizePolicyBuilder(V1ContainerResizePolicy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withResourceName(instance.getResourceName()); - this.withRestartPolicy(instance.getRestartPolicy()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ContainerResizePolicyFluent fluent; - Boolean validationEnabled; + public V1ContainerResizePolicy build() { V1ContainerResizePolicy buildable = new V1ContainerResizePolicy(); buildable.setResourceName(fluent.getResourceName()); @@ -46,4 +28,5 @@ public V1ContainerResizePolicy build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyFluent.java index 1868589363..06a5367829 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ContainerResizePolicyFluent> extends Fluent{ - public String getResourceName(); - public A withResourceName(String resourceName); - public Boolean hasResourceName(); - public String getRestartPolicy(); - public A withRestartPolicy(String restartPolicy); - public Boolean hasRestartPolicy(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ContainerResizePolicyFluent> extends BaseFluent{ + public V1ContainerResizePolicyFluent() { + } + public V1ContainerResizePolicyFluent(V1ContainerResizePolicy instance) { + this.copyInstance(instance); + } + private String resourceName; + private String restartPolicy; + + protected void copyInstance(V1ContainerResizePolicy instance) { + instance = (instance != null ? instance : new V1ContainerResizePolicy()); + if (instance != null) { + this.withResourceName(instance.getResourceName()); + this.withRestartPolicy(instance.getRestartPolicy()); + } + } + + public String getResourceName() { + return this.resourceName; + } + + public A withResourceName(String resourceName) { + this.resourceName = resourceName; + return (A) this; + } + + public boolean hasResourceName() { + return this.resourceName != null; + } + + public String getRestartPolicy() { + return this.restartPolicy; + } + + public A withRestartPolicy(String restartPolicy) { + this.restartPolicy = restartPolicy; + return (A) this; + } + + public boolean hasRestartPolicy() { + return this.restartPolicy != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ContainerResizePolicyFluent that = (V1ContainerResizePolicyFluent) o; + if (!java.util.Objects.equals(resourceName, that.resourceName)) return false; + if (!java.util.Objects.equals(restartPolicy, that.restartPolicy)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(resourceName, restartPolicy, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (resourceName != null) { sb.append("resourceName:"); sb.append(resourceName + ","); } + if (restartPolicy != null) { sb.append("restartPolicy:"); sb.append(restartPolicy); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyFluentImpl.java deleted file mode 100644 index 6e8ba79be6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerResizePolicyFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ContainerResizePolicyFluentImpl> extends BaseFluent implements V1ContainerResizePolicyFluent{ - public V1ContainerResizePolicyFluentImpl() { - } - public V1ContainerResizePolicyFluentImpl(V1ContainerResizePolicy instance) { - if (instance != null) { - this.withResourceName(instance.getResourceName()); - this.withRestartPolicy(instance.getRestartPolicy()); - } - } - private String resourceName; - private String restartPolicy; - public String getResourceName() { - return this.resourceName; - } - public A withResourceName(String resourceName) { - this.resourceName=resourceName; return (A) this; - } - public Boolean hasResourceName() { - return this.resourceName != null; - } - public String getRestartPolicy() { - return this.restartPolicy; - } - public A withRestartPolicy(String restartPolicy) { - this.restartPolicy=restartPolicy; return (A) this; - } - public Boolean hasRestartPolicy() { - return this.restartPolicy != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ContainerResizePolicyFluentImpl that = (V1ContainerResizePolicyFluentImpl) o; - if (!java.util.Objects.equals(resourceName, that.resourceName)) return false; - - if (!java.util.Objects.equals(restartPolicy, that.restartPolicy)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(resourceName, restartPolicy, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (resourceName != null) { sb.append("resourceName:"); sb.append(resourceName + ","); } - if (restartPolicy != null) { sb.append("restartPolicy:"); sb.append(restartPolicy); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateBuilder.java index 6e8b21b61a..d30560c4f6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ContainerStateBuilder extends V1ContainerStateFluentImpl implements VisitableBuilder{ +public class V1ContainerStateBuilder extends V1ContainerStateFluent implements VisitableBuilder{ public V1ContainerStateBuilder() { - this(false); - } - public V1ContainerStateBuilder(Boolean validationEnabled) { - this(new V1ContainerState(), validationEnabled); + this(new V1ContainerState()); } + public V1ContainerStateBuilder(V1ContainerStateFluent fluent) { - this(fluent, false); - } - public V1ContainerStateBuilder(V1ContainerStateFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ContainerState(), validationEnabled); + this(fluent, new V1ContainerState()); } + public V1ContainerStateBuilder(V1ContainerStateFluent fluent,V1ContainerState instance) { - this(fluent, instance, false); - } - public V1ContainerStateBuilder(V1ContainerStateFluent fluent,V1ContainerState instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withRunning(instance.getRunning()); - fluent.withTerminated(instance.getTerminated()); - fluent.withWaiting(instance.getWaiting()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ContainerStateBuilder(V1ContainerState instance) { - this(instance,false); - } - public V1ContainerStateBuilder(V1ContainerState instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withRunning(instance.getRunning()); - this.withTerminated(instance.getTerminated()); - this.withWaiting(instance.getWaiting()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ContainerStateFluent fluent; - Boolean validationEnabled; + public V1ContainerState build() { V1ContainerState buildable = new V1ContainerState(); - buildable.setRunning(fluent.getRunning()); - buildable.setTerminated(fluent.getTerminated()); - buildable.setWaiting(fluent.getWaiting()); + buildable.setRunning(fluent.buildRunning()); + buildable.setTerminated(fluent.buildTerminated()); + buildable.setWaiting(fluent.buildWaiting()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateFluent.java index 69ac3c82a6..72b5df0b25 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateFluent.java @@ -1,74 +1,226 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1ContainerStateFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildRunning instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerStateRunning getRunning(); - public V1ContainerStateRunning buildRunning(); - public A withRunning(V1ContainerStateRunning running); - public Boolean hasRunning(); - public V1ContainerStateFluent.RunningNested withNewRunning(); - public V1ContainerStateFluent.RunningNested withNewRunningLike(V1ContainerStateRunning item); - public V1ContainerStateFluent.RunningNested editRunning(); - public V1ContainerStateFluent.RunningNested editOrNewRunning(); - public V1ContainerStateFluent.RunningNested editOrNewRunningLike(V1ContainerStateRunning item); - - /** - * This method has been deprecated, please use method buildTerminated instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerStateTerminated getTerminated(); - public V1ContainerStateTerminated buildTerminated(); - public A withTerminated(V1ContainerStateTerminated terminated); - public Boolean hasTerminated(); - public V1ContainerStateFluent.TerminatedNested withNewTerminated(); - public V1ContainerStateFluent.TerminatedNested withNewTerminatedLike(V1ContainerStateTerminated item); - public V1ContainerStateFluent.TerminatedNested editTerminated(); - public V1ContainerStateFluent.TerminatedNested editOrNewTerminated(); - public V1ContainerStateFluent.TerminatedNested editOrNewTerminatedLike(V1ContainerStateTerminated item); - - /** - * This method has been deprecated, please use method buildWaiting instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerStateWaiting getWaiting(); - public V1ContainerStateWaiting buildWaiting(); - public A withWaiting(V1ContainerStateWaiting waiting); - public Boolean hasWaiting(); - public V1ContainerStateFluent.WaitingNested withNewWaiting(); - public V1ContainerStateFluent.WaitingNested withNewWaitingLike(V1ContainerStateWaiting item); - public V1ContainerStateFluent.WaitingNested editWaiting(); - public V1ContainerStateFluent.WaitingNested editOrNewWaiting(); - public V1ContainerStateFluent.WaitingNested editOrNewWaitingLike(V1ContainerStateWaiting item); - public interface RunningNested extends Nested,V1ContainerStateRunningFluent>{ - public N and(); - public N endRunning(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ContainerStateFluent> extends BaseFluent{ + public V1ContainerStateFluent() { + } + + public V1ContainerStateFluent(V1ContainerState instance) { + this.copyInstance(instance); + } + private V1ContainerStateRunningBuilder running; + private V1ContainerStateTerminatedBuilder terminated; + private V1ContainerStateWaitingBuilder waiting; + + protected void copyInstance(V1ContainerState instance) { + instance = (instance != null ? instance : new V1ContainerState()); + if (instance != null) { + this.withRunning(instance.getRunning()); + this.withTerminated(instance.getTerminated()); + this.withWaiting(instance.getWaiting()); + } + } + + public V1ContainerStateRunning buildRunning() { + return this.running != null ? this.running.build() : null; + } + + public A withRunning(V1ContainerStateRunning running) { + this._visitables.remove("running"); + if (running != null) { + this.running = new V1ContainerStateRunningBuilder(running); + this._visitables.get("running").add(this.running); + } else { + this.running = null; + this._visitables.get("running").remove(this.running); + } + return (A) this; + } + + public boolean hasRunning() { + return this.running != null; + } + + public RunningNested withNewRunning() { + return new RunningNested(null); + } + + public RunningNested withNewRunningLike(V1ContainerStateRunning item) { + return new RunningNested(item); + } + + public RunningNested editRunning() { + return withNewRunningLike(java.util.Optional.ofNullable(buildRunning()).orElse(null)); + } + + public RunningNested editOrNewRunning() { + return withNewRunningLike(java.util.Optional.ofNullable(buildRunning()).orElse(new V1ContainerStateRunningBuilder().build())); + } + + public RunningNested editOrNewRunningLike(V1ContainerStateRunning item) { + return withNewRunningLike(java.util.Optional.ofNullable(buildRunning()).orElse(item)); + } + + public V1ContainerStateTerminated buildTerminated() { + return this.terminated != null ? this.terminated.build() : null; + } + + public A withTerminated(V1ContainerStateTerminated terminated) { + this._visitables.remove("terminated"); + if (terminated != null) { + this.terminated = new V1ContainerStateTerminatedBuilder(terminated); + this._visitables.get("terminated").add(this.terminated); + } else { + this.terminated = null; + this._visitables.get("terminated").remove(this.terminated); + } + return (A) this; + } + + public boolean hasTerminated() { + return this.terminated != null; + } + + public TerminatedNested withNewTerminated() { + return new TerminatedNested(null); + } + + public TerminatedNested withNewTerminatedLike(V1ContainerStateTerminated item) { + return new TerminatedNested(item); + } + + public TerminatedNested editTerminated() { + return withNewTerminatedLike(java.util.Optional.ofNullable(buildTerminated()).orElse(null)); + } + + public TerminatedNested editOrNewTerminated() { + return withNewTerminatedLike(java.util.Optional.ofNullable(buildTerminated()).orElse(new V1ContainerStateTerminatedBuilder().build())); } - public interface TerminatedNested extends Nested,V1ContainerStateTerminatedFluent>{ - public N and(); - public N endTerminated(); + + public TerminatedNested editOrNewTerminatedLike(V1ContainerStateTerminated item) { + return withNewTerminatedLike(java.util.Optional.ofNullable(buildTerminated()).orElse(item)); + } + + public V1ContainerStateWaiting buildWaiting() { + return this.waiting != null ? this.waiting.build() : null; + } + + public A withWaiting(V1ContainerStateWaiting waiting) { + this._visitables.remove("waiting"); + if (waiting != null) { + this.waiting = new V1ContainerStateWaitingBuilder(waiting); + this._visitables.get("waiting").add(this.waiting); + } else { + this.waiting = null; + this._visitables.get("waiting").remove(this.waiting); + } + return (A) this; + } + + public boolean hasWaiting() { + return this.waiting != null; + } + + public WaitingNested withNewWaiting() { + return new WaitingNested(null); + } + + public WaitingNested withNewWaitingLike(V1ContainerStateWaiting item) { + return new WaitingNested(item); + } + + public WaitingNested editWaiting() { + return withNewWaitingLike(java.util.Optional.ofNullable(buildWaiting()).orElse(null)); + } + + public WaitingNested editOrNewWaiting() { + return withNewWaitingLike(java.util.Optional.ofNullable(buildWaiting()).orElse(new V1ContainerStateWaitingBuilder().build())); + } + + public WaitingNested editOrNewWaitingLike(V1ContainerStateWaiting item) { + return withNewWaitingLike(java.util.Optional.ofNullable(buildWaiting()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ContainerStateFluent that = (V1ContainerStateFluent) o; + if (!java.util.Objects.equals(running, that.running)) return false; + if (!java.util.Objects.equals(terminated, that.terminated)) return false; + if (!java.util.Objects.equals(waiting, that.waiting)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(running, terminated, waiting, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (running != null) { sb.append("running:"); sb.append(running + ","); } + if (terminated != null) { sb.append("terminated:"); sb.append(terminated + ","); } + if (waiting != null) { sb.append("waiting:"); sb.append(waiting); } + sb.append("}"); + return sb.toString(); + } + public class RunningNested extends V1ContainerStateRunningFluent> implements Nested{ + RunningNested(V1ContainerStateRunning item) { + this.builder = new V1ContainerStateRunningBuilder(this, item); + } + V1ContainerStateRunningBuilder builder; + + public N and() { + return (N) V1ContainerStateFluent.this.withRunning(builder.build()); + } + public N endRunning() { + return and(); + } + + } - public interface WaitingNested extends Nested,V1ContainerStateWaitingFluent>{ - public N and(); - public N endWaiting(); + public class TerminatedNested extends V1ContainerStateTerminatedFluent> implements Nested{ + TerminatedNested(V1ContainerStateTerminated item) { + this.builder = new V1ContainerStateTerminatedBuilder(this, item); + } + V1ContainerStateTerminatedBuilder builder; + public N and() { + return (N) V1ContainerStateFluent.this.withTerminated(builder.build()); + } + + public N endTerminated() { + return and(); + } + + } + public class WaitingNested extends V1ContainerStateWaitingFluent> implements Nested{ + WaitingNested(V1ContainerStateWaiting item) { + this.builder = new V1ContainerStateWaitingBuilder(this, item); + } + V1ContainerStateWaitingBuilder builder; + + public N and() { + return (N) V1ContainerStateFluent.this.withWaiting(builder.build()); + } + + public N endWaiting() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateFluentImpl.java deleted file mode 100644 index b478649ce1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ContainerStateFluentImpl> extends BaseFluent implements V1ContainerStateFluent{ - public V1ContainerStateFluentImpl() { - } - public V1ContainerStateFluentImpl(V1ContainerState instance) { - if (instance != null) { - this.withRunning(instance.getRunning()); - this.withTerminated(instance.getTerminated()); - this.withWaiting(instance.getWaiting()); - } - } - private V1ContainerStateRunningBuilder running; - private V1ContainerStateTerminatedBuilder terminated; - private V1ContainerStateWaitingBuilder waiting; - - /** - * This method has been deprecated, please use method buildRunning instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerStateRunning getRunning() { - return this.running!=null ?this.running.build():null; - } - public V1ContainerStateRunning buildRunning() { - return this.running!=null ?this.running.build():null; - } - public A withRunning(V1ContainerStateRunning running) { - _visitables.get("running").remove(this.running); - if (running!=null){ this.running= new V1ContainerStateRunningBuilder(running); _visitables.get("running").add(this.running);} else { this.running = null; _visitables.get("running").remove(this.running); } return (A) this; - } - public Boolean hasRunning() { - return this.running != null; - } - public V1ContainerStateFluentImpl.RunningNested withNewRunning() { - return new V1ContainerStateFluentImpl.RunningNestedImpl(); - } - public V1ContainerStateFluentImpl.RunningNested withNewRunningLike(V1ContainerStateRunning item) { - return new V1ContainerStateFluentImpl.RunningNestedImpl(item); - } - public V1ContainerStateFluentImpl.RunningNested editRunning() { - return withNewRunningLike(getRunning()); - } - public V1ContainerStateFluentImpl.RunningNested editOrNewRunning() { - return withNewRunningLike(getRunning() != null ? getRunning(): new V1ContainerStateRunningBuilder().build()); - } - public V1ContainerStateFluentImpl.RunningNested editOrNewRunningLike(V1ContainerStateRunning item) { - return withNewRunningLike(getRunning() != null ? getRunning(): item); - } - - /** - * This method has been deprecated, please use method buildTerminated instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerStateTerminated getTerminated() { - return this.terminated!=null ?this.terminated.build():null; - } - public V1ContainerStateTerminated buildTerminated() { - return this.terminated!=null ?this.terminated.build():null; - } - public A withTerminated(V1ContainerStateTerminated terminated) { - _visitables.get("terminated").remove(this.terminated); - if (terminated!=null){ this.terminated= new V1ContainerStateTerminatedBuilder(terminated); _visitables.get("terminated").add(this.terminated);} else { this.terminated = null; _visitables.get("terminated").remove(this.terminated); } return (A) this; - } - public Boolean hasTerminated() { - return this.terminated != null; - } - public V1ContainerStateFluentImpl.TerminatedNested withNewTerminated() { - return new V1ContainerStateFluentImpl.TerminatedNestedImpl(); - } - public V1ContainerStateFluentImpl.TerminatedNested withNewTerminatedLike(V1ContainerStateTerminated item) { - return new V1ContainerStateFluentImpl.TerminatedNestedImpl(item); - } - public V1ContainerStateFluentImpl.TerminatedNested editTerminated() { - return withNewTerminatedLike(getTerminated()); - } - public V1ContainerStateFluentImpl.TerminatedNested editOrNewTerminated() { - return withNewTerminatedLike(getTerminated() != null ? getTerminated(): new V1ContainerStateTerminatedBuilder().build()); - } - public V1ContainerStateFluentImpl.TerminatedNested editOrNewTerminatedLike(V1ContainerStateTerminated item) { - return withNewTerminatedLike(getTerminated() != null ? getTerminated(): item); - } - - /** - * This method has been deprecated, please use method buildWaiting instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerStateWaiting getWaiting() { - return this.waiting!=null ?this.waiting.build():null; - } - public V1ContainerStateWaiting buildWaiting() { - return this.waiting!=null ?this.waiting.build():null; - } - public A withWaiting(V1ContainerStateWaiting waiting) { - _visitables.get("waiting").remove(this.waiting); - if (waiting!=null){ this.waiting= new V1ContainerStateWaitingBuilder(waiting); _visitables.get("waiting").add(this.waiting);} else { this.waiting = null; _visitables.get("waiting").remove(this.waiting); } return (A) this; - } - public Boolean hasWaiting() { - return this.waiting != null; - } - public V1ContainerStateFluentImpl.WaitingNested withNewWaiting() { - return new V1ContainerStateFluentImpl.WaitingNestedImpl(); - } - public V1ContainerStateFluentImpl.WaitingNested withNewWaitingLike(V1ContainerStateWaiting item) { - return new V1ContainerStateFluentImpl.WaitingNestedImpl(item); - } - public V1ContainerStateFluentImpl.WaitingNested editWaiting() { - return withNewWaitingLike(getWaiting()); - } - public V1ContainerStateFluentImpl.WaitingNested editOrNewWaiting() { - return withNewWaitingLike(getWaiting() != null ? getWaiting(): new V1ContainerStateWaitingBuilder().build()); - } - public V1ContainerStateFluentImpl.WaitingNested editOrNewWaitingLike(V1ContainerStateWaiting item) { - return withNewWaitingLike(getWaiting() != null ? getWaiting(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ContainerStateFluentImpl that = (V1ContainerStateFluentImpl) o; - if (!java.util.Objects.equals(running, that.running)) return false; - - if (!java.util.Objects.equals(terminated, that.terminated)) return false; - - if (!java.util.Objects.equals(waiting, that.waiting)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(running, terminated, waiting, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (running != null) { sb.append("running:"); sb.append(running + ","); } - if (terminated != null) { sb.append("terminated:"); sb.append(terminated + ","); } - if (waiting != null) { sb.append("waiting:"); sb.append(waiting); } - sb.append("}"); - return sb.toString(); - } - class RunningNestedImpl extends V1ContainerStateRunningFluentImpl> implements V1ContainerStateFluentImpl.RunningNested,Nested{ - RunningNestedImpl(V1ContainerStateRunning item) { - this.builder = new V1ContainerStateRunningBuilder(this, item); - } - RunningNestedImpl() { - this.builder = new V1ContainerStateRunningBuilder(this); - } - V1ContainerStateRunningBuilder builder; - public N and() { - return (N) V1ContainerStateFluentImpl.this.withRunning(builder.build()); - } - public N endRunning() { - return and(); - } - - } - class TerminatedNestedImpl extends V1ContainerStateTerminatedFluentImpl> implements V1ContainerStateFluentImpl.TerminatedNested,Nested{ - TerminatedNestedImpl(V1ContainerStateTerminated item) { - this.builder = new V1ContainerStateTerminatedBuilder(this, item); - } - TerminatedNestedImpl() { - this.builder = new V1ContainerStateTerminatedBuilder(this); - } - V1ContainerStateTerminatedBuilder builder; - public N and() { - return (N) V1ContainerStateFluentImpl.this.withTerminated(builder.build()); - } - public N endTerminated() { - return and(); - } - - } - class WaitingNestedImpl extends V1ContainerStateWaitingFluentImpl> implements V1ContainerStateFluentImpl.WaitingNested,Nested{ - WaitingNestedImpl(V1ContainerStateWaiting item) { - this.builder = new V1ContainerStateWaitingBuilder(this, item); - } - WaitingNestedImpl() { - this.builder = new V1ContainerStateWaitingBuilder(this); - } - V1ContainerStateWaitingBuilder builder; - public N and() { - return (N) V1ContainerStateFluentImpl.this.withWaiting(builder.build()); - } - public N endWaiting() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningBuilder.java index 46cf155a86..b6d6ec884c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ContainerStateRunningBuilder extends V1ContainerStateRunningFluentImpl implements VisitableBuilder{ +public class V1ContainerStateRunningBuilder extends V1ContainerStateRunningFluent implements VisitableBuilder{ public V1ContainerStateRunningBuilder() { - this(false); - } - public V1ContainerStateRunningBuilder(Boolean validationEnabled) { - this(new V1ContainerStateRunning(), validationEnabled); + this(new V1ContainerStateRunning()); } + public V1ContainerStateRunningBuilder(V1ContainerStateRunningFluent fluent) { - this(fluent, false); - } - public V1ContainerStateRunningBuilder(V1ContainerStateRunningFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ContainerStateRunning(), validationEnabled); + this(fluent, new V1ContainerStateRunning()); } + public V1ContainerStateRunningBuilder(V1ContainerStateRunningFluent fluent,V1ContainerStateRunning instance) { - this(fluent, instance, false); - } - public V1ContainerStateRunningBuilder(V1ContainerStateRunningFluent fluent,V1ContainerStateRunning instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withStartedAt(instance.getStartedAt()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ContainerStateRunningBuilder(V1ContainerStateRunning instance) { - this(instance,false); - } - public V1ContainerStateRunningBuilder(V1ContainerStateRunning instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withStartedAt(instance.getStartedAt()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ContainerStateRunningFluent fluent; - Boolean validationEnabled; + public V1ContainerStateRunning build() { V1ContainerStateRunning buildable = new V1ContainerStateRunning(); buildable.setStartedAt(fluent.getStartedAt()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningFluent.java index e2583cfd22..2c3d4bdc9f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningFluent.java @@ -1,16 +1,64 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1ContainerStateRunningFluent> extends Fluent{ - public OffsetDateTime getStartedAt(); - public A withStartedAt(OffsetDateTime startedAt); - public Boolean hasStartedAt(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ContainerStateRunningFluent> extends BaseFluent{ + public V1ContainerStateRunningFluent() { + } + public V1ContainerStateRunningFluent(V1ContainerStateRunning instance) { + this.copyInstance(instance); + } + private OffsetDateTime startedAt; + + protected void copyInstance(V1ContainerStateRunning instance) { + instance = (instance != null ? instance : new V1ContainerStateRunning()); + if (instance != null) { + this.withStartedAt(instance.getStartedAt()); + } + } + + public OffsetDateTime getStartedAt() { + return this.startedAt; + } + + public A withStartedAt(OffsetDateTime startedAt) { + this.startedAt = startedAt; + return (A) this; + } + + public boolean hasStartedAt() { + return this.startedAt != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ContainerStateRunningFluent that = (V1ContainerStateRunningFluent) o; + if (!java.util.Objects.equals(startedAt, that.startedAt)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(startedAt, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (startedAt != null) { sb.append("startedAt:"); sb.append(startedAt); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningFluentImpl.java deleted file mode 100644 index 9996b4acbc..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateRunningFluentImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ContainerStateRunningFluentImpl> extends BaseFluent implements V1ContainerStateRunningFluent{ - public V1ContainerStateRunningFluentImpl() { - } - public V1ContainerStateRunningFluentImpl(V1ContainerStateRunning instance) { - if (instance != null) { - this.withStartedAt(instance.getStartedAt()); - } - } - private OffsetDateTime startedAt; - public OffsetDateTime getStartedAt() { - return this.startedAt; - } - public A withStartedAt(OffsetDateTime startedAt) { - this.startedAt=startedAt; return (A) this; - } - public Boolean hasStartedAt() { - return this.startedAt != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ContainerStateRunningFluentImpl that = (V1ContainerStateRunningFluentImpl) o; - if (!java.util.Objects.equals(startedAt, that.startedAt)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(startedAt, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (startedAt != null) { sb.append("startedAt:"); sb.append(startedAt); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedBuilder.java index 5556ca2604..6fbe9a76d2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedBuilder.java @@ -1,54 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ContainerStateTerminatedBuilder extends V1ContainerStateTerminatedFluentImpl implements VisitableBuilder{ +public class V1ContainerStateTerminatedBuilder extends V1ContainerStateTerminatedFluent implements VisitableBuilder{ public V1ContainerStateTerminatedBuilder() { - this(false); - } - public V1ContainerStateTerminatedBuilder(Boolean validationEnabled) { - this(new V1ContainerStateTerminated(), validationEnabled); + this(new V1ContainerStateTerminated()); } + public V1ContainerStateTerminatedBuilder(V1ContainerStateTerminatedFluent fluent) { - this(fluent, false); - } - public V1ContainerStateTerminatedBuilder(V1ContainerStateTerminatedFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ContainerStateTerminated(), validationEnabled); + this(fluent, new V1ContainerStateTerminated()); } + public V1ContainerStateTerminatedBuilder(V1ContainerStateTerminatedFluent fluent,V1ContainerStateTerminated instance) { - this(fluent, instance, false); - } - public V1ContainerStateTerminatedBuilder(V1ContainerStateTerminatedFluent fluent,V1ContainerStateTerminated instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withContainerID(instance.getContainerID()); - fluent.withExitCode(instance.getExitCode()); - fluent.withFinishedAt(instance.getFinishedAt()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withSignal(instance.getSignal()); - fluent.withStartedAt(instance.getStartedAt()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ContainerStateTerminatedBuilder(V1ContainerStateTerminated instance) { - this(instance,false); - } - public V1ContainerStateTerminatedBuilder(V1ContainerStateTerminated instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withContainerID(instance.getContainerID()); - this.withExitCode(instance.getExitCode()); - this.withFinishedAt(instance.getFinishedAt()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withSignal(instance.getSignal()); - this.withStartedAt(instance.getStartedAt()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ContainerStateTerminatedFluent fluent; - Boolean validationEnabled; + public V1ContainerStateTerminated build() { V1ContainerStateTerminated buildable = new V1ContainerStateTerminated(); buildable.setContainerID(fluent.getContainerID()); @@ -61,4 +33,5 @@ public V1ContainerStateTerminated build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedFluent.java index aada255f60..13748d0bf5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedFluent.java @@ -2,35 +2,166 @@ import java.lang.Integer; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ContainerStateTerminatedFluent> extends Fluent{ - public String getContainerID(); - public A withContainerID(String containerID); - public Boolean hasContainerID(); - public Integer getExitCode(); - public A withExitCode(Integer exitCode); - public Boolean hasExitCode(); - public OffsetDateTime getFinishedAt(); - public A withFinishedAt(OffsetDateTime finishedAt); - public Boolean hasFinishedAt(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public Integer getSignal(); - public A withSignal(Integer signal); - public Boolean hasSignal(); - public OffsetDateTime getStartedAt(); - public A withStartedAt(OffsetDateTime startedAt); - public Boolean hasStartedAt(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ContainerStateTerminatedFluent> extends BaseFluent{ + public V1ContainerStateTerminatedFluent() { + } + public V1ContainerStateTerminatedFluent(V1ContainerStateTerminated instance) { + this.copyInstance(instance); + } + private String containerID; + private Integer exitCode; + private OffsetDateTime finishedAt; + private String message; + private String reason; + private Integer signal; + private OffsetDateTime startedAt; + + protected void copyInstance(V1ContainerStateTerminated instance) { + instance = (instance != null ? instance : new V1ContainerStateTerminated()); + if (instance != null) { + this.withContainerID(instance.getContainerID()); + this.withExitCode(instance.getExitCode()); + this.withFinishedAt(instance.getFinishedAt()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withSignal(instance.getSignal()); + this.withStartedAt(instance.getStartedAt()); + } + } + + public String getContainerID() { + return this.containerID; + } + + public A withContainerID(String containerID) { + this.containerID = containerID; + return (A) this; + } + + public boolean hasContainerID() { + return this.containerID != null; + } + + public Integer getExitCode() { + return this.exitCode; + } + + public A withExitCode(Integer exitCode) { + this.exitCode = exitCode; + return (A) this; + } + + public boolean hasExitCode() { + return this.exitCode != null; + } + + public OffsetDateTime getFinishedAt() { + return this.finishedAt; + } + + public A withFinishedAt(OffsetDateTime finishedAt) { + this.finishedAt = finishedAt; + return (A) this; + } + + public boolean hasFinishedAt() { + return this.finishedAt != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public Integer getSignal() { + return this.signal; + } + + public A withSignal(Integer signal) { + this.signal = signal; + return (A) this; + } + + public boolean hasSignal() { + return this.signal != null; + } + + public OffsetDateTime getStartedAt() { + return this.startedAt; + } + + public A withStartedAt(OffsetDateTime startedAt) { + this.startedAt = startedAt; + return (A) this; + } + + public boolean hasStartedAt() { + return this.startedAt != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ContainerStateTerminatedFluent that = (V1ContainerStateTerminatedFluent) o; + if (!java.util.Objects.equals(containerID, that.containerID)) return false; + if (!java.util.Objects.equals(exitCode, that.exitCode)) return false; + if (!java.util.Objects.equals(finishedAt, that.finishedAt)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(signal, that.signal)) return false; + if (!java.util.Objects.equals(startedAt, that.startedAt)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(containerID, exitCode, finishedAt, message, reason, signal, startedAt, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (containerID != null) { sb.append("containerID:"); sb.append(containerID + ","); } + if (exitCode != null) { sb.append("exitCode:"); sb.append(exitCode + ","); } + if (finishedAt != null) { sb.append("finishedAt:"); sb.append(finishedAt + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (signal != null) { sb.append("signal:"); sb.append(signal + ","); } + if (startedAt != null) { sb.append("startedAt:"); sb.append(startedAt); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedFluentImpl.java deleted file mode 100644 index d2b781e58a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateTerminatedFluentImpl.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ContainerStateTerminatedFluentImpl> extends BaseFluent implements V1ContainerStateTerminatedFluent{ - public V1ContainerStateTerminatedFluentImpl() { - } - public V1ContainerStateTerminatedFluentImpl(V1ContainerStateTerminated instance) { - if (instance != null) { - this.withContainerID(instance.getContainerID()); - this.withExitCode(instance.getExitCode()); - this.withFinishedAt(instance.getFinishedAt()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withSignal(instance.getSignal()); - this.withStartedAt(instance.getStartedAt()); - } - } - private String containerID; - private Integer exitCode; - private OffsetDateTime finishedAt; - private String message; - private String reason; - private Integer signal; - private OffsetDateTime startedAt; - public String getContainerID() { - return this.containerID; - } - public A withContainerID(String containerID) { - this.containerID=containerID; return (A) this; - } - public Boolean hasContainerID() { - return this.containerID != null; - } - public Integer getExitCode() { - return this.exitCode; - } - public A withExitCode(Integer exitCode) { - this.exitCode=exitCode; return (A) this; - } - public Boolean hasExitCode() { - return this.exitCode != null; - } - public OffsetDateTime getFinishedAt() { - return this.finishedAt; - } - public A withFinishedAt(OffsetDateTime finishedAt) { - this.finishedAt=finishedAt; return (A) this; - } - public Boolean hasFinishedAt() { - return this.finishedAt != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public Integer getSignal() { - return this.signal; - } - public A withSignal(Integer signal) { - this.signal=signal; return (A) this; - } - public Boolean hasSignal() { - return this.signal != null; - } - public OffsetDateTime getStartedAt() { - return this.startedAt; - } - public A withStartedAt(OffsetDateTime startedAt) { - this.startedAt=startedAt; return (A) this; - } - public Boolean hasStartedAt() { - return this.startedAt != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ContainerStateTerminatedFluentImpl that = (V1ContainerStateTerminatedFluentImpl) o; - if (!java.util.Objects.equals(containerID, that.containerID)) return false; - - if (!java.util.Objects.equals(exitCode, that.exitCode)) return false; - - if (!java.util.Objects.equals(finishedAt, that.finishedAt)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(signal, that.signal)) return false; - - if (!java.util.Objects.equals(startedAt, that.startedAt)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(containerID, exitCode, finishedAt, message, reason, signal, startedAt, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (containerID != null) { sb.append("containerID:"); sb.append(containerID + ","); } - if (exitCode != null) { sb.append("exitCode:"); sb.append(exitCode + ","); } - if (finishedAt != null) { sb.append("finishedAt:"); sb.append(finishedAt + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (signal != null) { sb.append("signal:"); sb.append(signal + ","); } - if (startedAt != null) { sb.append("startedAt:"); sb.append(startedAt); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingBuilder.java index bcd7eb28a7..35092f661b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ContainerStateWaitingBuilder extends V1ContainerStateWaitingFluentImpl implements VisitableBuilder{ +public class V1ContainerStateWaitingBuilder extends V1ContainerStateWaitingFluent implements VisitableBuilder{ public V1ContainerStateWaitingBuilder() { - this(false); - } - public V1ContainerStateWaitingBuilder(Boolean validationEnabled) { - this(new V1ContainerStateWaiting(), validationEnabled); + this(new V1ContainerStateWaiting()); } + public V1ContainerStateWaitingBuilder(V1ContainerStateWaitingFluent fluent) { - this(fluent, false); - } - public V1ContainerStateWaitingBuilder(V1ContainerStateWaitingFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ContainerStateWaiting(), validationEnabled); + this(fluent, new V1ContainerStateWaiting()); } + public V1ContainerStateWaitingBuilder(V1ContainerStateWaitingFluent fluent,V1ContainerStateWaiting instance) { - this(fluent, instance, false); - } - public V1ContainerStateWaitingBuilder(V1ContainerStateWaitingFluent fluent,V1ContainerStateWaiting instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ContainerStateWaitingBuilder(V1ContainerStateWaiting instance) { - this(instance,false); - } - public V1ContainerStateWaitingBuilder(V1ContainerStateWaiting instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ContainerStateWaitingFluent fluent; - Boolean validationEnabled; + public V1ContainerStateWaiting build() { V1ContainerStateWaiting buildable = new V1ContainerStateWaiting(); buildable.setMessage(fluent.getMessage()); @@ -46,4 +28,5 @@ public V1ContainerStateWaiting build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingFluent.java index bde36e11df..83ae3604ab 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ContainerStateWaitingFluent> extends Fluent{ - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ContainerStateWaitingFluent> extends BaseFluent{ + public V1ContainerStateWaitingFluent() { + } + public V1ContainerStateWaitingFluent(V1ContainerStateWaiting instance) { + this.copyInstance(instance); + } + private String message; + private String reason; + + protected void copyInstance(V1ContainerStateWaiting instance) { + instance = (instance != null ? instance : new V1ContainerStateWaiting()); + if (instance != null) { + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + } + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ContainerStateWaitingFluent that = (V1ContainerStateWaitingFluent) o; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(message, reason, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingFluentImpl.java deleted file mode 100644 index 5345adcd66..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStateWaitingFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ContainerStateWaitingFluentImpl> extends BaseFluent implements V1ContainerStateWaitingFluent{ - public V1ContainerStateWaitingFluentImpl() { - } - public V1ContainerStateWaitingFluentImpl(V1ContainerStateWaiting instance) { - if (instance != null) { - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - } - } - private String message; - private String reason; - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ContainerStateWaitingFluentImpl that = (V1ContainerStateWaitingFluentImpl) o; - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(message, reason, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusBuilder.java index 487dad71e3..2443c60dc5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusBuilder.java @@ -1,76 +1,41 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ContainerStatusBuilder extends V1ContainerStatusFluentImpl implements VisitableBuilder{ +public class V1ContainerStatusBuilder extends V1ContainerStatusFluent implements VisitableBuilder{ public V1ContainerStatusBuilder() { - this(false); - } - public V1ContainerStatusBuilder(Boolean validationEnabled) { - this(new V1ContainerStatus(), validationEnabled); + this(new V1ContainerStatus()); } + public V1ContainerStatusBuilder(V1ContainerStatusFluent fluent) { - this(fluent, false); - } - public V1ContainerStatusBuilder(V1ContainerStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ContainerStatus(), validationEnabled); + this(fluent, new V1ContainerStatus()); } + public V1ContainerStatusBuilder(V1ContainerStatusFluent fluent,V1ContainerStatus instance) { - this(fluent, instance, false); - } - public V1ContainerStatusBuilder(V1ContainerStatusFluent fluent,V1ContainerStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAllocatedResources(instance.getAllocatedResources()); - fluent.withContainerID(instance.getContainerID()); - fluent.withImage(instance.getImage()); - fluent.withImageID(instance.getImageID()); - fluent.withLastState(instance.getLastState()); - fluent.withName(instance.getName()); - fluent.withReady(instance.getReady()); - fluent.withResources(instance.getResources()); - fluent.withRestartCount(instance.getRestartCount()); - fluent.withStarted(instance.getStarted()); - fluent.withState(instance.getState()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ContainerStatusBuilder(V1ContainerStatus instance) { - this(instance,false); - } - public V1ContainerStatusBuilder(V1ContainerStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAllocatedResources(instance.getAllocatedResources()); - this.withContainerID(instance.getContainerID()); - this.withImage(instance.getImage()); - this.withImageID(instance.getImageID()); - this.withLastState(instance.getLastState()); - this.withName(instance.getName()); - this.withReady(instance.getReady()); - this.withResources(instance.getResources()); - this.withRestartCount(instance.getRestartCount()); - this.withStarted(instance.getStarted()); - this.withState(instance.getState()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ContainerStatusFluent fluent; - Boolean validationEnabled; + public V1ContainerStatus build() { V1ContainerStatus buildable = new V1ContainerStatus(); buildable.setAllocatedResources(fluent.getAllocatedResources()); buildable.setContainerID(fluent.getContainerID()); buildable.setImage(fluent.getImage()); buildable.setImageID(fluent.getImageID()); - buildable.setLastState(fluent.getLastState()); + buildable.setLastState(fluent.buildLastState()); buildable.setName(fluent.getName()); buildable.setReady(fluent.getReady()); - buildable.setResources(fluent.getResources()); + buildable.setResources(fluent.buildResources()); buildable.setRestartCount(fluent.getRestartCount()); buildable.setStarted(fluent.getStarted()); - buildable.setState(fluent.getState()); + buildable.setState(fluent.buildState()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusFluent.java index 892afa3aef..e5ff1ef278 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusFluent.java @@ -1,109 +1,399 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import io.kubernetes.client.custom.Quantity; import java.lang.String; import java.util.LinkedHashMap; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1ContainerStatusFluent> extends Fluent{ - public A addToAllocatedResources(String key,Quantity value); - public A addToAllocatedResources(Map map); - public A removeFromAllocatedResources(String key); - public A removeFromAllocatedResources(Map map); - public Map getAllocatedResources(); - public A withAllocatedResources(Map allocatedResources); - public Boolean hasAllocatedResources(); - public String getContainerID(); - public A withContainerID(String containerID); - public Boolean hasContainerID(); - public String getImage(); - public A withImage(String image); - public Boolean hasImage(); - public String getImageID(); - public A withImageID(String imageID); - public Boolean hasImageID(); - - /** - * This method has been deprecated, please use method buildLastState instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerState getLastState(); - public V1ContainerState buildLastState(); - public A withLastState(V1ContainerState lastState); - public Boolean hasLastState(); - public V1ContainerStatusFluent.LastStateNested withNewLastState(); - public V1ContainerStatusFluent.LastStateNested withNewLastStateLike(V1ContainerState item); - public V1ContainerStatusFluent.LastStateNested editLastState(); - public V1ContainerStatusFluent.LastStateNested editOrNewLastState(); - public V1ContainerStatusFluent.LastStateNested editOrNewLastStateLike(V1ContainerState item); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getReady(); - public A withReady(Boolean ready); - public Boolean hasReady(); - - /** - * This method has been deprecated, please use method buildResources instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceRequirements getResources(); - public V1ResourceRequirements buildResources(); - public A withResources(V1ResourceRequirements resources); - public Boolean hasResources(); - public V1ContainerStatusFluent.ResourcesNested withNewResources(); - public V1ContainerStatusFluent.ResourcesNested withNewResourcesLike(V1ResourceRequirements item); - public V1ContainerStatusFluent.ResourcesNested editResources(); - public V1ContainerStatusFluent.ResourcesNested editOrNewResources(); - public V1ContainerStatusFluent.ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item); - public Integer getRestartCount(); - public A withRestartCount(Integer restartCount); - public Boolean hasRestartCount(); - public Boolean getStarted(); - public A withStarted(Boolean started); - public Boolean hasStarted(); - - /** - * This method has been deprecated, please use method buildState instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerState getState(); - public V1ContainerState buildState(); - public A withState(V1ContainerState state); - public Boolean hasState(); - public V1ContainerStatusFluent.StateNested withNewState(); - public V1ContainerStatusFluent.StateNested withNewStateLike(V1ContainerState item); - public V1ContainerStatusFluent.StateNested editState(); - public V1ContainerStatusFluent.StateNested editOrNewState(); - public V1ContainerStatusFluent.StateNested editOrNewStateLike(V1ContainerState item); - public A withReady(); - public A withStarted(); - public interface LastStateNested extends Nested,V1ContainerStateFluent>{ - public N and(); - public N endLastState(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ContainerStatusFluent> extends BaseFluent{ + public V1ContainerStatusFluent() { + } + + public V1ContainerStatusFluent(V1ContainerStatus instance) { + this.copyInstance(instance); + } + private Map allocatedResources; + private String containerID; + private String image; + private String imageID; + private V1ContainerStateBuilder lastState; + private String name; + private Boolean ready; + private V1ResourceRequirementsBuilder resources; + private Integer restartCount; + private Boolean started; + private V1ContainerStateBuilder state; + + protected void copyInstance(V1ContainerStatus instance) { + instance = (instance != null ? instance : new V1ContainerStatus()); + if (instance != null) { + this.withAllocatedResources(instance.getAllocatedResources()); + this.withContainerID(instance.getContainerID()); + this.withImage(instance.getImage()); + this.withImageID(instance.getImageID()); + this.withLastState(instance.getLastState()); + this.withName(instance.getName()); + this.withReady(instance.getReady()); + this.withResources(instance.getResources()); + this.withRestartCount(instance.getRestartCount()); + this.withStarted(instance.getStarted()); + this.withState(instance.getState()); + } + } + + public A addToAllocatedResources(String key,Quantity value) { + if(this.allocatedResources == null && key != null && value != null) { this.allocatedResources = new LinkedHashMap(); } + if(key != null && value != null) {this.allocatedResources.put(key, value);} return (A)this; + } + + public A addToAllocatedResources(Map map) { + if(this.allocatedResources == null && map != null) { this.allocatedResources = new LinkedHashMap(); } + if(map != null) { this.allocatedResources.putAll(map);} return (A)this; + } + + public A removeFromAllocatedResources(String key) { + if(this.allocatedResources == null) { return (A) this; } + if(key != null && this.allocatedResources != null) {this.allocatedResources.remove(key);} return (A)this; + } + + public A removeFromAllocatedResources(Map map) { + if(this.allocatedResources == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.allocatedResources != null){this.allocatedResources.remove(key);}}} return (A)this; + } + + public Map getAllocatedResources() { + return this.allocatedResources; + } + + public A withAllocatedResources(Map allocatedResources) { + if (allocatedResources == null) { + this.allocatedResources = null; + } else { + this.allocatedResources = new LinkedHashMap(allocatedResources); + } + return (A) this; + } + + public boolean hasAllocatedResources() { + return this.allocatedResources != null; + } + + public String getContainerID() { + return this.containerID; + } + + public A withContainerID(String containerID) { + this.containerID = containerID; + return (A) this; + } + + public boolean hasContainerID() { + return this.containerID != null; + } + + public String getImage() { + return this.image; + } + + public A withImage(String image) { + this.image = image; + return (A) this; + } + + public boolean hasImage() { + return this.image != null; + } + + public String getImageID() { + return this.imageID; + } + + public A withImageID(String imageID) { + this.imageID = imageID; + return (A) this; + } + + public boolean hasImageID() { + return this.imageID != null; + } + + public V1ContainerState buildLastState() { + return this.lastState != null ? this.lastState.build() : null; + } + + public A withLastState(V1ContainerState lastState) { + this._visitables.remove("lastState"); + if (lastState != null) { + this.lastState = new V1ContainerStateBuilder(lastState); + this._visitables.get("lastState").add(this.lastState); + } else { + this.lastState = null; + this._visitables.get("lastState").remove(this.lastState); + } + return (A) this; + } + + public boolean hasLastState() { + return this.lastState != null; + } + + public LastStateNested withNewLastState() { + return new LastStateNested(null); + } + + public LastStateNested withNewLastStateLike(V1ContainerState item) { + return new LastStateNested(item); + } + + public LastStateNested editLastState() { + return withNewLastStateLike(java.util.Optional.ofNullable(buildLastState()).orElse(null)); + } + + public LastStateNested editOrNewLastState() { + return withNewLastStateLike(java.util.Optional.ofNullable(buildLastState()).orElse(new V1ContainerStateBuilder().build())); + } + + public LastStateNested editOrNewLastStateLike(V1ContainerState item) { + return withNewLastStateLike(java.util.Optional.ofNullable(buildLastState()).orElse(item)); + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Boolean getReady() { + return this.ready; + } + + public A withReady(Boolean ready) { + this.ready = ready; + return (A) this; + } + + public boolean hasReady() { + return this.ready != null; } - public interface ResourcesNested extends Nested,V1ResourceRequirementsFluent>{ - public N and(); - public N endResources(); + + public V1ResourceRequirements buildResources() { + return this.resources != null ? this.resources.build() : null; + } + + public A withResources(V1ResourceRequirements resources) { + this._visitables.remove("resources"); + if (resources != null) { + this.resources = new V1ResourceRequirementsBuilder(resources); + this._visitables.get("resources").add(this.resources); + } else { + this.resources = null; + this._visitables.get("resources").remove(this.resources); + } + return (A) this; + } + + public boolean hasResources() { + return this.resources != null; + } + + public ResourcesNested withNewResources() { + return new ResourcesNested(null); + } + + public ResourcesNested withNewResourcesLike(V1ResourceRequirements item) { + return new ResourcesNested(item); + } + + public ResourcesNested editResources() { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(null)); + } + + public ResourcesNested editOrNewResources() { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(new V1ResourceRequirementsBuilder().build())); + } + + public ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item) { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(item)); + } + + public Integer getRestartCount() { + return this.restartCount; + } + + public A withRestartCount(Integer restartCount) { + this.restartCount = restartCount; + return (A) this; + } + + public boolean hasRestartCount() { + return this.restartCount != null; + } + + public Boolean getStarted() { + return this.started; + } + + public A withStarted(Boolean started) { + this.started = started; + return (A) this; + } + + public boolean hasStarted() { + return this.started != null; + } + + public V1ContainerState buildState() { + return this.state != null ? this.state.build() : null; + } + + public A withState(V1ContainerState state) { + this._visitables.remove("state"); + if (state != null) { + this.state = new V1ContainerStateBuilder(state); + this._visitables.get("state").add(this.state); + } else { + this.state = null; + this._visitables.get("state").remove(this.state); + } + return (A) this; + } + + public boolean hasState() { + return this.state != null; + } + + public StateNested withNewState() { + return new StateNested(null); + } + + public StateNested withNewStateLike(V1ContainerState item) { + return new StateNested(item); + } + + public StateNested editState() { + return withNewStateLike(java.util.Optional.ofNullable(buildState()).orElse(null)); + } + + public StateNested editOrNewState() { + return withNewStateLike(java.util.Optional.ofNullable(buildState()).orElse(new V1ContainerStateBuilder().build())); + } + + public StateNested editOrNewStateLike(V1ContainerState item) { + return withNewStateLike(java.util.Optional.ofNullable(buildState()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ContainerStatusFluent that = (V1ContainerStatusFluent) o; + if (!java.util.Objects.equals(allocatedResources, that.allocatedResources)) return false; + if (!java.util.Objects.equals(containerID, that.containerID)) return false; + if (!java.util.Objects.equals(image, that.image)) return false; + if (!java.util.Objects.equals(imageID, that.imageID)) return false; + if (!java.util.Objects.equals(lastState, that.lastState)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(ready, that.ready)) return false; + if (!java.util.Objects.equals(resources, that.resources)) return false; + if (!java.util.Objects.equals(restartCount, that.restartCount)) return false; + if (!java.util.Objects.equals(started, that.started)) return false; + if (!java.util.Objects.equals(state, that.state)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(allocatedResources, containerID, image, imageID, lastState, name, ready, resources, restartCount, started, state, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (allocatedResources != null && !allocatedResources.isEmpty()) { sb.append("allocatedResources:"); sb.append(allocatedResources + ","); } + if (containerID != null) { sb.append("containerID:"); sb.append(containerID + ","); } + if (image != null) { sb.append("image:"); sb.append(image + ","); } + if (imageID != null) { sb.append("imageID:"); sb.append(imageID + ","); } + if (lastState != null) { sb.append("lastState:"); sb.append(lastState + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (ready != null) { sb.append("ready:"); sb.append(ready + ","); } + if (resources != null) { sb.append("resources:"); sb.append(resources + ","); } + if (restartCount != null) { sb.append("restartCount:"); sb.append(restartCount + ","); } + if (started != null) { sb.append("started:"); sb.append(started + ","); } + if (state != null) { sb.append("state:"); sb.append(state); } + sb.append("}"); + return sb.toString(); + } + + public A withReady() { + return withReady(true); + } + + public A withStarted() { + return withStarted(true); + } + public class LastStateNested extends V1ContainerStateFluent> implements Nested{ + LastStateNested(V1ContainerState item) { + this.builder = new V1ContainerStateBuilder(this, item); + } + V1ContainerStateBuilder builder; + + public N and() { + return (N) V1ContainerStatusFluent.this.withLastState(builder.build()); + } + public N endLastState() { + return and(); + } + + } - public interface StateNested extends Nested,V1ContainerStateFluent>{ - public N and(); - public N endState(); + public class ResourcesNested extends V1ResourceRequirementsFluent> implements Nested{ + ResourcesNested(V1ResourceRequirements item) { + this.builder = new V1ResourceRequirementsBuilder(this, item); + } + V1ResourceRequirementsBuilder builder; + public N and() { + return (N) V1ContainerStatusFluent.this.withResources(builder.build()); + } + + public N endResources() { + return and(); + } + + } + public class StateNested extends V1ContainerStateFluent> implements Nested{ + StateNested(V1ContainerState item) { + this.builder = new V1ContainerStateBuilder(this, item); + } + V1ContainerStateBuilder builder; + + public N and() { + return (N) V1ContainerStatusFluent.this.withState(builder.build()); + } + + public N endState() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusFluentImpl.java deleted file mode 100644 index 27c6b4bc92..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ContainerStatusFluentImpl.java +++ /dev/null @@ -1,342 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.util.LinkedHashMap; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import io.kubernetes.client.custom.Quantity; -import java.lang.Integer; -import java.lang.Object; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ContainerStatusFluentImpl> extends BaseFluent implements V1ContainerStatusFluent{ - public V1ContainerStatusFluentImpl() { - } - public V1ContainerStatusFluentImpl(V1ContainerStatus instance) { - if (instance != null) { - this.withAllocatedResources(instance.getAllocatedResources()); - this.withContainerID(instance.getContainerID()); - this.withImage(instance.getImage()); - this.withImageID(instance.getImageID()); - this.withLastState(instance.getLastState()); - this.withName(instance.getName()); - this.withReady(instance.getReady()); - this.withResources(instance.getResources()); - this.withRestartCount(instance.getRestartCount()); - this.withStarted(instance.getStarted()); - this.withState(instance.getState()); - } - } - private Map allocatedResources; - private String containerID; - private String image; - private String imageID; - private V1ContainerStateBuilder lastState; - private String name; - private Boolean ready; - private V1ResourceRequirementsBuilder resources; - private Integer restartCount; - private Boolean started; - private V1ContainerStateBuilder state; - public A addToAllocatedResources(String key,Quantity value) { - if(this.allocatedResources == null && key != null && value != null) { this.allocatedResources = new LinkedHashMap(); } - if(key != null && value != null) {this.allocatedResources.put(key, value);} return (A)this; - } - public A addToAllocatedResources(Map map) { - if(this.allocatedResources == null && map != null) { this.allocatedResources = new LinkedHashMap(); } - if(map != null) { this.allocatedResources.putAll(map);} return (A)this; - } - public A removeFromAllocatedResources(String key) { - if(this.allocatedResources == null) { return (A) this; } - if(key != null && this.allocatedResources != null) {this.allocatedResources.remove(key);} return (A)this; - } - public A removeFromAllocatedResources(Map map) { - if(this.allocatedResources == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.allocatedResources != null){this.allocatedResources.remove(key);}}} return (A)this; - } - public Map getAllocatedResources() { - return this.allocatedResources; - } - public A withAllocatedResources(Map allocatedResources) { - if (allocatedResources == null) { this.allocatedResources = null;} else {this.allocatedResources = new LinkedHashMap(allocatedResources);} return (A) this; - } - public Boolean hasAllocatedResources() { - return this.allocatedResources != null; - } - public String getContainerID() { - return this.containerID; - } - public A withContainerID(String containerID) { - this.containerID=containerID; return (A) this; - } - public Boolean hasContainerID() { - return this.containerID != null; - } - public String getImage() { - return this.image; - } - public A withImage(String image) { - this.image=image; return (A) this; - } - public Boolean hasImage() { - return this.image != null; - } - public String getImageID() { - return this.imageID; - } - public A withImageID(String imageID) { - this.imageID=imageID; return (A) this; - } - public Boolean hasImageID() { - return this.imageID != null; - } - - /** - * This method has been deprecated, please use method buildLastState instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerState getLastState() { - return this.lastState!=null ?this.lastState.build():null; - } - public V1ContainerState buildLastState() { - return this.lastState!=null ?this.lastState.build():null; - } - public A withLastState(V1ContainerState lastState) { - _visitables.get("lastState").remove(this.lastState); - if (lastState!=null){ this.lastState= new V1ContainerStateBuilder(lastState); _visitables.get("lastState").add(this.lastState);} else { this.lastState = null; _visitables.get("lastState").remove(this.lastState); } return (A) this; - } - public Boolean hasLastState() { - return this.lastState != null; - } - public V1ContainerStatusFluentImpl.LastStateNested withNewLastState() { - return new V1ContainerStatusFluentImpl.LastStateNestedImpl(); - } - public V1ContainerStatusFluentImpl.LastStateNested withNewLastStateLike(V1ContainerState item) { - return new V1ContainerStatusFluentImpl.LastStateNestedImpl(item); - } - public V1ContainerStatusFluentImpl.LastStateNested editLastState() { - return withNewLastStateLike(getLastState()); - } - public V1ContainerStatusFluentImpl.LastStateNested editOrNewLastState() { - return withNewLastStateLike(getLastState() != null ? getLastState(): new V1ContainerStateBuilder().build()); - } - public V1ContainerStatusFluentImpl.LastStateNested editOrNewLastStateLike(V1ContainerState item) { - return withNewLastStateLike(getLastState() != null ? getLastState(): item); - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Boolean getReady() { - return this.ready; - } - public A withReady(Boolean ready) { - this.ready=ready; return (A) this; - } - public Boolean hasReady() { - return this.ready != null; - } - - /** - * This method has been deprecated, please use method buildResources instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceRequirements getResources() { - return this.resources!=null ?this.resources.build():null; - } - public V1ResourceRequirements buildResources() { - return this.resources!=null ?this.resources.build():null; - } - public A withResources(V1ResourceRequirements resources) { - _visitables.get("resources").remove(this.resources); - if (resources!=null){ this.resources= new V1ResourceRequirementsBuilder(resources); _visitables.get("resources").add(this.resources);} else { this.resources = null; _visitables.get("resources").remove(this.resources); } return (A) this; - } - public Boolean hasResources() { - return this.resources != null; - } - public V1ContainerStatusFluentImpl.ResourcesNested withNewResources() { - return new V1ContainerStatusFluentImpl.ResourcesNestedImpl(); - } - public V1ContainerStatusFluentImpl.ResourcesNested withNewResourcesLike(V1ResourceRequirements item) { - return new V1ContainerStatusFluentImpl.ResourcesNestedImpl(item); - } - public V1ContainerStatusFluentImpl.ResourcesNested editResources() { - return withNewResourcesLike(getResources()); - } - public V1ContainerStatusFluentImpl.ResourcesNested editOrNewResources() { - return withNewResourcesLike(getResources() != null ? getResources(): new V1ResourceRequirementsBuilder().build()); - } - public V1ContainerStatusFluentImpl.ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item) { - return withNewResourcesLike(getResources() != null ? getResources(): item); - } - public Integer getRestartCount() { - return this.restartCount; - } - public A withRestartCount(Integer restartCount) { - this.restartCount=restartCount; return (A) this; - } - public Boolean hasRestartCount() { - return this.restartCount != null; - } - public Boolean getStarted() { - return this.started; - } - public A withStarted(Boolean started) { - this.started=started; return (A) this; - } - public Boolean hasStarted() { - return this.started != null; - } - - /** - * This method has been deprecated, please use method buildState instead. - * @return The buildable object. - */ - @Deprecated - public V1ContainerState getState() { - return this.state!=null ?this.state.build():null; - } - public V1ContainerState buildState() { - return this.state!=null ?this.state.build():null; - } - public A withState(V1ContainerState state) { - _visitables.get("state").remove(this.state); - if (state!=null){ this.state= new V1ContainerStateBuilder(state); _visitables.get("state").add(this.state);} else { this.state = null; _visitables.get("state").remove(this.state); } return (A) this; - } - public Boolean hasState() { - return this.state != null; - } - public V1ContainerStatusFluentImpl.StateNested withNewState() { - return new V1ContainerStatusFluentImpl.StateNestedImpl(); - } - public V1ContainerStatusFluentImpl.StateNested withNewStateLike(V1ContainerState item) { - return new V1ContainerStatusFluentImpl.StateNestedImpl(item); - } - public V1ContainerStatusFluentImpl.StateNested editState() { - return withNewStateLike(getState()); - } - public V1ContainerStatusFluentImpl.StateNested editOrNewState() { - return withNewStateLike(getState() != null ? getState(): new V1ContainerStateBuilder().build()); - } - public V1ContainerStatusFluentImpl.StateNested editOrNewStateLike(V1ContainerState item) { - return withNewStateLike(getState() != null ? getState(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ContainerStatusFluentImpl that = (V1ContainerStatusFluentImpl) o; - if (!java.util.Objects.equals(allocatedResources, that.allocatedResources)) return false; - - if (!java.util.Objects.equals(containerID, that.containerID)) return false; - - if (!java.util.Objects.equals(image, that.image)) return false; - - if (!java.util.Objects.equals(imageID, that.imageID)) return false; - - if (!java.util.Objects.equals(lastState, that.lastState)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(ready, that.ready)) return false; - - if (!java.util.Objects.equals(resources, that.resources)) return false; - - if (!java.util.Objects.equals(restartCount, that.restartCount)) return false; - - if (!java.util.Objects.equals(started, that.started)) return false; - - if (!java.util.Objects.equals(state, that.state)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(allocatedResources, containerID, image, imageID, lastState, name, ready, resources, restartCount, started, state, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (allocatedResources != null && !allocatedResources.isEmpty()) { sb.append("allocatedResources:"); sb.append(allocatedResources + ","); } - if (containerID != null) { sb.append("containerID:"); sb.append(containerID + ","); } - if (image != null) { sb.append("image:"); sb.append(image + ","); } - if (imageID != null) { sb.append("imageID:"); sb.append(imageID + ","); } - if (lastState != null) { sb.append("lastState:"); sb.append(lastState + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (ready != null) { sb.append("ready:"); sb.append(ready + ","); } - if (resources != null) { sb.append("resources:"); sb.append(resources + ","); } - if (restartCount != null) { sb.append("restartCount:"); sb.append(restartCount + ","); } - if (started != null) { sb.append("started:"); sb.append(started + ","); } - if (state != null) { sb.append("state:"); sb.append(state); } - sb.append("}"); - return sb.toString(); - } - public A withReady() { - return withReady(true); - } - public A withStarted() { - return withStarted(true); - } - class LastStateNestedImpl extends V1ContainerStateFluentImpl> implements V1ContainerStatusFluentImpl.LastStateNested,Nested{ - LastStateNestedImpl(V1ContainerState item) { - this.builder = new V1ContainerStateBuilder(this, item); - } - LastStateNestedImpl() { - this.builder = new V1ContainerStateBuilder(this); - } - V1ContainerStateBuilder builder; - public N and() { - return (N) V1ContainerStatusFluentImpl.this.withLastState(builder.build()); - } - public N endLastState() { - return and(); - } - - } - class ResourcesNestedImpl extends V1ResourceRequirementsFluentImpl> implements V1ContainerStatusFluentImpl.ResourcesNested,Nested{ - ResourcesNestedImpl(V1ResourceRequirements item) { - this.builder = new V1ResourceRequirementsBuilder(this, item); - } - ResourcesNestedImpl() { - this.builder = new V1ResourceRequirementsBuilder(this); - } - V1ResourceRequirementsBuilder builder; - public N and() { - return (N) V1ContainerStatusFluentImpl.this.withResources(builder.build()); - } - public N endResources() { - return and(); - } - - } - class StateNestedImpl extends V1ContainerStateFluentImpl> implements V1ContainerStatusFluentImpl.StateNested,Nested{ - StateNestedImpl(V1ContainerState item) { - this.builder = new V1ContainerStateBuilder(this, item); - } - StateNestedImpl() { - this.builder = new V1ContainerStateBuilder(this); - } - V1ContainerStateBuilder builder; - public N and() { - return (N) V1ContainerStatusFluentImpl.this.withState(builder.build()); - } - public N endState() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionBuilder.java index ad35b7699f..4cecd514e4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ControllerRevisionBuilder extends V1ControllerRevisionFluentImpl implements VisitableBuilder{ +public class V1ControllerRevisionBuilder extends V1ControllerRevisionFluent implements VisitableBuilder{ public V1ControllerRevisionBuilder() { - this(false); - } - public V1ControllerRevisionBuilder(Boolean validationEnabled) { - this(new V1ControllerRevision(), validationEnabled); + this(new V1ControllerRevision()); } + public V1ControllerRevisionBuilder(V1ControllerRevisionFluent fluent) { - this(fluent, false); - } - public V1ControllerRevisionBuilder(V1ControllerRevisionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ControllerRevision(), validationEnabled); + this(fluent, new V1ControllerRevision()); } + public V1ControllerRevisionBuilder(V1ControllerRevisionFluent fluent,V1ControllerRevision instance) { - this(fluent, instance, false); - } - public V1ControllerRevisionBuilder(V1ControllerRevisionFluent fluent,V1ControllerRevision instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withData(instance.getData()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withRevision(instance.getRevision()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ControllerRevisionBuilder(V1ControllerRevision instance) { - this(instance,false); - } - public V1ControllerRevisionBuilder(V1ControllerRevision instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withData(instance.getData()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRevision(instance.getRevision()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ControllerRevisionFluent fluent; - Boolean validationEnabled; + public V1ControllerRevision build() { V1ControllerRevision buildable = new V1ControllerRevision(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setData(fluent.getData()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); buildable.setRevision(fluent.getRevision()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionFluent.java index b5d6b1358e..217789a3ee 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionFluent.java @@ -1,49 +1,175 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ControllerRevisionFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public Object getData(); - public A withData(Object data); - public Boolean hasData(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ControllerRevisionFluent.MetadataNested withNewMetadata(); - public V1ControllerRevisionFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ControllerRevisionFluent.MetadataNested editMetadata(); - public V1ControllerRevisionFluent.MetadataNested editOrNewMetadata(); - public V1ControllerRevisionFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public Long getRevision(); - public A withRevision(Long revision); - public Boolean hasRevision(); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ControllerRevisionFluent> extends BaseFluent{ + public V1ControllerRevisionFluent() { + } + + public V1ControllerRevisionFluent(V1ControllerRevision instance) { + this.copyInstance(instance); + } + private String apiVersion; + private Object data; + private String kind; + private V1ObjectMetaBuilder metadata; + private Long revision; + + protected void copyInstance(V1ControllerRevision instance) { + instance = (instance != null ? instance : new V1ControllerRevision()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withData(instance.getData()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withRevision(instance.getRevision()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public Object getData() { + return this.data; + } + + public A withData(Object data) { + this.data = data; + return (A) this; + } + + public boolean hasData() { + return this.data != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; } + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public Long getRevision() { + return this.revision; + } + + public A withRevision(Long revision) { + this.revision = revision; + return (A) this; + } + + public boolean hasRevision() { + return this.revision != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ControllerRevisionFluent that = (V1ControllerRevisionFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(data, that.data)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(revision, that.revision)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, data, kind, metadata, revision, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (data != null) { sb.append("data:"); sb.append(data + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (revision != null) { sb.append("revision:"); sb.append(revision); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ControllerRevisionFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionFluentImpl.java deleted file mode 100644 index 1638ed185a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionFluentImpl.java +++ /dev/null @@ -1,151 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ControllerRevisionFluentImpl> extends BaseFluent implements V1ControllerRevisionFluent{ - public V1ControllerRevisionFluentImpl() { - } - public V1ControllerRevisionFluentImpl(V1ControllerRevision instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withData(instance.getData()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRevision(instance.getRevision()); - } - } - private String apiVersion; - private Object data; - private String kind; - private V1ObjectMetaBuilder metadata; - private Long revision; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public Object getData() { - return this.data; - } - public A withData(Object data) { - this.data=data; return (A) this; - } - public Boolean hasData() { - return this.data != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ControllerRevisionFluentImpl.MetadataNested withNewMetadata() { - return new V1ControllerRevisionFluentImpl.MetadataNestedImpl(); - } - public V1ControllerRevisionFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ControllerRevisionFluentImpl.MetadataNestedImpl(item); - } - public V1ControllerRevisionFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ControllerRevisionFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ControllerRevisionFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public Long getRevision() { - return this.revision; - } - public A withRevision(Long revision) { - this.revision=revision; return (A) this; - } - public Boolean hasRevision() { - return this.revision != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ControllerRevisionFluentImpl that = (V1ControllerRevisionFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(data, that.data)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(revision, that.revision)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, data, kind, metadata, revision, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (data != null) { sb.append("data:"); sb.append(data + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (revision != null) { sb.append("revision:"); sb.append(revision); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ControllerRevisionFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ControllerRevisionFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListBuilder.java index cbb5922371..6d8fbc6ad8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ControllerRevisionListBuilder extends V1ControllerRevisionListFluentImpl implements VisitableBuilder{ +public class V1ControllerRevisionListBuilder extends V1ControllerRevisionListFluent implements VisitableBuilder{ public V1ControllerRevisionListBuilder() { - this(false); - } - public V1ControllerRevisionListBuilder(Boolean validationEnabled) { - this(new V1ControllerRevisionList(), validationEnabled); + this(new V1ControllerRevisionList()); } + public V1ControllerRevisionListBuilder(V1ControllerRevisionListFluent fluent) { - this(fluent, false); - } - public V1ControllerRevisionListBuilder(V1ControllerRevisionListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ControllerRevisionList(), validationEnabled); + this(fluent, new V1ControllerRevisionList()); } + public V1ControllerRevisionListBuilder(V1ControllerRevisionListFluent fluent,V1ControllerRevisionList instance) { - this(fluent, instance, false); - } - public V1ControllerRevisionListBuilder(V1ControllerRevisionListFluent fluent,V1ControllerRevisionList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ControllerRevisionListBuilder(V1ControllerRevisionList instance) { - this(instance,false); - } - public V1ControllerRevisionListBuilder(V1ControllerRevisionList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ControllerRevisionListFluent fluent; - Boolean validationEnabled; + public V1ControllerRevisionList build() { V1ControllerRevisionList buildable = new V1ControllerRevisionList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListFluent.java index e088483861..b36e63d7af 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ControllerRevisionListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ControllerRevision item); - public A setToItems(int index,V1ControllerRevision item); - public A addToItems(io.kubernetes.client.openapi.models.V1ControllerRevision... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ControllerRevision... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ControllerRevision buildItem(int index); - public V1ControllerRevision buildFirstItem(); - public V1ControllerRevision buildLastItem(); - public V1ControllerRevision buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ControllerRevision... items); - public Boolean hasItems(); - public V1ControllerRevisionListFluent.ItemsNested addNewItem(); - public V1ControllerRevisionListFluent.ItemsNested addNewItemLike(V1ControllerRevision item); - public V1ControllerRevisionListFluent.ItemsNested setNewItemLike(int index,V1ControllerRevision item); - public V1ControllerRevisionListFluent.ItemsNested editItem(int index); - public V1ControllerRevisionListFluent.ItemsNested editFirstItem(); - public V1ControllerRevisionListFluent.ItemsNested editLastItem(); - public V1ControllerRevisionListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ControllerRevisionListFluent.MetadataNested withNewMetadata(); - public V1ControllerRevisionListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ControllerRevisionListFluent.MetadataNested editMetadata(); - public V1ControllerRevisionListFluent.MetadataNested editOrNewMetadata(); - public V1ControllerRevisionListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ControllerRevisionFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ControllerRevisionListFluent> extends BaseFluent{ + public V1ControllerRevisionListFluent() { + } + + public V1ControllerRevisionListFluent(V1ControllerRevisionList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ControllerRevisionList instance) { + instance = (instance != null ? instance : new V1ControllerRevisionList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ControllerRevision item) { + if (this.items == null) {this.items = new ArrayList();} + V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ControllerRevision item) { + if (this.items == null) {this.items = new ArrayList();} + V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ControllerRevision... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ControllerRevision item : items) {V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ControllerRevision item : items) {V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ControllerRevision... items) { + if (this.items == null) return (A)this; + for (V1ControllerRevision item : items) {V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ControllerRevision item : items) {V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ControllerRevisionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ControllerRevision buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ControllerRevision buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ControllerRevision buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ControllerRevision buildMatchingItem(Predicate predicate) { + for (V1ControllerRevisionBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ControllerRevisionBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ControllerRevision item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ControllerRevision... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ControllerRevision item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ControllerRevision item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ControllerRevision item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ControllerRevisionListFluent that = (V1ControllerRevisionListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ControllerRevisionFluent> implements Nested{ + ItemsNested(int index,V1ControllerRevision item) { + this.index = index; + this.builder = new V1ControllerRevisionBuilder(this, item); + } + V1ControllerRevisionBuilder builder; + int index; + public N and() { + return (N) V1ControllerRevisionListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ControllerRevisionListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListFluentImpl.java deleted file mode 100644 index 20dd46263a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ControllerRevisionListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ControllerRevisionListFluentImpl> extends BaseFluent implements V1ControllerRevisionListFluent{ - public V1ControllerRevisionListFluentImpl() { - } - public V1ControllerRevisionListFluentImpl(V1ControllerRevisionList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ControllerRevision item) { - if (this.items == null) {this.items = new ArrayList();} - V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ControllerRevision item) { - if (this.items == null) {this.items = new ArrayList();} - V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ControllerRevision... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ControllerRevision item : items) {V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ControllerRevision item : items) {V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ControllerRevision... items) { - for (V1ControllerRevision item : items) {V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ControllerRevision item : items) {V1ControllerRevisionBuilder builder = new V1ControllerRevisionBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ControllerRevisionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ControllerRevision buildItem(int index) { - return this.items.get(index).build(); - } - public V1ControllerRevision buildFirstItem() { - return this.items.get(0).build(); - } - public V1ControllerRevision buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ControllerRevision buildMatchingItem(Predicate predicate) { - for (V1ControllerRevisionBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ControllerRevisionBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ControllerRevision item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ControllerRevision... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ControllerRevision item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ControllerRevisionListFluentImpl.ItemsNested addNewItem() { - return new V1ControllerRevisionListFluentImpl.ItemsNestedImpl(); - } - public V1ControllerRevisionListFluentImpl.ItemsNested addNewItemLike(V1ControllerRevision item) { - return new V1ControllerRevisionListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ControllerRevisionListFluentImpl.ItemsNested setNewItemLike(int index,V1ControllerRevision item) { - return new V1ControllerRevisionListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ControllerRevisionListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ControllerRevisionListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ControllerRevisionListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ControllerRevisionListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ControllerRevisionListFluentImpl.MetadataNestedImpl(); - } - public V1ControllerRevisionListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ControllerRevisionListFluentImpl.MetadataNestedImpl(item); - } - public V1ControllerRevisionListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ControllerRevisionListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ControllerRevisionListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ControllerRevisionListFluentImpl that = (V1ControllerRevisionListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ControllerRevisionFluentImpl> implements V1ControllerRevisionListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ControllerRevision item) { - this.index = index; - this.builder = new V1ControllerRevisionBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ControllerRevisionBuilder(this); - } - V1ControllerRevisionBuilder builder; - int index; - public N and() { - return (N) V1ControllerRevisionListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ControllerRevisionListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ControllerRevisionListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobBuilder.java index 97d972a53e..2c54a4f38a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CronJobBuilder extends V1CronJobFluentImpl implements VisitableBuilder{ +public class V1CronJobBuilder extends V1CronJobFluent implements VisitableBuilder{ public V1CronJobBuilder() { - this(false); - } - public V1CronJobBuilder(Boolean validationEnabled) { - this(new V1CronJob(), validationEnabled); + this(new V1CronJob()); } + public V1CronJobBuilder(V1CronJobFluent fluent) { - this(fluent, false); - } - public V1CronJobBuilder(V1CronJobFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CronJob(), validationEnabled); + this(fluent, new V1CronJob()); } + public V1CronJobBuilder(V1CronJobFluent fluent,V1CronJob instance) { - this(fluent, instance, false); - } - public V1CronJobBuilder(V1CronJobFluent fluent,V1CronJob instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CronJobBuilder(V1CronJob instance) { - this(instance,false); - } - public V1CronJobBuilder(V1CronJob instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CronJobFluent fluent; - Boolean validationEnabled; + public V1CronJob build() { V1CronJob buildable = new V1CronJob(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobFluent.java index e32b1002e2..e844c9cf43 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1CronJobFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1CronJobFluent.MetadataNested withNewMetadata(); - public V1CronJobFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1CronJobFluent.MetadataNested editMetadata(); - public V1CronJobFluent.MetadataNested editOrNewMetadata(); - public V1CronJobFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CronJobSpec getSpec(); - public V1CronJobSpec buildSpec(); - public A withSpec(V1CronJobSpec spec); - public Boolean hasSpec(); - public V1CronJobFluent.SpecNested withNewSpec(); - public V1CronJobFluent.SpecNested withNewSpecLike(V1CronJobSpec item); - public V1CronJobFluent.SpecNested editSpec(); - public V1CronJobFluent.SpecNested editOrNewSpec(); - public V1CronJobFluent.SpecNested editOrNewSpecLike(V1CronJobSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1CronJobStatus getStatus(); - public V1CronJobStatus buildStatus(); - public A withStatus(V1CronJobStatus status); - public Boolean hasStatus(); - public V1CronJobFluent.StatusNested withNewStatus(); - public V1CronJobFluent.StatusNested withNewStatusLike(V1CronJobStatus item); - public V1CronJobFluent.StatusNested editStatus(); - public V1CronJobFluent.StatusNested editOrNewStatus(); - public V1CronJobFluent.StatusNested editOrNewStatusLike(V1CronJobStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CronJobFluent> extends BaseFluent{ + public V1CronJobFluent() { + } + + public V1CronJobFluent(V1CronJob instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1CronJobSpecBuilder spec; + private V1CronJobStatusBuilder status; + + protected void copyInstance(V1CronJob instance) { + instance = (instance != null ? instance : new V1CronJob()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1CronJobSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1CronJobSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1CronJobSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1CronJobSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1CronJobSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1CronJobSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1CronJobSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1CronJobStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1CronJobStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1CronJobStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1CronJobStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1CronJobStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1CronJobStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CronJobFluent that = (V1CronJobFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1CronJobFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1CronJobStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1CronJobSpecFluent> implements Nested{ + SpecNested(V1CronJobSpec item) { + this.builder = new V1CronJobSpecBuilder(this, item); + } + V1CronJobSpecBuilder builder; + + public N and() { + return (N) V1CronJobFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1CronJobStatusFluent> implements Nested{ + StatusNested(V1CronJobStatus item) { + this.builder = new V1CronJobStatusBuilder(this, item); + } + V1CronJobStatusBuilder builder; + + public N and() { + return (N) V1CronJobFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobFluentImpl.java deleted file mode 100644 index 302941ecca..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CronJobFluentImpl> extends BaseFluent implements V1CronJobFluent{ - public V1CronJobFluentImpl() { - } - public V1CronJobFluentImpl(V1CronJob instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1CronJobSpecBuilder spec; - private V1CronJobStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1CronJobFluentImpl.MetadataNested withNewMetadata() { - return new V1CronJobFluentImpl.MetadataNestedImpl(); - } - public V1CronJobFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1CronJobFluentImpl.MetadataNestedImpl(item); - } - public V1CronJobFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CronJobFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1CronJobFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CronJobSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1CronJobSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1CronJobSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1CronJobSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1CronJobFluentImpl.SpecNested withNewSpec() { - return new V1CronJobFluentImpl.SpecNestedImpl(); - } - public V1CronJobFluentImpl.SpecNested withNewSpecLike(V1CronJobSpec item) { - return new V1CronJobFluentImpl.SpecNestedImpl(item); - } - public V1CronJobFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1CronJobFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1CronJobSpecBuilder().build()); - } - public V1CronJobFluentImpl.SpecNested editOrNewSpecLike(V1CronJobSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1CronJobStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1CronJobStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1CronJobStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1CronJobStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1CronJobFluentImpl.StatusNested withNewStatus() { - return new V1CronJobFluentImpl.StatusNestedImpl(); - } - public V1CronJobFluentImpl.StatusNested withNewStatusLike(V1CronJobStatus item) { - return new V1CronJobFluentImpl.StatusNestedImpl(item); - } - public V1CronJobFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1CronJobFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1CronJobStatusBuilder().build()); - } - public V1CronJobFluentImpl.StatusNested editOrNewStatusLike(V1CronJobStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CronJobFluentImpl that = (V1CronJobFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1CronJobFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1CronJobFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1CronJobSpecFluentImpl> implements V1CronJobFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1CronJobSpec item) { - this.builder = new V1CronJobSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1CronJobSpecBuilder(this); - } - V1CronJobSpecBuilder builder; - public N and() { - return (N) V1CronJobFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1CronJobStatusFluentImpl> implements V1CronJobFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1CronJobStatus item) { - this.builder = new V1CronJobStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1CronJobStatusBuilder(this); - } - V1CronJobStatusBuilder builder; - public N and() { - return (N) V1CronJobFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListBuilder.java index 11582f40d6..fcf8733c1d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CronJobListBuilder extends V1CronJobListFluentImpl implements VisitableBuilder{ +public class V1CronJobListBuilder extends V1CronJobListFluent implements VisitableBuilder{ public V1CronJobListBuilder() { - this(false); - } - public V1CronJobListBuilder(Boolean validationEnabled) { - this(new V1CronJobList(), validationEnabled); + this(new V1CronJobList()); } + public V1CronJobListBuilder(V1CronJobListFluent fluent) { - this(fluent, false); - } - public V1CronJobListBuilder(V1CronJobListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CronJobList(), validationEnabled); + this(fluent, new V1CronJobList()); } + public V1CronJobListBuilder(V1CronJobListFluent fluent,V1CronJobList instance) { - this(fluent, instance, false); - } - public V1CronJobListBuilder(V1CronJobListFluent fluent,V1CronJobList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CronJobListBuilder(V1CronJobList instance) { - this(instance,false); - } - public V1CronJobListBuilder(V1CronJobList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CronJobListFluent fluent; - Boolean validationEnabled; + public V1CronJobList build() { V1CronJobList buildable = new V1CronJobList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListFluent.java index d7abe26d0d..9773ba7050 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CronJobListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1CronJob item); - public A setToItems(int index,V1CronJob item); - public A addToItems(io.kubernetes.client.openapi.models.V1CronJob... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1CronJob... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1CronJob buildItem(int index); - public V1CronJob buildFirstItem(); - public V1CronJob buildLastItem(); - public V1CronJob buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1CronJob... items); - public Boolean hasItems(); - public V1CronJobListFluent.ItemsNested addNewItem(); - public V1CronJobListFluent.ItemsNested addNewItemLike(V1CronJob item); - public V1CronJobListFluent.ItemsNested setNewItemLike(int index,V1CronJob item); - public V1CronJobListFluent.ItemsNested editItem(int index); - public V1CronJobListFluent.ItemsNested editFirstItem(); - public V1CronJobListFluent.ItemsNested editLastItem(); - public V1CronJobListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1CronJobListFluent.MetadataNested withNewMetadata(); - public V1CronJobListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1CronJobListFluent.MetadataNested editMetadata(); - public V1CronJobListFluent.MetadataNested editOrNewMetadata(); - public V1CronJobListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1CronJobFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CronJobListFluent> extends BaseFluent{ + public V1CronJobListFluent() { + } + + public V1CronJobListFluent(V1CronJobList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1CronJobList instance) { + instance = (instance != null ? instance : new V1CronJobList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1CronJob item) { + if (this.items == null) {this.items = new ArrayList();} + V1CronJobBuilder builder = new V1CronJobBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1CronJob item) { + if (this.items == null) {this.items = new ArrayList();} + V1CronJobBuilder builder = new V1CronJobBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1CronJob... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CronJob item : items) {V1CronJobBuilder builder = new V1CronJobBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CronJob item : items) {V1CronJobBuilder builder = new V1CronJobBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1CronJob... items) { + if (this.items == null) return (A)this; + for (V1CronJob item : items) {V1CronJobBuilder builder = new V1CronJobBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1CronJob item : items) {V1CronJobBuilder builder = new V1CronJobBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1CronJobBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1CronJob buildItem(int index) { + return this.items.get(index).build(); + } + + public V1CronJob buildFirstItem() { + return this.items.get(0).build(); + } + + public V1CronJob buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1CronJob buildMatchingItem(Predicate predicate) { + for (V1CronJobBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1CronJobBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1CronJob item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1CronJob... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1CronJob item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1CronJob item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1CronJob item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CronJobListFluent that = (V1CronJobListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1CronJobFluent> implements Nested{ + ItemsNested(int index,V1CronJob item) { + this.index = index; + this.builder = new V1CronJobBuilder(this, item); + } + V1CronJobBuilder builder; + int index; + public N and() { + return (N) V1CronJobListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1CronJobListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListFluentImpl.java deleted file mode 100644 index eb83dc3a0c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CronJobListFluentImpl> extends BaseFluent implements V1CronJobListFluent{ - public V1CronJobListFluentImpl() { - } - public V1CronJobListFluentImpl(V1CronJobList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1CronJob item) { - if (this.items == null) {this.items = new ArrayList();} - V1CronJobBuilder builder = new V1CronJobBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1CronJob item) { - if (this.items == null) {this.items = new ArrayList();} - V1CronJobBuilder builder = new V1CronJobBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1CronJob... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CronJob item : items) {V1CronJobBuilder builder = new V1CronJobBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CronJob item : items) {V1CronJobBuilder builder = new V1CronJobBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1CronJob... items) { - for (V1CronJob item : items) {V1CronJobBuilder builder = new V1CronJobBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1CronJob item : items) {V1CronJobBuilder builder = new V1CronJobBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1CronJobBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1CronJob buildItem(int index) { - return this.items.get(index).build(); - } - public V1CronJob buildFirstItem() { - return this.items.get(0).build(); - } - public V1CronJob buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1CronJob buildMatchingItem(Predicate predicate) { - for (V1CronJobBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1CronJobBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1CronJob item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1CronJob... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1CronJob item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1CronJobListFluentImpl.ItemsNested addNewItem() { - return new V1CronJobListFluentImpl.ItemsNestedImpl(); - } - public V1CronJobListFluentImpl.ItemsNested addNewItemLike(V1CronJob item) { - return new V1CronJobListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1CronJobListFluentImpl.ItemsNested setNewItemLike(int index,V1CronJob item) { - return new V1CronJobListFluentImpl.ItemsNestedImpl(index, item); - } - public V1CronJobListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1CronJobListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1CronJobListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1CronJobListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1CronJobListFluentImpl.MetadataNestedImpl(); - } - public V1CronJobListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1CronJobListFluentImpl.MetadataNestedImpl(item); - } - public V1CronJobListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CronJobListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1CronJobListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CronJobListFluentImpl that = (V1CronJobListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1CronJobFluentImpl> implements V1CronJobListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1CronJob item) { - this.index = index; - this.builder = new V1CronJobBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1CronJobBuilder(this); - } - V1CronJobBuilder builder; - int index; - public N and() { - return (N) V1CronJobListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1CronJobListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1CronJobListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecBuilder.java index e57ceb453d..74cfe0198d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecBuilder.java @@ -1,61 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CronJobSpecBuilder extends V1CronJobSpecFluentImpl implements VisitableBuilder{ +public class V1CronJobSpecBuilder extends V1CronJobSpecFluent implements VisitableBuilder{ public V1CronJobSpecBuilder() { - this(false); - } - public V1CronJobSpecBuilder(Boolean validationEnabled) { - this(new V1CronJobSpec(), validationEnabled); + this(new V1CronJobSpec()); } + public V1CronJobSpecBuilder(V1CronJobSpecFluent fluent) { - this(fluent, false); - } - public V1CronJobSpecBuilder(V1CronJobSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CronJobSpec(), validationEnabled); + this(fluent, new V1CronJobSpec()); } + public V1CronJobSpecBuilder(V1CronJobSpecFluent fluent,V1CronJobSpec instance) { - this(fluent, instance, false); - } - public V1CronJobSpecBuilder(V1CronJobSpecFluent fluent,V1CronJobSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConcurrencyPolicy(instance.getConcurrencyPolicy()); - fluent.withFailedJobsHistoryLimit(instance.getFailedJobsHistoryLimit()); - fluent.withJobTemplate(instance.getJobTemplate()); - fluent.withSchedule(instance.getSchedule()); - fluent.withStartingDeadlineSeconds(instance.getStartingDeadlineSeconds()); - fluent.withSuccessfulJobsHistoryLimit(instance.getSuccessfulJobsHistoryLimit()); - fluent.withSuspend(instance.getSuspend()); - fluent.withTimeZone(instance.getTimeZone()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CronJobSpecBuilder(V1CronJobSpec instance) { - this(instance,false); - } - public V1CronJobSpecBuilder(V1CronJobSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConcurrencyPolicy(instance.getConcurrencyPolicy()); - this.withFailedJobsHistoryLimit(instance.getFailedJobsHistoryLimit()); - this.withJobTemplate(instance.getJobTemplate()); - this.withSchedule(instance.getSchedule()); - this.withStartingDeadlineSeconds(instance.getStartingDeadlineSeconds()); - this.withSuccessfulJobsHistoryLimit(instance.getSuccessfulJobsHistoryLimit()); - this.withSuspend(instance.getSuspend()); - this.withTimeZone(instance.getTimeZone()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CronJobSpecFluent fluent; - Boolean validationEnabled; + public V1CronJobSpec build() { V1CronJobSpec buildable = new V1CronJobSpec(); buildable.setConcurrencyPolicy(fluent.getConcurrencyPolicy()); buildable.setFailedJobsHistoryLimit(fluent.getFailedJobsHistoryLimit()); - buildable.setJobTemplate(fluent.getJobTemplate()); + buildable.setJobTemplate(fluent.buildJobTemplate()); buildable.setSchedule(fluent.getSchedule()); buildable.setStartingDeadlineSeconds(fluent.getStartingDeadlineSeconds()); buildable.setSuccessfulJobsHistoryLimit(fluent.getSuccessfulJobsHistoryLimit()); @@ -64,4 +34,5 @@ public V1CronJobSpec build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecFluent.java index c30c74a676..8957e6c0ec 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecFluent.java @@ -1,59 +1,232 @@ package io.kubernetes.client.openapi.models; -import java.lang.Integer; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Long; import java.lang.String; +import java.lang.Integer; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Long; +import java.lang.Object; import java.lang.Boolean; - /** - * Generated - */ -public interface V1CronJobSpecFluent> extends Fluent{ - public String getConcurrencyPolicy(); - public A withConcurrencyPolicy(String concurrencyPolicy); - public Boolean hasConcurrencyPolicy(); - public Integer getFailedJobsHistoryLimit(); - public A withFailedJobsHistoryLimit(Integer failedJobsHistoryLimit); - public Boolean hasFailedJobsHistoryLimit(); - - /** - * This method has been deprecated, please use method buildJobTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1JobTemplateSpec getJobTemplate(); - public V1JobTemplateSpec buildJobTemplate(); - public A withJobTemplate(V1JobTemplateSpec jobTemplate); - public Boolean hasJobTemplate(); - public V1CronJobSpecFluent.JobTemplateNested withNewJobTemplate(); - public V1CronJobSpecFluent.JobTemplateNested withNewJobTemplateLike(V1JobTemplateSpec item); - public V1CronJobSpecFluent.JobTemplateNested editJobTemplate(); - public V1CronJobSpecFluent.JobTemplateNested editOrNewJobTemplate(); - public V1CronJobSpecFluent.JobTemplateNested editOrNewJobTemplateLike(V1JobTemplateSpec item); - public String getSchedule(); - public A withSchedule(String schedule); - public Boolean hasSchedule(); - public Long getStartingDeadlineSeconds(); - public A withStartingDeadlineSeconds(Long startingDeadlineSeconds); - public Boolean hasStartingDeadlineSeconds(); - public Integer getSuccessfulJobsHistoryLimit(); - public A withSuccessfulJobsHistoryLimit(Integer successfulJobsHistoryLimit); - public Boolean hasSuccessfulJobsHistoryLimit(); - public Boolean getSuspend(); - public A withSuspend(Boolean suspend); - public Boolean hasSuspend(); - public String getTimeZone(); - public A withTimeZone(String timeZone); - public Boolean hasTimeZone(); - public A withSuspend(); - public interface JobTemplateNested extends Nested,V1JobTemplateSpecFluent>{ - public N and(); - public N endJobTemplate(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CronJobSpecFluent> extends BaseFluent{ + public V1CronJobSpecFluent() { + } + + public V1CronJobSpecFluent(V1CronJobSpec instance) { + this.copyInstance(instance); + } + private String concurrencyPolicy; + private Integer failedJobsHistoryLimit; + private V1JobTemplateSpecBuilder jobTemplate; + private String schedule; + private Long startingDeadlineSeconds; + private Integer successfulJobsHistoryLimit; + private Boolean suspend; + private String timeZone; + + protected void copyInstance(V1CronJobSpec instance) { + instance = (instance != null ? instance : new V1CronJobSpec()); + if (instance != null) { + this.withConcurrencyPolicy(instance.getConcurrencyPolicy()); + this.withFailedJobsHistoryLimit(instance.getFailedJobsHistoryLimit()); + this.withJobTemplate(instance.getJobTemplate()); + this.withSchedule(instance.getSchedule()); + this.withStartingDeadlineSeconds(instance.getStartingDeadlineSeconds()); + this.withSuccessfulJobsHistoryLimit(instance.getSuccessfulJobsHistoryLimit()); + this.withSuspend(instance.getSuspend()); + this.withTimeZone(instance.getTimeZone()); + } + } + + public String getConcurrencyPolicy() { + return this.concurrencyPolicy; + } + + public A withConcurrencyPolicy(String concurrencyPolicy) { + this.concurrencyPolicy = concurrencyPolicy; + return (A) this; + } + + public boolean hasConcurrencyPolicy() { + return this.concurrencyPolicy != null; + } + + public Integer getFailedJobsHistoryLimit() { + return this.failedJobsHistoryLimit; + } + + public A withFailedJobsHistoryLimit(Integer failedJobsHistoryLimit) { + this.failedJobsHistoryLimit = failedJobsHistoryLimit; + return (A) this; + } + + public boolean hasFailedJobsHistoryLimit() { + return this.failedJobsHistoryLimit != null; + } + + public V1JobTemplateSpec buildJobTemplate() { + return this.jobTemplate != null ? this.jobTemplate.build() : null; + } + + public A withJobTemplate(V1JobTemplateSpec jobTemplate) { + this._visitables.remove("jobTemplate"); + if (jobTemplate != null) { + this.jobTemplate = new V1JobTemplateSpecBuilder(jobTemplate); + this._visitables.get("jobTemplate").add(this.jobTemplate); + } else { + this.jobTemplate = null; + this._visitables.get("jobTemplate").remove(this.jobTemplate); + } + return (A) this; + } + + public boolean hasJobTemplate() { + return this.jobTemplate != null; + } + + public JobTemplateNested withNewJobTemplate() { + return new JobTemplateNested(null); + } + + public JobTemplateNested withNewJobTemplateLike(V1JobTemplateSpec item) { + return new JobTemplateNested(item); + } + + public JobTemplateNested editJobTemplate() { + return withNewJobTemplateLike(java.util.Optional.ofNullable(buildJobTemplate()).orElse(null)); + } + + public JobTemplateNested editOrNewJobTemplate() { + return withNewJobTemplateLike(java.util.Optional.ofNullable(buildJobTemplate()).orElse(new V1JobTemplateSpecBuilder().build())); + } + + public JobTemplateNested editOrNewJobTemplateLike(V1JobTemplateSpec item) { + return withNewJobTemplateLike(java.util.Optional.ofNullable(buildJobTemplate()).orElse(item)); + } + + public String getSchedule() { + return this.schedule; + } + + public A withSchedule(String schedule) { + this.schedule = schedule; + return (A) this; + } + + public boolean hasSchedule() { + return this.schedule != null; + } + + public Long getStartingDeadlineSeconds() { + return this.startingDeadlineSeconds; + } + + public A withStartingDeadlineSeconds(Long startingDeadlineSeconds) { + this.startingDeadlineSeconds = startingDeadlineSeconds; + return (A) this; + } + + public boolean hasStartingDeadlineSeconds() { + return this.startingDeadlineSeconds != null; + } + + public Integer getSuccessfulJobsHistoryLimit() { + return this.successfulJobsHistoryLimit; + } + + public A withSuccessfulJobsHistoryLimit(Integer successfulJobsHistoryLimit) { + this.successfulJobsHistoryLimit = successfulJobsHistoryLimit; + return (A) this; + } + + public boolean hasSuccessfulJobsHistoryLimit() { + return this.successfulJobsHistoryLimit != null; + } + + public Boolean getSuspend() { + return this.suspend; + } + + public A withSuspend(Boolean suspend) { + this.suspend = suspend; + return (A) this; + } + + public boolean hasSuspend() { + return this.suspend != null; + } + + public String getTimeZone() { + return this.timeZone; + } + + public A withTimeZone(String timeZone) { + this.timeZone = timeZone; + return (A) this; + } + + public boolean hasTimeZone() { + return this.timeZone != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CronJobSpecFluent that = (V1CronJobSpecFluent) o; + if (!java.util.Objects.equals(concurrencyPolicy, that.concurrencyPolicy)) return false; + if (!java.util.Objects.equals(failedJobsHistoryLimit, that.failedJobsHistoryLimit)) return false; + if (!java.util.Objects.equals(jobTemplate, that.jobTemplate)) return false; + if (!java.util.Objects.equals(schedule, that.schedule)) return false; + if (!java.util.Objects.equals(startingDeadlineSeconds, that.startingDeadlineSeconds)) return false; + if (!java.util.Objects.equals(successfulJobsHistoryLimit, that.successfulJobsHistoryLimit)) return false; + if (!java.util.Objects.equals(suspend, that.suspend)) return false; + if (!java.util.Objects.equals(timeZone, that.timeZone)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(concurrencyPolicy, failedJobsHistoryLimit, jobTemplate, schedule, startingDeadlineSeconds, successfulJobsHistoryLimit, suspend, timeZone, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (concurrencyPolicy != null) { sb.append("concurrencyPolicy:"); sb.append(concurrencyPolicy + ","); } + if (failedJobsHistoryLimit != null) { sb.append("failedJobsHistoryLimit:"); sb.append(failedJobsHistoryLimit + ","); } + if (jobTemplate != null) { sb.append("jobTemplate:"); sb.append(jobTemplate + ","); } + if (schedule != null) { sb.append("schedule:"); sb.append(schedule + ","); } + if (startingDeadlineSeconds != null) { sb.append("startingDeadlineSeconds:"); sb.append(startingDeadlineSeconds + ","); } + if (successfulJobsHistoryLimit != null) { sb.append("successfulJobsHistoryLimit:"); sb.append(successfulJobsHistoryLimit + ","); } + if (suspend != null) { sb.append("suspend:"); sb.append(suspend + ","); } + if (timeZone != null) { sb.append("timeZone:"); sb.append(timeZone); } + sb.append("}"); + return sb.toString(); + } + + public A withSuspend() { + return withSuspend(true); } + public class JobTemplateNested extends V1JobTemplateSpecFluent> implements Nested{ + JobTemplateNested(V1JobTemplateSpec item) { + this.builder = new V1JobTemplateSpecBuilder(this, item); + } + V1JobTemplateSpecBuilder builder; + + public N and() { + return (N) V1CronJobSpecFluent.this.withJobTemplate(builder.build()); + } + + public N endJobTemplate() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecFluentImpl.java deleted file mode 100644 index 98f14e7837..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobSpecFluentImpl.java +++ /dev/null @@ -1,197 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CronJobSpecFluentImpl> extends BaseFluent implements V1CronJobSpecFluent{ - public V1CronJobSpecFluentImpl() { - } - public V1CronJobSpecFluentImpl(V1CronJobSpec instance) { - if (instance != null) { - this.withConcurrencyPolicy(instance.getConcurrencyPolicy()); - this.withFailedJobsHistoryLimit(instance.getFailedJobsHistoryLimit()); - this.withJobTemplate(instance.getJobTemplate()); - this.withSchedule(instance.getSchedule()); - this.withStartingDeadlineSeconds(instance.getStartingDeadlineSeconds()); - this.withSuccessfulJobsHistoryLimit(instance.getSuccessfulJobsHistoryLimit()); - this.withSuspend(instance.getSuspend()); - this.withTimeZone(instance.getTimeZone()); - } - } - private String concurrencyPolicy; - private Integer failedJobsHistoryLimit; - private V1JobTemplateSpecBuilder jobTemplate; - private String schedule; - private Long startingDeadlineSeconds; - private Integer successfulJobsHistoryLimit; - private Boolean suspend; - private String timeZone; - public String getConcurrencyPolicy() { - return this.concurrencyPolicy; - } - public A withConcurrencyPolicy(String concurrencyPolicy) { - this.concurrencyPolicy=concurrencyPolicy; return (A) this; - } - public Boolean hasConcurrencyPolicy() { - return this.concurrencyPolicy != null; - } - public Integer getFailedJobsHistoryLimit() { - return this.failedJobsHistoryLimit; - } - public A withFailedJobsHistoryLimit(Integer failedJobsHistoryLimit) { - this.failedJobsHistoryLimit=failedJobsHistoryLimit; return (A) this; - } - public Boolean hasFailedJobsHistoryLimit() { - return this.failedJobsHistoryLimit != null; - } - - /** - * This method has been deprecated, please use method buildJobTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1JobTemplateSpec getJobTemplate() { - return this.jobTemplate!=null ?this.jobTemplate.build():null; - } - public V1JobTemplateSpec buildJobTemplate() { - return this.jobTemplate!=null ?this.jobTemplate.build():null; - } - public A withJobTemplate(V1JobTemplateSpec jobTemplate) { - _visitables.get("jobTemplate").remove(this.jobTemplate); - if (jobTemplate!=null){ this.jobTemplate= new V1JobTemplateSpecBuilder(jobTemplate); _visitables.get("jobTemplate").add(this.jobTemplate);} else { this.jobTemplate = null; _visitables.get("jobTemplate").remove(this.jobTemplate); } return (A) this; - } - public Boolean hasJobTemplate() { - return this.jobTemplate != null; - } - public V1CronJobSpecFluentImpl.JobTemplateNested withNewJobTemplate() { - return new V1CronJobSpecFluentImpl.JobTemplateNestedImpl(); - } - public V1CronJobSpecFluentImpl.JobTemplateNested withNewJobTemplateLike(V1JobTemplateSpec item) { - return new V1CronJobSpecFluentImpl.JobTemplateNestedImpl(item); - } - public V1CronJobSpecFluentImpl.JobTemplateNested editJobTemplate() { - return withNewJobTemplateLike(getJobTemplate()); - } - public V1CronJobSpecFluentImpl.JobTemplateNested editOrNewJobTemplate() { - return withNewJobTemplateLike(getJobTemplate() != null ? getJobTemplate(): new V1JobTemplateSpecBuilder().build()); - } - public V1CronJobSpecFluentImpl.JobTemplateNested editOrNewJobTemplateLike(V1JobTemplateSpec item) { - return withNewJobTemplateLike(getJobTemplate() != null ? getJobTemplate(): item); - } - public String getSchedule() { - return this.schedule; - } - public A withSchedule(String schedule) { - this.schedule=schedule; return (A) this; - } - public Boolean hasSchedule() { - return this.schedule != null; - } - public Long getStartingDeadlineSeconds() { - return this.startingDeadlineSeconds; - } - public A withStartingDeadlineSeconds(Long startingDeadlineSeconds) { - this.startingDeadlineSeconds=startingDeadlineSeconds; return (A) this; - } - public Boolean hasStartingDeadlineSeconds() { - return this.startingDeadlineSeconds != null; - } - public Integer getSuccessfulJobsHistoryLimit() { - return this.successfulJobsHistoryLimit; - } - public A withSuccessfulJobsHistoryLimit(Integer successfulJobsHistoryLimit) { - this.successfulJobsHistoryLimit=successfulJobsHistoryLimit; return (A) this; - } - public Boolean hasSuccessfulJobsHistoryLimit() { - return this.successfulJobsHistoryLimit != null; - } - public Boolean getSuspend() { - return this.suspend; - } - public A withSuspend(Boolean suspend) { - this.suspend=suspend; return (A) this; - } - public Boolean hasSuspend() { - return this.suspend != null; - } - public String getTimeZone() { - return this.timeZone; - } - public A withTimeZone(String timeZone) { - this.timeZone=timeZone; return (A) this; - } - public Boolean hasTimeZone() { - return this.timeZone != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CronJobSpecFluentImpl that = (V1CronJobSpecFluentImpl) o; - if (!java.util.Objects.equals(concurrencyPolicy, that.concurrencyPolicy)) return false; - - if (!java.util.Objects.equals(failedJobsHistoryLimit, that.failedJobsHistoryLimit)) return false; - - if (!java.util.Objects.equals(jobTemplate, that.jobTemplate)) return false; - - if (!java.util.Objects.equals(schedule, that.schedule)) return false; - - if (!java.util.Objects.equals(startingDeadlineSeconds, that.startingDeadlineSeconds)) return false; - - if (!java.util.Objects.equals(successfulJobsHistoryLimit, that.successfulJobsHistoryLimit)) return false; - - if (!java.util.Objects.equals(suspend, that.suspend)) return false; - - if (!java.util.Objects.equals(timeZone, that.timeZone)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(concurrencyPolicy, failedJobsHistoryLimit, jobTemplate, schedule, startingDeadlineSeconds, successfulJobsHistoryLimit, suspend, timeZone, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (concurrencyPolicy != null) { sb.append("concurrencyPolicy:"); sb.append(concurrencyPolicy + ","); } - if (failedJobsHistoryLimit != null) { sb.append("failedJobsHistoryLimit:"); sb.append(failedJobsHistoryLimit + ","); } - if (jobTemplate != null) { sb.append("jobTemplate:"); sb.append(jobTemplate + ","); } - if (schedule != null) { sb.append("schedule:"); sb.append(schedule + ","); } - if (startingDeadlineSeconds != null) { sb.append("startingDeadlineSeconds:"); sb.append(startingDeadlineSeconds + ","); } - if (successfulJobsHistoryLimit != null) { sb.append("successfulJobsHistoryLimit:"); sb.append(successfulJobsHistoryLimit + ","); } - if (suspend != null) { sb.append("suspend:"); sb.append(suspend + ","); } - if (timeZone != null) { sb.append("timeZone:"); sb.append(timeZone); } - sb.append("}"); - return sb.toString(); - } - public A withSuspend() { - return withSuspend(true); - } - class JobTemplateNestedImpl extends V1JobTemplateSpecFluentImpl> implements V1CronJobSpecFluentImpl.JobTemplateNested,Nested{ - JobTemplateNestedImpl(V1JobTemplateSpec item) { - this.builder = new V1JobTemplateSpecBuilder(this, item); - } - JobTemplateNestedImpl() { - this.builder = new V1JobTemplateSpecBuilder(this); - } - V1JobTemplateSpecBuilder builder; - public N and() { - return (N) V1CronJobSpecFluentImpl.this.withJobTemplate(builder.build()); - } - public N endJobTemplate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusBuilder.java index ac36d82dc1..5197779137 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CronJobStatusBuilder extends V1CronJobStatusFluentImpl implements VisitableBuilder{ +public class V1CronJobStatusBuilder extends V1CronJobStatusFluent implements VisitableBuilder{ public V1CronJobStatusBuilder() { - this(false); - } - public V1CronJobStatusBuilder(Boolean validationEnabled) { - this(new V1CronJobStatus(), validationEnabled); + this(new V1CronJobStatus()); } + public V1CronJobStatusBuilder(V1CronJobStatusFluent fluent) { - this(fluent, false); - } - public V1CronJobStatusBuilder(V1CronJobStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CronJobStatus(), validationEnabled); + this(fluent, new V1CronJobStatus()); } + public V1CronJobStatusBuilder(V1CronJobStatusFluent fluent,V1CronJobStatus instance) { - this(fluent, instance, false); - } - public V1CronJobStatusBuilder(V1CronJobStatusFluent fluent,V1CronJobStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withActive(instance.getActive()); - fluent.withLastScheduleTime(instance.getLastScheduleTime()); - fluent.withLastSuccessfulTime(instance.getLastSuccessfulTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CronJobStatusBuilder(V1CronJobStatus instance) { - this(instance,false); - } - public V1CronJobStatusBuilder(V1CronJobStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withActive(instance.getActive()); - this.withLastScheduleTime(instance.getLastScheduleTime()); - this.withLastSuccessfulTime(instance.getLastSuccessfulTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CronJobStatusFluent fluent; - Boolean validationEnabled; + public V1CronJobStatus build() { V1CronJobStatus buildable = new V1CronJobStatus(); - buildable.setActive(fluent.getActive()); + buildable.setActive(fluent.buildActive()); buildable.setLastScheduleTime(fluent.getLastScheduleTime()); buildable.setLastSuccessfulTime(fluent.getLastSuccessfulTime()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusFluent.java index d109f16b3d..c2fc48c96d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusFluent.java @@ -1,62 +1,260 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; import java.time.OffsetDateTime; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CronJobStatusFluent> extends Fluent{ - public A addToActive(int index,V1ObjectReference item); - public A setToActive(int index,V1ObjectReference item); - public A addToActive(io.kubernetes.client.openapi.models.V1ObjectReference... items); - public A addAllToActive(Collection items); - public A removeFromActive(io.kubernetes.client.openapi.models.V1ObjectReference... items); - public A removeAllFromActive(Collection items); - public A removeMatchingFromActive(Predicate predicate); - - /** - * This method has been deprecated, please use method buildActive instead. - * @return The buildable object. - */ - @Deprecated - public List getActive(); - public List buildActive(); - public V1ObjectReference buildActive(int index); - public V1ObjectReference buildFirstActive(); - public V1ObjectReference buildLastActive(); - public V1ObjectReference buildMatchingActive(Predicate predicate); - public Boolean hasMatchingActive(Predicate predicate); - public A withActive(List active); - public A withActive(io.kubernetes.client.openapi.models.V1ObjectReference... active); - public Boolean hasActive(); - public V1CronJobStatusFluent.ActiveNested addNewActive(); - public V1CronJobStatusFluent.ActiveNested addNewActiveLike(V1ObjectReference item); - public V1CronJobStatusFluent.ActiveNested setNewActiveLike(int index,V1ObjectReference item); - public V1CronJobStatusFluent.ActiveNested editActive(int index); - public V1CronJobStatusFluent.ActiveNested editFirstActive(); - public V1CronJobStatusFluent.ActiveNested editLastActive(); - public V1CronJobStatusFluent.ActiveNested editMatchingActive(Predicate predicate); - public OffsetDateTime getLastScheduleTime(); - public A withLastScheduleTime(OffsetDateTime lastScheduleTime); - public Boolean hasLastScheduleTime(); - public OffsetDateTime getLastSuccessfulTime(); - public A withLastSuccessfulTime(OffsetDateTime lastSuccessfulTime); - public Boolean hasLastSuccessfulTime(); - public interface ActiveNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endActive(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CronJobStatusFluent> extends BaseFluent{ + public V1CronJobStatusFluent() { + } + + public V1CronJobStatusFluent(V1CronJobStatus instance) { + this.copyInstance(instance); + } + private ArrayList active; + private OffsetDateTime lastScheduleTime; + private OffsetDateTime lastSuccessfulTime; + + protected void copyInstance(V1CronJobStatus instance) { + instance = (instance != null ? instance : new V1CronJobStatus()); + if (instance != null) { + this.withActive(instance.getActive()); + this.withLastScheduleTime(instance.getLastScheduleTime()); + this.withLastSuccessfulTime(instance.getLastSuccessfulTime()); + } + } + + public A addToActive(int index,V1ObjectReference item) { + if (this.active == null) {this.active = new ArrayList();} + V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item); + if (index < 0 || index >= active.size()) { _visitables.get("active").add(builder); active.add(builder); } else { _visitables.get("active").add(index, builder); active.add(index, builder);} + return (A)this; + } + + public A setToActive(int index,V1ObjectReference item) { + if (this.active == null) {this.active = new ArrayList();} + V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item); + if (index < 0 || index >= active.size()) { _visitables.get("active").add(builder); active.add(builder); } else { _visitables.get("active").set(index, builder); active.set(index, builder);} + return (A)this; + } + + public A addToActive(io.kubernetes.client.openapi.models.V1ObjectReference... items) { + if (this.active == null) {this.active = new ArrayList();} + for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("active").add(builder);this.active.add(builder);} return (A)this; + } + + public A addAllToActive(Collection items) { + if (this.active == null) {this.active = new ArrayList();} + for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("active").add(builder);this.active.add(builder);} return (A)this; + } + + public A removeFromActive(io.kubernetes.client.openapi.models.V1ObjectReference... items) { + if (this.active == null) return (A)this; + for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("active").remove(builder); this.active.remove(builder);} return (A)this; + } + + public A removeAllFromActive(Collection items) { + if (this.active == null) return (A)this; + for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("active").remove(builder); this.active.remove(builder);} return (A)this; + } + + public A removeMatchingFromActive(Predicate predicate) { + if (active == null) return (A) this; + final Iterator each = active.iterator(); + final List visitables = _visitables.get("active"); + while (each.hasNext()) { + V1ObjectReferenceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildActive() { + return this.active != null ? build(active) : null; + } + + public V1ObjectReference buildActive(int index) { + return this.active.get(index).build(); + } + + public V1ObjectReference buildFirstActive() { + return this.active.get(0).build(); + } + + public V1ObjectReference buildLastActive() { + return this.active.get(active.size() - 1).build(); + } + + public V1ObjectReference buildMatchingActive(Predicate predicate) { + for (V1ObjectReferenceBuilder item : active) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingActive(Predicate predicate) { + for (V1ObjectReferenceBuilder item : active) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withActive(List active) { + if (this.active != null) { + this._visitables.get("active").clear(); + } + if (active != null) { + this.active = new ArrayList(); + for (V1ObjectReference item : active) { + this.addToActive(item); + } + } else { + this.active = null; + } + return (A) this; + } + + public A withActive(io.kubernetes.client.openapi.models.V1ObjectReference... active) { + if (this.active != null) { + this.active.clear(); + _visitables.remove("active"); + } + if (active != null) { + for (V1ObjectReference item : active) { + this.addToActive(item); + } + } + return (A) this; + } + + public boolean hasActive() { + return this.active != null && !this.active.isEmpty(); } + public ActiveNested addNewActive() { + return new ActiveNested(-1, null); + } + + public ActiveNested addNewActiveLike(V1ObjectReference item) { + return new ActiveNested(-1, item); + } + + public ActiveNested setNewActiveLike(int index,V1ObjectReference item) { + return new ActiveNested(index, item); + } + + public ActiveNested editActive(int index) { + if (active.size() <= index) throw new RuntimeException("Can't edit active. Index exceeds size."); + return setNewActiveLike(index, buildActive(index)); + } + + public ActiveNested editFirstActive() { + if (active.size() == 0) throw new RuntimeException("Can't edit first active. The list is empty."); + return setNewActiveLike(0, buildActive(0)); + } + + public ActiveNested editLastActive() { + int index = active.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last active. The list is empty."); + return setNewActiveLike(index, buildActive(index)); + } + + public ActiveNested editMatchingActive(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ObjectReferenceFluent> implements Nested{ + ActiveNested(int index,V1ObjectReference item) { + this.index = index; + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + int index; + + public N and() { + return (N) V1CronJobStatusFluent.this.setToActive(index,builder.build()); + } + + public N endActive() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusFluentImpl.java deleted file mode 100644 index de5f69719c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CronJobStatusFluentImpl.java +++ /dev/null @@ -1,205 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import java.time.OffsetDateTime; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CronJobStatusFluentImpl> extends BaseFluent implements V1CronJobStatusFluent{ - public V1CronJobStatusFluentImpl() { - } - public V1CronJobStatusFluentImpl(V1CronJobStatus instance) { - if (instance != null) { - this.withActive(instance.getActive()); - this.withLastScheduleTime(instance.getLastScheduleTime()); - this.withLastSuccessfulTime(instance.getLastSuccessfulTime()); - } - } - private ArrayList active; - private OffsetDateTime lastScheduleTime; - private OffsetDateTime lastSuccessfulTime; - public A addToActive(int index,V1ObjectReference item) { - if (this.active == null) {this.active = new ArrayList();} - V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item); - if (index < 0 || index >= active.size()) { _visitables.get("active").add(builder); active.add(builder); } else { _visitables.get("active").add(index, builder); active.add(index, builder);} - return (A)this; - } - public A setToActive(int index,V1ObjectReference item) { - if (this.active == null) {this.active = new ArrayList();} - V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item); - if (index < 0 || index >= active.size()) { _visitables.get("active").add(builder); active.add(builder); } else { _visitables.get("active").set(index, builder); active.set(index, builder);} - return (A)this; - } - public A addToActive(io.kubernetes.client.openapi.models.V1ObjectReference... items) { - if (this.active == null) {this.active = new ArrayList();} - for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("active").add(builder);this.active.add(builder);} return (A)this; - } - public A addAllToActive(Collection items) { - if (this.active == null) {this.active = new ArrayList();} - for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("active").add(builder);this.active.add(builder);} return (A)this; - } - public A removeFromActive(io.kubernetes.client.openapi.models.V1ObjectReference... items) { - for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("active").remove(builder);if (this.active != null) {this.active.remove(builder);}} return (A)this; - } - public A removeAllFromActive(Collection items) { - for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("active").remove(builder);if (this.active != null) {this.active.remove(builder);}} return (A)this; - } - public A removeMatchingFromActive(Predicate predicate) { - if (active == null) return (A) this; - final Iterator each = active.iterator(); - final List visitables = _visitables.get("active"); - while (each.hasNext()) { - V1ObjectReferenceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildActive instead. - * @return The buildable object. - */ - @Deprecated - public List getActive() { - return active != null ? build(active) : null; - } - public List buildActive() { - return active != null ? build(active) : null; - } - public V1ObjectReference buildActive(int index) { - return this.active.get(index).build(); - } - public V1ObjectReference buildFirstActive() { - return this.active.get(0).build(); - } - public V1ObjectReference buildLastActive() { - return this.active.get(active.size() - 1).build(); - } - public V1ObjectReference buildMatchingActive(Predicate predicate) { - for (V1ObjectReferenceBuilder item: active) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingActive(Predicate predicate) { - for (V1ObjectReferenceBuilder item: active) { if(predicate.test(item)){ return true;} } return false; - } - public A withActive(List active) { - if (this.active != null) { _visitables.get("active").clear();} - if (active != null) {this.active = new ArrayList(); for (V1ObjectReference item : active){this.addToActive(item);}} else { this.active = null;} return (A) this; - } - public A withActive(io.kubernetes.client.openapi.models.V1ObjectReference... active) { - if (this.active != null) {this.active.clear(); _visitables.remove("active"); } - if (active != null) {for (V1ObjectReference item :active){ this.addToActive(item);}} return (A) this; - } - public Boolean hasActive() { - return active != null && !active.isEmpty(); - } - public V1CronJobStatusFluentImpl.ActiveNested addNewActive() { - return new V1CronJobStatusFluentImpl.ActiveNestedImpl(); - } - public V1CronJobStatusFluentImpl.ActiveNested addNewActiveLike(V1ObjectReference item) { - return new V1CronJobStatusFluentImpl.ActiveNestedImpl(-1, item); - } - public V1CronJobStatusFluentImpl.ActiveNested setNewActiveLike(int index,V1ObjectReference item) { - return new V1CronJobStatusFluentImpl.ActiveNestedImpl(index, item); - } - public V1CronJobStatusFluentImpl.ActiveNested editActive(int index) { - if (active.size() <= index) throw new RuntimeException("Can't edit active. Index exceeds size."); - return setNewActiveLike(index, buildActive(index)); - } - public V1CronJobStatusFluentImpl.ActiveNested editFirstActive() { - if (active.size() == 0) throw new RuntimeException("Can't edit first active. The list is empty."); - return setNewActiveLike(0, buildActive(0)); - } - public V1CronJobStatusFluentImpl.ActiveNested editLastActive() { - int index = active.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last active. The list is empty."); - return setNewActiveLike(index, buildActive(index)); - } - public V1CronJobStatusFluentImpl.ActiveNested editMatchingActive(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ObjectReferenceFluentImpl> implements V1CronJobStatusFluentImpl.ActiveNested,Nested{ - ActiveNestedImpl(int index,V1ObjectReference item) { - this.index = index; - this.builder = new V1ObjectReferenceBuilder(this, item); - } - ActiveNestedImpl() { - this.index = -1; - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - int index; - public N and() { - return (N) V1CronJobStatusFluentImpl.this.setToActive(index,builder.build()); - } - public N endActive() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceBuilder.java index f7593bd833..5a4d76f592 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CrossVersionObjectReferenceBuilder extends V1CrossVersionObjectReferenceFluentImpl implements VisitableBuilder{ +public class V1CrossVersionObjectReferenceBuilder extends V1CrossVersionObjectReferenceFluent implements VisitableBuilder{ public V1CrossVersionObjectReferenceBuilder() { - this(false); - } - public V1CrossVersionObjectReferenceBuilder(Boolean validationEnabled) { - this(new V1CrossVersionObjectReference(), validationEnabled); + this(new V1CrossVersionObjectReference()); } + public V1CrossVersionObjectReferenceBuilder(V1CrossVersionObjectReferenceFluent fluent) { - this(fluent, false); - } - public V1CrossVersionObjectReferenceBuilder(V1CrossVersionObjectReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CrossVersionObjectReference(), validationEnabled); + this(fluent, new V1CrossVersionObjectReference()); } + public V1CrossVersionObjectReferenceBuilder(V1CrossVersionObjectReferenceFluent fluent,V1CrossVersionObjectReference instance) { - this(fluent, instance, false); - } - public V1CrossVersionObjectReferenceBuilder(V1CrossVersionObjectReferenceFluent fluent,V1CrossVersionObjectReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CrossVersionObjectReferenceBuilder(V1CrossVersionObjectReference instance) { - this(instance,false); - } - public V1CrossVersionObjectReferenceBuilder(V1CrossVersionObjectReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CrossVersionObjectReferenceFluent fluent; - Boolean validationEnabled; + public V1CrossVersionObjectReference build() { V1CrossVersionObjectReference buildable = new V1CrossVersionObjectReference(); buildable.setApiVersion(fluent.getApiVersion()); @@ -49,4 +29,5 @@ public V1CrossVersionObjectReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceFluent.java index 89629a648b..eb1d854af1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceFluent.java @@ -1,22 +1,97 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CrossVersionObjectReferenceFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CrossVersionObjectReferenceFluent> extends BaseFluent{ + public V1CrossVersionObjectReferenceFluent() { + } + public V1CrossVersionObjectReferenceFluent(V1CrossVersionObjectReference instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private String name; + + protected void copyInstance(V1CrossVersionObjectReference instance) { + instance = (instance != null ? instance : new V1CrossVersionObjectReference()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CrossVersionObjectReferenceFluent that = (V1CrossVersionObjectReferenceFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceFluentImpl.java deleted file mode 100644 index aee8090236..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CrossVersionObjectReferenceFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CrossVersionObjectReferenceFluentImpl> extends BaseFluent implements V1CrossVersionObjectReferenceFluent{ - public V1CrossVersionObjectReferenceFluentImpl() { - } - public V1CrossVersionObjectReferenceFluentImpl(V1CrossVersionObjectReference instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - } - private String apiVersion; - private String kind; - private String name; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CrossVersionObjectReferenceFluentImpl that = (V1CrossVersionObjectReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionBuilder.java index a128144e5c..d4dfcded8c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceColumnDefinitionBuilder extends V1CustomResourceColumnDefinitionFluentImpl implements VisitableBuilder{ +public class V1CustomResourceColumnDefinitionBuilder extends V1CustomResourceColumnDefinitionFluent implements VisitableBuilder{ public V1CustomResourceColumnDefinitionBuilder() { - this(false); - } - public V1CustomResourceColumnDefinitionBuilder(Boolean validationEnabled) { - this(new V1CustomResourceColumnDefinition(), validationEnabled); + this(new V1CustomResourceColumnDefinition()); } + public V1CustomResourceColumnDefinitionBuilder(V1CustomResourceColumnDefinitionFluent fluent) { - this(fluent, false); - } - public V1CustomResourceColumnDefinitionBuilder(V1CustomResourceColumnDefinitionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceColumnDefinition(), validationEnabled); + this(fluent, new V1CustomResourceColumnDefinition()); } + public V1CustomResourceColumnDefinitionBuilder(V1CustomResourceColumnDefinitionFluent fluent,V1CustomResourceColumnDefinition instance) { - this(fluent, instance, false); - } - public V1CustomResourceColumnDefinitionBuilder(V1CustomResourceColumnDefinitionFluent fluent,V1CustomResourceColumnDefinition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDescription(instance.getDescription()); - fluent.withFormat(instance.getFormat()); - fluent.withJsonPath(instance.getJsonPath()); - fluent.withName(instance.getName()); - fluent.withPriority(instance.getPriority()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceColumnDefinitionBuilder(V1CustomResourceColumnDefinition instance) { - this(instance,false); - } - public V1CustomResourceColumnDefinitionBuilder(V1CustomResourceColumnDefinition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDescription(instance.getDescription()); - this.withFormat(instance.getFormat()); - this.withJsonPath(instance.getJsonPath()); - this.withName(instance.getName()); - this.withPriority(instance.getPriority()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceColumnDefinitionFluent fluent; - Boolean validationEnabled; + public V1CustomResourceColumnDefinition build() { V1CustomResourceColumnDefinition buildable = new V1CustomResourceColumnDefinition(); buildable.setDescription(fluent.getDescription()); @@ -58,4 +32,5 @@ public V1CustomResourceColumnDefinition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionFluent.java index 26d0cdfd72..36ba127c7a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionFluent.java @@ -1,32 +1,149 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CustomResourceColumnDefinitionFluent> extends Fluent{ - public String getDescription(); - public A withDescription(String description); - public Boolean hasDescription(); - public String getFormat(); - public A withFormat(String format); - public Boolean hasFormat(); - public String getJsonPath(); - public A withJsonPath(String jsonPath); - public Boolean hasJsonPath(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Integer getPriority(); - public A withPriority(Integer priority); - public Boolean hasPriority(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceColumnDefinitionFluent> extends BaseFluent{ + public V1CustomResourceColumnDefinitionFluent() { + } + public V1CustomResourceColumnDefinitionFluent(V1CustomResourceColumnDefinition instance) { + this.copyInstance(instance); + } + private String description; + private String format; + private String jsonPath; + private String name; + private Integer priority; + private String type; + + protected void copyInstance(V1CustomResourceColumnDefinition instance) { + instance = (instance != null ? instance : new V1CustomResourceColumnDefinition()); + if (instance != null) { + this.withDescription(instance.getDescription()); + this.withFormat(instance.getFormat()); + this.withJsonPath(instance.getJsonPath()); + this.withName(instance.getName()); + this.withPriority(instance.getPriority()); + this.withType(instance.getType()); + } + } + + public String getDescription() { + return this.description; + } + + public A withDescription(String description) { + this.description = description; + return (A) this; + } + + public boolean hasDescription() { + return this.description != null; + } + + public String getFormat() { + return this.format; + } + + public A withFormat(String format) { + this.format = format; + return (A) this; + } + + public boolean hasFormat() { + return this.format != null; + } + + public String getJsonPath() { + return this.jsonPath; + } + + public A withJsonPath(String jsonPath) { + this.jsonPath = jsonPath; + return (A) this; + } + + public boolean hasJsonPath() { + return this.jsonPath != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Integer getPriority() { + return this.priority; + } + + public A withPriority(Integer priority) { + this.priority = priority; + return (A) this; + } + + public boolean hasPriority() { + return this.priority != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceColumnDefinitionFluent that = (V1CustomResourceColumnDefinitionFluent) o; + if (!java.util.Objects.equals(description, that.description)) return false; + if (!java.util.Objects.equals(format, that.format)) return false; + if (!java.util.Objects.equals(jsonPath, that.jsonPath)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(priority, that.priority)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(description, format, jsonPath, name, priority, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (description != null) { sb.append("description:"); sb.append(description + ","); } + if (format != null) { sb.append("format:"); sb.append(format + ","); } + if (jsonPath != null) { sb.append("jsonPath:"); sb.append(jsonPath + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (priority != null) { sb.append("priority:"); sb.append(priority + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionFluentImpl.java deleted file mode 100644 index f0c0f9e139..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceColumnDefinitionFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceColumnDefinitionFluentImpl> extends BaseFluent implements V1CustomResourceColumnDefinitionFluent{ - public V1CustomResourceColumnDefinitionFluentImpl() { - } - public V1CustomResourceColumnDefinitionFluentImpl(V1CustomResourceColumnDefinition instance) { - if (instance != null) { - this.withDescription(instance.getDescription()); - this.withFormat(instance.getFormat()); - this.withJsonPath(instance.getJsonPath()); - this.withName(instance.getName()); - this.withPriority(instance.getPriority()); - this.withType(instance.getType()); - } - } - private String description; - private String format; - private String jsonPath; - private String name; - private Integer priority; - private String type; - public String getDescription() { - return this.description; - } - public A withDescription(String description) { - this.description=description; return (A) this; - } - public Boolean hasDescription() { - return this.description != null; - } - public String getFormat() { - return this.format; - } - public A withFormat(String format) { - this.format=format; return (A) this; - } - public Boolean hasFormat() { - return this.format != null; - } - public String getJsonPath() { - return this.jsonPath; - } - public A withJsonPath(String jsonPath) { - this.jsonPath=jsonPath; return (A) this; - } - public Boolean hasJsonPath() { - return this.jsonPath != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Integer getPriority() { - return this.priority; - } - public A withPriority(Integer priority) { - this.priority=priority; return (A) this; - } - public Boolean hasPriority() { - return this.priority != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceColumnDefinitionFluentImpl that = (V1CustomResourceColumnDefinitionFluentImpl) o; - if (!java.util.Objects.equals(description, that.description)) return false; - - if (!java.util.Objects.equals(format, that.format)) return false; - - if (!java.util.Objects.equals(jsonPath, that.jsonPath)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(priority, that.priority)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(description, format, jsonPath, name, priority, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (description != null) { sb.append("description:"); sb.append(description + ","); } - if (format != null) { sb.append("format:"); sb.append(format + ","); } - if (jsonPath != null) { sb.append("jsonPath:"); sb.append(jsonPath + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (priority != null) { sb.append("priority:"); sb.append(priority + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionBuilder.java index 59d84ef1a9..c4c4d5387b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceConversionBuilder extends V1CustomResourceConversionFluentImpl implements VisitableBuilder{ +public class V1CustomResourceConversionBuilder extends V1CustomResourceConversionFluent implements VisitableBuilder{ public V1CustomResourceConversionBuilder() { - this(false); - } - public V1CustomResourceConversionBuilder(Boolean validationEnabled) { - this(new V1CustomResourceConversion(), validationEnabled); + this(new V1CustomResourceConversion()); } + public V1CustomResourceConversionBuilder(V1CustomResourceConversionFluent fluent) { - this(fluent, false); - } - public V1CustomResourceConversionBuilder(V1CustomResourceConversionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceConversion(), validationEnabled); + this(fluent, new V1CustomResourceConversion()); } + public V1CustomResourceConversionBuilder(V1CustomResourceConversionFluent fluent,V1CustomResourceConversion instance) { - this(fluent, instance, false); - } - public V1CustomResourceConversionBuilder(V1CustomResourceConversionFluent fluent,V1CustomResourceConversion instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withStrategy(instance.getStrategy()); - fluent.withWebhook(instance.getWebhook()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceConversionBuilder(V1CustomResourceConversion instance) { - this(instance,false); - } - public V1CustomResourceConversionBuilder(V1CustomResourceConversion instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withStrategy(instance.getStrategy()); - this.withWebhook(instance.getWebhook()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceConversionFluent fluent; - Boolean validationEnabled; + public V1CustomResourceConversion build() { V1CustomResourceConversion buildable = new V1CustomResourceConversion(); buildable.setStrategy(fluent.getStrategy()); - buildable.setWebhook(fluent.getWebhook()); + buildable.setWebhook(fluent.buildWebhook()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionFluent.java index 021be8f4f3..3098b6c21c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CustomResourceConversionFluent> extends Fluent{ - public String getStrategy(); - public A withStrategy(String strategy); - public Boolean hasStrategy(); - - /** - * This method has been deprecated, please use method buildWebhook instead. - * @return The buildable object. - */ - @Deprecated - public V1WebhookConversion getWebhook(); - public V1WebhookConversion buildWebhook(); - public A withWebhook(V1WebhookConversion webhook); - public Boolean hasWebhook(); - public V1CustomResourceConversionFluent.WebhookNested withNewWebhook(); - public V1CustomResourceConversionFluent.WebhookNested withNewWebhookLike(V1WebhookConversion item); - public V1CustomResourceConversionFluent.WebhookNested editWebhook(); - public V1CustomResourceConversionFluent.WebhookNested editOrNewWebhook(); - public V1CustomResourceConversionFluent.WebhookNested editOrNewWebhookLike(V1WebhookConversion item); - public interface WebhookNested extends Nested,V1WebhookConversionFluent>{ - public N and(); - public N endWebhook(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceConversionFluent> extends BaseFluent{ + public V1CustomResourceConversionFluent() { + } + + public V1CustomResourceConversionFluent(V1CustomResourceConversion instance) { + this.copyInstance(instance); + } + private String strategy; + private V1WebhookConversionBuilder webhook; + + protected void copyInstance(V1CustomResourceConversion instance) { + instance = (instance != null ? instance : new V1CustomResourceConversion()); + if (instance != null) { + this.withStrategy(instance.getStrategy()); + this.withWebhook(instance.getWebhook()); + } + } + + public String getStrategy() { + return this.strategy; + } + + public A withStrategy(String strategy) { + this.strategy = strategy; + return (A) this; + } + + public boolean hasStrategy() { + return this.strategy != null; + } + + public V1WebhookConversion buildWebhook() { + return this.webhook != null ? this.webhook.build() : null; + } + + public A withWebhook(V1WebhookConversion webhook) { + this._visitables.remove("webhook"); + if (webhook != null) { + this.webhook = new V1WebhookConversionBuilder(webhook); + this._visitables.get("webhook").add(this.webhook); + } else { + this.webhook = null; + this._visitables.get("webhook").remove(this.webhook); + } + return (A) this; + } + + public boolean hasWebhook() { + return this.webhook != null; + } + + public WebhookNested withNewWebhook() { + return new WebhookNested(null); } + public WebhookNested withNewWebhookLike(V1WebhookConversion item) { + return new WebhookNested(item); + } + + public WebhookNested editWebhook() { + return withNewWebhookLike(java.util.Optional.ofNullable(buildWebhook()).orElse(null)); + } + + public WebhookNested editOrNewWebhook() { + return withNewWebhookLike(java.util.Optional.ofNullable(buildWebhook()).orElse(new V1WebhookConversionBuilder().build())); + } + + public WebhookNested editOrNewWebhookLike(V1WebhookConversion item) { + return withNewWebhookLike(java.util.Optional.ofNullable(buildWebhook()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceConversionFluent that = (V1CustomResourceConversionFluent) o; + if (!java.util.Objects.equals(strategy, that.strategy)) return false; + if (!java.util.Objects.equals(webhook, that.webhook)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(strategy, webhook, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (strategy != null) { sb.append("strategy:"); sb.append(strategy + ","); } + if (webhook != null) { sb.append("webhook:"); sb.append(webhook); } + sb.append("}"); + return sb.toString(); + } + public class WebhookNested extends V1WebhookConversionFluent> implements Nested{ + WebhookNested(V1WebhookConversion item) { + this.builder = new V1WebhookConversionBuilder(this, item); + } + V1WebhookConversionBuilder builder; + + public N and() { + return (N) V1CustomResourceConversionFluent.this.withWebhook(builder.build()); + } + + public N endWebhook() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionFluentImpl.java deleted file mode 100644 index 6ccd8d4432..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceConversionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceConversionFluentImpl> extends BaseFluent implements V1CustomResourceConversionFluent{ - public V1CustomResourceConversionFluentImpl() { - } - public V1CustomResourceConversionFluentImpl(V1CustomResourceConversion instance) { - if (instance != null) { - this.withStrategy(instance.getStrategy()); - this.withWebhook(instance.getWebhook()); - } - } - private String strategy; - private V1WebhookConversionBuilder webhook; - public String getStrategy() { - return this.strategy; - } - public A withStrategy(String strategy) { - this.strategy=strategy; return (A) this; - } - public Boolean hasStrategy() { - return this.strategy != null; - } - - /** - * This method has been deprecated, please use method buildWebhook instead. - * @return The buildable object. - */ - @Deprecated - public V1WebhookConversion getWebhook() { - return this.webhook!=null ?this.webhook.build():null; - } - public V1WebhookConversion buildWebhook() { - return this.webhook!=null ?this.webhook.build():null; - } - public A withWebhook(V1WebhookConversion webhook) { - _visitables.get("webhook").remove(this.webhook); - if (webhook!=null){ this.webhook= new V1WebhookConversionBuilder(webhook); _visitables.get("webhook").add(this.webhook);} else { this.webhook = null; _visitables.get("webhook").remove(this.webhook); } return (A) this; - } - public Boolean hasWebhook() { - return this.webhook != null; - } - public V1CustomResourceConversionFluentImpl.WebhookNested withNewWebhook() { - return new V1CustomResourceConversionFluentImpl.WebhookNestedImpl(); - } - public V1CustomResourceConversionFluentImpl.WebhookNested withNewWebhookLike(V1WebhookConversion item) { - return new V1CustomResourceConversionFluentImpl.WebhookNestedImpl(item); - } - public V1CustomResourceConversionFluentImpl.WebhookNested editWebhook() { - return withNewWebhookLike(getWebhook()); - } - public V1CustomResourceConversionFluentImpl.WebhookNested editOrNewWebhook() { - return withNewWebhookLike(getWebhook() != null ? getWebhook(): new V1WebhookConversionBuilder().build()); - } - public V1CustomResourceConversionFluentImpl.WebhookNested editOrNewWebhookLike(V1WebhookConversion item) { - return withNewWebhookLike(getWebhook() != null ? getWebhook(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceConversionFluentImpl that = (V1CustomResourceConversionFluentImpl) o; - if (!java.util.Objects.equals(strategy, that.strategy)) return false; - - if (!java.util.Objects.equals(webhook, that.webhook)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(strategy, webhook, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (strategy != null) { sb.append("strategy:"); sb.append(strategy + ","); } - if (webhook != null) { sb.append("webhook:"); sb.append(webhook); } - sb.append("}"); - return sb.toString(); - } - class WebhookNestedImpl extends V1WebhookConversionFluentImpl> implements V1CustomResourceConversionFluentImpl.WebhookNested,Nested{ - WebhookNestedImpl(V1WebhookConversion item) { - this.builder = new V1WebhookConversionBuilder(this, item); - } - WebhookNestedImpl() { - this.builder = new V1WebhookConversionBuilder(this); - } - V1WebhookConversionBuilder builder; - public N and() { - return (N) V1CustomResourceConversionFluentImpl.this.withWebhook(builder.build()); - } - public N endWebhook() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionBuilder.java index 4914bd2d88..5a139b73a5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceDefinitionBuilder extends V1CustomResourceDefinitionFluentImpl implements VisitableBuilder{ +public class V1CustomResourceDefinitionBuilder extends V1CustomResourceDefinitionFluent implements VisitableBuilder{ public V1CustomResourceDefinitionBuilder() { - this(false); - } - public V1CustomResourceDefinitionBuilder(Boolean validationEnabled) { - this(new V1CustomResourceDefinition(), validationEnabled); + this(new V1CustomResourceDefinition()); } + public V1CustomResourceDefinitionBuilder(V1CustomResourceDefinitionFluent fluent) { - this(fluent, false); - } - public V1CustomResourceDefinitionBuilder(V1CustomResourceDefinitionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceDefinition(), validationEnabled); + this(fluent, new V1CustomResourceDefinition()); } + public V1CustomResourceDefinitionBuilder(V1CustomResourceDefinitionFluent fluent,V1CustomResourceDefinition instance) { - this(fluent, instance, false); - } - public V1CustomResourceDefinitionBuilder(V1CustomResourceDefinitionFluent fluent,V1CustomResourceDefinition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceDefinitionBuilder(V1CustomResourceDefinition instance) { - this(instance,false); - } - public V1CustomResourceDefinitionBuilder(V1CustomResourceDefinition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceDefinitionFluent fluent; - Boolean validationEnabled; + public V1CustomResourceDefinition build() { V1CustomResourceDefinition buildable = new V1CustomResourceDefinition(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionBuilder.java index 76705f78ba..e5636b6f3d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceDefinitionConditionBuilder extends V1CustomResourceDefinitionConditionFluentImpl implements VisitableBuilder{ +public class V1CustomResourceDefinitionConditionBuilder extends V1CustomResourceDefinitionConditionFluent implements VisitableBuilder{ public V1CustomResourceDefinitionConditionBuilder() { - this(false); - } - public V1CustomResourceDefinitionConditionBuilder(Boolean validationEnabled) { - this(new V1CustomResourceDefinitionCondition(), validationEnabled); + this(new V1CustomResourceDefinitionCondition()); } + public V1CustomResourceDefinitionConditionBuilder(V1CustomResourceDefinitionConditionFluent fluent) { - this(fluent, false); - } - public V1CustomResourceDefinitionConditionBuilder(V1CustomResourceDefinitionConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceDefinitionCondition(), validationEnabled); + this(fluent, new V1CustomResourceDefinitionCondition()); } + public V1CustomResourceDefinitionConditionBuilder(V1CustomResourceDefinitionConditionFluent fluent,V1CustomResourceDefinitionCondition instance) { - this(fluent, instance, false); - } - public V1CustomResourceDefinitionConditionBuilder(V1CustomResourceDefinitionConditionFluent fluent,V1CustomResourceDefinitionCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceDefinitionConditionBuilder(V1CustomResourceDefinitionCondition instance) { - this(instance,false); - } - public V1CustomResourceDefinitionConditionBuilder(V1CustomResourceDefinitionCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceDefinitionConditionFluent fluent; - Boolean validationEnabled; + public V1CustomResourceDefinitionCondition build() { V1CustomResourceDefinitionCondition buildable = new V1CustomResourceDefinitionCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1CustomResourceDefinitionCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionFluent.java index b29533ba5e..05bd26f945 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CustomResourceDefinitionConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceDefinitionConditionFluent> extends BaseFluent{ + public V1CustomResourceDefinitionConditionFluent() { + } + public V1CustomResourceDefinitionConditionFluent(V1CustomResourceDefinitionCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1CustomResourceDefinitionCondition instance) { + instance = (instance != null ? instance : new V1CustomResourceDefinitionCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceDefinitionConditionFluent that = (V1CustomResourceDefinitionConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionFluentImpl.java deleted file mode 100644 index 855e6f8f5e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceDefinitionConditionFluentImpl> extends BaseFluent implements V1CustomResourceDefinitionConditionFluent{ - public V1CustomResourceDefinitionConditionFluentImpl() { - } - public V1CustomResourceDefinitionConditionFluentImpl(V1CustomResourceDefinitionCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceDefinitionConditionFluentImpl that = (V1CustomResourceDefinitionConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionFluent.java index 29af781c01..5bccb78637 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1CustomResourceDefinitionFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1CustomResourceDefinitionFluent.MetadataNested withNewMetadata(); - public V1CustomResourceDefinitionFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1CustomResourceDefinitionFluent.MetadataNested editMetadata(); - public V1CustomResourceDefinitionFluent.MetadataNested editOrNewMetadata(); - public V1CustomResourceDefinitionFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceDefinitionSpec getSpec(); - public V1CustomResourceDefinitionSpec buildSpec(); - public A withSpec(V1CustomResourceDefinitionSpec spec); - public Boolean hasSpec(); - public V1CustomResourceDefinitionFluent.SpecNested withNewSpec(); - public V1CustomResourceDefinitionFluent.SpecNested withNewSpecLike(V1CustomResourceDefinitionSpec item); - public V1CustomResourceDefinitionFluent.SpecNested editSpec(); - public V1CustomResourceDefinitionFluent.SpecNested editOrNewSpec(); - public V1CustomResourceDefinitionFluent.SpecNested editOrNewSpecLike(V1CustomResourceDefinitionSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceDefinitionStatus getStatus(); - public V1CustomResourceDefinitionStatus buildStatus(); - public A withStatus(V1CustomResourceDefinitionStatus status); - public Boolean hasStatus(); - public V1CustomResourceDefinitionFluent.StatusNested withNewStatus(); - public V1CustomResourceDefinitionFluent.StatusNested withNewStatusLike(V1CustomResourceDefinitionStatus item); - public V1CustomResourceDefinitionFluent.StatusNested editStatus(); - public V1CustomResourceDefinitionFluent.StatusNested editOrNewStatus(); - public V1CustomResourceDefinitionFluent.StatusNested editOrNewStatusLike(V1CustomResourceDefinitionStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceDefinitionFluent> extends BaseFluent{ + public V1CustomResourceDefinitionFluent() { + } + + public V1CustomResourceDefinitionFluent(V1CustomResourceDefinition instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1CustomResourceDefinitionSpecBuilder spec; + private V1CustomResourceDefinitionStatusBuilder status; + + protected void copyInstance(V1CustomResourceDefinition instance) { + instance = (instance != null ? instance : new V1CustomResourceDefinition()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1CustomResourceDefinitionSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1CustomResourceDefinitionSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1CustomResourceDefinitionSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1CustomResourceDefinitionSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1CustomResourceDefinitionSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1CustomResourceDefinitionSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1CustomResourceDefinitionSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1CustomResourceDefinitionStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1CustomResourceDefinitionStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1CustomResourceDefinitionStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1CustomResourceDefinitionStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1CustomResourceDefinitionStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1CustomResourceDefinitionStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceDefinitionFluent that = (V1CustomResourceDefinitionFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1CustomResourceDefinitionFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1CustomResourceDefinitionStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1CustomResourceDefinitionSpecFluent> implements Nested{ + SpecNested(V1CustomResourceDefinitionSpec item) { + this.builder = new V1CustomResourceDefinitionSpecBuilder(this, item); + } + V1CustomResourceDefinitionSpecBuilder builder; + + public N and() { + return (N) V1CustomResourceDefinitionFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1CustomResourceDefinitionStatusFluent> implements Nested{ + StatusNested(V1CustomResourceDefinitionStatus item) { + this.builder = new V1CustomResourceDefinitionStatusBuilder(this, item); + } + V1CustomResourceDefinitionStatusBuilder builder; + + public N and() { + return (N) V1CustomResourceDefinitionFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionFluentImpl.java deleted file mode 100644 index 6595a6eb80..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceDefinitionFluentImpl> extends BaseFluent implements V1CustomResourceDefinitionFluent{ - public V1CustomResourceDefinitionFluentImpl() { - } - public V1CustomResourceDefinitionFluentImpl(V1CustomResourceDefinition instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1CustomResourceDefinitionSpecBuilder spec; - private V1CustomResourceDefinitionStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1CustomResourceDefinitionFluentImpl.MetadataNested withNewMetadata() { - return new V1CustomResourceDefinitionFluentImpl.MetadataNestedImpl(); - } - public V1CustomResourceDefinitionFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1CustomResourceDefinitionFluentImpl.MetadataNestedImpl(item); - } - public V1CustomResourceDefinitionFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CustomResourceDefinitionFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1CustomResourceDefinitionFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceDefinitionSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1CustomResourceDefinitionSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1CustomResourceDefinitionSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1CustomResourceDefinitionSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1CustomResourceDefinitionFluentImpl.SpecNested withNewSpec() { - return new V1CustomResourceDefinitionFluentImpl.SpecNestedImpl(); - } - public V1CustomResourceDefinitionFluentImpl.SpecNested withNewSpecLike(V1CustomResourceDefinitionSpec item) { - return new V1CustomResourceDefinitionFluentImpl.SpecNestedImpl(item); - } - public V1CustomResourceDefinitionFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1CustomResourceDefinitionFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1CustomResourceDefinitionSpecBuilder().build()); - } - public V1CustomResourceDefinitionFluentImpl.SpecNested editOrNewSpecLike(V1CustomResourceDefinitionSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceDefinitionStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1CustomResourceDefinitionStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1CustomResourceDefinitionStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1CustomResourceDefinitionStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1CustomResourceDefinitionFluentImpl.StatusNested withNewStatus() { - return new V1CustomResourceDefinitionFluentImpl.StatusNestedImpl(); - } - public V1CustomResourceDefinitionFluentImpl.StatusNested withNewStatusLike(V1CustomResourceDefinitionStatus item) { - return new V1CustomResourceDefinitionFluentImpl.StatusNestedImpl(item); - } - public V1CustomResourceDefinitionFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1CustomResourceDefinitionFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1CustomResourceDefinitionStatusBuilder().build()); - } - public V1CustomResourceDefinitionFluentImpl.StatusNested editOrNewStatusLike(V1CustomResourceDefinitionStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceDefinitionFluentImpl that = (V1CustomResourceDefinitionFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1CustomResourceDefinitionFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1CustomResourceDefinitionFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1CustomResourceDefinitionSpecFluentImpl> implements V1CustomResourceDefinitionFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1CustomResourceDefinitionSpec item) { - this.builder = new V1CustomResourceDefinitionSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1CustomResourceDefinitionSpecBuilder(this); - } - V1CustomResourceDefinitionSpecBuilder builder; - public N and() { - return (N) V1CustomResourceDefinitionFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1CustomResourceDefinitionStatusFluentImpl> implements V1CustomResourceDefinitionFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1CustomResourceDefinitionStatus item) { - this.builder = new V1CustomResourceDefinitionStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1CustomResourceDefinitionStatusBuilder(this); - } - V1CustomResourceDefinitionStatusBuilder builder; - public N and() { - return (N) V1CustomResourceDefinitionFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListBuilder.java index 1f988eeb99..ea759bba05 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceDefinitionListBuilder extends V1CustomResourceDefinitionListFluentImpl implements VisitableBuilder{ +public class V1CustomResourceDefinitionListBuilder extends V1CustomResourceDefinitionListFluent implements VisitableBuilder{ public V1CustomResourceDefinitionListBuilder() { - this(false); - } - public V1CustomResourceDefinitionListBuilder(Boolean validationEnabled) { - this(new V1CustomResourceDefinitionList(), validationEnabled); + this(new V1CustomResourceDefinitionList()); } + public V1CustomResourceDefinitionListBuilder(V1CustomResourceDefinitionListFluent fluent) { - this(fluent, false); - } - public V1CustomResourceDefinitionListBuilder(V1CustomResourceDefinitionListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceDefinitionList(), validationEnabled); + this(fluent, new V1CustomResourceDefinitionList()); } + public V1CustomResourceDefinitionListBuilder(V1CustomResourceDefinitionListFluent fluent,V1CustomResourceDefinitionList instance) { - this(fluent, instance, false); - } - public V1CustomResourceDefinitionListBuilder(V1CustomResourceDefinitionListFluent fluent,V1CustomResourceDefinitionList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceDefinitionListBuilder(V1CustomResourceDefinitionList instance) { - this(instance,false); - } - public V1CustomResourceDefinitionListBuilder(V1CustomResourceDefinitionList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceDefinitionListFluent fluent; - Boolean validationEnabled; + public V1CustomResourceDefinitionList build() { V1CustomResourceDefinitionList buildable = new V1CustomResourceDefinitionList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListFluent.java index ffc5bb2afa..aff849500f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CustomResourceDefinitionListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1CustomResourceDefinition item); - public A setToItems(int index,V1CustomResourceDefinition item); - public A addToItems(io.kubernetes.client.openapi.models.V1CustomResourceDefinition... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1CustomResourceDefinition... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1CustomResourceDefinition buildItem(int index); - public V1CustomResourceDefinition buildFirstItem(); - public V1CustomResourceDefinition buildLastItem(); - public V1CustomResourceDefinition buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1CustomResourceDefinition... items); - public Boolean hasItems(); - public V1CustomResourceDefinitionListFluent.ItemsNested addNewItem(); - public V1CustomResourceDefinitionListFluent.ItemsNested addNewItemLike(V1CustomResourceDefinition item); - public V1CustomResourceDefinitionListFluent.ItemsNested setNewItemLike(int index,V1CustomResourceDefinition item); - public V1CustomResourceDefinitionListFluent.ItemsNested editItem(int index); - public V1CustomResourceDefinitionListFluent.ItemsNested editFirstItem(); - public V1CustomResourceDefinitionListFluent.ItemsNested editLastItem(); - public V1CustomResourceDefinitionListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1CustomResourceDefinitionListFluent.MetadataNested withNewMetadata(); - public V1CustomResourceDefinitionListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1CustomResourceDefinitionListFluent.MetadataNested editMetadata(); - public V1CustomResourceDefinitionListFluent.MetadataNested editOrNewMetadata(); - public V1CustomResourceDefinitionListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1CustomResourceDefinitionFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceDefinitionListFluent> extends BaseFluent{ + public V1CustomResourceDefinitionListFluent() { + } + + public V1CustomResourceDefinitionListFluent(V1CustomResourceDefinitionList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1CustomResourceDefinitionList instance) { + instance = (instance != null ? instance : new V1CustomResourceDefinitionList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1CustomResourceDefinition item) { + if (this.items == null) {this.items = new ArrayList();} + V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1CustomResourceDefinition item) { + if (this.items == null) {this.items = new ArrayList();} + V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1CustomResourceDefinition... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CustomResourceDefinition item : items) {V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1CustomResourceDefinition item : items) {V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1CustomResourceDefinition... items) { + if (this.items == null) return (A)this; + for (V1CustomResourceDefinition item : items) {V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1CustomResourceDefinition item : items) {V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1CustomResourceDefinitionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1CustomResourceDefinition buildItem(int index) { + return this.items.get(index).build(); + } + + public V1CustomResourceDefinition buildFirstItem() { + return this.items.get(0).build(); + } + + public V1CustomResourceDefinition buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1CustomResourceDefinition buildMatchingItem(Predicate predicate) { + for (V1CustomResourceDefinitionBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1CustomResourceDefinitionBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1CustomResourceDefinition item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1CustomResourceDefinition... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1CustomResourceDefinition item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1CustomResourceDefinition item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1CustomResourceDefinition item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceDefinitionListFluent that = (V1CustomResourceDefinitionListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1CustomResourceDefinitionFluent> implements Nested{ + ItemsNested(int index,V1CustomResourceDefinition item) { + this.index = index; + this.builder = new V1CustomResourceDefinitionBuilder(this, item); + } + V1CustomResourceDefinitionBuilder builder; + int index; + public N and() { + return (N) V1CustomResourceDefinitionListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1CustomResourceDefinitionListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListFluentImpl.java deleted file mode 100644 index 5930f0115d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceDefinitionListFluentImpl> extends BaseFluent implements V1CustomResourceDefinitionListFluent{ - public V1CustomResourceDefinitionListFluentImpl() { - } - public V1CustomResourceDefinitionListFluentImpl(V1CustomResourceDefinitionList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1CustomResourceDefinition item) { - if (this.items == null) {this.items = new ArrayList();} - V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1CustomResourceDefinition item) { - if (this.items == null) {this.items = new ArrayList();} - V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1CustomResourceDefinition... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CustomResourceDefinition item : items) {V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1CustomResourceDefinition item : items) {V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1CustomResourceDefinition... items) { - for (V1CustomResourceDefinition item : items) {V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1CustomResourceDefinition item : items) {V1CustomResourceDefinitionBuilder builder = new V1CustomResourceDefinitionBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1CustomResourceDefinitionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1CustomResourceDefinition buildItem(int index) { - return this.items.get(index).build(); - } - public V1CustomResourceDefinition buildFirstItem() { - return this.items.get(0).build(); - } - public V1CustomResourceDefinition buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1CustomResourceDefinition buildMatchingItem(Predicate predicate) { - for (V1CustomResourceDefinitionBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1CustomResourceDefinitionBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1CustomResourceDefinition item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1CustomResourceDefinition... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1CustomResourceDefinition item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1CustomResourceDefinitionListFluentImpl.ItemsNested addNewItem() { - return new V1CustomResourceDefinitionListFluentImpl.ItemsNestedImpl(); - } - public V1CustomResourceDefinitionListFluentImpl.ItemsNested addNewItemLike(V1CustomResourceDefinition item) { - return new V1CustomResourceDefinitionListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1CustomResourceDefinitionListFluentImpl.ItemsNested setNewItemLike(int index,V1CustomResourceDefinition item) { - return new V1CustomResourceDefinitionListFluentImpl.ItemsNestedImpl(index, item); - } - public V1CustomResourceDefinitionListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1CustomResourceDefinitionListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1CustomResourceDefinitionListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1CustomResourceDefinitionListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1CustomResourceDefinitionListFluentImpl.MetadataNestedImpl(); - } - public V1CustomResourceDefinitionListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1CustomResourceDefinitionListFluentImpl.MetadataNestedImpl(item); - } - public V1CustomResourceDefinitionListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1CustomResourceDefinitionListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1CustomResourceDefinitionListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceDefinitionListFluentImpl that = (V1CustomResourceDefinitionListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1CustomResourceDefinitionFluentImpl> implements V1CustomResourceDefinitionListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1CustomResourceDefinition item) { - this.index = index; - this.builder = new V1CustomResourceDefinitionBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1CustomResourceDefinitionBuilder(this); - } - V1CustomResourceDefinitionBuilder builder; - int index; - public N and() { - return (N) V1CustomResourceDefinitionListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1CustomResourceDefinitionListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1CustomResourceDefinitionListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesBuilder.java index 6b256abd64..ea5614c7c7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceDefinitionNamesBuilder extends V1CustomResourceDefinitionNamesFluentImpl implements VisitableBuilder{ +public class V1CustomResourceDefinitionNamesBuilder extends V1CustomResourceDefinitionNamesFluent implements VisitableBuilder{ public V1CustomResourceDefinitionNamesBuilder() { - this(false); - } - public V1CustomResourceDefinitionNamesBuilder(Boolean validationEnabled) { - this(new V1CustomResourceDefinitionNames(), validationEnabled); + this(new V1CustomResourceDefinitionNames()); } + public V1CustomResourceDefinitionNamesBuilder(V1CustomResourceDefinitionNamesFluent fluent) { - this(fluent, false); - } - public V1CustomResourceDefinitionNamesBuilder(V1CustomResourceDefinitionNamesFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceDefinitionNames(), validationEnabled); + this(fluent, new V1CustomResourceDefinitionNames()); } + public V1CustomResourceDefinitionNamesBuilder(V1CustomResourceDefinitionNamesFluent fluent,V1CustomResourceDefinitionNames instance) { - this(fluent, instance, false); - } - public V1CustomResourceDefinitionNamesBuilder(V1CustomResourceDefinitionNamesFluent fluent,V1CustomResourceDefinitionNames instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCategories(instance.getCategories()); - fluent.withKind(instance.getKind()); - fluent.withListKind(instance.getListKind()); - fluent.withPlural(instance.getPlural()); - fluent.withShortNames(instance.getShortNames()); - fluent.withSingular(instance.getSingular()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceDefinitionNamesBuilder(V1CustomResourceDefinitionNames instance) { - this(instance,false); - } - public V1CustomResourceDefinitionNamesBuilder(V1CustomResourceDefinitionNames instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCategories(instance.getCategories()); - this.withKind(instance.getKind()); - this.withListKind(instance.getListKind()); - this.withPlural(instance.getPlural()); - this.withShortNames(instance.getShortNames()); - this.withSingular(instance.getSingular()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceDefinitionNamesFluent fluent; - Boolean validationEnabled; + public V1CustomResourceDefinitionNames build() { V1CustomResourceDefinitionNames buildable = new V1CustomResourceDefinitionNames(); buildable.setCategories(fluent.getCategories()); @@ -58,4 +32,5 @@ public V1CustomResourceDefinitionNames build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesFluent.java index db50167206..03606e4b39 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesFluent.java @@ -1,59 +1,314 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1CustomResourceDefinitionNamesFluent> extends Fluent{ - public A addToCategories(int index,String item); - public A setToCategories(int index,String item); - public A addToCategories(java.lang.String... items); - public A addAllToCategories(Collection items); - public A removeFromCategories(java.lang.String... items); - public A removeAllFromCategories(Collection items); - public List getCategories(); - public String getCategory(int index); - public String getFirstCategory(); - public String getLastCategory(); - public String getMatchingCategory(Predicate predicate); - public Boolean hasMatchingCategory(Predicate predicate); - public A withCategories(List categories); - public A withCategories(java.lang.String... categories); - public Boolean hasCategories(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getListKind(); - public A withListKind(String listKind); - public Boolean hasListKind(); - public String getPlural(); - public A withPlural(String plural); - public Boolean hasPlural(); - public A addToShortNames(int index,String item); - public A setToShortNames(int index,String item); - public A addToShortNames(java.lang.String... items); - public A addAllToShortNames(Collection items); - public A removeFromShortNames(java.lang.String... items); - public A removeAllFromShortNames(Collection items); - public List getShortNames(); - public String getShortName(int index); - public String getFirstShortName(); - public String getLastShortName(); - public String getMatchingShortName(Predicate predicate); - public Boolean hasMatchingShortName(Predicate predicate); - public A withShortNames(List shortNames); - public A withShortNames(java.lang.String... shortNames); - public Boolean hasShortNames(); - public String getSingular(); - public A withSingular(String singular); - public Boolean hasSingular(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceDefinitionNamesFluent> extends BaseFluent{ + public V1CustomResourceDefinitionNamesFluent() { + } + public V1CustomResourceDefinitionNamesFluent(V1CustomResourceDefinitionNames instance) { + this.copyInstance(instance); + } + private List categories; + private String kind; + private String listKind; + private String plural; + private List shortNames; + private String singular; + + protected void copyInstance(V1CustomResourceDefinitionNames instance) { + instance = (instance != null ? instance : new V1CustomResourceDefinitionNames()); + if (instance != null) { + this.withCategories(instance.getCategories()); + this.withKind(instance.getKind()); + this.withListKind(instance.getListKind()); + this.withPlural(instance.getPlural()); + this.withShortNames(instance.getShortNames()); + this.withSingular(instance.getSingular()); + } + } + + public A addToCategories(int index,String item) { + if (this.categories == null) {this.categories = new ArrayList();} + this.categories.add(index, item); + return (A)this; + } + + public A setToCategories(int index,String item) { + if (this.categories == null) {this.categories = new ArrayList();} + this.categories.set(index, item); return (A)this; + } + + public A addToCategories(java.lang.String... items) { + if (this.categories == null) {this.categories = new ArrayList();} + for (String item : items) {this.categories.add(item);} return (A)this; + } + + public A addAllToCategories(Collection items) { + if (this.categories == null) {this.categories = new ArrayList();} + for (String item : items) {this.categories.add(item);} return (A)this; + } + + public A removeFromCategories(java.lang.String... items) { + if (this.categories == null) return (A)this; + for (String item : items) { this.categories.remove(item);} return (A)this; + } + + public A removeAllFromCategories(Collection items) { + if (this.categories == null) return (A)this; + for (String item : items) { this.categories.remove(item);} return (A)this; + } + + public List getCategories() { + return this.categories; + } + + public String getCategory(int index) { + return this.categories.get(index); + } + + public String getFirstCategory() { + return this.categories.get(0); + } + + public String getLastCategory() { + return this.categories.get(categories.size() - 1); + } + + public String getMatchingCategory(Predicate predicate) { + for (String item : categories) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingCategory(Predicate predicate) { + for (String item : categories) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withCategories(List categories) { + if (categories != null) { + this.categories = new ArrayList(); + for (String item : categories) { + this.addToCategories(item); + } + } else { + this.categories = null; + } + return (A) this; + } + + public A withCategories(java.lang.String... categories) { + if (this.categories != null) { + this.categories.clear(); + _visitables.remove("categories"); + } + if (categories != null) { + for (String item : categories) { + this.addToCategories(item); + } + } + return (A) this; + } + + public boolean hasCategories() { + return this.categories != null && !this.categories.isEmpty(); + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getListKind() { + return this.listKind; + } + + public A withListKind(String listKind) { + this.listKind = listKind; + return (A) this; + } + + public boolean hasListKind() { + return this.listKind != null; + } + + public String getPlural() { + return this.plural; + } + + public A withPlural(String plural) { + this.plural = plural; + return (A) this; + } + + public boolean hasPlural() { + return this.plural != null; + } + + public A addToShortNames(int index,String item) { + if (this.shortNames == null) {this.shortNames = new ArrayList();} + this.shortNames.add(index, item); + return (A)this; + } + + public A setToShortNames(int index,String item) { + if (this.shortNames == null) {this.shortNames = new ArrayList();} + this.shortNames.set(index, item); return (A)this; + } + + public A addToShortNames(java.lang.String... items) { + if (this.shortNames == null) {this.shortNames = new ArrayList();} + for (String item : items) {this.shortNames.add(item);} return (A)this; + } + + public A addAllToShortNames(Collection items) { + if (this.shortNames == null) {this.shortNames = new ArrayList();} + for (String item : items) {this.shortNames.add(item);} return (A)this; + } + + public A removeFromShortNames(java.lang.String... items) { + if (this.shortNames == null) return (A)this; + for (String item : items) { this.shortNames.remove(item);} return (A)this; + } + + public A removeAllFromShortNames(Collection items) { + if (this.shortNames == null) return (A)this; + for (String item : items) { this.shortNames.remove(item);} return (A)this; + } + + public List getShortNames() { + return this.shortNames; + } + + public String getShortName(int index) { + return this.shortNames.get(index); + } + + public String getFirstShortName() { + return this.shortNames.get(0); + } + + public String getLastShortName() { + return this.shortNames.get(shortNames.size() - 1); + } + + public String getMatchingShortName(Predicate predicate) { + for (String item : shortNames) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingShortName(Predicate predicate) { + for (String item : shortNames) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withShortNames(List shortNames) { + if (shortNames != null) { + this.shortNames = new ArrayList(); + for (String item : shortNames) { + this.addToShortNames(item); + } + } else { + this.shortNames = null; + } + return (A) this; + } + + public A withShortNames(java.lang.String... shortNames) { + if (this.shortNames != null) { + this.shortNames.clear(); + _visitables.remove("shortNames"); + } + if (shortNames != null) { + for (String item : shortNames) { + this.addToShortNames(item); + } + } + return (A) this; + } + + public boolean hasShortNames() { + return this.shortNames != null && !this.shortNames.isEmpty(); + } + + public String getSingular() { + return this.singular; + } + + public A withSingular(String singular) { + this.singular = singular; + return (A) this; + } + + public boolean hasSingular() { + return this.singular != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceDefinitionNamesFluent that = (V1CustomResourceDefinitionNamesFluent) o; + if (!java.util.Objects.equals(categories, that.categories)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(listKind, that.listKind)) return false; + if (!java.util.Objects.equals(plural, that.plural)) return false; + if (!java.util.Objects.equals(shortNames, that.shortNames)) return false; + if (!java.util.Objects.equals(singular, that.singular)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(categories, kind, listKind, plural, shortNames, singular, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (categories != null && !categories.isEmpty()) { sb.append("categories:"); sb.append(categories + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (listKind != null) { sb.append("listKind:"); sb.append(listKind + ","); } + if (plural != null) { sb.append("plural:"); sb.append(plural + ","); } + if (shortNames != null && !shortNames.isEmpty()) { sb.append("shortNames:"); sb.append(shortNames + ","); } + if (singular != null) { sb.append("singular:"); sb.append(singular); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesFluentImpl.java deleted file mode 100644 index 70901f5d8e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionNamesFluentImpl.java +++ /dev/null @@ -1,209 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceDefinitionNamesFluentImpl> extends BaseFluent implements V1CustomResourceDefinitionNamesFluent{ - public V1CustomResourceDefinitionNamesFluentImpl() { - } - public V1CustomResourceDefinitionNamesFluentImpl(V1CustomResourceDefinitionNames instance) { - if (instance != null) { - this.withCategories(instance.getCategories()); - this.withKind(instance.getKind()); - this.withListKind(instance.getListKind()); - this.withPlural(instance.getPlural()); - this.withShortNames(instance.getShortNames()); - this.withSingular(instance.getSingular()); - } - } - private List categories; - private String kind; - private String listKind; - private String plural; - private List shortNames; - private String singular; - public A addToCategories(int index,String item) { - if (this.categories == null) {this.categories = new ArrayList();} - this.categories.add(index, item); - return (A)this; - } - public A setToCategories(int index,String item) { - if (this.categories == null) {this.categories = new ArrayList();} - this.categories.set(index, item); return (A)this; - } - public A addToCategories(java.lang.String... items) { - if (this.categories == null) {this.categories = new ArrayList();} - for (String item : items) {this.categories.add(item);} return (A)this; - } - public A addAllToCategories(Collection items) { - if (this.categories == null) {this.categories = new ArrayList();} - for (String item : items) {this.categories.add(item);} return (A)this; - } - public A removeFromCategories(java.lang.String... items) { - for (String item : items) {if (this.categories!= null){ this.categories.remove(item);}} return (A)this; - } - public A removeAllFromCategories(Collection items) { - for (String item : items) {if (this.categories!= null){ this.categories.remove(item);}} return (A)this; - } - public List getCategories() { - return this.categories; - } - public String getCategory(int index) { - return this.categories.get(index); - } - public String getFirstCategory() { - return this.categories.get(0); - } - public String getLastCategory() { - return this.categories.get(categories.size() - 1); - } - public String getMatchingCategory(Predicate predicate) { - for (String item: categories) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingCategory(Predicate predicate) { - for (String item: categories) { if(predicate.test(item)){ return true;} } return false; - } - public A withCategories(List categories) { - if (categories != null) {this.categories = new ArrayList(); for (String item : categories){this.addToCategories(item);}} else { this.categories = null;} return (A) this; - } - public A withCategories(java.lang.String... categories) { - if (this.categories != null) {this.categories.clear(); _visitables.remove("categories"); } - if (categories != null) {for (String item :categories){ this.addToCategories(item);}} return (A) this; - } - public Boolean hasCategories() { - return categories != null && !categories.isEmpty(); - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getListKind() { - return this.listKind; - } - public A withListKind(String listKind) { - this.listKind=listKind; return (A) this; - } - public Boolean hasListKind() { - return this.listKind != null; - } - public String getPlural() { - return this.plural; - } - public A withPlural(String plural) { - this.plural=plural; return (A) this; - } - public Boolean hasPlural() { - return this.plural != null; - } - public A addToShortNames(int index,String item) { - if (this.shortNames == null) {this.shortNames = new ArrayList();} - this.shortNames.add(index, item); - return (A)this; - } - public A setToShortNames(int index,String item) { - if (this.shortNames == null) {this.shortNames = new ArrayList();} - this.shortNames.set(index, item); return (A)this; - } - public A addToShortNames(java.lang.String... items) { - if (this.shortNames == null) {this.shortNames = new ArrayList();} - for (String item : items) {this.shortNames.add(item);} return (A)this; - } - public A addAllToShortNames(Collection items) { - if (this.shortNames == null) {this.shortNames = new ArrayList();} - for (String item : items) {this.shortNames.add(item);} return (A)this; - } - public A removeFromShortNames(java.lang.String... items) { - for (String item : items) {if (this.shortNames!= null){ this.shortNames.remove(item);}} return (A)this; - } - public A removeAllFromShortNames(Collection items) { - for (String item : items) {if (this.shortNames!= null){ this.shortNames.remove(item);}} return (A)this; - } - public List getShortNames() { - return this.shortNames; - } - public String getShortName(int index) { - return this.shortNames.get(index); - } - public String getFirstShortName() { - return this.shortNames.get(0); - } - public String getLastShortName() { - return this.shortNames.get(shortNames.size() - 1); - } - public String getMatchingShortName(Predicate predicate) { - for (String item: shortNames) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingShortName(Predicate predicate) { - for (String item: shortNames) { if(predicate.test(item)){ return true;} } return false; - } - public A withShortNames(List shortNames) { - if (shortNames != null) {this.shortNames = new ArrayList(); for (String item : shortNames){this.addToShortNames(item);}} else { this.shortNames = null;} return (A) this; - } - public A withShortNames(java.lang.String... shortNames) { - if (this.shortNames != null) {this.shortNames.clear(); _visitables.remove("shortNames"); } - if (shortNames != null) {for (String item :shortNames){ this.addToShortNames(item);}} return (A) this; - } - public Boolean hasShortNames() { - return shortNames != null && !shortNames.isEmpty(); - } - public String getSingular() { - return this.singular; - } - public A withSingular(String singular) { - this.singular=singular; return (A) this; - } - public Boolean hasSingular() { - return this.singular != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceDefinitionNamesFluentImpl that = (V1CustomResourceDefinitionNamesFluentImpl) o; - if (!java.util.Objects.equals(categories, that.categories)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(listKind, that.listKind)) return false; - - if (!java.util.Objects.equals(plural, that.plural)) return false; - - if (!java.util.Objects.equals(shortNames, that.shortNames)) return false; - - if (!java.util.Objects.equals(singular, that.singular)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(categories, kind, listKind, plural, shortNames, singular, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (categories != null && !categories.isEmpty()) { sb.append("categories:"); sb.append(categories + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (listKind != null) { sb.append("listKind:"); sb.append(listKind + ","); } - if (plural != null) { sb.append("plural:"); sb.append(plural + ","); } - if (shortNames != null && !shortNames.isEmpty()) { sb.append("shortNames:"); sb.append(shortNames + ","); } - if (singular != null) { sb.append("singular:"); sb.append(singular); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecBuilder.java index e03da75a47..0f008a3c5e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceDefinitionSpecBuilder extends V1CustomResourceDefinitionSpecFluentImpl implements VisitableBuilder{ +public class V1CustomResourceDefinitionSpecBuilder extends V1CustomResourceDefinitionSpecFluent implements VisitableBuilder{ public V1CustomResourceDefinitionSpecBuilder() { - this(false); - } - public V1CustomResourceDefinitionSpecBuilder(Boolean validationEnabled) { - this(new V1CustomResourceDefinitionSpec(), validationEnabled); + this(new V1CustomResourceDefinitionSpec()); } + public V1CustomResourceDefinitionSpecBuilder(V1CustomResourceDefinitionSpecFluent fluent) { - this(fluent, false); - } - public V1CustomResourceDefinitionSpecBuilder(V1CustomResourceDefinitionSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceDefinitionSpec(), validationEnabled); + this(fluent, new V1CustomResourceDefinitionSpec()); } + public V1CustomResourceDefinitionSpecBuilder(V1CustomResourceDefinitionSpecFluent fluent,V1CustomResourceDefinitionSpec instance) { - this(fluent, instance, false); - } - public V1CustomResourceDefinitionSpecBuilder(V1CustomResourceDefinitionSpecFluent fluent,V1CustomResourceDefinitionSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConversion(instance.getConversion()); - fluent.withGroup(instance.getGroup()); - fluent.withNames(instance.getNames()); - fluent.withPreserveUnknownFields(instance.getPreserveUnknownFields()); - fluent.withScope(instance.getScope()); - fluent.withVersions(instance.getVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceDefinitionSpecBuilder(V1CustomResourceDefinitionSpec instance) { - this(instance,false); - } - public V1CustomResourceDefinitionSpecBuilder(V1CustomResourceDefinitionSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConversion(instance.getConversion()); - this.withGroup(instance.getGroup()); - this.withNames(instance.getNames()); - this.withPreserveUnknownFields(instance.getPreserveUnknownFields()); - this.withScope(instance.getScope()); - this.withVersions(instance.getVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceDefinitionSpecFluent fluent; - Boolean validationEnabled; + public V1CustomResourceDefinitionSpec build() { V1CustomResourceDefinitionSpec buildable = new V1CustomResourceDefinitionSpec(); - buildable.setConversion(fluent.getConversion()); + buildable.setConversion(fluent.buildConversion()); buildable.setGroup(fluent.getGroup()); - buildable.setNames(fluent.getNames()); + buildable.setNames(fluent.buildNames()); buildable.setPreserveUnknownFields(fluent.getPreserveUnknownFields()); buildable.setScope(fluent.getScope()); - buildable.setVersions(fluent.getVersions()); + buildable.setVersions(fluent.buildVersions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecFluent.java index 1d4b7ca614..ac19ae4b7c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecFluent.java @@ -1,106 +1,401 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1CustomResourceDefinitionSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildConversion instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceConversion getConversion(); - public V1CustomResourceConversion buildConversion(); - public A withConversion(V1CustomResourceConversion conversion); - public Boolean hasConversion(); - public V1CustomResourceDefinitionSpecFluent.ConversionNested withNewConversion(); - public V1CustomResourceDefinitionSpecFluent.ConversionNested withNewConversionLike(V1CustomResourceConversion item); - public V1CustomResourceDefinitionSpecFluent.ConversionNested editConversion(); - public V1CustomResourceDefinitionSpecFluent.ConversionNested editOrNewConversion(); - public V1CustomResourceDefinitionSpecFluent.ConversionNested editOrNewConversionLike(V1CustomResourceConversion item); - public String getGroup(); - public A withGroup(String group); - public Boolean hasGroup(); - - /** - * This method has been deprecated, please use method buildNames instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceDefinitionNames getNames(); - public V1CustomResourceDefinitionNames buildNames(); - public A withNames(V1CustomResourceDefinitionNames names); - public Boolean hasNames(); - public V1CustomResourceDefinitionSpecFluent.NamesNested withNewNames(); - public V1CustomResourceDefinitionSpecFluent.NamesNested withNewNamesLike(V1CustomResourceDefinitionNames item); - public V1CustomResourceDefinitionSpecFluent.NamesNested editNames(); - public V1CustomResourceDefinitionSpecFluent.NamesNested editOrNewNames(); - public V1CustomResourceDefinitionSpecFluent.NamesNested editOrNewNamesLike(V1CustomResourceDefinitionNames item); - public Boolean getPreserveUnknownFields(); - public A withPreserveUnknownFields(Boolean preserveUnknownFields); - public Boolean hasPreserveUnknownFields(); - public String getScope(); - public A withScope(String scope); - public Boolean hasScope(); - public A addToVersions(int index,V1CustomResourceDefinitionVersion item); - public A setToVersions(int index,V1CustomResourceDefinitionVersion item); - public A addToVersions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion... items); - public A addAllToVersions(Collection items); - public A removeFromVersions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion... items); - public A removeAllFromVersions(Collection items); - public A removeMatchingFromVersions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildVersions instead. - * @return The buildable object. - */ - @Deprecated - public List getVersions(); - public List buildVersions(); - public V1CustomResourceDefinitionVersion buildVersion(int index); - public V1CustomResourceDefinitionVersion buildFirstVersion(); - public V1CustomResourceDefinitionVersion buildLastVersion(); - public V1CustomResourceDefinitionVersion buildMatchingVersion(Predicate predicate); - public Boolean hasMatchingVersion(Predicate predicate); - public A withVersions(List versions); - public A withVersions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion... versions); - public Boolean hasVersions(); - public V1CustomResourceDefinitionSpecFluent.VersionsNested addNewVersion(); - public V1CustomResourceDefinitionSpecFluent.VersionsNested addNewVersionLike(V1CustomResourceDefinitionVersion item); - public V1CustomResourceDefinitionSpecFluent.VersionsNested setNewVersionLike(int index,V1CustomResourceDefinitionVersion item); - public V1CustomResourceDefinitionSpecFluent.VersionsNested editVersion(int index); - public V1CustomResourceDefinitionSpecFluent.VersionsNested editFirstVersion(); - public V1CustomResourceDefinitionSpecFluent.VersionsNested editLastVersion(); - public V1CustomResourceDefinitionSpecFluent.VersionsNested editMatchingVersion(Predicate predicate); - public A withPreserveUnknownFields(); - public interface ConversionNested extends Nested,V1CustomResourceConversionFluent>{ - public N and(); - public N endConversion(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceDefinitionSpecFluent> extends BaseFluent{ + public V1CustomResourceDefinitionSpecFluent() { + } + + public V1CustomResourceDefinitionSpecFluent(V1CustomResourceDefinitionSpec instance) { + this.copyInstance(instance); + } + private V1CustomResourceConversionBuilder conversion; + private String group; + private V1CustomResourceDefinitionNamesBuilder names; + private Boolean preserveUnknownFields; + private String scope; + private ArrayList versions; + + protected void copyInstance(V1CustomResourceDefinitionSpec instance) { + instance = (instance != null ? instance : new V1CustomResourceDefinitionSpec()); + if (instance != null) { + this.withConversion(instance.getConversion()); + this.withGroup(instance.getGroup()); + this.withNames(instance.getNames()); + this.withPreserveUnknownFields(instance.getPreserveUnknownFields()); + this.withScope(instance.getScope()); + this.withVersions(instance.getVersions()); + } + } + + public V1CustomResourceConversion buildConversion() { + return this.conversion != null ? this.conversion.build() : null; + } + + public A withConversion(V1CustomResourceConversion conversion) { + this._visitables.remove("conversion"); + if (conversion != null) { + this.conversion = new V1CustomResourceConversionBuilder(conversion); + this._visitables.get("conversion").add(this.conversion); + } else { + this.conversion = null; + this._visitables.get("conversion").remove(this.conversion); + } + return (A) this; + } + + public boolean hasConversion() { + return this.conversion != null; + } + + public ConversionNested withNewConversion() { + return new ConversionNested(null); + } + + public ConversionNested withNewConversionLike(V1CustomResourceConversion item) { + return new ConversionNested(item); + } + + public ConversionNested editConversion() { + return withNewConversionLike(java.util.Optional.ofNullable(buildConversion()).orElse(null)); + } + + public ConversionNested editOrNewConversion() { + return withNewConversionLike(java.util.Optional.ofNullable(buildConversion()).orElse(new V1CustomResourceConversionBuilder().build())); + } + + public ConversionNested editOrNewConversionLike(V1CustomResourceConversion item) { + return withNewConversionLike(java.util.Optional.ofNullable(buildConversion()).orElse(item)); + } + + public String getGroup() { + return this.group; + } + + public A withGroup(String group) { + this.group = group; + return (A) this; + } + + public boolean hasGroup() { + return this.group != null; + } + + public V1CustomResourceDefinitionNames buildNames() { + return this.names != null ? this.names.build() : null; + } + + public A withNames(V1CustomResourceDefinitionNames names) { + this._visitables.remove("names"); + if (names != null) { + this.names = new V1CustomResourceDefinitionNamesBuilder(names); + this._visitables.get("names").add(this.names); + } else { + this.names = null; + this._visitables.get("names").remove(this.names); + } + return (A) this; + } + + public boolean hasNames() { + return this.names != null; + } + + public NamesNested withNewNames() { + return new NamesNested(null); + } + + public NamesNested withNewNamesLike(V1CustomResourceDefinitionNames item) { + return new NamesNested(item); + } + + public NamesNested editNames() { + return withNewNamesLike(java.util.Optional.ofNullable(buildNames()).orElse(null)); + } + + public NamesNested editOrNewNames() { + return withNewNamesLike(java.util.Optional.ofNullable(buildNames()).orElse(new V1CustomResourceDefinitionNamesBuilder().build())); + } + + public NamesNested editOrNewNamesLike(V1CustomResourceDefinitionNames item) { + return withNewNamesLike(java.util.Optional.ofNullable(buildNames()).orElse(item)); + } + + public Boolean getPreserveUnknownFields() { + return this.preserveUnknownFields; + } + + public A withPreserveUnknownFields(Boolean preserveUnknownFields) { + this.preserveUnknownFields = preserveUnknownFields; + return (A) this; + } + + public boolean hasPreserveUnknownFields() { + return this.preserveUnknownFields != null; + } + + public String getScope() { + return this.scope; + } + + public A withScope(String scope) { + this.scope = scope; + return (A) this; + } + + public boolean hasScope() { + return this.scope != null; + } + + public A addToVersions(int index,V1CustomResourceDefinitionVersion item) { + if (this.versions == null) {this.versions = new ArrayList();} + V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item); + if (index < 0 || index >= versions.size()) { _visitables.get("versions").add(builder); versions.add(builder); } else { _visitables.get("versions").add(index, builder); versions.add(index, builder);} + return (A)this; + } + + public A setToVersions(int index,V1CustomResourceDefinitionVersion item) { + if (this.versions == null) {this.versions = new ArrayList();} + V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item); + if (index < 0 || index >= versions.size()) { _visitables.get("versions").add(builder); versions.add(builder); } else { _visitables.get("versions").set(index, builder); versions.set(index, builder);} + return (A)this; } - public interface NamesNested extends Nested,V1CustomResourceDefinitionNamesFluent>{ - public N and(); - public N endNames(); + + public A addToVersions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion... items) { + if (this.versions == null) {this.versions = new ArrayList();} + for (V1CustomResourceDefinitionVersion item : items) {V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item);_visitables.get("versions").add(builder);this.versions.add(builder);} return (A)this; + } + + public A addAllToVersions(Collection items) { + if (this.versions == null) {this.versions = new ArrayList();} + for (V1CustomResourceDefinitionVersion item : items) {V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item);_visitables.get("versions").add(builder);this.versions.add(builder);} return (A)this; + } + + public A removeFromVersions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion... items) { + if (this.versions == null) return (A)this; + for (V1CustomResourceDefinitionVersion item : items) {V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item);_visitables.get("versions").remove(builder); this.versions.remove(builder);} return (A)this; + } + + public A removeAllFromVersions(Collection items) { + if (this.versions == null) return (A)this; + for (V1CustomResourceDefinitionVersion item : items) {V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item);_visitables.get("versions").remove(builder); this.versions.remove(builder);} return (A)this; + } + + public A removeMatchingFromVersions(Predicate predicate) { + if (versions == null) return (A) this; + final Iterator each = versions.iterator(); + final List visitables = _visitables.get("versions"); + while (each.hasNext()) { + V1CustomResourceDefinitionVersionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVersions() { + return this.versions != null ? build(versions) : null; + } + + public V1CustomResourceDefinitionVersion buildVersion(int index) { + return this.versions.get(index).build(); + } + + public V1CustomResourceDefinitionVersion buildFirstVersion() { + return this.versions.get(0).build(); + } + + public V1CustomResourceDefinitionVersion buildLastVersion() { + return this.versions.get(versions.size() - 1).build(); + } + + public V1CustomResourceDefinitionVersion buildMatchingVersion(Predicate predicate) { + for (V1CustomResourceDefinitionVersionBuilder item : versions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVersion(Predicate predicate) { + for (V1CustomResourceDefinitionVersionBuilder item : versions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVersions(List versions) { + if (this.versions != null) { + this._visitables.get("versions").clear(); + } + if (versions != null) { + this.versions = new ArrayList(); + for (V1CustomResourceDefinitionVersion item : versions) { + this.addToVersions(item); + } + } else { + this.versions = null; + } + return (A) this; + } + + public A withVersions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion... versions) { + if (this.versions != null) { + this.versions.clear(); + _visitables.remove("versions"); + } + if (versions != null) { + for (V1CustomResourceDefinitionVersion item : versions) { + this.addToVersions(item); + } + } + return (A) this; + } + + public boolean hasVersions() { + return this.versions != null && !this.versions.isEmpty(); + } + + public VersionsNested addNewVersion() { + return new VersionsNested(-1, null); + } + + public VersionsNested addNewVersionLike(V1CustomResourceDefinitionVersion item) { + return new VersionsNested(-1, item); + } + + public VersionsNested setNewVersionLike(int index,V1CustomResourceDefinitionVersion item) { + return new VersionsNested(index, item); + } + + public VersionsNested editVersion(int index) { + if (versions.size() <= index) throw new RuntimeException("Can't edit versions. Index exceeds size."); + return setNewVersionLike(index, buildVersion(index)); + } + + public VersionsNested editFirstVersion() { + if (versions.size() == 0) throw new RuntimeException("Can't edit first versions. The list is empty."); + return setNewVersionLike(0, buildVersion(0)); + } + + public VersionsNested editLastVersion() { + int index = versions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last versions. The list is empty."); + return setNewVersionLike(index, buildVersion(index)); + } + + public VersionsNested editMatchingVersion(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1CustomResourceConversionFluent> implements Nested{ + ConversionNested(V1CustomResourceConversion item) { + this.builder = new V1CustomResourceConversionBuilder(this, item); + } + V1CustomResourceConversionBuilder builder; + public N and() { + return (N) V1CustomResourceDefinitionSpecFluent.this.withConversion(builder.build()); + } + + public N endConversion() { + return and(); + } + + } - public interface VersionsNested extends Nested,V1CustomResourceDefinitionVersionFluent>{ - public N and(); - public N endVersion(); + public class NamesNested extends V1CustomResourceDefinitionNamesFluent> implements Nested{ + NamesNested(V1CustomResourceDefinitionNames item) { + this.builder = new V1CustomResourceDefinitionNamesBuilder(this, item); + } + V1CustomResourceDefinitionNamesBuilder builder; + + public N and() { + return (N) V1CustomResourceDefinitionSpecFluent.this.withNames(builder.build()); + } + public N endNames() { + return and(); + } + + } + public class VersionsNested extends V1CustomResourceDefinitionVersionFluent> implements Nested{ + VersionsNested(int index,V1CustomResourceDefinitionVersion item) { + this.index = index; + this.builder = new V1CustomResourceDefinitionVersionBuilder(this, item); + } + V1CustomResourceDefinitionVersionBuilder builder; + int index; + + public N and() { + return (N) V1CustomResourceDefinitionSpecFluent.this.setToVersions(index,builder.build()); + } + + public N endVersion() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecFluentImpl.java deleted file mode 100644 index 2478980c44..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionSpecFluentImpl.java +++ /dev/null @@ -1,331 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceDefinitionSpecFluentImpl> extends BaseFluent implements V1CustomResourceDefinitionSpecFluent{ - public V1CustomResourceDefinitionSpecFluentImpl() { - } - public V1CustomResourceDefinitionSpecFluentImpl(V1CustomResourceDefinitionSpec instance) { - if (instance != null) { - this.withConversion(instance.getConversion()); - this.withGroup(instance.getGroup()); - this.withNames(instance.getNames()); - this.withPreserveUnknownFields(instance.getPreserveUnknownFields()); - this.withScope(instance.getScope()); - this.withVersions(instance.getVersions()); - } - } - private V1CustomResourceConversionBuilder conversion; - private String group; - private V1CustomResourceDefinitionNamesBuilder names; - private Boolean preserveUnknownFields; - private String scope; - private ArrayList versions; - - /** - * This method has been deprecated, please use method buildConversion instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceConversion getConversion() { - return this.conversion!=null ?this.conversion.build():null; - } - public V1CustomResourceConversion buildConversion() { - return this.conversion!=null ?this.conversion.build():null; - } - public A withConversion(V1CustomResourceConversion conversion) { - _visitables.get("conversion").remove(this.conversion); - if (conversion!=null){ this.conversion= new V1CustomResourceConversionBuilder(conversion); _visitables.get("conversion").add(this.conversion);} else { this.conversion = null; _visitables.get("conversion").remove(this.conversion); } return (A) this; - } - public Boolean hasConversion() { - return this.conversion != null; - } - public V1CustomResourceDefinitionSpecFluentImpl.ConversionNested withNewConversion() { - return new V1CustomResourceDefinitionSpecFluentImpl.ConversionNestedImpl(); - } - public V1CustomResourceDefinitionSpecFluentImpl.ConversionNested withNewConversionLike(V1CustomResourceConversion item) { - return new V1CustomResourceDefinitionSpecFluentImpl.ConversionNestedImpl(item); - } - public V1CustomResourceDefinitionSpecFluentImpl.ConversionNested editConversion() { - return withNewConversionLike(getConversion()); - } - public V1CustomResourceDefinitionSpecFluentImpl.ConversionNested editOrNewConversion() { - return withNewConversionLike(getConversion() != null ? getConversion(): new V1CustomResourceConversionBuilder().build()); - } - public V1CustomResourceDefinitionSpecFluentImpl.ConversionNested editOrNewConversionLike(V1CustomResourceConversion item) { - return withNewConversionLike(getConversion() != null ? getConversion(): item); - } - public String getGroup() { - return this.group; - } - public A withGroup(String group) { - this.group=group; return (A) this; - } - public Boolean hasGroup() { - return this.group != null; - } - - /** - * This method has been deprecated, please use method buildNames instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceDefinitionNames getNames() { - return this.names!=null ?this.names.build():null; - } - public V1CustomResourceDefinitionNames buildNames() { - return this.names!=null ?this.names.build():null; - } - public A withNames(V1CustomResourceDefinitionNames names) { - _visitables.get("names").remove(this.names); - if (names!=null){ this.names= new V1CustomResourceDefinitionNamesBuilder(names); _visitables.get("names").add(this.names);} else { this.names = null; _visitables.get("names").remove(this.names); } return (A) this; - } - public Boolean hasNames() { - return this.names != null; - } - public V1CustomResourceDefinitionSpecFluentImpl.NamesNested withNewNames() { - return new V1CustomResourceDefinitionSpecFluentImpl.NamesNestedImpl(); - } - public V1CustomResourceDefinitionSpecFluentImpl.NamesNested withNewNamesLike(V1CustomResourceDefinitionNames item) { - return new V1CustomResourceDefinitionSpecFluentImpl.NamesNestedImpl(item); - } - public V1CustomResourceDefinitionSpecFluentImpl.NamesNested editNames() { - return withNewNamesLike(getNames()); - } - public V1CustomResourceDefinitionSpecFluentImpl.NamesNested editOrNewNames() { - return withNewNamesLike(getNames() != null ? getNames(): new V1CustomResourceDefinitionNamesBuilder().build()); - } - public V1CustomResourceDefinitionSpecFluentImpl.NamesNested editOrNewNamesLike(V1CustomResourceDefinitionNames item) { - return withNewNamesLike(getNames() != null ? getNames(): item); - } - public Boolean getPreserveUnknownFields() { - return this.preserveUnknownFields; - } - public A withPreserveUnknownFields(Boolean preserveUnknownFields) { - this.preserveUnknownFields=preserveUnknownFields; return (A) this; - } - public Boolean hasPreserveUnknownFields() { - return this.preserveUnknownFields != null; - } - public String getScope() { - return this.scope; - } - public A withScope(String scope) { - this.scope=scope; return (A) this; - } - public Boolean hasScope() { - return this.scope != null; - } - public A addToVersions(int index,V1CustomResourceDefinitionVersion item) { - if (this.versions == null) {this.versions = new ArrayList();} - V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item); - if (index < 0 || index >= versions.size()) { _visitables.get("versions").add(builder); versions.add(builder); } else { _visitables.get("versions").add(index, builder); versions.add(index, builder);} - return (A)this; - } - public A setToVersions(int index,V1CustomResourceDefinitionVersion item) { - if (this.versions == null) {this.versions = new ArrayList();} - V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item); - if (index < 0 || index >= versions.size()) { _visitables.get("versions").add(builder); versions.add(builder); } else { _visitables.get("versions").set(index, builder); versions.set(index, builder);} - return (A)this; - } - public A addToVersions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion... items) { - if (this.versions == null) {this.versions = new ArrayList();} - for (V1CustomResourceDefinitionVersion item : items) {V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item);_visitables.get("versions").add(builder);this.versions.add(builder);} return (A)this; - } - public A addAllToVersions(Collection items) { - if (this.versions == null) {this.versions = new ArrayList();} - for (V1CustomResourceDefinitionVersion item : items) {V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item);_visitables.get("versions").add(builder);this.versions.add(builder);} return (A)this; - } - public A removeFromVersions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion... items) { - for (V1CustomResourceDefinitionVersion item : items) {V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item);_visitables.get("versions").remove(builder);if (this.versions != null) {this.versions.remove(builder);}} return (A)this; - } - public A removeAllFromVersions(Collection items) { - for (V1CustomResourceDefinitionVersion item : items) {V1CustomResourceDefinitionVersionBuilder builder = new V1CustomResourceDefinitionVersionBuilder(item);_visitables.get("versions").remove(builder);if (this.versions != null) {this.versions.remove(builder);}} return (A)this; - } - public A removeMatchingFromVersions(Predicate predicate) { - if (versions == null) return (A) this; - final Iterator each = versions.iterator(); - final List visitables = _visitables.get("versions"); - while (each.hasNext()) { - V1CustomResourceDefinitionVersionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildVersions instead. - * @return The buildable object. - */ - @Deprecated - public List getVersions() { - return versions != null ? build(versions) : null; - } - public List buildVersions() { - return versions != null ? build(versions) : null; - } - public V1CustomResourceDefinitionVersion buildVersion(int index) { - return this.versions.get(index).build(); - } - public V1CustomResourceDefinitionVersion buildFirstVersion() { - return this.versions.get(0).build(); - } - public V1CustomResourceDefinitionVersion buildLastVersion() { - return this.versions.get(versions.size() - 1).build(); - } - public V1CustomResourceDefinitionVersion buildMatchingVersion(Predicate predicate) { - for (V1CustomResourceDefinitionVersionBuilder item: versions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingVersion(Predicate predicate) { - for (V1CustomResourceDefinitionVersionBuilder item: versions) { if(predicate.test(item)){ return true;} } return false; - } - public A withVersions(List versions) { - if (this.versions != null) { _visitables.get("versions").clear();} - if (versions != null) {this.versions = new ArrayList(); for (V1CustomResourceDefinitionVersion item : versions){this.addToVersions(item);}} else { this.versions = null;} return (A) this; - } - public A withVersions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionVersion... versions) { - if (this.versions != null) {this.versions.clear(); _visitables.remove("versions"); } - if (versions != null) {for (V1CustomResourceDefinitionVersion item :versions){ this.addToVersions(item);}} return (A) this; - } - public Boolean hasVersions() { - return versions != null && !versions.isEmpty(); - } - public V1CustomResourceDefinitionSpecFluentImpl.VersionsNested addNewVersion() { - return new V1CustomResourceDefinitionSpecFluentImpl.VersionsNestedImpl(); - } - public V1CustomResourceDefinitionSpecFluentImpl.VersionsNested addNewVersionLike(V1CustomResourceDefinitionVersion item) { - return new V1CustomResourceDefinitionSpecFluentImpl.VersionsNestedImpl(-1, item); - } - public V1CustomResourceDefinitionSpecFluentImpl.VersionsNested setNewVersionLike(int index,V1CustomResourceDefinitionVersion item) { - return new V1CustomResourceDefinitionSpecFluentImpl.VersionsNestedImpl(index, item); - } - public V1CustomResourceDefinitionSpecFluentImpl.VersionsNested editVersion(int index) { - if (versions.size() <= index) throw new RuntimeException("Can't edit versions. Index exceeds size."); - return setNewVersionLike(index, buildVersion(index)); - } - public V1CustomResourceDefinitionSpecFluentImpl.VersionsNested editFirstVersion() { - if (versions.size() == 0) throw new RuntimeException("Can't edit first versions. The list is empty."); - return setNewVersionLike(0, buildVersion(0)); - } - public V1CustomResourceDefinitionSpecFluentImpl.VersionsNested editLastVersion() { - int index = versions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last versions. The list is empty."); - return setNewVersionLike(index, buildVersion(index)); - } - public V1CustomResourceDefinitionSpecFluentImpl.VersionsNested editMatchingVersion(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1CustomResourceConversionFluentImpl> implements V1CustomResourceDefinitionSpecFluentImpl.ConversionNested,Nested{ - ConversionNestedImpl(V1CustomResourceConversion item) { - this.builder = new V1CustomResourceConversionBuilder(this, item); - } - ConversionNestedImpl() { - this.builder = new V1CustomResourceConversionBuilder(this); - } - V1CustomResourceConversionBuilder builder; - public N and() { - return (N) V1CustomResourceDefinitionSpecFluentImpl.this.withConversion(builder.build()); - } - public N endConversion() { - return and(); - } - - } - class NamesNestedImpl extends V1CustomResourceDefinitionNamesFluentImpl> implements V1CustomResourceDefinitionSpecFluentImpl.NamesNested,Nested{ - NamesNestedImpl(V1CustomResourceDefinitionNames item) { - this.builder = new V1CustomResourceDefinitionNamesBuilder(this, item); - } - NamesNestedImpl() { - this.builder = new V1CustomResourceDefinitionNamesBuilder(this); - } - V1CustomResourceDefinitionNamesBuilder builder; - public N and() { - return (N) V1CustomResourceDefinitionSpecFluentImpl.this.withNames(builder.build()); - } - public N endNames() { - return and(); - } - - } - class VersionsNestedImpl extends V1CustomResourceDefinitionVersionFluentImpl> implements V1CustomResourceDefinitionSpecFluentImpl.VersionsNested,Nested{ - VersionsNestedImpl(int index,V1CustomResourceDefinitionVersion item) { - this.index = index; - this.builder = new V1CustomResourceDefinitionVersionBuilder(this, item); - } - VersionsNestedImpl() { - this.index = -1; - this.builder = new V1CustomResourceDefinitionVersionBuilder(this); - } - V1CustomResourceDefinitionVersionBuilder builder; - int index; - public N and() { - return (N) V1CustomResourceDefinitionSpecFluentImpl.this.setToVersions(index,builder.build()); - } - public N endVersion() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusBuilder.java index fdd7c9cf9c..d0ec16c0e1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceDefinitionStatusBuilder extends V1CustomResourceDefinitionStatusFluentImpl implements VisitableBuilder{ +public class V1CustomResourceDefinitionStatusBuilder extends V1CustomResourceDefinitionStatusFluent implements VisitableBuilder{ public V1CustomResourceDefinitionStatusBuilder() { - this(false); - } - public V1CustomResourceDefinitionStatusBuilder(Boolean validationEnabled) { - this(new V1CustomResourceDefinitionStatus(), validationEnabled); + this(new V1CustomResourceDefinitionStatus()); } + public V1CustomResourceDefinitionStatusBuilder(V1CustomResourceDefinitionStatusFluent fluent) { - this(fluent, false); - } - public V1CustomResourceDefinitionStatusBuilder(V1CustomResourceDefinitionStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceDefinitionStatus(), validationEnabled); + this(fluent, new V1CustomResourceDefinitionStatus()); } + public V1CustomResourceDefinitionStatusBuilder(V1CustomResourceDefinitionStatusFluent fluent,V1CustomResourceDefinitionStatus instance) { - this(fluent, instance, false); - } - public V1CustomResourceDefinitionStatusBuilder(V1CustomResourceDefinitionStatusFluent fluent,V1CustomResourceDefinitionStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAcceptedNames(instance.getAcceptedNames()); - fluent.withConditions(instance.getConditions()); - fluent.withStoredVersions(instance.getStoredVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceDefinitionStatusBuilder(V1CustomResourceDefinitionStatus instance) { - this(instance,false); - } - public V1CustomResourceDefinitionStatusBuilder(V1CustomResourceDefinitionStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAcceptedNames(instance.getAcceptedNames()); - this.withConditions(instance.getConditions()); - this.withStoredVersions(instance.getStoredVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceDefinitionStatusFluent fluent; - Boolean validationEnabled; + public V1CustomResourceDefinitionStatus build() { V1CustomResourceDefinitionStatus buildable = new V1CustomResourceDefinitionStatus(); - buildable.setAcceptedNames(fluent.getAcceptedNames()); - buildable.setConditions(fluent.getConditions()); + buildable.setAcceptedNames(fluent.buildAcceptedNames()); + buildable.setConditions(fluent.buildConditions()); buildable.setStoredVersions(fluent.getStoredVersions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusFluent.java index 484d5fc0b0..b72a6572f9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusFluent.java @@ -1,91 +1,383 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CustomResourceDefinitionStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildAcceptedNames instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceDefinitionNames getAcceptedNames(); - public V1CustomResourceDefinitionNames buildAcceptedNames(); - public A withAcceptedNames(V1CustomResourceDefinitionNames acceptedNames); - public Boolean hasAcceptedNames(); - public V1CustomResourceDefinitionStatusFluent.AcceptedNamesNested withNewAcceptedNames(); - public V1CustomResourceDefinitionStatusFluent.AcceptedNamesNested withNewAcceptedNamesLike(V1CustomResourceDefinitionNames item); - public V1CustomResourceDefinitionStatusFluent.AcceptedNamesNested editAcceptedNames(); - public V1CustomResourceDefinitionStatusFluent.AcceptedNamesNested editOrNewAcceptedNames(); - public V1CustomResourceDefinitionStatusFluent.AcceptedNamesNested editOrNewAcceptedNamesLike(V1CustomResourceDefinitionNames item); - public A addToConditions(int index,V1CustomResourceDefinitionCondition item); - public A setToConditions(int index,V1CustomResourceDefinitionCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1CustomResourceDefinitionCondition buildCondition(int index); - public V1CustomResourceDefinitionCondition buildFirstCondition(); - public V1CustomResourceDefinitionCondition buildLastCondition(); - public V1CustomResourceDefinitionCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionCondition... conditions); - public Boolean hasConditions(); - public V1CustomResourceDefinitionStatusFluent.ConditionsNested addNewCondition(); - public V1CustomResourceDefinitionStatusFluent.ConditionsNested addNewConditionLike(V1CustomResourceDefinitionCondition item); - public V1CustomResourceDefinitionStatusFluent.ConditionsNested setNewConditionLike(int index,V1CustomResourceDefinitionCondition item); - public V1CustomResourceDefinitionStatusFluent.ConditionsNested editCondition(int index); - public V1CustomResourceDefinitionStatusFluent.ConditionsNested editFirstCondition(); - public V1CustomResourceDefinitionStatusFluent.ConditionsNested editLastCondition(); - public V1CustomResourceDefinitionStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public A addToStoredVersions(int index,String item); - public A setToStoredVersions(int index,String item); - public A addToStoredVersions(java.lang.String... items); - public A addAllToStoredVersions(Collection items); - public A removeFromStoredVersions(java.lang.String... items); - public A removeAllFromStoredVersions(Collection items); - public List getStoredVersions(); - public String getStoredVersion(int index); - public String getFirstStoredVersion(); - public String getLastStoredVersion(); - public String getMatchingStoredVersion(Predicate predicate); - public Boolean hasMatchingStoredVersion(Predicate predicate); - public A withStoredVersions(List storedVersions); - public A withStoredVersions(java.lang.String... storedVersions); - public Boolean hasStoredVersions(); - public interface AcceptedNamesNested extends Nested,V1CustomResourceDefinitionNamesFluent>{ - public N and(); - public N endAcceptedNames(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceDefinitionStatusFluent> extends BaseFluent{ + public V1CustomResourceDefinitionStatusFluent() { + } + + public V1CustomResourceDefinitionStatusFluent(V1CustomResourceDefinitionStatus instance) { + this.copyInstance(instance); + } + private V1CustomResourceDefinitionNamesBuilder acceptedNames; + private ArrayList conditions; + private List storedVersions; + + protected void copyInstance(V1CustomResourceDefinitionStatus instance) { + instance = (instance != null ? instance : new V1CustomResourceDefinitionStatus()); + if (instance != null) { + this.withAcceptedNames(instance.getAcceptedNames()); + this.withConditions(instance.getConditions()); + this.withStoredVersions(instance.getStoredVersions()); + } + } + + public V1CustomResourceDefinitionNames buildAcceptedNames() { + return this.acceptedNames != null ? this.acceptedNames.build() : null; + } + + public A withAcceptedNames(V1CustomResourceDefinitionNames acceptedNames) { + this._visitables.remove("acceptedNames"); + if (acceptedNames != null) { + this.acceptedNames = new V1CustomResourceDefinitionNamesBuilder(acceptedNames); + this._visitables.get("acceptedNames").add(this.acceptedNames); + } else { + this.acceptedNames = null; + this._visitables.get("acceptedNames").remove(this.acceptedNames); + } + return (A) this; + } + + public boolean hasAcceptedNames() { + return this.acceptedNames != null; + } + + public AcceptedNamesNested withNewAcceptedNames() { + return new AcceptedNamesNested(null); + } + + public AcceptedNamesNested withNewAcceptedNamesLike(V1CustomResourceDefinitionNames item) { + return new AcceptedNamesNested(item); + } + + public AcceptedNamesNested editAcceptedNames() { + return withNewAcceptedNamesLike(java.util.Optional.ofNullable(buildAcceptedNames()).orElse(null)); + } + + public AcceptedNamesNested editOrNewAcceptedNames() { + return withNewAcceptedNamesLike(java.util.Optional.ofNullable(buildAcceptedNames()).orElse(new V1CustomResourceDefinitionNamesBuilder().build())); + } + + public AcceptedNamesNested editOrNewAcceptedNamesLike(V1CustomResourceDefinitionNames item) { + return withNewAcceptedNamesLike(java.util.Optional.ofNullable(buildAcceptedNames()).orElse(item)); + } + + public A addToConditions(int index,V1CustomResourceDefinitionCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1CustomResourceDefinitionCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1CustomResourceDefinitionCondition item : items) {V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1CustomResourceDefinitionCondition item : items) {V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionCondition... items) { + if (this.conditions == null) return (A)this; + for (V1CustomResourceDefinitionCondition item : items) {V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1CustomResourceDefinitionCondition item : items) {V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1CustomResourceDefinitionConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1CustomResourceDefinitionCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1CustomResourceDefinitionCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1CustomResourceDefinitionCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1CustomResourceDefinitionCondition buildMatchingCondition(Predicate predicate) { + for (V1CustomResourceDefinitionConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1CustomResourceDefinitionConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1CustomResourceDefinitionCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; } - public interface ConditionsNested extends Nested,V1CustomResourceDefinitionConditionFluent>{ - public N and(); - public N endCondition(); + + public A withConditions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1CustomResourceDefinitionCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1CustomResourceDefinitionCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1CustomResourceDefinitionCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i();} + this.storedVersions.add(index, item); + return (A)this; + } + + public A setToStoredVersions(int index,String item) { + if (this.storedVersions == null) {this.storedVersions = new ArrayList();} + this.storedVersions.set(index, item); return (A)this; + } + + public A addToStoredVersions(java.lang.String... items) { + if (this.storedVersions == null) {this.storedVersions = new ArrayList();} + for (String item : items) {this.storedVersions.add(item);} return (A)this; + } + + public A addAllToStoredVersions(Collection items) { + if (this.storedVersions == null) {this.storedVersions = new ArrayList();} + for (String item : items) {this.storedVersions.add(item);} return (A)this; + } + + public A removeFromStoredVersions(java.lang.String... items) { + if (this.storedVersions == null) return (A)this; + for (String item : items) { this.storedVersions.remove(item);} return (A)this; + } + + public A removeAllFromStoredVersions(Collection items) { + if (this.storedVersions == null) return (A)this; + for (String item : items) { this.storedVersions.remove(item);} return (A)this; + } + + public List getStoredVersions() { + return this.storedVersions; + } + + public String getStoredVersion(int index) { + return this.storedVersions.get(index); + } + + public String getFirstStoredVersion() { + return this.storedVersions.get(0); + } + + public String getLastStoredVersion() { + return this.storedVersions.get(storedVersions.size() - 1); + } + + public String getMatchingStoredVersion(Predicate predicate) { + for (String item : storedVersions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingStoredVersion(Predicate predicate) { + for (String item : storedVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withStoredVersions(List storedVersions) { + if (storedVersions != null) { + this.storedVersions = new ArrayList(); + for (String item : storedVersions) { + this.addToStoredVersions(item); + } + } else { + this.storedVersions = null; + } + return (A) this; + } + + public A withStoredVersions(java.lang.String... storedVersions) { + if (this.storedVersions != null) { + this.storedVersions.clear(); + _visitables.remove("storedVersions"); + } + if (storedVersions != null) { + for (String item : storedVersions) { + this.addToStoredVersions(item); + } + } + return (A) this; + } + + public boolean hasStoredVersions() { + return this.storedVersions != null && !this.storedVersions.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceDefinitionStatusFluent that = (V1CustomResourceDefinitionStatusFluent) o; + if (!java.util.Objects.equals(acceptedNames, that.acceptedNames)) return false; + if (!java.util.Objects.equals(conditions, that.conditions)) return false; + if (!java.util.Objects.equals(storedVersions, that.storedVersions)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(acceptedNames, conditions, storedVersions, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (acceptedNames != null) { sb.append("acceptedNames:"); sb.append(acceptedNames + ","); } + if (conditions != null && !conditions.isEmpty()) { sb.append("conditions:"); sb.append(conditions + ","); } + if (storedVersions != null && !storedVersions.isEmpty()) { sb.append("storedVersions:"); sb.append(storedVersions); } + sb.append("}"); + return sb.toString(); + } + public class AcceptedNamesNested extends V1CustomResourceDefinitionNamesFluent> implements Nested{ + AcceptedNamesNested(V1CustomResourceDefinitionNames item) { + this.builder = new V1CustomResourceDefinitionNamesBuilder(this, item); + } + V1CustomResourceDefinitionNamesBuilder builder; + + public N and() { + return (N) V1CustomResourceDefinitionStatusFluent.this.withAcceptedNames(builder.build()); + } + + public N endAcceptedNames() { + return and(); + } + } + public class ConditionsNested extends V1CustomResourceDefinitionConditionFluent> implements Nested{ + ConditionsNested(int index,V1CustomResourceDefinitionCondition item) { + this.index = index; + this.builder = new V1CustomResourceDefinitionConditionBuilder(this, item); + } + V1CustomResourceDefinitionConditionBuilder builder; + int index; + + public N and() { + return (N) V1CustomResourceDefinitionStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusFluentImpl.java deleted file mode 100644 index 485425d971..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionStatusFluentImpl.java +++ /dev/null @@ -1,287 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceDefinitionStatusFluentImpl> extends BaseFluent implements V1CustomResourceDefinitionStatusFluent{ - public V1CustomResourceDefinitionStatusFluentImpl() { - } - public V1CustomResourceDefinitionStatusFluentImpl(V1CustomResourceDefinitionStatus instance) { - if (instance != null) { - this.withAcceptedNames(instance.getAcceptedNames()); - this.withConditions(instance.getConditions()); - this.withStoredVersions(instance.getStoredVersions()); - } - } - private V1CustomResourceDefinitionNamesBuilder acceptedNames; - private ArrayList conditions; - private List storedVersions; - - /** - * This method has been deprecated, please use method buildAcceptedNames instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceDefinitionNames getAcceptedNames() { - return this.acceptedNames!=null ?this.acceptedNames.build():null; - } - public V1CustomResourceDefinitionNames buildAcceptedNames() { - return this.acceptedNames!=null ?this.acceptedNames.build():null; - } - public A withAcceptedNames(V1CustomResourceDefinitionNames acceptedNames) { - _visitables.get("acceptedNames").remove(this.acceptedNames); - if (acceptedNames!=null){ this.acceptedNames= new V1CustomResourceDefinitionNamesBuilder(acceptedNames); _visitables.get("acceptedNames").add(this.acceptedNames);} else { this.acceptedNames = null; _visitables.get("acceptedNames").remove(this.acceptedNames); } return (A) this; - } - public Boolean hasAcceptedNames() { - return this.acceptedNames != null; - } - public V1CustomResourceDefinitionStatusFluentImpl.AcceptedNamesNested withNewAcceptedNames() { - return new V1CustomResourceDefinitionStatusFluentImpl.AcceptedNamesNestedImpl(); - } - public V1CustomResourceDefinitionStatusFluentImpl.AcceptedNamesNested withNewAcceptedNamesLike(V1CustomResourceDefinitionNames item) { - return new V1CustomResourceDefinitionStatusFluentImpl.AcceptedNamesNestedImpl(item); - } - public V1CustomResourceDefinitionStatusFluentImpl.AcceptedNamesNested editAcceptedNames() { - return withNewAcceptedNamesLike(getAcceptedNames()); - } - public V1CustomResourceDefinitionStatusFluentImpl.AcceptedNamesNested editOrNewAcceptedNames() { - return withNewAcceptedNamesLike(getAcceptedNames() != null ? getAcceptedNames(): new V1CustomResourceDefinitionNamesBuilder().build()); - } - public V1CustomResourceDefinitionStatusFluentImpl.AcceptedNamesNested editOrNewAcceptedNamesLike(V1CustomResourceDefinitionNames item) { - return withNewAcceptedNamesLike(getAcceptedNames() != null ? getAcceptedNames(): item); - } - public A addToConditions(int index,V1CustomResourceDefinitionCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1CustomResourceDefinitionCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1CustomResourceDefinitionCondition item : items) {V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1CustomResourceDefinitionCondition item : items) {V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionCondition... items) { - for (V1CustomResourceDefinitionCondition item : items) {V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1CustomResourceDefinitionCondition item : items) {V1CustomResourceDefinitionConditionBuilder builder = new V1CustomResourceDefinitionConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1CustomResourceDefinitionConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1CustomResourceDefinitionCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1CustomResourceDefinitionCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1CustomResourceDefinitionCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1CustomResourceDefinitionCondition buildMatchingCondition(Predicate predicate) { - for (V1CustomResourceDefinitionConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1CustomResourceDefinitionConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1CustomResourceDefinitionCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1CustomResourceDefinitionCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1CustomResourceDefinitionCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1CustomResourceDefinitionStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1CustomResourceDefinitionStatusFluentImpl.ConditionsNestedImpl(); - } - public V1CustomResourceDefinitionStatusFluentImpl.ConditionsNested addNewConditionLike(V1CustomResourceDefinitionCondition item) { - return new V1CustomResourceDefinitionStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1CustomResourceDefinitionStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1CustomResourceDefinitionCondition item) { - return new V1CustomResourceDefinitionStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1CustomResourceDefinitionStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1CustomResourceDefinitionStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1CustomResourceDefinitionStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1CustomResourceDefinitionStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i();} - this.storedVersions.add(index, item); - return (A)this; - } - public A setToStoredVersions(int index,String item) { - if (this.storedVersions == null) {this.storedVersions = new ArrayList();} - this.storedVersions.set(index, item); return (A)this; - } - public A addToStoredVersions(java.lang.String... items) { - if (this.storedVersions == null) {this.storedVersions = new ArrayList();} - for (String item : items) {this.storedVersions.add(item);} return (A)this; - } - public A addAllToStoredVersions(Collection items) { - if (this.storedVersions == null) {this.storedVersions = new ArrayList();} - for (String item : items) {this.storedVersions.add(item);} return (A)this; - } - public A removeFromStoredVersions(java.lang.String... items) { - for (String item : items) {if (this.storedVersions!= null){ this.storedVersions.remove(item);}} return (A)this; - } - public A removeAllFromStoredVersions(Collection items) { - for (String item : items) {if (this.storedVersions!= null){ this.storedVersions.remove(item);}} return (A)this; - } - public List getStoredVersions() { - return this.storedVersions; - } - public String getStoredVersion(int index) { - return this.storedVersions.get(index); - } - public String getFirstStoredVersion() { - return this.storedVersions.get(0); - } - public String getLastStoredVersion() { - return this.storedVersions.get(storedVersions.size() - 1); - } - public String getMatchingStoredVersion(Predicate predicate) { - for (String item: storedVersions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingStoredVersion(Predicate predicate) { - for (String item: storedVersions) { if(predicate.test(item)){ return true;} } return false; - } - public A withStoredVersions(List storedVersions) { - if (storedVersions != null) {this.storedVersions = new ArrayList(); for (String item : storedVersions){this.addToStoredVersions(item);}} else { this.storedVersions = null;} return (A) this; - } - public A withStoredVersions(java.lang.String... storedVersions) { - if (this.storedVersions != null) {this.storedVersions.clear(); _visitables.remove("storedVersions"); } - if (storedVersions != null) {for (String item :storedVersions){ this.addToStoredVersions(item);}} return (A) this; - } - public Boolean hasStoredVersions() { - return storedVersions != null && !storedVersions.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceDefinitionStatusFluentImpl that = (V1CustomResourceDefinitionStatusFluentImpl) o; - if (!java.util.Objects.equals(acceptedNames, that.acceptedNames)) return false; - - if (!java.util.Objects.equals(conditions, that.conditions)) return false; - - if (!java.util.Objects.equals(storedVersions, that.storedVersions)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(acceptedNames, conditions, storedVersions, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (acceptedNames != null) { sb.append("acceptedNames:"); sb.append(acceptedNames + ","); } - if (conditions != null) { sb.append("conditions:"); sb.append(conditions + ","); } - if (storedVersions != null && !storedVersions.isEmpty()) { sb.append("storedVersions:"); sb.append(storedVersions); } - sb.append("}"); - return sb.toString(); - } - class AcceptedNamesNestedImpl extends V1CustomResourceDefinitionNamesFluentImpl> implements V1CustomResourceDefinitionStatusFluentImpl.AcceptedNamesNested,Nested{ - AcceptedNamesNestedImpl(V1CustomResourceDefinitionNames item) { - this.builder = new V1CustomResourceDefinitionNamesBuilder(this, item); - } - AcceptedNamesNestedImpl() { - this.builder = new V1CustomResourceDefinitionNamesBuilder(this); - } - V1CustomResourceDefinitionNamesBuilder builder; - public N and() { - return (N) V1CustomResourceDefinitionStatusFluentImpl.this.withAcceptedNames(builder.build()); - } - public N endAcceptedNames() { - return and(); - } - - } - class ConditionsNestedImpl extends V1CustomResourceDefinitionConditionFluentImpl> implements V1CustomResourceDefinitionStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1CustomResourceDefinitionCondition item) { - this.index = index; - this.builder = new V1CustomResourceDefinitionConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1CustomResourceDefinitionConditionBuilder(this); - } - V1CustomResourceDefinitionConditionBuilder builder; - int index; - public N and() { - return (N) V1CustomResourceDefinitionStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionBuilder.java index 112996c95b..c4f56d2f2d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionBuilder.java @@ -1,67 +1,38 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceDefinitionVersionBuilder extends V1CustomResourceDefinitionVersionFluentImpl implements VisitableBuilder{ +public class V1CustomResourceDefinitionVersionBuilder extends V1CustomResourceDefinitionVersionFluent implements VisitableBuilder{ public V1CustomResourceDefinitionVersionBuilder() { - this(false); - } - public V1CustomResourceDefinitionVersionBuilder(Boolean validationEnabled) { - this(new V1CustomResourceDefinitionVersion(), validationEnabled); + this(new V1CustomResourceDefinitionVersion()); } + public V1CustomResourceDefinitionVersionBuilder(V1CustomResourceDefinitionVersionFluent fluent) { - this(fluent, false); - } - public V1CustomResourceDefinitionVersionBuilder(V1CustomResourceDefinitionVersionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceDefinitionVersion(), validationEnabled); + this(fluent, new V1CustomResourceDefinitionVersion()); } + public V1CustomResourceDefinitionVersionBuilder(V1CustomResourceDefinitionVersionFluent fluent,V1CustomResourceDefinitionVersion instance) { - this(fluent, instance, false); - } - public V1CustomResourceDefinitionVersionBuilder(V1CustomResourceDefinitionVersionFluent fluent,V1CustomResourceDefinitionVersion instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAdditionalPrinterColumns(instance.getAdditionalPrinterColumns()); - fluent.withDeprecated(instance.getDeprecated()); - fluent.withDeprecationWarning(instance.getDeprecationWarning()); - fluent.withName(instance.getName()); - fluent.withSchema(instance.getSchema()); - fluent.withServed(instance.getServed()); - fluent.withStorage(instance.getStorage()); - fluent.withSubresources(instance.getSubresources()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceDefinitionVersionBuilder(V1CustomResourceDefinitionVersion instance) { - this(instance,false); - } - public V1CustomResourceDefinitionVersionBuilder(V1CustomResourceDefinitionVersion instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAdditionalPrinterColumns(instance.getAdditionalPrinterColumns()); - this.withDeprecated(instance.getDeprecated()); - this.withDeprecationWarning(instance.getDeprecationWarning()); - this.withName(instance.getName()); - this.withSchema(instance.getSchema()); - this.withServed(instance.getServed()); - this.withStorage(instance.getStorage()); - this.withSubresources(instance.getSubresources()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceDefinitionVersionFluent fluent; - Boolean validationEnabled; + public V1CustomResourceDefinitionVersion build() { V1CustomResourceDefinitionVersion buildable = new V1CustomResourceDefinitionVersion(); - buildable.setAdditionalPrinterColumns(fluent.getAdditionalPrinterColumns()); + buildable.setAdditionalPrinterColumns(fluent.buildAdditionalPrinterColumns()); buildable.setDeprecated(fluent.getDeprecated()); buildable.setDeprecationWarning(fluent.getDeprecationWarning()); buildable.setName(fluent.getName()); - buildable.setSchema(fluent.getSchema()); + buildable.setSchema(fluent.buildSchema()); buildable.setServed(fluent.getServed()); buildable.setStorage(fluent.getStorage()); - buildable.setSubresources(fluent.getSubresources()); + buildable.setSubresources(fluent.buildSubresources()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionFluent.java index 4e561ffab8..d45b108854 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionFluent.java @@ -1,114 +1,443 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1CustomResourceDefinitionVersionFluent> extends Fluent{ - public A addToAdditionalPrinterColumns(int index,V1CustomResourceColumnDefinition item); - public A setToAdditionalPrinterColumns(int index,V1CustomResourceColumnDefinition item); - public A addToAdditionalPrinterColumns(io.kubernetes.client.openapi.models.V1CustomResourceColumnDefinition... items); - public A addAllToAdditionalPrinterColumns(Collection items); - public A removeFromAdditionalPrinterColumns(io.kubernetes.client.openapi.models.V1CustomResourceColumnDefinition... items); - public A removeAllFromAdditionalPrinterColumns(Collection items); - public A removeMatchingFromAdditionalPrinterColumns(Predicate predicate); - - /** - * This method has been deprecated, please use method buildAdditionalPrinterColumns instead. - * @return The buildable object. - */ - @Deprecated - public List getAdditionalPrinterColumns(); - public List buildAdditionalPrinterColumns(); - public V1CustomResourceColumnDefinition buildAdditionalPrinterColumn(int index); - public V1CustomResourceColumnDefinition buildFirstAdditionalPrinterColumn(); - public V1CustomResourceColumnDefinition buildLastAdditionalPrinterColumn(); - public V1CustomResourceColumnDefinition buildMatchingAdditionalPrinterColumn(Predicate predicate); - public Boolean hasMatchingAdditionalPrinterColumn(Predicate predicate); - public A withAdditionalPrinterColumns(List additionalPrinterColumns); - public A withAdditionalPrinterColumns(io.kubernetes.client.openapi.models.V1CustomResourceColumnDefinition... additionalPrinterColumns); - public Boolean hasAdditionalPrinterColumns(); - public V1CustomResourceDefinitionVersionFluent.AdditionalPrinterColumnsNested addNewAdditionalPrinterColumn(); - public V1CustomResourceDefinitionVersionFluent.AdditionalPrinterColumnsNested addNewAdditionalPrinterColumnLike(V1CustomResourceColumnDefinition item); - public V1CustomResourceDefinitionVersionFluent.AdditionalPrinterColumnsNested setNewAdditionalPrinterColumnLike(int index,V1CustomResourceColumnDefinition item); - public V1CustomResourceDefinitionVersionFluent.AdditionalPrinterColumnsNested editAdditionalPrinterColumn(int index); - public V1CustomResourceDefinitionVersionFluent.AdditionalPrinterColumnsNested editFirstAdditionalPrinterColumn(); - public V1CustomResourceDefinitionVersionFluent.AdditionalPrinterColumnsNested editLastAdditionalPrinterColumn(); - public V1CustomResourceDefinitionVersionFluent.AdditionalPrinterColumnsNested editMatchingAdditionalPrinterColumn(Predicate predicate); - public Boolean getDeprecated(); - public A withDeprecated(Boolean deprecated); - public Boolean hasDeprecated(); - public String getDeprecationWarning(); - public A withDeprecationWarning(String deprecationWarning); - public Boolean hasDeprecationWarning(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildSchema instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceValidation getSchema(); - public V1CustomResourceValidation buildSchema(); - public A withSchema(V1CustomResourceValidation schema); - public Boolean hasSchema(); - public V1CustomResourceDefinitionVersionFluent.SchemaNested withNewSchema(); - public V1CustomResourceDefinitionVersionFluent.SchemaNested withNewSchemaLike(V1CustomResourceValidation item); - public V1CustomResourceDefinitionVersionFluent.SchemaNested editSchema(); - public V1CustomResourceDefinitionVersionFluent.SchemaNested editOrNewSchema(); - public V1CustomResourceDefinitionVersionFluent.SchemaNested editOrNewSchemaLike(V1CustomResourceValidation item); - public Boolean getServed(); - public A withServed(Boolean served); - public Boolean hasServed(); - public Boolean getStorage(); - public A withStorage(Boolean storage); - public Boolean hasStorage(); - - /** - * This method has been deprecated, please use method buildSubresources instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceSubresources getSubresources(); - public V1CustomResourceSubresources buildSubresources(); - public A withSubresources(V1CustomResourceSubresources subresources); - public Boolean hasSubresources(); - public V1CustomResourceDefinitionVersionFluent.SubresourcesNested withNewSubresources(); - public V1CustomResourceDefinitionVersionFluent.SubresourcesNested withNewSubresourcesLike(V1CustomResourceSubresources item); - public V1CustomResourceDefinitionVersionFluent.SubresourcesNested editSubresources(); - public V1CustomResourceDefinitionVersionFluent.SubresourcesNested editOrNewSubresources(); - public V1CustomResourceDefinitionVersionFluent.SubresourcesNested editOrNewSubresourcesLike(V1CustomResourceSubresources item); - public A withDeprecated(); - public A withServed(); - public A withStorage(); - public interface AdditionalPrinterColumnsNested extends Nested,V1CustomResourceColumnDefinitionFluent>{ - public N and(); - public N endAdditionalPrinterColumn(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceDefinitionVersionFluent> extends BaseFluent{ + public V1CustomResourceDefinitionVersionFluent() { + } + + public V1CustomResourceDefinitionVersionFluent(V1CustomResourceDefinitionVersion instance) { + this.copyInstance(instance); + } + private ArrayList additionalPrinterColumns; + private Boolean deprecated; + private String deprecationWarning; + private String name; + private V1CustomResourceValidationBuilder schema; + private Boolean served; + private Boolean storage; + private V1CustomResourceSubresourcesBuilder subresources; + + protected void copyInstance(V1CustomResourceDefinitionVersion instance) { + instance = (instance != null ? instance : new V1CustomResourceDefinitionVersion()); + if (instance != null) { + this.withAdditionalPrinterColumns(instance.getAdditionalPrinterColumns()); + this.withDeprecated(instance.getDeprecated()); + this.withDeprecationWarning(instance.getDeprecationWarning()); + this.withName(instance.getName()); + this.withSchema(instance.getSchema()); + this.withServed(instance.getServed()); + this.withStorage(instance.getStorage()); + this.withSubresources(instance.getSubresources()); + } + } + + public A addToAdditionalPrinterColumns(int index,V1CustomResourceColumnDefinition item) { + if (this.additionalPrinterColumns == null) {this.additionalPrinterColumns = new ArrayList();} + V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item); + if (index < 0 || index >= additionalPrinterColumns.size()) { _visitables.get("additionalPrinterColumns").add(builder); additionalPrinterColumns.add(builder); } else { _visitables.get("additionalPrinterColumns").add(index, builder); additionalPrinterColumns.add(index, builder);} + return (A)this; + } + + public A setToAdditionalPrinterColumns(int index,V1CustomResourceColumnDefinition item) { + if (this.additionalPrinterColumns == null) {this.additionalPrinterColumns = new ArrayList();} + V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item); + if (index < 0 || index >= additionalPrinterColumns.size()) { _visitables.get("additionalPrinterColumns").add(builder); additionalPrinterColumns.add(builder); } else { _visitables.get("additionalPrinterColumns").set(index, builder); additionalPrinterColumns.set(index, builder);} + return (A)this; + } + + public A addToAdditionalPrinterColumns(io.kubernetes.client.openapi.models.V1CustomResourceColumnDefinition... items) { + if (this.additionalPrinterColumns == null) {this.additionalPrinterColumns = new ArrayList();} + for (V1CustomResourceColumnDefinition item : items) {V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item);_visitables.get("additionalPrinterColumns").add(builder);this.additionalPrinterColumns.add(builder);} return (A)this; + } + + public A addAllToAdditionalPrinterColumns(Collection items) { + if (this.additionalPrinterColumns == null) {this.additionalPrinterColumns = new ArrayList();} + for (V1CustomResourceColumnDefinition item : items) {V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item);_visitables.get("additionalPrinterColumns").add(builder);this.additionalPrinterColumns.add(builder);} return (A)this; + } + + public A removeFromAdditionalPrinterColumns(io.kubernetes.client.openapi.models.V1CustomResourceColumnDefinition... items) { + if (this.additionalPrinterColumns == null) return (A)this; + for (V1CustomResourceColumnDefinition item : items) {V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item);_visitables.get("additionalPrinterColumns").remove(builder); this.additionalPrinterColumns.remove(builder);} return (A)this; + } + + public A removeAllFromAdditionalPrinterColumns(Collection items) { + if (this.additionalPrinterColumns == null) return (A)this; + for (V1CustomResourceColumnDefinition item : items) {V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item);_visitables.get("additionalPrinterColumns").remove(builder); this.additionalPrinterColumns.remove(builder);} return (A)this; + } + + public A removeMatchingFromAdditionalPrinterColumns(Predicate predicate) { + if (additionalPrinterColumns == null) return (A) this; + final Iterator each = additionalPrinterColumns.iterator(); + final List visitables = _visitables.get("additionalPrinterColumns"); + while (each.hasNext()) { + V1CustomResourceColumnDefinitionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildAdditionalPrinterColumns() { + return this.additionalPrinterColumns != null ? build(additionalPrinterColumns) : null; + } + + public V1CustomResourceColumnDefinition buildAdditionalPrinterColumn(int index) { + return this.additionalPrinterColumns.get(index).build(); + } + + public V1CustomResourceColumnDefinition buildFirstAdditionalPrinterColumn() { + return this.additionalPrinterColumns.get(0).build(); + } + + public V1CustomResourceColumnDefinition buildLastAdditionalPrinterColumn() { + return this.additionalPrinterColumns.get(additionalPrinterColumns.size() - 1).build(); + } + + public V1CustomResourceColumnDefinition buildMatchingAdditionalPrinterColumn(Predicate predicate) { + for (V1CustomResourceColumnDefinitionBuilder item : additionalPrinterColumns) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingAdditionalPrinterColumn(Predicate predicate) { + for (V1CustomResourceColumnDefinitionBuilder item : additionalPrinterColumns) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAdditionalPrinterColumns(List additionalPrinterColumns) { + if (this.additionalPrinterColumns != null) { + this._visitables.get("additionalPrinterColumns").clear(); + } + if (additionalPrinterColumns != null) { + this.additionalPrinterColumns = new ArrayList(); + for (V1CustomResourceColumnDefinition item : additionalPrinterColumns) { + this.addToAdditionalPrinterColumns(item); + } + } else { + this.additionalPrinterColumns = null; + } + return (A) this; + } + + public A withAdditionalPrinterColumns(io.kubernetes.client.openapi.models.V1CustomResourceColumnDefinition... additionalPrinterColumns) { + if (this.additionalPrinterColumns != null) { + this.additionalPrinterColumns.clear(); + _visitables.remove("additionalPrinterColumns"); + } + if (additionalPrinterColumns != null) { + for (V1CustomResourceColumnDefinition item : additionalPrinterColumns) { + this.addToAdditionalPrinterColumns(item); + } + } + return (A) this; + } + + public boolean hasAdditionalPrinterColumns() { + return this.additionalPrinterColumns != null && !this.additionalPrinterColumns.isEmpty(); + } + + public AdditionalPrinterColumnsNested addNewAdditionalPrinterColumn() { + return new AdditionalPrinterColumnsNested(-1, null); + } + + public AdditionalPrinterColumnsNested addNewAdditionalPrinterColumnLike(V1CustomResourceColumnDefinition item) { + return new AdditionalPrinterColumnsNested(-1, item); + } + + public AdditionalPrinterColumnsNested setNewAdditionalPrinterColumnLike(int index,V1CustomResourceColumnDefinition item) { + return new AdditionalPrinterColumnsNested(index, item); + } + + public AdditionalPrinterColumnsNested editAdditionalPrinterColumn(int index) { + if (additionalPrinterColumns.size() <= index) throw new RuntimeException("Can't edit additionalPrinterColumns. Index exceeds size."); + return setNewAdditionalPrinterColumnLike(index, buildAdditionalPrinterColumn(index)); + } + + public AdditionalPrinterColumnsNested editFirstAdditionalPrinterColumn() { + if (additionalPrinterColumns.size() == 0) throw new RuntimeException("Can't edit first additionalPrinterColumns. The list is empty."); + return setNewAdditionalPrinterColumnLike(0, buildAdditionalPrinterColumn(0)); + } + + public AdditionalPrinterColumnsNested editLastAdditionalPrinterColumn() { + int index = additionalPrinterColumns.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last additionalPrinterColumns. The list is empty."); + return setNewAdditionalPrinterColumnLike(index, buildAdditionalPrinterColumn(index)); + } + + public AdditionalPrinterColumnsNested editMatchingAdditionalPrinterColumn(Predicate predicate) { + int index = -1; + for (int i=0;i extends Nested,V1CustomResourceValidationFluent>{ - public N and(); - public N endSchema(); + + public boolean hasName() { + return this.name != null; + } + + public V1CustomResourceValidation buildSchema() { + return this.schema != null ? this.schema.build() : null; + } + + public A withSchema(V1CustomResourceValidation schema) { + this._visitables.remove("schema"); + if (schema != null) { + this.schema = new V1CustomResourceValidationBuilder(schema); + this._visitables.get("schema").add(this.schema); + } else { + this.schema = null; + this._visitables.get("schema").remove(this.schema); + } + return (A) this; + } + + public boolean hasSchema() { + return this.schema != null; + } + + public SchemaNested withNewSchema() { + return new SchemaNested(null); + } + + public SchemaNested withNewSchemaLike(V1CustomResourceValidation item) { + return new SchemaNested(item); + } + + public SchemaNested editSchema() { + return withNewSchemaLike(java.util.Optional.ofNullable(buildSchema()).orElse(null)); + } + + public SchemaNested editOrNewSchema() { + return withNewSchemaLike(java.util.Optional.ofNullable(buildSchema()).orElse(new V1CustomResourceValidationBuilder().build())); + } + + public SchemaNested editOrNewSchemaLike(V1CustomResourceValidation item) { + return withNewSchemaLike(java.util.Optional.ofNullable(buildSchema()).orElse(item)); + } + + public Boolean getServed() { + return this.served; + } + + public A withServed(Boolean served) { + this.served = served; + return (A) this; + } + + public boolean hasServed() { + return this.served != null; + } + + public Boolean getStorage() { + return this.storage; + } + + public A withStorage(Boolean storage) { + this.storage = storage; + return (A) this; + } + + public boolean hasStorage() { + return this.storage != null; + } + + public V1CustomResourceSubresources buildSubresources() { + return this.subresources != null ? this.subresources.build() : null; + } + + public A withSubresources(V1CustomResourceSubresources subresources) { + this._visitables.remove("subresources"); + if (subresources != null) { + this.subresources = new V1CustomResourceSubresourcesBuilder(subresources); + this._visitables.get("subresources").add(this.subresources); + } else { + this.subresources = null; + this._visitables.get("subresources").remove(this.subresources); + } + return (A) this; + } + + public boolean hasSubresources() { + return this.subresources != null; + } + + public SubresourcesNested withNewSubresources() { + return new SubresourcesNested(null); + } + + public SubresourcesNested withNewSubresourcesLike(V1CustomResourceSubresources item) { + return new SubresourcesNested(item); + } + + public SubresourcesNested editSubresources() { + return withNewSubresourcesLike(java.util.Optional.ofNullable(buildSubresources()).orElse(null)); + } + + public SubresourcesNested editOrNewSubresources() { + return withNewSubresourcesLike(java.util.Optional.ofNullable(buildSubresources()).orElse(new V1CustomResourceSubresourcesBuilder().build())); + } + + public SubresourcesNested editOrNewSubresourcesLike(V1CustomResourceSubresources item) { + return withNewSubresourcesLike(java.util.Optional.ofNullable(buildSubresources()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceDefinitionVersionFluent that = (V1CustomResourceDefinitionVersionFluent) o; + if (!java.util.Objects.equals(additionalPrinterColumns, that.additionalPrinterColumns)) return false; + if (!java.util.Objects.equals(deprecated, that.deprecated)) return false; + if (!java.util.Objects.equals(deprecationWarning, that.deprecationWarning)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(schema, that.schema)) return false; + if (!java.util.Objects.equals(served, that.served)) return false; + if (!java.util.Objects.equals(storage, that.storage)) return false; + if (!java.util.Objects.equals(subresources, that.subresources)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(additionalPrinterColumns, deprecated, deprecationWarning, name, schema, served, storage, subresources, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (additionalPrinterColumns != null && !additionalPrinterColumns.isEmpty()) { sb.append("additionalPrinterColumns:"); sb.append(additionalPrinterColumns + ","); } + if (deprecated != null) { sb.append("deprecated:"); sb.append(deprecated + ","); } + if (deprecationWarning != null) { sb.append("deprecationWarning:"); sb.append(deprecationWarning + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (schema != null) { sb.append("schema:"); sb.append(schema + ","); } + if (served != null) { sb.append("served:"); sb.append(served + ","); } + if (storage != null) { sb.append("storage:"); sb.append(storage + ","); } + if (subresources != null) { sb.append("subresources:"); sb.append(subresources); } + sb.append("}"); + return sb.toString(); + } + + public A withDeprecated() { + return withDeprecated(true); + } + + public A withServed() { + return withServed(true); + } + + public A withStorage() { + return withStorage(true); + } + public class AdditionalPrinterColumnsNested extends V1CustomResourceColumnDefinitionFluent> implements Nested{ + AdditionalPrinterColumnsNested(int index,V1CustomResourceColumnDefinition item) { + this.index = index; + this.builder = new V1CustomResourceColumnDefinitionBuilder(this, item); + } + V1CustomResourceColumnDefinitionBuilder builder; + int index; + + public N and() { + return (N) V1CustomResourceDefinitionVersionFluent.this.setToAdditionalPrinterColumns(index,builder.build()); + } + public N endAdditionalPrinterColumn() { + return and(); + } + + } - public interface SubresourcesNested extends Nested,V1CustomResourceSubresourcesFluent>{ - public N and(); - public N endSubresources(); + public class SchemaNested extends V1CustomResourceValidationFluent> implements Nested{ + SchemaNested(V1CustomResourceValidation item) { + this.builder = new V1CustomResourceValidationBuilder(this, item); + } + V1CustomResourceValidationBuilder builder; + public N and() { + return (N) V1CustomResourceDefinitionVersionFluent.this.withSchema(builder.build()); + } + + public N endSchema() { + return and(); + } + + } + public class SubresourcesNested extends V1CustomResourceSubresourcesFluent> implements Nested{ + SubresourcesNested(V1CustomResourceSubresources item) { + this.builder = new V1CustomResourceSubresourcesBuilder(this, item); + } + V1CustomResourceSubresourcesBuilder builder; + + public N and() { + return (N) V1CustomResourceDefinitionVersionFluent.this.withSubresources(builder.build()); + } + + public N endSubresources() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionFluentImpl.java deleted file mode 100644 index abb4470ed5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceDefinitionVersionFluentImpl.java +++ /dev/null @@ -1,365 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceDefinitionVersionFluentImpl> extends BaseFluent implements V1CustomResourceDefinitionVersionFluent{ - public V1CustomResourceDefinitionVersionFluentImpl() { - } - public V1CustomResourceDefinitionVersionFluentImpl(V1CustomResourceDefinitionVersion instance) { - if (instance != null) { - this.withAdditionalPrinterColumns(instance.getAdditionalPrinterColumns()); - this.withDeprecated(instance.getDeprecated()); - this.withDeprecationWarning(instance.getDeprecationWarning()); - this.withName(instance.getName()); - this.withSchema(instance.getSchema()); - this.withServed(instance.getServed()); - this.withStorage(instance.getStorage()); - this.withSubresources(instance.getSubresources()); - } - } - private ArrayList additionalPrinterColumns; - private Boolean deprecated; - private String deprecationWarning; - private String name; - private V1CustomResourceValidationBuilder schema; - private Boolean served; - private Boolean storage; - private V1CustomResourceSubresourcesBuilder subresources; - public A addToAdditionalPrinterColumns(int index,V1CustomResourceColumnDefinition item) { - if (this.additionalPrinterColumns == null) {this.additionalPrinterColumns = new ArrayList();} - V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item); - if (index < 0 || index >= additionalPrinterColumns.size()) { _visitables.get("additionalPrinterColumns").add(builder); additionalPrinterColumns.add(builder); } else { _visitables.get("additionalPrinterColumns").add(index, builder); additionalPrinterColumns.add(index, builder);} - return (A)this; - } - public A setToAdditionalPrinterColumns(int index,V1CustomResourceColumnDefinition item) { - if (this.additionalPrinterColumns == null) {this.additionalPrinterColumns = new ArrayList();} - V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item); - if (index < 0 || index >= additionalPrinterColumns.size()) { _visitables.get("additionalPrinterColumns").add(builder); additionalPrinterColumns.add(builder); } else { _visitables.get("additionalPrinterColumns").set(index, builder); additionalPrinterColumns.set(index, builder);} - return (A)this; - } - public A addToAdditionalPrinterColumns(io.kubernetes.client.openapi.models.V1CustomResourceColumnDefinition... items) { - if (this.additionalPrinterColumns == null) {this.additionalPrinterColumns = new ArrayList();} - for (V1CustomResourceColumnDefinition item : items) {V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item);_visitables.get("additionalPrinterColumns").add(builder);this.additionalPrinterColumns.add(builder);} return (A)this; - } - public A addAllToAdditionalPrinterColumns(Collection items) { - if (this.additionalPrinterColumns == null) {this.additionalPrinterColumns = new ArrayList();} - for (V1CustomResourceColumnDefinition item : items) {V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item);_visitables.get("additionalPrinterColumns").add(builder);this.additionalPrinterColumns.add(builder);} return (A)this; - } - public A removeFromAdditionalPrinterColumns(io.kubernetes.client.openapi.models.V1CustomResourceColumnDefinition... items) { - for (V1CustomResourceColumnDefinition item : items) {V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item);_visitables.get("additionalPrinterColumns").remove(builder);if (this.additionalPrinterColumns != null) {this.additionalPrinterColumns.remove(builder);}} return (A)this; - } - public A removeAllFromAdditionalPrinterColumns(Collection items) { - for (V1CustomResourceColumnDefinition item : items) {V1CustomResourceColumnDefinitionBuilder builder = new V1CustomResourceColumnDefinitionBuilder(item);_visitables.get("additionalPrinterColumns").remove(builder);if (this.additionalPrinterColumns != null) {this.additionalPrinterColumns.remove(builder);}} return (A)this; - } - public A removeMatchingFromAdditionalPrinterColumns(Predicate predicate) { - if (additionalPrinterColumns == null) return (A) this; - final Iterator each = additionalPrinterColumns.iterator(); - final List visitables = _visitables.get("additionalPrinterColumns"); - while (each.hasNext()) { - V1CustomResourceColumnDefinitionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildAdditionalPrinterColumns instead. - * @return The buildable object. - */ - @Deprecated - public List getAdditionalPrinterColumns() { - return additionalPrinterColumns != null ? build(additionalPrinterColumns) : null; - } - public List buildAdditionalPrinterColumns() { - return additionalPrinterColumns != null ? build(additionalPrinterColumns) : null; - } - public V1CustomResourceColumnDefinition buildAdditionalPrinterColumn(int index) { - return this.additionalPrinterColumns.get(index).build(); - } - public V1CustomResourceColumnDefinition buildFirstAdditionalPrinterColumn() { - return this.additionalPrinterColumns.get(0).build(); - } - public V1CustomResourceColumnDefinition buildLastAdditionalPrinterColumn() { - return this.additionalPrinterColumns.get(additionalPrinterColumns.size() - 1).build(); - } - public V1CustomResourceColumnDefinition buildMatchingAdditionalPrinterColumn(Predicate predicate) { - for (V1CustomResourceColumnDefinitionBuilder item: additionalPrinterColumns) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingAdditionalPrinterColumn(Predicate predicate) { - for (V1CustomResourceColumnDefinitionBuilder item: additionalPrinterColumns) { if(predicate.test(item)){ return true;} } return false; - } - public A withAdditionalPrinterColumns(List additionalPrinterColumns) { - if (this.additionalPrinterColumns != null) { _visitables.get("additionalPrinterColumns").clear();} - if (additionalPrinterColumns != null) {this.additionalPrinterColumns = new ArrayList(); for (V1CustomResourceColumnDefinition item : additionalPrinterColumns){this.addToAdditionalPrinterColumns(item);}} else { this.additionalPrinterColumns = null;} return (A) this; - } - public A withAdditionalPrinterColumns(io.kubernetes.client.openapi.models.V1CustomResourceColumnDefinition... additionalPrinterColumns) { - if (this.additionalPrinterColumns != null) {this.additionalPrinterColumns.clear(); _visitables.remove("additionalPrinterColumns"); } - if (additionalPrinterColumns != null) {for (V1CustomResourceColumnDefinition item :additionalPrinterColumns){ this.addToAdditionalPrinterColumns(item);}} return (A) this; - } - public Boolean hasAdditionalPrinterColumns() { - return additionalPrinterColumns != null && !additionalPrinterColumns.isEmpty(); - } - public V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNested addNewAdditionalPrinterColumn() { - return new V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNestedImpl(); - } - public V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNested addNewAdditionalPrinterColumnLike(V1CustomResourceColumnDefinition item) { - return new V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNestedImpl(-1, item); - } - public V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNested setNewAdditionalPrinterColumnLike(int index,V1CustomResourceColumnDefinition item) { - return new V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNestedImpl(index, item); - } - public V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNested editAdditionalPrinterColumn(int index) { - if (additionalPrinterColumns.size() <= index) throw new RuntimeException("Can't edit additionalPrinterColumns. Index exceeds size."); - return setNewAdditionalPrinterColumnLike(index, buildAdditionalPrinterColumn(index)); - } - public V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNested editFirstAdditionalPrinterColumn() { - if (additionalPrinterColumns.size() == 0) throw new RuntimeException("Can't edit first additionalPrinterColumns. The list is empty."); - return setNewAdditionalPrinterColumnLike(0, buildAdditionalPrinterColumn(0)); - } - public V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNested editLastAdditionalPrinterColumn() { - int index = additionalPrinterColumns.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last additionalPrinterColumns. The list is empty."); - return setNewAdditionalPrinterColumnLike(index, buildAdditionalPrinterColumn(index)); - } - public V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNested editMatchingAdditionalPrinterColumn(Predicate predicate) { - int index = -1; - for (int i=0;i withNewSchema() { - return new V1CustomResourceDefinitionVersionFluentImpl.SchemaNestedImpl(); - } - public V1CustomResourceDefinitionVersionFluentImpl.SchemaNested withNewSchemaLike(V1CustomResourceValidation item) { - return new V1CustomResourceDefinitionVersionFluentImpl.SchemaNestedImpl(item); - } - public V1CustomResourceDefinitionVersionFluentImpl.SchemaNested editSchema() { - return withNewSchemaLike(getSchema()); - } - public V1CustomResourceDefinitionVersionFluentImpl.SchemaNested editOrNewSchema() { - return withNewSchemaLike(getSchema() != null ? getSchema(): new V1CustomResourceValidationBuilder().build()); - } - public V1CustomResourceDefinitionVersionFluentImpl.SchemaNested editOrNewSchemaLike(V1CustomResourceValidation item) { - return withNewSchemaLike(getSchema() != null ? getSchema(): item); - } - public Boolean getServed() { - return this.served; - } - public A withServed(Boolean served) { - this.served=served; return (A) this; - } - public Boolean hasServed() { - return this.served != null; - } - public Boolean getStorage() { - return this.storage; - } - public A withStorage(Boolean storage) { - this.storage=storage; return (A) this; - } - public Boolean hasStorage() { - return this.storage != null; - } - - /** - * This method has been deprecated, please use method buildSubresources instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceSubresources getSubresources() { - return this.subresources!=null ?this.subresources.build():null; - } - public V1CustomResourceSubresources buildSubresources() { - return this.subresources!=null ?this.subresources.build():null; - } - public A withSubresources(V1CustomResourceSubresources subresources) { - _visitables.get("subresources").remove(this.subresources); - if (subresources!=null){ this.subresources= new V1CustomResourceSubresourcesBuilder(subresources); _visitables.get("subresources").add(this.subresources);} else { this.subresources = null; _visitables.get("subresources").remove(this.subresources); } return (A) this; - } - public Boolean hasSubresources() { - return this.subresources != null; - } - public V1CustomResourceDefinitionVersionFluentImpl.SubresourcesNested withNewSubresources() { - return new V1CustomResourceDefinitionVersionFluentImpl.SubresourcesNestedImpl(); - } - public V1CustomResourceDefinitionVersionFluentImpl.SubresourcesNested withNewSubresourcesLike(V1CustomResourceSubresources item) { - return new V1CustomResourceDefinitionVersionFluentImpl.SubresourcesNestedImpl(item); - } - public V1CustomResourceDefinitionVersionFluentImpl.SubresourcesNested editSubresources() { - return withNewSubresourcesLike(getSubresources()); - } - public V1CustomResourceDefinitionVersionFluentImpl.SubresourcesNested editOrNewSubresources() { - return withNewSubresourcesLike(getSubresources() != null ? getSubresources(): new V1CustomResourceSubresourcesBuilder().build()); - } - public V1CustomResourceDefinitionVersionFluentImpl.SubresourcesNested editOrNewSubresourcesLike(V1CustomResourceSubresources item) { - return withNewSubresourcesLike(getSubresources() != null ? getSubresources(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceDefinitionVersionFluentImpl that = (V1CustomResourceDefinitionVersionFluentImpl) o; - if (!java.util.Objects.equals(additionalPrinterColumns, that.additionalPrinterColumns)) return false; - - if (!java.util.Objects.equals(deprecated, that.deprecated)) return false; - - if (!java.util.Objects.equals(deprecationWarning, that.deprecationWarning)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(schema, that.schema)) return false; - - if (!java.util.Objects.equals(served, that.served)) return false; - - if (!java.util.Objects.equals(storage, that.storage)) return false; - - if (!java.util.Objects.equals(subresources, that.subresources)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(additionalPrinterColumns, deprecated, deprecationWarning, name, schema, served, storage, subresources, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (additionalPrinterColumns != null) { sb.append("additionalPrinterColumns:"); sb.append(additionalPrinterColumns + ","); } - if (deprecated != null) { sb.append("deprecated:"); sb.append(deprecated + ","); } - if (deprecationWarning != null) { sb.append("deprecationWarning:"); sb.append(deprecationWarning + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (schema != null) { sb.append("schema:"); sb.append(schema + ","); } - if (served != null) { sb.append("served:"); sb.append(served + ","); } - if (storage != null) { sb.append("storage:"); sb.append(storage + ","); } - if (subresources != null) { sb.append("subresources:"); sb.append(subresources); } - sb.append("}"); - return sb.toString(); - } - public A withDeprecated() { - return withDeprecated(true); - } - public A withServed() { - return withServed(true); - } - public A withStorage() { - return withStorage(true); - } - class AdditionalPrinterColumnsNestedImpl extends V1CustomResourceColumnDefinitionFluentImpl> implements V1CustomResourceDefinitionVersionFluentImpl.AdditionalPrinterColumnsNested,Nested{ - AdditionalPrinterColumnsNestedImpl(int index,V1CustomResourceColumnDefinition item) { - this.index = index; - this.builder = new V1CustomResourceColumnDefinitionBuilder(this, item); - } - AdditionalPrinterColumnsNestedImpl() { - this.index = -1; - this.builder = new V1CustomResourceColumnDefinitionBuilder(this); - } - V1CustomResourceColumnDefinitionBuilder builder; - int index; - public N and() { - return (N) V1CustomResourceDefinitionVersionFluentImpl.this.setToAdditionalPrinterColumns(index,builder.build()); - } - public N endAdditionalPrinterColumn() { - return and(); - } - - } - class SchemaNestedImpl extends V1CustomResourceValidationFluentImpl> implements V1CustomResourceDefinitionVersionFluentImpl.SchemaNested,Nested{ - SchemaNestedImpl(V1CustomResourceValidation item) { - this.builder = new V1CustomResourceValidationBuilder(this, item); - } - SchemaNestedImpl() { - this.builder = new V1CustomResourceValidationBuilder(this); - } - V1CustomResourceValidationBuilder builder; - public N and() { - return (N) V1CustomResourceDefinitionVersionFluentImpl.this.withSchema(builder.build()); - } - public N endSchema() { - return and(); - } - - } - class SubresourcesNestedImpl extends V1CustomResourceSubresourcesFluentImpl> implements V1CustomResourceDefinitionVersionFluentImpl.SubresourcesNested,Nested{ - SubresourcesNestedImpl(V1CustomResourceSubresources item) { - this.builder = new V1CustomResourceSubresourcesBuilder(this, item); - } - SubresourcesNestedImpl() { - this.builder = new V1CustomResourceSubresourcesBuilder(this); - } - V1CustomResourceSubresourcesBuilder builder; - public N and() { - return (N) V1CustomResourceDefinitionVersionFluentImpl.this.withSubresources(builder.build()); - } - public N endSubresources() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleBuilder.java index 81c2054de3..aa1b45e967 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceSubresourceScaleBuilder extends V1CustomResourceSubresourceScaleFluentImpl implements VisitableBuilder{ +public class V1CustomResourceSubresourceScaleBuilder extends V1CustomResourceSubresourceScaleFluent implements VisitableBuilder{ public V1CustomResourceSubresourceScaleBuilder() { - this(false); - } - public V1CustomResourceSubresourceScaleBuilder(Boolean validationEnabled) { - this(new V1CustomResourceSubresourceScale(), validationEnabled); + this(new V1CustomResourceSubresourceScale()); } + public V1CustomResourceSubresourceScaleBuilder(V1CustomResourceSubresourceScaleFluent fluent) { - this(fluent, false); - } - public V1CustomResourceSubresourceScaleBuilder(V1CustomResourceSubresourceScaleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceSubresourceScale(), validationEnabled); + this(fluent, new V1CustomResourceSubresourceScale()); } + public V1CustomResourceSubresourceScaleBuilder(V1CustomResourceSubresourceScaleFluent fluent,V1CustomResourceSubresourceScale instance) { - this(fluent, instance, false); - } - public V1CustomResourceSubresourceScaleBuilder(V1CustomResourceSubresourceScaleFluent fluent,V1CustomResourceSubresourceScale instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLabelSelectorPath(instance.getLabelSelectorPath()); - fluent.withSpecReplicasPath(instance.getSpecReplicasPath()); - fluent.withStatusReplicasPath(instance.getStatusReplicasPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceSubresourceScaleBuilder(V1CustomResourceSubresourceScale instance) { - this(instance,false); - } - public V1CustomResourceSubresourceScaleBuilder(V1CustomResourceSubresourceScale instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLabelSelectorPath(instance.getLabelSelectorPath()); - this.withSpecReplicasPath(instance.getSpecReplicasPath()); - this.withStatusReplicasPath(instance.getStatusReplicasPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceSubresourceScaleFluent fluent; - Boolean validationEnabled; + public V1CustomResourceSubresourceScale build() { V1CustomResourceSubresourceScale buildable = new V1CustomResourceSubresourceScale(); buildable.setLabelSelectorPath(fluent.getLabelSelectorPath()); @@ -49,4 +29,5 @@ public V1CustomResourceSubresourceScale build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleFluent.java index 7966e77691..e1c1e459d4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleFluent.java @@ -1,22 +1,97 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1CustomResourceSubresourceScaleFluent> extends Fluent{ - public String getLabelSelectorPath(); - public A withLabelSelectorPath(String labelSelectorPath); - public Boolean hasLabelSelectorPath(); - public String getSpecReplicasPath(); - public A withSpecReplicasPath(String specReplicasPath); - public Boolean hasSpecReplicasPath(); - public String getStatusReplicasPath(); - public A withStatusReplicasPath(String statusReplicasPath); - public Boolean hasStatusReplicasPath(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceSubresourceScaleFluent> extends BaseFluent{ + public V1CustomResourceSubresourceScaleFluent() { + } + public V1CustomResourceSubresourceScaleFluent(V1CustomResourceSubresourceScale instance) { + this.copyInstance(instance); + } + private String labelSelectorPath; + private String specReplicasPath; + private String statusReplicasPath; + + protected void copyInstance(V1CustomResourceSubresourceScale instance) { + instance = (instance != null ? instance : new V1CustomResourceSubresourceScale()); + if (instance != null) { + this.withLabelSelectorPath(instance.getLabelSelectorPath()); + this.withSpecReplicasPath(instance.getSpecReplicasPath()); + this.withStatusReplicasPath(instance.getStatusReplicasPath()); + } + } + + public String getLabelSelectorPath() { + return this.labelSelectorPath; + } + + public A withLabelSelectorPath(String labelSelectorPath) { + this.labelSelectorPath = labelSelectorPath; + return (A) this; + } + + public boolean hasLabelSelectorPath() { + return this.labelSelectorPath != null; + } + + public String getSpecReplicasPath() { + return this.specReplicasPath; + } + + public A withSpecReplicasPath(String specReplicasPath) { + this.specReplicasPath = specReplicasPath; + return (A) this; + } + + public boolean hasSpecReplicasPath() { + return this.specReplicasPath != null; + } + + public String getStatusReplicasPath() { + return this.statusReplicasPath; + } + + public A withStatusReplicasPath(String statusReplicasPath) { + this.statusReplicasPath = statusReplicasPath; + return (A) this; + } + + public boolean hasStatusReplicasPath() { + return this.statusReplicasPath != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceSubresourceScaleFluent that = (V1CustomResourceSubresourceScaleFluent) o; + if (!java.util.Objects.equals(labelSelectorPath, that.labelSelectorPath)) return false; + if (!java.util.Objects.equals(specReplicasPath, that.specReplicasPath)) return false; + if (!java.util.Objects.equals(statusReplicasPath, that.statusReplicasPath)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(labelSelectorPath, specReplicasPath, statusReplicasPath, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (labelSelectorPath != null) { sb.append("labelSelectorPath:"); sb.append(labelSelectorPath + ","); } + if (specReplicasPath != null) { sb.append("specReplicasPath:"); sb.append(specReplicasPath + ","); } + if (statusReplicasPath != null) { sb.append("statusReplicasPath:"); sb.append(statusReplicasPath); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleFluentImpl.java deleted file mode 100644 index 5cb4cd0b73..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourceScaleFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceSubresourceScaleFluentImpl> extends BaseFluent implements V1CustomResourceSubresourceScaleFluent{ - public V1CustomResourceSubresourceScaleFluentImpl() { - } - public V1CustomResourceSubresourceScaleFluentImpl(V1CustomResourceSubresourceScale instance) { - if (instance != null) { - this.withLabelSelectorPath(instance.getLabelSelectorPath()); - this.withSpecReplicasPath(instance.getSpecReplicasPath()); - this.withStatusReplicasPath(instance.getStatusReplicasPath()); - } - } - private String labelSelectorPath; - private String specReplicasPath; - private String statusReplicasPath; - public String getLabelSelectorPath() { - return this.labelSelectorPath; - } - public A withLabelSelectorPath(String labelSelectorPath) { - this.labelSelectorPath=labelSelectorPath; return (A) this; - } - public Boolean hasLabelSelectorPath() { - return this.labelSelectorPath != null; - } - public String getSpecReplicasPath() { - return this.specReplicasPath; - } - public A withSpecReplicasPath(String specReplicasPath) { - this.specReplicasPath=specReplicasPath; return (A) this; - } - public Boolean hasSpecReplicasPath() { - return this.specReplicasPath != null; - } - public String getStatusReplicasPath() { - return this.statusReplicasPath; - } - public A withStatusReplicasPath(String statusReplicasPath) { - this.statusReplicasPath=statusReplicasPath; return (A) this; - } - public Boolean hasStatusReplicasPath() { - return this.statusReplicasPath != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceSubresourceScaleFluentImpl that = (V1CustomResourceSubresourceScaleFluentImpl) o; - if (!java.util.Objects.equals(labelSelectorPath, that.labelSelectorPath)) return false; - - if (!java.util.Objects.equals(specReplicasPath, that.specReplicasPath)) return false; - - if (!java.util.Objects.equals(statusReplicasPath, that.statusReplicasPath)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(labelSelectorPath, specReplicasPath, statusReplicasPath, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (labelSelectorPath != null) { sb.append("labelSelectorPath:"); sb.append(labelSelectorPath + ","); } - if (specReplicasPath != null) { sb.append("specReplicasPath:"); sb.append(specReplicasPath + ","); } - if (statusReplicasPath != null) { sb.append("statusReplicasPath:"); sb.append(statusReplicasPath); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesBuilder.java index bd61d20534..76fb28a11b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceSubresourcesBuilder extends V1CustomResourceSubresourcesFluentImpl implements VisitableBuilder{ +public class V1CustomResourceSubresourcesBuilder extends V1CustomResourceSubresourcesFluent implements VisitableBuilder{ public V1CustomResourceSubresourcesBuilder() { - this(false); - } - public V1CustomResourceSubresourcesBuilder(Boolean validationEnabled) { - this(new V1CustomResourceSubresources(), validationEnabled); + this(new V1CustomResourceSubresources()); } + public V1CustomResourceSubresourcesBuilder(V1CustomResourceSubresourcesFluent fluent) { - this(fluent, false); - } - public V1CustomResourceSubresourcesBuilder(V1CustomResourceSubresourcesFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceSubresources(), validationEnabled); + this(fluent, new V1CustomResourceSubresources()); } + public V1CustomResourceSubresourcesBuilder(V1CustomResourceSubresourcesFluent fluent,V1CustomResourceSubresources instance) { - this(fluent, instance, false); - } - public V1CustomResourceSubresourcesBuilder(V1CustomResourceSubresourcesFluent fluent,V1CustomResourceSubresources instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withScale(instance.getScale()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceSubresourcesBuilder(V1CustomResourceSubresources instance) { - this(instance,false); - } - public V1CustomResourceSubresourcesBuilder(V1CustomResourceSubresources instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withScale(instance.getScale()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceSubresourcesFluent fluent; - Boolean validationEnabled; + public V1CustomResourceSubresources build() { V1CustomResourceSubresources buildable = new V1CustomResourceSubresources(); - buildable.setScale(fluent.getScale()); + buildable.setScale(fluent.buildScale()); buildable.setStatus(fluent.getStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesFluent.java index 489e647a48..d290d2d084 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; import java.lang.Object; -import java.lang.Boolean; +import java.lang.String; - /** - * Generated - */ -public interface V1CustomResourceSubresourcesFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildScale instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceSubresourceScale getScale(); - public V1CustomResourceSubresourceScale buildScale(); - public A withScale(V1CustomResourceSubresourceScale scale); - public Boolean hasScale(); - public V1CustomResourceSubresourcesFluent.ScaleNested withNewScale(); - public V1CustomResourceSubresourcesFluent.ScaleNested withNewScaleLike(V1CustomResourceSubresourceScale item); - public V1CustomResourceSubresourcesFluent.ScaleNested editScale(); - public V1CustomResourceSubresourcesFluent.ScaleNested editOrNewScale(); - public V1CustomResourceSubresourcesFluent.ScaleNested editOrNewScaleLike(V1CustomResourceSubresourceScale item); - public Object getStatus(); - public A withStatus(Object status); - public Boolean hasStatus(); - public interface ScaleNested extends Nested,V1CustomResourceSubresourceScaleFluent>{ - public N and(); - public N endScale(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceSubresourcesFluent> extends BaseFluent{ + public V1CustomResourceSubresourcesFluent() { + } + + public V1CustomResourceSubresourcesFluent(V1CustomResourceSubresources instance) { + this.copyInstance(instance); + } + private V1CustomResourceSubresourceScaleBuilder scale; + private Object status; + + protected void copyInstance(V1CustomResourceSubresources instance) { + instance = (instance != null ? instance : new V1CustomResourceSubresources()); + if (instance != null) { + this.withScale(instance.getScale()); + this.withStatus(instance.getStatus()); + } + } + + public V1CustomResourceSubresourceScale buildScale() { + return this.scale != null ? this.scale.build() : null; + } + + public A withScale(V1CustomResourceSubresourceScale scale) { + this._visitables.remove("scale"); + if (scale != null) { + this.scale = new V1CustomResourceSubresourceScaleBuilder(scale); + this._visitables.get("scale").add(this.scale); + } else { + this.scale = null; + this._visitables.get("scale").remove(this.scale); + } + return (A) this; + } + + public boolean hasScale() { + return this.scale != null; + } + + public ScaleNested withNewScale() { + return new ScaleNested(null); + } + + public ScaleNested withNewScaleLike(V1CustomResourceSubresourceScale item) { + return new ScaleNested(item); + } + + public ScaleNested editScale() { + return withNewScaleLike(java.util.Optional.ofNullable(buildScale()).orElse(null)); + } + + public ScaleNested editOrNewScale() { + return withNewScaleLike(java.util.Optional.ofNullable(buildScale()).orElse(new V1CustomResourceSubresourceScaleBuilder().build())); } + public ScaleNested editOrNewScaleLike(V1CustomResourceSubresourceScale item) { + return withNewScaleLike(java.util.Optional.ofNullable(buildScale()).orElse(item)); + } + + public Object getStatus() { + return this.status; + } + + public A withStatus(Object status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceSubresourcesFluent that = (V1CustomResourceSubresourcesFluent) o; + if (!java.util.Objects.equals(scale, that.scale)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(scale, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (scale != null) { sb.append("scale:"); sb.append(scale + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class ScaleNested extends V1CustomResourceSubresourceScaleFluent> implements Nested{ + ScaleNested(V1CustomResourceSubresourceScale item) { + this.builder = new V1CustomResourceSubresourceScaleBuilder(this, item); + } + V1CustomResourceSubresourceScaleBuilder builder; + + public N and() { + return (N) V1CustomResourceSubresourcesFluent.this.withScale(builder.build()); + } + + public N endScale() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesFluentImpl.java deleted file mode 100644 index 6e8ae4d519..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceSubresourcesFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceSubresourcesFluentImpl> extends BaseFluent implements V1CustomResourceSubresourcesFluent{ - public V1CustomResourceSubresourcesFluentImpl() { - } - public V1CustomResourceSubresourcesFluentImpl(V1CustomResourceSubresources instance) { - if (instance != null) { - this.withScale(instance.getScale()); - this.withStatus(instance.getStatus()); - } - } - private V1CustomResourceSubresourceScaleBuilder scale; - private Object status; - - /** - * This method has been deprecated, please use method buildScale instead. - * @return The buildable object. - */ - @Deprecated - public V1CustomResourceSubresourceScale getScale() { - return this.scale!=null ?this.scale.build():null; - } - public V1CustomResourceSubresourceScale buildScale() { - return this.scale!=null ?this.scale.build():null; - } - public A withScale(V1CustomResourceSubresourceScale scale) { - _visitables.get("scale").remove(this.scale); - if (scale!=null){ this.scale= new V1CustomResourceSubresourceScaleBuilder(scale); _visitables.get("scale").add(this.scale);} else { this.scale = null; _visitables.get("scale").remove(this.scale); } return (A) this; - } - public Boolean hasScale() { - return this.scale != null; - } - public V1CustomResourceSubresourcesFluentImpl.ScaleNested withNewScale() { - return new V1CustomResourceSubresourcesFluentImpl.ScaleNestedImpl(); - } - public V1CustomResourceSubresourcesFluentImpl.ScaleNested withNewScaleLike(V1CustomResourceSubresourceScale item) { - return new V1CustomResourceSubresourcesFluentImpl.ScaleNestedImpl(item); - } - public V1CustomResourceSubresourcesFluentImpl.ScaleNested editScale() { - return withNewScaleLike(getScale()); - } - public V1CustomResourceSubresourcesFluentImpl.ScaleNested editOrNewScale() { - return withNewScaleLike(getScale() != null ? getScale(): new V1CustomResourceSubresourceScaleBuilder().build()); - } - public V1CustomResourceSubresourcesFluentImpl.ScaleNested editOrNewScaleLike(V1CustomResourceSubresourceScale item) { - return withNewScaleLike(getScale() != null ? getScale(): item); - } - public Object getStatus() { - return this.status; - } - public A withStatus(Object status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceSubresourcesFluentImpl that = (V1CustomResourceSubresourcesFluentImpl) o; - if (!java.util.Objects.equals(scale, that.scale)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(scale, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (scale != null) { sb.append("scale:"); sb.append(scale + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class ScaleNestedImpl extends V1CustomResourceSubresourceScaleFluentImpl> implements V1CustomResourceSubresourcesFluentImpl.ScaleNested,Nested{ - ScaleNestedImpl(V1CustomResourceSubresourceScale item) { - this.builder = new V1CustomResourceSubresourceScaleBuilder(this, item); - } - ScaleNestedImpl() { - this.builder = new V1CustomResourceSubresourceScaleBuilder(this); - } - V1CustomResourceSubresourceScaleBuilder builder; - public N and() { - return (N) V1CustomResourceSubresourcesFluentImpl.this.withScale(builder.build()); - } - public N endScale() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationBuilder.java index 3ade5ef49f..bb3bfd17ba 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1CustomResourceValidationBuilder extends V1CustomResourceValidationFluentImpl implements VisitableBuilder{ +public class V1CustomResourceValidationBuilder extends V1CustomResourceValidationFluent implements VisitableBuilder{ public V1CustomResourceValidationBuilder() { - this(false); - } - public V1CustomResourceValidationBuilder(Boolean validationEnabled) { - this(new V1CustomResourceValidation(), validationEnabled); + this(new V1CustomResourceValidation()); } + public V1CustomResourceValidationBuilder(V1CustomResourceValidationFluent fluent) { - this(fluent, false); - } - public V1CustomResourceValidationBuilder(V1CustomResourceValidationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1CustomResourceValidation(), validationEnabled); + this(fluent, new V1CustomResourceValidation()); } + public V1CustomResourceValidationBuilder(V1CustomResourceValidationFluent fluent,V1CustomResourceValidation instance) { - this(fluent, instance, false); - } - public V1CustomResourceValidationBuilder(V1CustomResourceValidationFluent fluent,V1CustomResourceValidation instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withOpenAPIV3Schema(instance.getOpenAPIV3Schema()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1CustomResourceValidationBuilder(V1CustomResourceValidation instance) { - this(instance,false); - } - public V1CustomResourceValidationBuilder(V1CustomResourceValidation instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withOpenAPIV3Schema(instance.getOpenAPIV3Schema()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1CustomResourceValidationFluent fluent; - Boolean validationEnabled; + public V1CustomResourceValidation build() { V1CustomResourceValidation buildable = new V1CustomResourceValidation(); - buildable.setOpenAPIV3Schema(fluent.getOpenAPIV3Schema()); + buildable.setOpenAPIV3Schema(fluent.buildOpenAPIV3Schema()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationFluent.java index 8018bef247..e2309e886f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1CustomResourceValidationFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildOpenAPIV3Schema instead. - * @return The buildable object. - */ - @Deprecated - public V1JSONSchemaProps getOpenAPIV3Schema(); - public V1JSONSchemaProps buildOpenAPIV3Schema(); - public A withOpenAPIV3Schema(V1JSONSchemaProps openAPIV3Schema); - public Boolean hasOpenAPIV3Schema(); - public V1CustomResourceValidationFluent.OpenAPIV3SchemaNested withNewOpenAPIV3Schema(); - public V1CustomResourceValidationFluent.OpenAPIV3SchemaNested withNewOpenAPIV3SchemaLike(V1JSONSchemaProps item); - public V1CustomResourceValidationFluent.OpenAPIV3SchemaNested editOpenAPIV3Schema(); - public V1CustomResourceValidationFluent.OpenAPIV3SchemaNested editOrNewOpenAPIV3Schema(); - public V1CustomResourceValidationFluent.OpenAPIV3SchemaNested editOrNewOpenAPIV3SchemaLike(V1JSONSchemaProps item); - public interface OpenAPIV3SchemaNested extends Nested,V1JSONSchemaPropsFluent>{ - public N and(); - public N endOpenAPIV3Schema(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1CustomResourceValidationFluent> extends BaseFluent{ + public V1CustomResourceValidationFluent() { + } + + public V1CustomResourceValidationFluent(V1CustomResourceValidation instance) { + this.copyInstance(instance); + } + private V1JSONSchemaPropsBuilder openAPIV3Schema; + + protected void copyInstance(V1CustomResourceValidation instance) { + instance = (instance != null ? instance : new V1CustomResourceValidation()); + if (instance != null) { + this.withOpenAPIV3Schema(instance.getOpenAPIV3Schema()); + } + } + + public V1JSONSchemaProps buildOpenAPIV3Schema() { + return this.openAPIV3Schema != null ? this.openAPIV3Schema.build() : null; + } + + public A withOpenAPIV3Schema(V1JSONSchemaProps openAPIV3Schema) { + this._visitables.remove("openAPIV3Schema"); + if (openAPIV3Schema != null) { + this.openAPIV3Schema = new V1JSONSchemaPropsBuilder(openAPIV3Schema); + this._visitables.get("openAPIV3Schema").add(this.openAPIV3Schema); + } else { + this.openAPIV3Schema = null; + this._visitables.get("openAPIV3Schema").remove(this.openAPIV3Schema); + } + return (A) this; + } + + public boolean hasOpenAPIV3Schema() { + return this.openAPIV3Schema != null; + } + + public OpenAPIV3SchemaNested withNewOpenAPIV3Schema() { + return new OpenAPIV3SchemaNested(null); + } + + public OpenAPIV3SchemaNested withNewOpenAPIV3SchemaLike(V1JSONSchemaProps item) { + return new OpenAPIV3SchemaNested(item); + } + + public OpenAPIV3SchemaNested editOpenAPIV3Schema() { + return withNewOpenAPIV3SchemaLike(java.util.Optional.ofNullable(buildOpenAPIV3Schema()).orElse(null)); + } + + public OpenAPIV3SchemaNested editOrNewOpenAPIV3Schema() { + return withNewOpenAPIV3SchemaLike(java.util.Optional.ofNullable(buildOpenAPIV3Schema()).orElse(new V1JSONSchemaPropsBuilder().build())); + } + + public OpenAPIV3SchemaNested editOrNewOpenAPIV3SchemaLike(V1JSONSchemaProps item) { + return withNewOpenAPIV3SchemaLike(java.util.Optional.ofNullable(buildOpenAPIV3Schema()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1CustomResourceValidationFluent that = (V1CustomResourceValidationFluent) o; + if (!java.util.Objects.equals(openAPIV3Schema, that.openAPIV3Schema)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(openAPIV3Schema, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (openAPIV3Schema != null) { sb.append("openAPIV3Schema:"); sb.append(openAPIV3Schema); } + sb.append("}"); + return sb.toString(); } + public class OpenAPIV3SchemaNested extends V1JSONSchemaPropsFluent> implements Nested{ + OpenAPIV3SchemaNested(V1JSONSchemaProps item) { + this.builder = new V1JSONSchemaPropsBuilder(this, item); + } + V1JSONSchemaPropsBuilder builder; + + public N and() { + return (N) V1CustomResourceValidationFluent.this.withOpenAPIV3Schema(builder.build()); + } + + public N endOpenAPIV3Schema() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationFluentImpl.java deleted file mode 100644 index 3d3af8392a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1CustomResourceValidationFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1CustomResourceValidationFluentImpl> extends BaseFluent implements V1CustomResourceValidationFluent{ - public V1CustomResourceValidationFluentImpl() { - } - public V1CustomResourceValidationFluentImpl(V1CustomResourceValidation instance) { - if (instance != null) { - this.withOpenAPIV3Schema(instance.getOpenAPIV3Schema()); - } - } - private V1JSONSchemaPropsBuilder openAPIV3Schema; - - /** - * This method has been deprecated, please use method buildOpenAPIV3Schema instead. - * @return The buildable object. - */ - @Deprecated - public V1JSONSchemaProps getOpenAPIV3Schema() { - return this.openAPIV3Schema!=null ?this.openAPIV3Schema.build():null; - } - public V1JSONSchemaProps buildOpenAPIV3Schema() { - return this.openAPIV3Schema!=null ?this.openAPIV3Schema.build():null; - } - public A withOpenAPIV3Schema(V1JSONSchemaProps openAPIV3Schema) { - _visitables.get("openAPIV3Schema").remove(this.openAPIV3Schema); - if (openAPIV3Schema!=null){ this.openAPIV3Schema= new V1JSONSchemaPropsBuilder(openAPIV3Schema); _visitables.get("openAPIV3Schema").add(this.openAPIV3Schema);} else { this.openAPIV3Schema = null; _visitables.get("openAPIV3Schema").remove(this.openAPIV3Schema); } return (A) this; - } - public Boolean hasOpenAPIV3Schema() { - return this.openAPIV3Schema != null; - } - public V1CustomResourceValidationFluentImpl.OpenAPIV3SchemaNested withNewOpenAPIV3Schema() { - return new V1CustomResourceValidationFluentImpl.OpenAPIV3SchemaNestedImpl(); - } - public V1CustomResourceValidationFluentImpl.OpenAPIV3SchemaNested withNewOpenAPIV3SchemaLike(V1JSONSchemaProps item) { - return new V1CustomResourceValidationFluentImpl.OpenAPIV3SchemaNestedImpl(item); - } - public V1CustomResourceValidationFluentImpl.OpenAPIV3SchemaNested editOpenAPIV3Schema() { - return withNewOpenAPIV3SchemaLike(getOpenAPIV3Schema()); - } - public V1CustomResourceValidationFluentImpl.OpenAPIV3SchemaNested editOrNewOpenAPIV3Schema() { - return withNewOpenAPIV3SchemaLike(getOpenAPIV3Schema() != null ? getOpenAPIV3Schema(): new V1JSONSchemaPropsBuilder().build()); - } - public V1CustomResourceValidationFluentImpl.OpenAPIV3SchemaNested editOrNewOpenAPIV3SchemaLike(V1JSONSchemaProps item) { - return withNewOpenAPIV3SchemaLike(getOpenAPIV3Schema() != null ? getOpenAPIV3Schema(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1CustomResourceValidationFluentImpl that = (V1CustomResourceValidationFluentImpl) o; - if (!java.util.Objects.equals(openAPIV3Schema, that.openAPIV3Schema)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(openAPIV3Schema, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (openAPIV3Schema != null) { sb.append("openAPIV3Schema:"); sb.append(openAPIV3Schema); } - sb.append("}"); - return sb.toString(); - } - class OpenAPIV3SchemaNestedImpl extends V1JSONSchemaPropsFluentImpl> implements V1CustomResourceValidationFluentImpl.OpenAPIV3SchemaNested,Nested{ - OpenAPIV3SchemaNestedImpl(V1JSONSchemaProps item) { - this.builder = new V1JSONSchemaPropsBuilder(this, item); - } - OpenAPIV3SchemaNestedImpl() { - this.builder = new V1JSONSchemaPropsBuilder(this); - } - V1JSONSchemaPropsBuilder builder; - public N and() { - return (N) V1CustomResourceValidationFluentImpl.this.withOpenAPIV3Schema(builder.build()); - } - public N endOpenAPIV3Schema() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointBuilder.java index 6b77dc0d98..89dd9e89cd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DaemonEndpointBuilder extends V1DaemonEndpointFluentImpl implements VisitableBuilder{ +public class V1DaemonEndpointBuilder extends V1DaemonEndpointFluent implements VisitableBuilder{ public V1DaemonEndpointBuilder() { - this(false); - } - public V1DaemonEndpointBuilder(Boolean validationEnabled) { - this(new V1DaemonEndpoint(), validationEnabled); + this(new V1DaemonEndpoint()); } + public V1DaemonEndpointBuilder(V1DaemonEndpointFluent fluent) { - this(fluent, false); - } - public V1DaemonEndpointBuilder(V1DaemonEndpointFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DaemonEndpoint(), validationEnabled); + this(fluent, new V1DaemonEndpoint()); } + public V1DaemonEndpointBuilder(V1DaemonEndpointFluent fluent,V1DaemonEndpoint instance) { - this(fluent, instance, false); - } - public V1DaemonEndpointBuilder(V1DaemonEndpointFluent fluent,V1DaemonEndpoint instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DaemonEndpointBuilder(V1DaemonEndpoint instance) { - this(instance,false); - } - public V1DaemonEndpointBuilder(V1DaemonEndpoint instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DaemonEndpointFluent fluent; - Boolean validationEnabled; + public V1DaemonEndpoint build() { V1DaemonEndpoint buildable = new V1DaemonEndpoint(); buildable.setPort(fluent.getPort()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointFluent.java index 0e6e6b85ad..fb492cee62 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointFluent.java @@ -1,16 +1,64 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1DaemonEndpointFluent> extends Fluent{ - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DaemonEndpointFluent> extends BaseFluent{ + public V1DaemonEndpointFluent() { + } + public V1DaemonEndpointFluent(V1DaemonEndpoint instance) { + this.copyInstance(instance); + } + private Integer port; + + protected void copyInstance(V1DaemonEndpoint instance) { + instance = (instance != null ? instance : new V1DaemonEndpoint()); + if (instance != null) { + this.withPort(instance.getPort()); + } + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DaemonEndpointFluent that = (V1DaemonEndpointFluent) o; + if (!java.util.Objects.equals(port, that.port)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(port, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (port != null) { sb.append("port:"); sb.append(port); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointFluentImpl.java deleted file mode 100644 index 72f89303f4..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonEndpointFluentImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DaemonEndpointFluentImpl> extends BaseFluent implements V1DaemonEndpointFluent{ - public V1DaemonEndpointFluentImpl() { - } - public V1DaemonEndpointFluentImpl(V1DaemonEndpoint instance) { - if (instance != null) { - this.withPort(instance.getPort()); - } - } - private Integer port; - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DaemonEndpointFluentImpl that = (V1DaemonEndpointFluentImpl) o; - if (!java.util.Objects.equals(port, that.port)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(port, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (port != null) { sb.append("port:"); sb.append(port); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetBuilder.java index 395966445b..7270afce11 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DaemonSetBuilder extends V1DaemonSetFluentImpl implements VisitableBuilder{ +public class V1DaemonSetBuilder extends V1DaemonSetFluent implements VisitableBuilder{ public V1DaemonSetBuilder() { - this(false); - } - public V1DaemonSetBuilder(Boolean validationEnabled) { - this(new V1DaemonSet(), validationEnabled); + this(new V1DaemonSet()); } + public V1DaemonSetBuilder(V1DaemonSetFluent fluent) { - this(fluent, false); - } - public V1DaemonSetBuilder(V1DaemonSetFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DaemonSet(), validationEnabled); + this(fluent, new V1DaemonSet()); } + public V1DaemonSetBuilder(V1DaemonSetFluent fluent,V1DaemonSet instance) { - this(fluent, instance, false); - } - public V1DaemonSetBuilder(V1DaemonSetFluent fluent,V1DaemonSet instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DaemonSetBuilder(V1DaemonSet instance) { - this(instance,false); - } - public V1DaemonSetBuilder(V1DaemonSet instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DaemonSetFluent fluent; - Boolean validationEnabled; + public V1DaemonSet build() { V1DaemonSet buildable = new V1DaemonSet(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionBuilder.java index fafe0a24fb..b50e3a9b3e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DaemonSetConditionBuilder extends V1DaemonSetConditionFluentImpl implements VisitableBuilder{ +public class V1DaemonSetConditionBuilder extends V1DaemonSetConditionFluent implements VisitableBuilder{ public V1DaemonSetConditionBuilder() { - this(false); - } - public V1DaemonSetConditionBuilder(Boolean validationEnabled) { - this(new V1DaemonSetCondition(), validationEnabled); + this(new V1DaemonSetCondition()); } + public V1DaemonSetConditionBuilder(V1DaemonSetConditionFluent fluent) { - this(fluent, false); - } - public V1DaemonSetConditionBuilder(V1DaemonSetConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DaemonSetCondition(), validationEnabled); + this(fluent, new V1DaemonSetCondition()); } + public V1DaemonSetConditionBuilder(V1DaemonSetConditionFluent fluent,V1DaemonSetCondition instance) { - this(fluent, instance, false); - } - public V1DaemonSetConditionBuilder(V1DaemonSetConditionFluent fluent,V1DaemonSetCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DaemonSetConditionBuilder(V1DaemonSetCondition instance) { - this(instance,false); - } - public V1DaemonSetConditionBuilder(V1DaemonSetCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DaemonSetConditionFluent fluent; - Boolean validationEnabled; + public V1DaemonSetCondition build() { V1DaemonSetCondition buildable = new V1DaemonSetCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1DaemonSetCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionFluent.java index 284d6ee3d2..a2907a72e6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DaemonSetConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DaemonSetConditionFluent> extends BaseFluent{ + public V1DaemonSetConditionFluent() { + } + public V1DaemonSetConditionFluent(V1DaemonSetCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1DaemonSetCondition instance) { + instance = (instance != null ? instance : new V1DaemonSetCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DaemonSetConditionFluent that = (V1DaemonSetConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionFluentImpl.java deleted file mode 100644 index cd5e1e4138..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DaemonSetConditionFluentImpl> extends BaseFluent implements V1DaemonSetConditionFluent{ - public V1DaemonSetConditionFluentImpl() { - } - public V1DaemonSetConditionFluentImpl(V1DaemonSetCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DaemonSetConditionFluentImpl that = (V1DaemonSetConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetFluent.java index bd38e7522a..3882253525 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1DaemonSetFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1DaemonSetFluent.MetadataNested withNewMetadata(); - public V1DaemonSetFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1DaemonSetFluent.MetadataNested editMetadata(); - public V1DaemonSetFluent.MetadataNested editOrNewMetadata(); - public V1DaemonSetFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1DaemonSetSpec getSpec(); - public V1DaemonSetSpec buildSpec(); - public A withSpec(V1DaemonSetSpec spec); - public Boolean hasSpec(); - public V1DaemonSetFluent.SpecNested withNewSpec(); - public V1DaemonSetFluent.SpecNested withNewSpecLike(V1DaemonSetSpec item); - public V1DaemonSetFluent.SpecNested editSpec(); - public V1DaemonSetFluent.SpecNested editOrNewSpec(); - public V1DaemonSetFluent.SpecNested editOrNewSpecLike(V1DaemonSetSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1DaemonSetStatus getStatus(); - public V1DaemonSetStatus buildStatus(); - public A withStatus(V1DaemonSetStatus status); - public Boolean hasStatus(); - public V1DaemonSetFluent.StatusNested withNewStatus(); - public V1DaemonSetFluent.StatusNested withNewStatusLike(V1DaemonSetStatus item); - public V1DaemonSetFluent.StatusNested editStatus(); - public V1DaemonSetFluent.StatusNested editOrNewStatus(); - public V1DaemonSetFluent.StatusNested editOrNewStatusLike(V1DaemonSetStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DaemonSetFluent> extends BaseFluent{ + public V1DaemonSetFluent() { + } + + public V1DaemonSetFluent(V1DaemonSet instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1DaemonSetSpecBuilder spec; + private V1DaemonSetStatusBuilder status; + + protected void copyInstance(V1DaemonSet instance) { + instance = (instance != null ? instance : new V1DaemonSet()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1DaemonSetSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1DaemonSetSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1DaemonSetSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1DaemonSetSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1DaemonSetSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1DaemonSetSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1DaemonSetSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1DaemonSetStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1DaemonSetStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1DaemonSetStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1DaemonSetStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1DaemonSetStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1DaemonSetStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DaemonSetFluent that = (V1DaemonSetFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1DaemonSetFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1DaemonSetStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1DaemonSetSpecFluent> implements Nested{ + SpecNested(V1DaemonSetSpec item) { + this.builder = new V1DaemonSetSpecBuilder(this, item); + } + V1DaemonSetSpecBuilder builder; + + public N and() { + return (N) V1DaemonSetFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1DaemonSetStatusFluent> implements Nested{ + StatusNested(V1DaemonSetStatus item) { + this.builder = new V1DaemonSetStatusBuilder(this, item); + } + V1DaemonSetStatusBuilder builder; + + public N and() { + return (N) V1DaemonSetFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetFluentImpl.java deleted file mode 100644 index 2d873e4c25..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DaemonSetFluentImpl> extends BaseFluent implements V1DaemonSetFluent{ - public V1DaemonSetFluentImpl() { - } - public V1DaemonSetFluentImpl(V1DaemonSet instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1DaemonSetSpecBuilder spec; - private V1DaemonSetStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1DaemonSetFluentImpl.MetadataNested withNewMetadata() { - return new V1DaemonSetFluentImpl.MetadataNestedImpl(); - } - public V1DaemonSetFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1DaemonSetFluentImpl.MetadataNestedImpl(item); - } - public V1DaemonSetFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1DaemonSetFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1DaemonSetFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1DaemonSetSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1DaemonSetSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1DaemonSetSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1DaemonSetSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1DaemonSetFluentImpl.SpecNested withNewSpec() { - return new V1DaemonSetFluentImpl.SpecNestedImpl(); - } - public V1DaemonSetFluentImpl.SpecNested withNewSpecLike(V1DaemonSetSpec item) { - return new V1DaemonSetFluentImpl.SpecNestedImpl(item); - } - public V1DaemonSetFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1DaemonSetFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1DaemonSetSpecBuilder().build()); - } - public V1DaemonSetFluentImpl.SpecNested editOrNewSpecLike(V1DaemonSetSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1DaemonSetStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1DaemonSetStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1DaemonSetStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1DaemonSetStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1DaemonSetFluentImpl.StatusNested withNewStatus() { - return new V1DaemonSetFluentImpl.StatusNestedImpl(); - } - public V1DaemonSetFluentImpl.StatusNested withNewStatusLike(V1DaemonSetStatus item) { - return new V1DaemonSetFluentImpl.StatusNestedImpl(item); - } - public V1DaemonSetFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1DaemonSetFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1DaemonSetStatusBuilder().build()); - } - public V1DaemonSetFluentImpl.StatusNested editOrNewStatusLike(V1DaemonSetStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DaemonSetFluentImpl that = (V1DaemonSetFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1DaemonSetFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1DaemonSetFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1DaemonSetSpecFluentImpl> implements V1DaemonSetFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1DaemonSetSpec item) { - this.builder = new V1DaemonSetSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1DaemonSetSpecBuilder(this); - } - V1DaemonSetSpecBuilder builder; - public N and() { - return (N) V1DaemonSetFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1DaemonSetStatusFluentImpl> implements V1DaemonSetFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1DaemonSetStatus item) { - this.builder = new V1DaemonSetStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1DaemonSetStatusBuilder(this); - } - V1DaemonSetStatusBuilder builder; - public N and() { - return (N) V1DaemonSetFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListBuilder.java index 351b4cf32d..4d5a3c190d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DaemonSetListBuilder extends V1DaemonSetListFluentImpl implements VisitableBuilder{ +public class V1DaemonSetListBuilder extends V1DaemonSetListFluent implements VisitableBuilder{ public V1DaemonSetListBuilder() { - this(false); - } - public V1DaemonSetListBuilder(Boolean validationEnabled) { - this(new V1DaemonSetList(), validationEnabled); + this(new V1DaemonSetList()); } + public V1DaemonSetListBuilder(V1DaemonSetListFluent fluent) { - this(fluent, false); - } - public V1DaemonSetListBuilder(V1DaemonSetListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DaemonSetList(), validationEnabled); + this(fluent, new V1DaemonSetList()); } + public V1DaemonSetListBuilder(V1DaemonSetListFluent fluent,V1DaemonSetList instance) { - this(fluent, instance, false); - } - public V1DaemonSetListBuilder(V1DaemonSetListFluent fluent,V1DaemonSetList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DaemonSetListBuilder(V1DaemonSetList instance) { - this(instance,false); - } - public V1DaemonSetListBuilder(V1DaemonSetList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DaemonSetListFluent fluent; - Boolean validationEnabled; + public V1DaemonSetList build() { V1DaemonSetList buildable = new V1DaemonSetList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListFluent.java index 9b6c32ec6a..391155241a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DaemonSetListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1DaemonSet item); - public A setToItems(int index,V1DaemonSet item); - public A addToItems(io.kubernetes.client.openapi.models.V1DaemonSet... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1DaemonSet... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1DaemonSet buildItem(int index); - public V1DaemonSet buildFirstItem(); - public V1DaemonSet buildLastItem(); - public V1DaemonSet buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1DaemonSet... items); - public Boolean hasItems(); - public V1DaemonSetListFluent.ItemsNested addNewItem(); - public V1DaemonSetListFluent.ItemsNested addNewItemLike(V1DaemonSet item); - public V1DaemonSetListFluent.ItemsNested setNewItemLike(int index,V1DaemonSet item); - public V1DaemonSetListFluent.ItemsNested editItem(int index); - public V1DaemonSetListFluent.ItemsNested editFirstItem(); - public V1DaemonSetListFluent.ItemsNested editLastItem(); - public V1DaemonSetListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1DaemonSetListFluent.MetadataNested withNewMetadata(); - public V1DaemonSetListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1DaemonSetListFluent.MetadataNested editMetadata(); - public V1DaemonSetListFluent.MetadataNested editOrNewMetadata(); - public V1DaemonSetListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1DaemonSetFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DaemonSetListFluent> extends BaseFluent{ + public V1DaemonSetListFluent() { + } + + public V1DaemonSetListFluent(V1DaemonSetList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1DaemonSetList instance) { + instance = (instance != null ? instance : new V1DaemonSetList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1DaemonSet item) { + if (this.items == null) {this.items = new ArrayList();} + V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1DaemonSet item) { + if (this.items == null) {this.items = new ArrayList();} + V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1DaemonSet... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1DaemonSet item : items) {V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1DaemonSet item : items) {V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1DaemonSet... items) { + if (this.items == null) return (A)this; + for (V1DaemonSet item : items) {V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1DaemonSet item : items) {V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1DaemonSetBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1DaemonSet buildItem(int index) { + return this.items.get(index).build(); + } + + public V1DaemonSet buildFirstItem() { + return this.items.get(0).build(); + } + + public V1DaemonSet buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1DaemonSet buildMatchingItem(Predicate predicate) { + for (V1DaemonSetBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1DaemonSetBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1DaemonSet item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1DaemonSet... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1DaemonSet item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1DaemonSet item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1DaemonSet item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DaemonSetListFluent that = (V1DaemonSetListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1DaemonSetFluent> implements Nested{ + ItemsNested(int index,V1DaemonSet item) { + this.index = index; + this.builder = new V1DaemonSetBuilder(this, item); + } + V1DaemonSetBuilder builder; + int index; + public N and() { + return (N) V1DaemonSetListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1DaemonSetListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListFluentImpl.java deleted file mode 100644 index f75116658a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DaemonSetListFluentImpl> extends BaseFluent implements V1DaemonSetListFluent{ - public V1DaemonSetListFluentImpl() { - } - public V1DaemonSetListFluentImpl(V1DaemonSetList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1DaemonSet item) { - if (this.items == null) {this.items = new ArrayList();} - V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1DaemonSet item) { - if (this.items == null) {this.items = new ArrayList();} - V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1DaemonSet... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1DaemonSet item : items) {V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1DaemonSet item : items) {V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1DaemonSet... items) { - for (V1DaemonSet item : items) {V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1DaemonSet item : items) {V1DaemonSetBuilder builder = new V1DaemonSetBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1DaemonSetBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1DaemonSet buildItem(int index) { - return this.items.get(index).build(); - } - public V1DaemonSet buildFirstItem() { - return this.items.get(0).build(); - } - public V1DaemonSet buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1DaemonSet buildMatchingItem(Predicate predicate) { - for (V1DaemonSetBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1DaemonSetBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1DaemonSet item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1DaemonSet... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1DaemonSet item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1DaemonSetListFluentImpl.ItemsNested addNewItem() { - return new V1DaemonSetListFluentImpl.ItemsNestedImpl(); - } - public V1DaemonSetListFluentImpl.ItemsNested addNewItemLike(V1DaemonSet item) { - return new V1DaemonSetListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1DaemonSetListFluentImpl.ItemsNested setNewItemLike(int index,V1DaemonSet item) { - return new V1DaemonSetListFluentImpl.ItemsNestedImpl(index, item); - } - public V1DaemonSetListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1DaemonSetListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1DaemonSetListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1DaemonSetListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1DaemonSetListFluentImpl.MetadataNestedImpl(); - } - public V1DaemonSetListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1DaemonSetListFluentImpl.MetadataNestedImpl(item); - } - public V1DaemonSetListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1DaemonSetListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1DaemonSetListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DaemonSetListFluentImpl that = (V1DaemonSetListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1DaemonSetFluentImpl> implements V1DaemonSetListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1DaemonSet item) { - this.index = index; - this.builder = new V1DaemonSetBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1DaemonSetBuilder(this); - } - V1DaemonSetBuilder builder; - int index; - public N and() { - return (N) V1DaemonSetListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1DaemonSetListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1DaemonSetListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecBuilder.java index 626fc183e6..8520507a12 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DaemonSetSpecBuilder extends V1DaemonSetSpecFluentImpl implements VisitableBuilder{ +public class V1DaemonSetSpecBuilder extends V1DaemonSetSpecFluent implements VisitableBuilder{ public V1DaemonSetSpecBuilder() { - this(false); - } - public V1DaemonSetSpecBuilder(Boolean validationEnabled) { - this(new V1DaemonSetSpec(), validationEnabled); + this(new V1DaemonSetSpec()); } + public V1DaemonSetSpecBuilder(V1DaemonSetSpecFluent fluent) { - this(fluent, false); - } - public V1DaemonSetSpecBuilder(V1DaemonSetSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DaemonSetSpec(), validationEnabled); + this(fluent, new V1DaemonSetSpec()); } + public V1DaemonSetSpecBuilder(V1DaemonSetSpecFluent fluent,V1DaemonSetSpec instance) { - this(fluent, instance, false); - } - public V1DaemonSetSpecBuilder(V1DaemonSetSpecFluent fluent,V1DaemonSetSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMinReadySeconds(instance.getMinReadySeconds()); - fluent.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); - fluent.withSelector(instance.getSelector()); - fluent.withTemplate(instance.getTemplate()); - fluent.withUpdateStrategy(instance.getUpdateStrategy()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DaemonSetSpecBuilder(V1DaemonSetSpec instance) { - this(instance,false); - } - public V1DaemonSetSpecBuilder(V1DaemonSetSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); - this.withSelector(instance.getSelector()); - this.withTemplate(instance.getTemplate()); - this.withUpdateStrategy(instance.getUpdateStrategy()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DaemonSetSpecFluent fluent; - Boolean validationEnabled; + public V1DaemonSetSpec build() { V1DaemonSetSpec buildable = new V1DaemonSetSpec(); buildable.setMinReadySeconds(fluent.getMinReadySeconds()); buildable.setRevisionHistoryLimit(fluent.getRevisionHistoryLimit()); - buildable.setSelector(fluent.getSelector()); - buildable.setTemplate(fluent.getTemplate()); - buildable.setUpdateStrategy(fluent.getUpdateStrategy()); + buildable.setSelector(fluent.buildSelector()); + buildable.setTemplate(fluent.buildTemplate()); + buildable.setUpdateStrategy(fluent.buildUpdateStrategy()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecFluent.java index 517a00483c..decce19786 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecFluent.java @@ -1,81 +1,261 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; +import java.lang.String; import java.lang.Integer; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1DaemonSetSpecFluent> extends Fluent{ - public Integer getMinReadySeconds(); - public A withMinReadySeconds(Integer minReadySeconds); - public Boolean hasMinReadySeconds(); - public Integer getRevisionHistoryLimit(); - public A withRevisionHistoryLimit(Integer revisionHistoryLimit); - public Boolean hasRevisionHistoryLimit(); - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector(); - public V1LabelSelector buildSelector(); - public A withSelector(V1LabelSelector selector); - public Boolean hasSelector(); - public V1DaemonSetSpecFluent.SelectorNested withNewSelector(); - public V1DaemonSetSpecFluent.SelectorNested withNewSelectorLike(V1LabelSelector item); - public V1DaemonSetSpecFluent.SelectorNested editSelector(); - public V1DaemonSetSpecFluent.SelectorNested editOrNewSelector(); - public V1DaemonSetSpecFluent.SelectorNested editOrNewSelectorLike(V1LabelSelector item); - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate(); - public V1PodTemplateSpec buildTemplate(); - public A withTemplate(V1PodTemplateSpec template); - public Boolean hasTemplate(); - public V1DaemonSetSpecFluent.TemplateNested withNewTemplate(); - public V1DaemonSetSpecFluent.TemplateNested withNewTemplateLike(V1PodTemplateSpec item); - public V1DaemonSetSpecFluent.TemplateNested editTemplate(); - public V1DaemonSetSpecFluent.TemplateNested editOrNewTemplate(); - public V1DaemonSetSpecFluent.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item); - - /** - * This method has been deprecated, please use method buildUpdateStrategy instead. - * @return The buildable object. - */ - @Deprecated - public V1DaemonSetUpdateStrategy getUpdateStrategy(); - public V1DaemonSetUpdateStrategy buildUpdateStrategy(); - public A withUpdateStrategy(V1DaemonSetUpdateStrategy updateStrategy); - public Boolean hasUpdateStrategy(); - public V1DaemonSetSpecFluent.UpdateStrategyNested withNewUpdateStrategy(); - public V1DaemonSetSpecFluent.UpdateStrategyNested withNewUpdateStrategyLike(V1DaemonSetUpdateStrategy item); - public V1DaemonSetSpecFluent.UpdateStrategyNested editUpdateStrategy(); - public V1DaemonSetSpecFluent.UpdateStrategyNested editOrNewUpdateStrategy(); - public V1DaemonSetSpecFluent.UpdateStrategyNested editOrNewUpdateStrategyLike(V1DaemonSetUpdateStrategy item); - public interface SelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DaemonSetSpecFluent> extends BaseFluent{ + public V1DaemonSetSpecFluent() { + } + + public V1DaemonSetSpecFluent(V1DaemonSetSpec instance) { + this.copyInstance(instance); + } + private Integer minReadySeconds; + private Integer revisionHistoryLimit; + private V1LabelSelectorBuilder selector; + private V1PodTemplateSpecBuilder template; + private V1DaemonSetUpdateStrategyBuilder updateStrategy; + + protected void copyInstance(V1DaemonSetSpec instance) { + instance = (instance != null ? instance : new V1DaemonSetSpec()); + if (instance != null) { + this.withMinReadySeconds(instance.getMinReadySeconds()); + this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); + this.withSelector(instance.getSelector()); + this.withTemplate(instance.getTemplate()); + this.withUpdateStrategy(instance.getUpdateStrategy()); + } + } + + public Integer getMinReadySeconds() { + return this.minReadySeconds; + } + + public A withMinReadySeconds(Integer minReadySeconds) { + this.minReadySeconds = minReadySeconds; + return (A) this; + } + + public boolean hasMinReadySeconds() { + return this.minReadySeconds != null; + } + + public Integer getRevisionHistoryLimit() { + return this.revisionHistoryLimit; + } + + public A withRevisionHistoryLimit(Integer revisionHistoryLimit) { + this.revisionHistoryLimit = revisionHistoryLimit; + return (A) this; + } + + public boolean hasRevisionHistoryLimit() { + return this.revisionHistoryLimit != null; + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); + } + + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); + } + + public V1PodTemplateSpec buildTemplate() { + return this.template != null ? this.template.build() : null; + } + + public A withTemplate(V1PodTemplateSpec template) { + this._visitables.remove("template"); + if (template != null) { + this.template = new V1PodTemplateSpecBuilder(template); + this._visitables.get("template").add(this.template); + } else { + this.template = null; + this._visitables.get("template").remove(this.template); + } + return (A) this; + } + + public boolean hasTemplate() { + return this.template != null; + } + + public TemplateNested withNewTemplate() { + return new TemplateNested(null); } - public interface TemplateNested extends Nested,V1PodTemplateSpecFluent>{ - public N and(); - public N endTemplate(); + + public TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { + return new TemplateNested(item); + } + + public TemplateNested editTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(null)); + } + + public TemplateNested editOrNewTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(new V1PodTemplateSpecBuilder().build())); + } + + public TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(item)); + } + + public V1DaemonSetUpdateStrategy buildUpdateStrategy() { + return this.updateStrategy != null ? this.updateStrategy.build() : null; + } + + public A withUpdateStrategy(V1DaemonSetUpdateStrategy updateStrategy) { + this._visitables.remove("updateStrategy"); + if (updateStrategy != null) { + this.updateStrategy = new V1DaemonSetUpdateStrategyBuilder(updateStrategy); + this._visitables.get("updateStrategy").add(this.updateStrategy); + } else { + this.updateStrategy = null; + this._visitables.get("updateStrategy").remove(this.updateStrategy); + } + return (A) this; + } + + public boolean hasUpdateStrategy() { + return this.updateStrategy != null; + } + + public UpdateStrategyNested withNewUpdateStrategy() { + return new UpdateStrategyNested(null); + } + + public UpdateStrategyNested withNewUpdateStrategyLike(V1DaemonSetUpdateStrategy item) { + return new UpdateStrategyNested(item); + } + + public UpdateStrategyNested editUpdateStrategy() { + return withNewUpdateStrategyLike(java.util.Optional.ofNullable(buildUpdateStrategy()).orElse(null)); + } + + public UpdateStrategyNested editOrNewUpdateStrategy() { + return withNewUpdateStrategyLike(java.util.Optional.ofNullable(buildUpdateStrategy()).orElse(new V1DaemonSetUpdateStrategyBuilder().build())); + } + + public UpdateStrategyNested editOrNewUpdateStrategyLike(V1DaemonSetUpdateStrategy item) { + return withNewUpdateStrategyLike(java.util.Optional.ofNullable(buildUpdateStrategy()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DaemonSetSpecFluent that = (V1DaemonSetSpecFluent) o; + if (!java.util.Objects.equals(minReadySeconds, that.minReadySeconds)) return false; + if (!java.util.Objects.equals(revisionHistoryLimit, that.revisionHistoryLimit)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + if (!java.util.Objects.equals(template, that.template)) return false; + if (!java.util.Objects.equals(updateStrategy, that.updateStrategy)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(minReadySeconds, revisionHistoryLimit, selector, template, updateStrategy, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (minReadySeconds != null) { sb.append("minReadySeconds:"); sb.append(minReadySeconds + ","); } + if (revisionHistoryLimit != null) { sb.append("revisionHistoryLimit:"); sb.append(revisionHistoryLimit + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } + if (template != null) { sb.append("template:"); sb.append(template + ","); } + if (updateStrategy != null) { sb.append("updateStrategy:"); sb.append(updateStrategy); } + sb.append("}"); + return sb.toString(); + } + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1DaemonSetSpecFluent.this.withSelector(builder.build()); + } + public N endSelector() { + return and(); + } + + } - public interface UpdateStrategyNested extends Nested,V1DaemonSetUpdateStrategyFluent>{ - public N and(); - public N endUpdateStrategy(); + public class TemplateNested extends V1PodTemplateSpecFluent> implements Nested{ + TemplateNested(V1PodTemplateSpec item) { + this.builder = new V1PodTemplateSpecBuilder(this, item); + } + V1PodTemplateSpecBuilder builder; + + public N and() { + return (N) V1DaemonSetSpecFluent.this.withTemplate(builder.build()); + } + public N endTemplate() { + return and(); + } + + } + public class UpdateStrategyNested extends V1DaemonSetUpdateStrategyFluent> implements Nested{ + UpdateStrategyNested(V1DaemonSetUpdateStrategy item) { + this.builder = new V1DaemonSetUpdateStrategyBuilder(this, item); + } + V1DaemonSetUpdateStrategyBuilder builder; + + public N and() { + return (N) V1DaemonSetSpecFluent.this.withUpdateStrategy(builder.build()); + } + + public N endUpdateStrategy() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecFluentImpl.java deleted file mode 100644 index 1ded4006d7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetSpecFluentImpl.java +++ /dev/null @@ -1,233 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DaemonSetSpecFluentImpl> extends BaseFluent implements V1DaemonSetSpecFluent{ - public V1DaemonSetSpecFluentImpl() { - } - public V1DaemonSetSpecFluentImpl(V1DaemonSetSpec instance) { - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); - this.withSelector(instance.getSelector()); - this.withTemplate(instance.getTemplate()); - this.withUpdateStrategy(instance.getUpdateStrategy()); - } - } - private Integer minReadySeconds; - private Integer revisionHistoryLimit; - private V1LabelSelectorBuilder selector; - private V1PodTemplateSpecBuilder template; - private V1DaemonSetUpdateStrategyBuilder updateStrategy; - public Integer getMinReadySeconds() { - return this.minReadySeconds; - } - public A withMinReadySeconds(Integer minReadySeconds) { - this.minReadySeconds=minReadySeconds; return (A) this; - } - public Boolean hasMinReadySeconds() { - return this.minReadySeconds != null; - } - public Integer getRevisionHistoryLimit() { - return this.revisionHistoryLimit; - } - public A withRevisionHistoryLimit(Integer revisionHistoryLimit) { - this.revisionHistoryLimit=revisionHistoryLimit; return (A) this; - } - public Boolean hasRevisionHistoryLimit() { - return this.revisionHistoryLimit != null; - } - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector() { - return this.selector!=null ?this.selector.build():null; - } - public V1LabelSelector buildSelector() { - return this.selector!=null ?this.selector.build():null; - } - public A withSelector(V1LabelSelector selector) { - _visitables.get("selector").remove(this.selector); - if (selector!=null){ this.selector= new V1LabelSelectorBuilder(selector); _visitables.get("selector").add(this.selector);} else { this.selector = null; _visitables.get("selector").remove(this.selector); } return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public V1DaemonSetSpecFluentImpl.SelectorNested withNewSelector() { - return new V1DaemonSetSpecFluentImpl.SelectorNestedImpl(); - } - public V1DaemonSetSpecFluentImpl.SelectorNested withNewSelectorLike(V1LabelSelector item) { - return new V1DaemonSetSpecFluentImpl.SelectorNestedImpl(item); - } - public V1DaemonSetSpecFluentImpl.SelectorNested editSelector() { - return withNewSelectorLike(getSelector()); - } - public V1DaemonSetSpecFluentImpl.SelectorNested editOrNewSelector() { - return withNewSelectorLike(getSelector() != null ? getSelector(): new V1LabelSelectorBuilder().build()); - } - public V1DaemonSetSpecFluentImpl.SelectorNested editOrNewSelectorLike(V1LabelSelector item) { - return withNewSelectorLike(getSelector() != null ? getSelector(): item); - } - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate() { - return this.template!=null ?this.template.build():null; - } - public V1PodTemplateSpec buildTemplate() { - return this.template!=null ?this.template.build():null; - } - public A withTemplate(V1PodTemplateSpec template) { - _visitables.get("template").remove(this.template); - if (template!=null){ this.template= new V1PodTemplateSpecBuilder(template); _visitables.get("template").add(this.template);} else { this.template = null; _visitables.get("template").remove(this.template); } return (A) this; - } - public Boolean hasTemplate() { - return this.template != null; - } - public V1DaemonSetSpecFluentImpl.TemplateNested withNewTemplate() { - return new V1DaemonSetSpecFluentImpl.TemplateNestedImpl(); - } - public V1DaemonSetSpecFluentImpl.TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { - return new V1DaemonSetSpecFluentImpl.TemplateNestedImpl(item); - } - public V1DaemonSetSpecFluentImpl.TemplateNested editTemplate() { - return withNewTemplateLike(getTemplate()); - } - public V1DaemonSetSpecFluentImpl.TemplateNested editOrNewTemplate() { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): new V1PodTemplateSpecBuilder().build()); - } - public V1DaemonSetSpecFluentImpl.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): item); - } - - /** - * This method has been deprecated, please use method buildUpdateStrategy instead. - * @return The buildable object. - */ - @Deprecated - public V1DaemonSetUpdateStrategy getUpdateStrategy() { - return this.updateStrategy!=null ?this.updateStrategy.build():null; - } - public V1DaemonSetUpdateStrategy buildUpdateStrategy() { - return this.updateStrategy!=null ?this.updateStrategy.build():null; - } - public A withUpdateStrategy(V1DaemonSetUpdateStrategy updateStrategy) { - _visitables.get("updateStrategy").remove(this.updateStrategy); - if (updateStrategy!=null){ this.updateStrategy= new V1DaemonSetUpdateStrategyBuilder(updateStrategy); _visitables.get("updateStrategy").add(this.updateStrategy);} else { this.updateStrategy = null; _visitables.get("updateStrategy").remove(this.updateStrategy); } return (A) this; - } - public Boolean hasUpdateStrategy() { - return this.updateStrategy != null; - } - public V1DaemonSetSpecFluentImpl.UpdateStrategyNested withNewUpdateStrategy() { - return new V1DaemonSetSpecFluentImpl.UpdateStrategyNestedImpl(); - } - public V1DaemonSetSpecFluentImpl.UpdateStrategyNested withNewUpdateStrategyLike(V1DaemonSetUpdateStrategy item) { - return new V1DaemonSetSpecFluentImpl.UpdateStrategyNestedImpl(item); - } - public V1DaemonSetSpecFluentImpl.UpdateStrategyNested editUpdateStrategy() { - return withNewUpdateStrategyLike(getUpdateStrategy()); - } - public V1DaemonSetSpecFluentImpl.UpdateStrategyNested editOrNewUpdateStrategy() { - return withNewUpdateStrategyLike(getUpdateStrategy() != null ? getUpdateStrategy(): new V1DaemonSetUpdateStrategyBuilder().build()); - } - public V1DaemonSetSpecFluentImpl.UpdateStrategyNested editOrNewUpdateStrategyLike(V1DaemonSetUpdateStrategy item) { - return withNewUpdateStrategyLike(getUpdateStrategy() != null ? getUpdateStrategy(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DaemonSetSpecFluentImpl that = (V1DaemonSetSpecFluentImpl) o; - if (!java.util.Objects.equals(minReadySeconds, that.minReadySeconds)) return false; - - if (!java.util.Objects.equals(revisionHistoryLimit, that.revisionHistoryLimit)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - if (!java.util.Objects.equals(template, that.template)) return false; - - if (!java.util.Objects.equals(updateStrategy, that.updateStrategy)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(minReadySeconds, revisionHistoryLimit, selector, template, updateStrategy, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (minReadySeconds != null) { sb.append("minReadySeconds:"); sb.append(minReadySeconds + ","); } - if (revisionHistoryLimit != null) { sb.append("revisionHistoryLimit:"); sb.append(revisionHistoryLimit + ","); } - if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } - if (template != null) { sb.append("template:"); sb.append(template + ","); } - if (updateStrategy != null) { sb.append("updateStrategy:"); sb.append(updateStrategy); } - sb.append("}"); - return sb.toString(); - } - class SelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1DaemonSetSpecFluentImpl.SelectorNested,Nested{ - SelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - SelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1DaemonSetSpecFluentImpl.this.withSelector(builder.build()); - } - public N endSelector() { - return and(); - } - - } - class TemplateNestedImpl extends V1PodTemplateSpecFluentImpl> implements V1DaemonSetSpecFluentImpl.TemplateNested,Nested{ - TemplateNestedImpl(V1PodTemplateSpec item) { - this.builder = new V1PodTemplateSpecBuilder(this, item); - } - TemplateNestedImpl() { - this.builder = new V1PodTemplateSpecBuilder(this); - } - V1PodTemplateSpecBuilder builder; - public N and() { - return (N) V1DaemonSetSpecFluentImpl.this.withTemplate(builder.build()); - } - public N endTemplate() { - return and(); - } - - } - class UpdateStrategyNestedImpl extends V1DaemonSetUpdateStrategyFluentImpl> implements V1DaemonSetSpecFluentImpl.UpdateStrategyNested,Nested{ - UpdateStrategyNestedImpl(V1DaemonSetUpdateStrategy item) { - this.builder = new V1DaemonSetUpdateStrategyBuilder(this, item); - } - UpdateStrategyNestedImpl() { - this.builder = new V1DaemonSetUpdateStrategyBuilder(this); - } - V1DaemonSetUpdateStrategyBuilder builder; - public N and() { - return (N) V1DaemonSetSpecFluentImpl.this.withUpdateStrategy(builder.build()); - } - public N endUpdateStrategy() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusBuilder.java index 835e011938..1474f48365 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusBuilder.java @@ -1,64 +1,30 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DaemonSetStatusBuilder extends V1DaemonSetStatusFluentImpl implements VisitableBuilder{ +public class V1DaemonSetStatusBuilder extends V1DaemonSetStatusFluent implements VisitableBuilder{ public V1DaemonSetStatusBuilder() { - this(false); - } - public V1DaemonSetStatusBuilder(Boolean validationEnabled) { - this(new V1DaemonSetStatus(), validationEnabled); + this(new V1DaemonSetStatus()); } + public V1DaemonSetStatusBuilder(V1DaemonSetStatusFluent fluent) { - this(fluent, false); - } - public V1DaemonSetStatusBuilder(V1DaemonSetStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DaemonSetStatus(), validationEnabled); + this(fluent, new V1DaemonSetStatus()); } + public V1DaemonSetStatusBuilder(V1DaemonSetStatusFluent fluent,V1DaemonSetStatus instance) { - this(fluent, instance, false); - } - public V1DaemonSetStatusBuilder(V1DaemonSetStatusFluent fluent,V1DaemonSetStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCollisionCount(instance.getCollisionCount()); - fluent.withConditions(instance.getConditions()); - fluent.withCurrentNumberScheduled(instance.getCurrentNumberScheduled()); - fluent.withDesiredNumberScheduled(instance.getDesiredNumberScheduled()); - fluent.withNumberAvailable(instance.getNumberAvailable()); - fluent.withNumberMisscheduled(instance.getNumberMisscheduled()); - fluent.withNumberReady(instance.getNumberReady()); - fluent.withNumberUnavailable(instance.getNumberUnavailable()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - fluent.withUpdatedNumberScheduled(instance.getUpdatedNumberScheduled()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DaemonSetStatusBuilder(V1DaemonSetStatus instance) { - this(instance,false); - } - public V1DaemonSetStatusBuilder(V1DaemonSetStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCollisionCount(instance.getCollisionCount()); - this.withConditions(instance.getConditions()); - this.withCurrentNumberScheduled(instance.getCurrentNumberScheduled()); - this.withDesiredNumberScheduled(instance.getDesiredNumberScheduled()); - this.withNumberAvailable(instance.getNumberAvailable()); - this.withNumberMisscheduled(instance.getNumberMisscheduled()); - this.withNumberReady(instance.getNumberReady()); - this.withNumberUnavailable(instance.getNumberUnavailable()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withUpdatedNumberScheduled(instance.getUpdatedNumberScheduled()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DaemonSetStatusFluent fluent; - Boolean validationEnabled; + public V1DaemonSetStatus build() { V1DaemonSetStatus buildable = new V1DaemonSetStatus(); buildable.setCollisionCount(fluent.getCollisionCount()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setCurrentNumberScheduled(fluent.getCurrentNumberScheduled()); buildable.setDesiredNumberScheduled(fluent.getDesiredNumberScheduled()); buildable.setNumberAvailable(fluent.getNumberAvailable()); @@ -70,4 +36,5 @@ public V1DaemonSetStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusFluent.java index 1467282376..5f0555edb2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusFluent.java @@ -1,84 +1,380 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DaemonSetStatusFluent> extends Fluent{ - public Integer getCollisionCount(); - public A withCollisionCount(Integer collisionCount); - public Boolean hasCollisionCount(); - public A addToConditions(int index,V1DaemonSetCondition item); - public A setToConditions(int index,V1DaemonSetCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1DaemonSetCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1DaemonSetCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1DaemonSetCondition buildCondition(int index); - public V1DaemonSetCondition buildFirstCondition(); - public V1DaemonSetCondition buildLastCondition(); - public V1DaemonSetCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1DaemonSetCondition... conditions); - public Boolean hasConditions(); - public V1DaemonSetStatusFluent.ConditionsNested addNewCondition(); - public V1DaemonSetStatusFluent.ConditionsNested addNewConditionLike(V1DaemonSetCondition item); - public V1DaemonSetStatusFluent.ConditionsNested setNewConditionLike(int index,V1DaemonSetCondition item); - public V1DaemonSetStatusFluent.ConditionsNested editCondition(int index); - public V1DaemonSetStatusFluent.ConditionsNested editFirstCondition(); - public V1DaemonSetStatusFluent.ConditionsNested editLastCondition(); - public V1DaemonSetStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public Integer getCurrentNumberScheduled(); - public A withCurrentNumberScheduled(Integer currentNumberScheduled); - public Boolean hasCurrentNumberScheduled(); - public Integer getDesiredNumberScheduled(); - public A withDesiredNumberScheduled(Integer desiredNumberScheduled); - public Boolean hasDesiredNumberScheduled(); - public Integer getNumberAvailable(); - public A withNumberAvailable(Integer numberAvailable); - public Boolean hasNumberAvailable(); - public Integer getNumberMisscheduled(); - public A withNumberMisscheduled(Integer numberMisscheduled); - public Boolean hasNumberMisscheduled(); - public Integer getNumberReady(); - public A withNumberReady(Integer numberReady); - public Boolean hasNumberReady(); - public Integer getNumberUnavailable(); - public A withNumberUnavailable(Integer numberUnavailable); - public Boolean hasNumberUnavailable(); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - public Integer getUpdatedNumberScheduled(); - public A withUpdatedNumberScheduled(Integer updatedNumberScheduled); - public Boolean hasUpdatedNumberScheduled(); - public interface ConditionsNested extends Nested,V1DaemonSetConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DaemonSetStatusFluent> extends BaseFluent{ + public V1DaemonSetStatusFluent() { + } + + public V1DaemonSetStatusFluent(V1DaemonSetStatus instance) { + this.copyInstance(instance); + } + private Integer collisionCount; + private ArrayList conditions; + private Integer currentNumberScheduled; + private Integer desiredNumberScheduled; + private Integer numberAvailable; + private Integer numberMisscheduled; + private Integer numberReady; + private Integer numberUnavailable; + private Long observedGeneration; + private Integer updatedNumberScheduled; + + protected void copyInstance(V1DaemonSetStatus instance) { + instance = (instance != null ? instance : new V1DaemonSetStatus()); + if (instance != null) { + this.withCollisionCount(instance.getCollisionCount()); + this.withConditions(instance.getConditions()); + this.withCurrentNumberScheduled(instance.getCurrentNumberScheduled()); + this.withDesiredNumberScheduled(instance.getDesiredNumberScheduled()); + this.withNumberAvailable(instance.getNumberAvailable()); + this.withNumberMisscheduled(instance.getNumberMisscheduled()); + this.withNumberReady(instance.getNumberReady()); + this.withNumberUnavailable(instance.getNumberUnavailable()); + this.withObservedGeneration(instance.getObservedGeneration()); + this.withUpdatedNumberScheduled(instance.getUpdatedNumberScheduled()); + } + } + + public Integer getCollisionCount() { + return this.collisionCount; + } + + public A withCollisionCount(Integer collisionCount) { + this.collisionCount = collisionCount; + return (A) this; + } + + public boolean hasCollisionCount() { + return this.collisionCount != null; + } + + public A addToConditions(int index,V1DaemonSetCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1DaemonSetCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1DaemonSetCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1DaemonSetCondition item : items) {V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1DaemonSetCondition item : items) {V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1DaemonSetCondition... items) { + if (this.conditions == null) return (A)this; + for (V1DaemonSetCondition item : items) {V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1DaemonSetCondition item : items) {V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1DaemonSetConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1DaemonSetCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1DaemonSetCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1DaemonSetCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1DaemonSetCondition buildMatchingCondition(Predicate predicate) { + for (V1DaemonSetConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1DaemonSetConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1DaemonSetCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1DaemonSetCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1DaemonSetCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1DaemonSetCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1DaemonSetCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1DaemonSetConditionFluent> implements Nested{ + ConditionsNested(int index,V1DaemonSetCondition item) { + this.index = index; + this.builder = new V1DaemonSetConditionBuilder(this, item); + } + V1DaemonSetConditionBuilder builder; + int index; + + public N and() { + return (N) V1DaemonSetStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusFluentImpl.java deleted file mode 100644 index d4dedb04ec..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetStatusFluentImpl.java +++ /dev/null @@ -1,304 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DaemonSetStatusFluentImpl> extends BaseFluent implements V1DaemonSetStatusFluent{ - public V1DaemonSetStatusFluentImpl() { - } - public V1DaemonSetStatusFluentImpl(V1DaemonSetStatus instance) { - if (instance != null) { - this.withCollisionCount(instance.getCollisionCount()); - this.withConditions(instance.getConditions()); - this.withCurrentNumberScheduled(instance.getCurrentNumberScheduled()); - this.withDesiredNumberScheduled(instance.getDesiredNumberScheduled()); - this.withNumberAvailable(instance.getNumberAvailable()); - this.withNumberMisscheduled(instance.getNumberMisscheduled()); - this.withNumberReady(instance.getNumberReady()); - this.withNumberUnavailable(instance.getNumberUnavailable()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withUpdatedNumberScheduled(instance.getUpdatedNumberScheduled()); - } - } - private Integer collisionCount; - private ArrayList conditions; - private Integer currentNumberScheduled; - private Integer desiredNumberScheduled; - private Integer numberAvailable; - private Integer numberMisscheduled; - private Integer numberReady; - private Integer numberUnavailable; - private Long observedGeneration; - private Integer updatedNumberScheduled; - public Integer getCollisionCount() { - return this.collisionCount; - } - public A withCollisionCount(Integer collisionCount) { - this.collisionCount=collisionCount; return (A) this; - } - public Boolean hasCollisionCount() { - return this.collisionCount != null; - } - public A addToConditions(int index,V1DaemonSetCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1DaemonSetCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1DaemonSetCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1DaemonSetCondition item : items) {V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1DaemonSetCondition item : items) {V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1DaemonSetCondition... items) { - for (V1DaemonSetCondition item : items) {V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1DaemonSetCondition item : items) {V1DaemonSetConditionBuilder builder = new V1DaemonSetConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1DaemonSetConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1DaemonSetCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1DaemonSetCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1DaemonSetCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1DaemonSetCondition buildMatchingCondition(Predicate predicate) { - for (V1DaemonSetConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1DaemonSetConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1DaemonSetCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1DaemonSetCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1DaemonSetCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1DaemonSetStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1DaemonSetStatusFluentImpl.ConditionsNestedImpl(); - } - public V1DaemonSetStatusFluentImpl.ConditionsNested addNewConditionLike(V1DaemonSetCondition item) { - return new V1DaemonSetStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1DaemonSetStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1DaemonSetCondition item) { - return new V1DaemonSetStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1DaemonSetStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1DaemonSetStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1DaemonSetStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1DaemonSetStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1DaemonSetConditionFluentImpl> implements V1DaemonSetStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1DaemonSetCondition item) { - this.index = index; - this.builder = new V1DaemonSetConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1DaemonSetConditionBuilder(this); - } - V1DaemonSetConditionBuilder builder; - int index; - public N and() { - return (N) V1DaemonSetStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyBuilder.java index 252aa2c401..bbb11f1dd9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DaemonSetUpdateStrategyBuilder extends V1DaemonSetUpdateStrategyFluentImpl implements VisitableBuilder{ +public class V1DaemonSetUpdateStrategyBuilder extends V1DaemonSetUpdateStrategyFluent implements VisitableBuilder{ public V1DaemonSetUpdateStrategyBuilder() { - this(false); - } - public V1DaemonSetUpdateStrategyBuilder(Boolean validationEnabled) { - this(new V1DaemonSetUpdateStrategy(), validationEnabled); + this(new V1DaemonSetUpdateStrategy()); } + public V1DaemonSetUpdateStrategyBuilder(V1DaemonSetUpdateStrategyFluent fluent) { - this(fluent, false); - } - public V1DaemonSetUpdateStrategyBuilder(V1DaemonSetUpdateStrategyFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DaemonSetUpdateStrategy(), validationEnabled); + this(fluent, new V1DaemonSetUpdateStrategy()); } + public V1DaemonSetUpdateStrategyBuilder(V1DaemonSetUpdateStrategyFluent fluent,V1DaemonSetUpdateStrategy instance) { - this(fluent, instance, false); - } - public V1DaemonSetUpdateStrategyBuilder(V1DaemonSetUpdateStrategyFluent fluent,V1DaemonSetUpdateStrategy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withRollingUpdate(instance.getRollingUpdate()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DaemonSetUpdateStrategyBuilder(V1DaemonSetUpdateStrategy instance) { - this(instance,false); - } - public V1DaemonSetUpdateStrategyBuilder(V1DaemonSetUpdateStrategy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withRollingUpdate(instance.getRollingUpdate()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DaemonSetUpdateStrategyFluent fluent; - Boolean validationEnabled; + public V1DaemonSetUpdateStrategy build() { V1DaemonSetUpdateStrategy buildable = new V1DaemonSetUpdateStrategy(); - buildable.setRollingUpdate(fluent.getRollingUpdate()); + buildable.setRollingUpdate(fluent.buildRollingUpdate()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyFluent.java index 7b42dfff1d..34629d81e4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DaemonSetUpdateStrategyFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildRollingUpdate instead. - * @return The buildable object. - */ - @Deprecated - public V1RollingUpdateDaemonSet getRollingUpdate(); - public V1RollingUpdateDaemonSet buildRollingUpdate(); - public A withRollingUpdate(V1RollingUpdateDaemonSet rollingUpdate); - public Boolean hasRollingUpdate(); - public V1DaemonSetUpdateStrategyFluent.RollingUpdateNested withNewRollingUpdate(); - public V1DaemonSetUpdateStrategyFluent.RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateDaemonSet item); - public V1DaemonSetUpdateStrategyFluent.RollingUpdateNested editRollingUpdate(); - public V1DaemonSetUpdateStrategyFluent.RollingUpdateNested editOrNewRollingUpdate(); - public V1DaemonSetUpdateStrategyFluent.RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateDaemonSet item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface RollingUpdateNested extends Nested,V1RollingUpdateDaemonSetFluent>{ - public N and(); - public N endRollingUpdate(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DaemonSetUpdateStrategyFluent> extends BaseFluent{ + public V1DaemonSetUpdateStrategyFluent() { + } + + public V1DaemonSetUpdateStrategyFluent(V1DaemonSetUpdateStrategy instance) { + this.copyInstance(instance); + } + private V1RollingUpdateDaemonSetBuilder rollingUpdate; + private String type; + + protected void copyInstance(V1DaemonSetUpdateStrategy instance) { + instance = (instance != null ? instance : new V1DaemonSetUpdateStrategy()); + if (instance != null) { + this.withRollingUpdate(instance.getRollingUpdate()); + this.withType(instance.getType()); + } + } + + public V1RollingUpdateDaemonSet buildRollingUpdate() { + return this.rollingUpdate != null ? this.rollingUpdate.build() : null; + } + + public A withRollingUpdate(V1RollingUpdateDaemonSet rollingUpdate) { + this._visitables.remove("rollingUpdate"); + if (rollingUpdate != null) { + this.rollingUpdate = new V1RollingUpdateDaemonSetBuilder(rollingUpdate); + this._visitables.get("rollingUpdate").add(this.rollingUpdate); + } else { + this.rollingUpdate = null; + this._visitables.get("rollingUpdate").remove(this.rollingUpdate); + } + return (A) this; + } + + public boolean hasRollingUpdate() { + return this.rollingUpdate != null; + } + + public RollingUpdateNested withNewRollingUpdate() { + return new RollingUpdateNested(null); + } + + public RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateDaemonSet item) { + return new RollingUpdateNested(item); + } + + public RollingUpdateNested editRollingUpdate() { + return withNewRollingUpdateLike(java.util.Optional.ofNullable(buildRollingUpdate()).orElse(null)); + } + + public RollingUpdateNested editOrNewRollingUpdate() { + return withNewRollingUpdateLike(java.util.Optional.ofNullable(buildRollingUpdate()).orElse(new V1RollingUpdateDaemonSetBuilder().build())); } + public RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateDaemonSet item) { + return withNewRollingUpdateLike(java.util.Optional.ofNullable(buildRollingUpdate()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DaemonSetUpdateStrategyFluent that = (V1DaemonSetUpdateStrategyFluent) o; + if (!java.util.Objects.equals(rollingUpdate, that.rollingUpdate)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(rollingUpdate, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (rollingUpdate != null) { sb.append("rollingUpdate:"); sb.append(rollingUpdate + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class RollingUpdateNested extends V1RollingUpdateDaemonSetFluent> implements Nested{ + RollingUpdateNested(V1RollingUpdateDaemonSet item) { + this.builder = new V1RollingUpdateDaemonSetBuilder(this, item); + } + V1RollingUpdateDaemonSetBuilder builder; + + public N and() { + return (N) V1DaemonSetUpdateStrategyFluent.this.withRollingUpdate(builder.build()); + } + + public N endRollingUpdate() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyFluentImpl.java deleted file mode 100644 index 99dc0cdd74..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DaemonSetUpdateStrategyFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DaemonSetUpdateStrategyFluentImpl> extends BaseFluent implements V1DaemonSetUpdateStrategyFluent{ - public V1DaemonSetUpdateStrategyFluentImpl() { - } - public V1DaemonSetUpdateStrategyFluentImpl(V1DaemonSetUpdateStrategy instance) { - if (instance != null) { - this.withRollingUpdate(instance.getRollingUpdate()); - this.withType(instance.getType()); - } - } - private V1RollingUpdateDaemonSetBuilder rollingUpdate; - private String type; - - /** - * This method has been deprecated, please use method buildRollingUpdate instead. - * @return The buildable object. - */ - @Deprecated - public V1RollingUpdateDaemonSet getRollingUpdate() { - return this.rollingUpdate!=null ?this.rollingUpdate.build():null; - } - public V1RollingUpdateDaemonSet buildRollingUpdate() { - return this.rollingUpdate!=null ?this.rollingUpdate.build():null; - } - public A withRollingUpdate(V1RollingUpdateDaemonSet rollingUpdate) { - _visitables.get("rollingUpdate").remove(this.rollingUpdate); - if (rollingUpdate!=null){ this.rollingUpdate= new V1RollingUpdateDaemonSetBuilder(rollingUpdate); _visitables.get("rollingUpdate").add(this.rollingUpdate);} else { this.rollingUpdate = null; _visitables.get("rollingUpdate").remove(this.rollingUpdate); } return (A) this; - } - public Boolean hasRollingUpdate() { - return this.rollingUpdate != null; - } - public V1DaemonSetUpdateStrategyFluentImpl.RollingUpdateNested withNewRollingUpdate() { - return new V1DaemonSetUpdateStrategyFluentImpl.RollingUpdateNestedImpl(); - } - public V1DaemonSetUpdateStrategyFluentImpl.RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateDaemonSet item) { - return new V1DaemonSetUpdateStrategyFluentImpl.RollingUpdateNestedImpl(item); - } - public V1DaemonSetUpdateStrategyFluentImpl.RollingUpdateNested editRollingUpdate() { - return withNewRollingUpdateLike(getRollingUpdate()); - } - public V1DaemonSetUpdateStrategyFluentImpl.RollingUpdateNested editOrNewRollingUpdate() { - return withNewRollingUpdateLike(getRollingUpdate() != null ? getRollingUpdate(): new V1RollingUpdateDaemonSetBuilder().build()); - } - public V1DaemonSetUpdateStrategyFluentImpl.RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateDaemonSet item) { - return withNewRollingUpdateLike(getRollingUpdate() != null ? getRollingUpdate(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DaemonSetUpdateStrategyFluentImpl that = (V1DaemonSetUpdateStrategyFluentImpl) o; - if (!java.util.Objects.equals(rollingUpdate, that.rollingUpdate)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(rollingUpdate, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (rollingUpdate != null) { sb.append("rollingUpdate:"); sb.append(rollingUpdate + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class RollingUpdateNestedImpl extends V1RollingUpdateDaemonSetFluentImpl> implements V1DaemonSetUpdateStrategyFluentImpl.RollingUpdateNested,Nested{ - RollingUpdateNestedImpl(V1RollingUpdateDaemonSet item) { - this.builder = new V1RollingUpdateDaemonSetBuilder(this, item); - } - RollingUpdateNestedImpl() { - this.builder = new V1RollingUpdateDaemonSetBuilder(this); - } - V1RollingUpdateDaemonSetBuilder builder; - public N and() { - return (N) V1DaemonSetUpdateStrategyFluentImpl.this.withRollingUpdate(builder.build()); - } - public N endRollingUpdate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsBuilder.java index c9d45171ab..537848a977 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsBuilder.java @@ -1,54 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DeleteOptionsBuilder extends V1DeleteOptionsFluentImpl implements VisitableBuilder{ +public class V1DeleteOptionsBuilder extends V1DeleteOptionsFluent implements VisitableBuilder{ public V1DeleteOptionsBuilder() { - this(false); - } - public V1DeleteOptionsBuilder(Boolean validationEnabled) { - this(new V1DeleteOptions(), validationEnabled); + this(new V1DeleteOptions()); } + public V1DeleteOptionsBuilder(V1DeleteOptionsFluent fluent) { - this(fluent, false); - } - public V1DeleteOptionsBuilder(V1DeleteOptionsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DeleteOptions(), validationEnabled); + this(fluent, new V1DeleteOptions()); } + public V1DeleteOptionsBuilder(V1DeleteOptionsFluent fluent,V1DeleteOptions instance) { - this(fluent, instance, false); - } - public V1DeleteOptionsBuilder(V1DeleteOptionsFluent fluent,V1DeleteOptions instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withDryRun(instance.getDryRun()); - fluent.withGracePeriodSeconds(instance.getGracePeriodSeconds()); - fluent.withKind(instance.getKind()); - fluent.withOrphanDependents(instance.getOrphanDependents()); - fluent.withPreconditions(instance.getPreconditions()); - fluent.withPropagationPolicy(instance.getPropagationPolicy()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DeleteOptionsBuilder(V1DeleteOptions instance) { - this(instance,false); - } - public V1DeleteOptionsBuilder(V1DeleteOptions instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withDryRun(instance.getDryRun()); - this.withGracePeriodSeconds(instance.getGracePeriodSeconds()); - this.withKind(instance.getKind()); - this.withOrphanDependents(instance.getOrphanDependents()); - this.withPreconditions(instance.getPreconditions()); - this.withPropagationPolicy(instance.getPropagationPolicy()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DeleteOptionsFluent fluent; - Boolean validationEnabled; + public V1DeleteOptions build() { V1DeleteOptions buildable = new V1DeleteOptions(); buildable.setApiVersion(fluent.getApiVersion()); @@ -56,9 +28,10 @@ public V1DeleteOptions build() { buildable.setGracePeriodSeconds(fluent.getGracePeriodSeconds()); buildable.setKind(fluent.getKind()); buildable.setOrphanDependents(fluent.getOrphanDependents()); - buildable.setPreconditions(fluent.getPreconditions()); + buildable.setPreconditions(fluent.buildPreconditions()); buildable.setPropagationPolicy(fluent.getPropagationPolicy()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsFluent.java index 0ca2ad4b0d..e2ac73a4fc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsFluent.java @@ -1,71 +1,299 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1DeleteOptionsFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToDryRun(int index,String item); - public A setToDryRun(int index,String item); - public A addToDryRun(java.lang.String... items); - public A addAllToDryRun(Collection items); - public A removeFromDryRun(java.lang.String... items); - public A removeAllFromDryRun(Collection items); - public List getDryRun(); - public String getDryRun(int index); - public String getFirstDryRun(); - public String getLastDryRun(); - public String getMatchingDryRun(Predicate predicate); - public Boolean hasMatchingDryRun(Predicate predicate); - public A withDryRun(List dryRun); - public A withDryRun(java.lang.String... dryRun); - public Boolean hasDryRun(); - public Long getGracePeriodSeconds(); - public A withGracePeriodSeconds(Long gracePeriodSeconds); - public Boolean hasGracePeriodSeconds(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public Boolean getOrphanDependents(); - public A withOrphanDependents(Boolean orphanDependents); - public Boolean hasOrphanDependents(); - - /** - * This method has been deprecated, please use method buildPreconditions instead. - * @return The buildable object. - */ - @Deprecated - public V1Preconditions getPreconditions(); - public V1Preconditions buildPreconditions(); - public A withPreconditions(V1Preconditions preconditions); - public Boolean hasPreconditions(); - public V1DeleteOptionsFluent.PreconditionsNested withNewPreconditions(); - public V1DeleteOptionsFluent.PreconditionsNested withNewPreconditionsLike(V1Preconditions item); - public V1DeleteOptionsFluent.PreconditionsNested editPreconditions(); - public V1DeleteOptionsFluent.PreconditionsNested editOrNewPreconditions(); - public V1DeleteOptionsFluent.PreconditionsNested editOrNewPreconditionsLike(V1Preconditions item); - public String getPropagationPolicy(); - public A withPropagationPolicy(String propagationPolicy); - public Boolean hasPropagationPolicy(); - public A withOrphanDependents(); - public interface PreconditionsNested extends Nested,V1PreconditionsFluent>{ - public N and(); - public N endPreconditions(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DeleteOptionsFluent> extends BaseFluent{ + public V1DeleteOptionsFluent() { + } + + public V1DeleteOptionsFluent(V1DeleteOptions instance) { + this.copyInstance(instance); + } + private String apiVersion; + private List dryRun; + private Long gracePeriodSeconds; + private String kind; + private Boolean orphanDependents; + private V1PreconditionsBuilder preconditions; + private String propagationPolicy; + + protected void copyInstance(V1DeleteOptions instance) { + instance = (instance != null ? instance : new V1DeleteOptions()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withDryRun(instance.getDryRun()); + this.withGracePeriodSeconds(instance.getGracePeriodSeconds()); + this.withKind(instance.getKind()); + this.withOrphanDependents(instance.getOrphanDependents()); + this.withPreconditions(instance.getPreconditions()); + this.withPropagationPolicy(instance.getPropagationPolicy()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToDryRun(int index,String item) { + if (this.dryRun == null) {this.dryRun = new ArrayList();} + this.dryRun.add(index, item); + return (A)this; + } + + public A setToDryRun(int index,String item) { + if (this.dryRun == null) {this.dryRun = new ArrayList();} + this.dryRun.set(index, item); return (A)this; + } + + public A addToDryRun(java.lang.String... items) { + if (this.dryRun == null) {this.dryRun = new ArrayList();} + for (String item : items) {this.dryRun.add(item);} return (A)this; + } + + public A addAllToDryRun(Collection items) { + if (this.dryRun == null) {this.dryRun = new ArrayList();} + for (String item : items) {this.dryRun.add(item);} return (A)this; + } + + public A removeFromDryRun(java.lang.String... items) { + if (this.dryRun == null) return (A)this; + for (String item : items) { this.dryRun.remove(item);} return (A)this; + } + + public A removeAllFromDryRun(Collection items) { + if (this.dryRun == null) return (A)this; + for (String item : items) { this.dryRun.remove(item);} return (A)this; + } + + public List getDryRun() { + return this.dryRun; + } + + public String getDryRun(int index) { + return this.dryRun.get(index); + } + + public String getFirstDryRun() { + return this.dryRun.get(0); + } + + public String getLastDryRun() { + return this.dryRun.get(dryRun.size() - 1); + } + + public String getMatchingDryRun(Predicate predicate) { + for (String item : dryRun) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingDryRun(Predicate predicate) { + for (String item : dryRun) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withDryRun(List dryRun) { + if (dryRun != null) { + this.dryRun = new ArrayList(); + for (String item : dryRun) { + this.addToDryRun(item); + } + } else { + this.dryRun = null; + } + return (A) this; + } + + public A withDryRun(java.lang.String... dryRun) { + if (this.dryRun != null) { + this.dryRun.clear(); + _visitables.remove("dryRun"); + } + if (dryRun != null) { + for (String item : dryRun) { + this.addToDryRun(item); + } + } + return (A) this; + } + + public boolean hasDryRun() { + return this.dryRun != null && !this.dryRun.isEmpty(); + } + + public Long getGracePeriodSeconds() { + return this.gracePeriodSeconds; + } + + public A withGracePeriodSeconds(Long gracePeriodSeconds) { + this.gracePeriodSeconds = gracePeriodSeconds; + return (A) this; + } + + public boolean hasGracePeriodSeconds() { + return this.gracePeriodSeconds != null; } + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public Boolean getOrphanDependents() { + return this.orphanDependents; + } + + public A withOrphanDependents(Boolean orphanDependents) { + this.orphanDependents = orphanDependents; + return (A) this; + } + + public boolean hasOrphanDependents() { + return this.orphanDependents != null; + } + + public V1Preconditions buildPreconditions() { + return this.preconditions != null ? this.preconditions.build() : null; + } + + public A withPreconditions(V1Preconditions preconditions) { + this._visitables.remove("preconditions"); + if (preconditions != null) { + this.preconditions = new V1PreconditionsBuilder(preconditions); + this._visitables.get("preconditions").add(this.preconditions); + } else { + this.preconditions = null; + this._visitables.get("preconditions").remove(this.preconditions); + } + return (A) this; + } + + public boolean hasPreconditions() { + return this.preconditions != null; + } + + public PreconditionsNested withNewPreconditions() { + return new PreconditionsNested(null); + } + + public PreconditionsNested withNewPreconditionsLike(V1Preconditions item) { + return new PreconditionsNested(item); + } + + public PreconditionsNested editPreconditions() { + return withNewPreconditionsLike(java.util.Optional.ofNullable(buildPreconditions()).orElse(null)); + } + + public PreconditionsNested editOrNewPreconditions() { + return withNewPreconditionsLike(java.util.Optional.ofNullable(buildPreconditions()).orElse(new V1PreconditionsBuilder().build())); + } + + public PreconditionsNested editOrNewPreconditionsLike(V1Preconditions item) { + return withNewPreconditionsLike(java.util.Optional.ofNullable(buildPreconditions()).orElse(item)); + } + + public String getPropagationPolicy() { + return this.propagationPolicy; + } + + public A withPropagationPolicy(String propagationPolicy) { + this.propagationPolicy = propagationPolicy; + return (A) this; + } + + public boolean hasPropagationPolicy() { + return this.propagationPolicy != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DeleteOptionsFluent that = (V1DeleteOptionsFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(dryRun, that.dryRun)) return false; + if (!java.util.Objects.equals(gracePeriodSeconds, that.gracePeriodSeconds)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(orphanDependents, that.orphanDependents)) return false; + if (!java.util.Objects.equals(preconditions, that.preconditions)) return false; + if (!java.util.Objects.equals(propagationPolicy, that.propagationPolicy)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, dryRun, gracePeriodSeconds, kind, orphanDependents, preconditions, propagationPolicy, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (dryRun != null && !dryRun.isEmpty()) { sb.append("dryRun:"); sb.append(dryRun + ","); } + if (gracePeriodSeconds != null) { sb.append("gracePeriodSeconds:"); sb.append(gracePeriodSeconds + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (orphanDependents != null) { sb.append("orphanDependents:"); sb.append(orphanDependents + ","); } + if (preconditions != null) { sb.append("preconditions:"); sb.append(preconditions + ","); } + if (propagationPolicy != null) { sb.append("propagationPolicy:"); sb.append(propagationPolicy); } + sb.append("}"); + return sb.toString(); + } + + public A withOrphanDependents() { + return withOrphanDependents(true); + } + public class PreconditionsNested extends V1PreconditionsFluent> implements Nested{ + PreconditionsNested(V1Preconditions item) { + this.builder = new V1PreconditionsBuilder(this, item); + } + V1PreconditionsBuilder builder; + + public N and() { + return (N) V1DeleteOptionsFluent.this.withPreconditions(builder.build()); + } + + public N endPreconditions() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsFluentImpl.java deleted file mode 100644 index 5227c9e063..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptionsFluentImpl.java +++ /dev/null @@ -1,228 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DeleteOptionsFluentImpl> extends BaseFluent implements V1DeleteOptionsFluent{ - public V1DeleteOptionsFluentImpl() { - } - public V1DeleteOptionsFluentImpl(V1DeleteOptions instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withDryRun(instance.getDryRun()); - this.withGracePeriodSeconds(instance.getGracePeriodSeconds()); - this.withKind(instance.getKind()); - this.withOrphanDependents(instance.getOrphanDependents()); - this.withPreconditions(instance.getPreconditions()); - this.withPropagationPolicy(instance.getPropagationPolicy()); - } - } - private String apiVersion; - private List dryRun; - private Long gracePeriodSeconds; - private String kind; - private Boolean orphanDependents; - private V1PreconditionsBuilder preconditions; - private String propagationPolicy; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToDryRun(int index,String item) { - if (this.dryRun == null) {this.dryRun = new ArrayList();} - this.dryRun.add(index, item); - return (A)this; - } - public A setToDryRun(int index,String item) { - if (this.dryRun == null) {this.dryRun = new ArrayList();} - this.dryRun.set(index, item); return (A)this; - } - public A addToDryRun(java.lang.String... items) { - if (this.dryRun == null) {this.dryRun = new ArrayList();} - for (String item : items) {this.dryRun.add(item);} return (A)this; - } - public A addAllToDryRun(Collection items) { - if (this.dryRun == null) {this.dryRun = new ArrayList();} - for (String item : items) {this.dryRun.add(item);} return (A)this; - } - public A removeFromDryRun(java.lang.String... items) { - for (String item : items) {if (this.dryRun!= null){ this.dryRun.remove(item);}} return (A)this; - } - public A removeAllFromDryRun(Collection items) { - for (String item : items) {if (this.dryRun!= null){ this.dryRun.remove(item);}} return (A)this; - } - public List getDryRun() { - return this.dryRun; - } - public String getDryRun(int index) { - return this.dryRun.get(index); - } - public String getFirstDryRun() { - return this.dryRun.get(0); - } - public String getLastDryRun() { - return this.dryRun.get(dryRun.size() - 1); - } - public String getMatchingDryRun(Predicate predicate) { - for (String item: dryRun) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingDryRun(Predicate predicate) { - for (String item: dryRun) { if(predicate.test(item)){ return true;} } return false; - } - public A withDryRun(List dryRun) { - if (dryRun != null) {this.dryRun = new ArrayList(); for (String item : dryRun){this.addToDryRun(item);}} else { this.dryRun = null;} return (A) this; - } - public A withDryRun(java.lang.String... dryRun) { - if (this.dryRun != null) {this.dryRun.clear(); _visitables.remove("dryRun"); } - if (dryRun != null) {for (String item :dryRun){ this.addToDryRun(item);}} return (A) this; - } - public Boolean hasDryRun() { - return dryRun != null && !dryRun.isEmpty(); - } - public Long getGracePeriodSeconds() { - return this.gracePeriodSeconds; - } - public A withGracePeriodSeconds(Long gracePeriodSeconds) { - this.gracePeriodSeconds=gracePeriodSeconds; return (A) this; - } - public Boolean hasGracePeriodSeconds() { - return this.gracePeriodSeconds != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public Boolean getOrphanDependents() { - return this.orphanDependents; - } - public A withOrphanDependents(Boolean orphanDependents) { - this.orphanDependents=orphanDependents; return (A) this; - } - public Boolean hasOrphanDependents() { - return this.orphanDependents != null; - } - - /** - * This method has been deprecated, please use method buildPreconditions instead. - * @return The buildable object. - */ - @Deprecated - public V1Preconditions getPreconditions() { - return this.preconditions!=null ?this.preconditions.build():null; - } - public V1Preconditions buildPreconditions() { - return this.preconditions!=null ?this.preconditions.build():null; - } - public A withPreconditions(V1Preconditions preconditions) { - _visitables.get("preconditions").remove(this.preconditions); - if (preconditions!=null){ this.preconditions= new V1PreconditionsBuilder(preconditions); _visitables.get("preconditions").add(this.preconditions);} else { this.preconditions = null; _visitables.get("preconditions").remove(this.preconditions); } return (A) this; - } - public Boolean hasPreconditions() { - return this.preconditions != null; - } - public V1DeleteOptionsFluentImpl.PreconditionsNested withNewPreconditions() { - return new V1DeleteOptionsFluentImpl.PreconditionsNestedImpl(); - } - public V1DeleteOptionsFluentImpl.PreconditionsNested withNewPreconditionsLike(V1Preconditions item) { - return new V1DeleteOptionsFluentImpl.PreconditionsNestedImpl(item); - } - public V1DeleteOptionsFluentImpl.PreconditionsNested editPreconditions() { - return withNewPreconditionsLike(getPreconditions()); - } - public V1DeleteOptionsFluentImpl.PreconditionsNested editOrNewPreconditions() { - return withNewPreconditionsLike(getPreconditions() != null ? getPreconditions(): new V1PreconditionsBuilder().build()); - } - public V1DeleteOptionsFluentImpl.PreconditionsNested editOrNewPreconditionsLike(V1Preconditions item) { - return withNewPreconditionsLike(getPreconditions() != null ? getPreconditions(): item); - } - public String getPropagationPolicy() { - return this.propagationPolicy; - } - public A withPropagationPolicy(String propagationPolicy) { - this.propagationPolicy=propagationPolicy; return (A) this; - } - public Boolean hasPropagationPolicy() { - return this.propagationPolicy != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DeleteOptionsFluentImpl that = (V1DeleteOptionsFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(dryRun, that.dryRun)) return false; - - if (!java.util.Objects.equals(gracePeriodSeconds, that.gracePeriodSeconds)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(orphanDependents, that.orphanDependents)) return false; - - if (!java.util.Objects.equals(preconditions, that.preconditions)) return false; - - if (!java.util.Objects.equals(propagationPolicy, that.propagationPolicy)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, dryRun, gracePeriodSeconds, kind, orphanDependents, preconditions, propagationPolicy, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (dryRun != null && !dryRun.isEmpty()) { sb.append("dryRun:"); sb.append(dryRun + ","); } - if (gracePeriodSeconds != null) { sb.append("gracePeriodSeconds:"); sb.append(gracePeriodSeconds + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (orphanDependents != null) { sb.append("orphanDependents:"); sb.append(orphanDependents + ","); } - if (preconditions != null) { sb.append("preconditions:"); sb.append(preconditions + ","); } - if (propagationPolicy != null) { sb.append("propagationPolicy:"); sb.append(propagationPolicy); } - sb.append("}"); - return sb.toString(); - } - public A withOrphanDependents() { - return withOrphanDependents(true); - } - class PreconditionsNestedImpl extends V1PreconditionsFluentImpl> implements V1DeleteOptionsFluentImpl.PreconditionsNested,Nested{ - PreconditionsNestedImpl(V1Preconditions item) { - this.builder = new V1PreconditionsBuilder(this, item); - } - PreconditionsNestedImpl() { - this.builder = new V1PreconditionsBuilder(this); - } - V1PreconditionsBuilder builder; - public N and() { - return (N) V1DeleteOptionsFluentImpl.this.withPreconditions(builder.build()); - } - public N endPreconditions() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentBuilder.java index afb71e5030..535605aa31 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DeploymentBuilder extends V1DeploymentFluentImpl implements VisitableBuilder{ +public class V1DeploymentBuilder extends V1DeploymentFluent implements VisitableBuilder{ public V1DeploymentBuilder() { - this(false); - } - public V1DeploymentBuilder(Boolean validationEnabled) { - this(new V1Deployment(), validationEnabled); + this(new V1Deployment()); } + public V1DeploymentBuilder(V1DeploymentFluent fluent) { - this(fluent, false); - } - public V1DeploymentBuilder(V1DeploymentFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Deployment(), validationEnabled); + this(fluent, new V1Deployment()); } + public V1DeploymentBuilder(V1DeploymentFluent fluent,V1Deployment instance) { - this(fluent, instance, false); - } - public V1DeploymentBuilder(V1DeploymentFluent fluent,V1Deployment instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DeploymentBuilder(V1Deployment instance) { - this(instance,false); - } - public V1DeploymentBuilder(V1Deployment instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DeploymentFluent fluent; - Boolean validationEnabled; + public V1Deployment build() { V1Deployment buildable = new V1Deployment(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionBuilder.java index f0637ca3b4..b5572b3ed6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DeploymentConditionBuilder extends V1DeploymentConditionFluentImpl implements VisitableBuilder{ +public class V1DeploymentConditionBuilder extends V1DeploymentConditionFluent implements VisitableBuilder{ public V1DeploymentConditionBuilder() { - this(false); - } - public V1DeploymentConditionBuilder(Boolean validationEnabled) { - this(new V1DeploymentCondition(), validationEnabled); + this(new V1DeploymentCondition()); } + public V1DeploymentConditionBuilder(V1DeploymentConditionFluent fluent) { - this(fluent, false); - } - public V1DeploymentConditionBuilder(V1DeploymentConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DeploymentCondition(), validationEnabled); + this(fluent, new V1DeploymentCondition()); } + public V1DeploymentConditionBuilder(V1DeploymentConditionFluent fluent,V1DeploymentCondition instance) { - this(fluent, instance, false); - } - public V1DeploymentConditionBuilder(V1DeploymentConditionFluent fluent,V1DeploymentCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withLastUpdateTime(instance.getLastUpdateTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DeploymentConditionBuilder(V1DeploymentCondition instance) { - this(instance,false); - } - public V1DeploymentConditionBuilder(V1DeploymentCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withLastUpdateTime(instance.getLastUpdateTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DeploymentConditionFluent fluent; - Boolean validationEnabled; + public V1DeploymentCondition build() { V1DeploymentCondition buildable = new V1DeploymentCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -58,4 +32,5 @@ public V1DeploymentCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionFluent.java index beab6c904c..11731803bf 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionFluent.java @@ -1,32 +1,149 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DeploymentConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public OffsetDateTime getLastUpdateTime(); - public A withLastUpdateTime(OffsetDateTime lastUpdateTime); - public Boolean hasLastUpdateTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DeploymentConditionFluent> extends BaseFluent{ + public V1DeploymentConditionFluent() { + } + public V1DeploymentConditionFluent(V1DeploymentCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private OffsetDateTime lastUpdateTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1DeploymentCondition instance) { + instance = (instance != null ? instance : new V1DeploymentCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withLastUpdateTime(instance.getLastUpdateTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public OffsetDateTime getLastUpdateTime() { + return this.lastUpdateTime; + } + + public A withLastUpdateTime(OffsetDateTime lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + return (A) this; + } + + public boolean hasLastUpdateTime() { + return this.lastUpdateTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DeploymentConditionFluent that = (V1DeploymentConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(lastUpdateTime, that.lastUpdateTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, lastUpdateTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (lastUpdateTime != null) { sb.append("lastUpdateTime:"); sb.append(lastUpdateTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionFluentImpl.java deleted file mode 100644 index f909b11118..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentConditionFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DeploymentConditionFluentImpl> extends BaseFluent implements V1DeploymentConditionFluent{ - public V1DeploymentConditionFluentImpl() { - } - public V1DeploymentConditionFluentImpl(V1DeploymentCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withLastUpdateTime(instance.getLastUpdateTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private OffsetDateTime lastUpdateTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public OffsetDateTime getLastUpdateTime() { - return this.lastUpdateTime; - } - public A withLastUpdateTime(OffsetDateTime lastUpdateTime) { - this.lastUpdateTime=lastUpdateTime; return (A) this; - } - public Boolean hasLastUpdateTime() { - return this.lastUpdateTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DeploymentConditionFluentImpl that = (V1DeploymentConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(lastUpdateTime, that.lastUpdateTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, lastUpdateTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (lastUpdateTime != null) { sb.append("lastUpdateTime:"); sb.append(lastUpdateTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentFluent.java index 3832a4271c..cd0636c906 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1DeploymentFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1DeploymentFluent.MetadataNested withNewMetadata(); - public V1DeploymentFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1DeploymentFluent.MetadataNested editMetadata(); - public V1DeploymentFluent.MetadataNested editOrNewMetadata(); - public V1DeploymentFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1DeploymentSpec getSpec(); - public V1DeploymentSpec buildSpec(); - public A withSpec(V1DeploymentSpec spec); - public Boolean hasSpec(); - public V1DeploymentFluent.SpecNested withNewSpec(); - public V1DeploymentFluent.SpecNested withNewSpecLike(V1DeploymentSpec item); - public V1DeploymentFluent.SpecNested editSpec(); - public V1DeploymentFluent.SpecNested editOrNewSpec(); - public V1DeploymentFluent.SpecNested editOrNewSpecLike(V1DeploymentSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1DeploymentStatus getStatus(); - public V1DeploymentStatus buildStatus(); - public A withStatus(V1DeploymentStatus status); - public Boolean hasStatus(); - public V1DeploymentFluent.StatusNested withNewStatus(); - public V1DeploymentFluent.StatusNested withNewStatusLike(V1DeploymentStatus item); - public V1DeploymentFluent.StatusNested editStatus(); - public V1DeploymentFluent.StatusNested editOrNewStatus(); - public V1DeploymentFluent.StatusNested editOrNewStatusLike(V1DeploymentStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DeploymentFluent> extends BaseFluent{ + public V1DeploymentFluent() { + } + + public V1DeploymentFluent(V1Deployment instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1DeploymentSpecBuilder spec; + private V1DeploymentStatusBuilder status; + + protected void copyInstance(V1Deployment instance) { + instance = (instance != null ? instance : new V1Deployment()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1DeploymentSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1DeploymentSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1DeploymentSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1DeploymentSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1DeploymentSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1DeploymentSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1DeploymentSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1DeploymentStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1DeploymentStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1DeploymentStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1DeploymentStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1DeploymentStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1DeploymentStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DeploymentFluent that = (V1DeploymentFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1DeploymentFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1DeploymentStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1DeploymentSpecFluent> implements Nested{ + SpecNested(V1DeploymentSpec item) { + this.builder = new V1DeploymentSpecBuilder(this, item); + } + V1DeploymentSpecBuilder builder; + + public N and() { + return (N) V1DeploymentFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1DeploymentStatusFluent> implements Nested{ + StatusNested(V1DeploymentStatus item) { + this.builder = new V1DeploymentStatusBuilder(this, item); + } + V1DeploymentStatusBuilder builder; + + public N and() { + return (N) V1DeploymentFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentFluentImpl.java deleted file mode 100644 index 9b12a80516..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DeploymentFluentImpl> extends BaseFluent implements V1DeploymentFluent{ - public V1DeploymentFluentImpl() { - } - public V1DeploymentFluentImpl(V1Deployment instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1DeploymentSpecBuilder spec; - private V1DeploymentStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1DeploymentFluentImpl.MetadataNested withNewMetadata() { - return new V1DeploymentFluentImpl.MetadataNestedImpl(); - } - public V1DeploymentFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1DeploymentFluentImpl.MetadataNestedImpl(item); - } - public V1DeploymentFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1DeploymentFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1DeploymentFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1DeploymentSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1DeploymentSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1DeploymentSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1DeploymentSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1DeploymentFluentImpl.SpecNested withNewSpec() { - return new V1DeploymentFluentImpl.SpecNestedImpl(); - } - public V1DeploymentFluentImpl.SpecNested withNewSpecLike(V1DeploymentSpec item) { - return new V1DeploymentFluentImpl.SpecNestedImpl(item); - } - public V1DeploymentFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1DeploymentFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1DeploymentSpecBuilder().build()); - } - public V1DeploymentFluentImpl.SpecNested editOrNewSpecLike(V1DeploymentSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1DeploymentStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1DeploymentStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1DeploymentStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1DeploymentStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1DeploymentFluentImpl.StatusNested withNewStatus() { - return new V1DeploymentFluentImpl.StatusNestedImpl(); - } - public V1DeploymentFluentImpl.StatusNested withNewStatusLike(V1DeploymentStatus item) { - return new V1DeploymentFluentImpl.StatusNestedImpl(item); - } - public V1DeploymentFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1DeploymentFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1DeploymentStatusBuilder().build()); - } - public V1DeploymentFluentImpl.StatusNested editOrNewStatusLike(V1DeploymentStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DeploymentFluentImpl that = (V1DeploymentFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1DeploymentFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1DeploymentFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1DeploymentSpecFluentImpl> implements V1DeploymentFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1DeploymentSpec item) { - this.builder = new V1DeploymentSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1DeploymentSpecBuilder(this); - } - V1DeploymentSpecBuilder builder; - public N and() { - return (N) V1DeploymentFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1DeploymentStatusFluentImpl> implements V1DeploymentFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1DeploymentStatus item) { - this.builder = new V1DeploymentStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1DeploymentStatusBuilder(this); - } - V1DeploymentStatusBuilder builder; - public N and() { - return (N) V1DeploymentFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListBuilder.java index 620899fd0f..3b651459e1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DeploymentListBuilder extends V1DeploymentListFluentImpl implements VisitableBuilder{ +public class V1DeploymentListBuilder extends V1DeploymentListFluent implements VisitableBuilder{ public V1DeploymentListBuilder() { - this(false); - } - public V1DeploymentListBuilder(Boolean validationEnabled) { - this(new V1DeploymentList(), validationEnabled); + this(new V1DeploymentList()); } + public V1DeploymentListBuilder(V1DeploymentListFluent fluent) { - this(fluent, false); - } - public V1DeploymentListBuilder(V1DeploymentListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DeploymentList(), validationEnabled); + this(fluent, new V1DeploymentList()); } + public V1DeploymentListBuilder(V1DeploymentListFluent fluent,V1DeploymentList instance) { - this(fluent, instance, false); - } - public V1DeploymentListBuilder(V1DeploymentListFluent fluent,V1DeploymentList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DeploymentListBuilder(V1DeploymentList instance) { - this(instance,false); - } - public V1DeploymentListBuilder(V1DeploymentList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DeploymentListFluent fluent; - Boolean validationEnabled; + public V1DeploymentList build() { V1DeploymentList buildable = new V1DeploymentList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListFluent.java index 8c88fadcce..21a0b288c3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DeploymentListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Deployment item); - public A setToItems(int index,V1Deployment item); - public A addToItems(io.kubernetes.client.openapi.models.V1Deployment... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Deployment... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Deployment buildItem(int index); - public V1Deployment buildFirstItem(); - public V1Deployment buildLastItem(); - public V1Deployment buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Deployment... items); - public Boolean hasItems(); - public V1DeploymentListFluent.ItemsNested addNewItem(); - public V1DeploymentListFluent.ItemsNested addNewItemLike(V1Deployment item); - public V1DeploymentListFluent.ItemsNested setNewItemLike(int index,V1Deployment item); - public V1DeploymentListFluent.ItemsNested editItem(int index); - public V1DeploymentListFluent.ItemsNested editFirstItem(); - public V1DeploymentListFluent.ItemsNested editLastItem(); - public V1DeploymentListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1DeploymentListFluent.MetadataNested withNewMetadata(); - public V1DeploymentListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1DeploymentListFluent.MetadataNested editMetadata(); - public V1DeploymentListFluent.MetadataNested editOrNewMetadata(); - public V1DeploymentListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1DeploymentFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DeploymentListFluent> extends BaseFluent{ + public V1DeploymentListFluent() { + } + + public V1DeploymentListFluent(V1DeploymentList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1DeploymentList instance) { + instance = (instance != null ? instance : new V1DeploymentList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Deployment item) { + if (this.items == null) {this.items = new ArrayList();} + V1DeploymentBuilder builder = new V1DeploymentBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Deployment item) { + if (this.items == null) {this.items = new ArrayList();} + V1DeploymentBuilder builder = new V1DeploymentBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Deployment... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Deployment item : items) {V1DeploymentBuilder builder = new V1DeploymentBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Deployment item : items) {V1DeploymentBuilder builder = new V1DeploymentBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Deployment... items) { + if (this.items == null) return (A)this; + for (V1Deployment item : items) {V1DeploymentBuilder builder = new V1DeploymentBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Deployment item : items) {V1DeploymentBuilder builder = new V1DeploymentBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1DeploymentBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Deployment buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Deployment buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Deployment buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Deployment buildMatchingItem(Predicate predicate) { + for (V1DeploymentBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1DeploymentBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Deployment item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Deployment... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Deployment item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Deployment item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Deployment item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DeploymentListFluent that = (V1DeploymentListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1DeploymentFluent> implements Nested{ + ItemsNested(int index,V1Deployment item) { + this.index = index; + this.builder = new V1DeploymentBuilder(this, item); + } + V1DeploymentBuilder builder; + int index; + public N and() { + return (N) V1DeploymentListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1DeploymentListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListFluentImpl.java deleted file mode 100644 index 030bfa338a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DeploymentListFluentImpl> extends BaseFluent implements V1DeploymentListFluent{ - public V1DeploymentListFluentImpl() { - } - public V1DeploymentListFluentImpl(V1DeploymentList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Deployment item) { - if (this.items == null) {this.items = new ArrayList();} - V1DeploymentBuilder builder = new V1DeploymentBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Deployment item) { - if (this.items == null) {this.items = new ArrayList();} - V1DeploymentBuilder builder = new V1DeploymentBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Deployment... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Deployment item : items) {V1DeploymentBuilder builder = new V1DeploymentBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Deployment item : items) {V1DeploymentBuilder builder = new V1DeploymentBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Deployment... items) { - for (V1Deployment item : items) {V1DeploymentBuilder builder = new V1DeploymentBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Deployment item : items) {V1DeploymentBuilder builder = new V1DeploymentBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1DeploymentBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Deployment buildItem(int index) { - return this.items.get(index).build(); - } - public V1Deployment buildFirstItem() { - return this.items.get(0).build(); - } - public V1Deployment buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Deployment buildMatchingItem(Predicate predicate) { - for (V1DeploymentBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1DeploymentBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Deployment item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Deployment... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Deployment item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1DeploymentListFluentImpl.ItemsNested addNewItem() { - return new V1DeploymentListFluentImpl.ItemsNestedImpl(); - } - public V1DeploymentListFluentImpl.ItemsNested addNewItemLike(V1Deployment item) { - return new V1DeploymentListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1DeploymentListFluentImpl.ItemsNested setNewItemLike(int index,V1Deployment item) { - return new V1DeploymentListFluentImpl.ItemsNestedImpl(index, item); - } - public V1DeploymentListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1DeploymentListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1DeploymentListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1DeploymentListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1DeploymentListFluentImpl.MetadataNestedImpl(); - } - public V1DeploymentListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1DeploymentListFluentImpl.MetadataNestedImpl(item); - } - public V1DeploymentListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1DeploymentListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1DeploymentListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DeploymentListFluentImpl that = (V1DeploymentListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1DeploymentFluentImpl> implements V1DeploymentListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Deployment item) { - this.index = index; - this.builder = new V1DeploymentBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1DeploymentBuilder(this); - } - V1DeploymentBuilder builder; - int index; - public N and() { - return (N) V1DeploymentListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1DeploymentListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1DeploymentListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecBuilder.java index 6d1516b580..50fed738bd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecBuilder.java @@ -1,56 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DeploymentSpecBuilder extends V1DeploymentSpecFluentImpl implements VisitableBuilder{ +public class V1DeploymentSpecBuilder extends V1DeploymentSpecFluent implements VisitableBuilder{ public V1DeploymentSpecBuilder() { - this(false); - } - public V1DeploymentSpecBuilder(Boolean validationEnabled) { - this(new V1DeploymentSpec(), validationEnabled); + this(new V1DeploymentSpec()); } + public V1DeploymentSpecBuilder(V1DeploymentSpecFluent fluent) { - this(fluent, false); - } - public V1DeploymentSpecBuilder(V1DeploymentSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DeploymentSpec(), validationEnabled); + this(fluent, new V1DeploymentSpec()); } + public V1DeploymentSpecBuilder(V1DeploymentSpecFluent fluent,V1DeploymentSpec instance) { - this(fluent, instance, false); - } - public V1DeploymentSpecBuilder(V1DeploymentSpecFluent fluent,V1DeploymentSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMinReadySeconds(instance.getMinReadySeconds()); - fluent.withPaused(instance.getPaused()); - fluent.withProgressDeadlineSeconds(instance.getProgressDeadlineSeconds()); - fluent.withReplicas(instance.getReplicas()); - fluent.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); - fluent.withSelector(instance.getSelector()); - fluent.withStrategy(instance.getStrategy()); - fluent.withTemplate(instance.getTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DeploymentSpecBuilder(V1DeploymentSpec instance) { - this(instance,false); - } - public V1DeploymentSpecBuilder(V1DeploymentSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withPaused(instance.getPaused()); - this.withProgressDeadlineSeconds(instance.getProgressDeadlineSeconds()); - this.withReplicas(instance.getReplicas()); - this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); - this.withSelector(instance.getSelector()); - this.withStrategy(instance.getStrategy()); - this.withTemplate(instance.getTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DeploymentSpecFluent fluent; - Boolean validationEnabled; + public V1DeploymentSpec build() { V1DeploymentSpec buildable = new V1DeploymentSpec(); buildable.setMinReadySeconds(fluent.getMinReadySeconds()); @@ -58,10 +28,11 @@ public V1DeploymentSpec build() { buildable.setProgressDeadlineSeconds(fluent.getProgressDeadlineSeconds()); buildable.setReplicas(fluent.getReplicas()); buildable.setRevisionHistoryLimit(fluent.getRevisionHistoryLimit()); - buildable.setSelector(fluent.getSelector()); - buildable.setStrategy(fluent.getStrategy()); - buildable.setTemplate(fluent.getTemplate()); + buildable.setSelector(fluent.buildSelector()); + buildable.setStrategy(fluent.buildStrategy()); + buildable.setTemplate(fluent.buildTemplate()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecFluent.java index 77710e79f3..275838e508 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecFluent.java @@ -1,91 +1,317 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; +import java.lang.String; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; - /** - * Generated - */ -public interface V1DeploymentSpecFluent> extends Fluent{ - public Integer getMinReadySeconds(); - public A withMinReadySeconds(Integer minReadySeconds); - public Boolean hasMinReadySeconds(); - public Boolean getPaused(); - public A withPaused(Boolean paused); - public Boolean hasPaused(); - public Integer getProgressDeadlineSeconds(); - public A withProgressDeadlineSeconds(Integer progressDeadlineSeconds); - public Boolean hasProgressDeadlineSeconds(); - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); - public Integer getRevisionHistoryLimit(); - public A withRevisionHistoryLimit(Integer revisionHistoryLimit); - public Boolean hasRevisionHistoryLimit(); - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector(); - public V1LabelSelector buildSelector(); - public A withSelector(V1LabelSelector selector); - public Boolean hasSelector(); - public V1DeploymentSpecFluent.SelectorNested withNewSelector(); - public V1DeploymentSpecFluent.SelectorNested withNewSelectorLike(V1LabelSelector item); - public V1DeploymentSpecFluent.SelectorNested editSelector(); - public V1DeploymentSpecFluent.SelectorNested editOrNewSelector(); - public V1DeploymentSpecFluent.SelectorNested editOrNewSelectorLike(V1LabelSelector item); - - /** - * This method has been deprecated, please use method buildStrategy instead. - * @return The buildable object. - */ - @Deprecated - public V1DeploymentStrategy getStrategy(); - public V1DeploymentStrategy buildStrategy(); - public A withStrategy(V1DeploymentStrategy strategy); - public Boolean hasStrategy(); - public V1DeploymentSpecFluent.StrategyNested withNewStrategy(); - public V1DeploymentSpecFluent.StrategyNested withNewStrategyLike(V1DeploymentStrategy item); - public V1DeploymentSpecFluent.StrategyNested editStrategy(); - public V1DeploymentSpecFluent.StrategyNested editOrNewStrategy(); - public V1DeploymentSpecFluent.StrategyNested editOrNewStrategyLike(V1DeploymentStrategy item); - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate(); - public V1PodTemplateSpec buildTemplate(); - public A withTemplate(V1PodTemplateSpec template); - public Boolean hasTemplate(); - public V1DeploymentSpecFluent.TemplateNested withNewTemplate(); - public V1DeploymentSpecFluent.TemplateNested withNewTemplateLike(V1PodTemplateSpec item); - public V1DeploymentSpecFluent.TemplateNested editTemplate(); - public V1DeploymentSpecFluent.TemplateNested editOrNewTemplate(); - public V1DeploymentSpecFluent.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item); - public A withPaused(); - public interface SelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DeploymentSpecFluent> extends BaseFluent{ + public V1DeploymentSpecFluent() { + } + + public V1DeploymentSpecFluent(V1DeploymentSpec instance) { + this.copyInstance(instance); + } + private Integer minReadySeconds; + private Boolean paused; + private Integer progressDeadlineSeconds; + private Integer replicas; + private Integer revisionHistoryLimit; + private V1LabelSelectorBuilder selector; + private V1DeploymentStrategyBuilder strategy; + private V1PodTemplateSpecBuilder template; + + protected void copyInstance(V1DeploymentSpec instance) { + instance = (instance != null ? instance : new V1DeploymentSpec()); + if (instance != null) { + this.withMinReadySeconds(instance.getMinReadySeconds()); + this.withPaused(instance.getPaused()); + this.withProgressDeadlineSeconds(instance.getProgressDeadlineSeconds()); + this.withReplicas(instance.getReplicas()); + this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); + this.withSelector(instance.getSelector()); + this.withStrategy(instance.getStrategy()); + this.withTemplate(instance.getTemplate()); + } + } + + public Integer getMinReadySeconds() { + return this.minReadySeconds; + } + + public A withMinReadySeconds(Integer minReadySeconds) { + this.minReadySeconds = minReadySeconds; + return (A) this; + } + + public boolean hasMinReadySeconds() { + return this.minReadySeconds != null; + } + + public Boolean getPaused() { + return this.paused; + } + + public A withPaused(Boolean paused) { + this.paused = paused; + return (A) this; + } + + public boolean hasPaused() { + return this.paused != null; + } + + public Integer getProgressDeadlineSeconds() { + return this.progressDeadlineSeconds; + } + + public A withProgressDeadlineSeconds(Integer progressDeadlineSeconds) { + this.progressDeadlineSeconds = progressDeadlineSeconds; + return (A) this; + } + + public boolean hasProgressDeadlineSeconds() { + return this.progressDeadlineSeconds != null; + } + + public Integer getReplicas() { + return this.replicas; + } + + public A withReplicas(Integer replicas) { + this.replicas = replicas; + return (A) this; + } + + public boolean hasReplicas() { + return this.replicas != null; + } + + public Integer getRevisionHistoryLimit() { + return this.revisionHistoryLimit; + } + + public A withRevisionHistoryLimit(Integer revisionHistoryLimit) { + this.revisionHistoryLimit = revisionHistoryLimit; + return (A) this; + } + + public boolean hasRevisionHistoryLimit() { + return this.revisionHistoryLimit != null; + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); + } + + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); } - public interface StrategyNested extends Nested,V1DeploymentStrategyFluent>{ - public N and(); - public N endStrategy(); + + public V1DeploymentStrategy buildStrategy() { + return this.strategy != null ? this.strategy.build() : null; + } + + public A withStrategy(V1DeploymentStrategy strategy) { + this._visitables.remove("strategy"); + if (strategy != null) { + this.strategy = new V1DeploymentStrategyBuilder(strategy); + this._visitables.get("strategy").add(this.strategy); + } else { + this.strategy = null; + this._visitables.get("strategy").remove(this.strategy); + } + return (A) this; + } + + public boolean hasStrategy() { + return this.strategy != null; + } + + public StrategyNested withNewStrategy() { + return new StrategyNested(null); + } + + public StrategyNested withNewStrategyLike(V1DeploymentStrategy item) { + return new StrategyNested(item); + } + + public StrategyNested editStrategy() { + return withNewStrategyLike(java.util.Optional.ofNullable(buildStrategy()).orElse(null)); + } + + public StrategyNested editOrNewStrategy() { + return withNewStrategyLike(java.util.Optional.ofNullable(buildStrategy()).orElse(new V1DeploymentStrategyBuilder().build())); + } + + public StrategyNested editOrNewStrategyLike(V1DeploymentStrategy item) { + return withNewStrategyLike(java.util.Optional.ofNullable(buildStrategy()).orElse(item)); + } + + public V1PodTemplateSpec buildTemplate() { + return this.template != null ? this.template.build() : null; + } + + public A withTemplate(V1PodTemplateSpec template) { + this._visitables.remove("template"); + if (template != null) { + this.template = new V1PodTemplateSpecBuilder(template); + this._visitables.get("template").add(this.template); + } else { + this.template = null; + this._visitables.get("template").remove(this.template); + } + return (A) this; + } + + public boolean hasTemplate() { + return this.template != null; + } + + public TemplateNested withNewTemplate() { + return new TemplateNested(null); + } + + public TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { + return new TemplateNested(item); + } + + public TemplateNested editTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(null)); + } + + public TemplateNested editOrNewTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(new V1PodTemplateSpecBuilder().build())); + } + + public TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DeploymentSpecFluent that = (V1DeploymentSpecFluent) o; + if (!java.util.Objects.equals(minReadySeconds, that.minReadySeconds)) return false; + if (!java.util.Objects.equals(paused, that.paused)) return false; + if (!java.util.Objects.equals(progressDeadlineSeconds, that.progressDeadlineSeconds)) return false; + if (!java.util.Objects.equals(replicas, that.replicas)) return false; + if (!java.util.Objects.equals(revisionHistoryLimit, that.revisionHistoryLimit)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + if (!java.util.Objects.equals(strategy, that.strategy)) return false; + if (!java.util.Objects.equals(template, that.template)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(minReadySeconds, paused, progressDeadlineSeconds, replicas, revisionHistoryLimit, selector, strategy, template, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (minReadySeconds != null) { sb.append("minReadySeconds:"); sb.append(minReadySeconds + ","); } + if (paused != null) { sb.append("paused:"); sb.append(paused + ","); } + if (progressDeadlineSeconds != null) { sb.append("progressDeadlineSeconds:"); sb.append(progressDeadlineSeconds + ","); } + if (replicas != null) { sb.append("replicas:"); sb.append(replicas + ","); } + if (revisionHistoryLimit != null) { sb.append("revisionHistoryLimit:"); sb.append(revisionHistoryLimit + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } + if (strategy != null) { sb.append("strategy:"); sb.append(strategy + ","); } + if (template != null) { sb.append("template:"); sb.append(template); } + sb.append("}"); + return sb.toString(); + } + + public A withPaused() { + return withPaused(true); + } + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1DeploymentSpecFluent.this.withSelector(builder.build()); + } + + public N endSelector() { + return and(); + } + } - public interface TemplateNested extends Nested,V1PodTemplateSpecFluent>{ - public N and(); - public N endTemplate(); + public class StrategyNested extends V1DeploymentStrategyFluent> implements Nested{ + StrategyNested(V1DeploymentStrategy item) { + this.builder = new V1DeploymentStrategyBuilder(this, item); + } + V1DeploymentStrategyBuilder builder; + + public N and() { + return (N) V1DeploymentSpecFluent.this.withStrategy(builder.build()); + } + + public N endStrategy() { + return and(); + } + } + public class TemplateNested extends V1PodTemplateSpecFluent> implements Nested{ + TemplateNested(V1PodTemplateSpec item) { + this.builder = new V1PodTemplateSpecBuilder(this, item); + } + V1PodTemplateSpecBuilder builder; + + public N and() { + return (N) V1DeploymentSpecFluent.this.withTemplate(builder.build()); + } + + public N endTemplate() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecFluentImpl.java deleted file mode 100644 index cf4da6e903..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentSpecFluentImpl.java +++ /dev/null @@ -1,278 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DeploymentSpecFluentImpl> extends BaseFluent implements V1DeploymentSpecFluent{ - public V1DeploymentSpecFluentImpl() { - } - public V1DeploymentSpecFluentImpl(V1DeploymentSpec instance) { - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withPaused(instance.getPaused()); - this.withProgressDeadlineSeconds(instance.getProgressDeadlineSeconds()); - this.withReplicas(instance.getReplicas()); - this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); - this.withSelector(instance.getSelector()); - this.withStrategy(instance.getStrategy()); - this.withTemplate(instance.getTemplate()); - } - } - private Integer minReadySeconds; - private Boolean paused; - private Integer progressDeadlineSeconds; - private Integer replicas; - private Integer revisionHistoryLimit; - private V1LabelSelectorBuilder selector; - private V1DeploymentStrategyBuilder strategy; - private V1PodTemplateSpecBuilder template; - public Integer getMinReadySeconds() { - return this.minReadySeconds; - } - public A withMinReadySeconds(Integer minReadySeconds) { - this.minReadySeconds=minReadySeconds; return (A) this; - } - public Boolean hasMinReadySeconds() { - return this.minReadySeconds != null; - } - public Boolean getPaused() { - return this.paused; - } - public A withPaused(Boolean paused) { - this.paused=paused; return (A) this; - } - public Boolean hasPaused() { - return this.paused != null; - } - public Integer getProgressDeadlineSeconds() { - return this.progressDeadlineSeconds; - } - public A withProgressDeadlineSeconds(Integer progressDeadlineSeconds) { - this.progressDeadlineSeconds=progressDeadlineSeconds; return (A) this; - } - public Boolean hasProgressDeadlineSeconds() { - return this.progressDeadlineSeconds != null; - } - public Integer getReplicas() { - return this.replicas; - } - public A withReplicas(Integer replicas) { - this.replicas=replicas; return (A) this; - } - public Boolean hasReplicas() { - return this.replicas != null; - } - public Integer getRevisionHistoryLimit() { - return this.revisionHistoryLimit; - } - public A withRevisionHistoryLimit(Integer revisionHistoryLimit) { - this.revisionHistoryLimit=revisionHistoryLimit; return (A) this; - } - public Boolean hasRevisionHistoryLimit() { - return this.revisionHistoryLimit != null; - } - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector() { - return this.selector!=null ?this.selector.build():null; - } - public V1LabelSelector buildSelector() { - return this.selector!=null ?this.selector.build():null; - } - public A withSelector(V1LabelSelector selector) { - _visitables.get("selector").remove(this.selector); - if (selector!=null){ this.selector= new V1LabelSelectorBuilder(selector); _visitables.get("selector").add(this.selector);} else { this.selector = null; _visitables.get("selector").remove(this.selector); } return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public V1DeploymentSpecFluentImpl.SelectorNested withNewSelector() { - return new V1DeploymentSpecFluentImpl.SelectorNestedImpl(); - } - public V1DeploymentSpecFluentImpl.SelectorNested withNewSelectorLike(V1LabelSelector item) { - return new V1DeploymentSpecFluentImpl.SelectorNestedImpl(item); - } - public V1DeploymentSpecFluentImpl.SelectorNested editSelector() { - return withNewSelectorLike(getSelector()); - } - public V1DeploymentSpecFluentImpl.SelectorNested editOrNewSelector() { - return withNewSelectorLike(getSelector() != null ? getSelector(): new V1LabelSelectorBuilder().build()); - } - public V1DeploymentSpecFluentImpl.SelectorNested editOrNewSelectorLike(V1LabelSelector item) { - return withNewSelectorLike(getSelector() != null ? getSelector(): item); - } - - /** - * This method has been deprecated, please use method buildStrategy instead. - * @return The buildable object. - */ - @Deprecated - public V1DeploymentStrategy getStrategy() { - return this.strategy!=null ?this.strategy.build():null; - } - public V1DeploymentStrategy buildStrategy() { - return this.strategy!=null ?this.strategy.build():null; - } - public A withStrategy(V1DeploymentStrategy strategy) { - _visitables.get("strategy").remove(this.strategy); - if (strategy!=null){ this.strategy= new V1DeploymentStrategyBuilder(strategy); _visitables.get("strategy").add(this.strategy);} else { this.strategy = null; _visitables.get("strategy").remove(this.strategy); } return (A) this; - } - public Boolean hasStrategy() { - return this.strategy != null; - } - public V1DeploymentSpecFluentImpl.StrategyNested withNewStrategy() { - return new V1DeploymentSpecFluentImpl.StrategyNestedImpl(); - } - public V1DeploymentSpecFluentImpl.StrategyNested withNewStrategyLike(V1DeploymentStrategy item) { - return new V1DeploymentSpecFluentImpl.StrategyNestedImpl(item); - } - public V1DeploymentSpecFluentImpl.StrategyNested editStrategy() { - return withNewStrategyLike(getStrategy()); - } - public V1DeploymentSpecFluentImpl.StrategyNested editOrNewStrategy() { - return withNewStrategyLike(getStrategy() != null ? getStrategy(): new V1DeploymentStrategyBuilder().build()); - } - public V1DeploymentSpecFluentImpl.StrategyNested editOrNewStrategyLike(V1DeploymentStrategy item) { - return withNewStrategyLike(getStrategy() != null ? getStrategy(): item); - } - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate() { - return this.template!=null ?this.template.build():null; - } - public V1PodTemplateSpec buildTemplate() { - return this.template!=null ?this.template.build():null; - } - public A withTemplate(V1PodTemplateSpec template) { - _visitables.get("template").remove(this.template); - if (template!=null){ this.template= new V1PodTemplateSpecBuilder(template); _visitables.get("template").add(this.template);} else { this.template = null; _visitables.get("template").remove(this.template); } return (A) this; - } - public Boolean hasTemplate() { - return this.template != null; - } - public V1DeploymentSpecFluentImpl.TemplateNested withNewTemplate() { - return new V1DeploymentSpecFluentImpl.TemplateNestedImpl(); - } - public V1DeploymentSpecFluentImpl.TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { - return new V1DeploymentSpecFluentImpl.TemplateNestedImpl(item); - } - public V1DeploymentSpecFluentImpl.TemplateNested editTemplate() { - return withNewTemplateLike(getTemplate()); - } - public V1DeploymentSpecFluentImpl.TemplateNested editOrNewTemplate() { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): new V1PodTemplateSpecBuilder().build()); - } - public V1DeploymentSpecFluentImpl.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DeploymentSpecFluentImpl that = (V1DeploymentSpecFluentImpl) o; - if (!java.util.Objects.equals(minReadySeconds, that.minReadySeconds)) return false; - - if (!java.util.Objects.equals(paused, that.paused)) return false; - - if (!java.util.Objects.equals(progressDeadlineSeconds, that.progressDeadlineSeconds)) return false; - - if (!java.util.Objects.equals(replicas, that.replicas)) return false; - - if (!java.util.Objects.equals(revisionHistoryLimit, that.revisionHistoryLimit)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - if (!java.util.Objects.equals(strategy, that.strategy)) return false; - - if (!java.util.Objects.equals(template, that.template)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(minReadySeconds, paused, progressDeadlineSeconds, replicas, revisionHistoryLimit, selector, strategy, template, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (minReadySeconds != null) { sb.append("minReadySeconds:"); sb.append(minReadySeconds + ","); } - if (paused != null) { sb.append("paused:"); sb.append(paused + ","); } - if (progressDeadlineSeconds != null) { sb.append("progressDeadlineSeconds:"); sb.append(progressDeadlineSeconds + ","); } - if (replicas != null) { sb.append("replicas:"); sb.append(replicas + ","); } - if (revisionHistoryLimit != null) { sb.append("revisionHistoryLimit:"); sb.append(revisionHistoryLimit + ","); } - if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } - if (strategy != null) { sb.append("strategy:"); sb.append(strategy + ","); } - if (template != null) { sb.append("template:"); sb.append(template); } - sb.append("}"); - return sb.toString(); - } - public A withPaused() { - return withPaused(true); - } - class SelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1DeploymentSpecFluentImpl.SelectorNested,Nested{ - SelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - SelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1DeploymentSpecFluentImpl.this.withSelector(builder.build()); - } - public N endSelector() { - return and(); - } - - } - class StrategyNestedImpl extends V1DeploymentStrategyFluentImpl> implements V1DeploymentSpecFluentImpl.StrategyNested,Nested{ - StrategyNestedImpl(V1DeploymentStrategy item) { - this.builder = new V1DeploymentStrategyBuilder(this, item); - } - StrategyNestedImpl() { - this.builder = new V1DeploymentStrategyBuilder(this); - } - V1DeploymentStrategyBuilder builder; - public N and() { - return (N) V1DeploymentSpecFluentImpl.this.withStrategy(builder.build()); - } - public N endStrategy() { - return and(); - } - - } - class TemplateNestedImpl extends V1PodTemplateSpecFluentImpl> implements V1DeploymentSpecFluentImpl.TemplateNested,Nested{ - TemplateNestedImpl(V1PodTemplateSpec item) { - this.builder = new V1PodTemplateSpecBuilder(this, item); - } - TemplateNestedImpl() { - this.builder = new V1PodTemplateSpecBuilder(this); - } - V1PodTemplateSpecBuilder builder; - public N and() { - return (N) V1DeploymentSpecFluentImpl.this.withTemplate(builder.build()); - } - public N endTemplate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusBuilder.java index abab9f028c..677b024c81 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusBuilder.java @@ -1,61 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DeploymentStatusBuilder extends V1DeploymentStatusFluentImpl implements VisitableBuilder{ +public class V1DeploymentStatusBuilder extends V1DeploymentStatusFluent implements VisitableBuilder{ public V1DeploymentStatusBuilder() { - this(false); - } - public V1DeploymentStatusBuilder(Boolean validationEnabled) { - this(new V1DeploymentStatus(), validationEnabled); + this(new V1DeploymentStatus()); } + public V1DeploymentStatusBuilder(V1DeploymentStatusFluent fluent) { - this(fluent, false); - } - public V1DeploymentStatusBuilder(V1DeploymentStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DeploymentStatus(), validationEnabled); + this(fluent, new V1DeploymentStatus()); } + public V1DeploymentStatusBuilder(V1DeploymentStatusFluent fluent,V1DeploymentStatus instance) { - this(fluent, instance, false); - } - public V1DeploymentStatusBuilder(V1DeploymentStatusFluent fluent,V1DeploymentStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAvailableReplicas(instance.getAvailableReplicas()); - fluent.withCollisionCount(instance.getCollisionCount()); - fluent.withConditions(instance.getConditions()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - fluent.withReadyReplicas(instance.getReadyReplicas()); - fluent.withReplicas(instance.getReplicas()); - fluent.withUnavailableReplicas(instance.getUnavailableReplicas()); - fluent.withUpdatedReplicas(instance.getUpdatedReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DeploymentStatusBuilder(V1DeploymentStatus instance) { - this(instance,false); - } - public V1DeploymentStatusBuilder(V1DeploymentStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAvailableReplicas(instance.getAvailableReplicas()); - this.withCollisionCount(instance.getCollisionCount()); - this.withConditions(instance.getConditions()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReadyReplicas(instance.getReadyReplicas()); - this.withReplicas(instance.getReplicas()); - this.withUnavailableReplicas(instance.getUnavailableReplicas()); - this.withUpdatedReplicas(instance.getUpdatedReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DeploymentStatusFluent fluent; - Boolean validationEnabled; + public V1DeploymentStatus build() { V1DeploymentStatus buildable = new V1DeploymentStatus(); buildable.setAvailableReplicas(fluent.getAvailableReplicas()); buildable.setCollisionCount(fluent.getCollisionCount()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setObservedGeneration(fluent.getObservedGeneration()); buildable.setReadyReplicas(fluent.getReadyReplicas()); buildable.setReplicas(fluent.getReplicas()); @@ -64,4 +34,5 @@ public V1DeploymentStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusFluent.java index 983be6f12f..c808791715 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusFluent.java @@ -1,78 +1,346 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DeploymentStatusFluent> extends Fluent{ - public Integer getAvailableReplicas(); - public A withAvailableReplicas(Integer availableReplicas); - public Boolean hasAvailableReplicas(); - public Integer getCollisionCount(); - public A withCollisionCount(Integer collisionCount); - public Boolean hasCollisionCount(); - public A addToConditions(int index,V1DeploymentCondition item); - public A setToConditions(int index,V1DeploymentCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1DeploymentCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1DeploymentCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1DeploymentCondition buildCondition(int index); - public V1DeploymentCondition buildFirstCondition(); - public V1DeploymentCondition buildLastCondition(); - public V1DeploymentCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1DeploymentCondition... conditions); - public Boolean hasConditions(); - public V1DeploymentStatusFluent.ConditionsNested addNewCondition(); - public V1DeploymentStatusFluent.ConditionsNested addNewConditionLike(V1DeploymentCondition item); - public V1DeploymentStatusFluent.ConditionsNested setNewConditionLike(int index,V1DeploymentCondition item); - public V1DeploymentStatusFluent.ConditionsNested editCondition(int index); - public V1DeploymentStatusFluent.ConditionsNested editFirstCondition(); - public V1DeploymentStatusFluent.ConditionsNested editLastCondition(); - public V1DeploymentStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - public Integer getReadyReplicas(); - public A withReadyReplicas(Integer readyReplicas); - public Boolean hasReadyReplicas(); - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); - public Integer getUnavailableReplicas(); - public A withUnavailableReplicas(Integer unavailableReplicas); - public Boolean hasUnavailableReplicas(); - public Integer getUpdatedReplicas(); - public A withUpdatedReplicas(Integer updatedReplicas); - public Boolean hasUpdatedReplicas(); - public interface ConditionsNested extends Nested,V1DeploymentConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DeploymentStatusFluent> extends BaseFluent{ + public V1DeploymentStatusFluent() { + } + + public V1DeploymentStatusFluent(V1DeploymentStatus instance) { + this.copyInstance(instance); + } + private Integer availableReplicas; + private Integer collisionCount; + private ArrayList conditions; + private Long observedGeneration; + private Integer readyReplicas; + private Integer replicas; + private Integer unavailableReplicas; + private Integer updatedReplicas; + + protected void copyInstance(V1DeploymentStatus instance) { + instance = (instance != null ? instance : new V1DeploymentStatus()); + if (instance != null) { + this.withAvailableReplicas(instance.getAvailableReplicas()); + this.withCollisionCount(instance.getCollisionCount()); + this.withConditions(instance.getConditions()); + this.withObservedGeneration(instance.getObservedGeneration()); + this.withReadyReplicas(instance.getReadyReplicas()); + this.withReplicas(instance.getReplicas()); + this.withUnavailableReplicas(instance.getUnavailableReplicas()); + this.withUpdatedReplicas(instance.getUpdatedReplicas()); + } + } + + public Integer getAvailableReplicas() { + return this.availableReplicas; + } + + public A withAvailableReplicas(Integer availableReplicas) { + this.availableReplicas = availableReplicas; + return (A) this; + } + + public boolean hasAvailableReplicas() { + return this.availableReplicas != null; + } + + public Integer getCollisionCount() { + return this.collisionCount; + } + + public A withCollisionCount(Integer collisionCount) { + this.collisionCount = collisionCount; + return (A) this; + } + + public boolean hasCollisionCount() { + return this.collisionCount != null; + } + + public A addToConditions(int index,V1DeploymentCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1DeploymentCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1DeploymentCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1DeploymentCondition item : items) {V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1DeploymentCondition item : items) {V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1DeploymentCondition... items) { + if (this.conditions == null) return (A)this; + for (V1DeploymentCondition item : items) {V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1DeploymentCondition item : items) {V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1DeploymentConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1DeploymentCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1DeploymentCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1DeploymentCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1DeploymentCondition buildMatchingCondition(Predicate predicate) { + for (V1DeploymentConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1DeploymentConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1DeploymentCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1DeploymentCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1DeploymentCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1DeploymentCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1DeploymentCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1DeploymentConditionFluent> implements Nested{ + ConditionsNested(int index,V1DeploymentCondition item) { + this.index = index; + this.builder = new V1DeploymentConditionBuilder(this, item); + } + V1DeploymentConditionBuilder builder; + int index; + + public N and() { + return (N) V1DeploymentStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusFluentImpl.java deleted file mode 100644 index f074635f89..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStatusFluentImpl.java +++ /dev/null @@ -1,276 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DeploymentStatusFluentImpl> extends BaseFluent implements V1DeploymentStatusFluent{ - public V1DeploymentStatusFluentImpl() { - } - public V1DeploymentStatusFluentImpl(V1DeploymentStatus instance) { - if (instance != null) { - this.withAvailableReplicas(instance.getAvailableReplicas()); - this.withCollisionCount(instance.getCollisionCount()); - this.withConditions(instance.getConditions()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReadyReplicas(instance.getReadyReplicas()); - this.withReplicas(instance.getReplicas()); - this.withUnavailableReplicas(instance.getUnavailableReplicas()); - this.withUpdatedReplicas(instance.getUpdatedReplicas()); - } - } - private Integer availableReplicas; - private Integer collisionCount; - private ArrayList conditions; - private Long observedGeneration; - private Integer readyReplicas; - private Integer replicas; - private Integer unavailableReplicas; - private Integer updatedReplicas; - public Integer getAvailableReplicas() { - return this.availableReplicas; - } - public A withAvailableReplicas(Integer availableReplicas) { - this.availableReplicas=availableReplicas; return (A) this; - } - public Boolean hasAvailableReplicas() { - return this.availableReplicas != null; - } - public Integer getCollisionCount() { - return this.collisionCount; - } - public A withCollisionCount(Integer collisionCount) { - this.collisionCount=collisionCount; return (A) this; - } - public Boolean hasCollisionCount() { - return this.collisionCount != null; - } - public A addToConditions(int index,V1DeploymentCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1DeploymentCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1DeploymentCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1DeploymentCondition item : items) {V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1DeploymentCondition item : items) {V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1DeploymentCondition... items) { - for (V1DeploymentCondition item : items) {V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1DeploymentCondition item : items) {V1DeploymentConditionBuilder builder = new V1DeploymentConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1DeploymentConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1DeploymentCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1DeploymentCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1DeploymentCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1DeploymentCondition buildMatchingCondition(Predicate predicate) { - for (V1DeploymentConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1DeploymentConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1DeploymentCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1DeploymentCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1DeploymentCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1DeploymentStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1DeploymentStatusFluentImpl.ConditionsNestedImpl(); - } - public V1DeploymentStatusFluentImpl.ConditionsNested addNewConditionLike(V1DeploymentCondition item) { - return new V1DeploymentStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1DeploymentStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1DeploymentCondition item) { - return new V1DeploymentStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1DeploymentStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1DeploymentStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1DeploymentStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1DeploymentStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1DeploymentConditionFluentImpl> implements V1DeploymentStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1DeploymentCondition item) { - this.index = index; - this.builder = new V1DeploymentConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1DeploymentConditionBuilder(this); - } - V1DeploymentConditionBuilder builder; - int index; - public N and() { - return (N) V1DeploymentStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyBuilder.java index d150c024fe..1da15f1299 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DeploymentStrategyBuilder extends V1DeploymentStrategyFluentImpl implements VisitableBuilder{ +public class V1DeploymentStrategyBuilder extends V1DeploymentStrategyFluent implements VisitableBuilder{ public V1DeploymentStrategyBuilder() { - this(false); - } - public V1DeploymentStrategyBuilder(Boolean validationEnabled) { - this(new V1DeploymentStrategy(), validationEnabled); + this(new V1DeploymentStrategy()); } + public V1DeploymentStrategyBuilder(V1DeploymentStrategyFluent fluent) { - this(fluent, false); - } - public V1DeploymentStrategyBuilder(V1DeploymentStrategyFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DeploymentStrategy(), validationEnabled); + this(fluent, new V1DeploymentStrategy()); } + public V1DeploymentStrategyBuilder(V1DeploymentStrategyFluent fluent,V1DeploymentStrategy instance) { - this(fluent, instance, false); - } - public V1DeploymentStrategyBuilder(V1DeploymentStrategyFluent fluent,V1DeploymentStrategy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withRollingUpdate(instance.getRollingUpdate()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DeploymentStrategyBuilder(V1DeploymentStrategy instance) { - this(instance,false); - } - public V1DeploymentStrategyBuilder(V1DeploymentStrategy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withRollingUpdate(instance.getRollingUpdate()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DeploymentStrategyFluent fluent; - Boolean validationEnabled; + public V1DeploymentStrategy build() { V1DeploymentStrategy buildable = new V1DeploymentStrategy(); - buildable.setRollingUpdate(fluent.getRollingUpdate()); + buildable.setRollingUpdate(fluent.buildRollingUpdate()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyFluent.java index e198731961..3efd0adf52 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DeploymentStrategyFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildRollingUpdate instead. - * @return The buildable object. - */ - @Deprecated - public V1RollingUpdateDeployment getRollingUpdate(); - public V1RollingUpdateDeployment buildRollingUpdate(); - public A withRollingUpdate(V1RollingUpdateDeployment rollingUpdate); - public Boolean hasRollingUpdate(); - public V1DeploymentStrategyFluent.RollingUpdateNested withNewRollingUpdate(); - public V1DeploymentStrategyFluent.RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateDeployment item); - public V1DeploymentStrategyFluent.RollingUpdateNested editRollingUpdate(); - public V1DeploymentStrategyFluent.RollingUpdateNested editOrNewRollingUpdate(); - public V1DeploymentStrategyFluent.RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateDeployment item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface RollingUpdateNested extends Nested,V1RollingUpdateDeploymentFluent>{ - public N and(); - public N endRollingUpdate(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DeploymentStrategyFluent> extends BaseFluent{ + public V1DeploymentStrategyFluent() { + } + + public V1DeploymentStrategyFluent(V1DeploymentStrategy instance) { + this.copyInstance(instance); + } + private V1RollingUpdateDeploymentBuilder rollingUpdate; + private String type; + + protected void copyInstance(V1DeploymentStrategy instance) { + instance = (instance != null ? instance : new V1DeploymentStrategy()); + if (instance != null) { + this.withRollingUpdate(instance.getRollingUpdate()); + this.withType(instance.getType()); + } + } + + public V1RollingUpdateDeployment buildRollingUpdate() { + return this.rollingUpdate != null ? this.rollingUpdate.build() : null; + } + + public A withRollingUpdate(V1RollingUpdateDeployment rollingUpdate) { + this._visitables.remove("rollingUpdate"); + if (rollingUpdate != null) { + this.rollingUpdate = new V1RollingUpdateDeploymentBuilder(rollingUpdate); + this._visitables.get("rollingUpdate").add(this.rollingUpdate); + } else { + this.rollingUpdate = null; + this._visitables.get("rollingUpdate").remove(this.rollingUpdate); + } + return (A) this; + } + + public boolean hasRollingUpdate() { + return this.rollingUpdate != null; + } + + public RollingUpdateNested withNewRollingUpdate() { + return new RollingUpdateNested(null); + } + + public RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateDeployment item) { + return new RollingUpdateNested(item); + } + + public RollingUpdateNested editRollingUpdate() { + return withNewRollingUpdateLike(java.util.Optional.ofNullable(buildRollingUpdate()).orElse(null)); + } + + public RollingUpdateNested editOrNewRollingUpdate() { + return withNewRollingUpdateLike(java.util.Optional.ofNullable(buildRollingUpdate()).orElse(new V1RollingUpdateDeploymentBuilder().build())); } + public RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateDeployment item) { + return withNewRollingUpdateLike(java.util.Optional.ofNullable(buildRollingUpdate()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DeploymentStrategyFluent that = (V1DeploymentStrategyFluent) o; + if (!java.util.Objects.equals(rollingUpdate, that.rollingUpdate)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(rollingUpdate, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (rollingUpdate != null) { sb.append("rollingUpdate:"); sb.append(rollingUpdate + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class RollingUpdateNested extends V1RollingUpdateDeploymentFluent> implements Nested{ + RollingUpdateNested(V1RollingUpdateDeployment item) { + this.builder = new V1RollingUpdateDeploymentBuilder(this, item); + } + V1RollingUpdateDeploymentBuilder builder; + + public N and() { + return (N) V1DeploymentStrategyFluent.this.withRollingUpdate(builder.build()); + } + + public N endRollingUpdate() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyFluentImpl.java deleted file mode 100644 index 207403b6d4..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DeploymentStrategyFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DeploymentStrategyFluentImpl> extends BaseFluent implements V1DeploymentStrategyFluent{ - public V1DeploymentStrategyFluentImpl() { - } - public V1DeploymentStrategyFluentImpl(V1DeploymentStrategy instance) { - if (instance != null) { - this.withRollingUpdate(instance.getRollingUpdate()); - this.withType(instance.getType()); - } - } - private V1RollingUpdateDeploymentBuilder rollingUpdate; - private String type; - - /** - * This method has been deprecated, please use method buildRollingUpdate instead. - * @return The buildable object. - */ - @Deprecated - public V1RollingUpdateDeployment getRollingUpdate() { - return this.rollingUpdate!=null ?this.rollingUpdate.build():null; - } - public V1RollingUpdateDeployment buildRollingUpdate() { - return this.rollingUpdate!=null ?this.rollingUpdate.build():null; - } - public A withRollingUpdate(V1RollingUpdateDeployment rollingUpdate) { - _visitables.get("rollingUpdate").remove(this.rollingUpdate); - if (rollingUpdate!=null){ this.rollingUpdate= new V1RollingUpdateDeploymentBuilder(rollingUpdate); _visitables.get("rollingUpdate").add(this.rollingUpdate);} else { this.rollingUpdate = null; _visitables.get("rollingUpdate").remove(this.rollingUpdate); } return (A) this; - } - public Boolean hasRollingUpdate() { - return this.rollingUpdate != null; - } - public V1DeploymentStrategyFluentImpl.RollingUpdateNested withNewRollingUpdate() { - return new V1DeploymentStrategyFluentImpl.RollingUpdateNestedImpl(); - } - public V1DeploymentStrategyFluentImpl.RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateDeployment item) { - return new V1DeploymentStrategyFluentImpl.RollingUpdateNestedImpl(item); - } - public V1DeploymentStrategyFluentImpl.RollingUpdateNested editRollingUpdate() { - return withNewRollingUpdateLike(getRollingUpdate()); - } - public V1DeploymentStrategyFluentImpl.RollingUpdateNested editOrNewRollingUpdate() { - return withNewRollingUpdateLike(getRollingUpdate() != null ? getRollingUpdate(): new V1RollingUpdateDeploymentBuilder().build()); - } - public V1DeploymentStrategyFluentImpl.RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateDeployment item) { - return withNewRollingUpdateLike(getRollingUpdate() != null ? getRollingUpdate(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DeploymentStrategyFluentImpl that = (V1DeploymentStrategyFluentImpl) o; - if (!java.util.Objects.equals(rollingUpdate, that.rollingUpdate)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(rollingUpdate, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (rollingUpdate != null) { sb.append("rollingUpdate:"); sb.append(rollingUpdate + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class RollingUpdateNestedImpl extends V1RollingUpdateDeploymentFluentImpl> implements V1DeploymentStrategyFluentImpl.RollingUpdateNested,Nested{ - RollingUpdateNestedImpl(V1RollingUpdateDeployment item) { - this.builder = new V1RollingUpdateDeploymentBuilder(this, item); - } - RollingUpdateNestedImpl() { - this.builder = new V1RollingUpdateDeploymentBuilder(this); - } - V1RollingUpdateDeploymentBuilder builder; - public N and() { - return (N) V1DeploymentStrategyFluentImpl.this.withRollingUpdate(builder.build()); - } - public N endRollingUpdate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionBuilder.java index 3d8655c448..7dc4c576f7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DownwardAPIProjectionBuilder extends V1DownwardAPIProjectionFluentImpl implements VisitableBuilder{ +public class V1DownwardAPIProjectionBuilder extends V1DownwardAPIProjectionFluent implements VisitableBuilder{ public V1DownwardAPIProjectionBuilder() { - this(false); - } - public V1DownwardAPIProjectionBuilder(Boolean validationEnabled) { - this(new V1DownwardAPIProjection(), validationEnabled); + this(new V1DownwardAPIProjection()); } + public V1DownwardAPIProjectionBuilder(V1DownwardAPIProjectionFluent fluent) { - this(fluent, false); - } - public V1DownwardAPIProjectionBuilder(V1DownwardAPIProjectionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DownwardAPIProjection(), validationEnabled); + this(fluent, new V1DownwardAPIProjection()); } + public V1DownwardAPIProjectionBuilder(V1DownwardAPIProjectionFluent fluent,V1DownwardAPIProjection instance) { - this(fluent, instance, false); - } - public V1DownwardAPIProjectionBuilder(V1DownwardAPIProjectionFluent fluent,V1DownwardAPIProjection instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withItems(instance.getItems()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DownwardAPIProjectionBuilder(V1DownwardAPIProjection instance) { - this(instance,false); - } - public V1DownwardAPIProjectionBuilder(V1DownwardAPIProjection instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withItems(instance.getItems()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DownwardAPIProjectionFluent fluent; - Boolean validationEnabled; + public V1DownwardAPIProjection build() { V1DownwardAPIProjection buildable = new V1DownwardAPIProjection(); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionFluent.java index ca158ff2d4..154d417d45 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DownwardAPIProjectionFluent> extends Fluent{ - public A addToItems(int index,V1DownwardAPIVolumeFile item); - public A setToItems(int index,V1DownwardAPIVolumeFile item); - public A addToItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1DownwardAPIVolumeFile buildItem(int index); - public V1DownwardAPIVolumeFile buildFirstItem(); - public V1DownwardAPIVolumeFile buildLastItem(); - public V1DownwardAPIVolumeFile buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items); - public Boolean hasItems(); - public V1DownwardAPIProjectionFluent.ItemsNested addNewItem(); - public V1DownwardAPIProjectionFluent.ItemsNested addNewItemLike(V1DownwardAPIVolumeFile item); - public V1DownwardAPIProjectionFluent.ItemsNested setNewItemLike(int index,V1DownwardAPIVolumeFile item); - public V1DownwardAPIProjectionFluent.ItemsNested editItem(int index); - public V1DownwardAPIProjectionFluent.ItemsNested editFirstItem(); - public V1DownwardAPIProjectionFluent.ItemsNested editLastItem(); - public V1DownwardAPIProjectionFluent.ItemsNested editMatchingItem(Predicate predicate); - public interface ItemsNested extends Nested,V1DownwardAPIVolumeFileFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DownwardAPIProjectionFluent> extends BaseFluent{ + public V1DownwardAPIProjectionFluent() { + } + + public V1DownwardAPIProjectionFluent(V1DownwardAPIProjection instance) { + this.copyInstance(instance); + } + private ArrayList items; + + protected void copyInstance(V1DownwardAPIProjection instance) { + instance = (instance != null ? instance : new V1DownwardAPIProjection()); + if (instance != null) { + this.withItems(instance.getItems()); + } + } + + public A addToItems(int index,V1DownwardAPIVolumeFile item) { + if (this.items == null) {this.items = new ArrayList();} + V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1DownwardAPIVolumeFile item) { + if (this.items == null) {this.items = new ArrayList();} + V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { + if (this.items == null) return (A)this; + for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1DownwardAPIVolumeFileBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1DownwardAPIVolumeFile buildItem(int index) { + return this.items.get(index).build(); + } + + public V1DownwardAPIVolumeFile buildFirstItem() { + return this.items.get(0).build(); + } + + public V1DownwardAPIVolumeFile buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1DownwardAPIVolumeFile buildMatchingItem(Predicate predicate) { + for (V1DownwardAPIVolumeFileBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1DownwardAPIVolumeFileBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1DownwardAPIVolumeFile item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1DownwardAPIVolumeFile item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1DownwardAPIVolumeFile item) { + return new ItemsNested(-1, item); + } + + public ItemsNested setNewItemLike(int index,V1DownwardAPIVolumeFile item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1DownwardAPIVolumeFileFluent> implements Nested{ + ItemsNested(int index,V1DownwardAPIVolumeFile item) { + this.index = index; + this.builder = new V1DownwardAPIVolumeFileBuilder(this, item); + } + V1DownwardAPIVolumeFileBuilder builder; + int index; + + public N and() { + return (N) V1DownwardAPIProjectionFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionFluentImpl.java deleted file mode 100644 index ff05743d2f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIProjectionFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DownwardAPIProjectionFluentImpl> extends BaseFluent implements V1DownwardAPIProjectionFluent{ - public V1DownwardAPIProjectionFluentImpl() { - } - public V1DownwardAPIProjectionFluentImpl(V1DownwardAPIProjection instance) { - if (instance != null) { - this.withItems(instance.getItems()); - } - } - private ArrayList items; - public A addToItems(int index,V1DownwardAPIVolumeFile item) { - if (this.items == null) {this.items = new ArrayList();} - V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1DownwardAPIVolumeFile item) { - if (this.items == null) {this.items = new ArrayList();} - V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { - for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1DownwardAPIVolumeFileBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1DownwardAPIVolumeFile buildItem(int index) { - return this.items.get(index).build(); - } - public V1DownwardAPIVolumeFile buildFirstItem() { - return this.items.get(0).build(); - } - public V1DownwardAPIVolumeFile buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1DownwardAPIVolumeFile buildMatchingItem(Predicate predicate) { - for (V1DownwardAPIVolumeFileBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1DownwardAPIVolumeFileBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1DownwardAPIVolumeFile item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1DownwardAPIVolumeFile item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1DownwardAPIProjectionFluentImpl.ItemsNested addNewItem() { - return new V1DownwardAPIProjectionFluentImpl.ItemsNestedImpl(); - } - public V1DownwardAPIProjectionFluentImpl.ItemsNested addNewItemLike(V1DownwardAPIVolumeFile item) { - return new V1DownwardAPIProjectionFluentImpl.ItemsNestedImpl(-1, item); - } - public V1DownwardAPIProjectionFluentImpl.ItemsNested setNewItemLike(int index,V1DownwardAPIVolumeFile item) { - return new V1DownwardAPIProjectionFluentImpl.ItemsNestedImpl(index, item); - } - public V1DownwardAPIProjectionFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1DownwardAPIProjectionFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1DownwardAPIProjectionFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1DownwardAPIProjectionFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1DownwardAPIVolumeFileFluentImpl> implements V1DownwardAPIProjectionFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1DownwardAPIVolumeFile item) { - this.index = index; - this.builder = new V1DownwardAPIVolumeFileBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1DownwardAPIVolumeFileBuilder(this); - } - V1DownwardAPIVolumeFileBuilder builder; - int index; - public N and() { - return (N) V1DownwardAPIProjectionFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileBuilder.java index 0f8485b21a..6d89ac752d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DownwardAPIVolumeFileBuilder extends V1DownwardAPIVolumeFileFluentImpl implements VisitableBuilder{ +public class V1DownwardAPIVolumeFileBuilder extends V1DownwardAPIVolumeFileFluent implements VisitableBuilder{ public V1DownwardAPIVolumeFileBuilder() { - this(false); - } - public V1DownwardAPIVolumeFileBuilder(Boolean validationEnabled) { - this(new V1DownwardAPIVolumeFile(), validationEnabled); + this(new V1DownwardAPIVolumeFile()); } + public V1DownwardAPIVolumeFileBuilder(V1DownwardAPIVolumeFileFluent fluent) { - this(fluent, false); - } - public V1DownwardAPIVolumeFileBuilder(V1DownwardAPIVolumeFileFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DownwardAPIVolumeFile(), validationEnabled); + this(fluent, new V1DownwardAPIVolumeFile()); } + public V1DownwardAPIVolumeFileBuilder(V1DownwardAPIVolumeFileFluent fluent,V1DownwardAPIVolumeFile instance) { - this(fluent, instance, false); - } - public V1DownwardAPIVolumeFileBuilder(V1DownwardAPIVolumeFileFluent fluent,V1DownwardAPIVolumeFile instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFieldRef(instance.getFieldRef()); - fluent.withMode(instance.getMode()); - fluent.withPath(instance.getPath()); - fluent.withResourceFieldRef(instance.getResourceFieldRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DownwardAPIVolumeFileBuilder(V1DownwardAPIVolumeFile instance) { - this(instance,false); - } - public V1DownwardAPIVolumeFileBuilder(V1DownwardAPIVolumeFile instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFieldRef(instance.getFieldRef()); - this.withMode(instance.getMode()); - this.withPath(instance.getPath()); - this.withResourceFieldRef(instance.getResourceFieldRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DownwardAPIVolumeFileFluent fluent; - Boolean validationEnabled; + public V1DownwardAPIVolumeFile build() { V1DownwardAPIVolumeFile buildable = new V1DownwardAPIVolumeFile(); - buildable.setFieldRef(fluent.getFieldRef()); + buildable.setFieldRef(fluent.buildFieldRef()); buildable.setMode(fluent.getMode()); buildable.setPath(fluent.getPath()); - buildable.setResourceFieldRef(fluent.getResourceFieldRef()); + buildable.setResourceFieldRef(fluent.buildResourceFieldRef()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileFluent.java index 7d89bfc06d..3a115a0dc4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileFluent.java @@ -1,62 +1,201 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; import java.lang.Integer; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1DownwardAPIVolumeFileFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildFieldRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectFieldSelector getFieldRef(); - public V1ObjectFieldSelector buildFieldRef(); - public A withFieldRef(V1ObjectFieldSelector fieldRef); - public Boolean hasFieldRef(); - public V1DownwardAPIVolumeFileFluent.FieldRefNested withNewFieldRef(); - public V1DownwardAPIVolumeFileFluent.FieldRefNested withNewFieldRefLike(V1ObjectFieldSelector item); - public V1DownwardAPIVolumeFileFluent.FieldRefNested editFieldRef(); - public V1DownwardAPIVolumeFileFluent.FieldRefNested editOrNewFieldRef(); - public V1DownwardAPIVolumeFileFluent.FieldRefNested editOrNewFieldRefLike(V1ObjectFieldSelector item); - public Integer getMode(); - public A withMode(Integer mode); - public Boolean hasMode(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - - /** - * This method has been deprecated, please use method buildResourceFieldRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceFieldSelector getResourceFieldRef(); - public V1ResourceFieldSelector buildResourceFieldRef(); - public A withResourceFieldRef(V1ResourceFieldSelector resourceFieldRef); - public Boolean hasResourceFieldRef(); - public V1DownwardAPIVolumeFileFluent.ResourceFieldRefNested withNewResourceFieldRef(); - public V1DownwardAPIVolumeFileFluent.ResourceFieldRefNested withNewResourceFieldRefLike(V1ResourceFieldSelector item); - public V1DownwardAPIVolumeFileFluent.ResourceFieldRefNested editResourceFieldRef(); - public V1DownwardAPIVolumeFileFluent.ResourceFieldRefNested editOrNewResourceFieldRef(); - public V1DownwardAPIVolumeFileFluent.ResourceFieldRefNested editOrNewResourceFieldRefLike(V1ResourceFieldSelector item); - public interface FieldRefNested extends Nested,V1ObjectFieldSelectorFluent>{ - public N and(); - public N endFieldRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DownwardAPIVolumeFileFluent> extends BaseFluent{ + public V1DownwardAPIVolumeFileFluent() { + } + + public V1DownwardAPIVolumeFileFluent(V1DownwardAPIVolumeFile instance) { + this.copyInstance(instance); + } + private V1ObjectFieldSelectorBuilder fieldRef; + private Integer mode; + private String path; + private V1ResourceFieldSelectorBuilder resourceFieldRef; + + protected void copyInstance(V1DownwardAPIVolumeFile instance) { + instance = (instance != null ? instance : new V1DownwardAPIVolumeFile()); + if (instance != null) { + this.withFieldRef(instance.getFieldRef()); + this.withMode(instance.getMode()); + this.withPath(instance.getPath()); + this.withResourceFieldRef(instance.getResourceFieldRef()); + } + } + + public V1ObjectFieldSelector buildFieldRef() { + return this.fieldRef != null ? this.fieldRef.build() : null; + } + + public A withFieldRef(V1ObjectFieldSelector fieldRef) { + this._visitables.remove("fieldRef"); + if (fieldRef != null) { + this.fieldRef = new V1ObjectFieldSelectorBuilder(fieldRef); + this._visitables.get("fieldRef").add(this.fieldRef); + } else { + this.fieldRef = null; + this._visitables.get("fieldRef").remove(this.fieldRef); + } + return (A) this; + } + + public boolean hasFieldRef() { + return this.fieldRef != null; + } + + public FieldRefNested withNewFieldRef() { + return new FieldRefNested(null); + } + + public FieldRefNested withNewFieldRefLike(V1ObjectFieldSelector item) { + return new FieldRefNested(item); + } + + public FieldRefNested editFieldRef() { + return withNewFieldRefLike(java.util.Optional.ofNullable(buildFieldRef()).orElse(null)); + } + + public FieldRefNested editOrNewFieldRef() { + return withNewFieldRefLike(java.util.Optional.ofNullable(buildFieldRef()).orElse(new V1ObjectFieldSelectorBuilder().build())); + } + + public FieldRefNested editOrNewFieldRefLike(V1ObjectFieldSelector item) { + return withNewFieldRefLike(java.util.Optional.ofNullable(buildFieldRef()).orElse(item)); + } + + public Integer getMode() { + return this.mode; + } + + public A withMode(Integer mode) { + this.mode = mode; + return (A) this; + } + + public boolean hasMode() { + return this.mode != null; + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; } - public interface ResourceFieldRefNested extends Nested,V1ResourceFieldSelectorFluent>{ - public N and(); - public N endResourceFieldRef(); + + public boolean hasPath() { + return this.path != null; + } + + public V1ResourceFieldSelector buildResourceFieldRef() { + return this.resourceFieldRef != null ? this.resourceFieldRef.build() : null; + } + + public A withResourceFieldRef(V1ResourceFieldSelector resourceFieldRef) { + this._visitables.remove("resourceFieldRef"); + if (resourceFieldRef != null) { + this.resourceFieldRef = new V1ResourceFieldSelectorBuilder(resourceFieldRef); + this._visitables.get("resourceFieldRef").add(this.resourceFieldRef); + } else { + this.resourceFieldRef = null; + this._visitables.get("resourceFieldRef").remove(this.resourceFieldRef); + } + return (A) this; + } + + public boolean hasResourceFieldRef() { + return this.resourceFieldRef != null; + } + + public ResourceFieldRefNested withNewResourceFieldRef() { + return new ResourceFieldRefNested(null); + } + + public ResourceFieldRefNested withNewResourceFieldRefLike(V1ResourceFieldSelector item) { + return new ResourceFieldRefNested(item); + } + + public ResourceFieldRefNested editResourceFieldRef() { + return withNewResourceFieldRefLike(java.util.Optional.ofNullable(buildResourceFieldRef()).orElse(null)); + } + + public ResourceFieldRefNested editOrNewResourceFieldRef() { + return withNewResourceFieldRefLike(java.util.Optional.ofNullable(buildResourceFieldRef()).orElse(new V1ResourceFieldSelectorBuilder().build())); + } + + public ResourceFieldRefNested editOrNewResourceFieldRefLike(V1ResourceFieldSelector item) { + return withNewResourceFieldRefLike(java.util.Optional.ofNullable(buildResourceFieldRef()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1DownwardAPIVolumeFileFluent that = (V1DownwardAPIVolumeFileFluent) o; + if (!java.util.Objects.equals(fieldRef, that.fieldRef)) return false; + if (!java.util.Objects.equals(mode, that.mode)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(resourceFieldRef, that.resourceFieldRef)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fieldRef, mode, path, resourceFieldRef, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fieldRef != null) { sb.append("fieldRef:"); sb.append(fieldRef + ","); } + if (mode != null) { sb.append("mode:"); sb.append(mode + ","); } + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (resourceFieldRef != null) { sb.append("resourceFieldRef:"); sb.append(resourceFieldRef); } + sb.append("}"); + return sb.toString(); + } + public class FieldRefNested extends V1ObjectFieldSelectorFluent> implements Nested{ + FieldRefNested(V1ObjectFieldSelector item) { + this.builder = new V1ObjectFieldSelectorBuilder(this, item); + } + V1ObjectFieldSelectorBuilder builder; + + public N and() { + return (N) V1DownwardAPIVolumeFileFluent.this.withFieldRef(builder.build()); + } + public N endFieldRef() { + return and(); + } + + } + public class ResourceFieldRefNested extends V1ResourceFieldSelectorFluent> implements Nested{ + ResourceFieldRefNested(V1ResourceFieldSelector item) { + this.builder = new V1ResourceFieldSelectorBuilder(this, item); + } + V1ResourceFieldSelectorBuilder builder; + + public N and() { + return (N) V1DownwardAPIVolumeFileFluent.this.withResourceFieldRef(builder.build()); + } + + public N endResourceFieldRef() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileFluentImpl.java deleted file mode 100644 index a065f8c77f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeFileFluentImpl.java +++ /dev/null @@ -1,178 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DownwardAPIVolumeFileFluentImpl> extends BaseFluent implements V1DownwardAPIVolumeFileFluent{ - public V1DownwardAPIVolumeFileFluentImpl() { - } - public V1DownwardAPIVolumeFileFluentImpl(V1DownwardAPIVolumeFile instance) { - if (instance != null) { - this.withFieldRef(instance.getFieldRef()); - this.withMode(instance.getMode()); - this.withPath(instance.getPath()); - this.withResourceFieldRef(instance.getResourceFieldRef()); - } - } - private V1ObjectFieldSelectorBuilder fieldRef; - private Integer mode; - private String path; - private V1ResourceFieldSelectorBuilder resourceFieldRef; - - /** - * This method has been deprecated, please use method buildFieldRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectFieldSelector getFieldRef() { - return this.fieldRef!=null ?this.fieldRef.build():null; - } - public V1ObjectFieldSelector buildFieldRef() { - return this.fieldRef!=null ?this.fieldRef.build():null; - } - public A withFieldRef(V1ObjectFieldSelector fieldRef) { - _visitables.get("fieldRef").remove(this.fieldRef); - if (fieldRef!=null){ this.fieldRef= new V1ObjectFieldSelectorBuilder(fieldRef); _visitables.get("fieldRef").add(this.fieldRef);} else { this.fieldRef = null; _visitables.get("fieldRef").remove(this.fieldRef); } return (A) this; - } - public Boolean hasFieldRef() { - return this.fieldRef != null; - } - public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested withNewFieldRef() { - return new V1DownwardAPIVolumeFileFluentImpl.FieldRefNestedImpl(); - } - public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested withNewFieldRefLike(V1ObjectFieldSelector item) { - return new V1DownwardAPIVolumeFileFluentImpl.FieldRefNestedImpl(item); - } - public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested editFieldRef() { - return withNewFieldRefLike(getFieldRef()); - } - public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested editOrNewFieldRef() { - return withNewFieldRefLike(getFieldRef() != null ? getFieldRef(): new V1ObjectFieldSelectorBuilder().build()); - } - public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested editOrNewFieldRefLike(V1ObjectFieldSelector item) { - return withNewFieldRefLike(getFieldRef() != null ? getFieldRef(): item); - } - public Integer getMode() { - return this.mode; - } - public A withMode(Integer mode) { - this.mode=mode; return (A) this; - } - public Boolean hasMode() { - return this.mode != null; - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - - /** - * This method has been deprecated, please use method buildResourceFieldRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceFieldSelector getResourceFieldRef() { - return this.resourceFieldRef!=null ?this.resourceFieldRef.build():null; - } - public V1ResourceFieldSelector buildResourceFieldRef() { - return this.resourceFieldRef!=null ?this.resourceFieldRef.build():null; - } - public A withResourceFieldRef(V1ResourceFieldSelector resourceFieldRef) { - _visitables.get("resourceFieldRef").remove(this.resourceFieldRef); - if (resourceFieldRef!=null){ this.resourceFieldRef= new V1ResourceFieldSelectorBuilder(resourceFieldRef); _visitables.get("resourceFieldRef").add(this.resourceFieldRef);} else { this.resourceFieldRef = null; _visitables.get("resourceFieldRef").remove(this.resourceFieldRef); } return (A) this; - } - public Boolean hasResourceFieldRef() { - return this.resourceFieldRef != null; - } - public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested withNewResourceFieldRef() { - return new V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNestedImpl(); - } - public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested withNewResourceFieldRefLike(V1ResourceFieldSelector item) { - return new V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNestedImpl(item); - } - public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested editResourceFieldRef() { - return withNewResourceFieldRefLike(getResourceFieldRef()); - } - public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested editOrNewResourceFieldRef() { - return withNewResourceFieldRefLike(getResourceFieldRef() != null ? getResourceFieldRef(): new V1ResourceFieldSelectorBuilder().build()); - } - public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested editOrNewResourceFieldRefLike(V1ResourceFieldSelector item) { - return withNewResourceFieldRefLike(getResourceFieldRef() != null ? getResourceFieldRef(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1DownwardAPIVolumeFileFluentImpl that = (V1DownwardAPIVolumeFileFluentImpl) o; - if (!java.util.Objects.equals(fieldRef, that.fieldRef)) return false; - - if (!java.util.Objects.equals(mode, that.mode)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(resourceFieldRef, that.resourceFieldRef)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fieldRef, mode, path, resourceFieldRef, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fieldRef != null) { sb.append("fieldRef:"); sb.append(fieldRef + ","); } - if (mode != null) { sb.append("mode:"); sb.append(mode + ","); } - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (resourceFieldRef != null) { sb.append("resourceFieldRef:"); sb.append(resourceFieldRef); } - sb.append("}"); - return sb.toString(); - } - class FieldRefNestedImpl extends V1ObjectFieldSelectorFluentImpl> implements V1DownwardAPIVolumeFileFluentImpl.FieldRefNested,Nested{ - FieldRefNestedImpl(V1ObjectFieldSelector item) { - this.builder = new V1ObjectFieldSelectorBuilder(this, item); - } - FieldRefNestedImpl() { - this.builder = new V1ObjectFieldSelectorBuilder(this); - } - V1ObjectFieldSelectorBuilder builder; - public N and() { - return (N) V1DownwardAPIVolumeFileFluentImpl.this.withFieldRef(builder.build()); - } - public N endFieldRef() { - return and(); - } - - } - class ResourceFieldRefNestedImpl extends V1ResourceFieldSelectorFluentImpl> implements V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested,Nested{ - ResourceFieldRefNestedImpl(V1ResourceFieldSelector item) { - this.builder = new V1ResourceFieldSelectorBuilder(this, item); - } - ResourceFieldRefNestedImpl() { - this.builder = new V1ResourceFieldSelectorBuilder(this); - } - V1ResourceFieldSelectorBuilder builder; - public N and() { - return (N) V1DownwardAPIVolumeFileFluentImpl.this.withResourceFieldRef(builder.build()); - } - public N endResourceFieldRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceBuilder.java index 5d3c0c2a94..38161d4c7c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1DownwardAPIVolumeSourceBuilder extends V1DownwardAPIVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1DownwardAPIVolumeSourceBuilder extends V1DownwardAPIVolumeSourceFluent implements VisitableBuilder{ public V1DownwardAPIVolumeSourceBuilder() { - this(false); - } - public V1DownwardAPIVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1DownwardAPIVolumeSource(), validationEnabled); + this(new V1DownwardAPIVolumeSource()); } + public V1DownwardAPIVolumeSourceBuilder(V1DownwardAPIVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1DownwardAPIVolumeSourceBuilder(V1DownwardAPIVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1DownwardAPIVolumeSource(), validationEnabled); + this(fluent, new V1DownwardAPIVolumeSource()); } + public V1DownwardAPIVolumeSourceBuilder(V1DownwardAPIVolumeSourceFluent fluent,V1DownwardAPIVolumeSource instance) { - this(fluent, instance, false); - } - public V1DownwardAPIVolumeSourceBuilder(V1DownwardAPIVolumeSourceFluent fluent,V1DownwardAPIVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDefaultMode(instance.getDefaultMode()); - fluent.withItems(instance.getItems()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1DownwardAPIVolumeSourceBuilder(V1DownwardAPIVolumeSource instance) { - this(instance,false); - } - public V1DownwardAPIVolumeSourceBuilder(V1DownwardAPIVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDefaultMode(instance.getDefaultMode()); - this.withItems(instance.getItems()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1DownwardAPIVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1DownwardAPIVolumeSource build() { V1DownwardAPIVolumeSource buildable = new V1DownwardAPIVolumeSource(); buildable.setDefaultMode(fluent.getDefaultMode()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceFluent.java index 4c08491250..cf2afd1f5f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceFluent.java @@ -1,59 +1,243 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1DownwardAPIVolumeSourceFluent> extends Fluent{ - public Integer getDefaultMode(); - public A withDefaultMode(Integer defaultMode); - public Boolean hasDefaultMode(); - public A addToItems(int index,V1DownwardAPIVolumeFile item); - public A setToItems(int index,V1DownwardAPIVolumeFile item); - public A addToItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1DownwardAPIVolumeFile buildItem(int index); - public V1DownwardAPIVolumeFile buildFirstItem(); - public V1DownwardAPIVolumeFile buildLastItem(); - public V1DownwardAPIVolumeFile buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items); - public Boolean hasItems(); - public V1DownwardAPIVolumeSourceFluent.ItemsNested addNewItem(); - public V1DownwardAPIVolumeSourceFluent.ItemsNested addNewItemLike(V1DownwardAPIVolumeFile item); - public V1DownwardAPIVolumeSourceFluent.ItemsNested setNewItemLike(int index,V1DownwardAPIVolumeFile item); - public V1DownwardAPIVolumeSourceFluent.ItemsNested editItem(int index); - public V1DownwardAPIVolumeSourceFluent.ItemsNested editFirstItem(); - public V1DownwardAPIVolumeSourceFluent.ItemsNested editLastItem(); - public V1DownwardAPIVolumeSourceFluent.ItemsNested editMatchingItem(Predicate predicate); - public interface ItemsNested extends Nested,V1DownwardAPIVolumeFileFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1DownwardAPIVolumeSourceFluent> extends BaseFluent{ + public V1DownwardAPIVolumeSourceFluent() { + } + + public V1DownwardAPIVolumeSourceFluent(V1DownwardAPIVolumeSource instance) { + this.copyInstance(instance); + } + private Integer defaultMode; + private ArrayList items; + + protected void copyInstance(V1DownwardAPIVolumeSource instance) { + instance = (instance != null ? instance : new V1DownwardAPIVolumeSource()); + if (instance != null) { + this.withDefaultMode(instance.getDefaultMode()); + this.withItems(instance.getItems()); + } + } + + public Integer getDefaultMode() { + return this.defaultMode; + } + + public A withDefaultMode(Integer defaultMode) { + this.defaultMode = defaultMode; + return (A) this; + } + + public boolean hasDefaultMode() { + return this.defaultMode != null; + } + + public A addToItems(int index,V1DownwardAPIVolumeFile item) { + if (this.items == null) {this.items = new ArrayList();} + V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1DownwardAPIVolumeFile item) { + if (this.items == null) {this.items = new ArrayList();} + V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { + if (this.items == null) return (A)this; + for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1DownwardAPIVolumeFileBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1DownwardAPIVolumeFile buildItem(int index) { + return this.items.get(index).build(); + } + + public V1DownwardAPIVolumeFile buildFirstItem() { + return this.items.get(0).build(); + } + + public V1DownwardAPIVolumeFile buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1DownwardAPIVolumeFile buildMatchingItem(Predicate predicate) { + for (V1DownwardAPIVolumeFileBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1DownwardAPIVolumeFileBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1DownwardAPIVolumeFile item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1DownwardAPIVolumeFile item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1DownwardAPIVolumeFile item) { + return new ItemsNested(-1, item); + } + + public ItemsNested setNewItemLike(int index,V1DownwardAPIVolumeFile item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); } + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1DownwardAPIVolumeFileFluent> implements Nested{ + ItemsNested(int index,V1DownwardAPIVolumeFile item) { + this.index = index; + this.builder = new V1DownwardAPIVolumeFileBuilder(this, item); + } + V1DownwardAPIVolumeFileBuilder builder; + int index; + + public N and() { + return (N) V1DownwardAPIVolumeSourceFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceFluentImpl.java deleted file mode 100644 index 76188f496a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1DownwardAPIVolumeSourceFluentImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1DownwardAPIVolumeSourceFluentImpl> extends BaseFluent implements V1DownwardAPIVolumeSourceFluent{ - public V1DownwardAPIVolumeSourceFluentImpl() { - } - public V1DownwardAPIVolumeSourceFluentImpl(V1DownwardAPIVolumeSource instance) { - if (instance != null) { - this.withDefaultMode(instance.getDefaultMode()); - this.withItems(instance.getItems()); - } - } - private Integer defaultMode; - private ArrayList items; - public Integer getDefaultMode() { - return this.defaultMode; - } - public A withDefaultMode(Integer defaultMode) { - this.defaultMode=defaultMode; return (A) this; - } - public Boolean hasDefaultMode() { - return this.defaultMode != null; - } - public A addToItems(int index,V1DownwardAPIVolumeFile item) { - if (this.items == null) {this.items = new ArrayList();} - V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1DownwardAPIVolumeFile item) { - if (this.items == null) {this.items = new ArrayList();} - V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { - for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1DownwardAPIVolumeFile item : items) {V1DownwardAPIVolumeFileBuilder builder = new V1DownwardAPIVolumeFileBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1DownwardAPIVolumeFileBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1DownwardAPIVolumeFile buildItem(int index) { - return this.items.get(index).build(); - } - public V1DownwardAPIVolumeFile buildFirstItem() { - return this.items.get(0).build(); - } - public V1DownwardAPIVolumeFile buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1DownwardAPIVolumeFile buildMatchingItem(Predicate predicate) { - for (V1DownwardAPIVolumeFileBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1DownwardAPIVolumeFileBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1DownwardAPIVolumeFile item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFile... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1DownwardAPIVolumeFile item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1DownwardAPIVolumeSourceFluentImpl.ItemsNested addNewItem() { - return new V1DownwardAPIVolumeSourceFluentImpl.ItemsNestedImpl(); - } - public V1DownwardAPIVolumeSourceFluentImpl.ItemsNested addNewItemLike(V1DownwardAPIVolumeFile item) { - return new V1DownwardAPIVolumeSourceFluentImpl.ItemsNestedImpl(-1, item); - } - public V1DownwardAPIVolumeSourceFluentImpl.ItemsNested setNewItemLike(int index,V1DownwardAPIVolumeFile item) { - return new V1DownwardAPIVolumeSourceFluentImpl.ItemsNestedImpl(index, item); - } - public V1DownwardAPIVolumeSourceFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1DownwardAPIVolumeSourceFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1DownwardAPIVolumeSourceFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1DownwardAPIVolumeSourceFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1DownwardAPIVolumeFileFluentImpl> implements V1DownwardAPIVolumeSourceFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1DownwardAPIVolumeFile item) { - this.index = index; - this.builder = new V1DownwardAPIVolumeFileBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1DownwardAPIVolumeFileBuilder(this); - } - V1DownwardAPIVolumeFileBuilder builder; - int index; - public N and() { - return (N) V1DownwardAPIVolumeSourceFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceBuilder.java index 776ff2e92f..9804834195 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EmptyDirVolumeSourceBuilder extends V1EmptyDirVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1EmptyDirVolumeSourceBuilder extends V1EmptyDirVolumeSourceFluent implements VisitableBuilder{ public V1EmptyDirVolumeSourceBuilder() { - this(false); - } - public V1EmptyDirVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1EmptyDirVolumeSource(), validationEnabled); + this(new V1EmptyDirVolumeSource()); } + public V1EmptyDirVolumeSourceBuilder(V1EmptyDirVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1EmptyDirVolumeSourceBuilder(V1EmptyDirVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EmptyDirVolumeSource(), validationEnabled); + this(fluent, new V1EmptyDirVolumeSource()); } + public V1EmptyDirVolumeSourceBuilder(V1EmptyDirVolumeSourceFluent fluent,V1EmptyDirVolumeSource instance) { - this(fluent, instance, false); - } - public V1EmptyDirVolumeSourceBuilder(V1EmptyDirVolumeSourceFluent fluent,V1EmptyDirVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMedium(instance.getMedium()); - fluent.withSizeLimit(instance.getSizeLimit()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EmptyDirVolumeSourceBuilder(V1EmptyDirVolumeSource instance) { - this(instance,false); - } - public V1EmptyDirVolumeSourceBuilder(V1EmptyDirVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMedium(instance.getMedium()); - this.withSizeLimit(instance.getSizeLimit()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EmptyDirVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1EmptyDirVolumeSource build() { V1EmptyDirVolumeSource buildable = new V1EmptyDirVolumeSource(); buildable.setMedium(fluent.getMedium()); @@ -46,4 +28,5 @@ public V1EmptyDirVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceFluent.java index 215c912881..8324dda51d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceFluent.java @@ -1,21 +1,85 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.custom.Quantity; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1EmptyDirVolumeSourceFluent> extends Fluent{ - public String getMedium(); - public A withMedium(String medium); - public Boolean hasMedium(); - public Quantity getSizeLimit(); - public A withSizeLimit(Quantity sizeLimit); - public Boolean hasSizeLimit(); - public A withNewSizeLimit(String value); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EmptyDirVolumeSourceFluent> extends BaseFluent{ + public V1EmptyDirVolumeSourceFluent() { + } + public V1EmptyDirVolumeSourceFluent(V1EmptyDirVolumeSource instance) { + this.copyInstance(instance); + } + private String medium; + private Quantity sizeLimit; + + protected void copyInstance(V1EmptyDirVolumeSource instance) { + instance = (instance != null ? instance : new V1EmptyDirVolumeSource()); + if (instance != null) { + this.withMedium(instance.getMedium()); + this.withSizeLimit(instance.getSizeLimit()); + } + } + + public String getMedium() { + return this.medium; + } + + public A withMedium(String medium) { + this.medium = medium; + return (A) this; + } + + public boolean hasMedium() { + return this.medium != null; + } + + public Quantity getSizeLimit() { + return this.sizeLimit; + } + + public A withSizeLimit(Quantity sizeLimit) { + this.sizeLimit = sizeLimit; + return (A) this; + } + + public boolean hasSizeLimit() { + return this.sizeLimit != null; + } + + public A withNewSizeLimit(String value) { + return (A)withSizeLimit(new Quantity(value)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EmptyDirVolumeSourceFluent that = (V1EmptyDirVolumeSourceFluent) o; + if (!java.util.Objects.equals(medium, that.medium)) return false; + if (!java.util.Objects.equals(sizeLimit, that.sizeLimit)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(medium, sizeLimit, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (medium != null) { sb.append("medium:"); sb.append(medium + ","); } + if (sizeLimit != null) { sb.append("sizeLimit:"); sb.append(sizeLimit); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceFluentImpl.java deleted file mode 100644 index b4f6598746..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EmptyDirVolumeSourceFluentImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import io.kubernetes.client.custom.Quantity; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EmptyDirVolumeSourceFluentImpl> extends BaseFluent implements V1EmptyDirVolumeSourceFluent{ - public V1EmptyDirVolumeSourceFluentImpl() { - } - public V1EmptyDirVolumeSourceFluentImpl(V1EmptyDirVolumeSource instance) { - if (instance != null) { - this.withMedium(instance.getMedium()); - this.withSizeLimit(instance.getSizeLimit()); - } - } - private String medium; - private Quantity sizeLimit; - public String getMedium() { - return this.medium; - } - public A withMedium(String medium) { - this.medium=medium; return (A) this; - } - public Boolean hasMedium() { - return this.medium != null; - } - public Quantity getSizeLimit() { - return this.sizeLimit; - } - public A withSizeLimit(Quantity sizeLimit) { - this.sizeLimit=sizeLimit; return (A) this; - } - public Boolean hasSizeLimit() { - return this.sizeLimit != null; - } - public A withNewSizeLimit(String value) { - return (A)withSizeLimit(new Quantity(value)); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EmptyDirVolumeSourceFluentImpl that = (V1EmptyDirVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(medium, that.medium)) return false; - - if (!java.util.Objects.equals(sizeLimit, that.sizeLimit)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(medium, sizeLimit, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (medium != null) { sb.append("medium:"); sb.append(medium + ","); } - if (sizeLimit != null) { sb.append("sizeLimit:"); sb.append(sizeLimit); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressBuilder.java index 819fb6e3c9..5ff4651730 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EndpointAddressBuilder extends V1EndpointAddressFluentImpl implements VisitableBuilder{ +public class V1EndpointAddressBuilder extends V1EndpointAddressFluent implements VisitableBuilder{ public V1EndpointAddressBuilder() { - this(false); - } - public V1EndpointAddressBuilder(Boolean validationEnabled) { - this(new V1EndpointAddress(), validationEnabled); + this(new V1EndpointAddress()); } + public V1EndpointAddressBuilder(V1EndpointAddressFluent fluent) { - this(fluent, false); - } - public V1EndpointAddressBuilder(V1EndpointAddressFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EndpointAddress(), validationEnabled); + this(fluent, new V1EndpointAddress()); } + public V1EndpointAddressBuilder(V1EndpointAddressFluent fluent,V1EndpointAddress instance) { - this(fluent, instance, false); - } - public V1EndpointAddressBuilder(V1EndpointAddressFluent fluent,V1EndpointAddress instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHostname(instance.getHostname()); - fluent.withIp(instance.getIp()); - fluent.withNodeName(instance.getNodeName()); - fluent.withTargetRef(instance.getTargetRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EndpointAddressBuilder(V1EndpointAddress instance) { - this(instance,false); - } - public V1EndpointAddressBuilder(V1EndpointAddress instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHostname(instance.getHostname()); - this.withIp(instance.getIp()); - this.withNodeName(instance.getNodeName()); - this.withTargetRef(instance.getTargetRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EndpointAddressFluent fluent; - Boolean validationEnabled; + public V1EndpointAddress build() { V1EndpointAddress buildable = new V1EndpointAddress(); buildable.setHostname(fluent.getHostname()); buildable.setIp(fluent.getIp()); buildable.setNodeName(fluent.getNodeName()); - buildable.setTargetRef(fluent.getTargetRef()); + buildable.setTargetRef(fluent.buildTargetRef()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressFluent.java index ca92855afa..58a723d32e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressFluent.java @@ -1,44 +1,157 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1EndpointAddressFluent> extends Fluent{ - public String getHostname(); - public A withHostname(String hostname); - public Boolean hasHostname(); - public String getIp(); - public A withIp(String ip); - public Boolean hasIp(); - public String getNodeName(); - public A withNodeName(String nodeName); - public Boolean hasNodeName(); - - /** - * This method has been deprecated, please use method buildTargetRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getTargetRef(); - public V1ObjectReference buildTargetRef(); - public A withTargetRef(V1ObjectReference targetRef); - public Boolean hasTargetRef(); - public V1EndpointAddressFluent.TargetRefNested withNewTargetRef(); - public V1EndpointAddressFluent.TargetRefNested withNewTargetRefLike(V1ObjectReference item); - public V1EndpointAddressFluent.TargetRefNested editTargetRef(); - public V1EndpointAddressFluent.TargetRefNested editOrNewTargetRef(); - public V1EndpointAddressFluent.TargetRefNested editOrNewTargetRefLike(V1ObjectReference item); - public interface TargetRefNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endTargetRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EndpointAddressFluent> extends BaseFluent{ + public V1EndpointAddressFluent() { + } + + public V1EndpointAddressFluent(V1EndpointAddress instance) { + this.copyInstance(instance); + } + private String hostname; + private String ip; + private String nodeName; + private V1ObjectReferenceBuilder targetRef; + + protected void copyInstance(V1EndpointAddress instance) { + instance = (instance != null ? instance : new V1EndpointAddress()); + if (instance != null) { + this.withHostname(instance.getHostname()); + this.withIp(instance.getIp()); + this.withNodeName(instance.getNodeName()); + this.withTargetRef(instance.getTargetRef()); + } + } + + public String getHostname() { + return this.hostname; + } + + public A withHostname(String hostname) { + this.hostname = hostname; + return (A) this; + } + + public boolean hasHostname() { + return this.hostname != null; + } + + public String getIp() { + return this.ip; + } + + public A withIp(String ip) { + this.ip = ip; + return (A) this; + } + + public boolean hasIp() { + return this.ip != null; + } + + public String getNodeName() { + return this.nodeName; + } + + public A withNodeName(String nodeName) { + this.nodeName = nodeName; + return (A) this; + } + + public boolean hasNodeName() { + return this.nodeName != null; + } + + public V1ObjectReference buildTargetRef() { + return this.targetRef != null ? this.targetRef.build() : null; } + public A withTargetRef(V1ObjectReference targetRef) { + this._visitables.remove("targetRef"); + if (targetRef != null) { + this.targetRef = new V1ObjectReferenceBuilder(targetRef); + this._visitables.get("targetRef").add(this.targetRef); + } else { + this.targetRef = null; + this._visitables.get("targetRef").remove(this.targetRef); + } + return (A) this; + } + + public boolean hasTargetRef() { + return this.targetRef != null; + } + + public TargetRefNested withNewTargetRef() { + return new TargetRefNested(null); + } + + public TargetRefNested withNewTargetRefLike(V1ObjectReference item) { + return new TargetRefNested(item); + } + + public TargetRefNested editTargetRef() { + return withNewTargetRefLike(java.util.Optional.ofNullable(buildTargetRef()).orElse(null)); + } + + public TargetRefNested editOrNewTargetRef() { + return withNewTargetRefLike(java.util.Optional.ofNullable(buildTargetRef()).orElse(new V1ObjectReferenceBuilder().build())); + } + + public TargetRefNested editOrNewTargetRefLike(V1ObjectReference item) { + return withNewTargetRefLike(java.util.Optional.ofNullable(buildTargetRef()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EndpointAddressFluent that = (V1EndpointAddressFluent) o; + if (!java.util.Objects.equals(hostname, that.hostname)) return false; + if (!java.util.Objects.equals(ip, that.ip)) return false; + if (!java.util.Objects.equals(nodeName, that.nodeName)) return false; + if (!java.util.Objects.equals(targetRef, that.targetRef)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(hostname, ip, nodeName, targetRef, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (hostname != null) { sb.append("hostname:"); sb.append(hostname + ","); } + if (ip != null) { sb.append("ip:"); sb.append(ip + ","); } + if (nodeName != null) { sb.append("nodeName:"); sb.append(nodeName + ","); } + if (targetRef != null) { sb.append("targetRef:"); sb.append(targetRef); } + sb.append("}"); + return sb.toString(); + } + public class TargetRefNested extends V1ObjectReferenceFluent> implements Nested{ + TargetRefNested(V1ObjectReference item) { + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + + public N and() { + return (N) V1EndpointAddressFluent.this.withTargetRef(builder.build()); + } + + public N endTargetRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressFluentImpl.java deleted file mode 100644 index bbc48bbd6b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointAddressFluentImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EndpointAddressFluentImpl> extends BaseFluent implements V1EndpointAddressFluent{ - public V1EndpointAddressFluentImpl() { - } - public V1EndpointAddressFluentImpl(V1EndpointAddress instance) { - if (instance != null) { - this.withHostname(instance.getHostname()); - this.withIp(instance.getIp()); - this.withNodeName(instance.getNodeName()); - this.withTargetRef(instance.getTargetRef()); - } - } - private String hostname; - private String ip; - private String nodeName; - private V1ObjectReferenceBuilder targetRef; - public String getHostname() { - return this.hostname; - } - public A withHostname(String hostname) { - this.hostname=hostname; return (A) this; - } - public Boolean hasHostname() { - return this.hostname != null; - } - public String getIp() { - return this.ip; - } - public A withIp(String ip) { - this.ip=ip; return (A) this; - } - public Boolean hasIp() { - return this.ip != null; - } - public String getNodeName() { - return this.nodeName; - } - public A withNodeName(String nodeName) { - this.nodeName=nodeName; return (A) this; - } - public Boolean hasNodeName() { - return this.nodeName != null; - } - - /** - * This method has been deprecated, please use method buildTargetRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getTargetRef() { - return this.targetRef!=null ?this.targetRef.build():null; - } - public V1ObjectReference buildTargetRef() { - return this.targetRef!=null ?this.targetRef.build():null; - } - public A withTargetRef(V1ObjectReference targetRef) { - _visitables.get("targetRef").remove(this.targetRef); - if (targetRef!=null){ this.targetRef= new V1ObjectReferenceBuilder(targetRef); _visitables.get("targetRef").add(this.targetRef);} else { this.targetRef = null; _visitables.get("targetRef").remove(this.targetRef); } return (A) this; - } - public Boolean hasTargetRef() { - return this.targetRef != null; - } - public V1EndpointAddressFluentImpl.TargetRefNested withNewTargetRef() { - return new V1EndpointAddressFluentImpl.TargetRefNestedImpl(); - } - public V1EndpointAddressFluentImpl.TargetRefNested withNewTargetRefLike(V1ObjectReference item) { - return new V1EndpointAddressFluentImpl.TargetRefNestedImpl(item); - } - public V1EndpointAddressFluentImpl.TargetRefNested editTargetRef() { - return withNewTargetRefLike(getTargetRef()); - } - public V1EndpointAddressFluentImpl.TargetRefNested editOrNewTargetRef() { - return withNewTargetRefLike(getTargetRef() != null ? getTargetRef(): new V1ObjectReferenceBuilder().build()); - } - public V1EndpointAddressFluentImpl.TargetRefNested editOrNewTargetRefLike(V1ObjectReference item) { - return withNewTargetRefLike(getTargetRef() != null ? getTargetRef(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EndpointAddressFluentImpl that = (V1EndpointAddressFluentImpl) o; - if (!java.util.Objects.equals(hostname, that.hostname)) return false; - - if (!java.util.Objects.equals(ip, that.ip)) return false; - - if (!java.util.Objects.equals(nodeName, that.nodeName)) return false; - - if (!java.util.Objects.equals(targetRef, that.targetRef)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(hostname, ip, nodeName, targetRef, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (hostname != null) { sb.append("hostname:"); sb.append(hostname + ","); } - if (ip != null) { sb.append("ip:"); sb.append(ip + ","); } - if (nodeName != null) { sb.append("nodeName:"); sb.append(nodeName + ","); } - if (targetRef != null) { sb.append("targetRef:"); sb.append(targetRef); } - sb.append("}"); - return sb.toString(); - } - class TargetRefNestedImpl extends V1ObjectReferenceFluentImpl> implements V1EndpointAddressFluentImpl.TargetRefNested,Nested{ - TargetRefNestedImpl(V1ObjectReference item) { - this.builder = new V1ObjectReferenceBuilder(this, item); - } - TargetRefNestedImpl() { - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - public N and() { - return (N) V1EndpointAddressFluentImpl.this.withTargetRef(builder.build()); - } - public N endTargetRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointBuilder.java index dffbf7231d..9175c40dd6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointBuilder.java @@ -1,67 +1,38 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EndpointBuilder extends V1EndpointFluentImpl implements VisitableBuilder{ +public class V1EndpointBuilder extends V1EndpointFluent implements VisitableBuilder{ public V1EndpointBuilder() { - this(false); - } - public V1EndpointBuilder(Boolean validationEnabled) { - this(new V1Endpoint(), validationEnabled); + this(new V1Endpoint()); } + public V1EndpointBuilder(V1EndpointFluent fluent) { - this(fluent, false); - } - public V1EndpointBuilder(V1EndpointFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Endpoint(), validationEnabled); + this(fluent, new V1Endpoint()); } + public V1EndpointBuilder(V1EndpointFluent fluent,V1Endpoint instance) { - this(fluent, instance, false); - } - public V1EndpointBuilder(V1EndpointFluent fluent,V1Endpoint instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAddresses(instance.getAddresses()); - fluent.withConditions(instance.getConditions()); - fluent.withDeprecatedTopology(instance.getDeprecatedTopology()); - fluent.withHints(instance.getHints()); - fluent.withHostname(instance.getHostname()); - fluent.withNodeName(instance.getNodeName()); - fluent.withTargetRef(instance.getTargetRef()); - fluent.withZone(instance.getZone()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EndpointBuilder(V1Endpoint instance) { - this(instance,false); - } - public V1EndpointBuilder(V1Endpoint instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAddresses(instance.getAddresses()); - this.withConditions(instance.getConditions()); - this.withDeprecatedTopology(instance.getDeprecatedTopology()); - this.withHints(instance.getHints()); - this.withHostname(instance.getHostname()); - this.withNodeName(instance.getNodeName()); - this.withTargetRef(instance.getTargetRef()); - this.withZone(instance.getZone()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EndpointFluent fluent; - Boolean validationEnabled; + public V1Endpoint build() { V1Endpoint buildable = new V1Endpoint(); buildable.setAddresses(fluent.getAddresses()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setDeprecatedTopology(fluent.getDeprecatedTopology()); - buildable.setHints(fluent.getHints()); + buildable.setHints(fluent.buildHints()); buildable.setHostname(fluent.getHostname()); buildable.setNodeName(fluent.getNodeName()); - buildable.setTargetRef(fluent.getTargetRef()); + buildable.setTargetRef(fluent.buildTargetRef()); buildable.setZone(fluent.getZone()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsBuilder.java index 47456f7fcb..d208ada8ce 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EndpointConditionsBuilder extends V1EndpointConditionsFluentImpl implements VisitableBuilder{ +public class V1EndpointConditionsBuilder extends V1EndpointConditionsFluent implements VisitableBuilder{ public V1EndpointConditionsBuilder() { - this(false); - } - public V1EndpointConditionsBuilder(Boolean validationEnabled) { - this(new V1EndpointConditions(), validationEnabled); + this(new V1EndpointConditions()); } + public V1EndpointConditionsBuilder(V1EndpointConditionsFluent fluent) { - this(fluent, false); - } - public V1EndpointConditionsBuilder(V1EndpointConditionsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EndpointConditions(), validationEnabled); + this(fluent, new V1EndpointConditions()); } + public V1EndpointConditionsBuilder(V1EndpointConditionsFluent fluent,V1EndpointConditions instance) { - this(fluent, instance, false); - } - public V1EndpointConditionsBuilder(V1EndpointConditionsFluent fluent,V1EndpointConditions instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withReady(instance.getReady()); - fluent.withServing(instance.getServing()); - fluent.withTerminating(instance.getTerminating()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EndpointConditionsBuilder(V1EndpointConditions instance) { - this(instance,false); - } - public V1EndpointConditionsBuilder(V1EndpointConditions instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withReady(instance.getReady()); - this.withServing(instance.getServing()); - this.withTerminating(instance.getTerminating()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EndpointConditionsFluent fluent; - Boolean validationEnabled; + public V1EndpointConditions build() { V1EndpointConditions buildable = new V1EndpointConditions(); buildable.setReady(fluent.getReady()); @@ -49,4 +29,5 @@ public V1EndpointConditions build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsFluent.java index ad78337882..6d25454f51 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsFluent.java @@ -1,24 +1,110 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1EndpointConditionsFluent> extends Fluent{ - public Boolean getReady(); - public A withReady(Boolean ready); - public Boolean hasReady(); - public Boolean getServing(); - public A withServing(Boolean serving); - public Boolean hasServing(); - public Boolean getTerminating(); - public A withTerminating(Boolean terminating); - public Boolean hasTerminating(); - public A withReady(); - public A withServing(); - public A withTerminating(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EndpointConditionsFluent> extends BaseFluent{ + public V1EndpointConditionsFluent() { + } + public V1EndpointConditionsFluent(V1EndpointConditions instance) { + this.copyInstance(instance); + } + private Boolean ready; + private Boolean serving; + private Boolean terminating; + + protected void copyInstance(V1EndpointConditions instance) { + instance = (instance != null ? instance : new V1EndpointConditions()); + if (instance != null) { + this.withReady(instance.getReady()); + this.withServing(instance.getServing()); + this.withTerminating(instance.getTerminating()); + } + } + + public Boolean getReady() { + return this.ready; + } + + public A withReady(Boolean ready) { + this.ready = ready; + return (A) this; + } + + public boolean hasReady() { + return this.ready != null; + } + + public Boolean getServing() { + return this.serving; + } + + public A withServing(Boolean serving) { + this.serving = serving; + return (A) this; + } + + public boolean hasServing() { + return this.serving != null; + } + + public Boolean getTerminating() { + return this.terminating; + } + + public A withTerminating(Boolean terminating) { + this.terminating = terminating; + return (A) this; + } + + public boolean hasTerminating() { + return this.terminating != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EndpointConditionsFluent that = (V1EndpointConditionsFluent) o; + if (!java.util.Objects.equals(ready, that.ready)) return false; + if (!java.util.Objects.equals(serving, that.serving)) return false; + if (!java.util.Objects.equals(terminating, that.terminating)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(ready, serving, terminating, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (ready != null) { sb.append("ready:"); sb.append(ready + ","); } + if (serving != null) { sb.append("serving:"); sb.append(serving + ","); } + if (terminating != null) { sb.append("terminating:"); sb.append(terminating); } + sb.append("}"); + return sb.toString(); + } + + public A withReady() { + return withReady(true); + } + + public A withServing() { + return withServing(true); + } + + public A withTerminating() { + return withTerminating(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsFluentImpl.java deleted file mode 100644 index 2694e840f0..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointConditionsFluentImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EndpointConditionsFluentImpl> extends BaseFluent implements V1EndpointConditionsFluent{ - public V1EndpointConditionsFluentImpl() { - } - public V1EndpointConditionsFluentImpl(V1EndpointConditions instance) { - if (instance != null) { - this.withReady(instance.getReady()); - this.withServing(instance.getServing()); - this.withTerminating(instance.getTerminating()); - } - } - private Boolean ready; - private Boolean serving; - private Boolean terminating; - public Boolean getReady() { - return this.ready; - } - public A withReady(Boolean ready) { - this.ready=ready; return (A) this; - } - public Boolean hasReady() { - return this.ready != null; - } - public Boolean getServing() { - return this.serving; - } - public A withServing(Boolean serving) { - this.serving=serving; return (A) this; - } - public Boolean hasServing() { - return this.serving != null; - } - public Boolean getTerminating() { - return this.terminating; - } - public A withTerminating(Boolean terminating) { - this.terminating=terminating; return (A) this; - } - public Boolean hasTerminating() { - return this.terminating != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EndpointConditionsFluentImpl that = (V1EndpointConditionsFluentImpl) o; - if (!java.util.Objects.equals(ready, that.ready)) return false; - - if (!java.util.Objects.equals(serving, that.serving)) return false; - - if (!java.util.Objects.equals(terminating, that.terminating)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(ready, serving, terminating, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (ready != null) { sb.append("ready:"); sb.append(ready + ","); } - if (serving != null) { sb.append("serving:"); sb.append(serving + ","); } - if (terminating != null) { sb.append("terminating:"); sb.append(terminating); } - sb.append("}"); - return sb.toString(); - } - public A withReady() { - return withReady(true); - } - public A withServing() { - return withServing(true); - } - public A withTerminating() { - return withTerminating(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointFluent.java index 39956a9ebf..835e17a843 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointFluent.java @@ -1,112 +1,422 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; -import java.util.Collection; +import io.kubernetes.client.fluent.BaseFluent; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; import java.util.Map; - /** - * Generated - */ -public interface V1EndpointFluent> extends Fluent{ - public A addToAddresses(int index,String item); - public A setToAddresses(int index,String item); - public A addToAddresses(java.lang.String... items); - public A addAllToAddresses(Collection items); - public A removeFromAddresses(java.lang.String... items); - public A removeAllFromAddresses(Collection items); - public List getAddresses(); - public String getAddress(int index); - public String getFirstAddress(); - public String getLastAddress(); - public String getMatchingAddress(Predicate predicate); - public Boolean hasMatchingAddress(Predicate predicate); - public A withAddresses(List addresses); - public A withAddresses(java.lang.String... addresses); - public Boolean hasAddresses(); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public V1EndpointConditions getConditions(); - public V1EndpointConditions buildConditions(); - public A withConditions(V1EndpointConditions conditions); - public Boolean hasConditions(); - public V1EndpointFluent.ConditionsNested withNewConditions(); - public V1EndpointFluent.ConditionsNested withNewConditionsLike(V1EndpointConditions item); - public V1EndpointFluent.ConditionsNested editConditions(); - public V1EndpointFluent.ConditionsNested editOrNewConditions(); - public V1EndpointFluent.ConditionsNested editOrNewConditionsLike(V1EndpointConditions item); - public A addToDeprecatedTopology(String key,String value); - public A addToDeprecatedTopology(Map map); - public A removeFromDeprecatedTopology(String key); - public A removeFromDeprecatedTopology(Map map); - public Map getDeprecatedTopology(); - public A withDeprecatedTopology(Map deprecatedTopology); - public Boolean hasDeprecatedTopology(); - - /** - * This method has been deprecated, please use method buildHints instead. - * @return The buildable object. - */ - @Deprecated - public V1EndpointHints getHints(); - public V1EndpointHints buildHints(); - public A withHints(V1EndpointHints hints); - public Boolean hasHints(); - public V1EndpointFluent.HintsNested withNewHints(); - public V1EndpointFluent.HintsNested withNewHintsLike(V1EndpointHints item); - public V1EndpointFluent.HintsNested editHints(); - public V1EndpointFluent.HintsNested editOrNewHints(); - public V1EndpointFluent.HintsNested editOrNewHintsLike(V1EndpointHints item); - public String getHostname(); - public A withHostname(String hostname); - public Boolean hasHostname(); - public String getNodeName(); - public A withNodeName(String nodeName); - public Boolean hasNodeName(); - - /** - * This method has been deprecated, please use method buildTargetRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getTargetRef(); - public V1ObjectReference buildTargetRef(); - public A withTargetRef(V1ObjectReference targetRef); - public Boolean hasTargetRef(); - public V1EndpointFluent.TargetRefNested withNewTargetRef(); - public V1EndpointFluent.TargetRefNested withNewTargetRefLike(V1ObjectReference item); - public V1EndpointFluent.TargetRefNested editTargetRef(); - public V1EndpointFluent.TargetRefNested editOrNewTargetRef(); - public V1EndpointFluent.TargetRefNested editOrNewTargetRefLike(V1ObjectReference item); - public String getZone(); - public A withZone(String zone); - public Boolean hasZone(); - public interface ConditionsNested extends Nested,V1EndpointConditionsFluent>{ - public N and(); - public N endConditions(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EndpointFluent> extends BaseFluent{ + public V1EndpointFluent() { + } + + public V1EndpointFluent(V1Endpoint instance) { + this.copyInstance(instance); + } + private List addresses; + private V1EndpointConditionsBuilder conditions; + private Map deprecatedTopology; + private V1EndpointHintsBuilder hints; + private String hostname; + private String nodeName; + private V1ObjectReferenceBuilder targetRef; + private String zone; + + protected void copyInstance(V1Endpoint instance) { + instance = (instance != null ? instance : new V1Endpoint()); + if (instance != null) { + this.withAddresses(instance.getAddresses()); + this.withConditions(instance.getConditions()); + this.withDeprecatedTopology(instance.getDeprecatedTopology()); + this.withHints(instance.getHints()); + this.withHostname(instance.getHostname()); + this.withNodeName(instance.getNodeName()); + this.withTargetRef(instance.getTargetRef()); + this.withZone(instance.getZone()); + } + } + + public A addToAddresses(int index,String item) { + if (this.addresses == null) {this.addresses = new ArrayList();} + this.addresses.add(index, item); + return (A)this; + } + + public A setToAddresses(int index,String item) { + if (this.addresses == null) {this.addresses = new ArrayList();} + this.addresses.set(index, item); return (A)this; + } + + public A addToAddresses(java.lang.String... items) { + if (this.addresses == null) {this.addresses = new ArrayList();} + for (String item : items) {this.addresses.add(item);} return (A)this; + } + + public A addAllToAddresses(Collection items) { + if (this.addresses == null) {this.addresses = new ArrayList();} + for (String item : items) {this.addresses.add(item);} return (A)this; + } + + public A removeFromAddresses(java.lang.String... items) { + if (this.addresses == null) return (A)this; + for (String item : items) { this.addresses.remove(item);} return (A)this; + } + + public A removeAllFromAddresses(Collection items) { + if (this.addresses == null) return (A)this; + for (String item : items) { this.addresses.remove(item);} return (A)this; + } + + public List getAddresses() { + return this.addresses; + } + + public String getAddress(int index) { + return this.addresses.get(index); + } + + public String getFirstAddress() { + return this.addresses.get(0); + } + + public String getLastAddress() { + return this.addresses.get(addresses.size() - 1); + } + + public String getMatchingAddress(Predicate predicate) { + for (String item : addresses) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAddress(Predicate predicate) { + for (String item : addresses) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAddresses(List addresses) { + if (addresses != null) { + this.addresses = new ArrayList(); + for (String item : addresses) { + this.addToAddresses(item); + } + } else { + this.addresses = null; + } + return (A) this; + } + + public A withAddresses(java.lang.String... addresses) { + if (this.addresses != null) { + this.addresses.clear(); + _visitables.remove("addresses"); + } + if (addresses != null) { + for (String item : addresses) { + this.addToAddresses(item); + } + } + return (A) this; + } + + public boolean hasAddresses() { + return this.addresses != null && !this.addresses.isEmpty(); + } + + public V1EndpointConditions buildConditions() { + return this.conditions != null ? this.conditions.build() : null; + } + + public A withConditions(V1EndpointConditions conditions) { + this._visitables.remove("conditions"); + if (conditions != null) { + this.conditions = new V1EndpointConditionsBuilder(conditions); + this._visitables.get("conditions").add(this.conditions); + } else { + this.conditions = null; + this._visitables.get("conditions").remove(this.conditions); + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null; + } + + public ConditionsNested withNewConditions() { + return new ConditionsNested(null); + } + + public ConditionsNested withNewConditionsLike(V1EndpointConditions item) { + return new ConditionsNested(item); + } + + public ConditionsNested editConditions() { + return withNewConditionsLike(java.util.Optional.ofNullable(buildConditions()).orElse(null)); + } + + public ConditionsNested editOrNewConditions() { + return withNewConditionsLike(java.util.Optional.ofNullable(buildConditions()).orElse(new V1EndpointConditionsBuilder().build())); + } + + public ConditionsNested editOrNewConditionsLike(V1EndpointConditions item) { + return withNewConditionsLike(java.util.Optional.ofNullable(buildConditions()).orElse(item)); + } + + public A addToDeprecatedTopology(String key,String value) { + if(this.deprecatedTopology == null && key != null && value != null) { this.deprecatedTopology = new LinkedHashMap(); } + if(key != null && value != null) {this.deprecatedTopology.put(key, value);} return (A)this; + } + + public A addToDeprecatedTopology(Map map) { + if(this.deprecatedTopology == null && map != null) { this.deprecatedTopology = new LinkedHashMap(); } + if(map != null) { this.deprecatedTopology.putAll(map);} return (A)this; + } + + public A removeFromDeprecatedTopology(String key) { + if(this.deprecatedTopology == null) { return (A) this; } + if(key != null && this.deprecatedTopology != null) {this.deprecatedTopology.remove(key);} return (A)this; + } + + public A removeFromDeprecatedTopology(Map map) { + if(this.deprecatedTopology == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.deprecatedTopology != null){this.deprecatedTopology.remove(key);}}} return (A)this; + } + + public Map getDeprecatedTopology() { + return this.deprecatedTopology; + } + + public A withDeprecatedTopology(Map deprecatedTopology) { + if (deprecatedTopology == null) { + this.deprecatedTopology = null; + } else { + this.deprecatedTopology = new LinkedHashMap(deprecatedTopology); + } + return (A) this; + } + + public boolean hasDeprecatedTopology() { + return this.deprecatedTopology != null; } - public interface HintsNested extends Nested,V1EndpointHintsFluent>{ - public N and(); - public N endHints(); + + public V1EndpointHints buildHints() { + return this.hints != null ? this.hints.build() : null; + } + + public A withHints(V1EndpointHints hints) { + this._visitables.remove("hints"); + if (hints != null) { + this.hints = new V1EndpointHintsBuilder(hints); + this._visitables.get("hints").add(this.hints); + } else { + this.hints = null; + this._visitables.get("hints").remove(this.hints); + } + return (A) this; + } + + public boolean hasHints() { + return this.hints != null; + } + + public HintsNested withNewHints() { + return new HintsNested(null); + } + + public HintsNested withNewHintsLike(V1EndpointHints item) { + return new HintsNested(item); + } + + public HintsNested editHints() { + return withNewHintsLike(java.util.Optional.ofNullable(buildHints()).orElse(null)); + } + + public HintsNested editOrNewHints() { + return withNewHintsLike(java.util.Optional.ofNullable(buildHints()).orElse(new V1EndpointHintsBuilder().build())); + } + + public HintsNested editOrNewHintsLike(V1EndpointHints item) { + return withNewHintsLike(java.util.Optional.ofNullable(buildHints()).orElse(item)); + } + + public String getHostname() { + return this.hostname; + } + + public A withHostname(String hostname) { + this.hostname = hostname; + return (A) this; + } + + public boolean hasHostname() { + return this.hostname != null; + } + + public String getNodeName() { + return this.nodeName; + } + + public A withNodeName(String nodeName) { + this.nodeName = nodeName; + return (A) this; + } + + public boolean hasNodeName() { + return this.nodeName != null; + } + + public V1ObjectReference buildTargetRef() { + return this.targetRef != null ? this.targetRef.build() : null; + } + + public A withTargetRef(V1ObjectReference targetRef) { + this._visitables.remove("targetRef"); + if (targetRef != null) { + this.targetRef = new V1ObjectReferenceBuilder(targetRef); + this._visitables.get("targetRef").add(this.targetRef); + } else { + this.targetRef = null; + this._visitables.get("targetRef").remove(this.targetRef); + } + return (A) this; + } + + public boolean hasTargetRef() { + return this.targetRef != null; + } + + public TargetRefNested withNewTargetRef() { + return new TargetRefNested(null); + } + + public TargetRefNested withNewTargetRefLike(V1ObjectReference item) { + return new TargetRefNested(item); + } + + public TargetRefNested editTargetRef() { + return withNewTargetRefLike(java.util.Optional.ofNullable(buildTargetRef()).orElse(null)); + } + + public TargetRefNested editOrNewTargetRef() { + return withNewTargetRefLike(java.util.Optional.ofNullable(buildTargetRef()).orElse(new V1ObjectReferenceBuilder().build())); + } + + public TargetRefNested editOrNewTargetRefLike(V1ObjectReference item) { + return withNewTargetRefLike(java.util.Optional.ofNullable(buildTargetRef()).orElse(item)); + } + + public String getZone() { + return this.zone; + } + + public A withZone(String zone) { + this.zone = zone; + return (A) this; + } + + public boolean hasZone() { + return this.zone != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EndpointFluent that = (V1EndpointFluent) o; + if (!java.util.Objects.equals(addresses, that.addresses)) return false; + if (!java.util.Objects.equals(conditions, that.conditions)) return false; + if (!java.util.Objects.equals(deprecatedTopology, that.deprecatedTopology)) return false; + if (!java.util.Objects.equals(hints, that.hints)) return false; + if (!java.util.Objects.equals(hostname, that.hostname)) return false; + if (!java.util.Objects.equals(nodeName, that.nodeName)) return false; + if (!java.util.Objects.equals(targetRef, that.targetRef)) return false; + if (!java.util.Objects.equals(zone, that.zone)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(addresses, conditions, deprecatedTopology, hints, hostname, nodeName, targetRef, zone, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (addresses != null && !addresses.isEmpty()) { sb.append("addresses:"); sb.append(addresses + ","); } + if (conditions != null) { sb.append("conditions:"); sb.append(conditions + ","); } + if (deprecatedTopology != null && !deprecatedTopology.isEmpty()) { sb.append("deprecatedTopology:"); sb.append(deprecatedTopology + ","); } + if (hints != null) { sb.append("hints:"); sb.append(hints + ","); } + if (hostname != null) { sb.append("hostname:"); sb.append(hostname + ","); } + if (nodeName != null) { sb.append("nodeName:"); sb.append(nodeName + ","); } + if (targetRef != null) { sb.append("targetRef:"); sb.append(targetRef + ","); } + if (zone != null) { sb.append("zone:"); sb.append(zone); } + sb.append("}"); + return sb.toString(); + } + public class ConditionsNested extends V1EndpointConditionsFluent> implements Nested{ + ConditionsNested(V1EndpointConditions item) { + this.builder = new V1EndpointConditionsBuilder(this, item); + } + V1EndpointConditionsBuilder builder; + + public N and() { + return (N) V1EndpointFluent.this.withConditions(builder.build()); + } + public N endConditions() { + return and(); + } + + } - public interface TargetRefNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endTargetRef(); + public class HintsNested extends V1EndpointHintsFluent> implements Nested{ + HintsNested(V1EndpointHints item) { + this.builder = new V1EndpointHintsBuilder(this, item); + } + V1EndpointHintsBuilder builder; + public N and() { + return (N) V1EndpointFluent.this.withHints(builder.build()); + } + + public N endHints() { + return and(); + } + + } + public class TargetRefNested extends V1ObjectReferenceFluent> implements Nested{ + TargetRefNested(V1ObjectReference item) { + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + + public N and() { + return (N) V1EndpointFluent.this.withTargetRef(builder.build()); + } + + public N endTargetRef() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointFluentImpl.java deleted file mode 100644 index 9c2ba3c2ea..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointFluentImpl.java +++ /dev/null @@ -1,338 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EndpointFluentImpl> extends BaseFluent implements V1EndpointFluent{ - public V1EndpointFluentImpl() { - } - public V1EndpointFluentImpl(V1Endpoint instance) { - if (instance != null) { - this.withAddresses(instance.getAddresses()); - this.withConditions(instance.getConditions()); - this.withDeprecatedTopology(instance.getDeprecatedTopology()); - this.withHints(instance.getHints()); - this.withHostname(instance.getHostname()); - this.withNodeName(instance.getNodeName()); - this.withTargetRef(instance.getTargetRef()); - this.withZone(instance.getZone()); - } - } - private List addresses; - private V1EndpointConditionsBuilder conditions; - private Map deprecatedTopology; - private V1EndpointHintsBuilder hints; - private String hostname; - private String nodeName; - private V1ObjectReferenceBuilder targetRef; - private String zone; - public A addToAddresses(int index,String item) { - if (this.addresses == null) {this.addresses = new ArrayList();} - this.addresses.add(index, item); - return (A)this; - } - public A setToAddresses(int index,String item) { - if (this.addresses == null) {this.addresses = new ArrayList();} - this.addresses.set(index, item); return (A)this; - } - public A addToAddresses(java.lang.String... items) { - if (this.addresses == null) {this.addresses = new ArrayList();} - for (String item : items) {this.addresses.add(item);} return (A)this; - } - public A addAllToAddresses(Collection items) { - if (this.addresses == null) {this.addresses = new ArrayList();} - for (String item : items) {this.addresses.add(item);} return (A)this; - } - public A removeFromAddresses(java.lang.String... items) { - for (String item : items) {if (this.addresses!= null){ this.addresses.remove(item);}} return (A)this; - } - public A removeAllFromAddresses(Collection items) { - for (String item : items) {if (this.addresses!= null){ this.addresses.remove(item);}} return (A)this; - } - public List getAddresses() { - return this.addresses; - } - public String getAddress(int index) { - return this.addresses.get(index); - } - public String getFirstAddress() { - return this.addresses.get(0); - } - public String getLastAddress() { - return this.addresses.get(addresses.size() - 1); - } - public String getMatchingAddress(Predicate predicate) { - for (String item: addresses) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAddress(Predicate predicate) { - for (String item: addresses) { if(predicate.test(item)){ return true;} } return false; - } - public A withAddresses(List addresses) { - if (addresses != null) {this.addresses = new ArrayList(); for (String item : addresses){this.addToAddresses(item);}} else { this.addresses = null;} return (A) this; - } - public A withAddresses(java.lang.String... addresses) { - if (this.addresses != null) {this.addresses.clear(); _visitables.remove("addresses"); } - if (addresses != null) {for (String item :addresses){ this.addToAddresses(item);}} return (A) this; - } - public Boolean hasAddresses() { - return addresses != null && !addresses.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public V1EndpointConditions getConditions() { - return this.conditions!=null ?this.conditions.build():null; - } - public V1EndpointConditions buildConditions() { - return this.conditions!=null ?this.conditions.build():null; - } - public A withConditions(V1EndpointConditions conditions) { - _visitables.get("conditions").remove(this.conditions); - if (conditions!=null){ this.conditions= new V1EndpointConditionsBuilder(conditions); _visitables.get("conditions").add(this.conditions);} else { this.conditions = null; _visitables.get("conditions").remove(this.conditions); } return (A) this; - } - public Boolean hasConditions() { - return this.conditions != null; - } - public V1EndpointFluentImpl.ConditionsNested withNewConditions() { - return new V1EndpointFluentImpl.ConditionsNestedImpl(); - } - public V1EndpointFluentImpl.ConditionsNested withNewConditionsLike(V1EndpointConditions item) { - return new V1EndpointFluentImpl.ConditionsNestedImpl(item); - } - public V1EndpointFluentImpl.ConditionsNested editConditions() { - return withNewConditionsLike(getConditions()); - } - public V1EndpointFluentImpl.ConditionsNested editOrNewConditions() { - return withNewConditionsLike(getConditions() != null ? getConditions(): new V1EndpointConditionsBuilder().build()); - } - public V1EndpointFluentImpl.ConditionsNested editOrNewConditionsLike(V1EndpointConditions item) { - return withNewConditionsLike(getConditions() != null ? getConditions(): item); - } - public A addToDeprecatedTopology(String key,String value) { - if(this.deprecatedTopology == null && key != null && value != null) { this.deprecatedTopology = new LinkedHashMap(); } - if(key != null && value != null) {this.deprecatedTopology.put(key, value);} return (A)this; - } - public A addToDeprecatedTopology(Map map) { - if(this.deprecatedTopology == null && map != null) { this.deprecatedTopology = new LinkedHashMap(); } - if(map != null) { this.deprecatedTopology.putAll(map);} return (A)this; - } - public A removeFromDeprecatedTopology(String key) { - if(this.deprecatedTopology == null) { return (A) this; } - if(key != null && this.deprecatedTopology != null) {this.deprecatedTopology.remove(key);} return (A)this; - } - public A removeFromDeprecatedTopology(Map map) { - if(this.deprecatedTopology == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.deprecatedTopology != null){this.deprecatedTopology.remove(key);}}} return (A)this; - } - public Map getDeprecatedTopology() { - return this.deprecatedTopology; - } - public A withDeprecatedTopology(Map deprecatedTopology) { - if (deprecatedTopology == null) { this.deprecatedTopology = null;} else {this.deprecatedTopology = new LinkedHashMap(deprecatedTopology);} return (A) this; - } - public Boolean hasDeprecatedTopology() { - return this.deprecatedTopology != null; - } - - /** - * This method has been deprecated, please use method buildHints instead. - * @return The buildable object. - */ - @Deprecated - public V1EndpointHints getHints() { - return this.hints!=null ?this.hints.build():null; - } - public V1EndpointHints buildHints() { - return this.hints!=null ?this.hints.build():null; - } - public A withHints(V1EndpointHints hints) { - _visitables.get("hints").remove(this.hints); - if (hints!=null){ this.hints= new V1EndpointHintsBuilder(hints); _visitables.get("hints").add(this.hints);} else { this.hints = null; _visitables.get("hints").remove(this.hints); } return (A) this; - } - public Boolean hasHints() { - return this.hints != null; - } - public V1EndpointFluentImpl.HintsNested withNewHints() { - return new V1EndpointFluentImpl.HintsNestedImpl(); - } - public V1EndpointFluentImpl.HintsNested withNewHintsLike(V1EndpointHints item) { - return new V1EndpointFluentImpl.HintsNestedImpl(item); - } - public V1EndpointFluentImpl.HintsNested editHints() { - return withNewHintsLike(getHints()); - } - public V1EndpointFluentImpl.HintsNested editOrNewHints() { - return withNewHintsLike(getHints() != null ? getHints(): new V1EndpointHintsBuilder().build()); - } - public V1EndpointFluentImpl.HintsNested editOrNewHintsLike(V1EndpointHints item) { - return withNewHintsLike(getHints() != null ? getHints(): item); - } - public String getHostname() { - return this.hostname; - } - public A withHostname(String hostname) { - this.hostname=hostname; return (A) this; - } - public Boolean hasHostname() { - return this.hostname != null; - } - public String getNodeName() { - return this.nodeName; - } - public A withNodeName(String nodeName) { - this.nodeName=nodeName; return (A) this; - } - public Boolean hasNodeName() { - return this.nodeName != null; - } - - /** - * This method has been deprecated, please use method buildTargetRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getTargetRef() { - return this.targetRef!=null ?this.targetRef.build():null; - } - public V1ObjectReference buildTargetRef() { - return this.targetRef!=null ?this.targetRef.build():null; - } - public A withTargetRef(V1ObjectReference targetRef) { - _visitables.get("targetRef").remove(this.targetRef); - if (targetRef!=null){ this.targetRef= new V1ObjectReferenceBuilder(targetRef); _visitables.get("targetRef").add(this.targetRef);} else { this.targetRef = null; _visitables.get("targetRef").remove(this.targetRef); } return (A) this; - } - public Boolean hasTargetRef() { - return this.targetRef != null; - } - public V1EndpointFluentImpl.TargetRefNested withNewTargetRef() { - return new V1EndpointFluentImpl.TargetRefNestedImpl(); - } - public V1EndpointFluentImpl.TargetRefNested withNewTargetRefLike(V1ObjectReference item) { - return new V1EndpointFluentImpl.TargetRefNestedImpl(item); - } - public V1EndpointFluentImpl.TargetRefNested editTargetRef() { - return withNewTargetRefLike(getTargetRef()); - } - public V1EndpointFluentImpl.TargetRefNested editOrNewTargetRef() { - return withNewTargetRefLike(getTargetRef() != null ? getTargetRef(): new V1ObjectReferenceBuilder().build()); - } - public V1EndpointFluentImpl.TargetRefNested editOrNewTargetRefLike(V1ObjectReference item) { - return withNewTargetRefLike(getTargetRef() != null ? getTargetRef(): item); - } - public String getZone() { - return this.zone; - } - public A withZone(String zone) { - this.zone=zone; return (A) this; - } - public Boolean hasZone() { - return this.zone != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EndpointFluentImpl that = (V1EndpointFluentImpl) o; - if (!java.util.Objects.equals(addresses, that.addresses)) return false; - - if (!java.util.Objects.equals(conditions, that.conditions)) return false; - - if (!java.util.Objects.equals(deprecatedTopology, that.deprecatedTopology)) return false; - - if (!java.util.Objects.equals(hints, that.hints)) return false; - - if (!java.util.Objects.equals(hostname, that.hostname)) return false; - - if (!java.util.Objects.equals(nodeName, that.nodeName)) return false; - - if (!java.util.Objects.equals(targetRef, that.targetRef)) return false; - - if (!java.util.Objects.equals(zone, that.zone)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(addresses, conditions, deprecatedTopology, hints, hostname, nodeName, targetRef, zone, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (addresses != null && !addresses.isEmpty()) { sb.append("addresses:"); sb.append(addresses + ","); } - if (conditions != null) { sb.append("conditions:"); sb.append(conditions + ","); } - if (deprecatedTopology != null && !deprecatedTopology.isEmpty()) { sb.append("deprecatedTopology:"); sb.append(deprecatedTopology + ","); } - if (hints != null) { sb.append("hints:"); sb.append(hints + ","); } - if (hostname != null) { sb.append("hostname:"); sb.append(hostname + ","); } - if (nodeName != null) { sb.append("nodeName:"); sb.append(nodeName + ","); } - if (targetRef != null) { sb.append("targetRef:"); sb.append(targetRef + ","); } - if (zone != null) { sb.append("zone:"); sb.append(zone); } - sb.append("}"); - return sb.toString(); - } - class ConditionsNestedImpl extends V1EndpointConditionsFluentImpl> implements V1EndpointFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(V1EndpointConditions item) { - this.builder = new V1EndpointConditionsBuilder(this, item); - } - ConditionsNestedImpl() { - this.builder = new V1EndpointConditionsBuilder(this); - } - V1EndpointConditionsBuilder builder; - public N and() { - return (N) V1EndpointFluentImpl.this.withConditions(builder.build()); - } - public N endConditions() { - return and(); - } - - } - class HintsNestedImpl extends V1EndpointHintsFluentImpl> implements V1EndpointFluentImpl.HintsNested,Nested{ - HintsNestedImpl(V1EndpointHints item) { - this.builder = new V1EndpointHintsBuilder(this, item); - } - HintsNestedImpl() { - this.builder = new V1EndpointHintsBuilder(this); - } - V1EndpointHintsBuilder builder; - public N and() { - return (N) V1EndpointFluentImpl.this.withHints(builder.build()); - } - public N endHints() { - return and(); - } - - } - class TargetRefNestedImpl extends V1ObjectReferenceFluentImpl> implements V1EndpointFluentImpl.TargetRefNested,Nested{ - TargetRefNestedImpl(V1ObjectReference item) { - this.builder = new V1ObjectReferenceBuilder(this, item); - } - TargetRefNestedImpl() { - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - public N and() { - return (N) V1EndpointFluentImpl.this.withTargetRef(builder.build()); - } - public N endTargetRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsBuilder.java index dbdba582b7..a72325c2d9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EndpointHintsBuilder extends V1EndpointHintsFluentImpl implements VisitableBuilder{ +public class V1EndpointHintsBuilder extends V1EndpointHintsFluent implements VisitableBuilder{ public V1EndpointHintsBuilder() { - this(false); - } - public V1EndpointHintsBuilder(Boolean validationEnabled) { - this(new V1EndpointHints(), validationEnabled); + this(new V1EndpointHints()); } + public V1EndpointHintsBuilder(V1EndpointHintsFluent fluent) { - this(fluent, false); - } - public V1EndpointHintsBuilder(V1EndpointHintsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EndpointHints(), validationEnabled); + this(fluent, new V1EndpointHints()); } + public V1EndpointHintsBuilder(V1EndpointHintsFluent fluent,V1EndpointHints instance) { - this(fluent, instance, false); - } - public V1EndpointHintsBuilder(V1EndpointHintsFluent fluent,V1EndpointHints instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withForZones(instance.getForZones()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EndpointHintsBuilder(V1EndpointHints instance) { - this(instance,false); - } - public V1EndpointHintsBuilder(V1EndpointHints instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withForZones(instance.getForZones()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EndpointHintsFluent fluent; - Boolean validationEnabled; + public V1EndpointHints build() { V1EndpointHints buildable = new V1EndpointHints(); - buildable.setForZones(fluent.getForZones()); + buildable.setForZones(fluent.buildForZones()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsFluent.java index c14c370d57..26dc2f8a50 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1EndpointHintsFluent> extends Fluent{ - public A addToForZones(int index,V1ForZone item); - public A setToForZones(int index,V1ForZone item); - public A addToForZones(io.kubernetes.client.openapi.models.V1ForZone... items); - public A addAllToForZones(Collection items); - public A removeFromForZones(io.kubernetes.client.openapi.models.V1ForZone... items); - public A removeAllFromForZones(Collection items); - public A removeMatchingFromForZones(Predicate predicate); - - /** - * This method has been deprecated, please use method buildForZones instead. - * @return The buildable object. - */ - @Deprecated - public List getForZones(); - public List buildForZones(); - public V1ForZone buildForZone(int index); - public V1ForZone buildFirstForZone(); - public V1ForZone buildLastForZone(); - public V1ForZone buildMatchingForZone(Predicate predicate); - public Boolean hasMatchingForZone(Predicate predicate); - public A withForZones(List forZones); - public A withForZones(io.kubernetes.client.openapi.models.V1ForZone... forZones); - public Boolean hasForZones(); - public V1EndpointHintsFluent.ForZonesNested addNewForZone(); - public V1EndpointHintsFluent.ForZonesNested addNewForZoneLike(V1ForZone item); - public V1EndpointHintsFluent.ForZonesNested setNewForZoneLike(int index,V1ForZone item); - public V1EndpointHintsFluent.ForZonesNested editForZone(int index); - public V1EndpointHintsFluent.ForZonesNested editFirstForZone(); - public V1EndpointHintsFluent.ForZonesNested editLastForZone(); - public V1EndpointHintsFluent.ForZonesNested editMatchingForZone(Predicate predicate); - public interface ForZonesNested extends Nested,V1ForZoneFluent>{ - public N and(); - public N endForZone(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EndpointHintsFluent> extends BaseFluent{ + public V1EndpointHintsFluent() { + } + + public V1EndpointHintsFluent(V1EndpointHints instance) { + this.copyInstance(instance); + } + private ArrayList forZones; + + protected void copyInstance(V1EndpointHints instance) { + instance = (instance != null ? instance : new V1EndpointHints()); + if (instance != null) { + this.withForZones(instance.getForZones()); + } + } + + public A addToForZones(int index,V1ForZone item) { + if (this.forZones == null) {this.forZones = new ArrayList();} + V1ForZoneBuilder builder = new V1ForZoneBuilder(item); + if (index < 0 || index >= forZones.size()) { _visitables.get("forZones").add(builder); forZones.add(builder); } else { _visitables.get("forZones").add(index, builder); forZones.add(index, builder);} + return (A)this; + } + + public A setToForZones(int index,V1ForZone item) { + if (this.forZones == null) {this.forZones = new ArrayList();} + V1ForZoneBuilder builder = new V1ForZoneBuilder(item); + if (index < 0 || index >= forZones.size()) { _visitables.get("forZones").add(builder); forZones.add(builder); } else { _visitables.get("forZones").set(index, builder); forZones.set(index, builder);} + return (A)this; + } + + public A addToForZones(io.kubernetes.client.openapi.models.V1ForZone... items) { + if (this.forZones == null) {this.forZones = new ArrayList();} + for (V1ForZone item : items) {V1ForZoneBuilder builder = new V1ForZoneBuilder(item);_visitables.get("forZones").add(builder);this.forZones.add(builder);} return (A)this; + } + + public A addAllToForZones(Collection items) { + if (this.forZones == null) {this.forZones = new ArrayList();} + for (V1ForZone item : items) {V1ForZoneBuilder builder = new V1ForZoneBuilder(item);_visitables.get("forZones").add(builder);this.forZones.add(builder);} return (A)this; + } + + public A removeFromForZones(io.kubernetes.client.openapi.models.V1ForZone... items) { + if (this.forZones == null) return (A)this; + for (V1ForZone item : items) {V1ForZoneBuilder builder = new V1ForZoneBuilder(item);_visitables.get("forZones").remove(builder); this.forZones.remove(builder);} return (A)this; + } + + public A removeAllFromForZones(Collection items) { + if (this.forZones == null) return (A)this; + for (V1ForZone item : items) {V1ForZoneBuilder builder = new V1ForZoneBuilder(item);_visitables.get("forZones").remove(builder); this.forZones.remove(builder);} return (A)this; + } + + public A removeMatchingFromForZones(Predicate predicate) { + if (forZones == null) return (A) this; + final Iterator each = forZones.iterator(); + final List visitables = _visitables.get("forZones"); + while (each.hasNext()) { + V1ForZoneBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildForZones() { + return this.forZones != null ? build(forZones) : null; + } + + public V1ForZone buildForZone(int index) { + return this.forZones.get(index).build(); + } + + public V1ForZone buildFirstForZone() { + return this.forZones.get(0).build(); + } + + public V1ForZone buildLastForZone() { + return this.forZones.get(forZones.size() - 1).build(); + } + + public V1ForZone buildMatchingForZone(Predicate predicate) { + for (V1ForZoneBuilder item : forZones) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingForZone(Predicate predicate) { + for (V1ForZoneBuilder item : forZones) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withForZones(List forZones) { + if (this.forZones != null) { + this._visitables.get("forZones").clear(); + } + if (forZones != null) { + this.forZones = new ArrayList(); + for (V1ForZone item : forZones) { + this.addToForZones(item); + } + } else { + this.forZones = null; + } + return (A) this; + } + + public A withForZones(io.kubernetes.client.openapi.models.V1ForZone... forZones) { + if (this.forZones != null) { + this.forZones.clear(); + _visitables.remove("forZones"); + } + if (forZones != null) { + for (V1ForZone item : forZones) { + this.addToForZones(item); + } + } + return (A) this; + } + + public boolean hasForZones() { + return this.forZones != null && !this.forZones.isEmpty(); + } + + public ForZonesNested addNewForZone() { + return new ForZonesNested(-1, null); + } + + public ForZonesNested addNewForZoneLike(V1ForZone item) { + return new ForZonesNested(-1, item); + } + + public ForZonesNested setNewForZoneLike(int index,V1ForZone item) { + return new ForZonesNested(index, item); + } + + public ForZonesNested editForZone(int index) { + if (forZones.size() <= index) throw new RuntimeException("Can't edit forZones. Index exceeds size."); + return setNewForZoneLike(index, buildForZone(index)); + } + + public ForZonesNested editFirstForZone() { + if (forZones.size() == 0) throw new RuntimeException("Can't edit first forZones. The list is empty."); + return setNewForZoneLike(0, buildForZone(0)); + } + + public ForZonesNested editLastForZone() { + int index = forZones.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last forZones. The list is empty."); + return setNewForZoneLike(index, buildForZone(index)); + } + + public ForZonesNested editMatchingForZone(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ForZoneFluent> implements Nested{ + ForZonesNested(int index,V1ForZone item) { + this.index = index; + this.builder = new V1ForZoneBuilder(this, item); + } + V1ForZoneBuilder builder; + int index; + + public N and() { + return (N) V1EndpointHintsFluent.this.setToForZones(index,builder.build()); + } + + public N endForZone() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsFluentImpl.java deleted file mode 100644 index 05f383ddbb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointHintsFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EndpointHintsFluentImpl> extends BaseFluent implements V1EndpointHintsFluent{ - public V1EndpointHintsFluentImpl() { - } - public V1EndpointHintsFluentImpl(V1EndpointHints instance) { - if (instance != null) { - this.withForZones(instance.getForZones()); - } - } - private ArrayList forZones; - public A addToForZones(int index,V1ForZone item) { - if (this.forZones == null) {this.forZones = new ArrayList();} - V1ForZoneBuilder builder = new V1ForZoneBuilder(item); - if (index < 0 || index >= forZones.size()) { _visitables.get("forZones").add(builder); forZones.add(builder); } else { _visitables.get("forZones").add(index, builder); forZones.add(index, builder);} - return (A)this; - } - public A setToForZones(int index,V1ForZone item) { - if (this.forZones == null) {this.forZones = new ArrayList();} - V1ForZoneBuilder builder = new V1ForZoneBuilder(item); - if (index < 0 || index >= forZones.size()) { _visitables.get("forZones").add(builder); forZones.add(builder); } else { _visitables.get("forZones").set(index, builder); forZones.set(index, builder);} - return (A)this; - } - public A addToForZones(io.kubernetes.client.openapi.models.V1ForZone... items) { - if (this.forZones == null) {this.forZones = new ArrayList();} - for (V1ForZone item : items) {V1ForZoneBuilder builder = new V1ForZoneBuilder(item);_visitables.get("forZones").add(builder);this.forZones.add(builder);} return (A)this; - } - public A addAllToForZones(Collection items) { - if (this.forZones == null) {this.forZones = new ArrayList();} - for (V1ForZone item : items) {V1ForZoneBuilder builder = new V1ForZoneBuilder(item);_visitables.get("forZones").add(builder);this.forZones.add(builder);} return (A)this; - } - public A removeFromForZones(io.kubernetes.client.openapi.models.V1ForZone... items) { - for (V1ForZone item : items) {V1ForZoneBuilder builder = new V1ForZoneBuilder(item);_visitables.get("forZones").remove(builder);if (this.forZones != null) {this.forZones.remove(builder);}} return (A)this; - } - public A removeAllFromForZones(Collection items) { - for (V1ForZone item : items) {V1ForZoneBuilder builder = new V1ForZoneBuilder(item);_visitables.get("forZones").remove(builder);if (this.forZones != null) {this.forZones.remove(builder);}} return (A)this; - } - public A removeMatchingFromForZones(Predicate predicate) { - if (forZones == null) return (A) this; - final Iterator each = forZones.iterator(); - final List visitables = _visitables.get("forZones"); - while (each.hasNext()) { - V1ForZoneBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildForZones instead. - * @return The buildable object. - */ - @Deprecated - public List getForZones() { - return forZones != null ? build(forZones) : null; - } - public List buildForZones() { - return forZones != null ? build(forZones) : null; - } - public V1ForZone buildForZone(int index) { - return this.forZones.get(index).build(); - } - public V1ForZone buildFirstForZone() { - return this.forZones.get(0).build(); - } - public V1ForZone buildLastForZone() { - return this.forZones.get(forZones.size() - 1).build(); - } - public V1ForZone buildMatchingForZone(Predicate predicate) { - for (V1ForZoneBuilder item: forZones) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingForZone(Predicate predicate) { - for (V1ForZoneBuilder item: forZones) { if(predicate.test(item)){ return true;} } return false; - } - public A withForZones(List forZones) { - if (this.forZones != null) { _visitables.get("forZones").clear();} - if (forZones != null) {this.forZones = new ArrayList(); for (V1ForZone item : forZones){this.addToForZones(item);}} else { this.forZones = null;} return (A) this; - } - public A withForZones(io.kubernetes.client.openapi.models.V1ForZone... forZones) { - if (this.forZones != null) {this.forZones.clear(); _visitables.remove("forZones"); } - if (forZones != null) {for (V1ForZone item :forZones){ this.addToForZones(item);}} return (A) this; - } - public Boolean hasForZones() { - return forZones != null && !forZones.isEmpty(); - } - public V1EndpointHintsFluentImpl.ForZonesNested addNewForZone() { - return new V1EndpointHintsFluentImpl.ForZonesNestedImpl(); - } - public V1EndpointHintsFluentImpl.ForZonesNested addNewForZoneLike(V1ForZone item) { - return new V1EndpointHintsFluentImpl.ForZonesNestedImpl(-1, item); - } - public V1EndpointHintsFluentImpl.ForZonesNested setNewForZoneLike(int index,V1ForZone item) { - return new V1EndpointHintsFluentImpl.ForZonesNestedImpl(index, item); - } - public V1EndpointHintsFluentImpl.ForZonesNested editForZone(int index) { - if (forZones.size() <= index) throw new RuntimeException("Can't edit forZones. Index exceeds size."); - return setNewForZoneLike(index, buildForZone(index)); - } - public V1EndpointHintsFluentImpl.ForZonesNested editFirstForZone() { - if (forZones.size() == 0) throw new RuntimeException("Can't edit first forZones. The list is empty."); - return setNewForZoneLike(0, buildForZone(0)); - } - public V1EndpointHintsFluentImpl.ForZonesNested editLastForZone() { - int index = forZones.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last forZones. The list is empty."); - return setNewForZoneLike(index, buildForZone(index)); - } - public V1EndpointHintsFluentImpl.ForZonesNested editMatchingForZone(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ForZoneFluentImpl> implements V1EndpointHintsFluentImpl.ForZonesNested,Nested{ - ForZonesNestedImpl(int index,V1ForZone item) { - this.index = index; - this.builder = new V1ForZoneBuilder(this, item); - } - ForZonesNestedImpl() { - this.index = -1; - this.builder = new V1ForZoneBuilder(this); - } - V1ForZoneBuilder builder; - int index; - public N and() { - return (N) V1EndpointHintsFluentImpl.this.setToForZones(index,builder.build()); - } - public N endForZone() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceBuilder.java index 2748efe291..73f8627813 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EndpointSliceBuilder extends V1EndpointSliceFluentImpl implements VisitableBuilder{ +public class V1EndpointSliceBuilder extends V1EndpointSliceFluent implements VisitableBuilder{ public V1EndpointSliceBuilder() { - this(false); - } - public V1EndpointSliceBuilder(Boolean validationEnabled) { - this(new V1EndpointSlice(), validationEnabled); + this(new V1EndpointSlice()); } + public V1EndpointSliceBuilder(V1EndpointSliceFluent fluent) { - this(fluent, false); - } - public V1EndpointSliceBuilder(V1EndpointSliceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EndpointSlice(), validationEnabled); + this(fluent, new V1EndpointSlice()); } + public V1EndpointSliceBuilder(V1EndpointSliceFluent fluent,V1EndpointSlice instance) { - this(fluent, instance, false); - } - public V1EndpointSliceBuilder(V1EndpointSliceFluent fluent,V1EndpointSlice instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAddressType(instance.getAddressType()); - fluent.withApiVersion(instance.getApiVersion()); - fluent.withEndpoints(instance.getEndpoints()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EndpointSliceBuilder(V1EndpointSlice instance) { - this(instance,false); - } - public V1EndpointSliceBuilder(V1EndpointSlice instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAddressType(instance.getAddressType()); - this.withApiVersion(instance.getApiVersion()); - this.withEndpoints(instance.getEndpoints()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EndpointSliceFluent fluent; - Boolean validationEnabled; + public V1EndpointSlice build() { V1EndpointSlice buildable = new V1EndpointSlice(); buildable.setAddressType(fluent.getAddressType()); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setEndpoints(fluent.getEndpoints()); + buildable.setEndpoints(fluent.buildEndpoints()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setPorts(fluent.getPorts()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setPorts(fluent.buildPorts()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceFluent.java index eb604dbc9d..34b0625a8e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceFluent.java @@ -1,120 +1,509 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1EndpointSliceFluent> extends Fluent{ - public String getAddressType(); - public A withAddressType(String addressType); - public Boolean hasAddressType(); - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToEndpoints(int index,V1Endpoint item); - public A setToEndpoints(int index,V1Endpoint item); - public A addToEndpoints(io.kubernetes.client.openapi.models.V1Endpoint... items); - public A addAllToEndpoints(Collection items); - public A removeFromEndpoints(io.kubernetes.client.openapi.models.V1Endpoint... items); - public A removeAllFromEndpoints(Collection items); - public A removeMatchingFromEndpoints(Predicate predicate); - - /** - * This method has been deprecated, please use method buildEndpoints instead. - * @return The buildable object. - */ - @Deprecated - public List getEndpoints(); - public List buildEndpoints(); - public V1Endpoint buildEndpoint(int index); - public V1Endpoint buildFirstEndpoint(); - public V1Endpoint buildLastEndpoint(); - public V1Endpoint buildMatchingEndpoint(Predicate predicate); - public Boolean hasMatchingEndpoint(Predicate predicate); - public A withEndpoints(List endpoints); - public A withEndpoints(io.kubernetes.client.openapi.models.V1Endpoint... endpoints); - public Boolean hasEndpoints(); - public V1EndpointSliceFluent.EndpointsNested addNewEndpoint(); - public V1EndpointSliceFluent.EndpointsNested addNewEndpointLike(V1Endpoint item); - public V1EndpointSliceFluent.EndpointsNested setNewEndpointLike(int index,V1Endpoint item); - public V1EndpointSliceFluent.EndpointsNested editEndpoint(int index); - public V1EndpointSliceFluent.EndpointsNested editFirstEndpoint(); - public V1EndpointSliceFluent.EndpointsNested editLastEndpoint(); - public V1EndpointSliceFluent.EndpointsNested editMatchingEndpoint(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1EndpointSliceFluent.MetadataNested withNewMetadata(); - public V1EndpointSliceFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1EndpointSliceFluent.MetadataNested editMetadata(); - public V1EndpointSliceFluent.MetadataNested editOrNewMetadata(); - public V1EndpointSliceFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A addToPorts(int index,DiscoveryV1EndpointPort item); - public A setToPorts(int index,DiscoveryV1EndpointPort item); - public A addToPorts(io.kubernetes.client.openapi.models.DiscoveryV1EndpointPort... items); - public A addAllToPorts(Collection items); - public A removeFromPorts(io.kubernetes.client.openapi.models.DiscoveryV1EndpointPort... items); - public A removeAllFromPorts(Collection items); - public A removeMatchingFromPorts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts(); - public List buildPorts(); - public DiscoveryV1EndpointPort buildPort(int index); - public DiscoveryV1EndpointPort buildFirstPort(); - public DiscoveryV1EndpointPort buildLastPort(); - public DiscoveryV1EndpointPort buildMatchingPort(Predicate predicate); - public Boolean hasMatchingPort(Predicate predicate); - public A withPorts(List ports); - public A withPorts(io.kubernetes.client.openapi.models.DiscoveryV1EndpointPort... ports); - public Boolean hasPorts(); - public V1EndpointSliceFluent.PortsNested addNewPort(); - public V1EndpointSliceFluent.PortsNested addNewPortLike(DiscoveryV1EndpointPort item); - public V1EndpointSliceFluent.PortsNested setNewPortLike(int index,DiscoveryV1EndpointPort item); - public V1EndpointSliceFluent.PortsNested editPort(int index); - public V1EndpointSliceFluent.PortsNested editFirstPort(); - public V1EndpointSliceFluent.PortsNested editLastPort(); - public V1EndpointSliceFluent.PortsNested editMatchingPort(Predicate predicate); - public interface EndpointsNested extends Nested,V1EndpointFluent>{ - public N and(); - public N endEndpoint(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EndpointSliceFluent> extends BaseFluent{ + public V1EndpointSliceFluent() { + } + + public V1EndpointSliceFluent(V1EndpointSlice instance) { + this.copyInstance(instance); + } + private String addressType; + private String apiVersion; + private ArrayList endpoints; + private String kind; + private V1ObjectMetaBuilder metadata; + private ArrayList ports; + + protected void copyInstance(V1EndpointSlice instance) { + instance = (instance != null ? instance : new V1EndpointSlice()); + if (instance != null) { + this.withAddressType(instance.getAddressType()); + this.withApiVersion(instance.getApiVersion()); + this.withEndpoints(instance.getEndpoints()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withPorts(instance.getPorts()); + } + } + + public String getAddressType() { + return this.addressType; + } + + public A withAddressType(String addressType) { + this.addressType = addressType; + return (A) this; + } + + public boolean hasAddressType() { + return this.addressType != null; + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToEndpoints(int index,V1Endpoint item) { + if (this.endpoints == null) {this.endpoints = new ArrayList();} + V1EndpointBuilder builder = new V1EndpointBuilder(item); + if (index < 0 || index >= endpoints.size()) { _visitables.get("endpoints").add(builder); endpoints.add(builder); } else { _visitables.get("endpoints").add(index, builder); endpoints.add(index, builder);} + return (A)this; + } + + public A setToEndpoints(int index,V1Endpoint item) { + if (this.endpoints == null) {this.endpoints = new ArrayList();} + V1EndpointBuilder builder = new V1EndpointBuilder(item); + if (index < 0 || index >= endpoints.size()) { _visitables.get("endpoints").add(builder); endpoints.add(builder); } else { _visitables.get("endpoints").set(index, builder); endpoints.set(index, builder);} + return (A)this; + } + + public A addToEndpoints(io.kubernetes.client.openapi.models.V1Endpoint... items) { + if (this.endpoints == null) {this.endpoints = new ArrayList();} + for (V1Endpoint item : items) {V1EndpointBuilder builder = new V1EndpointBuilder(item);_visitables.get("endpoints").add(builder);this.endpoints.add(builder);} return (A)this; + } + + public A addAllToEndpoints(Collection items) { + if (this.endpoints == null) {this.endpoints = new ArrayList();} + for (V1Endpoint item : items) {V1EndpointBuilder builder = new V1EndpointBuilder(item);_visitables.get("endpoints").add(builder);this.endpoints.add(builder);} return (A)this; + } + + public A removeFromEndpoints(io.kubernetes.client.openapi.models.V1Endpoint... items) { + if (this.endpoints == null) return (A)this; + for (V1Endpoint item : items) {V1EndpointBuilder builder = new V1EndpointBuilder(item);_visitables.get("endpoints").remove(builder); this.endpoints.remove(builder);} return (A)this; + } + + public A removeAllFromEndpoints(Collection items) { + if (this.endpoints == null) return (A)this; + for (V1Endpoint item : items) {V1EndpointBuilder builder = new V1EndpointBuilder(item);_visitables.get("endpoints").remove(builder); this.endpoints.remove(builder);} return (A)this; + } + + public A removeMatchingFromEndpoints(Predicate predicate) { + if (endpoints == null) return (A) this; + final Iterator each = endpoints.iterator(); + final List visitables = _visitables.get("endpoints"); + while (each.hasNext()) { + V1EndpointBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildEndpoints() { + return this.endpoints != null ? build(endpoints) : null; + } + + public V1Endpoint buildEndpoint(int index) { + return this.endpoints.get(index).build(); + } + + public V1Endpoint buildFirstEndpoint() { + return this.endpoints.get(0).build(); + } + + public V1Endpoint buildLastEndpoint() { + return this.endpoints.get(endpoints.size() - 1).build(); + } + + public V1Endpoint buildMatchingEndpoint(Predicate predicate) { + for (V1EndpointBuilder item : endpoints) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingEndpoint(Predicate predicate) { + for (V1EndpointBuilder item : endpoints) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withEndpoints(List endpoints) { + if (this.endpoints != null) { + this._visitables.get("endpoints").clear(); + } + if (endpoints != null) { + this.endpoints = new ArrayList(); + for (V1Endpoint item : endpoints) { + this.addToEndpoints(item); + } + } else { + this.endpoints = null; + } + return (A) this; + } + + public A withEndpoints(io.kubernetes.client.openapi.models.V1Endpoint... endpoints) { + if (this.endpoints != null) { + this.endpoints.clear(); + _visitables.remove("endpoints"); + } + if (endpoints != null) { + for (V1Endpoint item : endpoints) { + this.addToEndpoints(item); + } + } + return (A) this; + } + + public boolean hasEndpoints() { + return this.endpoints != null && !this.endpoints.isEmpty(); + } + + public EndpointsNested addNewEndpoint() { + return new EndpointsNested(-1, null); + } + + public EndpointsNested addNewEndpointLike(V1Endpoint item) { + return new EndpointsNested(-1, item); + } + + public EndpointsNested setNewEndpointLike(int index,V1Endpoint item) { + return new EndpointsNested(index, item); + } + + public EndpointsNested editEndpoint(int index) { + if (endpoints.size() <= index) throw new RuntimeException("Can't edit endpoints. Index exceeds size."); + return setNewEndpointLike(index, buildEndpoint(index)); + } + + public EndpointsNested editFirstEndpoint() { + if (endpoints.size() == 0) throw new RuntimeException("Can't edit first endpoints. The list is empty."); + return setNewEndpointLike(0, buildEndpoint(0)); + } + + public EndpointsNested editLastEndpoint() { + int index = endpoints.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last endpoints. The list is empty."); + return setNewEndpointLike(index, buildEndpoint(index)); + } + + public EndpointsNested editMatchingEndpoint(Predicate predicate) { + int index = -1; + for (int i=0;i extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public A addToPorts(int index,DiscoveryV1EndpointPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} + return (A)this; + } + + public A setToPorts(int index,DiscoveryV1EndpointPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} + return (A)this; + } + + public A addToPorts(io.kubernetes.client.openapi.models.DiscoveryV1EndpointPort... items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (DiscoveryV1EndpointPort item : items) {DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A addAllToPorts(Collection items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (DiscoveryV1EndpointPort item : items) {DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A removeFromPorts(io.kubernetes.client.openapi.models.DiscoveryV1EndpointPort... items) { + if (this.ports == null) return (A)this; + for (DiscoveryV1EndpointPort item : items) {DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeAllFromPorts(Collection items) { + if (this.ports == null) return (A)this; + for (DiscoveryV1EndpointPort item : items) {DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeMatchingFromPorts(Predicate predicate) { + if (ports == null) return (A) this; + final Iterator each = ports.iterator(); + final List visitables = _visitables.get("ports"); + while (each.hasNext()) { + DiscoveryV1EndpointPortBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPorts() { + return this.ports != null ? build(ports) : null; + } + + public DiscoveryV1EndpointPort buildPort(int index) { + return this.ports.get(index).build(); + } + + public DiscoveryV1EndpointPort buildFirstPort() { + return this.ports.get(0).build(); + } + + public DiscoveryV1EndpointPort buildLastPort() { + return this.ports.get(ports.size() - 1).build(); + } + + public DiscoveryV1EndpointPort buildMatchingPort(Predicate predicate) { + for (DiscoveryV1EndpointPortBuilder item : ports) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPort(Predicate predicate) { + for (DiscoveryV1EndpointPortBuilder item : ports) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPorts(List ports) { + if (this.ports != null) { + this._visitables.get("ports").clear(); + } + if (ports != null) { + this.ports = new ArrayList(); + for (DiscoveryV1EndpointPort item : ports) { + this.addToPorts(item); + } + } else { + this.ports = null; + } + return (A) this; + } + + public A withPorts(io.kubernetes.client.openapi.models.DiscoveryV1EndpointPort... ports) { + if (this.ports != null) { + this.ports.clear(); + _visitables.remove("ports"); + } + if (ports != null) { + for (DiscoveryV1EndpointPort item : ports) { + this.addToPorts(item); + } + } + return (A) this; + } + + public boolean hasPorts() { + return this.ports != null && !this.ports.isEmpty(); + } + + public PortsNested addNewPort() { + return new PortsNested(-1, null); + } + + public PortsNested addNewPortLike(DiscoveryV1EndpointPort item) { + return new PortsNested(-1, item); + } + + public PortsNested setNewPortLike(int index,DiscoveryV1EndpointPort item) { + return new PortsNested(index, item); + } + + public PortsNested editPort(int index) { + if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editFirstPort() { + if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); + return setNewPortLike(0, buildPort(0)); + } + + public PortsNested editLastPort() { + int index = ports.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editMatchingPort(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1EndpointFluent> implements Nested{ + EndpointsNested(int index,V1Endpoint item) { + this.index = index; + this.builder = new V1EndpointBuilder(this, item); + } + V1EndpointBuilder builder; + int index; + + public N and() { + return (N) V1EndpointSliceFluent.this.setToEndpoints(index,builder.build()); + } + + public N endEndpoint() { + return and(); + } + } - public interface PortsNested extends Nested,DiscoveryV1EndpointPortFluent>{ - public N and(); - public N endPort(); + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1EndpointSliceFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + } + public class PortsNested extends DiscoveryV1EndpointPortFluent> implements Nested{ + PortsNested(int index,DiscoveryV1EndpointPort item) { + this.index = index; + this.builder = new DiscoveryV1EndpointPortBuilder(this, item); + } + DiscoveryV1EndpointPortBuilder builder; + int index; + + public N and() { + return (N) V1EndpointSliceFluent.this.setToPorts(index,builder.build()); + } + + public N endPort() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceFluentImpl.java deleted file mode 100644 index 2615713936..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceFluentImpl.java +++ /dev/null @@ -1,404 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EndpointSliceFluentImpl> extends BaseFluent implements V1EndpointSliceFluent{ - public V1EndpointSliceFluentImpl() { - } - public V1EndpointSliceFluentImpl(V1EndpointSlice instance) { - if (instance != null) { - this.withAddressType(instance.getAddressType()); - this.withApiVersion(instance.getApiVersion()); - this.withEndpoints(instance.getEndpoints()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withPorts(instance.getPorts()); - } - } - private String addressType; - private String apiVersion; - private ArrayList endpoints; - private String kind; - private V1ObjectMetaBuilder metadata; - private ArrayList ports; - public String getAddressType() { - return this.addressType; - } - public A withAddressType(String addressType) { - this.addressType=addressType; return (A) this; - } - public Boolean hasAddressType() { - return this.addressType != null; - } - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToEndpoints(int index,V1Endpoint item) { - if (this.endpoints == null) {this.endpoints = new ArrayList();} - V1EndpointBuilder builder = new V1EndpointBuilder(item); - if (index < 0 || index >= endpoints.size()) { _visitables.get("endpoints").add(builder); endpoints.add(builder); } else { _visitables.get("endpoints").add(index, builder); endpoints.add(index, builder);} - return (A)this; - } - public A setToEndpoints(int index,V1Endpoint item) { - if (this.endpoints == null) {this.endpoints = new ArrayList();} - V1EndpointBuilder builder = new V1EndpointBuilder(item); - if (index < 0 || index >= endpoints.size()) { _visitables.get("endpoints").add(builder); endpoints.add(builder); } else { _visitables.get("endpoints").set(index, builder); endpoints.set(index, builder);} - return (A)this; - } - public A addToEndpoints(io.kubernetes.client.openapi.models.V1Endpoint... items) { - if (this.endpoints == null) {this.endpoints = new ArrayList();} - for (V1Endpoint item : items) {V1EndpointBuilder builder = new V1EndpointBuilder(item);_visitables.get("endpoints").add(builder);this.endpoints.add(builder);} return (A)this; - } - public A addAllToEndpoints(Collection items) { - if (this.endpoints == null) {this.endpoints = new ArrayList();} - for (V1Endpoint item : items) {V1EndpointBuilder builder = new V1EndpointBuilder(item);_visitables.get("endpoints").add(builder);this.endpoints.add(builder);} return (A)this; - } - public A removeFromEndpoints(io.kubernetes.client.openapi.models.V1Endpoint... items) { - for (V1Endpoint item : items) {V1EndpointBuilder builder = new V1EndpointBuilder(item);_visitables.get("endpoints").remove(builder);if (this.endpoints != null) {this.endpoints.remove(builder);}} return (A)this; - } - public A removeAllFromEndpoints(Collection items) { - for (V1Endpoint item : items) {V1EndpointBuilder builder = new V1EndpointBuilder(item);_visitables.get("endpoints").remove(builder);if (this.endpoints != null) {this.endpoints.remove(builder);}} return (A)this; - } - public A removeMatchingFromEndpoints(Predicate predicate) { - if (endpoints == null) return (A) this; - final Iterator each = endpoints.iterator(); - final List visitables = _visitables.get("endpoints"); - while (each.hasNext()) { - V1EndpointBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildEndpoints instead. - * @return The buildable object. - */ - @Deprecated - public List getEndpoints() { - return endpoints != null ? build(endpoints) : null; - } - public List buildEndpoints() { - return endpoints != null ? build(endpoints) : null; - } - public V1Endpoint buildEndpoint(int index) { - return this.endpoints.get(index).build(); - } - public V1Endpoint buildFirstEndpoint() { - return this.endpoints.get(0).build(); - } - public V1Endpoint buildLastEndpoint() { - return this.endpoints.get(endpoints.size() - 1).build(); - } - public V1Endpoint buildMatchingEndpoint(Predicate predicate) { - for (V1EndpointBuilder item: endpoints) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingEndpoint(Predicate predicate) { - for (V1EndpointBuilder item: endpoints) { if(predicate.test(item)){ return true;} } return false; - } - public A withEndpoints(List endpoints) { - if (this.endpoints != null) { _visitables.get("endpoints").clear();} - if (endpoints != null) {this.endpoints = new ArrayList(); for (V1Endpoint item : endpoints){this.addToEndpoints(item);}} else { this.endpoints = null;} return (A) this; - } - public A withEndpoints(io.kubernetes.client.openapi.models.V1Endpoint... endpoints) { - if (this.endpoints != null) {this.endpoints.clear(); _visitables.remove("endpoints"); } - if (endpoints != null) {for (V1Endpoint item :endpoints){ this.addToEndpoints(item);}} return (A) this; - } - public Boolean hasEndpoints() { - return endpoints != null && !endpoints.isEmpty(); - } - public V1EndpointSliceFluentImpl.EndpointsNested addNewEndpoint() { - return new V1EndpointSliceFluentImpl.EndpointsNestedImpl(); - } - public V1EndpointSliceFluentImpl.EndpointsNested addNewEndpointLike(V1Endpoint item) { - return new V1EndpointSliceFluentImpl.EndpointsNestedImpl(-1, item); - } - public V1EndpointSliceFluentImpl.EndpointsNested setNewEndpointLike(int index,V1Endpoint item) { - return new V1EndpointSliceFluentImpl.EndpointsNestedImpl(index, item); - } - public V1EndpointSliceFluentImpl.EndpointsNested editEndpoint(int index) { - if (endpoints.size() <= index) throw new RuntimeException("Can't edit endpoints. Index exceeds size."); - return setNewEndpointLike(index, buildEndpoint(index)); - } - public V1EndpointSliceFluentImpl.EndpointsNested editFirstEndpoint() { - if (endpoints.size() == 0) throw new RuntimeException("Can't edit first endpoints. The list is empty."); - return setNewEndpointLike(0, buildEndpoint(0)); - } - public V1EndpointSliceFluentImpl.EndpointsNested editLastEndpoint() { - int index = endpoints.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last endpoints. The list is empty."); - return setNewEndpointLike(index, buildEndpoint(index)); - } - public V1EndpointSliceFluentImpl.EndpointsNested editMatchingEndpoint(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1EndpointSliceFluentImpl.MetadataNestedImpl(); - } - public V1EndpointSliceFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1EndpointSliceFluentImpl.MetadataNestedImpl(item); - } - public V1EndpointSliceFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1EndpointSliceFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1EndpointSliceFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public A addToPorts(int index,DiscoveryV1EndpointPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} - return (A)this; - } - public A setToPorts(int index,DiscoveryV1EndpointPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} - return (A)this; - } - public A addToPorts(io.kubernetes.client.openapi.models.DiscoveryV1EndpointPort... items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (DiscoveryV1EndpointPort item : items) {DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A addAllToPorts(Collection items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (DiscoveryV1EndpointPort item : items) {DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A removeFromPorts(io.kubernetes.client.openapi.models.DiscoveryV1EndpointPort... items) { - for (DiscoveryV1EndpointPort item : items) {DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeAllFromPorts(Collection items) { - for (DiscoveryV1EndpointPort item : items) {DiscoveryV1EndpointPortBuilder builder = new DiscoveryV1EndpointPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeMatchingFromPorts(Predicate predicate) { - if (ports == null) return (A) this; - final Iterator each = ports.iterator(); - final List visitables = _visitables.get("ports"); - while (each.hasNext()) { - DiscoveryV1EndpointPortBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts() { - return ports != null ? build(ports) : null; - } - public List buildPorts() { - return ports != null ? build(ports) : null; - } - public DiscoveryV1EndpointPort buildPort(int index) { - return this.ports.get(index).build(); - } - public DiscoveryV1EndpointPort buildFirstPort() { - return this.ports.get(0).build(); - } - public DiscoveryV1EndpointPort buildLastPort() { - return this.ports.get(ports.size() - 1).build(); - } - public DiscoveryV1EndpointPort buildMatchingPort(Predicate predicate) { - for (DiscoveryV1EndpointPortBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPort(Predicate predicate) { - for (DiscoveryV1EndpointPortBuilder item: ports) { if(predicate.test(item)){ return true;} } return false; - } - public A withPorts(List ports) { - if (this.ports != null) { _visitables.get("ports").clear();} - if (ports != null) {this.ports = new ArrayList(); for (DiscoveryV1EndpointPort item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this; - } - public A withPorts(io.kubernetes.client.openapi.models.DiscoveryV1EndpointPort... ports) { - if (this.ports != null) {this.ports.clear(); _visitables.remove("ports"); } - if (ports != null) {for (DiscoveryV1EndpointPort item :ports){ this.addToPorts(item);}} return (A) this; - } - public Boolean hasPorts() { - return ports != null && !ports.isEmpty(); - } - public V1EndpointSliceFluentImpl.PortsNested addNewPort() { - return new V1EndpointSliceFluentImpl.PortsNestedImpl(); - } - public V1EndpointSliceFluentImpl.PortsNested addNewPortLike(DiscoveryV1EndpointPort item) { - return new V1EndpointSliceFluentImpl.PortsNestedImpl(-1, item); - } - public V1EndpointSliceFluentImpl.PortsNested setNewPortLike(int index,DiscoveryV1EndpointPort item) { - return new V1EndpointSliceFluentImpl.PortsNestedImpl(index, item); - } - public V1EndpointSliceFluentImpl.PortsNested editPort(int index) { - if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); - return setNewPortLike(index, buildPort(index)); - } - public V1EndpointSliceFluentImpl.PortsNested editFirstPort() { - if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); - return setNewPortLike(0, buildPort(0)); - } - public V1EndpointSliceFluentImpl.PortsNested editLastPort() { - int index = ports.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); - return setNewPortLike(index, buildPort(index)); - } - public V1EndpointSliceFluentImpl.PortsNested editMatchingPort(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1EndpointFluentImpl> implements V1EndpointSliceFluentImpl.EndpointsNested,Nested{ - EndpointsNestedImpl(int index,V1Endpoint item) { - this.index = index; - this.builder = new V1EndpointBuilder(this, item); - } - EndpointsNestedImpl() { - this.index = -1; - this.builder = new V1EndpointBuilder(this); - } - V1EndpointBuilder builder; - int index; - public N and() { - return (N) V1EndpointSliceFluentImpl.this.setToEndpoints(index,builder.build()); - } - public N endEndpoint() { - return and(); - } - - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1EndpointSliceFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1EndpointSliceFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class PortsNestedImpl extends DiscoveryV1EndpointPortFluentImpl> implements V1EndpointSliceFluentImpl.PortsNested,Nested{ - PortsNestedImpl(int index,DiscoveryV1EndpointPort item) { - this.index = index; - this.builder = new DiscoveryV1EndpointPortBuilder(this, item); - } - PortsNestedImpl() { - this.index = -1; - this.builder = new DiscoveryV1EndpointPortBuilder(this); - } - DiscoveryV1EndpointPortBuilder builder; - int index; - public N and() { - return (N) V1EndpointSliceFluentImpl.this.setToPorts(index,builder.build()); - } - public N endPort() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListBuilder.java index ebc310fd4d..928d69b92e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EndpointSliceListBuilder extends V1EndpointSliceListFluentImpl implements VisitableBuilder{ +public class V1EndpointSliceListBuilder extends V1EndpointSliceListFluent implements VisitableBuilder{ public V1EndpointSliceListBuilder() { - this(false); - } - public V1EndpointSliceListBuilder(Boolean validationEnabled) { - this(new V1EndpointSliceList(), validationEnabled); + this(new V1EndpointSliceList()); } + public V1EndpointSliceListBuilder(V1EndpointSliceListFluent fluent) { - this(fluent, false); - } - public V1EndpointSliceListBuilder(V1EndpointSliceListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EndpointSliceList(), validationEnabled); + this(fluent, new V1EndpointSliceList()); } + public V1EndpointSliceListBuilder(V1EndpointSliceListFluent fluent,V1EndpointSliceList instance) { - this(fluent, instance, false); - } - public V1EndpointSliceListBuilder(V1EndpointSliceListFluent fluent,V1EndpointSliceList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EndpointSliceListBuilder(V1EndpointSliceList instance) { - this(instance,false); - } - public V1EndpointSliceListBuilder(V1EndpointSliceList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EndpointSliceListFluent fluent; - Boolean validationEnabled; + public V1EndpointSliceList build() { V1EndpointSliceList buildable = new V1EndpointSliceList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListFluent.java index c204fa1bc5..892fd476d7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1EndpointSliceListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1EndpointSlice item); - public A setToItems(int index,V1EndpointSlice item); - public A addToItems(io.kubernetes.client.openapi.models.V1EndpointSlice... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1EndpointSlice... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1EndpointSlice buildItem(int index); - public V1EndpointSlice buildFirstItem(); - public V1EndpointSlice buildLastItem(); - public V1EndpointSlice buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1EndpointSlice... items); - public Boolean hasItems(); - public V1EndpointSliceListFluent.ItemsNested addNewItem(); - public V1EndpointSliceListFluent.ItemsNested addNewItemLike(V1EndpointSlice item); - public V1EndpointSliceListFluent.ItemsNested setNewItemLike(int index,V1EndpointSlice item); - public V1EndpointSliceListFluent.ItemsNested editItem(int index); - public V1EndpointSliceListFluent.ItemsNested editFirstItem(); - public V1EndpointSliceListFluent.ItemsNested editLastItem(); - public V1EndpointSliceListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1EndpointSliceListFluent.MetadataNested withNewMetadata(); - public V1EndpointSliceListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1EndpointSliceListFluent.MetadataNested editMetadata(); - public V1EndpointSliceListFluent.MetadataNested editOrNewMetadata(); - public V1EndpointSliceListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1EndpointSliceFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EndpointSliceListFluent> extends BaseFluent{ + public V1EndpointSliceListFluent() { + } + + public V1EndpointSliceListFluent(V1EndpointSliceList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1EndpointSliceList instance) { + instance = (instance != null ? instance : new V1EndpointSliceList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1EndpointSlice item) { + if (this.items == null) {this.items = new ArrayList();} + V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1EndpointSlice item) { + if (this.items == null) {this.items = new ArrayList();} + V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1EndpointSlice... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1EndpointSlice item : items) {V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1EndpointSlice item : items) {V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1EndpointSlice... items) { + if (this.items == null) return (A)this; + for (V1EndpointSlice item : items) {V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1EndpointSlice item : items) {V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1EndpointSliceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1EndpointSlice buildItem(int index) { + return this.items.get(index).build(); + } + + public V1EndpointSlice buildFirstItem() { + return this.items.get(0).build(); + } + + public V1EndpointSlice buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1EndpointSlice buildMatchingItem(Predicate predicate) { + for (V1EndpointSliceBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1EndpointSliceBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1EndpointSlice item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1EndpointSlice... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1EndpointSlice item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1EndpointSlice item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1EndpointSlice item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EndpointSliceListFluent that = (V1EndpointSliceListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1EndpointSliceFluent> implements Nested{ + ItemsNested(int index,V1EndpointSlice item) { + this.index = index; + this.builder = new V1EndpointSliceBuilder(this, item); + } + V1EndpointSliceBuilder builder; + int index; + public N and() { + return (N) V1EndpointSliceListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1EndpointSliceListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListFluentImpl.java deleted file mode 100644 index 40e2584270..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSliceListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EndpointSliceListFluentImpl> extends BaseFluent implements V1EndpointSliceListFluent{ - public V1EndpointSliceListFluentImpl() { - } - public V1EndpointSliceListFluentImpl(V1EndpointSliceList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1EndpointSlice item) { - if (this.items == null) {this.items = new ArrayList();} - V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1EndpointSlice item) { - if (this.items == null) {this.items = new ArrayList();} - V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1EndpointSlice... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1EndpointSlice item : items) {V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1EndpointSlice item : items) {V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1EndpointSlice... items) { - for (V1EndpointSlice item : items) {V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1EndpointSlice item : items) {V1EndpointSliceBuilder builder = new V1EndpointSliceBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1EndpointSliceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1EndpointSlice buildItem(int index) { - return this.items.get(index).build(); - } - public V1EndpointSlice buildFirstItem() { - return this.items.get(0).build(); - } - public V1EndpointSlice buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1EndpointSlice buildMatchingItem(Predicate predicate) { - for (V1EndpointSliceBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1EndpointSliceBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1EndpointSlice item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1EndpointSlice... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1EndpointSlice item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1EndpointSliceListFluentImpl.ItemsNested addNewItem() { - return new V1EndpointSliceListFluentImpl.ItemsNestedImpl(); - } - public V1EndpointSliceListFluentImpl.ItemsNested addNewItemLike(V1EndpointSlice item) { - return new V1EndpointSliceListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1EndpointSliceListFluentImpl.ItemsNested setNewItemLike(int index,V1EndpointSlice item) { - return new V1EndpointSliceListFluentImpl.ItemsNestedImpl(index, item); - } - public V1EndpointSliceListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1EndpointSliceListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1EndpointSliceListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1EndpointSliceListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1EndpointSliceListFluentImpl.MetadataNestedImpl(); - } - public V1EndpointSliceListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1EndpointSliceListFluentImpl.MetadataNestedImpl(item); - } - public V1EndpointSliceListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1EndpointSliceListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1EndpointSliceListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EndpointSliceListFluentImpl that = (V1EndpointSliceListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1EndpointSliceFluentImpl> implements V1EndpointSliceListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1EndpointSlice item) { - this.index = index; - this.builder = new V1EndpointSliceBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1EndpointSliceBuilder(this); - } - V1EndpointSliceBuilder builder; - int index; - public N and() { - return (N) V1EndpointSliceListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1EndpointSliceListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1EndpointSliceListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetBuilder.java index 88df91802b..fdfb3d0bc0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EndpointSubsetBuilder extends V1EndpointSubsetFluentImpl implements VisitableBuilder{ +public class V1EndpointSubsetBuilder extends V1EndpointSubsetFluent implements VisitableBuilder{ public V1EndpointSubsetBuilder() { - this(false); - } - public V1EndpointSubsetBuilder(Boolean validationEnabled) { - this(new V1EndpointSubset(), validationEnabled); + this(new V1EndpointSubset()); } + public V1EndpointSubsetBuilder(V1EndpointSubsetFluent fluent) { - this(fluent, false); - } - public V1EndpointSubsetBuilder(V1EndpointSubsetFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EndpointSubset(), validationEnabled); + this(fluent, new V1EndpointSubset()); } + public V1EndpointSubsetBuilder(V1EndpointSubsetFluent fluent,V1EndpointSubset instance) { - this(fluent, instance, false); - } - public V1EndpointSubsetBuilder(V1EndpointSubsetFluent fluent,V1EndpointSubset instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAddresses(instance.getAddresses()); - fluent.withNotReadyAddresses(instance.getNotReadyAddresses()); - fluent.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EndpointSubsetBuilder(V1EndpointSubset instance) { - this(instance,false); - } - public V1EndpointSubsetBuilder(V1EndpointSubset instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAddresses(instance.getAddresses()); - this.withNotReadyAddresses(instance.getNotReadyAddresses()); - this.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EndpointSubsetFluent fluent; - Boolean validationEnabled; + public V1EndpointSubset build() { V1EndpointSubset buildable = new V1EndpointSubset(); - buildable.setAddresses(fluent.getAddresses()); - buildable.setNotReadyAddresses(fluent.getNotReadyAddresses()); - buildable.setPorts(fluent.getPorts()); + buildable.setAddresses(fluent.buildAddresses()); + buildable.setNotReadyAddresses(fluent.buildNotReadyAddresses()); + buildable.setPorts(fluent.buildPorts()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetFluent.java index 7bdabaab11..c3e0b82036 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetFluent.java @@ -1,125 +1,571 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1EndpointSubsetFluent> extends Fluent{ - public A addToAddresses(int index,V1EndpointAddress item); - public A setToAddresses(int index,V1EndpointAddress item); - public A addToAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items); - public A addAllToAddresses(Collection items); - public A removeFromAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items); - public A removeAllFromAddresses(Collection items); - public A removeMatchingFromAddresses(Predicate predicate); - - /** - * This method has been deprecated, please use method buildAddresses instead. - * @return The buildable object. - */ - @Deprecated - public List getAddresses(); - public List buildAddresses(); - public V1EndpointAddress buildAddress(int index); - public V1EndpointAddress buildFirstAddress(); - public V1EndpointAddress buildLastAddress(); - public V1EndpointAddress buildMatchingAddress(Predicate predicate); - public Boolean hasMatchingAddress(Predicate predicate); - public A withAddresses(List addresses); - public A withAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... addresses); - public Boolean hasAddresses(); - public V1EndpointSubsetFluent.AddressesNested addNewAddress(); - public V1EndpointSubsetFluent.AddressesNested addNewAddressLike(V1EndpointAddress item); - public V1EndpointSubsetFluent.AddressesNested setNewAddressLike(int index,V1EndpointAddress item); - public V1EndpointSubsetFluent.AddressesNested editAddress(int index); - public V1EndpointSubsetFluent.AddressesNested editFirstAddress(); - public V1EndpointSubsetFluent.AddressesNested editLastAddress(); - public V1EndpointSubsetFluent.AddressesNested editMatchingAddress(Predicate predicate); - public A addToNotReadyAddresses(int index,V1EndpointAddress item); - public A setToNotReadyAddresses(int index,V1EndpointAddress item); - public A addToNotReadyAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items); - public A addAllToNotReadyAddresses(Collection items); - public A removeFromNotReadyAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items); - public A removeAllFromNotReadyAddresses(Collection items); - public A removeMatchingFromNotReadyAddresses(Predicate predicate); - - /** - * This method has been deprecated, please use method buildNotReadyAddresses instead. - * @return The buildable object. - */ - @Deprecated - public List getNotReadyAddresses(); - public List buildNotReadyAddresses(); - public V1EndpointAddress buildNotReadyAddress(int index); - public V1EndpointAddress buildFirstNotReadyAddress(); - public V1EndpointAddress buildLastNotReadyAddress(); - public V1EndpointAddress buildMatchingNotReadyAddress(Predicate predicate); - public Boolean hasMatchingNotReadyAddress(Predicate predicate); - public A withNotReadyAddresses(List notReadyAddresses); - public A withNotReadyAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... notReadyAddresses); - public Boolean hasNotReadyAddresses(); - public V1EndpointSubsetFluent.NotReadyAddressesNested addNewNotReadyAddress(); - public V1EndpointSubsetFluent.NotReadyAddressesNested addNewNotReadyAddressLike(V1EndpointAddress item); - public V1EndpointSubsetFluent.NotReadyAddressesNested setNewNotReadyAddressLike(int index,V1EndpointAddress item); - public V1EndpointSubsetFluent.NotReadyAddressesNested editNotReadyAddress(int index); - public V1EndpointSubsetFluent.NotReadyAddressesNested editFirstNotReadyAddress(); - public V1EndpointSubsetFluent.NotReadyAddressesNested editLastNotReadyAddress(); - public V1EndpointSubsetFluent.NotReadyAddressesNested editMatchingNotReadyAddress(Predicate predicate); - public A addToPorts(int index,CoreV1EndpointPort item); - public A setToPorts(int index,CoreV1EndpointPort item); - public A addToPorts(io.kubernetes.client.openapi.models.CoreV1EndpointPort... items); - public A addAllToPorts(Collection items); - public A removeFromPorts(io.kubernetes.client.openapi.models.CoreV1EndpointPort... items); - public A removeAllFromPorts(Collection items); - public A removeMatchingFromPorts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts(); - public List buildPorts(); - public CoreV1EndpointPort buildPort(int index); - public CoreV1EndpointPort buildFirstPort(); - public CoreV1EndpointPort buildLastPort(); - public CoreV1EndpointPort buildMatchingPort(Predicate predicate); - public Boolean hasMatchingPort(Predicate predicate); - public A withPorts(List ports); - public A withPorts(io.kubernetes.client.openapi.models.CoreV1EndpointPort... ports); - public Boolean hasPorts(); - public V1EndpointSubsetFluent.PortsNested addNewPort(); - public V1EndpointSubsetFluent.PortsNested addNewPortLike(CoreV1EndpointPort item); - public V1EndpointSubsetFluent.PortsNested setNewPortLike(int index,CoreV1EndpointPort item); - public V1EndpointSubsetFluent.PortsNested editPort(int index); - public V1EndpointSubsetFluent.PortsNested editFirstPort(); - public V1EndpointSubsetFluent.PortsNested editLastPort(); - public V1EndpointSubsetFluent.PortsNested editMatchingPort(Predicate predicate); - public interface AddressesNested extends Nested,V1EndpointAddressFluent>{ - public N and(); - public N endAddress(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EndpointSubsetFluent> extends BaseFluent{ + public V1EndpointSubsetFluent() { + } + + public V1EndpointSubsetFluent(V1EndpointSubset instance) { + this.copyInstance(instance); + } + private ArrayList addresses; + private ArrayList notReadyAddresses; + private ArrayList ports; + + protected void copyInstance(V1EndpointSubset instance) { + instance = (instance != null ? instance : new V1EndpointSubset()); + if (instance != null) { + this.withAddresses(instance.getAddresses()); + this.withNotReadyAddresses(instance.getNotReadyAddresses()); + this.withPorts(instance.getPorts()); + } + } + + public A addToAddresses(int index,V1EndpointAddress item) { + if (this.addresses == null) {this.addresses = new ArrayList();} + V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item); + if (index < 0 || index >= addresses.size()) { _visitables.get("addresses").add(builder); addresses.add(builder); } else { _visitables.get("addresses").add(index, builder); addresses.add(index, builder);} + return (A)this; + } + + public A setToAddresses(int index,V1EndpointAddress item) { + if (this.addresses == null) {this.addresses = new ArrayList();} + V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item); + if (index < 0 || index >= addresses.size()) { _visitables.get("addresses").add(builder); addresses.add(builder); } else { _visitables.get("addresses").set(index, builder); addresses.set(index, builder);} + return (A)this; + } + + public A addToAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items) { + if (this.addresses == null) {this.addresses = new ArrayList();} + for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this; + } + + public A addAllToAddresses(Collection items) { + if (this.addresses == null) {this.addresses = new ArrayList();} + for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this; + } + + public A removeFromAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items) { + if (this.addresses == null) return (A)this; + for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("addresses").remove(builder); this.addresses.remove(builder);} return (A)this; + } + + public A removeAllFromAddresses(Collection items) { + if (this.addresses == null) return (A)this; + for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("addresses").remove(builder); this.addresses.remove(builder);} return (A)this; + } + + public A removeMatchingFromAddresses(Predicate predicate) { + if (addresses == null) return (A) this; + final Iterator each = addresses.iterator(); + final List visitables = _visitables.get("addresses"); + while (each.hasNext()) { + V1EndpointAddressBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildAddresses() { + return this.addresses != null ? build(addresses) : null; + } + + public V1EndpointAddress buildAddress(int index) { + return this.addresses.get(index).build(); + } + + public V1EndpointAddress buildFirstAddress() { + return this.addresses.get(0).build(); + } + + public V1EndpointAddress buildLastAddress() { + return this.addresses.get(addresses.size() - 1).build(); + } + + public V1EndpointAddress buildMatchingAddress(Predicate predicate) { + for (V1EndpointAddressBuilder item : addresses) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingAddress(Predicate predicate) { + for (V1EndpointAddressBuilder item : addresses) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAddresses(List addresses) { + if (this.addresses != null) { + this._visitables.get("addresses").clear(); + } + if (addresses != null) { + this.addresses = new ArrayList(); + for (V1EndpointAddress item : addresses) { + this.addToAddresses(item); + } + } else { + this.addresses = null; + } + return (A) this; + } + + public A withAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... addresses) { + if (this.addresses != null) { + this.addresses.clear(); + _visitables.remove("addresses"); + } + if (addresses != null) { + for (V1EndpointAddress item : addresses) { + this.addToAddresses(item); + } + } + return (A) this; + } + + public boolean hasAddresses() { + return this.addresses != null && !this.addresses.isEmpty(); + } + + public AddressesNested addNewAddress() { + return new AddressesNested(-1, null); + } + + public AddressesNested addNewAddressLike(V1EndpointAddress item) { + return new AddressesNested(-1, item); + } + + public AddressesNested setNewAddressLike(int index,V1EndpointAddress item) { + return new AddressesNested(index, item); + } + + public AddressesNested editAddress(int index) { + if (addresses.size() <= index) throw new RuntimeException("Can't edit addresses. Index exceeds size."); + return setNewAddressLike(index, buildAddress(index)); + } + + public AddressesNested editFirstAddress() { + if (addresses.size() == 0) throw new RuntimeException("Can't edit first addresses. The list is empty."); + return setNewAddressLike(0, buildAddress(0)); + } + + public AddressesNested editLastAddress() { + int index = addresses.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last addresses. The list is empty."); + return setNewAddressLike(index, buildAddress(index)); + } + + public AddressesNested editMatchingAddress(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item); + if (index < 0 || index >= notReadyAddresses.size()) { _visitables.get("notReadyAddresses").add(builder); notReadyAddresses.add(builder); } else { _visitables.get("notReadyAddresses").add(index, builder); notReadyAddresses.add(index, builder);} + return (A)this; + } + + public A setToNotReadyAddresses(int index,V1EndpointAddress item) { + if (this.notReadyAddresses == null) {this.notReadyAddresses = new ArrayList();} + V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item); + if (index < 0 || index >= notReadyAddresses.size()) { _visitables.get("notReadyAddresses").add(builder); notReadyAddresses.add(builder); } else { _visitables.get("notReadyAddresses").set(index, builder); notReadyAddresses.set(index, builder);} + return (A)this; + } + + public A addToNotReadyAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items) { + if (this.notReadyAddresses == null) {this.notReadyAddresses = new ArrayList();} + for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("notReadyAddresses").add(builder);this.notReadyAddresses.add(builder);} return (A)this; + } + + public A addAllToNotReadyAddresses(Collection items) { + if (this.notReadyAddresses == null) {this.notReadyAddresses = new ArrayList();} + for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("notReadyAddresses").add(builder);this.notReadyAddresses.add(builder);} return (A)this; + } + + public A removeFromNotReadyAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items) { + if (this.notReadyAddresses == null) return (A)this; + for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("notReadyAddresses").remove(builder); this.notReadyAddresses.remove(builder);} return (A)this; + } + + public A removeAllFromNotReadyAddresses(Collection items) { + if (this.notReadyAddresses == null) return (A)this; + for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("notReadyAddresses").remove(builder); this.notReadyAddresses.remove(builder);} return (A)this; + } + + public A removeMatchingFromNotReadyAddresses(Predicate predicate) { + if (notReadyAddresses == null) return (A) this; + final Iterator each = notReadyAddresses.iterator(); + final List visitables = _visitables.get("notReadyAddresses"); + while (each.hasNext()) { + V1EndpointAddressBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildNotReadyAddresses() { + return this.notReadyAddresses != null ? build(notReadyAddresses) : null; + } + + public V1EndpointAddress buildNotReadyAddress(int index) { + return this.notReadyAddresses.get(index).build(); + } + + public V1EndpointAddress buildFirstNotReadyAddress() { + return this.notReadyAddresses.get(0).build(); + } + + public V1EndpointAddress buildLastNotReadyAddress() { + return this.notReadyAddresses.get(notReadyAddresses.size() - 1).build(); + } + + public V1EndpointAddress buildMatchingNotReadyAddress(Predicate predicate) { + for (V1EndpointAddressBuilder item : notReadyAddresses) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingNotReadyAddress(Predicate predicate) { + for (V1EndpointAddressBuilder item : notReadyAddresses) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNotReadyAddresses(List notReadyAddresses) { + if (this.notReadyAddresses != null) { + this._visitables.get("notReadyAddresses").clear(); + } + if (notReadyAddresses != null) { + this.notReadyAddresses = new ArrayList(); + for (V1EndpointAddress item : notReadyAddresses) { + this.addToNotReadyAddresses(item); + } + } else { + this.notReadyAddresses = null; + } + return (A) this; } - public interface NotReadyAddressesNested extends Nested,V1EndpointAddressFluent>{ - public N and(); - public N endNotReadyAddress(); + + public A withNotReadyAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... notReadyAddresses) { + if (this.notReadyAddresses != null) { + this.notReadyAddresses.clear(); + _visitables.remove("notReadyAddresses"); + } + if (notReadyAddresses != null) { + for (V1EndpointAddress item : notReadyAddresses) { + this.addToNotReadyAddresses(item); + } + } + return (A) this; + } + + public boolean hasNotReadyAddresses() { + return this.notReadyAddresses != null && !this.notReadyAddresses.isEmpty(); + } + + public NotReadyAddressesNested addNewNotReadyAddress() { + return new NotReadyAddressesNested(-1, null); + } + + public NotReadyAddressesNested addNewNotReadyAddressLike(V1EndpointAddress item) { + return new NotReadyAddressesNested(-1, item); + } + + public NotReadyAddressesNested setNewNotReadyAddressLike(int index,V1EndpointAddress item) { + return new NotReadyAddressesNested(index, item); + } + + public NotReadyAddressesNested editNotReadyAddress(int index) { + if (notReadyAddresses.size() <= index) throw new RuntimeException("Can't edit notReadyAddresses. Index exceeds size."); + return setNewNotReadyAddressLike(index, buildNotReadyAddress(index)); + } + + public NotReadyAddressesNested editFirstNotReadyAddress() { + if (notReadyAddresses.size() == 0) throw new RuntimeException("Can't edit first notReadyAddresses. The list is empty."); + return setNewNotReadyAddressLike(0, buildNotReadyAddress(0)); + } + + public NotReadyAddressesNested editLastNotReadyAddress() { + int index = notReadyAddresses.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last notReadyAddresses. The list is empty."); + return setNewNotReadyAddressLike(index, buildNotReadyAddress(index)); + } + + public NotReadyAddressesNested editMatchingNotReadyAddress(Predicate predicate) { + int index = -1; + for (int i=0;i();} + CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} + return (A)this; + } + + public A setToPorts(int index,CoreV1EndpointPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} + return (A)this; + } + + public A addToPorts(io.kubernetes.client.openapi.models.CoreV1EndpointPort... items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (CoreV1EndpointPort item : items) {CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A addAllToPorts(Collection items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (CoreV1EndpointPort item : items) {CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A removeFromPorts(io.kubernetes.client.openapi.models.CoreV1EndpointPort... items) { + if (this.ports == null) return (A)this; + for (CoreV1EndpointPort item : items) {CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeAllFromPorts(Collection items) { + if (this.ports == null) return (A)this; + for (CoreV1EndpointPort item : items) {CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeMatchingFromPorts(Predicate predicate) { + if (ports == null) return (A) this; + final Iterator each = ports.iterator(); + final List visitables = _visitables.get("ports"); + while (each.hasNext()) { + CoreV1EndpointPortBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPorts() { + return this.ports != null ? build(ports) : null; + } + + public CoreV1EndpointPort buildPort(int index) { + return this.ports.get(index).build(); + } + + public CoreV1EndpointPort buildFirstPort() { + return this.ports.get(0).build(); + } + + public CoreV1EndpointPort buildLastPort() { + return this.ports.get(ports.size() - 1).build(); + } + + public CoreV1EndpointPort buildMatchingPort(Predicate predicate) { + for (CoreV1EndpointPortBuilder item : ports) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPort(Predicate predicate) { + for (CoreV1EndpointPortBuilder item : ports) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPorts(List ports) { + if (this.ports != null) { + this._visitables.get("ports").clear(); + } + if (ports != null) { + this.ports = new ArrayList(); + for (CoreV1EndpointPort item : ports) { + this.addToPorts(item); + } + } else { + this.ports = null; + } + return (A) this; + } + + public A withPorts(io.kubernetes.client.openapi.models.CoreV1EndpointPort... ports) { + if (this.ports != null) { + this.ports.clear(); + _visitables.remove("ports"); + } + if (ports != null) { + for (CoreV1EndpointPort item : ports) { + this.addToPorts(item); + } + } + return (A) this; + } + + public boolean hasPorts() { + return this.ports != null && !this.ports.isEmpty(); + } + + public PortsNested addNewPort() { + return new PortsNested(-1, null); + } + + public PortsNested addNewPortLike(CoreV1EndpointPort item) { + return new PortsNested(-1, item); + } + + public PortsNested setNewPortLike(int index,CoreV1EndpointPort item) { + return new PortsNested(index, item); + } + + public PortsNested editPort(int index) { + if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editFirstPort() { + if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); + return setNewPortLike(0, buildPort(0)); + } + + public PortsNested editLastPort() { + int index = ports.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editMatchingPort(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1EndpointAddressFluent> implements Nested{ + AddressesNested(int index,V1EndpointAddress item) { + this.index = index; + this.builder = new V1EndpointAddressBuilder(this, item); + } + V1EndpointAddressBuilder builder; + int index; + + public N and() { + return (N) V1EndpointSubsetFluent.this.setToAddresses(index,builder.build()); + } + public N endAddress() { + return and(); + } + + } - public interface PortsNested extends Nested,CoreV1EndpointPortFluent>{ - public N and(); - public N endPort(); + public class NotReadyAddressesNested extends V1EndpointAddressFluent> implements Nested{ + NotReadyAddressesNested(int index,V1EndpointAddress item) { + this.index = index; + this.builder = new V1EndpointAddressBuilder(this, item); + } + V1EndpointAddressBuilder builder; + int index; + + public N and() { + return (N) V1EndpointSubsetFluent.this.setToNotReadyAddresses(index,builder.build()); + } + public N endNotReadyAddress() { + return and(); + } + + } + public class PortsNested extends CoreV1EndpointPortFluent> implements Nested{ + PortsNested(int index,CoreV1EndpointPort item) { + this.index = index; + this.builder = new CoreV1EndpointPortBuilder(this, item); + } + CoreV1EndpointPortBuilder builder; + int index; + + public N and() { + return (N) V1EndpointSubsetFluent.this.setToPorts(index,builder.build()); + } + + public N endPort() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetFluentImpl.java deleted file mode 100644 index fe9abb8e90..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointSubsetFluentImpl.java +++ /dev/null @@ -1,438 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EndpointSubsetFluentImpl> extends BaseFluent implements V1EndpointSubsetFluent{ - public V1EndpointSubsetFluentImpl() { - } - public V1EndpointSubsetFluentImpl(V1EndpointSubset instance) { - if (instance != null) { - this.withAddresses(instance.getAddresses()); - this.withNotReadyAddresses(instance.getNotReadyAddresses()); - this.withPorts(instance.getPorts()); - } - } - private ArrayList addresses; - private ArrayList notReadyAddresses; - private ArrayList ports; - public A addToAddresses(int index,V1EndpointAddress item) { - if (this.addresses == null) {this.addresses = new ArrayList();} - V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item); - if (index < 0 || index >= addresses.size()) { _visitables.get("addresses").add(builder); addresses.add(builder); } else { _visitables.get("addresses").add(index, builder); addresses.add(index, builder);} - return (A)this; - } - public A setToAddresses(int index,V1EndpointAddress item) { - if (this.addresses == null) {this.addresses = new ArrayList();} - V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item); - if (index < 0 || index >= addresses.size()) { _visitables.get("addresses").add(builder); addresses.add(builder); } else { _visitables.get("addresses").set(index, builder); addresses.set(index, builder);} - return (A)this; - } - public A addToAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items) { - if (this.addresses == null) {this.addresses = new ArrayList();} - for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this; - } - public A addAllToAddresses(Collection items) { - if (this.addresses == null) {this.addresses = new ArrayList();} - for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this; - } - public A removeFromAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items) { - for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("addresses").remove(builder);if (this.addresses != null) {this.addresses.remove(builder);}} return (A)this; - } - public A removeAllFromAddresses(Collection items) { - for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("addresses").remove(builder);if (this.addresses != null) {this.addresses.remove(builder);}} return (A)this; - } - public A removeMatchingFromAddresses(Predicate predicate) { - if (addresses == null) return (A) this; - final Iterator each = addresses.iterator(); - final List visitables = _visitables.get("addresses"); - while (each.hasNext()) { - V1EndpointAddressBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildAddresses instead. - * @return The buildable object. - */ - @Deprecated - public List getAddresses() { - return addresses != null ? build(addresses) : null; - } - public List buildAddresses() { - return addresses != null ? build(addresses) : null; - } - public V1EndpointAddress buildAddress(int index) { - return this.addresses.get(index).build(); - } - public V1EndpointAddress buildFirstAddress() { - return this.addresses.get(0).build(); - } - public V1EndpointAddress buildLastAddress() { - return this.addresses.get(addresses.size() - 1).build(); - } - public V1EndpointAddress buildMatchingAddress(Predicate predicate) { - for (V1EndpointAddressBuilder item: addresses) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingAddress(Predicate predicate) { - for (V1EndpointAddressBuilder item: addresses) { if(predicate.test(item)){ return true;} } return false; - } - public A withAddresses(List addresses) { - if (this.addresses != null) { _visitables.get("addresses").clear();} - if (addresses != null) {this.addresses = new ArrayList(); for (V1EndpointAddress item : addresses){this.addToAddresses(item);}} else { this.addresses = null;} return (A) this; - } - public A withAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... addresses) { - if (this.addresses != null) {this.addresses.clear(); _visitables.remove("addresses"); } - if (addresses != null) {for (V1EndpointAddress item :addresses){ this.addToAddresses(item);}} return (A) this; - } - public Boolean hasAddresses() { - return addresses != null && !addresses.isEmpty(); - } - public V1EndpointSubsetFluentImpl.AddressesNested addNewAddress() { - return new V1EndpointSubsetFluentImpl.AddressesNestedImpl(); - } - public V1EndpointSubsetFluentImpl.AddressesNested addNewAddressLike(V1EndpointAddress item) { - return new V1EndpointSubsetFluentImpl.AddressesNestedImpl(-1, item); - } - public V1EndpointSubsetFluentImpl.AddressesNested setNewAddressLike(int index,V1EndpointAddress item) { - return new V1EndpointSubsetFluentImpl.AddressesNestedImpl(index, item); - } - public V1EndpointSubsetFluentImpl.AddressesNested editAddress(int index) { - if (addresses.size() <= index) throw new RuntimeException("Can't edit addresses. Index exceeds size."); - return setNewAddressLike(index, buildAddress(index)); - } - public V1EndpointSubsetFluentImpl.AddressesNested editFirstAddress() { - if (addresses.size() == 0) throw new RuntimeException("Can't edit first addresses. The list is empty."); - return setNewAddressLike(0, buildAddress(0)); - } - public V1EndpointSubsetFluentImpl.AddressesNested editLastAddress() { - int index = addresses.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last addresses. The list is empty."); - return setNewAddressLike(index, buildAddress(index)); - } - public V1EndpointSubsetFluentImpl.AddressesNested editMatchingAddress(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item); - if (index < 0 || index >= notReadyAddresses.size()) { _visitables.get("notReadyAddresses").add(builder); notReadyAddresses.add(builder); } else { _visitables.get("notReadyAddresses").add(index, builder); notReadyAddresses.add(index, builder);} - return (A)this; - } - public A setToNotReadyAddresses(int index,V1EndpointAddress item) { - if (this.notReadyAddresses == null) {this.notReadyAddresses = new ArrayList();} - V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item); - if (index < 0 || index >= notReadyAddresses.size()) { _visitables.get("notReadyAddresses").add(builder); notReadyAddresses.add(builder); } else { _visitables.get("notReadyAddresses").set(index, builder); notReadyAddresses.set(index, builder);} - return (A)this; - } - public A addToNotReadyAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items) { - if (this.notReadyAddresses == null) {this.notReadyAddresses = new ArrayList();} - for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("notReadyAddresses").add(builder);this.notReadyAddresses.add(builder);} return (A)this; - } - public A addAllToNotReadyAddresses(Collection items) { - if (this.notReadyAddresses == null) {this.notReadyAddresses = new ArrayList();} - for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("notReadyAddresses").add(builder);this.notReadyAddresses.add(builder);} return (A)this; - } - public A removeFromNotReadyAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... items) { - for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("notReadyAddresses").remove(builder);if (this.notReadyAddresses != null) {this.notReadyAddresses.remove(builder);}} return (A)this; - } - public A removeAllFromNotReadyAddresses(Collection items) { - for (V1EndpointAddress item : items) {V1EndpointAddressBuilder builder = new V1EndpointAddressBuilder(item);_visitables.get("notReadyAddresses").remove(builder);if (this.notReadyAddresses != null) {this.notReadyAddresses.remove(builder);}} return (A)this; - } - public A removeMatchingFromNotReadyAddresses(Predicate predicate) { - if (notReadyAddresses == null) return (A) this; - final Iterator each = notReadyAddresses.iterator(); - final List visitables = _visitables.get("notReadyAddresses"); - while (each.hasNext()) { - V1EndpointAddressBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildNotReadyAddresses instead. - * @return The buildable object. - */ - @Deprecated - public List getNotReadyAddresses() { - return notReadyAddresses != null ? build(notReadyAddresses) : null; - } - public List buildNotReadyAddresses() { - return notReadyAddresses != null ? build(notReadyAddresses) : null; - } - public V1EndpointAddress buildNotReadyAddress(int index) { - return this.notReadyAddresses.get(index).build(); - } - public V1EndpointAddress buildFirstNotReadyAddress() { - return this.notReadyAddresses.get(0).build(); - } - public V1EndpointAddress buildLastNotReadyAddress() { - return this.notReadyAddresses.get(notReadyAddresses.size() - 1).build(); - } - public V1EndpointAddress buildMatchingNotReadyAddress(Predicate predicate) { - for (V1EndpointAddressBuilder item: notReadyAddresses) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingNotReadyAddress(Predicate predicate) { - for (V1EndpointAddressBuilder item: notReadyAddresses) { if(predicate.test(item)){ return true;} } return false; - } - public A withNotReadyAddresses(List notReadyAddresses) { - if (this.notReadyAddresses != null) { _visitables.get("notReadyAddresses").clear();} - if (notReadyAddresses != null) {this.notReadyAddresses = new ArrayList(); for (V1EndpointAddress item : notReadyAddresses){this.addToNotReadyAddresses(item);}} else { this.notReadyAddresses = null;} return (A) this; - } - public A withNotReadyAddresses(io.kubernetes.client.openapi.models.V1EndpointAddress... notReadyAddresses) { - if (this.notReadyAddresses != null) {this.notReadyAddresses.clear(); _visitables.remove("notReadyAddresses"); } - if (notReadyAddresses != null) {for (V1EndpointAddress item :notReadyAddresses){ this.addToNotReadyAddresses(item);}} return (A) this; - } - public Boolean hasNotReadyAddresses() { - return notReadyAddresses != null && !notReadyAddresses.isEmpty(); - } - public V1EndpointSubsetFluentImpl.NotReadyAddressesNested addNewNotReadyAddress() { - return new V1EndpointSubsetFluentImpl.NotReadyAddressesNestedImpl(); - } - public V1EndpointSubsetFluentImpl.NotReadyAddressesNested addNewNotReadyAddressLike(V1EndpointAddress item) { - return new V1EndpointSubsetFluentImpl.NotReadyAddressesNestedImpl(-1, item); - } - public V1EndpointSubsetFluentImpl.NotReadyAddressesNested setNewNotReadyAddressLike(int index,V1EndpointAddress item) { - return new V1EndpointSubsetFluentImpl.NotReadyAddressesNestedImpl(index, item); - } - public V1EndpointSubsetFluentImpl.NotReadyAddressesNested editNotReadyAddress(int index) { - if (notReadyAddresses.size() <= index) throw new RuntimeException("Can't edit notReadyAddresses. Index exceeds size."); - return setNewNotReadyAddressLike(index, buildNotReadyAddress(index)); - } - public V1EndpointSubsetFluentImpl.NotReadyAddressesNested editFirstNotReadyAddress() { - if (notReadyAddresses.size() == 0) throw new RuntimeException("Can't edit first notReadyAddresses. The list is empty."); - return setNewNotReadyAddressLike(0, buildNotReadyAddress(0)); - } - public V1EndpointSubsetFluentImpl.NotReadyAddressesNested editLastNotReadyAddress() { - int index = notReadyAddresses.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last notReadyAddresses. The list is empty."); - return setNewNotReadyAddressLike(index, buildNotReadyAddress(index)); - } - public V1EndpointSubsetFluentImpl.NotReadyAddressesNested editMatchingNotReadyAddress(Predicate predicate) { - int index = -1; - for (int i=0;i();} - CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} - return (A)this; - } - public A setToPorts(int index,CoreV1EndpointPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} - return (A)this; - } - public A addToPorts(io.kubernetes.client.openapi.models.CoreV1EndpointPort... items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (CoreV1EndpointPort item : items) {CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A addAllToPorts(Collection items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (CoreV1EndpointPort item : items) {CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A removeFromPorts(io.kubernetes.client.openapi.models.CoreV1EndpointPort... items) { - for (CoreV1EndpointPort item : items) {CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeAllFromPorts(Collection items) { - for (CoreV1EndpointPort item : items) {CoreV1EndpointPortBuilder builder = new CoreV1EndpointPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeMatchingFromPorts(Predicate predicate) { - if (ports == null) return (A) this; - final Iterator each = ports.iterator(); - final List visitables = _visitables.get("ports"); - while (each.hasNext()) { - CoreV1EndpointPortBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts() { - return ports != null ? build(ports) : null; - } - public List buildPorts() { - return ports != null ? build(ports) : null; - } - public CoreV1EndpointPort buildPort(int index) { - return this.ports.get(index).build(); - } - public CoreV1EndpointPort buildFirstPort() { - return this.ports.get(0).build(); - } - public CoreV1EndpointPort buildLastPort() { - return this.ports.get(ports.size() - 1).build(); - } - public CoreV1EndpointPort buildMatchingPort(Predicate predicate) { - for (CoreV1EndpointPortBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPort(Predicate predicate) { - for (CoreV1EndpointPortBuilder item: ports) { if(predicate.test(item)){ return true;} } return false; - } - public A withPorts(List ports) { - if (this.ports != null) { _visitables.get("ports").clear();} - if (ports != null) {this.ports = new ArrayList(); for (CoreV1EndpointPort item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this; - } - public A withPorts(io.kubernetes.client.openapi.models.CoreV1EndpointPort... ports) { - if (this.ports != null) {this.ports.clear(); _visitables.remove("ports"); } - if (ports != null) {for (CoreV1EndpointPort item :ports){ this.addToPorts(item);}} return (A) this; - } - public Boolean hasPorts() { - return ports != null && !ports.isEmpty(); - } - public V1EndpointSubsetFluentImpl.PortsNested addNewPort() { - return new V1EndpointSubsetFluentImpl.PortsNestedImpl(); - } - public V1EndpointSubsetFluentImpl.PortsNested addNewPortLike(CoreV1EndpointPort item) { - return new V1EndpointSubsetFluentImpl.PortsNestedImpl(-1, item); - } - public V1EndpointSubsetFluentImpl.PortsNested setNewPortLike(int index,CoreV1EndpointPort item) { - return new V1EndpointSubsetFluentImpl.PortsNestedImpl(index, item); - } - public V1EndpointSubsetFluentImpl.PortsNested editPort(int index) { - if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); - return setNewPortLike(index, buildPort(index)); - } - public V1EndpointSubsetFluentImpl.PortsNested editFirstPort() { - if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); - return setNewPortLike(0, buildPort(0)); - } - public V1EndpointSubsetFluentImpl.PortsNested editLastPort() { - int index = ports.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); - return setNewPortLike(index, buildPort(index)); - } - public V1EndpointSubsetFluentImpl.PortsNested editMatchingPort(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1EndpointAddressFluentImpl> implements V1EndpointSubsetFluentImpl.AddressesNested,Nested{ - AddressesNestedImpl(int index,V1EndpointAddress item) { - this.index = index; - this.builder = new V1EndpointAddressBuilder(this, item); - } - AddressesNestedImpl() { - this.index = -1; - this.builder = new V1EndpointAddressBuilder(this); - } - V1EndpointAddressBuilder builder; - int index; - public N and() { - return (N) V1EndpointSubsetFluentImpl.this.setToAddresses(index,builder.build()); - } - public N endAddress() { - return and(); - } - - } - class NotReadyAddressesNestedImpl extends V1EndpointAddressFluentImpl> implements V1EndpointSubsetFluentImpl.NotReadyAddressesNested,Nested{ - NotReadyAddressesNestedImpl(int index,V1EndpointAddress item) { - this.index = index; - this.builder = new V1EndpointAddressBuilder(this, item); - } - NotReadyAddressesNestedImpl() { - this.index = -1; - this.builder = new V1EndpointAddressBuilder(this); - } - V1EndpointAddressBuilder builder; - int index; - public N and() { - return (N) V1EndpointSubsetFluentImpl.this.setToNotReadyAddresses(index,builder.build()); - } - public N endNotReadyAddress() { - return and(); - } - - } - class PortsNestedImpl extends CoreV1EndpointPortFluentImpl> implements V1EndpointSubsetFluentImpl.PortsNested,Nested{ - PortsNestedImpl(int index,CoreV1EndpointPort item) { - this.index = index; - this.builder = new CoreV1EndpointPortBuilder(this, item); - } - PortsNestedImpl() { - this.index = -1; - this.builder = new CoreV1EndpointPortBuilder(this); - } - CoreV1EndpointPortBuilder builder; - int index; - public N and() { - return (N) V1EndpointSubsetFluentImpl.this.setToPorts(index,builder.build()); - } - public N endPort() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsBuilder.java index 21281c1f23..13ce826163 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EndpointsBuilder extends V1EndpointsFluentImpl implements VisitableBuilder{ +public class V1EndpointsBuilder extends V1EndpointsFluent implements VisitableBuilder{ public V1EndpointsBuilder() { - this(false); - } - public V1EndpointsBuilder(Boolean validationEnabled) { - this(new V1Endpoints(), validationEnabled); + this(new V1Endpoints()); } + public V1EndpointsBuilder(V1EndpointsFluent fluent) { - this(fluent, false); - } - public V1EndpointsBuilder(V1EndpointsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Endpoints(), validationEnabled); + this(fluent, new V1Endpoints()); } + public V1EndpointsBuilder(V1EndpointsFluent fluent,V1Endpoints instance) { - this(fluent, instance, false); - } - public V1EndpointsBuilder(V1EndpointsFluent fluent,V1Endpoints instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSubsets(instance.getSubsets()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EndpointsBuilder(V1Endpoints instance) { - this(instance,false); - } - public V1EndpointsBuilder(V1Endpoints instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSubsets(instance.getSubsets()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EndpointsFluent fluent; - Boolean validationEnabled; + public V1Endpoints build() { V1Endpoints buildable = new V1Endpoints(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSubsets(fluent.getSubsets()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSubsets(fluent.buildSubsets()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsFluent.java index 77fd3fbd6d..14e9bfcc47 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1EndpointsFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1EndpointsFluent.MetadataNested withNewMetadata(); - public V1EndpointsFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1EndpointsFluent.MetadataNested editMetadata(); - public V1EndpointsFluent.MetadataNested editOrNewMetadata(); - public V1EndpointsFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A addToSubsets(int index,V1EndpointSubset item); - public A setToSubsets(int index,V1EndpointSubset item); - public A addToSubsets(io.kubernetes.client.openapi.models.V1EndpointSubset... items); - public A addAllToSubsets(Collection items); - public A removeFromSubsets(io.kubernetes.client.openapi.models.V1EndpointSubset... items); - public A removeAllFromSubsets(Collection items); - public A removeMatchingFromSubsets(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSubsets instead. - * @return The buildable object. - */ - @Deprecated - public List getSubsets(); - public List buildSubsets(); - public V1EndpointSubset buildSubset(int index); - public V1EndpointSubset buildFirstSubset(); - public V1EndpointSubset buildLastSubset(); - public V1EndpointSubset buildMatchingSubset(Predicate predicate); - public Boolean hasMatchingSubset(Predicate predicate); - public A withSubsets(List subsets); - public A withSubsets(io.kubernetes.client.openapi.models.V1EndpointSubset... subsets); - public Boolean hasSubsets(); - public V1EndpointsFluent.SubsetsNested addNewSubset(); - public V1EndpointsFluent.SubsetsNested addNewSubsetLike(V1EndpointSubset item); - public V1EndpointsFluent.SubsetsNested setNewSubsetLike(int index,V1EndpointSubset item); - public V1EndpointsFluent.SubsetsNested editSubset(int index); - public V1EndpointsFluent.SubsetsNested editFirstSubset(); - public V1EndpointsFluent.SubsetsNested editLastSubset(); - public V1EndpointsFluent.SubsetsNested editMatchingSubset(Predicate predicate); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EndpointsFluent> extends BaseFluent{ + public V1EndpointsFluent() { + } + + public V1EndpointsFluent(V1Endpoints instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private ArrayList subsets; + + protected void copyInstance(V1Endpoints instance) { + instance = (instance != null ? instance : new V1Endpoints()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSubsets(instance.getSubsets()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public A addToSubsets(int index,V1EndpointSubset item) { + if (this.subsets == null) {this.subsets = new ArrayList();} + V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item); + if (index < 0 || index >= subsets.size()) { _visitables.get("subsets").add(builder); subsets.add(builder); } else { _visitables.get("subsets").add(index, builder); subsets.add(index, builder);} + return (A)this; + } + + public A setToSubsets(int index,V1EndpointSubset item) { + if (this.subsets == null) {this.subsets = new ArrayList();} + V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item); + if (index < 0 || index >= subsets.size()) { _visitables.get("subsets").add(builder); subsets.add(builder); } else { _visitables.get("subsets").set(index, builder); subsets.set(index, builder);} + return (A)this; + } + + public A addToSubsets(io.kubernetes.client.openapi.models.V1EndpointSubset... items) { + if (this.subsets == null) {this.subsets = new ArrayList();} + for (V1EndpointSubset item : items) {V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item);_visitables.get("subsets").add(builder);this.subsets.add(builder);} return (A)this; + } + + public A addAllToSubsets(Collection items) { + if (this.subsets == null) {this.subsets = new ArrayList();} + for (V1EndpointSubset item : items) {V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item);_visitables.get("subsets").add(builder);this.subsets.add(builder);} return (A)this; + } + + public A removeFromSubsets(io.kubernetes.client.openapi.models.V1EndpointSubset... items) { + if (this.subsets == null) return (A)this; + for (V1EndpointSubset item : items) {V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item);_visitables.get("subsets").remove(builder); this.subsets.remove(builder);} return (A)this; + } + + public A removeAllFromSubsets(Collection items) { + if (this.subsets == null) return (A)this; + for (V1EndpointSubset item : items) {V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item);_visitables.get("subsets").remove(builder); this.subsets.remove(builder);} return (A)this; + } + + public A removeMatchingFromSubsets(Predicate predicate) { + if (subsets == null) return (A) this; + final Iterator each = subsets.iterator(); + final List visitables = _visitables.get("subsets"); + while (each.hasNext()) { + V1EndpointSubsetBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; } - public interface SubsetsNested extends Nested,V1EndpointSubsetFluent>{ - public N and(); - public N endSubset(); + + public List buildSubsets() { + return this.subsets != null ? build(subsets) : null; + } + + public V1EndpointSubset buildSubset(int index) { + return this.subsets.get(index).build(); + } + + public V1EndpointSubset buildFirstSubset() { + return this.subsets.get(0).build(); + } + + public V1EndpointSubset buildLastSubset() { + return this.subsets.get(subsets.size() - 1).build(); + } + + public V1EndpointSubset buildMatchingSubset(Predicate predicate) { + for (V1EndpointSubsetBuilder item : subsets) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingSubset(Predicate predicate) { + for (V1EndpointSubsetBuilder item : subsets) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSubsets(List subsets) { + if (this.subsets != null) { + this._visitables.get("subsets").clear(); + } + if (subsets != null) { + this.subsets = new ArrayList(); + for (V1EndpointSubset item : subsets) { + this.addToSubsets(item); + } + } else { + this.subsets = null; + } + return (A) this; + } + + public A withSubsets(io.kubernetes.client.openapi.models.V1EndpointSubset... subsets) { + if (this.subsets != null) { + this.subsets.clear(); + _visitables.remove("subsets"); + } + if (subsets != null) { + for (V1EndpointSubset item : subsets) { + this.addToSubsets(item); + } + } + return (A) this; + } + + public boolean hasSubsets() { + return this.subsets != null && !this.subsets.isEmpty(); + } + + public SubsetsNested addNewSubset() { + return new SubsetsNested(-1, null); + } + + public SubsetsNested addNewSubsetLike(V1EndpointSubset item) { + return new SubsetsNested(-1, item); + } + + public SubsetsNested setNewSubsetLike(int index,V1EndpointSubset item) { + return new SubsetsNested(index, item); + } + + public SubsetsNested editSubset(int index) { + if (subsets.size() <= index) throw new RuntimeException("Can't edit subsets. Index exceeds size."); + return setNewSubsetLike(index, buildSubset(index)); + } + + public SubsetsNested editFirstSubset() { + if (subsets.size() == 0) throw new RuntimeException("Can't edit first subsets. The list is empty."); + return setNewSubsetLike(0, buildSubset(0)); + } + + public SubsetsNested editLastSubset() { + int index = subsets.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last subsets. The list is empty."); + return setNewSubsetLike(index, buildSubset(index)); + } + + public SubsetsNested editMatchingSubset(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + public N and() { + return (N) V1EndpointsFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + public class SubsetsNested extends V1EndpointSubsetFluent> implements Nested{ + SubsetsNested(int index,V1EndpointSubset item) { + this.index = index; + this.builder = new V1EndpointSubsetBuilder(this, item); + } + V1EndpointSubsetBuilder builder; + int index; + + public N and() { + return (N) V1EndpointsFluent.this.setToSubsets(index,builder.build()); + } + + public N endSubset() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsFluentImpl.java deleted file mode 100644 index a9418a391c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EndpointsFluentImpl> extends BaseFluent implements V1EndpointsFluent{ - public V1EndpointsFluentImpl() { - } - public V1EndpointsFluentImpl(V1Endpoints instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSubsets(instance.getSubsets()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private ArrayList subsets; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1EndpointsFluentImpl.MetadataNested withNewMetadata() { - return new V1EndpointsFluentImpl.MetadataNestedImpl(); - } - public V1EndpointsFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1EndpointsFluentImpl.MetadataNestedImpl(item); - } - public V1EndpointsFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1EndpointsFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1EndpointsFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public A addToSubsets(int index,V1EndpointSubset item) { - if (this.subsets == null) {this.subsets = new ArrayList();} - V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item); - if (index < 0 || index >= subsets.size()) { _visitables.get("subsets").add(builder); subsets.add(builder); } else { _visitables.get("subsets").add(index, builder); subsets.add(index, builder);} - return (A)this; - } - public A setToSubsets(int index,V1EndpointSubset item) { - if (this.subsets == null) {this.subsets = new ArrayList();} - V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item); - if (index < 0 || index >= subsets.size()) { _visitables.get("subsets").add(builder); subsets.add(builder); } else { _visitables.get("subsets").set(index, builder); subsets.set(index, builder);} - return (A)this; - } - public A addToSubsets(io.kubernetes.client.openapi.models.V1EndpointSubset... items) { - if (this.subsets == null) {this.subsets = new ArrayList();} - for (V1EndpointSubset item : items) {V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item);_visitables.get("subsets").add(builder);this.subsets.add(builder);} return (A)this; - } - public A addAllToSubsets(Collection items) { - if (this.subsets == null) {this.subsets = new ArrayList();} - for (V1EndpointSubset item : items) {V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item);_visitables.get("subsets").add(builder);this.subsets.add(builder);} return (A)this; - } - public A removeFromSubsets(io.kubernetes.client.openapi.models.V1EndpointSubset... items) { - for (V1EndpointSubset item : items) {V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item);_visitables.get("subsets").remove(builder);if (this.subsets != null) {this.subsets.remove(builder);}} return (A)this; - } - public A removeAllFromSubsets(Collection items) { - for (V1EndpointSubset item : items) {V1EndpointSubsetBuilder builder = new V1EndpointSubsetBuilder(item);_visitables.get("subsets").remove(builder);if (this.subsets != null) {this.subsets.remove(builder);}} return (A)this; - } - public A removeMatchingFromSubsets(Predicate predicate) { - if (subsets == null) return (A) this; - final Iterator each = subsets.iterator(); - final List visitables = _visitables.get("subsets"); - while (each.hasNext()) { - V1EndpointSubsetBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildSubsets instead. - * @return The buildable object. - */ - @Deprecated - public List getSubsets() { - return subsets != null ? build(subsets) : null; - } - public List buildSubsets() { - return subsets != null ? build(subsets) : null; - } - public V1EndpointSubset buildSubset(int index) { - return this.subsets.get(index).build(); - } - public V1EndpointSubset buildFirstSubset() { - return this.subsets.get(0).build(); - } - public V1EndpointSubset buildLastSubset() { - return this.subsets.get(subsets.size() - 1).build(); - } - public V1EndpointSubset buildMatchingSubset(Predicate predicate) { - for (V1EndpointSubsetBuilder item: subsets) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingSubset(Predicate predicate) { - for (V1EndpointSubsetBuilder item: subsets) { if(predicate.test(item)){ return true;} } return false; - } - public A withSubsets(List subsets) { - if (this.subsets != null) { _visitables.get("subsets").clear();} - if (subsets != null) {this.subsets = new ArrayList(); for (V1EndpointSubset item : subsets){this.addToSubsets(item);}} else { this.subsets = null;} return (A) this; - } - public A withSubsets(io.kubernetes.client.openapi.models.V1EndpointSubset... subsets) { - if (this.subsets != null) {this.subsets.clear(); _visitables.remove("subsets"); } - if (subsets != null) {for (V1EndpointSubset item :subsets){ this.addToSubsets(item);}} return (A) this; - } - public Boolean hasSubsets() { - return subsets != null && !subsets.isEmpty(); - } - public V1EndpointsFluentImpl.SubsetsNested addNewSubset() { - return new V1EndpointsFluentImpl.SubsetsNestedImpl(); - } - public V1EndpointsFluentImpl.SubsetsNested addNewSubsetLike(V1EndpointSubset item) { - return new V1EndpointsFluentImpl.SubsetsNestedImpl(-1, item); - } - public V1EndpointsFluentImpl.SubsetsNested setNewSubsetLike(int index,V1EndpointSubset item) { - return new V1EndpointsFluentImpl.SubsetsNestedImpl(index, item); - } - public V1EndpointsFluentImpl.SubsetsNested editSubset(int index) { - if (subsets.size() <= index) throw new RuntimeException("Can't edit subsets. Index exceeds size."); - return setNewSubsetLike(index, buildSubset(index)); - } - public V1EndpointsFluentImpl.SubsetsNested editFirstSubset() { - if (subsets.size() == 0) throw new RuntimeException("Can't edit first subsets. The list is empty."); - return setNewSubsetLike(0, buildSubset(0)); - } - public V1EndpointsFluentImpl.SubsetsNested editLastSubset() { - int index = subsets.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last subsets. The list is empty."); - return setNewSubsetLike(index, buildSubset(index)); - } - public V1EndpointsFluentImpl.SubsetsNested editMatchingSubset(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ObjectMetaFluentImpl> implements V1EndpointsFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1EndpointsFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SubsetsNestedImpl extends V1EndpointSubsetFluentImpl> implements V1EndpointsFluentImpl.SubsetsNested,Nested{ - SubsetsNestedImpl(int index,V1EndpointSubset item) { - this.index = index; - this.builder = new V1EndpointSubsetBuilder(this, item); - } - SubsetsNestedImpl() { - this.index = -1; - this.builder = new V1EndpointSubsetBuilder(this); - } - V1EndpointSubsetBuilder builder; - int index; - public N and() { - return (N) V1EndpointsFluentImpl.this.setToSubsets(index,builder.build()); - } - public N endSubset() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListBuilder.java index c4a52afdc1..be4b775d3f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EndpointsListBuilder extends V1EndpointsListFluentImpl implements VisitableBuilder{ +public class V1EndpointsListBuilder extends V1EndpointsListFluent implements VisitableBuilder{ public V1EndpointsListBuilder() { - this(false); - } - public V1EndpointsListBuilder(Boolean validationEnabled) { - this(new V1EndpointsList(), validationEnabled); + this(new V1EndpointsList()); } + public V1EndpointsListBuilder(V1EndpointsListFluent fluent) { - this(fluent, false); - } - public V1EndpointsListBuilder(V1EndpointsListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EndpointsList(), validationEnabled); + this(fluent, new V1EndpointsList()); } + public V1EndpointsListBuilder(V1EndpointsListFluent fluent,V1EndpointsList instance) { - this(fluent, instance, false); - } - public V1EndpointsListBuilder(V1EndpointsListFluent fluent,V1EndpointsList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EndpointsListBuilder(V1EndpointsList instance) { - this(instance,false); - } - public V1EndpointsListBuilder(V1EndpointsList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EndpointsListFluent fluent; - Boolean validationEnabled; + public V1EndpointsList build() { V1EndpointsList buildable = new V1EndpointsList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListFluent.java index 00faa6107e..64c6cc03ce 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1EndpointsListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Endpoints item); - public A setToItems(int index,V1Endpoints item); - public A addToItems(io.kubernetes.client.openapi.models.V1Endpoints... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Endpoints... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Endpoints buildItem(int index); - public V1Endpoints buildFirstItem(); - public V1Endpoints buildLastItem(); - public V1Endpoints buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Endpoints... items); - public Boolean hasItems(); - public V1EndpointsListFluent.ItemsNested addNewItem(); - public V1EndpointsListFluent.ItemsNested addNewItemLike(V1Endpoints item); - public V1EndpointsListFluent.ItemsNested setNewItemLike(int index,V1Endpoints item); - public V1EndpointsListFluent.ItemsNested editItem(int index); - public V1EndpointsListFluent.ItemsNested editFirstItem(); - public V1EndpointsListFluent.ItemsNested editLastItem(); - public V1EndpointsListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1EndpointsListFluent.MetadataNested withNewMetadata(); - public V1EndpointsListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1EndpointsListFluent.MetadataNested editMetadata(); - public V1EndpointsListFluent.MetadataNested editOrNewMetadata(); - public V1EndpointsListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1EndpointsFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EndpointsListFluent> extends BaseFluent{ + public V1EndpointsListFluent() { + } + + public V1EndpointsListFluent(V1EndpointsList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1EndpointsList instance) { + instance = (instance != null ? instance : new V1EndpointsList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Endpoints item) { + if (this.items == null) {this.items = new ArrayList();} + V1EndpointsBuilder builder = new V1EndpointsBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Endpoints item) { + if (this.items == null) {this.items = new ArrayList();} + V1EndpointsBuilder builder = new V1EndpointsBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Endpoints... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Endpoints item : items) {V1EndpointsBuilder builder = new V1EndpointsBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Endpoints item : items) {V1EndpointsBuilder builder = new V1EndpointsBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Endpoints... items) { + if (this.items == null) return (A)this; + for (V1Endpoints item : items) {V1EndpointsBuilder builder = new V1EndpointsBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Endpoints item : items) {V1EndpointsBuilder builder = new V1EndpointsBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1EndpointsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Endpoints buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Endpoints buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Endpoints buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Endpoints buildMatchingItem(Predicate predicate) { + for (V1EndpointsBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1EndpointsBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Endpoints item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Endpoints... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Endpoints item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Endpoints item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Endpoints item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EndpointsListFluent that = (V1EndpointsListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1EndpointsFluent> implements Nested{ + ItemsNested(int index,V1Endpoints item) { + this.index = index; + this.builder = new V1EndpointsBuilder(this, item); + } + V1EndpointsBuilder builder; + int index; + public N and() { + return (N) V1EndpointsListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1EndpointsListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListFluentImpl.java deleted file mode 100644 index 59dedaa25a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EndpointsListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EndpointsListFluentImpl> extends BaseFluent implements V1EndpointsListFluent{ - public V1EndpointsListFluentImpl() { - } - public V1EndpointsListFluentImpl(V1EndpointsList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Endpoints item) { - if (this.items == null) {this.items = new ArrayList();} - V1EndpointsBuilder builder = new V1EndpointsBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Endpoints item) { - if (this.items == null) {this.items = new ArrayList();} - V1EndpointsBuilder builder = new V1EndpointsBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Endpoints... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Endpoints item : items) {V1EndpointsBuilder builder = new V1EndpointsBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Endpoints item : items) {V1EndpointsBuilder builder = new V1EndpointsBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Endpoints... items) { - for (V1Endpoints item : items) {V1EndpointsBuilder builder = new V1EndpointsBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Endpoints item : items) {V1EndpointsBuilder builder = new V1EndpointsBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1EndpointsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Endpoints buildItem(int index) { - return this.items.get(index).build(); - } - public V1Endpoints buildFirstItem() { - return this.items.get(0).build(); - } - public V1Endpoints buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Endpoints buildMatchingItem(Predicate predicate) { - for (V1EndpointsBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1EndpointsBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Endpoints item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Endpoints... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Endpoints item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1EndpointsListFluentImpl.ItemsNested addNewItem() { - return new V1EndpointsListFluentImpl.ItemsNestedImpl(); - } - public V1EndpointsListFluentImpl.ItemsNested addNewItemLike(V1Endpoints item) { - return new V1EndpointsListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1EndpointsListFluentImpl.ItemsNested setNewItemLike(int index,V1Endpoints item) { - return new V1EndpointsListFluentImpl.ItemsNestedImpl(index, item); - } - public V1EndpointsListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1EndpointsListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1EndpointsListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1EndpointsListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1EndpointsListFluentImpl.MetadataNestedImpl(); - } - public V1EndpointsListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1EndpointsListFluentImpl.MetadataNestedImpl(item); - } - public V1EndpointsListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1EndpointsListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1EndpointsListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EndpointsListFluentImpl that = (V1EndpointsListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1EndpointsFluentImpl> implements V1EndpointsListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Endpoints item) { - this.index = index; - this.builder = new V1EndpointsBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1EndpointsBuilder(this); - } - V1EndpointsBuilder builder; - int index; - public N and() { - return (N) V1EndpointsListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1EndpointsListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1EndpointsListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceBuilder.java index 1525363883..e9bab8f133 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EnvFromSourceBuilder extends V1EnvFromSourceFluentImpl implements VisitableBuilder{ +public class V1EnvFromSourceBuilder extends V1EnvFromSourceFluent implements VisitableBuilder{ public V1EnvFromSourceBuilder() { - this(false); - } - public V1EnvFromSourceBuilder(Boolean validationEnabled) { - this(new V1EnvFromSource(), validationEnabled); + this(new V1EnvFromSource()); } + public V1EnvFromSourceBuilder(V1EnvFromSourceFluent fluent) { - this(fluent, false); - } - public V1EnvFromSourceBuilder(V1EnvFromSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EnvFromSource(), validationEnabled); + this(fluent, new V1EnvFromSource()); } + public V1EnvFromSourceBuilder(V1EnvFromSourceFluent fluent,V1EnvFromSource instance) { - this(fluent, instance, false); - } - public V1EnvFromSourceBuilder(V1EnvFromSourceFluent fluent,V1EnvFromSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConfigMapRef(instance.getConfigMapRef()); - fluent.withPrefix(instance.getPrefix()); - fluent.withSecretRef(instance.getSecretRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EnvFromSourceBuilder(V1EnvFromSource instance) { - this(instance,false); - } - public V1EnvFromSourceBuilder(V1EnvFromSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConfigMapRef(instance.getConfigMapRef()); - this.withPrefix(instance.getPrefix()); - this.withSecretRef(instance.getSecretRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EnvFromSourceFluent fluent; - Boolean validationEnabled; + public V1EnvFromSource build() { V1EnvFromSource buildable = new V1EnvFromSource(); - buildable.setConfigMapRef(fluent.getConfigMapRef()); + buildable.setConfigMapRef(fluent.buildConfigMapRef()); buildable.setPrefix(fluent.getPrefix()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceFluent.java index b9c8ae9a58..cd2c31fd09 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceFluent.java @@ -1,58 +1,183 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1EnvFromSourceFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildConfigMapRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapEnvSource getConfigMapRef(); - public V1ConfigMapEnvSource buildConfigMapRef(); - public A withConfigMapRef(V1ConfigMapEnvSource configMapRef); - public Boolean hasConfigMapRef(); - public V1EnvFromSourceFluent.ConfigMapRefNested withNewConfigMapRef(); - public V1EnvFromSourceFluent.ConfigMapRefNested withNewConfigMapRefLike(V1ConfigMapEnvSource item); - public V1EnvFromSourceFluent.ConfigMapRefNested editConfigMapRef(); - public V1EnvFromSourceFluent.ConfigMapRefNested editOrNewConfigMapRef(); - public V1EnvFromSourceFluent.ConfigMapRefNested editOrNewConfigMapRefLike(V1ConfigMapEnvSource item); - public String getPrefix(); - public A withPrefix(String prefix); - public Boolean hasPrefix(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretEnvSource getSecretRef(); - public V1SecretEnvSource buildSecretRef(); - public A withSecretRef(V1SecretEnvSource secretRef); - public Boolean hasSecretRef(); - public V1EnvFromSourceFluent.SecretRefNested withNewSecretRef(); - public V1EnvFromSourceFluent.SecretRefNested withNewSecretRefLike(V1SecretEnvSource item); - public V1EnvFromSourceFluent.SecretRefNested editSecretRef(); - public V1EnvFromSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1EnvFromSourceFluent.SecretRefNested editOrNewSecretRefLike(V1SecretEnvSource item); - public interface ConfigMapRefNested extends Nested,V1ConfigMapEnvSourceFluent>{ - public N and(); - public N endConfigMapRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EnvFromSourceFluent> extends BaseFluent{ + public V1EnvFromSourceFluent() { + } + + public V1EnvFromSourceFluent(V1EnvFromSource instance) { + this.copyInstance(instance); + } + private V1ConfigMapEnvSourceBuilder configMapRef; + private String prefix; + private V1SecretEnvSourceBuilder secretRef; + + protected void copyInstance(V1EnvFromSource instance) { + instance = (instance != null ? instance : new V1EnvFromSource()); + if (instance != null) { + this.withConfigMapRef(instance.getConfigMapRef()); + this.withPrefix(instance.getPrefix()); + this.withSecretRef(instance.getSecretRef()); + } + } + + public V1ConfigMapEnvSource buildConfigMapRef() { + return this.configMapRef != null ? this.configMapRef.build() : null; + } + + public A withConfigMapRef(V1ConfigMapEnvSource configMapRef) { + this._visitables.remove("configMapRef"); + if (configMapRef != null) { + this.configMapRef = new V1ConfigMapEnvSourceBuilder(configMapRef); + this._visitables.get("configMapRef").add(this.configMapRef); + } else { + this.configMapRef = null; + this._visitables.get("configMapRef").remove(this.configMapRef); + } + return (A) this; + } + + public boolean hasConfigMapRef() { + return this.configMapRef != null; + } + + public ConfigMapRefNested withNewConfigMapRef() { + return new ConfigMapRefNested(null); + } + + public ConfigMapRefNested withNewConfigMapRefLike(V1ConfigMapEnvSource item) { + return new ConfigMapRefNested(item); + } + + public ConfigMapRefNested editConfigMapRef() { + return withNewConfigMapRefLike(java.util.Optional.ofNullable(buildConfigMapRef()).orElse(null)); + } + + public ConfigMapRefNested editOrNewConfigMapRef() { + return withNewConfigMapRefLike(java.util.Optional.ofNullable(buildConfigMapRef()).orElse(new V1ConfigMapEnvSourceBuilder().build())); + } + + public ConfigMapRefNested editOrNewConfigMapRefLike(V1ConfigMapEnvSource item) { + return withNewConfigMapRefLike(java.util.Optional.ofNullable(buildConfigMapRef()).orElse(item)); + } + + public String getPrefix() { + return this.prefix; + } + + public A withPrefix(String prefix) { + this.prefix = prefix; + return (A) this; + } + + public boolean hasPrefix() { + return this.prefix != null; + } + + public V1SecretEnvSource buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; } - public interface SecretRefNested extends Nested,V1SecretEnvSourceFluent>{ - public N and(); - public N endSecretRef(); + + public A withSecretRef(V1SecretEnvSource secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1SecretEnvSourceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1SecretEnvSource item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1SecretEnvSourceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1SecretEnvSource item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EnvFromSourceFluent that = (V1EnvFromSourceFluent) o; + if (!java.util.Objects.equals(configMapRef, that.configMapRef)) return false; + if (!java.util.Objects.equals(prefix, that.prefix)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(configMapRef, prefix, secretRef, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (configMapRef != null) { sb.append("configMapRef:"); sb.append(configMapRef + ","); } + if (prefix != null) { sb.append("prefix:"); sb.append(prefix + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef); } + sb.append("}"); + return sb.toString(); + } + public class ConfigMapRefNested extends V1ConfigMapEnvSourceFluent> implements Nested{ + ConfigMapRefNested(V1ConfigMapEnvSource item) { + this.builder = new V1ConfigMapEnvSourceBuilder(this, item); + } + V1ConfigMapEnvSourceBuilder builder; + + public N and() { + return (N) V1EnvFromSourceFluent.this.withConfigMapRef(builder.build()); + } + public N endConfigMapRef() { + return and(); + } + + } + public class SecretRefNested extends V1SecretEnvSourceFluent> implements Nested{ + SecretRefNested(V1SecretEnvSource item) { + this.builder = new V1SecretEnvSourceBuilder(this, item); + } + V1SecretEnvSourceBuilder builder; + + public N and() { + return (N) V1EnvFromSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceFluentImpl.java deleted file mode 100644 index 77a9513ce5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvFromSourceFluentImpl.java +++ /dev/null @@ -1,163 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EnvFromSourceFluentImpl> extends BaseFluent implements V1EnvFromSourceFluent{ - public V1EnvFromSourceFluentImpl() { - } - public V1EnvFromSourceFluentImpl(V1EnvFromSource instance) { - if (instance != null) { - this.withConfigMapRef(instance.getConfigMapRef()); - this.withPrefix(instance.getPrefix()); - this.withSecretRef(instance.getSecretRef()); - } - } - private V1ConfigMapEnvSourceBuilder configMapRef; - private String prefix; - private V1SecretEnvSourceBuilder secretRef; - - /** - * This method has been deprecated, please use method buildConfigMapRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapEnvSource getConfigMapRef() { - return this.configMapRef!=null ?this.configMapRef.build():null; - } - public V1ConfigMapEnvSource buildConfigMapRef() { - return this.configMapRef!=null ?this.configMapRef.build():null; - } - public A withConfigMapRef(V1ConfigMapEnvSource configMapRef) { - _visitables.get("configMapRef").remove(this.configMapRef); - if (configMapRef!=null){ this.configMapRef= new V1ConfigMapEnvSourceBuilder(configMapRef); _visitables.get("configMapRef").add(this.configMapRef);} else { this.configMapRef = null; _visitables.get("configMapRef").remove(this.configMapRef); } return (A) this; - } - public Boolean hasConfigMapRef() { - return this.configMapRef != null; - } - public V1EnvFromSourceFluentImpl.ConfigMapRefNested withNewConfigMapRef() { - return new V1EnvFromSourceFluentImpl.ConfigMapRefNestedImpl(); - } - public V1EnvFromSourceFluentImpl.ConfigMapRefNested withNewConfigMapRefLike(V1ConfigMapEnvSource item) { - return new V1EnvFromSourceFluentImpl.ConfigMapRefNestedImpl(item); - } - public V1EnvFromSourceFluentImpl.ConfigMapRefNested editConfigMapRef() { - return withNewConfigMapRefLike(getConfigMapRef()); - } - public V1EnvFromSourceFluentImpl.ConfigMapRefNested editOrNewConfigMapRef() { - return withNewConfigMapRefLike(getConfigMapRef() != null ? getConfigMapRef(): new V1ConfigMapEnvSourceBuilder().build()); - } - public V1EnvFromSourceFluentImpl.ConfigMapRefNested editOrNewConfigMapRefLike(V1ConfigMapEnvSource item) { - return withNewConfigMapRefLike(getConfigMapRef() != null ? getConfigMapRef(): item); - } - public String getPrefix() { - return this.prefix; - } - public A withPrefix(String prefix) { - this.prefix=prefix; return (A) this; - } - public Boolean hasPrefix() { - return this.prefix != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretEnvSource getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1SecretEnvSource buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1SecretEnvSource secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1SecretEnvSourceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1EnvFromSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1EnvFromSourceFluentImpl.SecretRefNestedImpl(); - } - public V1EnvFromSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1SecretEnvSource item) { - return new V1EnvFromSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1EnvFromSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1EnvFromSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1SecretEnvSourceBuilder().build()); - } - public V1EnvFromSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1SecretEnvSource item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EnvFromSourceFluentImpl that = (V1EnvFromSourceFluentImpl) o; - if (!java.util.Objects.equals(configMapRef, that.configMapRef)) return false; - - if (!java.util.Objects.equals(prefix, that.prefix)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(configMapRef, prefix, secretRef, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (configMapRef != null) { sb.append("configMapRef:"); sb.append(configMapRef + ","); } - if (prefix != null) { sb.append("prefix:"); sb.append(prefix + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef); } - sb.append("}"); - return sb.toString(); - } - class ConfigMapRefNestedImpl extends V1ConfigMapEnvSourceFluentImpl> implements V1EnvFromSourceFluentImpl.ConfigMapRefNested,Nested{ - ConfigMapRefNestedImpl(V1ConfigMapEnvSource item) { - this.builder = new V1ConfigMapEnvSourceBuilder(this, item); - } - ConfigMapRefNestedImpl() { - this.builder = new V1ConfigMapEnvSourceBuilder(this); - } - V1ConfigMapEnvSourceBuilder builder; - public N and() { - return (N) V1EnvFromSourceFluentImpl.this.withConfigMapRef(builder.build()); - } - public N endConfigMapRef() { - return and(); - } - - } - class SecretRefNestedImpl extends V1SecretEnvSourceFluentImpl> implements V1EnvFromSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1SecretEnvSource item) { - this.builder = new V1SecretEnvSourceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1SecretEnvSourceBuilder(this); - } - V1SecretEnvSourceBuilder builder; - public N and() { - return (N) V1EnvFromSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarBuilder.java index 7d576905b9..e1251cdec7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EnvVarBuilder extends V1EnvVarFluentImpl implements VisitableBuilder{ +public class V1EnvVarBuilder extends V1EnvVarFluent implements VisitableBuilder{ public V1EnvVarBuilder() { - this(false); - } - public V1EnvVarBuilder(Boolean validationEnabled) { - this(new V1EnvVar(), validationEnabled); + this(new V1EnvVar()); } + public V1EnvVarBuilder(V1EnvVarFluent fluent) { - this(fluent, false); - } - public V1EnvVarBuilder(V1EnvVarFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EnvVar(), validationEnabled); + this(fluent, new V1EnvVar()); } + public V1EnvVarBuilder(V1EnvVarFluent fluent,V1EnvVar instance) { - this(fluent, instance, false); - } - public V1EnvVarBuilder(V1EnvVarFluent fluent,V1EnvVar instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withValue(instance.getValue()); - fluent.withValueFrom(instance.getValueFrom()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EnvVarBuilder(V1EnvVar instance) { - this(instance,false); - } - public V1EnvVarBuilder(V1EnvVar instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withValue(instance.getValue()); - this.withValueFrom(instance.getValueFrom()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EnvVarFluent fluent; - Boolean validationEnabled; + public V1EnvVar build() { V1EnvVar buildable = new V1EnvVar(); buildable.setName(fluent.getName()); buildable.setValue(fluent.getValue()); - buildable.setValueFrom(fluent.getValueFrom()); + buildable.setValueFrom(fluent.buildValueFrom()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarFluent.java index f9ad83b9e7..363943a8de 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarFluent.java @@ -1,41 +1,140 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1EnvVarFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getValue(); - public A withValue(String value); - public Boolean hasValue(); - - /** - * This method has been deprecated, please use method buildValueFrom instead. - * @return The buildable object. - */ - @Deprecated - public V1EnvVarSource getValueFrom(); - public V1EnvVarSource buildValueFrom(); - public A withValueFrom(V1EnvVarSource valueFrom); - public Boolean hasValueFrom(); - public V1EnvVarFluent.ValueFromNested withNewValueFrom(); - public V1EnvVarFluent.ValueFromNested withNewValueFromLike(V1EnvVarSource item); - public V1EnvVarFluent.ValueFromNested editValueFrom(); - public V1EnvVarFluent.ValueFromNested editOrNewValueFrom(); - public V1EnvVarFluent.ValueFromNested editOrNewValueFromLike(V1EnvVarSource item); - public interface ValueFromNested extends Nested,V1EnvVarSourceFluent>{ - public N and(); - public N endValueFrom(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EnvVarFluent> extends BaseFluent{ + public V1EnvVarFluent() { + } + + public V1EnvVarFluent(V1EnvVar instance) { + this.copyInstance(instance); + } + private String name; + private String value; + private V1EnvVarSourceBuilder valueFrom; + + protected void copyInstance(V1EnvVar instance) { + instance = (instance != null ? instance : new V1EnvVar()); + if (instance != null) { + this.withName(instance.getName()); + this.withValue(instance.getValue()); + this.withValueFrom(instance.getValueFrom()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getValue() { + return this.value; + } + + public A withValue(String value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public V1EnvVarSource buildValueFrom() { + return this.valueFrom != null ? this.valueFrom.build() : null; + } + + public A withValueFrom(V1EnvVarSource valueFrom) { + this._visitables.remove("valueFrom"); + if (valueFrom != null) { + this.valueFrom = new V1EnvVarSourceBuilder(valueFrom); + this._visitables.get("valueFrom").add(this.valueFrom); + } else { + this.valueFrom = null; + this._visitables.get("valueFrom").remove(this.valueFrom); + } + return (A) this; + } + + public boolean hasValueFrom() { + return this.valueFrom != null; + } + + public ValueFromNested withNewValueFrom() { + return new ValueFromNested(null); + } + + public ValueFromNested withNewValueFromLike(V1EnvVarSource item) { + return new ValueFromNested(item); + } + + public ValueFromNested editValueFrom() { + return withNewValueFromLike(java.util.Optional.ofNullable(buildValueFrom()).orElse(null)); + } + + public ValueFromNested editOrNewValueFrom() { + return withNewValueFromLike(java.util.Optional.ofNullable(buildValueFrom()).orElse(new V1EnvVarSourceBuilder().build())); + } + + public ValueFromNested editOrNewValueFromLike(V1EnvVarSource item) { + return withNewValueFromLike(java.util.Optional.ofNullable(buildValueFrom()).orElse(item)); } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EnvVarFluent that = (V1EnvVarFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + if (!java.util.Objects.equals(valueFrom, that.valueFrom)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, value, valueFrom, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (value != null) { sb.append("value:"); sb.append(value + ","); } + if (valueFrom != null) { sb.append("valueFrom:"); sb.append(valueFrom); } + sb.append("}"); + return sb.toString(); + } + public class ValueFromNested extends V1EnvVarSourceFluent> implements Nested{ + ValueFromNested(V1EnvVarSource item) { + this.builder = new V1EnvVarSourceBuilder(this, item); + } + V1EnvVarSourceBuilder builder; + + public N and() { + return (N) V1EnvVarFluent.this.withValueFrom(builder.build()); + } + + public N endValueFrom() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarFluentImpl.java deleted file mode 100644 index fad420ab67..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EnvVarFluentImpl> extends BaseFluent implements V1EnvVarFluent{ - public V1EnvVarFluentImpl() { - } - public V1EnvVarFluentImpl(V1EnvVar instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withValue(instance.getValue()); - this.withValueFrom(instance.getValueFrom()); - } - } - private String name; - private String value; - private V1EnvVarSourceBuilder valueFrom; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getValue() { - return this.value; - } - public A withValue(String value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - - /** - * This method has been deprecated, please use method buildValueFrom instead. - * @return The buildable object. - */ - @Deprecated - public V1EnvVarSource getValueFrom() { - return this.valueFrom!=null ?this.valueFrom.build():null; - } - public V1EnvVarSource buildValueFrom() { - return this.valueFrom!=null ?this.valueFrom.build():null; - } - public A withValueFrom(V1EnvVarSource valueFrom) { - _visitables.get("valueFrom").remove(this.valueFrom); - if (valueFrom!=null){ this.valueFrom= new V1EnvVarSourceBuilder(valueFrom); _visitables.get("valueFrom").add(this.valueFrom);} else { this.valueFrom = null; _visitables.get("valueFrom").remove(this.valueFrom); } return (A) this; - } - public Boolean hasValueFrom() { - return this.valueFrom != null; - } - public V1EnvVarFluentImpl.ValueFromNested withNewValueFrom() { - return new V1EnvVarFluentImpl.ValueFromNestedImpl(); - } - public V1EnvVarFluentImpl.ValueFromNested withNewValueFromLike(V1EnvVarSource item) { - return new V1EnvVarFluentImpl.ValueFromNestedImpl(item); - } - public V1EnvVarFluentImpl.ValueFromNested editValueFrom() { - return withNewValueFromLike(getValueFrom()); - } - public V1EnvVarFluentImpl.ValueFromNested editOrNewValueFrom() { - return withNewValueFromLike(getValueFrom() != null ? getValueFrom(): new V1EnvVarSourceBuilder().build()); - } - public V1EnvVarFluentImpl.ValueFromNested editOrNewValueFromLike(V1EnvVarSource item) { - return withNewValueFromLike(getValueFrom() != null ? getValueFrom(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EnvVarFluentImpl that = (V1EnvVarFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - if (!java.util.Objects.equals(valueFrom, that.valueFrom)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, value, valueFrom, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (value != null) { sb.append("value:"); sb.append(value + ","); } - if (valueFrom != null) { sb.append("valueFrom:"); sb.append(valueFrom); } - sb.append("}"); - return sb.toString(); - } - class ValueFromNestedImpl extends V1EnvVarSourceFluentImpl> implements V1EnvVarFluentImpl.ValueFromNested,Nested{ - ValueFromNestedImpl(V1EnvVarSource item) { - this.builder = new V1EnvVarSourceBuilder(this, item); - } - ValueFromNestedImpl() { - this.builder = new V1EnvVarSourceBuilder(this); - } - V1EnvVarSourceBuilder builder; - public N and() { - return (N) V1EnvVarFluentImpl.this.withValueFrom(builder.build()); - } - public N endValueFrom() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceBuilder.java index 2483d96e2e..ff8139d518 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EnvVarSourceBuilder extends V1EnvVarSourceFluentImpl implements VisitableBuilder{ +public class V1EnvVarSourceBuilder extends V1EnvVarSourceFluent implements VisitableBuilder{ public V1EnvVarSourceBuilder() { - this(false); - } - public V1EnvVarSourceBuilder(Boolean validationEnabled) { - this(new V1EnvVarSource(), validationEnabled); + this(new V1EnvVarSource()); } + public V1EnvVarSourceBuilder(V1EnvVarSourceFluent fluent) { - this(fluent, false); - } - public V1EnvVarSourceBuilder(V1EnvVarSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EnvVarSource(), validationEnabled); + this(fluent, new V1EnvVarSource()); } + public V1EnvVarSourceBuilder(V1EnvVarSourceFluent fluent,V1EnvVarSource instance) { - this(fluent, instance, false); - } - public V1EnvVarSourceBuilder(V1EnvVarSourceFluent fluent,V1EnvVarSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConfigMapKeyRef(instance.getConfigMapKeyRef()); - fluent.withFieldRef(instance.getFieldRef()); - fluent.withResourceFieldRef(instance.getResourceFieldRef()); - fluent.withSecretKeyRef(instance.getSecretKeyRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EnvVarSourceBuilder(V1EnvVarSource instance) { - this(instance,false); - } - public V1EnvVarSourceBuilder(V1EnvVarSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConfigMapKeyRef(instance.getConfigMapKeyRef()); - this.withFieldRef(instance.getFieldRef()); - this.withResourceFieldRef(instance.getResourceFieldRef()); - this.withSecretKeyRef(instance.getSecretKeyRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EnvVarSourceFluent fluent; - Boolean validationEnabled; + public V1EnvVarSource build() { V1EnvVarSource buildable = new V1EnvVarSource(); - buildable.setConfigMapKeyRef(fluent.getConfigMapKeyRef()); - buildable.setFieldRef(fluent.getFieldRef()); - buildable.setResourceFieldRef(fluent.getResourceFieldRef()); - buildable.setSecretKeyRef(fluent.getSecretKeyRef()); + buildable.setConfigMapKeyRef(fluent.buildConfigMapKeyRef()); + buildable.setFieldRef(fluent.buildFieldRef()); + buildable.setResourceFieldRef(fluent.buildResourceFieldRef()); + buildable.setSecretKeyRef(fluent.buildSecretKeyRef()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceFluent.java index 6c3b9ac2d0..b3ff98ef5d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceFluent.java @@ -1,94 +1,286 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1EnvVarSourceFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildConfigMapKeyRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapKeySelector getConfigMapKeyRef(); - public V1ConfigMapKeySelector buildConfigMapKeyRef(); - public A withConfigMapKeyRef(V1ConfigMapKeySelector configMapKeyRef); - public Boolean hasConfigMapKeyRef(); - public V1EnvVarSourceFluent.ConfigMapKeyRefNested withNewConfigMapKeyRef(); - public V1EnvVarSourceFluent.ConfigMapKeyRefNested withNewConfigMapKeyRefLike(V1ConfigMapKeySelector item); - public V1EnvVarSourceFluent.ConfigMapKeyRefNested editConfigMapKeyRef(); - public V1EnvVarSourceFluent.ConfigMapKeyRefNested editOrNewConfigMapKeyRef(); - public V1EnvVarSourceFluent.ConfigMapKeyRefNested editOrNewConfigMapKeyRefLike(V1ConfigMapKeySelector item); - - /** - * This method has been deprecated, please use method buildFieldRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectFieldSelector getFieldRef(); - public V1ObjectFieldSelector buildFieldRef(); - public A withFieldRef(V1ObjectFieldSelector fieldRef); - public Boolean hasFieldRef(); - public V1EnvVarSourceFluent.FieldRefNested withNewFieldRef(); - public V1EnvVarSourceFluent.FieldRefNested withNewFieldRefLike(V1ObjectFieldSelector item); - public V1EnvVarSourceFluent.FieldRefNested editFieldRef(); - public V1EnvVarSourceFluent.FieldRefNested editOrNewFieldRef(); - public V1EnvVarSourceFluent.FieldRefNested editOrNewFieldRefLike(V1ObjectFieldSelector item); - - /** - * This method has been deprecated, please use method buildResourceFieldRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceFieldSelector getResourceFieldRef(); - public V1ResourceFieldSelector buildResourceFieldRef(); - public A withResourceFieldRef(V1ResourceFieldSelector resourceFieldRef); - public Boolean hasResourceFieldRef(); - public V1EnvVarSourceFluent.ResourceFieldRefNested withNewResourceFieldRef(); - public V1EnvVarSourceFluent.ResourceFieldRefNested withNewResourceFieldRefLike(V1ResourceFieldSelector item); - public V1EnvVarSourceFluent.ResourceFieldRefNested editResourceFieldRef(); - public V1EnvVarSourceFluent.ResourceFieldRefNested editOrNewResourceFieldRef(); - public V1EnvVarSourceFluent.ResourceFieldRefNested editOrNewResourceFieldRefLike(V1ResourceFieldSelector item); - - /** - * This method has been deprecated, please use method buildSecretKeyRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretKeySelector getSecretKeyRef(); - public V1SecretKeySelector buildSecretKeyRef(); - public A withSecretKeyRef(V1SecretKeySelector secretKeyRef); - public Boolean hasSecretKeyRef(); - public V1EnvVarSourceFluent.SecretKeyRefNested withNewSecretKeyRef(); - public V1EnvVarSourceFluent.SecretKeyRefNested withNewSecretKeyRefLike(V1SecretKeySelector item); - public V1EnvVarSourceFluent.SecretKeyRefNested editSecretKeyRef(); - public V1EnvVarSourceFluent.SecretKeyRefNested editOrNewSecretKeyRef(); - public V1EnvVarSourceFluent.SecretKeyRefNested editOrNewSecretKeyRefLike(V1SecretKeySelector item); - public interface ConfigMapKeyRefNested extends Nested,V1ConfigMapKeySelectorFluent>{ - public N and(); - public N endConfigMapKeyRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EnvVarSourceFluent> extends BaseFluent{ + public V1EnvVarSourceFluent() { + } + + public V1EnvVarSourceFluent(V1EnvVarSource instance) { + this.copyInstance(instance); + } + private V1ConfigMapKeySelectorBuilder configMapKeyRef; + private V1ObjectFieldSelectorBuilder fieldRef; + private V1ResourceFieldSelectorBuilder resourceFieldRef; + private V1SecretKeySelectorBuilder secretKeyRef; + + protected void copyInstance(V1EnvVarSource instance) { + instance = (instance != null ? instance : new V1EnvVarSource()); + if (instance != null) { + this.withConfigMapKeyRef(instance.getConfigMapKeyRef()); + this.withFieldRef(instance.getFieldRef()); + this.withResourceFieldRef(instance.getResourceFieldRef()); + this.withSecretKeyRef(instance.getSecretKeyRef()); + } + } + + public V1ConfigMapKeySelector buildConfigMapKeyRef() { + return this.configMapKeyRef != null ? this.configMapKeyRef.build() : null; + } + + public A withConfigMapKeyRef(V1ConfigMapKeySelector configMapKeyRef) { + this._visitables.remove("configMapKeyRef"); + if (configMapKeyRef != null) { + this.configMapKeyRef = new V1ConfigMapKeySelectorBuilder(configMapKeyRef); + this._visitables.get("configMapKeyRef").add(this.configMapKeyRef); + } else { + this.configMapKeyRef = null; + this._visitables.get("configMapKeyRef").remove(this.configMapKeyRef); + } + return (A) this; + } + + public boolean hasConfigMapKeyRef() { + return this.configMapKeyRef != null; + } + + public ConfigMapKeyRefNested withNewConfigMapKeyRef() { + return new ConfigMapKeyRefNested(null); + } + + public ConfigMapKeyRefNested withNewConfigMapKeyRefLike(V1ConfigMapKeySelector item) { + return new ConfigMapKeyRefNested(item); + } + + public ConfigMapKeyRefNested editConfigMapKeyRef() { + return withNewConfigMapKeyRefLike(java.util.Optional.ofNullable(buildConfigMapKeyRef()).orElse(null)); + } + + public ConfigMapKeyRefNested editOrNewConfigMapKeyRef() { + return withNewConfigMapKeyRefLike(java.util.Optional.ofNullable(buildConfigMapKeyRef()).orElse(new V1ConfigMapKeySelectorBuilder().build())); + } + + public ConfigMapKeyRefNested editOrNewConfigMapKeyRefLike(V1ConfigMapKeySelector item) { + return withNewConfigMapKeyRefLike(java.util.Optional.ofNullable(buildConfigMapKeyRef()).orElse(item)); + } + + public V1ObjectFieldSelector buildFieldRef() { + return this.fieldRef != null ? this.fieldRef.build() : null; + } + + public A withFieldRef(V1ObjectFieldSelector fieldRef) { + this._visitables.remove("fieldRef"); + if (fieldRef != null) { + this.fieldRef = new V1ObjectFieldSelectorBuilder(fieldRef); + this._visitables.get("fieldRef").add(this.fieldRef); + } else { + this.fieldRef = null; + this._visitables.get("fieldRef").remove(this.fieldRef); + } + return (A) this; + } + + public boolean hasFieldRef() { + return this.fieldRef != null; + } + + public FieldRefNested withNewFieldRef() { + return new FieldRefNested(null); + } + + public FieldRefNested withNewFieldRefLike(V1ObjectFieldSelector item) { + return new FieldRefNested(item); + } + + public FieldRefNested editFieldRef() { + return withNewFieldRefLike(java.util.Optional.ofNullable(buildFieldRef()).orElse(null)); + } + + public FieldRefNested editOrNewFieldRef() { + return withNewFieldRefLike(java.util.Optional.ofNullable(buildFieldRef()).orElse(new V1ObjectFieldSelectorBuilder().build())); + } + + public FieldRefNested editOrNewFieldRefLike(V1ObjectFieldSelector item) { + return withNewFieldRefLike(java.util.Optional.ofNullable(buildFieldRef()).orElse(item)); + } + + public V1ResourceFieldSelector buildResourceFieldRef() { + return this.resourceFieldRef != null ? this.resourceFieldRef.build() : null; + } + + public A withResourceFieldRef(V1ResourceFieldSelector resourceFieldRef) { + this._visitables.remove("resourceFieldRef"); + if (resourceFieldRef != null) { + this.resourceFieldRef = new V1ResourceFieldSelectorBuilder(resourceFieldRef); + this._visitables.get("resourceFieldRef").add(this.resourceFieldRef); + } else { + this.resourceFieldRef = null; + this._visitables.get("resourceFieldRef").remove(this.resourceFieldRef); + } + return (A) this; + } + + public boolean hasResourceFieldRef() { + return this.resourceFieldRef != null; + } + + public ResourceFieldRefNested withNewResourceFieldRef() { + return new ResourceFieldRefNested(null); } - public interface FieldRefNested extends Nested,V1ObjectFieldSelectorFluent>{ - public N and(); - public N endFieldRef(); + + public ResourceFieldRefNested withNewResourceFieldRefLike(V1ResourceFieldSelector item) { + return new ResourceFieldRefNested(item); + } + + public ResourceFieldRefNested editResourceFieldRef() { + return withNewResourceFieldRefLike(java.util.Optional.ofNullable(buildResourceFieldRef()).orElse(null)); + } + + public ResourceFieldRefNested editOrNewResourceFieldRef() { + return withNewResourceFieldRefLike(java.util.Optional.ofNullable(buildResourceFieldRef()).orElse(new V1ResourceFieldSelectorBuilder().build())); + } + + public ResourceFieldRefNested editOrNewResourceFieldRefLike(V1ResourceFieldSelector item) { + return withNewResourceFieldRefLike(java.util.Optional.ofNullable(buildResourceFieldRef()).orElse(item)); + } + + public V1SecretKeySelector buildSecretKeyRef() { + return this.secretKeyRef != null ? this.secretKeyRef.build() : null; + } + + public A withSecretKeyRef(V1SecretKeySelector secretKeyRef) { + this._visitables.remove("secretKeyRef"); + if (secretKeyRef != null) { + this.secretKeyRef = new V1SecretKeySelectorBuilder(secretKeyRef); + this._visitables.get("secretKeyRef").add(this.secretKeyRef); + } else { + this.secretKeyRef = null; + this._visitables.get("secretKeyRef").remove(this.secretKeyRef); + } + return (A) this; + } + + public boolean hasSecretKeyRef() { + return this.secretKeyRef != null; + } + + public SecretKeyRefNested withNewSecretKeyRef() { + return new SecretKeyRefNested(null); + } + + public SecretKeyRefNested withNewSecretKeyRefLike(V1SecretKeySelector item) { + return new SecretKeyRefNested(item); + } + + public SecretKeyRefNested editSecretKeyRef() { + return withNewSecretKeyRefLike(java.util.Optional.ofNullable(buildSecretKeyRef()).orElse(null)); + } + + public SecretKeyRefNested editOrNewSecretKeyRef() { + return withNewSecretKeyRefLike(java.util.Optional.ofNullable(buildSecretKeyRef()).orElse(new V1SecretKeySelectorBuilder().build())); + } + + public SecretKeyRefNested editOrNewSecretKeyRefLike(V1SecretKeySelector item) { + return withNewSecretKeyRefLike(java.util.Optional.ofNullable(buildSecretKeyRef()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EnvVarSourceFluent that = (V1EnvVarSourceFluent) o; + if (!java.util.Objects.equals(configMapKeyRef, that.configMapKeyRef)) return false; + if (!java.util.Objects.equals(fieldRef, that.fieldRef)) return false; + if (!java.util.Objects.equals(resourceFieldRef, that.resourceFieldRef)) return false; + if (!java.util.Objects.equals(secretKeyRef, that.secretKeyRef)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(configMapKeyRef, fieldRef, resourceFieldRef, secretKeyRef, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (configMapKeyRef != null) { sb.append("configMapKeyRef:"); sb.append(configMapKeyRef + ","); } + if (fieldRef != null) { sb.append("fieldRef:"); sb.append(fieldRef + ","); } + if (resourceFieldRef != null) { sb.append("resourceFieldRef:"); sb.append(resourceFieldRef + ","); } + if (secretKeyRef != null) { sb.append("secretKeyRef:"); sb.append(secretKeyRef); } + sb.append("}"); + return sb.toString(); + } + public class ConfigMapKeyRefNested extends V1ConfigMapKeySelectorFluent> implements Nested{ + ConfigMapKeyRefNested(V1ConfigMapKeySelector item) { + this.builder = new V1ConfigMapKeySelectorBuilder(this, item); + } + V1ConfigMapKeySelectorBuilder builder; + + public N and() { + return (N) V1EnvVarSourceFluent.this.withConfigMapKeyRef(builder.build()); + } + public N endConfigMapKeyRef() { + return and(); + } + + } - public interface ResourceFieldRefNested extends Nested,V1ResourceFieldSelectorFluent>{ - public N and(); - public N endResourceFieldRef(); + public class FieldRefNested extends V1ObjectFieldSelectorFluent> implements Nested{ + FieldRefNested(V1ObjectFieldSelector item) { + this.builder = new V1ObjectFieldSelectorBuilder(this, item); + } + V1ObjectFieldSelectorBuilder builder; + public N and() { + return (N) V1EnvVarSourceFluent.this.withFieldRef(builder.build()); + } + + public N endFieldRef() { + return and(); + } + + } - public interface SecretKeyRefNested extends Nested,V1SecretKeySelectorFluent>{ - public N and(); - public N endSecretKeyRef(); + public class ResourceFieldRefNested extends V1ResourceFieldSelectorFluent> implements Nested{ + ResourceFieldRefNested(V1ResourceFieldSelector item) { + this.builder = new V1ResourceFieldSelectorBuilder(this, item); + } + V1ResourceFieldSelectorBuilder builder; + public N and() { + return (N) V1EnvVarSourceFluent.this.withResourceFieldRef(builder.build()); + } + + public N endResourceFieldRef() { + return and(); + } + + } + public class SecretKeyRefNested extends V1SecretKeySelectorFluent> implements Nested{ + SecretKeyRefNested(V1SecretKeySelector item) { + this.builder = new V1SecretKeySelectorBuilder(this, item); + } + V1SecretKeySelectorBuilder builder; + + public N and() { + return (N) V1EnvVarSourceFluent.this.withSecretKeyRef(builder.build()); + } + + public N endSecretKeyRef() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceFluentImpl.java deleted file mode 100644 index 23cfb2453a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EnvVarSourceFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EnvVarSourceFluentImpl> extends BaseFluent implements V1EnvVarSourceFluent{ - public V1EnvVarSourceFluentImpl() { - } - public V1EnvVarSourceFluentImpl(V1EnvVarSource instance) { - if (instance != null) { - this.withConfigMapKeyRef(instance.getConfigMapKeyRef()); - this.withFieldRef(instance.getFieldRef()); - this.withResourceFieldRef(instance.getResourceFieldRef()); - this.withSecretKeyRef(instance.getSecretKeyRef()); - } - } - private V1ConfigMapKeySelectorBuilder configMapKeyRef; - private V1ObjectFieldSelectorBuilder fieldRef; - private V1ResourceFieldSelectorBuilder resourceFieldRef; - private V1SecretKeySelectorBuilder secretKeyRef; - - /** - * This method has been deprecated, please use method buildConfigMapKeyRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapKeySelector getConfigMapKeyRef() { - return this.configMapKeyRef!=null ?this.configMapKeyRef.build():null; - } - public V1ConfigMapKeySelector buildConfigMapKeyRef() { - return this.configMapKeyRef!=null ?this.configMapKeyRef.build():null; - } - public A withConfigMapKeyRef(V1ConfigMapKeySelector configMapKeyRef) { - _visitables.get("configMapKeyRef").remove(this.configMapKeyRef); - if (configMapKeyRef!=null){ this.configMapKeyRef= new V1ConfigMapKeySelectorBuilder(configMapKeyRef); _visitables.get("configMapKeyRef").add(this.configMapKeyRef);} else { this.configMapKeyRef = null; _visitables.get("configMapKeyRef").remove(this.configMapKeyRef); } return (A) this; - } - public Boolean hasConfigMapKeyRef() { - return this.configMapKeyRef != null; - } - public V1EnvVarSourceFluentImpl.ConfigMapKeyRefNested withNewConfigMapKeyRef() { - return new V1EnvVarSourceFluentImpl.ConfigMapKeyRefNestedImpl(); - } - public V1EnvVarSourceFluentImpl.ConfigMapKeyRefNested withNewConfigMapKeyRefLike(V1ConfigMapKeySelector item) { - return new V1EnvVarSourceFluentImpl.ConfigMapKeyRefNestedImpl(item); - } - public V1EnvVarSourceFluentImpl.ConfigMapKeyRefNested editConfigMapKeyRef() { - return withNewConfigMapKeyRefLike(getConfigMapKeyRef()); - } - public V1EnvVarSourceFluentImpl.ConfigMapKeyRefNested editOrNewConfigMapKeyRef() { - return withNewConfigMapKeyRefLike(getConfigMapKeyRef() != null ? getConfigMapKeyRef(): new V1ConfigMapKeySelectorBuilder().build()); - } - public V1EnvVarSourceFluentImpl.ConfigMapKeyRefNested editOrNewConfigMapKeyRefLike(V1ConfigMapKeySelector item) { - return withNewConfigMapKeyRefLike(getConfigMapKeyRef() != null ? getConfigMapKeyRef(): item); - } - - /** - * This method has been deprecated, please use method buildFieldRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectFieldSelector getFieldRef() { - return this.fieldRef!=null ?this.fieldRef.build():null; - } - public V1ObjectFieldSelector buildFieldRef() { - return this.fieldRef!=null ?this.fieldRef.build():null; - } - public A withFieldRef(V1ObjectFieldSelector fieldRef) { - _visitables.get("fieldRef").remove(this.fieldRef); - if (fieldRef!=null){ this.fieldRef= new V1ObjectFieldSelectorBuilder(fieldRef); _visitables.get("fieldRef").add(this.fieldRef);} else { this.fieldRef = null; _visitables.get("fieldRef").remove(this.fieldRef); } return (A) this; - } - public Boolean hasFieldRef() { - return this.fieldRef != null; - } - public V1EnvVarSourceFluentImpl.FieldRefNested withNewFieldRef() { - return new V1EnvVarSourceFluentImpl.FieldRefNestedImpl(); - } - public V1EnvVarSourceFluentImpl.FieldRefNested withNewFieldRefLike(V1ObjectFieldSelector item) { - return new V1EnvVarSourceFluentImpl.FieldRefNestedImpl(item); - } - public V1EnvVarSourceFluentImpl.FieldRefNested editFieldRef() { - return withNewFieldRefLike(getFieldRef()); - } - public V1EnvVarSourceFluentImpl.FieldRefNested editOrNewFieldRef() { - return withNewFieldRefLike(getFieldRef() != null ? getFieldRef(): new V1ObjectFieldSelectorBuilder().build()); - } - public V1EnvVarSourceFluentImpl.FieldRefNested editOrNewFieldRefLike(V1ObjectFieldSelector item) { - return withNewFieldRefLike(getFieldRef() != null ? getFieldRef(): item); - } - - /** - * This method has been deprecated, please use method buildResourceFieldRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceFieldSelector getResourceFieldRef() { - return this.resourceFieldRef!=null ?this.resourceFieldRef.build():null; - } - public V1ResourceFieldSelector buildResourceFieldRef() { - return this.resourceFieldRef!=null ?this.resourceFieldRef.build():null; - } - public A withResourceFieldRef(V1ResourceFieldSelector resourceFieldRef) { - _visitables.get("resourceFieldRef").remove(this.resourceFieldRef); - if (resourceFieldRef!=null){ this.resourceFieldRef= new V1ResourceFieldSelectorBuilder(resourceFieldRef); _visitables.get("resourceFieldRef").add(this.resourceFieldRef);} else { this.resourceFieldRef = null; _visitables.get("resourceFieldRef").remove(this.resourceFieldRef); } return (A) this; - } - public Boolean hasResourceFieldRef() { - return this.resourceFieldRef != null; - } - public V1EnvVarSourceFluentImpl.ResourceFieldRefNested withNewResourceFieldRef() { - return new V1EnvVarSourceFluentImpl.ResourceFieldRefNestedImpl(); - } - public V1EnvVarSourceFluentImpl.ResourceFieldRefNested withNewResourceFieldRefLike(V1ResourceFieldSelector item) { - return new V1EnvVarSourceFluentImpl.ResourceFieldRefNestedImpl(item); - } - public V1EnvVarSourceFluentImpl.ResourceFieldRefNested editResourceFieldRef() { - return withNewResourceFieldRefLike(getResourceFieldRef()); - } - public V1EnvVarSourceFluentImpl.ResourceFieldRefNested editOrNewResourceFieldRef() { - return withNewResourceFieldRefLike(getResourceFieldRef() != null ? getResourceFieldRef(): new V1ResourceFieldSelectorBuilder().build()); - } - public V1EnvVarSourceFluentImpl.ResourceFieldRefNested editOrNewResourceFieldRefLike(V1ResourceFieldSelector item) { - return withNewResourceFieldRefLike(getResourceFieldRef() != null ? getResourceFieldRef(): item); - } - - /** - * This method has been deprecated, please use method buildSecretKeyRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretKeySelector getSecretKeyRef() { - return this.secretKeyRef!=null ?this.secretKeyRef.build():null; - } - public V1SecretKeySelector buildSecretKeyRef() { - return this.secretKeyRef!=null ?this.secretKeyRef.build():null; - } - public A withSecretKeyRef(V1SecretKeySelector secretKeyRef) { - _visitables.get("secretKeyRef").remove(this.secretKeyRef); - if (secretKeyRef!=null){ this.secretKeyRef= new V1SecretKeySelectorBuilder(secretKeyRef); _visitables.get("secretKeyRef").add(this.secretKeyRef);} else { this.secretKeyRef = null; _visitables.get("secretKeyRef").remove(this.secretKeyRef); } return (A) this; - } - public Boolean hasSecretKeyRef() { - return this.secretKeyRef != null; - } - public V1EnvVarSourceFluentImpl.SecretKeyRefNested withNewSecretKeyRef() { - return new V1EnvVarSourceFluentImpl.SecretKeyRefNestedImpl(); - } - public V1EnvVarSourceFluentImpl.SecretKeyRefNested withNewSecretKeyRefLike(V1SecretKeySelector item) { - return new V1EnvVarSourceFluentImpl.SecretKeyRefNestedImpl(item); - } - public V1EnvVarSourceFluentImpl.SecretKeyRefNested editSecretKeyRef() { - return withNewSecretKeyRefLike(getSecretKeyRef()); - } - public V1EnvVarSourceFluentImpl.SecretKeyRefNested editOrNewSecretKeyRef() { - return withNewSecretKeyRefLike(getSecretKeyRef() != null ? getSecretKeyRef(): new V1SecretKeySelectorBuilder().build()); - } - public V1EnvVarSourceFluentImpl.SecretKeyRefNested editOrNewSecretKeyRefLike(V1SecretKeySelector item) { - return withNewSecretKeyRefLike(getSecretKeyRef() != null ? getSecretKeyRef(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EnvVarSourceFluentImpl that = (V1EnvVarSourceFluentImpl) o; - if (!java.util.Objects.equals(configMapKeyRef, that.configMapKeyRef)) return false; - - if (!java.util.Objects.equals(fieldRef, that.fieldRef)) return false; - - if (!java.util.Objects.equals(resourceFieldRef, that.resourceFieldRef)) return false; - - if (!java.util.Objects.equals(secretKeyRef, that.secretKeyRef)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(configMapKeyRef, fieldRef, resourceFieldRef, secretKeyRef, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (configMapKeyRef != null) { sb.append("configMapKeyRef:"); sb.append(configMapKeyRef + ","); } - if (fieldRef != null) { sb.append("fieldRef:"); sb.append(fieldRef + ","); } - if (resourceFieldRef != null) { sb.append("resourceFieldRef:"); sb.append(resourceFieldRef + ","); } - if (secretKeyRef != null) { sb.append("secretKeyRef:"); sb.append(secretKeyRef); } - sb.append("}"); - return sb.toString(); - } - class ConfigMapKeyRefNestedImpl extends V1ConfigMapKeySelectorFluentImpl> implements V1EnvVarSourceFluentImpl.ConfigMapKeyRefNested,Nested{ - ConfigMapKeyRefNestedImpl(V1ConfigMapKeySelector item) { - this.builder = new V1ConfigMapKeySelectorBuilder(this, item); - } - ConfigMapKeyRefNestedImpl() { - this.builder = new V1ConfigMapKeySelectorBuilder(this); - } - V1ConfigMapKeySelectorBuilder builder; - public N and() { - return (N) V1EnvVarSourceFluentImpl.this.withConfigMapKeyRef(builder.build()); - } - public N endConfigMapKeyRef() { - return and(); - } - - } - class FieldRefNestedImpl extends V1ObjectFieldSelectorFluentImpl> implements V1EnvVarSourceFluentImpl.FieldRefNested,Nested{ - FieldRefNestedImpl(V1ObjectFieldSelector item) { - this.builder = new V1ObjectFieldSelectorBuilder(this, item); - } - FieldRefNestedImpl() { - this.builder = new V1ObjectFieldSelectorBuilder(this); - } - V1ObjectFieldSelectorBuilder builder; - public N and() { - return (N) V1EnvVarSourceFluentImpl.this.withFieldRef(builder.build()); - } - public N endFieldRef() { - return and(); - } - - } - class ResourceFieldRefNestedImpl extends V1ResourceFieldSelectorFluentImpl> implements V1EnvVarSourceFluentImpl.ResourceFieldRefNested,Nested{ - ResourceFieldRefNestedImpl(V1ResourceFieldSelector item) { - this.builder = new V1ResourceFieldSelectorBuilder(this, item); - } - ResourceFieldRefNestedImpl() { - this.builder = new V1ResourceFieldSelectorBuilder(this); - } - V1ResourceFieldSelectorBuilder builder; - public N and() { - return (N) V1EnvVarSourceFluentImpl.this.withResourceFieldRef(builder.build()); - } - public N endResourceFieldRef() { - return and(); - } - - } - class SecretKeyRefNestedImpl extends V1SecretKeySelectorFluentImpl> implements V1EnvVarSourceFluentImpl.SecretKeyRefNested,Nested{ - SecretKeyRefNestedImpl(V1SecretKeySelector item) { - this.builder = new V1SecretKeySelectorBuilder(this, item); - } - SecretKeyRefNestedImpl() { - this.builder = new V1SecretKeySelectorBuilder(this); - } - V1SecretKeySelectorBuilder builder; - public N and() { - return (N) V1EnvVarSourceFluentImpl.this.withSecretKeyRef(builder.build()); - } - public N endSecretKeyRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerBuilder.java index a86c4520e9..6c1e6170f7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerBuilder.java @@ -1,115 +1,55 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EphemeralContainerBuilder extends V1EphemeralContainerFluentImpl implements VisitableBuilder{ +public class V1EphemeralContainerBuilder extends V1EphemeralContainerFluent implements VisitableBuilder{ public V1EphemeralContainerBuilder() { - this(false); - } - public V1EphemeralContainerBuilder(Boolean validationEnabled) { - this(new V1EphemeralContainer(), validationEnabled); + this(new V1EphemeralContainer()); } + public V1EphemeralContainerBuilder(V1EphemeralContainerFluent fluent) { - this(fluent, false); - } - public V1EphemeralContainerBuilder(V1EphemeralContainerFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EphemeralContainer(), validationEnabled); + this(fluent, new V1EphemeralContainer()); } + public V1EphemeralContainerBuilder(V1EphemeralContainerFluent fluent,V1EphemeralContainer instance) { - this(fluent, instance, false); - } - public V1EphemeralContainerBuilder(V1EphemeralContainerFluent fluent,V1EphemeralContainer instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withArgs(instance.getArgs()); - fluent.withCommand(instance.getCommand()); - fluent.withEnv(instance.getEnv()); - fluent.withEnvFrom(instance.getEnvFrom()); - fluent.withImage(instance.getImage()); - fluent.withImagePullPolicy(instance.getImagePullPolicy()); - fluent.withLifecycle(instance.getLifecycle()); - fluent.withLivenessProbe(instance.getLivenessProbe()); - fluent.withName(instance.getName()); - fluent.withPorts(instance.getPorts()); - fluent.withReadinessProbe(instance.getReadinessProbe()); - fluent.withResizePolicy(instance.getResizePolicy()); - fluent.withResources(instance.getResources()); - fluent.withSecurityContext(instance.getSecurityContext()); - fluent.withStartupProbe(instance.getStartupProbe()); - fluent.withStdin(instance.getStdin()); - fluent.withStdinOnce(instance.getStdinOnce()); - fluent.withTargetContainerName(instance.getTargetContainerName()); - fluent.withTerminationMessagePath(instance.getTerminationMessagePath()); - fluent.withTerminationMessagePolicy(instance.getTerminationMessagePolicy()); - fluent.withTty(instance.getTty()); - fluent.withVolumeDevices(instance.getVolumeDevices()); - fluent.withVolumeMounts(instance.getVolumeMounts()); - fluent.withWorkingDir(instance.getWorkingDir()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EphemeralContainerBuilder(V1EphemeralContainer instance) { - this(instance,false); - } - public V1EphemeralContainerBuilder(V1EphemeralContainer instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withArgs(instance.getArgs()); - this.withCommand(instance.getCommand()); - this.withEnv(instance.getEnv()); - this.withEnvFrom(instance.getEnvFrom()); - this.withImage(instance.getImage()); - this.withImagePullPolicy(instance.getImagePullPolicy()); - this.withLifecycle(instance.getLifecycle()); - this.withLivenessProbe(instance.getLivenessProbe()); - this.withName(instance.getName()); - this.withPorts(instance.getPorts()); - this.withReadinessProbe(instance.getReadinessProbe()); - this.withResizePolicy(instance.getResizePolicy()); - this.withResources(instance.getResources()); - this.withSecurityContext(instance.getSecurityContext()); - this.withStartupProbe(instance.getStartupProbe()); - this.withStdin(instance.getStdin()); - this.withStdinOnce(instance.getStdinOnce()); - this.withTargetContainerName(instance.getTargetContainerName()); - this.withTerminationMessagePath(instance.getTerminationMessagePath()); - this.withTerminationMessagePolicy(instance.getTerminationMessagePolicy()); - this.withTty(instance.getTty()); - this.withVolumeDevices(instance.getVolumeDevices()); - this.withVolumeMounts(instance.getVolumeMounts()); - this.withWorkingDir(instance.getWorkingDir()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EphemeralContainerFluent fluent; - Boolean validationEnabled; + public V1EphemeralContainer build() { V1EphemeralContainer buildable = new V1EphemeralContainer(); buildable.setArgs(fluent.getArgs()); buildable.setCommand(fluent.getCommand()); - buildable.setEnv(fluent.getEnv()); - buildable.setEnvFrom(fluent.getEnvFrom()); + buildable.setEnv(fluent.buildEnv()); + buildable.setEnvFrom(fluent.buildEnvFrom()); buildable.setImage(fluent.getImage()); buildable.setImagePullPolicy(fluent.getImagePullPolicy()); - buildable.setLifecycle(fluent.getLifecycle()); - buildable.setLivenessProbe(fluent.getLivenessProbe()); + buildable.setLifecycle(fluent.buildLifecycle()); + buildable.setLivenessProbe(fluent.buildLivenessProbe()); buildable.setName(fluent.getName()); - buildable.setPorts(fluent.getPorts()); - buildable.setReadinessProbe(fluent.getReadinessProbe()); - buildable.setResizePolicy(fluent.getResizePolicy()); - buildable.setResources(fluent.getResources()); - buildable.setSecurityContext(fluent.getSecurityContext()); - buildable.setStartupProbe(fluent.getStartupProbe()); + buildable.setPorts(fluent.buildPorts()); + buildable.setReadinessProbe(fluent.buildReadinessProbe()); + buildable.setResizePolicy(fluent.buildResizePolicy()); + buildable.setResources(fluent.buildResources()); + buildable.setRestartPolicy(fluent.getRestartPolicy()); + buildable.setSecurityContext(fluent.buildSecurityContext()); + buildable.setStartupProbe(fluent.buildStartupProbe()); buildable.setStdin(fluent.getStdin()); buildable.setStdinOnce(fluent.getStdinOnce()); buildable.setTargetContainerName(fluent.getTargetContainerName()); buildable.setTerminationMessagePath(fluent.getTerminationMessagePath()); buildable.setTerminationMessagePolicy(fluent.getTerminationMessagePolicy()); buildable.setTty(fluent.getTty()); - buildable.setVolumeDevices(fluent.getVolumeDevices()); - buildable.setVolumeMounts(fluent.getVolumeMounts()); + buildable.setVolumeDevices(fluent.buildVolumeDevices()); + buildable.setVolumeMounts(fluent.buildVolumeMounts()); buildable.setWorkingDir(fluent.getWorkingDir()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerFluent.java index 9c2154cba2..690ec004a0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerFluent.java @@ -1,414 +1,1846 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; import java.util.List; import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.util.Collection; +import java.lang.Object; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; import java.util.Iterator; - /** - * Generated - */ -public interface V1EphemeralContainerFluent> extends Fluent{ - public A addToArgs(int index,String item); - public A setToArgs(int index,String item); - public A addToArgs(java.lang.String... items); - public A addAllToArgs(Collection items); - public A removeFromArgs(java.lang.String... items); - public A removeAllFromArgs(Collection items); - public List getArgs(); - public String getArg(int index); - public String getFirstArg(); - public String getLastArg(); - public String getMatchingArg(Predicate predicate); - public Boolean hasMatchingArg(Predicate predicate); - public A withArgs(List args); - public A withArgs(java.lang.String... args); - public Boolean hasArgs(); - public A addToCommand(int index,String item); - public A setToCommand(int index,String item); - public A addToCommand(java.lang.String... items); - public A addAllToCommand(Collection items); - public A removeFromCommand(java.lang.String... items); - public A removeAllFromCommand(Collection items); - public List getCommand(); - public String getCommand(int index); - public String getFirstCommand(); - public String getLastCommand(); - public String getMatchingCommand(Predicate predicate); - public Boolean hasMatchingCommand(Predicate predicate); - public A withCommand(List command); - public A withCommand(java.lang.String... command); - public Boolean hasCommand(); - public A addToEnv(int index,V1EnvVar item); - public A setToEnv(int index,V1EnvVar item); - public A addToEnv(io.kubernetes.client.openapi.models.V1EnvVar... items); - public A addAllToEnv(Collection items); - public A removeFromEnv(io.kubernetes.client.openapi.models.V1EnvVar... items); - public A removeAllFromEnv(Collection items); - public A removeMatchingFromEnv(Predicate predicate); - - /** - * This method has been deprecated, please use method buildEnv instead. - * @return The buildable object. - */ - @Deprecated - public List getEnv(); - public List buildEnv(); - public V1EnvVar buildEnv(int index); - public V1EnvVar buildFirstEnv(); - public V1EnvVar buildLastEnv(); - public V1EnvVar buildMatchingEnv(Predicate predicate); - public Boolean hasMatchingEnv(Predicate predicate); - public A withEnv(List env); - public A withEnv(io.kubernetes.client.openapi.models.V1EnvVar... env); - public Boolean hasEnv(); - public V1EphemeralContainerFluent.EnvNested addNewEnv(); - public V1EphemeralContainerFluent.EnvNested addNewEnvLike(V1EnvVar item); - public V1EphemeralContainerFluent.EnvNested setNewEnvLike(int index,V1EnvVar item); - public V1EphemeralContainerFluent.EnvNested editEnv(int index); - public V1EphemeralContainerFluent.EnvNested editFirstEnv(); - public V1EphemeralContainerFluent.EnvNested editLastEnv(); - public V1EphemeralContainerFluent.EnvNested editMatchingEnv(Predicate predicate); - public A addToEnvFrom(int index,V1EnvFromSource item); - public A setToEnvFrom(int index,V1EnvFromSource item); - public A addToEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items); - public A addAllToEnvFrom(Collection items); - public A removeFromEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items); - public A removeAllFromEnvFrom(Collection items); - public A removeMatchingFromEnvFrom(Predicate predicate); - - /** - * This method has been deprecated, please use method buildEnvFrom instead. - * @return The buildable object. - */ - @Deprecated - public List getEnvFrom(); - public List buildEnvFrom(); - public V1EnvFromSource buildEnvFrom(int index); - public V1EnvFromSource buildFirstEnvFrom(); - public V1EnvFromSource buildLastEnvFrom(); - public V1EnvFromSource buildMatchingEnvFrom(Predicate predicate); - public Boolean hasMatchingEnvFrom(Predicate predicate); - public A withEnvFrom(List envFrom); - public A withEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... envFrom); - public Boolean hasEnvFrom(); - public V1EphemeralContainerFluent.EnvFromNested addNewEnvFrom(); - public V1EphemeralContainerFluent.EnvFromNested addNewEnvFromLike(V1EnvFromSource item); - public V1EphemeralContainerFluent.EnvFromNested setNewEnvFromLike(int index,V1EnvFromSource item); - public V1EphemeralContainerFluent.EnvFromNested editEnvFrom(int index); - public V1EphemeralContainerFluent.EnvFromNested editFirstEnvFrom(); - public V1EphemeralContainerFluent.EnvFromNested editLastEnvFrom(); - public V1EphemeralContainerFluent.EnvFromNested editMatchingEnvFrom(Predicate predicate); - public String getImage(); - public A withImage(String image); - public Boolean hasImage(); - public String getImagePullPolicy(); - public A withImagePullPolicy(String imagePullPolicy); - public Boolean hasImagePullPolicy(); - - /** - * This method has been deprecated, please use method buildLifecycle instead. - * @return The buildable object. - */ - @Deprecated - public V1Lifecycle getLifecycle(); - public V1Lifecycle buildLifecycle(); - public A withLifecycle(V1Lifecycle lifecycle); - public Boolean hasLifecycle(); - public V1EphemeralContainerFluent.LifecycleNested withNewLifecycle(); - public V1EphemeralContainerFluent.LifecycleNested withNewLifecycleLike(V1Lifecycle item); - public V1EphemeralContainerFluent.LifecycleNested editLifecycle(); - public V1EphemeralContainerFluent.LifecycleNested editOrNewLifecycle(); - public V1EphemeralContainerFluent.LifecycleNested editOrNewLifecycleLike(V1Lifecycle item); - - /** - * This method has been deprecated, please use method buildLivenessProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getLivenessProbe(); - public V1Probe buildLivenessProbe(); - public A withLivenessProbe(V1Probe livenessProbe); - public Boolean hasLivenessProbe(); - public V1EphemeralContainerFluent.LivenessProbeNested withNewLivenessProbe(); - public V1EphemeralContainerFluent.LivenessProbeNested withNewLivenessProbeLike(V1Probe item); - public V1EphemeralContainerFluent.LivenessProbeNested editLivenessProbe(); - public V1EphemeralContainerFluent.LivenessProbeNested editOrNewLivenessProbe(); - public V1EphemeralContainerFluent.LivenessProbeNested editOrNewLivenessProbeLike(V1Probe item); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public A addToPorts(int index,V1ContainerPort item); - public A setToPorts(int index,V1ContainerPort item); - public A addToPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items); - public A addAllToPorts(Collection items); - public A removeFromPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items); - public A removeAllFromPorts(Collection items); - public A removeMatchingFromPorts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts(); - public List buildPorts(); - public V1ContainerPort buildPort(int index); - public V1ContainerPort buildFirstPort(); - public V1ContainerPort buildLastPort(); - public V1ContainerPort buildMatchingPort(Predicate predicate); - public Boolean hasMatchingPort(Predicate predicate); - public A withPorts(List ports); - public A withPorts(io.kubernetes.client.openapi.models.V1ContainerPort... ports); - public Boolean hasPorts(); - public V1EphemeralContainerFluent.PortsNested addNewPort(); - public V1EphemeralContainerFluent.PortsNested addNewPortLike(V1ContainerPort item); - public V1EphemeralContainerFluent.PortsNested setNewPortLike(int index,V1ContainerPort item); - public V1EphemeralContainerFluent.PortsNested editPort(int index); - public V1EphemeralContainerFluent.PortsNested editFirstPort(); - public V1EphemeralContainerFluent.PortsNested editLastPort(); - public V1EphemeralContainerFluent.PortsNested editMatchingPort(Predicate predicate); - - /** - * This method has been deprecated, please use method buildReadinessProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getReadinessProbe(); - public V1Probe buildReadinessProbe(); - public A withReadinessProbe(V1Probe readinessProbe); - public Boolean hasReadinessProbe(); - public V1EphemeralContainerFluent.ReadinessProbeNested withNewReadinessProbe(); - public V1EphemeralContainerFluent.ReadinessProbeNested withNewReadinessProbeLike(V1Probe item); - public V1EphemeralContainerFluent.ReadinessProbeNested editReadinessProbe(); - public V1EphemeralContainerFluent.ReadinessProbeNested editOrNewReadinessProbe(); - public V1EphemeralContainerFluent.ReadinessProbeNested editOrNewReadinessProbeLike(V1Probe item); - public A addToResizePolicy(int index,V1ContainerResizePolicy item); - public A setToResizePolicy(int index,V1ContainerResizePolicy item); - public A addToResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items); - public A addAllToResizePolicy(Collection items); - public A removeFromResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items); - public A removeAllFromResizePolicy(Collection items); - public A removeMatchingFromResizePolicy(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResizePolicy instead. - * @return The buildable object. - */ - @Deprecated - public List getResizePolicy(); - public List buildResizePolicy(); - public V1ContainerResizePolicy buildResizePolicy(int index); - public V1ContainerResizePolicy buildFirstResizePolicy(); - public V1ContainerResizePolicy buildLastResizePolicy(); - public V1ContainerResizePolicy buildMatchingResizePolicy(Predicate predicate); - public Boolean hasMatchingResizePolicy(Predicate predicate); - public A withResizePolicy(List resizePolicy); - public A withResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... resizePolicy); - public Boolean hasResizePolicy(); - public V1EphemeralContainerFluent.ResizePolicyNested addNewResizePolicy(); - public V1EphemeralContainerFluent.ResizePolicyNested addNewResizePolicyLike(V1ContainerResizePolicy item); - public V1EphemeralContainerFluent.ResizePolicyNested setNewResizePolicyLike(int index,V1ContainerResizePolicy item); - public V1EphemeralContainerFluent.ResizePolicyNested editResizePolicy(int index); - public V1EphemeralContainerFluent.ResizePolicyNested editFirstResizePolicy(); - public V1EphemeralContainerFluent.ResizePolicyNested editLastResizePolicy(); - public V1EphemeralContainerFluent.ResizePolicyNested editMatchingResizePolicy(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResources instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceRequirements getResources(); - public V1ResourceRequirements buildResources(); - public A withResources(V1ResourceRequirements resources); - public Boolean hasResources(); - public V1EphemeralContainerFluent.ResourcesNested withNewResources(); - public V1EphemeralContainerFluent.ResourcesNested withNewResourcesLike(V1ResourceRequirements item); - public V1EphemeralContainerFluent.ResourcesNested editResources(); - public V1EphemeralContainerFluent.ResourcesNested editOrNewResources(); - public V1EphemeralContainerFluent.ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item); - - /** - * This method has been deprecated, please use method buildSecurityContext instead. - * @return The buildable object. - */ - @Deprecated - public V1SecurityContext getSecurityContext(); - public V1SecurityContext buildSecurityContext(); - public A withSecurityContext(V1SecurityContext securityContext); - public Boolean hasSecurityContext(); - public V1EphemeralContainerFluent.SecurityContextNested withNewSecurityContext(); - public V1EphemeralContainerFluent.SecurityContextNested withNewSecurityContextLike(V1SecurityContext item); - public V1EphemeralContainerFluent.SecurityContextNested editSecurityContext(); - public V1EphemeralContainerFluent.SecurityContextNested editOrNewSecurityContext(); - public V1EphemeralContainerFluent.SecurityContextNested editOrNewSecurityContextLike(V1SecurityContext item); - - /** - * This method has been deprecated, please use method buildStartupProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getStartupProbe(); - public V1Probe buildStartupProbe(); - public A withStartupProbe(V1Probe startupProbe); - public Boolean hasStartupProbe(); - public V1EphemeralContainerFluent.StartupProbeNested withNewStartupProbe(); - public V1EphemeralContainerFluent.StartupProbeNested withNewStartupProbeLike(V1Probe item); - public V1EphemeralContainerFluent.StartupProbeNested editStartupProbe(); - public V1EphemeralContainerFluent.StartupProbeNested editOrNewStartupProbe(); - public V1EphemeralContainerFluent.StartupProbeNested editOrNewStartupProbeLike(V1Probe item); - public Boolean getStdin(); - public A withStdin(Boolean stdin); - public Boolean hasStdin(); - public Boolean getStdinOnce(); - public A withStdinOnce(Boolean stdinOnce); - public Boolean hasStdinOnce(); - public String getTargetContainerName(); - public A withTargetContainerName(String targetContainerName); - public Boolean hasTargetContainerName(); - public String getTerminationMessagePath(); - public A withTerminationMessagePath(String terminationMessagePath); - public Boolean hasTerminationMessagePath(); - public String getTerminationMessagePolicy(); - public A withTerminationMessagePolicy(String terminationMessagePolicy); - public Boolean hasTerminationMessagePolicy(); - public Boolean getTty(); - public A withTty(Boolean tty); - public Boolean hasTty(); - public A addToVolumeDevices(int index,V1VolumeDevice item); - public A setToVolumeDevices(int index,V1VolumeDevice item); - public A addToVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items); - public A addAllToVolumeDevices(Collection items); - public A removeFromVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items); - public A removeAllFromVolumeDevices(Collection items); - public A removeMatchingFromVolumeDevices(Predicate predicate); - - /** - * This method has been deprecated, please use method buildVolumeDevices instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeDevices(); - public List buildVolumeDevices(); - public V1VolumeDevice buildVolumeDevice(int index); - public V1VolumeDevice buildFirstVolumeDevice(); - public V1VolumeDevice buildLastVolumeDevice(); - public V1VolumeDevice buildMatchingVolumeDevice(Predicate predicate); - public Boolean hasMatchingVolumeDevice(Predicate predicate); - public A withVolumeDevices(List volumeDevices); - public A withVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... volumeDevices); - public Boolean hasVolumeDevices(); - public V1EphemeralContainerFluent.VolumeDevicesNested addNewVolumeDevice(); - public V1EphemeralContainerFluent.VolumeDevicesNested addNewVolumeDeviceLike(V1VolumeDevice item); - public V1EphemeralContainerFluent.VolumeDevicesNested setNewVolumeDeviceLike(int index,V1VolumeDevice item); - public V1EphemeralContainerFluent.VolumeDevicesNested editVolumeDevice(int index); - public V1EphemeralContainerFluent.VolumeDevicesNested editFirstVolumeDevice(); - public V1EphemeralContainerFluent.VolumeDevicesNested editLastVolumeDevice(); - public V1EphemeralContainerFluent.VolumeDevicesNested editMatchingVolumeDevice(Predicate predicate); - public A addToVolumeMounts(int index,V1VolumeMount item); - public A setToVolumeMounts(int index,V1VolumeMount item); - public A addToVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items); - public A addAllToVolumeMounts(Collection items); - public A removeFromVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items); - public A removeAllFromVolumeMounts(Collection items); - public A removeMatchingFromVolumeMounts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildVolumeMounts instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeMounts(); - public List buildVolumeMounts(); - public V1VolumeMount buildVolumeMount(int index); - public V1VolumeMount buildFirstVolumeMount(); - public V1VolumeMount buildLastVolumeMount(); - public V1VolumeMount buildMatchingVolumeMount(Predicate predicate); - public Boolean hasMatchingVolumeMount(Predicate predicate); - public A withVolumeMounts(List volumeMounts); - public A withVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... volumeMounts); - public Boolean hasVolumeMounts(); - public V1EphemeralContainerFluent.VolumeMountsNested addNewVolumeMount(); - public V1EphemeralContainerFluent.VolumeMountsNested addNewVolumeMountLike(V1VolumeMount item); - public V1EphemeralContainerFluent.VolumeMountsNested setNewVolumeMountLike(int index,V1VolumeMount item); - public V1EphemeralContainerFluent.VolumeMountsNested editVolumeMount(int index); - public V1EphemeralContainerFluent.VolumeMountsNested editFirstVolumeMount(); - public V1EphemeralContainerFluent.VolumeMountsNested editLastVolumeMount(); - public V1EphemeralContainerFluent.VolumeMountsNested editMatchingVolumeMount(Predicate predicate); - public String getWorkingDir(); - public A withWorkingDir(String workingDir); - public Boolean hasWorkingDir(); - public A withStdin(); - public A withStdinOnce(); - public A withTty(); - public interface EnvNested extends Nested,V1EnvVarFluent>{ - public N and(); - public N endEnv(); - - } - public interface EnvFromNested extends Nested,V1EnvFromSourceFluent>{ - public N and(); - public N endEnvFrom(); - - } - public interface LifecycleNested extends Nested,V1LifecycleFluent>{ - public N and(); - public N endLifecycle(); - - } - public interface LivenessProbeNested extends Nested,V1ProbeFluent>{ - public N and(); - public N endLivenessProbe(); - - } - public interface PortsNested extends Nested,V1ContainerPortFluent>{ - public N and(); - public N endPort(); - - } - public interface ReadinessProbeNested extends Nested,V1ProbeFluent>{ - public N and(); - public N endReadinessProbe(); - - } - public interface ResizePolicyNested extends Nested,V1ContainerResizePolicyFluent>{ - public N and(); - public N endResizePolicy(); - - } - public interface ResourcesNested extends Nested,V1ResourceRequirementsFluent>{ - public N and(); - public N endResources(); - - } - public interface SecurityContextNested extends Nested,V1SecurityContextFluent>{ - public N and(); - public N endSecurityContext(); - - } - public interface StartupProbeNested extends Nested,V1ProbeFluent>{ - public N and(); - public N endStartupProbe(); - - } - public interface VolumeDevicesNested extends Nested,V1VolumeDeviceFluent>{ - public N and(); - public N endVolumeDevice(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EphemeralContainerFluent> extends BaseFluent{ + public V1EphemeralContainerFluent() { } - public interface VolumeMountsNested extends Nested,V1VolumeMountFluent>{ - public N and(); - public N endVolumeMount(); + + public V1EphemeralContainerFluent(V1EphemeralContainer instance) { + this.copyInstance(instance); + } + private List args; + private List command; + private ArrayList env; + private ArrayList envFrom; + private String image; + private String imagePullPolicy; + private V1LifecycleBuilder lifecycle; + private V1ProbeBuilder livenessProbe; + private String name; + private ArrayList ports; + private V1ProbeBuilder readinessProbe; + private ArrayList resizePolicy; + private V1ResourceRequirementsBuilder resources; + private String restartPolicy; + private V1SecurityContextBuilder securityContext; + private V1ProbeBuilder startupProbe; + private Boolean stdin; + private Boolean stdinOnce; + private String targetContainerName; + private String terminationMessagePath; + private String terminationMessagePolicy; + private Boolean tty; + private ArrayList volumeDevices; + private ArrayList volumeMounts; + private String workingDir; + + protected void copyInstance(V1EphemeralContainer instance) { + instance = (instance != null ? instance : new V1EphemeralContainer()); + if (instance != null) { + this.withArgs(instance.getArgs()); + this.withCommand(instance.getCommand()); + this.withEnv(instance.getEnv()); + this.withEnvFrom(instance.getEnvFrom()); + this.withImage(instance.getImage()); + this.withImagePullPolicy(instance.getImagePullPolicy()); + this.withLifecycle(instance.getLifecycle()); + this.withLivenessProbe(instance.getLivenessProbe()); + this.withName(instance.getName()); + this.withPorts(instance.getPorts()); + this.withReadinessProbe(instance.getReadinessProbe()); + this.withResizePolicy(instance.getResizePolicy()); + this.withResources(instance.getResources()); + this.withRestartPolicy(instance.getRestartPolicy()); + this.withSecurityContext(instance.getSecurityContext()); + this.withStartupProbe(instance.getStartupProbe()); + this.withStdin(instance.getStdin()); + this.withStdinOnce(instance.getStdinOnce()); + this.withTargetContainerName(instance.getTargetContainerName()); + this.withTerminationMessagePath(instance.getTerminationMessagePath()); + this.withTerminationMessagePolicy(instance.getTerminationMessagePolicy()); + this.withTty(instance.getTty()); + this.withVolumeDevices(instance.getVolumeDevices()); + this.withVolumeMounts(instance.getVolumeMounts()); + this.withWorkingDir(instance.getWorkingDir()); + } + } + + public A addToArgs(int index,String item) { + if (this.args == null) {this.args = new ArrayList();} + this.args.add(index, item); + return (A)this; + } + + public A setToArgs(int index,String item) { + if (this.args == null) {this.args = new ArrayList();} + this.args.set(index, item); return (A)this; + } + + public A addToArgs(java.lang.String... items) { + if (this.args == null) {this.args = new ArrayList();} + for (String item : items) {this.args.add(item);} return (A)this; + } + + public A addAllToArgs(Collection items) { + if (this.args == null) {this.args = new ArrayList();} + for (String item : items) {this.args.add(item);} return (A)this; + } + + public A removeFromArgs(java.lang.String... items) { + if (this.args == null) return (A)this; + for (String item : items) { this.args.remove(item);} return (A)this; + } + + public A removeAllFromArgs(Collection items) { + if (this.args == null) return (A)this; + for (String item : items) { this.args.remove(item);} return (A)this; + } + + public List getArgs() { + return this.args; + } + + public String getArg(int index) { + return this.args.get(index); + } + + public String getFirstArg() { + return this.args.get(0); + } + + public String getLastArg() { + return this.args.get(args.size() - 1); + } + + public String getMatchingArg(Predicate predicate) { + for (String item : args) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingArg(Predicate predicate) { + for (String item : args) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withArgs(List args) { + if (args != null) { + this.args = new ArrayList(); + for (String item : args) { + this.addToArgs(item); + } + } else { + this.args = null; + } + return (A) this; + } + + public A withArgs(java.lang.String... args) { + if (this.args != null) { + this.args.clear(); + _visitables.remove("args"); + } + if (args != null) { + for (String item : args) { + this.addToArgs(item); + } + } + return (A) this; + } + + public boolean hasArgs() { + return this.args != null && !this.args.isEmpty(); + } + + public A addToCommand(int index,String item) { + if (this.command == null) {this.command = new ArrayList();} + this.command.add(index, item); + return (A)this; + } + + public A setToCommand(int index,String item) { + if (this.command == null) {this.command = new ArrayList();} + this.command.set(index, item); return (A)this; + } + + public A addToCommand(java.lang.String... items) { + if (this.command == null) {this.command = new ArrayList();} + for (String item : items) {this.command.add(item);} return (A)this; + } + + public A addAllToCommand(Collection items) { + if (this.command == null) {this.command = new ArrayList();} + for (String item : items) {this.command.add(item);} return (A)this; + } + + public A removeFromCommand(java.lang.String... items) { + if (this.command == null) return (A)this; + for (String item : items) { this.command.remove(item);} return (A)this; + } + + public A removeAllFromCommand(Collection items) { + if (this.command == null) return (A)this; + for (String item : items) { this.command.remove(item);} return (A)this; + } + + public List getCommand() { + return this.command; + } + + public String getCommand(int index) { + return this.command.get(index); + } + + public String getFirstCommand() { + return this.command.get(0); + } + + public String getLastCommand() { + return this.command.get(command.size() - 1); + } + + public String getMatchingCommand(Predicate predicate) { + for (String item : command) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingCommand(Predicate predicate) { + for (String item : command) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withCommand(List command) { + if (command != null) { + this.command = new ArrayList(); + for (String item : command) { + this.addToCommand(item); + } + } else { + this.command = null; + } + return (A) this; + } + + public A withCommand(java.lang.String... command) { + if (this.command != null) { + this.command.clear(); + _visitables.remove("command"); + } + if (command != null) { + for (String item : command) { + this.addToCommand(item); + } + } + return (A) this; + } + + public boolean hasCommand() { + return this.command != null && !this.command.isEmpty(); + } + + public A addToEnv(int index,V1EnvVar item) { + if (this.env == null) {this.env = new ArrayList();} + V1EnvVarBuilder builder = new V1EnvVarBuilder(item); + if (index < 0 || index >= env.size()) { _visitables.get("env").add(builder); env.add(builder); } else { _visitables.get("env").add(index, builder); env.add(index, builder);} + return (A)this; + } + + public A setToEnv(int index,V1EnvVar item) { + if (this.env == null) {this.env = new ArrayList();} + V1EnvVarBuilder builder = new V1EnvVarBuilder(item); + if (index < 0 || index >= env.size()) { _visitables.get("env").add(builder); env.add(builder); } else { _visitables.get("env").set(index, builder); env.set(index, builder);} + return (A)this; + } + + public A addToEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) { + if (this.env == null) {this.env = new ArrayList();} + for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this; + } + + public A addAllToEnv(Collection items) { + if (this.env == null) {this.env = new ArrayList();} + for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this; + } + + public A removeFromEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) { + if (this.env == null) return (A)this; + for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder); this.env.remove(builder);} return (A)this; + } + + public A removeAllFromEnv(Collection items) { + if (this.env == null) return (A)this; + for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder); this.env.remove(builder);} return (A)this; + } + + public A removeMatchingFromEnv(Predicate predicate) { + if (env == null) return (A) this; + final Iterator each = env.iterator(); + final List visitables = _visitables.get("env"); + while (each.hasNext()) { + V1EnvVarBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildEnv() { + return this.env != null ? build(env) : null; + } + + public V1EnvVar buildEnv(int index) { + return this.env.get(index).build(); + } + + public V1EnvVar buildFirstEnv() { + return this.env.get(0).build(); + } + + public V1EnvVar buildLastEnv() { + return this.env.get(env.size() - 1).build(); + } + + public V1EnvVar buildMatchingEnv(Predicate predicate) { + for (V1EnvVarBuilder item : env) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingEnv(Predicate predicate) { + for (V1EnvVarBuilder item : env) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withEnv(List env) { + if (this.env != null) { + this._visitables.get("env").clear(); + } + if (env != null) { + this.env = new ArrayList(); + for (V1EnvVar item : env) { + this.addToEnv(item); + } + } else { + this.env = null; + } + return (A) this; + } + + public A withEnv(io.kubernetes.client.openapi.models.V1EnvVar... env) { + if (this.env != null) { + this.env.clear(); + _visitables.remove("env"); + } + if (env != null) { + for (V1EnvVar item : env) { + this.addToEnv(item); + } + } + return (A) this; + } + + public boolean hasEnv() { + return this.env != null && !this.env.isEmpty(); + } + + public EnvNested addNewEnv() { + return new EnvNested(-1, null); + } + + public EnvNested addNewEnvLike(V1EnvVar item) { + return new EnvNested(-1, item); + } + + public EnvNested setNewEnvLike(int index,V1EnvVar item) { + return new EnvNested(index, item); + } + + public EnvNested editEnv(int index) { + if (env.size() <= index) throw new RuntimeException("Can't edit env. Index exceeds size."); + return setNewEnvLike(index, buildEnv(index)); + } + + public EnvNested editFirstEnv() { + if (env.size() == 0) throw new RuntimeException("Can't edit first env. The list is empty."); + return setNewEnvLike(0, buildEnv(0)); + } + + public EnvNested editLastEnv() { + int index = env.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last env. The list is empty."); + return setNewEnvLike(index, buildEnv(index)); + } + + public EnvNested editMatchingEnv(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item); + if (index < 0 || index >= envFrom.size()) { _visitables.get("envFrom").add(builder); envFrom.add(builder); } else { _visitables.get("envFrom").add(index, builder); envFrom.add(index, builder);} + return (A)this; + } + + public A setToEnvFrom(int index,V1EnvFromSource item) { + if (this.envFrom == null) {this.envFrom = new ArrayList();} + V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item); + if (index < 0 || index >= envFrom.size()) { _visitables.get("envFrom").add(builder); envFrom.add(builder); } else { _visitables.get("envFrom").set(index, builder); envFrom.set(index, builder);} + return (A)this; + } + + public A addToEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) { + if (this.envFrom == null) {this.envFrom = new ArrayList();} + for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this; + } + + public A addAllToEnvFrom(Collection items) { + if (this.envFrom == null) {this.envFrom = new ArrayList();} + for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this; + } + + public A removeFromEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) { + if (this.envFrom == null) return (A)this; + for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder); this.envFrom.remove(builder);} return (A)this; + } + + public A removeAllFromEnvFrom(Collection items) { + if (this.envFrom == null) return (A)this; + for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder); this.envFrom.remove(builder);} return (A)this; + } + + public A removeMatchingFromEnvFrom(Predicate predicate) { + if (envFrom == null) return (A) this; + final Iterator each = envFrom.iterator(); + final List visitables = _visitables.get("envFrom"); + while (each.hasNext()) { + V1EnvFromSourceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildEnvFrom() { + return this.envFrom != null ? build(envFrom) : null; + } + + public V1EnvFromSource buildEnvFrom(int index) { + return this.envFrom.get(index).build(); + } + + public V1EnvFromSource buildFirstEnvFrom() { + return this.envFrom.get(0).build(); + } + + public V1EnvFromSource buildLastEnvFrom() { + return this.envFrom.get(envFrom.size() - 1).build(); + } + + public V1EnvFromSource buildMatchingEnvFrom(Predicate predicate) { + for (V1EnvFromSourceBuilder item : envFrom) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingEnvFrom(Predicate predicate) { + for (V1EnvFromSourceBuilder item : envFrom) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withEnvFrom(List envFrom) { + if (this.envFrom != null) { + this._visitables.get("envFrom").clear(); + } + if (envFrom != null) { + this.envFrom = new ArrayList(); + for (V1EnvFromSource item : envFrom) { + this.addToEnvFrom(item); + } + } else { + this.envFrom = null; + } + return (A) this; + } + + public A withEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... envFrom) { + if (this.envFrom != null) { + this.envFrom.clear(); + _visitables.remove("envFrom"); + } + if (envFrom != null) { + for (V1EnvFromSource item : envFrom) { + this.addToEnvFrom(item); + } + } + return (A) this; + } + + public boolean hasEnvFrom() { + return this.envFrom != null && !this.envFrom.isEmpty(); + } + + public EnvFromNested addNewEnvFrom() { + return new EnvFromNested(-1, null); + } + + public EnvFromNested addNewEnvFromLike(V1EnvFromSource item) { + return new EnvFromNested(-1, item); + } + + public EnvFromNested setNewEnvFromLike(int index,V1EnvFromSource item) { + return new EnvFromNested(index, item); + } + + public EnvFromNested editEnvFrom(int index) { + if (envFrom.size() <= index) throw new RuntimeException("Can't edit envFrom. Index exceeds size."); + return setNewEnvFromLike(index, buildEnvFrom(index)); + } + + public EnvFromNested editFirstEnvFrom() { + if (envFrom.size() == 0) throw new RuntimeException("Can't edit first envFrom. The list is empty."); + return setNewEnvFromLike(0, buildEnvFrom(0)); + } + + public EnvFromNested editLastEnvFrom() { + int index = envFrom.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last envFrom. The list is empty."); + return setNewEnvFromLike(index, buildEnvFrom(index)); + } + + public EnvFromNested editMatchingEnvFrom(Predicate predicate) { + int index = -1; + for (int i=0;i withNewLifecycle() { + return new LifecycleNested(null); + } + + public LifecycleNested withNewLifecycleLike(V1Lifecycle item) { + return new LifecycleNested(item); + } + + public LifecycleNested editLifecycle() { + return withNewLifecycleLike(java.util.Optional.ofNullable(buildLifecycle()).orElse(null)); + } + + public LifecycleNested editOrNewLifecycle() { + return withNewLifecycleLike(java.util.Optional.ofNullable(buildLifecycle()).orElse(new V1LifecycleBuilder().build())); + } + + public LifecycleNested editOrNewLifecycleLike(V1Lifecycle item) { + return withNewLifecycleLike(java.util.Optional.ofNullable(buildLifecycle()).orElse(item)); + } + + public V1Probe buildLivenessProbe() { + return this.livenessProbe != null ? this.livenessProbe.build() : null; + } + + public A withLivenessProbe(V1Probe livenessProbe) { + this._visitables.remove("livenessProbe"); + if (livenessProbe != null) { + this.livenessProbe = new V1ProbeBuilder(livenessProbe); + this._visitables.get("livenessProbe").add(this.livenessProbe); + } else { + this.livenessProbe = null; + this._visitables.get("livenessProbe").remove(this.livenessProbe); + } + return (A) this; + } + + public boolean hasLivenessProbe() { + return this.livenessProbe != null; + } + + public LivenessProbeNested withNewLivenessProbe() { + return new LivenessProbeNested(null); + } + + public LivenessProbeNested withNewLivenessProbeLike(V1Probe item) { + return new LivenessProbeNested(item); + } + + public LivenessProbeNested editLivenessProbe() { + return withNewLivenessProbeLike(java.util.Optional.ofNullable(buildLivenessProbe()).orElse(null)); + } + + public LivenessProbeNested editOrNewLivenessProbe() { + return withNewLivenessProbeLike(java.util.Optional.ofNullable(buildLivenessProbe()).orElse(new V1ProbeBuilder().build())); + } + + public LivenessProbeNested editOrNewLivenessProbeLike(V1Probe item) { + return withNewLivenessProbeLike(java.util.Optional.ofNullable(buildLivenessProbe()).orElse(item)); + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public A addToPorts(int index,V1ContainerPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} + return (A)this; + } + + public A setToPorts(int index,V1ContainerPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} + return (A)this; + } + + public A addToPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A addAllToPorts(Collection items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A removeFromPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) { + if (this.ports == null) return (A)this; + for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeAllFromPorts(Collection items) { + if (this.ports == null) return (A)this; + for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeMatchingFromPorts(Predicate predicate) { + if (ports == null) return (A) this; + final Iterator each = ports.iterator(); + final List visitables = _visitables.get("ports"); + while (each.hasNext()) { + V1ContainerPortBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPorts() { + return this.ports != null ? build(ports) : null; + } + + public V1ContainerPort buildPort(int index) { + return this.ports.get(index).build(); + } + + public V1ContainerPort buildFirstPort() { + return this.ports.get(0).build(); + } + + public V1ContainerPort buildLastPort() { + return this.ports.get(ports.size() - 1).build(); + } + + public V1ContainerPort buildMatchingPort(Predicate predicate) { + for (V1ContainerPortBuilder item : ports) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPort(Predicate predicate) { + for (V1ContainerPortBuilder item : ports) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPorts(List ports) { + if (this.ports != null) { + this._visitables.get("ports").clear(); + } + if (ports != null) { + this.ports = new ArrayList(); + for (V1ContainerPort item : ports) { + this.addToPorts(item); + } + } else { + this.ports = null; + } + return (A) this; + } + + public A withPorts(io.kubernetes.client.openapi.models.V1ContainerPort... ports) { + if (this.ports != null) { + this.ports.clear(); + _visitables.remove("ports"); + } + if (ports != null) { + for (V1ContainerPort item : ports) { + this.addToPorts(item); + } + } + return (A) this; + } + + public boolean hasPorts() { + return this.ports != null && !this.ports.isEmpty(); + } + + public PortsNested addNewPort() { + return new PortsNested(-1, null); + } + + public PortsNested addNewPortLike(V1ContainerPort item) { + return new PortsNested(-1, item); + } + + public PortsNested setNewPortLike(int index,V1ContainerPort item) { + return new PortsNested(index, item); + } + + public PortsNested editPort(int index) { + if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editFirstPort() { + if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); + return setNewPortLike(0, buildPort(0)); + } + + public PortsNested editLastPort() { + int index = ports.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editMatchingPort(Predicate predicate) { + int index = -1; + for (int i=0;i withNewReadinessProbe() { + return new ReadinessProbeNested(null); + } + + public ReadinessProbeNested withNewReadinessProbeLike(V1Probe item) { + return new ReadinessProbeNested(item); + } + + public ReadinessProbeNested editReadinessProbe() { + return withNewReadinessProbeLike(java.util.Optional.ofNullable(buildReadinessProbe()).orElse(null)); + } + + public ReadinessProbeNested editOrNewReadinessProbe() { + return withNewReadinessProbeLike(java.util.Optional.ofNullable(buildReadinessProbe()).orElse(new V1ProbeBuilder().build())); + } + + public ReadinessProbeNested editOrNewReadinessProbeLike(V1Probe item) { + return withNewReadinessProbeLike(java.util.Optional.ofNullable(buildReadinessProbe()).orElse(item)); + } + + public A addToResizePolicy(int index,V1ContainerResizePolicy item) { + if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} + V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item); + if (index < 0 || index >= resizePolicy.size()) { _visitables.get("resizePolicy").add(builder); resizePolicy.add(builder); } else { _visitables.get("resizePolicy").add(index, builder); resizePolicy.add(index, builder);} + return (A)this; + } + + public A setToResizePolicy(int index,V1ContainerResizePolicy item) { + if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} + V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item); + if (index < 0 || index >= resizePolicy.size()) { _visitables.get("resizePolicy").add(builder); resizePolicy.add(builder); } else { _visitables.get("resizePolicy").set(index, builder); resizePolicy.set(index, builder);} + return (A)this; + } + + public A addToResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items) { + if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} + for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").add(builder);this.resizePolicy.add(builder);} return (A)this; + } + + public A addAllToResizePolicy(Collection items) { + if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} + for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").add(builder);this.resizePolicy.add(builder);} return (A)this; + } + + public A removeFromResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items) { + if (this.resizePolicy == null) return (A)this; + for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").remove(builder); this.resizePolicy.remove(builder);} return (A)this; + } + + public A removeAllFromResizePolicy(Collection items) { + if (this.resizePolicy == null) return (A)this; + for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").remove(builder); this.resizePolicy.remove(builder);} return (A)this; + } + + public A removeMatchingFromResizePolicy(Predicate predicate) { + if (resizePolicy == null) return (A) this; + final Iterator each = resizePolicy.iterator(); + final List visitables = _visitables.get("resizePolicy"); + while (each.hasNext()) { + V1ContainerResizePolicyBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResizePolicy() { + return this.resizePolicy != null ? build(resizePolicy) : null; + } + + public V1ContainerResizePolicy buildResizePolicy(int index) { + return this.resizePolicy.get(index).build(); + } + + public V1ContainerResizePolicy buildFirstResizePolicy() { + return this.resizePolicy.get(0).build(); + } + + public V1ContainerResizePolicy buildLastResizePolicy() { + return this.resizePolicy.get(resizePolicy.size() - 1).build(); + } + + public V1ContainerResizePolicy buildMatchingResizePolicy(Predicate predicate) { + for (V1ContainerResizePolicyBuilder item : resizePolicy) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResizePolicy(Predicate predicate) { + for (V1ContainerResizePolicyBuilder item : resizePolicy) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResizePolicy(List resizePolicy) { + if (this.resizePolicy != null) { + this._visitables.get("resizePolicy").clear(); + } + if (resizePolicy != null) { + this.resizePolicy = new ArrayList(); + for (V1ContainerResizePolicy item : resizePolicy) { + this.addToResizePolicy(item); + } + } else { + this.resizePolicy = null; + } + return (A) this; + } + + public A withResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... resizePolicy) { + if (this.resizePolicy != null) { + this.resizePolicy.clear(); + _visitables.remove("resizePolicy"); + } + if (resizePolicy != null) { + for (V1ContainerResizePolicy item : resizePolicy) { + this.addToResizePolicy(item); + } + } + return (A) this; + } + + public boolean hasResizePolicy() { + return this.resizePolicy != null && !this.resizePolicy.isEmpty(); + } + + public ResizePolicyNested addNewResizePolicy() { + return new ResizePolicyNested(-1, null); + } + + public ResizePolicyNested addNewResizePolicyLike(V1ContainerResizePolicy item) { + return new ResizePolicyNested(-1, item); + } + + public ResizePolicyNested setNewResizePolicyLike(int index,V1ContainerResizePolicy item) { + return new ResizePolicyNested(index, item); + } + + public ResizePolicyNested editResizePolicy(int index) { + if (resizePolicy.size() <= index) throw new RuntimeException("Can't edit resizePolicy. Index exceeds size."); + return setNewResizePolicyLike(index, buildResizePolicy(index)); + } + + public ResizePolicyNested editFirstResizePolicy() { + if (resizePolicy.size() == 0) throw new RuntimeException("Can't edit first resizePolicy. The list is empty."); + return setNewResizePolicyLike(0, buildResizePolicy(0)); + } + + public ResizePolicyNested editLastResizePolicy() { + int index = resizePolicy.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resizePolicy. The list is empty."); + return setNewResizePolicyLike(index, buildResizePolicy(index)); + } + + public ResizePolicyNested editMatchingResizePolicy(Predicate predicate) { + int index = -1; + for (int i=0;i withNewResources() { + return new ResourcesNested(null); + } + + public ResourcesNested withNewResourcesLike(V1ResourceRequirements item) { + return new ResourcesNested(item); + } + + public ResourcesNested editResources() { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(null)); + } + + public ResourcesNested editOrNewResources() { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(new V1ResourceRequirementsBuilder().build())); + } + + public ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item) { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(item)); + } + + public String getRestartPolicy() { + return this.restartPolicy; + } + + public A withRestartPolicy(String restartPolicy) { + this.restartPolicy = restartPolicy; + return (A) this; + } + + public boolean hasRestartPolicy() { + return this.restartPolicy != null; + } + + public V1SecurityContext buildSecurityContext() { + return this.securityContext != null ? this.securityContext.build() : null; + } + + public A withSecurityContext(V1SecurityContext securityContext) { + this._visitables.remove("securityContext"); + if (securityContext != null) { + this.securityContext = new V1SecurityContextBuilder(securityContext); + this._visitables.get("securityContext").add(this.securityContext); + } else { + this.securityContext = null; + this._visitables.get("securityContext").remove(this.securityContext); + } + return (A) this; + } + + public boolean hasSecurityContext() { + return this.securityContext != null; + } + + public SecurityContextNested withNewSecurityContext() { + return new SecurityContextNested(null); + } + + public SecurityContextNested withNewSecurityContextLike(V1SecurityContext item) { + return new SecurityContextNested(item); + } + + public SecurityContextNested editSecurityContext() { + return withNewSecurityContextLike(java.util.Optional.ofNullable(buildSecurityContext()).orElse(null)); + } + + public SecurityContextNested editOrNewSecurityContext() { + return withNewSecurityContextLike(java.util.Optional.ofNullable(buildSecurityContext()).orElse(new V1SecurityContextBuilder().build())); + } + + public SecurityContextNested editOrNewSecurityContextLike(V1SecurityContext item) { + return withNewSecurityContextLike(java.util.Optional.ofNullable(buildSecurityContext()).orElse(item)); + } + + public V1Probe buildStartupProbe() { + return this.startupProbe != null ? this.startupProbe.build() : null; + } + + public A withStartupProbe(V1Probe startupProbe) { + this._visitables.remove("startupProbe"); + if (startupProbe != null) { + this.startupProbe = new V1ProbeBuilder(startupProbe); + this._visitables.get("startupProbe").add(this.startupProbe); + } else { + this.startupProbe = null; + this._visitables.get("startupProbe").remove(this.startupProbe); + } + return (A) this; + } + + public boolean hasStartupProbe() { + return this.startupProbe != null; + } + + public StartupProbeNested withNewStartupProbe() { + return new StartupProbeNested(null); + } + + public StartupProbeNested withNewStartupProbeLike(V1Probe item) { + return new StartupProbeNested(item); + } + + public StartupProbeNested editStartupProbe() { + return withNewStartupProbeLike(java.util.Optional.ofNullable(buildStartupProbe()).orElse(null)); + } + + public StartupProbeNested editOrNewStartupProbe() { + return withNewStartupProbeLike(java.util.Optional.ofNullable(buildStartupProbe()).orElse(new V1ProbeBuilder().build())); + } + + public StartupProbeNested editOrNewStartupProbeLike(V1Probe item) { + return withNewStartupProbeLike(java.util.Optional.ofNullable(buildStartupProbe()).orElse(item)); + } + + public Boolean getStdin() { + return this.stdin; + } + + public A withStdin(Boolean stdin) { + this.stdin = stdin; + return (A) this; + } + + public boolean hasStdin() { + return this.stdin != null; + } + + public Boolean getStdinOnce() { + return this.stdinOnce; + } + + public A withStdinOnce(Boolean stdinOnce) { + this.stdinOnce = stdinOnce; + return (A) this; + } + + public boolean hasStdinOnce() { + return this.stdinOnce != null; + } + + public String getTargetContainerName() { + return this.targetContainerName; + } + + public A withTargetContainerName(String targetContainerName) { + this.targetContainerName = targetContainerName; + return (A) this; + } + + public boolean hasTargetContainerName() { + return this.targetContainerName != null; + } + + public String getTerminationMessagePath() { + return this.terminationMessagePath; + } + + public A withTerminationMessagePath(String terminationMessagePath) { + this.terminationMessagePath = terminationMessagePath; + return (A) this; + } + + public boolean hasTerminationMessagePath() { + return this.terminationMessagePath != null; + } + + public String getTerminationMessagePolicy() { + return this.terminationMessagePolicy; + } + + public A withTerminationMessagePolicy(String terminationMessagePolicy) { + this.terminationMessagePolicy = terminationMessagePolicy; + return (A) this; + } + + public boolean hasTerminationMessagePolicy() { + return this.terminationMessagePolicy != null; + } + + public Boolean getTty() { + return this.tty; + } + + public A withTty(Boolean tty) { + this.tty = tty; + return (A) this; + } + + public boolean hasTty() { + return this.tty != null; + } + + public A addToVolumeDevices(int index,V1VolumeDevice item) { + if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} + V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item); + if (index < 0 || index >= volumeDevices.size()) { _visitables.get("volumeDevices").add(builder); volumeDevices.add(builder); } else { _visitables.get("volumeDevices").add(index, builder); volumeDevices.add(index, builder);} + return (A)this; + } + + public A setToVolumeDevices(int index,V1VolumeDevice item) { + if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} + V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item); + if (index < 0 || index >= volumeDevices.size()) { _visitables.get("volumeDevices").add(builder); volumeDevices.add(builder); } else { _visitables.get("volumeDevices").set(index, builder); volumeDevices.set(index, builder);} + return (A)this; + } + + public A addToVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) { + if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} + for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this; + } + + public A addAllToVolumeDevices(Collection items) { + if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} + for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this; + } + + public A removeFromVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) { + if (this.volumeDevices == null) return (A)this; + for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder); this.volumeDevices.remove(builder);} return (A)this; + } + + public A removeAllFromVolumeDevices(Collection items) { + if (this.volumeDevices == null) return (A)this; + for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder); this.volumeDevices.remove(builder);} return (A)this; + } + + public A removeMatchingFromVolumeDevices(Predicate predicate) { + if (volumeDevices == null) return (A) this; + final Iterator each = volumeDevices.iterator(); + final List visitables = _visitables.get("volumeDevices"); + while (each.hasNext()) { + V1VolumeDeviceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVolumeDevices() { + return this.volumeDevices != null ? build(volumeDevices) : null; + } + + public V1VolumeDevice buildVolumeDevice(int index) { + return this.volumeDevices.get(index).build(); + } + + public V1VolumeDevice buildFirstVolumeDevice() { + return this.volumeDevices.get(0).build(); + } + + public V1VolumeDevice buildLastVolumeDevice() { + return this.volumeDevices.get(volumeDevices.size() - 1).build(); + } + + public V1VolumeDevice buildMatchingVolumeDevice(Predicate predicate) { + for (V1VolumeDeviceBuilder item : volumeDevices) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVolumeDevice(Predicate predicate) { + for (V1VolumeDeviceBuilder item : volumeDevices) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVolumeDevices(List volumeDevices) { + if (this.volumeDevices != null) { + this._visitables.get("volumeDevices").clear(); + } + if (volumeDevices != null) { + this.volumeDevices = new ArrayList(); + for (V1VolumeDevice item : volumeDevices) { + this.addToVolumeDevices(item); + } + } else { + this.volumeDevices = null; + } + return (A) this; + } + + public A withVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... volumeDevices) { + if (this.volumeDevices != null) { + this.volumeDevices.clear(); + _visitables.remove("volumeDevices"); + } + if (volumeDevices != null) { + for (V1VolumeDevice item : volumeDevices) { + this.addToVolumeDevices(item); + } + } + return (A) this; + } + + public boolean hasVolumeDevices() { + return this.volumeDevices != null && !this.volumeDevices.isEmpty(); + } + + public VolumeDevicesNested addNewVolumeDevice() { + return new VolumeDevicesNested(-1, null); + } + + public VolumeDevicesNested addNewVolumeDeviceLike(V1VolumeDevice item) { + return new VolumeDevicesNested(-1, item); + } + + public VolumeDevicesNested setNewVolumeDeviceLike(int index,V1VolumeDevice item) { + return new VolumeDevicesNested(index, item); + } + + public VolumeDevicesNested editVolumeDevice(int index) { + if (volumeDevices.size() <= index) throw new RuntimeException("Can't edit volumeDevices. Index exceeds size."); + return setNewVolumeDeviceLike(index, buildVolumeDevice(index)); + } + + public VolumeDevicesNested editFirstVolumeDevice() { + if (volumeDevices.size() == 0) throw new RuntimeException("Can't edit first volumeDevices. The list is empty."); + return setNewVolumeDeviceLike(0, buildVolumeDevice(0)); + } + + public VolumeDevicesNested editLastVolumeDevice() { + int index = volumeDevices.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last volumeDevices. The list is empty."); + return setNewVolumeDeviceLike(index, buildVolumeDevice(index)); + } + + public VolumeDevicesNested editMatchingVolumeDevice(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item); + if (index < 0 || index >= volumeMounts.size()) { _visitables.get("volumeMounts").add(builder); volumeMounts.add(builder); } else { _visitables.get("volumeMounts").add(index, builder); volumeMounts.add(index, builder);} + return (A)this; + } + + public A setToVolumeMounts(int index,V1VolumeMount item) { + if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} + V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item); + if (index < 0 || index >= volumeMounts.size()) { _visitables.get("volumeMounts").add(builder); volumeMounts.add(builder); } else { _visitables.get("volumeMounts").set(index, builder); volumeMounts.set(index, builder);} + return (A)this; + } + + public A addToVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) { + if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} + for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this; + } + + public A addAllToVolumeMounts(Collection items) { + if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} + for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this; + } + + public A removeFromVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) { + if (this.volumeMounts == null) return (A)this; + for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder); this.volumeMounts.remove(builder);} return (A)this; + } + + public A removeAllFromVolumeMounts(Collection items) { + if (this.volumeMounts == null) return (A)this; + for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder); this.volumeMounts.remove(builder);} return (A)this; + } + + public A removeMatchingFromVolumeMounts(Predicate predicate) { + if (volumeMounts == null) return (A) this; + final Iterator each = volumeMounts.iterator(); + final List visitables = _visitables.get("volumeMounts"); + while (each.hasNext()) { + V1VolumeMountBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVolumeMounts() { + return this.volumeMounts != null ? build(volumeMounts) : null; + } + + public V1VolumeMount buildVolumeMount(int index) { + return this.volumeMounts.get(index).build(); + } + + public V1VolumeMount buildFirstVolumeMount() { + return this.volumeMounts.get(0).build(); + } + + public V1VolumeMount buildLastVolumeMount() { + return this.volumeMounts.get(volumeMounts.size() - 1).build(); + } + + public V1VolumeMount buildMatchingVolumeMount(Predicate predicate) { + for (V1VolumeMountBuilder item : volumeMounts) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVolumeMount(Predicate predicate) { + for (V1VolumeMountBuilder item : volumeMounts) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVolumeMounts(List volumeMounts) { + if (this.volumeMounts != null) { + this._visitables.get("volumeMounts").clear(); + } + if (volumeMounts != null) { + this.volumeMounts = new ArrayList(); + for (V1VolumeMount item : volumeMounts) { + this.addToVolumeMounts(item); + } + } else { + this.volumeMounts = null; + } + return (A) this; + } + + public A withVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... volumeMounts) { + if (this.volumeMounts != null) { + this.volumeMounts.clear(); + _visitables.remove("volumeMounts"); + } + if (volumeMounts != null) { + for (V1VolumeMount item : volumeMounts) { + this.addToVolumeMounts(item); + } + } + return (A) this; + } + + public boolean hasVolumeMounts() { + return this.volumeMounts != null && !this.volumeMounts.isEmpty(); + } + + public VolumeMountsNested addNewVolumeMount() { + return new VolumeMountsNested(-1, null); + } + + public VolumeMountsNested addNewVolumeMountLike(V1VolumeMount item) { + return new VolumeMountsNested(-1, item); + } + + public VolumeMountsNested setNewVolumeMountLike(int index,V1VolumeMount item) { + return new VolumeMountsNested(index, item); + } + + public VolumeMountsNested editVolumeMount(int index) { + if (volumeMounts.size() <= index) throw new RuntimeException("Can't edit volumeMounts. Index exceeds size."); + return setNewVolumeMountLike(index, buildVolumeMount(index)); + } + + public VolumeMountsNested editFirstVolumeMount() { + if (volumeMounts.size() == 0) throw new RuntimeException("Can't edit first volumeMounts. The list is empty."); + return setNewVolumeMountLike(0, buildVolumeMount(0)); + } + + public VolumeMountsNested editLastVolumeMount() { + int index = volumeMounts.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last volumeMounts. The list is empty."); + return setNewVolumeMountLike(index, buildVolumeMount(index)); + } + + public VolumeMountsNested editMatchingVolumeMount(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1EnvVarFluent> implements Nested{ + EnvNested(int index,V1EnvVar item) { + this.index = index; + this.builder = new V1EnvVarBuilder(this, item); + } + V1EnvVarBuilder builder; + int index; + + public N and() { + return (N) V1EphemeralContainerFluent.this.setToEnv(index,builder.build()); + } + + public N endEnv() { + return and(); + } + + + } + public class EnvFromNested extends V1EnvFromSourceFluent> implements Nested{ + EnvFromNested(int index,V1EnvFromSource item) { + this.index = index; + this.builder = new V1EnvFromSourceBuilder(this, item); + } + V1EnvFromSourceBuilder builder; + int index; + + public N and() { + return (N) V1EphemeralContainerFluent.this.setToEnvFrom(index,builder.build()); + } + + public N endEnvFrom() { + return and(); + } + + + } + public class LifecycleNested extends V1LifecycleFluent> implements Nested{ + LifecycleNested(V1Lifecycle item) { + this.builder = new V1LifecycleBuilder(this, item); + } + V1LifecycleBuilder builder; + + public N and() { + return (N) V1EphemeralContainerFluent.this.withLifecycle(builder.build()); + } + + public N endLifecycle() { + return and(); + } + + + } + public class LivenessProbeNested extends V1ProbeFluent> implements Nested{ + LivenessProbeNested(V1Probe item) { + this.builder = new V1ProbeBuilder(this, item); + } + V1ProbeBuilder builder; + + public N and() { + return (N) V1EphemeralContainerFluent.this.withLivenessProbe(builder.build()); + } + + public N endLivenessProbe() { + return and(); + } + + + } + public class PortsNested extends V1ContainerPortFluent> implements Nested{ + PortsNested(int index,V1ContainerPort item) { + this.index = index; + this.builder = new V1ContainerPortBuilder(this, item); + } + V1ContainerPortBuilder builder; + int index; + + public N and() { + return (N) V1EphemeralContainerFluent.this.setToPorts(index,builder.build()); + } + + public N endPort() { + return and(); + } + + + } + public class ReadinessProbeNested extends V1ProbeFluent> implements Nested{ + ReadinessProbeNested(V1Probe item) { + this.builder = new V1ProbeBuilder(this, item); + } + V1ProbeBuilder builder; + + public N and() { + return (N) V1EphemeralContainerFluent.this.withReadinessProbe(builder.build()); + } + public N endReadinessProbe() { + return and(); + } + + + } + public class ResizePolicyNested extends V1ContainerResizePolicyFluent> implements Nested{ + ResizePolicyNested(int index,V1ContainerResizePolicy item) { + this.index = index; + this.builder = new V1ContainerResizePolicyBuilder(this, item); + } + V1ContainerResizePolicyBuilder builder; + int index; + + public N and() { + return (N) V1EphemeralContainerFluent.this.setToResizePolicy(index,builder.build()); + } + + public N endResizePolicy() { + return and(); + } + + + } + public class ResourcesNested extends V1ResourceRequirementsFluent> implements Nested{ + ResourcesNested(V1ResourceRequirements item) { + this.builder = new V1ResourceRequirementsBuilder(this, item); + } + V1ResourceRequirementsBuilder builder; + + public N and() { + return (N) V1EphemeralContainerFluent.this.withResources(builder.build()); + } + + public N endResources() { + return and(); + } + + + } + public class SecurityContextNested extends V1SecurityContextFluent> implements Nested{ + SecurityContextNested(V1SecurityContext item) { + this.builder = new V1SecurityContextBuilder(this, item); + } + V1SecurityContextBuilder builder; + + public N and() { + return (N) V1EphemeralContainerFluent.this.withSecurityContext(builder.build()); + } + + public N endSecurityContext() { + return and(); + } + + + } + public class StartupProbeNested extends V1ProbeFluent> implements Nested{ + StartupProbeNested(V1Probe item) { + this.builder = new V1ProbeBuilder(this, item); + } + V1ProbeBuilder builder; + + public N and() { + return (N) V1EphemeralContainerFluent.this.withStartupProbe(builder.build()); + } + + public N endStartupProbe() { + return and(); + } + + + } + public class VolumeDevicesNested extends V1VolumeDeviceFluent> implements Nested{ + VolumeDevicesNested(int index,V1VolumeDevice item) { + this.index = index; + this.builder = new V1VolumeDeviceBuilder(this, item); + } + V1VolumeDeviceBuilder builder; + int index; + + public N and() { + return (N) V1EphemeralContainerFluent.this.setToVolumeDevices(index,builder.build()); + } + + public N endVolumeDevice() { + return and(); + } + + } + public class VolumeMountsNested extends V1VolumeMountFluent> implements Nested{ + VolumeMountsNested(int index,V1VolumeMount item) { + this.index = index; + this.builder = new V1VolumeMountBuilder(this, item); + } + V1VolumeMountBuilder builder; + int index; + + public N and() { + return (N) V1EphemeralContainerFluent.this.setToVolumeMounts(index,builder.build()); + } + + public N endVolumeMount() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerFluentImpl.java deleted file mode 100644 index fb9b1c91a3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralContainerFluentImpl.java +++ /dev/null @@ -1,1422 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.util.Iterator; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EphemeralContainerFluentImpl> extends BaseFluent implements V1EphemeralContainerFluent{ - public V1EphemeralContainerFluentImpl() { - } - public V1EphemeralContainerFluentImpl(V1EphemeralContainer instance) { - if (instance != null) { - this.withArgs(instance.getArgs()); - this.withCommand(instance.getCommand()); - this.withEnv(instance.getEnv()); - this.withEnvFrom(instance.getEnvFrom()); - this.withImage(instance.getImage()); - this.withImagePullPolicy(instance.getImagePullPolicy()); - this.withLifecycle(instance.getLifecycle()); - this.withLivenessProbe(instance.getLivenessProbe()); - this.withName(instance.getName()); - this.withPorts(instance.getPorts()); - this.withReadinessProbe(instance.getReadinessProbe()); - this.withResizePolicy(instance.getResizePolicy()); - this.withResources(instance.getResources()); - this.withSecurityContext(instance.getSecurityContext()); - this.withStartupProbe(instance.getStartupProbe()); - this.withStdin(instance.getStdin()); - this.withStdinOnce(instance.getStdinOnce()); - this.withTargetContainerName(instance.getTargetContainerName()); - this.withTerminationMessagePath(instance.getTerminationMessagePath()); - this.withTerminationMessagePolicy(instance.getTerminationMessagePolicy()); - this.withTty(instance.getTty()); - this.withVolumeDevices(instance.getVolumeDevices()); - this.withVolumeMounts(instance.getVolumeMounts()); - this.withWorkingDir(instance.getWorkingDir()); - } - } - private List args; - private List command; - private ArrayList env; - private ArrayList envFrom; - private String image; - private String imagePullPolicy; - private V1LifecycleBuilder lifecycle; - private V1ProbeBuilder livenessProbe; - private String name; - private ArrayList ports; - private V1ProbeBuilder readinessProbe; - private ArrayList resizePolicy; - private V1ResourceRequirementsBuilder resources; - private V1SecurityContextBuilder securityContext; - private V1ProbeBuilder startupProbe; - private Boolean stdin; - private Boolean stdinOnce; - private String targetContainerName; - private String terminationMessagePath; - private String terminationMessagePolicy; - private Boolean tty; - private ArrayList volumeDevices; - private ArrayList volumeMounts; - private String workingDir; - public A addToArgs(int index,String item) { - if (this.args == null) {this.args = new ArrayList();} - this.args.add(index, item); - return (A)this; - } - public A setToArgs(int index,String item) { - if (this.args == null) {this.args = new ArrayList();} - this.args.set(index, item); return (A)this; - } - public A addToArgs(java.lang.String... items) { - if (this.args == null) {this.args = new ArrayList();} - for (String item : items) {this.args.add(item);} return (A)this; - } - public A addAllToArgs(Collection items) { - if (this.args == null) {this.args = new ArrayList();} - for (String item : items) {this.args.add(item);} return (A)this; - } - public A removeFromArgs(java.lang.String... items) { - for (String item : items) {if (this.args!= null){ this.args.remove(item);}} return (A)this; - } - public A removeAllFromArgs(Collection items) { - for (String item : items) {if (this.args!= null){ this.args.remove(item);}} return (A)this; - } - public List getArgs() { - return this.args; - } - public String getArg(int index) { - return this.args.get(index); - } - public String getFirstArg() { - return this.args.get(0); - } - public String getLastArg() { - return this.args.get(args.size() - 1); - } - public String getMatchingArg(Predicate predicate) { - for (String item: args) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingArg(Predicate predicate) { - for (String item: args) { if(predicate.test(item)){ return true;} } return false; - } - public A withArgs(List args) { - if (args != null) {this.args = new ArrayList(); for (String item : args){this.addToArgs(item);}} else { this.args = null;} return (A) this; - } - public A withArgs(java.lang.String... args) { - if (this.args != null) {this.args.clear(); _visitables.remove("args"); } - if (args != null) {for (String item :args){ this.addToArgs(item);}} return (A) this; - } - public Boolean hasArgs() { - return args != null && !args.isEmpty(); - } - public A addToCommand(int index,String item) { - if (this.command == null) {this.command = new ArrayList();} - this.command.add(index, item); - return (A)this; - } - public A setToCommand(int index,String item) { - if (this.command == null) {this.command = new ArrayList();} - this.command.set(index, item); return (A)this; - } - public A addToCommand(java.lang.String... items) { - if (this.command == null) {this.command = new ArrayList();} - for (String item : items) {this.command.add(item);} return (A)this; - } - public A addAllToCommand(Collection items) { - if (this.command == null) {this.command = new ArrayList();} - for (String item : items) {this.command.add(item);} return (A)this; - } - public A removeFromCommand(java.lang.String... items) { - for (String item : items) {if (this.command!= null){ this.command.remove(item);}} return (A)this; - } - public A removeAllFromCommand(Collection items) { - for (String item : items) {if (this.command!= null){ this.command.remove(item);}} return (A)this; - } - public List getCommand() { - return this.command; - } - public String getCommand(int index) { - return this.command.get(index); - } - public String getFirstCommand() { - return this.command.get(0); - } - public String getLastCommand() { - return this.command.get(command.size() - 1); - } - public String getMatchingCommand(Predicate predicate) { - for (String item: command) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingCommand(Predicate predicate) { - for (String item: command) { if(predicate.test(item)){ return true;} } return false; - } - public A withCommand(List command) { - if (command != null) {this.command = new ArrayList(); for (String item : command){this.addToCommand(item);}} else { this.command = null;} return (A) this; - } - public A withCommand(java.lang.String... command) { - if (this.command != null) {this.command.clear(); _visitables.remove("command"); } - if (command != null) {for (String item :command){ this.addToCommand(item);}} return (A) this; - } - public Boolean hasCommand() { - return command != null && !command.isEmpty(); - } - public A addToEnv(int index,V1EnvVar item) { - if (this.env == null) {this.env = new ArrayList();} - V1EnvVarBuilder builder = new V1EnvVarBuilder(item); - if (index < 0 || index >= env.size()) { _visitables.get("env").add(builder); env.add(builder); } else { _visitables.get("env").add(index, builder); env.add(index, builder);} - return (A)this; - } - public A setToEnv(int index,V1EnvVar item) { - if (this.env == null) {this.env = new ArrayList();} - V1EnvVarBuilder builder = new V1EnvVarBuilder(item); - if (index < 0 || index >= env.size()) { _visitables.get("env").add(builder); env.add(builder); } else { _visitables.get("env").set(index, builder); env.set(index, builder);} - return (A)this; - } - public A addToEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) { - if (this.env == null) {this.env = new ArrayList();} - for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this; - } - public A addAllToEnv(Collection items) { - if (this.env == null) {this.env = new ArrayList();} - for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this; - } - public A removeFromEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) { - for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder);if (this.env != null) {this.env.remove(builder);}} return (A)this; - } - public A removeAllFromEnv(Collection items) { - for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder);if (this.env != null) {this.env.remove(builder);}} return (A)this; - } - public A removeMatchingFromEnv(Predicate predicate) { - if (env == null) return (A) this; - final Iterator each = env.iterator(); - final List visitables = _visitables.get("env"); - while (each.hasNext()) { - V1EnvVarBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildEnv instead. - * @return The buildable object. - */ - @Deprecated - public List getEnv() { - return env != null ? build(env) : null; - } - public List buildEnv() { - return env != null ? build(env) : null; - } - public V1EnvVar buildEnv(int index) { - return this.env.get(index).build(); - } - public V1EnvVar buildFirstEnv() { - return this.env.get(0).build(); - } - public V1EnvVar buildLastEnv() { - return this.env.get(env.size() - 1).build(); - } - public V1EnvVar buildMatchingEnv(Predicate predicate) { - for (V1EnvVarBuilder item: env) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingEnv(Predicate predicate) { - for (V1EnvVarBuilder item: env) { if(predicate.test(item)){ return true;} } return false; - } - public A withEnv(List env) { - if (this.env != null) { _visitables.get("env").clear();} - if (env != null) {this.env = new ArrayList(); for (V1EnvVar item : env){this.addToEnv(item);}} else { this.env = null;} return (A) this; - } - public A withEnv(io.kubernetes.client.openapi.models.V1EnvVar... env) { - if (this.env != null) {this.env.clear(); _visitables.remove("env"); } - if (env != null) {for (V1EnvVar item :env){ this.addToEnv(item);}} return (A) this; - } - public Boolean hasEnv() { - return env != null && !env.isEmpty(); - } - public V1EphemeralContainerFluentImpl.EnvNested addNewEnv() { - return new V1EphemeralContainerFluentImpl.EnvNestedImpl(); - } - public V1EphemeralContainerFluentImpl.EnvNested addNewEnvLike(V1EnvVar item) { - return new V1EphemeralContainerFluentImpl.EnvNestedImpl(-1, item); - } - public V1EphemeralContainerFluentImpl.EnvNested setNewEnvLike(int index,V1EnvVar item) { - return new V1EphemeralContainerFluentImpl.EnvNestedImpl(index, item); - } - public V1EphemeralContainerFluentImpl.EnvNested editEnv(int index) { - if (env.size() <= index) throw new RuntimeException("Can't edit env. Index exceeds size."); - return setNewEnvLike(index, buildEnv(index)); - } - public V1EphemeralContainerFluentImpl.EnvNested editFirstEnv() { - if (env.size() == 0) throw new RuntimeException("Can't edit first env. The list is empty."); - return setNewEnvLike(0, buildEnv(0)); - } - public V1EphemeralContainerFluentImpl.EnvNested editLastEnv() { - int index = env.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last env. The list is empty."); - return setNewEnvLike(index, buildEnv(index)); - } - public V1EphemeralContainerFluentImpl.EnvNested editMatchingEnv(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item); - if (index < 0 || index >= envFrom.size()) { _visitables.get("envFrom").add(builder); envFrom.add(builder); } else { _visitables.get("envFrom").add(index, builder); envFrom.add(index, builder);} - return (A)this; - } - public A setToEnvFrom(int index,V1EnvFromSource item) { - if (this.envFrom == null) {this.envFrom = new ArrayList();} - V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item); - if (index < 0 || index >= envFrom.size()) { _visitables.get("envFrom").add(builder); envFrom.add(builder); } else { _visitables.get("envFrom").set(index, builder); envFrom.set(index, builder);} - return (A)this; - } - public A addToEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) { - if (this.envFrom == null) {this.envFrom = new ArrayList();} - for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this; - } - public A addAllToEnvFrom(Collection items) { - if (this.envFrom == null) {this.envFrom = new ArrayList();} - for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this; - } - public A removeFromEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) { - for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder);if (this.envFrom != null) {this.envFrom.remove(builder);}} return (A)this; - } - public A removeAllFromEnvFrom(Collection items) { - for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder);if (this.envFrom != null) {this.envFrom.remove(builder);}} return (A)this; - } - public A removeMatchingFromEnvFrom(Predicate predicate) { - if (envFrom == null) return (A) this; - final Iterator each = envFrom.iterator(); - final List visitables = _visitables.get("envFrom"); - while (each.hasNext()) { - V1EnvFromSourceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildEnvFrom instead. - * @return The buildable object. - */ - @Deprecated - public List getEnvFrom() { - return envFrom != null ? build(envFrom) : null; - } - public List buildEnvFrom() { - return envFrom != null ? build(envFrom) : null; - } - public V1EnvFromSource buildEnvFrom(int index) { - return this.envFrom.get(index).build(); - } - public V1EnvFromSource buildFirstEnvFrom() { - return this.envFrom.get(0).build(); - } - public V1EnvFromSource buildLastEnvFrom() { - return this.envFrom.get(envFrom.size() - 1).build(); - } - public V1EnvFromSource buildMatchingEnvFrom(Predicate predicate) { - for (V1EnvFromSourceBuilder item: envFrom) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingEnvFrom(Predicate predicate) { - for (V1EnvFromSourceBuilder item: envFrom) { if(predicate.test(item)){ return true;} } return false; - } - public A withEnvFrom(List envFrom) { - if (this.envFrom != null) { _visitables.get("envFrom").clear();} - if (envFrom != null) {this.envFrom = new ArrayList(); for (V1EnvFromSource item : envFrom){this.addToEnvFrom(item);}} else { this.envFrom = null;} return (A) this; - } - public A withEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... envFrom) { - if (this.envFrom != null) {this.envFrom.clear(); _visitables.remove("envFrom"); } - if (envFrom != null) {for (V1EnvFromSource item :envFrom){ this.addToEnvFrom(item);}} return (A) this; - } - public Boolean hasEnvFrom() { - return envFrom != null && !envFrom.isEmpty(); - } - public V1EphemeralContainerFluentImpl.EnvFromNested addNewEnvFrom() { - return new V1EphemeralContainerFluentImpl.EnvFromNestedImpl(); - } - public V1EphemeralContainerFluentImpl.EnvFromNested addNewEnvFromLike(V1EnvFromSource item) { - return new V1EphemeralContainerFluentImpl.EnvFromNestedImpl(-1, item); - } - public V1EphemeralContainerFluentImpl.EnvFromNested setNewEnvFromLike(int index,V1EnvFromSource item) { - return new V1EphemeralContainerFluentImpl.EnvFromNestedImpl(index, item); - } - public V1EphemeralContainerFluentImpl.EnvFromNested editEnvFrom(int index) { - if (envFrom.size() <= index) throw new RuntimeException("Can't edit envFrom. Index exceeds size."); - return setNewEnvFromLike(index, buildEnvFrom(index)); - } - public V1EphemeralContainerFluentImpl.EnvFromNested editFirstEnvFrom() { - if (envFrom.size() == 0) throw new RuntimeException("Can't edit first envFrom. The list is empty."); - return setNewEnvFromLike(0, buildEnvFrom(0)); - } - public V1EphemeralContainerFluentImpl.EnvFromNested editLastEnvFrom() { - int index = envFrom.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last envFrom. The list is empty."); - return setNewEnvFromLike(index, buildEnvFrom(index)); - } - public V1EphemeralContainerFluentImpl.EnvFromNested editMatchingEnvFrom(Predicate predicate) { - int index = -1; - for (int i=0;i withNewLifecycle() { - return new V1EphemeralContainerFluentImpl.LifecycleNestedImpl(); - } - public V1EphemeralContainerFluentImpl.LifecycleNested withNewLifecycleLike(V1Lifecycle item) { - return new V1EphemeralContainerFluentImpl.LifecycleNestedImpl(item); - } - public V1EphemeralContainerFluentImpl.LifecycleNested editLifecycle() { - return withNewLifecycleLike(getLifecycle()); - } - public V1EphemeralContainerFluentImpl.LifecycleNested editOrNewLifecycle() { - return withNewLifecycleLike(getLifecycle() != null ? getLifecycle(): new V1LifecycleBuilder().build()); - } - public V1EphemeralContainerFluentImpl.LifecycleNested editOrNewLifecycleLike(V1Lifecycle item) { - return withNewLifecycleLike(getLifecycle() != null ? getLifecycle(): item); - } - - /** - * This method has been deprecated, please use method buildLivenessProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getLivenessProbe() { - return this.livenessProbe!=null ?this.livenessProbe.build():null; - } - public V1Probe buildLivenessProbe() { - return this.livenessProbe!=null ?this.livenessProbe.build():null; - } - public A withLivenessProbe(V1Probe livenessProbe) { - _visitables.get("livenessProbe").remove(this.livenessProbe); - if (livenessProbe!=null){ this.livenessProbe= new V1ProbeBuilder(livenessProbe); _visitables.get("livenessProbe").add(this.livenessProbe);} else { this.livenessProbe = null; _visitables.get("livenessProbe").remove(this.livenessProbe); } return (A) this; - } - public Boolean hasLivenessProbe() { - return this.livenessProbe != null; - } - public V1EphemeralContainerFluentImpl.LivenessProbeNested withNewLivenessProbe() { - return new V1EphemeralContainerFluentImpl.LivenessProbeNestedImpl(); - } - public V1EphemeralContainerFluentImpl.LivenessProbeNested withNewLivenessProbeLike(V1Probe item) { - return new V1EphemeralContainerFluentImpl.LivenessProbeNestedImpl(item); - } - public V1EphemeralContainerFluentImpl.LivenessProbeNested editLivenessProbe() { - return withNewLivenessProbeLike(getLivenessProbe()); - } - public V1EphemeralContainerFluentImpl.LivenessProbeNested editOrNewLivenessProbe() { - return withNewLivenessProbeLike(getLivenessProbe() != null ? getLivenessProbe(): new V1ProbeBuilder().build()); - } - public V1EphemeralContainerFluentImpl.LivenessProbeNested editOrNewLivenessProbeLike(V1Probe item) { - return withNewLivenessProbeLike(getLivenessProbe() != null ? getLivenessProbe(): item); - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public A addToPorts(int index,V1ContainerPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} - return (A)this; - } - public A setToPorts(int index,V1ContainerPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} - return (A)this; - } - public A addToPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A addAllToPorts(Collection items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A removeFromPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) { - for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeAllFromPorts(Collection items) { - for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeMatchingFromPorts(Predicate predicate) { - if (ports == null) return (A) this; - final Iterator each = ports.iterator(); - final List visitables = _visitables.get("ports"); - while (each.hasNext()) { - V1ContainerPortBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts() { - return ports != null ? build(ports) : null; - } - public List buildPorts() { - return ports != null ? build(ports) : null; - } - public V1ContainerPort buildPort(int index) { - return this.ports.get(index).build(); - } - public V1ContainerPort buildFirstPort() { - return this.ports.get(0).build(); - } - public V1ContainerPort buildLastPort() { - return this.ports.get(ports.size() - 1).build(); - } - public V1ContainerPort buildMatchingPort(Predicate predicate) { - for (V1ContainerPortBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPort(Predicate predicate) { - for (V1ContainerPortBuilder item: ports) { if(predicate.test(item)){ return true;} } return false; - } - public A withPorts(List ports) { - if (this.ports != null) { _visitables.get("ports").clear();} - if (ports != null) {this.ports = new ArrayList(); for (V1ContainerPort item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this; - } - public A withPorts(io.kubernetes.client.openapi.models.V1ContainerPort... ports) { - if (this.ports != null) {this.ports.clear(); _visitables.remove("ports"); } - if (ports != null) {for (V1ContainerPort item :ports){ this.addToPorts(item);}} return (A) this; - } - public Boolean hasPorts() { - return ports != null && !ports.isEmpty(); - } - public V1EphemeralContainerFluentImpl.PortsNested addNewPort() { - return new V1EphemeralContainerFluentImpl.PortsNestedImpl(); - } - public V1EphemeralContainerFluentImpl.PortsNested addNewPortLike(V1ContainerPort item) { - return new V1EphemeralContainerFluentImpl.PortsNestedImpl(-1, item); - } - public V1EphemeralContainerFluentImpl.PortsNested setNewPortLike(int index,V1ContainerPort item) { - return new V1EphemeralContainerFluentImpl.PortsNestedImpl(index, item); - } - public V1EphemeralContainerFluentImpl.PortsNested editPort(int index) { - if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); - return setNewPortLike(index, buildPort(index)); - } - public V1EphemeralContainerFluentImpl.PortsNested editFirstPort() { - if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); - return setNewPortLike(0, buildPort(0)); - } - public V1EphemeralContainerFluentImpl.PortsNested editLastPort() { - int index = ports.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); - return setNewPortLike(index, buildPort(index)); - } - public V1EphemeralContainerFluentImpl.PortsNested editMatchingPort(Predicate predicate) { - int index = -1; - for (int i=0;i withNewReadinessProbe() { - return new V1EphemeralContainerFluentImpl.ReadinessProbeNestedImpl(); - } - public V1EphemeralContainerFluentImpl.ReadinessProbeNested withNewReadinessProbeLike(V1Probe item) { - return new V1EphemeralContainerFluentImpl.ReadinessProbeNestedImpl(item); - } - public V1EphemeralContainerFluentImpl.ReadinessProbeNested editReadinessProbe() { - return withNewReadinessProbeLike(getReadinessProbe()); - } - public V1EphemeralContainerFluentImpl.ReadinessProbeNested editOrNewReadinessProbe() { - return withNewReadinessProbeLike(getReadinessProbe() != null ? getReadinessProbe(): new V1ProbeBuilder().build()); - } - public V1EphemeralContainerFluentImpl.ReadinessProbeNested editOrNewReadinessProbeLike(V1Probe item) { - return withNewReadinessProbeLike(getReadinessProbe() != null ? getReadinessProbe(): item); - } - public A addToResizePolicy(int index,V1ContainerResizePolicy item) { - if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} - V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item); - if (index < 0 || index >= resizePolicy.size()) { _visitables.get("resizePolicy").add(builder); resizePolicy.add(builder); } else { _visitables.get("resizePolicy").add(index, builder); resizePolicy.add(index, builder);} - return (A)this; - } - public A setToResizePolicy(int index,V1ContainerResizePolicy item) { - if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} - V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item); - if (index < 0 || index >= resizePolicy.size()) { _visitables.get("resizePolicy").add(builder); resizePolicy.add(builder); } else { _visitables.get("resizePolicy").set(index, builder); resizePolicy.set(index, builder);} - return (A)this; - } - public A addToResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items) { - if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} - for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").add(builder);this.resizePolicy.add(builder);} return (A)this; - } - public A addAllToResizePolicy(Collection items) { - if (this.resizePolicy == null) {this.resizePolicy = new ArrayList();} - for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").add(builder);this.resizePolicy.add(builder);} return (A)this; - } - public A removeFromResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... items) { - for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").remove(builder);if (this.resizePolicy != null) {this.resizePolicy.remove(builder);}} return (A)this; - } - public A removeAllFromResizePolicy(Collection items) { - for (V1ContainerResizePolicy item : items) {V1ContainerResizePolicyBuilder builder = new V1ContainerResizePolicyBuilder(item);_visitables.get("resizePolicy").remove(builder);if (this.resizePolicy != null) {this.resizePolicy.remove(builder);}} return (A)this; - } - public A removeMatchingFromResizePolicy(Predicate predicate) { - if (resizePolicy == null) return (A) this; - final Iterator each = resizePolicy.iterator(); - final List visitables = _visitables.get("resizePolicy"); - while (each.hasNext()) { - V1ContainerResizePolicyBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResizePolicy instead. - * @return The buildable object. - */ - @Deprecated - public List getResizePolicy() { - return resizePolicy != null ? build(resizePolicy) : null; - } - public List buildResizePolicy() { - return resizePolicy != null ? build(resizePolicy) : null; - } - public V1ContainerResizePolicy buildResizePolicy(int index) { - return this.resizePolicy.get(index).build(); - } - public V1ContainerResizePolicy buildFirstResizePolicy() { - return this.resizePolicy.get(0).build(); - } - public V1ContainerResizePolicy buildLastResizePolicy() { - return this.resizePolicy.get(resizePolicy.size() - 1).build(); - } - public V1ContainerResizePolicy buildMatchingResizePolicy(Predicate predicate) { - for (V1ContainerResizePolicyBuilder item: resizePolicy) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResizePolicy(Predicate predicate) { - for (V1ContainerResizePolicyBuilder item: resizePolicy) { if(predicate.test(item)){ return true;} } return false; - } - public A withResizePolicy(List resizePolicy) { - if (this.resizePolicy != null) { _visitables.get("resizePolicy").clear();} - if (resizePolicy != null) {this.resizePolicy = new ArrayList(); for (V1ContainerResizePolicy item : resizePolicy){this.addToResizePolicy(item);}} else { this.resizePolicy = null;} return (A) this; - } - public A withResizePolicy(io.kubernetes.client.openapi.models.V1ContainerResizePolicy... resizePolicy) { - if (this.resizePolicy != null) {this.resizePolicy.clear(); _visitables.remove("resizePolicy"); } - if (resizePolicy != null) {for (V1ContainerResizePolicy item :resizePolicy){ this.addToResizePolicy(item);}} return (A) this; - } - public Boolean hasResizePolicy() { - return resizePolicy != null && !resizePolicy.isEmpty(); - } - public V1EphemeralContainerFluentImpl.ResizePolicyNested addNewResizePolicy() { - return new V1EphemeralContainerFluentImpl.ResizePolicyNestedImpl(); - } - public V1EphemeralContainerFluentImpl.ResizePolicyNested addNewResizePolicyLike(V1ContainerResizePolicy item) { - return new V1EphemeralContainerFluentImpl.ResizePolicyNestedImpl(-1, item); - } - public V1EphemeralContainerFluentImpl.ResizePolicyNested setNewResizePolicyLike(int index,V1ContainerResizePolicy item) { - return new V1EphemeralContainerFluentImpl.ResizePolicyNestedImpl(index, item); - } - public V1EphemeralContainerFluentImpl.ResizePolicyNested editResizePolicy(int index) { - if (resizePolicy.size() <= index) throw new RuntimeException("Can't edit resizePolicy. Index exceeds size."); - return setNewResizePolicyLike(index, buildResizePolicy(index)); - } - public V1EphemeralContainerFluentImpl.ResizePolicyNested editFirstResizePolicy() { - if (resizePolicy.size() == 0) throw new RuntimeException("Can't edit first resizePolicy. The list is empty."); - return setNewResizePolicyLike(0, buildResizePolicy(0)); - } - public V1EphemeralContainerFluentImpl.ResizePolicyNested editLastResizePolicy() { - int index = resizePolicy.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resizePolicy. The list is empty."); - return setNewResizePolicyLike(index, buildResizePolicy(index)); - } - public V1EphemeralContainerFluentImpl.ResizePolicyNested editMatchingResizePolicy(Predicate predicate) { - int index = -1; - for (int i=0;i withNewResources() { - return new V1EphemeralContainerFluentImpl.ResourcesNestedImpl(); - } - public V1EphemeralContainerFluentImpl.ResourcesNested withNewResourcesLike(V1ResourceRequirements item) { - return new V1EphemeralContainerFluentImpl.ResourcesNestedImpl(item); - } - public V1EphemeralContainerFluentImpl.ResourcesNested editResources() { - return withNewResourcesLike(getResources()); - } - public V1EphemeralContainerFluentImpl.ResourcesNested editOrNewResources() { - return withNewResourcesLike(getResources() != null ? getResources(): new V1ResourceRequirementsBuilder().build()); - } - public V1EphemeralContainerFluentImpl.ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item) { - return withNewResourcesLike(getResources() != null ? getResources(): item); - } - - /** - * This method has been deprecated, please use method buildSecurityContext instead. - * @return The buildable object. - */ - @Deprecated - public V1SecurityContext getSecurityContext() { - return this.securityContext!=null ?this.securityContext.build():null; - } - public V1SecurityContext buildSecurityContext() { - return this.securityContext!=null ?this.securityContext.build():null; - } - public A withSecurityContext(V1SecurityContext securityContext) { - _visitables.get("securityContext").remove(this.securityContext); - if (securityContext!=null){ this.securityContext= new V1SecurityContextBuilder(securityContext); _visitables.get("securityContext").add(this.securityContext);} else { this.securityContext = null; _visitables.get("securityContext").remove(this.securityContext); } return (A) this; - } - public Boolean hasSecurityContext() { - return this.securityContext != null; - } - public V1EphemeralContainerFluentImpl.SecurityContextNested withNewSecurityContext() { - return new V1EphemeralContainerFluentImpl.SecurityContextNestedImpl(); - } - public V1EphemeralContainerFluentImpl.SecurityContextNested withNewSecurityContextLike(V1SecurityContext item) { - return new V1EphemeralContainerFluentImpl.SecurityContextNestedImpl(item); - } - public V1EphemeralContainerFluentImpl.SecurityContextNested editSecurityContext() { - return withNewSecurityContextLike(getSecurityContext()); - } - public V1EphemeralContainerFluentImpl.SecurityContextNested editOrNewSecurityContext() { - return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): new V1SecurityContextBuilder().build()); - } - public V1EphemeralContainerFluentImpl.SecurityContextNested editOrNewSecurityContextLike(V1SecurityContext item) { - return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): item); - } - - /** - * This method has been deprecated, please use method buildStartupProbe instead. - * @return The buildable object. - */ - @Deprecated - public V1Probe getStartupProbe() { - return this.startupProbe!=null ?this.startupProbe.build():null; - } - public V1Probe buildStartupProbe() { - return this.startupProbe!=null ?this.startupProbe.build():null; - } - public A withStartupProbe(V1Probe startupProbe) { - _visitables.get("startupProbe").remove(this.startupProbe); - if (startupProbe!=null){ this.startupProbe= new V1ProbeBuilder(startupProbe); _visitables.get("startupProbe").add(this.startupProbe);} else { this.startupProbe = null; _visitables.get("startupProbe").remove(this.startupProbe); } return (A) this; - } - public Boolean hasStartupProbe() { - return this.startupProbe != null; - } - public V1EphemeralContainerFluentImpl.StartupProbeNested withNewStartupProbe() { - return new V1EphemeralContainerFluentImpl.StartupProbeNestedImpl(); - } - public V1EphemeralContainerFluentImpl.StartupProbeNested withNewStartupProbeLike(V1Probe item) { - return new V1EphemeralContainerFluentImpl.StartupProbeNestedImpl(item); - } - public V1EphemeralContainerFluentImpl.StartupProbeNested editStartupProbe() { - return withNewStartupProbeLike(getStartupProbe()); - } - public V1EphemeralContainerFluentImpl.StartupProbeNested editOrNewStartupProbe() { - return withNewStartupProbeLike(getStartupProbe() != null ? getStartupProbe(): new V1ProbeBuilder().build()); - } - public V1EphemeralContainerFluentImpl.StartupProbeNested editOrNewStartupProbeLike(V1Probe item) { - return withNewStartupProbeLike(getStartupProbe() != null ? getStartupProbe(): item); - } - public Boolean getStdin() { - return this.stdin; - } - public A withStdin(Boolean stdin) { - this.stdin=stdin; return (A) this; - } - public Boolean hasStdin() { - return this.stdin != null; - } - public Boolean getStdinOnce() { - return this.stdinOnce; - } - public A withStdinOnce(Boolean stdinOnce) { - this.stdinOnce=stdinOnce; return (A) this; - } - public Boolean hasStdinOnce() { - return this.stdinOnce != null; - } - public String getTargetContainerName() { - return this.targetContainerName; - } - public A withTargetContainerName(String targetContainerName) { - this.targetContainerName=targetContainerName; return (A) this; - } - public Boolean hasTargetContainerName() { - return this.targetContainerName != null; - } - public String getTerminationMessagePath() { - return this.terminationMessagePath; - } - public A withTerminationMessagePath(String terminationMessagePath) { - this.terminationMessagePath=terminationMessagePath; return (A) this; - } - public Boolean hasTerminationMessagePath() { - return this.terminationMessagePath != null; - } - public String getTerminationMessagePolicy() { - return this.terminationMessagePolicy; - } - public A withTerminationMessagePolicy(String terminationMessagePolicy) { - this.terminationMessagePolicy=terminationMessagePolicy; return (A) this; - } - public Boolean hasTerminationMessagePolicy() { - return this.terminationMessagePolicy != null; - } - public Boolean getTty() { - return this.tty; - } - public A withTty(Boolean tty) { - this.tty=tty; return (A) this; - } - public Boolean hasTty() { - return this.tty != null; - } - public A addToVolumeDevices(int index,V1VolumeDevice item) { - if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} - V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item); - if (index < 0 || index >= volumeDevices.size()) { _visitables.get("volumeDevices").add(builder); volumeDevices.add(builder); } else { _visitables.get("volumeDevices").add(index, builder); volumeDevices.add(index, builder);} - return (A)this; - } - public A setToVolumeDevices(int index,V1VolumeDevice item) { - if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} - V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item); - if (index < 0 || index >= volumeDevices.size()) { _visitables.get("volumeDevices").add(builder); volumeDevices.add(builder); } else { _visitables.get("volumeDevices").set(index, builder); volumeDevices.set(index, builder);} - return (A)this; - } - public A addToVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) { - if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} - for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this; - } - public A addAllToVolumeDevices(Collection items) { - if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();} - for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this; - } - public A removeFromVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) { - for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder);if (this.volumeDevices != null) {this.volumeDevices.remove(builder);}} return (A)this; - } - public A removeAllFromVolumeDevices(Collection items) { - for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder);if (this.volumeDevices != null) {this.volumeDevices.remove(builder);}} return (A)this; - } - public A removeMatchingFromVolumeDevices(Predicate predicate) { - if (volumeDevices == null) return (A) this; - final Iterator each = volumeDevices.iterator(); - final List visitables = _visitables.get("volumeDevices"); - while (each.hasNext()) { - V1VolumeDeviceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildVolumeDevices instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeDevices() { - return volumeDevices != null ? build(volumeDevices) : null; - } - public List buildVolumeDevices() { - return volumeDevices != null ? build(volumeDevices) : null; - } - public V1VolumeDevice buildVolumeDevice(int index) { - return this.volumeDevices.get(index).build(); - } - public V1VolumeDevice buildFirstVolumeDevice() { - return this.volumeDevices.get(0).build(); - } - public V1VolumeDevice buildLastVolumeDevice() { - return this.volumeDevices.get(volumeDevices.size() - 1).build(); - } - public V1VolumeDevice buildMatchingVolumeDevice(Predicate predicate) { - for (V1VolumeDeviceBuilder item: volumeDevices) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingVolumeDevice(Predicate predicate) { - for (V1VolumeDeviceBuilder item: volumeDevices) { if(predicate.test(item)){ return true;} } return false; - } - public A withVolumeDevices(List volumeDevices) { - if (this.volumeDevices != null) { _visitables.get("volumeDevices").clear();} - if (volumeDevices != null) {this.volumeDevices = new ArrayList(); for (V1VolumeDevice item : volumeDevices){this.addToVolumeDevices(item);}} else { this.volumeDevices = null;} return (A) this; - } - public A withVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... volumeDevices) { - if (this.volumeDevices != null) {this.volumeDevices.clear(); _visitables.remove("volumeDevices"); } - if (volumeDevices != null) {for (V1VolumeDevice item :volumeDevices){ this.addToVolumeDevices(item);}} return (A) this; - } - public Boolean hasVolumeDevices() { - return volumeDevices != null && !volumeDevices.isEmpty(); - } - public V1EphemeralContainerFluentImpl.VolumeDevicesNested addNewVolumeDevice() { - return new V1EphemeralContainerFluentImpl.VolumeDevicesNestedImpl(); - } - public V1EphemeralContainerFluentImpl.VolumeDevicesNested addNewVolumeDeviceLike(V1VolumeDevice item) { - return new V1EphemeralContainerFluentImpl.VolumeDevicesNestedImpl(-1, item); - } - public V1EphemeralContainerFluentImpl.VolumeDevicesNested setNewVolumeDeviceLike(int index,V1VolumeDevice item) { - return new V1EphemeralContainerFluentImpl.VolumeDevicesNestedImpl(index, item); - } - public V1EphemeralContainerFluentImpl.VolumeDevicesNested editVolumeDevice(int index) { - if (volumeDevices.size() <= index) throw new RuntimeException("Can't edit volumeDevices. Index exceeds size."); - return setNewVolumeDeviceLike(index, buildVolumeDevice(index)); - } - public V1EphemeralContainerFluentImpl.VolumeDevicesNested editFirstVolumeDevice() { - if (volumeDevices.size() == 0) throw new RuntimeException("Can't edit first volumeDevices. The list is empty."); - return setNewVolumeDeviceLike(0, buildVolumeDevice(0)); - } - public V1EphemeralContainerFluentImpl.VolumeDevicesNested editLastVolumeDevice() { - int index = volumeDevices.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last volumeDevices. The list is empty."); - return setNewVolumeDeviceLike(index, buildVolumeDevice(index)); - } - public V1EphemeralContainerFluentImpl.VolumeDevicesNested editMatchingVolumeDevice(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item); - if (index < 0 || index >= volumeMounts.size()) { _visitables.get("volumeMounts").add(builder); volumeMounts.add(builder); } else { _visitables.get("volumeMounts").add(index, builder); volumeMounts.add(index, builder);} - return (A)this; - } - public A setToVolumeMounts(int index,V1VolumeMount item) { - if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} - V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item); - if (index < 0 || index >= volumeMounts.size()) { _visitables.get("volumeMounts").add(builder); volumeMounts.add(builder); } else { _visitables.get("volumeMounts").set(index, builder); volumeMounts.set(index, builder);} - return (A)this; - } - public A addToVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) { - if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} - for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this; - } - public A addAllToVolumeMounts(Collection items) { - if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();} - for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this; - } - public A removeFromVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) { - for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder);if (this.volumeMounts != null) {this.volumeMounts.remove(builder);}} return (A)this; - } - public A removeAllFromVolumeMounts(Collection items) { - for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder);if (this.volumeMounts != null) {this.volumeMounts.remove(builder);}} return (A)this; - } - public A removeMatchingFromVolumeMounts(Predicate predicate) { - if (volumeMounts == null) return (A) this; - final Iterator each = volumeMounts.iterator(); - final List visitables = _visitables.get("volumeMounts"); - while (each.hasNext()) { - V1VolumeMountBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildVolumeMounts instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeMounts() { - return volumeMounts != null ? build(volumeMounts) : null; - } - public List buildVolumeMounts() { - return volumeMounts != null ? build(volumeMounts) : null; - } - public V1VolumeMount buildVolumeMount(int index) { - return this.volumeMounts.get(index).build(); - } - public V1VolumeMount buildFirstVolumeMount() { - return this.volumeMounts.get(0).build(); - } - public V1VolumeMount buildLastVolumeMount() { - return this.volumeMounts.get(volumeMounts.size() - 1).build(); - } - public V1VolumeMount buildMatchingVolumeMount(Predicate predicate) { - for (V1VolumeMountBuilder item: volumeMounts) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingVolumeMount(Predicate predicate) { - for (V1VolumeMountBuilder item: volumeMounts) { if(predicate.test(item)){ return true;} } return false; - } - public A withVolumeMounts(List volumeMounts) { - if (this.volumeMounts != null) { _visitables.get("volumeMounts").clear();} - if (volumeMounts != null) {this.volumeMounts = new ArrayList(); for (V1VolumeMount item : volumeMounts){this.addToVolumeMounts(item);}} else { this.volumeMounts = null;} return (A) this; - } - public A withVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... volumeMounts) { - if (this.volumeMounts != null) {this.volumeMounts.clear(); _visitables.remove("volumeMounts"); } - if (volumeMounts != null) {for (V1VolumeMount item :volumeMounts){ this.addToVolumeMounts(item);}} return (A) this; - } - public Boolean hasVolumeMounts() { - return volumeMounts != null && !volumeMounts.isEmpty(); - } - public V1EphemeralContainerFluentImpl.VolumeMountsNested addNewVolumeMount() { - return new V1EphemeralContainerFluentImpl.VolumeMountsNestedImpl(); - } - public V1EphemeralContainerFluentImpl.VolumeMountsNested addNewVolumeMountLike(V1VolumeMount item) { - return new V1EphemeralContainerFluentImpl.VolumeMountsNestedImpl(-1, item); - } - public V1EphemeralContainerFluentImpl.VolumeMountsNested setNewVolumeMountLike(int index,V1VolumeMount item) { - return new V1EphemeralContainerFluentImpl.VolumeMountsNestedImpl(index, item); - } - public V1EphemeralContainerFluentImpl.VolumeMountsNested editVolumeMount(int index) { - if (volumeMounts.size() <= index) throw new RuntimeException("Can't edit volumeMounts. Index exceeds size."); - return setNewVolumeMountLike(index, buildVolumeMount(index)); - } - public V1EphemeralContainerFluentImpl.VolumeMountsNested editFirstVolumeMount() { - if (volumeMounts.size() == 0) throw new RuntimeException("Can't edit first volumeMounts. The list is empty."); - return setNewVolumeMountLike(0, buildVolumeMount(0)); - } - public V1EphemeralContainerFluentImpl.VolumeMountsNested editLastVolumeMount() { - int index = volumeMounts.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last volumeMounts. The list is empty."); - return setNewVolumeMountLike(index, buildVolumeMount(index)); - } - public V1EphemeralContainerFluentImpl.VolumeMountsNested editMatchingVolumeMount(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1EnvVarFluentImpl> implements V1EphemeralContainerFluentImpl.EnvNested,Nested{ - EnvNestedImpl(int index,V1EnvVar item) { - this.index = index; - this.builder = new V1EnvVarBuilder(this, item); - } - EnvNestedImpl() { - this.index = -1; - this.builder = new V1EnvVarBuilder(this); - } - V1EnvVarBuilder builder; - int index; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.setToEnv(index,builder.build()); - } - public N endEnv() { - return and(); - } - - } - class EnvFromNestedImpl extends V1EnvFromSourceFluentImpl> implements V1EphemeralContainerFluentImpl.EnvFromNested,Nested{ - EnvFromNestedImpl(int index,V1EnvFromSource item) { - this.index = index; - this.builder = new V1EnvFromSourceBuilder(this, item); - } - EnvFromNestedImpl() { - this.index = -1; - this.builder = new V1EnvFromSourceBuilder(this); - } - V1EnvFromSourceBuilder builder; - int index; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.setToEnvFrom(index,builder.build()); - } - public N endEnvFrom() { - return and(); - } - - } - class LifecycleNestedImpl extends V1LifecycleFluentImpl> implements V1EphemeralContainerFluentImpl.LifecycleNested,Nested{ - LifecycleNestedImpl(V1Lifecycle item) { - this.builder = new V1LifecycleBuilder(this, item); - } - LifecycleNestedImpl() { - this.builder = new V1LifecycleBuilder(this); - } - V1LifecycleBuilder builder; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.withLifecycle(builder.build()); - } - public N endLifecycle() { - return and(); - } - - } - class LivenessProbeNestedImpl extends V1ProbeFluentImpl> implements V1EphemeralContainerFluentImpl.LivenessProbeNested,Nested{ - LivenessProbeNestedImpl(V1Probe item) { - this.builder = new V1ProbeBuilder(this, item); - } - LivenessProbeNestedImpl() { - this.builder = new V1ProbeBuilder(this); - } - V1ProbeBuilder builder; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.withLivenessProbe(builder.build()); - } - public N endLivenessProbe() { - return and(); - } - - } - class PortsNestedImpl extends V1ContainerPortFluentImpl> implements V1EphemeralContainerFluentImpl.PortsNested,Nested{ - PortsNestedImpl(int index,V1ContainerPort item) { - this.index = index; - this.builder = new V1ContainerPortBuilder(this, item); - } - PortsNestedImpl() { - this.index = -1; - this.builder = new V1ContainerPortBuilder(this); - } - V1ContainerPortBuilder builder; - int index; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.setToPorts(index,builder.build()); - } - public N endPort() { - return and(); - } - - } - class ReadinessProbeNestedImpl extends V1ProbeFluentImpl> implements V1EphemeralContainerFluentImpl.ReadinessProbeNested,Nested{ - ReadinessProbeNestedImpl(V1Probe item) { - this.builder = new V1ProbeBuilder(this, item); - } - ReadinessProbeNestedImpl() { - this.builder = new V1ProbeBuilder(this); - } - V1ProbeBuilder builder; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.withReadinessProbe(builder.build()); - } - public N endReadinessProbe() { - return and(); - } - - } - class ResizePolicyNestedImpl extends V1ContainerResizePolicyFluentImpl> implements V1EphemeralContainerFluentImpl.ResizePolicyNested,Nested{ - ResizePolicyNestedImpl(int index,V1ContainerResizePolicy item) { - this.index = index; - this.builder = new V1ContainerResizePolicyBuilder(this, item); - } - ResizePolicyNestedImpl() { - this.index = -1; - this.builder = new V1ContainerResizePolicyBuilder(this); - } - V1ContainerResizePolicyBuilder builder; - int index; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.setToResizePolicy(index,builder.build()); - } - public N endResizePolicy() { - return and(); - } - - } - class ResourcesNestedImpl extends V1ResourceRequirementsFluentImpl> implements V1EphemeralContainerFluentImpl.ResourcesNested,Nested{ - ResourcesNestedImpl(V1ResourceRequirements item) { - this.builder = new V1ResourceRequirementsBuilder(this, item); - } - ResourcesNestedImpl() { - this.builder = new V1ResourceRequirementsBuilder(this); - } - V1ResourceRequirementsBuilder builder; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.withResources(builder.build()); - } - public N endResources() { - return and(); - } - - } - class SecurityContextNestedImpl extends V1SecurityContextFluentImpl> implements V1EphemeralContainerFluentImpl.SecurityContextNested,Nested{ - SecurityContextNestedImpl(V1SecurityContext item) { - this.builder = new V1SecurityContextBuilder(this, item); - } - SecurityContextNestedImpl() { - this.builder = new V1SecurityContextBuilder(this); - } - V1SecurityContextBuilder builder; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.withSecurityContext(builder.build()); - } - public N endSecurityContext() { - return and(); - } - - } - class StartupProbeNestedImpl extends V1ProbeFluentImpl> implements V1EphemeralContainerFluentImpl.StartupProbeNested,Nested{ - StartupProbeNestedImpl(V1Probe item) { - this.builder = new V1ProbeBuilder(this, item); - } - StartupProbeNestedImpl() { - this.builder = new V1ProbeBuilder(this); - } - V1ProbeBuilder builder; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.withStartupProbe(builder.build()); - } - public N endStartupProbe() { - return and(); - } - - } - class VolumeDevicesNestedImpl extends V1VolumeDeviceFluentImpl> implements V1EphemeralContainerFluentImpl.VolumeDevicesNested,Nested{ - VolumeDevicesNestedImpl(int index,V1VolumeDevice item) { - this.index = index; - this.builder = new V1VolumeDeviceBuilder(this, item); - } - VolumeDevicesNestedImpl() { - this.index = -1; - this.builder = new V1VolumeDeviceBuilder(this); - } - V1VolumeDeviceBuilder builder; - int index; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.setToVolumeDevices(index,builder.build()); - } - public N endVolumeDevice() { - return and(); - } - - } - class VolumeMountsNestedImpl extends V1VolumeMountFluentImpl> implements V1EphemeralContainerFluentImpl.VolumeMountsNested,Nested{ - VolumeMountsNestedImpl(int index,V1VolumeMount item) { - this.index = index; - this.builder = new V1VolumeMountBuilder(this, item); - } - VolumeMountsNestedImpl() { - this.index = -1; - this.builder = new V1VolumeMountBuilder(this); - } - V1VolumeMountBuilder builder; - int index; - public N and() { - return (N) V1EphemeralContainerFluentImpl.this.setToVolumeMounts(index,builder.build()); - } - public N endVolumeMount() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceBuilder.java index 468d7bc063..e32cd2980d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EphemeralVolumeSourceBuilder extends V1EphemeralVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1EphemeralVolumeSourceBuilder extends V1EphemeralVolumeSourceFluent implements VisitableBuilder{ public V1EphemeralVolumeSourceBuilder() { - this(false); - } - public V1EphemeralVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1EphemeralVolumeSource(), validationEnabled); + this(new V1EphemeralVolumeSource()); } + public V1EphemeralVolumeSourceBuilder(V1EphemeralVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1EphemeralVolumeSourceBuilder(V1EphemeralVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EphemeralVolumeSource(), validationEnabled); + this(fluent, new V1EphemeralVolumeSource()); } + public V1EphemeralVolumeSourceBuilder(V1EphemeralVolumeSourceFluent fluent,V1EphemeralVolumeSource instance) { - this(fluent, instance, false); - } - public V1EphemeralVolumeSourceBuilder(V1EphemeralVolumeSourceFluent fluent,V1EphemeralVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withVolumeClaimTemplate(instance.getVolumeClaimTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EphemeralVolumeSourceBuilder(V1EphemeralVolumeSource instance) { - this(instance,false); - } - public V1EphemeralVolumeSourceBuilder(V1EphemeralVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withVolumeClaimTemplate(instance.getVolumeClaimTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EphemeralVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1EphemeralVolumeSource build() { V1EphemeralVolumeSource buildable = new V1EphemeralVolumeSource(); - buildable.setVolumeClaimTemplate(fluent.getVolumeClaimTemplate()); + buildable.setVolumeClaimTemplate(fluent.buildVolumeClaimTemplate()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceFluent.java index 8559b3d25d..96a46975bb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1EphemeralVolumeSourceFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildVolumeClaimTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimTemplate getVolumeClaimTemplate(); - public V1PersistentVolumeClaimTemplate buildVolumeClaimTemplate(); - public A withVolumeClaimTemplate(V1PersistentVolumeClaimTemplate volumeClaimTemplate); - public Boolean hasVolumeClaimTemplate(); - public V1EphemeralVolumeSourceFluent.VolumeClaimTemplateNested withNewVolumeClaimTemplate(); - public V1EphemeralVolumeSourceFluent.VolumeClaimTemplateNested withNewVolumeClaimTemplateLike(V1PersistentVolumeClaimTemplate item); - public V1EphemeralVolumeSourceFluent.VolumeClaimTemplateNested editVolumeClaimTemplate(); - public V1EphemeralVolumeSourceFluent.VolumeClaimTemplateNested editOrNewVolumeClaimTemplate(); - public V1EphemeralVolumeSourceFluent.VolumeClaimTemplateNested editOrNewVolumeClaimTemplateLike(V1PersistentVolumeClaimTemplate item); - public interface VolumeClaimTemplateNested extends Nested,V1PersistentVolumeClaimTemplateFluent>{ - public N and(); - public N endVolumeClaimTemplate(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EphemeralVolumeSourceFluent> extends BaseFluent{ + public V1EphemeralVolumeSourceFluent() { + } + + public V1EphemeralVolumeSourceFluent(V1EphemeralVolumeSource instance) { + this.copyInstance(instance); + } + private V1PersistentVolumeClaimTemplateBuilder volumeClaimTemplate; + + protected void copyInstance(V1EphemeralVolumeSource instance) { + instance = (instance != null ? instance : new V1EphemeralVolumeSource()); + if (instance != null) { + this.withVolumeClaimTemplate(instance.getVolumeClaimTemplate()); + } + } + + public V1PersistentVolumeClaimTemplate buildVolumeClaimTemplate() { + return this.volumeClaimTemplate != null ? this.volumeClaimTemplate.build() : null; + } + + public A withVolumeClaimTemplate(V1PersistentVolumeClaimTemplate volumeClaimTemplate) { + this._visitables.remove("volumeClaimTemplate"); + if (volumeClaimTemplate != null) { + this.volumeClaimTemplate = new V1PersistentVolumeClaimTemplateBuilder(volumeClaimTemplate); + this._visitables.get("volumeClaimTemplate").add(this.volumeClaimTemplate); + } else { + this.volumeClaimTemplate = null; + this._visitables.get("volumeClaimTemplate").remove(this.volumeClaimTemplate); + } + return (A) this; + } + + public boolean hasVolumeClaimTemplate() { + return this.volumeClaimTemplate != null; + } + + public VolumeClaimTemplateNested withNewVolumeClaimTemplate() { + return new VolumeClaimTemplateNested(null); + } + + public VolumeClaimTemplateNested withNewVolumeClaimTemplateLike(V1PersistentVolumeClaimTemplate item) { + return new VolumeClaimTemplateNested(item); + } + + public VolumeClaimTemplateNested editVolumeClaimTemplate() { + return withNewVolumeClaimTemplateLike(java.util.Optional.ofNullable(buildVolumeClaimTemplate()).orElse(null)); + } + + public VolumeClaimTemplateNested editOrNewVolumeClaimTemplate() { + return withNewVolumeClaimTemplateLike(java.util.Optional.ofNullable(buildVolumeClaimTemplate()).orElse(new V1PersistentVolumeClaimTemplateBuilder().build())); + } + + public VolumeClaimTemplateNested editOrNewVolumeClaimTemplateLike(V1PersistentVolumeClaimTemplate item) { + return withNewVolumeClaimTemplateLike(java.util.Optional.ofNullable(buildVolumeClaimTemplate()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EphemeralVolumeSourceFluent that = (V1EphemeralVolumeSourceFluent) o; + if (!java.util.Objects.equals(volumeClaimTemplate, that.volumeClaimTemplate)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(volumeClaimTemplate, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (volumeClaimTemplate != null) { sb.append("volumeClaimTemplate:"); sb.append(volumeClaimTemplate); } + sb.append("}"); + return sb.toString(); } + public class VolumeClaimTemplateNested extends V1PersistentVolumeClaimTemplateFluent> implements Nested{ + VolumeClaimTemplateNested(V1PersistentVolumeClaimTemplate item) { + this.builder = new V1PersistentVolumeClaimTemplateBuilder(this, item); + } + V1PersistentVolumeClaimTemplateBuilder builder; + + public N and() { + return (N) V1EphemeralVolumeSourceFluent.this.withVolumeClaimTemplate(builder.build()); + } + + public N endVolumeClaimTemplate() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceFluentImpl.java deleted file mode 100644 index a6bf576f58..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EphemeralVolumeSourceFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EphemeralVolumeSourceFluentImpl> extends BaseFluent implements V1EphemeralVolumeSourceFluent{ - public V1EphemeralVolumeSourceFluentImpl() { - } - public V1EphemeralVolumeSourceFluentImpl(V1EphemeralVolumeSource instance) { - if (instance != null) { - this.withVolumeClaimTemplate(instance.getVolumeClaimTemplate()); - } - } - private V1PersistentVolumeClaimTemplateBuilder volumeClaimTemplate; - - /** - * This method has been deprecated, please use method buildVolumeClaimTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimTemplate getVolumeClaimTemplate() { - return this.volumeClaimTemplate!=null ?this.volumeClaimTemplate.build():null; - } - public V1PersistentVolumeClaimTemplate buildVolumeClaimTemplate() { - return this.volumeClaimTemplate!=null ?this.volumeClaimTemplate.build():null; - } - public A withVolumeClaimTemplate(V1PersistentVolumeClaimTemplate volumeClaimTemplate) { - _visitables.get("volumeClaimTemplate").remove(this.volumeClaimTemplate); - if (volumeClaimTemplate!=null){ this.volumeClaimTemplate= new V1PersistentVolumeClaimTemplateBuilder(volumeClaimTemplate); _visitables.get("volumeClaimTemplate").add(this.volumeClaimTemplate);} else { this.volumeClaimTemplate = null; _visitables.get("volumeClaimTemplate").remove(this.volumeClaimTemplate); } return (A) this; - } - public Boolean hasVolumeClaimTemplate() { - return this.volumeClaimTemplate != null; - } - public V1EphemeralVolumeSourceFluentImpl.VolumeClaimTemplateNested withNewVolumeClaimTemplate() { - return new V1EphemeralVolumeSourceFluentImpl.VolumeClaimTemplateNestedImpl(); - } - public V1EphemeralVolumeSourceFluentImpl.VolumeClaimTemplateNested withNewVolumeClaimTemplateLike(V1PersistentVolumeClaimTemplate item) { - return new V1EphemeralVolumeSourceFluentImpl.VolumeClaimTemplateNestedImpl(item); - } - public V1EphemeralVolumeSourceFluentImpl.VolumeClaimTemplateNested editVolumeClaimTemplate() { - return withNewVolumeClaimTemplateLike(getVolumeClaimTemplate()); - } - public V1EphemeralVolumeSourceFluentImpl.VolumeClaimTemplateNested editOrNewVolumeClaimTemplate() { - return withNewVolumeClaimTemplateLike(getVolumeClaimTemplate() != null ? getVolumeClaimTemplate(): new V1PersistentVolumeClaimTemplateBuilder().build()); - } - public V1EphemeralVolumeSourceFluentImpl.VolumeClaimTemplateNested editOrNewVolumeClaimTemplateLike(V1PersistentVolumeClaimTemplate item) { - return withNewVolumeClaimTemplateLike(getVolumeClaimTemplate() != null ? getVolumeClaimTemplate(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EphemeralVolumeSourceFluentImpl that = (V1EphemeralVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(volumeClaimTemplate, that.volumeClaimTemplate)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(volumeClaimTemplate, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (volumeClaimTemplate != null) { sb.append("volumeClaimTemplate:"); sb.append(volumeClaimTemplate); } - sb.append("}"); - return sb.toString(); - } - class VolumeClaimTemplateNestedImpl extends V1PersistentVolumeClaimTemplateFluentImpl> implements V1EphemeralVolumeSourceFluentImpl.VolumeClaimTemplateNested,Nested{ - VolumeClaimTemplateNestedImpl(V1PersistentVolumeClaimTemplate item) { - this.builder = new V1PersistentVolumeClaimTemplateBuilder(this, item); - } - VolumeClaimTemplateNestedImpl() { - this.builder = new V1PersistentVolumeClaimTemplateBuilder(this); - } - V1PersistentVolumeClaimTemplateBuilder builder; - public N and() { - return (N) V1EphemeralVolumeSourceFluentImpl.this.withVolumeClaimTemplate(builder.build()); - } - public N endVolumeClaimTemplate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceBuilder.java index bc248f722c..de2d091a4f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EventSourceBuilder extends V1EventSourceFluentImpl implements VisitableBuilder{ +public class V1EventSourceBuilder extends V1EventSourceFluent implements VisitableBuilder{ public V1EventSourceBuilder() { - this(false); - } - public V1EventSourceBuilder(Boolean validationEnabled) { - this(new V1EventSource(), validationEnabled); + this(new V1EventSource()); } + public V1EventSourceBuilder(V1EventSourceFluent fluent) { - this(fluent, false); - } - public V1EventSourceBuilder(V1EventSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1EventSource(), validationEnabled); + this(fluent, new V1EventSource()); } + public V1EventSourceBuilder(V1EventSourceFluent fluent,V1EventSource instance) { - this(fluent, instance, false); - } - public V1EventSourceBuilder(V1EventSourceFluent fluent,V1EventSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withComponent(instance.getComponent()); - fluent.withHost(instance.getHost()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EventSourceBuilder(V1EventSource instance) { - this(instance,false); - } - public V1EventSourceBuilder(V1EventSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withComponent(instance.getComponent()); - this.withHost(instance.getHost()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EventSourceFluent fluent; - Boolean validationEnabled; + public V1EventSource build() { V1EventSource buildable = new V1EventSource(); buildable.setComponent(fluent.getComponent()); @@ -46,4 +28,5 @@ public V1EventSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceFluent.java index dcb71d0beb..8e38263dc6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1EventSourceFluent> extends Fluent{ - public String getComponent(); - public A withComponent(String component); - public Boolean hasComponent(); - public String getHost(); - public A withHost(String host); - public Boolean hasHost(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EventSourceFluent> extends BaseFluent{ + public V1EventSourceFluent() { + } + public V1EventSourceFluent(V1EventSource instance) { + this.copyInstance(instance); + } + private String component; + private String host; + + protected void copyInstance(V1EventSource instance) { + instance = (instance != null ? instance : new V1EventSource()); + if (instance != null) { + this.withComponent(instance.getComponent()); + this.withHost(instance.getHost()); + } + } + + public String getComponent() { + return this.component; + } + + public A withComponent(String component) { + this.component = component; + return (A) this; + } + + public boolean hasComponent() { + return this.component != null; + } + + public String getHost() { + return this.host; + } + + public A withHost(String host) { + this.host = host; + return (A) this; + } + + public boolean hasHost() { + return this.host != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EventSourceFluent that = (V1EventSourceFluent) o; + if (!java.util.Objects.equals(component, that.component)) return false; + if (!java.util.Objects.equals(host, that.host)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(component, host, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (component != null) { sb.append("component:"); sb.append(component + ","); } + if (host != null) { sb.append("host:"); sb.append(host); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceFluentImpl.java deleted file mode 100644 index 3fb103f42d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EventSourceFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EventSourceFluentImpl> extends BaseFluent implements V1EventSourceFluent{ - public V1EventSourceFluentImpl() { - } - public V1EventSourceFluentImpl(V1EventSource instance) { - if (instance != null) { - this.withComponent(instance.getComponent()); - this.withHost(instance.getHost()); - } - } - private String component; - private String host; - public String getComponent() { - return this.component; - } - public A withComponent(String component) { - this.component=component; return (A) this; - } - public Boolean hasComponent() { - return this.component != null; - } - public String getHost() { - return this.host; - } - public A withHost(String host) { - this.host=host; return (A) this; - } - public Boolean hasHost() { - return this.host != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EventSourceFluentImpl that = (V1EventSourceFluentImpl) o; - if (!java.util.Objects.equals(component, that.component)) return false; - - if (!java.util.Objects.equals(host, that.host)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(component, host, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (component != null) { sb.append("component:"); sb.append(component + ","); } - if (host != null) { sb.append("host:"); sb.append(host); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionBuilder.java index 355925cf84..904eeb8e36 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1EvictionBuilder extends V1EvictionFluentImpl implements VisitableBuilder{ +public class V1EvictionBuilder extends V1EvictionFluent implements VisitableBuilder{ public V1EvictionBuilder() { - this(false); - } - public V1EvictionBuilder(Boolean validationEnabled) { - this(new V1Eviction(), validationEnabled); + this(new V1Eviction()); } + public V1EvictionBuilder(V1EvictionFluent fluent) { - this(fluent, false); - } - public V1EvictionBuilder(V1EvictionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Eviction(), validationEnabled); + this(fluent, new V1Eviction()); } + public V1EvictionBuilder(V1EvictionFluent fluent,V1Eviction instance) { - this(fluent, instance, false); - } - public V1EvictionBuilder(V1EvictionFluent fluent,V1Eviction instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withDeleteOptions(instance.getDeleteOptions()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1EvictionBuilder(V1Eviction instance) { - this(instance,false); - } - public V1EvictionBuilder(V1Eviction instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withDeleteOptions(instance.getDeleteOptions()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1EvictionFluent fluent; - Boolean validationEnabled; + public V1Eviction build() { V1Eviction buildable = new V1Eviction(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setDeleteOptions(fluent.getDeleteOptions()); + buildable.setDeleteOptions(fluent.buildDeleteOptions()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionFluent.java index b13b7a9115..540f08618c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1EvictionFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - - /** - * This method has been deprecated, please use method buildDeleteOptions instead. - * @return The buildable object. - */ - @Deprecated - public V1DeleteOptions getDeleteOptions(); - public V1DeleteOptions buildDeleteOptions(); - public A withDeleteOptions(V1DeleteOptions deleteOptions); - public Boolean hasDeleteOptions(); - public V1EvictionFluent.DeleteOptionsNested withNewDeleteOptions(); - public V1EvictionFluent.DeleteOptionsNested withNewDeleteOptionsLike(V1DeleteOptions item); - public V1EvictionFluent.DeleteOptionsNested editDeleteOptions(); - public V1EvictionFluent.DeleteOptionsNested editOrNewDeleteOptions(); - public V1EvictionFluent.DeleteOptionsNested editOrNewDeleteOptionsLike(V1DeleteOptions item); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1EvictionFluent.MetadataNested withNewMetadata(); - public V1EvictionFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1EvictionFluent.MetadataNested editMetadata(); - public V1EvictionFluent.MetadataNested editOrNewMetadata(); - public V1EvictionFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public interface DeleteOptionsNested extends Nested,V1DeleteOptionsFluent>{ - public N and(); - public N endDeleteOptions(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1EvictionFluent> extends BaseFluent{ + public V1EvictionFluent() { + } + + public V1EvictionFluent(V1Eviction instance) { + this.copyInstance(instance); + } + private String apiVersion; + private V1DeleteOptionsBuilder deleteOptions; + private String kind; + private V1ObjectMetaBuilder metadata; + + protected void copyInstance(V1Eviction instance) { + instance = (instance != null ? instance : new V1Eviction()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withDeleteOptions(instance.getDeleteOptions()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public V1DeleteOptions buildDeleteOptions() { + return this.deleteOptions != null ? this.deleteOptions.build() : null; + } + + public A withDeleteOptions(V1DeleteOptions deleteOptions) { + this._visitables.remove("deleteOptions"); + if (deleteOptions != null) { + this.deleteOptions = new V1DeleteOptionsBuilder(deleteOptions); + this._visitables.get("deleteOptions").add(this.deleteOptions); + } else { + this.deleteOptions = null; + this._visitables.get("deleteOptions").remove(this.deleteOptions); + } + return (A) this; + } + + public boolean hasDeleteOptions() { + return this.deleteOptions != null; + } + + public DeleteOptionsNested withNewDeleteOptions() { + return new DeleteOptionsNested(null); + } + + public DeleteOptionsNested withNewDeleteOptionsLike(V1DeleteOptions item) { + return new DeleteOptionsNested(item); + } + + public DeleteOptionsNested editDeleteOptions() { + return withNewDeleteOptionsLike(java.util.Optional.ofNullable(buildDeleteOptions()).orElse(null)); + } + + public DeleteOptionsNested editOrNewDeleteOptions() { + return withNewDeleteOptionsLike(java.util.Optional.ofNullable(buildDeleteOptions()).orElse(new V1DeleteOptionsBuilder().build())); + } + + public DeleteOptionsNested editOrNewDeleteOptionsLike(V1DeleteOptions item) { + return withNewDeleteOptionsLike(java.util.Optional.ofNullable(buildDeleteOptions()).orElse(item)); + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; } - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1EvictionFluent that = (V1EvictionFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(deleteOptions, that.deleteOptions)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, deleteOptions, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (deleteOptions != null) { sb.append("deleteOptions:"); sb.append(deleteOptions + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class DeleteOptionsNested extends V1DeleteOptionsFluent> implements Nested{ + DeleteOptionsNested(V1DeleteOptions item) { + this.builder = new V1DeleteOptionsBuilder(this, item); + } + V1DeleteOptionsBuilder builder; + + public N and() { + return (N) V1EvictionFluent.this.withDeleteOptions(builder.build()); + } + public N endDeleteOptions() { + return and(); + } + + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1EvictionFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionFluentImpl.java deleted file mode 100644 index fa764b49fc..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1EvictionFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1EvictionFluentImpl> extends BaseFluent implements V1EvictionFluent{ - public V1EvictionFluentImpl() { - } - public V1EvictionFluentImpl(V1Eviction instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withDeleteOptions(instance.getDeleteOptions()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private V1DeleteOptionsBuilder deleteOptions; - private String kind; - private V1ObjectMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - - /** - * This method has been deprecated, please use method buildDeleteOptions instead. - * @return The buildable object. - */ - @Deprecated - public V1DeleteOptions getDeleteOptions() { - return this.deleteOptions!=null ?this.deleteOptions.build():null; - } - public V1DeleteOptions buildDeleteOptions() { - return this.deleteOptions!=null ?this.deleteOptions.build():null; - } - public A withDeleteOptions(V1DeleteOptions deleteOptions) { - _visitables.get("deleteOptions").remove(this.deleteOptions); - if (deleteOptions!=null){ this.deleteOptions= new V1DeleteOptionsBuilder(deleteOptions); _visitables.get("deleteOptions").add(this.deleteOptions);} else { this.deleteOptions = null; _visitables.get("deleteOptions").remove(this.deleteOptions); } return (A) this; - } - public Boolean hasDeleteOptions() { - return this.deleteOptions != null; - } - public V1EvictionFluentImpl.DeleteOptionsNested withNewDeleteOptions() { - return new V1EvictionFluentImpl.DeleteOptionsNestedImpl(); - } - public V1EvictionFluentImpl.DeleteOptionsNested withNewDeleteOptionsLike(V1DeleteOptions item) { - return new V1EvictionFluentImpl.DeleteOptionsNestedImpl(item); - } - public V1EvictionFluentImpl.DeleteOptionsNested editDeleteOptions() { - return withNewDeleteOptionsLike(getDeleteOptions()); - } - public V1EvictionFluentImpl.DeleteOptionsNested editOrNewDeleteOptions() { - return withNewDeleteOptionsLike(getDeleteOptions() != null ? getDeleteOptions(): new V1DeleteOptionsBuilder().build()); - } - public V1EvictionFluentImpl.DeleteOptionsNested editOrNewDeleteOptionsLike(V1DeleteOptions item) { - return withNewDeleteOptionsLike(getDeleteOptions() != null ? getDeleteOptions(): item); - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1EvictionFluentImpl.MetadataNested withNewMetadata() { - return new V1EvictionFluentImpl.MetadataNestedImpl(); - } - public V1EvictionFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1EvictionFluentImpl.MetadataNestedImpl(item); - } - public V1EvictionFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1EvictionFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1EvictionFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1EvictionFluentImpl that = (V1EvictionFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(deleteOptions, that.deleteOptions)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, deleteOptions, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (deleteOptions != null) { sb.append("deleteOptions:"); sb.append(deleteOptions + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class DeleteOptionsNestedImpl extends V1DeleteOptionsFluentImpl> implements V1EvictionFluentImpl.DeleteOptionsNested,Nested{ - DeleteOptionsNestedImpl(V1DeleteOptions item) { - this.builder = new V1DeleteOptionsBuilder(this, item); - } - DeleteOptionsNestedImpl() { - this.builder = new V1DeleteOptionsBuilder(this); - } - V1DeleteOptionsBuilder builder; - public N and() { - return (N) V1EvictionFluentImpl.this.withDeleteOptions(builder.build()); - } - public N endDeleteOptions() { - return and(); - } - - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1EvictionFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1EvictionFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionBuilder.java index 46ba71be2d..ed5d3da596 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ExecActionBuilder extends V1ExecActionFluentImpl implements VisitableBuilder{ +public class V1ExecActionBuilder extends V1ExecActionFluent implements VisitableBuilder{ public V1ExecActionBuilder() { - this(false); - } - public V1ExecActionBuilder(Boolean validationEnabled) { - this(new V1ExecAction(), validationEnabled); + this(new V1ExecAction()); } + public V1ExecActionBuilder(V1ExecActionFluent fluent) { - this(fluent, false); - } - public V1ExecActionBuilder(V1ExecActionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ExecAction(), validationEnabled); + this(fluent, new V1ExecAction()); } + public V1ExecActionBuilder(V1ExecActionFluent fluent,V1ExecAction instance) { - this(fluent, instance, false); - } - public V1ExecActionBuilder(V1ExecActionFluent fluent,V1ExecAction instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCommand(instance.getCommand()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ExecActionBuilder(V1ExecAction instance) { - this(instance,false); - } - public V1ExecActionBuilder(V1ExecAction instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCommand(instance.getCommand()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ExecActionFluent fluent; - Boolean validationEnabled; + public V1ExecAction build() { V1ExecAction buildable = new V1ExecAction(); buildable.setCommand(fluent.getCommand()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionFluent.java index ff1405477d..98a973a259 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionFluent.java @@ -1,32 +1,148 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1ExecActionFluent> extends Fluent{ - public A addToCommand(int index,String item); - public A setToCommand(int index,String item); - public A addToCommand(java.lang.String... items); - public A addAllToCommand(Collection items); - public A removeFromCommand(java.lang.String... items); - public A removeAllFromCommand(Collection items); - public List getCommand(); - public String getCommand(int index); - public String getFirstCommand(); - public String getLastCommand(); - public String getMatchingCommand(Predicate predicate); - public Boolean hasMatchingCommand(Predicate predicate); - public A withCommand(List command); - public A withCommand(java.lang.String... command); - public Boolean hasCommand(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ExecActionFluent> extends BaseFluent{ + public V1ExecActionFluent() { + } + public V1ExecActionFluent(V1ExecAction instance) { + this.copyInstance(instance); + } + private List command; + + protected void copyInstance(V1ExecAction instance) { + instance = (instance != null ? instance : new V1ExecAction()); + if (instance != null) { + this.withCommand(instance.getCommand()); + } + } + + public A addToCommand(int index,String item) { + if (this.command == null) {this.command = new ArrayList();} + this.command.add(index, item); + return (A)this; + } + + public A setToCommand(int index,String item) { + if (this.command == null) {this.command = new ArrayList();} + this.command.set(index, item); return (A)this; + } + + public A addToCommand(java.lang.String... items) { + if (this.command == null) {this.command = new ArrayList();} + for (String item : items) {this.command.add(item);} return (A)this; + } + + public A addAllToCommand(Collection items) { + if (this.command == null) {this.command = new ArrayList();} + for (String item : items) {this.command.add(item);} return (A)this; + } + + public A removeFromCommand(java.lang.String... items) { + if (this.command == null) return (A)this; + for (String item : items) { this.command.remove(item);} return (A)this; + } + + public A removeAllFromCommand(Collection items) { + if (this.command == null) return (A)this; + for (String item : items) { this.command.remove(item);} return (A)this; + } + + public List getCommand() { + return this.command; + } + + public String getCommand(int index) { + return this.command.get(index); + } + + public String getFirstCommand() { + return this.command.get(0); + } + + public String getLastCommand() { + return this.command.get(command.size() - 1); + } + + public String getMatchingCommand(Predicate predicate) { + for (String item : command) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingCommand(Predicate predicate) { + for (String item : command) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withCommand(List command) { + if (command != null) { + this.command = new ArrayList(); + for (String item : command) { + this.addToCommand(item); + } + } else { + this.command = null; + } + return (A) this; + } + + public A withCommand(java.lang.String... command) { + if (this.command != null) { + this.command.clear(); + _visitables.remove("command"); + } + if (command != null) { + for (String item : command) { + this.addToCommand(item); + } + } + return (A) this; + } + + public boolean hasCommand() { + return this.command != null && !this.command.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ExecActionFluent that = (V1ExecActionFluent) o; + if (!java.util.Objects.equals(command, that.command)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(command, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (command != null && !command.isEmpty()) { sb.append("command:"); sb.append(command); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionFluentImpl.java deleted file mode 100644 index 99fdfbe909..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExecActionFluentImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ExecActionFluentImpl> extends BaseFluent implements V1ExecActionFluent{ - public V1ExecActionFluentImpl() { - } - public V1ExecActionFluentImpl(V1ExecAction instance) { - if (instance != null) { - this.withCommand(instance.getCommand()); - } - } - private List command; - public A addToCommand(int index,String item) { - if (this.command == null) {this.command = new ArrayList();} - this.command.add(index, item); - return (A)this; - } - public A setToCommand(int index,String item) { - if (this.command == null) {this.command = new ArrayList();} - this.command.set(index, item); return (A)this; - } - public A addToCommand(java.lang.String... items) { - if (this.command == null) {this.command = new ArrayList();} - for (String item : items) {this.command.add(item);} return (A)this; - } - public A addAllToCommand(Collection items) { - if (this.command == null) {this.command = new ArrayList();} - for (String item : items) {this.command.add(item);} return (A)this; - } - public A removeFromCommand(java.lang.String... items) { - for (String item : items) {if (this.command!= null){ this.command.remove(item);}} return (A)this; - } - public A removeAllFromCommand(Collection items) { - for (String item : items) {if (this.command!= null){ this.command.remove(item);}} return (A)this; - } - public List getCommand() { - return this.command; - } - public String getCommand(int index) { - return this.command.get(index); - } - public String getFirstCommand() { - return this.command.get(0); - } - public String getLastCommand() { - return this.command.get(command.size() - 1); - } - public String getMatchingCommand(Predicate predicate) { - for (String item: command) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingCommand(Predicate predicate) { - for (String item: command) { if(predicate.test(item)){ return true;} } return false; - } - public A withCommand(List command) { - if (command != null) {this.command = new ArrayList(); for (String item : command){this.addToCommand(item);}} else { this.command = null;} return (A) this; - } - public A withCommand(java.lang.String... command) { - if (this.command != null) {this.command.clear(); _visitables.remove("command"); } - if (command != null) {for (String item :command){ this.addToCommand(item);}} return (A) this; - } - public Boolean hasCommand() { - return command != null && !command.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ExecActionFluentImpl that = (V1ExecActionFluentImpl) o; - if (!java.util.Objects.equals(command, that.command)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(command, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (command != null && !command.isEmpty()) { sb.append("command:"); sb.append(command); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationBuilder.java index cf07a0f0ba..af775529cd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ExternalDocumentationBuilder extends V1ExternalDocumentationFluentImpl implements VisitableBuilder{ +public class V1ExternalDocumentationBuilder extends V1ExternalDocumentationFluent implements VisitableBuilder{ public V1ExternalDocumentationBuilder() { - this(false); - } - public V1ExternalDocumentationBuilder(Boolean validationEnabled) { - this(new V1ExternalDocumentation(), validationEnabled); + this(new V1ExternalDocumentation()); } + public V1ExternalDocumentationBuilder(V1ExternalDocumentationFluent fluent) { - this(fluent, false); - } - public V1ExternalDocumentationBuilder(V1ExternalDocumentationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ExternalDocumentation(), validationEnabled); + this(fluent, new V1ExternalDocumentation()); } + public V1ExternalDocumentationBuilder(V1ExternalDocumentationFluent fluent,V1ExternalDocumentation instance) { - this(fluent, instance, false); - } - public V1ExternalDocumentationBuilder(V1ExternalDocumentationFluent fluent,V1ExternalDocumentation instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDescription(instance.getDescription()); - fluent.withUrl(instance.getUrl()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ExternalDocumentationBuilder(V1ExternalDocumentation instance) { - this(instance,false); - } - public V1ExternalDocumentationBuilder(V1ExternalDocumentation instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDescription(instance.getDescription()); - this.withUrl(instance.getUrl()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ExternalDocumentationFluent fluent; - Boolean validationEnabled; + public V1ExternalDocumentation build() { V1ExternalDocumentation buildable = new V1ExternalDocumentation(); buildable.setDescription(fluent.getDescription()); @@ -46,4 +28,5 @@ public V1ExternalDocumentation build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationFluent.java index d687529533..b89eb8b1e5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ExternalDocumentationFluent> extends Fluent{ - public String getDescription(); - public A withDescription(String description); - public Boolean hasDescription(); - public String getUrl(); - public A withUrl(String url); - public Boolean hasUrl(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ExternalDocumentationFluent> extends BaseFluent{ + public V1ExternalDocumentationFluent() { + } + public V1ExternalDocumentationFluent(V1ExternalDocumentation instance) { + this.copyInstance(instance); + } + private String description; + private String url; + + protected void copyInstance(V1ExternalDocumentation instance) { + instance = (instance != null ? instance : new V1ExternalDocumentation()); + if (instance != null) { + this.withDescription(instance.getDescription()); + this.withUrl(instance.getUrl()); + } + } + + public String getDescription() { + return this.description; + } + + public A withDescription(String description) { + this.description = description; + return (A) this; + } + + public boolean hasDescription() { + return this.description != null; + } + + public String getUrl() { + return this.url; + } + + public A withUrl(String url) { + this.url = url; + return (A) this; + } + + public boolean hasUrl() { + return this.url != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ExternalDocumentationFluent that = (V1ExternalDocumentationFluent) o; + if (!java.util.Objects.equals(description, that.description)) return false; + if (!java.util.Objects.equals(url, that.url)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(description, url, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (description != null) { sb.append("description:"); sb.append(description + ","); } + if (url != null) { sb.append("url:"); sb.append(url); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationFluentImpl.java deleted file mode 100644 index 8be39eda42..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ExternalDocumentationFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ExternalDocumentationFluentImpl> extends BaseFluent implements V1ExternalDocumentationFluent{ - public V1ExternalDocumentationFluentImpl() { - } - public V1ExternalDocumentationFluentImpl(V1ExternalDocumentation instance) { - if (instance != null) { - this.withDescription(instance.getDescription()); - this.withUrl(instance.getUrl()); - } - } - private String description; - private String url; - public String getDescription() { - return this.description; - } - public A withDescription(String description) { - this.description=description; return (A) this; - } - public Boolean hasDescription() { - return this.description != null; - } - public String getUrl() { - return this.url; - } - public A withUrl(String url) { - this.url=url; return (A) this; - } - public Boolean hasUrl() { - return this.url != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ExternalDocumentationFluentImpl that = (V1ExternalDocumentationFluentImpl) o; - if (!java.util.Objects.equals(description, that.description)) return false; - - if (!java.util.Objects.equals(url, that.url)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(description, url, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (description != null) { sb.append("description:"); sb.append(description + ","); } - if (url != null) { sb.append("url:"); sb.append(url); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceBuilder.java index d6eae9e4cf..9bd33c6030 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1FCVolumeSourceBuilder extends V1FCVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1FCVolumeSourceBuilder extends V1FCVolumeSourceFluent implements VisitableBuilder{ public V1FCVolumeSourceBuilder() { - this(false); - } - public V1FCVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1FCVolumeSource(), validationEnabled); + this(new V1FCVolumeSource()); } + public V1FCVolumeSourceBuilder(V1FCVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1FCVolumeSourceBuilder(V1FCVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1FCVolumeSource(), validationEnabled); + this(fluent, new V1FCVolumeSource()); } + public V1FCVolumeSourceBuilder(V1FCVolumeSourceFluent fluent,V1FCVolumeSource instance) { - this(fluent, instance, false); - } - public V1FCVolumeSourceBuilder(V1FCVolumeSourceFluent fluent,V1FCVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withLun(instance.getLun()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withTargetWWNs(instance.getTargetWWNs()); - fluent.withWwids(instance.getWwids()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1FCVolumeSourceBuilder(V1FCVolumeSource instance) { - this(instance,false); - } - public V1FCVolumeSourceBuilder(V1FCVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withLun(instance.getLun()); - this.withReadOnly(instance.getReadOnly()); - this.withTargetWWNs(instance.getTargetWWNs()); - this.withWwids(instance.getWwids()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1FCVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1FCVolumeSource build() { V1FCVolumeSource buildable = new V1FCVolumeSource(); buildable.setFsType(fluent.getFsType()); @@ -55,4 +31,5 @@ public V1FCVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceFluent.java index 4a81270caa..a256be72bb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceFluent.java @@ -1,58 +1,303 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1FCVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public Integer getLun(); - public A withLun(Integer lun); - public Boolean hasLun(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public A addToTargetWWNs(int index,String item); - public A setToTargetWWNs(int index,String item); - public A addToTargetWWNs(java.lang.String... items); - public A addAllToTargetWWNs(Collection items); - public A removeFromTargetWWNs(java.lang.String... items); - public A removeAllFromTargetWWNs(Collection items); - public List getTargetWWNs(); - public String getTargetWWN(int index); - public String getFirstTargetWWN(); - public String getLastTargetWWN(); - public String getMatchingTargetWWN(Predicate predicate); - public Boolean hasMatchingTargetWWN(Predicate predicate); - public A withTargetWWNs(List targetWWNs); - public A withTargetWWNs(java.lang.String... targetWWNs); - public Boolean hasTargetWWNs(); - public A addToWwids(int index,String item); - public A setToWwids(int index,String item); - public A addToWwids(java.lang.String... items); - public A addAllToWwids(Collection items); - public A removeFromWwids(java.lang.String... items); - public A removeAllFromWwids(Collection items); - public List getWwids(); - public String getWwid(int index); - public String getFirstWwid(); - public String getLastWwid(); - public String getMatchingWwid(Predicate predicate); - public Boolean hasMatchingWwid(Predicate predicate); - public A withWwids(List wwids); - public A withWwids(java.lang.String... wwids); - public Boolean hasWwids(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1FCVolumeSourceFluent> extends BaseFluent{ + public V1FCVolumeSourceFluent() { + } + public V1FCVolumeSourceFluent(V1FCVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private Integer lun; + private Boolean readOnly; + private List targetWWNs; + private List wwids; + + protected void copyInstance(V1FCVolumeSource instance) { + instance = (instance != null ? instance : new V1FCVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withLun(instance.getLun()); + this.withReadOnly(instance.getReadOnly()); + this.withTargetWWNs(instance.getTargetWWNs()); + this.withWwids(instance.getWwids()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public Integer getLun() { + return this.lun; + } + + public A withLun(Integer lun) { + this.lun = lun; + return (A) this; + } + + public boolean hasLun() { + return this.lun != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public A addToTargetWWNs(int index,String item) { + if (this.targetWWNs == null) {this.targetWWNs = new ArrayList();} + this.targetWWNs.add(index, item); + return (A)this; + } + + public A setToTargetWWNs(int index,String item) { + if (this.targetWWNs == null) {this.targetWWNs = new ArrayList();} + this.targetWWNs.set(index, item); return (A)this; + } + + public A addToTargetWWNs(java.lang.String... items) { + if (this.targetWWNs == null) {this.targetWWNs = new ArrayList();} + for (String item : items) {this.targetWWNs.add(item);} return (A)this; + } + + public A addAllToTargetWWNs(Collection items) { + if (this.targetWWNs == null) {this.targetWWNs = new ArrayList();} + for (String item : items) {this.targetWWNs.add(item);} return (A)this; + } + + public A removeFromTargetWWNs(java.lang.String... items) { + if (this.targetWWNs == null) return (A)this; + for (String item : items) { this.targetWWNs.remove(item);} return (A)this; + } + + public A removeAllFromTargetWWNs(Collection items) { + if (this.targetWWNs == null) return (A)this; + for (String item : items) { this.targetWWNs.remove(item);} return (A)this; + } + + public List getTargetWWNs() { + return this.targetWWNs; + } + + public String getTargetWWN(int index) { + return this.targetWWNs.get(index); + } + + public String getFirstTargetWWN() { + return this.targetWWNs.get(0); + } + + public String getLastTargetWWN() { + return this.targetWWNs.get(targetWWNs.size() - 1); + } + + public String getMatchingTargetWWN(Predicate predicate) { + for (String item : targetWWNs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingTargetWWN(Predicate predicate) { + for (String item : targetWWNs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withTargetWWNs(List targetWWNs) { + if (targetWWNs != null) { + this.targetWWNs = new ArrayList(); + for (String item : targetWWNs) { + this.addToTargetWWNs(item); + } + } else { + this.targetWWNs = null; + } + return (A) this; + } + + public A withTargetWWNs(java.lang.String... targetWWNs) { + if (this.targetWWNs != null) { + this.targetWWNs.clear(); + _visitables.remove("targetWWNs"); + } + if (targetWWNs != null) { + for (String item : targetWWNs) { + this.addToTargetWWNs(item); + } + } + return (A) this; + } + + public boolean hasTargetWWNs() { + return this.targetWWNs != null && !this.targetWWNs.isEmpty(); + } + + public A addToWwids(int index,String item) { + if (this.wwids == null) {this.wwids = new ArrayList();} + this.wwids.add(index, item); + return (A)this; + } + + public A setToWwids(int index,String item) { + if (this.wwids == null) {this.wwids = new ArrayList();} + this.wwids.set(index, item); return (A)this; + } + + public A addToWwids(java.lang.String... items) { + if (this.wwids == null) {this.wwids = new ArrayList();} + for (String item : items) {this.wwids.add(item);} return (A)this; + } + + public A addAllToWwids(Collection items) { + if (this.wwids == null) {this.wwids = new ArrayList();} + for (String item : items) {this.wwids.add(item);} return (A)this; + } + + public A removeFromWwids(java.lang.String... items) { + if (this.wwids == null) return (A)this; + for (String item : items) { this.wwids.remove(item);} return (A)this; + } + + public A removeAllFromWwids(Collection items) { + if (this.wwids == null) return (A)this; + for (String item : items) { this.wwids.remove(item);} return (A)this; + } + + public List getWwids() { + return this.wwids; + } + + public String getWwid(int index) { + return this.wwids.get(index); + } + + public String getFirstWwid() { + return this.wwids.get(0); + } + + public String getLastWwid() { + return this.wwids.get(wwids.size() - 1); + } + + public String getMatchingWwid(Predicate predicate) { + for (String item : wwids) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingWwid(Predicate predicate) { + for (String item : wwids) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withWwids(List wwids) { + if (wwids != null) { + this.wwids = new ArrayList(); + for (String item : wwids) { + this.addToWwids(item); + } + } else { + this.wwids = null; + } + return (A) this; + } + + public A withWwids(java.lang.String... wwids) { + if (this.wwids != null) { + this.wwids.clear(); + _visitables.remove("wwids"); + } + if (wwids != null) { + for (String item : wwids) { + this.addToWwids(item); + } + } + return (A) this; + } + + public boolean hasWwids() { + return this.wwids != null && !this.wwids.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1FCVolumeSourceFluent that = (V1FCVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(lun, that.lun)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(targetWWNs, that.targetWWNs)) return false; + if (!java.util.Objects.equals(wwids, that.wwids)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, lun, readOnly, targetWWNs, wwids, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (lun != null) { sb.append("lun:"); sb.append(lun + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (targetWWNs != null && !targetWWNs.isEmpty()) { sb.append("targetWWNs:"); sb.append(targetWWNs + ","); } + if (wwids != null && !wwids.isEmpty()) { sb.append("wwids:"); sb.append(wwids); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceFluentImpl.java deleted file mode 100644 index fa8ed633d4..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FCVolumeSourceFluentImpl.java +++ /dev/null @@ -1,199 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1FCVolumeSourceFluentImpl> extends BaseFluent implements V1FCVolumeSourceFluent{ - public V1FCVolumeSourceFluentImpl() { - } - public V1FCVolumeSourceFluentImpl(V1FCVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withLun(instance.getLun()); - this.withReadOnly(instance.getReadOnly()); - this.withTargetWWNs(instance.getTargetWWNs()); - this.withWwids(instance.getWwids()); - } - } - private String fsType; - private Integer lun; - private Boolean readOnly; - private List targetWWNs; - private List wwids; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public Integer getLun() { - return this.lun; - } - public A withLun(Integer lun) { - this.lun=lun; return (A) this; - } - public Boolean hasLun() { - return this.lun != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public A addToTargetWWNs(int index,String item) { - if (this.targetWWNs == null) {this.targetWWNs = new ArrayList();} - this.targetWWNs.add(index, item); - return (A)this; - } - public A setToTargetWWNs(int index,String item) { - if (this.targetWWNs == null) {this.targetWWNs = new ArrayList();} - this.targetWWNs.set(index, item); return (A)this; - } - public A addToTargetWWNs(java.lang.String... items) { - if (this.targetWWNs == null) {this.targetWWNs = new ArrayList();} - for (String item : items) {this.targetWWNs.add(item);} return (A)this; - } - public A addAllToTargetWWNs(Collection items) { - if (this.targetWWNs == null) {this.targetWWNs = new ArrayList();} - for (String item : items) {this.targetWWNs.add(item);} return (A)this; - } - public A removeFromTargetWWNs(java.lang.String... items) { - for (String item : items) {if (this.targetWWNs!= null){ this.targetWWNs.remove(item);}} return (A)this; - } - public A removeAllFromTargetWWNs(Collection items) { - for (String item : items) {if (this.targetWWNs!= null){ this.targetWWNs.remove(item);}} return (A)this; - } - public List getTargetWWNs() { - return this.targetWWNs; - } - public String getTargetWWN(int index) { - return this.targetWWNs.get(index); - } - public String getFirstTargetWWN() { - return this.targetWWNs.get(0); - } - public String getLastTargetWWN() { - return this.targetWWNs.get(targetWWNs.size() - 1); - } - public String getMatchingTargetWWN(Predicate predicate) { - for (String item: targetWWNs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingTargetWWN(Predicate predicate) { - for (String item: targetWWNs) { if(predicate.test(item)){ return true;} } return false; - } - public A withTargetWWNs(List targetWWNs) { - if (targetWWNs != null) {this.targetWWNs = new ArrayList(); for (String item : targetWWNs){this.addToTargetWWNs(item);}} else { this.targetWWNs = null;} return (A) this; - } - public A withTargetWWNs(java.lang.String... targetWWNs) { - if (this.targetWWNs != null) {this.targetWWNs.clear(); _visitables.remove("targetWWNs"); } - if (targetWWNs != null) {for (String item :targetWWNs){ this.addToTargetWWNs(item);}} return (A) this; - } - public Boolean hasTargetWWNs() { - return targetWWNs != null && !targetWWNs.isEmpty(); - } - public A addToWwids(int index,String item) { - if (this.wwids == null) {this.wwids = new ArrayList();} - this.wwids.add(index, item); - return (A)this; - } - public A setToWwids(int index,String item) { - if (this.wwids == null) {this.wwids = new ArrayList();} - this.wwids.set(index, item); return (A)this; - } - public A addToWwids(java.lang.String... items) { - if (this.wwids == null) {this.wwids = new ArrayList();} - for (String item : items) {this.wwids.add(item);} return (A)this; - } - public A addAllToWwids(Collection items) { - if (this.wwids == null) {this.wwids = new ArrayList();} - for (String item : items) {this.wwids.add(item);} return (A)this; - } - public A removeFromWwids(java.lang.String... items) { - for (String item : items) {if (this.wwids!= null){ this.wwids.remove(item);}} return (A)this; - } - public A removeAllFromWwids(Collection items) { - for (String item : items) {if (this.wwids!= null){ this.wwids.remove(item);}} return (A)this; - } - public List getWwids() { - return this.wwids; - } - public String getWwid(int index) { - return this.wwids.get(index); - } - public String getFirstWwid() { - return this.wwids.get(0); - } - public String getLastWwid() { - return this.wwids.get(wwids.size() - 1); - } - public String getMatchingWwid(Predicate predicate) { - for (String item: wwids) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingWwid(Predicate predicate) { - for (String item: wwids) { if(predicate.test(item)){ return true;} } return false; - } - public A withWwids(List wwids) { - if (wwids != null) {this.wwids = new ArrayList(); for (String item : wwids){this.addToWwids(item);}} else { this.wwids = null;} return (A) this; - } - public A withWwids(java.lang.String... wwids) { - if (this.wwids != null) {this.wwids.clear(); _visitables.remove("wwids"); } - if (wwids != null) {for (String item :wwids){ this.addToWwids(item);}} return (A) this; - } - public Boolean hasWwids() { - return wwids != null && !wwids.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1FCVolumeSourceFluentImpl that = (V1FCVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(lun, that.lun)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(targetWWNs, that.targetWWNs)) return false; - - if (!java.util.Objects.equals(wwids, that.wwids)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, lun, readOnly, targetWWNs, wwids, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (lun != null) { sb.append("lun:"); sb.append(lun + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (targetWWNs != null && !targetWWNs.isEmpty()) { sb.append("targetWWNs:"); sb.append(targetWWNs + ","); } - if (wwids != null && !wwids.isEmpty()) { sb.append("wwids:"); sb.append(wwids); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceBuilder.java index 1c62ba321e..7c03ddfc7d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1FlexPersistentVolumeSourceBuilder extends V1FlexPersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1FlexPersistentVolumeSourceBuilder extends V1FlexPersistentVolumeSourceFluent implements VisitableBuilder{ public V1FlexPersistentVolumeSourceBuilder() { - this(false); - } - public V1FlexPersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1FlexPersistentVolumeSource(), validationEnabled); + this(new V1FlexPersistentVolumeSource()); } + public V1FlexPersistentVolumeSourceBuilder(V1FlexPersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1FlexPersistentVolumeSourceBuilder(V1FlexPersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1FlexPersistentVolumeSource(), validationEnabled); + this(fluent, new V1FlexPersistentVolumeSource()); } + public V1FlexPersistentVolumeSourceBuilder(V1FlexPersistentVolumeSourceFluent fluent,V1FlexPersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1FlexPersistentVolumeSourceBuilder(V1FlexPersistentVolumeSourceFluent fluent,V1FlexPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDriver(instance.getDriver()); - fluent.withFsType(instance.getFsType()); - fluent.withOptions(instance.getOptions()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1FlexPersistentVolumeSourceBuilder(V1FlexPersistentVolumeSource instance) { - this(instance,false); - } - public V1FlexPersistentVolumeSourceBuilder(V1FlexPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDriver(instance.getDriver()); - this.withFsType(instance.getFsType()); - this.withOptions(instance.getOptions()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1FlexPersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1FlexPersistentVolumeSource build() { V1FlexPersistentVolumeSource buildable = new V1FlexPersistentVolumeSource(); buildable.setDriver(fluent.getDriver()); buildable.setFsType(fluent.getFsType()); buildable.setOptions(fluent.getOptions()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceFluent.java index 5feb232fab..a082ad819f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceFluent.java @@ -1,54 +1,205 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import java.util.LinkedHashMap; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; import java.util.Map; -import java.util.LinkedHashMap; - /** - * Generated - */ -public interface V1FlexPersistentVolumeSourceFluent> extends Fluent{ - public String getDriver(); - public A withDriver(String driver); - public Boolean hasDriver(); - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public A addToOptions(String key,String value); - public A addToOptions(Map map); - public A removeFromOptions(String key); - public A removeFromOptions(Map map); - public Map getOptions(); - public A withOptions(Map options); - public Boolean hasOptions(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef(); - public V1SecretReference buildSecretRef(); - public A withSecretRef(V1SecretReference secretRef); - public Boolean hasSecretRef(); - public V1FlexPersistentVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1FlexPersistentVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1SecretReference item); - public V1FlexPersistentVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1FlexPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1FlexPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1SecretReference item); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1FlexPersistentVolumeSourceFluent> extends BaseFluent{ + public V1FlexPersistentVolumeSourceFluent() { + } + + public V1FlexPersistentVolumeSourceFluent(V1FlexPersistentVolumeSource instance) { + this.copyInstance(instance); + } + private String driver; + private String fsType; + private Map options; + private Boolean readOnly; + private V1SecretReferenceBuilder secretRef; + + protected void copyInstance(V1FlexPersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1FlexPersistentVolumeSource()); + if (instance != null) { + this.withDriver(instance.getDriver()); + this.withFsType(instance.getFsType()); + this.withOptions(instance.getOptions()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + } + } + + public String getDriver() { + return this.driver; + } + + public A withDriver(String driver) { + this.driver = driver; + return (A) this; + } + + public boolean hasDriver() { + return this.driver != null; + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public A addToOptions(String key,String value) { + if(this.options == null && key != null && value != null) { this.options = new LinkedHashMap(); } + if(key != null && value != null) {this.options.put(key, value);} return (A)this; + } + + public A addToOptions(Map map) { + if(this.options == null && map != null) { this.options = new LinkedHashMap(); } + if(map != null) { this.options.putAll(map);} return (A)this; + } + + public A removeFromOptions(String key) { + if(this.options == null) { return (A) this; } + if(key != null && this.options != null) {this.options.remove(key);} return (A)this; + } + + public A removeFromOptions(Map map) { + if(this.options == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.options != null){this.options.remove(key);}}} return (A)this; + } + + public Map getOptions() { + return this.options; + } + + public A withOptions(Map options) { + if (options == null) { + this.options = null; + } else { + this.options = new LinkedHashMap(options); + } + return (A) this; + } + + public boolean hasOptions() { + return this.options != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1SecretReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1SecretReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1SecretReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1SecretReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); } + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1FlexPersistentVolumeSourceFluent that = (V1FlexPersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(driver, that.driver)) return false; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(options, that.options)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(driver, fsType, options, readOnly, secretRef, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (driver != null) { sb.append("driver:"); sb.append(driver + ","); } + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (options != null && !options.isEmpty()) { sb.append("options:"); sb.append(options + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1SecretReferenceFluent> implements Nested{ + SecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1FlexPersistentVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceFluentImpl.java deleted file mode 100644 index d743be9cfe..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexPersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,171 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.util.LinkedHashMap; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1FlexPersistentVolumeSourceFluentImpl> extends BaseFluent implements V1FlexPersistentVolumeSourceFluent{ - public V1FlexPersistentVolumeSourceFluentImpl() { - } - public V1FlexPersistentVolumeSourceFluentImpl(V1FlexPersistentVolumeSource instance) { - if (instance != null) { - this.withDriver(instance.getDriver()); - this.withFsType(instance.getFsType()); - this.withOptions(instance.getOptions()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - } - } - private String driver; - private String fsType; - private Map options; - private Boolean readOnly; - private V1SecretReferenceBuilder secretRef; - public String getDriver() { - return this.driver; - } - public A withDriver(String driver) { - this.driver=driver; return (A) this; - } - public Boolean hasDriver() { - return this.driver != null; - } - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public A addToOptions(String key,String value) { - if(this.options == null && key != null && value != null) { this.options = new LinkedHashMap(); } - if(key != null && value != null) {this.options.put(key, value);} return (A)this; - } - public A addToOptions(Map map) { - if(this.options == null && map != null) { this.options = new LinkedHashMap(); } - if(map != null) { this.options.putAll(map);} return (A)this; - } - public A removeFromOptions(String key) { - if(this.options == null) { return (A) this; } - if(key != null && this.options != null) {this.options.remove(key);} return (A)this; - } - public A removeFromOptions(Map map) { - if(this.options == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.options != null){this.options.remove(key);}}} return (A)this; - } - public Map getOptions() { - return this.options; - } - public A withOptions(Map options) { - if (options == null) { this.options = null;} else {this.options = new LinkedHashMap(options);} return (A) this; - } - public Boolean hasOptions() { - return this.options != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1SecretReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1SecretReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1SecretReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1FlexPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1FlexPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1FlexPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1SecretReference item) { - return new V1FlexPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1FlexPersistentVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1FlexPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1FlexPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1FlexPersistentVolumeSourceFluentImpl that = (V1FlexPersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(driver, that.driver)) return false; - - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(options, that.options)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(driver, fsType, options, readOnly, secretRef, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (driver != null) { sb.append("driver:"); sb.append(driver + ","); } - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (options != null && !options.isEmpty()) { sb.append("options:"); sb.append(options + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1FlexPersistentVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1FlexPersistentVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceBuilder.java index 5d6aca393d..c883baccfa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1FlexVolumeSourceBuilder extends V1FlexVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1FlexVolumeSourceBuilder extends V1FlexVolumeSourceFluent implements VisitableBuilder{ public V1FlexVolumeSourceBuilder() { - this(false); - } - public V1FlexVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1FlexVolumeSource(), validationEnabled); + this(new V1FlexVolumeSource()); } + public V1FlexVolumeSourceBuilder(V1FlexVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1FlexVolumeSourceBuilder(V1FlexVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1FlexVolumeSource(), validationEnabled); + this(fluent, new V1FlexVolumeSource()); } + public V1FlexVolumeSourceBuilder(V1FlexVolumeSourceFluent fluent,V1FlexVolumeSource instance) { - this(fluent, instance, false); - } - public V1FlexVolumeSourceBuilder(V1FlexVolumeSourceFluent fluent,V1FlexVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDriver(instance.getDriver()); - fluent.withFsType(instance.getFsType()); - fluent.withOptions(instance.getOptions()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1FlexVolumeSourceBuilder(V1FlexVolumeSource instance) { - this(instance,false); - } - public V1FlexVolumeSourceBuilder(V1FlexVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDriver(instance.getDriver()); - this.withFsType(instance.getFsType()); - this.withOptions(instance.getOptions()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1FlexVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1FlexVolumeSource build() { V1FlexVolumeSource buildable = new V1FlexVolumeSource(); buildable.setDriver(fluent.getDriver()); buildable.setFsType(fluent.getFsType()); buildable.setOptions(fluent.getOptions()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceFluent.java index 1d29d136ad..91ce0040b2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceFluent.java @@ -1,54 +1,205 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import java.util.LinkedHashMap; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; import java.util.Map; -import java.util.LinkedHashMap; - /** - * Generated - */ -public interface V1FlexVolumeSourceFluent> extends Fluent{ - public String getDriver(); - public A withDriver(String driver); - public Boolean hasDriver(); - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public A addToOptions(String key,String value); - public A addToOptions(Map map); - public A removeFromOptions(String key); - public A removeFromOptions(Map map); - public Map getOptions(); - public A withOptions(Map options); - public Boolean hasOptions(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef(); - public V1LocalObjectReference buildSecretRef(); - public A withSecretRef(V1LocalObjectReference secretRef); - public Boolean hasSecretRef(); - public V1FlexVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1FlexVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item); - public V1FlexVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1FlexVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1FlexVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1FlexVolumeSourceFluent> extends BaseFluent{ + public V1FlexVolumeSourceFluent() { + } + + public V1FlexVolumeSourceFluent(V1FlexVolumeSource instance) { + this.copyInstance(instance); + } + private String driver; + private String fsType; + private Map options; + private Boolean readOnly; + private V1LocalObjectReferenceBuilder secretRef; + + protected void copyInstance(V1FlexVolumeSource instance) { + instance = (instance != null ? instance : new V1FlexVolumeSource()); + if (instance != null) { + this.withDriver(instance.getDriver()); + this.withFsType(instance.getFsType()); + this.withOptions(instance.getOptions()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + } + } + + public String getDriver() { + return this.driver; + } + + public A withDriver(String driver) { + this.driver = driver; + return (A) this; + } + + public boolean hasDriver() { + return this.driver != null; + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public A addToOptions(String key,String value) { + if(this.options == null && key != null && value != null) { this.options = new LinkedHashMap(); } + if(key != null && value != null) {this.options.put(key, value);} return (A)this; + } + + public A addToOptions(Map map) { + if(this.options == null && map != null) { this.options = new LinkedHashMap(); } + if(map != null) { this.options.putAll(map);} return (A)this; + } + + public A removeFromOptions(String key) { + if(this.options == null) { return (A) this; } + if(key != null && this.options != null) {this.options.remove(key);} return (A)this; + } + + public A removeFromOptions(Map map) { + if(this.options == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.options != null){this.options.remove(key);}}} return (A)this; + } + + public Map getOptions() { + return this.options; + } + + public A withOptions(Map options) { + if (options == null) { + this.options = null; + } else { + this.options = new LinkedHashMap(options); + } + return (A) this; + } + + public boolean hasOptions() { + return this.options != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1LocalObjectReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1LocalObjectReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1LocalObjectReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); } + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1LocalObjectReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1FlexVolumeSourceFluent that = (V1FlexVolumeSourceFluent) o; + if (!java.util.Objects.equals(driver, that.driver)) return false; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(options, that.options)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(driver, fsType, options, readOnly, secretRef, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (driver != null) { sb.append("driver:"); sb.append(driver + ","); } + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (options != null && !options.isEmpty()) { sb.append("options:"); sb.append(options + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1LocalObjectReferenceFluent> implements Nested{ + SecretRefNested(V1LocalObjectReference item) { + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1FlexVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceFluentImpl.java deleted file mode 100644 index 3613b3d0d3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlexVolumeSourceFluentImpl.java +++ /dev/null @@ -1,171 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.util.LinkedHashMap; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1FlexVolumeSourceFluentImpl> extends BaseFluent implements V1FlexVolumeSourceFluent{ - public V1FlexVolumeSourceFluentImpl() { - } - public V1FlexVolumeSourceFluentImpl(V1FlexVolumeSource instance) { - if (instance != null) { - this.withDriver(instance.getDriver()); - this.withFsType(instance.getFsType()); - this.withOptions(instance.getOptions()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - } - } - private String driver; - private String fsType; - private Map options; - private Boolean readOnly; - private V1LocalObjectReferenceBuilder secretRef; - public String getDriver() { - return this.driver; - } - public A withDriver(String driver) { - this.driver=driver; return (A) this; - } - public Boolean hasDriver() { - return this.driver != null; - } - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public A addToOptions(String key,String value) { - if(this.options == null && key != null && value != null) { this.options = new LinkedHashMap(); } - if(key != null && value != null) {this.options.put(key, value);} return (A)this; - } - public A addToOptions(Map map) { - if(this.options == null && map != null) { this.options = new LinkedHashMap(); } - if(map != null) { this.options.putAll(map);} return (A)this; - } - public A removeFromOptions(String key) { - if(this.options == null) { return (A) this; } - if(key != null && this.options != null) {this.options.remove(key);} return (A)this; - } - public A removeFromOptions(Map map) { - if(this.options == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.options != null){this.options.remove(key);}}} return (A)this; - } - public Map getOptions() { - return this.options; - } - public A withOptions(Map options) { - if (options == null) { this.options = null;} else {this.options = new LinkedHashMap(options);} return (A) this; - } - public Boolean hasOptions() { - return this.options != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1LocalObjectReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1LocalObjectReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1LocalObjectReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1FlexVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1FlexVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1FlexVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { - return new V1FlexVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1FlexVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1FlexVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1LocalObjectReferenceBuilder().build()); - } - public V1FlexVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1FlexVolumeSourceFluentImpl that = (V1FlexVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(driver, that.driver)) return false; - - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(options, that.options)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(driver, fsType, options, readOnly, secretRef, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (driver != null) { sb.append("driver:"); sb.append(driver + ","); } - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (options != null && !options.isEmpty()) { sb.append("options:"); sb.append(options + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1FlexVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1LocalObjectReference item) { - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - public N and() { - return (N) V1FlexVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceBuilder.java index 9ac5a8f4c7..d502dfeaa4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1FlockerVolumeSourceBuilder extends V1FlockerVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1FlockerVolumeSourceBuilder extends V1FlockerVolumeSourceFluent implements VisitableBuilder{ public V1FlockerVolumeSourceBuilder() { - this(false); - } - public V1FlockerVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1FlockerVolumeSource(), validationEnabled); + this(new V1FlockerVolumeSource()); } + public V1FlockerVolumeSourceBuilder(V1FlockerVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1FlockerVolumeSourceBuilder(V1FlockerVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1FlockerVolumeSource(), validationEnabled); + this(fluent, new V1FlockerVolumeSource()); } + public V1FlockerVolumeSourceBuilder(V1FlockerVolumeSourceFluent fluent,V1FlockerVolumeSource instance) { - this(fluent, instance, false); - } - public V1FlockerVolumeSourceBuilder(V1FlockerVolumeSourceFluent fluent,V1FlockerVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDatasetName(instance.getDatasetName()); - fluent.withDatasetUUID(instance.getDatasetUUID()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1FlockerVolumeSourceBuilder(V1FlockerVolumeSource instance) { - this(instance,false); - } - public V1FlockerVolumeSourceBuilder(V1FlockerVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDatasetName(instance.getDatasetName()); - this.withDatasetUUID(instance.getDatasetUUID()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1FlockerVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1FlockerVolumeSource build() { V1FlockerVolumeSource buildable = new V1FlockerVolumeSource(); buildable.setDatasetName(fluent.getDatasetName()); @@ -46,4 +28,5 @@ public V1FlockerVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceFluent.java index 7f5b9da762..d445abb971 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1FlockerVolumeSourceFluent> extends Fluent{ - public String getDatasetName(); - public A withDatasetName(String datasetName); - public Boolean hasDatasetName(); - public String getDatasetUUID(); - public A withDatasetUUID(String datasetUUID); - public Boolean hasDatasetUUID(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1FlockerVolumeSourceFluent> extends BaseFluent{ + public V1FlockerVolumeSourceFluent() { + } + public V1FlockerVolumeSourceFluent(V1FlockerVolumeSource instance) { + this.copyInstance(instance); + } + private String datasetName; + private String datasetUUID; + + protected void copyInstance(V1FlockerVolumeSource instance) { + instance = (instance != null ? instance : new V1FlockerVolumeSource()); + if (instance != null) { + this.withDatasetName(instance.getDatasetName()); + this.withDatasetUUID(instance.getDatasetUUID()); + } + } + + public String getDatasetName() { + return this.datasetName; + } + + public A withDatasetName(String datasetName) { + this.datasetName = datasetName; + return (A) this; + } + + public boolean hasDatasetName() { + return this.datasetName != null; + } + + public String getDatasetUUID() { + return this.datasetUUID; + } + + public A withDatasetUUID(String datasetUUID) { + this.datasetUUID = datasetUUID; + return (A) this; + } + + public boolean hasDatasetUUID() { + return this.datasetUUID != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1FlockerVolumeSourceFluent that = (V1FlockerVolumeSourceFluent) o; + if (!java.util.Objects.equals(datasetName, that.datasetName)) return false; + if (!java.util.Objects.equals(datasetUUID, that.datasetUUID)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(datasetName, datasetUUID, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (datasetName != null) { sb.append("datasetName:"); sb.append(datasetName + ","); } + if (datasetUUID != null) { sb.append("datasetUUID:"); sb.append(datasetUUID); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceFluentImpl.java deleted file mode 100644 index 84a8cc2cb1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1FlockerVolumeSourceFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1FlockerVolumeSourceFluentImpl> extends BaseFluent implements V1FlockerVolumeSourceFluent{ - public V1FlockerVolumeSourceFluentImpl() { - } - public V1FlockerVolumeSourceFluentImpl(V1FlockerVolumeSource instance) { - if (instance != null) { - this.withDatasetName(instance.getDatasetName()); - this.withDatasetUUID(instance.getDatasetUUID()); - } - } - private String datasetName; - private String datasetUUID; - public String getDatasetName() { - return this.datasetName; - } - public A withDatasetName(String datasetName) { - this.datasetName=datasetName; return (A) this; - } - public Boolean hasDatasetName() { - return this.datasetName != null; - } - public String getDatasetUUID() { - return this.datasetUUID; - } - public A withDatasetUUID(String datasetUUID) { - this.datasetUUID=datasetUUID; return (A) this; - } - public Boolean hasDatasetUUID() { - return this.datasetUUID != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1FlockerVolumeSourceFluentImpl that = (V1FlockerVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(datasetName, that.datasetName)) return false; - - if (!java.util.Objects.equals(datasetUUID, that.datasetUUID)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(datasetName, datasetUUID, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (datasetName != null) { sb.append("datasetName:"); sb.append(datasetName + ","); } - if (datasetUUID != null) { sb.append("datasetUUID:"); sb.append(datasetUUID); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneBuilder.java index 0a40b897bc..eea84b4b0e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ForZoneBuilder extends V1ForZoneFluentImpl implements VisitableBuilder{ +public class V1ForZoneBuilder extends V1ForZoneFluent implements VisitableBuilder{ public V1ForZoneBuilder() { - this(false); - } - public V1ForZoneBuilder(Boolean validationEnabled) { - this(new V1ForZone(), validationEnabled); + this(new V1ForZone()); } + public V1ForZoneBuilder(V1ForZoneFluent fluent) { - this(fluent, false); - } - public V1ForZoneBuilder(V1ForZoneFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ForZone(), validationEnabled); + this(fluent, new V1ForZone()); } + public V1ForZoneBuilder(V1ForZoneFluent fluent,V1ForZone instance) { - this(fluent, instance, false); - } - public V1ForZoneBuilder(V1ForZoneFluent fluent,V1ForZone instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ForZoneBuilder(V1ForZone instance) { - this(instance,false); - } - public V1ForZoneBuilder(V1ForZone instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ForZoneFluent fluent; - Boolean validationEnabled; + public V1ForZone build() { V1ForZone buildable = new V1ForZone(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneFluent.java index a4c15d521b..2be8a328c8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ForZoneFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ForZoneFluent> extends BaseFluent{ + public V1ForZoneFluent() { + } + public V1ForZoneFluent(V1ForZone instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1ForZone instance) { + instance = (instance != null ? instance : new V1ForZone()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ForZoneFluent that = (V1ForZoneFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneFluentImpl.java deleted file mode 100644 index 10c0083cd2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ForZoneFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ForZoneFluentImpl> extends BaseFluent implements V1ForZoneFluent{ - public V1ForZoneFluentImpl() { - } - public V1ForZoneFluentImpl(V1ForZone instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ForZoneFluentImpl that = (V1ForZoneFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceBuilder.java index 8d9be79875..a5224bbec6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1GCEPersistentDiskVolumeSourceBuilder extends V1GCEPersistentDiskVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1GCEPersistentDiskVolumeSourceBuilder extends V1GCEPersistentDiskVolumeSourceFluent implements VisitableBuilder{ public V1GCEPersistentDiskVolumeSourceBuilder() { - this(false); - } - public V1GCEPersistentDiskVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1GCEPersistentDiskVolumeSource(), validationEnabled); + this(new V1GCEPersistentDiskVolumeSource()); } + public V1GCEPersistentDiskVolumeSourceBuilder(V1GCEPersistentDiskVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1GCEPersistentDiskVolumeSourceBuilder(V1GCEPersistentDiskVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1GCEPersistentDiskVolumeSource(), validationEnabled); + this(fluent, new V1GCEPersistentDiskVolumeSource()); } + public V1GCEPersistentDiskVolumeSourceBuilder(V1GCEPersistentDiskVolumeSourceFluent fluent,V1GCEPersistentDiskVolumeSource instance) { - this(fluent, instance, false); - } - public V1GCEPersistentDiskVolumeSourceBuilder(V1GCEPersistentDiskVolumeSourceFluent fluent,V1GCEPersistentDiskVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withPartition(instance.getPartition()); - fluent.withPdName(instance.getPdName()); - fluent.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1GCEPersistentDiskVolumeSourceBuilder(V1GCEPersistentDiskVolumeSource instance) { - this(instance,false); - } - public V1GCEPersistentDiskVolumeSourceBuilder(V1GCEPersistentDiskVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withPartition(instance.getPartition()); - this.withPdName(instance.getPdName()); - this.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1GCEPersistentDiskVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1GCEPersistentDiskVolumeSource build() { V1GCEPersistentDiskVolumeSource buildable = new V1GCEPersistentDiskVolumeSource(); buildable.setFsType(fluent.getFsType()); @@ -52,4 +30,5 @@ public V1GCEPersistentDiskVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceFluent.java index 94789f2a1f..810d854f29 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceFluent.java @@ -1,27 +1,120 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1GCEPersistentDiskVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public Integer getPartition(); - public A withPartition(Integer partition); - public Boolean hasPartition(); - public String getPdName(); - public A withPdName(String pdName); - public Boolean hasPdName(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1GCEPersistentDiskVolumeSourceFluent> extends BaseFluent{ + public V1GCEPersistentDiskVolumeSourceFluent() { + } + public V1GCEPersistentDiskVolumeSourceFluent(V1GCEPersistentDiskVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private Integer partition; + private String pdName; + private Boolean readOnly; + + protected void copyInstance(V1GCEPersistentDiskVolumeSource instance) { + instance = (instance != null ? instance : new V1GCEPersistentDiskVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withPartition(instance.getPartition()); + this.withPdName(instance.getPdName()); + this.withReadOnly(instance.getReadOnly()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public Integer getPartition() { + return this.partition; + } + + public A withPartition(Integer partition) { + this.partition = partition; + return (A) this; + } + + public boolean hasPartition() { + return this.partition != null; + } + + public String getPdName() { + return this.pdName; + } + + public A withPdName(String pdName) { + this.pdName = pdName; + return (A) this; + } + + public boolean hasPdName() { + return this.pdName != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1GCEPersistentDiskVolumeSourceFluent that = (V1GCEPersistentDiskVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(partition, that.partition)) return false; + if (!java.util.Objects.equals(pdName, that.pdName)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, partition, pdName, readOnly, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (partition != null) { sb.append("partition:"); sb.append(partition + ","); } + if (pdName != null) { sb.append("pdName:"); sb.append(pdName + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceFluentImpl.java deleted file mode 100644 index 0aab60cb82..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GCEPersistentDiskVolumeSourceFluentImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1GCEPersistentDiskVolumeSourceFluentImpl> extends BaseFluent implements V1GCEPersistentDiskVolumeSourceFluent{ - public V1GCEPersistentDiskVolumeSourceFluentImpl() { - } - public V1GCEPersistentDiskVolumeSourceFluentImpl(V1GCEPersistentDiskVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withPartition(instance.getPartition()); - this.withPdName(instance.getPdName()); - this.withReadOnly(instance.getReadOnly()); - } - } - private String fsType; - private Integer partition; - private String pdName; - private Boolean readOnly; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public Integer getPartition() { - return this.partition; - } - public A withPartition(Integer partition) { - this.partition=partition; return (A) this; - } - public Boolean hasPartition() { - return this.partition != null; - } - public String getPdName() { - return this.pdName; - } - public A withPdName(String pdName) { - this.pdName=pdName; return (A) this; - } - public Boolean hasPdName() { - return this.pdName != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1GCEPersistentDiskVolumeSourceFluentImpl that = (V1GCEPersistentDiskVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(partition, that.partition)) return false; - - if (!java.util.Objects.equals(pdName, that.pdName)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, partition, pdName, readOnly, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (partition != null) { sb.append("partition:"); sb.append(partition + ","); } - if (pdName != null) { sb.append("pdName:"); sb.append(pdName + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionBuilder.java index 049755bacb..9449ec2fe8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1GRPCActionBuilder extends V1GRPCActionFluentImpl implements VisitableBuilder{ +public class V1GRPCActionBuilder extends V1GRPCActionFluent implements VisitableBuilder{ public V1GRPCActionBuilder() { - this(false); - } - public V1GRPCActionBuilder(Boolean validationEnabled) { - this(new V1GRPCAction(), validationEnabled); + this(new V1GRPCAction()); } + public V1GRPCActionBuilder(V1GRPCActionFluent fluent) { - this(fluent, false); - } - public V1GRPCActionBuilder(V1GRPCActionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1GRPCAction(), validationEnabled); + this(fluent, new V1GRPCAction()); } + public V1GRPCActionBuilder(V1GRPCActionFluent fluent,V1GRPCAction instance) { - this(fluent, instance, false); - } - public V1GRPCActionBuilder(V1GRPCActionFluent fluent,V1GRPCAction instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPort(instance.getPort()); - fluent.withService(instance.getService()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1GRPCActionBuilder(V1GRPCAction instance) { - this(instance,false); - } - public V1GRPCActionBuilder(V1GRPCAction instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPort(instance.getPort()); - this.withService(instance.getService()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1GRPCActionFluent fluent; - Boolean validationEnabled; + public V1GRPCAction build() { V1GRPCAction buildable = new V1GRPCAction(); buildable.setPort(fluent.getPort()); @@ -46,4 +28,5 @@ public V1GRPCAction build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionFluent.java index 33fdbf6b38..54a0ce6066 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionFluent.java @@ -1,20 +1,81 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1GRPCActionFluent> extends Fluent{ - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); - public String getService(); - public A withService(String service); - public Boolean hasService(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1GRPCActionFluent> extends BaseFluent{ + public V1GRPCActionFluent() { + } + public V1GRPCActionFluent(V1GRPCAction instance) { + this.copyInstance(instance); + } + private Integer port; + private String service; + + protected void copyInstance(V1GRPCAction instance) { + instance = (instance != null ? instance : new V1GRPCAction()); + if (instance != null) { + this.withPort(instance.getPort()); + this.withService(instance.getService()); + } + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public String getService() { + return this.service; + } + + public A withService(String service) { + this.service = service; + return (A) this; + } + + public boolean hasService() { + return this.service != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1GRPCActionFluent that = (V1GRPCActionFluent) o; + if (!java.util.Objects.equals(port, that.port)) return false; + if (!java.util.Objects.equals(service, that.service)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(port, service, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (port != null) { sb.append("port:"); sb.append(port + ","); } + if (service != null) { sb.append("service:"); sb.append(service); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionFluentImpl.java deleted file mode 100644 index 66d7338c6f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GRPCActionFluentImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1GRPCActionFluentImpl> extends BaseFluent implements V1GRPCActionFluent{ - public V1GRPCActionFluentImpl() { - } - public V1GRPCActionFluentImpl(V1GRPCAction instance) { - if (instance != null) { - this.withPort(instance.getPort()); - this.withService(instance.getService()); - } - } - private Integer port; - private String service; - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public String getService() { - return this.service; - } - public A withService(String service) { - this.service=service; return (A) this; - } - public Boolean hasService() { - return this.service != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1GRPCActionFluentImpl that = (V1GRPCActionFluentImpl) o; - if (!java.util.Objects.equals(port, that.port)) return false; - - if (!java.util.Objects.equals(service, that.service)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(port, service, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (port != null) { sb.append("port:"); sb.append(port + ","); } - if (service != null) { sb.append("service:"); sb.append(service); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceBuilder.java index 8335856109..48626bd7bb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1GitRepoVolumeSourceBuilder extends V1GitRepoVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1GitRepoVolumeSourceBuilder extends V1GitRepoVolumeSourceFluent implements VisitableBuilder{ public V1GitRepoVolumeSourceBuilder() { - this(false); - } - public V1GitRepoVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1GitRepoVolumeSource(), validationEnabled); + this(new V1GitRepoVolumeSource()); } + public V1GitRepoVolumeSourceBuilder(V1GitRepoVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1GitRepoVolumeSourceBuilder(V1GitRepoVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1GitRepoVolumeSource(), validationEnabled); + this(fluent, new V1GitRepoVolumeSource()); } + public V1GitRepoVolumeSourceBuilder(V1GitRepoVolumeSourceFluent fluent,V1GitRepoVolumeSource instance) { - this(fluent, instance, false); - } - public V1GitRepoVolumeSourceBuilder(V1GitRepoVolumeSourceFluent fluent,V1GitRepoVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDirectory(instance.getDirectory()); - fluent.withRepository(instance.getRepository()); - fluent.withRevision(instance.getRevision()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1GitRepoVolumeSourceBuilder(V1GitRepoVolumeSource instance) { - this(instance,false); - } - public V1GitRepoVolumeSourceBuilder(V1GitRepoVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDirectory(instance.getDirectory()); - this.withRepository(instance.getRepository()); - this.withRevision(instance.getRevision()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1GitRepoVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1GitRepoVolumeSource build() { V1GitRepoVolumeSource buildable = new V1GitRepoVolumeSource(); buildable.setDirectory(fluent.getDirectory()); @@ -49,4 +29,5 @@ public V1GitRepoVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceFluent.java index 16c8e82660..08a5cf3042 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceFluent.java @@ -1,22 +1,97 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1GitRepoVolumeSourceFluent> extends Fluent{ - public String getDirectory(); - public A withDirectory(String directory); - public Boolean hasDirectory(); - public String getRepository(); - public A withRepository(String repository); - public Boolean hasRepository(); - public String getRevision(); - public A withRevision(String revision); - public Boolean hasRevision(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1GitRepoVolumeSourceFluent> extends BaseFluent{ + public V1GitRepoVolumeSourceFluent() { + } + public V1GitRepoVolumeSourceFluent(V1GitRepoVolumeSource instance) { + this.copyInstance(instance); + } + private String directory; + private String repository; + private String revision; + + protected void copyInstance(V1GitRepoVolumeSource instance) { + instance = (instance != null ? instance : new V1GitRepoVolumeSource()); + if (instance != null) { + this.withDirectory(instance.getDirectory()); + this.withRepository(instance.getRepository()); + this.withRevision(instance.getRevision()); + } + } + + public String getDirectory() { + return this.directory; + } + + public A withDirectory(String directory) { + this.directory = directory; + return (A) this; + } + + public boolean hasDirectory() { + return this.directory != null; + } + + public String getRepository() { + return this.repository; + } + + public A withRepository(String repository) { + this.repository = repository; + return (A) this; + } + + public boolean hasRepository() { + return this.repository != null; + } + + public String getRevision() { + return this.revision; + } + + public A withRevision(String revision) { + this.revision = revision; + return (A) this; + } + + public boolean hasRevision() { + return this.revision != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1GitRepoVolumeSourceFluent that = (V1GitRepoVolumeSourceFluent) o; + if (!java.util.Objects.equals(directory, that.directory)) return false; + if (!java.util.Objects.equals(repository, that.repository)) return false; + if (!java.util.Objects.equals(revision, that.revision)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(directory, repository, revision, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (directory != null) { sb.append("directory:"); sb.append(directory + ","); } + if (repository != null) { sb.append("repository:"); sb.append(repository + ","); } + if (revision != null) { sb.append("revision:"); sb.append(revision); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceFluentImpl.java deleted file mode 100644 index 9fc433c8bd..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GitRepoVolumeSourceFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1GitRepoVolumeSourceFluentImpl> extends BaseFluent implements V1GitRepoVolumeSourceFluent{ - public V1GitRepoVolumeSourceFluentImpl() { - } - public V1GitRepoVolumeSourceFluentImpl(V1GitRepoVolumeSource instance) { - if (instance != null) { - this.withDirectory(instance.getDirectory()); - this.withRepository(instance.getRepository()); - this.withRevision(instance.getRevision()); - } - } - private String directory; - private String repository; - private String revision; - public String getDirectory() { - return this.directory; - } - public A withDirectory(String directory) { - this.directory=directory; return (A) this; - } - public Boolean hasDirectory() { - return this.directory != null; - } - public String getRepository() { - return this.repository; - } - public A withRepository(String repository) { - this.repository=repository; return (A) this; - } - public Boolean hasRepository() { - return this.repository != null; - } - public String getRevision() { - return this.revision; - } - public A withRevision(String revision) { - this.revision=revision; return (A) this; - } - public Boolean hasRevision() { - return this.revision != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1GitRepoVolumeSourceFluentImpl that = (V1GitRepoVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(directory, that.directory)) return false; - - if (!java.util.Objects.equals(repository, that.repository)) return false; - - if (!java.util.Objects.equals(revision, that.revision)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(directory, repository, revision, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (directory != null) { sb.append("directory:"); sb.append(directory + ","); } - if (repository != null) { sb.append("repository:"); sb.append(repository + ","); } - if (revision != null) { sb.append("revision:"); sb.append(revision); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceBuilder.java index 072cf3fee3..ae60a13223 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1GlusterfsPersistentVolumeSourceBuilder extends V1GlusterfsPersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1GlusterfsPersistentVolumeSourceBuilder extends V1GlusterfsPersistentVolumeSourceFluent implements VisitableBuilder{ public V1GlusterfsPersistentVolumeSourceBuilder() { - this(false); - } - public V1GlusterfsPersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1GlusterfsPersistentVolumeSource(), validationEnabled); + this(new V1GlusterfsPersistentVolumeSource()); } + public V1GlusterfsPersistentVolumeSourceBuilder(V1GlusterfsPersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1GlusterfsPersistentVolumeSourceBuilder(V1GlusterfsPersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1GlusterfsPersistentVolumeSource(), validationEnabled); + this(fluent, new V1GlusterfsPersistentVolumeSource()); } + public V1GlusterfsPersistentVolumeSourceBuilder(V1GlusterfsPersistentVolumeSourceFluent fluent,V1GlusterfsPersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1GlusterfsPersistentVolumeSourceBuilder(V1GlusterfsPersistentVolumeSourceFluent fluent,V1GlusterfsPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withEndpoints(instance.getEndpoints()); - fluent.withEndpointsNamespace(instance.getEndpointsNamespace()); - fluent.withPath(instance.getPath()); - fluent.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1GlusterfsPersistentVolumeSourceBuilder(V1GlusterfsPersistentVolumeSource instance) { - this(instance,false); - } - public V1GlusterfsPersistentVolumeSourceBuilder(V1GlusterfsPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withEndpoints(instance.getEndpoints()); - this.withEndpointsNamespace(instance.getEndpointsNamespace()); - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1GlusterfsPersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1GlusterfsPersistentVolumeSource build() { V1GlusterfsPersistentVolumeSource buildable = new V1GlusterfsPersistentVolumeSource(); buildable.setEndpoints(fluent.getEndpoints()); @@ -52,4 +30,5 @@ public V1GlusterfsPersistentVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceFluent.java index ba54a11677..d97318b0e7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceFluent.java @@ -1,26 +1,119 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1GlusterfsPersistentVolumeSourceFluent> extends Fluent{ - public String getEndpoints(); - public A withEndpoints(String endpoints); - public Boolean hasEndpoints(); - public String getEndpointsNamespace(); - public A withEndpointsNamespace(String endpointsNamespace); - public Boolean hasEndpointsNamespace(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1GlusterfsPersistentVolumeSourceFluent> extends BaseFluent{ + public V1GlusterfsPersistentVolumeSourceFluent() { + } + public V1GlusterfsPersistentVolumeSourceFluent(V1GlusterfsPersistentVolumeSource instance) { + this.copyInstance(instance); + } + private String endpoints; + private String endpointsNamespace; + private String path; + private Boolean readOnly; + + protected void copyInstance(V1GlusterfsPersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1GlusterfsPersistentVolumeSource()); + if (instance != null) { + this.withEndpoints(instance.getEndpoints()); + this.withEndpointsNamespace(instance.getEndpointsNamespace()); + this.withPath(instance.getPath()); + this.withReadOnly(instance.getReadOnly()); + } + } + + public String getEndpoints() { + return this.endpoints; + } + + public A withEndpoints(String endpoints) { + this.endpoints = endpoints; + return (A) this; + } + + public boolean hasEndpoints() { + return this.endpoints != null; + } + + public String getEndpointsNamespace() { + return this.endpointsNamespace; + } + + public A withEndpointsNamespace(String endpointsNamespace) { + this.endpointsNamespace = endpointsNamespace; + return (A) this; + } + + public boolean hasEndpointsNamespace() { + return this.endpointsNamespace != null; + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1GlusterfsPersistentVolumeSourceFluent that = (V1GlusterfsPersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(endpoints, that.endpoints)) return false; + if (!java.util.Objects.equals(endpointsNamespace, that.endpointsNamespace)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(endpoints, endpointsNamespace, path, readOnly, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (endpoints != null) { sb.append("endpoints:"); sb.append(endpoints + ","); } + if (endpointsNamespace != null) { sb.append("endpointsNamespace:"); sb.append(endpointsNamespace + ","); } + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceFluentImpl.java deleted file mode 100644 index 4d726339c9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsPersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1GlusterfsPersistentVolumeSourceFluentImpl> extends BaseFluent implements V1GlusterfsPersistentVolumeSourceFluent{ - public V1GlusterfsPersistentVolumeSourceFluentImpl() { - } - public V1GlusterfsPersistentVolumeSourceFluentImpl(V1GlusterfsPersistentVolumeSource instance) { - if (instance != null) { - this.withEndpoints(instance.getEndpoints()); - this.withEndpointsNamespace(instance.getEndpointsNamespace()); - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - } - } - private String endpoints; - private String endpointsNamespace; - private String path; - private Boolean readOnly; - public String getEndpoints() { - return this.endpoints; - } - public A withEndpoints(String endpoints) { - this.endpoints=endpoints; return (A) this; - } - public Boolean hasEndpoints() { - return this.endpoints != null; - } - public String getEndpointsNamespace() { - return this.endpointsNamespace; - } - public A withEndpointsNamespace(String endpointsNamespace) { - this.endpointsNamespace=endpointsNamespace; return (A) this; - } - public Boolean hasEndpointsNamespace() { - return this.endpointsNamespace != null; - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1GlusterfsPersistentVolumeSourceFluentImpl that = (V1GlusterfsPersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(endpoints, that.endpoints)) return false; - - if (!java.util.Objects.equals(endpointsNamespace, that.endpointsNamespace)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(endpoints, endpointsNamespace, path, readOnly, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (endpoints != null) { sb.append("endpoints:"); sb.append(endpoints + ","); } - if (endpointsNamespace != null) { sb.append("endpointsNamespace:"); sb.append(endpointsNamespace + ","); } - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceBuilder.java index a86084e44f..178425ec3a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1GlusterfsVolumeSourceBuilder extends V1GlusterfsVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1GlusterfsVolumeSourceBuilder extends V1GlusterfsVolumeSourceFluent implements VisitableBuilder{ public V1GlusterfsVolumeSourceBuilder() { - this(false); - } - public V1GlusterfsVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1GlusterfsVolumeSource(), validationEnabled); + this(new V1GlusterfsVolumeSource()); } + public V1GlusterfsVolumeSourceBuilder(V1GlusterfsVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1GlusterfsVolumeSourceBuilder(V1GlusterfsVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1GlusterfsVolumeSource(), validationEnabled); + this(fluent, new V1GlusterfsVolumeSource()); } + public V1GlusterfsVolumeSourceBuilder(V1GlusterfsVolumeSourceFluent fluent,V1GlusterfsVolumeSource instance) { - this(fluent, instance, false); - } - public V1GlusterfsVolumeSourceBuilder(V1GlusterfsVolumeSourceFluent fluent,V1GlusterfsVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withEndpoints(instance.getEndpoints()); - fluent.withPath(instance.getPath()); - fluent.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1GlusterfsVolumeSourceBuilder(V1GlusterfsVolumeSource instance) { - this(instance,false); - } - public V1GlusterfsVolumeSourceBuilder(V1GlusterfsVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withEndpoints(instance.getEndpoints()); - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1GlusterfsVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1GlusterfsVolumeSource build() { V1GlusterfsVolumeSource buildable = new V1GlusterfsVolumeSource(); buildable.setEndpoints(fluent.getEndpoints()); @@ -49,4 +29,5 @@ public V1GlusterfsVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceFluent.java index 234c504b93..df2c98b0d0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceFluent.java @@ -1,23 +1,102 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1GlusterfsVolumeSourceFluent> extends Fluent{ - public String getEndpoints(); - public A withEndpoints(String endpoints); - public Boolean hasEndpoints(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1GlusterfsVolumeSourceFluent> extends BaseFluent{ + public V1GlusterfsVolumeSourceFluent() { + } + public V1GlusterfsVolumeSourceFluent(V1GlusterfsVolumeSource instance) { + this.copyInstance(instance); + } + private String endpoints; + private String path; + private Boolean readOnly; + + protected void copyInstance(V1GlusterfsVolumeSource instance) { + instance = (instance != null ? instance : new V1GlusterfsVolumeSource()); + if (instance != null) { + this.withEndpoints(instance.getEndpoints()); + this.withPath(instance.getPath()); + this.withReadOnly(instance.getReadOnly()); + } + } + + public String getEndpoints() { + return this.endpoints; + } + + public A withEndpoints(String endpoints) { + this.endpoints = endpoints; + return (A) this; + } + + public boolean hasEndpoints() { + return this.endpoints != null; + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1GlusterfsVolumeSourceFluent that = (V1GlusterfsVolumeSourceFluent) o; + if (!java.util.Objects.equals(endpoints, that.endpoints)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(endpoints, path, readOnly, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (endpoints != null) { sb.append("endpoints:"); sb.append(endpoints + ","); } + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceFluentImpl.java deleted file mode 100644 index 531ebfc134..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GlusterfsVolumeSourceFluentImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1GlusterfsVolumeSourceFluentImpl> extends BaseFluent implements V1GlusterfsVolumeSourceFluent{ - public V1GlusterfsVolumeSourceFluentImpl() { - } - public V1GlusterfsVolumeSourceFluentImpl(V1GlusterfsVolumeSource instance) { - if (instance != null) { - this.withEndpoints(instance.getEndpoints()); - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - } - } - private String endpoints; - private String path; - private Boolean readOnly; - public String getEndpoints() { - return this.endpoints; - } - public A withEndpoints(String endpoints) { - this.endpoints=endpoints; return (A) this; - } - public Boolean hasEndpoints() { - return this.endpoints != null; - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1GlusterfsVolumeSourceFluentImpl that = (V1GlusterfsVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(endpoints, that.endpoints)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(endpoints, path, readOnly, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (endpoints != null) { sb.append("endpoints:"); sb.append(endpoints + ","); } - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryBuilder.java index a2accc17a6..756fb64e4e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1GroupVersionForDiscoveryBuilder extends V1GroupVersionForDiscoveryFluentImpl implements VisitableBuilder{ +public class V1GroupVersionForDiscoveryBuilder extends V1GroupVersionForDiscoveryFluent implements VisitableBuilder{ public V1GroupVersionForDiscoveryBuilder() { - this(false); - } - public V1GroupVersionForDiscoveryBuilder(Boolean validationEnabled) { - this(new V1GroupVersionForDiscovery(), validationEnabled); + this(new V1GroupVersionForDiscovery()); } + public V1GroupVersionForDiscoveryBuilder(V1GroupVersionForDiscoveryFluent fluent) { - this(fluent, false); - } - public V1GroupVersionForDiscoveryBuilder(V1GroupVersionForDiscoveryFluent fluent,Boolean validationEnabled) { - this(fluent, new V1GroupVersionForDiscovery(), validationEnabled); + this(fluent, new V1GroupVersionForDiscovery()); } + public V1GroupVersionForDiscoveryBuilder(V1GroupVersionForDiscoveryFluent fluent,V1GroupVersionForDiscovery instance) { - this(fluent, instance, false); - } - public V1GroupVersionForDiscoveryBuilder(V1GroupVersionForDiscoveryFluent fluent,V1GroupVersionForDiscovery instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withGroupVersion(instance.getGroupVersion()); - fluent.withVersion(instance.getVersion()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1GroupVersionForDiscoveryBuilder(V1GroupVersionForDiscovery instance) { - this(instance,false); - } - public V1GroupVersionForDiscoveryBuilder(V1GroupVersionForDiscovery instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withGroupVersion(instance.getGroupVersion()); - this.withVersion(instance.getVersion()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1GroupVersionForDiscoveryFluent fluent; - Boolean validationEnabled; + public V1GroupVersionForDiscovery build() { V1GroupVersionForDiscovery buildable = new V1GroupVersionForDiscovery(); buildable.setGroupVersion(fluent.getGroupVersion()); @@ -46,4 +28,5 @@ public V1GroupVersionForDiscovery build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryFluent.java index 4a872aeefd..92764efea7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1GroupVersionForDiscoveryFluent> extends Fluent{ - public String getGroupVersion(); - public A withGroupVersion(String groupVersion); - public Boolean hasGroupVersion(); - public String getVersion(); - public A withVersion(String version); - public Boolean hasVersion(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1GroupVersionForDiscoveryFluent> extends BaseFluent{ + public V1GroupVersionForDiscoveryFluent() { + } + public V1GroupVersionForDiscoveryFluent(V1GroupVersionForDiscovery instance) { + this.copyInstance(instance); + } + private String groupVersion; + private String version; + + protected void copyInstance(V1GroupVersionForDiscovery instance) { + instance = (instance != null ? instance : new V1GroupVersionForDiscovery()); + if (instance != null) { + this.withGroupVersion(instance.getGroupVersion()); + this.withVersion(instance.getVersion()); + } + } + + public String getGroupVersion() { + return this.groupVersion; + } + + public A withGroupVersion(String groupVersion) { + this.groupVersion = groupVersion; + return (A) this; + } + + public boolean hasGroupVersion() { + return this.groupVersion != null; + } + + public String getVersion() { + return this.version; + } + + public A withVersion(String version) { + this.version = version; + return (A) this; + } + + public boolean hasVersion() { + return this.version != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1GroupVersionForDiscoveryFluent that = (V1GroupVersionForDiscoveryFluent) o; + if (!java.util.Objects.equals(groupVersion, that.groupVersion)) return false; + if (!java.util.Objects.equals(version, that.version)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(groupVersion, version, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (groupVersion != null) { sb.append("groupVersion:"); sb.append(groupVersion + ","); } + if (version != null) { sb.append("version:"); sb.append(version); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryFluentImpl.java deleted file mode 100644 index d15097b30b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1GroupVersionForDiscoveryFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1GroupVersionForDiscoveryFluentImpl> extends BaseFluent implements V1GroupVersionForDiscoveryFluent{ - public V1GroupVersionForDiscoveryFluentImpl() { - } - public V1GroupVersionForDiscoveryFluentImpl(V1GroupVersionForDiscovery instance) { - if (instance != null) { - this.withGroupVersion(instance.getGroupVersion()); - this.withVersion(instance.getVersion()); - } - } - private String groupVersion; - private String version; - public String getGroupVersion() { - return this.groupVersion; - } - public A withGroupVersion(String groupVersion) { - this.groupVersion=groupVersion; return (A) this; - } - public Boolean hasGroupVersion() { - return this.groupVersion != null; - } - public String getVersion() { - return this.version; - } - public A withVersion(String version) { - this.version=version; return (A) this; - } - public Boolean hasVersion() { - return this.version != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1GroupVersionForDiscoveryFluentImpl that = (V1GroupVersionForDiscoveryFluentImpl) o; - if (!java.util.Objects.equals(groupVersion, that.groupVersion)) return false; - - if (!java.util.Objects.equals(version, that.version)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(groupVersion, version, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (groupVersion != null) { sb.append("groupVersion:"); sb.append(groupVersion + ","); } - if (version != null) { sb.append("version:"); sb.append(version); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionBuilder.java index f8f05f91db..1482810317 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HTTPGetActionBuilder extends V1HTTPGetActionFluentImpl implements VisitableBuilder{ +public class V1HTTPGetActionBuilder extends V1HTTPGetActionFluent implements VisitableBuilder{ public V1HTTPGetActionBuilder() { - this(false); - } - public V1HTTPGetActionBuilder(Boolean validationEnabled) { - this(new V1HTTPGetAction(), validationEnabled); + this(new V1HTTPGetAction()); } + public V1HTTPGetActionBuilder(V1HTTPGetActionFluent fluent) { - this(fluent, false); - } - public V1HTTPGetActionBuilder(V1HTTPGetActionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HTTPGetAction(), validationEnabled); + this(fluent, new V1HTTPGetAction()); } + public V1HTTPGetActionBuilder(V1HTTPGetActionFluent fluent,V1HTTPGetAction instance) { - this(fluent, instance, false); - } - public V1HTTPGetActionBuilder(V1HTTPGetActionFluent fluent,V1HTTPGetAction instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHost(instance.getHost()); - fluent.withHttpHeaders(instance.getHttpHeaders()); - fluent.withPath(instance.getPath()); - fluent.withPort(instance.getPort()); - fluent.withScheme(instance.getScheme()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HTTPGetActionBuilder(V1HTTPGetAction instance) { - this(instance,false); - } - public V1HTTPGetActionBuilder(V1HTTPGetAction instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHost(instance.getHost()); - this.withHttpHeaders(instance.getHttpHeaders()); - this.withPath(instance.getPath()); - this.withPort(instance.getPort()); - this.withScheme(instance.getScheme()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HTTPGetActionFluent fluent; - Boolean validationEnabled; + public V1HTTPGetAction build() { V1HTTPGetAction buildable = new V1HTTPGetAction(); buildable.setHost(fluent.getHost()); - buildable.setHttpHeaders(fluent.getHttpHeaders()); + buildable.setHttpHeaders(fluent.buildHttpHeaders()); buildable.setPath(fluent.getPath()); buildable.setPort(fluent.getPort()); buildable.setScheme(fluent.getScheme()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionFluent.java index d99d18482d..f14cf4d554 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionFluent.java @@ -2,70 +2,301 @@ import io.kubernetes.client.fluent.VisitableBuilder; import io.kubernetes.client.custom.IntOrString; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1HTTPGetActionFluent> extends Fluent{ - public String getHost(); - public A withHost(String host); - public Boolean hasHost(); - public A addToHttpHeaders(int index,V1HTTPHeader item); - public A setToHttpHeaders(int index,V1HTTPHeader item); - public A addToHttpHeaders(io.kubernetes.client.openapi.models.V1HTTPHeader... items); - public A addAllToHttpHeaders(Collection items); - public A removeFromHttpHeaders(io.kubernetes.client.openapi.models.V1HTTPHeader... items); - public A removeAllFromHttpHeaders(Collection items); - public A removeMatchingFromHttpHeaders(Predicate predicate); - - /** - * This method has been deprecated, please use method buildHttpHeaders instead. - * @return The buildable object. - */ - @Deprecated - public List getHttpHeaders(); - public List buildHttpHeaders(); - public V1HTTPHeader buildHttpHeader(int index); - public V1HTTPHeader buildFirstHttpHeader(); - public V1HTTPHeader buildLastHttpHeader(); - public V1HTTPHeader buildMatchingHttpHeader(Predicate predicate); - public Boolean hasMatchingHttpHeader(Predicate predicate); - public A withHttpHeaders(List httpHeaders); - public A withHttpHeaders(io.kubernetes.client.openapi.models.V1HTTPHeader... httpHeaders); - public Boolean hasHttpHeaders(); - public V1HTTPGetActionFluent.HttpHeadersNested addNewHttpHeader(); - public V1HTTPGetActionFluent.HttpHeadersNested addNewHttpHeaderLike(V1HTTPHeader item); - public V1HTTPGetActionFluent.HttpHeadersNested setNewHttpHeaderLike(int index,V1HTTPHeader item); - public V1HTTPGetActionFluent.HttpHeadersNested editHttpHeader(int index); - public V1HTTPGetActionFluent.HttpHeadersNested editFirstHttpHeader(); - public V1HTTPGetActionFluent.HttpHeadersNested editLastHttpHeader(); - public V1HTTPGetActionFluent.HttpHeadersNested editMatchingHttpHeader(Predicate predicate); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public IntOrString getPort(); - public A withPort(IntOrString port); - public Boolean hasPort(); - public A withNewPort(int value); - public A withNewPort(String value); - public String getScheme(); - public A withScheme(String scheme); - public Boolean hasScheme(); - public interface HttpHeadersNested extends Nested,V1HTTPHeaderFluent>{ - public N and(); - public N endHttpHeader(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HTTPGetActionFluent> extends BaseFluent{ + public V1HTTPGetActionFluent() { + } + + public V1HTTPGetActionFluent(V1HTTPGetAction instance) { + this.copyInstance(instance); + } + private String host; + private ArrayList httpHeaders; + private String path; + private IntOrString port; + private String scheme; + + protected void copyInstance(V1HTTPGetAction instance) { + instance = (instance != null ? instance : new V1HTTPGetAction()); + if (instance != null) { + this.withHost(instance.getHost()); + this.withHttpHeaders(instance.getHttpHeaders()); + this.withPath(instance.getPath()); + this.withPort(instance.getPort()); + this.withScheme(instance.getScheme()); + } + } + + public String getHost() { + return this.host; + } + + public A withHost(String host) { + this.host = host; + return (A) this; + } + + public boolean hasHost() { + return this.host != null; + } + + public A addToHttpHeaders(int index,V1HTTPHeader item) { + if (this.httpHeaders == null) {this.httpHeaders = new ArrayList();} + V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item); + if (index < 0 || index >= httpHeaders.size()) { _visitables.get("httpHeaders").add(builder); httpHeaders.add(builder); } else { _visitables.get("httpHeaders").add(index, builder); httpHeaders.add(index, builder);} + return (A)this; + } + + public A setToHttpHeaders(int index,V1HTTPHeader item) { + if (this.httpHeaders == null) {this.httpHeaders = new ArrayList();} + V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item); + if (index < 0 || index >= httpHeaders.size()) { _visitables.get("httpHeaders").add(builder); httpHeaders.add(builder); } else { _visitables.get("httpHeaders").set(index, builder); httpHeaders.set(index, builder);} + return (A)this; + } + + public A addToHttpHeaders(io.kubernetes.client.openapi.models.V1HTTPHeader... items) { + if (this.httpHeaders == null) {this.httpHeaders = new ArrayList();} + for (V1HTTPHeader item : items) {V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item);_visitables.get("httpHeaders").add(builder);this.httpHeaders.add(builder);} return (A)this; + } + + public A addAllToHttpHeaders(Collection items) { + if (this.httpHeaders == null) {this.httpHeaders = new ArrayList();} + for (V1HTTPHeader item : items) {V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item);_visitables.get("httpHeaders").add(builder);this.httpHeaders.add(builder);} return (A)this; + } + + public A removeFromHttpHeaders(io.kubernetes.client.openapi.models.V1HTTPHeader... items) { + if (this.httpHeaders == null) return (A)this; + for (V1HTTPHeader item : items) {V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item);_visitables.get("httpHeaders").remove(builder); this.httpHeaders.remove(builder);} return (A)this; + } + + public A removeAllFromHttpHeaders(Collection items) { + if (this.httpHeaders == null) return (A)this; + for (V1HTTPHeader item : items) {V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item);_visitables.get("httpHeaders").remove(builder); this.httpHeaders.remove(builder);} return (A)this; + } + + public A removeMatchingFromHttpHeaders(Predicate predicate) { + if (httpHeaders == null) return (A) this; + final Iterator each = httpHeaders.iterator(); + final List visitables = _visitables.get("httpHeaders"); + while (each.hasNext()) { + V1HTTPHeaderBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildHttpHeaders() { + return this.httpHeaders != null ? build(httpHeaders) : null; + } + + public V1HTTPHeader buildHttpHeader(int index) { + return this.httpHeaders.get(index).build(); + } + + public V1HTTPHeader buildFirstHttpHeader() { + return this.httpHeaders.get(0).build(); + } + + public V1HTTPHeader buildLastHttpHeader() { + return this.httpHeaders.get(httpHeaders.size() - 1).build(); + } + + public V1HTTPHeader buildMatchingHttpHeader(Predicate predicate) { + for (V1HTTPHeaderBuilder item : httpHeaders) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingHttpHeader(Predicate predicate) { + for (V1HTTPHeaderBuilder item : httpHeaders) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withHttpHeaders(List httpHeaders) { + if (this.httpHeaders != null) { + this._visitables.get("httpHeaders").clear(); + } + if (httpHeaders != null) { + this.httpHeaders = new ArrayList(); + for (V1HTTPHeader item : httpHeaders) { + this.addToHttpHeaders(item); + } + } else { + this.httpHeaders = null; + } + return (A) this; + } + + public A withHttpHeaders(io.kubernetes.client.openapi.models.V1HTTPHeader... httpHeaders) { + if (this.httpHeaders != null) { + this.httpHeaders.clear(); + _visitables.remove("httpHeaders"); + } + if (httpHeaders != null) { + for (V1HTTPHeader item : httpHeaders) { + this.addToHttpHeaders(item); + } + } + return (A) this; + } + + public boolean hasHttpHeaders() { + return this.httpHeaders != null && !this.httpHeaders.isEmpty(); + } + + public HttpHeadersNested addNewHttpHeader() { + return new HttpHeadersNested(-1, null); } + public HttpHeadersNested addNewHttpHeaderLike(V1HTTPHeader item) { + return new HttpHeadersNested(-1, item); + } + + public HttpHeadersNested setNewHttpHeaderLike(int index,V1HTTPHeader item) { + return new HttpHeadersNested(index, item); + } + + public HttpHeadersNested editHttpHeader(int index) { + if (httpHeaders.size() <= index) throw new RuntimeException("Can't edit httpHeaders. Index exceeds size."); + return setNewHttpHeaderLike(index, buildHttpHeader(index)); + } + + public HttpHeadersNested editFirstHttpHeader() { + if (httpHeaders.size() == 0) throw new RuntimeException("Can't edit first httpHeaders. The list is empty."); + return setNewHttpHeaderLike(0, buildHttpHeader(0)); + } + + public HttpHeadersNested editLastHttpHeader() { + int index = httpHeaders.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last httpHeaders. The list is empty."); + return setNewHttpHeaderLike(index, buildHttpHeader(index)); + } + + public HttpHeadersNested editMatchingHttpHeader(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1HTTPHeaderFluent> implements Nested{ + HttpHeadersNested(int index,V1HTTPHeader item) { + this.index = index; + this.builder = new V1HTTPHeaderBuilder(this, item); + } + V1HTTPHeaderBuilder builder; + int index; + + public N and() { + return (N) V1HTTPGetActionFluent.this.setToHttpHeaders(index,builder.build()); + } + + public N endHttpHeader() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionFluentImpl.java deleted file mode 100644 index 2797e48296..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPGetActionFluentImpl.java +++ /dev/null @@ -1,239 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import io.kubernetes.client.custom.IntOrString; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HTTPGetActionFluentImpl> extends BaseFluent implements V1HTTPGetActionFluent{ - public V1HTTPGetActionFluentImpl() { - } - public V1HTTPGetActionFluentImpl(V1HTTPGetAction instance) { - if (instance != null) { - this.withHost(instance.getHost()); - this.withHttpHeaders(instance.getHttpHeaders()); - this.withPath(instance.getPath()); - this.withPort(instance.getPort()); - this.withScheme(instance.getScheme()); - } - } - private String host; - private ArrayList httpHeaders; - private String path; - private IntOrString port; - private String scheme; - public String getHost() { - return this.host; - } - public A withHost(String host) { - this.host=host; return (A) this; - } - public Boolean hasHost() { - return this.host != null; - } - public A addToHttpHeaders(int index,V1HTTPHeader item) { - if (this.httpHeaders == null) {this.httpHeaders = new ArrayList();} - V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item); - if (index < 0 || index >= httpHeaders.size()) { _visitables.get("httpHeaders").add(builder); httpHeaders.add(builder); } else { _visitables.get("httpHeaders").add(index, builder); httpHeaders.add(index, builder);} - return (A)this; - } - public A setToHttpHeaders(int index,V1HTTPHeader item) { - if (this.httpHeaders == null) {this.httpHeaders = new ArrayList();} - V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item); - if (index < 0 || index >= httpHeaders.size()) { _visitables.get("httpHeaders").add(builder); httpHeaders.add(builder); } else { _visitables.get("httpHeaders").set(index, builder); httpHeaders.set(index, builder);} - return (A)this; - } - public A addToHttpHeaders(io.kubernetes.client.openapi.models.V1HTTPHeader... items) { - if (this.httpHeaders == null) {this.httpHeaders = new ArrayList();} - for (V1HTTPHeader item : items) {V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item);_visitables.get("httpHeaders").add(builder);this.httpHeaders.add(builder);} return (A)this; - } - public A addAllToHttpHeaders(Collection items) { - if (this.httpHeaders == null) {this.httpHeaders = new ArrayList();} - for (V1HTTPHeader item : items) {V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item);_visitables.get("httpHeaders").add(builder);this.httpHeaders.add(builder);} return (A)this; - } - public A removeFromHttpHeaders(io.kubernetes.client.openapi.models.V1HTTPHeader... items) { - for (V1HTTPHeader item : items) {V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item);_visitables.get("httpHeaders").remove(builder);if (this.httpHeaders != null) {this.httpHeaders.remove(builder);}} return (A)this; - } - public A removeAllFromHttpHeaders(Collection items) { - for (V1HTTPHeader item : items) {V1HTTPHeaderBuilder builder = new V1HTTPHeaderBuilder(item);_visitables.get("httpHeaders").remove(builder);if (this.httpHeaders != null) {this.httpHeaders.remove(builder);}} return (A)this; - } - public A removeMatchingFromHttpHeaders(Predicate predicate) { - if (httpHeaders == null) return (A) this; - final Iterator each = httpHeaders.iterator(); - final List visitables = _visitables.get("httpHeaders"); - while (each.hasNext()) { - V1HTTPHeaderBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildHttpHeaders instead. - * @return The buildable object. - */ - @Deprecated - public List getHttpHeaders() { - return httpHeaders != null ? build(httpHeaders) : null; - } - public List buildHttpHeaders() { - return httpHeaders != null ? build(httpHeaders) : null; - } - public V1HTTPHeader buildHttpHeader(int index) { - return this.httpHeaders.get(index).build(); - } - public V1HTTPHeader buildFirstHttpHeader() { - return this.httpHeaders.get(0).build(); - } - public V1HTTPHeader buildLastHttpHeader() { - return this.httpHeaders.get(httpHeaders.size() - 1).build(); - } - public V1HTTPHeader buildMatchingHttpHeader(Predicate predicate) { - for (V1HTTPHeaderBuilder item: httpHeaders) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingHttpHeader(Predicate predicate) { - for (V1HTTPHeaderBuilder item: httpHeaders) { if(predicate.test(item)){ return true;} } return false; - } - public A withHttpHeaders(List httpHeaders) { - if (this.httpHeaders != null) { _visitables.get("httpHeaders").clear();} - if (httpHeaders != null) {this.httpHeaders = new ArrayList(); for (V1HTTPHeader item : httpHeaders){this.addToHttpHeaders(item);}} else { this.httpHeaders = null;} return (A) this; - } - public A withHttpHeaders(io.kubernetes.client.openapi.models.V1HTTPHeader... httpHeaders) { - if (this.httpHeaders != null) {this.httpHeaders.clear(); _visitables.remove("httpHeaders"); } - if (httpHeaders != null) {for (V1HTTPHeader item :httpHeaders){ this.addToHttpHeaders(item);}} return (A) this; - } - public Boolean hasHttpHeaders() { - return httpHeaders != null && !httpHeaders.isEmpty(); - } - public V1HTTPGetActionFluentImpl.HttpHeadersNested addNewHttpHeader() { - return new V1HTTPGetActionFluentImpl.HttpHeadersNestedImpl(); - } - public V1HTTPGetActionFluentImpl.HttpHeadersNested addNewHttpHeaderLike(V1HTTPHeader item) { - return new V1HTTPGetActionFluentImpl.HttpHeadersNestedImpl(-1, item); - } - public V1HTTPGetActionFluentImpl.HttpHeadersNested setNewHttpHeaderLike(int index,V1HTTPHeader item) { - return new V1HTTPGetActionFluentImpl.HttpHeadersNestedImpl(index, item); - } - public V1HTTPGetActionFluentImpl.HttpHeadersNested editHttpHeader(int index) { - if (httpHeaders.size() <= index) throw new RuntimeException("Can't edit httpHeaders. Index exceeds size."); - return setNewHttpHeaderLike(index, buildHttpHeader(index)); - } - public V1HTTPGetActionFluentImpl.HttpHeadersNested editFirstHttpHeader() { - if (httpHeaders.size() == 0) throw new RuntimeException("Can't edit first httpHeaders. The list is empty."); - return setNewHttpHeaderLike(0, buildHttpHeader(0)); - } - public V1HTTPGetActionFluentImpl.HttpHeadersNested editLastHttpHeader() { - int index = httpHeaders.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last httpHeaders. The list is empty."); - return setNewHttpHeaderLike(index, buildHttpHeader(index)); - } - public V1HTTPGetActionFluentImpl.HttpHeadersNested editMatchingHttpHeader(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1HTTPHeaderFluentImpl> implements V1HTTPGetActionFluentImpl.HttpHeadersNested,Nested{ - HttpHeadersNestedImpl(int index,V1HTTPHeader item) { - this.index = index; - this.builder = new V1HTTPHeaderBuilder(this, item); - } - HttpHeadersNestedImpl() { - this.index = -1; - this.builder = new V1HTTPHeaderBuilder(this); - } - V1HTTPHeaderBuilder builder; - int index; - public N and() { - return (N) V1HTTPGetActionFluentImpl.this.setToHttpHeaders(index,builder.build()); - } - public N endHttpHeader() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderBuilder.java index 09860255f1..cb15c666f2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HTTPHeaderBuilder extends V1HTTPHeaderFluentImpl implements VisitableBuilder{ +public class V1HTTPHeaderBuilder extends V1HTTPHeaderFluent implements VisitableBuilder{ public V1HTTPHeaderBuilder() { - this(false); - } - public V1HTTPHeaderBuilder(Boolean validationEnabled) { - this(new V1HTTPHeader(), validationEnabled); + this(new V1HTTPHeader()); } + public V1HTTPHeaderBuilder(V1HTTPHeaderFluent fluent) { - this(fluent, false); - } - public V1HTTPHeaderBuilder(V1HTTPHeaderFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HTTPHeader(), validationEnabled); + this(fluent, new V1HTTPHeader()); } + public V1HTTPHeaderBuilder(V1HTTPHeaderFluent fluent,V1HTTPHeader instance) { - this(fluent, instance, false); - } - public V1HTTPHeaderBuilder(V1HTTPHeaderFluent fluent,V1HTTPHeader instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HTTPHeaderBuilder(V1HTTPHeader instance) { - this(instance,false); - } - public V1HTTPHeaderBuilder(V1HTTPHeader instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HTTPHeaderFluent fluent; - Boolean validationEnabled; + public V1HTTPHeader build() { V1HTTPHeader buildable = new V1HTTPHeader(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1HTTPHeader build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderFluent.java index 75585f33bc..ece4369a57 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1HTTPHeaderFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getValue(); - public A withValue(String value); - public Boolean hasValue(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HTTPHeaderFluent> extends BaseFluent{ + public V1HTTPHeaderFluent() { + } + public V1HTTPHeaderFluent(V1HTTPHeader instance) { + this.copyInstance(instance); + } + private String name; + private String value; + + protected void copyInstance(V1HTTPHeader instance) { + instance = (instance != null ? instance : new V1HTTPHeader()); + if (instance != null) { + this.withName(instance.getName()); + this.withValue(instance.getValue()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getValue() { + return this.value; + } + + public A withValue(String value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1HTTPHeaderFluent that = (V1HTTPHeaderFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, value, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (value != null) { sb.append("value:"); sb.append(value); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderFluentImpl.java deleted file mode 100644 index a23023981e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPHeaderFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HTTPHeaderFluentImpl> extends BaseFluent implements V1HTTPHeaderFluent{ - public V1HTTPHeaderFluentImpl() { - } - public V1HTTPHeaderFluentImpl(V1HTTPHeader instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withValue(instance.getValue()); - } - } - private String name; - private String value; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getValue() { - return this.value; - } - public A withValue(String value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1HTTPHeaderFluentImpl that = (V1HTTPHeaderFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, value, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (value != null) { sb.append("value:"); sb.append(value); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathBuilder.java index 5754d3c7fe..e95e44bc1a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HTTPIngressPathBuilder extends V1HTTPIngressPathFluentImpl implements VisitableBuilder{ +public class V1HTTPIngressPathBuilder extends V1HTTPIngressPathFluent implements VisitableBuilder{ public V1HTTPIngressPathBuilder() { - this(false); - } - public V1HTTPIngressPathBuilder(Boolean validationEnabled) { - this(new V1HTTPIngressPath(), validationEnabled); + this(new V1HTTPIngressPath()); } + public V1HTTPIngressPathBuilder(V1HTTPIngressPathFluent fluent) { - this(fluent, false); - } - public V1HTTPIngressPathBuilder(V1HTTPIngressPathFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HTTPIngressPath(), validationEnabled); + this(fluent, new V1HTTPIngressPath()); } + public V1HTTPIngressPathBuilder(V1HTTPIngressPathFluent fluent,V1HTTPIngressPath instance) { - this(fluent, instance, false); - } - public V1HTTPIngressPathBuilder(V1HTTPIngressPathFluent fluent,V1HTTPIngressPath instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withBackend(instance.getBackend()); - fluent.withPath(instance.getPath()); - fluent.withPathType(instance.getPathType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HTTPIngressPathBuilder(V1HTTPIngressPath instance) { - this(instance,false); - } - public V1HTTPIngressPathBuilder(V1HTTPIngressPath instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withBackend(instance.getBackend()); - this.withPath(instance.getPath()); - this.withPathType(instance.getPathType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HTTPIngressPathFluent fluent; - Boolean validationEnabled; + public V1HTTPIngressPath build() { V1HTTPIngressPath buildable = new V1HTTPIngressPath(); - buildable.setBackend(fluent.getBackend()); + buildable.setBackend(fluent.buildBackend()); buildable.setPath(fluent.getPath()); buildable.setPathType(fluent.getPathType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathFluent.java index a09a7d141e..d68ef251b1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathFluent.java @@ -1,41 +1,140 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1HTTPIngressPathFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildBackend instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressBackend getBackend(); - public V1IngressBackend buildBackend(); - public A withBackend(V1IngressBackend backend); - public Boolean hasBackend(); - public V1HTTPIngressPathFluent.BackendNested withNewBackend(); - public V1HTTPIngressPathFluent.BackendNested withNewBackendLike(V1IngressBackend item); - public V1HTTPIngressPathFluent.BackendNested editBackend(); - public V1HTTPIngressPathFluent.BackendNested editOrNewBackend(); - public V1HTTPIngressPathFluent.BackendNested editOrNewBackendLike(V1IngressBackend item); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public String getPathType(); - public A withPathType(String pathType); - public Boolean hasPathType(); - public interface BackendNested extends Nested,V1IngressBackendFluent>{ - public N and(); - public N endBackend(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HTTPIngressPathFluent> extends BaseFluent{ + public V1HTTPIngressPathFluent() { + } + + public V1HTTPIngressPathFluent(V1HTTPIngressPath instance) { + this.copyInstance(instance); + } + private V1IngressBackendBuilder backend; + private String path; + private String pathType; + + protected void copyInstance(V1HTTPIngressPath instance) { + instance = (instance != null ? instance : new V1HTTPIngressPath()); + if (instance != null) { + this.withBackend(instance.getBackend()); + this.withPath(instance.getPath()); + this.withPathType(instance.getPathType()); + } + } + + public V1IngressBackend buildBackend() { + return this.backend != null ? this.backend.build() : null; + } + + public A withBackend(V1IngressBackend backend) { + this._visitables.remove("backend"); + if (backend != null) { + this.backend = new V1IngressBackendBuilder(backend); + this._visitables.get("backend").add(this.backend); + } else { + this.backend = null; + this._visitables.get("backend").remove(this.backend); + } + return (A) this; + } + + public boolean hasBackend() { + return this.backend != null; + } + + public BackendNested withNewBackend() { + return new BackendNested(null); + } + + public BackendNested withNewBackendLike(V1IngressBackend item) { + return new BackendNested(item); + } + + public BackendNested editBackend() { + return withNewBackendLike(java.util.Optional.ofNullable(buildBackend()).orElse(null)); + } + + public BackendNested editOrNewBackend() { + return withNewBackendLike(java.util.Optional.ofNullable(buildBackend()).orElse(new V1IngressBackendBuilder().build())); + } + + public BackendNested editOrNewBackendLike(V1IngressBackend item) { + return withNewBackendLike(java.util.Optional.ofNullable(buildBackend()).orElse(item)); + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public String getPathType() { + return this.pathType; + } + + public A withPathType(String pathType) { + this.pathType = pathType; + return (A) this; + } + + public boolean hasPathType() { + return this.pathType != null; } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1HTTPIngressPathFluent that = (V1HTTPIngressPathFluent) o; + if (!java.util.Objects.equals(backend, that.backend)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(pathType, that.pathType)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(backend, path, pathType, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (backend != null) { sb.append("backend:"); sb.append(backend + ","); } + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (pathType != null) { sb.append("pathType:"); sb.append(pathType); } + sb.append("}"); + return sb.toString(); + } + public class BackendNested extends V1IngressBackendFluent> implements Nested{ + BackendNested(V1IngressBackend item) { + this.builder = new V1IngressBackendBuilder(this, item); + } + V1IngressBackendBuilder builder; + + public N and() { + return (N) V1HTTPIngressPathFluent.this.withBackend(builder.build()); + } + + public N endBackend() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathFluentImpl.java deleted file mode 100644 index 924d81a818..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressPathFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HTTPIngressPathFluentImpl> extends BaseFluent implements V1HTTPIngressPathFluent{ - public V1HTTPIngressPathFluentImpl() { - } - public V1HTTPIngressPathFluentImpl(V1HTTPIngressPath instance) { - if (instance != null) { - this.withBackend(instance.getBackend()); - this.withPath(instance.getPath()); - this.withPathType(instance.getPathType()); - } - } - private V1IngressBackendBuilder backend; - private String path; - private String pathType; - - /** - * This method has been deprecated, please use method buildBackend instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressBackend getBackend() { - return this.backend!=null ?this.backend.build():null; - } - public V1IngressBackend buildBackend() { - return this.backend!=null ?this.backend.build():null; - } - public A withBackend(V1IngressBackend backend) { - _visitables.get("backend").remove(this.backend); - if (backend!=null){ this.backend= new V1IngressBackendBuilder(backend); _visitables.get("backend").add(this.backend);} else { this.backend = null; _visitables.get("backend").remove(this.backend); } return (A) this; - } - public Boolean hasBackend() { - return this.backend != null; - } - public V1HTTPIngressPathFluentImpl.BackendNested withNewBackend() { - return new V1HTTPIngressPathFluentImpl.BackendNestedImpl(); - } - public V1HTTPIngressPathFluentImpl.BackendNested withNewBackendLike(V1IngressBackend item) { - return new V1HTTPIngressPathFluentImpl.BackendNestedImpl(item); - } - public V1HTTPIngressPathFluentImpl.BackendNested editBackend() { - return withNewBackendLike(getBackend()); - } - public V1HTTPIngressPathFluentImpl.BackendNested editOrNewBackend() { - return withNewBackendLike(getBackend() != null ? getBackend(): new V1IngressBackendBuilder().build()); - } - public V1HTTPIngressPathFluentImpl.BackendNested editOrNewBackendLike(V1IngressBackend item) { - return withNewBackendLike(getBackend() != null ? getBackend(): item); - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public String getPathType() { - return this.pathType; - } - public A withPathType(String pathType) { - this.pathType=pathType; return (A) this; - } - public Boolean hasPathType() { - return this.pathType != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1HTTPIngressPathFluentImpl that = (V1HTTPIngressPathFluentImpl) o; - if (!java.util.Objects.equals(backend, that.backend)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(pathType, that.pathType)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(backend, path, pathType, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (backend != null) { sb.append("backend:"); sb.append(backend + ","); } - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (pathType != null) { sb.append("pathType:"); sb.append(pathType); } - sb.append("}"); - return sb.toString(); - } - class BackendNestedImpl extends V1IngressBackendFluentImpl> implements V1HTTPIngressPathFluentImpl.BackendNested,Nested{ - BackendNestedImpl(V1IngressBackend item) { - this.builder = new V1IngressBackendBuilder(this, item); - } - BackendNestedImpl() { - this.builder = new V1IngressBackendBuilder(this); - } - V1IngressBackendBuilder builder; - public N and() { - return (N) V1HTTPIngressPathFluentImpl.this.withBackend(builder.build()); - } - public N endBackend() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueBuilder.java index a7f36534df..a8e62da77a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HTTPIngressRuleValueBuilder extends V1HTTPIngressRuleValueFluentImpl implements VisitableBuilder{ +public class V1HTTPIngressRuleValueBuilder extends V1HTTPIngressRuleValueFluent implements VisitableBuilder{ public V1HTTPIngressRuleValueBuilder() { - this(false); - } - public V1HTTPIngressRuleValueBuilder(Boolean validationEnabled) { - this(new V1HTTPIngressRuleValue(), validationEnabled); + this(new V1HTTPIngressRuleValue()); } + public V1HTTPIngressRuleValueBuilder(V1HTTPIngressRuleValueFluent fluent) { - this(fluent, false); - } - public V1HTTPIngressRuleValueBuilder(V1HTTPIngressRuleValueFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HTTPIngressRuleValue(), validationEnabled); + this(fluent, new V1HTTPIngressRuleValue()); } + public V1HTTPIngressRuleValueBuilder(V1HTTPIngressRuleValueFluent fluent,V1HTTPIngressRuleValue instance) { - this(fluent, instance, false); - } - public V1HTTPIngressRuleValueBuilder(V1HTTPIngressRuleValueFluent fluent,V1HTTPIngressRuleValue instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPaths(instance.getPaths()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HTTPIngressRuleValueBuilder(V1HTTPIngressRuleValue instance) { - this(instance,false); - } - public V1HTTPIngressRuleValueBuilder(V1HTTPIngressRuleValue instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPaths(instance.getPaths()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HTTPIngressRuleValueFluent fluent; - Boolean validationEnabled; + public V1HTTPIngressRuleValue build() { V1HTTPIngressRuleValue buildable = new V1HTTPIngressRuleValue(); - buildable.setPaths(fluent.getPaths()); + buildable.setPaths(fluent.buildPaths()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueFluent.java index c542b92200..f5cc4e30a9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1HTTPIngressRuleValueFluent> extends Fluent{ - public A addToPaths(int index,V1HTTPIngressPath item); - public A setToPaths(int index,V1HTTPIngressPath item); - public A addToPaths(io.kubernetes.client.openapi.models.V1HTTPIngressPath... items); - public A addAllToPaths(Collection items); - public A removeFromPaths(io.kubernetes.client.openapi.models.V1HTTPIngressPath... items); - public A removeAllFromPaths(Collection items); - public A removeMatchingFromPaths(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPaths instead. - * @return The buildable object. - */ - @Deprecated - public List getPaths(); - public List buildPaths(); - public V1HTTPIngressPath buildPath(int index); - public V1HTTPIngressPath buildFirstPath(); - public V1HTTPIngressPath buildLastPath(); - public V1HTTPIngressPath buildMatchingPath(Predicate predicate); - public Boolean hasMatchingPath(Predicate predicate); - public A withPaths(List paths); - public A withPaths(io.kubernetes.client.openapi.models.V1HTTPIngressPath... paths); - public Boolean hasPaths(); - public V1HTTPIngressRuleValueFluent.PathsNested addNewPath(); - public V1HTTPIngressRuleValueFluent.PathsNested addNewPathLike(V1HTTPIngressPath item); - public V1HTTPIngressRuleValueFluent.PathsNested setNewPathLike(int index,V1HTTPIngressPath item); - public V1HTTPIngressRuleValueFluent.PathsNested editPath(int index); - public V1HTTPIngressRuleValueFluent.PathsNested editFirstPath(); - public V1HTTPIngressRuleValueFluent.PathsNested editLastPath(); - public V1HTTPIngressRuleValueFluent.PathsNested editMatchingPath(Predicate predicate); - public interface PathsNested extends Nested,V1HTTPIngressPathFluent>{ - public N and(); - public N endPath(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HTTPIngressRuleValueFluent> extends BaseFluent{ + public V1HTTPIngressRuleValueFluent() { + } + + public V1HTTPIngressRuleValueFluent(V1HTTPIngressRuleValue instance) { + this.copyInstance(instance); + } + private ArrayList paths; + + protected void copyInstance(V1HTTPIngressRuleValue instance) { + instance = (instance != null ? instance : new V1HTTPIngressRuleValue()); + if (instance != null) { + this.withPaths(instance.getPaths()); + } + } + + public A addToPaths(int index,V1HTTPIngressPath item) { + if (this.paths == null) {this.paths = new ArrayList();} + V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item); + if (index < 0 || index >= paths.size()) { _visitables.get("paths").add(builder); paths.add(builder); } else { _visitables.get("paths").add(index, builder); paths.add(index, builder);} + return (A)this; + } + + public A setToPaths(int index,V1HTTPIngressPath item) { + if (this.paths == null) {this.paths = new ArrayList();} + V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item); + if (index < 0 || index >= paths.size()) { _visitables.get("paths").add(builder); paths.add(builder); } else { _visitables.get("paths").set(index, builder); paths.set(index, builder);} + return (A)this; + } + + public A addToPaths(io.kubernetes.client.openapi.models.V1HTTPIngressPath... items) { + if (this.paths == null) {this.paths = new ArrayList();} + for (V1HTTPIngressPath item : items) {V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item);_visitables.get("paths").add(builder);this.paths.add(builder);} return (A)this; + } + + public A addAllToPaths(Collection items) { + if (this.paths == null) {this.paths = new ArrayList();} + for (V1HTTPIngressPath item : items) {V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item);_visitables.get("paths").add(builder);this.paths.add(builder);} return (A)this; + } + + public A removeFromPaths(io.kubernetes.client.openapi.models.V1HTTPIngressPath... items) { + if (this.paths == null) return (A)this; + for (V1HTTPIngressPath item : items) {V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item);_visitables.get("paths").remove(builder); this.paths.remove(builder);} return (A)this; + } + + public A removeAllFromPaths(Collection items) { + if (this.paths == null) return (A)this; + for (V1HTTPIngressPath item : items) {V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item);_visitables.get("paths").remove(builder); this.paths.remove(builder);} return (A)this; + } + + public A removeMatchingFromPaths(Predicate predicate) { + if (paths == null) return (A) this; + final Iterator each = paths.iterator(); + final List visitables = _visitables.get("paths"); + while (each.hasNext()) { + V1HTTPIngressPathBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPaths() { + return this.paths != null ? build(paths) : null; + } + + public V1HTTPIngressPath buildPath(int index) { + return this.paths.get(index).build(); + } + + public V1HTTPIngressPath buildFirstPath() { + return this.paths.get(0).build(); + } + + public V1HTTPIngressPath buildLastPath() { + return this.paths.get(paths.size() - 1).build(); + } + + public V1HTTPIngressPath buildMatchingPath(Predicate predicate) { + for (V1HTTPIngressPathBuilder item : paths) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPath(Predicate predicate) { + for (V1HTTPIngressPathBuilder item : paths) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withPaths(List paths) { + if (this.paths != null) { + this._visitables.get("paths").clear(); + } + if (paths != null) { + this.paths = new ArrayList(); + for (V1HTTPIngressPath item : paths) { + this.addToPaths(item); + } + } else { + this.paths = null; + } + return (A) this; + } + + public A withPaths(io.kubernetes.client.openapi.models.V1HTTPIngressPath... paths) { + if (this.paths != null) { + this.paths.clear(); + _visitables.remove("paths"); + } + if (paths != null) { + for (V1HTTPIngressPath item : paths) { + this.addToPaths(item); + } + } + return (A) this; + } + + public boolean hasPaths() { + return this.paths != null && !this.paths.isEmpty(); + } + + public PathsNested addNewPath() { + return new PathsNested(-1, null); + } + + public PathsNested addNewPathLike(V1HTTPIngressPath item) { + return new PathsNested(-1, item); + } + + public PathsNested setNewPathLike(int index,V1HTTPIngressPath item) { + return new PathsNested(index, item); + } + + public PathsNested editPath(int index) { + if (paths.size() <= index) throw new RuntimeException("Can't edit paths. Index exceeds size."); + return setNewPathLike(index, buildPath(index)); + } + + public PathsNested editFirstPath() { + if (paths.size() == 0) throw new RuntimeException("Can't edit first paths. The list is empty."); + return setNewPathLike(0, buildPath(0)); + } + + public PathsNested editLastPath() { + int index = paths.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last paths. The list is empty."); + return setNewPathLike(index, buildPath(index)); + } + + public PathsNested editMatchingPath(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1HTTPIngressPathFluent> implements Nested{ + PathsNested(int index,V1HTTPIngressPath item) { + this.index = index; + this.builder = new V1HTTPIngressPathBuilder(this, item); + } + V1HTTPIngressPathBuilder builder; + int index; + + public N and() { + return (N) V1HTTPIngressRuleValueFluent.this.setToPaths(index,builder.build()); + } + + public N endPath() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueFluentImpl.java deleted file mode 100644 index a1cf15a67d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HTTPIngressRuleValueFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HTTPIngressRuleValueFluentImpl> extends BaseFluent implements V1HTTPIngressRuleValueFluent{ - public V1HTTPIngressRuleValueFluentImpl() { - } - public V1HTTPIngressRuleValueFluentImpl(V1HTTPIngressRuleValue instance) { - if (instance != null) { - this.withPaths(instance.getPaths()); - } - } - private ArrayList paths; - public A addToPaths(int index,V1HTTPIngressPath item) { - if (this.paths == null) {this.paths = new ArrayList();} - V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item); - if (index < 0 || index >= paths.size()) { _visitables.get("paths").add(builder); paths.add(builder); } else { _visitables.get("paths").add(index, builder); paths.add(index, builder);} - return (A)this; - } - public A setToPaths(int index,V1HTTPIngressPath item) { - if (this.paths == null) {this.paths = new ArrayList();} - V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item); - if (index < 0 || index >= paths.size()) { _visitables.get("paths").add(builder); paths.add(builder); } else { _visitables.get("paths").set(index, builder); paths.set(index, builder);} - return (A)this; - } - public A addToPaths(io.kubernetes.client.openapi.models.V1HTTPIngressPath... items) { - if (this.paths == null) {this.paths = new ArrayList();} - for (V1HTTPIngressPath item : items) {V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item);_visitables.get("paths").add(builder);this.paths.add(builder);} return (A)this; - } - public A addAllToPaths(Collection items) { - if (this.paths == null) {this.paths = new ArrayList();} - for (V1HTTPIngressPath item : items) {V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item);_visitables.get("paths").add(builder);this.paths.add(builder);} return (A)this; - } - public A removeFromPaths(io.kubernetes.client.openapi.models.V1HTTPIngressPath... items) { - for (V1HTTPIngressPath item : items) {V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item);_visitables.get("paths").remove(builder);if (this.paths != null) {this.paths.remove(builder);}} return (A)this; - } - public A removeAllFromPaths(Collection items) { - for (V1HTTPIngressPath item : items) {V1HTTPIngressPathBuilder builder = new V1HTTPIngressPathBuilder(item);_visitables.get("paths").remove(builder);if (this.paths != null) {this.paths.remove(builder);}} return (A)this; - } - public A removeMatchingFromPaths(Predicate predicate) { - if (paths == null) return (A) this; - final Iterator each = paths.iterator(); - final List visitables = _visitables.get("paths"); - while (each.hasNext()) { - V1HTTPIngressPathBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPaths instead. - * @return The buildable object. - */ - @Deprecated - public List getPaths() { - return paths != null ? build(paths) : null; - } - public List buildPaths() { - return paths != null ? build(paths) : null; - } - public V1HTTPIngressPath buildPath(int index) { - return this.paths.get(index).build(); - } - public V1HTTPIngressPath buildFirstPath() { - return this.paths.get(0).build(); - } - public V1HTTPIngressPath buildLastPath() { - return this.paths.get(paths.size() - 1).build(); - } - public V1HTTPIngressPath buildMatchingPath(Predicate predicate) { - for (V1HTTPIngressPathBuilder item: paths) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPath(Predicate predicate) { - for (V1HTTPIngressPathBuilder item: paths) { if(predicate.test(item)){ return true;} } return false; - } - public A withPaths(List paths) { - if (this.paths != null) { _visitables.get("paths").clear();} - if (paths != null) {this.paths = new ArrayList(); for (V1HTTPIngressPath item : paths){this.addToPaths(item);}} else { this.paths = null;} return (A) this; - } - public A withPaths(io.kubernetes.client.openapi.models.V1HTTPIngressPath... paths) { - if (this.paths != null) {this.paths.clear(); _visitables.remove("paths"); } - if (paths != null) {for (V1HTTPIngressPath item :paths){ this.addToPaths(item);}} return (A) this; - } - public Boolean hasPaths() { - return paths != null && !paths.isEmpty(); - } - public V1HTTPIngressRuleValueFluentImpl.PathsNested addNewPath() { - return new V1HTTPIngressRuleValueFluentImpl.PathsNestedImpl(); - } - public V1HTTPIngressRuleValueFluentImpl.PathsNested addNewPathLike(V1HTTPIngressPath item) { - return new V1HTTPIngressRuleValueFluentImpl.PathsNestedImpl(-1, item); - } - public V1HTTPIngressRuleValueFluentImpl.PathsNested setNewPathLike(int index,V1HTTPIngressPath item) { - return new V1HTTPIngressRuleValueFluentImpl.PathsNestedImpl(index, item); - } - public V1HTTPIngressRuleValueFluentImpl.PathsNested editPath(int index) { - if (paths.size() <= index) throw new RuntimeException("Can't edit paths. Index exceeds size."); - return setNewPathLike(index, buildPath(index)); - } - public V1HTTPIngressRuleValueFluentImpl.PathsNested editFirstPath() { - if (paths.size() == 0) throw new RuntimeException("Can't edit first paths. The list is empty."); - return setNewPathLike(0, buildPath(0)); - } - public V1HTTPIngressRuleValueFluentImpl.PathsNested editLastPath() { - int index = paths.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last paths. The list is empty."); - return setNewPathLike(index, buildPath(index)); - } - public V1HTTPIngressRuleValueFluentImpl.PathsNested editMatchingPath(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1HTTPIngressPathFluentImpl> implements V1HTTPIngressRuleValueFluentImpl.PathsNested,Nested{ - PathsNestedImpl(int index,V1HTTPIngressPath item) { - this.index = index; - this.builder = new V1HTTPIngressPathBuilder(this, item); - } - PathsNestedImpl() { - this.index = -1; - this.builder = new V1HTTPIngressPathBuilder(this); - } - V1HTTPIngressPathBuilder builder; - int index; - public N and() { - return (N) V1HTTPIngressRuleValueFluentImpl.this.setToPaths(index,builder.build()); - } - public N endPath() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerBuilder.java index 79f606516e..63b83168bc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HorizontalPodAutoscalerBuilder extends V1HorizontalPodAutoscalerFluentImpl implements VisitableBuilder{ +public class V1HorizontalPodAutoscalerBuilder extends V1HorizontalPodAutoscalerFluent implements VisitableBuilder{ public V1HorizontalPodAutoscalerBuilder() { - this(false); - } - public V1HorizontalPodAutoscalerBuilder(Boolean validationEnabled) { - this(new V1HorizontalPodAutoscaler(), validationEnabled); + this(new V1HorizontalPodAutoscaler()); } + public V1HorizontalPodAutoscalerBuilder(V1HorizontalPodAutoscalerFluent fluent) { - this(fluent, false); - } - public V1HorizontalPodAutoscalerBuilder(V1HorizontalPodAutoscalerFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HorizontalPodAutoscaler(), validationEnabled); + this(fluent, new V1HorizontalPodAutoscaler()); } + public V1HorizontalPodAutoscalerBuilder(V1HorizontalPodAutoscalerFluent fluent,V1HorizontalPodAutoscaler instance) { - this(fluent, instance, false); - } - public V1HorizontalPodAutoscalerBuilder(V1HorizontalPodAutoscalerFluent fluent,V1HorizontalPodAutoscaler instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HorizontalPodAutoscalerBuilder(V1HorizontalPodAutoscaler instance) { - this(instance,false); - } - public V1HorizontalPodAutoscalerBuilder(V1HorizontalPodAutoscaler instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HorizontalPodAutoscalerFluent fluent; - Boolean validationEnabled; + public V1HorizontalPodAutoscaler build() { V1HorizontalPodAutoscaler buildable = new V1HorizontalPodAutoscaler(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerFluent.java index cbd7bddbe5..6a9195a969 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1HorizontalPodAutoscalerFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1HorizontalPodAutoscalerFluent.MetadataNested withNewMetadata(); - public V1HorizontalPodAutoscalerFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1HorizontalPodAutoscalerFluent.MetadataNested editMetadata(); - public V1HorizontalPodAutoscalerFluent.MetadataNested editOrNewMetadata(); - public V1HorizontalPodAutoscalerFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1HorizontalPodAutoscalerSpec getSpec(); - public V1HorizontalPodAutoscalerSpec buildSpec(); - public A withSpec(V1HorizontalPodAutoscalerSpec spec); - public Boolean hasSpec(); - public V1HorizontalPodAutoscalerFluent.SpecNested withNewSpec(); - public V1HorizontalPodAutoscalerFluent.SpecNested withNewSpecLike(V1HorizontalPodAutoscalerSpec item); - public V1HorizontalPodAutoscalerFluent.SpecNested editSpec(); - public V1HorizontalPodAutoscalerFluent.SpecNested editOrNewSpec(); - public V1HorizontalPodAutoscalerFluent.SpecNested editOrNewSpecLike(V1HorizontalPodAutoscalerSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1HorizontalPodAutoscalerStatus getStatus(); - public V1HorizontalPodAutoscalerStatus buildStatus(); - public A withStatus(V1HorizontalPodAutoscalerStatus status); - public Boolean hasStatus(); - public V1HorizontalPodAutoscalerFluent.StatusNested withNewStatus(); - public V1HorizontalPodAutoscalerFluent.StatusNested withNewStatusLike(V1HorizontalPodAutoscalerStatus item); - public V1HorizontalPodAutoscalerFluent.StatusNested editStatus(); - public V1HorizontalPodAutoscalerFluent.StatusNested editOrNewStatus(); - public V1HorizontalPodAutoscalerFluent.StatusNested editOrNewStatusLike(V1HorizontalPodAutoscalerStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HorizontalPodAutoscalerFluent> extends BaseFluent{ + public V1HorizontalPodAutoscalerFluent() { + } + + public V1HorizontalPodAutoscalerFluent(V1HorizontalPodAutoscaler instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1HorizontalPodAutoscalerSpecBuilder spec; + private V1HorizontalPodAutoscalerStatusBuilder status; + + protected void copyInstance(V1HorizontalPodAutoscaler instance) { + instance = (instance != null ? instance : new V1HorizontalPodAutoscaler()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1HorizontalPodAutoscalerSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1HorizontalPodAutoscalerSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1HorizontalPodAutoscalerSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1HorizontalPodAutoscalerSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1HorizontalPodAutoscalerSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1HorizontalPodAutoscalerSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1HorizontalPodAutoscalerSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1HorizontalPodAutoscalerStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1HorizontalPodAutoscalerStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1HorizontalPodAutoscalerStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1HorizontalPodAutoscalerStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1HorizontalPodAutoscalerStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1HorizontalPodAutoscalerStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1HorizontalPodAutoscalerFluent that = (V1HorizontalPodAutoscalerFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1HorizontalPodAutoscalerFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1HorizontalPodAutoscalerStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1HorizontalPodAutoscalerSpecFluent> implements Nested{ + SpecNested(V1HorizontalPodAutoscalerSpec item) { + this.builder = new V1HorizontalPodAutoscalerSpecBuilder(this, item); + } + V1HorizontalPodAutoscalerSpecBuilder builder; + + public N and() { + return (N) V1HorizontalPodAutoscalerFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1HorizontalPodAutoscalerStatusFluent> implements Nested{ + StatusNested(V1HorizontalPodAutoscalerStatus item) { + this.builder = new V1HorizontalPodAutoscalerStatusBuilder(this, item); + } + V1HorizontalPodAutoscalerStatusBuilder builder; + + public N and() { + return (N) V1HorizontalPodAutoscalerFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerFluentImpl.java deleted file mode 100644 index 4d84e3036a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HorizontalPodAutoscalerFluentImpl> extends BaseFluent implements V1HorizontalPodAutoscalerFluent{ - public V1HorizontalPodAutoscalerFluentImpl() { - } - public V1HorizontalPodAutoscalerFluentImpl(V1HorizontalPodAutoscaler instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1HorizontalPodAutoscalerSpecBuilder spec; - private V1HorizontalPodAutoscalerStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1HorizontalPodAutoscalerFluentImpl.MetadataNested withNewMetadata() { - return new V1HorizontalPodAutoscalerFluentImpl.MetadataNestedImpl(); - } - public V1HorizontalPodAutoscalerFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1HorizontalPodAutoscalerFluentImpl.MetadataNestedImpl(item); - } - public V1HorizontalPodAutoscalerFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1HorizontalPodAutoscalerFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1HorizontalPodAutoscalerFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1HorizontalPodAutoscalerSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1HorizontalPodAutoscalerSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1HorizontalPodAutoscalerSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1HorizontalPodAutoscalerSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1HorizontalPodAutoscalerFluentImpl.SpecNested withNewSpec() { - return new V1HorizontalPodAutoscalerFluentImpl.SpecNestedImpl(); - } - public V1HorizontalPodAutoscalerFluentImpl.SpecNested withNewSpecLike(V1HorizontalPodAutoscalerSpec item) { - return new V1HorizontalPodAutoscalerFluentImpl.SpecNestedImpl(item); - } - public V1HorizontalPodAutoscalerFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1HorizontalPodAutoscalerFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1HorizontalPodAutoscalerSpecBuilder().build()); - } - public V1HorizontalPodAutoscalerFluentImpl.SpecNested editOrNewSpecLike(V1HorizontalPodAutoscalerSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1HorizontalPodAutoscalerStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1HorizontalPodAutoscalerStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1HorizontalPodAutoscalerStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1HorizontalPodAutoscalerStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1HorizontalPodAutoscalerFluentImpl.StatusNested withNewStatus() { - return new V1HorizontalPodAutoscalerFluentImpl.StatusNestedImpl(); - } - public V1HorizontalPodAutoscalerFluentImpl.StatusNested withNewStatusLike(V1HorizontalPodAutoscalerStatus item) { - return new V1HorizontalPodAutoscalerFluentImpl.StatusNestedImpl(item); - } - public V1HorizontalPodAutoscalerFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1HorizontalPodAutoscalerFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1HorizontalPodAutoscalerStatusBuilder().build()); - } - public V1HorizontalPodAutoscalerFluentImpl.StatusNested editOrNewStatusLike(V1HorizontalPodAutoscalerStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1HorizontalPodAutoscalerFluentImpl that = (V1HorizontalPodAutoscalerFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1HorizontalPodAutoscalerFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1HorizontalPodAutoscalerFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1HorizontalPodAutoscalerSpecFluentImpl> implements V1HorizontalPodAutoscalerFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1HorizontalPodAutoscalerSpec item) { - this.builder = new V1HorizontalPodAutoscalerSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1HorizontalPodAutoscalerSpecBuilder(this); - } - V1HorizontalPodAutoscalerSpecBuilder builder; - public N and() { - return (N) V1HorizontalPodAutoscalerFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1HorizontalPodAutoscalerStatusFluentImpl> implements V1HorizontalPodAutoscalerFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1HorizontalPodAutoscalerStatus item) { - this.builder = new V1HorizontalPodAutoscalerStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1HorizontalPodAutoscalerStatusBuilder(this); - } - V1HorizontalPodAutoscalerStatusBuilder builder; - public N and() { - return (N) V1HorizontalPodAutoscalerFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListBuilder.java index a8890e68e6..0fcb3ad45d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HorizontalPodAutoscalerListBuilder extends V1HorizontalPodAutoscalerListFluentImpl implements VisitableBuilder{ +public class V1HorizontalPodAutoscalerListBuilder extends V1HorizontalPodAutoscalerListFluent implements VisitableBuilder{ public V1HorizontalPodAutoscalerListBuilder() { - this(false); - } - public V1HorizontalPodAutoscalerListBuilder(Boolean validationEnabled) { - this(new V1HorizontalPodAutoscalerList(), validationEnabled); + this(new V1HorizontalPodAutoscalerList()); } + public V1HorizontalPodAutoscalerListBuilder(V1HorizontalPodAutoscalerListFluent fluent) { - this(fluent, false); - } - public V1HorizontalPodAutoscalerListBuilder(V1HorizontalPodAutoscalerListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HorizontalPodAutoscalerList(), validationEnabled); + this(fluent, new V1HorizontalPodAutoscalerList()); } + public V1HorizontalPodAutoscalerListBuilder(V1HorizontalPodAutoscalerListFluent fluent,V1HorizontalPodAutoscalerList instance) { - this(fluent, instance, false); - } - public V1HorizontalPodAutoscalerListBuilder(V1HorizontalPodAutoscalerListFluent fluent,V1HorizontalPodAutoscalerList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HorizontalPodAutoscalerListBuilder(V1HorizontalPodAutoscalerList instance) { - this(instance,false); - } - public V1HorizontalPodAutoscalerListBuilder(V1HorizontalPodAutoscalerList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HorizontalPodAutoscalerListFluent fluent; - Boolean validationEnabled; + public V1HorizontalPodAutoscalerList build() { V1HorizontalPodAutoscalerList buildable = new V1HorizontalPodAutoscalerList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListFluent.java index 7fd6ab3182..80c7d86a4e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1HorizontalPodAutoscalerListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1HorizontalPodAutoscaler item); - public A setToItems(int index,V1HorizontalPodAutoscaler item); - public A addToItems(io.kubernetes.client.openapi.models.V1HorizontalPodAutoscaler... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1HorizontalPodAutoscaler... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1HorizontalPodAutoscaler buildItem(int index); - public V1HorizontalPodAutoscaler buildFirstItem(); - public V1HorizontalPodAutoscaler buildLastItem(); - public V1HorizontalPodAutoscaler buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1HorizontalPodAutoscaler... items); - public Boolean hasItems(); - public V1HorizontalPodAutoscalerListFluent.ItemsNested addNewItem(); - public V1HorizontalPodAutoscalerListFluent.ItemsNested addNewItemLike(V1HorizontalPodAutoscaler item); - public V1HorizontalPodAutoscalerListFluent.ItemsNested setNewItemLike(int index,V1HorizontalPodAutoscaler item); - public V1HorizontalPodAutoscalerListFluent.ItemsNested editItem(int index); - public V1HorizontalPodAutoscalerListFluent.ItemsNested editFirstItem(); - public V1HorizontalPodAutoscalerListFluent.ItemsNested editLastItem(); - public V1HorizontalPodAutoscalerListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1HorizontalPodAutoscalerListFluent.MetadataNested withNewMetadata(); - public V1HorizontalPodAutoscalerListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1HorizontalPodAutoscalerListFluent.MetadataNested editMetadata(); - public V1HorizontalPodAutoscalerListFluent.MetadataNested editOrNewMetadata(); - public V1HorizontalPodAutoscalerListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1HorizontalPodAutoscalerFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HorizontalPodAutoscalerListFluent> extends BaseFluent{ + public V1HorizontalPodAutoscalerListFluent() { + } + + public V1HorizontalPodAutoscalerListFluent(V1HorizontalPodAutoscalerList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1HorizontalPodAutoscalerList instance) { + instance = (instance != null ? instance : new V1HorizontalPodAutoscalerList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1HorizontalPodAutoscaler item) { + if (this.items == null) {this.items = new ArrayList();} + V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1HorizontalPodAutoscaler item) { + if (this.items == null) {this.items = new ArrayList();} + V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1HorizontalPodAutoscaler... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1HorizontalPodAutoscaler item : items) {V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1HorizontalPodAutoscaler item : items) {V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1HorizontalPodAutoscaler... items) { + if (this.items == null) return (A)this; + for (V1HorizontalPodAutoscaler item : items) {V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1HorizontalPodAutoscaler item : items) {V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1HorizontalPodAutoscalerBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1HorizontalPodAutoscaler buildItem(int index) { + return this.items.get(index).build(); + } + + public V1HorizontalPodAutoscaler buildFirstItem() { + return this.items.get(0).build(); + } + + public V1HorizontalPodAutoscaler buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1HorizontalPodAutoscaler buildMatchingItem(Predicate predicate) { + for (V1HorizontalPodAutoscalerBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1HorizontalPodAutoscalerBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1HorizontalPodAutoscaler item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1HorizontalPodAutoscaler... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1HorizontalPodAutoscaler item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1HorizontalPodAutoscaler item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1HorizontalPodAutoscaler item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1HorizontalPodAutoscalerListFluent that = (V1HorizontalPodAutoscalerListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1HorizontalPodAutoscalerFluent> implements Nested{ + ItemsNested(int index,V1HorizontalPodAutoscaler item) { + this.index = index; + this.builder = new V1HorizontalPodAutoscalerBuilder(this, item); + } + V1HorizontalPodAutoscalerBuilder builder; + int index; + public N and() { + return (N) V1HorizontalPodAutoscalerListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1HorizontalPodAutoscalerListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListFluentImpl.java deleted file mode 100644 index 3e24767256..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HorizontalPodAutoscalerListFluentImpl> extends BaseFluent implements V1HorizontalPodAutoscalerListFluent{ - public V1HorizontalPodAutoscalerListFluentImpl() { - } - public V1HorizontalPodAutoscalerListFluentImpl(V1HorizontalPodAutoscalerList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1HorizontalPodAutoscaler item) { - if (this.items == null) {this.items = new ArrayList();} - V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1HorizontalPodAutoscaler item) { - if (this.items == null) {this.items = new ArrayList();} - V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1HorizontalPodAutoscaler... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1HorizontalPodAutoscaler item : items) {V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1HorizontalPodAutoscaler item : items) {V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1HorizontalPodAutoscaler... items) { - for (V1HorizontalPodAutoscaler item : items) {V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1HorizontalPodAutoscaler item : items) {V1HorizontalPodAutoscalerBuilder builder = new V1HorizontalPodAutoscalerBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1HorizontalPodAutoscalerBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1HorizontalPodAutoscaler buildItem(int index) { - return this.items.get(index).build(); - } - public V1HorizontalPodAutoscaler buildFirstItem() { - return this.items.get(0).build(); - } - public V1HorizontalPodAutoscaler buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1HorizontalPodAutoscaler buildMatchingItem(Predicate predicate) { - for (V1HorizontalPodAutoscalerBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1HorizontalPodAutoscalerBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1HorizontalPodAutoscaler item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1HorizontalPodAutoscaler... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1HorizontalPodAutoscaler item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1HorizontalPodAutoscalerListFluentImpl.ItemsNested addNewItem() { - return new V1HorizontalPodAutoscalerListFluentImpl.ItemsNestedImpl(); - } - public V1HorizontalPodAutoscalerListFluentImpl.ItemsNested addNewItemLike(V1HorizontalPodAutoscaler item) { - return new V1HorizontalPodAutoscalerListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1HorizontalPodAutoscalerListFluentImpl.ItemsNested setNewItemLike(int index,V1HorizontalPodAutoscaler item) { - return new V1HorizontalPodAutoscalerListFluentImpl.ItemsNestedImpl(index, item); - } - public V1HorizontalPodAutoscalerListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1HorizontalPodAutoscalerListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1HorizontalPodAutoscalerListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1HorizontalPodAutoscalerListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1HorizontalPodAutoscalerListFluentImpl.MetadataNestedImpl(); - } - public V1HorizontalPodAutoscalerListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1HorizontalPodAutoscalerListFluentImpl.MetadataNestedImpl(item); - } - public V1HorizontalPodAutoscalerListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1HorizontalPodAutoscalerListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1HorizontalPodAutoscalerListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1HorizontalPodAutoscalerListFluentImpl that = (V1HorizontalPodAutoscalerListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1HorizontalPodAutoscalerFluentImpl> implements V1HorizontalPodAutoscalerListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1HorizontalPodAutoscaler item) { - this.index = index; - this.builder = new V1HorizontalPodAutoscalerBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1HorizontalPodAutoscalerBuilder(this); - } - V1HorizontalPodAutoscalerBuilder builder; - int index; - public N and() { - return (N) V1HorizontalPodAutoscalerListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1HorizontalPodAutoscalerListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1HorizontalPodAutoscalerListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecBuilder.java index 7bfa712b04..86d3ba2aea 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HorizontalPodAutoscalerSpecBuilder extends V1HorizontalPodAutoscalerSpecFluentImpl implements VisitableBuilder{ +public class V1HorizontalPodAutoscalerSpecBuilder extends V1HorizontalPodAutoscalerSpecFluent implements VisitableBuilder{ public V1HorizontalPodAutoscalerSpecBuilder() { - this(false); - } - public V1HorizontalPodAutoscalerSpecBuilder(Boolean validationEnabled) { - this(new V1HorizontalPodAutoscalerSpec(), validationEnabled); + this(new V1HorizontalPodAutoscalerSpec()); } + public V1HorizontalPodAutoscalerSpecBuilder(V1HorizontalPodAutoscalerSpecFluent fluent) { - this(fluent, false); - } - public V1HorizontalPodAutoscalerSpecBuilder(V1HorizontalPodAutoscalerSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HorizontalPodAutoscalerSpec(), validationEnabled); + this(fluent, new V1HorizontalPodAutoscalerSpec()); } + public V1HorizontalPodAutoscalerSpecBuilder(V1HorizontalPodAutoscalerSpecFluent fluent,V1HorizontalPodAutoscalerSpec instance) { - this(fluent, instance, false); - } - public V1HorizontalPodAutoscalerSpecBuilder(V1HorizontalPodAutoscalerSpecFluent fluent,V1HorizontalPodAutoscalerSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMaxReplicas(instance.getMaxReplicas()); - fluent.withMinReplicas(instance.getMinReplicas()); - fluent.withScaleTargetRef(instance.getScaleTargetRef()); - fluent.withTargetCPUUtilizationPercentage(instance.getTargetCPUUtilizationPercentage()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HorizontalPodAutoscalerSpecBuilder(V1HorizontalPodAutoscalerSpec instance) { - this(instance,false); - } - public V1HorizontalPodAutoscalerSpecBuilder(V1HorizontalPodAutoscalerSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMaxReplicas(instance.getMaxReplicas()); - this.withMinReplicas(instance.getMinReplicas()); - this.withScaleTargetRef(instance.getScaleTargetRef()); - this.withTargetCPUUtilizationPercentage(instance.getTargetCPUUtilizationPercentage()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HorizontalPodAutoscalerSpecFluent fluent; - Boolean validationEnabled; + public V1HorizontalPodAutoscalerSpec build() { V1HorizontalPodAutoscalerSpec buildable = new V1HorizontalPodAutoscalerSpec(); buildable.setMaxReplicas(fluent.getMaxReplicas()); buildable.setMinReplicas(fluent.getMinReplicas()); - buildable.setScaleTargetRef(fluent.getScaleTargetRef()); + buildable.setScaleTargetRef(fluent.buildScaleTargetRef()); buildable.setTargetCPUUtilizationPercentage(fluent.getTargetCPUUtilizationPercentage()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecFluent.java index 8b1e889caa..c1abf37c47 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecFluent.java @@ -1,44 +1,158 @@ package io.kubernetes.client.openapi.models; -import java.lang.Integer; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import java.lang.Integer; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1HorizontalPodAutoscalerSpecFluent> extends Fluent{ - public Integer getMaxReplicas(); - public A withMaxReplicas(Integer maxReplicas); - public Boolean hasMaxReplicas(); - public Integer getMinReplicas(); - public A withMinReplicas(Integer minReplicas); - public Boolean hasMinReplicas(); - - /** - * This method has been deprecated, please use method buildScaleTargetRef instead. - * @return The buildable object. - */ - @Deprecated - public V1CrossVersionObjectReference getScaleTargetRef(); - public V1CrossVersionObjectReference buildScaleTargetRef(); - public A withScaleTargetRef(V1CrossVersionObjectReference scaleTargetRef); - public Boolean hasScaleTargetRef(); - public V1HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested withNewScaleTargetRef(); - public V1HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested withNewScaleTargetRefLike(V1CrossVersionObjectReference item); - public V1HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested editScaleTargetRef(); - public V1HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested editOrNewScaleTargetRef(); - public V1HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested editOrNewScaleTargetRefLike(V1CrossVersionObjectReference item); - public Integer getTargetCPUUtilizationPercentage(); - public A withTargetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage); - public Boolean hasTargetCPUUtilizationPercentage(); - public interface ScaleTargetRefNested extends Nested,V1CrossVersionObjectReferenceFluent>{ - public N and(); - public N endScaleTargetRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HorizontalPodAutoscalerSpecFluent> extends BaseFluent{ + public V1HorizontalPodAutoscalerSpecFluent() { + } + + public V1HorizontalPodAutoscalerSpecFluent(V1HorizontalPodAutoscalerSpec instance) { + this.copyInstance(instance); + } + private Integer maxReplicas; + private Integer minReplicas; + private V1CrossVersionObjectReferenceBuilder scaleTargetRef; + private Integer targetCPUUtilizationPercentage; + + protected void copyInstance(V1HorizontalPodAutoscalerSpec instance) { + instance = (instance != null ? instance : new V1HorizontalPodAutoscalerSpec()); + if (instance != null) { + this.withMaxReplicas(instance.getMaxReplicas()); + this.withMinReplicas(instance.getMinReplicas()); + this.withScaleTargetRef(instance.getScaleTargetRef()); + this.withTargetCPUUtilizationPercentage(instance.getTargetCPUUtilizationPercentage()); + } + } + + public Integer getMaxReplicas() { + return this.maxReplicas; + } + + public A withMaxReplicas(Integer maxReplicas) { + this.maxReplicas = maxReplicas; + return (A) this; + } + + public boolean hasMaxReplicas() { + return this.maxReplicas != null; + } + + public Integer getMinReplicas() { + return this.minReplicas; + } + + public A withMinReplicas(Integer minReplicas) { + this.minReplicas = minReplicas; + return (A) this; + } + + public boolean hasMinReplicas() { + return this.minReplicas != null; + } + + public V1CrossVersionObjectReference buildScaleTargetRef() { + return this.scaleTargetRef != null ? this.scaleTargetRef.build() : null; + } + + public A withScaleTargetRef(V1CrossVersionObjectReference scaleTargetRef) { + this._visitables.remove("scaleTargetRef"); + if (scaleTargetRef != null) { + this.scaleTargetRef = new V1CrossVersionObjectReferenceBuilder(scaleTargetRef); + this._visitables.get("scaleTargetRef").add(this.scaleTargetRef); + } else { + this.scaleTargetRef = null; + this._visitables.get("scaleTargetRef").remove(this.scaleTargetRef); + } + return (A) this; + } + + public boolean hasScaleTargetRef() { + return this.scaleTargetRef != null; + } + + public ScaleTargetRefNested withNewScaleTargetRef() { + return new ScaleTargetRefNested(null); + } + + public ScaleTargetRefNested withNewScaleTargetRefLike(V1CrossVersionObjectReference item) { + return new ScaleTargetRefNested(item); + } + + public ScaleTargetRefNested editScaleTargetRef() { + return withNewScaleTargetRefLike(java.util.Optional.ofNullable(buildScaleTargetRef()).orElse(null)); + } + + public ScaleTargetRefNested editOrNewScaleTargetRef() { + return withNewScaleTargetRefLike(java.util.Optional.ofNullable(buildScaleTargetRef()).orElse(new V1CrossVersionObjectReferenceBuilder().build())); + } + + public ScaleTargetRefNested editOrNewScaleTargetRefLike(V1CrossVersionObjectReference item) { + return withNewScaleTargetRefLike(java.util.Optional.ofNullable(buildScaleTargetRef()).orElse(item)); + } + + public Integer getTargetCPUUtilizationPercentage() { + return this.targetCPUUtilizationPercentage; + } + + public A withTargetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage) { + this.targetCPUUtilizationPercentage = targetCPUUtilizationPercentage; + return (A) this; } + public boolean hasTargetCPUUtilizationPercentage() { + return this.targetCPUUtilizationPercentage != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1HorizontalPodAutoscalerSpecFluent that = (V1HorizontalPodAutoscalerSpecFluent) o; + if (!java.util.Objects.equals(maxReplicas, that.maxReplicas)) return false; + if (!java.util.Objects.equals(minReplicas, that.minReplicas)) return false; + if (!java.util.Objects.equals(scaleTargetRef, that.scaleTargetRef)) return false; + if (!java.util.Objects.equals(targetCPUUtilizationPercentage, that.targetCPUUtilizationPercentage)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(maxReplicas, minReplicas, scaleTargetRef, targetCPUUtilizationPercentage, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (maxReplicas != null) { sb.append("maxReplicas:"); sb.append(maxReplicas + ","); } + if (minReplicas != null) { sb.append("minReplicas:"); sb.append(minReplicas + ","); } + if (scaleTargetRef != null) { sb.append("scaleTargetRef:"); sb.append(scaleTargetRef + ","); } + if (targetCPUUtilizationPercentage != null) { sb.append("targetCPUUtilizationPercentage:"); sb.append(targetCPUUtilizationPercentage); } + sb.append("}"); + return sb.toString(); + } + public class ScaleTargetRefNested extends V1CrossVersionObjectReferenceFluent> implements Nested{ + ScaleTargetRefNested(V1CrossVersionObjectReference item) { + this.builder = new V1CrossVersionObjectReferenceBuilder(this, item); + } + V1CrossVersionObjectReferenceBuilder builder; + + public N and() { + return (N) V1HorizontalPodAutoscalerSpecFluent.this.withScaleTargetRef(builder.build()); + } + + public N endScaleTargetRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecFluentImpl.java deleted file mode 100644 index 96c09090bd..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerSpecFluentImpl.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HorizontalPodAutoscalerSpecFluentImpl> extends BaseFluent implements V1HorizontalPodAutoscalerSpecFluent{ - public V1HorizontalPodAutoscalerSpecFluentImpl() { - } - public V1HorizontalPodAutoscalerSpecFluentImpl(V1HorizontalPodAutoscalerSpec instance) { - if (instance != null) { - this.withMaxReplicas(instance.getMaxReplicas()); - this.withMinReplicas(instance.getMinReplicas()); - this.withScaleTargetRef(instance.getScaleTargetRef()); - this.withTargetCPUUtilizationPercentage(instance.getTargetCPUUtilizationPercentage()); - } - } - private Integer maxReplicas; - private Integer minReplicas; - private V1CrossVersionObjectReferenceBuilder scaleTargetRef; - private Integer targetCPUUtilizationPercentage; - public Integer getMaxReplicas() { - return this.maxReplicas; - } - public A withMaxReplicas(Integer maxReplicas) { - this.maxReplicas=maxReplicas; return (A) this; - } - public Boolean hasMaxReplicas() { - return this.maxReplicas != null; - } - public Integer getMinReplicas() { - return this.minReplicas; - } - public A withMinReplicas(Integer minReplicas) { - this.minReplicas=minReplicas; return (A) this; - } - public Boolean hasMinReplicas() { - return this.minReplicas != null; - } - - /** - * This method has been deprecated, please use method buildScaleTargetRef instead. - * @return The buildable object. - */ - @Deprecated - public V1CrossVersionObjectReference getScaleTargetRef() { - return this.scaleTargetRef!=null ?this.scaleTargetRef.build():null; - } - public V1CrossVersionObjectReference buildScaleTargetRef() { - return this.scaleTargetRef!=null ?this.scaleTargetRef.build():null; - } - public A withScaleTargetRef(V1CrossVersionObjectReference scaleTargetRef) { - _visitables.get("scaleTargetRef").remove(this.scaleTargetRef); - if (scaleTargetRef!=null){ this.scaleTargetRef= new V1CrossVersionObjectReferenceBuilder(scaleTargetRef); _visitables.get("scaleTargetRef").add(this.scaleTargetRef);} else { this.scaleTargetRef = null; _visitables.get("scaleTargetRef").remove(this.scaleTargetRef); } return (A) this; - } - public Boolean hasScaleTargetRef() { - return this.scaleTargetRef != null; - } - public V1HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested withNewScaleTargetRef() { - return new V1HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNestedImpl(); - } - public V1HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested withNewScaleTargetRefLike(V1CrossVersionObjectReference item) { - return new V1HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNestedImpl(item); - } - public V1HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested editScaleTargetRef() { - return withNewScaleTargetRefLike(getScaleTargetRef()); - } - public V1HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested editOrNewScaleTargetRef() { - return withNewScaleTargetRefLike(getScaleTargetRef() != null ? getScaleTargetRef(): new V1CrossVersionObjectReferenceBuilder().build()); - } - public V1HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested editOrNewScaleTargetRefLike(V1CrossVersionObjectReference item) { - return withNewScaleTargetRefLike(getScaleTargetRef() != null ? getScaleTargetRef(): item); - } - public Integer getTargetCPUUtilizationPercentage() { - return this.targetCPUUtilizationPercentage; - } - public A withTargetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage) { - this.targetCPUUtilizationPercentage=targetCPUUtilizationPercentage; return (A) this; - } - public Boolean hasTargetCPUUtilizationPercentage() { - return this.targetCPUUtilizationPercentage != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1HorizontalPodAutoscalerSpecFluentImpl that = (V1HorizontalPodAutoscalerSpecFluentImpl) o; - if (!java.util.Objects.equals(maxReplicas, that.maxReplicas)) return false; - - if (!java.util.Objects.equals(minReplicas, that.minReplicas)) return false; - - if (!java.util.Objects.equals(scaleTargetRef, that.scaleTargetRef)) return false; - - if (!java.util.Objects.equals(targetCPUUtilizationPercentage, that.targetCPUUtilizationPercentage)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(maxReplicas, minReplicas, scaleTargetRef, targetCPUUtilizationPercentage, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (maxReplicas != null) { sb.append("maxReplicas:"); sb.append(maxReplicas + ","); } - if (minReplicas != null) { sb.append("minReplicas:"); sb.append(minReplicas + ","); } - if (scaleTargetRef != null) { sb.append("scaleTargetRef:"); sb.append(scaleTargetRef + ","); } - if (targetCPUUtilizationPercentage != null) { sb.append("targetCPUUtilizationPercentage:"); sb.append(targetCPUUtilizationPercentage); } - sb.append("}"); - return sb.toString(); - } - class ScaleTargetRefNestedImpl extends V1CrossVersionObjectReferenceFluentImpl> implements V1HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested,Nested{ - ScaleTargetRefNestedImpl(V1CrossVersionObjectReference item) { - this.builder = new V1CrossVersionObjectReferenceBuilder(this, item); - } - ScaleTargetRefNestedImpl() { - this.builder = new V1CrossVersionObjectReferenceBuilder(this); - } - V1CrossVersionObjectReferenceBuilder builder; - public N and() { - return (N) V1HorizontalPodAutoscalerSpecFluentImpl.this.withScaleTargetRef(builder.build()); - } - public N endScaleTargetRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusBuilder.java index e5cb42ca04..4c5999d31b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HorizontalPodAutoscalerStatusBuilder extends V1HorizontalPodAutoscalerStatusFluentImpl implements VisitableBuilder{ +public class V1HorizontalPodAutoscalerStatusBuilder extends V1HorizontalPodAutoscalerStatusFluent implements VisitableBuilder{ public V1HorizontalPodAutoscalerStatusBuilder() { - this(false); - } - public V1HorizontalPodAutoscalerStatusBuilder(Boolean validationEnabled) { - this(new V1HorizontalPodAutoscalerStatus(), validationEnabled); + this(new V1HorizontalPodAutoscalerStatus()); } + public V1HorizontalPodAutoscalerStatusBuilder(V1HorizontalPodAutoscalerStatusFluent fluent) { - this(fluent, false); - } - public V1HorizontalPodAutoscalerStatusBuilder(V1HorizontalPodAutoscalerStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HorizontalPodAutoscalerStatus(), validationEnabled); + this(fluent, new V1HorizontalPodAutoscalerStatus()); } + public V1HorizontalPodAutoscalerStatusBuilder(V1HorizontalPodAutoscalerStatusFluent fluent,V1HorizontalPodAutoscalerStatus instance) { - this(fluent, instance, false); - } - public V1HorizontalPodAutoscalerStatusBuilder(V1HorizontalPodAutoscalerStatusFluent fluent,V1HorizontalPodAutoscalerStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCurrentCPUUtilizationPercentage(instance.getCurrentCPUUtilizationPercentage()); - fluent.withCurrentReplicas(instance.getCurrentReplicas()); - fluent.withDesiredReplicas(instance.getDesiredReplicas()); - fluent.withLastScaleTime(instance.getLastScaleTime()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HorizontalPodAutoscalerStatusBuilder(V1HorizontalPodAutoscalerStatus instance) { - this(instance,false); - } - public V1HorizontalPodAutoscalerStatusBuilder(V1HorizontalPodAutoscalerStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCurrentCPUUtilizationPercentage(instance.getCurrentCPUUtilizationPercentage()); - this.withCurrentReplicas(instance.getCurrentReplicas()); - this.withDesiredReplicas(instance.getDesiredReplicas()); - this.withLastScaleTime(instance.getLastScaleTime()); - this.withObservedGeneration(instance.getObservedGeneration()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HorizontalPodAutoscalerStatusFluent fluent; - Boolean validationEnabled; + public V1HorizontalPodAutoscalerStatus build() { V1HorizontalPodAutoscalerStatus buildable = new V1HorizontalPodAutoscalerStatus(); buildable.setCurrentCPUUtilizationPercentage(fluent.getCurrentCPUUtilizationPercentage()); @@ -55,4 +31,5 @@ public V1HorizontalPodAutoscalerStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusFluent.java index 09793322b8..4e85c29ad8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusFluent.java @@ -2,29 +2,133 @@ import java.lang.Integer; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1HorizontalPodAutoscalerStatusFluent> extends Fluent{ - public Integer getCurrentCPUUtilizationPercentage(); - public A withCurrentCPUUtilizationPercentage(Integer currentCPUUtilizationPercentage); - public Boolean hasCurrentCPUUtilizationPercentage(); - public Integer getCurrentReplicas(); - public A withCurrentReplicas(Integer currentReplicas); - public Boolean hasCurrentReplicas(); - public Integer getDesiredReplicas(); - public A withDesiredReplicas(Integer desiredReplicas); - public Boolean hasDesiredReplicas(); - public OffsetDateTime getLastScaleTime(); - public A withLastScaleTime(OffsetDateTime lastScaleTime); - public Boolean hasLastScaleTime(); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HorizontalPodAutoscalerStatusFluent> extends BaseFluent{ + public V1HorizontalPodAutoscalerStatusFluent() { + } + public V1HorizontalPodAutoscalerStatusFluent(V1HorizontalPodAutoscalerStatus instance) { + this.copyInstance(instance); + } + private Integer currentCPUUtilizationPercentage; + private Integer currentReplicas; + private Integer desiredReplicas; + private OffsetDateTime lastScaleTime; + private Long observedGeneration; + + protected void copyInstance(V1HorizontalPodAutoscalerStatus instance) { + instance = (instance != null ? instance : new V1HorizontalPodAutoscalerStatus()); + if (instance != null) { + this.withCurrentCPUUtilizationPercentage(instance.getCurrentCPUUtilizationPercentage()); + this.withCurrentReplicas(instance.getCurrentReplicas()); + this.withDesiredReplicas(instance.getDesiredReplicas()); + this.withLastScaleTime(instance.getLastScaleTime()); + this.withObservedGeneration(instance.getObservedGeneration()); + } + } + + public Integer getCurrentCPUUtilizationPercentage() { + return this.currentCPUUtilizationPercentage; + } + + public A withCurrentCPUUtilizationPercentage(Integer currentCPUUtilizationPercentage) { + this.currentCPUUtilizationPercentage = currentCPUUtilizationPercentage; + return (A) this; + } + + public boolean hasCurrentCPUUtilizationPercentage() { + return this.currentCPUUtilizationPercentage != null; + } + + public Integer getCurrentReplicas() { + return this.currentReplicas; + } + + public A withCurrentReplicas(Integer currentReplicas) { + this.currentReplicas = currentReplicas; + return (A) this; + } + + public boolean hasCurrentReplicas() { + return this.currentReplicas != null; + } + + public Integer getDesiredReplicas() { + return this.desiredReplicas; + } + + public A withDesiredReplicas(Integer desiredReplicas) { + this.desiredReplicas = desiredReplicas; + return (A) this; + } + + public boolean hasDesiredReplicas() { + return this.desiredReplicas != null; + } + + public OffsetDateTime getLastScaleTime() { + return this.lastScaleTime; + } + + public A withLastScaleTime(OffsetDateTime lastScaleTime) { + this.lastScaleTime = lastScaleTime; + return (A) this; + } + + public boolean hasLastScaleTime() { + return this.lastScaleTime != null; + } + + public Long getObservedGeneration() { + return this.observedGeneration; + } + + public A withObservedGeneration(Long observedGeneration) { + this.observedGeneration = observedGeneration; + return (A) this; + } + + public boolean hasObservedGeneration() { + return this.observedGeneration != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1HorizontalPodAutoscalerStatusFluent that = (V1HorizontalPodAutoscalerStatusFluent) o; + if (!java.util.Objects.equals(currentCPUUtilizationPercentage, that.currentCPUUtilizationPercentage)) return false; + if (!java.util.Objects.equals(currentReplicas, that.currentReplicas)) return false; + if (!java.util.Objects.equals(desiredReplicas, that.desiredReplicas)) return false; + if (!java.util.Objects.equals(lastScaleTime, that.lastScaleTime)) return false; + if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(currentCPUUtilizationPercentage, currentReplicas, desiredReplicas, lastScaleTime, observedGeneration, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (currentCPUUtilizationPercentage != null) { sb.append("currentCPUUtilizationPercentage:"); sb.append(currentCPUUtilizationPercentage + ","); } + if (currentReplicas != null) { sb.append("currentReplicas:"); sb.append(currentReplicas + ","); } + if (desiredReplicas != null) { sb.append("desiredReplicas:"); sb.append(desiredReplicas + ","); } + if (lastScaleTime != null) { sb.append("lastScaleTime:"); sb.append(lastScaleTime + ","); } + if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusFluentImpl.java deleted file mode 100644 index cab54517cc..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HorizontalPodAutoscalerStatusFluentImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HorizontalPodAutoscalerStatusFluentImpl> extends BaseFluent implements V1HorizontalPodAutoscalerStatusFluent{ - public V1HorizontalPodAutoscalerStatusFluentImpl() { - } - public V1HorizontalPodAutoscalerStatusFluentImpl(V1HorizontalPodAutoscalerStatus instance) { - if (instance != null) { - this.withCurrentCPUUtilizationPercentage(instance.getCurrentCPUUtilizationPercentage()); - this.withCurrentReplicas(instance.getCurrentReplicas()); - this.withDesiredReplicas(instance.getDesiredReplicas()); - this.withLastScaleTime(instance.getLastScaleTime()); - this.withObservedGeneration(instance.getObservedGeneration()); - } - } - private Integer currentCPUUtilizationPercentage; - private Integer currentReplicas; - private Integer desiredReplicas; - private OffsetDateTime lastScaleTime; - private Long observedGeneration; - public Integer getCurrentCPUUtilizationPercentage() { - return this.currentCPUUtilizationPercentage; - } - public A withCurrentCPUUtilizationPercentage(Integer currentCPUUtilizationPercentage) { - this.currentCPUUtilizationPercentage=currentCPUUtilizationPercentage; return (A) this; - } - public Boolean hasCurrentCPUUtilizationPercentage() { - return this.currentCPUUtilizationPercentage != null; - } - public Integer getCurrentReplicas() { - return this.currentReplicas; - } - public A withCurrentReplicas(Integer currentReplicas) { - this.currentReplicas=currentReplicas; return (A) this; - } - public Boolean hasCurrentReplicas() { - return this.currentReplicas != null; - } - public Integer getDesiredReplicas() { - return this.desiredReplicas; - } - public A withDesiredReplicas(Integer desiredReplicas) { - this.desiredReplicas=desiredReplicas; return (A) this; - } - public Boolean hasDesiredReplicas() { - return this.desiredReplicas != null; - } - public OffsetDateTime getLastScaleTime() { - return this.lastScaleTime; - } - public A withLastScaleTime(OffsetDateTime lastScaleTime) { - this.lastScaleTime=lastScaleTime; return (A) this; - } - public Boolean hasLastScaleTime() { - return this.lastScaleTime != null; - } - public Long getObservedGeneration() { - return this.observedGeneration; - } - public A withObservedGeneration(Long observedGeneration) { - this.observedGeneration=observedGeneration; return (A) this; - } - public Boolean hasObservedGeneration() { - return this.observedGeneration != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1HorizontalPodAutoscalerStatusFluentImpl that = (V1HorizontalPodAutoscalerStatusFluentImpl) o; - if (!java.util.Objects.equals(currentCPUUtilizationPercentage, that.currentCPUUtilizationPercentage)) return false; - - if (!java.util.Objects.equals(currentReplicas, that.currentReplicas)) return false; - - if (!java.util.Objects.equals(desiredReplicas, that.desiredReplicas)) return false; - - if (!java.util.Objects.equals(lastScaleTime, that.lastScaleTime)) return false; - - if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(currentCPUUtilizationPercentage, currentReplicas, desiredReplicas, lastScaleTime, observedGeneration, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (currentCPUUtilizationPercentage != null) { sb.append("currentCPUUtilizationPercentage:"); sb.append(currentCPUUtilizationPercentage + ","); } - if (currentReplicas != null) { sb.append("currentReplicas:"); sb.append(currentReplicas + ","); } - if (desiredReplicas != null) { sb.append("desiredReplicas:"); sb.append(desiredReplicas + ","); } - if (lastScaleTime != null) { sb.append("lastScaleTime:"); sb.append(lastScaleTime + ","); } - if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasBuilder.java index 3424522828..bba851859b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HostAliasBuilder extends V1HostAliasFluentImpl implements VisitableBuilder{ +public class V1HostAliasBuilder extends V1HostAliasFluent implements VisitableBuilder{ public V1HostAliasBuilder() { - this(false); - } - public V1HostAliasBuilder(Boolean validationEnabled) { - this(new V1HostAlias(), validationEnabled); + this(new V1HostAlias()); } + public V1HostAliasBuilder(V1HostAliasFluent fluent) { - this(fluent, false); - } - public V1HostAliasBuilder(V1HostAliasFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HostAlias(), validationEnabled); + this(fluent, new V1HostAlias()); } + public V1HostAliasBuilder(V1HostAliasFluent fluent,V1HostAlias instance) { - this(fluent, instance, false); - } - public V1HostAliasBuilder(V1HostAliasFluent fluent,V1HostAlias instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHostnames(instance.getHostnames()); - fluent.withIp(instance.getIp()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HostAliasBuilder(V1HostAlias instance) { - this(instance,false); - } - public V1HostAliasBuilder(V1HostAlias instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHostnames(instance.getHostnames()); - this.withIp(instance.getIp()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HostAliasFluent fluent; - Boolean validationEnabled; + public V1HostAlias build() { V1HostAlias buildable = new V1HostAlias(); buildable.setHostnames(fluent.getHostnames()); @@ -46,4 +28,5 @@ public V1HostAlias build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasFluent.java index 011569379b..1da355118a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasFluent.java @@ -1,35 +1,165 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1HostAliasFluent> extends Fluent{ - public A addToHostnames(int index,String item); - public A setToHostnames(int index,String item); - public A addToHostnames(java.lang.String... items); - public A addAllToHostnames(Collection items); - public A removeFromHostnames(java.lang.String... items); - public A removeAllFromHostnames(Collection items); - public List getHostnames(); - public String getHostname(int index); - public String getFirstHostname(); - public String getLastHostname(); - public String getMatchingHostname(Predicate predicate); - public Boolean hasMatchingHostname(Predicate predicate); - public A withHostnames(List hostnames); - public A withHostnames(java.lang.String... hostnames); - public Boolean hasHostnames(); - public String getIp(); - public A withIp(String ip); - public Boolean hasIp(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HostAliasFluent> extends BaseFluent{ + public V1HostAliasFluent() { + } + public V1HostAliasFluent(V1HostAlias instance) { + this.copyInstance(instance); + } + private List hostnames; + private String ip; + + protected void copyInstance(V1HostAlias instance) { + instance = (instance != null ? instance : new V1HostAlias()); + if (instance != null) { + this.withHostnames(instance.getHostnames()); + this.withIp(instance.getIp()); + } + } + + public A addToHostnames(int index,String item) { + if (this.hostnames == null) {this.hostnames = new ArrayList();} + this.hostnames.add(index, item); + return (A)this; + } + + public A setToHostnames(int index,String item) { + if (this.hostnames == null) {this.hostnames = new ArrayList();} + this.hostnames.set(index, item); return (A)this; + } + + public A addToHostnames(java.lang.String... items) { + if (this.hostnames == null) {this.hostnames = new ArrayList();} + for (String item : items) {this.hostnames.add(item);} return (A)this; + } + + public A addAllToHostnames(Collection items) { + if (this.hostnames == null) {this.hostnames = new ArrayList();} + for (String item : items) {this.hostnames.add(item);} return (A)this; + } + + public A removeFromHostnames(java.lang.String... items) { + if (this.hostnames == null) return (A)this; + for (String item : items) { this.hostnames.remove(item);} return (A)this; + } + + public A removeAllFromHostnames(Collection items) { + if (this.hostnames == null) return (A)this; + for (String item : items) { this.hostnames.remove(item);} return (A)this; + } + + public List getHostnames() { + return this.hostnames; + } + + public String getHostname(int index) { + return this.hostnames.get(index); + } + + public String getFirstHostname() { + return this.hostnames.get(0); + } + + public String getLastHostname() { + return this.hostnames.get(hostnames.size() - 1); + } + + public String getMatchingHostname(Predicate predicate) { + for (String item : hostnames) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingHostname(Predicate predicate) { + for (String item : hostnames) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withHostnames(List hostnames) { + if (hostnames != null) { + this.hostnames = new ArrayList(); + for (String item : hostnames) { + this.addToHostnames(item); + } + } else { + this.hostnames = null; + } + return (A) this; + } + + public A withHostnames(java.lang.String... hostnames) { + if (this.hostnames != null) { + this.hostnames.clear(); + _visitables.remove("hostnames"); + } + if (hostnames != null) { + for (String item : hostnames) { + this.addToHostnames(item); + } + } + return (A) this; + } + + public boolean hasHostnames() { + return this.hostnames != null && !this.hostnames.isEmpty(); + } + + public String getIp() { + return this.ip; + } + + public A withIp(String ip) { + this.ip = ip; + return (A) this; + } + + public boolean hasIp() { + return this.ip != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1HostAliasFluent that = (V1HostAliasFluent) o; + if (!java.util.Objects.equals(hostnames, that.hostnames)) return false; + if (!java.util.Objects.equals(ip, that.ip)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(hostnames, ip, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (hostnames != null && !hostnames.isEmpty()) { sb.append("hostnames:"); sb.append(hostnames + ","); } + if (ip != null) { sb.append("ip:"); sb.append(ip); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasFluentImpl.java deleted file mode 100644 index b5a4a10001..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostAliasFluentImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HostAliasFluentImpl> extends BaseFluent implements V1HostAliasFluent{ - public V1HostAliasFluentImpl() { - } - public V1HostAliasFluentImpl(V1HostAlias instance) { - if (instance != null) { - this.withHostnames(instance.getHostnames()); - this.withIp(instance.getIp()); - } - } - private List hostnames; - private String ip; - public A addToHostnames(int index,String item) { - if (this.hostnames == null) {this.hostnames = new ArrayList();} - this.hostnames.add(index, item); - return (A)this; - } - public A setToHostnames(int index,String item) { - if (this.hostnames == null) {this.hostnames = new ArrayList();} - this.hostnames.set(index, item); return (A)this; - } - public A addToHostnames(java.lang.String... items) { - if (this.hostnames == null) {this.hostnames = new ArrayList();} - for (String item : items) {this.hostnames.add(item);} return (A)this; - } - public A addAllToHostnames(Collection items) { - if (this.hostnames == null) {this.hostnames = new ArrayList();} - for (String item : items) {this.hostnames.add(item);} return (A)this; - } - public A removeFromHostnames(java.lang.String... items) { - for (String item : items) {if (this.hostnames!= null){ this.hostnames.remove(item);}} return (A)this; - } - public A removeAllFromHostnames(Collection items) { - for (String item : items) {if (this.hostnames!= null){ this.hostnames.remove(item);}} return (A)this; - } - public List getHostnames() { - return this.hostnames; - } - public String getHostname(int index) { - return this.hostnames.get(index); - } - public String getFirstHostname() { - return this.hostnames.get(0); - } - public String getLastHostname() { - return this.hostnames.get(hostnames.size() - 1); - } - public String getMatchingHostname(Predicate predicate) { - for (String item: hostnames) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingHostname(Predicate predicate) { - for (String item: hostnames) { if(predicate.test(item)){ return true;} } return false; - } - public A withHostnames(List hostnames) { - if (hostnames != null) {this.hostnames = new ArrayList(); for (String item : hostnames){this.addToHostnames(item);}} else { this.hostnames = null;} return (A) this; - } - public A withHostnames(java.lang.String... hostnames) { - if (this.hostnames != null) {this.hostnames.clear(); _visitables.remove("hostnames"); } - if (hostnames != null) {for (String item :hostnames){ this.addToHostnames(item);}} return (A) this; - } - public Boolean hasHostnames() { - return hostnames != null && !hostnames.isEmpty(); - } - public String getIp() { - return this.ip; - } - public A withIp(String ip) { - this.ip=ip; return (A) this; - } - public Boolean hasIp() { - return this.ip != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1HostAliasFluentImpl that = (V1HostAliasFluentImpl) o; - if (!java.util.Objects.equals(hostnames, that.hostnames)) return false; - - if (!java.util.Objects.equals(ip, that.ip)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(hostnames, ip, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (hostnames != null && !hostnames.isEmpty()) { sb.append("hostnames:"); sb.append(hostnames + ","); } - if (ip != null) { sb.append("ip:"); sb.append(ip); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostIPBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostIPBuilder.java new file mode 100644 index 0000000000..2588192d3a --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostIPBuilder.java @@ -0,0 +1,31 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1HostIPBuilder extends V1HostIPFluent implements VisitableBuilder{ + public V1HostIPBuilder() { + this(new V1HostIP()); + } + + public V1HostIPBuilder(V1HostIPFluent fluent) { + this(fluent, new V1HostIP()); + } + + public V1HostIPBuilder(V1HostIPFluent fluent,V1HostIP instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1HostIPBuilder(V1HostIP instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1HostIPFluent fluent; + + public V1HostIP build() { + V1HostIP buildable = new V1HostIP(); + buildable.setIp(fluent.getIp()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostIPFluent.java similarity index 62% rename from fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPFluentImpl.java rename to fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostIPFluent.java index d830048a23..904a057ea9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPFluentImpl.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostIPFluent.java @@ -4,42 +4,53 @@ import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodIPFluentImpl> extends BaseFluent implements V1PodIPFluent{ - public V1PodIPFluentImpl() { - } - public V1PodIPFluentImpl(V1PodIP instance) { - if (instance != null) { - this.withIp(instance.getIp()); - } +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HostIPFluent> extends BaseFluent{ + public V1HostIPFluent() { + } + + public V1HostIPFluent(V1HostIP instance) { + this.copyInstance(instance); } private String ip; + + protected void copyInstance(V1HostIP instance) { + instance = (instance != null ? instance : new V1HostIP()); + if (instance != null) { + this.withIp(instance.getIp()); + } + } + public String getIp() { return this.ip; } + public A withIp(String ip) { - this.ip=ip; return (A) this; + this.ip = ip; + return (A) this; } - public Boolean hasIp() { + + public boolean hasIp() { return this.ip != null; } + public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; - V1PodIPFluentImpl that = (V1PodIPFluentImpl) o; + V1HostIPFluent that = (V1HostIPFluent) o; if (!java.util.Objects.equals(ip, that.ip)) return false; - return true; } + public int hashCode() { return java.util.Objects.hash(ip, super.hashCode()); } + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); @@ -48,4 +59,5 @@ public String toString() { return sb.toString(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceBuilder.java index f9d30bc1bf..4cc85f972b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1HostPathVolumeSourceBuilder extends V1HostPathVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1HostPathVolumeSourceBuilder extends V1HostPathVolumeSourceFluent implements VisitableBuilder{ public V1HostPathVolumeSourceBuilder() { - this(false); - } - public V1HostPathVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1HostPathVolumeSource(), validationEnabled); + this(new V1HostPathVolumeSource()); } + public V1HostPathVolumeSourceBuilder(V1HostPathVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1HostPathVolumeSourceBuilder(V1HostPathVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1HostPathVolumeSource(), validationEnabled); + this(fluent, new V1HostPathVolumeSource()); } + public V1HostPathVolumeSourceBuilder(V1HostPathVolumeSourceFluent fluent,V1HostPathVolumeSource instance) { - this(fluent, instance, false); - } - public V1HostPathVolumeSourceBuilder(V1HostPathVolumeSourceFluent fluent,V1HostPathVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPath(instance.getPath()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1HostPathVolumeSourceBuilder(V1HostPathVolumeSource instance) { - this(instance,false); - } - public V1HostPathVolumeSourceBuilder(V1HostPathVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPath(instance.getPath()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1HostPathVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1HostPathVolumeSource build() { V1HostPathVolumeSource buildable = new V1HostPathVolumeSource(); buildable.setPath(fluent.getPath()); @@ -46,4 +28,5 @@ public V1HostPathVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceFluent.java index 4632205276..54c093830c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1HostPathVolumeSourceFluent> extends Fluent{ - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1HostPathVolumeSourceFluent> extends BaseFluent{ + public V1HostPathVolumeSourceFluent() { + } + public V1HostPathVolumeSourceFluent(V1HostPathVolumeSource instance) { + this.copyInstance(instance); + } + private String path; + private String type; + + protected void copyInstance(V1HostPathVolumeSource instance) { + instance = (instance != null ? instance : new V1HostPathVolumeSource()); + if (instance != null) { + this.withPath(instance.getPath()); + this.withType(instance.getType()); + } + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1HostPathVolumeSourceFluent that = (V1HostPathVolumeSourceFluent) o; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(path, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceFluentImpl.java deleted file mode 100644 index 55e3e01fe5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1HostPathVolumeSourceFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1HostPathVolumeSourceFluentImpl> extends BaseFluent implements V1HostPathVolumeSourceFluent{ - public V1HostPathVolumeSourceFluentImpl() { - } - public V1HostPathVolumeSourceFluentImpl(V1HostPathVolumeSource instance) { - if (instance != null) { - this.withPath(instance.getPath()); - this.withType(instance.getType()); - } - } - private String path; - private String type; - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1HostPathVolumeSourceFluentImpl that = (V1HostPathVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(path, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockBuilder.java index 452cb37827..652333930d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IPBlockBuilder extends V1IPBlockFluentImpl implements VisitableBuilder{ +public class V1IPBlockBuilder extends V1IPBlockFluent implements VisitableBuilder{ public V1IPBlockBuilder() { - this(false); - } - public V1IPBlockBuilder(Boolean validationEnabled) { - this(new V1IPBlock(), validationEnabled); + this(new V1IPBlock()); } + public V1IPBlockBuilder(V1IPBlockFluent fluent) { - this(fluent, false); - } - public V1IPBlockBuilder(V1IPBlockFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IPBlock(), validationEnabled); + this(fluent, new V1IPBlock()); } + public V1IPBlockBuilder(V1IPBlockFluent fluent,V1IPBlock instance) { - this(fluent, instance, false); - } - public V1IPBlockBuilder(V1IPBlockFluent fluent,V1IPBlock instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCidr(instance.getCidr()); - fluent.withExcept(instance.getExcept()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IPBlockBuilder(V1IPBlock instance) { - this(instance,false); - } - public V1IPBlockBuilder(V1IPBlock instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCidr(instance.getCidr()); - this.withExcept(instance.getExcept()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IPBlockFluent fluent; - Boolean validationEnabled; + public V1IPBlock build() { V1IPBlock buildable = new V1IPBlock(); buildable.setCidr(fluent.getCidr()); @@ -46,4 +28,5 @@ public V1IPBlock build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockFluent.java index bd06765336..0d0df27b91 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockFluent.java @@ -1,35 +1,165 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1IPBlockFluent> extends Fluent{ - public String getCidr(); - public A withCidr(String cidr); - public Boolean hasCidr(); - public A addToExcept(int index,String item); - public A setToExcept(int index,String item); - public A addToExcept(java.lang.String... items); - public A addAllToExcept(Collection items); - public A removeFromExcept(java.lang.String... items); - public A removeAllFromExcept(Collection items); - public List getExcept(); - public String getExcept(int index); - public String getFirstExcept(); - public String getLastExcept(); - public String getMatchingExcept(Predicate predicate); - public Boolean hasMatchingExcept(Predicate predicate); - public A withExcept(List except); - public A withExcept(java.lang.String... except); - public Boolean hasExcept(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IPBlockFluent> extends BaseFluent{ + public V1IPBlockFluent() { + } + public V1IPBlockFluent(V1IPBlock instance) { + this.copyInstance(instance); + } + private String cidr; + private List except; + + protected void copyInstance(V1IPBlock instance) { + instance = (instance != null ? instance : new V1IPBlock()); + if (instance != null) { + this.withCidr(instance.getCidr()); + this.withExcept(instance.getExcept()); + } + } + + public String getCidr() { + return this.cidr; + } + + public A withCidr(String cidr) { + this.cidr = cidr; + return (A) this; + } + + public boolean hasCidr() { + return this.cidr != null; + } + + public A addToExcept(int index,String item) { + if (this.except == null) {this.except = new ArrayList();} + this.except.add(index, item); + return (A)this; + } + + public A setToExcept(int index,String item) { + if (this.except == null) {this.except = new ArrayList();} + this.except.set(index, item); return (A)this; + } + + public A addToExcept(java.lang.String... items) { + if (this.except == null) {this.except = new ArrayList();} + for (String item : items) {this.except.add(item);} return (A)this; + } + + public A addAllToExcept(Collection items) { + if (this.except == null) {this.except = new ArrayList();} + for (String item : items) {this.except.add(item);} return (A)this; + } + + public A removeFromExcept(java.lang.String... items) { + if (this.except == null) return (A)this; + for (String item : items) { this.except.remove(item);} return (A)this; + } + + public A removeAllFromExcept(Collection items) { + if (this.except == null) return (A)this; + for (String item : items) { this.except.remove(item);} return (A)this; + } + + public List getExcept() { + return this.except; + } + + public String getExcept(int index) { + return this.except.get(index); + } + + public String getFirstExcept() { + return this.except.get(0); + } + + public String getLastExcept() { + return this.except.get(except.size() - 1); + } + + public String getMatchingExcept(Predicate predicate) { + for (String item : except) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingExcept(Predicate predicate) { + for (String item : except) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withExcept(List except) { + if (except != null) { + this.except = new ArrayList(); + for (String item : except) { + this.addToExcept(item); + } + } else { + this.except = null; + } + return (A) this; + } + + public A withExcept(java.lang.String... except) { + if (this.except != null) { + this.except.clear(); + _visitables.remove("except"); + } + if (except != null) { + for (String item : except) { + this.addToExcept(item); + } + } + return (A) this; + } + + public boolean hasExcept() { + return this.except != null && !this.except.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IPBlockFluent that = (V1IPBlockFluent) o; + if (!java.util.Objects.equals(cidr, that.cidr)) return false; + if (!java.util.Objects.equals(except, that.except)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(cidr, except, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (cidr != null) { sb.append("cidr:"); sb.append(cidr + ","); } + if (except != null && !except.isEmpty()) { sb.append("except:"); sb.append(except); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockFluentImpl.java deleted file mode 100644 index 085ceaeadb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IPBlockFluentImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IPBlockFluentImpl> extends BaseFluent implements V1IPBlockFluent{ - public V1IPBlockFluentImpl() { - } - public V1IPBlockFluentImpl(V1IPBlock instance) { - if (instance != null) { - this.withCidr(instance.getCidr()); - this.withExcept(instance.getExcept()); - } - } - private String cidr; - private List except; - public String getCidr() { - return this.cidr; - } - public A withCidr(String cidr) { - this.cidr=cidr; return (A) this; - } - public Boolean hasCidr() { - return this.cidr != null; - } - public A addToExcept(int index,String item) { - if (this.except == null) {this.except = new ArrayList();} - this.except.add(index, item); - return (A)this; - } - public A setToExcept(int index,String item) { - if (this.except == null) {this.except = new ArrayList();} - this.except.set(index, item); return (A)this; - } - public A addToExcept(java.lang.String... items) { - if (this.except == null) {this.except = new ArrayList();} - for (String item : items) {this.except.add(item);} return (A)this; - } - public A addAllToExcept(Collection items) { - if (this.except == null) {this.except = new ArrayList();} - for (String item : items) {this.except.add(item);} return (A)this; - } - public A removeFromExcept(java.lang.String... items) { - for (String item : items) {if (this.except!= null){ this.except.remove(item);}} return (A)this; - } - public A removeAllFromExcept(Collection items) { - for (String item : items) {if (this.except!= null){ this.except.remove(item);}} return (A)this; - } - public List getExcept() { - return this.except; - } - public String getExcept(int index) { - return this.except.get(index); - } - public String getFirstExcept() { - return this.except.get(0); - } - public String getLastExcept() { - return this.except.get(except.size() - 1); - } - public String getMatchingExcept(Predicate predicate) { - for (String item: except) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingExcept(Predicate predicate) { - for (String item: except) { if(predicate.test(item)){ return true;} } return false; - } - public A withExcept(List except) { - if (except != null) {this.except = new ArrayList(); for (String item : except){this.addToExcept(item);}} else { this.except = null;} return (A) this; - } - public A withExcept(java.lang.String... except) { - if (this.except != null) {this.except.clear(); _visitables.remove("except"); } - if (except != null) {for (String item :except){ this.addToExcept(item);}} return (A) this; - } - public Boolean hasExcept() { - return except != null && !except.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IPBlockFluentImpl that = (V1IPBlockFluentImpl) o; - if (!java.util.Objects.equals(cidr, that.cidr)) return false; - - if (!java.util.Objects.equals(except, that.except)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(cidr, except, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (cidr != null) { sb.append("cidr:"); sb.append(cidr + ","); } - if (except != null && !except.isEmpty()) { sb.append("except:"); sb.append(except); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceBuilder.java index 6bb12e5aed..335f4a97de 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceBuilder.java @@ -1,62 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ISCSIPersistentVolumeSourceBuilder extends V1ISCSIPersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1ISCSIPersistentVolumeSourceBuilder extends V1ISCSIPersistentVolumeSourceFluent implements VisitableBuilder{ public V1ISCSIPersistentVolumeSourceBuilder() { - this(false); - } - public V1ISCSIPersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1ISCSIPersistentVolumeSource(), validationEnabled); + this(new V1ISCSIPersistentVolumeSource()); } + public V1ISCSIPersistentVolumeSourceBuilder(V1ISCSIPersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1ISCSIPersistentVolumeSourceBuilder(V1ISCSIPersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ISCSIPersistentVolumeSource(), validationEnabled); + this(fluent, new V1ISCSIPersistentVolumeSource()); } + public V1ISCSIPersistentVolumeSourceBuilder(V1ISCSIPersistentVolumeSourceFluent fluent,V1ISCSIPersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1ISCSIPersistentVolumeSourceBuilder(V1ISCSIPersistentVolumeSourceFluent fluent,V1ISCSIPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withChapAuthDiscovery(instance.getChapAuthDiscovery()); - fluent.withChapAuthSession(instance.getChapAuthSession()); - fluent.withFsType(instance.getFsType()); - fluent.withInitiatorName(instance.getInitiatorName()); - fluent.withIqn(instance.getIqn()); - fluent.withIscsiInterface(instance.getIscsiInterface()); - fluent.withLun(instance.getLun()); - fluent.withPortals(instance.getPortals()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withTargetPortal(instance.getTargetPortal()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ISCSIPersistentVolumeSourceBuilder(V1ISCSIPersistentVolumeSource instance) { - this(instance,false); - } - public V1ISCSIPersistentVolumeSourceBuilder(V1ISCSIPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withChapAuthDiscovery(instance.getChapAuthDiscovery()); - this.withChapAuthSession(instance.getChapAuthSession()); - this.withFsType(instance.getFsType()); - this.withInitiatorName(instance.getInitiatorName()); - this.withIqn(instance.getIqn()); - this.withIscsiInterface(instance.getIscsiInterface()); - this.withLun(instance.getLun()); - this.withPortals(instance.getPortals()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withTargetPortal(instance.getTargetPortal()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ISCSIPersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1ISCSIPersistentVolumeSource build() { V1ISCSIPersistentVolumeSource buildable = new V1ISCSIPersistentVolumeSource(); buildable.setChapAuthDiscovery(fluent.getChapAuthDiscovery()); @@ -68,9 +32,10 @@ public V1ISCSIPersistentVolumeSource build() { buildable.setLun(fluent.getLun()); buildable.setPortals(fluent.getPortals()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setTargetPortal(fluent.getTargetPortal()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceFluent.java index 70d3efba19..bb0e0d9ca0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceFluent.java @@ -1,85 +1,375 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1ISCSIPersistentVolumeSourceFluent> extends Fluent{ - public Boolean getChapAuthDiscovery(); - public A withChapAuthDiscovery(Boolean chapAuthDiscovery); - public Boolean hasChapAuthDiscovery(); - public Boolean getChapAuthSession(); - public A withChapAuthSession(Boolean chapAuthSession); - public Boolean hasChapAuthSession(); - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getInitiatorName(); - public A withInitiatorName(String initiatorName); - public Boolean hasInitiatorName(); - public String getIqn(); - public A withIqn(String iqn); - public Boolean hasIqn(); - public String getIscsiInterface(); - public A withIscsiInterface(String iscsiInterface); - public Boolean hasIscsiInterface(); - public Integer getLun(); - public A withLun(Integer lun); - public Boolean hasLun(); - public A addToPortals(int index,String item); - public A setToPortals(int index,String item); - public A addToPortals(java.lang.String... items); - public A addAllToPortals(Collection items); - public A removeFromPortals(java.lang.String... items); - public A removeAllFromPortals(Collection items); - public List getPortals(); - public String getPortal(int index); - public String getFirstPortal(); - public String getLastPortal(); - public String getMatchingPortal(Predicate predicate); - public Boolean hasMatchingPortal(Predicate predicate); - public A withPortals(List portals); - public A withPortals(java.lang.String... portals); - public Boolean hasPortals(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef(); - public V1SecretReference buildSecretRef(); - public A withSecretRef(V1SecretReference secretRef); - public Boolean hasSecretRef(); - public V1ISCSIPersistentVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1ISCSIPersistentVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1SecretReference item); - public V1ISCSIPersistentVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1ISCSIPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1ISCSIPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1SecretReference item); - public String getTargetPortal(); - public A withTargetPortal(String targetPortal); - public Boolean hasTargetPortal(); - public A withChapAuthDiscovery(); - public A withChapAuthSession(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ISCSIPersistentVolumeSourceFluent> extends BaseFluent{ + public V1ISCSIPersistentVolumeSourceFluent() { + } + + public V1ISCSIPersistentVolumeSourceFluent(V1ISCSIPersistentVolumeSource instance) { + this.copyInstance(instance); + } + private Boolean chapAuthDiscovery; + private Boolean chapAuthSession; + private String fsType; + private String initiatorName; + private String iqn; + private String iscsiInterface; + private Integer lun; + private List portals; + private Boolean readOnly; + private V1SecretReferenceBuilder secretRef; + private String targetPortal; + + protected void copyInstance(V1ISCSIPersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1ISCSIPersistentVolumeSource()); + if (instance != null) { + this.withChapAuthDiscovery(instance.getChapAuthDiscovery()); + this.withChapAuthSession(instance.getChapAuthSession()); + this.withFsType(instance.getFsType()); + this.withInitiatorName(instance.getInitiatorName()); + this.withIqn(instance.getIqn()); + this.withIscsiInterface(instance.getIscsiInterface()); + this.withLun(instance.getLun()); + this.withPortals(instance.getPortals()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withTargetPortal(instance.getTargetPortal()); + } + } + + public Boolean getChapAuthDiscovery() { + return this.chapAuthDiscovery; + } + + public A withChapAuthDiscovery(Boolean chapAuthDiscovery) { + this.chapAuthDiscovery = chapAuthDiscovery; + return (A) this; + } + + public boolean hasChapAuthDiscovery() { + return this.chapAuthDiscovery != null; + } + + public Boolean getChapAuthSession() { + return this.chapAuthSession; + } + + public A withChapAuthSession(Boolean chapAuthSession) { + this.chapAuthSession = chapAuthSession; + return (A) this; + } + + public boolean hasChapAuthSession() { + return this.chapAuthSession != null; + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getInitiatorName() { + return this.initiatorName; + } + + public A withInitiatorName(String initiatorName) { + this.initiatorName = initiatorName; + return (A) this; + } + + public boolean hasInitiatorName() { + return this.initiatorName != null; + } + + public String getIqn() { + return this.iqn; + } + + public A withIqn(String iqn) { + this.iqn = iqn; + return (A) this; + } + + public boolean hasIqn() { + return this.iqn != null; + } + + public String getIscsiInterface() { + return this.iscsiInterface; + } + + public A withIscsiInterface(String iscsiInterface) { + this.iscsiInterface = iscsiInterface; + return (A) this; + } + + public boolean hasIscsiInterface() { + return this.iscsiInterface != null; + } + + public Integer getLun() { + return this.lun; + } + + public A withLun(Integer lun) { + this.lun = lun; + return (A) this; + } + + public boolean hasLun() { + return this.lun != null; + } + + public A addToPortals(int index,String item) { + if (this.portals == null) {this.portals = new ArrayList();} + this.portals.add(index, item); + return (A)this; + } + + public A setToPortals(int index,String item) { + if (this.portals == null) {this.portals = new ArrayList();} + this.portals.set(index, item); return (A)this; + } + + public A addToPortals(java.lang.String... items) { + if (this.portals == null) {this.portals = new ArrayList();} + for (String item : items) {this.portals.add(item);} return (A)this; + } + + public A addAllToPortals(Collection items) { + if (this.portals == null) {this.portals = new ArrayList();} + for (String item : items) {this.portals.add(item);} return (A)this; + } + + public A removeFromPortals(java.lang.String... items) { + if (this.portals == null) return (A)this; + for (String item : items) { this.portals.remove(item);} return (A)this; + } + + public A removeAllFromPortals(Collection items) { + if (this.portals == null) return (A)this; + for (String item : items) { this.portals.remove(item);} return (A)this; + } + + public List getPortals() { + return this.portals; } + public String getPortal(int index) { + return this.portals.get(index); + } + + public String getFirstPortal() { + return this.portals.get(0); + } + + public String getLastPortal() { + return this.portals.get(portals.size() - 1); + } + + public String getMatchingPortal(Predicate predicate) { + for (String item : portals) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingPortal(Predicate predicate) { + for (String item : portals) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPortals(List portals) { + if (portals != null) { + this.portals = new ArrayList(); + for (String item : portals) { + this.addToPortals(item); + } + } else { + this.portals = null; + } + return (A) this; + } + + public A withPortals(java.lang.String... portals) { + if (this.portals != null) { + this.portals.clear(); + _visitables.remove("portals"); + } + if (portals != null) { + for (String item : portals) { + this.addToPortals(item); + } + } + return (A) this; + } + + public boolean hasPortals() { + return this.portals != null && !this.portals.isEmpty(); + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1SecretReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1SecretReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1SecretReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1SecretReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getTargetPortal() { + return this.targetPortal; + } + + public A withTargetPortal(String targetPortal) { + this.targetPortal = targetPortal; + return (A) this; + } + + public boolean hasTargetPortal() { + return this.targetPortal != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ISCSIPersistentVolumeSourceFluent that = (V1ISCSIPersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(chapAuthDiscovery, that.chapAuthDiscovery)) return false; + if (!java.util.Objects.equals(chapAuthSession, that.chapAuthSession)) return false; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(initiatorName, that.initiatorName)) return false; + if (!java.util.Objects.equals(iqn, that.iqn)) return false; + if (!java.util.Objects.equals(iscsiInterface, that.iscsiInterface)) return false; + if (!java.util.Objects.equals(lun, that.lun)) return false; + if (!java.util.Objects.equals(portals, that.portals)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(targetPortal, that.targetPortal)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(chapAuthDiscovery, chapAuthSession, fsType, initiatorName, iqn, iscsiInterface, lun, portals, readOnly, secretRef, targetPortal, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (chapAuthDiscovery != null) { sb.append("chapAuthDiscovery:"); sb.append(chapAuthDiscovery + ","); } + if (chapAuthSession != null) { sb.append("chapAuthSession:"); sb.append(chapAuthSession + ","); } + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (initiatorName != null) { sb.append("initiatorName:"); sb.append(initiatorName + ","); } + if (iqn != null) { sb.append("iqn:"); sb.append(iqn + ","); } + if (iscsiInterface != null) { sb.append("iscsiInterface:"); sb.append(iscsiInterface + ","); } + if (lun != null) { sb.append("lun:"); sb.append(lun + ","); } + if (portals != null && !portals.isEmpty()) { sb.append("portals:"); sb.append(portals + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (targetPortal != null) { sb.append("targetPortal:"); sb.append(targetPortal); } + sb.append("}"); + return sb.toString(); + } + + public A withChapAuthDiscovery() { + return withChapAuthDiscovery(true); + } + + public A withChapAuthSession() { + return withChapAuthSession(true); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1SecretReferenceFluent> implements Nested{ + SecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1ISCSIPersistentVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceFluentImpl.java deleted file mode 100644 index acd03c5171..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIPersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,290 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ISCSIPersistentVolumeSourceFluentImpl> extends BaseFluent implements V1ISCSIPersistentVolumeSourceFluent{ - public V1ISCSIPersistentVolumeSourceFluentImpl() { - } - public V1ISCSIPersistentVolumeSourceFluentImpl(V1ISCSIPersistentVolumeSource instance) { - if (instance != null) { - this.withChapAuthDiscovery(instance.getChapAuthDiscovery()); - this.withChapAuthSession(instance.getChapAuthSession()); - this.withFsType(instance.getFsType()); - this.withInitiatorName(instance.getInitiatorName()); - this.withIqn(instance.getIqn()); - this.withIscsiInterface(instance.getIscsiInterface()); - this.withLun(instance.getLun()); - this.withPortals(instance.getPortals()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withTargetPortal(instance.getTargetPortal()); - } - } - private Boolean chapAuthDiscovery; - private Boolean chapAuthSession; - private String fsType; - private String initiatorName; - private String iqn; - private String iscsiInterface; - private Integer lun; - private List portals; - private Boolean readOnly; - private V1SecretReferenceBuilder secretRef; - private String targetPortal; - public Boolean getChapAuthDiscovery() { - return this.chapAuthDiscovery; - } - public A withChapAuthDiscovery(Boolean chapAuthDiscovery) { - this.chapAuthDiscovery=chapAuthDiscovery; return (A) this; - } - public Boolean hasChapAuthDiscovery() { - return this.chapAuthDiscovery != null; - } - public Boolean getChapAuthSession() { - return this.chapAuthSession; - } - public A withChapAuthSession(Boolean chapAuthSession) { - this.chapAuthSession=chapAuthSession; return (A) this; - } - public Boolean hasChapAuthSession() { - return this.chapAuthSession != null; - } - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getInitiatorName() { - return this.initiatorName; - } - public A withInitiatorName(String initiatorName) { - this.initiatorName=initiatorName; return (A) this; - } - public Boolean hasInitiatorName() { - return this.initiatorName != null; - } - public String getIqn() { - return this.iqn; - } - public A withIqn(String iqn) { - this.iqn=iqn; return (A) this; - } - public Boolean hasIqn() { - return this.iqn != null; - } - public String getIscsiInterface() { - return this.iscsiInterface; - } - public A withIscsiInterface(String iscsiInterface) { - this.iscsiInterface=iscsiInterface; return (A) this; - } - public Boolean hasIscsiInterface() { - return this.iscsiInterface != null; - } - public Integer getLun() { - return this.lun; - } - public A withLun(Integer lun) { - this.lun=lun; return (A) this; - } - public Boolean hasLun() { - return this.lun != null; - } - public A addToPortals(int index,String item) { - if (this.portals == null) {this.portals = new ArrayList();} - this.portals.add(index, item); - return (A)this; - } - public A setToPortals(int index,String item) { - if (this.portals == null) {this.portals = new ArrayList();} - this.portals.set(index, item); return (A)this; - } - public A addToPortals(java.lang.String... items) { - if (this.portals == null) {this.portals = new ArrayList();} - for (String item : items) {this.portals.add(item);} return (A)this; - } - public A addAllToPortals(Collection items) { - if (this.portals == null) {this.portals = new ArrayList();} - for (String item : items) {this.portals.add(item);} return (A)this; - } - public A removeFromPortals(java.lang.String... items) { - for (String item : items) {if (this.portals!= null){ this.portals.remove(item);}} return (A)this; - } - public A removeAllFromPortals(Collection items) { - for (String item : items) {if (this.portals!= null){ this.portals.remove(item);}} return (A)this; - } - public List getPortals() { - return this.portals; - } - public String getPortal(int index) { - return this.portals.get(index); - } - public String getFirstPortal() { - return this.portals.get(0); - } - public String getLastPortal() { - return this.portals.get(portals.size() - 1); - } - public String getMatchingPortal(Predicate predicate) { - for (String item: portals) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingPortal(Predicate predicate) { - for (String item: portals) { if(predicate.test(item)){ return true;} } return false; - } - public A withPortals(List portals) { - if (portals != null) {this.portals = new ArrayList(); for (String item : portals){this.addToPortals(item);}} else { this.portals = null;} return (A) this; - } - public A withPortals(java.lang.String... portals) { - if (this.portals != null) {this.portals.clear(); _visitables.remove("portals"); } - if (portals != null) {for (String item :portals){ this.addToPortals(item);}} return (A) this; - } - public Boolean hasPortals() { - return portals != null && !portals.isEmpty(); - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1SecretReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1SecretReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1SecretReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1ISCSIPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1ISCSIPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1ISCSIPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1SecretReference item) { - return new V1ISCSIPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1ISCSIPersistentVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1ISCSIPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1ISCSIPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getTargetPortal() { - return this.targetPortal; - } - public A withTargetPortal(String targetPortal) { - this.targetPortal=targetPortal; return (A) this; - } - public Boolean hasTargetPortal() { - return this.targetPortal != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ISCSIPersistentVolumeSourceFluentImpl that = (V1ISCSIPersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(chapAuthDiscovery, that.chapAuthDiscovery)) return false; - - if (!java.util.Objects.equals(chapAuthSession, that.chapAuthSession)) return false; - - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(initiatorName, that.initiatorName)) return false; - - if (!java.util.Objects.equals(iqn, that.iqn)) return false; - - if (!java.util.Objects.equals(iscsiInterface, that.iscsiInterface)) return false; - - if (!java.util.Objects.equals(lun, that.lun)) return false; - - if (!java.util.Objects.equals(portals, that.portals)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(targetPortal, that.targetPortal)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(chapAuthDiscovery, chapAuthSession, fsType, initiatorName, iqn, iscsiInterface, lun, portals, readOnly, secretRef, targetPortal, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (chapAuthDiscovery != null) { sb.append("chapAuthDiscovery:"); sb.append(chapAuthDiscovery + ","); } - if (chapAuthSession != null) { sb.append("chapAuthSession:"); sb.append(chapAuthSession + ","); } - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (initiatorName != null) { sb.append("initiatorName:"); sb.append(initiatorName + ","); } - if (iqn != null) { sb.append("iqn:"); sb.append(iqn + ","); } - if (iscsiInterface != null) { sb.append("iscsiInterface:"); sb.append(iscsiInterface + ","); } - if (lun != null) { sb.append("lun:"); sb.append(lun + ","); } - if (portals != null && !portals.isEmpty()) { sb.append("portals:"); sb.append(portals + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (targetPortal != null) { sb.append("targetPortal:"); sb.append(targetPortal); } - sb.append("}"); - return sb.toString(); - } - public A withChapAuthDiscovery() { - return withChapAuthDiscovery(true); - } - public A withChapAuthSession() { - return withChapAuthSession(true); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1ISCSIPersistentVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1ISCSIPersistentVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceBuilder.java index c57a5a4e69..1a68f91b10 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceBuilder.java @@ -1,62 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ISCSIVolumeSourceBuilder extends V1ISCSIVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1ISCSIVolumeSourceBuilder extends V1ISCSIVolumeSourceFluent implements VisitableBuilder{ public V1ISCSIVolumeSourceBuilder() { - this(false); - } - public V1ISCSIVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1ISCSIVolumeSource(), validationEnabled); + this(new V1ISCSIVolumeSource()); } + public V1ISCSIVolumeSourceBuilder(V1ISCSIVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1ISCSIVolumeSourceBuilder(V1ISCSIVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ISCSIVolumeSource(), validationEnabled); + this(fluent, new V1ISCSIVolumeSource()); } + public V1ISCSIVolumeSourceBuilder(V1ISCSIVolumeSourceFluent fluent,V1ISCSIVolumeSource instance) { - this(fluent, instance, false); - } - public V1ISCSIVolumeSourceBuilder(V1ISCSIVolumeSourceFluent fluent,V1ISCSIVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withChapAuthDiscovery(instance.getChapAuthDiscovery()); - fluent.withChapAuthSession(instance.getChapAuthSession()); - fluent.withFsType(instance.getFsType()); - fluent.withInitiatorName(instance.getInitiatorName()); - fluent.withIqn(instance.getIqn()); - fluent.withIscsiInterface(instance.getIscsiInterface()); - fluent.withLun(instance.getLun()); - fluent.withPortals(instance.getPortals()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withTargetPortal(instance.getTargetPortal()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ISCSIVolumeSourceBuilder(V1ISCSIVolumeSource instance) { - this(instance,false); - } - public V1ISCSIVolumeSourceBuilder(V1ISCSIVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withChapAuthDiscovery(instance.getChapAuthDiscovery()); - this.withChapAuthSession(instance.getChapAuthSession()); - this.withFsType(instance.getFsType()); - this.withInitiatorName(instance.getInitiatorName()); - this.withIqn(instance.getIqn()); - this.withIscsiInterface(instance.getIscsiInterface()); - this.withLun(instance.getLun()); - this.withPortals(instance.getPortals()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withTargetPortal(instance.getTargetPortal()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ISCSIVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1ISCSIVolumeSource build() { V1ISCSIVolumeSource buildable = new V1ISCSIVolumeSource(); buildable.setChapAuthDiscovery(fluent.getChapAuthDiscovery()); @@ -68,9 +32,10 @@ public V1ISCSIVolumeSource build() { buildable.setLun(fluent.getLun()); buildable.setPortals(fluent.getPortals()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setTargetPortal(fluent.getTargetPortal()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceFluent.java index 4b424e4e8d..25e08b2047 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceFluent.java @@ -1,85 +1,375 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1ISCSIVolumeSourceFluent> extends Fluent{ - public Boolean getChapAuthDiscovery(); - public A withChapAuthDiscovery(Boolean chapAuthDiscovery); - public Boolean hasChapAuthDiscovery(); - public Boolean getChapAuthSession(); - public A withChapAuthSession(Boolean chapAuthSession); - public Boolean hasChapAuthSession(); - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getInitiatorName(); - public A withInitiatorName(String initiatorName); - public Boolean hasInitiatorName(); - public String getIqn(); - public A withIqn(String iqn); - public Boolean hasIqn(); - public String getIscsiInterface(); - public A withIscsiInterface(String iscsiInterface); - public Boolean hasIscsiInterface(); - public Integer getLun(); - public A withLun(Integer lun); - public Boolean hasLun(); - public A addToPortals(int index,String item); - public A setToPortals(int index,String item); - public A addToPortals(java.lang.String... items); - public A addAllToPortals(Collection items); - public A removeFromPortals(java.lang.String... items); - public A removeAllFromPortals(Collection items); - public List getPortals(); - public String getPortal(int index); - public String getFirstPortal(); - public String getLastPortal(); - public String getMatchingPortal(Predicate predicate); - public Boolean hasMatchingPortal(Predicate predicate); - public A withPortals(List portals); - public A withPortals(java.lang.String... portals); - public Boolean hasPortals(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef(); - public V1LocalObjectReference buildSecretRef(); - public A withSecretRef(V1LocalObjectReference secretRef); - public Boolean hasSecretRef(); - public V1ISCSIVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1ISCSIVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item); - public V1ISCSIVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1ISCSIVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1ISCSIVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item); - public String getTargetPortal(); - public A withTargetPortal(String targetPortal); - public Boolean hasTargetPortal(); - public A withChapAuthDiscovery(); - public A withChapAuthSession(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ISCSIVolumeSourceFluent> extends BaseFluent{ + public V1ISCSIVolumeSourceFluent() { + } + + public V1ISCSIVolumeSourceFluent(V1ISCSIVolumeSource instance) { + this.copyInstance(instance); + } + private Boolean chapAuthDiscovery; + private Boolean chapAuthSession; + private String fsType; + private String initiatorName; + private String iqn; + private String iscsiInterface; + private Integer lun; + private List portals; + private Boolean readOnly; + private V1LocalObjectReferenceBuilder secretRef; + private String targetPortal; + + protected void copyInstance(V1ISCSIVolumeSource instance) { + instance = (instance != null ? instance : new V1ISCSIVolumeSource()); + if (instance != null) { + this.withChapAuthDiscovery(instance.getChapAuthDiscovery()); + this.withChapAuthSession(instance.getChapAuthSession()); + this.withFsType(instance.getFsType()); + this.withInitiatorName(instance.getInitiatorName()); + this.withIqn(instance.getIqn()); + this.withIscsiInterface(instance.getIscsiInterface()); + this.withLun(instance.getLun()); + this.withPortals(instance.getPortals()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withTargetPortal(instance.getTargetPortal()); + } + } + + public Boolean getChapAuthDiscovery() { + return this.chapAuthDiscovery; + } + + public A withChapAuthDiscovery(Boolean chapAuthDiscovery) { + this.chapAuthDiscovery = chapAuthDiscovery; + return (A) this; + } + + public boolean hasChapAuthDiscovery() { + return this.chapAuthDiscovery != null; + } + + public Boolean getChapAuthSession() { + return this.chapAuthSession; + } + + public A withChapAuthSession(Boolean chapAuthSession) { + this.chapAuthSession = chapAuthSession; + return (A) this; + } + + public boolean hasChapAuthSession() { + return this.chapAuthSession != null; + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getInitiatorName() { + return this.initiatorName; + } + + public A withInitiatorName(String initiatorName) { + this.initiatorName = initiatorName; + return (A) this; + } + + public boolean hasInitiatorName() { + return this.initiatorName != null; + } + + public String getIqn() { + return this.iqn; + } + + public A withIqn(String iqn) { + this.iqn = iqn; + return (A) this; + } + + public boolean hasIqn() { + return this.iqn != null; + } + + public String getIscsiInterface() { + return this.iscsiInterface; + } + + public A withIscsiInterface(String iscsiInterface) { + this.iscsiInterface = iscsiInterface; + return (A) this; + } + + public boolean hasIscsiInterface() { + return this.iscsiInterface != null; + } + + public Integer getLun() { + return this.lun; + } + + public A withLun(Integer lun) { + this.lun = lun; + return (A) this; + } + + public boolean hasLun() { + return this.lun != null; + } + + public A addToPortals(int index,String item) { + if (this.portals == null) {this.portals = new ArrayList();} + this.portals.add(index, item); + return (A)this; + } + + public A setToPortals(int index,String item) { + if (this.portals == null) {this.portals = new ArrayList();} + this.portals.set(index, item); return (A)this; + } + + public A addToPortals(java.lang.String... items) { + if (this.portals == null) {this.portals = new ArrayList();} + for (String item : items) {this.portals.add(item);} return (A)this; + } + + public A addAllToPortals(Collection items) { + if (this.portals == null) {this.portals = new ArrayList();} + for (String item : items) {this.portals.add(item);} return (A)this; + } + + public A removeFromPortals(java.lang.String... items) { + if (this.portals == null) return (A)this; + for (String item : items) { this.portals.remove(item);} return (A)this; + } + + public A removeAllFromPortals(Collection items) { + if (this.portals == null) return (A)this; + for (String item : items) { this.portals.remove(item);} return (A)this; + } + + public List getPortals() { + return this.portals; } + public String getPortal(int index) { + return this.portals.get(index); + } + + public String getFirstPortal() { + return this.portals.get(0); + } + + public String getLastPortal() { + return this.portals.get(portals.size() - 1); + } + + public String getMatchingPortal(Predicate predicate) { + for (String item : portals) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingPortal(Predicate predicate) { + for (String item : portals) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPortals(List portals) { + if (portals != null) { + this.portals = new ArrayList(); + for (String item : portals) { + this.addToPortals(item); + } + } else { + this.portals = null; + } + return (A) this; + } + + public A withPortals(java.lang.String... portals) { + if (this.portals != null) { + this.portals.clear(); + _visitables.remove("portals"); + } + if (portals != null) { + for (String item : portals) { + this.addToPortals(item); + } + } + return (A) this; + } + + public boolean hasPortals() { + return this.portals != null && !this.portals.isEmpty(); + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1LocalObjectReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1LocalObjectReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1LocalObjectReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1LocalObjectReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getTargetPortal() { + return this.targetPortal; + } + + public A withTargetPortal(String targetPortal) { + this.targetPortal = targetPortal; + return (A) this; + } + + public boolean hasTargetPortal() { + return this.targetPortal != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ISCSIVolumeSourceFluent that = (V1ISCSIVolumeSourceFluent) o; + if (!java.util.Objects.equals(chapAuthDiscovery, that.chapAuthDiscovery)) return false; + if (!java.util.Objects.equals(chapAuthSession, that.chapAuthSession)) return false; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(initiatorName, that.initiatorName)) return false; + if (!java.util.Objects.equals(iqn, that.iqn)) return false; + if (!java.util.Objects.equals(iscsiInterface, that.iscsiInterface)) return false; + if (!java.util.Objects.equals(lun, that.lun)) return false; + if (!java.util.Objects.equals(portals, that.portals)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(targetPortal, that.targetPortal)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(chapAuthDiscovery, chapAuthSession, fsType, initiatorName, iqn, iscsiInterface, lun, portals, readOnly, secretRef, targetPortal, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (chapAuthDiscovery != null) { sb.append("chapAuthDiscovery:"); sb.append(chapAuthDiscovery + ","); } + if (chapAuthSession != null) { sb.append("chapAuthSession:"); sb.append(chapAuthSession + ","); } + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (initiatorName != null) { sb.append("initiatorName:"); sb.append(initiatorName + ","); } + if (iqn != null) { sb.append("iqn:"); sb.append(iqn + ","); } + if (iscsiInterface != null) { sb.append("iscsiInterface:"); sb.append(iscsiInterface + ","); } + if (lun != null) { sb.append("lun:"); sb.append(lun + ","); } + if (portals != null && !portals.isEmpty()) { sb.append("portals:"); sb.append(portals + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (targetPortal != null) { sb.append("targetPortal:"); sb.append(targetPortal); } + sb.append("}"); + return sb.toString(); + } + + public A withChapAuthDiscovery() { + return withChapAuthDiscovery(true); + } + + public A withChapAuthSession() { + return withChapAuthSession(true); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1LocalObjectReferenceFluent> implements Nested{ + SecretRefNested(V1LocalObjectReference item) { + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1ISCSIVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceFluentImpl.java deleted file mode 100644 index ad0cd0c6e8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ISCSIVolumeSourceFluentImpl.java +++ /dev/null @@ -1,290 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ISCSIVolumeSourceFluentImpl> extends BaseFluent implements V1ISCSIVolumeSourceFluent{ - public V1ISCSIVolumeSourceFluentImpl() { - } - public V1ISCSIVolumeSourceFluentImpl(V1ISCSIVolumeSource instance) { - if (instance != null) { - this.withChapAuthDiscovery(instance.getChapAuthDiscovery()); - this.withChapAuthSession(instance.getChapAuthSession()); - this.withFsType(instance.getFsType()); - this.withInitiatorName(instance.getInitiatorName()); - this.withIqn(instance.getIqn()); - this.withIscsiInterface(instance.getIscsiInterface()); - this.withLun(instance.getLun()); - this.withPortals(instance.getPortals()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withTargetPortal(instance.getTargetPortal()); - } - } - private Boolean chapAuthDiscovery; - private Boolean chapAuthSession; - private String fsType; - private String initiatorName; - private String iqn; - private String iscsiInterface; - private Integer lun; - private List portals; - private Boolean readOnly; - private V1LocalObjectReferenceBuilder secretRef; - private String targetPortal; - public Boolean getChapAuthDiscovery() { - return this.chapAuthDiscovery; - } - public A withChapAuthDiscovery(Boolean chapAuthDiscovery) { - this.chapAuthDiscovery=chapAuthDiscovery; return (A) this; - } - public Boolean hasChapAuthDiscovery() { - return this.chapAuthDiscovery != null; - } - public Boolean getChapAuthSession() { - return this.chapAuthSession; - } - public A withChapAuthSession(Boolean chapAuthSession) { - this.chapAuthSession=chapAuthSession; return (A) this; - } - public Boolean hasChapAuthSession() { - return this.chapAuthSession != null; - } - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getInitiatorName() { - return this.initiatorName; - } - public A withInitiatorName(String initiatorName) { - this.initiatorName=initiatorName; return (A) this; - } - public Boolean hasInitiatorName() { - return this.initiatorName != null; - } - public String getIqn() { - return this.iqn; - } - public A withIqn(String iqn) { - this.iqn=iqn; return (A) this; - } - public Boolean hasIqn() { - return this.iqn != null; - } - public String getIscsiInterface() { - return this.iscsiInterface; - } - public A withIscsiInterface(String iscsiInterface) { - this.iscsiInterface=iscsiInterface; return (A) this; - } - public Boolean hasIscsiInterface() { - return this.iscsiInterface != null; - } - public Integer getLun() { - return this.lun; - } - public A withLun(Integer lun) { - this.lun=lun; return (A) this; - } - public Boolean hasLun() { - return this.lun != null; - } - public A addToPortals(int index,String item) { - if (this.portals == null) {this.portals = new ArrayList();} - this.portals.add(index, item); - return (A)this; - } - public A setToPortals(int index,String item) { - if (this.portals == null) {this.portals = new ArrayList();} - this.portals.set(index, item); return (A)this; - } - public A addToPortals(java.lang.String... items) { - if (this.portals == null) {this.portals = new ArrayList();} - for (String item : items) {this.portals.add(item);} return (A)this; - } - public A addAllToPortals(Collection items) { - if (this.portals == null) {this.portals = new ArrayList();} - for (String item : items) {this.portals.add(item);} return (A)this; - } - public A removeFromPortals(java.lang.String... items) { - for (String item : items) {if (this.portals!= null){ this.portals.remove(item);}} return (A)this; - } - public A removeAllFromPortals(Collection items) { - for (String item : items) {if (this.portals!= null){ this.portals.remove(item);}} return (A)this; - } - public List getPortals() { - return this.portals; - } - public String getPortal(int index) { - return this.portals.get(index); - } - public String getFirstPortal() { - return this.portals.get(0); - } - public String getLastPortal() { - return this.portals.get(portals.size() - 1); - } - public String getMatchingPortal(Predicate predicate) { - for (String item: portals) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingPortal(Predicate predicate) { - for (String item: portals) { if(predicate.test(item)){ return true;} } return false; - } - public A withPortals(List portals) { - if (portals != null) {this.portals = new ArrayList(); for (String item : portals){this.addToPortals(item);}} else { this.portals = null;} return (A) this; - } - public A withPortals(java.lang.String... portals) { - if (this.portals != null) {this.portals.clear(); _visitables.remove("portals"); } - if (portals != null) {for (String item :portals){ this.addToPortals(item);}} return (A) this; - } - public Boolean hasPortals() { - return portals != null && !portals.isEmpty(); - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1LocalObjectReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1LocalObjectReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1LocalObjectReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1ISCSIVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1ISCSIVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1ISCSIVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { - return new V1ISCSIVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1ISCSIVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1ISCSIVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1LocalObjectReferenceBuilder().build()); - } - public V1ISCSIVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getTargetPortal() { - return this.targetPortal; - } - public A withTargetPortal(String targetPortal) { - this.targetPortal=targetPortal; return (A) this; - } - public Boolean hasTargetPortal() { - return this.targetPortal != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ISCSIVolumeSourceFluentImpl that = (V1ISCSIVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(chapAuthDiscovery, that.chapAuthDiscovery)) return false; - - if (!java.util.Objects.equals(chapAuthSession, that.chapAuthSession)) return false; - - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(initiatorName, that.initiatorName)) return false; - - if (!java.util.Objects.equals(iqn, that.iqn)) return false; - - if (!java.util.Objects.equals(iscsiInterface, that.iscsiInterface)) return false; - - if (!java.util.Objects.equals(lun, that.lun)) return false; - - if (!java.util.Objects.equals(portals, that.portals)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(targetPortal, that.targetPortal)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(chapAuthDiscovery, chapAuthSession, fsType, initiatorName, iqn, iscsiInterface, lun, portals, readOnly, secretRef, targetPortal, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (chapAuthDiscovery != null) { sb.append("chapAuthDiscovery:"); sb.append(chapAuthDiscovery + ","); } - if (chapAuthSession != null) { sb.append("chapAuthSession:"); sb.append(chapAuthSession + ","); } - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (initiatorName != null) { sb.append("initiatorName:"); sb.append(initiatorName + ","); } - if (iqn != null) { sb.append("iqn:"); sb.append(iqn + ","); } - if (iscsiInterface != null) { sb.append("iscsiInterface:"); sb.append(iscsiInterface + ","); } - if (lun != null) { sb.append("lun:"); sb.append(lun + ","); } - if (portals != null && !portals.isEmpty()) { sb.append("portals:"); sb.append(portals + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (targetPortal != null) { sb.append("targetPortal:"); sb.append(targetPortal); } - sb.append("}"); - return sb.toString(); - } - public A withChapAuthDiscovery() { - return withChapAuthDiscovery(true); - } - public A withChapAuthSession() { - return withChapAuthSession(true); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1ISCSIVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1LocalObjectReference item) { - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - public N and() { - return (N) V1ISCSIVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendBuilder.java index 57745c01ce..55903fef64 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressBackendBuilder extends V1IngressBackendFluentImpl implements VisitableBuilder{ +public class V1IngressBackendBuilder extends V1IngressBackendFluent implements VisitableBuilder{ public V1IngressBackendBuilder() { - this(false); - } - public V1IngressBackendBuilder(Boolean validationEnabled) { - this(new V1IngressBackend(), validationEnabled); + this(new V1IngressBackend()); } + public V1IngressBackendBuilder(V1IngressBackendFluent fluent) { - this(fluent, false); - } - public V1IngressBackendBuilder(V1IngressBackendFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressBackend(), validationEnabled); + this(fluent, new V1IngressBackend()); } + public V1IngressBackendBuilder(V1IngressBackendFluent fluent,V1IngressBackend instance) { - this(fluent, instance, false); - } - public V1IngressBackendBuilder(V1IngressBackendFluent fluent,V1IngressBackend instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withResource(instance.getResource()); - fluent.withService(instance.getService()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressBackendBuilder(V1IngressBackend instance) { - this(instance,false); - } - public V1IngressBackendBuilder(V1IngressBackend instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withResource(instance.getResource()); - this.withService(instance.getService()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressBackendFluent fluent; - Boolean validationEnabled; + public V1IngressBackend build() { V1IngressBackend buildable = new V1IngressBackend(); - buildable.setResource(fluent.getResource()); - buildable.setService(fluent.getService()); + buildable.setResource(fluent.buildResource()); + buildable.setService(fluent.buildService()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendFluent.java index 89e79315c3..abb82615fe 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1IngressBackendFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildResource instead. - * @return The buildable object. - */ - @Deprecated - public V1TypedLocalObjectReference getResource(); - public V1TypedLocalObjectReference buildResource(); - public A withResource(V1TypedLocalObjectReference resource); - public Boolean hasResource(); - public V1IngressBackendFluent.ResourceNested withNewResource(); - public V1IngressBackendFluent.ResourceNested withNewResourceLike(V1TypedLocalObjectReference item); - public V1IngressBackendFluent.ResourceNested editResource(); - public V1IngressBackendFluent.ResourceNested editOrNewResource(); - public V1IngressBackendFluent.ResourceNested editOrNewResourceLike(V1TypedLocalObjectReference item); - - /** - * This method has been deprecated, please use method buildService instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressServiceBackend getService(); - public V1IngressServiceBackend buildService(); - public A withService(V1IngressServiceBackend service); - public Boolean hasService(); - public V1IngressBackendFluent.ServiceNested withNewService(); - public V1IngressBackendFluent.ServiceNested withNewServiceLike(V1IngressServiceBackend item); - public V1IngressBackendFluent.ServiceNested editService(); - public V1IngressBackendFluent.ServiceNested editOrNewService(); - public V1IngressBackendFluent.ServiceNested editOrNewServiceLike(V1IngressServiceBackend item); - public interface ResourceNested extends Nested,V1TypedLocalObjectReferenceFluent>{ - public N and(); - public N endResource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressBackendFluent> extends BaseFluent{ + public V1IngressBackendFluent() { + } + + public V1IngressBackendFluent(V1IngressBackend instance) { + this.copyInstance(instance); + } + private V1TypedLocalObjectReferenceBuilder resource; + private V1IngressServiceBackendBuilder service; + + protected void copyInstance(V1IngressBackend instance) { + instance = (instance != null ? instance : new V1IngressBackend()); + if (instance != null) { + this.withResource(instance.getResource()); + this.withService(instance.getService()); + } + } + + public V1TypedLocalObjectReference buildResource() { + return this.resource != null ? this.resource.build() : null; + } + + public A withResource(V1TypedLocalObjectReference resource) { + this._visitables.remove("resource"); + if (resource != null) { + this.resource = new V1TypedLocalObjectReferenceBuilder(resource); + this._visitables.get("resource").add(this.resource); + } else { + this.resource = null; + this._visitables.get("resource").remove(this.resource); + } + return (A) this; + } + + public boolean hasResource() { + return this.resource != null; + } + + public ResourceNested withNewResource() { + return new ResourceNested(null); } - public interface ServiceNested extends Nested,V1IngressServiceBackendFluent>{ - public N and(); - public N endService(); + + public ResourceNested withNewResourceLike(V1TypedLocalObjectReference item) { + return new ResourceNested(item); + } + + public ResourceNested editResource() { + return withNewResourceLike(java.util.Optional.ofNullable(buildResource()).orElse(null)); + } + + public ResourceNested editOrNewResource() { + return withNewResourceLike(java.util.Optional.ofNullable(buildResource()).orElse(new V1TypedLocalObjectReferenceBuilder().build())); + } + + public ResourceNested editOrNewResourceLike(V1TypedLocalObjectReference item) { + return withNewResourceLike(java.util.Optional.ofNullable(buildResource()).orElse(item)); + } + + public V1IngressServiceBackend buildService() { + return this.service != null ? this.service.build() : null; + } + + public A withService(V1IngressServiceBackend service) { + this._visitables.remove("service"); + if (service != null) { + this.service = new V1IngressServiceBackendBuilder(service); + this._visitables.get("service").add(this.service); + } else { + this.service = null; + this._visitables.get("service").remove(this.service); + } + return (A) this; + } + + public boolean hasService() { + return this.service != null; + } + + public ServiceNested withNewService() { + return new ServiceNested(null); + } + + public ServiceNested withNewServiceLike(V1IngressServiceBackend item) { + return new ServiceNested(item); + } + + public ServiceNested editService() { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(null)); + } + + public ServiceNested editOrNewService() { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(new V1IngressServiceBackendBuilder().build())); + } + + public ServiceNested editOrNewServiceLike(V1IngressServiceBackend item) { + return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressBackendFluent that = (V1IngressBackendFluent) o; + if (!java.util.Objects.equals(resource, that.resource)) return false; + if (!java.util.Objects.equals(service, that.service)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(resource, service, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } + if (service != null) { sb.append("service:"); sb.append(service); } + sb.append("}"); + return sb.toString(); + } + public class ResourceNested extends V1TypedLocalObjectReferenceFluent> implements Nested{ + ResourceNested(V1TypedLocalObjectReference item) { + this.builder = new V1TypedLocalObjectReferenceBuilder(this, item); + } + V1TypedLocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1IngressBackendFluent.this.withResource(builder.build()); + } + + public N endResource() { + return and(); + } + } + public class ServiceNested extends V1IngressServiceBackendFluent> implements Nested{ + ServiceNested(V1IngressServiceBackend item) { + this.builder = new V1IngressServiceBackendBuilder(this, item); + } + V1IngressServiceBackendBuilder builder; + + public N and() { + return (N) V1IngressBackendFluent.this.withService(builder.build()); + } + + public N endService() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendFluentImpl.java deleted file mode 100644 index adf5a45b1c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBackendFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressBackendFluentImpl> extends BaseFluent implements V1IngressBackendFluent{ - public V1IngressBackendFluentImpl() { - } - public V1IngressBackendFluentImpl(V1IngressBackend instance) { - if (instance != null) { - this.withResource(instance.getResource()); - this.withService(instance.getService()); - } - } - private V1TypedLocalObjectReferenceBuilder resource; - private V1IngressServiceBackendBuilder service; - - /** - * This method has been deprecated, please use method buildResource instead. - * @return The buildable object. - */ - @Deprecated - public V1TypedLocalObjectReference getResource() { - return this.resource!=null ?this.resource.build():null; - } - public V1TypedLocalObjectReference buildResource() { - return this.resource!=null ?this.resource.build():null; - } - public A withResource(V1TypedLocalObjectReference resource) { - _visitables.get("resource").remove(this.resource); - if (resource!=null){ this.resource= new V1TypedLocalObjectReferenceBuilder(resource); _visitables.get("resource").add(this.resource);} else { this.resource = null; _visitables.get("resource").remove(this.resource); } return (A) this; - } - public Boolean hasResource() { - return this.resource != null; - } - public V1IngressBackendFluentImpl.ResourceNested withNewResource() { - return new V1IngressBackendFluentImpl.ResourceNestedImpl(); - } - public V1IngressBackendFluentImpl.ResourceNested withNewResourceLike(V1TypedLocalObjectReference item) { - return new V1IngressBackendFluentImpl.ResourceNestedImpl(item); - } - public V1IngressBackendFluentImpl.ResourceNested editResource() { - return withNewResourceLike(getResource()); - } - public V1IngressBackendFluentImpl.ResourceNested editOrNewResource() { - return withNewResourceLike(getResource() != null ? getResource(): new V1TypedLocalObjectReferenceBuilder().build()); - } - public V1IngressBackendFluentImpl.ResourceNested editOrNewResourceLike(V1TypedLocalObjectReference item) { - return withNewResourceLike(getResource() != null ? getResource(): item); - } - - /** - * This method has been deprecated, please use method buildService instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressServiceBackend getService() { - return this.service!=null ?this.service.build():null; - } - public V1IngressServiceBackend buildService() { - return this.service!=null ?this.service.build():null; - } - public A withService(V1IngressServiceBackend service) { - _visitables.get("service").remove(this.service); - if (service!=null){ this.service= new V1IngressServiceBackendBuilder(service); _visitables.get("service").add(this.service);} else { this.service = null; _visitables.get("service").remove(this.service); } return (A) this; - } - public Boolean hasService() { - return this.service != null; - } - public V1IngressBackendFluentImpl.ServiceNested withNewService() { - return new V1IngressBackendFluentImpl.ServiceNestedImpl(); - } - public V1IngressBackendFluentImpl.ServiceNested withNewServiceLike(V1IngressServiceBackend item) { - return new V1IngressBackendFluentImpl.ServiceNestedImpl(item); - } - public V1IngressBackendFluentImpl.ServiceNested editService() { - return withNewServiceLike(getService()); - } - public V1IngressBackendFluentImpl.ServiceNested editOrNewService() { - return withNewServiceLike(getService() != null ? getService(): new V1IngressServiceBackendBuilder().build()); - } - public V1IngressBackendFluentImpl.ServiceNested editOrNewServiceLike(V1IngressServiceBackend item) { - return withNewServiceLike(getService() != null ? getService(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressBackendFluentImpl that = (V1IngressBackendFluentImpl) o; - if (!java.util.Objects.equals(resource, that.resource)) return false; - - if (!java.util.Objects.equals(service, that.service)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(resource, service, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } - if (service != null) { sb.append("service:"); sb.append(service); } - sb.append("}"); - return sb.toString(); - } - class ResourceNestedImpl extends V1TypedLocalObjectReferenceFluentImpl> implements V1IngressBackendFluentImpl.ResourceNested,Nested{ - ResourceNestedImpl(V1TypedLocalObjectReference item) { - this.builder = new V1TypedLocalObjectReferenceBuilder(this, item); - } - ResourceNestedImpl() { - this.builder = new V1TypedLocalObjectReferenceBuilder(this); - } - V1TypedLocalObjectReferenceBuilder builder; - public N and() { - return (N) V1IngressBackendFluentImpl.this.withResource(builder.build()); - } - public N endResource() { - return and(); - } - - } - class ServiceNestedImpl extends V1IngressServiceBackendFluentImpl> implements V1IngressBackendFluentImpl.ServiceNested,Nested{ - ServiceNestedImpl(V1IngressServiceBackend item) { - this.builder = new V1IngressServiceBackendBuilder(this, item); - } - ServiceNestedImpl() { - this.builder = new V1IngressServiceBackendBuilder(this); - } - V1IngressServiceBackendBuilder builder; - public N and() { - return (N) V1IngressBackendFluentImpl.this.withService(builder.build()); - } - public N endService() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBuilder.java index e2f8150986..fdff52b0a2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressBuilder extends V1IngressFluentImpl implements VisitableBuilder{ +public class V1IngressBuilder extends V1IngressFluent implements VisitableBuilder{ public V1IngressBuilder() { - this(false); - } - public V1IngressBuilder(Boolean validationEnabled) { - this(new V1Ingress(), validationEnabled); + this(new V1Ingress()); } + public V1IngressBuilder(V1IngressFluent fluent) { - this(fluent, false); - } - public V1IngressBuilder(V1IngressFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Ingress(), validationEnabled); + this(fluent, new V1Ingress()); } + public V1IngressBuilder(V1IngressFluent fluent,V1Ingress instance) { - this(fluent, instance, false); - } - public V1IngressBuilder(V1IngressFluent fluent,V1Ingress instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressBuilder(V1Ingress instance) { - this(instance,false); - } - public V1IngressBuilder(V1Ingress instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressFluent fluent; - Boolean validationEnabled; + public V1Ingress build() { V1Ingress buildable = new V1Ingress(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassBuilder.java index 9847c8bc7e..ac6e989035 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressClassBuilder extends V1IngressClassFluentImpl implements VisitableBuilder{ +public class V1IngressClassBuilder extends V1IngressClassFluent implements VisitableBuilder{ public V1IngressClassBuilder() { - this(false); - } - public V1IngressClassBuilder(Boolean validationEnabled) { - this(new V1IngressClass(), validationEnabled); + this(new V1IngressClass()); } + public V1IngressClassBuilder(V1IngressClassFluent fluent) { - this(fluent, false); - } - public V1IngressClassBuilder(V1IngressClassFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressClass(), validationEnabled); + this(fluent, new V1IngressClass()); } + public V1IngressClassBuilder(V1IngressClassFluent fluent,V1IngressClass instance) { - this(fluent, instance, false); - } - public V1IngressClassBuilder(V1IngressClassFluent fluent,V1IngressClass instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressClassBuilder(V1IngressClass instance) { - this(instance,false); - } - public V1IngressClassBuilder(V1IngressClass instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressClassFluent fluent; - Boolean validationEnabled; + public V1IngressClass build() { V1IngressClass buildable = new V1IngressClass(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassFluent.java index 171f9cdae1..feebf50abc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1IngressClassFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1IngressClassFluent.MetadataNested withNewMetadata(); - public V1IngressClassFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1IngressClassFluent.MetadataNested editMetadata(); - public V1IngressClassFluent.MetadataNested editOrNewMetadata(); - public V1IngressClassFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressClassSpec getSpec(); - public V1IngressClassSpec buildSpec(); - public A withSpec(V1IngressClassSpec spec); - public Boolean hasSpec(); - public V1IngressClassFluent.SpecNested withNewSpec(); - public V1IngressClassFluent.SpecNested withNewSpecLike(V1IngressClassSpec item); - public V1IngressClassFluent.SpecNested editSpec(); - public V1IngressClassFluent.SpecNested editOrNewSpec(); - public V1IngressClassFluent.SpecNested editOrNewSpecLike(V1IngressClassSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressClassFluent> extends BaseFluent{ + public V1IngressClassFluent() { + } + + public V1IngressClassFluent(V1IngressClass instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1IngressClassSpecBuilder spec; + + protected void copyInstance(V1IngressClass instance) { + instance = (instance != null ? instance : new V1IngressClass()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1IngressClassSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1IngressClassSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1IngressClassSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1IngressClassSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1IngressClassSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1IngressClassSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1IngressClassSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressClassFluent that = (V1IngressClassFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1IngressClassFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1IngressClassSpecFluent> implements Nested{ + SpecNested(V1IngressClassSpec item) { + this.builder = new V1IngressClassSpecBuilder(this, item); + } + V1IngressClassSpecBuilder builder; + + public N and() { + return (N) V1IngressClassFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassFluentImpl.java deleted file mode 100644 index 0389dc9d53..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressClassFluentImpl> extends BaseFluent implements V1IngressClassFluent{ - public V1IngressClassFluentImpl() { - } - public V1IngressClassFluentImpl(V1IngressClass instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1IngressClassSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1IngressClassFluentImpl.MetadataNested withNewMetadata() { - return new V1IngressClassFluentImpl.MetadataNestedImpl(); - } - public V1IngressClassFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1IngressClassFluentImpl.MetadataNestedImpl(item); - } - public V1IngressClassFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1IngressClassFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1IngressClassFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressClassSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1IngressClassSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1IngressClassSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1IngressClassSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1IngressClassFluentImpl.SpecNested withNewSpec() { - return new V1IngressClassFluentImpl.SpecNestedImpl(); - } - public V1IngressClassFluentImpl.SpecNested withNewSpecLike(V1IngressClassSpec item) { - return new V1IngressClassFluentImpl.SpecNestedImpl(item); - } - public V1IngressClassFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1IngressClassFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1IngressClassSpecBuilder().build()); - } - public V1IngressClassFluentImpl.SpecNested editOrNewSpecLike(V1IngressClassSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressClassFluentImpl that = (V1IngressClassFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1IngressClassFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1IngressClassFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1IngressClassSpecFluentImpl> implements V1IngressClassFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1IngressClassSpec item) { - this.builder = new V1IngressClassSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1IngressClassSpecBuilder(this); - } - V1IngressClassSpecBuilder builder; - public N and() { - return (N) V1IngressClassFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListBuilder.java index a2bc76614f..8621a9806c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressClassListBuilder extends V1IngressClassListFluentImpl implements VisitableBuilder{ +public class V1IngressClassListBuilder extends V1IngressClassListFluent implements VisitableBuilder{ public V1IngressClassListBuilder() { - this(false); - } - public V1IngressClassListBuilder(Boolean validationEnabled) { - this(new V1IngressClassList(), validationEnabled); + this(new V1IngressClassList()); } + public V1IngressClassListBuilder(V1IngressClassListFluent fluent) { - this(fluent, false); - } - public V1IngressClassListBuilder(V1IngressClassListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressClassList(), validationEnabled); + this(fluent, new V1IngressClassList()); } + public V1IngressClassListBuilder(V1IngressClassListFluent fluent,V1IngressClassList instance) { - this(fluent, instance, false); - } - public V1IngressClassListBuilder(V1IngressClassListFluent fluent,V1IngressClassList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressClassListBuilder(V1IngressClassList instance) { - this(instance,false); - } - public V1IngressClassListBuilder(V1IngressClassList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressClassListFluent fluent; - Boolean validationEnabled; + public V1IngressClassList build() { V1IngressClassList buildable = new V1IngressClassList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListFluent.java index 48855411fd..6ca6dcd9b0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1IngressClassListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1IngressClass item); - public A setToItems(int index,V1IngressClass item); - public A addToItems(io.kubernetes.client.openapi.models.V1IngressClass... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1IngressClass... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1IngressClass buildItem(int index); - public V1IngressClass buildFirstItem(); - public V1IngressClass buildLastItem(); - public V1IngressClass buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1IngressClass... items); - public Boolean hasItems(); - public V1IngressClassListFluent.ItemsNested addNewItem(); - public V1IngressClassListFluent.ItemsNested addNewItemLike(V1IngressClass item); - public V1IngressClassListFluent.ItemsNested setNewItemLike(int index,V1IngressClass item); - public V1IngressClassListFluent.ItemsNested editItem(int index); - public V1IngressClassListFluent.ItemsNested editFirstItem(); - public V1IngressClassListFluent.ItemsNested editLastItem(); - public V1IngressClassListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1IngressClassListFluent.MetadataNested withNewMetadata(); - public V1IngressClassListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1IngressClassListFluent.MetadataNested editMetadata(); - public V1IngressClassListFluent.MetadataNested editOrNewMetadata(); - public V1IngressClassListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1IngressClassFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressClassListFluent> extends BaseFluent{ + public V1IngressClassListFluent() { + } + + public V1IngressClassListFluent(V1IngressClassList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1IngressClassList instance) { + instance = (instance != null ? instance : new V1IngressClassList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1IngressClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1IngressClassBuilder builder = new V1IngressClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1IngressClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1IngressClassBuilder builder = new V1IngressClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1IngressClass... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1IngressClass item : items) {V1IngressClassBuilder builder = new V1IngressClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1IngressClass item : items) {V1IngressClassBuilder builder = new V1IngressClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1IngressClass... items) { + if (this.items == null) return (A)this; + for (V1IngressClass item : items) {V1IngressClassBuilder builder = new V1IngressClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1IngressClass item : items) {V1IngressClassBuilder builder = new V1IngressClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1IngressClassBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1IngressClass buildItem(int index) { + return this.items.get(index).build(); + } + + public V1IngressClass buildFirstItem() { + return this.items.get(0).build(); + } + + public V1IngressClass buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1IngressClass buildMatchingItem(Predicate predicate) { + for (V1IngressClassBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1IngressClassBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1IngressClass item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1IngressClass... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1IngressClass item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1IngressClass item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1IngressClass item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressClassListFluent that = (V1IngressClassListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1IngressClassFluent> implements Nested{ + ItemsNested(int index,V1IngressClass item) { + this.index = index; + this.builder = new V1IngressClassBuilder(this, item); + } + V1IngressClassBuilder builder; + int index; + public N and() { + return (N) V1IngressClassListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1IngressClassListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListFluentImpl.java deleted file mode 100644 index 108d891260..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressClassListFluentImpl> extends BaseFluent implements V1IngressClassListFluent{ - public V1IngressClassListFluentImpl() { - } - public V1IngressClassListFluentImpl(V1IngressClassList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1IngressClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1IngressClassBuilder builder = new V1IngressClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1IngressClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1IngressClassBuilder builder = new V1IngressClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1IngressClass... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1IngressClass item : items) {V1IngressClassBuilder builder = new V1IngressClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1IngressClass item : items) {V1IngressClassBuilder builder = new V1IngressClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1IngressClass... items) { - for (V1IngressClass item : items) {V1IngressClassBuilder builder = new V1IngressClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1IngressClass item : items) {V1IngressClassBuilder builder = new V1IngressClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1IngressClassBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1IngressClass buildItem(int index) { - return this.items.get(index).build(); - } - public V1IngressClass buildFirstItem() { - return this.items.get(0).build(); - } - public V1IngressClass buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1IngressClass buildMatchingItem(Predicate predicate) { - for (V1IngressClassBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1IngressClassBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1IngressClass item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1IngressClass... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1IngressClass item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1IngressClassListFluentImpl.ItemsNested addNewItem() { - return new V1IngressClassListFluentImpl.ItemsNestedImpl(); - } - public V1IngressClassListFluentImpl.ItemsNested addNewItemLike(V1IngressClass item) { - return new V1IngressClassListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1IngressClassListFluentImpl.ItemsNested setNewItemLike(int index,V1IngressClass item) { - return new V1IngressClassListFluentImpl.ItemsNestedImpl(index, item); - } - public V1IngressClassListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1IngressClassListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1IngressClassListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1IngressClassListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1IngressClassListFluentImpl.MetadataNestedImpl(); - } - public V1IngressClassListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1IngressClassListFluentImpl.MetadataNestedImpl(item); - } - public V1IngressClassListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1IngressClassListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1IngressClassListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressClassListFluentImpl that = (V1IngressClassListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1IngressClassFluentImpl> implements V1IngressClassListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1IngressClass item) { - this.index = index; - this.builder = new V1IngressClassBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1IngressClassBuilder(this); - } - V1IngressClassBuilder builder; - int index; - public N and() { - return (N) V1IngressClassListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1IngressClassListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1IngressClassListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceBuilder.java index e905edf550..68a85587d5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressClassParametersReferenceBuilder extends V1IngressClassParametersReferenceFluentImpl implements VisitableBuilder{ +public class V1IngressClassParametersReferenceBuilder extends V1IngressClassParametersReferenceFluent implements VisitableBuilder{ public V1IngressClassParametersReferenceBuilder() { - this(false); - } - public V1IngressClassParametersReferenceBuilder(Boolean validationEnabled) { - this(new V1IngressClassParametersReference(), validationEnabled); + this(new V1IngressClassParametersReference()); } + public V1IngressClassParametersReferenceBuilder(V1IngressClassParametersReferenceFluent fluent) { - this(fluent, false); - } - public V1IngressClassParametersReferenceBuilder(V1IngressClassParametersReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressClassParametersReference(), validationEnabled); + this(fluent, new V1IngressClassParametersReference()); } + public V1IngressClassParametersReferenceBuilder(V1IngressClassParametersReferenceFluent fluent,V1IngressClassParametersReference instance) { - this(fluent, instance, false); - } - public V1IngressClassParametersReferenceBuilder(V1IngressClassParametersReferenceFluent fluent,V1IngressClassParametersReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroup(instance.getApiGroup()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - fluent.withScope(instance.getScope()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressClassParametersReferenceBuilder(V1IngressClassParametersReference instance) { - this(instance,false); - } - public V1IngressClassParametersReferenceBuilder(V1IngressClassParametersReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withScope(instance.getScope()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressClassParametersReferenceFluent fluent; - Boolean validationEnabled; + public V1IngressClassParametersReference build() { V1IngressClassParametersReference buildable = new V1IngressClassParametersReference(); buildable.setApiGroup(fluent.getApiGroup()); @@ -55,4 +31,5 @@ public V1IngressClassParametersReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceFluent.java index 17bdf79462..56a9dc7edb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceFluent.java @@ -1,28 +1,131 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1IngressClassParametersReferenceFluent> extends Fluent{ - public String getApiGroup(); - public A withApiGroup(String apiGroup); - public Boolean hasApiGroup(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); - public String getScope(); - public A withScope(String scope); - public Boolean hasScope(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressClassParametersReferenceFluent> extends BaseFluent{ + public V1IngressClassParametersReferenceFluent() { + } + public V1IngressClassParametersReferenceFluent(V1IngressClassParametersReference instance) { + this.copyInstance(instance); + } + private String apiGroup; + private String kind; + private String name; + private String namespace; + private String scope; + + protected void copyInstance(V1IngressClassParametersReference instance) { + instance = (instance != null ? instance : new V1IngressClassParametersReference()); + if (instance != null) { + this.withApiGroup(instance.getApiGroup()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withScope(instance.getScope()); + } + } + + public String getApiGroup() { + return this.apiGroup; + } + + public A withApiGroup(String apiGroup) { + this.apiGroup = apiGroup; + return (A) this; + } + + public boolean hasApiGroup() { + return this.apiGroup != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public String getScope() { + return this.scope; + } + + public A withScope(String scope) { + this.scope = scope; + return (A) this; + } + + public boolean hasScope() { + return this.scope != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressClassParametersReferenceFluent that = (V1IngressClassParametersReferenceFluent) o; + if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(scope, that.scope)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroup, kind, name, namespace, scope, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (scope != null) { sb.append("scope:"); sb.append(scope); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceFluentImpl.java deleted file mode 100644 index c81e38b2c8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassParametersReferenceFluentImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressClassParametersReferenceFluentImpl> extends BaseFluent implements V1IngressClassParametersReferenceFluent{ - public V1IngressClassParametersReferenceFluentImpl() { - } - public V1IngressClassParametersReferenceFluentImpl(V1IngressClassParametersReference instance) { - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withScope(instance.getScope()); - } - } - private String apiGroup; - private String kind; - private String name; - private String namespace; - private String scope; - public String getApiGroup() { - return this.apiGroup; - } - public A withApiGroup(String apiGroup) { - this.apiGroup=apiGroup; return (A) this; - } - public Boolean hasApiGroup() { - return this.apiGroup != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public String getScope() { - return this.scope; - } - public A withScope(String scope) { - this.scope=scope; return (A) this; - } - public Boolean hasScope() { - return this.scope != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressClassParametersReferenceFluentImpl that = (V1IngressClassParametersReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - if (!java.util.Objects.equals(scope, that.scope)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroup, kind, name, namespace, scope, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } - if (scope != null) { sb.append("scope:"); sb.append(scope); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecBuilder.java index 002f3b7b4f..4c6e7df7c4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressClassSpecBuilder extends V1IngressClassSpecFluentImpl implements VisitableBuilder{ +public class V1IngressClassSpecBuilder extends V1IngressClassSpecFluent implements VisitableBuilder{ public V1IngressClassSpecBuilder() { - this(false); - } - public V1IngressClassSpecBuilder(Boolean validationEnabled) { - this(new V1IngressClassSpec(), validationEnabled); + this(new V1IngressClassSpec()); } + public V1IngressClassSpecBuilder(V1IngressClassSpecFluent fluent) { - this(fluent, false); - } - public V1IngressClassSpecBuilder(V1IngressClassSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressClassSpec(), validationEnabled); + this(fluent, new V1IngressClassSpec()); } + public V1IngressClassSpecBuilder(V1IngressClassSpecFluent fluent,V1IngressClassSpec instance) { - this(fluent, instance, false); - } - public V1IngressClassSpecBuilder(V1IngressClassSpecFluent fluent,V1IngressClassSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withController(instance.getController()); - fluent.withParameters(instance.getParameters()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressClassSpecBuilder(V1IngressClassSpec instance) { - this(instance,false); - } - public V1IngressClassSpecBuilder(V1IngressClassSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withController(instance.getController()); - this.withParameters(instance.getParameters()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressClassSpecFluent fluent; - Boolean validationEnabled; + public V1IngressClassSpec build() { V1IngressClassSpec buildable = new V1IngressClassSpec(); buildable.setController(fluent.getController()); - buildable.setParameters(fluent.getParameters()); + buildable.setParameters(fluent.buildParameters()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecFluent.java index e372c98be9..f98afff209 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1IngressClassSpecFluent> extends Fluent{ - public String getController(); - public A withController(String controller); - public Boolean hasController(); - - /** - * This method has been deprecated, please use method buildParameters instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressClassParametersReference getParameters(); - public V1IngressClassParametersReference buildParameters(); - public A withParameters(V1IngressClassParametersReference parameters); - public Boolean hasParameters(); - public V1IngressClassSpecFluent.ParametersNested withNewParameters(); - public V1IngressClassSpecFluent.ParametersNested withNewParametersLike(V1IngressClassParametersReference item); - public V1IngressClassSpecFluent.ParametersNested editParameters(); - public V1IngressClassSpecFluent.ParametersNested editOrNewParameters(); - public V1IngressClassSpecFluent.ParametersNested editOrNewParametersLike(V1IngressClassParametersReference item); - public interface ParametersNested extends Nested,V1IngressClassParametersReferenceFluent>{ - public N and(); - public N endParameters(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressClassSpecFluent> extends BaseFluent{ + public V1IngressClassSpecFluent() { + } + + public V1IngressClassSpecFluent(V1IngressClassSpec instance) { + this.copyInstance(instance); + } + private String controller; + private V1IngressClassParametersReferenceBuilder parameters; + + protected void copyInstance(V1IngressClassSpec instance) { + instance = (instance != null ? instance : new V1IngressClassSpec()); + if (instance != null) { + this.withController(instance.getController()); + this.withParameters(instance.getParameters()); + } + } + + public String getController() { + return this.controller; + } + + public A withController(String controller) { + this.controller = controller; + return (A) this; + } + + public boolean hasController() { + return this.controller != null; + } + + public V1IngressClassParametersReference buildParameters() { + return this.parameters != null ? this.parameters.build() : null; + } + + public A withParameters(V1IngressClassParametersReference parameters) { + this._visitables.remove("parameters"); + if (parameters != null) { + this.parameters = new V1IngressClassParametersReferenceBuilder(parameters); + this._visitables.get("parameters").add(this.parameters); + } else { + this.parameters = null; + this._visitables.get("parameters").remove(this.parameters); + } + return (A) this; + } + + public boolean hasParameters() { + return this.parameters != null; + } + + public ParametersNested withNewParameters() { + return new ParametersNested(null); } + public ParametersNested withNewParametersLike(V1IngressClassParametersReference item) { + return new ParametersNested(item); + } + + public ParametersNested editParameters() { + return withNewParametersLike(java.util.Optional.ofNullable(buildParameters()).orElse(null)); + } + + public ParametersNested editOrNewParameters() { + return withNewParametersLike(java.util.Optional.ofNullable(buildParameters()).orElse(new V1IngressClassParametersReferenceBuilder().build())); + } + + public ParametersNested editOrNewParametersLike(V1IngressClassParametersReference item) { + return withNewParametersLike(java.util.Optional.ofNullable(buildParameters()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressClassSpecFluent that = (V1IngressClassSpecFluent) o; + if (!java.util.Objects.equals(controller, that.controller)) return false; + if (!java.util.Objects.equals(parameters, that.parameters)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(controller, parameters, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (controller != null) { sb.append("controller:"); sb.append(controller + ","); } + if (parameters != null) { sb.append("parameters:"); sb.append(parameters); } + sb.append("}"); + return sb.toString(); + } + public class ParametersNested extends V1IngressClassParametersReferenceFluent> implements Nested{ + ParametersNested(V1IngressClassParametersReference item) { + this.builder = new V1IngressClassParametersReferenceBuilder(this, item); + } + V1IngressClassParametersReferenceBuilder builder; + + public N and() { + return (N) V1IngressClassSpecFluent.this.withParameters(builder.build()); + } + + public N endParameters() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecFluentImpl.java deleted file mode 100644 index b75b397103..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressClassSpecFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressClassSpecFluentImpl> extends BaseFluent implements V1IngressClassSpecFluent{ - public V1IngressClassSpecFluentImpl() { - } - public V1IngressClassSpecFluentImpl(V1IngressClassSpec instance) { - if (instance != null) { - this.withController(instance.getController()); - this.withParameters(instance.getParameters()); - } - } - private String controller; - private V1IngressClassParametersReferenceBuilder parameters; - public String getController() { - return this.controller; - } - public A withController(String controller) { - this.controller=controller; return (A) this; - } - public Boolean hasController() { - return this.controller != null; - } - - /** - * This method has been deprecated, please use method buildParameters instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressClassParametersReference getParameters() { - return this.parameters!=null ?this.parameters.build():null; - } - public V1IngressClassParametersReference buildParameters() { - return this.parameters!=null ?this.parameters.build():null; - } - public A withParameters(V1IngressClassParametersReference parameters) { - _visitables.get("parameters").remove(this.parameters); - if (parameters!=null){ this.parameters= new V1IngressClassParametersReferenceBuilder(parameters); _visitables.get("parameters").add(this.parameters);} else { this.parameters = null; _visitables.get("parameters").remove(this.parameters); } return (A) this; - } - public Boolean hasParameters() { - return this.parameters != null; - } - public V1IngressClassSpecFluentImpl.ParametersNested withNewParameters() { - return new V1IngressClassSpecFluentImpl.ParametersNestedImpl(); - } - public V1IngressClassSpecFluentImpl.ParametersNested withNewParametersLike(V1IngressClassParametersReference item) { - return new V1IngressClassSpecFluentImpl.ParametersNestedImpl(item); - } - public V1IngressClassSpecFluentImpl.ParametersNested editParameters() { - return withNewParametersLike(getParameters()); - } - public V1IngressClassSpecFluentImpl.ParametersNested editOrNewParameters() { - return withNewParametersLike(getParameters() != null ? getParameters(): new V1IngressClassParametersReferenceBuilder().build()); - } - public V1IngressClassSpecFluentImpl.ParametersNested editOrNewParametersLike(V1IngressClassParametersReference item) { - return withNewParametersLike(getParameters() != null ? getParameters(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressClassSpecFluentImpl that = (V1IngressClassSpecFluentImpl) o; - if (!java.util.Objects.equals(controller, that.controller)) return false; - - if (!java.util.Objects.equals(parameters, that.parameters)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(controller, parameters, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (controller != null) { sb.append("controller:"); sb.append(controller + ","); } - if (parameters != null) { sb.append("parameters:"); sb.append(parameters); } - sb.append("}"); - return sb.toString(); - } - class ParametersNestedImpl extends V1IngressClassParametersReferenceFluentImpl> implements V1IngressClassSpecFluentImpl.ParametersNested,Nested{ - ParametersNestedImpl(V1IngressClassParametersReference item) { - this.builder = new V1IngressClassParametersReferenceBuilder(this, item); - } - ParametersNestedImpl() { - this.builder = new V1IngressClassParametersReferenceBuilder(this); - } - V1IngressClassParametersReferenceBuilder builder; - public N and() { - return (N) V1IngressClassSpecFluentImpl.this.withParameters(builder.build()); - } - public N endParameters() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressFluent.java index ccf9d6bc95..732f88eb0f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1IngressFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1IngressFluent.MetadataNested withNewMetadata(); - public V1IngressFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1IngressFluent.MetadataNested editMetadata(); - public V1IngressFluent.MetadataNested editOrNewMetadata(); - public V1IngressFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressSpec getSpec(); - public V1IngressSpec buildSpec(); - public A withSpec(V1IngressSpec spec); - public Boolean hasSpec(); - public V1IngressFluent.SpecNested withNewSpec(); - public V1IngressFluent.SpecNested withNewSpecLike(V1IngressSpec item); - public V1IngressFluent.SpecNested editSpec(); - public V1IngressFluent.SpecNested editOrNewSpec(); - public V1IngressFluent.SpecNested editOrNewSpecLike(V1IngressSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressStatus getStatus(); - public V1IngressStatus buildStatus(); - public A withStatus(V1IngressStatus status); - public Boolean hasStatus(); - public V1IngressFluent.StatusNested withNewStatus(); - public V1IngressFluent.StatusNested withNewStatusLike(V1IngressStatus item); - public V1IngressFluent.StatusNested editStatus(); - public V1IngressFluent.StatusNested editOrNewStatus(); - public V1IngressFluent.StatusNested editOrNewStatusLike(V1IngressStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressFluent> extends BaseFluent{ + public V1IngressFluent() { + } + + public V1IngressFluent(V1Ingress instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1IngressSpecBuilder spec; + private V1IngressStatusBuilder status; + + protected void copyInstance(V1Ingress instance) { + instance = (instance != null ? instance : new V1Ingress()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1IngressSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1IngressSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1IngressSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1IngressSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1IngressSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1IngressSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1IngressSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1IngressStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1IngressStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1IngressStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1IngressStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1IngressStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1IngressStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressFluent that = (V1IngressFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1IngressFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1IngressStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1IngressSpecFluent> implements Nested{ + SpecNested(V1IngressSpec item) { + this.builder = new V1IngressSpecBuilder(this, item); + } + V1IngressSpecBuilder builder; + + public N and() { + return (N) V1IngressFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1IngressStatusFluent> implements Nested{ + StatusNested(V1IngressStatus item) { + this.builder = new V1IngressStatusBuilder(this, item); + } + V1IngressStatusBuilder builder; + + public N and() { + return (N) V1IngressFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressFluentImpl.java deleted file mode 100644 index a9db90c51a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressFluentImpl> extends BaseFluent implements V1IngressFluent{ - public V1IngressFluentImpl() { - } - public V1IngressFluentImpl(V1Ingress instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1IngressSpecBuilder spec; - private V1IngressStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1IngressFluentImpl.MetadataNested withNewMetadata() { - return new V1IngressFluentImpl.MetadataNestedImpl(); - } - public V1IngressFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1IngressFluentImpl.MetadataNestedImpl(item); - } - public V1IngressFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1IngressFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1IngressFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1IngressSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1IngressSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1IngressSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1IngressFluentImpl.SpecNested withNewSpec() { - return new V1IngressFluentImpl.SpecNestedImpl(); - } - public V1IngressFluentImpl.SpecNested withNewSpecLike(V1IngressSpec item) { - return new V1IngressFluentImpl.SpecNestedImpl(item); - } - public V1IngressFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1IngressFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1IngressSpecBuilder().build()); - } - public V1IngressFluentImpl.SpecNested editOrNewSpecLike(V1IngressSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1IngressStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1IngressStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1IngressStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1IngressFluentImpl.StatusNested withNewStatus() { - return new V1IngressFluentImpl.StatusNestedImpl(); - } - public V1IngressFluentImpl.StatusNested withNewStatusLike(V1IngressStatus item) { - return new V1IngressFluentImpl.StatusNestedImpl(item); - } - public V1IngressFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1IngressFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1IngressStatusBuilder().build()); - } - public V1IngressFluentImpl.StatusNested editOrNewStatusLike(V1IngressStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressFluentImpl that = (V1IngressFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1IngressFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1IngressFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1IngressSpecFluentImpl> implements V1IngressFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1IngressSpec item) { - this.builder = new V1IngressSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1IngressSpecBuilder(this); - } - V1IngressSpecBuilder builder; - public N and() { - return (N) V1IngressFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1IngressStatusFluentImpl> implements V1IngressFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1IngressStatus item) { - this.builder = new V1IngressStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1IngressStatusBuilder(this); - } - V1IngressStatusBuilder builder; - public N and() { - return (N) V1IngressFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListBuilder.java index 42aa3feec7..b12cf2c80d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressListBuilder extends V1IngressListFluentImpl implements VisitableBuilder{ +public class V1IngressListBuilder extends V1IngressListFluent implements VisitableBuilder{ public V1IngressListBuilder() { - this(false); - } - public V1IngressListBuilder(Boolean validationEnabled) { - this(new V1IngressList(), validationEnabled); + this(new V1IngressList()); } + public V1IngressListBuilder(V1IngressListFluent fluent) { - this(fluent, false); - } - public V1IngressListBuilder(V1IngressListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressList(), validationEnabled); + this(fluent, new V1IngressList()); } + public V1IngressListBuilder(V1IngressListFluent fluent,V1IngressList instance) { - this(fluent, instance, false); - } - public V1IngressListBuilder(V1IngressListFluent fluent,V1IngressList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressListBuilder(V1IngressList instance) { - this(instance,false); - } - public V1IngressListBuilder(V1IngressList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressListFluent fluent; - Boolean validationEnabled; + public V1IngressList build() { V1IngressList buildable = new V1IngressList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListFluent.java index 34fc54a951..5abcc24ede 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1IngressListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Ingress item); - public A setToItems(int index,V1Ingress item); - public A addToItems(io.kubernetes.client.openapi.models.V1Ingress... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Ingress... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Ingress buildItem(int index); - public V1Ingress buildFirstItem(); - public V1Ingress buildLastItem(); - public V1Ingress buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Ingress... items); - public Boolean hasItems(); - public V1IngressListFluent.ItemsNested addNewItem(); - public V1IngressListFluent.ItemsNested addNewItemLike(V1Ingress item); - public V1IngressListFluent.ItemsNested setNewItemLike(int index,V1Ingress item); - public V1IngressListFluent.ItemsNested editItem(int index); - public V1IngressListFluent.ItemsNested editFirstItem(); - public V1IngressListFluent.ItemsNested editLastItem(); - public V1IngressListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1IngressListFluent.MetadataNested withNewMetadata(); - public V1IngressListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1IngressListFluent.MetadataNested editMetadata(); - public V1IngressListFluent.MetadataNested editOrNewMetadata(); - public V1IngressListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1IngressFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressListFluent> extends BaseFluent{ + public V1IngressListFluent() { + } + + public V1IngressListFluent(V1IngressList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1IngressList instance) { + instance = (instance != null ? instance : new V1IngressList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Ingress item) { + if (this.items == null) {this.items = new ArrayList();} + V1IngressBuilder builder = new V1IngressBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Ingress item) { + if (this.items == null) {this.items = new ArrayList();} + V1IngressBuilder builder = new V1IngressBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Ingress... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Ingress item : items) {V1IngressBuilder builder = new V1IngressBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Ingress item : items) {V1IngressBuilder builder = new V1IngressBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Ingress... items) { + if (this.items == null) return (A)this; + for (V1Ingress item : items) {V1IngressBuilder builder = new V1IngressBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Ingress item : items) {V1IngressBuilder builder = new V1IngressBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1IngressBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Ingress buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Ingress buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Ingress buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Ingress buildMatchingItem(Predicate predicate) { + for (V1IngressBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1IngressBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Ingress item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Ingress... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Ingress item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Ingress item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Ingress item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressListFluent that = (V1IngressListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1IngressFluent> implements Nested{ + ItemsNested(int index,V1Ingress item) { + this.index = index; + this.builder = new V1IngressBuilder(this, item); + } + V1IngressBuilder builder; + int index; + public N and() { + return (N) V1IngressListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1IngressListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListFluentImpl.java deleted file mode 100644 index a1ee5f8695..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressListFluentImpl> extends BaseFluent implements V1IngressListFluent{ - public V1IngressListFluentImpl() { - } - public V1IngressListFluentImpl(V1IngressList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Ingress item) { - if (this.items == null) {this.items = new ArrayList();} - V1IngressBuilder builder = new V1IngressBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Ingress item) { - if (this.items == null) {this.items = new ArrayList();} - V1IngressBuilder builder = new V1IngressBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Ingress... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Ingress item : items) {V1IngressBuilder builder = new V1IngressBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Ingress item : items) {V1IngressBuilder builder = new V1IngressBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Ingress... items) { - for (V1Ingress item : items) {V1IngressBuilder builder = new V1IngressBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Ingress item : items) {V1IngressBuilder builder = new V1IngressBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1IngressBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Ingress buildItem(int index) { - return this.items.get(index).build(); - } - public V1Ingress buildFirstItem() { - return this.items.get(0).build(); - } - public V1Ingress buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Ingress buildMatchingItem(Predicate predicate) { - for (V1IngressBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1IngressBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Ingress item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Ingress... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Ingress item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1IngressListFluentImpl.ItemsNested addNewItem() { - return new V1IngressListFluentImpl.ItemsNestedImpl(); - } - public V1IngressListFluentImpl.ItemsNested addNewItemLike(V1Ingress item) { - return new V1IngressListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1IngressListFluentImpl.ItemsNested setNewItemLike(int index,V1Ingress item) { - return new V1IngressListFluentImpl.ItemsNestedImpl(index, item); - } - public V1IngressListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1IngressListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1IngressListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1IngressListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1IngressListFluentImpl.MetadataNestedImpl(); - } - public V1IngressListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1IngressListFluentImpl.MetadataNestedImpl(item); - } - public V1IngressListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1IngressListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1IngressListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressListFluentImpl that = (V1IngressListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1IngressFluentImpl> implements V1IngressListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Ingress item) { - this.index = index; - this.builder = new V1IngressBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1IngressBuilder(this); - } - V1IngressBuilder builder; - int index; - public N and() { - return (N) V1IngressListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1IngressListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1IngressListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressBuilder.java index 543f4426f7..87fd0c369d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressLoadBalancerIngressBuilder extends V1IngressLoadBalancerIngressFluentImpl implements VisitableBuilder{ +public class V1IngressLoadBalancerIngressBuilder extends V1IngressLoadBalancerIngressFluent implements VisitableBuilder{ public V1IngressLoadBalancerIngressBuilder() { - this(false); - } - public V1IngressLoadBalancerIngressBuilder(Boolean validationEnabled) { - this(new V1IngressLoadBalancerIngress(), validationEnabled); + this(new V1IngressLoadBalancerIngress()); } + public V1IngressLoadBalancerIngressBuilder(V1IngressLoadBalancerIngressFluent fluent) { - this(fluent, false); - } - public V1IngressLoadBalancerIngressBuilder(V1IngressLoadBalancerIngressFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressLoadBalancerIngress(), validationEnabled); + this(fluent, new V1IngressLoadBalancerIngress()); } + public V1IngressLoadBalancerIngressBuilder(V1IngressLoadBalancerIngressFluent fluent,V1IngressLoadBalancerIngress instance) { - this(fluent, instance, false); - } - public V1IngressLoadBalancerIngressBuilder(V1IngressLoadBalancerIngressFluent fluent,V1IngressLoadBalancerIngress instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHostname(instance.getHostname()); - fluent.withIp(instance.getIp()); - fluent.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressLoadBalancerIngressBuilder(V1IngressLoadBalancerIngress instance) { - this(instance,false); - } - public V1IngressLoadBalancerIngressBuilder(V1IngressLoadBalancerIngress instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHostname(instance.getHostname()); - this.withIp(instance.getIp()); - this.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressLoadBalancerIngressFluent fluent; - Boolean validationEnabled; + public V1IngressLoadBalancerIngress build() { V1IngressLoadBalancerIngress buildable = new V1IngressLoadBalancerIngress(); buildable.setHostname(fluent.getHostname()); buildable.setIp(fluent.getIp()); - buildable.setPorts(fluent.getPorts()); + buildable.setPorts(fluent.buildPorts()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressFluent.java index 888c66f464..ee22c6a824 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressFluent.java @@ -1,62 +1,259 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1IngressLoadBalancerIngressFluent> extends Fluent{ - public String getHostname(); - public A withHostname(String hostname); - public Boolean hasHostname(); - public String getIp(); - public A withIp(String ip); - public Boolean hasIp(); - public A addToPorts(int index,V1IngressPortStatus item); - public A setToPorts(int index,V1IngressPortStatus item); - public A addToPorts(io.kubernetes.client.openapi.models.V1IngressPortStatus... items); - public A addAllToPorts(Collection items); - public A removeFromPorts(io.kubernetes.client.openapi.models.V1IngressPortStatus... items); - public A removeAllFromPorts(Collection items); - public A removeMatchingFromPorts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts(); - public List buildPorts(); - public V1IngressPortStatus buildPort(int index); - public V1IngressPortStatus buildFirstPort(); - public V1IngressPortStatus buildLastPort(); - public V1IngressPortStatus buildMatchingPort(Predicate predicate); - public Boolean hasMatchingPort(Predicate predicate); - public A withPorts(List ports); - public A withPorts(io.kubernetes.client.openapi.models.V1IngressPortStatus... ports); - public Boolean hasPorts(); - public V1IngressLoadBalancerIngressFluent.PortsNested addNewPort(); - public V1IngressLoadBalancerIngressFluent.PortsNested addNewPortLike(V1IngressPortStatus item); - public V1IngressLoadBalancerIngressFluent.PortsNested setNewPortLike(int index,V1IngressPortStatus item); - public V1IngressLoadBalancerIngressFluent.PortsNested editPort(int index); - public V1IngressLoadBalancerIngressFluent.PortsNested editFirstPort(); - public V1IngressLoadBalancerIngressFluent.PortsNested editLastPort(); - public V1IngressLoadBalancerIngressFluent.PortsNested editMatchingPort(Predicate predicate); - public interface PortsNested extends Nested,V1IngressPortStatusFluent>{ - public N and(); - public N endPort(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressLoadBalancerIngressFluent> extends BaseFluent{ + public V1IngressLoadBalancerIngressFluent() { + } + + public V1IngressLoadBalancerIngressFluent(V1IngressLoadBalancerIngress instance) { + this.copyInstance(instance); + } + private String hostname; + private String ip; + private ArrayList ports; + + protected void copyInstance(V1IngressLoadBalancerIngress instance) { + instance = (instance != null ? instance : new V1IngressLoadBalancerIngress()); + if (instance != null) { + this.withHostname(instance.getHostname()); + this.withIp(instance.getIp()); + this.withPorts(instance.getPorts()); + } + } + + public String getHostname() { + return this.hostname; + } + + public A withHostname(String hostname) { + this.hostname = hostname; + return (A) this; + } + + public boolean hasHostname() { + return this.hostname != null; + } + + public String getIp() { + return this.ip; + } + + public A withIp(String ip) { + this.ip = ip; + return (A) this; + } + + public boolean hasIp() { + return this.ip != null; + } + + public A addToPorts(int index,V1IngressPortStatus item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} + return (A)this; + } + + public A setToPorts(int index,V1IngressPortStatus item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} + return (A)this; + } + + public A addToPorts(io.kubernetes.client.openapi.models.V1IngressPortStatus... items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1IngressPortStatus item : items) {V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A addAllToPorts(Collection items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1IngressPortStatus item : items) {V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A removeFromPorts(io.kubernetes.client.openapi.models.V1IngressPortStatus... items) { + if (this.ports == null) return (A)this; + for (V1IngressPortStatus item : items) {V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeAllFromPorts(Collection items) { + if (this.ports == null) return (A)this; + for (V1IngressPortStatus item : items) {V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeMatchingFromPorts(Predicate predicate) { + if (ports == null) return (A) this; + final Iterator each = ports.iterator(); + final List visitables = _visitables.get("ports"); + while (each.hasNext()) { + V1IngressPortStatusBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPorts() { + return this.ports != null ? build(ports) : null; + } + + public V1IngressPortStatus buildPort(int index) { + return this.ports.get(index).build(); + } + + public V1IngressPortStatus buildFirstPort() { + return this.ports.get(0).build(); } + public V1IngressPortStatus buildLastPort() { + return this.ports.get(ports.size() - 1).build(); + } + + public V1IngressPortStatus buildMatchingPort(Predicate predicate) { + for (V1IngressPortStatusBuilder item : ports) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPort(Predicate predicate) { + for (V1IngressPortStatusBuilder item : ports) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPorts(List ports) { + if (this.ports != null) { + this._visitables.get("ports").clear(); + } + if (ports != null) { + this.ports = new ArrayList(); + for (V1IngressPortStatus item : ports) { + this.addToPorts(item); + } + } else { + this.ports = null; + } + return (A) this; + } + + public A withPorts(io.kubernetes.client.openapi.models.V1IngressPortStatus... ports) { + if (this.ports != null) { + this.ports.clear(); + _visitables.remove("ports"); + } + if (ports != null) { + for (V1IngressPortStatus item : ports) { + this.addToPorts(item); + } + } + return (A) this; + } + + public boolean hasPorts() { + return this.ports != null && !this.ports.isEmpty(); + } + + public PortsNested addNewPort() { + return new PortsNested(-1, null); + } + + public PortsNested addNewPortLike(V1IngressPortStatus item) { + return new PortsNested(-1, item); + } + + public PortsNested setNewPortLike(int index,V1IngressPortStatus item) { + return new PortsNested(index, item); + } + + public PortsNested editPort(int index) { + if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editFirstPort() { + if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); + return setNewPortLike(0, buildPort(0)); + } + + public PortsNested editLastPort() { + int index = ports.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editMatchingPort(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1IngressPortStatusFluent> implements Nested{ + PortsNested(int index,V1IngressPortStatus item) { + this.index = index; + this.builder = new V1IngressPortStatusBuilder(this, item); + } + V1IngressPortStatusBuilder builder; + int index; + + public N and() { + return (N) V1IngressLoadBalancerIngressFluent.this.setToPorts(index,builder.build()); + } + + public N endPort() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressFluentImpl.java deleted file mode 100644 index d0da7549b3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerIngressFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressLoadBalancerIngressFluentImpl> extends BaseFluent implements V1IngressLoadBalancerIngressFluent{ - public V1IngressLoadBalancerIngressFluentImpl() { - } - public V1IngressLoadBalancerIngressFluentImpl(V1IngressLoadBalancerIngress instance) { - if (instance != null) { - this.withHostname(instance.getHostname()); - this.withIp(instance.getIp()); - this.withPorts(instance.getPorts()); - } - } - private String hostname; - private String ip; - private ArrayList ports; - public String getHostname() { - return this.hostname; - } - public A withHostname(String hostname) { - this.hostname=hostname; return (A) this; - } - public Boolean hasHostname() { - return this.hostname != null; - } - public String getIp() { - return this.ip; - } - public A withIp(String ip) { - this.ip=ip; return (A) this; - } - public Boolean hasIp() { - return this.ip != null; - } - public A addToPorts(int index,V1IngressPortStatus item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} - return (A)this; - } - public A setToPorts(int index,V1IngressPortStatus item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} - return (A)this; - } - public A addToPorts(io.kubernetes.client.openapi.models.V1IngressPortStatus... items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1IngressPortStatus item : items) {V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A addAllToPorts(Collection items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1IngressPortStatus item : items) {V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A removeFromPorts(io.kubernetes.client.openapi.models.V1IngressPortStatus... items) { - for (V1IngressPortStatus item : items) {V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeAllFromPorts(Collection items) { - for (V1IngressPortStatus item : items) {V1IngressPortStatusBuilder builder = new V1IngressPortStatusBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeMatchingFromPorts(Predicate predicate) { - if (ports == null) return (A) this; - final Iterator each = ports.iterator(); - final List visitables = _visitables.get("ports"); - while (each.hasNext()) { - V1IngressPortStatusBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts() { - return ports != null ? build(ports) : null; - } - public List buildPorts() { - return ports != null ? build(ports) : null; - } - public V1IngressPortStatus buildPort(int index) { - return this.ports.get(index).build(); - } - public V1IngressPortStatus buildFirstPort() { - return this.ports.get(0).build(); - } - public V1IngressPortStatus buildLastPort() { - return this.ports.get(ports.size() - 1).build(); - } - public V1IngressPortStatus buildMatchingPort(Predicate predicate) { - for (V1IngressPortStatusBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPort(Predicate predicate) { - for (V1IngressPortStatusBuilder item: ports) { if(predicate.test(item)){ return true;} } return false; - } - public A withPorts(List ports) { - if (this.ports != null) { _visitables.get("ports").clear();} - if (ports != null) {this.ports = new ArrayList(); for (V1IngressPortStatus item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this; - } - public A withPorts(io.kubernetes.client.openapi.models.V1IngressPortStatus... ports) { - if (this.ports != null) {this.ports.clear(); _visitables.remove("ports"); } - if (ports != null) {for (V1IngressPortStatus item :ports){ this.addToPorts(item);}} return (A) this; - } - public Boolean hasPorts() { - return ports != null && !ports.isEmpty(); - } - public V1IngressLoadBalancerIngressFluentImpl.PortsNested addNewPort() { - return new V1IngressLoadBalancerIngressFluentImpl.PortsNestedImpl(); - } - public V1IngressLoadBalancerIngressFluentImpl.PortsNested addNewPortLike(V1IngressPortStatus item) { - return new V1IngressLoadBalancerIngressFluentImpl.PortsNestedImpl(-1, item); - } - public V1IngressLoadBalancerIngressFluentImpl.PortsNested setNewPortLike(int index,V1IngressPortStatus item) { - return new V1IngressLoadBalancerIngressFluentImpl.PortsNestedImpl(index, item); - } - public V1IngressLoadBalancerIngressFluentImpl.PortsNested editPort(int index) { - if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); - return setNewPortLike(index, buildPort(index)); - } - public V1IngressLoadBalancerIngressFluentImpl.PortsNested editFirstPort() { - if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); - return setNewPortLike(0, buildPort(0)); - } - public V1IngressLoadBalancerIngressFluentImpl.PortsNested editLastPort() { - int index = ports.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); - return setNewPortLike(index, buildPort(index)); - } - public V1IngressLoadBalancerIngressFluentImpl.PortsNested editMatchingPort(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1IngressPortStatusFluentImpl> implements V1IngressLoadBalancerIngressFluentImpl.PortsNested,Nested{ - PortsNestedImpl(int index,V1IngressPortStatus item) { - this.index = index; - this.builder = new V1IngressPortStatusBuilder(this, item); - } - PortsNestedImpl() { - this.index = -1; - this.builder = new V1IngressPortStatusBuilder(this); - } - V1IngressPortStatusBuilder builder; - int index; - public N and() { - return (N) V1IngressLoadBalancerIngressFluentImpl.this.setToPorts(index,builder.build()); - } - public N endPort() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusBuilder.java index 80d4c17a31..bd5fed0a9a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressLoadBalancerStatusBuilder extends V1IngressLoadBalancerStatusFluentImpl implements VisitableBuilder{ +public class V1IngressLoadBalancerStatusBuilder extends V1IngressLoadBalancerStatusFluent implements VisitableBuilder{ public V1IngressLoadBalancerStatusBuilder() { - this(false); - } - public V1IngressLoadBalancerStatusBuilder(Boolean validationEnabled) { - this(new V1IngressLoadBalancerStatus(), validationEnabled); + this(new V1IngressLoadBalancerStatus()); } + public V1IngressLoadBalancerStatusBuilder(V1IngressLoadBalancerStatusFluent fluent) { - this(fluent, false); - } - public V1IngressLoadBalancerStatusBuilder(V1IngressLoadBalancerStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressLoadBalancerStatus(), validationEnabled); + this(fluent, new V1IngressLoadBalancerStatus()); } + public V1IngressLoadBalancerStatusBuilder(V1IngressLoadBalancerStatusFluent fluent,V1IngressLoadBalancerStatus instance) { - this(fluent, instance, false); - } - public V1IngressLoadBalancerStatusBuilder(V1IngressLoadBalancerStatusFluent fluent,V1IngressLoadBalancerStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withIngress(instance.getIngress()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressLoadBalancerStatusBuilder(V1IngressLoadBalancerStatus instance) { - this(instance,false); - } - public V1IngressLoadBalancerStatusBuilder(V1IngressLoadBalancerStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withIngress(instance.getIngress()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressLoadBalancerStatusFluent fluent; - Boolean validationEnabled; + public V1IngressLoadBalancerStatus build() { V1IngressLoadBalancerStatus buildable = new V1IngressLoadBalancerStatus(); - buildable.setIngress(fluent.getIngress()); + buildable.setIngress(fluent.buildIngress()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusFluent.java index 8232d536d2..b0dc9c1360 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1IngressLoadBalancerStatusFluent> extends Fluent{ - public A addToIngress(int index,V1IngressLoadBalancerIngress item); - public A setToIngress(int index,V1IngressLoadBalancerIngress item); - public A addToIngress(io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress... items); - public A addAllToIngress(Collection items); - public A removeFromIngress(io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress... items); - public A removeAllFromIngress(Collection items); - public A removeMatchingFromIngress(Predicate predicate); - - /** - * This method has been deprecated, please use method buildIngress instead. - * @return The buildable object. - */ - @Deprecated - public List getIngress(); - public List buildIngress(); - public V1IngressLoadBalancerIngress buildIngress(int index); - public V1IngressLoadBalancerIngress buildFirstIngress(); - public V1IngressLoadBalancerIngress buildLastIngress(); - public V1IngressLoadBalancerIngress buildMatchingIngress(Predicate predicate); - public Boolean hasMatchingIngress(Predicate predicate); - public A withIngress(List ingress); - public A withIngress(io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress... ingress); - public Boolean hasIngress(); - public V1IngressLoadBalancerStatusFluent.IngressNested addNewIngress(); - public V1IngressLoadBalancerStatusFluent.IngressNested addNewIngressLike(V1IngressLoadBalancerIngress item); - public V1IngressLoadBalancerStatusFluent.IngressNested setNewIngressLike(int index,V1IngressLoadBalancerIngress item); - public V1IngressLoadBalancerStatusFluent.IngressNested editIngress(int index); - public V1IngressLoadBalancerStatusFluent.IngressNested editFirstIngress(); - public V1IngressLoadBalancerStatusFluent.IngressNested editLastIngress(); - public V1IngressLoadBalancerStatusFluent.IngressNested editMatchingIngress(Predicate predicate); - public interface IngressNested extends Nested,V1IngressLoadBalancerIngressFluent>{ - public N and(); - public N endIngress(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressLoadBalancerStatusFluent> extends BaseFluent{ + public V1IngressLoadBalancerStatusFluent() { + } + + public V1IngressLoadBalancerStatusFluent(V1IngressLoadBalancerStatus instance) { + this.copyInstance(instance); + } + private ArrayList ingress; + + protected void copyInstance(V1IngressLoadBalancerStatus instance) { + instance = (instance != null ? instance : new V1IngressLoadBalancerStatus()); + if (instance != null) { + this.withIngress(instance.getIngress()); + } + } + + public A addToIngress(int index,V1IngressLoadBalancerIngress item) { + if (this.ingress == null) {this.ingress = new ArrayList();} + V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item); + if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").add(index, builder); ingress.add(index, builder);} + return (A)this; + } + + public A setToIngress(int index,V1IngressLoadBalancerIngress item) { + if (this.ingress == null) {this.ingress = new ArrayList();} + V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item); + if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").set(index, builder); ingress.set(index, builder);} + return (A)this; + } + + public A addToIngress(io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress... items) { + if (this.ingress == null) {this.ingress = new ArrayList();} + for (V1IngressLoadBalancerIngress item : items) {V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; + } + + public A addAllToIngress(Collection items) { + if (this.ingress == null) {this.ingress = new ArrayList();} + for (V1IngressLoadBalancerIngress item : items) {V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; + } + + public A removeFromIngress(io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress... items) { + if (this.ingress == null) return (A)this; + for (V1IngressLoadBalancerIngress item : items) {V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item);_visitables.get("ingress").remove(builder); this.ingress.remove(builder);} return (A)this; + } + + public A removeAllFromIngress(Collection items) { + if (this.ingress == null) return (A)this; + for (V1IngressLoadBalancerIngress item : items) {V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item);_visitables.get("ingress").remove(builder); this.ingress.remove(builder);} return (A)this; + } + + public A removeMatchingFromIngress(Predicate predicate) { + if (ingress == null) return (A) this; + final Iterator each = ingress.iterator(); + final List visitables = _visitables.get("ingress"); + while (each.hasNext()) { + V1IngressLoadBalancerIngressBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildIngress() { + return this.ingress != null ? build(ingress) : null; + } + + public V1IngressLoadBalancerIngress buildIngress(int index) { + return this.ingress.get(index).build(); + } + + public V1IngressLoadBalancerIngress buildFirstIngress() { + return this.ingress.get(0).build(); + } + + public V1IngressLoadBalancerIngress buildLastIngress() { + return this.ingress.get(ingress.size() - 1).build(); + } + + public V1IngressLoadBalancerIngress buildMatchingIngress(Predicate predicate) { + for (V1IngressLoadBalancerIngressBuilder item : ingress) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingIngress(Predicate predicate) { + for (V1IngressLoadBalancerIngressBuilder item : ingress) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withIngress(List ingress) { + if (this.ingress != null) { + this._visitables.get("ingress").clear(); + } + if (ingress != null) { + this.ingress = new ArrayList(); + for (V1IngressLoadBalancerIngress item : ingress) { + this.addToIngress(item); + } + } else { + this.ingress = null; + } + return (A) this; + } + + public A withIngress(io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress... ingress) { + if (this.ingress != null) { + this.ingress.clear(); + _visitables.remove("ingress"); + } + if (ingress != null) { + for (V1IngressLoadBalancerIngress item : ingress) { + this.addToIngress(item); + } + } + return (A) this; + } + + public boolean hasIngress() { + return this.ingress != null && !this.ingress.isEmpty(); + } + + public IngressNested addNewIngress() { + return new IngressNested(-1, null); + } + + public IngressNested addNewIngressLike(V1IngressLoadBalancerIngress item) { + return new IngressNested(-1, item); + } + + public IngressNested setNewIngressLike(int index,V1IngressLoadBalancerIngress item) { + return new IngressNested(index, item); + } + + public IngressNested editIngress(int index) { + if (ingress.size() <= index) throw new RuntimeException("Can't edit ingress. Index exceeds size."); + return setNewIngressLike(index, buildIngress(index)); + } + + public IngressNested editFirstIngress() { + if (ingress.size() == 0) throw new RuntimeException("Can't edit first ingress. The list is empty."); + return setNewIngressLike(0, buildIngress(0)); + } + + public IngressNested editLastIngress() { + int index = ingress.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ingress. The list is empty."); + return setNewIngressLike(index, buildIngress(index)); + } + + public IngressNested editMatchingIngress(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1IngressLoadBalancerIngressFluent> implements Nested{ + IngressNested(int index,V1IngressLoadBalancerIngress item) { + this.index = index; + this.builder = new V1IngressLoadBalancerIngressBuilder(this, item); + } + V1IngressLoadBalancerIngressBuilder builder; + int index; + + public N and() { + return (N) V1IngressLoadBalancerStatusFluent.this.setToIngress(index,builder.build()); + } + + public N endIngress() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusFluentImpl.java deleted file mode 100644 index 448fc18a9b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressLoadBalancerStatusFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressLoadBalancerStatusFluentImpl> extends BaseFluent implements V1IngressLoadBalancerStatusFluent{ - public V1IngressLoadBalancerStatusFluentImpl() { - } - public V1IngressLoadBalancerStatusFluentImpl(V1IngressLoadBalancerStatus instance) { - if (instance != null) { - this.withIngress(instance.getIngress()); - } - } - private ArrayList ingress; - public A addToIngress(int index,V1IngressLoadBalancerIngress item) { - if (this.ingress == null) {this.ingress = new ArrayList();} - V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item); - if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").add(index, builder); ingress.add(index, builder);} - return (A)this; - } - public A setToIngress(int index,V1IngressLoadBalancerIngress item) { - if (this.ingress == null) {this.ingress = new ArrayList();} - V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item); - if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").set(index, builder); ingress.set(index, builder);} - return (A)this; - } - public A addToIngress(io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress... items) { - if (this.ingress == null) {this.ingress = new ArrayList();} - for (V1IngressLoadBalancerIngress item : items) {V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; - } - public A addAllToIngress(Collection items) { - if (this.ingress == null) {this.ingress = new ArrayList();} - for (V1IngressLoadBalancerIngress item : items) {V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; - } - public A removeFromIngress(io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress... items) { - for (V1IngressLoadBalancerIngress item : items) {V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item);_visitables.get("ingress").remove(builder);if (this.ingress != null) {this.ingress.remove(builder);}} return (A)this; - } - public A removeAllFromIngress(Collection items) { - for (V1IngressLoadBalancerIngress item : items) {V1IngressLoadBalancerIngressBuilder builder = new V1IngressLoadBalancerIngressBuilder(item);_visitables.get("ingress").remove(builder);if (this.ingress != null) {this.ingress.remove(builder);}} return (A)this; - } - public A removeMatchingFromIngress(Predicate predicate) { - if (ingress == null) return (A) this; - final Iterator each = ingress.iterator(); - final List visitables = _visitables.get("ingress"); - while (each.hasNext()) { - V1IngressLoadBalancerIngressBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildIngress instead. - * @return The buildable object. - */ - @Deprecated - public List getIngress() { - return ingress != null ? build(ingress) : null; - } - public List buildIngress() { - return ingress != null ? build(ingress) : null; - } - public V1IngressLoadBalancerIngress buildIngress(int index) { - return this.ingress.get(index).build(); - } - public V1IngressLoadBalancerIngress buildFirstIngress() { - return this.ingress.get(0).build(); - } - public V1IngressLoadBalancerIngress buildLastIngress() { - return this.ingress.get(ingress.size() - 1).build(); - } - public V1IngressLoadBalancerIngress buildMatchingIngress(Predicate predicate) { - for (V1IngressLoadBalancerIngressBuilder item: ingress) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingIngress(Predicate predicate) { - for (V1IngressLoadBalancerIngressBuilder item: ingress) { if(predicate.test(item)){ return true;} } return false; - } - public A withIngress(List ingress) { - if (this.ingress != null) { _visitables.get("ingress").clear();} - if (ingress != null) {this.ingress = new ArrayList(); for (V1IngressLoadBalancerIngress item : ingress){this.addToIngress(item);}} else { this.ingress = null;} return (A) this; - } - public A withIngress(io.kubernetes.client.openapi.models.V1IngressLoadBalancerIngress... ingress) { - if (this.ingress != null) {this.ingress.clear(); _visitables.remove("ingress"); } - if (ingress != null) {for (V1IngressLoadBalancerIngress item :ingress){ this.addToIngress(item);}} return (A) this; - } - public Boolean hasIngress() { - return ingress != null && !ingress.isEmpty(); - } - public V1IngressLoadBalancerStatusFluentImpl.IngressNested addNewIngress() { - return new V1IngressLoadBalancerStatusFluentImpl.IngressNestedImpl(); - } - public V1IngressLoadBalancerStatusFluentImpl.IngressNested addNewIngressLike(V1IngressLoadBalancerIngress item) { - return new V1IngressLoadBalancerStatusFluentImpl.IngressNestedImpl(-1, item); - } - public V1IngressLoadBalancerStatusFluentImpl.IngressNested setNewIngressLike(int index,V1IngressLoadBalancerIngress item) { - return new V1IngressLoadBalancerStatusFluentImpl.IngressNestedImpl(index, item); - } - public V1IngressLoadBalancerStatusFluentImpl.IngressNested editIngress(int index) { - if (ingress.size() <= index) throw new RuntimeException("Can't edit ingress. Index exceeds size."); - return setNewIngressLike(index, buildIngress(index)); - } - public V1IngressLoadBalancerStatusFluentImpl.IngressNested editFirstIngress() { - if (ingress.size() == 0) throw new RuntimeException("Can't edit first ingress. The list is empty."); - return setNewIngressLike(0, buildIngress(0)); - } - public V1IngressLoadBalancerStatusFluentImpl.IngressNested editLastIngress() { - int index = ingress.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ingress. The list is empty."); - return setNewIngressLike(index, buildIngress(index)); - } - public V1IngressLoadBalancerStatusFluentImpl.IngressNested editMatchingIngress(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1IngressLoadBalancerIngressFluentImpl> implements V1IngressLoadBalancerStatusFluentImpl.IngressNested,Nested{ - IngressNestedImpl(int index,V1IngressLoadBalancerIngress item) { - this.index = index; - this.builder = new V1IngressLoadBalancerIngressBuilder(this, item); - } - IngressNestedImpl() { - this.index = -1; - this.builder = new V1IngressLoadBalancerIngressBuilder(this); - } - V1IngressLoadBalancerIngressBuilder builder; - int index; - public N and() { - return (N) V1IngressLoadBalancerStatusFluentImpl.this.setToIngress(index,builder.build()); - } - public N endIngress() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusBuilder.java index ccc756b475..e123082dd9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressPortStatusBuilder extends V1IngressPortStatusFluentImpl implements VisitableBuilder{ +public class V1IngressPortStatusBuilder extends V1IngressPortStatusFluent implements VisitableBuilder{ public V1IngressPortStatusBuilder() { - this(false); - } - public V1IngressPortStatusBuilder(Boolean validationEnabled) { - this(new V1IngressPortStatus(), validationEnabled); + this(new V1IngressPortStatus()); } + public V1IngressPortStatusBuilder(V1IngressPortStatusFluent fluent) { - this(fluent, false); - } - public V1IngressPortStatusBuilder(V1IngressPortStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressPortStatus(), validationEnabled); + this(fluent, new V1IngressPortStatus()); } + public V1IngressPortStatusBuilder(V1IngressPortStatusFluent fluent,V1IngressPortStatus instance) { - this(fluent, instance, false); - } - public V1IngressPortStatusBuilder(V1IngressPortStatusFluent fluent,V1IngressPortStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withError(instance.getError()); - fluent.withPort(instance.getPort()); - fluent.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressPortStatusBuilder(V1IngressPortStatus instance) { - this(instance,false); - } - public V1IngressPortStatusBuilder(V1IngressPortStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withError(instance.getError()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressPortStatusFluent fluent; - Boolean validationEnabled; + public V1IngressPortStatus build() { V1IngressPortStatus buildable = new V1IngressPortStatus(); buildable.setError(fluent.getError()); @@ -49,4 +29,5 @@ public V1IngressPortStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusFluent.java index f5833100d5..d288140e46 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusFluent.java @@ -1,23 +1,98 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1IngressPortStatusFluent> extends Fluent{ - public String getError(); - public A withError(String error); - public Boolean hasError(); - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); - public String getProtocol(); - public A withProtocol(String protocol); - public Boolean hasProtocol(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressPortStatusFluent> extends BaseFluent{ + public V1IngressPortStatusFluent() { + } + public V1IngressPortStatusFluent(V1IngressPortStatus instance) { + this.copyInstance(instance); + } + private String error; + private Integer port; + private String protocol; + + protected void copyInstance(V1IngressPortStatus instance) { + instance = (instance != null ? instance : new V1IngressPortStatus()); + if (instance != null) { + this.withError(instance.getError()); + this.withPort(instance.getPort()); + this.withProtocol(instance.getProtocol()); + } + } + + public String getError() { + return this.error; + } + + public A withError(String error) { + this.error = error; + return (A) this; + } + + public boolean hasError() { + return this.error != null; + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public String getProtocol() { + return this.protocol; + } + + public A withProtocol(String protocol) { + this.protocol = protocol; + return (A) this; + } + + public boolean hasProtocol() { + return this.protocol != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressPortStatusFluent that = (V1IngressPortStatusFluent) o; + if (!java.util.Objects.equals(error, that.error)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + if (!java.util.Objects.equals(protocol, that.protocol)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(error, port, protocol, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (error != null) { sb.append("error:"); sb.append(error + ","); } + if (port != null) { sb.append("port:"); sb.append(port + ","); } + if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusFluentImpl.java deleted file mode 100644 index 28b69e78ee..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressPortStatusFluentImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressPortStatusFluentImpl> extends BaseFluent implements V1IngressPortStatusFluent{ - public V1IngressPortStatusFluentImpl() { - } - public V1IngressPortStatusFluentImpl(V1IngressPortStatus instance) { - if (instance != null) { - this.withError(instance.getError()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - } - private String error; - private Integer port; - private String protocol; - public String getError() { - return this.error; - } - public A withError(String error) { - this.error=error; return (A) this; - } - public Boolean hasError() { - return this.error != null; - } - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public String getProtocol() { - return this.protocol; - } - public A withProtocol(String protocol) { - this.protocol=protocol; return (A) this; - } - public Boolean hasProtocol() { - return this.protocol != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressPortStatusFluentImpl that = (V1IngressPortStatusFluentImpl) o; - if (!java.util.Objects.equals(error, that.error)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - if (!java.util.Objects.equals(protocol, that.protocol)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(error, port, protocol, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (error != null) { sb.append("error:"); sb.append(error + ","); } - if (port != null) { sb.append("port:"); sb.append(port + ","); } - if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleBuilder.java index 9990b08413..3ad697af23 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressRuleBuilder extends V1IngressRuleFluentImpl implements VisitableBuilder{ +public class V1IngressRuleBuilder extends V1IngressRuleFluent implements VisitableBuilder{ public V1IngressRuleBuilder() { - this(false); - } - public V1IngressRuleBuilder(Boolean validationEnabled) { - this(new V1IngressRule(), validationEnabled); + this(new V1IngressRule()); } + public V1IngressRuleBuilder(V1IngressRuleFluent fluent) { - this(fluent, false); - } - public V1IngressRuleBuilder(V1IngressRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressRule(), validationEnabled); + this(fluent, new V1IngressRule()); } + public V1IngressRuleBuilder(V1IngressRuleFluent fluent,V1IngressRule instance) { - this(fluent, instance, false); - } - public V1IngressRuleBuilder(V1IngressRuleFluent fluent,V1IngressRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHost(instance.getHost()); - fluent.withHttp(instance.getHttp()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressRuleBuilder(V1IngressRule instance) { - this(instance,false); - } - public V1IngressRuleBuilder(V1IngressRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHost(instance.getHost()); - this.withHttp(instance.getHttp()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressRuleFluent fluent; - Boolean validationEnabled; + public V1IngressRule build() { V1IngressRule buildable = new V1IngressRule(); buildable.setHost(fluent.getHost()); - buildable.setHttp(fluent.getHttp()); + buildable.setHttp(fluent.buildHttp()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleFluent.java index 18c21e36ec..3d4ac6c6b4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1IngressRuleFluent> extends Fluent{ - public String getHost(); - public A withHost(String host); - public Boolean hasHost(); - - /** - * This method has been deprecated, please use method buildHttp instead. - * @return The buildable object. - */ - @Deprecated - public V1HTTPIngressRuleValue getHttp(); - public V1HTTPIngressRuleValue buildHttp(); - public A withHttp(V1HTTPIngressRuleValue http); - public Boolean hasHttp(); - public V1IngressRuleFluent.HttpNested withNewHttp(); - public V1IngressRuleFluent.HttpNested withNewHttpLike(V1HTTPIngressRuleValue item); - public V1IngressRuleFluent.HttpNested editHttp(); - public V1IngressRuleFluent.HttpNested editOrNewHttp(); - public V1IngressRuleFluent.HttpNested editOrNewHttpLike(V1HTTPIngressRuleValue item); - public interface HttpNested extends Nested,V1HTTPIngressRuleValueFluent>{ - public N and(); - public N endHttp(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressRuleFluent> extends BaseFluent{ + public V1IngressRuleFluent() { + } + + public V1IngressRuleFluent(V1IngressRule instance) { + this.copyInstance(instance); + } + private String host; + private V1HTTPIngressRuleValueBuilder http; + + protected void copyInstance(V1IngressRule instance) { + instance = (instance != null ? instance : new V1IngressRule()); + if (instance != null) { + this.withHost(instance.getHost()); + this.withHttp(instance.getHttp()); + } + } + + public String getHost() { + return this.host; + } + + public A withHost(String host) { + this.host = host; + return (A) this; + } + + public boolean hasHost() { + return this.host != null; + } + + public V1HTTPIngressRuleValue buildHttp() { + return this.http != null ? this.http.build() : null; + } + + public A withHttp(V1HTTPIngressRuleValue http) { + this._visitables.remove("http"); + if (http != null) { + this.http = new V1HTTPIngressRuleValueBuilder(http); + this._visitables.get("http").add(this.http); + } else { + this.http = null; + this._visitables.get("http").remove(this.http); + } + return (A) this; + } + + public boolean hasHttp() { + return this.http != null; + } + + public HttpNested withNewHttp() { + return new HttpNested(null); } + public HttpNested withNewHttpLike(V1HTTPIngressRuleValue item) { + return new HttpNested(item); + } + + public HttpNested editHttp() { + return withNewHttpLike(java.util.Optional.ofNullable(buildHttp()).orElse(null)); + } + + public HttpNested editOrNewHttp() { + return withNewHttpLike(java.util.Optional.ofNullable(buildHttp()).orElse(new V1HTTPIngressRuleValueBuilder().build())); + } + + public HttpNested editOrNewHttpLike(V1HTTPIngressRuleValue item) { + return withNewHttpLike(java.util.Optional.ofNullable(buildHttp()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressRuleFluent that = (V1IngressRuleFluent) o; + if (!java.util.Objects.equals(host, that.host)) return false; + if (!java.util.Objects.equals(http, that.http)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(host, http, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (host != null) { sb.append("host:"); sb.append(host + ","); } + if (http != null) { sb.append("http:"); sb.append(http); } + sb.append("}"); + return sb.toString(); + } + public class HttpNested extends V1HTTPIngressRuleValueFluent> implements Nested{ + HttpNested(V1HTTPIngressRuleValue item) { + this.builder = new V1HTTPIngressRuleValueBuilder(this, item); + } + V1HTTPIngressRuleValueBuilder builder; + + public N and() { + return (N) V1IngressRuleFluent.this.withHttp(builder.build()); + } + + public N endHttp() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleFluentImpl.java deleted file mode 100644 index bdec27e6a2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressRuleFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressRuleFluentImpl> extends BaseFluent implements V1IngressRuleFluent{ - public V1IngressRuleFluentImpl() { - } - public V1IngressRuleFluentImpl(V1IngressRule instance) { - if (instance != null) { - this.withHost(instance.getHost()); - this.withHttp(instance.getHttp()); - } - } - private String host; - private V1HTTPIngressRuleValueBuilder http; - public String getHost() { - return this.host; - } - public A withHost(String host) { - this.host=host; return (A) this; - } - public Boolean hasHost() { - return this.host != null; - } - - /** - * This method has been deprecated, please use method buildHttp instead. - * @return The buildable object. - */ - @Deprecated - public V1HTTPIngressRuleValue getHttp() { - return this.http!=null ?this.http.build():null; - } - public V1HTTPIngressRuleValue buildHttp() { - return this.http!=null ?this.http.build():null; - } - public A withHttp(V1HTTPIngressRuleValue http) { - _visitables.get("http").remove(this.http); - if (http!=null){ this.http= new V1HTTPIngressRuleValueBuilder(http); _visitables.get("http").add(this.http);} else { this.http = null; _visitables.get("http").remove(this.http); } return (A) this; - } - public Boolean hasHttp() { - return this.http != null; - } - public V1IngressRuleFluentImpl.HttpNested withNewHttp() { - return new V1IngressRuleFluentImpl.HttpNestedImpl(); - } - public V1IngressRuleFluentImpl.HttpNested withNewHttpLike(V1HTTPIngressRuleValue item) { - return new V1IngressRuleFluentImpl.HttpNestedImpl(item); - } - public V1IngressRuleFluentImpl.HttpNested editHttp() { - return withNewHttpLike(getHttp()); - } - public V1IngressRuleFluentImpl.HttpNested editOrNewHttp() { - return withNewHttpLike(getHttp() != null ? getHttp(): new V1HTTPIngressRuleValueBuilder().build()); - } - public V1IngressRuleFluentImpl.HttpNested editOrNewHttpLike(V1HTTPIngressRuleValue item) { - return withNewHttpLike(getHttp() != null ? getHttp(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressRuleFluentImpl that = (V1IngressRuleFluentImpl) o; - if (!java.util.Objects.equals(host, that.host)) return false; - - if (!java.util.Objects.equals(http, that.http)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(host, http, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (host != null) { sb.append("host:"); sb.append(host + ","); } - if (http != null) { sb.append("http:"); sb.append(http); } - sb.append("}"); - return sb.toString(); - } - class HttpNestedImpl extends V1HTTPIngressRuleValueFluentImpl> implements V1IngressRuleFluentImpl.HttpNested,Nested{ - HttpNestedImpl(V1HTTPIngressRuleValue item) { - this.builder = new V1HTTPIngressRuleValueBuilder(this, item); - } - HttpNestedImpl() { - this.builder = new V1HTTPIngressRuleValueBuilder(this); - } - V1HTTPIngressRuleValueBuilder builder; - public N and() { - return (N) V1IngressRuleFluentImpl.this.withHttp(builder.build()); - } - public N endHttp() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendBuilder.java index 1ce8aa2b22..8a2fbe27c0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressServiceBackendBuilder extends V1IngressServiceBackendFluentImpl implements VisitableBuilder{ +public class V1IngressServiceBackendBuilder extends V1IngressServiceBackendFluent implements VisitableBuilder{ public V1IngressServiceBackendBuilder() { - this(false); - } - public V1IngressServiceBackendBuilder(Boolean validationEnabled) { - this(new V1IngressServiceBackend(), validationEnabled); + this(new V1IngressServiceBackend()); } + public V1IngressServiceBackendBuilder(V1IngressServiceBackendFluent fluent) { - this(fluent, false); - } - public V1IngressServiceBackendBuilder(V1IngressServiceBackendFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressServiceBackend(), validationEnabled); + this(fluent, new V1IngressServiceBackend()); } + public V1IngressServiceBackendBuilder(V1IngressServiceBackendFluent fluent,V1IngressServiceBackend instance) { - this(fluent, instance, false); - } - public V1IngressServiceBackendBuilder(V1IngressServiceBackendFluent fluent,V1IngressServiceBackend instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressServiceBackendBuilder(V1IngressServiceBackend instance) { - this(instance,false); - } - public V1IngressServiceBackendBuilder(V1IngressServiceBackend instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressServiceBackendFluent fluent; - Boolean validationEnabled; + public V1IngressServiceBackend build() { V1IngressServiceBackend buildable = new V1IngressServiceBackend(); buildable.setName(fluent.getName()); - buildable.setPort(fluent.getPort()); + buildable.setPort(fluent.buildPort()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendFluent.java index 4e6916f996..c4fcf4fe22 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1IngressServiceBackendFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildPort instead. - * @return The buildable object. - */ - @Deprecated - public V1ServiceBackendPort getPort(); - public V1ServiceBackendPort buildPort(); - public A withPort(V1ServiceBackendPort port); - public Boolean hasPort(); - public V1IngressServiceBackendFluent.PortNested withNewPort(); - public V1IngressServiceBackendFluent.PortNested withNewPortLike(V1ServiceBackendPort item); - public V1IngressServiceBackendFluent.PortNested editPort(); - public V1IngressServiceBackendFluent.PortNested editOrNewPort(); - public V1IngressServiceBackendFluent.PortNested editOrNewPortLike(V1ServiceBackendPort item); - public interface PortNested extends Nested,V1ServiceBackendPortFluent>{ - public N and(); - public N endPort(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressServiceBackendFluent> extends BaseFluent{ + public V1IngressServiceBackendFluent() { + } + + public V1IngressServiceBackendFluent(V1IngressServiceBackend instance) { + this.copyInstance(instance); + } + private String name; + private V1ServiceBackendPortBuilder port; + + protected void copyInstance(V1IngressServiceBackend instance) { + instance = (instance != null ? instance : new V1IngressServiceBackend()); + if (instance != null) { + this.withName(instance.getName()); + this.withPort(instance.getPort()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public V1ServiceBackendPort buildPort() { + return this.port != null ? this.port.build() : null; + } + + public A withPort(V1ServiceBackendPort port) { + this._visitables.remove("port"); + if (port != null) { + this.port = new V1ServiceBackendPortBuilder(port); + this._visitables.get("port").add(this.port); + } else { + this.port = null; + this._visitables.get("port").remove(this.port); + } + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public PortNested withNewPort() { + return new PortNested(null); } + public PortNested withNewPortLike(V1ServiceBackendPort item) { + return new PortNested(item); + } + + public PortNested editPort() { + return withNewPortLike(java.util.Optional.ofNullable(buildPort()).orElse(null)); + } + + public PortNested editOrNewPort() { + return withNewPortLike(java.util.Optional.ofNullable(buildPort()).orElse(new V1ServiceBackendPortBuilder().build())); + } + + public PortNested editOrNewPortLike(V1ServiceBackendPort item) { + return withNewPortLike(java.util.Optional.ofNullable(buildPort()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressServiceBackendFluent that = (V1IngressServiceBackendFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, port, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (port != null) { sb.append("port:"); sb.append(port); } + sb.append("}"); + return sb.toString(); + } + public class PortNested extends V1ServiceBackendPortFluent> implements Nested{ + PortNested(V1ServiceBackendPort item) { + this.builder = new V1ServiceBackendPortBuilder(this, item); + } + V1ServiceBackendPortBuilder builder; + + public N and() { + return (N) V1IngressServiceBackendFluent.this.withPort(builder.build()); + } + + public N endPort() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendFluentImpl.java deleted file mode 100644 index cb5ca366ac..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressServiceBackendFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressServiceBackendFluentImpl> extends BaseFluent implements V1IngressServiceBackendFluent{ - public V1IngressServiceBackendFluentImpl() { - } - public V1IngressServiceBackendFluentImpl(V1IngressServiceBackend instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withPort(instance.getPort()); - } - } - private String name; - private V1ServiceBackendPortBuilder port; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - - /** - * This method has been deprecated, please use method buildPort instead. - * @return The buildable object. - */ - @Deprecated - public V1ServiceBackendPort getPort() { - return this.port!=null ?this.port.build():null; - } - public V1ServiceBackendPort buildPort() { - return this.port!=null ?this.port.build():null; - } - public A withPort(V1ServiceBackendPort port) { - _visitables.get("port").remove(this.port); - if (port!=null){ this.port= new V1ServiceBackendPortBuilder(port); _visitables.get("port").add(this.port);} else { this.port = null; _visitables.get("port").remove(this.port); } return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public V1IngressServiceBackendFluentImpl.PortNested withNewPort() { - return new V1IngressServiceBackendFluentImpl.PortNestedImpl(); - } - public V1IngressServiceBackendFluentImpl.PortNested withNewPortLike(V1ServiceBackendPort item) { - return new V1IngressServiceBackendFluentImpl.PortNestedImpl(item); - } - public V1IngressServiceBackendFluentImpl.PortNested editPort() { - return withNewPortLike(getPort()); - } - public V1IngressServiceBackendFluentImpl.PortNested editOrNewPort() { - return withNewPortLike(getPort() != null ? getPort(): new V1ServiceBackendPortBuilder().build()); - } - public V1IngressServiceBackendFluentImpl.PortNested editOrNewPortLike(V1ServiceBackendPort item) { - return withNewPortLike(getPort() != null ? getPort(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressServiceBackendFluentImpl that = (V1IngressServiceBackendFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, port, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (port != null) { sb.append("port:"); sb.append(port); } - sb.append("}"); - return sb.toString(); - } - class PortNestedImpl extends V1ServiceBackendPortFluentImpl> implements V1IngressServiceBackendFluentImpl.PortNested,Nested{ - PortNestedImpl(V1ServiceBackendPort item) { - this.builder = new V1ServiceBackendPortBuilder(this, item); - } - PortNestedImpl() { - this.builder = new V1ServiceBackendPortBuilder(this); - } - V1ServiceBackendPortBuilder builder; - public N and() { - return (N) V1IngressServiceBackendFluentImpl.this.withPort(builder.build()); - } - public N endPort() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecBuilder.java index 1af1813114..fac67ab401 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressSpecBuilder extends V1IngressSpecFluentImpl implements VisitableBuilder{ +public class V1IngressSpecBuilder extends V1IngressSpecFluent implements VisitableBuilder{ public V1IngressSpecBuilder() { - this(false); - } - public V1IngressSpecBuilder(Boolean validationEnabled) { - this(new V1IngressSpec(), validationEnabled); + this(new V1IngressSpec()); } + public V1IngressSpecBuilder(V1IngressSpecFluent fluent) { - this(fluent, false); - } - public V1IngressSpecBuilder(V1IngressSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressSpec(), validationEnabled); + this(fluent, new V1IngressSpec()); } + public V1IngressSpecBuilder(V1IngressSpecFluent fluent,V1IngressSpec instance) { - this(fluent, instance, false); - } - public V1IngressSpecBuilder(V1IngressSpecFluent fluent,V1IngressSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDefaultBackend(instance.getDefaultBackend()); - fluent.withIngressClassName(instance.getIngressClassName()); - fluent.withRules(instance.getRules()); - fluent.withTls(instance.getTls()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressSpecBuilder(V1IngressSpec instance) { - this(instance,false); - } - public V1IngressSpecBuilder(V1IngressSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDefaultBackend(instance.getDefaultBackend()); - this.withIngressClassName(instance.getIngressClassName()); - this.withRules(instance.getRules()); - this.withTls(instance.getTls()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressSpecFluent fluent; - Boolean validationEnabled; + public V1IngressSpec build() { V1IngressSpec buildable = new V1IngressSpec(); - buildable.setDefaultBackend(fluent.getDefaultBackend()); + buildable.setDefaultBackend(fluent.buildDefaultBackend()); buildable.setIngressClassName(fluent.getIngressClassName()); - buildable.setRules(fluent.getRules()); - buildable.setTls(fluent.getTls()); + buildable.setRules(fluent.buildRules()); + buildable.setTls(fluent.buildTls()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecFluent.java index 307c8316da..5439552f48 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecFluent.java @@ -1,114 +1,475 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1IngressSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildDefaultBackend instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressBackend getDefaultBackend(); - public V1IngressBackend buildDefaultBackend(); - public A withDefaultBackend(V1IngressBackend defaultBackend); - public Boolean hasDefaultBackend(); - public V1IngressSpecFluent.DefaultBackendNested withNewDefaultBackend(); - public V1IngressSpecFluent.DefaultBackendNested withNewDefaultBackendLike(V1IngressBackend item); - public V1IngressSpecFluent.DefaultBackendNested editDefaultBackend(); - public V1IngressSpecFluent.DefaultBackendNested editOrNewDefaultBackend(); - public V1IngressSpecFluent.DefaultBackendNested editOrNewDefaultBackendLike(V1IngressBackend item); - public String getIngressClassName(); - public A withIngressClassName(String ingressClassName); - public Boolean hasIngressClassName(); - public A addToRules(int index,V1IngressRule item); - public A setToRules(int index,V1IngressRule item); - public A addToRules(io.kubernetes.client.openapi.models.V1IngressRule... items); - public A addAllToRules(Collection items); - public A removeFromRules(io.kubernetes.client.openapi.models.V1IngressRule... items); - public A removeAllFromRules(Collection items); - public A removeMatchingFromRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules(); - public List buildRules(); - public V1IngressRule buildRule(int index); - public V1IngressRule buildFirstRule(); - public V1IngressRule buildLastRule(); - public V1IngressRule buildMatchingRule(Predicate predicate); - public Boolean hasMatchingRule(Predicate predicate); - public A withRules(List rules); - public A withRules(io.kubernetes.client.openapi.models.V1IngressRule... rules); - public Boolean hasRules(); - public V1IngressSpecFluent.RulesNested addNewRule(); - public V1IngressSpecFluent.RulesNested addNewRuleLike(V1IngressRule item); - public V1IngressSpecFluent.RulesNested setNewRuleLike(int index,V1IngressRule item); - public V1IngressSpecFluent.RulesNested editRule(int index); - public V1IngressSpecFluent.RulesNested editFirstRule(); - public V1IngressSpecFluent.RulesNested editLastRule(); - public V1IngressSpecFluent.RulesNested editMatchingRule(Predicate predicate); - public A addToTls(int index,V1IngressTLS item); - public A setToTls(int index,V1IngressTLS item); - public A addToTls(io.kubernetes.client.openapi.models.V1IngressTLS... items); - public A addAllToTls(Collection items); - public A removeFromTls(io.kubernetes.client.openapi.models.V1IngressTLS... items); - public A removeAllFromTls(Collection items); - public A removeMatchingFromTls(Predicate predicate); - - /** - * This method has been deprecated, please use method buildTls instead. - * @return The buildable object. - */ - @Deprecated - public List getTls(); - public List buildTls(); - public V1IngressTLS buildTl(int index); - public V1IngressTLS buildFirstTl(); - public V1IngressTLS buildLastTl(); - public V1IngressTLS buildMatchingTl(Predicate predicate); - public Boolean hasMatchingTl(Predicate predicate); - public A withTls(List tls); - public A withTls(io.kubernetes.client.openapi.models.V1IngressTLS... tls); - public Boolean hasTls(); - public V1IngressSpecFluent.TlsNested addNewTl(); - public V1IngressSpecFluent.TlsNested addNewTlLike(V1IngressTLS item); - public V1IngressSpecFluent.TlsNested setNewTlLike(int index,V1IngressTLS item); - public V1IngressSpecFluent.TlsNested editTl(int index); - public V1IngressSpecFluent.TlsNested editFirstTl(); - public V1IngressSpecFluent.TlsNested editLastTl(); - public V1IngressSpecFluent.TlsNested editMatchingTl(Predicate predicate); - public interface DefaultBackendNested extends Nested,V1IngressBackendFluent>{ - public N and(); - public N endDefaultBackend(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressSpecFluent> extends BaseFluent{ + public V1IngressSpecFluent() { + } + + public V1IngressSpecFluent(V1IngressSpec instance) { + this.copyInstance(instance); + } + private V1IngressBackendBuilder defaultBackend; + private String ingressClassName; + private ArrayList rules; + private ArrayList tls; + + protected void copyInstance(V1IngressSpec instance) { + instance = (instance != null ? instance : new V1IngressSpec()); + if (instance != null) { + this.withDefaultBackend(instance.getDefaultBackend()); + this.withIngressClassName(instance.getIngressClassName()); + this.withRules(instance.getRules()); + this.withTls(instance.getTls()); + } + } + + public V1IngressBackend buildDefaultBackend() { + return this.defaultBackend != null ? this.defaultBackend.build() : null; + } + + public A withDefaultBackend(V1IngressBackend defaultBackend) { + this._visitables.remove("defaultBackend"); + if (defaultBackend != null) { + this.defaultBackend = new V1IngressBackendBuilder(defaultBackend); + this._visitables.get("defaultBackend").add(this.defaultBackend); + } else { + this.defaultBackend = null; + this._visitables.get("defaultBackend").remove(this.defaultBackend); + } + return (A) this; + } + + public boolean hasDefaultBackend() { + return this.defaultBackend != null; + } + + public DefaultBackendNested withNewDefaultBackend() { + return new DefaultBackendNested(null); + } + + public DefaultBackendNested withNewDefaultBackendLike(V1IngressBackend item) { + return new DefaultBackendNested(item); + } + + public DefaultBackendNested editDefaultBackend() { + return withNewDefaultBackendLike(java.util.Optional.ofNullable(buildDefaultBackend()).orElse(null)); + } + + public DefaultBackendNested editOrNewDefaultBackend() { + return withNewDefaultBackendLike(java.util.Optional.ofNullable(buildDefaultBackend()).orElse(new V1IngressBackendBuilder().build())); + } + + public DefaultBackendNested editOrNewDefaultBackendLike(V1IngressBackend item) { + return withNewDefaultBackendLike(java.util.Optional.ofNullable(buildDefaultBackend()).orElse(item)); + } + + public String getIngressClassName() { + return this.ingressClassName; + } + + public A withIngressClassName(String ingressClassName) { + this.ingressClassName = ingressClassName; + return (A) this; + } + + public boolean hasIngressClassName() { + return this.ingressClassName != null; + } + + public A addToRules(int index,V1IngressRule item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} + return (A)this; + } + + public A setToRules(int index,V1IngressRule item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} + return (A)this; + } + + public A addToRules(io.kubernetes.client.openapi.models.V1IngressRule... items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1IngressRule item : items) {V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A addAllToRules(Collection items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1IngressRule item : items) {V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A removeFromRules(io.kubernetes.client.openapi.models.V1IngressRule... items) { + if (this.rules == null) return (A)this; + for (V1IngressRule item : items) {V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeAllFromRules(Collection items) { + if (this.rules == null) return (A)this; + for (V1IngressRule item : items) {V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeMatchingFromRules(Predicate predicate) { + if (rules == null) return (A) this; + final Iterator each = rules.iterator(); + final List visitables = _visitables.get("rules"); + while (each.hasNext()) { + V1IngressRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildRules() { + return this.rules != null ? build(rules) : null; + } + + public V1IngressRule buildRule(int index) { + return this.rules.get(index).build(); + } + + public V1IngressRule buildFirstRule() { + return this.rules.get(0).build(); + } + + public V1IngressRule buildLastRule() { + return this.rules.get(rules.size() - 1).build(); + } + + public V1IngressRule buildMatchingRule(Predicate predicate) { + for (V1IngressRuleBuilder item : rules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingRule(Predicate predicate) { + for (V1IngressRuleBuilder item : rules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRules(List rules) { + if (this.rules != null) { + this._visitables.get("rules").clear(); + } + if (rules != null) { + this.rules = new ArrayList(); + for (V1IngressRule item : rules) { + this.addToRules(item); + } + } else { + this.rules = null; + } + return (A) this; + } + + public A withRules(io.kubernetes.client.openapi.models.V1IngressRule... rules) { + if (this.rules != null) { + this.rules.clear(); + _visitables.remove("rules"); + } + if (rules != null) { + for (V1IngressRule item : rules) { + this.addToRules(item); + } + } + return (A) this; + } + + public boolean hasRules() { + return this.rules != null && !this.rules.isEmpty(); + } + + public RulesNested addNewRule() { + return new RulesNested(-1, null); + } + + public RulesNested addNewRuleLike(V1IngressRule item) { + return new RulesNested(-1, item); + } + + public RulesNested setNewRuleLike(int index,V1IngressRule item) { + return new RulesNested(index, item); + } + + public RulesNested editRule(int index) { + if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); + return setNewRuleLike(index, buildRule(index)); } - public interface RulesNested extends Nested,V1IngressRuleFluent>{ - public N and(); - public N endRule(); + + public RulesNested editFirstRule() { + if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); + return setNewRuleLike(0, buildRule(0)); + } + + public RulesNested editLastRule() { + int index = rules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editMatchingRule(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item); + if (index < 0 || index >= tls.size()) { _visitables.get("tls").add(builder); tls.add(builder); } else { _visitables.get("tls").add(index, builder); tls.add(index, builder);} + return (A)this; + } + + public A setToTls(int index,V1IngressTLS item) { + if (this.tls == null) {this.tls = new ArrayList();} + V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item); + if (index < 0 || index >= tls.size()) { _visitables.get("tls").add(builder); tls.add(builder); } else { _visitables.get("tls").set(index, builder); tls.set(index, builder);} + return (A)this; + } + + public A addToTls(io.kubernetes.client.openapi.models.V1IngressTLS... items) { + if (this.tls == null) {this.tls = new ArrayList();} + for (V1IngressTLS item : items) {V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item);_visitables.get("tls").add(builder);this.tls.add(builder);} return (A)this; + } + + public A addAllToTls(Collection items) { + if (this.tls == null) {this.tls = new ArrayList();} + for (V1IngressTLS item : items) {V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item);_visitables.get("tls").add(builder);this.tls.add(builder);} return (A)this; + } + + public A removeFromTls(io.kubernetes.client.openapi.models.V1IngressTLS... items) { + if (this.tls == null) return (A)this; + for (V1IngressTLS item : items) {V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item);_visitables.get("tls").remove(builder); this.tls.remove(builder);} return (A)this; + } + + public A removeAllFromTls(Collection items) { + if (this.tls == null) return (A)this; + for (V1IngressTLS item : items) {V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item);_visitables.get("tls").remove(builder); this.tls.remove(builder);} return (A)this; + } + + public A removeMatchingFromTls(Predicate predicate) { + if (tls == null) return (A) this; + final Iterator each = tls.iterator(); + final List visitables = _visitables.get("tls"); + while (each.hasNext()) { + V1IngressTLSBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildTls() { + return this.tls != null ? build(tls) : null; + } + + public V1IngressTLS buildTl(int index) { + return this.tls.get(index).build(); + } + + public V1IngressTLS buildFirstTl() { + return this.tls.get(0).build(); + } + + public V1IngressTLS buildLastTl() { + return this.tls.get(tls.size() - 1).build(); + } + + public V1IngressTLS buildMatchingTl(Predicate predicate) { + for (V1IngressTLSBuilder item : tls) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingTl(Predicate predicate) { + for (V1IngressTLSBuilder item : tls) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withTls(List tls) { + if (this.tls != null) { + this._visitables.get("tls").clear(); + } + if (tls != null) { + this.tls = new ArrayList(); + for (V1IngressTLS item : tls) { + this.addToTls(item); + } + } else { + this.tls = null; + } + return (A) this; + } + + public A withTls(io.kubernetes.client.openapi.models.V1IngressTLS... tls) { + if (this.tls != null) { + this.tls.clear(); + _visitables.remove("tls"); + } + if (tls != null) { + for (V1IngressTLS item : tls) { + this.addToTls(item); + } + } + return (A) this; + } + + public boolean hasTls() { + return this.tls != null && !this.tls.isEmpty(); + } + + public TlsNested addNewTl() { + return new TlsNested(-1, null); + } + + public TlsNested addNewTlLike(V1IngressTLS item) { + return new TlsNested(-1, item); + } + + public TlsNested setNewTlLike(int index,V1IngressTLS item) { + return new TlsNested(index, item); + } + + public TlsNested editTl(int index) { + if (tls.size() <= index) throw new RuntimeException("Can't edit tls. Index exceeds size."); + return setNewTlLike(index, buildTl(index)); + } + + public TlsNested editFirstTl() { + if (tls.size() == 0) throw new RuntimeException("Can't edit first tls. The list is empty."); + return setNewTlLike(0, buildTl(0)); + } + + public TlsNested editLastTl() { + int index = tls.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last tls. The list is empty."); + return setNewTlLike(index, buildTl(index)); + } + + public TlsNested editMatchingTl(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1IngressBackendFluent> implements Nested{ + DefaultBackendNested(V1IngressBackend item) { + this.builder = new V1IngressBackendBuilder(this, item); + } + V1IngressBackendBuilder builder; + + public N and() { + return (N) V1IngressSpecFluent.this.withDefaultBackend(builder.build()); + } + public N endDefaultBackend() { + return and(); + } + + } - public interface TlsNested extends Nested,V1IngressTLSFluent>{ - public N and(); - public N endTl(); + public class RulesNested extends V1IngressRuleFluent> implements Nested{ + RulesNested(int index,V1IngressRule item) { + this.index = index; + this.builder = new V1IngressRuleBuilder(this, item); + } + V1IngressRuleBuilder builder; + int index; + public N and() { + return (N) V1IngressSpecFluent.this.setToRules(index,builder.build()); + } + + public N endRule() { + return and(); + } + + } + public class TlsNested extends V1IngressTLSFluent> implements Nested{ + TlsNested(int index,V1IngressTLS item) { + this.index = index; + this.builder = new V1IngressTLSBuilder(this, item); + } + V1IngressTLSBuilder builder; + int index; + + public N and() { + return (N) V1IngressSpecFluent.this.setToTls(index,builder.build()); + } + + public N endTl() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecFluentImpl.java deleted file mode 100644 index 1126cb8476..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressSpecFluentImpl.java +++ /dev/null @@ -1,376 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressSpecFluentImpl> extends BaseFluent implements V1IngressSpecFluent{ - public V1IngressSpecFluentImpl() { - } - public V1IngressSpecFluentImpl(V1IngressSpec instance) { - if (instance != null) { - this.withDefaultBackend(instance.getDefaultBackend()); - this.withIngressClassName(instance.getIngressClassName()); - this.withRules(instance.getRules()); - this.withTls(instance.getTls()); - } - } - private V1IngressBackendBuilder defaultBackend; - private String ingressClassName; - private ArrayList rules; - private ArrayList tls; - - /** - * This method has been deprecated, please use method buildDefaultBackend instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressBackend getDefaultBackend() { - return this.defaultBackend!=null ?this.defaultBackend.build():null; - } - public V1IngressBackend buildDefaultBackend() { - return this.defaultBackend!=null ?this.defaultBackend.build():null; - } - public A withDefaultBackend(V1IngressBackend defaultBackend) { - _visitables.get("defaultBackend").remove(this.defaultBackend); - if (defaultBackend!=null){ this.defaultBackend= new V1IngressBackendBuilder(defaultBackend); _visitables.get("defaultBackend").add(this.defaultBackend);} else { this.defaultBackend = null; _visitables.get("defaultBackend").remove(this.defaultBackend); } return (A) this; - } - public Boolean hasDefaultBackend() { - return this.defaultBackend != null; - } - public V1IngressSpecFluentImpl.DefaultBackendNested withNewDefaultBackend() { - return new V1IngressSpecFluentImpl.DefaultBackendNestedImpl(); - } - public V1IngressSpecFluentImpl.DefaultBackendNested withNewDefaultBackendLike(V1IngressBackend item) { - return new V1IngressSpecFluentImpl.DefaultBackendNestedImpl(item); - } - public V1IngressSpecFluentImpl.DefaultBackendNested editDefaultBackend() { - return withNewDefaultBackendLike(getDefaultBackend()); - } - public V1IngressSpecFluentImpl.DefaultBackendNested editOrNewDefaultBackend() { - return withNewDefaultBackendLike(getDefaultBackend() != null ? getDefaultBackend(): new V1IngressBackendBuilder().build()); - } - public V1IngressSpecFluentImpl.DefaultBackendNested editOrNewDefaultBackendLike(V1IngressBackend item) { - return withNewDefaultBackendLike(getDefaultBackend() != null ? getDefaultBackend(): item); - } - public String getIngressClassName() { - return this.ingressClassName; - } - public A withIngressClassName(String ingressClassName) { - this.ingressClassName=ingressClassName; return (A) this; - } - public Boolean hasIngressClassName() { - return this.ingressClassName != null; - } - public A addToRules(int index,V1IngressRule item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} - return (A)this; - } - public A setToRules(int index,V1IngressRule item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} - return (A)this; - } - public A addToRules(io.kubernetes.client.openapi.models.V1IngressRule... items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1IngressRule item : items) {V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A addAllToRules(Collection items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1IngressRule item : items) {V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A removeFromRules(io.kubernetes.client.openapi.models.V1IngressRule... items) { - for (V1IngressRule item : items) {V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeAllFromRules(Collection items) { - for (V1IngressRule item : items) {V1IngressRuleBuilder builder = new V1IngressRuleBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeMatchingFromRules(Predicate predicate) { - if (rules == null) return (A) this; - final Iterator each = rules.iterator(); - final List visitables = _visitables.get("rules"); - while (each.hasNext()) { - V1IngressRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules() { - return rules != null ? build(rules) : null; - } - public List buildRules() { - return rules != null ? build(rules) : null; - } - public V1IngressRule buildRule(int index) { - return this.rules.get(index).build(); - } - public V1IngressRule buildFirstRule() { - return this.rules.get(0).build(); - } - public V1IngressRule buildLastRule() { - return this.rules.get(rules.size() - 1).build(); - } - public V1IngressRule buildMatchingRule(Predicate predicate) { - for (V1IngressRuleBuilder item: rules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRule(Predicate predicate) { - for (V1IngressRuleBuilder item: rules) { if(predicate.test(item)){ return true;} } return false; - } - public A withRules(List rules) { - if (this.rules != null) { _visitables.get("rules").clear();} - if (rules != null) {this.rules = new ArrayList(); for (V1IngressRule item : rules){this.addToRules(item);}} else { this.rules = null;} return (A) this; - } - public A withRules(io.kubernetes.client.openapi.models.V1IngressRule... rules) { - if (this.rules != null) {this.rules.clear(); _visitables.remove("rules"); } - if (rules != null) {for (V1IngressRule item :rules){ this.addToRules(item);}} return (A) this; - } - public Boolean hasRules() { - return rules != null && !rules.isEmpty(); - } - public V1IngressSpecFluentImpl.RulesNested addNewRule() { - return new V1IngressSpecFluentImpl.RulesNestedImpl(); - } - public V1IngressSpecFluentImpl.RulesNested addNewRuleLike(V1IngressRule item) { - return new V1IngressSpecFluentImpl.RulesNestedImpl(-1, item); - } - public V1IngressSpecFluentImpl.RulesNested setNewRuleLike(int index,V1IngressRule item) { - return new V1IngressSpecFluentImpl.RulesNestedImpl(index, item); - } - public V1IngressSpecFluentImpl.RulesNested editRule(int index) { - if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); - return setNewRuleLike(index, buildRule(index)); - } - public V1IngressSpecFluentImpl.RulesNested editFirstRule() { - if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); - return setNewRuleLike(0, buildRule(0)); - } - public V1IngressSpecFluentImpl.RulesNested editLastRule() { - int index = rules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); - return setNewRuleLike(index, buildRule(index)); - } - public V1IngressSpecFluentImpl.RulesNested editMatchingRule(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item); - if (index < 0 || index >= tls.size()) { _visitables.get("tls").add(builder); tls.add(builder); } else { _visitables.get("tls").add(index, builder); tls.add(index, builder);} - return (A)this; - } - public A setToTls(int index,V1IngressTLS item) { - if (this.tls == null) {this.tls = new ArrayList();} - V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item); - if (index < 0 || index >= tls.size()) { _visitables.get("tls").add(builder); tls.add(builder); } else { _visitables.get("tls").set(index, builder); tls.set(index, builder);} - return (A)this; - } - public A addToTls(io.kubernetes.client.openapi.models.V1IngressTLS... items) { - if (this.tls == null) {this.tls = new ArrayList();} - for (V1IngressTLS item : items) {V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item);_visitables.get("tls").add(builder);this.tls.add(builder);} return (A)this; - } - public A addAllToTls(Collection items) { - if (this.tls == null) {this.tls = new ArrayList();} - for (V1IngressTLS item : items) {V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item);_visitables.get("tls").add(builder);this.tls.add(builder);} return (A)this; - } - public A removeFromTls(io.kubernetes.client.openapi.models.V1IngressTLS... items) { - for (V1IngressTLS item : items) {V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item);_visitables.get("tls").remove(builder);if (this.tls != null) {this.tls.remove(builder);}} return (A)this; - } - public A removeAllFromTls(Collection items) { - for (V1IngressTLS item : items) {V1IngressTLSBuilder builder = new V1IngressTLSBuilder(item);_visitables.get("tls").remove(builder);if (this.tls != null) {this.tls.remove(builder);}} return (A)this; - } - public A removeMatchingFromTls(Predicate predicate) { - if (tls == null) return (A) this; - final Iterator each = tls.iterator(); - final List visitables = _visitables.get("tls"); - while (each.hasNext()) { - V1IngressTLSBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildTls instead. - * @return The buildable object. - */ - @Deprecated - public List getTls() { - return tls != null ? build(tls) : null; - } - public List buildTls() { - return tls != null ? build(tls) : null; - } - public V1IngressTLS buildTl(int index) { - return this.tls.get(index).build(); - } - public V1IngressTLS buildFirstTl() { - return this.tls.get(0).build(); - } - public V1IngressTLS buildLastTl() { - return this.tls.get(tls.size() - 1).build(); - } - public V1IngressTLS buildMatchingTl(Predicate predicate) { - for (V1IngressTLSBuilder item: tls) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingTl(Predicate predicate) { - for (V1IngressTLSBuilder item: tls) { if(predicate.test(item)){ return true;} } return false; - } - public A withTls(List tls) { - if (this.tls != null) { _visitables.get("tls").clear();} - if (tls != null) {this.tls = new ArrayList(); for (V1IngressTLS item : tls){this.addToTls(item);}} else { this.tls = null;} return (A) this; - } - public A withTls(io.kubernetes.client.openapi.models.V1IngressTLS... tls) { - if (this.tls != null) {this.tls.clear(); _visitables.remove("tls"); } - if (tls != null) {for (V1IngressTLS item :tls){ this.addToTls(item);}} return (A) this; - } - public Boolean hasTls() { - return tls != null && !tls.isEmpty(); - } - public V1IngressSpecFluentImpl.TlsNested addNewTl() { - return new V1IngressSpecFluentImpl.TlsNestedImpl(); - } - public V1IngressSpecFluentImpl.TlsNested addNewTlLike(V1IngressTLS item) { - return new V1IngressSpecFluentImpl.TlsNestedImpl(-1, item); - } - public V1IngressSpecFluentImpl.TlsNested setNewTlLike(int index,V1IngressTLS item) { - return new V1IngressSpecFluentImpl.TlsNestedImpl(index, item); - } - public V1IngressSpecFluentImpl.TlsNested editTl(int index) { - if (tls.size() <= index) throw new RuntimeException("Can't edit tls. Index exceeds size."); - return setNewTlLike(index, buildTl(index)); - } - public V1IngressSpecFluentImpl.TlsNested editFirstTl() { - if (tls.size() == 0) throw new RuntimeException("Can't edit first tls. The list is empty."); - return setNewTlLike(0, buildTl(0)); - } - public V1IngressSpecFluentImpl.TlsNested editLastTl() { - int index = tls.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last tls. The list is empty."); - return setNewTlLike(index, buildTl(index)); - } - public V1IngressSpecFluentImpl.TlsNested editMatchingTl(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1IngressBackendFluentImpl> implements V1IngressSpecFluentImpl.DefaultBackendNested,Nested{ - DefaultBackendNestedImpl(V1IngressBackend item) { - this.builder = new V1IngressBackendBuilder(this, item); - } - DefaultBackendNestedImpl() { - this.builder = new V1IngressBackendBuilder(this); - } - V1IngressBackendBuilder builder; - public N and() { - return (N) V1IngressSpecFluentImpl.this.withDefaultBackend(builder.build()); - } - public N endDefaultBackend() { - return and(); - } - - } - class RulesNestedImpl extends V1IngressRuleFluentImpl> implements V1IngressSpecFluentImpl.RulesNested,Nested{ - RulesNestedImpl(int index,V1IngressRule item) { - this.index = index; - this.builder = new V1IngressRuleBuilder(this, item); - } - RulesNestedImpl() { - this.index = -1; - this.builder = new V1IngressRuleBuilder(this); - } - V1IngressRuleBuilder builder; - int index; - public N and() { - return (N) V1IngressSpecFluentImpl.this.setToRules(index,builder.build()); - } - public N endRule() { - return and(); - } - - } - class TlsNestedImpl extends V1IngressTLSFluentImpl> implements V1IngressSpecFluentImpl.TlsNested,Nested{ - TlsNestedImpl(int index,V1IngressTLS item) { - this.index = index; - this.builder = new V1IngressTLSBuilder(this, item); - } - TlsNestedImpl() { - this.index = -1; - this.builder = new V1IngressTLSBuilder(this); - } - V1IngressTLSBuilder builder; - int index; - public N and() { - return (N) V1IngressSpecFluentImpl.this.setToTls(index,builder.build()); - } - public N endTl() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusBuilder.java index c7448bb18d..b1f90efbb0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressStatusBuilder extends V1IngressStatusFluentImpl implements VisitableBuilder{ +public class V1IngressStatusBuilder extends V1IngressStatusFluent implements VisitableBuilder{ public V1IngressStatusBuilder() { - this(false); - } - public V1IngressStatusBuilder(Boolean validationEnabled) { - this(new V1IngressStatus(), validationEnabled); + this(new V1IngressStatus()); } + public V1IngressStatusBuilder(V1IngressStatusFluent fluent) { - this(fluent, false); - } - public V1IngressStatusBuilder(V1IngressStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressStatus(), validationEnabled); + this(fluent, new V1IngressStatus()); } + public V1IngressStatusBuilder(V1IngressStatusFluent fluent,V1IngressStatus instance) { - this(fluent, instance, false); - } - public V1IngressStatusBuilder(V1IngressStatusFluent fluent,V1IngressStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLoadBalancer(instance.getLoadBalancer()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressStatusBuilder(V1IngressStatus instance) { - this(instance,false); - } - public V1IngressStatusBuilder(V1IngressStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLoadBalancer(instance.getLoadBalancer()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressStatusFluent fluent; - Boolean validationEnabled; + public V1IngressStatus build() { V1IngressStatus buildable = new V1IngressStatus(); - buildable.setLoadBalancer(fluent.getLoadBalancer()); + buildable.setLoadBalancer(fluent.buildLoadBalancer()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusFluent.java index 2d42fa0cd4..614c9dad60 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1IngressStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildLoadBalancer instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressLoadBalancerStatus getLoadBalancer(); - public V1IngressLoadBalancerStatus buildLoadBalancer(); - public A withLoadBalancer(V1IngressLoadBalancerStatus loadBalancer); - public Boolean hasLoadBalancer(); - public V1IngressStatusFluent.LoadBalancerNested withNewLoadBalancer(); - public V1IngressStatusFluent.LoadBalancerNested withNewLoadBalancerLike(V1IngressLoadBalancerStatus item); - public V1IngressStatusFluent.LoadBalancerNested editLoadBalancer(); - public V1IngressStatusFluent.LoadBalancerNested editOrNewLoadBalancer(); - public V1IngressStatusFluent.LoadBalancerNested editOrNewLoadBalancerLike(V1IngressLoadBalancerStatus item); - public interface LoadBalancerNested extends Nested,V1IngressLoadBalancerStatusFluent>{ - public N and(); - public N endLoadBalancer(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressStatusFluent> extends BaseFluent{ + public V1IngressStatusFluent() { + } + + public V1IngressStatusFluent(V1IngressStatus instance) { + this.copyInstance(instance); + } + private V1IngressLoadBalancerStatusBuilder loadBalancer; + + protected void copyInstance(V1IngressStatus instance) { + instance = (instance != null ? instance : new V1IngressStatus()); + if (instance != null) { + this.withLoadBalancer(instance.getLoadBalancer()); + } + } + + public V1IngressLoadBalancerStatus buildLoadBalancer() { + return this.loadBalancer != null ? this.loadBalancer.build() : null; + } + + public A withLoadBalancer(V1IngressLoadBalancerStatus loadBalancer) { + this._visitables.remove("loadBalancer"); + if (loadBalancer != null) { + this.loadBalancer = new V1IngressLoadBalancerStatusBuilder(loadBalancer); + this._visitables.get("loadBalancer").add(this.loadBalancer); + } else { + this.loadBalancer = null; + this._visitables.get("loadBalancer").remove(this.loadBalancer); + } + return (A) this; + } + + public boolean hasLoadBalancer() { + return this.loadBalancer != null; + } + + public LoadBalancerNested withNewLoadBalancer() { + return new LoadBalancerNested(null); + } + + public LoadBalancerNested withNewLoadBalancerLike(V1IngressLoadBalancerStatus item) { + return new LoadBalancerNested(item); + } + + public LoadBalancerNested editLoadBalancer() { + return withNewLoadBalancerLike(java.util.Optional.ofNullable(buildLoadBalancer()).orElse(null)); + } + + public LoadBalancerNested editOrNewLoadBalancer() { + return withNewLoadBalancerLike(java.util.Optional.ofNullable(buildLoadBalancer()).orElse(new V1IngressLoadBalancerStatusBuilder().build())); + } + + public LoadBalancerNested editOrNewLoadBalancerLike(V1IngressLoadBalancerStatus item) { + return withNewLoadBalancerLike(java.util.Optional.ofNullable(buildLoadBalancer()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressStatusFluent that = (V1IngressStatusFluent) o; + if (!java.util.Objects.equals(loadBalancer, that.loadBalancer)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(loadBalancer, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (loadBalancer != null) { sb.append("loadBalancer:"); sb.append(loadBalancer); } + sb.append("}"); + return sb.toString(); } + public class LoadBalancerNested extends V1IngressLoadBalancerStatusFluent> implements Nested{ + LoadBalancerNested(V1IngressLoadBalancerStatus item) { + this.builder = new V1IngressLoadBalancerStatusBuilder(this, item); + } + V1IngressLoadBalancerStatusBuilder builder; + + public N and() { + return (N) V1IngressStatusFluent.this.withLoadBalancer(builder.build()); + } + + public N endLoadBalancer() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusFluentImpl.java deleted file mode 100644 index c97c71b428..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressStatusFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressStatusFluentImpl> extends BaseFluent implements V1IngressStatusFluent{ - public V1IngressStatusFluentImpl() { - } - public V1IngressStatusFluentImpl(V1IngressStatus instance) { - if (instance != null) { - this.withLoadBalancer(instance.getLoadBalancer()); - } - } - private V1IngressLoadBalancerStatusBuilder loadBalancer; - - /** - * This method has been deprecated, please use method buildLoadBalancer instead. - * @return The buildable object. - */ - @Deprecated - public V1IngressLoadBalancerStatus getLoadBalancer() { - return this.loadBalancer!=null ?this.loadBalancer.build():null; - } - public V1IngressLoadBalancerStatus buildLoadBalancer() { - return this.loadBalancer!=null ?this.loadBalancer.build():null; - } - public A withLoadBalancer(V1IngressLoadBalancerStatus loadBalancer) { - _visitables.get("loadBalancer").remove(this.loadBalancer); - if (loadBalancer!=null){ this.loadBalancer= new V1IngressLoadBalancerStatusBuilder(loadBalancer); _visitables.get("loadBalancer").add(this.loadBalancer);} else { this.loadBalancer = null; _visitables.get("loadBalancer").remove(this.loadBalancer); } return (A) this; - } - public Boolean hasLoadBalancer() { - return this.loadBalancer != null; - } - public V1IngressStatusFluentImpl.LoadBalancerNested withNewLoadBalancer() { - return new V1IngressStatusFluentImpl.LoadBalancerNestedImpl(); - } - public V1IngressStatusFluentImpl.LoadBalancerNested withNewLoadBalancerLike(V1IngressLoadBalancerStatus item) { - return new V1IngressStatusFluentImpl.LoadBalancerNestedImpl(item); - } - public V1IngressStatusFluentImpl.LoadBalancerNested editLoadBalancer() { - return withNewLoadBalancerLike(getLoadBalancer()); - } - public V1IngressStatusFluentImpl.LoadBalancerNested editOrNewLoadBalancer() { - return withNewLoadBalancerLike(getLoadBalancer() != null ? getLoadBalancer(): new V1IngressLoadBalancerStatusBuilder().build()); - } - public V1IngressStatusFluentImpl.LoadBalancerNested editOrNewLoadBalancerLike(V1IngressLoadBalancerStatus item) { - return withNewLoadBalancerLike(getLoadBalancer() != null ? getLoadBalancer(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressStatusFluentImpl that = (V1IngressStatusFluentImpl) o; - if (!java.util.Objects.equals(loadBalancer, that.loadBalancer)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(loadBalancer, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (loadBalancer != null) { sb.append("loadBalancer:"); sb.append(loadBalancer); } - sb.append("}"); - return sb.toString(); - } - class LoadBalancerNestedImpl extends V1IngressLoadBalancerStatusFluentImpl> implements V1IngressStatusFluentImpl.LoadBalancerNested,Nested{ - LoadBalancerNestedImpl(V1IngressLoadBalancerStatus item) { - this.builder = new V1IngressLoadBalancerStatusBuilder(this, item); - } - LoadBalancerNestedImpl() { - this.builder = new V1IngressLoadBalancerStatusBuilder(this); - } - V1IngressLoadBalancerStatusBuilder builder; - public N and() { - return (N) V1IngressStatusFluentImpl.this.withLoadBalancer(builder.build()); - } - public N endLoadBalancer() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSBuilder.java index 28bca14dad..f21e29553e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1IngressTLSBuilder extends V1IngressTLSFluentImpl implements VisitableBuilder{ +public class V1IngressTLSBuilder extends V1IngressTLSFluent implements VisitableBuilder{ public V1IngressTLSBuilder() { - this(false); - } - public V1IngressTLSBuilder(Boolean validationEnabled) { - this(new V1IngressTLS(), validationEnabled); + this(new V1IngressTLS()); } + public V1IngressTLSBuilder(V1IngressTLSFluent fluent) { - this(fluent, false); - } - public V1IngressTLSBuilder(V1IngressTLSFluent fluent,Boolean validationEnabled) { - this(fluent, new V1IngressTLS(), validationEnabled); + this(fluent, new V1IngressTLS()); } + public V1IngressTLSBuilder(V1IngressTLSFluent fluent,V1IngressTLS instance) { - this(fluent, instance, false); - } - public V1IngressTLSBuilder(V1IngressTLSFluent fluent,V1IngressTLS instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHosts(instance.getHosts()); - fluent.withSecretName(instance.getSecretName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1IngressTLSBuilder(V1IngressTLS instance) { - this(instance,false); - } - public V1IngressTLSBuilder(V1IngressTLS instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHosts(instance.getHosts()); - this.withSecretName(instance.getSecretName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1IngressTLSFluent fluent; - Boolean validationEnabled; + public V1IngressTLS build() { V1IngressTLS buildable = new V1IngressTLS(); buildable.setHosts(fluent.getHosts()); @@ -46,4 +28,5 @@ public V1IngressTLS build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSFluent.java index 7c00862816..4b8c2c2c97 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSFluent.java @@ -1,35 +1,165 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1IngressTLSFluent> extends Fluent{ - public A addToHosts(int index,String item); - public A setToHosts(int index,String item); - public A addToHosts(java.lang.String... items); - public A addAllToHosts(Collection items); - public A removeFromHosts(java.lang.String... items); - public A removeAllFromHosts(Collection items); - public List getHosts(); - public String getHost(int index); - public String getFirstHost(); - public String getLastHost(); - public String getMatchingHost(Predicate predicate); - public Boolean hasMatchingHost(Predicate predicate); - public A withHosts(List hosts); - public A withHosts(java.lang.String... hosts); - public Boolean hasHosts(); - public String getSecretName(); - public A withSecretName(String secretName); - public Boolean hasSecretName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1IngressTLSFluent> extends BaseFluent{ + public V1IngressTLSFluent() { + } + public V1IngressTLSFluent(V1IngressTLS instance) { + this.copyInstance(instance); + } + private List hosts; + private String secretName; + + protected void copyInstance(V1IngressTLS instance) { + instance = (instance != null ? instance : new V1IngressTLS()); + if (instance != null) { + this.withHosts(instance.getHosts()); + this.withSecretName(instance.getSecretName()); + } + } + + public A addToHosts(int index,String item) { + if (this.hosts == null) {this.hosts = new ArrayList();} + this.hosts.add(index, item); + return (A)this; + } + + public A setToHosts(int index,String item) { + if (this.hosts == null) {this.hosts = new ArrayList();} + this.hosts.set(index, item); return (A)this; + } + + public A addToHosts(java.lang.String... items) { + if (this.hosts == null) {this.hosts = new ArrayList();} + for (String item : items) {this.hosts.add(item);} return (A)this; + } + + public A addAllToHosts(Collection items) { + if (this.hosts == null) {this.hosts = new ArrayList();} + for (String item : items) {this.hosts.add(item);} return (A)this; + } + + public A removeFromHosts(java.lang.String... items) { + if (this.hosts == null) return (A)this; + for (String item : items) { this.hosts.remove(item);} return (A)this; + } + + public A removeAllFromHosts(Collection items) { + if (this.hosts == null) return (A)this; + for (String item : items) { this.hosts.remove(item);} return (A)this; + } + + public List getHosts() { + return this.hosts; + } + + public String getHost(int index) { + return this.hosts.get(index); + } + + public String getFirstHost() { + return this.hosts.get(0); + } + + public String getLastHost() { + return this.hosts.get(hosts.size() - 1); + } + + public String getMatchingHost(Predicate predicate) { + for (String item : hosts) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingHost(Predicate predicate) { + for (String item : hosts) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withHosts(List hosts) { + if (hosts != null) { + this.hosts = new ArrayList(); + for (String item : hosts) { + this.addToHosts(item); + } + } else { + this.hosts = null; + } + return (A) this; + } + + public A withHosts(java.lang.String... hosts) { + if (this.hosts != null) { + this.hosts.clear(); + _visitables.remove("hosts"); + } + if (hosts != null) { + for (String item : hosts) { + this.addToHosts(item); + } + } + return (A) this; + } + + public boolean hasHosts() { + return this.hosts != null && !this.hosts.isEmpty(); + } + + public String getSecretName() { + return this.secretName; + } + + public A withSecretName(String secretName) { + this.secretName = secretName; + return (A) this; + } + + public boolean hasSecretName() { + return this.secretName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1IngressTLSFluent that = (V1IngressTLSFluent) o; + if (!java.util.Objects.equals(hosts, that.hosts)) return false; + if (!java.util.Objects.equals(secretName, that.secretName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(hosts, secretName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (hosts != null && !hosts.isEmpty()) { sb.append("hosts:"); sb.append(hosts + ","); } + if (secretName != null) { sb.append("secretName:"); sb.append(secretName); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSFluentImpl.java deleted file mode 100644 index f5bf26bee9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1IngressTLSFluentImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1IngressTLSFluentImpl> extends BaseFluent implements V1IngressTLSFluent{ - public V1IngressTLSFluentImpl() { - } - public V1IngressTLSFluentImpl(V1IngressTLS instance) { - if (instance != null) { - this.withHosts(instance.getHosts()); - this.withSecretName(instance.getSecretName()); - } - } - private List hosts; - private String secretName; - public A addToHosts(int index,String item) { - if (this.hosts == null) {this.hosts = new ArrayList();} - this.hosts.add(index, item); - return (A)this; - } - public A setToHosts(int index,String item) { - if (this.hosts == null) {this.hosts = new ArrayList();} - this.hosts.set(index, item); return (A)this; - } - public A addToHosts(java.lang.String... items) { - if (this.hosts == null) {this.hosts = new ArrayList();} - for (String item : items) {this.hosts.add(item);} return (A)this; - } - public A addAllToHosts(Collection items) { - if (this.hosts == null) {this.hosts = new ArrayList();} - for (String item : items) {this.hosts.add(item);} return (A)this; - } - public A removeFromHosts(java.lang.String... items) { - for (String item : items) {if (this.hosts!= null){ this.hosts.remove(item);}} return (A)this; - } - public A removeAllFromHosts(Collection items) { - for (String item : items) {if (this.hosts!= null){ this.hosts.remove(item);}} return (A)this; - } - public List getHosts() { - return this.hosts; - } - public String getHost(int index) { - return this.hosts.get(index); - } - public String getFirstHost() { - return this.hosts.get(0); - } - public String getLastHost() { - return this.hosts.get(hosts.size() - 1); - } - public String getMatchingHost(Predicate predicate) { - for (String item: hosts) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingHost(Predicate predicate) { - for (String item: hosts) { if(predicate.test(item)){ return true;} } return false; - } - public A withHosts(List hosts) { - if (hosts != null) {this.hosts = new ArrayList(); for (String item : hosts){this.addToHosts(item);}} else { this.hosts = null;} return (A) this; - } - public A withHosts(java.lang.String... hosts) { - if (this.hosts != null) {this.hosts.clear(); _visitables.remove("hosts"); } - if (hosts != null) {for (String item :hosts){ this.addToHosts(item);}} return (A) this; - } - public Boolean hasHosts() { - return hosts != null && !hosts.isEmpty(); - } - public String getSecretName() { - return this.secretName; - } - public A withSecretName(String secretName) { - this.secretName=secretName; return (A) this; - } - public Boolean hasSecretName() { - return this.secretName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1IngressTLSFluentImpl that = (V1IngressTLSFluentImpl) o; - if (!java.util.Objects.equals(hosts, that.hosts)) return false; - - if (!java.util.Objects.equals(secretName, that.secretName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(hosts, secretName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (hosts != null && !hosts.isEmpty()) { sb.append("hosts:"); sb.append(hosts + ","); } - if (secretName != null) { sb.append("secretName:"); sb.append(secretName); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsBuilder.java index 0be693404d..09125ddbae 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsBuilder.java @@ -1,122 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1JSONSchemaPropsBuilder extends V1JSONSchemaPropsFluentImpl implements VisitableBuilder{ +public class V1JSONSchemaPropsBuilder extends V1JSONSchemaPropsFluent implements VisitableBuilder{ public V1JSONSchemaPropsBuilder() { - this(false); - } - public V1JSONSchemaPropsBuilder(Boolean validationEnabled) { - this(new V1JSONSchemaProps(), validationEnabled); + this(new V1JSONSchemaProps()); } + public V1JSONSchemaPropsBuilder(V1JSONSchemaPropsFluent fluent) { - this(fluent, false); - } - public V1JSONSchemaPropsBuilder(V1JSONSchemaPropsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1JSONSchemaProps(), validationEnabled); + this(fluent, new V1JSONSchemaProps()); } + public V1JSONSchemaPropsBuilder(V1JSONSchemaPropsFluent fluent,V1JSONSchemaProps instance) { - this(fluent, instance, false); - } - public V1JSONSchemaPropsBuilder(V1JSONSchemaPropsFluent fluent,V1JSONSchemaProps instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withRef(instance.get$Ref()); - fluent.withSchema(instance.get$Schema()); - fluent.withAdditionalItems(instance.getAdditionalItems()); - fluent.withAdditionalProperties(instance.getAdditionalProperties()); - fluent.withAllOf(instance.getAllOf()); - fluent.withAnyOf(instance.getAnyOf()); - fluent.withDefault(instance.getDefault()); - fluent.withDefinitions(instance.getDefinitions()); - fluent.withDependencies(instance.getDependencies()); - fluent.withDescription(instance.getDescription()); - fluent.withEnum(instance.getEnum()); - fluent.withExample(instance.getExample()); - fluent.withExclusiveMaximum(instance.getExclusiveMaximum()); - fluent.withExclusiveMinimum(instance.getExclusiveMinimum()); - fluent.withExternalDocs(instance.getExternalDocs()); - fluent.withFormat(instance.getFormat()); - fluent.withId(instance.getId()); - fluent.withItems(instance.getItems()); - fluent.withMaxItems(instance.getMaxItems()); - fluent.withMaxLength(instance.getMaxLength()); - fluent.withMaxProperties(instance.getMaxProperties()); - fluent.withMaximum(instance.getMaximum()); - fluent.withMinItems(instance.getMinItems()); - fluent.withMinLength(instance.getMinLength()); - fluent.withMinProperties(instance.getMinProperties()); - fluent.withMinimum(instance.getMinimum()); - fluent.withMultipleOf(instance.getMultipleOf()); - fluent.withNot(instance.getNot()); - fluent.withNullable(instance.getNullable()); - fluent.withOneOf(instance.getOneOf()); - fluent.withPattern(instance.getPattern()); - fluent.withPatternProperties(instance.getPatternProperties()); - fluent.withProperties(instance.getProperties()); - fluent.withRequired(instance.getRequired()); - fluent.withTitle(instance.getTitle()); - fluent.withType(instance.getType()); - fluent.withUniqueItems(instance.getUniqueItems()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1JSONSchemaPropsBuilder(V1JSONSchemaProps instance) { - this(instance,false); - } - public V1JSONSchemaPropsBuilder(V1JSONSchemaProps instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withRef(instance.get$Ref()); - this.withSchema(instance.get$Schema()); - this.withAdditionalItems(instance.getAdditionalItems()); - this.withAdditionalProperties(instance.getAdditionalProperties()); - this.withAllOf(instance.getAllOf()); - this.withAnyOf(instance.getAnyOf()); - this.withDefault(instance.getDefault()); - this.withDefinitions(instance.getDefinitions()); - this.withDependencies(instance.getDependencies()); - this.withDescription(instance.getDescription()); - this.withEnum(instance.getEnum()); - this.withExample(instance.getExample()); - this.withExclusiveMaximum(instance.getExclusiveMaximum()); - this.withExclusiveMinimum(instance.getExclusiveMinimum()); - this.withExternalDocs(instance.getExternalDocs()); - this.withFormat(instance.getFormat()); - this.withId(instance.getId()); - this.withItems(instance.getItems()); - this.withMaxItems(instance.getMaxItems()); - this.withMaxLength(instance.getMaxLength()); - this.withMaxProperties(instance.getMaxProperties()); - this.withMaximum(instance.getMaximum()); - this.withMinItems(instance.getMinItems()); - this.withMinLength(instance.getMinLength()); - this.withMinProperties(instance.getMinProperties()); - this.withMinimum(instance.getMinimum()); - this.withMultipleOf(instance.getMultipleOf()); - this.withNot(instance.getNot()); - this.withNullable(instance.getNullable()); - this.withOneOf(instance.getOneOf()); - this.withPattern(instance.getPattern()); - this.withPatternProperties(instance.getPatternProperties()); - this.withProperties(instance.getProperties()); - this.withRequired(instance.getRequired()); - this.withTitle(instance.getTitle()); - this.withType(instance.getType()); - this.withUniqueItems(instance.getUniqueItems()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1JSONSchemaPropsFluent fluent; - Boolean validationEnabled; + public V1JSONSchemaProps build() { V1JSONSchemaProps buildable = new V1JSONSchemaProps(); buildable.set$Ref(fluent.getRef()); buildable.set$Schema(fluent.getSchema()); buildable.setAdditionalItems(fluent.getAdditionalItems()); buildable.setAdditionalProperties(fluent.getAdditionalProperties()); - buildable.setAllOf(fluent.getAllOf()); - buildable.setAnyOf(fluent.getAnyOf()); + buildable.setAllOf(fluent.buildAllOf()); + buildable.setAnyOf(fluent.buildAnyOf()); buildable.setDefault(fluent.getDefault()); buildable.setDefinitions(fluent.getDefinitions()); buildable.setDependencies(fluent.getDependencies()); @@ -125,7 +37,7 @@ public V1JSONSchemaProps build() { buildable.setExample(fluent.getExample()); buildable.setExclusiveMaximum(fluent.getExclusiveMaximum()); buildable.setExclusiveMinimum(fluent.getExclusiveMinimum()); - buildable.setExternalDocs(fluent.getExternalDocs()); + buildable.setExternalDocs(fluent.buildExternalDocs()); buildable.setFormat(fluent.getFormat()); buildable.setId(fluent.getId()); buildable.setItems(fluent.getItems()); @@ -138,9 +50,9 @@ public V1JSONSchemaProps build() { buildable.setMinProperties(fluent.getMinProperties()); buildable.setMinimum(fluent.getMinimum()); buildable.setMultipleOf(fluent.getMultipleOf()); - buildable.setNot(fluent.getNot()); + buildable.setNot(fluent.buildNot()); buildable.setNullable(fluent.getNullable()); - buildable.setOneOf(fluent.getOneOf()); + buildable.setOneOf(fluent.buildOneOf()); buildable.setPattern(fluent.getPattern()); buildable.setPatternProperties(fluent.getPatternProperties()); buildable.setProperties(fluent.getProperties()); @@ -151,4 +63,5 @@ public V1JSONSchemaProps build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsFluent.java index f6fcc8cda7..d78dfe1e8c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsFluent.java @@ -1,311 +1,1514 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.List; import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.lang.Double; import java.lang.Long; import java.util.Collection; import java.lang.Object; import java.util.Map; - /** - * Generated - */ -public interface V1JSONSchemaPropsFluent> extends Fluent{ - public String getRef(); - public A withRef(String $ref); - public Boolean hasRef(); - public String getSchema(); - public A withSchema(String $schema); - public Boolean hasSchema(); - public Object getAdditionalItems(); - public A withAdditionalItems(Object additionalItems); - public Boolean hasAdditionalItems(); - public Object getAdditionalProperties(); - public A withAdditionalProperties(Object additionalProperties); - public Boolean hasAdditionalProperties(); - public A addToAllOf(int index,V1JSONSchemaProps item); - public A setToAllOf(int index,V1JSONSchemaProps item); - public A addToAllOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items); - public A addAllToAllOf(Collection items); - public A removeFromAllOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items); - public A removeAllFromAllOf(Collection items); - public A removeMatchingFromAllOf(Predicate predicate); - - /** - * This method has been deprecated, please use method buildAllOf instead. - * @return The buildable object. - */ - @Deprecated - public List getAllOf(); - public List buildAllOf(); - public V1JSONSchemaProps buildAllOf(int index); - public V1JSONSchemaProps buildFirstAllOf(); - public V1JSONSchemaProps buildLastAllOf(); - public V1JSONSchemaProps buildMatchingAllOf(Predicate predicate); - public Boolean hasMatchingAllOf(Predicate predicate); - public A withAllOf(List allOf); - public A withAllOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... allOf); - public Boolean hasAllOf(); - public V1JSONSchemaPropsFluent.AllOfNested addNewAllOf(); - public V1JSONSchemaPropsFluent.AllOfNested addNewAllOfLike(V1JSONSchemaProps item); - public V1JSONSchemaPropsFluent.AllOfNested setNewAllOfLike(int index,V1JSONSchemaProps item); - public V1JSONSchemaPropsFluent.AllOfNested editAllOf(int index); - public V1JSONSchemaPropsFluent.AllOfNested editFirstAllOf(); - public V1JSONSchemaPropsFluent.AllOfNested editLastAllOf(); - public V1JSONSchemaPropsFluent.AllOfNested editMatchingAllOf(Predicate predicate); - public A addToAnyOf(int index,V1JSONSchemaProps item); - public A setToAnyOf(int index,V1JSONSchemaProps item); - public A addToAnyOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items); - public A addAllToAnyOf(Collection items); - public A removeFromAnyOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items); - public A removeAllFromAnyOf(Collection items); - public A removeMatchingFromAnyOf(Predicate predicate); - - /** - * This method has been deprecated, please use method buildAnyOf instead. - * @return The buildable object. - */ - @Deprecated - public List getAnyOf(); - public List buildAnyOf(); - public V1JSONSchemaProps buildAnyOf(int index); - public V1JSONSchemaProps buildFirstAnyOf(); - public V1JSONSchemaProps buildLastAnyOf(); - public V1JSONSchemaProps buildMatchingAnyOf(Predicate predicate); - public Boolean hasMatchingAnyOf(Predicate predicate); - public A withAnyOf(List anyOf); - public A withAnyOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... anyOf); - public Boolean hasAnyOf(); - public V1JSONSchemaPropsFluent.AnyOfNested addNewAnyOf(); - public V1JSONSchemaPropsFluent.AnyOfNested addNewAnyOfLike(V1JSONSchemaProps item); - public V1JSONSchemaPropsFluent.AnyOfNested setNewAnyOfLike(int index,V1JSONSchemaProps item); - public V1JSONSchemaPropsFluent.AnyOfNested editAnyOf(int index); - public V1JSONSchemaPropsFluent.AnyOfNested editFirstAnyOf(); - public V1JSONSchemaPropsFluent.AnyOfNested editLastAnyOf(); - public V1JSONSchemaPropsFluent.AnyOfNested editMatchingAnyOf(Predicate predicate); - public Object getDefault(); - public A withDefault(Object _default); - public Boolean hasDefault(); - public A addToDefinitions(String key,V1JSONSchemaProps value); - public A addToDefinitions(Map map); - public A removeFromDefinitions(String key); - public A removeFromDefinitions(Map map); - public Map getDefinitions(); - public A withDefinitions(Map definitions); - public Boolean hasDefinitions(); - public A addToDependencies(String key,Object value); - public A addToDependencies(Map map); - public A removeFromDependencies(String key); - public A removeFromDependencies(Map map); - public Map getDependencies(); - public A withDependencies(Map dependencies); - public Boolean hasDependencies(); - public String getDescription(); - public A withDescription(String description); - public Boolean hasDescription(); - public A addToEnum(int index,Object item); - public A setToEnum(int index,Object item); - public A addToEnum(java.lang.Object... items); - public A addAllToEnum(Collection items); - public A removeFromEnum(java.lang.Object... items); - public A removeAllFromEnum(Collection items); - public List getEnum(); - public Object getEnum(int index); - public Object getFirstEnum(); - public Object getLastEnum(); - public Object getMatchingEnum(Predicate predicate); - public Boolean hasMatchingEnum(Predicate predicate); - public A withEnum(List _enum); - public A withEnum(java.lang.Object... _enum); - public Boolean hasEnum(); - public Object getExample(); - public A withExample(Object example); - public Boolean hasExample(); - public Boolean getExclusiveMaximum(); - public A withExclusiveMaximum(Boolean exclusiveMaximum); - public Boolean hasExclusiveMaximum(); - public Boolean getExclusiveMinimum(); - public A withExclusiveMinimum(Boolean exclusiveMinimum); - public Boolean hasExclusiveMinimum(); - - /** - * This method has been deprecated, please use method buildExternalDocs instead. - * @return The buildable object. - */ - @Deprecated - public V1ExternalDocumentation getExternalDocs(); - public V1ExternalDocumentation buildExternalDocs(); - public A withExternalDocs(V1ExternalDocumentation externalDocs); - public Boolean hasExternalDocs(); - public V1JSONSchemaPropsFluent.ExternalDocsNested withNewExternalDocs(); - public V1JSONSchemaPropsFluent.ExternalDocsNested withNewExternalDocsLike(V1ExternalDocumentation item); - public V1JSONSchemaPropsFluent.ExternalDocsNested editExternalDocs(); - public V1JSONSchemaPropsFluent.ExternalDocsNested editOrNewExternalDocs(); - public V1JSONSchemaPropsFluent.ExternalDocsNested editOrNewExternalDocsLike(V1ExternalDocumentation item); - public String getFormat(); - public A withFormat(String format); - public Boolean hasFormat(); - public String getId(); - public A withId(String id); - public Boolean hasId(); - public Object getItems(); - public A withItems(Object items); - public Boolean hasItems(); - public Long getMaxItems(); - public A withMaxItems(Long maxItems); - public Boolean hasMaxItems(); - public Long getMaxLength(); - public A withMaxLength(Long maxLength); - public Boolean hasMaxLength(); - public Long getMaxProperties(); - public A withMaxProperties(Long maxProperties); - public Boolean hasMaxProperties(); - public Double getMaximum(); - public A withMaximum(Double maximum); - public Boolean hasMaximum(); - public Long getMinItems(); - public A withMinItems(Long minItems); - public Boolean hasMinItems(); - public Long getMinLength(); - public A withMinLength(Long minLength); - public Boolean hasMinLength(); - public Long getMinProperties(); - public A withMinProperties(Long minProperties); - public Boolean hasMinProperties(); - public Double getMinimum(); - public A withMinimum(Double minimum); - public Boolean hasMinimum(); - public Double getMultipleOf(); - public A withMultipleOf(Double multipleOf); - public Boolean hasMultipleOf(); - - /** - * This method has been deprecated, please use method buildNot instead. - * @return The buildable object. - */ - @Deprecated - public V1JSONSchemaProps getNot(); - public V1JSONSchemaProps buildNot(); - public A withNot(V1JSONSchemaProps not); - public Boolean hasNot(); - public V1JSONSchemaPropsFluent.NotNested withNewNot(); - public V1JSONSchemaPropsFluent.NotNested withNewNotLike(V1JSONSchemaProps item); - public V1JSONSchemaPropsFluent.NotNested editNot(); - public V1JSONSchemaPropsFluent.NotNested editOrNewNot(); - public V1JSONSchemaPropsFluent.NotNested editOrNewNotLike(V1JSONSchemaProps item); - public Boolean getNullable(); - public A withNullable(Boolean nullable); - public Boolean hasNullable(); - public A addToOneOf(int index,V1JSONSchemaProps item); - public A setToOneOf(int index,V1JSONSchemaProps item); - public A addToOneOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items); - public A addAllToOneOf(Collection items); - public A removeFromOneOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items); - public A removeAllFromOneOf(Collection items); - public A removeMatchingFromOneOf(Predicate predicate); - - /** - * This method has been deprecated, please use method buildOneOf instead. - * @return The buildable object. - */ - @Deprecated - public List getOneOf(); - public List buildOneOf(); - public V1JSONSchemaProps buildOneOf(int index); - public V1JSONSchemaProps buildFirstOneOf(); - public V1JSONSchemaProps buildLastOneOf(); - public V1JSONSchemaProps buildMatchingOneOf(Predicate predicate); - public Boolean hasMatchingOneOf(Predicate predicate); - public A withOneOf(List oneOf); - public A withOneOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... oneOf); - public Boolean hasOneOf(); - public V1JSONSchemaPropsFluent.OneOfNested addNewOneOf(); - public V1JSONSchemaPropsFluent.OneOfNested addNewOneOfLike(V1JSONSchemaProps item); - public V1JSONSchemaPropsFluent.OneOfNested setNewOneOfLike(int index,V1JSONSchemaProps item); - public V1JSONSchemaPropsFluent.OneOfNested editOneOf(int index); - public V1JSONSchemaPropsFluent.OneOfNested editFirstOneOf(); - public V1JSONSchemaPropsFluent.OneOfNested editLastOneOf(); - public V1JSONSchemaPropsFluent.OneOfNested editMatchingOneOf(Predicate predicate); - public String getPattern(); - public A withPattern(String pattern); - public Boolean hasPattern(); - public A addToPatternProperties(String key,V1JSONSchemaProps value); - public A addToPatternProperties(Map map); - public A removeFromPatternProperties(String key); - public A removeFromPatternProperties(Map map); - public Map getPatternProperties(); - public A withPatternProperties(Map patternProperties); - public Boolean hasPatternProperties(); - public A addToProperties(String key,V1JSONSchemaProps value); - public A addToProperties(Map map); - public A removeFromProperties(String key); - public A removeFromProperties(Map map); - public Map getProperties(); - public A withProperties(Map properties); - public Boolean hasProperties(); - public A addToRequired(int index,String item); - public A setToRequired(int index,String item); - public A addToRequired(java.lang.String... items); - public A addAllToRequired(Collection items); - public A removeFromRequired(java.lang.String... items); - public A removeAllFromRequired(Collection items); - public List getRequired(); - public String getRequired(int index); - public String getFirstRequired(); - public String getLastRequired(); - public String getMatchingRequired(Predicate predicate); - public Boolean hasMatchingRequired(Predicate predicate); - public A withRequired(List required); - public A withRequired(java.lang.String... required); - public Boolean hasRequired(); - public String getTitle(); - public A withTitle(String title); - public Boolean hasTitle(); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public Boolean getUniqueItems(); - public A withUniqueItems(Boolean uniqueItems); - public Boolean hasUniqueItems(); - public A withExclusiveMaximum(); - public A withExclusiveMinimum(); - public A withNullable(); - public A withUniqueItems(); - public interface AllOfNested extends Nested,V1JSONSchemaPropsFluent>{ - public N and(); - public N endAllOf(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1JSONSchemaPropsFluent> extends BaseFluent{ + public V1JSONSchemaPropsFluent() { + } + + public V1JSONSchemaPropsFluent(V1JSONSchemaProps instance) { + this.copyInstance(instance); + } + private String $ref; + private String $schema; + private Object additionalItems; + private Object additionalProperties; + private ArrayList allOf; + private ArrayList anyOf; + private Object _default; + private Map definitions; + private Map dependencies; + private String description; + private List _enum; + private Object example; + private Boolean exclusiveMaximum; + private Boolean exclusiveMinimum; + private V1ExternalDocumentationBuilder externalDocs; + private String format; + private String id; + private Object items; + private Long maxItems; + private Long maxLength; + private Long maxProperties; + private Double maximum; + private Long minItems; + private Long minLength; + private Long minProperties; + private Double minimum; + private Double multipleOf; + private V1JSONSchemaPropsBuilder not; + private Boolean nullable; + private ArrayList oneOf; + private String pattern; + private Map patternProperties; + private Map properties; + private List required; + private String title; + private String type; + private Boolean uniqueItems; + + protected void copyInstance(V1JSONSchemaProps instance) { + instance = (instance != null ? instance : new V1JSONSchemaProps()); + if (instance != null) { + this.withRef(instance.get$Ref()); + this.withSchema(instance.get$Schema()); + this.withAdditionalItems(instance.getAdditionalItems()); + this.withAdditionalProperties(instance.getAdditionalProperties()); + this.withAllOf(instance.getAllOf()); + this.withAnyOf(instance.getAnyOf()); + this.withDefault(instance.getDefault()); + this.withDefinitions(instance.getDefinitions()); + this.withDependencies(instance.getDependencies()); + this.withDescription(instance.getDescription()); + this.withEnum(instance.getEnum()); + this.withExample(instance.getExample()); + this.withExclusiveMaximum(instance.getExclusiveMaximum()); + this.withExclusiveMinimum(instance.getExclusiveMinimum()); + this.withExternalDocs(instance.getExternalDocs()); + this.withFormat(instance.getFormat()); + this.withId(instance.getId()); + this.withItems(instance.getItems()); + this.withMaxItems(instance.getMaxItems()); + this.withMaxLength(instance.getMaxLength()); + this.withMaxProperties(instance.getMaxProperties()); + this.withMaximum(instance.getMaximum()); + this.withMinItems(instance.getMinItems()); + this.withMinLength(instance.getMinLength()); + this.withMinProperties(instance.getMinProperties()); + this.withMinimum(instance.getMinimum()); + this.withMultipleOf(instance.getMultipleOf()); + this.withNot(instance.getNot()); + this.withNullable(instance.getNullable()); + this.withOneOf(instance.getOneOf()); + this.withPattern(instance.getPattern()); + this.withPatternProperties(instance.getPatternProperties()); + this.withProperties(instance.getProperties()); + this.withRequired(instance.getRequired()); + this.withTitle(instance.getTitle()); + this.withType(instance.getType()); + this.withUniqueItems(instance.getUniqueItems()); + } + } + + public String getRef() { + return this.$ref; + } + + public A withRef(String $ref) { + this.$ref = $ref; + return (A) this; + } + + public boolean hasRef() { + return this.$ref != null; + } + + public String getSchema() { + return this.$schema; + } + + public A withSchema(String $schema) { + this.$schema = $schema; + return (A) this; + } + + public boolean hasSchema() { + return this.$schema != null; + } + + public Object getAdditionalItems() { + return this.additionalItems; + } + + public A withAdditionalItems(Object additionalItems) { + this.additionalItems = additionalItems; + return (A) this; + } + + public boolean hasAdditionalItems() { + return this.additionalItems != null; + } + + public Object getAdditionalProperties() { + return this.additionalProperties; + } + + public A withAdditionalProperties(Object additionalProperties) { + this.additionalProperties = additionalProperties; + return (A) this; + } + + public boolean hasAdditionalProperties() { + return this.additionalProperties != null; + } + + public A addToAllOf(int index,V1JSONSchemaProps item) { + if (this.allOf == null) {this.allOf = new ArrayList();} + V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); + if (index < 0 || index >= allOf.size()) { _visitables.get("allOf").add(builder); allOf.add(builder); } else { _visitables.get("allOf").add(index, builder); allOf.add(index, builder);} + return (A)this; + } + + public A setToAllOf(int index,V1JSONSchemaProps item) { + if (this.allOf == null) {this.allOf = new ArrayList();} + V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); + if (index < 0 || index >= allOf.size()) { _visitables.get("allOf").add(builder); allOf.add(builder); } else { _visitables.get("allOf").set(index, builder); allOf.set(index, builder);} + return (A)this; + } + + public A addToAllOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { + if (this.allOf == null) {this.allOf = new ArrayList();} + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("allOf").add(builder);this.allOf.add(builder);} return (A)this; + } + + public A addAllToAllOf(Collection items) { + if (this.allOf == null) {this.allOf = new ArrayList();} + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("allOf").add(builder);this.allOf.add(builder);} return (A)this; + } + + public A removeFromAllOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { + if (this.allOf == null) return (A)this; + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("allOf").remove(builder); this.allOf.remove(builder);} return (A)this; + } + + public A removeAllFromAllOf(Collection items) { + if (this.allOf == null) return (A)this; + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("allOf").remove(builder); this.allOf.remove(builder);} return (A)this; + } + + public A removeMatchingFromAllOf(Predicate predicate) { + if (allOf == null) return (A) this; + final Iterator each = allOf.iterator(); + final List visitables = _visitables.get("allOf"); + while (each.hasNext()) { + V1JSONSchemaPropsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildAllOf() { + return this.allOf != null ? build(allOf) : null; + } + + public V1JSONSchemaProps buildAllOf(int index) { + return this.allOf.get(index).build(); + } + + public V1JSONSchemaProps buildFirstAllOf() { + return this.allOf.get(0).build(); + } + + public V1JSONSchemaProps buildLastAllOf() { + return this.allOf.get(allOf.size() - 1).build(); + } + + public V1JSONSchemaProps buildMatchingAllOf(Predicate predicate) { + for (V1JSONSchemaPropsBuilder item : allOf) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingAllOf(Predicate predicate) { + for (V1JSONSchemaPropsBuilder item : allOf) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAllOf(List allOf) { + if (this.allOf != null) { + this._visitables.get("allOf").clear(); + } + if (allOf != null) { + this.allOf = new ArrayList(); + for (V1JSONSchemaProps item : allOf) { + this.addToAllOf(item); + } + } else { + this.allOf = null; + } + return (A) this; + } + + public A withAllOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... allOf) { + if (this.allOf != null) { + this.allOf.clear(); + _visitables.remove("allOf"); + } + if (allOf != null) { + for (V1JSONSchemaProps item : allOf) { + this.addToAllOf(item); + } + } + return (A) this; + } + + public boolean hasAllOf() { + return this.allOf != null && !this.allOf.isEmpty(); + } + + public AllOfNested addNewAllOf() { + return new AllOfNested(-1, null); + } + + public AllOfNested addNewAllOfLike(V1JSONSchemaProps item) { + return new AllOfNested(-1, item); + } + + public AllOfNested setNewAllOfLike(int index,V1JSONSchemaProps item) { + return new AllOfNested(index, item); + } + + public AllOfNested editAllOf(int index) { + if (allOf.size() <= index) throw new RuntimeException("Can't edit allOf. Index exceeds size."); + return setNewAllOfLike(index, buildAllOf(index)); + } + + public AllOfNested editFirstAllOf() { + if (allOf.size() == 0) throw new RuntimeException("Can't edit first allOf. The list is empty."); + return setNewAllOfLike(0, buildAllOf(0)); + } + + public AllOfNested editLastAllOf() { + int index = allOf.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last allOf. The list is empty."); + return setNewAllOfLike(index, buildAllOf(index)); + } + + public AllOfNested editMatchingAllOf(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); + if (index < 0 || index >= anyOf.size()) { _visitables.get("anyOf").add(builder); anyOf.add(builder); } else { _visitables.get("anyOf").add(index, builder); anyOf.add(index, builder);} + return (A)this; + } + + public A setToAnyOf(int index,V1JSONSchemaProps item) { + if (this.anyOf == null) {this.anyOf = new ArrayList();} + V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); + if (index < 0 || index >= anyOf.size()) { _visitables.get("anyOf").add(builder); anyOf.add(builder); } else { _visitables.get("anyOf").set(index, builder); anyOf.set(index, builder);} + return (A)this; + } + + public A addToAnyOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { + if (this.anyOf == null) {this.anyOf = new ArrayList();} + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("anyOf").add(builder);this.anyOf.add(builder);} return (A)this; + } + + public A addAllToAnyOf(Collection items) { + if (this.anyOf == null) {this.anyOf = new ArrayList();} + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("anyOf").add(builder);this.anyOf.add(builder);} return (A)this; + } + + public A removeFromAnyOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { + if (this.anyOf == null) return (A)this; + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("anyOf").remove(builder); this.anyOf.remove(builder);} return (A)this; + } + + public A removeAllFromAnyOf(Collection items) { + if (this.anyOf == null) return (A)this; + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("anyOf").remove(builder); this.anyOf.remove(builder);} return (A)this; + } + + public A removeMatchingFromAnyOf(Predicate predicate) { + if (anyOf == null) return (A) this; + final Iterator each = anyOf.iterator(); + final List visitables = _visitables.get("anyOf"); + while (each.hasNext()) { + V1JSONSchemaPropsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildAnyOf() { + return this.anyOf != null ? build(anyOf) : null; + } + + public V1JSONSchemaProps buildAnyOf(int index) { + return this.anyOf.get(index).build(); + } + + public V1JSONSchemaProps buildFirstAnyOf() { + return this.anyOf.get(0).build(); + } + + public V1JSONSchemaProps buildLastAnyOf() { + return this.anyOf.get(anyOf.size() - 1).build(); + } + + public V1JSONSchemaProps buildMatchingAnyOf(Predicate predicate) { + for (V1JSONSchemaPropsBuilder item : anyOf) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingAnyOf(Predicate predicate) { + for (V1JSONSchemaPropsBuilder item : anyOf) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAnyOf(List anyOf) { + if (this.anyOf != null) { + this._visitables.get("anyOf").clear(); + } + if (anyOf != null) { + this.anyOf = new ArrayList(); + for (V1JSONSchemaProps item : anyOf) { + this.addToAnyOf(item); + } + } else { + this.anyOf = null; + } + return (A) this; + } + + public A withAnyOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... anyOf) { + if (this.anyOf != null) { + this.anyOf.clear(); + _visitables.remove("anyOf"); + } + if (anyOf != null) { + for (V1JSONSchemaProps item : anyOf) { + this.addToAnyOf(item); + } + } + return (A) this; + } + + public boolean hasAnyOf() { + return this.anyOf != null && !this.anyOf.isEmpty(); + } + + public AnyOfNested addNewAnyOf() { + return new AnyOfNested(-1, null); + } + + public AnyOfNested addNewAnyOfLike(V1JSONSchemaProps item) { + return new AnyOfNested(-1, item); + } + + public AnyOfNested setNewAnyOfLike(int index,V1JSONSchemaProps item) { + return new AnyOfNested(index, item); + } + + public AnyOfNested editAnyOf(int index) { + if (anyOf.size() <= index) throw new RuntimeException("Can't edit anyOf. Index exceeds size."); + return setNewAnyOfLike(index, buildAnyOf(index)); + } + + public AnyOfNested editFirstAnyOf() { + if (anyOf.size() == 0) throw new RuntimeException("Can't edit first anyOf. The list is empty."); + return setNewAnyOfLike(0, buildAnyOf(0)); + } + + public AnyOfNested editLastAnyOf() { + int index = anyOf.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last anyOf. The list is empty."); + return setNewAnyOfLike(index, buildAnyOf(index)); + } + + public AnyOfNested editMatchingAnyOf(Predicate predicate) { + int index = -1; + for (int i=0;i map) { + if(this.definitions == null && map != null) { this.definitions = new LinkedHashMap(); } + if(map != null) { this.definitions.putAll(map);} return (A)this; + } + + public A removeFromDefinitions(String key) { + if(this.definitions == null) { return (A) this; } + if(key != null && this.definitions != null) {this.definitions.remove(key);} return (A)this; + } + + public A removeFromDefinitions(Map map) { + if(this.definitions == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.definitions != null){this.definitions.remove(key);}}} return (A)this; + } + + public Map getDefinitions() { + return this.definitions; + } + + public A withDefinitions(Map definitions) { + if (definitions == null) { + this.definitions = null; + } else { + this.definitions = new LinkedHashMap(definitions); + } + return (A) this; + } + + public boolean hasDefinitions() { + return this.definitions != null; + } + + public A addToDependencies(String key,Object value) { + if(this.dependencies == null && key != null && value != null) { this.dependencies = new LinkedHashMap(); } + if(key != null && value != null) {this.dependencies.put(key, value);} return (A)this; + } + + public A addToDependencies(Map map) { + if(this.dependencies == null && map != null) { this.dependencies = new LinkedHashMap(); } + if(map != null) { this.dependencies.putAll(map);} return (A)this; + } + + public A removeFromDependencies(String key) { + if(this.dependencies == null) { return (A) this; } + if(key != null && this.dependencies != null) {this.dependencies.remove(key);} return (A)this; + } + + public A removeFromDependencies(Map map) { + if(this.dependencies == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.dependencies != null){this.dependencies.remove(key);}}} return (A)this; + } + + public Map getDependencies() { + return this.dependencies; + } + + public A withDependencies(Map dependencies) { + if (dependencies == null) { + this.dependencies = null; + } else { + this.dependencies = new LinkedHashMap(dependencies); + } + return (A) this; + } + + public boolean hasDependencies() { + return this.dependencies != null; + } + + public String getDescription() { + return this.description; + } + + public A withDescription(String description) { + this.description = description; + return (A) this; + } + + public boolean hasDescription() { + return this.description != null; + } + + public A addToEnum(int index,Object item) { + if (this._enum == null) {this._enum = new ArrayList();} + this._enum.add(index, item); + return (A)this; + } + + public A setToEnum(int index,Object item) { + if (this._enum == null) {this._enum = new ArrayList();} + this._enum.set(index, item); return (A)this; + } + + public A addToEnum(java.lang.Object... items) { + if (this._enum == null) {this._enum = new ArrayList();} + for (Object item : items) {this._enum.add(item);} return (A)this; + } + + public A addAllToEnum(Collection items) { + if (this._enum == null) {this._enum = new ArrayList();} + for (Object item : items) {this._enum.add(item);} return (A)this; + } + + public A removeFromEnum(java.lang.Object... items) { + if (this._enum == null) return (A)this; + for (Object item : items) { this._enum.remove(item);} return (A)this; + } + + public A removeAllFromEnum(Collection items) { + if (this._enum == null) return (A)this; + for (Object item : items) { this._enum.remove(item);} return (A)this; + } + + public List getEnum() { + return this._enum; + } + + public Object getEnum(int index) { + return this._enum.get(index); + } + + public Object getFirstEnum() { + return this._enum.get(0); + } + + public Object getLastEnum() { + return this._enum.get(_enum.size() - 1); + } + + public Object getMatchingEnum(Predicate predicate) { + for (Object item : _enum) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingEnum(Predicate predicate) { + for (Object item : _enum) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withEnum(List _enum) { + if (_enum != null) { + this._enum = new ArrayList(); + for (Object item : _enum) { + this.addToEnum(item); + } + } else { + this._enum = null; + } + return (A) this; + } + + public A withEnum(java.lang.Object... _enum) { + if (this._enum != null) { + this._enum.clear(); + _visitables.remove("_enum"); + } + if (_enum != null) { + for (Object item : _enum) { + this.addToEnum(item); + } + } + return (A) this; + } + + public boolean hasEnum() { + return this._enum != null && !this._enum.isEmpty(); + } + + public Object getExample() { + return this.example; + } + + public A withExample(Object example) { + this.example = example; + return (A) this; + } + + public boolean hasExample() { + return this.example != null; + } + + public Boolean getExclusiveMaximum() { + return this.exclusiveMaximum; + } + + public A withExclusiveMaximum(Boolean exclusiveMaximum) { + this.exclusiveMaximum = exclusiveMaximum; + return (A) this; + } + + public boolean hasExclusiveMaximum() { + return this.exclusiveMaximum != null; + } + + public Boolean getExclusiveMinimum() { + return this.exclusiveMinimum; + } + + public A withExclusiveMinimum(Boolean exclusiveMinimum) { + this.exclusiveMinimum = exclusiveMinimum; + return (A) this; + } + + public boolean hasExclusiveMinimum() { + return this.exclusiveMinimum != null; + } + + public V1ExternalDocumentation buildExternalDocs() { + return this.externalDocs != null ? this.externalDocs.build() : null; + } + + public A withExternalDocs(V1ExternalDocumentation externalDocs) { + this._visitables.remove("externalDocs"); + if (externalDocs != null) { + this.externalDocs = new V1ExternalDocumentationBuilder(externalDocs); + this._visitables.get("externalDocs").add(this.externalDocs); + } else { + this.externalDocs = null; + this._visitables.get("externalDocs").remove(this.externalDocs); + } + return (A) this; + } + + public boolean hasExternalDocs() { + return this.externalDocs != null; + } + + public ExternalDocsNested withNewExternalDocs() { + return new ExternalDocsNested(null); + } + + public ExternalDocsNested withNewExternalDocsLike(V1ExternalDocumentation item) { + return new ExternalDocsNested(item); + } + + public ExternalDocsNested editExternalDocs() { + return withNewExternalDocsLike(java.util.Optional.ofNullable(buildExternalDocs()).orElse(null)); + } + + public ExternalDocsNested editOrNewExternalDocs() { + return withNewExternalDocsLike(java.util.Optional.ofNullable(buildExternalDocs()).orElse(new V1ExternalDocumentationBuilder().build())); + } + + public ExternalDocsNested editOrNewExternalDocsLike(V1ExternalDocumentation item) { + return withNewExternalDocsLike(java.util.Optional.ofNullable(buildExternalDocs()).orElse(item)); + } + + public String getFormat() { + return this.format; + } + + public A withFormat(String format) { + this.format = format; + return (A) this; + } + + public boolean hasFormat() { + return this.format != null; + } + + public String getId() { + return this.id; + } + + public A withId(String id) { + this.id = id; + return (A) this; + } + + public boolean hasId() { + return this.id != null; + } + + public Object getItems() { + return this.items; } - public interface AnyOfNested extends Nested,V1JSONSchemaPropsFluent>{ - public N and(); - public N endAnyOf(); + + public A withItems(Object items) { + this.items = items; + return (A) this; + } + + public boolean hasItems() { + return this.items != null; + } + + public Long getMaxItems() { + return this.maxItems; + } + + public A withMaxItems(Long maxItems) { + this.maxItems = maxItems; + return (A) this; + } + + public boolean hasMaxItems() { + return this.maxItems != null; + } + + public Long getMaxLength() { + return this.maxLength; + } + + public A withMaxLength(Long maxLength) { + this.maxLength = maxLength; + return (A) this; + } + + public boolean hasMaxLength() { + return this.maxLength != null; + } + + public Long getMaxProperties() { + return this.maxProperties; + } + + public A withMaxProperties(Long maxProperties) { + this.maxProperties = maxProperties; + return (A) this; + } + + public boolean hasMaxProperties() { + return this.maxProperties != null; + } + + public Double getMaximum() { + return this.maximum; + } + + public A withMaximum(Double maximum) { + this.maximum = maximum; + return (A) this; + } + + public boolean hasMaximum() { + return this.maximum != null; + } + + public Long getMinItems() { + return this.minItems; + } + + public A withMinItems(Long minItems) { + this.minItems = minItems; + return (A) this; + } + + public boolean hasMinItems() { + return this.minItems != null; + } + + public Long getMinLength() { + return this.minLength; + } + + public A withMinLength(Long minLength) { + this.minLength = minLength; + return (A) this; + } + + public boolean hasMinLength() { + return this.minLength != null; + } + + public Long getMinProperties() { + return this.minProperties; + } + + public A withMinProperties(Long minProperties) { + this.minProperties = minProperties; + return (A) this; + } + + public boolean hasMinProperties() { + return this.minProperties != null; + } + + public Double getMinimum() { + return this.minimum; + } + + public A withMinimum(Double minimum) { + this.minimum = minimum; + return (A) this; + } + + public boolean hasMinimum() { + return this.minimum != null; + } + + public Double getMultipleOf() { + return this.multipleOf; + } + + public A withMultipleOf(Double multipleOf) { + this.multipleOf = multipleOf; + return (A) this; + } + + public boolean hasMultipleOf() { + return this.multipleOf != null; + } + + public V1JSONSchemaProps buildNot() { + return this.not != null ? this.not.build() : null; + } + + public A withNot(V1JSONSchemaProps not) { + this._visitables.remove("not"); + if (not != null) { + this.not = new V1JSONSchemaPropsBuilder(not); + this._visitables.get("not").add(this.not); + } else { + this.not = null; + this._visitables.get("not").remove(this.not); + } + return (A) this; + } + + public boolean hasNot() { + return this.not != null; + } + + public NotNested withNewNot() { + return new NotNested(null); + } + + public NotNested withNewNotLike(V1JSONSchemaProps item) { + return new NotNested(item); + } + + public NotNested editNot() { + return withNewNotLike(java.util.Optional.ofNullable(buildNot()).orElse(null)); + } + + public NotNested editOrNewNot() { + return withNewNotLike(java.util.Optional.ofNullable(buildNot()).orElse(new V1JSONSchemaPropsBuilder().build())); + } + + public NotNested editOrNewNotLike(V1JSONSchemaProps item) { + return withNewNotLike(java.util.Optional.ofNullable(buildNot()).orElse(item)); + } + + public Boolean getNullable() { + return this.nullable; + } + + public A withNullable(Boolean nullable) { + this.nullable = nullable; + return (A) this; + } + + public boolean hasNullable() { + return this.nullable != null; + } + + public A addToOneOf(int index,V1JSONSchemaProps item) { + if (this.oneOf == null) {this.oneOf = new ArrayList();} + V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); + if (index < 0 || index >= oneOf.size()) { _visitables.get("oneOf").add(builder); oneOf.add(builder); } else { _visitables.get("oneOf").add(index, builder); oneOf.add(index, builder);} + return (A)this; + } + + public A setToOneOf(int index,V1JSONSchemaProps item) { + if (this.oneOf == null) {this.oneOf = new ArrayList();} + V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); + if (index < 0 || index >= oneOf.size()) { _visitables.get("oneOf").add(builder); oneOf.add(builder); } else { _visitables.get("oneOf").set(index, builder); oneOf.set(index, builder);} + return (A)this; + } + + public A addToOneOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { + if (this.oneOf == null) {this.oneOf = new ArrayList();} + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("oneOf").add(builder);this.oneOf.add(builder);} return (A)this; + } + + public A addAllToOneOf(Collection items) { + if (this.oneOf == null) {this.oneOf = new ArrayList();} + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("oneOf").add(builder);this.oneOf.add(builder);} return (A)this; + } + + public A removeFromOneOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { + if (this.oneOf == null) return (A)this; + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("oneOf").remove(builder); this.oneOf.remove(builder);} return (A)this; + } + + public A removeAllFromOneOf(Collection items) { + if (this.oneOf == null) return (A)this; + for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("oneOf").remove(builder); this.oneOf.remove(builder);} return (A)this; + } + + public A removeMatchingFromOneOf(Predicate predicate) { + if (oneOf == null) return (A) this; + final Iterator each = oneOf.iterator(); + final List visitables = _visitables.get("oneOf"); + while (each.hasNext()) { + V1JSONSchemaPropsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildOneOf() { + return this.oneOf != null ? build(oneOf) : null; + } + + public V1JSONSchemaProps buildOneOf(int index) { + return this.oneOf.get(index).build(); + } + + public V1JSONSchemaProps buildFirstOneOf() { + return this.oneOf.get(0).build(); + } + + public V1JSONSchemaProps buildLastOneOf() { + return this.oneOf.get(oneOf.size() - 1).build(); + } + + public V1JSONSchemaProps buildMatchingOneOf(Predicate predicate) { + for (V1JSONSchemaPropsBuilder item : oneOf) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingOneOf(Predicate predicate) { + for (V1JSONSchemaPropsBuilder item : oneOf) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withOneOf(List oneOf) { + if (this.oneOf != null) { + this._visitables.get("oneOf").clear(); + } + if (oneOf != null) { + this.oneOf = new ArrayList(); + for (V1JSONSchemaProps item : oneOf) { + this.addToOneOf(item); + } + } else { + this.oneOf = null; + } + return (A) this; + } + + public A withOneOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... oneOf) { + if (this.oneOf != null) { + this.oneOf.clear(); + _visitables.remove("oneOf"); + } + if (oneOf != null) { + for (V1JSONSchemaProps item : oneOf) { + this.addToOneOf(item); + } + } + return (A) this; + } + + public boolean hasOneOf() { + return this.oneOf != null && !this.oneOf.isEmpty(); + } + + public OneOfNested addNewOneOf() { + return new OneOfNested(-1, null); + } + + public OneOfNested addNewOneOfLike(V1JSONSchemaProps item) { + return new OneOfNested(-1, item); + } + + public OneOfNested setNewOneOfLike(int index,V1JSONSchemaProps item) { + return new OneOfNested(index, item); + } + + public OneOfNested editOneOf(int index) { + if (oneOf.size() <= index) throw new RuntimeException("Can't edit oneOf. Index exceeds size."); + return setNewOneOfLike(index, buildOneOf(index)); + } + + public OneOfNested editFirstOneOf() { + if (oneOf.size() == 0) throw new RuntimeException("Can't edit first oneOf. The list is empty."); + return setNewOneOfLike(0, buildOneOf(0)); + } + + public OneOfNested editLastOneOf() { + int index = oneOf.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last oneOf. The list is empty."); + return setNewOneOfLike(index, buildOneOf(index)); + } + + public OneOfNested editMatchingOneOf(Predicate predicate) { + int index = -1; + for (int i=0;i map) { + if(this.patternProperties == null && map != null) { this.patternProperties = new LinkedHashMap(); } + if(map != null) { this.patternProperties.putAll(map);} return (A)this; + } + + public A removeFromPatternProperties(String key) { + if(this.patternProperties == null) { return (A) this; } + if(key != null && this.patternProperties != null) {this.patternProperties.remove(key);} return (A)this; + } + + public A removeFromPatternProperties(Map map) { + if(this.patternProperties == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.patternProperties != null){this.patternProperties.remove(key);}}} return (A)this; + } + + public Map getPatternProperties() { + return this.patternProperties; + } + + public A withPatternProperties(Map patternProperties) { + if (patternProperties == null) { + this.patternProperties = null; + } else { + this.patternProperties = new LinkedHashMap(patternProperties); + } + return (A) this; + } + + public boolean hasPatternProperties() { + return this.patternProperties != null; + } + + public A addToProperties(String key,V1JSONSchemaProps value) { + if(this.properties == null && key != null && value != null) { this.properties = new LinkedHashMap(); } + if(key != null && value != null) {this.properties.put(key, value);} return (A)this; + } + + public A addToProperties(Map map) { + if(this.properties == null && map != null) { this.properties = new LinkedHashMap(); } + if(map != null) { this.properties.putAll(map);} return (A)this; + } + + public A removeFromProperties(String key) { + if(this.properties == null) { return (A) this; } + if(key != null && this.properties != null) {this.properties.remove(key);} return (A)this; + } + + public A removeFromProperties(Map map) { + if(this.properties == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.properties != null){this.properties.remove(key);}}} return (A)this; + } + + public Map getProperties() { + return this.properties; + } + + public A withProperties(Map properties) { + if (properties == null) { + this.properties = null; + } else { + this.properties = new LinkedHashMap(properties); + } + return (A) this; + } + + public boolean hasProperties() { + return this.properties != null; + } + + public A addToRequired(int index,String item) { + if (this.required == null) {this.required = new ArrayList();} + this.required.add(index, item); + return (A)this; + } + + public A setToRequired(int index,String item) { + if (this.required == null) {this.required = new ArrayList();} + this.required.set(index, item); return (A)this; + } + + public A addToRequired(java.lang.String... items) { + if (this.required == null) {this.required = new ArrayList();} + for (String item : items) {this.required.add(item);} return (A)this; + } + + public A addAllToRequired(Collection items) { + if (this.required == null) {this.required = new ArrayList();} + for (String item : items) {this.required.add(item);} return (A)this; + } + + public A removeFromRequired(java.lang.String... items) { + if (this.required == null) return (A)this; + for (String item : items) { this.required.remove(item);} return (A)this; + } + + public A removeAllFromRequired(Collection items) { + if (this.required == null) return (A)this; + for (String item : items) { this.required.remove(item);} return (A)this; + } + + public List getRequired() { + return this.required; + } + + public String getRequired(int index) { + return this.required.get(index); + } + + public String getFirstRequired() { + return this.required.get(0); + } + + public String getLastRequired() { + return this.required.get(required.size() - 1); + } + + public String getMatchingRequired(Predicate predicate) { + for (String item : required) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingRequired(Predicate predicate) { + for (String item : required) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRequired(List required) { + if (required != null) { + this.required = new ArrayList(); + for (String item : required) { + this.addToRequired(item); + } + } else { + this.required = null; + } + return (A) this; + } + + public A withRequired(java.lang.String... required) { + if (this.required != null) { + this.required.clear(); + _visitables.remove("required"); + } + if (required != null) { + for (String item : required) { + this.addToRequired(item); + } + } + return (A) this; + } + + public boolean hasRequired() { + return this.required != null && !this.required.isEmpty(); + } + + public String getTitle() { + return this.title; + } + + public A withTitle(String title) { + this.title = title; + return (A) this; + } + + public boolean hasTitle() { + return this.title != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public Boolean getUniqueItems() { + return this.uniqueItems; + } + + public A withUniqueItems(Boolean uniqueItems) { + this.uniqueItems = uniqueItems; + return (A) this; + } + + public boolean hasUniqueItems() { + return this.uniqueItems != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1JSONSchemaPropsFluent that = (V1JSONSchemaPropsFluent) o; + if (!java.util.Objects.equals($ref, that.$ref)) return false; + if (!java.util.Objects.equals($schema, that.$schema)) return false; + if (!java.util.Objects.equals(additionalItems, that.additionalItems)) return false; + if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false; + if (!java.util.Objects.equals(allOf, that.allOf)) return false; + if (!java.util.Objects.equals(anyOf, that.anyOf)) return false; + if (!java.util.Objects.equals(_default, that._default)) return false; + if (!java.util.Objects.equals(definitions, that.definitions)) return false; + if (!java.util.Objects.equals(dependencies, that.dependencies)) return false; + if (!java.util.Objects.equals(description, that.description)) return false; + if (!java.util.Objects.equals(_enum, that._enum)) return false; + if (!java.util.Objects.equals(example, that.example)) return false; + if (!java.util.Objects.equals(exclusiveMaximum, that.exclusiveMaximum)) return false; + if (!java.util.Objects.equals(exclusiveMinimum, that.exclusiveMinimum)) return false; + if (!java.util.Objects.equals(externalDocs, that.externalDocs)) return false; + if (!java.util.Objects.equals(format, that.format)) return false; + if (!java.util.Objects.equals(id, that.id)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(maxItems, that.maxItems)) return false; + if (!java.util.Objects.equals(maxLength, that.maxLength)) return false; + if (!java.util.Objects.equals(maxProperties, that.maxProperties)) return false; + if (!java.util.Objects.equals(maximum, that.maximum)) return false; + if (!java.util.Objects.equals(minItems, that.minItems)) return false; + if (!java.util.Objects.equals(minLength, that.minLength)) return false; + if (!java.util.Objects.equals(minProperties, that.minProperties)) return false; + if (!java.util.Objects.equals(minimum, that.minimum)) return false; + if (!java.util.Objects.equals(multipleOf, that.multipleOf)) return false; + if (!java.util.Objects.equals(not, that.not)) return false; + if (!java.util.Objects.equals(nullable, that.nullable)) return false; + if (!java.util.Objects.equals(oneOf, that.oneOf)) return false; + if (!java.util.Objects.equals(pattern, that.pattern)) return false; + if (!java.util.Objects.equals(patternProperties, that.patternProperties)) return false; + if (!java.util.Objects.equals(properties, that.properties)) return false; + if (!java.util.Objects.equals(required, that.required)) return false; + if (!java.util.Objects.equals(title, that.title)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + if (!java.util.Objects.equals(uniqueItems, that.uniqueItems)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash($ref, $schema, additionalItems, additionalProperties, allOf, anyOf, _default, definitions, dependencies, description, _enum, example, exclusiveMaximum, exclusiveMinimum, externalDocs, format, id, items, maxItems, maxLength, maxProperties, maximum, minItems, minLength, minProperties, minimum, multipleOf, not, nullable, oneOf, pattern, patternProperties, properties, required, title, type, uniqueItems, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if ($ref != null) { sb.append("$ref:"); sb.append($ref + ","); } + if ($schema != null) { sb.append("$schema:"); sb.append($schema + ","); } + if (additionalItems != null) { sb.append("additionalItems:"); sb.append(additionalItems + ","); } + if (additionalProperties != null) { sb.append("additionalProperties:"); sb.append(additionalProperties + ","); } + if (allOf != null && !allOf.isEmpty()) { sb.append("allOf:"); sb.append(allOf + ","); } + if (anyOf != null && !anyOf.isEmpty()) { sb.append("anyOf:"); sb.append(anyOf + ","); } + if (_default != null) { sb.append("_default:"); sb.append(_default + ","); } + if (definitions != null && !definitions.isEmpty()) { sb.append("definitions:"); sb.append(definitions + ","); } + if (dependencies != null && !dependencies.isEmpty()) { sb.append("dependencies:"); sb.append(dependencies + ","); } + if (description != null) { sb.append("description:"); sb.append(description + ","); } + if (_enum != null && !_enum.isEmpty()) { sb.append("_enum:"); sb.append(_enum + ","); } + if (example != null) { sb.append("example:"); sb.append(example + ","); } + if (exclusiveMaximum != null) { sb.append("exclusiveMaximum:"); sb.append(exclusiveMaximum + ","); } + if (exclusiveMinimum != null) { sb.append("exclusiveMinimum:"); sb.append(exclusiveMinimum + ","); } + if (externalDocs != null) { sb.append("externalDocs:"); sb.append(externalDocs + ","); } + if (format != null) { sb.append("format:"); sb.append(format + ","); } + if (id != null) { sb.append("id:"); sb.append(id + ","); } + if (items != null) { sb.append("items:"); sb.append(items + ","); } + if (maxItems != null) { sb.append("maxItems:"); sb.append(maxItems + ","); } + if (maxLength != null) { sb.append("maxLength:"); sb.append(maxLength + ","); } + if (maxProperties != null) { sb.append("maxProperties:"); sb.append(maxProperties + ","); } + if (maximum != null) { sb.append("maximum:"); sb.append(maximum + ","); } + if (minItems != null) { sb.append("minItems:"); sb.append(minItems + ","); } + if (minLength != null) { sb.append("minLength:"); sb.append(minLength + ","); } + if (minProperties != null) { sb.append("minProperties:"); sb.append(minProperties + ","); } + if (minimum != null) { sb.append("minimum:"); sb.append(minimum + ","); } + if (multipleOf != null) { sb.append("multipleOf:"); sb.append(multipleOf + ","); } + if (not != null) { sb.append("not:"); sb.append(not + ","); } + if (nullable != null) { sb.append("nullable:"); sb.append(nullable + ","); } + if (oneOf != null && !oneOf.isEmpty()) { sb.append("oneOf:"); sb.append(oneOf + ","); } + if (pattern != null) { sb.append("pattern:"); sb.append(pattern + ","); } + if (patternProperties != null && !patternProperties.isEmpty()) { sb.append("patternProperties:"); sb.append(patternProperties + ","); } + if (properties != null && !properties.isEmpty()) { sb.append("properties:"); sb.append(properties + ","); } + if (required != null && !required.isEmpty()) { sb.append("required:"); sb.append(required + ","); } + if (title != null) { sb.append("title:"); sb.append(title + ","); } + if (type != null) { sb.append("type:"); sb.append(type + ","); } + if (uniqueItems != null) { sb.append("uniqueItems:"); sb.append(uniqueItems); } + sb.append("}"); + return sb.toString(); + } + + public A withExclusiveMaximum() { + return withExclusiveMaximum(true); + } + + public A withExclusiveMinimum() { + return withExclusiveMinimum(true); + } + + public A withNullable() { + return withNullable(true); + } + + public A withUniqueItems() { + return withUniqueItems(true); + } + public class AllOfNested extends V1JSONSchemaPropsFluent> implements Nested{ + AllOfNested(int index,V1JSONSchemaProps item) { + this.index = index; + this.builder = new V1JSONSchemaPropsBuilder(this, item); + } + V1JSONSchemaPropsBuilder builder; + int index; + public N and() { + return (N) V1JSONSchemaPropsFluent.this.setToAllOf(index,builder.build()); + } + + public N endAllOf() { + return and(); + } + + } - public interface ExternalDocsNested extends Nested,V1ExternalDocumentationFluent>{ - public N and(); - public N endExternalDocs(); + public class AnyOfNested extends V1JSONSchemaPropsFluent> implements Nested{ + AnyOfNested(int index,V1JSONSchemaProps item) { + this.index = index; + this.builder = new V1JSONSchemaPropsBuilder(this, item); + } + V1JSONSchemaPropsBuilder builder; + int index; + public N and() { + return (N) V1JSONSchemaPropsFluent.this.setToAnyOf(index,builder.build()); + } + + public N endAnyOf() { + return and(); + } + + } - public interface NotNested extends Nested,V1JSONSchemaPropsFluent>{ - public N and(); - public N endNot(); + public class ExternalDocsNested extends V1ExternalDocumentationFluent> implements Nested{ + ExternalDocsNested(V1ExternalDocumentation item) { + this.builder = new V1ExternalDocumentationBuilder(this, item); + } + V1ExternalDocumentationBuilder builder; + + public N and() { + return (N) V1JSONSchemaPropsFluent.this.withExternalDocs(builder.build()); + } + public N endExternalDocs() { + return and(); + } + + } - public interface OneOfNested extends Nested,V1JSONSchemaPropsFluent>{ - public N and(); - public N endOneOf(); + public class NotNested extends V1JSONSchemaPropsFluent> implements Nested{ + NotNested(V1JSONSchemaProps item) { + this.builder = new V1JSONSchemaPropsBuilder(this, item); + } + V1JSONSchemaPropsBuilder builder; + + public N and() { + return (N) V1JSONSchemaPropsFluent.this.withNot(builder.build()); + } + public N endNot() { + return and(); + } + + } + public class OneOfNested extends V1JSONSchemaPropsFluent> implements Nested{ + OneOfNested(int index,V1JSONSchemaProps item) { + this.index = index; + this.builder = new V1JSONSchemaPropsBuilder(this, item); + } + V1JSONSchemaPropsBuilder builder; + int index; + + public N and() { + return (N) V1JSONSchemaPropsFluent.this.setToOneOf(index,builder.build()); + } + + public N endOneOf() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsFluentImpl.java deleted file mode 100644 index 385a9605e5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JSONSchemaPropsFluentImpl.java +++ /dev/null @@ -1,1160 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1JSONSchemaPropsFluentImpl> extends BaseFluent implements V1JSONSchemaPropsFluent{ - public V1JSONSchemaPropsFluentImpl() { - } - public V1JSONSchemaPropsFluentImpl(V1JSONSchemaProps instance) { - if (instance != null) { - this.withRef(instance.get$Ref()); - this.withSchema(instance.get$Schema()); - this.withAdditionalItems(instance.getAdditionalItems()); - this.withAdditionalProperties(instance.getAdditionalProperties()); - this.withAllOf(instance.getAllOf()); - this.withAnyOf(instance.getAnyOf()); - this.withDefault(instance.getDefault()); - this.withDefinitions(instance.getDefinitions()); - this.withDependencies(instance.getDependencies()); - this.withDescription(instance.getDescription()); - this.withEnum(instance.getEnum()); - this.withExample(instance.getExample()); - this.withExclusiveMaximum(instance.getExclusiveMaximum()); - this.withExclusiveMinimum(instance.getExclusiveMinimum()); - this.withExternalDocs(instance.getExternalDocs()); - this.withFormat(instance.getFormat()); - this.withId(instance.getId()); - this.withItems(instance.getItems()); - this.withMaxItems(instance.getMaxItems()); - this.withMaxLength(instance.getMaxLength()); - this.withMaxProperties(instance.getMaxProperties()); - this.withMaximum(instance.getMaximum()); - this.withMinItems(instance.getMinItems()); - this.withMinLength(instance.getMinLength()); - this.withMinProperties(instance.getMinProperties()); - this.withMinimum(instance.getMinimum()); - this.withMultipleOf(instance.getMultipleOf()); - this.withNot(instance.getNot()); - this.withNullable(instance.getNullable()); - this.withOneOf(instance.getOneOf()); - this.withPattern(instance.getPattern()); - this.withPatternProperties(instance.getPatternProperties()); - this.withProperties(instance.getProperties()); - this.withRequired(instance.getRequired()); - this.withTitle(instance.getTitle()); - this.withType(instance.getType()); - this.withUniqueItems(instance.getUniqueItems()); - } - } - private String $ref; - private String $schema; - private Object additionalItems; - private Object additionalProperties; - private ArrayList allOf; - private ArrayList anyOf; - private Object _default; - private Map definitions; - private Map dependencies; - private String description; - private List _enum; - private Object example; - private Boolean exclusiveMaximum; - private Boolean exclusiveMinimum; - private V1ExternalDocumentationBuilder externalDocs; - private String format; - private String id; - private Object items; - private Long maxItems; - private Long maxLength; - private Long maxProperties; - private Double maximum; - private Long minItems; - private Long minLength; - private Long minProperties; - private Double minimum; - private Double multipleOf; - private V1JSONSchemaPropsBuilder not; - private Boolean nullable; - private ArrayList oneOf; - private String pattern; - private Map patternProperties; - private Map properties; - private List required; - private String title; - private String type; - private Boolean uniqueItems; - public String getRef() { - return this.$ref; - } - public A withRef(String $ref) { - this.$ref=$ref; return (A) this; - } - public Boolean hasRef() { - return this.$ref != null; - } - public String getSchema() { - return this.$schema; - } - public A withSchema(String $schema) { - this.$schema=$schema; return (A) this; - } - public Boolean hasSchema() { - return this.$schema != null; - } - public Object getAdditionalItems() { - return this.additionalItems; - } - public A withAdditionalItems(Object additionalItems) { - this.additionalItems=additionalItems; return (A) this; - } - public Boolean hasAdditionalItems() { - return this.additionalItems != null; - } - public Object getAdditionalProperties() { - return this.additionalProperties; - } - public A withAdditionalProperties(Object additionalProperties) { - this.additionalProperties=additionalProperties; return (A) this; - } - public Boolean hasAdditionalProperties() { - return this.additionalProperties != null; - } - public A addToAllOf(int index,V1JSONSchemaProps item) { - if (this.allOf == null) {this.allOf = new ArrayList();} - V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); - if (index < 0 || index >= allOf.size()) { _visitables.get("allOf").add(builder); allOf.add(builder); } else { _visitables.get("allOf").add(index, builder); allOf.add(index, builder);} - return (A)this; - } - public A setToAllOf(int index,V1JSONSchemaProps item) { - if (this.allOf == null) {this.allOf = new ArrayList();} - V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); - if (index < 0 || index >= allOf.size()) { _visitables.get("allOf").add(builder); allOf.add(builder); } else { _visitables.get("allOf").set(index, builder); allOf.set(index, builder);} - return (A)this; - } - public A addToAllOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { - if (this.allOf == null) {this.allOf = new ArrayList();} - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("allOf").add(builder);this.allOf.add(builder);} return (A)this; - } - public A addAllToAllOf(Collection items) { - if (this.allOf == null) {this.allOf = new ArrayList();} - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("allOf").add(builder);this.allOf.add(builder);} return (A)this; - } - public A removeFromAllOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("allOf").remove(builder);if (this.allOf != null) {this.allOf.remove(builder);}} return (A)this; - } - public A removeAllFromAllOf(Collection items) { - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("allOf").remove(builder);if (this.allOf != null) {this.allOf.remove(builder);}} return (A)this; - } - public A removeMatchingFromAllOf(Predicate predicate) { - if (allOf == null) return (A) this; - final Iterator each = allOf.iterator(); - final List visitables = _visitables.get("allOf"); - while (each.hasNext()) { - V1JSONSchemaPropsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildAllOf instead. - * @return The buildable object. - */ - @Deprecated - public List getAllOf() { - return allOf != null ? build(allOf) : null; - } - public List buildAllOf() { - return allOf != null ? build(allOf) : null; - } - public V1JSONSchemaProps buildAllOf(int index) { - return this.allOf.get(index).build(); - } - public V1JSONSchemaProps buildFirstAllOf() { - return this.allOf.get(0).build(); - } - public V1JSONSchemaProps buildLastAllOf() { - return this.allOf.get(allOf.size() - 1).build(); - } - public V1JSONSchemaProps buildMatchingAllOf(Predicate predicate) { - for (V1JSONSchemaPropsBuilder item: allOf) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingAllOf(Predicate predicate) { - for (V1JSONSchemaPropsBuilder item: allOf) { if(predicate.test(item)){ return true;} } return false; - } - public A withAllOf(List allOf) { - if (this.allOf != null) { _visitables.get("allOf").clear();} - if (allOf != null) {this.allOf = new ArrayList(); for (V1JSONSchemaProps item : allOf){this.addToAllOf(item);}} else { this.allOf = null;} return (A) this; - } - public A withAllOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... allOf) { - if (this.allOf != null) {this.allOf.clear(); _visitables.remove("allOf"); } - if (allOf != null) {for (V1JSONSchemaProps item :allOf){ this.addToAllOf(item);}} return (A) this; - } - public Boolean hasAllOf() { - return allOf != null && !allOf.isEmpty(); - } - public V1JSONSchemaPropsFluentImpl.AllOfNested addNewAllOf() { - return new V1JSONSchemaPropsFluentImpl.AllOfNestedImpl(); - } - public V1JSONSchemaPropsFluentImpl.AllOfNested addNewAllOfLike(V1JSONSchemaProps item) { - return new V1JSONSchemaPropsFluentImpl.AllOfNestedImpl(-1, item); - } - public V1JSONSchemaPropsFluentImpl.AllOfNested setNewAllOfLike(int index,V1JSONSchemaProps item) { - return new V1JSONSchemaPropsFluentImpl.AllOfNestedImpl(index, item); - } - public V1JSONSchemaPropsFluentImpl.AllOfNested editAllOf(int index) { - if (allOf.size() <= index) throw new RuntimeException("Can't edit allOf. Index exceeds size."); - return setNewAllOfLike(index, buildAllOf(index)); - } - public V1JSONSchemaPropsFluentImpl.AllOfNested editFirstAllOf() { - if (allOf.size() == 0) throw new RuntimeException("Can't edit first allOf. The list is empty."); - return setNewAllOfLike(0, buildAllOf(0)); - } - public V1JSONSchemaPropsFluentImpl.AllOfNested editLastAllOf() { - int index = allOf.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last allOf. The list is empty."); - return setNewAllOfLike(index, buildAllOf(index)); - } - public V1JSONSchemaPropsFluentImpl.AllOfNested editMatchingAllOf(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); - if (index < 0 || index >= anyOf.size()) { _visitables.get("anyOf").add(builder); anyOf.add(builder); } else { _visitables.get("anyOf").add(index, builder); anyOf.add(index, builder);} - return (A)this; - } - public A setToAnyOf(int index,V1JSONSchemaProps item) { - if (this.anyOf == null) {this.anyOf = new ArrayList();} - V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); - if (index < 0 || index >= anyOf.size()) { _visitables.get("anyOf").add(builder); anyOf.add(builder); } else { _visitables.get("anyOf").set(index, builder); anyOf.set(index, builder);} - return (A)this; - } - public A addToAnyOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { - if (this.anyOf == null) {this.anyOf = new ArrayList();} - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("anyOf").add(builder);this.anyOf.add(builder);} return (A)this; - } - public A addAllToAnyOf(Collection items) { - if (this.anyOf == null) {this.anyOf = new ArrayList();} - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("anyOf").add(builder);this.anyOf.add(builder);} return (A)this; - } - public A removeFromAnyOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("anyOf").remove(builder);if (this.anyOf != null) {this.anyOf.remove(builder);}} return (A)this; - } - public A removeAllFromAnyOf(Collection items) { - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("anyOf").remove(builder);if (this.anyOf != null) {this.anyOf.remove(builder);}} return (A)this; - } - public A removeMatchingFromAnyOf(Predicate predicate) { - if (anyOf == null) return (A) this; - final Iterator each = anyOf.iterator(); - final List visitables = _visitables.get("anyOf"); - while (each.hasNext()) { - V1JSONSchemaPropsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildAnyOf instead. - * @return The buildable object. - */ - @Deprecated - public List getAnyOf() { - return anyOf != null ? build(anyOf) : null; - } - public List buildAnyOf() { - return anyOf != null ? build(anyOf) : null; - } - public V1JSONSchemaProps buildAnyOf(int index) { - return this.anyOf.get(index).build(); - } - public V1JSONSchemaProps buildFirstAnyOf() { - return this.anyOf.get(0).build(); - } - public V1JSONSchemaProps buildLastAnyOf() { - return this.anyOf.get(anyOf.size() - 1).build(); - } - public V1JSONSchemaProps buildMatchingAnyOf(Predicate predicate) { - for (V1JSONSchemaPropsBuilder item: anyOf) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingAnyOf(Predicate predicate) { - for (V1JSONSchemaPropsBuilder item: anyOf) { if(predicate.test(item)){ return true;} } return false; - } - public A withAnyOf(List anyOf) { - if (this.anyOf != null) { _visitables.get("anyOf").clear();} - if (anyOf != null) {this.anyOf = new ArrayList(); for (V1JSONSchemaProps item : anyOf){this.addToAnyOf(item);}} else { this.anyOf = null;} return (A) this; - } - public A withAnyOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... anyOf) { - if (this.anyOf != null) {this.anyOf.clear(); _visitables.remove("anyOf"); } - if (anyOf != null) {for (V1JSONSchemaProps item :anyOf){ this.addToAnyOf(item);}} return (A) this; - } - public Boolean hasAnyOf() { - return anyOf != null && !anyOf.isEmpty(); - } - public V1JSONSchemaPropsFluentImpl.AnyOfNested addNewAnyOf() { - return new V1JSONSchemaPropsFluentImpl.AnyOfNestedImpl(); - } - public V1JSONSchemaPropsFluentImpl.AnyOfNested addNewAnyOfLike(V1JSONSchemaProps item) { - return new V1JSONSchemaPropsFluentImpl.AnyOfNestedImpl(-1, item); - } - public V1JSONSchemaPropsFluentImpl.AnyOfNested setNewAnyOfLike(int index,V1JSONSchemaProps item) { - return new V1JSONSchemaPropsFluentImpl.AnyOfNestedImpl(index, item); - } - public V1JSONSchemaPropsFluentImpl.AnyOfNested editAnyOf(int index) { - if (anyOf.size() <= index) throw new RuntimeException("Can't edit anyOf. Index exceeds size."); - return setNewAnyOfLike(index, buildAnyOf(index)); - } - public V1JSONSchemaPropsFluentImpl.AnyOfNested editFirstAnyOf() { - if (anyOf.size() == 0) throw new RuntimeException("Can't edit first anyOf. The list is empty."); - return setNewAnyOfLike(0, buildAnyOf(0)); - } - public V1JSONSchemaPropsFluentImpl.AnyOfNested editLastAnyOf() { - int index = anyOf.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last anyOf. The list is empty."); - return setNewAnyOfLike(index, buildAnyOf(index)); - } - public V1JSONSchemaPropsFluentImpl.AnyOfNested editMatchingAnyOf(Predicate predicate) { - int index = -1; - for (int i=0;i map) { - if(this.definitions == null && map != null) { this.definitions = new LinkedHashMap(); } - if(map != null) { this.definitions.putAll(map);} return (A)this; - } - public A removeFromDefinitions(String key) { - if(this.definitions == null) { return (A) this; } - if(key != null && this.definitions != null) {this.definitions.remove(key);} return (A)this; - } - public A removeFromDefinitions(Map map) { - if(this.definitions == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.definitions != null){this.definitions.remove(key);}}} return (A)this; - } - public Map getDefinitions() { - return this.definitions; - } - public A withDefinitions(Map definitions) { - if (definitions == null) { this.definitions = null;} else {this.definitions = new LinkedHashMap(definitions);} return (A) this; - } - public Boolean hasDefinitions() { - return this.definitions != null; - } - public A addToDependencies(String key,Object value) { - if(this.dependencies == null && key != null && value != null) { this.dependencies = new LinkedHashMap(); } - if(key != null && value != null) {this.dependencies.put(key, value);} return (A)this; - } - public A addToDependencies(Map map) { - if(this.dependencies == null && map != null) { this.dependencies = new LinkedHashMap(); } - if(map != null) { this.dependencies.putAll(map);} return (A)this; - } - public A removeFromDependencies(String key) { - if(this.dependencies == null) { return (A) this; } - if(key != null && this.dependencies != null) {this.dependencies.remove(key);} return (A)this; - } - public A removeFromDependencies(Map map) { - if(this.dependencies == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.dependencies != null){this.dependencies.remove(key);}}} return (A)this; - } - public Map getDependencies() { - return this.dependencies; - } - public A withDependencies(Map dependencies) { - if (dependencies == null) { this.dependencies = null;} else {this.dependencies = new LinkedHashMap(dependencies);} return (A) this; - } - public Boolean hasDependencies() { - return this.dependencies != null; - } - public String getDescription() { - return this.description; - } - public A withDescription(String description) { - this.description=description; return (A) this; - } - public Boolean hasDescription() { - return this.description != null; - } - public A addToEnum(int index,Object item) { - if (this._enum == null) {this._enum = new ArrayList();} - this._enum.add(index, item); - return (A)this; - } - public A setToEnum(int index,Object item) { - if (this._enum == null) {this._enum = new ArrayList();} - this._enum.set(index, item); return (A)this; - } - public A addToEnum(java.lang.Object... items) { - if (this._enum == null) {this._enum = new ArrayList();} - for (Object item : items) {this._enum.add(item);} return (A)this; - } - public A addAllToEnum(Collection items) { - if (this._enum == null) {this._enum = new ArrayList();} - for (Object item : items) {this._enum.add(item);} return (A)this; - } - public A removeFromEnum(java.lang.Object... items) { - for (Object item : items) {if (this._enum!= null){ this._enum.remove(item);}} return (A)this; - } - public A removeAllFromEnum(Collection items) { - for (Object item : items) {if (this._enum!= null){ this._enum.remove(item);}} return (A)this; - } - public List getEnum() { - return this._enum; - } - public Object getEnum(int index) { - return this._enum.get(index); - } - public Object getFirstEnum() { - return this._enum.get(0); - } - public Object getLastEnum() { - return this._enum.get(_enum.size() - 1); - } - public Object getMatchingEnum(Predicate predicate) { - for (Object item: _enum) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingEnum(Predicate predicate) { - for (Object item: _enum) { if(predicate.test(item)){ return true;} } return false; - } - public A withEnum(List _enum) { - if (_enum != null) {this._enum = new ArrayList(); for (Object item : _enum){this.addToEnum(item);}} else { this._enum = null;} return (A) this; - } - public A withEnum(java.lang.Object... _enum) { - if (this._enum != null) {this._enum.clear(); _visitables.remove("_enum"); } - if (_enum != null) {for (Object item :_enum){ this.addToEnum(item);}} return (A) this; - } - public Boolean hasEnum() { - return _enum != null && !_enum.isEmpty(); - } - public Object getExample() { - return this.example; - } - public A withExample(Object example) { - this.example=example; return (A) this; - } - public Boolean hasExample() { - return this.example != null; - } - public Boolean getExclusiveMaximum() { - return this.exclusiveMaximum; - } - public A withExclusiveMaximum(Boolean exclusiveMaximum) { - this.exclusiveMaximum=exclusiveMaximum; return (A) this; - } - public Boolean hasExclusiveMaximum() { - return this.exclusiveMaximum != null; - } - public Boolean getExclusiveMinimum() { - return this.exclusiveMinimum; - } - public A withExclusiveMinimum(Boolean exclusiveMinimum) { - this.exclusiveMinimum=exclusiveMinimum; return (A) this; - } - public Boolean hasExclusiveMinimum() { - return this.exclusiveMinimum != null; - } - - /** - * This method has been deprecated, please use method buildExternalDocs instead. - * @return The buildable object. - */ - @Deprecated - public V1ExternalDocumentation getExternalDocs() { - return this.externalDocs!=null ?this.externalDocs.build():null; - } - public V1ExternalDocumentation buildExternalDocs() { - return this.externalDocs!=null ?this.externalDocs.build():null; - } - public A withExternalDocs(V1ExternalDocumentation externalDocs) { - _visitables.get("externalDocs").remove(this.externalDocs); - if (externalDocs!=null){ this.externalDocs= new V1ExternalDocumentationBuilder(externalDocs); _visitables.get("externalDocs").add(this.externalDocs);} else { this.externalDocs = null; _visitables.get("externalDocs").remove(this.externalDocs); } return (A) this; - } - public Boolean hasExternalDocs() { - return this.externalDocs != null; - } - public V1JSONSchemaPropsFluentImpl.ExternalDocsNested withNewExternalDocs() { - return new V1JSONSchemaPropsFluentImpl.ExternalDocsNestedImpl(); - } - public V1JSONSchemaPropsFluentImpl.ExternalDocsNested withNewExternalDocsLike(V1ExternalDocumentation item) { - return new V1JSONSchemaPropsFluentImpl.ExternalDocsNestedImpl(item); - } - public V1JSONSchemaPropsFluentImpl.ExternalDocsNested editExternalDocs() { - return withNewExternalDocsLike(getExternalDocs()); - } - public V1JSONSchemaPropsFluentImpl.ExternalDocsNested editOrNewExternalDocs() { - return withNewExternalDocsLike(getExternalDocs() != null ? getExternalDocs(): new V1ExternalDocumentationBuilder().build()); - } - public V1JSONSchemaPropsFluentImpl.ExternalDocsNested editOrNewExternalDocsLike(V1ExternalDocumentation item) { - return withNewExternalDocsLike(getExternalDocs() != null ? getExternalDocs(): item); - } - public String getFormat() { - return this.format; - } - public A withFormat(String format) { - this.format=format; return (A) this; - } - public Boolean hasFormat() { - return this.format != null; - } - public String getId() { - return this.id; - } - public A withId(String id) { - this.id=id; return (A) this; - } - public Boolean hasId() { - return this.id != null; - } - public Object getItems() { - return this.items; - } - public A withItems(Object items) { - this.items=items; return (A) this; - } - public Boolean hasItems() { - return this.items != null; - } - public Long getMaxItems() { - return this.maxItems; - } - public A withMaxItems(Long maxItems) { - this.maxItems=maxItems; return (A) this; - } - public Boolean hasMaxItems() { - return this.maxItems != null; - } - public Long getMaxLength() { - return this.maxLength; - } - public A withMaxLength(Long maxLength) { - this.maxLength=maxLength; return (A) this; - } - public Boolean hasMaxLength() { - return this.maxLength != null; - } - public Long getMaxProperties() { - return this.maxProperties; - } - public A withMaxProperties(Long maxProperties) { - this.maxProperties=maxProperties; return (A) this; - } - public Boolean hasMaxProperties() { - return this.maxProperties != null; - } - public Double getMaximum() { - return this.maximum; - } - public A withMaximum(Double maximum) { - this.maximum=maximum; return (A) this; - } - public Boolean hasMaximum() { - return this.maximum != null; - } - public Long getMinItems() { - return this.minItems; - } - public A withMinItems(Long minItems) { - this.minItems=minItems; return (A) this; - } - public Boolean hasMinItems() { - return this.minItems != null; - } - public Long getMinLength() { - return this.minLength; - } - public A withMinLength(Long minLength) { - this.minLength=minLength; return (A) this; - } - public Boolean hasMinLength() { - return this.minLength != null; - } - public Long getMinProperties() { - return this.minProperties; - } - public A withMinProperties(Long minProperties) { - this.minProperties=minProperties; return (A) this; - } - public Boolean hasMinProperties() { - return this.minProperties != null; - } - public Double getMinimum() { - return this.minimum; - } - public A withMinimum(Double minimum) { - this.minimum=minimum; return (A) this; - } - public Boolean hasMinimum() { - return this.minimum != null; - } - public Double getMultipleOf() { - return this.multipleOf; - } - public A withMultipleOf(Double multipleOf) { - this.multipleOf=multipleOf; return (A) this; - } - public Boolean hasMultipleOf() { - return this.multipleOf != null; - } - - /** - * This method has been deprecated, please use method buildNot instead. - * @return The buildable object. - */ - @Deprecated - public V1JSONSchemaProps getNot() { - return this.not!=null ?this.not.build():null; - } - public V1JSONSchemaProps buildNot() { - return this.not!=null ?this.not.build():null; - } - public A withNot(V1JSONSchemaProps not) { - _visitables.get("not").remove(this.not); - if (not!=null){ this.not= new V1JSONSchemaPropsBuilder(not); _visitables.get("not").add(this.not);} else { this.not = null; _visitables.get("not").remove(this.not); } return (A) this; - } - public Boolean hasNot() { - return this.not != null; - } - public V1JSONSchemaPropsFluentImpl.NotNested withNewNot() { - return new V1JSONSchemaPropsFluentImpl.NotNestedImpl(); - } - public V1JSONSchemaPropsFluentImpl.NotNested withNewNotLike(V1JSONSchemaProps item) { - return new V1JSONSchemaPropsFluentImpl.NotNestedImpl(item); - } - public V1JSONSchemaPropsFluentImpl.NotNested editNot() { - return withNewNotLike(getNot()); - } - public V1JSONSchemaPropsFluentImpl.NotNested editOrNewNot() { - return withNewNotLike(getNot() != null ? getNot(): new V1JSONSchemaPropsBuilder().build()); - } - public V1JSONSchemaPropsFluentImpl.NotNested editOrNewNotLike(V1JSONSchemaProps item) { - return withNewNotLike(getNot() != null ? getNot(): item); - } - public Boolean getNullable() { - return this.nullable; - } - public A withNullable(Boolean nullable) { - this.nullable=nullable; return (A) this; - } - public Boolean hasNullable() { - return this.nullable != null; - } - public A addToOneOf(int index,V1JSONSchemaProps item) { - if (this.oneOf == null) {this.oneOf = new ArrayList();} - V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); - if (index < 0 || index >= oneOf.size()) { _visitables.get("oneOf").add(builder); oneOf.add(builder); } else { _visitables.get("oneOf").add(index, builder); oneOf.add(index, builder);} - return (A)this; - } - public A setToOneOf(int index,V1JSONSchemaProps item) { - if (this.oneOf == null) {this.oneOf = new ArrayList();} - V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item); - if (index < 0 || index >= oneOf.size()) { _visitables.get("oneOf").add(builder); oneOf.add(builder); } else { _visitables.get("oneOf").set(index, builder); oneOf.set(index, builder);} - return (A)this; - } - public A addToOneOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { - if (this.oneOf == null) {this.oneOf = new ArrayList();} - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("oneOf").add(builder);this.oneOf.add(builder);} return (A)this; - } - public A addAllToOneOf(Collection items) { - if (this.oneOf == null) {this.oneOf = new ArrayList();} - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("oneOf").add(builder);this.oneOf.add(builder);} return (A)this; - } - public A removeFromOneOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... items) { - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("oneOf").remove(builder);if (this.oneOf != null) {this.oneOf.remove(builder);}} return (A)this; - } - public A removeAllFromOneOf(Collection items) { - for (V1JSONSchemaProps item : items) {V1JSONSchemaPropsBuilder builder = new V1JSONSchemaPropsBuilder(item);_visitables.get("oneOf").remove(builder);if (this.oneOf != null) {this.oneOf.remove(builder);}} return (A)this; - } - public A removeMatchingFromOneOf(Predicate predicate) { - if (oneOf == null) return (A) this; - final Iterator each = oneOf.iterator(); - final List visitables = _visitables.get("oneOf"); - while (each.hasNext()) { - V1JSONSchemaPropsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildOneOf instead. - * @return The buildable object. - */ - @Deprecated - public List getOneOf() { - return oneOf != null ? build(oneOf) : null; - } - public List buildOneOf() { - return oneOf != null ? build(oneOf) : null; - } - public V1JSONSchemaProps buildOneOf(int index) { - return this.oneOf.get(index).build(); - } - public V1JSONSchemaProps buildFirstOneOf() { - return this.oneOf.get(0).build(); - } - public V1JSONSchemaProps buildLastOneOf() { - return this.oneOf.get(oneOf.size() - 1).build(); - } - public V1JSONSchemaProps buildMatchingOneOf(Predicate predicate) { - for (V1JSONSchemaPropsBuilder item: oneOf) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingOneOf(Predicate predicate) { - for (V1JSONSchemaPropsBuilder item: oneOf) { if(predicate.test(item)){ return true;} } return false; - } - public A withOneOf(List oneOf) { - if (this.oneOf != null) { _visitables.get("oneOf").clear();} - if (oneOf != null) {this.oneOf = new ArrayList(); for (V1JSONSchemaProps item : oneOf){this.addToOneOf(item);}} else { this.oneOf = null;} return (A) this; - } - public A withOneOf(io.kubernetes.client.openapi.models.V1JSONSchemaProps... oneOf) { - if (this.oneOf != null) {this.oneOf.clear(); _visitables.remove("oneOf"); } - if (oneOf != null) {for (V1JSONSchemaProps item :oneOf){ this.addToOneOf(item);}} return (A) this; - } - public Boolean hasOneOf() { - return oneOf != null && !oneOf.isEmpty(); - } - public V1JSONSchemaPropsFluentImpl.OneOfNested addNewOneOf() { - return new V1JSONSchemaPropsFluentImpl.OneOfNestedImpl(); - } - public V1JSONSchemaPropsFluentImpl.OneOfNested addNewOneOfLike(V1JSONSchemaProps item) { - return new V1JSONSchemaPropsFluentImpl.OneOfNestedImpl(-1, item); - } - public V1JSONSchemaPropsFluentImpl.OneOfNested setNewOneOfLike(int index,V1JSONSchemaProps item) { - return new V1JSONSchemaPropsFluentImpl.OneOfNestedImpl(index, item); - } - public V1JSONSchemaPropsFluentImpl.OneOfNested editOneOf(int index) { - if (oneOf.size() <= index) throw new RuntimeException("Can't edit oneOf. Index exceeds size."); - return setNewOneOfLike(index, buildOneOf(index)); - } - public V1JSONSchemaPropsFluentImpl.OneOfNested editFirstOneOf() { - if (oneOf.size() == 0) throw new RuntimeException("Can't edit first oneOf. The list is empty."); - return setNewOneOfLike(0, buildOneOf(0)); - } - public V1JSONSchemaPropsFluentImpl.OneOfNested editLastOneOf() { - int index = oneOf.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last oneOf. The list is empty."); - return setNewOneOfLike(index, buildOneOf(index)); - } - public V1JSONSchemaPropsFluentImpl.OneOfNested editMatchingOneOf(Predicate predicate) { - int index = -1; - for (int i=0;i map) { - if(this.patternProperties == null && map != null) { this.patternProperties = new LinkedHashMap(); } - if(map != null) { this.patternProperties.putAll(map);} return (A)this; - } - public A removeFromPatternProperties(String key) { - if(this.patternProperties == null) { return (A) this; } - if(key != null && this.patternProperties != null) {this.patternProperties.remove(key);} return (A)this; - } - public A removeFromPatternProperties(Map map) { - if(this.patternProperties == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.patternProperties != null){this.patternProperties.remove(key);}}} return (A)this; - } - public Map getPatternProperties() { - return this.patternProperties; - } - public A withPatternProperties(Map patternProperties) { - if (patternProperties == null) { this.patternProperties = null;} else {this.patternProperties = new LinkedHashMap(patternProperties);} return (A) this; - } - public Boolean hasPatternProperties() { - return this.patternProperties != null; - } - public A addToProperties(String key,V1JSONSchemaProps value) { - if(this.properties == null && key != null && value != null) { this.properties = new LinkedHashMap(); } - if(key != null && value != null) {this.properties.put(key, value);} return (A)this; - } - public A addToProperties(Map map) { - if(this.properties == null && map != null) { this.properties = new LinkedHashMap(); } - if(map != null) { this.properties.putAll(map);} return (A)this; - } - public A removeFromProperties(String key) { - if(this.properties == null) { return (A) this; } - if(key != null && this.properties != null) {this.properties.remove(key);} return (A)this; - } - public A removeFromProperties(Map map) { - if(this.properties == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.properties != null){this.properties.remove(key);}}} return (A)this; - } - public Map getProperties() { - return this.properties; - } - public A withProperties(Map properties) { - if (properties == null) { this.properties = null;} else {this.properties = new LinkedHashMap(properties);} return (A) this; - } - public Boolean hasProperties() { - return this.properties != null; - } - public A addToRequired(int index,String item) { - if (this.required == null) {this.required = new ArrayList();} - this.required.add(index, item); - return (A)this; - } - public A setToRequired(int index,String item) { - if (this.required == null) {this.required = new ArrayList();} - this.required.set(index, item); return (A)this; - } - public A addToRequired(java.lang.String... items) { - if (this.required == null) {this.required = new ArrayList();} - for (String item : items) {this.required.add(item);} return (A)this; - } - public A addAllToRequired(Collection items) { - if (this.required == null) {this.required = new ArrayList();} - for (String item : items) {this.required.add(item);} return (A)this; - } - public A removeFromRequired(java.lang.String... items) { - for (String item : items) {if (this.required!= null){ this.required.remove(item);}} return (A)this; - } - public A removeAllFromRequired(Collection items) { - for (String item : items) {if (this.required!= null){ this.required.remove(item);}} return (A)this; - } - public List getRequired() { - return this.required; - } - public String getRequired(int index) { - return this.required.get(index); - } - public String getFirstRequired() { - return this.required.get(0); - } - public String getLastRequired() { - return this.required.get(required.size() - 1); - } - public String getMatchingRequired(Predicate predicate) { - for (String item: required) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingRequired(Predicate predicate) { - for (String item: required) { if(predicate.test(item)){ return true;} } return false; - } - public A withRequired(List required) { - if (required != null) {this.required = new ArrayList(); for (String item : required){this.addToRequired(item);}} else { this.required = null;} return (A) this; - } - public A withRequired(java.lang.String... required) { - if (this.required != null) {this.required.clear(); _visitables.remove("required"); } - if (required != null) {for (String item :required){ this.addToRequired(item);}} return (A) this; - } - public Boolean hasRequired() { - return required != null && !required.isEmpty(); - } - public String getTitle() { - return this.title; - } - public A withTitle(String title) { - this.title=title; return (A) this; - } - public Boolean hasTitle() { - return this.title != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public Boolean getUniqueItems() { - return this.uniqueItems; - } - public A withUniqueItems(Boolean uniqueItems) { - this.uniqueItems=uniqueItems; return (A) this; - } - public Boolean hasUniqueItems() { - return this.uniqueItems != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1JSONSchemaPropsFluentImpl that = (V1JSONSchemaPropsFluentImpl) o; - if (!java.util.Objects.equals($ref, that.$ref)) return false; - - if (!java.util.Objects.equals($schema, that.$schema)) return false; - - if (!java.util.Objects.equals(additionalItems, that.additionalItems)) return false; - - if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false; - - if (!java.util.Objects.equals(allOf, that.allOf)) return false; - - if (!java.util.Objects.equals(anyOf, that.anyOf)) return false; - - if (!java.util.Objects.equals(_default, that._default)) return false; - - if (!java.util.Objects.equals(definitions, that.definitions)) return false; - - if (!java.util.Objects.equals(dependencies, that.dependencies)) return false; - - if (!java.util.Objects.equals(description, that.description)) return false; - - if (!java.util.Objects.equals(_enum, that._enum)) return false; - - if (!java.util.Objects.equals(example, that.example)) return false; - - if (!java.util.Objects.equals(exclusiveMaximum, that.exclusiveMaximum)) return false; - - if (!java.util.Objects.equals(exclusiveMinimum, that.exclusiveMinimum)) return false; - - if (!java.util.Objects.equals(externalDocs, that.externalDocs)) return false; - - if (!java.util.Objects.equals(format, that.format)) return false; - - if (!java.util.Objects.equals(id, that.id)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(maxItems, that.maxItems)) return false; - - if (!java.util.Objects.equals(maxLength, that.maxLength)) return false; - - if (!java.util.Objects.equals(maxProperties, that.maxProperties)) return false; - - if (!java.util.Objects.equals(maximum, that.maximum)) return false; - - if (!java.util.Objects.equals(minItems, that.minItems)) return false; - - if (!java.util.Objects.equals(minLength, that.minLength)) return false; - - if (!java.util.Objects.equals(minProperties, that.minProperties)) return false; - - if (!java.util.Objects.equals(minimum, that.minimum)) return false; - - if (!java.util.Objects.equals(multipleOf, that.multipleOf)) return false; - - if (!java.util.Objects.equals(not, that.not)) return false; - - if (!java.util.Objects.equals(nullable, that.nullable)) return false; - - if (!java.util.Objects.equals(oneOf, that.oneOf)) return false; - - if (!java.util.Objects.equals(pattern, that.pattern)) return false; - - if (!java.util.Objects.equals(patternProperties, that.patternProperties)) return false; - - if (!java.util.Objects.equals(properties, that.properties)) return false; - - if (!java.util.Objects.equals(required, that.required)) return false; - - if (!java.util.Objects.equals(title, that.title)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - if (!java.util.Objects.equals(uniqueItems, that.uniqueItems)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash($ref, $schema, additionalItems, additionalProperties, allOf, anyOf, _default, definitions, dependencies, description, _enum, example, exclusiveMaximum, exclusiveMinimum, externalDocs, format, id, items, maxItems, maxLength, maxProperties, maximum, minItems, minLength, minProperties, minimum, multipleOf, not, nullable, oneOf, pattern, patternProperties, properties, required, title, type, uniqueItems, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if ($ref != null) { sb.append("$ref:"); sb.append($ref + ","); } - if ($schema != null) { sb.append("$schema:"); sb.append($schema + ","); } - if (additionalItems != null) { sb.append("additionalItems:"); sb.append(additionalItems + ","); } - if (additionalProperties != null) { sb.append("additionalProperties:"); sb.append(additionalProperties + ","); } - if (allOf != null) { sb.append("allOf:"); sb.append(allOf + ","); } - if (anyOf != null) { sb.append("anyOf:"); sb.append(anyOf + ","); } - if (_default != null) { sb.append("_default:"); sb.append(_default + ","); } - if (definitions != null && !definitions.isEmpty()) { sb.append("definitions:"); sb.append(definitions + ","); } - if (dependencies != null && !dependencies.isEmpty()) { sb.append("dependencies:"); sb.append(dependencies + ","); } - if (description != null) { sb.append("description:"); sb.append(description + ","); } - if (_enum != null && !_enum.isEmpty()) { sb.append("_enum:"); sb.append(_enum + ","); } - if (example != null) { sb.append("example:"); sb.append(example + ","); } - if (exclusiveMaximum != null) { sb.append("exclusiveMaximum:"); sb.append(exclusiveMaximum + ","); } - if (exclusiveMinimum != null) { sb.append("exclusiveMinimum:"); sb.append(exclusiveMinimum + ","); } - if (externalDocs != null) { sb.append("externalDocs:"); sb.append(externalDocs + ","); } - if (format != null) { sb.append("format:"); sb.append(format + ","); } - if (id != null) { sb.append("id:"); sb.append(id + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (maxItems != null) { sb.append("maxItems:"); sb.append(maxItems + ","); } - if (maxLength != null) { sb.append("maxLength:"); sb.append(maxLength + ","); } - if (maxProperties != null) { sb.append("maxProperties:"); sb.append(maxProperties + ","); } - if (maximum != null) { sb.append("maximum:"); sb.append(maximum + ","); } - if (minItems != null) { sb.append("minItems:"); sb.append(minItems + ","); } - if (minLength != null) { sb.append("minLength:"); sb.append(minLength + ","); } - if (minProperties != null) { sb.append("minProperties:"); sb.append(minProperties + ","); } - if (minimum != null) { sb.append("minimum:"); sb.append(minimum + ","); } - if (multipleOf != null) { sb.append("multipleOf:"); sb.append(multipleOf + ","); } - if (not != null) { sb.append("not:"); sb.append(not + ","); } - if (nullable != null) { sb.append("nullable:"); sb.append(nullable + ","); } - if (oneOf != null) { sb.append("oneOf:"); sb.append(oneOf + ","); } - if (pattern != null) { sb.append("pattern:"); sb.append(pattern + ","); } - if (patternProperties != null && !patternProperties.isEmpty()) { sb.append("patternProperties:"); sb.append(patternProperties + ","); } - if (properties != null && !properties.isEmpty()) { sb.append("properties:"); sb.append(properties + ","); } - if (required != null && !required.isEmpty()) { sb.append("required:"); sb.append(required + ","); } - if (title != null) { sb.append("title:"); sb.append(title + ","); } - if (type != null) { sb.append("type:"); sb.append(type + ","); } - if (uniqueItems != null) { sb.append("uniqueItems:"); sb.append(uniqueItems); } - sb.append("}"); - return sb.toString(); - } - public A withExclusiveMaximum() { - return withExclusiveMaximum(true); - } - public A withExclusiveMinimum() { - return withExclusiveMinimum(true); - } - public A withNullable() { - return withNullable(true); - } - public A withUniqueItems() { - return withUniqueItems(true); - } - class AllOfNestedImpl extends V1JSONSchemaPropsFluentImpl> implements V1JSONSchemaPropsFluentImpl.AllOfNested,Nested{ - AllOfNestedImpl(int index,V1JSONSchemaProps item) { - this.index = index; - this.builder = new V1JSONSchemaPropsBuilder(this, item); - } - AllOfNestedImpl() { - this.index = -1; - this.builder = new V1JSONSchemaPropsBuilder(this); - } - V1JSONSchemaPropsBuilder builder; - int index; - public N and() { - return (N) V1JSONSchemaPropsFluentImpl.this.setToAllOf(index,builder.build()); - } - public N endAllOf() { - return and(); - } - - } - class AnyOfNestedImpl extends V1JSONSchemaPropsFluentImpl> implements V1JSONSchemaPropsFluentImpl.AnyOfNested,Nested{ - AnyOfNestedImpl(int index,V1JSONSchemaProps item) { - this.index = index; - this.builder = new V1JSONSchemaPropsBuilder(this, item); - } - AnyOfNestedImpl() { - this.index = -1; - this.builder = new V1JSONSchemaPropsBuilder(this); - } - V1JSONSchemaPropsBuilder builder; - int index; - public N and() { - return (N) V1JSONSchemaPropsFluentImpl.this.setToAnyOf(index,builder.build()); - } - public N endAnyOf() { - return and(); - } - - } - class ExternalDocsNestedImpl extends V1ExternalDocumentationFluentImpl> implements V1JSONSchemaPropsFluentImpl.ExternalDocsNested,Nested{ - ExternalDocsNestedImpl(V1ExternalDocumentation item) { - this.builder = new V1ExternalDocumentationBuilder(this, item); - } - ExternalDocsNestedImpl() { - this.builder = new V1ExternalDocumentationBuilder(this); - } - V1ExternalDocumentationBuilder builder; - public N and() { - return (N) V1JSONSchemaPropsFluentImpl.this.withExternalDocs(builder.build()); - } - public N endExternalDocs() { - return and(); - } - - } - class NotNestedImpl extends V1JSONSchemaPropsFluentImpl> implements V1JSONSchemaPropsFluentImpl.NotNested,Nested{ - NotNestedImpl(V1JSONSchemaProps item) { - this.builder = new V1JSONSchemaPropsBuilder(this, item); - } - NotNestedImpl() { - this.builder = new V1JSONSchemaPropsBuilder(this); - } - V1JSONSchemaPropsBuilder builder; - public N and() { - return (N) V1JSONSchemaPropsFluentImpl.this.withNot(builder.build()); - } - public N endNot() { - return and(); - } - - } - class OneOfNestedImpl extends V1JSONSchemaPropsFluentImpl> implements V1JSONSchemaPropsFluentImpl.OneOfNested,Nested{ - OneOfNestedImpl(int index,V1JSONSchemaProps item) { - this.index = index; - this.builder = new V1JSONSchemaPropsBuilder(this, item); - } - OneOfNestedImpl() { - this.index = -1; - this.builder = new V1JSONSchemaPropsBuilder(this); - } - V1JSONSchemaPropsBuilder builder; - int index; - public N and() { - return (N) V1JSONSchemaPropsFluentImpl.this.setToOneOf(index,builder.build()); - } - public N endOneOf() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobBuilder.java index 3f7bcd1ada..9f28e66523 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1JobBuilder extends V1JobFluentImpl implements VisitableBuilder{ +public class V1JobBuilder extends V1JobFluent implements VisitableBuilder{ public V1JobBuilder() { - this(false); - } - public V1JobBuilder(Boolean validationEnabled) { - this(new V1Job(), validationEnabled); + this(new V1Job()); } + public V1JobBuilder(V1JobFluent fluent) { - this(fluent, false); - } - public V1JobBuilder(V1JobFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Job(), validationEnabled); + this(fluent, new V1Job()); } + public V1JobBuilder(V1JobFluent fluent,V1Job instance) { - this(fluent, instance, false); - } - public V1JobBuilder(V1JobFluent fluent,V1Job instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1JobBuilder(V1Job instance) { - this(instance,false); - } - public V1JobBuilder(V1Job instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1JobFluent fluent; - Boolean validationEnabled; + public V1Job build() { V1Job buildable = new V1Job(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionBuilder.java index db793e670b..342d18e5ce 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1JobConditionBuilder extends V1JobConditionFluentImpl implements VisitableBuilder{ +public class V1JobConditionBuilder extends V1JobConditionFluent implements VisitableBuilder{ public V1JobConditionBuilder() { - this(false); - } - public V1JobConditionBuilder(Boolean validationEnabled) { - this(new V1JobCondition(), validationEnabled); + this(new V1JobCondition()); } + public V1JobConditionBuilder(V1JobConditionFluent fluent) { - this(fluent, false); - } - public V1JobConditionBuilder(V1JobConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1JobCondition(), validationEnabled); + this(fluent, new V1JobCondition()); } + public V1JobConditionBuilder(V1JobConditionFluent fluent,V1JobCondition instance) { - this(fluent, instance, false); - } - public V1JobConditionBuilder(V1JobConditionFluent fluent,V1JobCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastProbeTime(instance.getLastProbeTime()); - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1JobConditionBuilder(V1JobCondition instance) { - this(instance,false); - } - public V1JobConditionBuilder(V1JobCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastProbeTime(instance.getLastProbeTime()); - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1JobConditionFluent fluent; - Boolean validationEnabled; + public V1JobCondition build() { V1JobCondition buildable = new V1JobCondition(); buildable.setLastProbeTime(fluent.getLastProbeTime()); @@ -58,4 +32,5 @@ public V1JobCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionFluent.java index e1e10120d9..bc6a2bce06 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionFluent.java @@ -1,32 +1,149 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1JobConditionFluent> extends Fluent{ - public OffsetDateTime getLastProbeTime(); - public A withLastProbeTime(OffsetDateTime lastProbeTime); - public Boolean hasLastProbeTime(); - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1JobConditionFluent> extends BaseFluent{ + public V1JobConditionFluent() { + } + public V1JobConditionFluent(V1JobCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastProbeTime; + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1JobCondition instance) { + instance = (instance != null ? instance : new V1JobCondition()); + if (instance != null) { + this.withLastProbeTime(instance.getLastProbeTime()); + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastProbeTime() { + return this.lastProbeTime; + } + + public A withLastProbeTime(OffsetDateTime lastProbeTime) { + this.lastProbeTime = lastProbeTime; + return (A) this; + } + + public boolean hasLastProbeTime() { + return this.lastProbeTime != null; + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1JobConditionFluent that = (V1JobConditionFluent) o; + if (!java.util.Objects.equals(lastProbeTime, that.lastProbeTime)) return false; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastProbeTime, lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastProbeTime != null) { sb.append("lastProbeTime:"); sb.append(lastProbeTime + ","); } + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionFluentImpl.java deleted file mode 100644 index 32ea806e84..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobConditionFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1JobConditionFluentImpl> extends BaseFluent implements V1JobConditionFluent{ - public V1JobConditionFluentImpl() { - } - public V1JobConditionFluentImpl(V1JobCondition instance) { - if (instance != null) { - this.withLastProbeTime(instance.getLastProbeTime()); - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastProbeTime; - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastProbeTime() { - return this.lastProbeTime; - } - public A withLastProbeTime(OffsetDateTime lastProbeTime) { - this.lastProbeTime=lastProbeTime; return (A) this; - } - public Boolean hasLastProbeTime() { - return this.lastProbeTime != null; - } - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1JobConditionFluentImpl that = (V1JobConditionFluentImpl) o; - if (!java.util.Objects.equals(lastProbeTime, that.lastProbeTime)) return false; - - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastProbeTime, lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastProbeTime != null) { sb.append("lastProbeTime:"); sb.append(lastProbeTime + ","); } - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobFluent.java index 3c4dede753..0dfa658f3a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1JobFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1JobFluent.MetadataNested withNewMetadata(); - public V1JobFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1JobFluent.MetadataNested editMetadata(); - public V1JobFluent.MetadataNested editOrNewMetadata(); - public V1JobFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1JobSpec getSpec(); - public V1JobSpec buildSpec(); - public A withSpec(V1JobSpec spec); - public Boolean hasSpec(); - public V1JobFluent.SpecNested withNewSpec(); - public V1JobFluent.SpecNested withNewSpecLike(V1JobSpec item); - public V1JobFluent.SpecNested editSpec(); - public V1JobFluent.SpecNested editOrNewSpec(); - public V1JobFluent.SpecNested editOrNewSpecLike(V1JobSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1JobStatus getStatus(); - public V1JobStatus buildStatus(); - public A withStatus(V1JobStatus status); - public Boolean hasStatus(); - public V1JobFluent.StatusNested withNewStatus(); - public V1JobFluent.StatusNested withNewStatusLike(V1JobStatus item); - public V1JobFluent.StatusNested editStatus(); - public V1JobFluent.StatusNested editOrNewStatus(); - public V1JobFluent.StatusNested editOrNewStatusLike(V1JobStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1JobFluent> extends BaseFluent{ + public V1JobFluent() { + } + + public V1JobFluent(V1Job instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1JobSpecBuilder spec; + private V1JobStatusBuilder status; + + protected void copyInstance(V1Job instance) { + instance = (instance != null ? instance : new V1Job()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1JobSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1JobSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1JobSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1JobSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1JobSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1JobSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1JobSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1JobStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1JobStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1JobStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1JobStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1JobStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1JobStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1JobFluent that = (V1JobFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1JobFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1JobStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1JobSpecFluent> implements Nested{ + SpecNested(V1JobSpec item) { + this.builder = new V1JobSpecBuilder(this, item); + } + V1JobSpecBuilder builder; + + public N and() { + return (N) V1JobFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1JobStatusFluent> implements Nested{ + StatusNested(V1JobStatus item) { + this.builder = new V1JobStatusBuilder(this, item); + } + V1JobStatusBuilder builder; + + public N and() { + return (N) V1JobFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobFluentImpl.java deleted file mode 100644 index 8f4bb47433..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1JobFluentImpl> extends BaseFluent implements V1JobFluent{ - public V1JobFluentImpl() { - } - public V1JobFluentImpl(V1Job instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1JobSpecBuilder spec; - private V1JobStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1JobFluentImpl.MetadataNested withNewMetadata() { - return new V1JobFluentImpl.MetadataNestedImpl(); - } - public V1JobFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1JobFluentImpl.MetadataNestedImpl(item); - } - public V1JobFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1JobFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1JobFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1JobSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1JobSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1JobSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1JobSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1JobFluentImpl.SpecNested withNewSpec() { - return new V1JobFluentImpl.SpecNestedImpl(); - } - public V1JobFluentImpl.SpecNested withNewSpecLike(V1JobSpec item) { - return new V1JobFluentImpl.SpecNestedImpl(item); - } - public V1JobFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1JobFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1JobSpecBuilder().build()); - } - public V1JobFluentImpl.SpecNested editOrNewSpecLike(V1JobSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1JobStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1JobStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1JobStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1JobStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1JobFluentImpl.StatusNested withNewStatus() { - return new V1JobFluentImpl.StatusNestedImpl(); - } - public V1JobFluentImpl.StatusNested withNewStatusLike(V1JobStatus item) { - return new V1JobFluentImpl.StatusNestedImpl(item); - } - public V1JobFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1JobFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1JobStatusBuilder().build()); - } - public V1JobFluentImpl.StatusNested editOrNewStatusLike(V1JobStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1JobFluentImpl that = (V1JobFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1JobFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1JobFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1JobSpecFluentImpl> implements V1JobFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1JobSpec item) { - this.builder = new V1JobSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1JobSpecBuilder(this); - } - V1JobSpecBuilder builder; - public N and() { - return (N) V1JobFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1JobStatusFluentImpl> implements V1JobFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1JobStatus item) { - this.builder = new V1JobStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1JobStatusBuilder(this); - } - V1JobStatusBuilder builder; - public N and() { - return (N) V1JobFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListBuilder.java index cee42eb725..d91ce78a19 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1JobListBuilder extends V1JobListFluentImpl implements VisitableBuilder{ +public class V1JobListBuilder extends V1JobListFluent implements VisitableBuilder{ public V1JobListBuilder() { - this(false); - } - public V1JobListBuilder(Boolean validationEnabled) { - this(new V1JobList(), validationEnabled); + this(new V1JobList()); } + public V1JobListBuilder(V1JobListFluent fluent) { - this(fluent, false); - } - public V1JobListBuilder(V1JobListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1JobList(), validationEnabled); + this(fluent, new V1JobList()); } + public V1JobListBuilder(V1JobListFluent fluent,V1JobList instance) { - this(fluent, instance, false); - } - public V1JobListBuilder(V1JobListFluent fluent,V1JobList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1JobListBuilder(V1JobList instance) { - this(instance,false); - } - public V1JobListBuilder(V1JobList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1JobListFluent fluent; - Boolean validationEnabled; + public V1JobList build() { V1JobList buildable = new V1JobList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListFluent.java index f5aa82c749..68dd859754 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1JobListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Job item); - public A setToItems(int index,V1Job item); - public A addToItems(io.kubernetes.client.openapi.models.V1Job... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Job... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Job buildItem(int index); - public V1Job buildFirstItem(); - public V1Job buildLastItem(); - public V1Job buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Job... items); - public Boolean hasItems(); - public V1JobListFluent.ItemsNested addNewItem(); - public V1JobListFluent.ItemsNested addNewItemLike(V1Job item); - public V1JobListFluent.ItemsNested setNewItemLike(int index,V1Job item); - public V1JobListFluent.ItemsNested editItem(int index); - public V1JobListFluent.ItemsNested editFirstItem(); - public V1JobListFluent.ItemsNested editLastItem(); - public V1JobListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1JobListFluent.MetadataNested withNewMetadata(); - public V1JobListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1JobListFluent.MetadataNested editMetadata(); - public V1JobListFluent.MetadataNested editOrNewMetadata(); - public V1JobListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1JobFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1JobListFluent> extends BaseFluent{ + public V1JobListFluent() { + } + + public V1JobListFluent(V1JobList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1JobList instance) { + instance = (instance != null ? instance : new V1JobList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Job item) { + if (this.items == null) {this.items = new ArrayList();} + V1JobBuilder builder = new V1JobBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Job item) { + if (this.items == null) {this.items = new ArrayList();} + V1JobBuilder builder = new V1JobBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Job... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Job item : items) {V1JobBuilder builder = new V1JobBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Job item : items) {V1JobBuilder builder = new V1JobBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Job... items) { + if (this.items == null) return (A)this; + for (V1Job item : items) {V1JobBuilder builder = new V1JobBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Job item : items) {V1JobBuilder builder = new V1JobBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1JobBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Job buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Job buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Job buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Job buildMatchingItem(Predicate predicate) { + for (V1JobBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1JobBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Job item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Job... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Job item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Job item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Job item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1JobListFluent that = (V1JobListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1JobFluent> implements Nested{ + ItemsNested(int index,V1Job item) { + this.index = index; + this.builder = new V1JobBuilder(this, item); + } + V1JobBuilder builder; + int index; + public N and() { + return (N) V1JobListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1JobListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListFluentImpl.java deleted file mode 100644 index 224c32677a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1JobListFluentImpl> extends BaseFluent implements V1JobListFluent{ - public V1JobListFluentImpl() { - } - public V1JobListFluentImpl(V1JobList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Job item) { - if (this.items == null) {this.items = new ArrayList();} - V1JobBuilder builder = new V1JobBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Job item) { - if (this.items == null) {this.items = new ArrayList();} - V1JobBuilder builder = new V1JobBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Job... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Job item : items) {V1JobBuilder builder = new V1JobBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Job item : items) {V1JobBuilder builder = new V1JobBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Job... items) { - for (V1Job item : items) {V1JobBuilder builder = new V1JobBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Job item : items) {V1JobBuilder builder = new V1JobBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1JobBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Job buildItem(int index) { - return this.items.get(index).build(); - } - public V1Job buildFirstItem() { - return this.items.get(0).build(); - } - public V1Job buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Job buildMatchingItem(Predicate predicate) { - for (V1JobBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1JobBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Job item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Job... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Job item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1JobListFluentImpl.ItemsNested addNewItem() { - return new V1JobListFluentImpl.ItemsNestedImpl(); - } - public V1JobListFluentImpl.ItemsNested addNewItemLike(V1Job item) { - return new V1JobListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1JobListFluentImpl.ItemsNested setNewItemLike(int index,V1Job item) { - return new V1JobListFluentImpl.ItemsNestedImpl(index, item); - } - public V1JobListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1JobListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1JobListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1JobListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1JobListFluentImpl.MetadataNestedImpl(); - } - public V1JobListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1JobListFluentImpl.MetadataNestedImpl(item); - } - public V1JobListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1JobListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1JobListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1JobListFluentImpl that = (V1JobListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1JobFluentImpl> implements V1JobListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Job item) { - this.index = index; - this.builder = new V1JobBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1JobBuilder(this); - } - V1JobBuilder builder; - int index; - public N and() { - return (N) V1JobListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1JobListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1JobListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecBuilder.java index db2580589f..5253d67bc8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecBuilder.java @@ -1,76 +1,44 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1JobSpecBuilder extends V1JobSpecFluentImpl implements VisitableBuilder{ +public class V1JobSpecBuilder extends V1JobSpecFluent implements VisitableBuilder{ public V1JobSpecBuilder() { - this(false); - } - public V1JobSpecBuilder(Boolean validationEnabled) { - this(new V1JobSpec(), validationEnabled); + this(new V1JobSpec()); } + public V1JobSpecBuilder(V1JobSpecFluent fluent) { - this(fluent, false); - } - public V1JobSpecBuilder(V1JobSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1JobSpec(), validationEnabled); + this(fluent, new V1JobSpec()); } + public V1JobSpecBuilder(V1JobSpecFluent fluent,V1JobSpec instance) { - this(fluent, instance, false); - } - public V1JobSpecBuilder(V1JobSpecFluent fluent,V1JobSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds()); - fluent.withBackoffLimit(instance.getBackoffLimit()); - fluent.withCompletionMode(instance.getCompletionMode()); - fluent.withCompletions(instance.getCompletions()); - fluent.withManualSelector(instance.getManualSelector()); - fluent.withParallelism(instance.getParallelism()); - fluent.withPodFailurePolicy(instance.getPodFailurePolicy()); - fluent.withSelector(instance.getSelector()); - fluent.withSuspend(instance.getSuspend()); - fluent.withTemplate(instance.getTemplate()); - fluent.withTtlSecondsAfterFinished(instance.getTtlSecondsAfterFinished()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1JobSpecBuilder(V1JobSpec instance) { - this(instance,false); - } - public V1JobSpecBuilder(V1JobSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds()); - this.withBackoffLimit(instance.getBackoffLimit()); - this.withCompletionMode(instance.getCompletionMode()); - this.withCompletions(instance.getCompletions()); - this.withManualSelector(instance.getManualSelector()); - this.withParallelism(instance.getParallelism()); - this.withPodFailurePolicy(instance.getPodFailurePolicy()); - this.withSelector(instance.getSelector()); - this.withSuspend(instance.getSuspend()); - this.withTemplate(instance.getTemplate()); - this.withTtlSecondsAfterFinished(instance.getTtlSecondsAfterFinished()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1JobSpecFluent fluent; - Boolean validationEnabled; + public V1JobSpec build() { V1JobSpec buildable = new V1JobSpec(); buildable.setActiveDeadlineSeconds(fluent.getActiveDeadlineSeconds()); buildable.setBackoffLimit(fluent.getBackoffLimit()); + buildable.setBackoffLimitPerIndex(fluent.getBackoffLimitPerIndex()); buildable.setCompletionMode(fluent.getCompletionMode()); buildable.setCompletions(fluent.getCompletions()); buildable.setManualSelector(fluent.getManualSelector()); + buildable.setMaxFailedIndexes(fluent.getMaxFailedIndexes()); buildable.setParallelism(fluent.getParallelism()); - buildable.setPodFailurePolicy(fluent.getPodFailurePolicy()); - buildable.setSelector(fluent.getSelector()); + buildable.setPodFailurePolicy(fluent.buildPodFailurePolicy()); + buildable.setPodReplacementPolicy(fluent.getPodReplacementPolicy()); + buildable.setSelector(fluent.buildSelector()); buildable.setSuspend(fluent.getSuspend()); - buildable.setTemplate(fluent.getTemplate()); + buildable.setTemplate(fluent.buildTemplate()); buildable.setTtlSecondsAfterFinished(fluent.getTtlSecondsAfterFinished()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecFluent.java index 42b5e7c989..3101894fc4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecFluent.java @@ -1,103 +1,424 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Boolean; import java.lang.Integer; -import java.lang.Deprecated; import java.lang.Long; -import java.lang.Boolean; +import java.lang.Object; - /** - * Generated - */ -public interface V1JobSpecFluent> extends Fluent{ - public Long getActiveDeadlineSeconds(); - public A withActiveDeadlineSeconds(Long activeDeadlineSeconds); - public Boolean hasActiveDeadlineSeconds(); - public Integer getBackoffLimit(); - public A withBackoffLimit(Integer backoffLimit); - public Boolean hasBackoffLimit(); - public String getCompletionMode(); - public A withCompletionMode(String completionMode); - public Boolean hasCompletionMode(); - public Integer getCompletions(); - public A withCompletions(Integer completions); - public Boolean hasCompletions(); - public Boolean getManualSelector(); - public A withManualSelector(Boolean manualSelector); - public Boolean hasManualSelector(); - public Integer getParallelism(); - public A withParallelism(Integer parallelism); - public Boolean hasParallelism(); - - /** - * This method has been deprecated, please use method buildPodFailurePolicy instead. - * @return The buildable object. - */ - @Deprecated - public V1PodFailurePolicy getPodFailurePolicy(); - public V1PodFailurePolicy buildPodFailurePolicy(); - public A withPodFailurePolicy(V1PodFailurePolicy podFailurePolicy); - public Boolean hasPodFailurePolicy(); - public V1JobSpecFluent.PodFailurePolicyNested withNewPodFailurePolicy(); - public V1JobSpecFluent.PodFailurePolicyNested withNewPodFailurePolicyLike(V1PodFailurePolicy item); - public V1JobSpecFluent.PodFailurePolicyNested editPodFailurePolicy(); - public V1JobSpecFluent.PodFailurePolicyNested editOrNewPodFailurePolicy(); - public V1JobSpecFluent.PodFailurePolicyNested editOrNewPodFailurePolicyLike(V1PodFailurePolicy item); - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector(); - public V1LabelSelector buildSelector(); - public A withSelector(V1LabelSelector selector); - public Boolean hasSelector(); - public V1JobSpecFluent.SelectorNested withNewSelector(); - public V1JobSpecFluent.SelectorNested withNewSelectorLike(V1LabelSelector item); - public V1JobSpecFluent.SelectorNested editSelector(); - public V1JobSpecFluent.SelectorNested editOrNewSelector(); - public V1JobSpecFluent.SelectorNested editOrNewSelectorLike(V1LabelSelector item); - public Boolean getSuspend(); - public A withSuspend(Boolean suspend); - public Boolean hasSuspend(); - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate(); - public V1PodTemplateSpec buildTemplate(); - public A withTemplate(V1PodTemplateSpec template); - public Boolean hasTemplate(); - public V1JobSpecFluent.TemplateNested withNewTemplate(); - public V1JobSpecFluent.TemplateNested withNewTemplateLike(V1PodTemplateSpec item); - public V1JobSpecFluent.TemplateNested editTemplate(); - public V1JobSpecFluent.TemplateNested editOrNewTemplate(); - public V1JobSpecFluent.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item); - public Integer getTtlSecondsAfterFinished(); - public A withTtlSecondsAfterFinished(Integer ttlSecondsAfterFinished); - public Boolean hasTtlSecondsAfterFinished(); - public A withManualSelector(); - public A withSuspend(); - public interface PodFailurePolicyNested extends Nested,V1PodFailurePolicyFluent>{ - public N and(); - public N endPodFailurePolicy(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1JobSpecFluent> extends BaseFluent{ + public V1JobSpecFluent() { + } + + public V1JobSpecFluent(V1JobSpec instance) { + this.copyInstance(instance); + } + private Long activeDeadlineSeconds; + private Integer backoffLimit; + private Integer backoffLimitPerIndex; + private String completionMode; + private Integer completions; + private Boolean manualSelector; + private Integer maxFailedIndexes; + private Integer parallelism; + private V1PodFailurePolicyBuilder podFailurePolicy; + private String podReplacementPolicy; + private V1LabelSelectorBuilder selector; + private Boolean suspend; + private V1PodTemplateSpecBuilder template; + private Integer ttlSecondsAfterFinished; + + protected void copyInstance(V1JobSpec instance) { + instance = (instance != null ? instance : new V1JobSpec()); + if (instance != null) { + this.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds()); + this.withBackoffLimit(instance.getBackoffLimit()); + this.withBackoffLimitPerIndex(instance.getBackoffLimitPerIndex()); + this.withCompletionMode(instance.getCompletionMode()); + this.withCompletions(instance.getCompletions()); + this.withManualSelector(instance.getManualSelector()); + this.withMaxFailedIndexes(instance.getMaxFailedIndexes()); + this.withParallelism(instance.getParallelism()); + this.withPodFailurePolicy(instance.getPodFailurePolicy()); + this.withPodReplacementPolicy(instance.getPodReplacementPolicy()); + this.withSelector(instance.getSelector()); + this.withSuspend(instance.getSuspend()); + this.withTemplate(instance.getTemplate()); + this.withTtlSecondsAfterFinished(instance.getTtlSecondsAfterFinished()); + } + } + + public Long getActiveDeadlineSeconds() { + return this.activeDeadlineSeconds; + } + + public A withActiveDeadlineSeconds(Long activeDeadlineSeconds) { + this.activeDeadlineSeconds = activeDeadlineSeconds; + return (A) this; + } + + public boolean hasActiveDeadlineSeconds() { + return this.activeDeadlineSeconds != null; + } + + public Integer getBackoffLimit() { + return this.backoffLimit; + } + + public A withBackoffLimit(Integer backoffLimit) { + this.backoffLimit = backoffLimit; + return (A) this; + } + + public boolean hasBackoffLimit() { + return this.backoffLimit != null; + } + + public Integer getBackoffLimitPerIndex() { + return this.backoffLimitPerIndex; + } + + public A withBackoffLimitPerIndex(Integer backoffLimitPerIndex) { + this.backoffLimitPerIndex = backoffLimitPerIndex; + return (A) this; + } + + public boolean hasBackoffLimitPerIndex() { + return this.backoffLimitPerIndex != null; + } + + public String getCompletionMode() { + return this.completionMode; + } + + public A withCompletionMode(String completionMode) { + this.completionMode = completionMode; + return (A) this; + } + + public boolean hasCompletionMode() { + return this.completionMode != null; + } + + public Integer getCompletions() { + return this.completions; + } + + public A withCompletions(Integer completions) { + this.completions = completions; + return (A) this; + } + + public boolean hasCompletions() { + return this.completions != null; + } + + public Boolean getManualSelector() { + return this.manualSelector; + } + + public A withManualSelector(Boolean manualSelector) { + this.manualSelector = manualSelector; + return (A) this; + } + + public boolean hasManualSelector() { + return this.manualSelector != null; + } + + public Integer getMaxFailedIndexes() { + return this.maxFailedIndexes; + } + + public A withMaxFailedIndexes(Integer maxFailedIndexes) { + this.maxFailedIndexes = maxFailedIndexes; + return (A) this; + } + + public boolean hasMaxFailedIndexes() { + return this.maxFailedIndexes != null; + } + + public Integer getParallelism() { + return this.parallelism; + } + + public A withParallelism(Integer parallelism) { + this.parallelism = parallelism; + return (A) this; + } + + public boolean hasParallelism() { + return this.parallelism != null; + } + + public V1PodFailurePolicy buildPodFailurePolicy() { + return this.podFailurePolicy != null ? this.podFailurePolicy.build() : null; + } + + public A withPodFailurePolicy(V1PodFailurePolicy podFailurePolicy) { + this._visitables.remove("podFailurePolicy"); + if (podFailurePolicy != null) { + this.podFailurePolicy = new V1PodFailurePolicyBuilder(podFailurePolicy); + this._visitables.get("podFailurePolicy").add(this.podFailurePolicy); + } else { + this.podFailurePolicy = null; + this._visitables.get("podFailurePolicy").remove(this.podFailurePolicy); + } + return (A) this; + } + + public boolean hasPodFailurePolicy() { + return this.podFailurePolicy != null; + } + + public PodFailurePolicyNested withNewPodFailurePolicy() { + return new PodFailurePolicyNested(null); + } + + public PodFailurePolicyNested withNewPodFailurePolicyLike(V1PodFailurePolicy item) { + return new PodFailurePolicyNested(item); + } + + public PodFailurePolicyNested editPodFailurePolicy() { + return withNewPodFailurePolicyLike(java.util.Optional.ofNullable(buildPodFailurePolicy()).orElse(null)); + } + + public PodFailurePolicyNested editOrNewPodFailurePolicy() { + return withNewPodFailurePolicyLike(java.util.Optional.ofNullable(buildPodFailurePolicy()).orElse(new V1PodFailurePolicyBuilder().build())); + } + + public PodFailurePolicyNested editOrNewPodFailurePolicyLike(V1PodFailurePolicy item) { + return withNewPodFailurePolicyLike(java.util.Optional.ofNullable(buildPodFailurePolicy()).orElse(item)); } - public interface SelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endSelector(); + + public String getPodReplacementPolicy() { + return this.podReplacementPolicy; + } + + public A withPodReplacementPolicy(String podReplacementPolicy) { + this.podReplacementPolicy = podReplacementPolicy; + return (A) this; + } + + public boolean hasPodReplacementPolicy() { + return this.podReplacementPolicy != null; + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); + } + + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); + } + + public Boolean getSuspend() { + return this.suspend; + } + + public A withSuspend(Boolean suspend) { + this.suspend = suspend; + return (A) this; + } + + public boolean hasSuspend() { + return this.suspend != null; + } + + public V1PodTemplateSpec buildTemplate() { + return this.template != null ? this.template.build() : null; + } + + public A withTemplate(V1PodTemplateSpec template) { + this._visitables.remove("template"); + if (template != null) { + this.template = new V1PodTemplateSpecBuilder(template); + this._visitables.get("template").add(this.template); + } else { + this.template = null; + this._visitables.get("template").remove(this.template); + } + return (A) this; + } + + public boolean hasTemplate() { + return this.template != null; + } + + public TemplateNested withNewTemplate() { + return new TemplateNested(null); + } + + public TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { + return new TemplateNested(item); + } + + public TemplateNested editTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(null)); + } + + public TemplateNested editOrNewTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(new V1PodTemplateSpecBuilder().build())); + } + + public TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(item)); + } + + public Integer getTtlSecondsAfterFinished() { + return this.ttlSecondsAfterFinished; + } + + public A withTtlSecondsAfterFinished(Integer ttlSecondsAfterFinished) { + this.ttlSecondsAfterFinished = ttlSecondsAfterFinished; + return (A) this; + } + + public boolean hasTtlSecondsAfterFinished() { + return this.ttlSecondsAfterFinished != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1JobSpecFluent that = (V1JobSpecFluent) o; + if (!java.util.Objects.equals(activeDeadlineSeconds, that.activeDeadlineSeconds)) return false; + if (!java.util.Objects.equals(backoffLimit, that.backoffLimit)) return false; + if (!java.util.Objects.equals(backoffLimitPerIndex, that.backoffLimitPerIndex)) return false; + if (!java.util.Objects.equals(completionMode, that.completionMode)) return false; + if (!java.util.Objects.equals(completions, that.completions)) return false; + if (!java.util.Objects.equals(manualSelector, that.manualSelector)) return false; + if (!java.util.Objects.equals(maxFailedIndexes, that.maxFailedIndexes)) return false; + if (!java.util.Objects.equals(parallelism, that.parallelism)) return false; + if (!java.util.Objects.equals(podFailurePolicy, that.podFailurePolicy)) return false; + if (!java.util.Objects.equals(podReplacementPolicy, that.podReplacementPolicy)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + if (!java.util.Objects.equals(suspend, that.suspend)) return false; + if (!java.util.Objects.equals(template, that.template)) return false; + if (!java.util.Objects.equals(ttlSecondsAfterFinished, that.ttlSecondsAfterFinished)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(activeDeadlineSeconds, backoffLimit, backoffLimitPerIndex, completionMode, completions, manualSelector, maxFailedIndexes, parallelism, podFailurePolicy, podReplacementPolicy, selector, suspend, template, ttlSecondsAfterFinished, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (activeDeadlineSeconds != null) { sb.append("activeDeadlineSeconds:"); sb.append(activeDeadlineSeconds + ","); } + if (backoffLimit != null) { sb.append("backoffLimit:"); sb.append(backoffLimit + ","); } + if (backoffLimitPerIndex != null) { sb.append("backoffLimitPerIndex:"); sb.append(backoffLimitPerIndex + ","); } + if (completionMode != null) { sb.append("completionMode:"); sb.append(completionMode + ","); } + if (completions != null) { sb.append("completions:"); sb.append(completions + ","); } + if (manualSelector != null) { sb.append("manualSelector:"); sb.append(manualSelector + ","); } + if (maxFailedIndexes != null) { sb.append("maxFailedIndexes:"); sb.append(maxFailedIndexes + ","); } + if (parallelism != null) { sb.append("parallelism:"); sb.append(parallelism + ","); } + if (podFailurePolicy != null) { sb.append("podFailurePolicy:"); sb.append(podFailurePolicy + ","); } + if (podReplacementPolicy != null) { sb.append("podReplacementPolicy:"); sb.append(podReplacementPolicy + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } + if (suspend != null) { sb.append("suspend:"); sb.append(suspend + ","); } + if (template != null) { sb.append("template:"); sb.append(template + ","); } + if (ttlSecondsAfterFinished != null) { sb.append("ttlSecondsAfterFinished:"); sb.append(ttlSecondsAfterFinished); } + sb.append("}"); + return sb.toString(); + } + + public A withManualSelector() { + return withManualSelector(true); + } + + public A withSuspend() { + return withSuspend(true); + } + public class PodFailurePolicyNested extends V1PodFailurePolicyFluent> implements Nested{ + PodFailurePolicyNested(V1PodFailurePolicy item) { + this.builder = new V1PodFailurePolicyBuilder(this, item); + } + V1PodFailurePolicyBuilder builder; + + public N and() { + return (N) V1JobSpecFluent.this.withPodFailurePolicy(builder.build()); + } + public N endPodFailurePolicy() { + return and(); + } + + } - public interface TemplateNested extends Nested,V1PodTemplateSpecFluent>{ - public N and(); - public N endTemplate(); + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + public N and() { + return (N) V1JobSpecFluent.this.withSelector(builder.build()); + } + + public N endSelector() { + return and(); + } + + } + public class TemplateNested extends V1PodTemplateSpecFluent> implements Nested{ + TemplateNested(V1PodTemplateSpec item) { + this.builder = new V1PodTemplateSpecBuilder(this, item); + } + V1PodTemplateSpecBuilder builder; + + public N and() { + return (N) V1JobSpecFluent.this.withTemplate(builder.build()); + } + + public N endTemplate() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecFluentImpl.java deleted file mode 100644 index 327516b081..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobSpecFluentImpl.java +++ /dev/null @@ -1,324 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1JobSpecFluentImpl> extends BaseFluent implements V1JobSpecFluent{ - public V1JobSpecFluentImpl() { - } - public V1JobSpecFluentImpl(V1JobSpec instance) { - if (instance != null) { - this.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds()); - this.withBackoffLimit(instance.getBackoffLimit()); - this.withCompletionMode(instance.getCompletionMode()); - this.withCompletions(instance.getCompletions()); - this.withManualSelector(instance.getManualSelector()); - this.withParallelism(instance.getParallelism()); - this.withPodFailurePolicy(instance.getPodFailurePolicy()); - this.withSelector(instance.getSelector()); - this.withSuspend(instance.getSuspend()); - this.withTemplate(instance.getTemplate()); - this.withTtlSecondsAfterFinished(instance.getTtlSecondsAfterFinished()); - } - } - private Long activeDeadlineSeconds; - private Integer backoffLimit; - private String completionMode; - private Integer completions; - private Boolean manualSelector; - private Integer parallelism; - private V1PodFailurePolicyBuilder podFailurePolicy; - private V1LabelSelectorBuilder selector; - private Boolean suspend; - private V1PodTemplateSpecBuilder template; - private Integer ttlSecondsAfterFinished; - public Long getActiveDeadlineSeconds() { - return this.activeDeadlineSeconds; - } - public A withActiveDeadlineSeconds(Long activeDeadlineSeconds) { - this.activeDeadlineSeconds=activeDeadlineSeconds; return (A) this; - } - public Boolean hasActiveDeadlineSeconds() { - return this.activeDeadlineSeconds != null; - } - public Integer getBackoffLimit() { - return this.backoffLimit; - } - public A withBackoffLimit(Integer backoffLimit) { - this.backoffLimit=backoffLimit; return (A) this; - } - public Boolean hasBackoffLimit() { - return this.backoffLimit != null; - } - public String getCompletionMode() { - return this.completionMode; - } - public A withCompletionMode(String completionMode) { - this.completionMode=completionMode; return (A) this; - } - public Boolean hasCompletionMode() { - return this.completionMode != null; - } - public Integer getCompletions() { - return this.completions; - } - public A withCompletions(Integer completions) { - this.completions=completions; return (A) this; - } - public Boolean hasCompletions() { - return this.completions != null; - } - public Boolean getManualSelector() { - return this.manualSelector; - } - public A withManualSelector(Boolean manualSelector) { - this.manualSelector=manualSelector; return (A) this; - } - public Boolean hasManualSelector() { - return this.manualSelector != null; - } - public Integer getParallelism() { - return this.parallelism; - } - public A withParallelism(Integer parallelism) { - this.parallelism=parallelism; return (A) this; - } - public Boolean hasParallelism() { - return this.parallelism != null; - } - - /** - * This method has been deprecated, please use method buildPodFailurePolicy instead. - * @return The buildable object. - */ - @Deprecated - public V1PodFailurePolicy getPodFailurePolicy() { - return this.podFailurePolicy!=null ?this.podFailurePolicy.build():null; - } - public V1PodFailurePolicy buildPodFailurePolicy() { - return this.podFailurePolicy!=null ?this.podFailurePolicy.build():null; - } - public A withPodFailurePolicy(V1PodFailurePolicy podFailurePolicy) { - _visitables.get("podFailurePolicy").remove(this.podFailurePolicy); - if (podFailurePolicy!=null){ this.podFailurePolicy= new V1PodFailurePolicyBuilder(podFailurePolicy); _visitables.get("podFailurePolicy").add(this.podFailurePolicy);} else { this.podFailurePolicy = null; _visitables.get("podFailurePolicy").remove(this.podFailurePolicy); } return (A) this; - } - public Boolean hasPodFailurePolicy() { - return this.podFailurePolicy != null; - } - public V1JobSpecFluentImpl.PodFailurePolicyNested withNewPodFailurePolicy() { - return new V1JobSpecFluentImpl.PodFailurePolicyNestedImpl(); - } - public V1JobSpecFluentImpl.PodFailurePolicyNested withNewPodFailurePolicyLike(V1PodFailurePolicy item) { - return new V1JobSpecFluentImpl.PodFailurePolicyNestedImpl(item); - } - public V1JobSpecFluentImpl.PodFailurePolicyNested editPodFailurePolicy() { - return withNewPodFailurePolicyLike(getPodFailurePolicy()); - } - public V1JobSpecFluentImpl.PodFailurePolicyNested editOrNewPodFailurePolicy() { - return withNewPodFailurePolicyLike(getPodFailurePolicy() != null ? getPodFailurePolicy(): new V1PodFailurePolicyBuilder().build()); - } - public V1JobSpecFluentImpl.PodFailurePolicyNested editOrNewPodFailurePolicyLike(V1PodFailurePolicy item) { - return withNewPodFailurePolicyLike(getPodFailurePolicy() != null ? getPodFailurePolicy(): item); - } - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector() { - return this.selector!=null ?this.selector.build():null; - } - public V1LabelSelector buildSelector() { - return this.selector!=null ?this.selector.build():null; - } - public A withSelector(V1LabelSelector selector) { - _visitables.get("selector").remove(this.selector); - if (selector!=null){ this.selector= new V1LabelSelectorBuilder(selector); _visitables.get("selector").add(this.selector);} else { this.selector = null; _visitables.get("selector").remove(this.selector); } return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public V1JobSpecFluentImpl.SelectorNested withNewSelector() { - return new V1JobSpecFluentImpl.SelectorNestedImpl(); - } - public V1JobSpecFluentImpl.SelectorNested withNewSelectorLike(V1LabelSelector item) { - return new V1JobSpecFluentImpl.SelectorNestedImpl(item); - } - public V1JobSpecFluentImpl.SelectorNested editSelector() { - return withNewSelectorLike(getSelector()); - } - public V1JobSpecFluentImpl.SelectorNested editOrNewSelector() { - return withNewSelectorLike(getSelector() != null ? getSelector(): new V1LabelSelectorBuilder().build()); - } - public V1JobSpecFluentImpl.SelectorNested editOrNewSelectorLike(V1LabelSelector item) { - return withNewSelectorLike(getSelector() != null ? getSelector(): item); - } - public Boolean getSuspend() { - return this.suspend; - } - public A withSuspend(Boolean suspend) { - this.suspend=suspend; return (A) this; - } - public Boolean hasSuspend() { - return this.suspend != null; - } - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate() { - return this.template!=null ?this.template.build():null; - } - public V1PodTemplateSpec buildTemplate() { - return this.template!=null ?this.template.build():null; - } - public A withTemplate(V1PodTemplateSpec template) { - _visitables.get("template").remove(this.template); - if (template!=null){ this.template= new V1PodTemplateSpecBuilder(template); _visitables.get("template").add(this.template);} else { this.template = null; _visitables.get("template").remove(this.template); } return (A) this; - } - public Boolean hasTemplate() { - return this.template != null; - } - public V1JobSpecFluentImpl.TemplateNested withNewTemplate() { - return new V1JobSpecFluentImpl.TemplateNestedImpl(); - } - public V1JobSpecFluentImpl.TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { - return new V1JobSpecFluentImpl.TemplateNestedImpl(item); - } - public V1JobSpecFluentImpl.TemplateNested editTemplate() { - return withNewTemplateLike(getTemplate()); - } - public V1JobSpecFluentImpl.TemplateNested editOrNewTemplate() { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): new V1PodTemplateSpecBuilder().build()); - } - public V1JobSpecFluentImpl.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): item); - } - public Integer getTtlSecondsAfterFinished() { - return this.ttlSecondsAfterFinished; - } - public A withTtlSecondsAfterFinished(Integer ttlSecondsAfterFinished) { - this.ttlSecondsAfterFinished=ttlSecondsAfterFinished; return (A) this; - } - public Boolean hasTtlSecondsAfterFinished() { - return this.ttlSecondsAfterFinished != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1JobSpecFluentImpl that = (V1JobSpecFluentImpl) o; - if (!java.util.Objects.equals(activeDeadlineSeconds, that.activeDeadlineSeconds)) return false; - - if (!java.util.Objects.equals(backoffLimit, that.backoffLimit)) return false; - - if (!java.util.Objects.equals(completionMode, that.completionMode)) return false; - - if (!java.util.Objects.equals(completions, that.completions)) return false; - - if (!java.util.Objects.equals(manualSelector, that.manualSelector)) return false; - - if (!java.util.Objects.equals(parallelism, that.parallelism)) return false; - - if (!java.util.Objects.equals(podFailurePolicy, that.podFailurePolicy)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - if (!java.util.Objects.equals(suspend, that.suspend)) return false; - - if (!java.util.Objects.equals(template, that.template)) return false; - - if (!java.util.Objects.equals(ttlSecondsAfterFinished, that.ttlSecondsAfterFinished)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(activeDeadlineSeconds, backoffLimit, completionMode, completions, manualSelector, parallelism, podFailurePolicy, selector, suspend, template, ttlSecondsAfterFinished, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (activeDeadlineSeconds != null) { sb.append("activeDeadlineSeconds:"); sb.append(activeDeadlineSeconds + ","); } - if (backoffLimit != null) { sb.append("backoffLimit:"); sb.append(backoffLimit + ","); } - if (completionMode != null) { sb.append("completionMode:"); sb.append(completionMode + ","); } - if (completions != null) { sb.append("completions:"); sb.append(completions + ","); } - if (manualSelector != null) { sb.append("manualSelector:"); sb.append(manualSelector + ","); } - if (parallelism != null) { sb.append("parallelism:"); sb.append(parallelism + ","); } - if (podFailurePolicy != null) { sb.append("podFailurePolicy:"); sb.append(podFailurePolicy + ","); } - if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } - if (suspend != null) { sb.append("suspend:"); sb.append(suspend + ","); } - if (template != null) { sb.append("template:"); sb.append(template + ","); } - if (ttlSecondsAfterFinished != null) { sb.append("ttlSecondsAfterFinished:"); sb.append(ttlSecondsAfterFinished); } - sb.append("}"); - return sb.toString(); - } - public A withManualSelector() { - return withManualSelector(true); - } - public A withSuspend() { - return withSuspend(true); - } - class PodFailurePolicyNestedImpl extends V1PodFailurePolicyFluentImpl> implements V1JobSpecFluentImpl.PodFailurePolicyNested,Nested{ - PodFailurePolicyNestedImpl(V1PodFailurePolicy item) { - this.builder = new V1PodFailurePolicyBuilder(this, item); - } - PodFailurePolicyNestedImpl() { - this.builder = new V1PodFailurePolicyBuilder(this); - } - V1PodFailurePolicyBuilder builder; - public N and() { - return (N) V1JobSpecFluentImpl.this.withPodFailurePolicy(builder.build()); - } - public N endPodFailurePolicy() { - return and(); - } - - } - class SelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1JobSpecFluentImpl.SelectorNested,Nested{ - SelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - SelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1JobSpecFluentImpl.this.withSelector(builder.build()); - } - public N endSelector() { - return and(); - } - - } - class TemplateNestedImpl extends V1PodTemplateSpecFluentImpl> implements V1JobSpecFluentImpl.TemplateNested,Nested{ - TemplateNestedImpl(V1PodTemplateSpec item) { - this.builder = new V1PodTemplateSpecBuilder(this, item); - } - TemplateNestedImpl() { - this.builder = new V1PodTemplateSpecBuilder(this); - } - V1PodTemplateSpecBuilder builder; - public N and() { - return (N) V1JobSpecFluentImpl.this.withTemplate(builder.build()); - } - public N endTemplate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusBuilder.java index a4d5f8bedb..8f9c16e506 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusBuilder.java @@ -1,70 +1,41 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1JobStatusBuilder extends V1JobStatusFluentImpl implements VisitableBuilder{ +public class V1JobStatusBuilder extends V1JobStatusFluent implements VisitableBuilder{ public V1JobStatusBuilder() { - this(false); - } - public V1JobStatusBuilder(Boolean validationEnabled) { - this(new V1JobStatus(), validationEnabled); + this(new V1JobStatus()); } + public V1JobStatusBuilder(V1JobStatusFluent fluent) { - this(fluent, false); - } - public V1JobStatusBuilder(V1JobStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1JobStatus(), validationEnabled); + this(fluent, new V1JobStatus()); } + public V1JobStatusBuilder(V1JobStatusFluent fluent,V1JobStatus instance) { - this(fluent, instance, false); - } - public V1JobStatusBuilder(V1JobStatusFluent fluent,V1JobStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withActive(instance.getActive()); - fluent.withCompletedIndexes(instance.getCompletedIndexes()); - fluent.withCompletionTime(instance.getCompletionTime()); - fluent.withConditions(instance.getConditions()); - fluent.withFailed(instance.getFailed()); - fluent.withReady(instance.getReady()); - fluent.withStartTime(instance.getStartTime()); - fluent.withSucceeded(instance.getSucceeded()); - fluent.withUncountedTerminatedPods(instance.getUncountedTerminatedPods()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1JobStatusBuilder(V1JobStatus instance) { - this(instance,false); - } - public V1JobStatusBuilder(V1JobStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withActive(instance.getActive()); - this.withCompletedIndexes(instance.getCompletedIndexes()); - this.withCompletionTime(instance.getCompletionTime()); - this.withConditions(instance.getConditions()); - this.withFailed(instance.getFailed()); - this.withReady(instance.getReady()); - this.withStartTime(instance.getStartTime()); - this.withSucceeded(instance.getSucceeded()); - this.withUncountedTerminatedPods(instance.getUncountedTerminatedPods()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1JobStatusFluent fluent; - Boolean validationEnabled; + public V1JobStatus build() { V1JobStatus buildable = new V1JobStatus(); buildable.setActive(fluent.getActive()); buildable.setCompletedIndexes(fluent.getCompletedIndexes()); buildable.setCompletionTime(fluent.getCompletionTime()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setFailed(fluent.getFailed()); + buildable.setFailedIndexes(fluent.getFailedIndexes()); buildable.setReady(fluent.getReady()); buildable.setStartTime(fluent.getStartTime()); buildable.setSucceeded(fluent.getSucceeded()); - buildable.setUncountedTerminatedPods(fluent.getUncountedTerminatedPods()); + buildable.setTerminating(fluent.getTerminating()); + buildable.setUncountedTerminatedPods(fluent.buildUncountedTerminatedPods()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusFluent.java index 31471e7e0e..3db6517921 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusFluent.java @@ -1,99 +1,440 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; +import java.util.Iterator; +import java.util.List; import java.lang.Integer; -import java.lang.Deprecated; import java.time.OffsetDateTime; -import java.util.Iterator; import java.util.Collection; -import java.util.List; -import java.lang.Boolean; +import java.lang.Object; - /** - * Generated - */ -public interface V1JobStatusFluent> extends Fluent{ - public Integer getActive(); - public A withActive(Integer active); - public Boolean hasActive(); - public String getCompletedIndexes(); - public A withCompletedIndexes(String completedIndexes); - public Boolean hasCompletedIndexes(); - public OffsetDateTime getCompletionTime(); - public A withCompletionTime(OffsetDateTime completionTime); - public Boolean hasCompletionTime(); - public A addToConditions(int index,V1JobCondition item); - public A setToConditions(int index,V1JobCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1JobCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1JobCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1JobCondition buildCondition(int index); - public V1JobCondition buildFirstCondition(); - public V1JobCondition buildLastCondition(); - public V1JobCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1JobCondition... conditions); - public Boolean hasConditions(); - public V1JobStatusFluent.ConditionsNested addNewCondition(); - public V1JobStatusFluent.ConditionsNested addNewConditionLike(V1JobCondition item); - public V1JobStatusFluent.ConditionsNested setNewConditionLike(int index,V1JobCondition item); - public V1JobStatusFluent.ConditionsNested editCondition(int index); - public V1JobStatusFluent.ConditionsNested editFirstCondition(); - public V1JobStatusFluent.ConditionsNested editLastCondition(); - public V1JobStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public Integer getFailed(); - public A withFailed(Integer failed); - public Boolean hasFailed(); - public Integer getReady(); - public A withReady(Integer ready); - public Boolean hasReady(); - public OffsetDateTime getStartTime(); - public A withStartTime(OffsetDateTime startTime); - public Boolean hasStartTime(); - public Integer getSucceeded(); - public A withSucceeded(Integer succeeded); - public Boolean hasSucceeded(); - - /** - * This method has been deprecated, please use method buildUncountedTerminatedPods instead. - * @return The buildable object. - */ - @Deprecated - public V1UncountedTerminatedPods getUncountedTerminatedPods(); - public V1UncountedTerminatedPods buildUncountedTerminatedPods(); - public A withUncountedTerminatedPods(V1UncountedTerminatedPods uncountedTerminatedPods); - public Boolean hasUncountedTerminatedPods(); - public V1JobStatusFluent.UncountedTerminatedPodsNested withNewUncountedTerminatedPods(); - public V1JobStatusFluent.UncountedTerminatedPodsNested withNewUncountedTerminatedPodsLike(V1UncountedTerminatedPods item); - public V1JobStatusFluent.UncountedTerminatedPodsNested editUncountedTerminatedPods(); - public V1JobStatusFluent.UncountedTerminatedPodsNested editOrNewUncountedTerminatedPods(); - public V1JobStatusFluent.UncountedTerminatedPodsNested editOrNewUncountedTerminatedPodsLike(V1UncountedTerminatedPods item); - public interface ConditionsNested extends Nested,V1JobConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1JobStatusFluent> extends BaseFluent{ + public V1JobStatusFluent() { + } + + public V1JobStatusFluent(V1JobStatus instance) { + this.copyInstance(instance); + } + private Integer active; + private String completedIndexes; + private OffsetDateTime completionTime; + private ArrayList conditions; + private Integer failed; + private String failedIndexes; + private Integer ready; + private OffsetDateTime startTime; + private Integer succeeded; + private Integer terminating; + private V1UncountedTerminatedPodsBuilder uncountedTerminatedPods; + + protected void copyInstance(V1JobStatus instance) { + instance = (instance != null ? instance : new V1JobStatus()); + if (instance != null) { + this.withActive(instance.getActive()); + this.withCompletedIndexes(instance.getCompletedIndexes()); + this.withCompletionTime(instance.getCompletionTime()); + this.withConditions(instance.getConditions()); + this.withFailed(instance.getFailed()); + this.withFailedIndexes(instance.getFailedIndexes()); + this.withReady(instance.getReady()); + this.withStartTime(instance.getStartTime()); + this.withSucceeded(instance.getSucceeded()); + this.withTerminating(instance.getTerminating()); + this.withUncountedTerminatedPods(instance.getUncountedTerminatedPods()); + } + } + + public Integer getActive() { + return this.active; + } + + public A withActive(Integer active) { + this.active = active; + return (A) this; + } + + public boolean hasActive() { + return this.active != null; + } + + public String getCompletedIndexes() { + return this.completedIndexes; + } + + public A withCompletedIndexes(String completedIndexes) { + this.completedIndexes = completedIndexes; + return (A) this; + } + + public boolean hasCompletedIndexes() { + return this.completedIndexes != null; + } + + public OffsetDateTime getCompletionTime() { + return this.completionTime; + } + + public A withCompletionTime(OffsetDateTime completionTime) { + this.completionTime = completionTime; + return (A) this; + } + + public boolean hasCompletionTime() { + return this.completionTime != null; + } + + public A addToConditions(int index,V1JobCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1JobConditionBuilder builder = new V1JobConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1JobCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1JobConditionBuilder builder = new V1JobConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1JobCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1JobCondition item : items) {V1JobConditionBuilder builder = new V1JobConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1JobCondition item : items) {V1JobConditionBuilder builder = new V1JobConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; } - public interface UncountedTerminatedPodsNested extends Nested,V1UncountedTerminatedPodsFluent>{ - public N and(); - public N endUncountedTerminatedPods(); + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1JobCondition... items) { + if (this.conditions == null) return (A)this; + for (V1JobCondition item : items) {V1JobConditionBuilder builder = new V1JobConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1JobCondition item : items) {V1JobConditionBuilder builder = new V1JobConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1JobConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1JobCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1JobCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1JobCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1JobCondition buildMatchingCondition(Predicate predicate) { + for (V1JobConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1JobConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1JobCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1JobCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1JobCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1JobCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1JobCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i withNewUncountedTerminatedPods() { + return new UncountedTerminatedPodsNested(null); + } + + public UncountedTerminatedPodsNested withNewUncountedTerminatedPodsLike(V1UncountedTerminatedPods item) { + return new UncountedTerminatedPodsNested(item); + } + + public UncountedTerminatedPodsNested editUncountedTerminatedPods() { + return withNewUncountedTerminatedPodsLike(java.util.Optional.ofNullable(buildUncountedTerminatedPods()).orElse(null)); + } + + public UncountedTerminatedPodsNested editOrNewUncountedTerminatedPods() { + return withNewUncountedTerminatedPodsLike(java.util.Optional.ofNullable(buildUncountedTerminatedPods()).orElse(new V1UncountedTerminatedPodsBuilder().build())); + } + + public UncountedTerminatedPodsNested editOrNewUncountedTerminatedPodsLike(V1UncountedTerminatedPods item) { + return withNewUncountedTerminatedPodsLike(java.util.Optional.ofNullable(buildUncountedTerminatedPods()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1JobStatusFluent that = (V1JobStatusFluent) o; + if (!java.util.Objects.equals(active, that.active)) return false; + if (!java.util.Objects.equals(completedIndexes, that.completedIndexes)) return false; + if (!java.util.Objects.equals(completionTime, that.completionTime)) return false; + if (!java.util.Objects.equals(conditions, that.conditions)) return false; + if (!java.util.Objects.equals(failed, that.failed)) return false; + if (!java.util.Objects.equals(failedIndexes, that.failedIndexes)) return false; + if (!java.util.Objects.equals(ready, that.ready)) return false; + if (!java.util.Objects.equals(startTime, that.startTime)) return false; + if (!java.util.Objects.equals(succeeded, that.succeeded)) return false; + if (!java.util.Objects.equals(terminating, that.terminating)) return false; + if (!java.util.Objects.equals(uncountedTerminatedPods, that.uncountedTerminatedPods)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(active, completedIndexes, completionTime, conditions, failed, failedIndexes, ready, startTime, succeeded, terminating, uncountedTerminatedPods, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (active != null) { sb.append("active:"); sb.append(active + ","); } + if (completedIndexes != null) { sb.append("completedIndexes:"); sb.append(completedIndexes + ","); } + if (completionTime != null) { sb.append("completionTime:"); sb.append(completionTime + ","); } + if (conditions != null && !conditions.isEmpty()) { sb.append("conditions:"); sb.append(conditions + ","); } + if (failed != null) { sb.append("failed:"); sb.append(failed + ","); } + if (failedIndexes != null) { sb.append("failedIndexes:"); sb.append(failedIndexes + ","); } + if (ready != null) { sb.append("ready:"); sb.append(ready + ","); } + if (startTime != null) { sb.append("startTime:"); sb.append(startTime + ","); } + if (succeeded != null) { sb.append("succeeded:"); sb.append(succeeded + ","); } + if (terminating != null) { sb.append("terminating:"); sb.append(terminating + ","); } + if (uncountedTerminatedPods != null) { sb.append("uncountedTerminatedPods:"); sb.append(uncountedTerminatedPods); } + sb.append("}"); + return sb.toString(); + } + public class ConditionsNested extends V1JobConditionFluent> implements Nested{ + ConditionsNested(int index,V1JobCondition item) { + this.index = index; + this.builder = new V1JobConditionBuilder(this, item); + } + V1JobConditionBuilder builder; + int index; + public N and() { + return (N) V1JobStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + } + public class UncountedTerminatedPodsNested extends V1UncountedTerminatedPodsFluent> implements Nested{ + UncountedTerminatedPodsNested(V1UncountedTerminatedPods item) { + this.builder = new V1UncountedTerminatedPodsBuilder(this, item); + } + V1UncountedTerminatedPodsBuilder builder; + + public N and() { + return (N) V1JobStatusFluent.this.withUncountedTerminatedPods(builder.build()); + } + + public N endUncountedTerminatedPods() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusFluentImpl.java deleted file mode 100644 index 38e031e24a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobStatusFluentImpl.java +++ /dev/null @@ -1,331 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1JobStatusFluentImpl> extends BaseFluent implements V1JobStatusFluent{ - public V1JobStatusFluentImpl() { - } - public V1JobStatusFluentImpl(V1JobStatus instance) { - if (instance != null) { - this.withActive(instance.getActive()); - this.withCompletedIndexes(instance.getCompletedIndexes()); - this.withCompletionTime(instance.getCompletionTime()); - this.withConditions(instance.getConditions()); - this.withFailed(instance.getFailed()); - this.withReady(instance.getReady()); - this.withStartTime(instance.getStartTime()); - this.withSucceeded(instance.getSucceeded()); - this.withUncountedTerminatedPods(instance.getUncountedTerminatedPods()); - } - } - private Integer active; - private String completedIndexes; - private OffsetDateTime completionTime; - private ArrayList conditions; - private Integer failed; - private Integer ready; - private OffsetDateTime startTime; - private Integer succeeded; - private V1UncountedTerminatedPodsBuilder uncountedTerminatedPods; - public Integer getActive() { - return this.active; - } - public A withActive(Integer active) { - this.active=active; return (A) this; - } - public Boolean hasActive() { - return this.active != null; - } - public String getCompletedIndexes() { - return this.completedIndexes; - } - public A withCompletedIndexes(String completedIndexes) { - this.completedIndexes=completedIndexes; return (A) this; - } - public Boolean hasCompletedIndexes() { - return this.completedIndexes != null; - } - public OffsetDateTime getCompletionTime() { - return this.completionTime; - } - public A withCompletionTime(OffsetDateTime completionTime) { - this.completionTime=completionTime; return (A) this; - } - public Boolean hasCompletionTime() { - return this.completionTime != null; - } - public A addToConditions(int index,V1JobCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1JobConditionBuilder builder = new V1JobConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1JobCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1JobConditionBuilder builder = new V1JobConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1JobCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1JobCondition item : items) {V1JobConditionBuilder builder = new V1JobConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1JobCondition item : items) {V1JobConditionBuilder builder = new V1JobConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1JobCondition... items) { - for (V1JobCondition item : items) {V1JobConditionBuilder builder = new V1JobConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1JobCondition item : items) {V1JobConditionBuilder builder = new V1JobConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1JobConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1JobCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1JobCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1JobCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1JobCondition buildMatchingCondition(Predicate predicate) { - for (V1JobConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1JobConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1JobCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1JobCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1JobCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1JobStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1JobStatusFluentImpl.ConditionsNestedImpl(); - } - public V1JobStatusFluentImpl.ConditionsNested addNewConditionLike(V1JobCondition item) { - return new V1JobStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1JobStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1JobCondition item) { - return new V1JobStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1JobStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1JobStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1JobStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1JobStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i withNewUncountedTerminatedPods() { - return new V1JobStatusFluentImpl.UncountedTerminatedPodsNestedImpl(); - } - public V1JobStatusFluentImpl.UncountedTerminatedPodsNested withNewUncountedTerminatedPodsLike(V1UncountedTerminatedPods item) { - return new V1JobStatusFluentImpl.UncountedTerminatedPodsNestedImpl(item); - } - public V1JobStatusFluentImpl.UncountedTerminatedPodsNested editUncountedTerminatedPods() { - return withNewUncountedTerminatedPodsLike(getUncountedTerminatedPods()); - } - public V1JobStatusFluentImpl.UncountedTerminatedPodsNested editOrNewUncountedTerminatedPods() { - return withNewUncountedTerminatedPodsLike(getUncountedTerminatedPods() != null ? getUncountedTerminatedPods(): new V1UncountedTerminatedPodsBuilder().build()); - } - public V1JobStatusFluentImpl.UncountedTerminatedPodsNested editOrNewUncountedTerminatedPodsLike(V1UncountedTerminatedPods item) { - return withNewUncountedTerminatedPodsLike(getUncountedTerminatedPods() != null ? getUncountedTerminatedPods(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1JobStatusFluentImpl that = (V1JobStatusFluentImpl) o; - if (!java.util.Objects.equals(active, that.active)) return false; - - if (!java.util.Objects.equals(completedIndexes, that.completedIndexes)) return false; - - if (!java.util.Objects.equals(completionTime, that.completionTime)) return false; - - if (!java.util.Objects.equals(conditions, that.conditions)) return false; - - if (!java.util.Objects.equals(failed, that.failed)) return false; - - if (!java.util.Objects.equals(ready, that.ready)) return false; - - if (!java.util.Objects.equals(startTime, that.startTime)) return false; - - if (!java.util.Objects.equals(succeeded, that.succeeded)) return false; - - if (!java.util.Objects.equals(uncountedTerminatedPods, that.uncountedTerminatedPods)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(active, completedIndexes, completionTime, conditions, failed, ready, startTime, succeeded, uncountedTerminatedPods, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (active != null) { sb.append("active:"); sb.append(active + ","); } - if (completedIndexes != null) { sb.append("completedIndexes:"); sb.append(completedIndexes + ","); } - if (completionTime != null) { sb.append("completionTime:"); sb.append(completionTime + ","); } - if (conditions != null) { sb.append("conditions:"); sb.append(conditions + ","); } - if (failed != null) { sb.append("failed:"); sb.append(failed + ","); } - if (ready != null) { sb.append("ready:"); sb.append(ready + ","); } - if (startTime != null) { sb.append("startTime:"); sb.append(startTime + ","); } - if (succeeded != null) { sb.append("succeeded:"); sb.append(succeeded + ","); } - if (uncountedTerminatedPods != null) { sb.append("uncountedTerminatedPods:"); sb.append(uncountedTerminatedPods); } - sb.append("}"); - return sb.toString(); - } - class ConditionsNestedImpl extends V1JobConditionFluentImpl> implements V1JobStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1JobCondition item) { - this.index = index; - this.builder = new V1JobConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1JobConditionBuilder(this); - } - V1JobConditionBuilder builder; - int index; - public N and() { - return (N) V1JobStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - class UncountedTerminatedPodsNestedImpl extends V1UncountedTerminatedPodsFluentImpl> implements V1JobStatusFluentImpl.UncountedTerminatedPodsNested,Nested{ - UncountedTerminatedPodsNestedImpl(V1UncountedTerminatedPods item) { - this.builder = new V1UncountedTerminatedPodsBuilder(this, item); - } - UncountedTerminatedPodsNestedImpl() { - this.builder = new V1UncountedTerminatedPodsBuilder(this); - } - V1UncountedTerminatedPodsBuilder builder; - public N and() { - return (N) V1JobStatusFluentImpl.this.withUncountedTerminatedPods(builder.build()); - } - public N endUncountedTerminatedPods() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecBuilder.java index 5ba95abdee..bad9adb146 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1JobTemplateSpecBuilder extends V1JobTemplateSpecFluentImpl implements VisitableBuilder{ +public class V1JobTemplateSpecBuilder extends V1JobTemplateSpecFluent implements VisitableBuilder{ public V1JobTemplateSpecBuilder() { - this(false); - } - public V1JobTemplateSpecBuilder(Boolean validationEnabled) { - this(new V1JobTemplateSpec(), validationEnabled); + this(new V1JobTemplateSpec()); } + public V1JobTemplateSpecBuilder(V1JobTemplateSpecFluent fluent) { - this(fluent, false); - } - public V1JobTemplateSpecBuilder(V1JobTemplateSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1JobTemplateSpec(), validationEnabled); + this(fluent, new V1JobTemplateSpec()); } + public V1JobTemplateSpecBuilder(V1JobTemplateSpecFluent fluent,V1JobTemplateSpec instance) { - this(fluent, instance, false); - } - public V1JobTemplateSpecBuilder(V1JobTemplateSpecFluent fluent,V1JobTemplateSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1JobTemplateSpecBuilder(V1JobTemplateSpec instance) { - this(instance,false); - } - public V1JobTemplateSpecBuilder(V1JobTemplateSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1JobTemplateSpecFluent fluent; - Boolean validationEnabled; + public V1JobTemplateSpec build() { V1JobTemplateSpec buildable = new V1JobTemplateSpec(); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecFluent.java index 95de32a295..2df834f26b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1JobTemplateSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1JobTemplateSpecFluent.MetadataNested withNewMetadata(); - public V1JobTemplateSpecFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1JobTemplateSpecFluent.MetadataNested editMetadata(); - public V1JobTemplateSpecFluent.MetadataNested editOrNewMetadata(); - public V1JobTemplateSpecFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1JobSpec getSpec(); - public V1JobSpec buildSpec(); - public A withSpec(V1JobSpec spec); - public Boolean hasSpec(); - public V1JobTemplateSpecFluent.SpecNested withNewSpec(); - public V1JobTemplateSpecFluent.SpecNested withNewSpecLike(V1JobSpec item); - public V1JobTemplateSpecFluent.SpecNested editSpec(); - public V1JobTemplateSpecFluent.SpecNested editOrNewSpec(); - public V1JobTemplateSpecFluent.SpecNested editOrNewSpecLike(V1JobSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1JobTemplateSpecFluent> extends BaseFluent{ + public V1JobTemplateSpecFluent() { + } + + public V1JobTemplateSpecFluent(V1JobTemplateSpec instance) { + this.copyInstance(instance); + } + private V1ObjectMetaBuilder metadata; + private V1JobSpecBuilder spec; + + protected void copyInstance(V1JobTemplateSpec instance) { + instance = (instance != null ? instance : new V1JobTemplateSpec()); + if (instance != null) { + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); } - public interface SpecNested extends Nested,V1JobSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1JobSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1JobSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1JobSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1JobSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1JobSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1JobSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1JobTemplateSpecFluent that = (V1JobTemplateSpecFluent) o; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1JobTemplateSpecFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + } + public class SpecNested extends V1JobSpecFluent> implements Nested{ + SpecNested(V1JobSpec item) { + this.builder = new V1JobSpecBuilder(this, item); + } + V1JobSpecBuilder builder; + + public N and() { + return (N) V1JobTemplateSpecFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecFluentImpl.java deleted file mode 100644 index 107515b467..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1JobTemplateSpecFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1JobTemplateSpecFluentImpl> extends BaseFluent implements V1JobTemplateSpecFluent{ - public V1JobTemplateSpecFluentImpl() { - } - public V1JobTemplateSpecFluentImpl(V1JobTemplateSpec instance) { - if (instance != null) { - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private V1ObjectMetaBuilder metadata; - private V1JobSpecBuilder spec; - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1JobTemplateSpecFluentImpl.MetadataNested withNewMetadata() { - return new V1JobTemplateSpecFluentImpl.MetadataNestedImpl(); - } - public V1JobTemplateSpecFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1JobTemplateSpecFluentImpl.MetadataNestedImpl(item); - } - public V1JobTemplateSpecFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1JobTemplateSpecFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1JobTemplateSpecFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1JobSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1JobSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1JobSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1JobSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1JobTemplateSpecFluentImpl.SpecNested withNewSpec() { - return new V1JobTemplateSpecFluentImpl.SpecNestedImpl(); - } - public V1JobTemplateSpecFluentImpl.SpecNested withNewSpecLike(V1JobSpec item) { - return new V1JobTemplateSpecFluentImpl.SpecNestedImpl(item); - } - public V1JobTemplateSpecFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1JobTemplateSpecFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1JobSpecBuilder().build()); - } - public V1JobTemplateSpecFluentImpl.SpecNested editOrNewSpecLike(V1JobSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1JobTemplateSpecFluentImpl that = (V1JobTemplateSpecFluentImpl) o; - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1JobTemplateSpecFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1JobTemplateSpecFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1JobSpecFluentImpl> implements V1JobTemplateSpecFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1JobSpec item) { - this.builder = new V1JobSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1JobSpecBuilder(this); - } - V1JobSpecBuilder builder; - public N and() { - return (N) V1JobTemplateSpecFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathBuilder.java index 4c98b3c765..14923973ca 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1KeyToPathBuilder extends V1KeyToPathFluentImpl implements VisitableBuilder{ +public class V1KeyToPathBuilder extends V1KeyToPathFluent implements VisitableBuilder{ public V1KeyToPathBuilder() { - this(false); - } - public V1KeyToPathBuilder(Boolean validationEnabled) { - this(new V1KeyToPath(), validationEnabled); + this(new V1KeyToPath()); } + public V1KeyToPathBuilder(V1KeyToPathFluent fluent) { - this(fluent, false); - } - public V1KeyToPathBuilder(V1KeyToPathFluent fluent,Boolean validationEnabled) { - this(fluent, new V1KeyToPath(), validationEnabled); + this(fluent, new V1KeyToPath()); } + public V1KeyToPathBuilder(V1KeyToPathFluent fluent,V1KeyToPath instance) { - this(fluent, instance, false); - } - public V1KeyToPathBuilder(V1KeyToPathFluent fluent,V1KeyToPath instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withKey(instance.getKey()); - fluent.withMode(instance.getMode()); - fluent.withPath(instance.getPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1KeyToPathBuilder(V1KeyToPath instance) { - this(instance,false); - } - public V1KeyToPathBuilder(V1KeyToPath instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withKey(instance.getKey()); - this.withMode(instance.getMode()); - this.withPath(instance.getPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1KeyToPathFluent fluent; - Boolean validationEnabled; + public V1KeyToPath build() { V1KeyToPath buildable = new V1KeyToPath(); buildable.setKey(fluent.getKey()); @@ -49,4 +29,5 @@ public V1KeyToPath build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathFluent.java index a5afdff0fd..a3541dda38 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathFluent.java @@ -1,23 +1,98 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1KeyToPathFluent> extends Fluent{ - public String getKey(); - public A withKey(String key); - public Boolean hasKey(); - public Integer getMode(); - public A withMode(Integer mode); - public Boolean hasMode(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1KeyToPathFluent> extends BaseFluent{ + public V1KeyToPathFluent() { + } + public V1KeyToPathFluent(V1KeyToPath instance) { + this.copyInstance(instance); + } + private String key; + private Integer mode; + private String path; + + protected void copyInstance(V1KeyToPath instance) { + instance = (instance != null ? instance : new V1KeyToPath()); + if (instance != null) { + this.withKey(instance.getKey()); + this.withMode(instance.getMode()); + this.withPath(instance.getPath()); + } + } + + public String getKey() { + return this.key; + } + + public A withKey(String key) { + this.key = key; + return (A) this; + } + + public boolean hasKey() { + return this.key != null; + } + + public Integer getMode() { + return this.mode; + } + + public A withMode(Integer mode) { + this.mode = mode; + return (A) this; + } + + public boolean hasMode() { + return this.mode != null; + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1KeyToPathFluent that = (V1KeyToPathFluent) o; + if (!java.util.Objects.equals(key, that.key)) return false; + if (!java.util.Objects.equals(mode, that.mode)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(key, mode, path, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (key != null) { sb.append("key:"); sb.append(key + ","); } + if (mode != null) { sb.append("mode:"); sb.append(mode + ","); } + if (path != null) { sb.append("path:"); sb.append(path); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathFluentImpl.java deleted file mode 100644 index 1ccd5ab658..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1KeyToPathFluentImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1KeyToPathFluentImpl> extends BaseFluent implements V1KeyToPathFluent{ - public V1KeyToPathFluentImpl() { - } - public V1KeyToPathFluentImpl(V1KeyToPath instance) { - if (instance != null) { - this.withKey(instance.getKey()); - this.withMode(instance.getMode()); - this.withPath(instance.getPath()); - } - } - private String key; - private Integer mode; - private String path; - public String getKey() { - return this.key; - } - public A withKey(String key) { - this.key=key; return (A) this; - } - public Boolean hasKey() { - return this.key != null; - } - public Integer getMode() { - return this.mode; - } - public A withMode(Integer mode) { - this.mode=mode; return (A) this; - } - public Boolean hasMode() { - return this.mode != null; - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1KeyToPathFluentImpl that = (V1KeyToPathFluentImpl) o; - if (!java.util.Objects.equals(key, that.key)) return false; - - if (!java.util.Objects.equals(mode, that.mode)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(key, mode, path, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (key != null) { sb.append("key:"); sb.append(key + ","); } - if (mode != null) { sb.append("mode:"); sb.append(mode + ","); } - if (path != null) { sb.append("path:"); sb.append(path); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorBuilder.java index c36d601fd9..e0629e1de4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LabelSelectorBuilder extends V1LabelSelectorFluentImpl implements VisitableBuilder{ +public class V1LabelSelectorBuilder extends V1LabelSelectorFluent implements VisitableBuilder{ public V1LabelSelectorBuilder() { - this(false); - } - public V1LabelSelectorBuilder(Boolean validationEnabled) { - this(new V1LabelSelector(), validationEnabled); + this(new V1LabelSelector()); } + public V1LabelSelectorBuilder(V1LabelSelectorFluent fluent) { - this(fluent, false); - } - public V1LabelSelectorBuilder(V1LabelSelectorFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LabelSelector(), validationEnabled); + this(fluent, new V1LabelSelector()); } + public V1LabelSelectorBuilder(V1LabelSelectorFluent fluent,V1LabelSelector instance) { - this(fluent, instance, false); - } - public V1LabelSelectorBuilder(V1LabelSelectorFluent fluent,V1LabelSelector instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMatchExpressions(instance.getMatchExpressions()); - fluent.withMatchLabels(instance.getMatchLabels()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LabelSelectorBuilder(V1LabelSelector instance) { - this(instance,false); - } - public V1LabelSelectorBuilder(V1LabelSelector instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMatchExpressions(instance.getMatchExpressions()); - this.withMatchLabels(instance.getMatchLabels()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LabelSelectorFluent fluent; - Boolean validationEnabled; + public V1LabelSelector build() { V1LabelSelector buildable = new V1LabelSelector(); - buildable.setMatchExpressions(fluent.getMatchExpressions()); + buildable.setMatchExpressions(fluent.buildMatchExpressions()); buildable.setMatchLabels(fluent.getMatchLabels()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorFluent.java index 7f3be2c65c..ccfb28f31f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorFluent.java @@ -1,65 +1,268 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1LabelSelectorFluent> extends Fluent{ - public A addToMatchExpressions(int index,V1LabelSelectorRequirement item); - public A setToMatchExpressions(int index,V1LabelSelectorRequirement item); - public A addToMatchExpressions(io.kubernetes.client.openapi.models.V1LabelSelectorRequirement... items); - public A addAllToMatchExpressions(Collection items); - public A removeFromMatchExpressions(io.kubernetes.client.openapi.models.V1LabelSelectorRequirement... items); - public A removeAllFromMatchExpressions(Collection items); - public A removeMatchingFromMatchExpressions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMatchExpressions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchExpressions(); - public List buildMatchExpressions(); - public V1LabelSelectorRequirement buildMatchExpression(int index); - public V1LabelSelectorRequirement buildFirstMatchExpression(); - public V1LabelSelectorRequirement buildLastMatchExpression(); - public V1LabelSelectorRequirement buildMatchingMatchExpression(Predicate predicate); - public Boolean hasMatchingMatchExpression(Predicate predicate); - public A withMatchExpressions(List matchExpressions); - public A withMatchExpressions(io.kubernetes.client.openapi.models.V1LabelSelectorRequirement... matchExpressions); - public Boolean hasMatchExpressions(); - public V1LabelSelectorFluent.MatchExpressionsNested addNewMatchExpression(); - public V1LabelSelectorFluent.MatchExpressionsNested addNewMatchExpressionLike(V1LabelSelectorRequirement item); - public V1LabelSelectorFluent.MatchExpressionsNested setNewMatchExpressionLike(int index,V1LabelSelectorRequirement item); - public V1LabelSelectorFluent.MatchExpressionsNested editMatchExpression(int index); - public V1LabelSelectorFluent.MatchExpressionsNested editFirstMatchExpression(); - public V1LabelSelectorFluent.MatchExpressionsNested editLastMatchExpression(); - public V1LabelSelectorFluent.MatchExpressionsNested editMatchingMatchExpression(Predicate predicate); - public A addToMatchLabels(String key,String value); - public A addToMatchLabels(Map map); - public A removeFromMatchLabels(String key); - public A removeFromMatchLabels(Map map); - public Map getMatchLabels(); - public A withMatchLabels(Map matchLabels); - public Boolean hasMatchLabels(); - public interface MatchExpressionsNested extends Nested,V1LabelSelectorRequirementFluent>{ - public N and(); - public N endMatchExpression(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LabelSelectorFluent> extends BaseFluent{ + public V1LabelSelectorFluent() { + } + + public V1LabelSelectorFluent(V1LabelSelector instance) { + this.copyInstance(instance); + } + private ArrayList matchExpressions; + private Map matchLabels; + + protected void copyInstance(V1LabelSelector instance) { + instance = (instance != null ? instance : new V1LabelSelector()); + if (instance != null) { + this.withMatchExpressions(instance.getMatchExpressions()); + this.withMatchLabels(instance.getMatchLabels()); + } + } + + public A addToMatchExpressions(int index,V1LabelSelectorRequirement item) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item); + if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").add(index, builder); matchExpressions.add(index, builder);} + return (A)this; + } + + public A setToMatchExpressions(int index,V1LabelSelectorRequirement item) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item); + if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").set(index, builder); matchExpressions.set(index, builder);} + return (A)this; + } + + public A addToMatchExpressions(io.kubernetes.client.openapi.models.V1LabelSelectorRequirement... items) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + for (V1LabelSelectorRequirement item : items) {V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; + } + + public A addAllToMatchExpressions(Collection items) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + for (V1LabelSelectorRequirement item : items) {V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; + } + + public A removeFromMatchExpressions(io.kubernetes.client.openapi.models.V1LabelSelectorRequirement... items) { + if (this.matchExpressions == null) return (A)this; + for (V1LabelSelectorRequirement item : items) {V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder); this.matchExpressions.remove(builder);} return (A)this; + } + + public A removeAllFromMatchExpressions(Collection items) { + if (this.matchExpressions == null) return (A)this; + for (V1LabelSelectorRequirement item : items) {V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder); this.matchExpressions.remove(builder);} return (A)this; + } + + public A removeMatchingFromMatchExpressions(Predicate predicate) { + if (matchExpressions == null) return (A) this; + final Iterator each = matchExpressions.iterator(); + final List visitables = _visitables.get("matchExpressions"); + while (each.hasNext()) { + V1LabelSelectorRequirementBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMatchExpressions() { + return this.matchExpressions != null ? build(matchExpressions) : null; + } + + public V1LabelSelectorRequirement buildMatchExpression(int index) { + return this.matchExpressions.get(index).build(); + } + + public V1LabelSelectorRequirement buildFirstMatchExpression() { + return this.matchExpressions.get(0).build(); + } + + public V1LabelSelectorRequirement buildLastMatchExpression() { + return this.matchExpressions.get(matchExpressions.size() - 1).build(); + } + + public V1LabelSelectorRequirement buildMatchingMatchExpression(Predicate predicate) { + for (V1LabelSelectorRequirementBuilder item : matchExpressions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMatchExpression(Predicate predicate) { + for (V1LabelSelectorRequirementBuilder item : matchExpressions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMatchExpressions(List matchExpressions) { + if (this.matchExpressions != null) { + this._visitables.get("matchExpressions").clear(); + } + if (matchExpressions != null) { + this.matchExpressions = new ArrayList(); + for (V1LabelSelectorRequirement item : matchExpressions) { + this.addToMatchExpressions(item); + } + } else { + this.matchExpressions = null; + } + return (A) this; + } + + public A withMatchExpressions(io.kubernetes.client.openapi.models.V1LabelSelectorRequirement... matchExpressions) { + if (this.matchExpressions != null) { + this.matchExpressions.clear(); + _visitables.remove("matchExpressions"); + } + if (matchExpressions != null) { + for (V1LabelSelectorRequirement item : matchExpressions) { + this.addToMatchExpressions(item); + } + } + return (A) this; + } + + public boolean hasMatchExpressions() { + return this.matchExpressions != null && !this.matchExpressions.isEmpty(); + } + + public MatchExpressionsNested addNewMatchExpression() { + return new MatchExpressionsNested(-1, null); + } + + public MatchExpressionsNested addNewMatchExpressionLike(V1LabelSelectorRequirement item) { + return new MatchExpressionsNested(-1, item); + } + + public MatchExpressionsNested setNewMatchExpressionLike(int index,V1LabelSelectorRequirement item) { + return new MatchExpressionsNested(index, item); + } + + public MatchExpressionsNested editMatchExpression(int index) { + if (matchExpressions.size() <= index) throw new RuntimeException("Can't edit matchExpressions. Index exceeds size."); + return setNewMatchExpressionLike(index, buildMatchExpression(index)); + } + + public MatchExpressionsNested editFirstMatchExpression() { + if (matchExpressions.size() == 0) throw new RuntimeException("Can't edit first matchExpressions. The list is empty."); + return setNewMatchExpressionLike(0, buildMatchExpression(0)); + } + + public MatchExpressionsNested editLastMatchExpression() { + int index = matchExpressions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last matchExpressions. The list is empty."); + return setNewMatchExpressionLike(index, buildMatchExpression(index)); + } + + public MatchExpressionsNested editMatchingMatchExpression(Predicate predicate) { + int index = -1; + for (int i=0;i map) { + if(this.matchLabels == null && map != null) { this.matchLabels = new LinkedHashMap(); } + if(map != null) { this.matchLabels.putAll(map);} return (A)this; + } + + public A removeFromMatchLabels(String key) { + if(this.matchLabels == null) { return (A) this; } + if(key != null && this.matchLabels != null) {this.matchLabels.remove(key);} return (A)this; } + public A removeFromMatchLabels(Map map) { + if(this.matchLabels == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.matchLabels != null){this.matchLabels.remove(key);}}} return (A)this; + } + + public Map getMatchLabels() { + return this.matchLabels; + } + + public A withMatchLabels(Map matchLabels) { + if (matchLabels == null) { + this.matchLabels = null; + } else { + this.matchLabels = new LinkedHashMap(matchLabels); + } + return (A) this; + } + + public boolean hasMatchLabels() { + return this.matchLabels != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LabelSelectorFluent that = (V1LabelSelectorFluent) o; + if (!java.util.Objects.equals(matchExpressions, that.matchExpressions)) return false; + if (!java.util.Objects.equals(matchLabels, that.matchLabels)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(matchExpressions, matchLabels, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (matchExpressions != null && !matchExpressions.isEmpty()) { sb.append("matchExpressions:"); sb.append(matchExpressions + ","); } + if (matchLabels != null && !matchLabels.isEmpty()) { sb.append("matchLabels:"); sb.append(matchLabels); } + sb.append("}"); + return sb.toString(); + } + public class MatchExpressionsNested extends V1LabelSelectorRequirementFluent> implements Nested{ + MatchExpressionsNested(int index,V1LabelSelectorRequirement item) { + this.index = index; + this.builder = new V1LabelSelectorRequirementBuilder(this, item); + } + V1LabelSelectorRequirementBuilder builder; + int index; + + public N and() { + return (N) V1LabelSelectorFluent.this.setToMatchExpressions(index,builder.build()); + } + + public N endMatchExpression() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorFluentImpl.java deleted file mode 100644 index 6f31bd4238..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorFluentImpl.java +++ /dev/null @@ -1,208 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LabelSelectorFluentImpl> extends BaseFluent implements V1LabelSelectorFluent{ - public V1LabelSelectorFluentImpl() { - } - public V1LabelSelectorFluentImpl(V1LabelSelector instance) { - if (instance != null) { - this.withMatchExpressions(instance.getMatchExpressions()); - this.withMatchLabels(instance.getMatchLabels()); - } - } - private ArrayList matchExpressions; - private Map matchLabels; - public A addToMatchExpressions(int index,V1LabelSelectorRequirement item) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item); - if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").add(index, builder); matchExpressions.add(index, builder);} - return (A)this; - } - public A setToMatchExpressions(int index,V1LabelSelectorRequirement item) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item); - if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").set(index, builder); matchExpressions.set(index, builder);} - return (A)this; - } - public A addToMatchExpressions(io.kubernetes.client.openapi.models.V1LabelSelectorRequirement... items) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - for (V1LabelSelectorRequirement item : items) {V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; - } - public A addAllToMatchExpressions(Collection items) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - for (V1LabelSelectorRequirement item : items) {V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; - } - public A removeFromMatchExpressions(io.kubernetes.client.openapi.models.V1LabelSelectorRequirement... items) { - for (V1LabelSelectorRequirement item : items) {V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder);if (this.matchExpressions != null) {this.matchExpressions.remove(builder);}} return (A)this; - } - public A removeAllFromMatchExpressions(Collection items) { - for (V1LabelSelectorRequirement item : items) {V1LabelSelectorRequirementBuilder builder = new V1LabelSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder);if (this.matchExpressions != null) {this.matchExpressions.remove(builder);}} return (A)this; - } - public A removeMatchingFromMatchExpressions(Predicate predicate) { - if (matchExpressions == null) return (A) this; - final Iterator each = matchExpressions.iterator(); - final List visitables = _visitables.get("matchExpressions"); - while (each.hasNext()) { - V1LabelSelectorRequirementBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildMatchExpressions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchExpressions() { - return matchExpressions != null ? build(matchExpressions) : null; - } - public List buildMatchExpressions() { - return matchExpressions != null ? build(matchExpressions) : null; - } - public V1LabelSelectorRequirement buildMatchExpression(int index) { - return this.matchExpressions.get(index).build(); - } - public V1LabelSelectorRequirement buildFirstMatchExpression() { - return this.matchExpressions.get(0).build(); - } - public V1LabelSelectorRequirement buildLastMatchExpression() { - return this.matchExpressions.get(matchExpressions.size() - 1).build(); - } - public V1LabelSelectorRequirement buildMatchingMatchExpression(Predicate predicate) { - for (V1LabelSelectorRequirementBuilder item: matchExpressions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingMatchExpression(Predicate predicate) { - for (V1LabelSelectorRequirementBuilder item: matchExpressions) { if(predicate.test(item)){ return true;} } return false; - } - public A withMatchExpressions(List matchExpressions) { - if (this.matchExpressions != null) { _visitables.get("matchExpressions").clear();} - if (matchExpressions != null) {this.matchExpressions = new ArrayList(); for (V1LabelSelectorRequirement item : matchExpressions){this.addToMatchExpressions(item);}} else { this.matchExpressions = null;} return (A) this; - } - public A withMatchExpressions(io.kubernetes.client.openapi.models.V1LabelSelectorRequirement... matchExpressions) { - if (this.matchExpressions != null) {this.matchExpressions.clear(); _visitables.remove("matchExpressions"); } - if (matchExpressions != null) {for (V1LabelSelectorRequirement item :matchExpressions){ this.addToMatchExpressions(item);}} return (A) this; - } - public Boolean hasMatchExpressions() { - return matchExpressions != null && !matchExpressions.isEmpty(); - } - public V1LabelSelectorFluentImpl.MatchExpressionsNested addNewMatchExpression() { - return new V1LabelSelectorFluentImpl.MatchExpressionsNestedImpl(); - } - public V1LabelSelectorFluentImpl.MatchExpressionsNested addNewMatchExpressionLike(V1LabelSelectorRequirement item) { - return new V1LabelSelectorFluentImpl.MatchExpressionsNestedImpl(-1, item); - } - public V1LabelSelectorFluentImpl.MatchExpressionsNested setNewMatchExpressionLike(int index,V1LabelSelectorRequirement item) { - return new V1LabelSelectorFluentImpl.MatchExpressionsNestedImpl(index, item); - } - public V1LabelSelectorFluentImpl.MatchExpressionsNested editMatchExpression(int index) { - if (matchExpressions.size() <= index) throw new RuntimeException("Can't edit matchExpressions. Index exceeds size."); - return setNewMatchExpressionLike(index, buildMatchExpression(index)); - } - public V1LabelSelectorFluentImpl.MatchExpressionsNested editFirstMatchExpression() { - if (matchExpressions.size() == 0) throw new RuntimeException("Can't edit first matchExpressions. The list is empty."); - return setNewMatchExpressionLike(0, buildMatchExpression(0)); - } - public V1LabelSelectorFluentImpl.MatchExpressionsNested editLastMatchExpression() { - int index = matchExpressions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last matchExpressions. The list is empty."); - return setNewMatchExpressionLike(index, buildMatchExpression(index)); - } - public V1LabelSelectorFluentImpl.MatchExpressionsNested editMatchingMatchExpression(Predicate predicate) { - int index = -1; - for (int i=0;i map) { - if(this.matchLabels == null && map != null) { this.matchLabels = new LinkedHashMap(); } - if(map != null) { this.matchLabels.putAll(map);} return (A)this; - } - public A removeFromMatchLabels(String key) { - if(this.matchLabels == null) { return (A) this; } - if(key != null && this.matchLabels != null) {this.matchLabels.remove(key);} return (A)this; - } - public A removeFromMatchLabels(Map map) { - if(this.matchLabels == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.matchLabels != null){this.matchLabels.remove(key);}}} return (A)this; - } - public Map getMatchLabels() { - return this.matchLabels; - } - public A withMatchLabels(Map matchLabels) { - if (matchLabels == null) { this.matchLabels = null;} else {this.matchLabels = new LinkedHashMap(matchLabels);} return (A) this; - } - public Boolean hasMatchLabels() { - return this.matchLabels != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LabelSelectorFluentImpl that = (V1LabelSelectorFluentImpl) o; - if (!java.util.Objects.equals(matchExpressions, that.matchExpressions)) return false; - - if (!java.util.Objects.equals(matchLabels, that.matchLabels)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(matchExpressions, matchLabels, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (matchExpressions != null) { sb.append("matchExpressions:"); sb.append(matchExpressions + ","); } - if (matchLabels != null && !matchLabels.isEmpty()) { sb.append("matchLabels:"); sb.append(matchLabels); } - sb.append("}"); - return sb.toString(); - } - class MatchExpressionsNestedImpl extends V1LabelSelectorRequirementFluentImpl> implements V1LabelSelectorFluentImpl.MatchExpressionsNested,Nested{ - MatchExpressionsNestedImpl(int index,V1LabelSelectorRequirement item) { - this.index = index; - this.builder = new V1LabelSelectorRequirementBuilder(this, item); - } - MatchExpressionsNestedImpl() { - this.index = -1; - this.builder = new V1LabelSelectorRequirementBuilder(this); - } - V1LabelSelectorRequirementBuilder builder; - int index; - public N and() { - return (N) V1LabelSelectorFluentImpl.this.setToMatchExpressions(index,builder.build()); - } - public N endMatchExpression() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementBuilder.java index c83630fcab..f4c88db363 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LabelSelectorRequirementBuilder extends V1LabelSelectorRequirementFluentImpl implements VisitableBuilder{ +public class V1LabelSelectorRequirementBuilder extends V1LabelSelectorRequirementFluent implements VisitableBuilder{ public V1LabelSelectorRequirementBuilder() { - this(false); - } - public V1LabelSelectorRequirementBuilder(Boolean validationEnabled) { - this(new V1LabelSelectorRequirement(), validationEnabled); + this(new V1LabelSelectorRequirement()); } + public V1LabelSelectorRequirementBuilder(V1LabelSelectorRequirementFluent fluent) { - this(fluent, false); - } - public V1LabelSelectorRequirementBuilder(V1LabelSelectorRequirementFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LabelSelectorRequirement(), validationEnabled); + this(fluent, new V1LabelSelectorRequirement()); } + public V1LabelSelectorRequirementBuilder(V1LabelSelectorRequirementFluent fluent,V1LabelSelectorRequirement instance) { - this(fluent, instance, false); - } - public V1LabelSelectorRequirementBuilder(V1LabelSelectorRequirementFluent fluent,V1LabelSelectorRequirement instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withKey(instance.getKey()); - fluent.withOperator(instance.getOperator()); - fluent.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LabelSelectorRequirementBuilder(V1LabelSelectorRequirement instance) { - this(instance,false); - } - public V1LabelSelectorRequirementBuilder(V1LabelSelectorRequirement instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withKey(instance.getKey()); - this.withOperator(instance.getOperator()); - this.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LabelSelectorRequirementFluent fluent; - Boolean validationEnabled; + public V1LabelSelectorRequirement build() { V1LabelSelectorRequirement buildable = new V1LabelSelectorRequirement(); buildable.setKey(fluent.getKey()); @@ -49,4 +29,5 @@ public V1LabelSelectorRequirement build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementFluent.java index 2cd4c00265..0a19d1d81e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementFluent.java @@ -1,38 +1,182 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1LabelSelectorRequirementFluent> extends Fluent{ - public String getKey(); - public A withKey(String key); - public Boolean hasKey(); - public String getOperator(); - public A withOperator(String operator); - public Boolean hasOperator(); - public A addToValues(int index,String item); - public A setToValues(int index,String item); - public A addToValues(java.lang.String... items); - public A addAllToValues(Collection items); - public A removeFromValues(java.lang.String... items); - public A removeAllFromValues(Collection items); - public List getValues(); - public String getValue(int index); - public String getFirstValue(); - public String getLastValue(); - public String getMatchingValue(Predicate predicate); - public Boolean hasMatchingValue(Predicate predicate); - public A withValues(List values); - public A withValues(java.lang.String... values); - public Boolean hasValues(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LabelSelectorRequirementFluent> extends BaseFluent{ + public V1LabelSelectorRequirementFluent() { + } + public V1LabelSelectorRequirementFluent(V1LabelSelectorRequirement instance) { + this.copyInstance(instance); + } + private String key; + private String operator; + private List values; + + protected void copyInstance(V1LabelSelectorRequirement instance) { + instance = (instance != null ? instance : new V1LabelSelectorRequirement()); + if (instance != null) { + this.withKey(instance.getKey()); + this.withOperator(instance.getOperator()); + this.withValues(instance.getValues()); + } + } + + public String getKey() { + return this.key; + } + + public A withKey(String key) { + this.key = key; + return (A) this; + } + + public boolean hasKey() { + return this.key != null; + } + + public String getOperator() { + return this.operator; + } + + public A withOperator(String operator) { + this.operator = operator; + return (A) this; + } + + public boolean hasOperator() { + return this.operator != null; + } + + public A addToValues(int index,String item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.add(index, item); + return (A)this; + } + + public A setToValues(int index,String item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.set(index, item); return (A)this; + } + + public A addToValues(java.lang.String... items) { + if (this.values == null) {this.values = new ArrayList();} + for (String item : items) {this.values.add(item);} return (A)this; + } + + public A addAllToValues(Collection items) { + if (this.values == null) {this.values = new ArrayList();} + for (String item : items) {this.values.add(item);} return (A)this; + } + + public A removeFromValues(java.lang.String... items) { + if (this.values == null) return (A)this; + for (String item : items) { this.values.remove(item);} return (A)this; + } + + public A removeAllFromValues(Collection items) { + if (this.values == null) return (A)this; + for (String item : items) { this.values.remove(item);} return (A)this; + } + + public List getValues() { + return this.values; + } + + public String getValue(int index) { + return this.values.get(index); + } + + public String getFirstValue() { + return this.values.get(0); + } + + public String getLastValue() { + return this.values.get(values.size() - 1); + } + + public String getMatchingValue(Predicate predicate) { + for (String item : values) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingValue(Predicate predicate) { + for (String item : values) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withValues(List values) { + if (values != null) { + this.values = new ArrayList(); + for (String item : values) { + this.addToValues(item); + } + } else { + this.values = null; + } + return (A) this; + } + + public A withValues(java.lang.String... values) { + if (this.values != null) { + this.values.clear(); + _visitables.remove("values"); + } + if (values != null) { + for (String item : values) { + this.addToValues(item); + } + } + return (A) this; + } + + public boolean hasValues() { + return this.values != null && !this.values.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LabelSelectorRequirementFluent that = (V1LabelSelectorRequirementFluent) o; + if (!java.util.Objects.equals(key, that.key)) return false; + if (!java.util.Objects.equals(operator, that.operator)) return false; + if (!java.util.Objects.equals(values, that.values)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(key, operator, values, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (key != null) { sb.append("key:"); sb.append(key + ","); } + if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } + if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementFluentImpl.java deleted file mode 100644 index 886724ce52..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LabelSelectorRequirementFluentImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LabelSelectorRequirementFluentImpl> extends BaseFluent implements V1LabelSelectorRequirementFluent{ - public V1LabelSelectorRequirementFluentImpl() { - } - public V1LabelSelectorRequirementFluentImpl(V1LabelSelectorRequirement instance) { - if (instance != null) { - this.withKey(instance.getKey()); - this.withOperator(instance.getOperator()); - this.withValues(instance.getValues()); - } - } - private String key; - private String operator; - private List values; - public String getKey() { - return this.key; - } - public A withKey(String key) { - this.key=key; return (A) this; - } - public Boolean hasKey() { - return this.key != null; - } - public String getOperator() { - return this.operator; - } - public A withOperator(String operator) { - this.operator=operator; return (A) this; - } - public Boolean hasOperator() { - return this.operator != null; - } - public A addToValues(int index,String item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.add(index, item); - return (A)this; - } - public A setToValues(int index,String item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.set(index, item); return (A)this; - } - public A addToValues(java.lang.String... items) { - if (this.values == null) {this.values = new ArrayList();} - for (String item : items) {this.values.add(item);} return (A)this; - } - public A addAllToValues(Collection items) { - if (this.values == null) {this.values = new ArrayList();} - for (String item : items) {this.values.add(item);} return (A)this; - } - public A removeFromValues(java.lang.String... items) { - for (String item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public A removeAllFromValues(Collection items) { - for (String item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public List getValues() { - return this.values; - } - public String getValue(int index) { - return this.values.get(index); - } - public String getFirstValue() { - return this.values.get(0); - } - public String getLastValue() { - return this.values.get(values.size() - 1); - } - public String getMatchingValue(Predicate predicate) { - for (String item: values) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingValue(Predicate predicate) { - for (String item: values) { if(predicate.test(item)){ return true;} } return false; - } - public A withValues(List values) { - if (values != null) {this.values = new ArrayList(); for (String item : values){this.addToValues(item);}} else { this.values = null;} return (A) this; - } - public A withValues(java.lang.String... values) { - if (this.values != null) {this.values.clear(); _visitables.remove("values"); } - if (values != null) {for (String item :values){ this.addToValues(item);}} return (A) this; - } - public Boolean hasValues() { - return values != null && !values.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LabelSelectorRequirementFluentImpl that = (V1LabelSelectorRequirementFluentImpl) o; - if (!java.util.Objects.equals(key, that.key)) return false; - - if (!java.util.Objects.equals(operator, that.operator)) return false; - - if (!java.util.Objects.equals(values, that.values)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(key, operator, values, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (key != null) { sb.append("key:"); sb.append(key + ","); } - if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } - if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseBuilder.java index d68c907720..8e1f73cec4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LeaseBuilder extends V1LeaseFluentImpl implements VisitableBuilder{ +public class V1LeaseBuilder extends V1LeaseFluent implements VisitableBuilder{ public V1LeaseBuilder() { - this(false); - } - public V1LeaseBuilder(Boolean validationEnabled) { - this(new V1Lease(), validationEnabled); + this(new V1Lease()); } + public V1LeaseBuilder(V1LeaseFluent fluent) { - this(fluent, false); - } - public V1LeaseBuilder(V1LeaseFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Lease(), validationEnabled); + this(fluent, new V1Lease()); } + public V1LeaseBuilder(V1LeaseFluent fluent,V1Lease instance) { - this(fluent, instance, false); - } - public V1LeaseBuilder(V1LeaseFluent fluent,V1Lease instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LeaseBuilder(V1Lease instance) { - this(instance,false); - } - public V1LeaseBuilder(V1Lease instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LeaseFluent fluent; - Boolean validationEnabled; + public V1Lease build() { V1Lease buildable = new V1Lease(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseFluent.java index f5f401dfa4..f65f2970c5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1LeaseFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1LeaseFluent.MetadataNested withNewMetadata(); - public V1LeaseFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1LeaseFluent.MetadataNested editMetadata(); - public V1LeaseFluent.MetadataNested editOrNewMetadata(); - public V1LeaseFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1LeaseSpec getSpec(); - public V1LeaseSpec buildSpec(); - public A withSpec(V1LeaseSpec spec); - public Boolean hasSpec(); - public V1LeaseFluent.SpecNested withNewSpec(); - public V1LeaseFluent.SpecNested withNewSpecLike(V1LeaseSpec item); - public V1LeaseFluent.SpecNested editSpec(); - public V1LeaseFluent.SpecNested editOrNewSpec(); - public V1LeaseFluent.SpecNested editOrNewSpecLike(V1LeaseSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LeaseFluent> extends BaseFluent{ + public V1LeaseFluent() { + } + + public V1LeaseFluent(V1Lease instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1LeaseSpecBuilder spec; + + protected void copyInstance(V1Lease instance) { + instance = (instance != null ? instance : new V1Lease()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1LeaseSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1LeaseSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1LeaseSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1LeaseSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1LeaseSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1LeaseSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1LeaseSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LeaseFluent that = (V1LeaseFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1LeaseFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1LeaseSpecFluent> implements Nested{ + SpecNested(V1LeaseSpec item) { + this.builder = new V1LeaseSpecBuilder(this, item); + } + V1LeaseSpecBuilder builder; + + public N and() { + return (N) V1LeaseFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseFluentImpl.java deleted file mode 100644 index b5800c70b8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LeaseFluentImpl> extends BaseFluent implements V1LeaseFluent{ - public V1LeaseFluentImpl() { - } - public V1LeaseFluentImpl(V1Lease instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1LeaseSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1LeaseFluentImpl.MetadataNested withNewMetadata() { - return new V1LeaseFluentImpl.MetadataNestedImpl(); - } - public V1LeaseFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1LeaseFluentImpl.MetadataNestedImpl(item); - } - public V1LeaseFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1LeaseFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1LeaseFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1LeaseSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1LeaseSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1LeaseSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1LeaseSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1LeaseFluentImpl.SpecNested withNewSpec() { - return new V1LeaseFluentImpl.SpecNestedImpl(); - } - public V1LeaseFluentImpl.SpecNested withNewSpecLike(V1LeaseSpec item) { - return new V1LeaseFluentImpl.SpecNestedImpl(item); - } - public V1LeaseFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1LeaseFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1LeaseSpecBuilder().build()); - } - public V1LeaseFluentImpl.SpecNested editOrNewSpecLike(V1LeaseSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LeaseFluentImpl that = (V1LeaseFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1LeaseFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1LeaseFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1LeaseSpecFluentImpl> implements V1LeaseFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1LeaseSpec item) { - this.builder = new V1LeaseSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1LeaseSpecBuilder(this); - } - V1LeaseSpecBuilder builder; - public N and() { - return (N) V1LeaseFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListBuilder.java index 2bfa194af3..06ab94c424 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LeaseListBuilder extends V1LeaseListFluentImpl implements VisitableBuilder{ +public class V1LeaseListBuilder extends V1LeaseListFluent implements VisitableBuilder{ public V1LeaseListBuilder() { - this(false); - } - public V1LeaseListBuilder(Boolean validationEnabled) { - this(new V1LeaseList(), validationEnabled); + this(new V1LeaseList()); } + public V1LeaseListBuilder(V1LeaseListFluent fluent) { - this(fluent, false); - } - public V1LeaseListBuilder(V1LeaseListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LeaseList(), validationEnabled); + this(fluent, new V1LeaseList()); } + public V1LeaseListBuilder(V1LeaseListFluent fluent,V1LeaseList instance) { - this(fluent, instance, false); - } - public V1LeaseListBuilder(V1LeaseListFluent fluent,V1LeaseList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LeaseListBuilder(V1LeaseList instance) { - this(instance,false); - } - public V1LeaseListBuilder(V1LeaseList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LeaseListFluent fluent; - Boolean validationEnabled; + public V1LeaseList build() { V1LeaseList buildable = new V1LeaseList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListFluent.java index a155aa32de..a8c3b7cc96 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1LeaseListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Lease item); - public A setToItems(int index,V1Lease item); - public A addToItems(io.kubernetes.client.openapi.models.V1Lease... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Lease... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Lease buildItem(int index); - public V1Lease buildFirstItem(); - public V1Lease buildLastItem(); - public V1Lease buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Lease... items); - public Boolean hasItems(); - public V1LeaseListFluent.ItemsNested addNewItem(); - public V1LeaseListFluent.ItemsNested addNewItemLike(V1Lease item); - public V1LeaseListFluent.ItemsNested setNewItemLike(int index,V1Lease item); - public V1LeaseListFluent.ItemsNested editItem(int index); - public V1LeaseListFluent.ItemsNested editFirstItem(); - public V1LeaseListFluent.ItemsNested editLastItem(); - public V1LeaseListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1LeaseListFluent.MetadataNested withNewMetadata(); - public V1LeaseListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1LeaseListFluent.MetadataNested editMetadata(); - public V1LeaseListFluent.MetadataNested editOrNewMetadata(); - public V1LeaseListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1LeaseFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LeaseListFluent> extends BaseFluent{ + public V1LeaseListFluent() { + } + + public V1LeaseListFluent(V1LeaseList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1LeaseList instance) { + instance = (instance != null ? instance : new V1LeaseList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Lease item) { + if (this.items == null) {this.items = new ArrayList();} + V1LeaseBuilder builder = new V1LeaseBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Lease item) { + if (this.items == null) {this.items = new ArrayList();} + V1LeaseBuilder builder = new V1LeaseBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Lease... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Lease item : items) {V1LeaseBuilder builder = new V1LeaseBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Lease item : items) {V1LeaseBuilder builder = new V1LeaseBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Lease... items) { + if (this.items == null) return (A)this; + for (V1Lease item : items) {V1LeaseBuilder builder = new V1LeaseBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Lease item : items) {V1LeaseBuilder builder = new V1LeaseBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1LeaseBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Lease buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Lease buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Lease buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Lease buildMatchingItem(Predicate predicate) { + for (V1LeaseBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1LeaseBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Lease item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Lease... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Lease item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Lease item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Lease item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LeaseListFluent that = (V1LeaseListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1LeaseFluent> implements Nested{ + ItemsNested(int index,V1Lease item) { + this.index = index; + this.builder = new V1LeaseBuilder(this, item); + } + V1LeaseBuilder builder; + int index; + public N and() { + return (N) V1LeaseListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1LeaseListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListFluentImpl.java deleted file mode 100644 index 74becd2bd9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LeaseListFluentImpl> extends BaseFluent implements V1LeaseListFluent{ - public V1LeaseListFluentImpl() { - } - public V1LeaseListFluentImpl(V1LeaseList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Lease item) { - if (this.items == null) {this.items = new ArrayList();} - V1LeaseBuilder builder = new V1LeaseBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Lease item) { - if (this.items == null) {this.items = new ArrayList();} - V1LeaseBuilder builder = new V1LeaseBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Lease... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Lease item : items) {V1LeaseBuilder builder = new V1LeaseBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Lease item : items) {V1LeaseBuilder builder = new V1LeaseBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Lease... items) { - for (V1Lease item : items) {V1LeaseBuilder builder = new V1LeaseBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Lease item : items) {V1LeaseBuilder builder = new V1LeaseBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1LeaseBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Lease buildItem(int index) { - return this.items.get(index).build(); - } - public V1Lease buildFirstItem() { - return this.items.get(0).build(); - } - public V1Lease buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Lease buildMatchingItem(Predicate predicate) { - for (V1LeaseBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1LeaseBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Lease item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Lease... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Lease item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1LeaseListFluentImpl.ItemsNested addNewItem() { - return new V1LeaseListFluentImpl.ItemsNestedImpl(); - } - public V1LeaseListFluentImpl.ItemsNested addNewItemLike(V1Lease item) { - return new V1LeaseListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1LeaseListFluentImpl.ItemsNested setNewItemLike(int index,V1Lease item) { - return new V1LeaseListFluentImpl.ItemsNestedImpl(index, item); - } - public V1LeaseListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1LeaseListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1LeaseListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1LeaseListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1LeaseListFluentImpl.MetadataNestedImpl(); - } - public V1LeaseListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1LeaseListFluentImpl.MetadataNestedImpl(item); - } - public V1LeaseListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1LeaseListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1LeaseListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LeaseListFluentImpl that = (V1LeaseListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1LeaseFluentImpl> implements V1LeaseListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Lease item) { - this.index = index; - this.builder = new V1LeaseBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1LeaseBuilder(this); - } - V1LeaseBuilder builder; - int index; - public N and() { - return (N) V1LeaseListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1LeaseListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1LeaseListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecBuilder.java index d4fc3f4e38..ac17791b2d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LeaseSpecBuilder extends V1LeaseSpecFluentImpl implements VisitableBuilder{ +public class V1LeaseSpecBuilder extends V1LeaseSpecFluent implements VisitableBuilder{ public V1LeaseSpecBuilder() { - this(false); - } - public V1LeaseSpecBuilder(Boolean validationEnabled) { - this(new V1LeaseSpec(), validationEnabled); + this(new V1LeaseSpec()); } + public V1LeaseSpecBuilder(V1LeaseSpecFluent fluent) { - this(fluent, false); - } - public V1LeaseSpecBuilder(V1LeaseSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LeaseSpec(), validationEnabled); + this(fluent, new V1LeaseSpec()); } + public V1LeaseSpecBuilder(V1LeaseSpecFluent fluent,V1LeaseSpec instance) { - this(fluent, instance, false); - } - public V1LeaseSpecBuilder(V1LeaseSpecFluent fluent,V1LeaseSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAcquireTime(instance.getAcquireTime()); - fluent.withHolderIdentity(instance.getHolderIdentity()); - fluent.withLeaseDurationSeconds(instance.getLeaseDurationSeconds()); - fluent.withLeaseTransitions(instance.getLeaseTransitions()); - fluent.withRenewTime(instance.getRenewTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LeaseSpecBuilder(V1LeaseSpec instance) { - this(instance,false); - } - public V1LeaseSpecBuilder(V1LeaseSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAcquireTime(instance.getAcquireTime()); - this.withHolderIdentity(instance.getHolderIdentity()); - this.withLeaseDurationSeconds(instance.getLeaseDurationSeconds()); - this.withLeaseTransitions(instance.getLeaseTransitions()); - this.withRenewTime(instance.getRenewTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LeaseSpecFluent fluent; - Boolean validationEnabled; + public V1LeaseSpec build() { V1LeaseSpec buildable = new V1LeaseSpec(); buildable.setAcquireTime(fluent.getAcquireTime()); @@ -55,4 +31,5 @@ public V1LeaseSpec build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecFluent.java index fde0f012b8..e4b244a865 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecFluent.java @@ -2,29 +2,132 @@ import java.lang.Integer; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1LeaseSpecFluent> extends Fluent{ - public OffsetDateTime getAcquireTime(); - public A withAcquireTime(OffsetDateTime acquireTime); - public Boolean hasAcquireTime(); - public String getHolderIdentity(); - public A withHolderIdentity(String holderIdentity); - public Boolean hasHolderIdentity(); - public Integer getLeaseDurationSeconds(); - public A withLeaseDurationSeconds(Integer leaseDurationSeconds); - public Boolean hasLeaseDurationSeconds(); - public Integer getLeaseTransitions(); - public A withLeaseTransitions(Integer leaseTransitions); - public Boolean hasLeaseTransitions(); - public OffsetDateTime getRenewTime(); - public A withRenewTime(OffsetDateTime renewTime); - public Boolean hasRenewTime(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LeaseSpecFluent> extends BaseFluent{ + public V1LeaseSpecFluent() { + } + public V1LeaseSpecFluent(V1LeaseSpec instance) { + this.copyInstance(instance); + } + private OffsetDateTime acquireTime; + private String holderIdentity; + private Integer leaseDurationSeconds; + private Integer leaseTransitions; + private OffsetDateTime renewTime; + + protected void copyInstance(V1LeaseSpec instance) { + instance = (instance != null ? instance : new V1LeaseSpec()); + if (instance != null) { + this.withAcquireTime(instance.getAcquireTime()); + this.withHolderIdentity(instance.getHolderIdentity()); + this.withLeaseDurationSeconds(instance.getLeaseDurationSeconds()); + this.withLeaseTransitions(instance.getLeaseTransitions()); + this.withRenewTime(instance.getRenewTime()); + } + } + + public OffsetDateTime getAcquireTime() { + return this.acquireTime; + } + + public A withAcquireTime(OffsetDateTime acquireTime) { + this.acquireTime = acquireTime; + return (A) this; + } + + public boolean hasAcquireTime() { + return this.acquireTime != null; + } + + public String getHolderIdentity() { + return this.holderIdentity; + } + + public A withHolderIdentity(String holderIdentity) { + this.holderIdentity = holderIdentity; + return (A) this; + } + + public boolean hasHolderIdentity() { + return this.holderIdentity != null; + } + + public Integer getLeaseDurationSeconds() { + return this.leaseDurationSeconds; + } + + public A withLeaseDurationSeconds(Integer leaseDurationSeconds) { + this.leaseDurationSeconds = leaseDurationSeconds; + return (A) this; + } + + public boolean hasLeaseDurationSeconds() { + return this.leaseDurationSeconds != null; + } + + public Integer getLeaseTransitions() { + return this.leaseTransitions; + } + + public A withLeaseTransitions(Integer leaseTransitions) { + this.leaseTransitions = leaseTransitions; + return (A) this; + } + + public boolean hasLeaseTransitions() { + return this.leaseTransitions != null; + } + + public OffsetDateTime getRenewTime() { + return this.renewTime; + } + + public A withRenewTime(OffsetDateTime renewTime) { + this.renewTime = renewTime; + return (A) this; + } + + public boolean hasRenewTime() { + return this.renewTime != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LeaseSpecFluent that = (V1LeaseSpecFluent) o; + if (!java.util.Objects.equals(acquireTime, that.acquireTime)) return false; + if (!java.util.Objects.equals(holderIdentity, that.holderIdentity)) return false; + if (!java.util.Objects.equals(leaseDurationSeconds, that.leaseDurationSeconds)) return false; + if (!java.util.Objects.equals(leaseTransitions, that.leaseTransitions)) return false; + if (!java.util.Objects.equals(renewTime, that.renewTime)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(acquireTime, holderIdentity, leaseDurationSeconds, leaseTransitions, renewTime, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (acquireTime != null) { sb.append("acquireTime:"); sb.append(acquireTime + ","); } + if (holderIdentity != null) { sb.append("holderIdentity:"); sb.append(holderIdentity + ","); } + if (leaseDurationSeconds != null) { sb.append("leaseDurationSeconds:"); sb.append(leaseDurationSeconds + ","); } + if (leaseTransitions != null) { sb.append("leaseTransitions:"); sb.append(leaseTransitions + ","); } + if (renewTime != null) { sb.append("renewTime:"); sb.append(renewTime); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecFluentImpl.java deleted file mode 100644 index c79e338529..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpecFluentImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LeaseSpecFluentImpl> extends BaseFluent implements V1LeaseSpecFluent{ - public V1LeaseSpecFluentImpl() { - } - public V1LeaseSpecFluentImpl(V1LeaseSpec instance) { - if (instance != null) { - this.withAcquireTime(instance.getAcquireTime()); - this.withHolderIdentity(instance.getHolderIdentity()); - this.withLeaseDurationSeconds(instance.getLeaseDurationSeconds()); - this.withLeaseTransitions(instance.getLeaseTransitions()); - this.withRenewTime(instance.getRenewTime()); - } - } - private OffsetDateTime acquireTime; - private String holderIdentity; - private Integer leaseDurationSeconds; - private Integer leaseTransitions; - private OffsetDateTime renewTime; - public OffsetDateTime getAcquireTime() { - return this.acquireTime; - } - public A withAcquireTime(OffsetDateTime acquireTime) { - this.acquireTime=acquireTime; return (A) this; - } - public Boolean hasAcquireTime() { - return this.acquireTime != null; - } - public String getHolderIdentity() { - return this.holderIdentity; - } - public A withHolderIdentity(String holderIdentity) { - this.holderIdentity=holderIdentity; return (A) this; - } - public Boolean hasHolderIdentity() { - return this.holderIdentity != null; - } - public Integer getLeaseDurationSeconds() { - return this.leaseDurationSeconds; - } - public A withLeaseDurationSeconds(Integer leaseDurationSeconds) { - this.leaseDurationSeconds=leaseDurationSeconds; return (A) this; - } - public Boolean hasLeaseDurationSeconds() { - return this.leaseDurationSeconds != null; - } - public Integer getLeaseTransitions() { - return this.leaseTransitions; - } - public A withLeaseTransitions(Integer leaseTransitions) { - this.leaseTransitions=leaseTransitions; return (A) this; - } - public Boolean hasLeaseTransitions() { - return this.leaseTransitions != null; - } - public OffsetDateTime getRenewTime() { - return this.renewTime; - } - public A withRenewTime(OffsetDateTime renewTime) { - this.renewTime=renewTime; return (A) this; - } - public Boolean hasRenewTime() { - return this.renewTime != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LeaseSpecFluentImpl that = (V1LeaseSpecFluentImpl) o; - if (!java.util.Objects.equals(acquireTime, that.acquireTime)) return false; - - if (!java.util.Objects.equals(holderIdentity, that.holderIdentity)) return false; - - if (!java.util.Objects.equals(leaseDurationSeconds, that.leaseDurationSeconds)) return false; - - if (!java.util.Objects.equals(leaseTransitions, that.leaseTransitions)) return false; - - if (!java.util.Objects.equals(renewTime, that.renewTime)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(acquireTime, holderIdentity, leaseDurationSeconds, leaseTransitions, renewTime, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (acquireTime != null) { sb.append("acquireTime:"); sb.append(acquireTime + ","); } - if (holderIdentity != null) { sb.append("holderIdentity:"); sb.append(holderIdentity + ","); } - if (leaseDurationSeconds != null) { sb.append("leaseDurationSeconds:"); sb.append(leaseDurationSeconds + ","); } - if (leaseTransitions != null) { sb.append("leaseTransitions:"); sb.append(leaseTransitions + ","); } - if (renewTime != null) { sb.append("renewTime:"); sb.append(renewTime); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleBuilder.java index b7f7367898..ea3ea94fc3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LifecycleBuilder extends V1LifecycleFluentImpl implements VisitableBuilder{ +public class V1LifecycleBuilder extends V1LifecycleFluent implements VisitableBuilder{ public V1LifecycleBuilder() { - this(false); - } - public V1LifecycleBuilder(Boolean validationEnabled) { - this(new V1Lifecycle(), validationEnabled); + this(new V1Lifecycle()); } + public V1LifecycleBuilder(V1LifecycleFluent fluent) { - this(fluent, false); - } - public V1LifecycleBuilder(V1LifecycleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Lifecycle(), validationEnabled); + this(fluent, new V1Lifecycle()); } + public V1LifecycleBuilder(V1LifecycleFluent fluent,V1Lifecycle instance) { - this(fluent, instance, false); - } - public V1LifecycleBuilder(V1LifecycleFluent fluent,V1Lifecycle instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPostStart(instance.getPostStart()); - fluent.withPreStop(instance.getPreStop()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LifecycleBuilder(V1Lifecycle instance) { - this(instance,false); - } - public V1LifecycleBuilder(V1Lifecycle instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPostStart(instance.getPostStart()); - this.withPreStop(instance.getPreStop()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LifecycleFluent fluent; - Boolean validationEnabled; + public V1Lifecycle build() { V1Lifecycle buildable = new V1Lifecycle(); - buildable.setPostStart(fluent.getPostStart()); - buildable.setPreStop(fluent.getPreStop()); + buildable.setPostStart(fluent.buildPostStart()); + buildable.setPreStop(fluent.buildPreStop()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleFluent.java index f4abeabac3..77fd29f5b2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1LifecycleFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildPostStart instead. - * @return The buildable object. - */ - @Deprecated - public V1LifecycleHandler getPostStart(); - public V1LifecycleHandler buildPostStart(); - public A withPostStart(V1LifecycleHandler postStart); - public Boolean hasPostStart(); - public V1LifecycleFluent.PostStartNested withNewPostStart(); - public V1LifecycleFluent.PostStartNested withNewPostStartLike(V1LifecycleHandler item); - public V1LifecycleFluent.PostStartNested editPostStart(); - public V1LifecycleFluent.PostStartNested editOrNewPostStart(); - public V1LifecycleFluent.PostStartNested editOrNewPostStartLike(V1LifecycleHandler item); - - /** - * This method has been deprecated, please use method buildPreStop instead. - * @return The buildable object. - */ - @Deprecated - public V1LifecycleHandler getPreStop(); - public V1LifecycleHandler buildPreStop(); - public A withPreStop(V1LifecycleHandler preStop); - public Boolean hasPreStop(); - public V1LifecycleFluent.PreStopNested withNewPreStop(); - public V1LifecycleFluent.PreStopNested withNewPreStopLike(V1LifecycleHandler item); - public V1LifecycleFluent.PreStopNested editPreStop(); - public V1LifecycleFluent.PreStopNested editOrNewPreStop(); - public V1LifecycleFluent.PreStopNested editOrNewPreStopLike(V1LifecycleHandler item); - public interface PostStartNested extends Nested,V1LifecycleHandlerFluent>{ - public N and(); - public N endPostStart(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LifecycleFluent> extends BaseFluent{ + public V1LifecycleFluent() { + } + + public V1LifecycleFluent(V1Lifecycle instance) { + this.copyInstance(instance); + } + private V1LifecycleHandlerBuilder postStart; + private V1LifecycleHandlerBuilder preStop; + + protected void copyInstance(V1Lifecycle instance) { + instance = (instance != null ? instance : new V1Lifecycle()); + if (instance != null) { + this.withPostStart(instance.getPostStart()); + this.withPreStop(instance.getPreStop()); + } + } + + public V1LifecycleHandler buildPostStart() { + return this.postStart != null ? this.postStart.build() : null; + } + + public A withPostStart(V1LifecycleHandler postStart) { + this._visitables.remove("postStart"); + if (postStart != null) { + this.postStart = new V1LifecycleHandlerBuilder(postStart); + this._visitables.get("postStart").add(this.postStart); + } else { + this.postStart = null; + this._visitables.get("postStart").remove(this.postStart); + } + return (A) this; + } + + public boolean hasPostStart() { + return this.postStart != null; + } + + public PostStartNested withNewPostStart() { + return new PostStartNested(null); } - public interface PreStopNested extends Nested,V1LifecycleHandlerFluent>{ - public N and(); - public N endPreStop(); + + public PostStartNested withNewPostStartLike(V1LifecycleHandler item) { + return new PostStartNested(item); + } + + public PostStartNested editPostStart() { + return withNewPostStartLike(java.util.Optional.ofNullable(buildPostStart()).orElse(null)); + } + + public PostStartNested editOrNewPostStart() { + return withNewPostStartLike(java.util.Optional.ofNullable(buildPostStart()).orElse(new V1LifecycleHandlerBuilder().build())); + } + + public PostStartNested editOrNewPostStartLike(V1LifecycleHandler item) { + return withNewPostStartLike(java.util.Optional.ofNullable(buildPostStart()).orElse(item)); + } + + public V1LifecycleHandler buildPreStop() { + return this.preStop != null ? this.preStop.build() : null; + } + + public A withPreStop(V1LifecycleHandler preStop) { + this._visitables.remove("preStop"); + if (preStop != null) { + this.preStop = new V1LifecycleHandlerBuilder(preStop); + this._visitables.get("preStop").add(this.preStop); + } else { + this.preStop = null; + this._visitables.get("preStop").remove(this.preStop); + } + return (A) this; + } + + public boolean hasPreStop() { + return this.preStop != null; + } + + public PreStopNested withNewPreStop() { + return new PreStopNested(null); + } + + public PreStopNested withNewPreStopLike(V1LifecycleHandler item) { + return new PreStopNested(item); + } + + public PreStopNested editPreStop() { + return withNewPreStopLike(java.util.Optional.ofNullable(buildPreStop()).orElse(null)); + } + + public PreStopNested editOrNewPreStop() { + return withNewPreStopLike(java.util.Optional.ofNullable(buildPreStop()).orElse(new V1LifecycleHandlerBuilder().build())); + } + + public PreStopNested editOrNewPreStopLike(V1LifecycleHandler item) { + return withNewPreStopLike(java.util.Optional.ofNullable(buildPreStop()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LifecycleFluent that = (V1LifecycleFluent) o; + if (!java.util.Objects.equals(postStart, that.postStart)) return false; + if (!java.util.Objects.equals(preStop, that.preStop)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(postStart, preStop, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (postStart != null) { sb.append("postStart:"); sb.append(postStart + ","); } + if (preStop != null) { sb.append("preStop:"); sb.append(preStop); } + sb.append("}"); + return sb.toString(); + } + public class PostStartNested extends V1LifecycleHandlerFluent> implements Nested{ + PostStartNested(V1LifecycleHandler item) { + this.builder = new V1LifecycleHandlerBuilder(this, item); + } + V1LifecycleHandlerBuilder builder; + + public N and() { + return (N) V1LifecycleFluent.this.withPostStart(builder.build()); + } + + public N endPostStart() { + return and(); + } + } + public class PreStopNested extends V1LifecycleHandlerFluent> implements Nested{ + PreStopNested(V1LifecycleHandler item) { + this.builder = new V1LifecycleHandlerBuilder(this, item); + } + V1LifecycleHandlerBuilder builder; + + public N and() { + return (N) V1LifecycleFluent.this.withPreStop(builder.build()); + } + + public N endPreStop() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleFluentImpl.java deleted file mode 100644 index 25ac82f292..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LifecycleFluentImpl> extends BaseFluent implements V1LifecycleFluent{ - public V1LifecycleFluentImpl() { - } - public V1LifecycleFluentImpl(V1Lifecycle instance) { - if (instance != null) { - this.withPostStart(instance.getPostStart()); - this.withPreStop(instance.getPreStop()); - } - } - private V1LifecycleHandlerBuilder postStart; - private V1LifecycleHandlerBuilder preStop; - - /** - * This method has been deprecated, please use method buildPostStart instead. - * @return The buildable object. - */ - @Deprecated - public V1LifecycleHandler getPostStart() { - return this.postStart!=null ?this.postStart.build():null; - } - public V1LifecycleHandler buildPostStart() { - return this.postStart!=null ?this.postStart.build():null; - } - public A withPostStart(V1LifecycleHandler postStart) { - _visitables.get("postStart").remove(this.postStart); - if (postStart!=null){ this.postStart= new V1LifecycleHandlerBuilder(postStart); _visitables.get("postStart").add(this.postStart);} else { this.postStart = null; _visitables.get("postStart").remove(this.postStart); } return (A) this; - } - public Boolean hasPostStart() { - return this.postStart != null; - } - public V1LifecycleFluentImpl.PostStartNested withNewPostStart() { - return new V1LifecycleFluentImpl.PostStartNestedImpl(); - } - public V1LifecycleFluentImpl.PostStartNested withNewPostStartLike(V1LifecycleHandler item) { - return new V1LifecycleFluentImpl.PostStartNestedImpl(item); - } - public V1LifecycleFluentImpl.PostStartNested editPostStart() { - return withNewPostStartLike(getPostStart()); - } - public V1LifecycleFluentImpl.PostStartNested editOrNewPostStart() { - return withNewPostStartLike(getPostStart() != null ? getPostStart(): new V1LifecycleHandlerBuilder().build()); - } - public V1LifecycleFluentImpl.PostStartNested editOrNewPostStartLike(V1LifecycleHandler item) { - return withNewPostStartLike(getPostStart() != null ? getPostStart(): item); - } - - /** - * This method has been deprecated, please use method buildPreStop instead. - * @return The buildable object. - */ - @Deprecated - public V1LifecycleHandler getPreStop() { - return this.preStop!=null ?this.preStop.build():null; - } - public V1LifecycleHandler buildPreStop() { - return this.preStop!=null ?this.preStop.build():null; - } - public A withPreStop(V1LifecycleHandler preStop) { - _visitables.get("preStop").remove(this.preStop); - if (preStop!=null){ this.preStop= new V1LifecycleHandlerBuilder(preStop); _visitables.get("preStop").add(this.preStop);} else { this.preStop = null; _visitables.get("preStop").remove(this.preStop); } return (A) this; - } - public Boolean hasPreStop() { - return this.preStop != null; - } - public V1LifecycleFluentImpl.PreStopNested withNewPreStop() { - return new V1LifecycleFluentImpl.PreStopNestedImpl(); - } - public V1LifecycleFluentImpl.PreStopNested withNewPreStopLike(V1LifecycleHandler item) { - return new V1LifecycleFluentImpl.PreStopNestedImpl(item); - } - public V1LifecycleFluentImpl.PreStopNested editPreStop() { - return withNewPreStopLike(getPreStop()); - } - public V1LifecycleFluentImpl.PreStopNested editOrNewPreStop() { - return withNewPreStopLike(getPreStop() != null ? getPreStop(): new V1LifecycleHandlerBuilder().build()); - } - public V1LifecycleFluentImpl.PreStopNested editOrNewPreStopLike(V1LifecycleHandler item) { - return withNewPreStopLike(getPreStop() != null ? getPreStop(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LifecycleFluentImpl that = (V1LifecycleFluentImpl) o; - if (!java.util.Objects.equals(postStart, that.postStart)) return false; - - if (!java.util.Objects.equals(preStop, that.preStop)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(postStart, preStop, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (postStart != null) { sb.append("postStart:"); sb.append(postStart + ","); } - if (preStop != null) { sb.append("preStop:"); sb.append(preStop); } - sb.append("}"); - return sb.toString(); - } - class PostStartNestedImpl extends V1LifecycleHandlerFluentImpl> implements V1LifecycleFluentImpl.PostStartNested,Nested{ - PostStartNestedImpl(V1LifecycleHandler item) { - this.builder = new V1LifecycleHandlerBuilder(this, item); - } - PostStartNestedImpl() { - this.builder = new V1LifecycleHandlerBuilder(this); - } - V1LifecycleHandlerBuilder builder; - public N and() { - return (N) V1LifecycleFluentImpl.this.withPostStart(builder.build()); - } - public N endPostStart() { - return and(); - } - - } - class PreStopNestedImpl extends V1LifecycleHandlerFluentImpl> implements V1LifecycleFluentImpl.PreStopNested,Nested{ - PreStopNestedImpl(V1LifecycleHandler item) { - this.builder = new V1LifecycleHandlerBuilder(this, item); - } - PreStopNestedImpl() { - this.builder = new V1LifecycleHandlerBuilder(this); - } - V1LifecycleHandlerBuilder builder; - public N and() { - return (N) V1LifecycleFluentImpl.this.withPreStop(builder.build()); - } - public N endPreStop() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerBuilder.java index 69b24027cb..421c4976e6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LifecycleHandlerBuilder extends V1LifecycleHandlerFluentImpl implements VisitableBuilder{ +public class V1LifecycleHandlerBuilder extends V1LifecycleHandlerFluent implements VisitableBuilder{ public V1LifecycleHandlerBuilder() { - this(false); - } - public V1LifecycleHandlerBuilder(Boolean validationEnabled) { - this(new V1LifecycleHandler(), validationEnabled); + this(new V1LifecycleHandler()); } + public V1LifecycleHandlerBuilder(V1LifecycleHandlerFluent fluent) { - this(fluent, false); - } - public V1LifecycleHandlerBuilder(V1LifecycleHandlerFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LifecycleHandler(), validationEnabled); + this(fluent, new V1LifecycleHandler()); } + public V1LifecycleHandlerBuilder(V1LifecycleHandlerFluent fluent,V1LifecycleHandler instance) { - this(fluent, instance, false); - } - public V1LifecycleHandlerBuilder(V1LifecycleHandlerFluent fluent,V1LifecycleHandler instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExec(instance.getExec()); - fluent.withHttpGet(instance.getHttpGet()); - fluent.withTcpSocket(instance.getTcpSocket()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LifecycleHandlerBuilder(V1LifecycleHandler instance) { - this(instance,false); - } - public V1LifecycleHandlerBuilder(V1LifecycleHandler instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExec(instance.getExec()); - this.withHttpGet(instance.getHttpGet()); - this.withTcpSocket(instance.getTcpSocket()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LifecycleHandlerFluent fluent; - Boolean validationEnabled; + public V1LifecycleHandler build() { V1LifecycleHandler buildable = new V1LifecycleHandler(); - buildable.setExec(fluent.getExec()); - buildable.setHttpGet(fluent.getHttpGet()); - buildable.setTcpSocket(fluent.getTcpSocket()); + buildable.setExec(fluent.buildExec()); + buildable.setHttpGet(fluent.buildHttpGet()); + buildable.setTcpSocket(fluent.buildTcpSocket()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerFluent.java index 1d5dc7eeaa..34d4b1f6ee 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerFluent.java @@ -1,74 +1,226 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1LifecycleHandlerFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildExec instead. - * @return The buildable object. - */ - @Deprecated - public V1ExecAction getExec(); - public V1ExecAction buildExec(); - public A withExec(V1ExecAction exec); - public Boolean hasExec(); - public V1LifecycleHandlerFluent.ExecNested withNewExec(); - public V1LifecycleHandlerFluent.ExecNested withNewExecLike(V1ExecAction item); - public V1LifecycleHandlerFluent.ExecNested editExec(); - public V1LifecycleHandlerFluent.ExecNested editOrNewExec(); - public V1LifecycleHandlerFluent.ExecNested editOrNewExecLike(V1ExecAction item); - - /** - * This method has been deprecated, please use method buildHttpGet instead. - * @return The buildable object. - */ - @Deprecated - public V1HTTPGetAction getHttpGet(); - public V1HTTPGetAction buildHttpGet(); - public A withHttpGet(V1HTTPGetAction httpGet); - public Boolean hasHttpGet(); - public V1LifecycleHandlerFluent.HttpGetNested withNewHttpGet(); - public V1LifecycleHandlerFluent.HttpGetNested withNewHttpGetLike(V1HTTPGetAction item); - public V1LifecycleHandlerFluent.HttpGetNested editHttpGet(); - public V1LifecycleHandlerFluent.HttpGetNested editOrNewHttpGet(); - public V1LifecycleHandlerFluent.HttpGetNested editOrNewHttpGetLike(V1HTTPGetAction item); - - /** - * This method has been deprecated, please use method buildTcpSocket instead. - * @return The buildable object. - */ - @Deprecated - public V1TCPSocketAction getTcpSocket(); - public V1TCPSocketAction buildTcpSocket(); - public A withTcpSocket(V1TCPSocketAction tcpSocket); - public Boolean hasTcpSocket(); - public V1LifecycleHandlerFluent.TcpSocketNested withNewTcpSocket(); - public V1LifecycleHandlerFluent.TcpSocketNested withNewTcpSocketLike(V1TCPSocketAction item); - public V1LifecycleHandlerFluent.TcpSocketNested editTcpSocket(); - public V1LifecycleHandlerFluent.TcpSocketNested editOrNewTcpSocket(); - public V1LifecycleHandlerFluent.TcpSocketNested editOrNewTcpSocketLike(V1TCPSocketAction item); - public interface ExecNested extends Nested,V1ExecActionFluent>{ - public N and(); - public N endExec(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LifecycleHandlerFluent> extends BaseFluent{ + public V1LifecycleHandlerFluent() { + } + + public V1LifecycleHandlerFluent(V1LifecycleHandler instance) { + this.copyInstance(instance); + } + private V1ExecActionBuilder exec; + private V1HTTPGetActionBuilder httpGet; + private V1TCPSocketActionBuilder tcpSocket; + + protected void copyInstance(V1LifecycleHandler instance) { + instance = (instance != null ? instance : new V1LifecycleHandler()); + if (instance != null) { + this.withExec(instance.getExec()); + this.withHttpGet(instance.getHttpGet()); + this.withTcpSocket(instance.getTcpSocket()); + } + } + + public V1ExecAction buildExec() { + return this.exec != null ? this.exec.build() : null; + } + + public A withExec(V1ExecAction exec) { + this._visitables.remove("exec"); + if (exec != null) { + this.exec = new V1ExecActionBuilder(exec); + this._visitables.get("exec").add(this.exec); + } else { + this.exec = null; + this._visitables.get("exec").remove(this.exec); + } + return (A) this; + } + + public boolean hasExec() { + return this.exec != null; + } + + public ExecNested withNewExec() { + return new ExecNested(null); + } + + public ExecNested withNewExecLike(V1ExecAction item) { + return new ExecNested(item); + } + + public ExecNested editExec() { + return withNewExecLike(java.util.Optional.ofNullable(buildExec()).orElse(null)); + } + + public ExecNested editOrNewExec() { + return withNewExecLike(java.util.Optional.ofNullable(buildExec()).orElse(new V1ExecActionBuilder().build())); + } + + public ExecNested editOrNewExecLike(V1ExecAction item) { + return withNewExecLike(java.util.Optional.ofNullable(buildExec()).orElse(item)); + } + + public V1HTTPGetAction buildHttpGet() { + return this.httpGet != null ? this.httpGet.build() : null; + } + + public A withHttpGet(V1HTTPGetAction httpGet) { + this._visitables.remove("httpGet"); + if (httpGet != null) { + this.httpGet = new V1HTTPGetActionBuilder(httpGet); + this._visitables.get("httpGet").add(this.httpGet); + } else { + this.httpGet = null; + this._visitables.get("httpGet").remove(this.httpGet); + } + return (A) this; + } + + public boolean hasHttpGet() { + return this.httpGet != null; + } + + public HttpGetNested withNewHttpGet() { + return new HttpGetNested(null); + } + + public HttpGetNested withNewHttpGetLike(V1HTTPGetAction item) { + return new HttpGetNested(item); + } + + public HttpGetNested editHttpGet() { + return withNewHttpGetLike(java.util.Optional.ofNullable(buildHttpGet()).orElse(null)); + } + + public HttpGetNested editOrNewHttpGet() { + return withNewHttpGetLike(java.util.Optional.ofNullable(buildHttpGet()).orElse(new V1HTTPGetActionBuilder().build())); } - public interface HttpGetNested extends Nested,V1HTTPGetActionFluent>{ - public N and(); - public N endHttpGet(); + + public HttpGetNested editOrNewHttpGetLike(V1HTTPGetAction item) { + return withNewHttpGetLike(java.util.Optional.ofNullable(buildHttpGet()).orElse(item)); + } + + public V1TCPSocketAction buildTcpSocket() { + return this.tcpSocket != null ? this.tcpSocket.build() : null; + } + + public A withTcpSocket(V1TCPSocketAction tcpSocket) { + this._visitables.remove("tcpSocket"); + if (tcpSocket != null) { + this.tcpSocket = new V1TCPSocketActionBuilder(tcpSocket); + this._visitables.get("tcpSocket").add(this.tcpSocket); + } else { + this.tcpSocket = null; + this._visitables.get("tcpSocket").remove(this.tcpSocket); + } + return (A) this; + } + + public boolean hasTcpSocket() { + return this.tcpSocket != null; + } + + public TcpSocketNested withNewTcpSocket() { + return new TcpSocketNested(null); + } + + public TcpSocketNested withNewTcpSocketLike(V1TCPSocketAction item) { + return new TcpSocketNested(item); + } + + public TcpSocketNested editTcpSocket() { + return withNewTcpSocketLike(java.util.Optional.ofNullable(buildTcpSocket()).orElse(null)); + } + + public TcpSocketNested editOrNewTcpSocket() { + return withNewTcpSocketLike(java.util.Optional.ofNullable(buildTcpSocket()).orElse(new V1TCPSocketActionBuilder().build())); + } + + public TcpSocketNested editOrNewTcpSocketLike(V1TCPSocketAction item) { + return withNewTcpSocketLike(java.util.Optional.ofNullable(buildTcpSocket()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LifecycleHandlerFluent that = (V1LifecycleHandlerFluent) o; + if (!java.util.Objects.equals(exec, that.exec)) return false; + if (!java.util.Objects.equals(httpGet, that.httpGet)) return false; + if (!java.util.Objects.equals(tcpSocket, that.tcpSocket)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(exec, httpGet, tcpSocket, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (exec != null) { sb.append("exec:"); sb.append(exec + ","); } + if (httpGet != null) { sb.append("httpGet:"); sb.append(httpGet + ","); } + if (tcpSocket != null) { sb.append("tcpSocket:"); sb.append(tcpSocket); } + sb.append("}"); + return sb.toString(); + } + public class ExecNested extends V1ExecActionFluent> implements Nested{ + ExecNested(V1ExecAction item) { + this.builder = new V1ExecActionBuilder(this, item); + } + V1ExecActionBuilder builder; + + public N and() { + return (N) V1LifecycleHandlerFluent.this.withExec(builder.build()); + } + public N endExec() { + return and(); + } + + } - public interface TcpSocketNested extends Nested,V1TCPSocketActionFluent>{ - public N and(); - public N endTcpSocket(); + public class HttpGetNested extends V1HTTPGetActionFluent> implements Nested{ + HttpGetNested(V1HTTPGetAction item) { + this.builder = new V1HTTPGetActionBuilder(this, item); + } + V1HTTPGetActionBuilder builder; + public N and() { + return (N) V1LifecycleHandlerFluent.this.withHttpGet(builder.build()); + } + + public N endHttpGet() { + return and(); + } + + } + public class TcpSocketNested extends V1TCPSocketActionFluent> implements Nested{ + TcpSocketNested(V1TCPSocketAction item) { + this.builder = new V1TCPSocketActionBuilder(this, item); + } + V1TCPSocketActionBuilder builder; + + public N and() { + return (N) V1LifecycleHandlerFluent.this.withTcpSocket(builder.build()); + } + + public N endTcpSocket() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerFluentImpl.java deleted file mode 100644 index 982eeb23d9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LifecycleHandlerFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LifecycleHandlerFluentImpl> extends BaseFluent implements V1LifecycleHandlerFluent{ - public V1LifecycleHandlerFluentImpl() { - } - public V1LifecycleHandlerFluentImpl(V1LifecycleHandler instance) { - if (instance != null) { - this.withExec(instance.getExec()); - this.withHttpGet(instance.getHttpGet()); - this.withTcpSocket(instance.getTcpSocket()); - } - } - private V1ExecActionBuilder exec; - private V1HTTPGetActionBuilder httpGet; - private V1TCPSocketActionBuilder tcpSocket; - - /** - * This method has been deprecated, please use method buildExec instead. - * @return The buildable object. - */ - @Deprecated - public V1ExecAction getExec() { - return this.exec!=null ?this.exec.build():null; - } - public V1ExecAction buildExec() { - return this.exec!=null ?this.exec.build():null; - } - public A withExec(V1ExecAction exec) { - _visitables.get("exec").remove(this.exec); - if (exec!=null){ this.exec= new V1ExecActionBuilder(exec); _visitables.get("exec").add(this.exec);} else { this.exec = null; _visitables.get("exec").remove(this.exec); } return (A) this; - } - public Boolean hasExec() { - return this.exec != null; - } - public V1LifecycleHandlerFluentImpl.ExecNested withNewExec() { - return new V1LifecycleHandlerFluentImpl.ExecNestedImpl(); - } - public V1LifecycleHandlerFluentImpl.ExecNested withNewExecLike(V1ExecAction item) { - return new V1LifecycleHandlerFluentImpl.ExecNestedImpl(item); - } - public V1LifecycleHandlerFluentImpl.ExecNested editExec() { - return withNewExecLike(getExec()); - } - public V1LifecycleHandlerFluentImpl.ExecNested editOrNewExec() { - return withNewExecLike(getExec() != null ? getExec(): new V1ExecActionBuilder().build()); - } - public V1LifecycleHandlerFluentImpl.ExecNested editOrNewExecLike(V1ExecAction item) { - return withNewExecLike(getExec() != null ? getExec(): item); - } - - /** - * This method has been deprecated, please use method buildHttpGet instead. - * @return The buildable object. - */ - @Deprecated - public V1HTTPGetAction getHttpGet() { - return this.httpGet!=null ?this.httpGet.build():null; - } - public V1HTTPGetAction buildHttpGet() { - return this.httpGet!=null ?this.httpGet.build():null; - } - public A withHttpGet(V1HTTPGetAction httpGet) { - _visitables.get("httpGet").remove(this.httpGet); - if (httpGet!=null){ this.httpGet= new V1HTTPGetActionBuilder(httpGet); _visitables.get("httpGet").add(this.httpGet);} else { this.httpGet = null; _visitables.get("httpGet").remove(this.httpGet); } return (A) this; - } - public Boolean hasHttpGet() { - return this.httpGet != null; - } - public V1LifecycleHandlerFluentImpl.HttpGetNested withNewHttpGet() { - return new V1LifecycleHandlerFluentImpl.HttpGetNestedImpl(); - } - public V1LifecycleHandlerFluentImpl.HttpGetNested withNewHttpGetLike(V1HTTPGetAction item) { - return new V1LifecycleHandlerFluentImpl.HttpGetNestedImpl(item); - } - public V1LifecycleHandlerFluentImpl.HttpGetNested editHttpGet() { - return withNewHttpGetLike(getHttpGet()); - } - public V1LifecycleHandlerFluentImpl.HttpGetNested editOrNewHttpGet() { - return withNewHttpGetLike(getHttpGet() != null ? getHttpGet(): new V1HTTPGetActionBuilder().build()); - } - public V1LifecycleHandlerFluentImpl.HttpGetNested editOrNewHttpGetLike(V1HTTPGetAction item) { - return withNewHttpGetLike(getHttpGet() != null ? getHttpGet(): item); - } - - /** - * This method has been deprecated, please use method buildTcpSocket instead. - * @return The buildable object. - */ - @Deprecated - public V1TCPSocketAction getTcpSocket() { - return this.tcpSocket!=null ?this.tcpSocket.build():null; - } - public V1TCPSocketAction buildTcpSocket() { - return this.tcpSocket!=null ?this.tcpSocket.build():null; - } - public A withTcpSocket(V1TCPSocketAction tcpSocket) { - _visitables.get("tcpSocket").remove(this.tcpSocket); - if (tcpSocket!=null){ this.tcpSocket= new V1TCPSocketActionBuilder(tcpSocket); _visitables.get("tcpSocket").add(this.tcpSocket);} else { this.tcpSocket = null; _visitables.get("tcpSocket").remove(this.tcpSocket); } return (A) this; - } - public Boolean hasTcpSocket() { - return this.tcpSocket != null; - } - public V1LifecycleHandlerFluentImpl.TcpSocketNested withNewTcpSocket() { - return new V1LifecycleHandlerFluentImpl.TcpSocketNestedImpl(); - } - public V1LifecycleHandlerFluentImpl.TcpSocketNested withNewTcpSocketLike(V1TCPSocketAction item) { - return new V1LifecycleHandlerFluentImpl.TcpSocketNestedImpl(item); - } - public V1LifecycleHandlerFluentImpl.TcpSocketNested editTcpSocket() { - return withNewTcpSocketLike(getTcpSocket()); - } - public V1LifecycleHandlerFluentImpl.TcpSocketNested editOrNewTcpSocket() { - return withNewTcpSocketLike(getTcpSocket() != null ? getTcpSocket(): new V1TCPSocketActionBuilder().build()); - } - public V1LifecycleHandlerFluentImpl.TcpSocketNested editOrNewTcpSocketLike(V1TCPSocketAction item) { - return withNewTcpSocketLike(getTcpSocket() != null ? getTcpSocket(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LifecycleHandlerFluentImpl that = (V1LifecycleHandlerFluentImpl) o; - if (!java.util.Objects.equals(exec, that.exec)) return false; - - if (!java.util.Objects.equals(httpGet, that.httpGet)) return false; - - if (!java.util.Objects.equals(tcpSocket, that.tcpSocket)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(exec, httpGet, tcpSocket, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (exec != null) { sb.append("exec:"); sb.append(exec + ","); } - if (httpGet != null) { sb.append("httpGet:"); sb.append(httpGet + ","); } - if (tcpSocket != null) { sb.append("tcpSocket:"); sb.append(tcpSocket); } - sb.append("}"); - return sb.toString(); - } - class ExecNestedImpl extends V1ExecActionFluentImpl> implements V1LifecycleHandlerFluentImpl.ExecNested,Nested{ - ExecNestedImpl(V1ExecAction item) { - this.builder = new V1ExecActionBuilder(this, item); - } - ExecNestedImpl() { - this.builder = new V1ExecActionBuilder(this); - } - V1ExecActionBuilder builder; - public N and() { - return (N) V1LifecycleHandlerFluentImpl.this.withExec(builder.build()); - } - public N endExec() { - return and(); - } - - } - class HttpGetNestedImpl extends V1HTTPGetActionFluentImpl> implements V1LifecycleHandlerFluentImpl.HttpGetNested,Nested{ - HttpGetNestedImpl(V1HTTPGetAction item) { - this.builder = new V1HTTPGetActionBuilder(this, item); - } - HttpGetNestedImpl() { - this.builder = new V1HTTPGetActionBuilder(this); - } - V1HTTPGetActionBuilder builder; - public N and() { - return (N) V1LifecycleHandlerFluentImpl.this.withHttpGet(builder.build()); - } - public N endHttpGet() { - return and(); - } - - } - class TcpSocketNestedImpl extends V1TCPSocketActionFluentImpl> implements V1LifecycleHandlerFluentImpl.TcpSocketNested,Nested{ - TcpSocketNestedImpl(V1TCPSocketAction item) { - this.builder = new V1TCPSocketActionBuilder(this, item); - } - TcpSocketNestedImpl() { - this.builder = new V1TCPSocketActionBuilder(this); - } - V1TCPSocketActionBuilder builder; - public N and() { - return (N) V1LifecycleHandlerFluentImpl.this.withTcpSocket(builder.build()); - } - public N endTcpSocket() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeBuilder.java index 1d064d0667..d44c1178a4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LimitRangeBuilder extends V1LimitRangeFluentImpl implements VisitableBuilder{ +public class V1LimitRangeBuilder extends V1LimitRangeFluent implements VisitableBuilder{ public V1LimitRangeBuilder() { - this(false); - } - public V1LimitRangeBuilder(Boolean validationEnabled) { - this(new V1LimitRange(), validationEnabled); + this(new V1LimitRange()); } + public V1LimitRangeBuilder(V1LimitRangeFluent fluent) { - this(fluent, false); - } - public V1LimitRangeBuilder(V1LimitRangeFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LimitRange(), validationEnabled); + this(fluent, new V1LimitRange()); } + public V1LimitRangeBuilder(V1LimitRangeFluent fluent,V1LimitRange instance) { - this(fluent, instance, false); - } - public V1LimitRangeBuilder(V1LimitRangeFluent fluent,V1LimitRange instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LimitRangeBuilder(V1LimitRange instance) { - this(instance,false); - } - public V1LimitRangeBuilder(V1LimitRange instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LimitRangeFluent fluent; - Boolean validationEnabled; + public V1LimitRange build() { V1LimitRange buildable = new V1LimitRange(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeFluent.java index 9af9a80344..7430d6c0bf 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1LimitRangeFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1LimitRangeFluent.MetadataNested withNewMetadata(); - public V1LimitRangeFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1LimitRangeFluent.MetadataNested editMetadata(); - public V1LimitRangeFluent.MetadataNested editOrNewMetadata(); - public V1LimitRangeFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1LimitRangeSpec getSpec(); - public V1LimitRangeSpec buildSpec(); - public A withSpec(V1LimitRangeSpec spec); - public Boolean hasSpec(); - public V1LimitRangeFluent.SpecNested withNewSpec(); - public V1LimitRangeFluent.SpecNested withNewSpecLike(V1LimitRangeSpec item); - public V1LimitRangeFluent.SpecNested editSpec(); - public V1LimitRangeFluent.SpecNested editOrNewSpec(); - public V1LimitRangeFluent.SpecNested editOrNewSpecLike(V1LimitRangeSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LimitRangeFluent> extends BaseFluent{ + public V1LimitRangeFluent() { + } + + public V1LimitRangeFluent(V1LimitRange instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1LimitRangeSpecBuilder spec; + + protected void copyInstance(V1LimitRange instance) { + instance = (instance != null ? instance : new V1LimitRange()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1LimitRangeSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1LimitRangeSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1LimitRangeSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1LimitRangeSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1LimitRangeSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1LimitRangeSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1LimitRangeSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LimitRangeFluent that = (V1LimitRangeFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1LimitRangeFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1LimitRangeSpecFluent> implements Nested{ + SpecNested(V1LimitRangeSpec item) { + this.builder = new V1LimitRangeSpecBuilder(this, item); + } + V1LimitRangeSpecBuilder builder; + + public N and() { + return (N) V1LimitRangeFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeFluentImpl.java deleted file mode 100644 index edaf4f469f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LimitRangeFluentImpl> extends BaseFluent implements V1LimitRangeFluent{ - public V1LimitRangeFluentImpl() { - } - public V1LimitRangeFluentImpl(V1LimitRange instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1LimitRangeSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1LimitRangeFluentImpl.MetadataNested withNewMetadata() { - return new V1LimitRangeFluentImpl.MetadataNestedImpl(); - } - public V1LimitRangeFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1LimitRangeFluentImpl.MetadataNestedImpl(item); - } - public V1LimitRangeFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1LimitRangeFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1LimitRangeFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1LimitRangeSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1LimitRangeSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1LimitRangeSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1LimitRangeSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1LimitRangeFluentImpl.SpecNested withNewSpec() { - return new V1LimitRangeFluentImpl.SpecNestedImpl(); - } - public V1LimitRangeFluentImpl.SpecNested withNewSpecLike(V1LimitRangeSpec item) { - return new V1LimitRangeFluentImpl.SpecNestedImpl(item); - } - public V1LimitRangeFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1LimitRangeFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1LimitRangeSpecBuilder().build()); - } - public V1LimitRangeFluentImpl.SpecNested editOrNewSpecLike(V1LimitRangeSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LimitRangeFluentImpl that = (V1LimitRangeFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1LimitRangeFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1LimitRangeFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1LimitRangeSpecFluentImpl> implements V1LimitRangeFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1LimitRangeSpec item) { - this.builder = new V1LimitRangeSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1LimitRangeSpecBuilder(this); - } - V1LimitRangeSpecBuilder builder; - public N and() { - return (N) V1LimitRangeFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemBuilder.java index 1b4140e087..c130980a74 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LimitRangeItemBuilder extends V1LimitRangeItemFluentImpl implements VisitableBuilder{ +public class V1LimitRangeItemBuilder extends V1LimitRangeItemFluent implements VisitableBuilder{ public V1LimitRangeItemBuilder() { - this(false); - } - public V1LimitRangeItemBuilder(Boolean validationEnabled) { - this(new V1LimitRangeItem(), validationEnabled); + this(new V1LimitRangeItem()); } + public V1LimitRangeItemBuilder(V1LimitRangeItemFluent fluent) { - this(fluent, false); - } - public V1LimitRangeItemBuilder(V1LimitRangeItemFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LimitRangeItem(), validationEnabled); + this(fluent, new V1LimitRangeItem()); } + public V1LimitRangeItemBuilder(V1LimitRangeItemFluent fluent,V1LimitRangeItem instance) { - this(fluent, instance, false); - } - public V1LimitRangeItemBuilder(V1LimitRangeItemFluent fluent,V1LimitRangeItem instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDefault(instance.getDefault()); - fluent.withDefaultRequest(instance.getDefaultRequest()); - fluent.withMax(instance.getMax()); - fluent.withMaxLimitRequestRatio(instance.getMaxLimitRequestRatio()); - fluent.withMin(instance.getMin()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LimitRangeItemBuilder(V1LimitRangeItem instance) { - this(instance,false); - } - public V1LimitRangeItemBuilder(V1LimitRangeItem instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDefault(instance.getDefault()); - this.withDefaultRequest(instance.getDefaultRequest()); - this.withMax(instance.getMax()); - this.withMaxLimitRequestRatio(instance.getMaxLimitRequestRatio()); - this.withMin(instance.getMin()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LimitRangeItemFluent fluent; - Boolean validationEnabled; + public V1LimitRangeItem build() { V1LimitRangeItem buildable = new V1LimitRangeItem(); buildable.setDefault(fluent.getDefault()); @@ -58,4 +32,5 @@ public V1LimitRangeItem build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemFluent.java index a3be450a22..cff01767c8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemFluent.java @@ -1,54 +1,271 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.custom.Quantity; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; import java.util.Map; import java.util.LinkedHashMap; - /** - * Generated - */ -public interface V1LimitRangeItemFluent> extends Fluent{ - public A addToDefault(String key,Quantity value); - public A addToDefault(Map map); - public A removeFromDefault(String key); - public A removeFromDefault(Map map); - public Map getDefault(); - public A withDefault(Map _default); - public Boolean hasDefault(); - public A addToDefaultRequest(String key,Quantity value); - public A addToDefaultRequest(Map map); - public A removeFromDefaultRequest(String key); - public A removeFromDefaultRequest(Map map); - public Map getDefaultRequest(); - public A withDefaultRequest(Map defaultRequest); - public Boolean hasDefaultRequest(); - public A addToMax(String key,Quantity value); - public A addToMax(Map map); - public A removeFromMax(String key); - public A removeFromMax(Map map); - public Map getMax(); - public A withMax(Map max); - public Boolean hasMax(); - public A addToMaxLimitRequestRatio(String key,Quantity value); - public A addToMaxLimitRequestRatio(Map map); - public A removeFromMaxLimitRequestRatio(String key); - public A removeFromMaxLimitRequestRatio(Map map); - public Map getMaxLimitRequestRatio(); - public A withMaxLimitRequestRatio(Map maxLimitRequestRatio); - public Boolean hasMaxLimitRequestRatio(); - public A addToMin(String key,Quantity value); - public A addToMin(Map map); - public A removeFromMin(String key); - public A removeFromMin(Map map); - public Map getMin(); - public A withMin(Map min); - public Boolean hasMin(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LimitRangeItemFluent> extends BaseFluent{ + public V1LimitRangeItemFluent() { + } + public V1LimitRangeItemFluent(V1LimitRangeItem instance) { + this.copyInstance(instance); + } + private Map _default; + private Map defaultRequest; + private Map max; + private Map maxLimitRequestRatio; + private Map min; + private String type; + + protected void copyInstance(V1LimitRangeItem instance) { + instance = (instance != null ? instance : new V1LimitRangeItem()); + if (instance != null) { + this.withDefault(instance.getDefault()); + this.withDefaultRequest(instance.getDefaultRequest()); + this.withMax(instance.getMax()); + this.withMaxLimitRequestRatio(instance.getMaxLimitRequestRatio()); + this.withMin(instance.getMin()); + this.withType(instance.getType()); + } + } + + public A addToDefault(String key,Quantity value) { + if(this._default == null && key != null && value != null) { this._default = new LinkedHashMap(); } + if(key != null && value != null) {this._default.put(key, value);} return (A)this; + } + + public A addToDefault(Map map) { + if(this._default == null && map != null) { this._default = new LinkedHashMap(); } + if(map != null) { this._default.putAll(map);} return (A)this; + } + + public A removeFromDefault(String key) { + if(this._default == null) { return (A) this; } + if(key != null && this._default != null) {this._default.remove(key);} return (A)this; + } + + public A removeFromDefault(Map map) { + if(this._default == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this._default != null){this._default.remove(key);}}} return (A)this; + } + + public Map getDefault() { + return this._default; + } + + public A withDefault(Map _default) { + if (_default == null) { + this._default = null; + } else { + this._default = new LinkedHashMap(_default); + } + return (A) this; + } + + public boolean hasDefault() { + return this._default != null; + } + + public A addToDefaultRequest(String key,Quantity value) { + if(this.defaultRequest == null && key != null && value != null) { this.defaultRequest = new LinkedHashMap(); } + if(key != null && value != null) {this.defaultRequest.put(key, value);} return (A)this; + } + + public A addToDefaultRequest(Map map) { + if(this.defaultRequest == null && map != null) { this.defaultRequest = new LinkedHashMap(); } + if(map != null) { this.defaultRequest.putAll(map);} return (A)this; + } + + public A removeFromDefaultRequest(String key) { + if(this.defaultRequest == null) { return (A) this; } + if(key != null && this.defaultRequest != null) {this.defaultRequest.remove(key);} return (A)this; + } + + public A removeFromDefaultRequest(Map map) { + if(this.defaultRequest == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.defaultRequest != null){this.defaultRequest.remove(key);}}} return (A)this; + } + + public Map getDefaultRequest() { + return this.defaultRequest; + } + + public A withDefaultRequest(Map defaultRequest) { + if (defaultRequest == null) { + this.defaultRequest = null; + } else { + this.defaultRequest = new LinkedHashMap(defaultRequest); + } + return (A) this; + } + + public boolean hasDefaultRequest() { + return this.defaultRequest != null; + } + + public A addToMax(String key,Quantity value) { + if(this.max == null && key != null && value != null) { this.max = new LinkedHashMap(); } + if(key != null && value != null) {this.max.put(key, value);} return (A)this; + } + + public A addToMax(Map map) { + if(this.max == null && map != null) { this.max = new LinkedHashMap(); } + if(map != null) { this.max.putAll(map);} return (A)this; + } + + public A removeFromMax(String key) { + if(this.max == null) { return (A) this; } + if(key != null && this.max != null) {this.max.remove(key);} return (A)this; + } + + public A removeFromMax(Map map) { + if(this.max == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.max != null){this.max.remove(key);}}} return (A)this; + } + + public Map getMax() { + return this.max; + } + + public A withMax(Map max) { + if (max == null) { + this.max = null; + } else { + this.max = new LinkedHashMap(max); + } + return (A) this; + } + + public boolean hasMax() { + return this.max != null; + } + + public A addToMaxLimitRequestRatio(String key,Quantity value) { + if(this.maxLimitRequestRatio == null && key != null && value != null) { this.maxLimitRequestRatio = new LinkedHashMap(); } + if(key != null && value != null) {this.maxLimitRequestRatio.put(key, value);} return (A)this; + } + + public A addToMaxLimitRequestRatio(Map map) { + if(this.maxLimitRequestRatio == null && map != null) { this.maxLimitRequestRatio = new LinkedHashMap(); } + if(map != null) { this.maxLimitRequestRatio.putAll(map);} return (A)this; + } + + public A removeFromMaxLimitRequestRatio(String key) { + if(this.maxLimitRequestRatio == null) { return (A) this; } + if(key != null && this.maxLimitRequestRatio != null) {this.maxLimitRequestRatio.remove(key);} return (A)this; + } + + public A removeFromMaxLimitRequestRatio(Map map) { + if(this.maxLimitRequestRatio == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.maxLimitRequestRatio != null){this.maxLimitRequestRatio.remove(key);}}} return (A)this; + } + + public Map getMaxLimitRequestRatio() { + return this.maxLimitRequestRatio; + } + + public A withMaxLimitRequestRatio(Map maxLimitRequestRatio) { + if (maxLimitRequestRatio == null) { + this.maxLimitRequestRatio = null; + } else { + this.maxLimitRequestRatio = new LinkedHashMap(maxLimitRequestRatio); + } + return (A) this; + } + + public boolean hasMaxLimitRequestRatio() { + return this.maxLimitRequestRatio != null; + } + + public A addToMin(String key,Quantity value) { + if(this.min == null && key != null && value != null) { this.min = new LinkedHashMap(); } + if(key != null && value != null) {this.min.put(key, value);} return (A)this; + } + + public A addToMin(Map map) { + if(this.min == null && map != null) { this.min = new LinkedHashMap(); } + if(map != null) { this.min.putAll(map);} return (A)this; + } + + public A removeFromMin(String key) { + if(this.min == null) { return (A) this; } + if(key != null && this.min != null) {this.min.remove(key);} return (A)this; + } + + public A removeFromMin(Map map) { + if(this.min == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.min != null){this.min.remove(key);}}} return (A)this; + } + + public Map getMin() { + return this.min; + } + + public A withMin(Map min) { + if (min == null) { + this.min = null; + } else { + this.min = new LinkedHashMap(min); + } + return (A) this; + } + + public boolean hasMin() { + return this.min != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LimitRangeItemFluent that = (V1LimitRangeItemFluent) o; + if (!java.util.Objects.equals(_default, that._default)) return false; + if (!java.util.Objects.equals(defaultRequest, that.defaultRequest)) return false; + if (!java.util.Objects.equals(max, that.max)) return false; + if (!java.util.Objects.equals(maxLimitRequestRatio, that.maxLimitRequestRatio)) return false; + if (!java.util.Objects.equals(min, that.min)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(_default, defaultRequest, max, maxLimitRequestRatio, min, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (_default != null && !_default.isEmpty()) { sb.append("_default:"); sb.append(_default + ","); } + if (defaultRequest != null && !defaultRequest.isEmpty()) { sb.append("defaultRequest:"); sb.append(defaultRequest + ","); } + if (max != null && !max.isEmpty()) { sb.append("max:"); sb.append(max + ","); } + if (maxLimitRequestRatio != null && !maxLimitRequestRatio.isEmpty()) { sb.append("maxLimitRequestRatio:"); sb.append(maxLimitRequestRatio + ","); } + if (min != null && !min.isEmpty()) { sb.append("min:"); sb.append(min + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemFluentImpl.java deleted file mode 100644 index e055dfcd63..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeItemFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import io.kubernetes.client.custom.Quantity; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; -import java.util.Map; -import java.util.LinkedHashMap; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LimitRangeItemFluentImpl> extends BaseFluent implements V1LimitRangeItemFluent{ - public V1LimitRangeItemFluentImpl() { - } - public V1LimitRangeItemFluentImpl(V1LimitRangeItem instance) { - if (instance != null) { - this.withDefault(instance.getDefault()); - this.withDefaultRequest(instance.getDefaultRequest()); - this.withMax(instance.getMax()); - this.withMaxLimitRequestRatio(instance.getMaxLimitRequestRatio()); - this.withMin(instance.getMin()); - this.withType(instance.getType()); - } - } - private Map _default; - private Map defaultRequest; - private Map max; - private Map maxLimitRequestRatio; - private Map min; - private String type; - public A addToDefault(String key,Quantity value) { - if(this._default == null && key != null && value != null) { this._default = new LinkedHashMap(); } - if(key != null && value != null) {this._default.put(key, value);} return (A)this; - } - public A addToDefault(Map map) { - if(this._default == null && map != null) { this._default = new LinkedHashMap(); } - if(map != null) { this._default.putAll(map);} return (A)this; - } - public A removeFromDefault(String key) { - if(this._default == null) { return (A) this; } - if(key != null && this._default != null) {this._default.remove(key);} return (A)this; - } - public A removeFromDefault(Map map) { - if(this._default == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this._default != null){this._default.remove(key);}}} return (A)this; - } - public Map getDefault() { - return this._default; - } - public A withDefault(Map _default) { - if (_default == null) { this._default = null;} else {this._default = new LinkedHashMap(_default);} return (A) this; - } - public Boolean hasDefault() { - return this._default != null; - } - public A addToDefaultRequest(String key,Quantity value) { - if(this.defaultRequest == null && key != null && value != null) { this.defaultRequest = new LinkedHashMap(); } - if(key != null && value != null) {this.defaultRequest.put(key, value);} return (A)this; - } - public A addToDefaultRequest(Map map) { - if(this.defaultRequest == null && map != null) { this.defaultRequest = new LinkedHashMap(); } - if(map != null) { this.defaultRequest.putAll(map);} return (A)this; - } - public A removeFromDefaultRequest(String key) { - if(this.defaultRequest == null) { return (A) this; } - if(key != null && this.defaultRequest != null) {this.defaultRequest.remove(key);} return (A)this; - } - public A removeFromDefaultRequest(Map map) { - if(this.defaultRequest == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.defaultRequest != null){this.defaultRequest.remove(key);}}} return (A)this; - } - public Map getDefaultRequest() { - return this.defaultRequest; - } - public A withDefaultRequest(Map defaultRequest) { - if (defaultRequest == null) { this.defaultRequest = null;} else {this.defaultRequest = new LinkedHashMap(defaultRequest);} return (A) this; - } - public Boolean hasDefaultRequest() { - return this.defaultRequest != null; - } - public A addToMax(String key,Quantity value) { - if(this.max == null && key != null && value != null) { this.max = new LinkedHashMap(); } - if(key != null && value != null) {this.max.put(key, value);} return (A)this; - } - public A addToMax(Map map) { - if(this.max == null && map != null) { this.max = new LinkedHashMap(); } - if(map != null) { this.max.putAll(map);} return (A)this; - } - public A removeFromMax(String key) { - if(this.max == null) { return (A) this; } - if(key != null && this.max != null) {this.max.remove(key);} return (A)this; - } - public A removeFromMax(Map map) { - if(this.max == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.max != null){this.max.remove(key);}}} return (A)this; - } - public Map getMax() { - return this.max; - } - public A withMax(Map max) { - if (max == null) { this.max = null;} else {this.max = new LinkedHashMap(max);} return (A) this; - } - public Boolean hasMax() { - return this.max != null; - } - public A addToMaxLimitRequestRatio(String key,Quantity value) { - if(this.maxLimitRequestRatio == null && key != null && value != null) { this.maxLimitRequestRatio = new LinkedHashMap(); } - if(key != null && value != null) {this.maxLimitRequestRatio.put(key, value);} return (A)this; - } - public A addToMaxLimitRequestRatio(Map map) { - if(this.maxLimitRequestRatio == null && map != null) { this.maxLimitRequestRatio = new LinkedHashMap(); } - if(map != null) { this.maxLimitRequestRatio.putAll(map);} return (A)this; - } - public A removeFromMaxLimitRequestRatio(String key) { - if(this.maxLimitRequestRatio == null) { return (A) this; } - if(key != null && this.maxLimitRequestRatio != null) {this.maxLimitRequestRatio.remove(key);} return (A)this; - } - public A removeFromMaxLimitRequestRatio(Map map) { - if(this.maxLimitRequestRatio == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.maxLimitRequestRatio != null){this.maxLimitRequestRatio.remove(key);}}} return (A)this; - } - public Map getMaxLimitRequestRatio() { - return this.maxLimitRequestRatio; - } - public A withMaxLimitRequestRatio(Map maxLimitRequestRatio) { - if (maxLimitRequestRatio == null) { this.maxLimitRequestRatio = null;} else {this.maxLimitRequestRatio = new LinkedHashMap(maxLimitRequestRatio);} return (A) this; - } - public Boolean hasMaxLimitRequestRatio() { - return this.maxLimitRequestRatio != null; - } - public A addToMin(String key,Quantity value) { - if(this.min == null && key != null && value != null) { this.min = new LinkedHashMap(); } - if(key != null && value != null) {this.min.put(key, value);} return (A)this; - } - public A addToMin(Map map) { - if(this.min == null && map != null) { this.min = new LinkedHashMap(); } - if(map != null) { this.min.putAll(map);} return (A)this; - } - public A removeFromMin(String key) { - if(this.min == null) { return (A) this; } - if(key != null && this.min != null) {this.min.remove(key);} return (A)this; - } - public A removeFromMin(Map map) { - if(this.min == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.min != null){this.min.remove(key);}}} return (A)this; - } - public Map getMin() { - return this.min; - } - public A withMin(Map min) { - if (min == null) { this.min = null;} else {this.min = new LinkedHashMap(min);} return (A) this; - } - public Boolean hasMin() { - return this.min != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LimitRangeItemFluentImpl that = (V1LimitRangeItemFluentImpl) o; - if (!java.util.Objects.equals(_default, that._default)) return false; - - if (!java.util.Objects.equals(defaultRequest, that.defaultRequest)) return false; - - if (!java.util.Objects.equals(max, that.max)) return false; - - if (!java.util.Objects.equals(maxLimitRequestRatio, that.maxLimitRequestRatio)) return false; - - if (!java.util.Objects.equals(min, that.min)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(_default, defaultRequest, max, maxLimitRequestRatio, min, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (_default != null && !_default.isEmpty()) { sb.append("_default:"); sb.append(_default + ","); } - if (defaultRequest != null && !defaultRequest.isEmpty()) { sb.append("defaultRequest:"); sb.append(defaultRequest + ","); } - if (max != null && !max.isEmpty()) { sb.append("max:"); sb.append(max + ","); } - if (maxLimitRequestRatio != null && !maxLimitRequestRatio.isEmpty()) { sb.append("maxLimitRequestRatio:"); sb.append(maxLimitRequestRatio + ","); } - if (min != null && !min.isEmpty()) { sb.append("min:"); sb.append(min + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListBuilder.java index acb3881e8c..f24219f617 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LimitRangeListBuilder extends V1LimitRangeListFluentImpl implements VisitableBuilder{ +public class V1LimitRangeListBuilder extends V1LimitRangeListFluent implements VisitableBuilder{ public V1LimitRangeListBuilder() { - this(false); - } - public V1LimitRangeListBuilder(Boolean validationEnabled) { - this(new V1LimitRangeList(), validationEnabled); + this(new V1LimitRangeList()); } + public V1LimitRangeListBuilder(V1LimitRangeListFluent fluent) { - this(fluent, false); - } - public V1LimitRangeListBuilder(V1LimitRangeListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LimitRangeList(), validationEnabled); + this(fluent, new V1LimitRangeList()); } + public V1LimitRangeListBuilder(V1LimitRangeListFluent fluent,V1LimitRangeList instance) { - this(fluent, instance, false); - } - public V1LimitRangeListBuilder(V1LimitRangeListFluent fluent,V1LimitRangeList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LimitRangeListBuilder(V1LimitRangeList instance) { - this(instance,false); - } - public V1LimitRangeListBuilder(V1LimitRangeList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LimitRangeListFluent fluent; - Boolean validationEnabled; + public V1LimitRangeList build() { V1LimitRangeList buildable = new V1LimitRangeList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListFluent.java index eee8946160..455b347d74 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1LimitRangeListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1LimitRange item); - public A setToItems(int index,V1LimitRange item); - public A addToItems(io.kubernetes.client.openapi.models.V1LimitRange... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1LimitRange... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1LimitRange buildItem(int index); - public V1LimitRange buildFirstItem(); - public V1LimitRange buildLastItem(); - public V1LimitRange buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1LimitRange... items); - public Boolean hasItems(); - public V1LimitRangeListFluent.ItemsNested addNewItem(); - public V1LimitRangeListFluent.ItemsNested addNewItemLike(V1LimitRange item); - public V1LimitRangeListFluent.ItemsNested setNewItemLike(int index,V1LimitRange item); - public V1LimitRangeListFluent.ItemsNested editItem(int index); - public V1LimitRangeListFluent.ItemsNested editFirstItem(); - public V1LimitRangeListFluent.ItemsNested editLastItem(); - public V1LimitRangeListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1LimitRangeListFluent.MetadataNested withNewMetadata(); - public V1LimitRangeListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1LimitRangeListFluent.MetadataNested editMetadata(); - public V1LimitRangeListFluent.MetadataNested editOrNewMetadata(); - public V1LimitRangeListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1LimitRangeFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LimitRangeListFluent> extends BaseFluent{ + public V1LimitRangeListFluent() { + } + + public V1LimitRangeListFluent(V1LimitRangeList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1LimitRangeList instance) { + instance = (instance != null ? instance : new V1LimitRangeList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1LimitRange item) { + if (this.items == null) {this.items = new ArrayList();} + V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1LimitRange item) { + if (this.items == null) {this.items = new ArrayList();} + V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1LimitRange... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1LimitRange item : items) {V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1LimitRange item : items) {V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1LimitRange... items) { + if (this.items == null) return (A)this; + for (V1LimitRange item : items) {V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1LimitRange item : items) {V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1LimitRangeBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1LimitRange buildItem(int index) { + return this.items.get(index).build(); + } + + public V1LimitRange buildFirstItem() { + return this.items.get(0).build(); + } + + public V1LimitRange buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1LimitRange buildMatchingItem(Predicate predicate) { + for (V1LimitRangeBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1LimitRangeBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1LimitRange item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1LimitRange... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1LimitRange item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1LimitRange item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1LimitRange item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LimitRangeListFluent that = (V1LimitRangeListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1LimitRangeFluent> implements Nested{ + ItemsNested(int index,V1LimitRange item) { + this.index = index; + this.builder = new V1LimitRangeBuilder(this, item); + } + V1LimitRangeBuilder builder; + int index; + public N and() { + return (N) V1LimitRangeListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1LimitRangeListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListFluentImpl.java deleted file mode 100644 index b15846029f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LimitRangeListFluentImpl> extends BaseFluent implements V1LimitRangeListFluent{ - public V1LimitRangeListFluentImpl() { - } - public V1LimitRangeListFluentImpl(V1LimitRangeList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1LimitRange item) { - if (this.items == null) {this.items = new ArrayList();} - V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1LimitRange item) { - if (this.items == null) {this.items = new ArrayList();} - V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1LimitRange... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1LimitRange item : items) {V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1LimitRange item : items) {V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1LimitRange... items) { - for (V1LimitRange item : items) {V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1LimitRange item : items) {V1LimitRangeBuilder builder = new V1LimitRangeBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1LimitRangeBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1LimitRange buildItem(int index) { - return this.items.get(index).build(); - } - public V1LimitRange buildFirstItem() { - return this.items.get(0).build(); - } - public V1LimitRange buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1LimitRange buildMatchingItem(Predicate predicate) { - for (V1LimitRangeBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1LimitRangeBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1LimitRange item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1LimitRange... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1LimitRange item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1LimitRangeListFluentImpl.ItemsNested addNewItem() { - return new V1LimitRangeListFluentImpl.ItemsNestedImpl(); - } - public V1LimitRangeListFluentImpl.ItemsNested addNewItemLike(V1LimitRange item) { - return new V1LimitRangeListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1LimitRangeListFluentImpl.ItemsNested setNewItemLike(int index,V1LimitRange item) { - return new V1LimitRangeListFluentImpl.ItemsNestedImpl(index, item); - } - public V1LimitRangeListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1LimitRangeListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1LimitRangeListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1LimitRangeListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1LimitRangeListFluentImpl.MetadataNestedImpl(); - } - public V1LimitRangeListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1LimitRangeListFluentImpl.MetadataNestedImpl(item); - } - public V1LimitRangeListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1LimitRangeListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1LimitRangeListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LimitRangeListFluentImpl that = (V1LimitRangeListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1LimitRangeFluentImpl> implements V1LimitRangeListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1LimitRange item) { - this.index = index; - this.builder = new V1LimitRangeBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1LimitRangeBuilder(this); - } - V1LimitRangeBuilder builder; - int index; - public N and() { - return (N) V1LimitRangeListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1LimitRangeListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1LimitRangeListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecBuilder.java index 54670373c9..bdbf9fe087 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LimitRangeSpecBuilder extends V1LimitRangeSpecFluentImpl implements VisitableBuilder{ +public class V1LimitRangeSpecBuilder extends V1LimitRangeSpecFluent implements VisitableBuilder{ public V1LimitRangeSpecBuilder() { - this(false); - } - public V1LimitRangeSpecBuilder(Boolean validationEnabled) { - this(new V1LimitRangeSpec(), validationEnabled); + this(new V1LimitRangeSpec()); } + public V1LimitRangeSpecBuilder(V1LimitRangeSpecFluent fluent) { - this(fluent, false); - } - public V1LimitRangeSpecBuilder(V1LimitRangeSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LimitRangeSpec(), validationEnabled); + this(fluent, new V1LimitRangeSpec()); } + public V1LimitRangeSpecBuilder(V1LimitRangeSpecFluent fluent,V1LimitRangeSpec instance) { - this(fluent, instance, false); - } - public V1LimitRangeSpecBuilder(V1LimitRangeSpecFluent fluent,V1LimitRangeSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLimits(instance.getLimits()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LimitRangeSpecBuilder(V1LimitRangeSpec instance) { - this(instance,false); - } - public V1LimitRangeSpecBuilder(V1LimitRangeSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLimits(instance.getLimits()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LimitRangeSpecFluent fluent; - Boolean validationEnabled; + public V1LimitRangeSpec build() { V1LimitRangeSpec buildable = new V1LimitRangeSpec(); - buildable.setLimits(fluent.getLimits()); + buildable.setLimits(fluent.buildLimits()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecFluent.java index 2bb56cfe49..e741aac1ff 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1LimitRangeSpecFluent> extends Fluent{ - public A addToLimits(int index,V1LimitRangeItem item); - public A setToLimits(int index,V1LimitRangeItem item); - public A addToLimits(io.kubernetes.client.openapi.models.V1LimitRangeItem... items); - public A addAllToLimits(Collection items); - public A removeFromLimits(io.kubernetes.client.openapi.models.V1LimitRangeItem... items); - public A removeAllFromLimits(Collection items); - public A removeMatchingFromLimits(Predicate predicate); - - /** - * This method has been deprecated, please use method buildLimits instead. - * @return The buildable object. - */ - @Deprecated - public List getLimits(); - public List buildLimits(); - public V1LimitRangeItem buildLimit(int index); - public V1LimitRangeItem buildFirstLimit(); - public V1LimitRangeItem buildLastLimit(); - public V1LimitRangeItem buildMatchingLimit(Predicate predicate); - public Boolean hasMatchingLimit(Predicate predicate); - public A withLimits(List limits); - public A withLimits(io.kubernetes.client.openapi.models.V1LimitRangeItem... limits); - public Boolean hasLimits(); - public V1LimitRangeSpecFluent.LimitsNested addNewLimit(); - public V1LimitRangeSpecFluent.LimitsNested addNewLimitLike(V1LimitRangeItem item); - public V1LimitRangeSpecFluent.LimitsNested setNewLimitLike(int index,V1LimitRangeItem item); - public V1LimitRangeSpecFluent.LimitsNested editLimit(int index); - public V1LimitRangeSpecFluent.LimitsNested editFirstLimit(); - public V1LimitRangeSpecFluent.LimitsNested editLastLimit(); - public V1LimitRangeSpecFluent.LimitsNested editMatchingLimit(Predicate predicate); - public interface LimitsNested extends Nested,V1LimitRangeItemFluent>{ - public N and(); - public N endLimit(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LimitRangeSpecFluent> extends BaseFluent{ + public V1LimitRangeSpecFluent() { + } + + public V1LimitRangeSpecFluent(V1LimitRangeSpec instance) { + this.copyInstance(instance); + } + private ArrayList limits; + + protected void copyInstance(V1LimitRangeSpec instance) { + instance = (instance != null ? instance : new V1LimitRangeSpec()); + if (instance != null) { + this.withLimits(instance.getLimits()); + } + } + + public A addToLimits(int index,V1LimitRangeItem item) { + if (this.limits == null) {this.limits = new ArrayList();} + V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item); + if (index < 0 || index >= limits.size()) { _visitables.get("limits").add(builder); limits.add(builder); } else { _visitables.get("limits").add(index, builder); limits.add(index, builder);} + return (A)this; + } + + public A setToLimits(int index,V1LimitRangeItem item) { + if (this.limits == null) {this.limits = new ArrayList();} + V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item); + if (index < 0 || index >= limits.size()) { _visitables.get("limits").add(builder); limits.add(builder); } else { _visitables.get("limits").set(index, builder); limits.set(index, builder);} + return (A)this; + } + + public A addToLimits(io.kubernetes.client.openapi.models.V1LimitRangeItem... items) { + if (this.limits == null) {this.limits = new ArrayList();} + for (V1LimitRangeItem item : items) {V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item);_visitables.get("limits").add(builder);this.limits.add(builder);} return (A)this; + } + + public A addAllToLimits(Collection items) { + if (this.limits == null) {this.limits = new ArrayList();} + for (V1LimitRangeItem item : items) {V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item);_visitables.get("limits").add(builder);this.limits.add(builder);} return (A)this; + } + + public A removeFromLimits(io.kubernetes.client.openapi.models.V1LimitRangeItem... items) { + if (this.limits == null) return (A)this; + for (V1LimitRangeItem item : items) {V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item);_visitables.get("limits").remove(builder); this.limits.remove(builder);} return (A)this; + } + + public A removeAllFromLimits(Collection items) { + if (this.limits == null) return (A)this; + for (V1LimitRangeItem item : items) {V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item);_visitables.get("limits").remove(builder); this.limits.remove(builder);} return (A)this; + } + + public A removeMatchingFromLimits(Predicate predicate) { + if (limits == null) return (A) this; + final Iterator each = limits.iterator(); + final List visitables = _visitables.get("limits"); + while (each.hasNext()) { + V1LimitRangeItemBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildLimits() { + return this.limits != null ? build(limits) : null; + } + + public V1LimitRangeItem buildLimit(int index) { + return this.limits.get(index).build(); + } + + public V1LimitRangeItem buildFirstLimit() { + return this.limits.get(0).build(); + } + + public V1LimitRangeItem buildLastLimit() { + return this.limits.get(limits.size() - 1).build(); + } + + public V1LimitRangeItem buildMatchingLimit(Predicate predicate) { + for (V1LimitRangeItemBuilder item : limits) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingLimit(Predicate predicate) { + for (V1LimitRangeItemBuilder item : limits) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withLimits(List limits) { + if (this.limits != null) { + this._visitables.get("limits").clear(); + } + if (limits != null) { + this.limits = new ArrayList(); + for (V1LimitRangeItem item : limits) { + this.addToLimits(item); + } + } else { + this.limits = null; + } + return (A) this; + } + + public A withLimits(io.kubernetes.client.openapi.models.V1LimitRangeItem... limits) { + if (this.limits != null) { + this.limits.clear(); + _visitables.remove("limits"); + } + if (limits != null) { + for (V1LimitRangeItem item : limits) { + this.addToLimits(item); + } + } + return (A) this; + } + + public boolean hasLimits() { + return this.limits != null && !this.limits.isEmpty(); + } + + public LimitsNested addNewLimit() { + return new LimitsNested(-1, null); + } + + public LimitsNested addNewLimitLike(V1LimitRangeItem item) { + return new LimitsNested(-1, item); + } + + public LimitsNested setNewLimitLike(int index,V1LimitRangeItem item) { + return new LimitsNested(index, item); + } + + public LimitsNested editLimit(int index) { + if (limits.size() <= index) throw new RuntimeException("Can't edit limits. Index exceeds size."); + return setNewLimitLike(index, buildLimit(index)); + } + + public LimitsNested editFirstLimit() { + if (limits.size() == 0) throw new RuntimeException("Can't edit first limits. The list is empty."); + return setNewLimitLike(0, buildLimit(0)); + } + + public LimitsNested editLastLimit() { + int index = limits.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last limits. The list is empty."); + return setNewLimitLike(index, buildLimit(index)); + } + + public LimitsNested editMatchingLimit(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1LimitRangeItemFluent> implements Nested{ + LimitsNested(int index,V1LimitRangeItem item) { + this.index = index; + this.builder = new V1LimitRangeItemBuilder(this, item); + } + V1LimitRangeItemBuilder builder; + int index; + + public N and() { + return (N) V1LimitRangeSpecFluent.this.setToLimits(index,builder.build()); + } + + public N endLimit() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecFluentImpl.java deleted file mode 100644 index 32d384f632..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LimitRangeSpecFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LimitRangeSpecFluentImpl> extends BaseFluent implements V1LimitRangeSpecFluent{ - public V1LimitRangeSpecFluentImpl() { - } - public V1LimitRangeSpecFluentImpl(V1LimitRangeSpec instance) { - if (instance != null) { - this.withLimits(instance.getLimits()); - } - } - private ArrayList limits; - public A addToLimits(int index,V1LimitRangeItem item) { - if (this.limits == null) {this.limits = new ArrayList();} - V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item); - if (index < 0 || index >= limits.size()) { _visitables.get("limits").add(builder); limits.add(builder); } else { _visitables.get("limits").add(index, builder); limits.add(index, builder);} - return (A)this; - } - public A setToLimits(int index,V1LimitRangeItem item) { - if (this.limits == null) {this.limits = new ArrayList();} - V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item); - if (index < 0 || index >= limits.size()) { _visitables.get("limits").add(builder); limits.add(builder); } else { _visitables.get("limits").set(index, builder); limits.set(index, builder);} - return (A)this; - } - public A addToLimits(io.kubernetes.client.openapi.models.V1LimitRangeItem... items) { - if (this.limits == null) {this.limits = new ArrayList();} - for (V1LimitRangeItem item : items) {V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item);_visitables.get("limits").add(builder);this.limits.add(builder);} return (A)this; - } - public A addAllToLimits(Collection items) { - if (this.limits == null) {this.limits = new ArrayList();} - for (V1LimitRangeItem item : items) {V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item);_visitables.get("limits").add(builder);this.limits.add(builder);} return (A)this; - } - public A removeFromLimits(io.kubernetes.client.openapi.models.V1LimitRangeItem... items) { - for (V1LimitRangeItem item : items) {V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item);_visitables.get("limits").remove(builder);if (this.limits != null) {this.limits.remove(builder);}} return (A)this; - } - public A removeAllFromLimits(Collection items) { - for (V1LimitRangeItem item : items) {V1LimitRangeItemBuilder builder = new V1LimitRangeItemBuilder(item);_visitables.get("limits").remove(builder);if (this.limits != null) {this.limits.remove(builder);}} return (A)this; - } - public A removeMatchingFromLimits(Predicate predicate) { - if (limits == null) return (A) this; - final Iterator each = limits.iterator(); - final List visitables = _visitables.get("limits"); - while (each.hasNext()) { - V1LimitRangeItemBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildLimits instead. - * @return The buildable object. - */ - @Deprecated - public List getLimits() { - return limits != null ? build(limits) : null; - } - public List buildLimits() { - return limits != null ? build(limits) : null; - } - public V1LimitRangeItem buildLimit(int index) { - return this.limits.get(index).build(); - } - public V1LimitRangeItem buildFirstLimit() { - return this.limits.get(0).build(); - } - public V1LimitRangeItem buildLastLimit() { - return this.limits.get(limits.size() - 1).build(); - } - public V1LimitRangeItem buildMatchingLimit(Predicate predicate) { - for (V1LimitRangeItemBuilder item: limits) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingLimit(Predicate predicate) { - for (V1LimitRangeItemBuilder item: limits) { if(predicate.test(item)){ return true;} } return false; - } - public A withLimits(List limits) { - if (this.limits != null) { _visitables.get("limits").clear();} - if (limits != null) {this.limits = new ArrayList(); for (V1LimitRangeItem item : limits){this.addToLimits(item);}} else { this.limits = null;} return (A) this; - } - public A withLimits(io.kubernetes.client.openapi.models.V1LimitRangeItem... limits) { - if (this.limits != null) {this.limits.clear(); _visitables.remove("limits"); } - if (limits != null) {for (V1LimitRangeItem item :limits){ this.addToLimits(item);}} return (A) this; - } - public Boolean hasLimits() { - return limits != null && !limits.isEmpty(); - } - public V1LimitRangeSpecFluentImpl.LimitsNested addNewLimit() { - return new V1LimitRangeSpecFluentImpl.LimitsNestedImpl(); - } - public V1LimitRangeSpecFluentImpl.LimitsNested addNewLimitLike(V1LimitRangeItem item) { - return new V1LimitRangeSpecFluentImpl.LimitsNestedImpl(-1, item); - } - public V1LimitRangeSpecFluentImpl.LimitsNested setNewLimitLike(int index,V1LimitRangeItem item) { - return new V1LimitRangeSpecFluentImpl.LimitsNestedImpl(index, item); - } - public V1LimitRangeSpecFluentImpl.LimitsNested editLimit(int index) { - if (limits.size() <= index) throw new RuntimeException("Can't edit limits. Index exceeds size."); - return setNewLimitLike(index, buildLimit(index)); - } - public V1LimitRangeSpecFluentImpl.LimitsNested editFirstLimit() { - if (limits.size() == 0) throw new RuntimeException("Can't edit first limits. The list is empty."); - return setNewLimitLike(0, buildLimit(0)); - } - public V1LimitRangeSpecFluentImpl.LimitsNested editLastLimit() { - int index = limits.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last limits. The list is empty."); - return setNewLimitLike(index, buildLimit(index)); - } - public V1LimitRangeSpecFluentImpl.LimitsNested editMatchingLimit(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1LimitRangeItemFluentImpl> implements V1LimitRangeSpecFluentImpl.LimitsNested,Nested{ - LimitsNestedImpl(int index,V1LimitRangeItem item) { - this.index = index; - this.builder = new V1LimitRangeItemBuilder(this, item); - } - LimitsNestedImpl() { - this.index = -1; - this.builder = new V1LimitRangeItemBuilder(this); - } - V1LimitRangeItemBuilder builder; - int index; - public N and() { - return (N) V1LimitRangeSpecFluentImpl.this.setToLimits(index,builder.build()); - } - public N endLimit() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaBuilder.java index 812e405e0f..20cab15f0a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ListMetaBuilder extends V1ListMetaFluentImpl implements VisitableBuilder{ +public class V1ListMetaBuilder extends V1ListMetaFluent implements VisitableBuilder{ public V1ListMetaBuilder() { - this(false); - } - public V1ListMetaBuilder(Boolean validationEnabled) { - this(new V1ListMeta(), validationEnabled); + this(new V1ListMeta()); } + public V1ListMetaBuilder(V1ListMetaFluent fluent) { - this(fluent, false); - } - public V1ListMetaBuilder(V1ListMetaFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ListMeta(), validationEnabled); + this(fluent, new V1ListMeta()); } + public V1ListMetaBuilder(V1ListMetaFluent fluent,V1ListMeta instance) { - this(fluent, instance, false); - } - public V1ListMetaBuilder(V1ListMetaFluent fluent,V1ListMeta instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withContinue(instance.getContinue()); - fluent.withRemainingItemCount(instance.getRemainingItemCount()); - fluent.withResourceVersion(instance.getResourceVersion()); - fluent.withSelfLink(instance.getSelfLink()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ListMetaBuilder(V1ListMeta instance) { - this(instance,false); - } - public V1ListMetaBuilder(V1ListMeta instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withContinue(instance.getContinue()); - this.withRemainingItemCount(instance.getRemainingItemCount()); - this.withResourceVersion(instance.getResourceVersion()); - this.withSelfLink(instance.getSelfLink()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ListMetaFluent fluent; - Boolean validationEnabled; + public V1ListMeta build() { V1ListMeta buildable = new V1ListMeta(); buildable.setContinue(fluent.getContinue()); @@ -52,4 +30,5 @@ public V1ListMeta build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaFluent.java index 2cd7a2e15d..7d9a96695d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaFluent.java @@ -1,26 +1,115 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ListMetaFluent> extends Fluent{ - public String getContinue(); - public A withContinue(String _continue); - public Boolean hasContinue(); - public Long getRemainingItemCount(); - public A withRemainingItemCount(Long remainingItemCount); - public Boolean hasRemainingItemCount(); - public String getResourceVersion(); - public A withResourceVersion(String resourceVersion); - public Boolean hasResourceVersion(); - public String getSelfLink(); - public A withSelfLink(String selfLink); - public Boolean hasSelfLink(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ListMetaFluent> extends BaseFluent{ + public V1ListMetaFluent() { + } + public V1ListMetaFluent(V1ListMeta instance) { + this.copyInstance(instance); + } + private String _continue; + private Long remainingItemCount; + private String resourceVersion; + private String selfLink; + + protected void copyInstance(V1ListMeta instance) { + instance = (instance != null ? instance : new V1ListMeta()); + if (instance != null) { + this.withContinue(instance.getContinue()); + this.withRemainingItemCount(instance.getRemainingItemCount()); + this.withResourceVersion(instance.getResourceVersion()); + this.withSelfLink(instance.getSelfLink()); + } + } + + public String getContinue() { + return this._continue; + } + + public A withContinue(String _continue) { + this._continue = _continue; + return (A) this; + } + + public boolean hasContinue() { + return this._continue != null; + } + + public Long getRemainingItemCount() { + return this.remainingItemCount; + } + + public A withRemainingItemCount(Long remainingItemCount) { + this.remainingItemCount = remainingItemCount; + return (A) this; + } + + public boolean hasRemainingItemCount() { + return this.remainingItemCount != null; + } + + public String getResourceVersion() { + return this.resourceVersion; + } + + public A withResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + return (A) this; + } + + public boolean hasResourceVersion() { + return this.resourceVersion != null; + } + + public String getSelfLink() { + return this.selfLink; + } + + public A withSelfLink(String selfLink) { + this.selfLink = selfLink; + return (A) this; + } + + public boolean hasSelfLink() { + return this.selfLink != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ListMetaFluent that = (V1ListMetaFluent) o; + if (!java.util.Objects.equals(_continue, that._continue)) return false; + if (!java.util.Objects.equals(remainingItemCount, that.remainingItemCount)) return false; + if (!java.util.Objects.equals(resourceVersion, that.resourceVersion)) return false; + if (!java.util.Objects.equals(selfLink, that.selfLink)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(_continue, remainingItemCount, resourceVersion, selfLink, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (_continue != null) { sb.append("_continue:"); sb.append(_continue + ","); } + if (remainingItemCount != null) { sb.append("remainingItemCount:"); sb.append(remainingItemCount + ","); } + if (resourceVersion != null) { sb.append("resourceVersion:"); sb.append(resourceVersion + ","); } + if (selfLink != null) { sb.append("selfLink:"); sb.append(selfLink); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaFluentImpl.java deleted file mode 100644 index c8425571eb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ListMetaFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ListMetaFluentImpl> extends BaseFluent implements V1ListMetaFluent{ - public V1ListMetaFluentImpl() { - } - public V1ListMetaFluentImpl(V1ListMeta instance) { - if (instance != null) { - this.withContinue(instance.getContinue()); - this.withRemainingItemCount(instance.getRemainingItemCount()); - this.withResourceVersion(instance.getResourceVersion()); - this.withSelfLink(instance.getSelfLink()); - } - } - private String _continue; - private Long remainingItemCount; - private String resourceVersion; - private String selfLink; - public String getContinue() { - return this._continue; - } - public A withContinue(String _continue) { - this._continue=_continue; return (A) this; - } - public Boolean hasContinue() { - return this._continue != null; - } - public Long getRemainingItemCount() { - return this.remainingItemCount; - } - public A withRemainingItemCount(Long remainingItemCount) { - this.remainingItemCount=remainingItemCount; return (A) this; - } - public Boolean hasRemainingItemCount() { - return this.remainingItemCount != null; - } - public String getResourceVersion() { - return this.resourceVersion; - } - public A withResourceVersion(String resourceVersion) { - this.resourceVersion=resourceVersion; return (A) this; - } - public Boolean hasResourceVersion() { - return this.resourceVersion != null; - } - public String getSelfLink() { - return this.selfLink; - } - public A withSelfLink(String selfLink) { - this.selfLink=selfLink; return (A) this; - } - public Boolean hasSelfLink() { - return this.selfLink != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ListMetaFluentImpl that = (V1ListMetaFluentImpl) o; - if (!java.util.Objects.equals(_continue, that._continue)) return false; - - if (!java.util.Objects.equals(remainingItemCount, that.remainingItemCount)) return false; - - if (!java.util.Objects.equals(resourceVersion, that.resourceVersion)) return false; - - if (!java.util.Objects.equals(selfLink, that.selfLink)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(_continue, remainingItemCount, resourceVersion, selfLink, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (_continue != null) { sb.append("_continue:"); sb.append(_continue + ","); } - if (remainingItemCount != null) { sb.append("remainingItemCount:"); sb.append(remainingItemCount + ","); } - if (resourceVersion != null) { sb.append("resourceVersion:"); sb.append(resourceVersion + ","); } - if (selfLink != null) { sb.append("selfLink:"); sb.append(selfLink); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressBuilder.java index 9c9e3b32e4..34c50901cf 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LoadBalancerIngressBuilder extends V1LoadBalancerIngressFluentImpl implements VisitableBuilder{ +public class V1LoadBalancerIngressBuilder extends V1LoadBalancerIngressFluent implements VisitableBuilder{ public V1LoadBalancerIngressBuilder() { - this(false); - } - public V1LoadBalancerIngressBuilder(Boolean validationEnabled) { - this(new V1LoadBalancerIngress(), validationEnabled); + this(new V1LoadBalancerIngress()); } + public V1LoadBalancerIngressBuilder(V1LoadBalancerIngressFluent fluent) { - this(fluent, false); - } - public V1LoadBalancerIngressBuilder(V1LoadBalancerIngressFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LoadBalancerIngress(), validationEnabled); + this(fluent, new V1LoadBalancerIngress()); } + public V1LoadBalancerIngressBuilder(V1LoadBalancerIngressFluent fluent,V1LoadBalancerIngress instance) { - this(fluent, instance, false); - } - public V1LoadBalancerIngressBuilder(V1LoadBalancerIngressFluent fluent,V1LoadBalancerIngress instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHostname(instance.getHostname()); - fluent.withIp(instance.getIp()); - fluent.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LoadBalancerIngressBuilder(V1LoadBalancerIngress instance) { - this(instance,false); - } - public V1LoadBalancerIngressBuilder(V1LoadBalancerIngress instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHostname(instance.getHostname()); - this.withIp(instance.getIp()); - this.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LoadBalancerIngressFluent fluent; - Boolean validationEnabled; + public V1LoadBalancerIngress build() { V1LoadBalancerIngress buildable = new V1LoadBalancerIngress(); buildable.setHostname(fluent.getHostname()); buildable.setIp(fluent.getIp()); - buildable.setPorts(fluent.getPorts()); + buildable.setPorts(fluent.buildPorts()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressFluent.java index 0e4162ed61..31896d5c42 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressFluent.java @@ -1,62 +1,259 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1LoadBalancerIngressFluent> extends Fluent{ - public String getHostname(); - public A withHostname(String hostname); - public Boolean hasHostname(); - public String getIp(); - public A withIp(String ip); - public Boolean hasIp(); - public A addToPorts(int index,V1PortStatus item); - public A setToPorts(int index,V1PortStatus item); - public A addToPorts(io.kubernetes.client.openapi.models.V1PortStatus... items); - public A addAllToPorts(Collection items); - public A removeFromPorts(io.kubernetes.client.openapi.models.V1PortStatus... items); - public A removeAllFromPorts(Collection items); - public A removeMatchingFromPorts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts(); - public List buildPorts(); - public V1PortStatus buildPort(int index); - public V1PortStatus buildFirstPort(); - public V1PortStatus buildLastPort(); - public V1PortStatus buildMatchingPort(Predicate predicate); - public Boolean hasMatchingPort(Predicate predicate); - public A withPorts(List ports); - public A withPorts(io.kubernetes.client.openapi.models.V1PortStatus... ports); - public Boolean hasPorts(); - public V1LoadBalancerIngressFluent.PortsNested addNewPort(); - public V1LoadBalancerIngressFluent.PortsNested addNewPortLike(V1PortStatus item); - public V1LoadBalancerIngressFluent.PortsNested setNewPortLike(int index,V1PortStatus item); - public V1LoadBalancerIngressFluent.PortsNested editPort(int index); - public V1LoadBalancerIngressFluent.PortsNested editFirstPort(); - public V1LoadBalancerIngressFluent.PortsNested editLastPort(); - public V1LoadBalancerIngressFluent.PortsNested editMatchingPort(Predicate predicate); - public interface PortsNested extends Nested,V1PortStatusFluent>{ - public N and(); - public N endPort(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LoadBalancerIngressFluent> extends BaseFluent{ + public V1LoadBalancerIngressFluent() { + } + + public V1LoadBalancerIngressFluent(V1LoadBalancerIngress instance) { + this.copyInstance(instance); + } + private String hostname; + private String ip; + private ArrayList ports; + + protected void copyInstance(V1LoadBalancerIngress instance) { + instance = (instance != null ? instance : new V1LoadBalancerIngress()); + if (instance != null) { + this.withHostname(instance.getHostname()); + this.withIp(instance.getIp()); + this.withPorts(instance.getPorts()); + } + } + + public String getHostname() { + return this.hostname; + } + + public A withHostname(String hostname) { + this.hostname = hostname; + return (A) this; + } + + public boolean hasHostname() { + return this.hostname != null; + } + + public String getIp() { + return this.ip; + } + + public A withIp(String ip) { + this.ip = ip; + return (A) this; + } + + public boolean hasIp() { + return this.ip != null; + } + + public A addToPorts(int index,V1PortStatus item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1PortStatusBuilder builder = new V1PortStatusBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} + return (A)this; + } + + public A setToPorts(int index,V1PortStatus item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1PortStatusBuilder builder = new V1PortStatusBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} + return (A)this; + } + + public A addToPorts(io.kubernetes.client.openapi.models.V1PortStatus... items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1PortStatus item : items) {V1PortStatusBuilder builder = new V1PortStatusBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A addAllToPorts(Collection items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1PortStatus item : items) {V1PortStatusBuilder builder = new V1PortStatusBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A removeFromPorts(io.kubernetes.client.openapi.models.V1PortStatus... items) { + if (this.ports == null) return (A)this; + for (V1PortStatus item : items) {V1PortStatusBuilder builder = new V1PortStatusBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeAllFromPorts(Collection items) { + if (this.ports == null) return (A)this; + for (V1PortStatus item : items) {V1PortStatusBuilder builder = new V1PortStatusBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeMatchingFromPorts(Predicate predicate) { + if (ports == null) return (A) this; + final Iterator each = ports.iterator(); + final List visitables = _visitables.get("ports"); + while (each.hasNext()) { + V1PortStatusBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPorts() { + return this.ports != null ? build(ports) : null; + } + + public V1PortStatus buildPort(int index) { + return this.ports.get(index).build(); + } + + public V1PortStatus buildFirstPort() { + return this.ports.get(0).build(); } + public V1PortStatus buildLastPort() { + return this.ports.get(ports.size() - 1).build(); + } + + public V1PortStatus buildMatchingPort(Predicate predicate) { + for (V1PortStatusBuilder item : ports) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPort(Predicate predicate) { + for (V1PortStatusBuilder item : ports) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPorts(List ports) { + if (this.ports != null) { + this._visitables.get("ports").clear(); + } + if (ports != null) { + this.ports = new ArrayList(); + for (V1PortStatus item : ports) { + this.addToPorts(item); + } + } else { + this.ports = null; + } + return (A) this; + } + + public A withPorts(io.kubernetes.client.openapi.models.V1PortStatus... ports) { + if (this.ports != null) { + this.ports.clear(); + _visitables.remove("ports"); + } + if (ports != null) { + for (V1PortStatus item : ports) { + this.addToPorts(item); + } + } + return (A) this; + } + + public boolean hasPorts() { + return this.ports != null && !this.ports.isEmpty(); + } + + public PortsNested addNewPort() { + return new PortsNested(-1, null); + } + + public PortsNested addNewPortLike(V1PortStatus item) { + return new PortsNested(-1, item); + } + + public PortsNested setNewPortLike(int index,V1PortStatus item) { + return new PortsNested(index, item); + } + + public PortsNested editPort(int index) { + if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editFirstPort() { + if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); + return setNewPortLike(0, buildPort(0)); + } + + public PortsNested editLastPort() { + int index = ports.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editMatchingPort(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1PortStatusFluent> implements Nested{ + PortsNested(int index,V1PortStatus item) { + this.index = index; + this.builder = new V1PortStatusBuilder(this, item); + } + V1PortStatusBuilder builder; + int index; + + public N and() { + return (N) V1LoadBalancerIngressFluent.this.setToPorts(index,builder.build()); + } + + public N endPort() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressFluentImpl.java deleted file mode 100644 index a3e3f44f9d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerIngressFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LoadBalancerIngressFluentImpl> extends BaseFluent implements V1LoadBalancerIngressFluent{ - public V1LoadBalancerIngressFluentImpl() { - } - public V1LoadBalancerIngressFluentImpl(V1LoadBalancerIngress instance) { - if (instance != null) { - this.withHostname(instance.getHostname()); - this.withIp(instance.getIp()); - this.withPorts(instance.getPorts()); - } - } - private String hostname; - private String ip; - private ArrayList ports; - public String getHostname() { - return this.hostname; - } - public A withHostname(String hostname) { - this.hostname=hostname; return (A) this; - } - public Boolean hasHostname() { - return this.hostname != null; - } - public String getIp() { - return this.ip; - } - public A withIp(String ip) { - this.ip=ip; return (A) this; - } - public Boolean hasIp() { - return this.ip != null; - } - public A addToPorts(int index,V1PortStatus item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1PortStatusBuilder builder = new V1PortStatusBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} - return (A)this; - } - public A setToPorts(int index,V1PortStatus item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1PortStatusBuilder builder = new V1PortStatusBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} - return (A)this; - } - public A addToPorts(io.kubernetes.client.openapi.models.V1PortStatus... items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1PortStatus item : items) {V1PortStatusBuilder builder = new V1PortStatusBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A addAllToPorts(Collection items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1PortStatus item : items) {V1PortStatusBuilder builder = new V1PortStatusBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A removeFromPorts(io.kubernetes.client.openapi.models.V1PortStatus... items) { - for (V1PortStatus item : items) {V1PortStatusBuilder builder = new V1PortStatusBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeAllFromPorts(Collection items) { - for (V1PortStatus item : items) {V1PortStatusBuilder builder = new V1PortStatusBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeMatchingFromPorts(Predicate predicate) { - if (ports == null) return (A) this; - final Iterator each = ports.iterator(); - final List visitables = _visitables.get("ports"); - while (each.hasNext()) { - V1PortStatusBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts() { - return ports != null ? build(ports) : null; - } - public List buildPorts() { - return ports != null ? build(ports) : null; - } - public V1PortStatus buildPort(int index) { - return this.ports.get(index).build(); - } - public V1PortStatus buildFirstPort() { - return this.ports.get(0).build(); - } - public V1PortStatus buildLastPort() { - return this.ports.get(ports.size() - 1).build(); - } - public V1PortStatus buildMatchingPort(Predicate predicate) { - for (V1PortStatusBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPort(Predicate predicate) { - for (V1PortStatusBuilder item: ports) { if(predicate.test(item)){ return true;} } return false; - } - public A withPorts(List ports) { - if (this.ports != null) { _visitables.get("ports").clear();} - if (ports != null) {this.ports = new ArrayList(); for (V1PortStatus item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this; - } - public A withPorts(io.kubernetes.client.openapi.models.V1PortStatus... ports) { - if (this.ports != null) {this.ports.clear(); _visitables.remove("ports"); } - if (ports != null) {for (V1PortStatus item :ports){ this.addToPorts(item);}} return (A) this; - } - public Boolean hasPorts() { - return ports != null && !ports.isEmpty(); - } - public V1LoadBalancerIngressFluentImpl.PortsNested addNewPort() { - return new V1LoadBalancerIngressFluentImpl.PortsNestedImpl(); - } - public V1LoadBalancerIngressFluentImpl.PortsNested addNewPortLike(V1PortStatus item) { - return new V1LoadBalancerIngressFluentImpl.PortsNestedImpl(-1, item); - } - public V1LoadBalancerIngressFluentImpl.PortsNested setNewPortLike(int index,V1PortStatus item) { - return new V1LoadBalancerIngressFluentImpl.PortsNestedImpl(index, item); - } - public V1LoadBalancerIngressFluentImpl.PortsNested editPort(int index) { - if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); - return setNewPortLike(index, buildPort(index)); - } - public V1LoadBalancerIngressFluentImpl.PortsNested editFirstPort() { - if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); - return setNewPortLike(0, buildPort(0)); - } - public V1LoadBalancerIngressFluentImpl.PortsNested editLastPort() { - int index = ports.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); - return setNewPortLike(index, buildPort(index)); - } - public V1LoadBalancerIngressFluentImpl.PortsNested editMatchingPort(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1PortStatusFluentImpl> implements V1LoadBalancerIngressFluentImpl.PortsNested,Nested{ - PortsNestedImpl(int index,V1PortStatus item) { - this.index = index; - this.builder = new V1PortStatusBuilder(this, item); - } - PortsNestedImpl() { - this.index = -1; - this.builder = new V1PortStatusBuilder(this); - } - V1PortStatusBuilder builder; - int index; - public N and() { - return (N) V1LoadBalancerIngressFluentImpl.this.setToPorts(index,builder.build()); - } - public N endPort() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusBuilder.java index f559c07367..0793a3fe05 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LoadBalancerStatusBuilder extends V1LoadBalancerStatusFluentImpl implements VisitableBuilder{ +public class V1LoadBalancerStatusBuilder extends V1LoadBalancerStatusFluent implements VisitableBuilder{ public V1LoadBalancerStatusBuilder() { - this(false); - } - public V1LoadBalancerStatusBuilder(Boolean validationEnabled) { - this(new V1LoadBalancerStatus(), validationEnabled); + this(new V1LoadBalancerStatus()); } + public V1LoadBalancerStatusBuilder(V1LoadBalancerStatusFluent fluent) { - this(fluent, false); - } - public V1LoadBalancerStatusBuilder(V1LoadBalancerStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LoadBalancerStatus(), validationEnabled); + this(fluent, new V1LoadBalancerStatus()); } + public V1LoadBalancerStatusBuilder(V1LoadBalancerStatusFluent fluent,V1LoadBalancerStatus instance) { - this(fluent, instance, false); - } - public V1LoadBalancerStatusBuilder(V1LoadBalancerStatusFluent fluent,V1LoadBalancerStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withIngress(instance.getIngress()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LoadBalancerStatusBuilder(V1LoadBalancerStatus instance) { - this(instance,false); - } - public V1LoadBalancerStatusBuilder(V1LoadBalancerStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withIngress(instance.getIngress()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LoadBalancerStatusFluent fluent; - Boolean validationEnabled; + public V1LoadBalancerStatus build() { V1LoadBalancerStatus buildable = new V1LoadBalancerStatus(); - buildable.setIngress(fluent.getIngress()); + buildable.setIngress(fluent.buildIngress()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusFluent.java index 500957a042..088467bb84 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1LoadBalancerStatusFluent> extends Fluent{ - public A addToIngress(int index,V1LoadBalancerIngress item); - public A setToIngress(int index,V1LoadBalancerIngress item); - public A addToIngress(io.kubernetes.client.openapi.models.V1LoadBalancerIngress... items); - public A addAllToIngress(Collection items); - public A removeFromIngress(io.kubernetes.client.openapi.models.V1LoadBalancerIngress... items); - public A removeAllFromIngress(Collection items); - public A removeMatchingFromIngress(Predicate predicate); - - /** - * This method has been deprecated, please use method buildIngress instead. - * @return The buildable object. - */ - @Deprecated - public List getIngress(); - public List buildIngress(); - public V1LoadBalancerIngress buildIngress(int index); - public V1LoadBalancerIngress buildFirstIngress(); - public V1LoadBalancerIngress buildLastIngress(); - public V1LoadBalancerIngress buildMatchingIngress(Predicate predicate); - public Boolean hasMatchingIngress(Predicate predicate); - public A withIngress(List ingress); - public A withIngress(io.kubernetes.client.openapi.models.V1LoadBalancerIngress... ingress); - public Boolean hasIngress(); - public V1LoadBalancerStatusFluent.IngressNested addNewIngress(); - public V1LoadBalancerStatusFluent.IngressNested addNewIngressLike(V1LoadBalancerIngress item); - public V1LoadBalancerStatusFluent.IngressNested setNewIngressLike(int index,V1LoadBalancerIngress item); - public V1LoadBalancerStatusFluent.IngressNested editIngress(int index); - public V1LoadBalancerStatusFluent.IngressNested editFirstIngress(); - public V1LoadBalancerStatusFluent.IngressNested editLastIngress(); - public V1LoadBalancerStatusFluent.IngressNested editMatchingIngress(Predicate predicate); - public interface IngressNested extends Nested,V1LoadBalancerIngressFluent>{ - public N and(); - public N endIngress(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LoadBalancerStatusFluent> extends BaseFluent{ + public V1LoadBalancerStatusFluent() { + } + + public V1LoadBalancerStatusFluent(V1LoadBalancerStatus instance) { + this.copyInstance(instance); + } + private ArrayList ingress; + + protected void copyInstance(V1LoadBalancerStatus instance) { + instance = (instance != null ? instance : new V1LoadBalancerStatus()); + if (instance != null) { + this.withIngress(instance.getIngress()); + } + } + + public A addToIngress(int index,V1LoadBalancerIngress item) { + if (this.ingress == null) {this.ingress = new ArrayList();} + V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item); + if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").add(index, builder); ingress.add(index, builder);} + return (A)this; + } + + public A setToIngress(int index,V1LoadBalancerIngress item) { + if (this.ingress == null) {this.ingress = new ArrayList();} + V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item); + if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").set(index, builder); ingress.set(index, builder);} + return (A)this; + } + + public A addToIngress(io.kubernetes.client.openapi.models.V1LoadBalancerIngress... items) { + if (this.ingress == null) {this.ingress = new ArrayList();} + for (V1LoadBalancerIngress item : items) {V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; + } + + public A addAllToIngress(Collection items) { + if (this.ingress == null) {this.ingress = new ArrayList();} + for (V1LoadBalancerIngress item : items) {V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; + } + + public A removeFromIngress(io.kubernetes.client.openapi.models.V1LoadBalancerIngress... items) { + if (this.ingress == null) return (A)this; + for (V1LoadBalancerIngress item : items) {V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item);_visitables.get("ingress").remove(builder); this.ingress.remove(builder);} return (A)this; + } + + public A removeAllFromIngress(Collection items) { + if (this.ingress == null) return (A)this; + for (V1LoadBalancerIngress item : items) {V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item);_visitables.get("ingress").remove(builder); this.ingress.remove(builder);} return (A)this; + } + + public A removeMatchingFromIngress(Predicate predicate) { + if (ingress == null) return (A) this; + final Iterator each = ingress.iterator(); + final List visitables = _visitables.get("ingress"); + while (each.hasNext()) { + V1LoadBalancerIngressBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildIngress() { + return this.ingress != null ? build(ingress) : null; + } + + public V1LoadBalancerIngress buildIngress(int index) { + return this.ingress.get(index).build(); + } + + public V1LoadBalancerIngress buildFirstIngress() { + return this.ingress.get(0).build(); + } + + public V1LoadBalancerIngress buildLastIngress() { + return this.ingress.get(ingress.size() - 1).build(); + } + + public V1LoadBalancerIngress buildMatchingIngress(Predicate predicate) { + for (V1LoadBalancerIngressBuilder item : ingress) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingIngress(Predicate predicate) { + for (V1LoadBalancerIngressBuilder item : ingress) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withIngress(List ingress) { + if (this.ingress != null) { + this._visitables.get("ingress").clear(); + } + if (ingress != null) { + this.ingress = new ArrayList(); + for (V1LoadBalancerIngress item : ingress) { + this.addToIngress(item); + } + } else { + this.ingress = null; + } + return (A) this; + } + + public A withIngress(io.kubernetes.client.openapi.models.V1LoadBalancerIngress... ingress) { + if (this.ingress != null) { + this.ingress.clear(); + _visitables.remove("ingress"); + } + if (ingress != null) { + for (V1LoadBalancerIngress item : ingress) { + this.addToIngress(item); + } + } + return (A) this; + } + + public boolean hasIngress() { + return this.ingress != null && !this.ingress.isEmpty(); + } + + public IngressNested addNewIngress() { + return new IngressNested(-1, null); + } + + public IngressNested addNewIngressLike(V1LoadBalancerIngress item) { + return new IngressNested(-1, item); + } + + public IngressNested setNewIngressLike(int index,V1LoadBalancerIngress item) { + return new IngressNested(index, item); + } + + public IngressNested editIngress(int index) { + if (ingress.size() <= index) throw new RuntimeException("Can't edit ingress. Index exceeds size."); + return setNewIngressLike(index, buildIngress(index)); + } + + public IngressNested editFirstIngress() { + if (ingress.size() == 0) throw new RuntimeException("Can't edit first ingress. The list is empty."); + return setNewIngressLike(0, buildIngress(0)); + } + + public IngressNested editLastIngress() { + int index = ingress.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ingress. The list is empty."); + return setNewIngressLike(index, buildIngress(index)); + } + + public IngressNested editMatchingIngress(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1LoadBalancerIngressFluent> implements Nested{ + IngressNested(int index,V1LoadBalancerIngress item) { + this.index = index; + this.builder = new V1LoadBalancerIngressBuilder(this, item); + } + V1LoadBalancerIngressBuilder builder; + int index; + + public N and() { + return (N) V1LoadBalancerStatusFluent.this.setToIngress(index,builder.build()); + } + + public N endIngress() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusFluentImpl.java deleted file mode 100644 index 69b28e1878..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LoadBalancerStatusFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LoadBalancerStatusFluentImpl> extends BaseFluent implements V1LoadBalancerStatusFluent{ - public V1LoadBalancerStatusFluentImpl() { - } - public V1LoadBalancerStatusFluentImpl(V1LoadBalancerStatus instance) { - if (instance != null) { - this.withIngress(instance.getIngress()); - } - } - private ArrayList ingress; - public A addToIngress(int index,V1LoadBalancerIngress item) { - if (this.ingress == null) {this.ingress = new ArrayList();} - V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item); - if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").add(index, builder); ingress.add(index, builder);} - return (A)this; - } - public A setToIngress(int index,V1LoadBalancerIngress item) { - if (this.ingress == null) {this.ingress = new ArrayList();} - V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item); - if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").set(index, builder); ingress.set(index, builder);} - return (A)this; - } - public A addToIngress(io.kubernetes.client.openapi.models.V1LoadBalancerIngress... items) { - if (this.ingress == null) {this.ingress = new ArrayList();} - for (V1LoadBalancerIngress item : items) {V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; - } - public A addAllToIngress(Collection items) { - if (this.ingress == null) {this.ingress = new ArrayList();} - for (V1LoadBalancerIngress item : items) {V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; - } - public A removeFromIngress(io.kubernetes.client.openapi.models.V1LoadBalancerIngress... items) { - for (V1LoadBalancerIngress item : items) {V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item);_visitables.get("ingress").remove(builder);if (this.ingress != null) {this.ingress.remove(builder);}} return (A)this; - } - public A removeAllFromIngress(Collection items) { - for (V1LoadBalancerIngress item : items) {V1LoadBalancerIngressBuilder builder = new V1LoadBalancerIngressBuilder(item);_visitables.get("ingress").remove(builder);if (this.ingress != null) {this.ingress.remove(builder);}} return (A)this; - } - public A removeMatchingFromIngress(Predicate predicate) { - if (ingress == null) return (A) this; - final Iterator each = ingress.iterator(); - final List visitables = _visitables.get("ingress"); - while (each.hasNext()) { - V1LoadBalancerIngressBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildIngress instead. - * @return The buildable object. - */ - @Deprecated - public List getIngress() { - return ingress != null ? build(ingress) : null; - } - public List buildIngress() { - return ingress != null ? build(ingress) : null; - } - public V1LoadBalancerIngress buildIngress(int index) { - return this.ingress.get(index).build(); - } - public V1LoadBalancerIngress buildFirstIngress() { - return this.ingress.get(0).build(); - } - public V1LoadBalancerIngress buildLastIngress() { - return this.ingress.get(ingress.size() - 1).build(); - } - public V1LoadBalancerIngress buildMatchingIngress(Predicate predicate) { - for (V1LoadBalancerIngressBuilder item: ingress) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingIngress(Predicate predicate) { - for (V1LoadBalancerIngressBuilder item: ingress) { if(predicate.test(item)){ return true;} } return false; - } - public A withIngress(List ingress) { - if (this.ingress != null) { _visitables.get("ingress").clear();} - if (ingress != null) {this.ingress = new ArrayList(); for (V1LoadBalancerIngress item : ingress){this.addToIngress(item);}} else { this.ingress = null;} return (A) this; - } - public A withIngress(io.kubernetes.client.openapi.models.V1LoadBalancerIngress... ingress) { - if (this.ingress != null) {this.ingress.clear(); _visitables.remove("ingress"); } - if (ingress != null) {for (V1LoadBalancerIngress item :ingress){ this.addToIngress(item);}} return (A) this; - } - public Boolean hasIngress() { - return ingress != null && !ingress.isEmpty(); - } - public V1LoadBalancerStatusFluentImpl.IngressNested addNewIngress() { - return new V1LoadBalancerStatusFluentImpl.IngressNestedImpl(); - } - public V1LoadBalancerStatusFluentImpl.IngressNested addNewIngressLike(V1LoadBalancerIngress item) { - return new V1LoadBalancerStatusFluentImpl.IngressNestedImpl(-1, item); - } - public V1LoadBalancerStatusFluentImpl.IngressNested setNewIngressLike(int index,V1LoadBalancerIngress item) { - return new V1LoadBalancerStatusFluentImpl.IngressNestedImpl(index, item); - } - public V1LoadBalancerStatusFluentImpl.IngressNested editIngress(int index) { - if (ingress.size() <= index) throw new RuntimeException("Can't edit ingress. Index exceeds size."); - return setNewIngressLike(index, buildIngress(index)); - } - public V1LoadBalancerStatusFluentImpl.IngressNested editFirstIngress() { - if (ingress.size() == 0) throw new RuntimeException("Can't edit first ingress. The list is empty."); - return setNewIngressLike(0, buildIngress(0)); - } - public V1LoadBalancerStatusFluentImpl.IngressNested editLastIngress() { - int index = ingress.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ingress. The list is empty."); - return setNewIngressLike(index, buildIngress(index)); - } - public V1LoadBalancerStatusFluentImpl.IngressNested editMatchingIngress(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1LoadBalancerIngressFluentImpl> implements V1LoadBalancerStatusFluentImpl.IngressNested,Nested{ - IngressNestedImpl(int index,V1LoadBalancerIngress item) { - this.index = index; - this.builder = new V1LoadBalancerIngressBuilder(this, item); - } - IngressNestedImpl() { - this.index = -1; - this.builder = new V1LoadBalancerIngressBuilder(this); - } - V1LoadBalancerIngressBuilder builder; - int index; - public N and() { - return (N) V1LoadBalancerStatusFluentImpl.this.setToIngress(index,builder.build()); - } - public N endIngress() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceBuilder.java index 422a3e6c23..d3977f574c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LocalObjectReferenceBuilder extends V1LocalObjectReferenceFluentImpl implements VisitableBuilder{ +public class V1LocalObjectReferenceBuilder extends V1LocalObjectReferenceFluent implements VisitableBuilder{ public V1LocalObjectReferenceBuilder() { - this(false); - } - public V1LocalObjectReferenceBuilder(Boolean validationEnabled) { - this(new V1LocalObjectReference(), validationEnabled); + this(new V1LocalObjectReference()); } + public V1LocalObjectReferenceBuilder(V1LocalObjectReferenceFluent fluent) { - this(fluent, false); - } - public V1LocalObjectReferenceBuilder(V1LocalObjectReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LocalObjectReference(), validationEnabled); + this(fluent, new V1LocalObjectReference()); } + public V1LocalObjectReferenceBuilder(V1LocalObjectReferenceFluent fluent,V1LocalObjectReference instance) { - this(fluent, instance, false); - } - public V1LocalObjectReferenceBuilder(V1LocalObjectReferenceFluent fluent,V1LocalObjectReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LocalObjectReferenceBuilder(V1LocalObjectReference instance) { - this(instance,false); - } - public V1LocalObjectReferenceBuilder(V1LocalObjectReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LocalObjectReferenceFluent fluent; - Boolean validationEnabled; + public V1LocalObjectReference build() { V1LocalObjectReference buildable = new V1LocalObjectReference(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceFluent.java index aebd10833f..4e66fc7652 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1LocalObjectReferenceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LocalObjectReferenceFluent> extends BaseFluent{ + public V1LocalObjectReferenceFluent() { + } + public V1LocalObjectReferenceFluent(V1LocalObjectReference instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1LocalObjectReference instance) { + instance = (instance != null ? instance : new V1LocalObjectReference()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LocalObjectReferenceFluent that = (V1LocalObjectReferenceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceFluentImpl.java deleted file mode 100644 index ec871dfd5b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalObjectReferenceFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LocalObjectReferenceFluentImpl> extends BaseFluent implements V1LocalObjectReferenceFluent{ - public V1LocalObjectReferenceFluentImpl() { - } - public V1LocalObjectReferenceFluentImpl(V1LocalObjectReference instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LocalObjectReferenceFluentImpl that = (V1LocalObjectReferenceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewBuilder.java index 07b904ab6b..037e3d4b48 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LocalSubjectAccessReviewBuilder extends V1LocalSubjectAccessReviewFluentImpl implements VisitableBuilder{ +public class V1LocalSubjectAccessReviewBuilder extends V1LocalSubjectAccessReviewFluent implements VisitableBuilder{ public V1LocalSubjectAccessReviewBuilder() { - this(false); - } - public V1LocalSubjectAccessReviewBuilder(Boolean validationEnabled) { - this(new V1LocalSubjectAccessReview(), validationEnabled); + this(new V1LocalSubjectAccessReview()); } + public V1LocalSubjectAccessReviewBuilder(V1LocalSubjectAccessReviewFluent fluent) { - this(fluent, false); - } - public V1LocalSubjectAccessReviewBuilder(V1LocalSubjectAccessReviewFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LocalSubjectAccessReview(), validationEnabled); + this(fluent, new V1LocalSubjectAccessReview()); } + public V1LocalSubjectAccessReviewBuilder(V1LocalSubjectAccessReviewFluent fluent,V1LocalSubjectAccessReview instance) { - this(fluent, instance, false); - } - public V1LocalSubjectAccessReviewBuilder(V1LocalSubjectAccessReviewFluent fluent,V1LocalSubjectAccessReview instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LocalSubjectAccessReviewBuilder(V1LocalSubjectAccessReview instance) { - this(instance,false); - } - public V1LocalSubjectAccessReviewBuilder(V1LocalSubjectAccessReview instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LocalSubjectAccessReviewFluent fluent; - Boolean validationEnabled; + public V1LocalSubjectAccessReview build() { V1LocalSubjectAccessReview buildable = new V1LocalSubjectAccessReview(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewFluent.java index 828c5b50d5..a9c4c55c3d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1LocalSubjectAccessReviewFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1LocalSubjectAccessReviewFluent.MetadataNested withNewMetadata(); - public V1LocalSubjectAccessReviewFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1LocalSubjectAccessReviewFluent.MetadataNested editMetadata(); - public V1LocalSubjectAccessReviewFluent.MetadataNested editOrNewMetadata(); - public V1LocalSubjectAccessReviewFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewSpec getSpec(); - public V1SubjectAccessReviewSpec buildSpec(); - public A withSpec(V1SubjectAccessReviewSpec spec); - public Boolean hasSpec(); - public V1LocalSubjectAccessReviewFluent.SpecNested withNewSpec(); - public V1LocalSubjectAccessReviewFluent.SpecNested withNewSpecLike(V1SubjectAccessReviewSpec item); - public V1LocalSubjectAccessReviewFluent.SpecNested editSpec(); - public V1LocalSubjectAccessReviewFluent.SpecNested editOrNewSpec(); - public V1LocalSubjectAccessReviewFluent.SpecNested editOrNewSpecLike(V1SubjectAccessReviewSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewStatus getStatus(); - public V1SubjectAccessReviewStatus buildStatus(); - public A withStatus(V1SubjectAccessReviewStatus status); - public Boolean hasStatus(); - public V1LocalSubjectAccessReviewFluent.StatusNested withNewStatus(); - public V1LocalSubjectAccessReviewFluent.StatusNested withNewStatusLike(V1SubjectAccessReviewStatus item); - public V1LocalSubjectAccessReviewFluent.StatusNested editStatus(); - public V1LocalSubjectAccessReviewFluent.StatusNested editOrNewStatus(); - public V1LocalSubjectAccessReviewFluent.StatusNested editOrNewStatusLike(V1SubjectAccessReviewStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LocalSubjectAccessReviewFluent> extends BaseFluent{ + public V1LocalSubjectAccessReviewFluent() { + } + + public V1LocalSubjectAccessReviewFluent(V1LocalSubjectAccessReview instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1SubjectAccessReviewSpecBuilder spec; + private V1SubjectAccessReviewStatusBuilder status; + + protected void copyInstance(V1LocalSubjectAccessReview instance) { + instance = (instance != null ? instance : new V1LocalSubjectAccessReview()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1SubjectAccessReviewSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1SubjectAccessReviewSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1SubjectAccessReviewSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1SubjectAccessReviewSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1SubjectAccessReviewSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1SubjectAccessReviewSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1SubjectAccessReviewSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1SubjectAccessReviewStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1SubjectAccessReviewStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1SubjectAccessReviewStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1SubjectAccessReviewStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1SubjectAccessReviewStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1SubjectAccessReviewStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LocalSubjectAccessReviewFluent that = (V1LocalSubjectAccessReviewFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1LocalSubjectAccessReviewFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1SubjectAccessReviewStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1SubjectAccessReviewSpecFluent> implements Nested{ + SpecNested(V1SubjectAccessReviewSpec item) { + this.builder = new V1SubjectAccessReviewSpecBuilder(this, item); + } + V1SubjectAccessReviewSpecBuilder builder; + + public N and() { + return (N) V1LocalSubjectAccessReviewFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1SubjectAccessReviewStatusFluent> implements Nested{ + StatusNested(V1SubjectAccessReviewStatus item) { + this.builder = new V1SubjectAccessReviewStatusBuilder(this, item); + } + V1SubjectAccessReviewStatusBuilder builder; + + public N and() { + return (N) V1LocalSubjectAccessReviewFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewFluentImpl.java deleted file mode 100644 index bd26f2f7d8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalSubjectAccessReviewFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LocalSubjectAccessReviewFluentImpl> extends BaseFluent implements V1LocalSubjectAccessReviewFluent{ - public V1LocalSubjectAccessReviewFluentImpl() { - } - public V1LocalSubjectAccessReviewFluentImpl(V1LocalSubjectAccessReview instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1SubjectAccessReviewSpecBuilder spec; - private V1SubjectAccessReviewStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1LocalSubjectAccessReviewFluentImpl.MetadataNested withNewMetadata() { - return new V1LocalSubjectAccessReviewFluentImpl.MetadataNestedImpl(); - } - public V1LocalSubjectAccessReviewFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1LocalSubjectAccessReviewFluentImpl.MetadataNestedImpl(item); - } - public V1LocalSubjectAccessReviewFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1LocalSubjectAccessReviewFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1LocalSubjectAccessReviewFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1SubjectAccessReviewSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1SubjectAccessReviewSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1SubjectAccessReviewSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1LocalSubjectAccessReviewFluentImpl.SpecNested withNewSpec() { - return new V1LocalSubjectAccessReviewFluentImpl.SpecNestedImpl(); - } - public V1LocalSubjectAccessReviewFluentImpl.SpecNested withNewSpecLike(V1SubjectAccessReviewSpec item) { - return new V1LocalSubjectAccessReviewFluentImpl.SpecNestedImpl(item); - } - public V1LocalSubjectAccessReviewFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1LocalSubjectAccessReviewFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1SubjectAccessReviewSpecBuilder().build()); - } - public V1LocalSubjectAccessReviewFluentImpl.SpecNested editOrNewSpecLike(V1SubjectAccessReviewSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1SubjectAccessReviewStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1SubjectAccessReviewStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1SubjectAccessReviewStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1LocalSubjectAccessReviewFluentImpl.StatusNested withNewStatus() { - return new V1LocalSubjectAccessReviewFluentImpl.StatusNestedImpl(); - } - public V1LocalSubjectAccessReviewFluentImpl.StatusNested withNewStatusLike(V1SubjectAccessReviewStatus item) { - return new V1LocalSubjectAccessReviewFluentImpl.StatusNestedImpl(item); - } - public V1LocalSubjectAccessReviewFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1LocalSubjectAccessReviewFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1SubjectAccessReviewStatusBuilder().build()); - } - public V1LocalSubjectAccessReviewFluentImpl.StatusNested editOrNewStatusLike(V1SubjectAccessReviewStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LocalSubjectAccessReviewFluentImpl that = (V1LocalSubjectAccessReviewFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1LocalSubjectAccessReviewFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1LocalSubjectAccessReviewFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1SubjectAccessReviewSpecFluentImpl> implements V1LocalSubjectAccessReviewFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1SubjectAccessReviewSpec item) { - this.builder = new V1SubjectAccessReviewSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1SubjectAccessReviewSpecBuilder(this); - } - V1SubjectAccessReviewSpecBuilder builder; - public N and() { - return (N) V1LocalSubjectAccessReviewFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1SubjectAccessReviewStatusFluentImpl> implements V1LocalSubjectAccessReviewFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1SubjectAccessReviewStatus item) { - this.builder = new V1SubjectAccessReviewStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1SubjectAccessReviewStatusBuilder(this); - } - V1SubjectAccessReviewStatusBuilder builder; - public N and() { - return (N) V1LocalSubjectAccessReviewFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceBuilder.java index 0a5a6f62cb..6d34ea4328 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1LocalVolumeSourceBuilder extends V1LocalVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1LocalVolumeSourceBuilder extends V1LocalVolumeSourceFluent implements VisitableBuilder{ public V1LocalVolumeSourceBuilder() { - this(false); - } - public V1LocalVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1LocalVolumeSource(), validationEnabled); + this(new V1LocalVolumeSource()); } + public V1LocalVolumeSourceBuilder(V1LocalVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1LocalVolumeSourceBuilder(V1LocalVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1LocalVolumeSource(), validationEnabled); + this(fluent, new V1LocalVolumeSource()); } + public V1LocalVolumeSourceBuilder(V1LocalVolumeSourceFluent fluent,V1LocalVolumeSource instance) { - this(fluent, instance, false); - } - public V1LocalVolumeSourceBuilder(V1LocalVolumeSourceFluent fluent,V1LocalVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withPath(instance.getPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1LocalVolumeSourceBuilder(V1LocalVolumeSource instance) { - this(instance,false); - } - public V1LocalVolumeSourceBuilder(V1LocalVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withPath(instance.getPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1LocalVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1LocalVolumeSource build() { V1LocalVolumeSource buildable = new V1LocalVolumeSource(); buildable.setFsType(fluent.getFsType()); @@ -46,4 +28,5 @@ public V1LocalVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceFluent.java index c16fbd924f..7946397e19 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1LocalVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1LocalVolumeSourceFluent> extends BaseFluent{ + public V1LocalVolumeSourceFluent() { + } + public V1LocalVolumeSourceFluent(V1LocalVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private String path; + + protected void copyInstance(V1LocalVolumeSource instance) { + instance = (instance != null ? instance : new V1LocalVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withPath(instance.getPath()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1LocalVolumeSourceFluent that = (V1LocalVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, path, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (path != null) { sb.append("path:"); sb.append(path); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceFluentImpl.java deleted file mode 100644 index 5949daafe2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1LocalVolumeSourceFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1LocalVolumeSourceFluentImpl> extends BaseFluent implements V1LocalVolumeSourceFluent{ - public V1LocalVolumeSourceFluentImpl() { - } - public V1LocalVolumeSourceFluentImpl(V1LocalVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withPath(instance.getPath()); - } - } - private String fsType; - private String path; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1LocalVolumeSourceFluentImpl that = (V1LocalVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, path, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (path != null) { sb.append("path:"); sb.append(path); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryBuilder.java index a1b47938af..1c5221caa0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryBuilder.java @@ -1,54 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ManagedFieldsEntryBuilder extends V1ManagedFieldsEntryFluentImpl implements VisitableBuilder{ +public class V1ManagedFieldsEntryBuilder extends V1ManagedFieldsEntryFluent implements VisitableBuilder{ public V1ManagedFieldsEntryBuilder() { - this(false); - } - public V1ManagedFieldsEntryBuilder(Boolean validationEnabled) { - this(new V1ManagedFieldsEntry(), validationEnabled); + this(new V1ManagedFieldsEntry()); } + public V1ManagedFieldsEntryBuilder(V1ManagedFieldsEntryFluent fluent) { - this(fluent, false); - } - public V1ManagedFieldsEntryBuilder(V1ManagedFieldsEntryFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ManagedFieldsEntry(), validationEnabled); + this(fluent, new V1ManagedFieldsEntry()); } + public V1ManagedFieldsEntryBuilder(V1ManagedFieldsEntryFluent fluent,V1ManagedFieldsEntry instance) { - this(fluent, instance, false); - } - public V1ManagedFieldsEntryBuilder(V1ManagedFieldsEntryFluent fluent,V1ManagedFieldsEntry instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withFieldsType(instance.getFieldsType()); - fluent.withFieldsV1(instance.getFieldsV1()); - fluent.withManager(instance.getManager()); - fluent.withOperation(instance.getOperation()); - fluent.withSubresource(instance.getSubresource()); - fluent.withTime(instance.getTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ManagedFieldsEntryBuilder(V1ManagedFieldsEntry instance) { - this(instance,false); - } - public V1ManagedFieldsEntryBuilder(V1ManagedFieldsEntry instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withFieldsType(instance.getFieldsType()); - this.withFieldsV1(instance.getFieldsV1()); - this.withManager(instance.getManager()); - this.withOperation(instance.getOperation()); - this.withSubresource(instance.getSubresource()); - this.withTime(instance.getTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ManagedFieldsEntryFluent fluent; - Boolean validationEnabled; + public V1ManagedFieldsEntry build() { V1ManagedFieldsEntry buildable = new V1ManagedFieldsEntry(); buildable.setApiVersion(fluent.getApiVersion()); @@ -61,4 +33,5 @@ public V1ManagedFieldsEntry build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryFluent.java index 07fbf12931..f46ad73c3a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryFluent.java @@ -1,36 +1,166 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ManagedFieldsEntryFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getFieldsType(); - public A withFieldsType(String fieldsType); - public Boolean hasFieldsType(); - public Object getFieldsV1(); - public A withFieldsV1(Object fieldsV1); - public Boolean hasFieldsV1(); - public String getManager(); - public A withManager(String manager); - public Boolean hasManager(); - public String getOperation(); - public A withOperation(String operation); - public Boolean hasOperation(); - public String getSubresource(); - public A withSubresource(String subresource); - public Boolean hasSubresource(); - public OffsetDateTime getTime(); - public A withTime(OffsetDateTime time); - public Boolean hasTime(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ManagedFieldsEntryFluent> extends BaseFluent{ + public V1ManagedFieldsEntryFluent() { + } + public V1ManagedFieldsEntryFluent(V1ManagedFieldsEntry instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String fieldsType; + private Object fieldsV1; + private String manager; + private String operation; + private String subresource; + private OffsetDateTime time; + + protected void copyInstance(V1ManagedFieldsEntry instance) { + instance = (instance != null ? instance : new V1ManagedFieldsEntry()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withFieldsType(instance.getFieldsType()); + this.withFieldsV1(instance.getFieldsV1()); + this.withManager(instance.getManager()); + this.withOperation(instance.getOperation()); + this.withSubresource(instance.getSubresource()); + this.withTime(instance.getTime()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getFieldsType() { + return this.fieldsType; + } + + public A withFieldsType(String fieldsType) { + this.fieldsType = fieldsType; + return (A) this; + } + + public boolean hasFieldsType() { + return this.fieldsType != null; + } + + public Object getFieldsV1() { + return this.fieldsV1; + } + + public A withFieldsV1(Object fieldsV1) { + this.fieldsV1 = fieldsV1; + return (A) this; + } + + public boolean hasFieldsV1() { + return this.fieldsV1 != null; + } + + public String getManager() { + return this.manager; + } + + public A withManager(String manager) { + this.manager = manager; + return (A) this; + } + + public boolean hasManager() { + return this.manager != null; + } + + public String getOperation() { + return this.operation; + } + + public A withOperation(String operation) { + this.operation = operation; + return (A) this; + } + + public boolean hasOperation() { + return this.operation != null; + } + + public String getSubresource() { + return this.subresource; + } + + public A withSubresource(String subresource) { + this.subresource = subresource; + return (A) this; + } + + public boolean hasSubresource() { + return this.subresource != null; + } + + public OffsetDateTime getTime() { + return this.time; + } + + public A withTime(OffsetDateTime time) { + this.time = time; + return (A) this; + } + + public boolean hasTime() { + return this.time != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ManagedFieldsEntryFluent that = (V1ManagedFieldsEntryFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(fieldsType, that.fieldsType)) return false; + if (!java.util.Objects.equals(fieldsV1, that.fieldsV1)) return false; + if (!java.util.Objects.equals(manager, that.manager)) return false; + if (!java.util.Objects.equals(operation, that.operation)) return false; + if (!java.util.Objects.equals(subresource, that.subresource)) return false; + if (!java.util.Objects.equals(time, that.time)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, fieldsType, fieldsV1, manager, operation, subresource, time, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (fieldsType != null) { sb.append("fieldsType:"); sb.append(fieldsType + ","); } + if (fieldsV1 != null) { sb.append("fieldsV1:"); sb.append(fieldsV1 + ","); } + if (manager != null) { sb.append("manager:"); sb.append(manager + ","); } + if (operation != null) { sb.append("operation:"); sb.append(operation + ","); } + if (subresource != null) { sb.append("subresource:"); sb.append(subresource + ","); } + if (time != null) { sb.append("time:"); sb.append(time); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryFluentImpl.java deleted file mode 100644 index c729923ec5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ManagedFieldsEntryFluentImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ManagedFieldsEntryFluentImpl> extends BaseFluent implements V1ManagedFieldsEntryFluent{ - public V1ManagedFieldsEntryFluentImpl() { - } - public V1ManagedFieldsEntryFluentImpl(V1ManagedFieldsEntry instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withFieldsType(instance.getFieldsType()); - this.withFieldsV1(instance.getFieldsV1()); - this.withManager(instance.getManager()); - this.withOperation(instance.getOperation()); - this.withSubresource(instance.getSubresource()); - this.withTime(instance.getTime()); - } - } - private String apiVersion; - private String fieldsType; - private Object fieldsV1; - private String manager; - private String operation; - private String subresource; - private OffsetDateTime time; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getFieldsType() { - return this.fieldsType; - } - public A withFieldsType(String fieldsType) { - this.fieldsType=fieldsType; return (A) this; - } - public Boolean hasFieldsType() { - return this.fieldsType != null; - } - public Object getFieldsV1() { - return this.fieldsV1; - } - public A withFieldsV1(Object fieldsV1) { - this.fieldsV1=fieldsV1; return (A) this; - } - public Boolean hasFieldsV1() { - return this.fieldsV1 != null; - } - public String getManager() { - return this.manager; - } - public A withManager(String manager) { - this.manager=manager; return (A) this; - } - public Boolean hasManager() { - return this.manager != null; - } - public String getOperation() { - return this.operation; - } - public A withOperation(String operation) { - this.operation=operation; return (A) this; - } - public Boolean hasOperation() { - return this.operation != null; - } - public String getSubresource() { - return this.subresource; - } - public A withSubresource(String subresource) { - this.subresource=subresource; return (A) this; - } - public Boolean hasSubresource() { - return this.subresource != null; - } - public OffsetDateTime getTime() { - return this.time; - } - public A withTime(OffsetDateTime time) { - this.time=time; return (A) this; - } - public Boolean hasTime() { - return this.time != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ManagedFieldsEntryFluentImpl that = (V1ManagedFieldsEntryFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(fieldsType, that.fieldsType)) return false; - - if (!java.util.Objects.equals(fieldsV1, that.fieldsV1)) return false; - - if (!java.util.Objects.equals(manager, that.manager)) return false; - - if (!java.util.Objects.equals(operation, that.operation)) return false; - - if (!java.util.Objects.equals(subresource, that.subresource)) return false; - - if (!java.util.Objects.equals(time, that.time)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, fieldsType, fieldsV1, manager, operation, subresource, time, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (fieldsType != null) { sb.append("fieldsType:"); sb.append(fieldsType + ","); } - if (fieldsV1 != null) { sb.append("fieldsV1:"); sb.append(fieldsV1 + ","); } - if (manager != null) { sb.append("manager:"); sb.append(manager + ","); } - if (operation != null) { sb.append("operation:"); sb.append(operation + ","); } - if (subresource != null) { sb.append("subresource:"); sb.append(subresource + ","); } - if (time != null) { sb.append("time:"); sb.append(time); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionBuilder.java index 1f930fad89..ac8cb2d9d6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1MatchConditionBuilder extends V1MatchConditionFluentImpl implements VisitableBuilder{ +public class V1MatchConditionBuilder extends V1MatchConditionFluent implements VisitableBuilder{ public V1MatchConditionBuilder() { - this(false); - } - public V1MatchConditionBuilder(Boolean validationEnabled) { - this(new V1MatchCondition(), validationEnabled); + this(new V1MatchCondition()); } + public V1MatchConditionBuilder(V1MatchConditionFluent fluent) { - this(fluent, false); - } - public V1MatchConditionBuilder(V1MatchConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1MatchCondition(), validationEnabled); + this(fluent, new V1MatchCondition()); } + public V1MatchConditionBuilder(V1MatchConditionFluent fluent,V1MatchCondition instance) { - this(fluent, instance, false); - } - public V1MatchConditionBuilder(V1MatchConditionFluent fluent,V1MatchCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExpression(instance.getExpression()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1MatchConditionBuilder(V1MatchCondition instance) { - this(instance,false); - } - public V1MatchConditionBuilder(V1MatchCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExpression(instance.getExpression()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1MatchConditionFluent fluent; - Boolean validationEnabled; + public V1MatchCondition build() { V1MatchCondition buildable = new V1MatchCondition(); buildable.setExpression(fluent.getExpression()); @@ -46,4 +28,5 @@ public V1MatchCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionFluent.java index dc4d39953f..b91c231711 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1MatchConditionFluent> extends Fluent{ - public String getExpression(); - public A withExpression(String expression); - public Boolean hasExpression(); - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1MatchConditionFluent> extends BaseFluent{ + public V1MatchConditionFluent() { + } + public V1MatchConditionFluent(V1MatchCondition instance) { + this.copyInstance(instance); + } + private String expression; + private String name; + + protected void copyInstance(V1MatchCondition instance) { + instance = (instance != null ? instance : new V1MatchCondition()); + if (instance != null) { + this.withExpression(instance.getExpression()); + this.withName(instance.getName()); + } + } + + public String getExpression() { + return this.expression; + } + + public A withExpression(String expression) { + this.expression = expression; + return (A) this; + } + + public boolean hasExpression() { + return this.expression != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1MatchConditionFluent that = (V1MatchConditionFluent) o; + if (!java.util.Objects.equals(expression, that.expression)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(expression, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (expression != null) { sb.append("expression:"); sb.append(expression + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookBuilder.java index 7a4620c672..4f4ecd525e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookBuilder.java @@ -1,79 +1,42 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1MutatingWebhookBuilder extends V1MutatingWebhookFluentImpl implements VisitableBuilder{ +public class V1MutatingWebhookBuilder extends V1MutatingWebhookFluent implements VisitableBuilder{ public V1MutatingWebhookBuilder() { - this(false); - } - public V1MutatingWebhookBuilder(Boolean validationEnabled) { - this(new V1MutatingWebhook(), validationEnabled); + this(new V1MutatingWebhook()); } + public V1MutatingWebhookBuilder(V1MutatingWebhookFluent fluent) { - this(fluent, false); - } - public V1MutatingWebhookBuilder(V1MutatingWebhookFluent fluent,Boolean validationEnabled) { - this(fluent, new V1MutatingWebhook(), validationEnabled); + this(fluent, new V1MutatingWebhook()); } + public V1MutatingWebhookBuilder(V1MutatingWebhookFluent fluent,V1MutatingWebhook instance) { - this(fluent, instance, false); - } - public V1MutatingWebhookBuilder(V1MutatingWebhookFluent fluent,V1MutatingWebhook instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAdmissionReviewVersions(instance.getAdmissionReviewVersions()); - fluent.withClientConfig(instance.getClientConfig()); - fluent.withFailurePolicy(instance.getFailurePolicy()); - fluent.withMatchConditions(instance.getMatchConditions()); - fluent.withMatchPolicy(instance.getMatchPolicy()); - fluent.withName(instance.getName()); - fluent.withNamespaceSelector(instance.getNamespaceSelector()); - fluent.withObjectSelector(instance.getObjectSelector()); - fluent.withReinvocationPolicy(instance.getReinvocationPolicy()); - fluent.withRules(instance.getRules()); - fluent.withSideEffects(instance.getSideEffects()); - fluent.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1MutatingWebhookBuilder(V1MutatingWebhook instance) { - this(instance,false); - } - public V1MutatingWebhookBuilder(V1MutatingWebhook instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAdmissionReviewVersions(instance.getAdmissionReviewVersions()); - this.withClientConfig(instance.getClientConfig()); - this.withFailurePolicy(instance.getFailurePolicy()); - this.withMatchConditions(instance.getMatchConditions()); - this.withMatchPolicy(instance.getMatchPolicy()); - this.withName(instance.getName()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withObjectSelector(instance.getObjectSelector()); - this.withReinvocationPolicy(instance.getReinvocationPolicy()); - this.withRules(instance.getRules()); - this.withSideEffects(instance.getSideEffects()); - this.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1MutatingWebhookFluent fluent; - Boolean validationEnabled; + public V1MutatingWebhook build() { V1MutatingWebhook buildable = new V1MutatingWebhook(); buildable.setAdmissionReviewVersions(fluent.getAdmissionReviewVersions()); - buildable.setClientConfig(fluent.getClientConfig()); + buildable.setClientConfig(fluent.buildClientConfig()); buildable.setFailurePolicy(fluent.getFailurePolicy()); - buildable.setMatchConditions(fluent.getMatchConditions()); + buildable.setMatchConditions(fluent.buildMatchConditions()); buildable.setMatchPolicy(fluent.getMatchPolicy()); buildable.setName(fluent.getName()); - buildable.setNamespaceSelector(fluent.getNamespaceSelector()); - buildable.setObjectSelector(fluent.getObjectSelector()); + buildable.setNamespaceSelector(fluent.buildNamespaceSelector()); + buildable.setObjectSelector(fluent.buildObjectSelector()); buildable.setReinvocationPolicy(fluent.getReinvocationPolicy()); - buildable.setRules(fluent.getRules()); + buildable.setRules(fluent.buildRules()); buildable.setSideEffects(fluent.getSideEffects()); buildable.setTimeoutSeconds(fluent.getTimeoutSeconds()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationBuilder.java index 4c479fc3b8..5a60b05589 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1MutatingWebhookConfigurationBuilder extends V1MutatingWebhookConfigurationFluentImpl implements VisitableBuilder{ +public class V1MutatingWebhookConfigurationBuilder extends V1MutatingWebhookConfigurationFluent implements VisitableBuilder{ public V1MutatingWebhookConfigurationBuilder() { - this(false); - } - public V1MutatingWebhookConfigurationBuilder(Boolean validationEnabled) { - this(new V1MutatingWebhookConfiguration(), validationEnabled); + this(new V1MutatingWebhookConfiguration()); } + public V1MutatingWebhookConfigurationBuilder(V1MutatingWebhookConfigurationFluent fluent) { - this(fluent, false); - } - public V1MutatingWebhookConfigurationBuilder(V1MutatingWebhookConfigurationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1MutatingWebhookConfiguration(), validationEnabled); + this(fluent, new V1MutatingWebhookConfiguration()); } + public V1MutatingWebhookConfigurationBuilder(V1MutatingWebhookConfigurationFluent fluent,V1MutatingWebhookConfiguration instance) { - this(fluent, instance, false); - } - public V1MutatingWebhookConfigurationBuilder(V1MutatingWebhookConfigurationFluent fluent,V1MutatingWebhookConfiguration instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withWebhooks(instance.getWebhooks()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1MutatingWebhookConfigurationBuilder(V1MutatingWebhookConfiguration instance) { - this(instance,false); - } - public V1MutatingWebhookConfigurationBuilder(V1MutatingWebhookConfiguration instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withWebhooks(instance.getWebhooks()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1MutatingWebhookConfigurationFluent fluent; - Boolean validationEnabled; + public V1MutatingWebhookConfiguration build() { V1MutatingWebhookConfiguration buildable = new V1MutatingWebhookConfiguration(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setWebhooks(fluent.getWebhooks()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setWebhooks(fluent.buildWebhooks()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationFluent.java index c1e5965287..ce6c4dac62 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1MutatingWebhookConfigurationFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1MutatingWebhookConfigurationFluent.MetadataNested withNewMetadata(); - public V1MutatingWebhookConfigurationFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1MutatingWebhookConfigurationFluent.MetadataNested editMetadata(); - public V1MutatingWebhookConfigurationFluent.MetadataNested editOrNewMetadata(); - public V1MutatingWebhookConfigurationFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A addToWebhooks(int index,V1MutatingWebhook item); - public A setToWebhooks(int index,V1MutatingWebhook item); - public A addToWebhooks(io.kubernetes.client.openapi.models.V1MutatingWebhook... items); - public A addAllToWebhooks(Collection items); - public A removeFromWebhooks(io.kubernetes.client.openapi.models.V1MutatingWebhook... items); - public A removeAllFromWebhooks(Collection items); - public A removeMatchingFromWebhooks(Predicate predicate); - - /** - * This method has been deprecated, please use method buildWebhooks instead. - * @return The buildable object. - */ - @Deprecated - public List getWebhooks(); - public List buildWebhooks(); - public V1MutatingWebhook buildWebhook(int index); - public V1MutatingWebhook buildFirstWebhook(); - public V1MutatingWebhook buildLastWebhook(); - public V1MutatingWebhook buildMatchingWebhook(Predicate predicate); - public Boolean hasMatchingWebhook(Predicate predicate); - public A withWebhooks(List webhooks); - public A withWebhooks(io.kubernetes.client.openapi.models.V1MutatingWebhook... webhooks); - public Boolean hasWebhooks(); - public V1MutatingWebhookConfigurationFluent.WebhooksNested addNewWebhook(); - public V1MutatingWebhookConfigurationFluent.WebhooksNested addNewWebhookLike(V1MutatingWebhook item); - public V1MutatingWebhookConfigurationFluent.WebhooksNested setNewWebhookLike(int index,V1MutatingWebhook item); - public V1MutatingWebhookConfigurationFluent.WebhooksNested editWebhook(int index); - public V1MutatingWebhookConfigurationFluent.WebhooksNested editFirstWebhook(); - public V1MutatingWebhookConfigurationFluent.WebhooksNested editLastWebhook(); - public V1MutatingWebhookConfigurationFluent.WebhooksNested editMatchingWebhook(Predicate predicate); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1MutatingWebhookConfigurationFluent> extends BaseFluent{ + public V1MutatingWebhookConfigurationFluent() { + } + + public V1MutatingWebhookConfigurationFluent(V1MutatingWebhookConfiguration instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private ArrayList webhooks; + + protected void copyInstance(V1MutatingWebhookConfiguration instance) { + instance = (instance != null ? instance : new V1MutatingWebhookConfiguration()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withWebhooks(instance.getWebhooks()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public A addToWebhooks(int index,V1MutatingWebhook item) { + if (this.webhooks == null) {this.webhooks = new ArrayList();} + V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item); + if (index < 0 || index >= webhooks.size()) { _visitables.get("webhooks").add(builder); webhooks.add(builder); } else { _visitables.get("webhooks").add(index, builder); webhooks.add(index, builder);} + return (A)this; + } + + public A setToWebhooks(int index,V1MutatingWebhook item) { + if (this.webhooks == null) {this.webhooks = new ArrayList();} + V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item); + if (index < 0 || index >= webhooks.size()) { _visitables.get("webhooks").add(builder); webhooks.add(builder); } else { _visitables.get("webhooks").set(index, builder); webhooks.set(index, builder);} + return (A)this; + } + + public A addToWebhooks(io.kubernetes.client.openapi.models.V1MutatingWebhook... items) { + if (this.webhooks == null) {this.webhooks = new ArrayList();} + for (V1MutatingWebhook item : items) {V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item);_visitables.get("webhooks").add(builder);this.webhooks.add(builder);} return (A)this; + } + + public A addAllToWebhooks(Collection items) { + if (this.webhooks == null) {this.webhooks = new ArrayList();} + for (V1MutatingWebhook item : items) {V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item);_visitables.get("webhooks").add(builder);this.webhooks.add(builder);} return (A)this; + } + + public A removeFromWebhooks(io.kubernetes.client.openapi.models.V1MutatingWebhook... items) { + if (this.webhooks == null) return (A)this; + for (V1MutatingWebhook item : items) {V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item);_visitables.get("webhooks").remove(builder); this.webhooks.remove(builder);} return (A)this; + } + + public A removeAllFromWebhooks(Collection items) { + if (this.webhooks == null) return (A)this; + for (V1MutatingWebhook item : items) {V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item);_visitables.get("webhooks").remove(builder); this.webhooks.remove(builder);} return (A)this; + } + + public A removeMatchingFromWebhooks(Predicate predicate) { + if (webhooks == null) return (A) this; + final Iterator each = webhooks.iterator(); + final List visitables = _visitables.get("webhooks"); + while (each.hasNext()) { + V1MutatingWebhookBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; } - public interface WebhooksNested extends Nested,V1MutatingWebhookFluent>{ - public N and(); - public N endWebhook(); + + public List buildWebhooks() { + return this.webhooks != null ? build(webhooks) : null; + } + + public V1MutatingWebhook buildWebhook(int index) { + return this.webhooks.get(index).build(); + } + + public V1MutatingWebhook buildFirstWebhook() { + return this.webhooks.get(0).build(); + } + + public V1MutatingWebhook buildLastWebhook() { + return this.webhooks.get(webhooks.size() - 1).build(); + } + + public V1MutatingWebhook buildMatchingWebhook(Predicate predicate) { + for (V1MutatingWebhookBuilder item : webhooks) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingWebhook(Predicate predicate) { + for (V1MutatingWebhookBuilder item : webhooks) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withWebhooks(List webhooks) { + if (this.webhooks != null) { + this._visitables.get("webhooks").clear(); + } + if (webhooks != null) { + this.webhooks = new ArrayList(); + for (V1MutatingWebhook item : webhooks) { + this.addToWebhooks(item); + } + } else { + this.webhooks = null; + } + return (A) this; + } + + public A withWebhooks(io.kubernetes.client.openapi.models.V1MutatingWebhook... webhooks) { + if (this.webhooks != null) { + this.webhooks.clear(); + _visitables.remove("webhooks"); + } + if (webhooks != null) { + for (V1MutatingWebhook item : webhooks) { + this.addToWebhooks(item); + } + } + return (A) this; + } + + public boolean hasWebhooks() { + return this.webhooks != null && !this.webhooks.isEmpty(); + } + + public WebhooksNested addNewWebhook() { + return new WebhooksNested(-1, null); + } + + public WebhooksNested addNewWebhookLike(V1MutatingWebhook item) { + return new WebhooksNested(-1, item); + } + + public WebhooksNested setNewWebhookLike(int index,V1MutatingWebhook item) { + return new WebhooksNested(index, item); + } + + public WebhooksNested editWebhook(int index) { + if (webhooks.size() <= index) throw new RuntimeException("Can't edit webhooks. Index exceeds size."); + return setNewWebhookLike(index, buildWebhook(index)); + } + + public WebhooksNested editFirstWebhook() { + if (webhooks.size() == 0) throw new RuntimeException("Can't edit first webhooks. The list is empty."); + return setNewWebhookLike(0, buildWebhook(0)); + } + + public WebhooksNested editLastWebhook() { + int index = webhooks.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last webhooks. The list is empty."); + return setNewWebhookLike(index, buildWebhook(index)); + } + + public WebhooksNested editMatchingWebhook(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + public N and() { + return (N) V1MutatingWebhookConfigurationFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + public class WebhooksNested extends V1MutatingWebhookFluent> implements Nested{ + WebhooksNested(int index,V1MutatingWebhook item) { + this.index = index; + this.builder = new V1MutatingWebhookBuilder(this, item); + } + V1MutatingWebhookBuilder builder; + int index; + + public N and() { + return (N) V1MutatingWebhookConfigurationFluent.this.setToWebhooks(index,builder.build()); + } + + public N endWebhook() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationFluentImpl.java deleted file mode 100644 index 59f23b4ff9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1MutatingWebhookConfigurationFluentImpl> extends BaseFluent implements V1MutatingWebhookConfigurationFluent{ - public V1MutatingWebhookConfigurationFluentImpl() { - } - public V1MutatingWebhookConfigurationFluentImpl(V1MutatingWebhookConfiguration instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withWebhooks(instance.getWebhooks()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private ArrayList webhooks; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1MutatingWebhookConfigurationFluentImpl.MetadataNested withNewMetadata() { - return new V1MutatingWebhookConfigurationFluentImpl.MetadataNestedImpl(); - } - public V1MutatingWebhookConfigurationFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1MutatingWebhookConfigurationFluentImpl.MetadataNestedImpl(item); - } - public V1MutatingWebhookConfigurationFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1MutatingWebhookConfigurationFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1MutatingWebhookConfigurationFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public A addToWebhooks(int index,V1MutatingWebhook item) { - if (this.webhooks == null) {this.webhooks = new ArrayList();} - V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item); - if (index < 0 || index >= webhooks.size()) { _visitables.get("webhooks").add(builder); webhooks.add(builder); } else { _visitables.get("webhooks").add(index, builder); webhooks.add(index, builder);} - return (A)this; - } - public A setToWebhooks(int index,V1MutatingWebhook item) { - if (this.webhooks == null) {this.webhooks = new ArrayList();} - V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item); - if (index < 0 || index >= webhooks.size()) { _visitables.get("webhooks").add(builder); webhooks.add(builder); } else { _visitables.get("webhooks").set(index, builder); webhooks.set(index, builder);} - return (A)this; - } - public A addToWebhooks(io.kubernetes.client.openapi.models.V1MutatingWebhook... items) { - if (this.webhooks == null) {this.webhooks = new ArrayList();} - for (V1MutatingWebhook item : items) {V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item);_visitables.get("webhooks").add(builder);this.webhooks.add(builder);} return (A)this; - } - public A addAllToWebhooks(Collection items) { - if (this.webhooks == null) {this.webhooks = new ArrayList();} - for (V1MutatingWebhook item : items) {V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item);_visitables.get("webhooks").add(builder);this.webhooks.add(builder);} return (A)this; - } - public A removeFromWebhooks(io.kubernetes.client.openapi.models.V1MutatingWebhook... items) { - for (V1MutatingWebhook item : items) {V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item);_visitables.get("webhooks").remove(builder);if (this.webhooks != null) {this.webhooks.remove(builder);}} return (A)this; - } - public A removeAllFromWebhooks(Collection items) { - for (V1MutatingWebhook item : items) {V1MutatingWebhookBuilder builder = new V1MutatingWebhookBuilder(item);_visitables.get("webhooks").remove(builder);if (this.webhooks != null) {this.webhooks.remove(builder);}} return (A)this; - } - public A removeMatchingFromWebhooks(Predicate predicate) { - if (webhooks == null) return (A) this; - final Iterator each = webhooks.iterator(); - final List visitables = _visitables.get("webhooks"); - while (each.hasNext()) { - V1MutatingWebhookBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildWebhooks instead. - * @return The buildable object. - */ - @Deprecated - public List getWebhooks() { - return webhooks != null ? build(webhooks) : null; - } - public List buildWebhooks() { - return webhooks != null ? build(webhooks) : null; - } - public V1MutatingWebhook buildWebhook(int index) { - return this.webhooks.get(index).build(); - } - public V1MutatingWebhook buildFirstWebhook() { - return this.webhooks.get(0).build(); - } - public V1MutatingWebhook buildLastWebhook() { - return this.webhooks.get(webhooks.size() - 1).build(); - } - public V1MutatingWebhook buildMatchingWebhook(Predicate predicate) { - for (V1MutatingWebhookBuilder item: webhooks) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingWebhook(Predicate predicate) { - for (V1MutatingWebhookBuilder item: webhooks) { if(predicate.test(item)){ return true;} } return false; - } - public A withWebhooks(List webhooks) { - if (this.webhooks != null) { _visitables.get("webhooks").clear();} - if (webhooks != null) {this.webhooks = new ArrayList(); for (V1MutatingWebhook item : webhooks){this.addToWebhooks(item);}} else { this.webhooks = null;} return (A) this; - } - public A withWebhooks(io.kubernetes.client.openapi.models.V1MutatingWebhook... webhooks) { - if (this.webhooks != null) {this.webhooks.clear(); _visitables.remove("webhooks"); } - if (webhooks != null) {for (V1MutatingWebhook item :webhooks){ this.addToWebhooks(item);}} return (A) this; - } - public Boolean hasWebhooks() { - return webhooks != null && !webhooks.isEmpty(); - } - public V1MutatingWebhookConfigurationFluentImpl.WebhooksNested addNewWebhook() { - return new V1MutatingWebhookConfigurationFluentImpl.WebhooksNestedImpl(); - } - public V1MutatingWebhookConfigurationFluentImpl.WebhooksNested addNewWebhookLike(V1MutatingWebhook item) { - return new V1MutatingWebhookConfigurationFluentImpl.WebhooksNestedImpl(-1, item); - } - public V1MutatingWebhookConfigurationFluentImpl.WebhooksNested setNewWebhookLike(int index,V1MutatingWebhook item) { - return new V1MutatingWebhookConfigurationFluentImpl.WebhooksNestedImpl(index, item); - } - public V1MutatingWebhookConfigurationFluentImpl.WebhooksNested editWebhook(int index) { - if (webhooks.size() <= index) throw new RuntimeException("Can't edit webhooks. Index exceeds size."); - return setNewWebhookLike(index, buildWebhook(index)); - } - public V1MutatingWebhookConfigurationFluentImpl.WebhooksNested editFirstWebhook() { - if (webhooks.size() == 0) throw new RuntimeException("Can't edit first webhooks. The list is empty."); - return setNewWebhookLike(0, buildWebhook(0)); - } - public V1MutatingWebhookConfigurationFluentImpl.WebhooksNested editLastWebhook() { - int index = webhooks.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last webhooks. The list is empty."); - return setNewWebhookLike(index, buildWebhook(index)); - } - public V1MutatingWebhookConfigurationFluentImpl.WebhooksNested editMatchingWebhook(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ObjectMetaFluentImpl> implements V1MutatingWebhookConfigurationFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1MutatingWebhookConfigurationFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class WebhooksNestedImpl extends V1MutatingWebhookFluentImpl> implements V1MutatingWebhookConfigurationFluentImpl.WebhooksNested,Nested{ - WebhooksNestedImpl(int index,V1MutatingWebhook item) { - this.index = index; - this.builder = new V1MutatingWebhookBuilder(this, item); - } - WebhooksNestedImpl() { - this.index = -1; - this.builder = new V1MutatingWebhookBuilder(this); - } - V1MutatingWebhookBuilder builder; - int index; - public N and() { - return (N) V1MutatingWebhookConfigurationFluentImpl.this.setToWebhooks(index,builder.build()); - } - public N endWebhook() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListBuilder.java index c5c8610af0..23449c2103 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1MutatingWebhookConfigurationListBuilder extends V1MutatingWebhookConfigurationListFluentImpl implements VisitableBuilder{ +public class V1MutatingWebhookConfigurationListBuilder extends V1MutatingWebhookConfigurationListFluent implements VisitableBuilder{ public V1MutatingWebhookConfigurationListBuilder() { - this(false); - } - public V1MutatingWebhookConfigurationListBuilder(Boolean validationEnabled) { - this(new V1MutatingWebhookConfigurationList(), validationEnabled); + this(new V1MutatingWebhookConfigurationList()); } + public V1MutatingWebhookConfigurationListBuilder(V1MutatingWebhookConfigurationListFluent fluent) { - this(fluent, false); - } - public V1MutatingWebhookConfigurationListBuilder(V1MutatingWebhookConfigurationListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1MutatingWebhookConfigurationList(), validationEnabled); + this(fluent, new V1MutatingWebhookConfigurationList()); } + public V1MutatingWebhookConfigurationListBuilder(V1MutatingWebhookConfigurationListFluent fluent,V1MutatingWebhookConfigurationList instance) { - this(fluent, instance, false); - } - public V1MutatingWebhookConfigurationListBuilder(V1MutatingWebhookConfigurationListFluent fluent,V1MutatingWebhookConfigurationList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1MutatingWebhookConfigurationListBuilder(V1MutatingWebhookConfigurationList instance) { - this(instance,false); - } - public V1MutatingWebhookConfigurationListBuilder(V1MutatingWebhookConfigurationList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1MutatingWebhookConfigurationListFluent fluent; - Boolean validationEnabled; + public V1MutatingWebhookConfigurationList build() { V1MutatingWebhookConfigurationList buildable = new V1MutatingWebhookConfigurationList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListFluent.java index fb8ff856b4..ab01818fde 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1MutatingWebhookConfigurationListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1MutatingWebhookConfiguration item); - public A setToItems(int index,V1MutatingWebhookConfiguration item); - public A addToItems(io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1MutatingWebhookConfiguration buildItem(int index); - public V1MutatingWebhookConfiguration buildFirstItem(); - public V1MutatingWebhookConfiguration buildLastItem(); - public V1MutatingWebhookConfiguration buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration... items); - public Boolean hasItems(); - public V1MutatingWebhookConfigurationListFluent.ItemsNested addNewItem(); - public V1MutatingWebhookConfigurationListFluent.ItemsNested addNewItemLike(V1MutatingWebhookConfiguration item); - public V1MutatingWebhookConfigurationListFluent.ItemsNested setNewItemLike(int index,V1MutatingWebhookConfiguration item); - public V1MutatingWebhookConfigurationListFluent.ItemsNested editItem(int index); - public V1MutatingWebhookConfigurationListFluent.ItemsNested editFirstItem(); - public V1MutatingWebhookConfigurationListFluent.ItemsNested editLastItem(); - public V1MutatingWebhookConfigurationListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1MutatingWebhookConfigurationListFluent.MetadataNested withNewMetadata(); - public V1MutatingWebhookConfigurationListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1MutatingWebhookConfigurationListFluent.MetadataNested editMetadata(); - public V1MutatingWebhookConfigurationListFluent.MetadataNested editOrNewMetadata(); - public V1MutatingWebhookConfigurationListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1MutatingWebhookConfigurationFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1MutatingWebhookConfigurationListFluent> extends BaseFluent{ + public V1MutatingWebhookConfigurationListFluent() { + } + + public V1MutatingWebhookConfigurationListFluent(V1MutatingWebhookConfigurationList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1MutatingWebhookConfigurationList instance) { + instance = (instance != null ? instance : new V1MutatingWebhookConfigurationList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1MutatingWebhookConfiguration item) { + if (this.items == null) {this.items = new ArrayList();} + V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1MutatingWebhookConfiguration item) { + if (this.items == null) {this.items = new ArrayList();} + V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1MutatingWebhookConfiguration item : items) {V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1MutatingWebhookConfiguration item : items) {V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration... items) { + if (this.items == null) return (A)this; + for (V1MutatingWebhookConfiguration item : items) {V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1MutatingWebhookConfiguration item : items) {V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1MutatingWebhookConfigurationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1MutatingWebhookConfiguration buildItem(int index) { + return this.items.get(index).build(); + } + + public V1MutatingWebhookConfiguration buildFirstItem() { + return this.items.get(0).build(); + } + + public V1MutatingWebhookConfiguration buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1MutatingWebhookConfiguration buildMatchingItem(Predicate predicate) { + for (V1MutatingWebhookConfigurationBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1MutatingWebhookConfigurationBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1MutatingWebhookConfiguration item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1MutatingWebhookConfiguration item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1MutatingWebhookConfiguration item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1MutatingWebhookConfiguration item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1MutatingWebhookConfigurationListFluent that = (V1MutatingWebhookConfigurationListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1MutatingWebhookConfigurationFluent> implements Nested{ + ItemsNested(int index,V1MutatingWebhookConfiguration item) { + this.index = index; + this.builder = new V1MutatingWebhookConfigurationBuilder(this, item); + } + V1MutatingWebhookConfigurationBuilder builder; + int index; + public N and() { + return (N) V1MutatingWebhookConfigurationListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1MutatingWebhookConfigurationListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListFluentImpl.java deleted file mode 100644 index 3b0e610a87..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookConfigurationListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1MutatingWebhookConfigurationListFluentImpl> extends BaseFluent implements V1MutatingWebhookConfigurationListFluent{ - public V1MutatingWebhookConfigurationListFluentImpl() { - } - public V1MutatingWebhookConfigurationListFluentImpl(V1MutatingWebhookConfigurationList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1MutatingWebhookConfiguration item) { - if (this.items == null) {this.items = new ArrayList();} - V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1MutatingWebhookConfiguration item) { - if (this.items == null) {this.items = new ArrayList();} - V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1MutatingWebhookConfiguration item : items) {V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1MutatingWebhookConfiguration item : items) {V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration... items) { - for (V1MutatingWebhookConfiguration item : items) {V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1MutatingWebhookConfiguration item : items) {V1MutatingWebhookConfigurationBuilder builder = new V1MutatingWebhookConfigurationBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1MutatingWebhookConfigurationBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1MutatingWebhookConfiguration buildItem(int index) { - return this.items.get(index).build(); - } - public V1MutatingWebhookConfiguration buildFirstItem() { - return this.items.get(0).build(); - } - public V1MutatingWebhookConfiguration buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1MutatingWebhookConfiguration buildMatchingItem(Predicate predicate) { - for (V1MutatingWebhookConfigurationBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1MutatingWebhookConfigurationBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1MutatingWebhookConfiguration item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1MutatingWebhookConfiguration... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1MutatingWebhookConfiguration item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1MutatingWebhookConfigurationListFluentImpl.ItemsNested addNewItem() { - return new V1MutatingWebhookConfigurationListFluentImpl.ItemsNestedImpl(); - } - public V1MutatingWebhookConfigurationListFluentImpl.ItemsNested addNewItemLike(V1MutatingWebhookConfiguration item) { - return new V1MutatingWebhookConfigurationListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1MutatingWebhookConfigurationListFluentImpl.ItemsNested setNewItemLike(int index,V1MutatingWebhookConfiguration item) { - return new V1MutatingWebhookConfigurationListFluentImpl.ItemsNestedImpl(index, item); - } - public V1MutatingWebhookConfigurationListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1MutatingWebhookConfigurationListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1MutatingWebhookConfigurationListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1MutatingWebhookConfigurationListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1MutatingWebhookConfigurationListFluentImpl.MetadataNestedImpl(); - } - public V1MutatingWebhookConfigurationListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1MutatingWebhookConfigurationListFluentImpl.MetadataNestedImpl(item); - } - public V1MutatingWebhookConfigurationListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1MutatingWebhookConfigurationListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1MutatingWebhookConfigurationListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1MutatingWebhookConfigurationListFluentImpl that = (V1MutatingWebhookConfigurationListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1MutatingWebhookConfigurationFluentImpl> implements V1MutatingWebhookConfigurationListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1MutatingWebhookConfiguration item) { - this.index = index; - this.builder = new V1MutatingWebhookConfigurationBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1MutatingWebhookConfigurationBuilder(this); - } - V1MutatingWebhookConfigurationBuilder builder; - int index; - public N and() { - return (N) V1MutatingWebhookConfigurationListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1MutatingWebhookConfigurationListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1MutatingWebhookConfigurationListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookFluent.java index 90ab79c5a7..ce0404d8e3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookFluent.java @@ -1,185 +1,779 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.List; -import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.lang.Integer; import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1MutatingWebhookFluent> extends Fluent{ - public A addToAdmissionReviewVersions(int index,String item); - public A setToAdmissionReviewVersions(int index,String item); - public A addToAdmissionReviewVersions(java.lang.String... items); - public A addAllToAdmissionReviewVersions(Collection items); - public A removeFromAdmissionReviewVersions(java.lang.String... items); - public A removeAllFromAdmissionReviewVersions(Collection items); - public List getAdmissionReviewVersions(); - public String getAdmissionReviewVersion(int index); - public String getFirstAdmissionReviewVersion(); - public String getLastAdmissionReviewVersion(); - public String getMatchingAdmissionReviewVersion(Predicate predicate); - public Boolean hasMatchingAdmissionReviewVersion(Predicate predicate); - public A withAdmissionReviewVersions(List admissionReviewVersions); - public A withAdmissionReviewVersions(java.lang.String... admissionReviewVersions); - public Boolean hasAdmissionReviewVersions(); - - /** - * This method has been deprecated, please use method buildClientConfig instead. - * @return The buildable object. - */ - @Deprecated - public AdmissionregistrationV1WebhookClientConfig getClientConfig(); - public AdmissionregistrationV1WebhookClientConfig buildClientConfig(); - public A withClientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig); - public Boolean hasClientConfig(); - public V1MutatingWebhookFluent.ClientConfigNested withNewClientConfig(); - public V1MutatingWebhookFluent.ClientConfigNested withNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item); - public V1MutatingWebhookFluent.ClientConfigNested editClientConfig(); - public V1MutatingWebhookFluent.ClientConfigNested editOrNewClientConfig(); - public V1MutatingWebhookFluent.ClientConfigNested editOrNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item); - public String getFailurePolicy(); - public A withFailurePolicy(String failurePolicy); - public Boolean hasFailurePolicy(); - public A addToMatchConditions(int index,V1MatchCondition item); - public A setToMatchConditions(int index,V1MatchCondition item); - public A addToMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items); - public A addAllToMatchConditions(Collection items); - public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items); - public A removeAllFromMatchConditions(Collection items); - public A removeMatchingFromMatchConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMatchConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchConditions(); - public List buildMatchConditions(); - public V1MatchCondition buildMatchCondition(int index); - public V1MatchCondition buildFirstMatchCondition(); - public V1MatchCondition buildLastMatchCondition(); - public V1MatchCondition buildMatchingMatchCondition(Predicate predicate); - public Boolean hasMatchingMatchCondition(Predicate predicate); - public A withMatchConditions(List matchConditions); - public A withMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... matchConditions); - public Boolean hasMatchConditions(); - public V1MutatingWebhookFluent.MatchConditionsNested addNewMatchCondition(); - public V1MutatingWebhookFluent.MatchConditionsNested addNewMatchConditionLike(V1MatchCondition item); - public V1MutatingWebhookFluent.MatchConditionsNested setNewMatchConditionLike(int index,V1MatchCondition item); - public V1MutatingWebhookFluent.MatchConditionsNested editMatchCondition(int index); - public V1MutatingWebhookFluent.MatchConditionsNested editFirstMatchCondition(); - public V1MutatingWebhookFluent.MatchConditionsNested editLastMatchCondition(); - public V1MutatingWebhookFluent.MatchConditionsNested editMatchingMatchCondition(Predicate predicate); - public String getMatchPolicy(); - public A withMatchPolicy(String matchPolicy); - public Boolean hasMatchPolicy(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildNamespaceSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getNamespaceSelector(); - public V1LabelSelector buildNamespaceSelector(); - public A withNamespaceSelector(V1LabelSelector namespaceSelector); - public Boolean hasNamespaceSelector(); - public V1MutatingWebhookFluent.NamespaceSelectorNested withNewNamespaceSelector(); - public V1MutatingWebhookFluent.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item); - public V1MutatingWebhookFluent.NamespaceSelectorNested editNamespaceSelector(); - public V1MutatingWebhookFluent.NamespaceSelectorNested editOrNewNamespaceSelector(); - public V1MutatingWebhookFluent.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item); - - /** - * This method has been deprecated, please use method buildObjectSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getObjectSelector(); - public V1LabelSelector buildObjectSelector(); - public A withObjectSelector(V1LabelSelector objectSelector); - public Boolean hasObjectSelector(); - public V1MutatingWebhookFluent.ObjectSelectorNested withNewObjectSelector(); - public V1MutatingWebhookFluent.ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item); - public V1MutatingWebhookFluent.ObjectSelectorNested editObjectSelector(); - public V1MutatingWebhookFluent.ObjectSelectorNested editOrNewObjectSelector(); - public V1MutatingWebhookFluent.ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item); - public String getReinvocationPolicy(); - public A withReinvocationPolicy(String reinvocationPolicy); - public Boolean hasReinvocationPolicy(); - public A addToRules(int index,V1RuleWithOperations item); - public A setToRules(int index,V1RuleWithOperations item); - public A addToRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items); - public A addAllToRules(Collection items); - public A removeFromRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items); - public A removeAllFromRules(Collection items); - public A removeMatchingFromRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules(); - public List buildRules(); - public V1RuleWithOperations buildRule(int index); - public V1RuleWithOperations buildFirstRule(); - public V1RuleWithOperations buildLastRule(); - public V1RuleWithOperations buildMatchingRule(Predicate predicate); - public Boolean hasMatchingRule(Predicate predicate); - public A withRules(List rules); - public A withRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... rules); - public Boolean hasRules(); - public V1MutatingWebhookFluent.RulesNested addNewRule(); - public V1MutatingWebhookFluent.RulesNested addNewRuleLike(V1RuleWithOperations item); - public V1MutatingWebhookFluent.RulesNested setNewRuleLike(int index,V1RuleWithOperations item); - public V1MutatingWebhookFluent.RulesNested editRule(int index); - public V1MutatingWebhookFluent.RulesNested editFirstRule(); - public V1MutatingWebhookFluent.RulesNested editLastRule(); - public V1MutatingWebhookFluent.RulesNested editMatchingRule(Predicate predicate); - public String getSideEffects(); - public A withSideEffects(String sideEffects); - public Boolean hasSideEffects(); - public Integer getTimeoutSeconds(); - public A withTimeoutSeconds(Integer timeoutSeconds); - public Boolean hasTimeoutSeconds(); - public interface ClientConfigNested extends Nested,AdmissionregistrationV1WebhookClientConfigFluent>{ - public N and(); - public N endClientConfig(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1MutatingWebhookFluent> extends BaseFluent{ + public V1MutatingWebhookFluent() { + } + + public V1MutatingWebhookFluent(V1MutatingWebhook instance) { + this.copyInstance(instance); + } + private List admissionReviewVersions; + private AdmissionregistrationV1WebhookClientConfigBuilder clientConfig; + private String failurePolicy; + private ArrayList matchConditions; + private String matchPolicy; + private String name; + private V1LabelSelectorBuilder namespaceSelector; + private V1LabelSelectorBuilder objectSelector; + private String reinvocationPolicy; + private ArrayList rules; + private String sideEffects; + private Integer timeoutSeconds; + + protected void copyInstance(V1MutatingWebhook instance) { + instance = (instance != null ? instance : new V1MutatingWebhook()); + if (instance != null) { + this.withAdmissionReviewVersions(instance.getAdmissionReviewVersions()); + this.withClientConfig(instance.getClientConfig()); + this.withFailurePolicy(instance.getFailurePolicy()); + this.withMatchConditions(instance.getMatchConditions()); + this.withMatchPolicy(instance.getMatchPolicy()); + this.withName(instance.getName()); + this.withNamespaceSelector(instance.getNamespaceSelector()); + this.withObjectSelector(instance.getObjectSelector()); + this.withReinvocationPolicy(instance.getReinvocationPolicy()); + this.withRules(instance.getRules()); + this.withSideEffects(instance.getSideEffects()); + this.withTimeoutSeconds(instance.getTimeoutSeconds()); + } + } + + public A addToAdmissionReviewVersions(int index,String item) { + if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} + this.admissionReviewVersions.add(index, item); + return (A)this; + } + + public A setToAdmissionReviewVersions(int index,String item) { + if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} + this.admissionReviewVersions.set(index, item); return (A)this; + } + + public A addToAdmissionReviewVersions(java.lang.String... items) { + if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} + for (String item : items) {this.admissionReviewVersions.add(item);} return (A)this; + } + + public A addAllToAdmissionReviewVersions(Collection items) { + if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} + for (String item : items) {this.admissionReviewVersions.add(item);} return (A)this; + } + + public A removeFromAdmissionReviewVersions(java.lang.String... items) { + if (this.admissionReviewVersions == null) return (A)this; + for (String item : items) { this.admissionReviewVersions.remove(item);} return (A)this; + } + + public A removeAllFromAdmissionReviewVersions(Collection items) { + if (this.admissionReviewVersions == null) return (A)this; + for (String item : items) { this.admissionReviewVersions.remove(item);} return (A)this; + } + + public List getAdmissionReviewVersions() { + return this.admissionReviewVersions; + } + + public String getAdmissionReviewVersion(int index) { + return this.admissionReviewVersions.get(index); + } + + public String getFirstAdmissionReviewVersion() { + return this.admissionReviewVersions.get(0); + } + + public String getLastAdmissionReviewVersion() { + return this.admissionReviewVersions.get(admissionReviewVersions.size() - 1); + } + + public String getMatchingAdmissionReviewVersion(Predicate predicate) { + for (String item : admissionReviewVersions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAdmissionReviewVersion(Predicate predicate) { + for (String item : admissionReviewVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAdmissionReviewVersions(List admissionReviewVersions) { + if (admissionReviewVersions != null) { + this.admissionReviewVersions = new ArrayList(); + for (String item : admissionReviewVersions) { + this.addToAdmissionReviewVersions(item); + } + } else { + this.admissionReviewVersions = null; + } + return (A) this; + } + + public A withAdmissionReviewVersions(java.lang.String... admissionReviewVersions) { + if (this.admissionReviewVersions != null) { + this.admissionReviewVersions.clear(); + _visitables.remove("admissionReviewVersions"); + } + if (admissionReviewVersions != null) { + for (String item : admissionReviewVersions) { + this.addToAdmissionReviewVersions(item); + } + } + return (A) this; + } + + public boolean hasAdmissionReviewVersions() { + return this.admissionReviewVersions != null && !this.admissionReviewVersions.isEmpty(); + } + + public AdmissionregistrationV1WebhookClientConfig buildClientConfig() { + return this.clientConfig != null ? this.clientConfig.build() : null; + } + + public A withClientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig) { + this._visitables.remove("clientConfig"); + if (clientConfig != null) { + this.clientConfig = new AdmissionregistrationV1WebhookClientConfigBuilder(clientConfig); + this._visitables.get("clientConfig").add(this.clientConfig); + } else { + this.clientConfig = null; + this._visitables.get("clientConfig").remove(this.clientConfig); + } + return (A) this; + } + + public boolean hasClientConfig() { + return this.clientConfig != null; + } + + public ClientConfigNested withNewClientConfig() { + return new ClientConfigNested(null); + } + + public ClientConfigNested withNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item) { + return new ClientConfigNested(item); + } + + public ClientConfigNested editClientConfig() { + return withNewClientConfigLike(java.util.Optional.ofNullable(buildClientConfig()).orElse(null)); + } + + public ClientConfigNested editOrNewClientConfig() { + return withNewClientConfigLike(java.util.Optional.ofNullable(buildClientConfig()).orElse(new AdmissionregistrationV1WebhookClientConfigBuilder().build())); + } + + public ClientConfigNested editOrNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item) { + return withNewClientConfigLike(java.util.Optional.ofNullable(buildClientConfig()).orElse(item)); + } + + public String getFailurePolicy() { + return this.failurePolicy; + } + + public A withFailurePolicy(String failurePolicy) { + this.failurePolicy = failurePolicy; + return (A) this; + } + + public boolean hasFailurePolicy() { + return this.failurePolicy != null; + } + + public A addToMatchConditions(int index,V1MatchCondition item) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item); + if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").add(index, builder); matchConditions.add(index, builder);} + return (A)this; + } + + public A setToMatchConditions(int index,V1MatchCondition item) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item); + if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").set(index, builder); matchConditions.set(index, builder);} + return (A)this; + } + + public A addToMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; + } + + public A addAllToMatchConditions(Collection items) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; + } + + public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items) { + if (this.matchConditions == null) return (A)this; + for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder); this.matchConditions.remove(builder);} return (A)this; + } + + public A removeAllFromMatchConditions(Collection items) { + if (this.matchConditions == null) return (A)this; + for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder); this.matchConditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromMatchConditions(Predicate predicate) { + if (matchConditions == null) return (A) this; + final Iterator each = matchConditions.iterator(); + final List visitables = _visitables.get("matchConditions"); + while (each.hasNext()) { + V1MatchConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMatchConditions() { + return this.matchConditions != null ? build(matchConditions) : null; + } + + public V1MatchCondition buildMatchCondition(int index) { + return this.matchConditions.get(index).build(); + } + + public V1MatchCondition buildFirstMatchCondition() { + return this.matchConditions.get(0).build(); + } + + public V1MatchCondition buildLastMatchCondition() { + return this.matchConditions.get(matchConditions.size() - 1).build(); + } + + public V1MatchCondition buildMatchingMatchCondition(Predicate predicate) { + for (V1MatchConditionBuilder item : matchConditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMatchCondition(Predicate predicate) { + for (V1MatchConditionBuilder item : matchConditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMatchConditions(List matchConditions) { + if (this.matchConditions != null) { + this._visitables.get("matchConditions").clear(); + } + if (matchConditions != null) { + this.matchConditions = new ArrayList(); + for (V1MatchCondition item : matchConditions) { + this.addToMatchConditions(item); + } + } else { + this.matchConditions = null; + } + return (A) this; + } + + public A withMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... matchConditions) { + if (this.matchConditions != null) { + this.matchConditions.clear(); + _visitables.remove("matchConditions"); + } + if (matchConditions != null) { + for (V1MatchCondition item : matchConditions) { + this.addToMatchConditions(item); + } + } + return (A) this; + } + + public boolean hasMatchConditions() { + return this.matchConditions != null && !this.matchConditions.isEmpty(); + } + + public MatchConditionsNested addNewMatchCondition() { + return new MatchConditionsNested(-1, null); + } + + public MatchConditionsNested addNewMatchConditionLike(V1MatchCondition item) { + return new MatchConditionsNested(-1, item); + } + + public MatchConditionsNested setNewMatchConditionLike(int index,V1MatchCondition item) { + return new MatchConditionsNested(index, item); + } + + public MatchConditionsNested editMatchCondition(int index) { + if (matchConditions.size() <= index) throw new RuntimeException("Can't edit matchConditions. Index exceeds size."); + return setNewMatchConditionLike(index, buildMatchCondition(index)); + } + + public MatchConditionsNested editFirstMatchCondition() { + if (matchConditions.size() == 0) throw new RuntimeException("Can't edit first matchConditions. The list is empty."); + return setNewMatchConditionLike(0, buildMatchCondition(0)); + } + + public MatchConditionsNested editLastMatchCondition() { + int index = matchConditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last matchConditions. The list is empty."); + return setNewMatchConditionLike(index, buildMatchCondition(index)); + } + + public MatchConditionsNested editMatchingMatchCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends Nested,V1MatchConditionFluent>{ - public N and(); - public N endMatchCondition(); + + public A withNamespaceSelector(V1LabelSelector namespaceSelector) { + this._visitables.remove("namespaceSelector"); + if (namespaceSelector != null) { + this.namespaceSelector = new V1LabelSelectorBuilder(namespaceSelector); + this._visitables.get("namespaceSelector").add(this.namespaceSelector); + } else { + this.namespaceSelector = null; + this._visitables.get("namespaceSelector").remove(this.namespaceSelector); + } + return (A) this; + } + + public boolean hasNamespaceSelector() { + return this.namespaceSelector != null; + } + + public NamespaceSelectorNested withNewNamespaceSelector() { + return new NamespaceSelectorNested(null); + } + + public NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { + return new NamespaceSelectorNested(item); + } + + public NamespaceSelectorNested editNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(null)); + } + + public NamespaceSelectorNested editOrNewNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(item)); + } + + public V1LabelSelector buildObjectSelector() { + return this.objectSelector != null ? this.objectSelector.build() : null; + } + + public A withObjectSelector(V1LabelSelector objectSelector) { + this._visitables.remove("objectSelector"); + if (objectSelector != null) { + this.objectSelector = new V1LabelSelectorBuilder(objectSelector); + this._visitables.get("objectSelector").add(this.objectSelector); + } else { + this.objectSelector = null; + this._visitables.get("objectSelector").remove(this.objectSelector); + } + return (A) this; + } + + public boolean hasObjectSelector() { + return this.objectSelector != null; + } + + public ObjectSelectorNested withNewObjectSelector() { + return new ObjectSelectorNested(null); + } + + public ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item) { + return new ObjectSelectorNested(item); + } + + public ObjectSelectorNested editObjectSelector() { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(null)); + } + + public ObjectSelectorNested editOrNewObjectSelector() { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item) { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(item)); + } + + public String getReinvocationPolicy() { + return this.reinvocationPolicy; + } + + public A withReinvocationPolicy(String reinvocationPolicy) { + this.reinvocationPolicy = reinvocationPolicy; + return (A) this; + } + + public boolean hasReinvocationPolicy() { + return this.reinvocationPolicy != null; + } + + public A addToRules(int index,V1RuleWithOperations item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} + return (A)this; + } + + public A setToRules(int index,V1RuleWithOperations item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} + return (A)this; + } + + public A addToRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A addAllToRules(Collection items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A removeFromRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items) { + if (this.rules == null) return (A)this; + for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeAllFromRules(Collection items) { + if (this.rules == null) return (A)this; + for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeMatchingFromRules(Predicate predicate) { + if (rules == null) return (A) this; + final Iterator each = rules.iterator(); + final List visitables = _visitables.get("rules"); + while (each.hasNext()) { + V1RuleWithOperationsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildRules() { + return this.rules != null ? build(rules) : null; + } + + public V1RuleWithOperations buildRule(int index) { + return this.rules.get(index).build(); + } + + public V1RuleWithOperations buildFirstRule() { + return this.rules.get(0).build(); + } + + public V1RuleWithOperations buildLastRule() { + return this.rules.get(rules.size() - 1).build(); + } + + public V1RuleWithOperations buildMatchingRule(Predicate predicate) { + for (V1RuleWithOperationsBuilder item : rules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingRule(Predicate predicate) { + for (V1RuleWithOperationsBuilder item : rules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRules(List rules) { + if (this.rules != null) { + this._visitables.get("rules").clear(); + } + if (rules != null) { + this.rules = new ArrayList(); + for (V1RuleWithOperations item : rules) { + this.addToRules(item); + } + } else { + this.rules = null; + } + return (A) this; + } + + public A withRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... rules) { + if (this.rules != null) { + this.rules.clear(); + _visitables.remove("rules"); + } + if (rules != null) { + for (V1RuleWithOperations item : rules) { + this.addToRules(item); + } + } + return (A) this; + } + + public boolean hasRules() { + return this.rules != null && !this.rules.isEmpty(); + } + + public RulesNested addNewRule() { + return new RulesNested(-1, null); + } + + public RulesNested addNewRuleLike(V1RuleWithOperations item) { + return new RulesNested(-1, item); + } + + public RulesNested setNewRuleLike(int index,V1RuleWithOperations item) { + return new RulesNested(index, item); + } + + public RulesNested editRule(int index) { + if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editFirstRule() { + if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); + return setNewRuleLike(0, buildRule(0)); + } + + public RulesNested editLastRule() { + int index = rules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editMatchingRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends AdmissionregistrationV1WebhookClientConfigFluent> implements Nested{ + ClientConfigNested(AdmissionregistrationV1WebhookClientConfig item) { + this.builder = new AdmissionregistrationV1WebhookClientConfigBuilder(this, item); + } + AdmissionregistrationV1WebhookClientConfigBuilder builder; + public N and() { + return (N) V1MutatingWebhookFluent.this.withClientConfig(builder.build()); + } + + public N endClientConfig() { + return and(); + } + + } - public interface NamespaceSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endNamespaceSelector(); + public class MatchConditionsNested extends V1MatchConditionFluent> implements Nested{ + MatchConditionsNested(int index,V1MatchCondition item) { + this.index = index; + this.builder = new V1MatchConditionBuilder(this, item); + } + V1MatchConditionBuilder builder; + int index; + public N and() { + return (N) V1MutatingWebhookFluent.this.setToMatchConditions(index,builder.build()); + } + + public N endMatchCondition() { + return and(); + } + + } - public interface ObjectSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endObjectSelector(); + public class NamespaceSelectorNested extends V1LabelSelectorFluent> implements Nested{ + NamespaceSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1MutatingWebhookFluent.this.withNamespaceSelector(builder.build()); + } + public N endNamespaceSelector() { + return and(); + } + + } - public interface RulesNested extends Nested,V1RuleWithOperationsFluent>{ - public N and(); - public N endRule(); + public class ObjectSelectorNested extends V1LabelSelectorFluent> implements Nested{ + ObjectSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1MutatingWebhookFluent.this.withObjectSelector(builder.build()); + } + public N endObjectSelector() { + return and(); + } + + } + public class RulesNested extends V1RuleWithOperationsFluent> implements Nested{ + RulesNested(int index,V1RuleWithOperations item) { + this.index = index; + this.builder = new V1RuleWithOperationsBuilder(this, item); + } + V1RuleWithOperationsBuilder builder; + int index; + + public N and() { + return (N) V1MutatingWebhookFluent.this.setToRules(index,builder.build()); + } + + public N endRule() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookFluentImpl.java deleted file mode 100644 index 56a38dd70e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MutatingWebhookFluentImpl.java +++ /dev/null @@ -1,613 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1MutatingWebhookFluentImpl> extends BaseFluent implements V1MutatingWebhookFluent{ - public V1MutatingWebhookFluentImpl() { - } - public V1MutatingWebhookFluentImpl(V1MutatingWebhook instance) { - if (instance != null) { - this.withAdmissionReviewVersions(instance.getAdmissionReviewVersions()); - this.withClientConfig(instance.getClientConfig()); - this.withFailurePolicy(instance.getFailurePolicy()); - this.withMatchConditions(instance.getMatchConditions()); - this.withMatchPolicy(instance.getMatchPolicy()); - this.withName(instance.getName()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withObjectSelector(instance.getObjectSelector()); - this.withReinvocationPolicy(instance.getReinvocationPolicy()); - this.withRules(instance.getRules()); - this.withSideEffects(instance.getSideEffects()); - this.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - } - private List admissionReviewVersions; - private AdmissionregistrationV1WebhookClientConfigBuilder clientConfig; - private String failurePolicy; - private ArrayList matchConditions; - private String matchPolicy; - private String name; - private V1LabelSelectorBuilder namespaceSelector; - private V1LabelSelectorBuilder objectSelector; - private String reinvocationPolicy; - private ArrayList rules; - private String sideEffects; - private Integer timeoutSeconds; - public A addToAdmissionReviewVersions(int index,String item) { - if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} - this.admissionReviewVersions.add(index, item); - return (A)this; - } - public A setToAdmissionReviewVersions(int index,String item) { - if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} - this.admissionReviewVersions.set(index, item); return (A)this; - } - public A addToAdmissionReviewVersions(java.lang.String... items) { - if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} - for (String item : items) {this.admissionReviewVersions.add(item);} return (A)this; - } - public A addAllToAdmissionReviewVersions(Collection items) { - if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} - for (String item : items) {this.admissionReviewVersions.add(item);} return (A)this; - } - public A removeFromAdmissionReviewVersions(java.lang.String... items) { - for (String item : items) {if (this.admissionReviewVersions!= null){ this.admissionReviewVersions.remove(item);}} return (A)this; - } - public A removeAllFromAdmissionReviewVersions(Collection items) { - for (String item : items) {if (this.admissionReviewVersions!= null){ this.admissionReviewVersions.remove(item);}} return (A)this; - } - public List getAdmissionReviewVersions() { - return this.admissionReviewVersions; - } - public String getAdmissionReviewVersion(int index) { - return this.admissionReviewVersions.get(index); - } - public String getFirstAdmissionReviewVersion() { - return this.admissionReviewVersions.get(0); - } - public String getLastAdmissionReviewVersion() { - return this.admissionReviewVersions.get(admissionReviewVersions.size() - 1); - } - public String getMatchingAdmissionReviewVersion(Predicate predicate) { - for (String item: admissionReviewVersions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAdmissionReviewVersion(Predicate predicate) { - for (String item: admissionReviewVersions) { if(predicate.test(item)){ return true;} } return false; - } - public A withAdmissionReviewVersions(List admissionReviewVersions) { - if (admissionReviewVersions != null) {this.admissionReviewVersions = new ArrayList(); for (String item : admissionReviewVersions){this.addToAdmissionReviewVersions(item);}} else { this.admissionReviewVersions = null;} return (A) this; - } - public A withAdmissionReviewVersions(java.lang.String... admissionReviewVersions) { - if (this.admissionReviewVersions != null) {this.admissionReviewVersions.clear(); _visitables.remove("admissionReviewVersions"); } - if (admissionReviewVersions != null) {for (String item :admissionReviewVersions){ this.addToAdmissionReviewVersions(item);}} return (A) this; - } - public Boolean hasAdmissionReviewVersions() { - return admissionReviewVersions != null && !admissionReviewVersions.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildClientConfig instead. - * @return The buildable object. - */ - @Deprecated - public AdmissionregistrationV1WebhookClientConfig getClientConfig() { - return this.clientConfig!=null ?this.clientConfig.build():null; - } - public AdmissionregistrationV1WebhookClientConfig buildClientConfig() { - return this.clientConfig!=null ?this.clientConfig.build():null; - } - public A withClientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig) { - _visitables.get("clientConfig").remove(this.clientConfig); - if (clientConfig!=null){ this.clientConfig= new AdmissionregistrationV1WebhookClientConfigBuilder(clientConfig); _visitables.get("clientConfig").add(this.clientConfig);} else { this.clientConfig = null; _visitables.get("clientConfig").remove(this.clientConfig); } return (A) this; - } - public Boolean hasClientConfig() { - return this.clientConfig != null; - } - public V1MutatingWebhookFluentImpl.ClientConfigNested withNewClientConfig() { - return new V1MutatingWebhookFluentImpl.ClientConfigNestedImpl(); - } - public V1MutatingWebhookFluentImpl.ClientConfigNested withNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item) { - return new V1MutatingWebhookFluentImpl.ClientConfigNestedImpl(item); - } - public V1MutatingWebhookFluentImpl.ClientConfigNested editClientConfig() { - return withNewClientConfigLike(getClientConfig()); - } - public V1MutatingWebhookFluentImpl.ClientConfigNested editOrNewClientConfig() { - return withNewClientConfigLike(getClientConfig() != null ? getClientConfig(): new AdmissionregistrationV1WebhookClientConfigBuilder().build()); - } - public V1MutatingWebhookFluentImpl.ClientConfigNested editOrNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item) { - return withNewClientConfigLike(getClientConfig() != null ? getClientConfig(): item); - } - public String getFailurePolicy() { - return this.failurePolicy; - } - public A withFailurePolicy(String failurePolicy) { - this.failurePolicy=failurePolicy; return (A) this; - } - public Boolean hasFailurePolicy() { - return this.failurePolicy != null; - } - public A addToMatchConditions(int index,V1MatchCondition item) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item); - if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").add(index, builder); matchConditions.add(index, builder);} - return (A)this; - } - public A setToMatchConditions(int index,V1MatchCondition item) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item); - if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").set(index, builder); matchConditions.set(index, builder);} - return (A)this; - } - public A addToMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; - } - public A addAllToMatchConditions(Collection items) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; - } - public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items) { - for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder);if (this.matchConditions != null) {this.matchConditions.remove(builder);}} return (A)this; - } - public A removeAllFromMatchConditions(Collection items) { - for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder);if (this.matchConditions != null) {this.matchConditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromMatchConditions(Predicate predicate) { - if (matchConditions == null) return (A) this; - final Iterator each = matchConditions.iterator(); - final List visitables = _visitables.get("matchConditions"); - while (each.hasNext()) { - V1MatchConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildMatchConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchConditions() { - return matchConditions != null ? build(matchConditions) : null; - } - public List buildMatchConditions() { - return matchConditions != null ? build(matchConditions) : null; - } - public V1MatchCondition buildMatchCondition(int index) { - return this.matchConditions.get(index).build(); - } - public V1MatchCondition buildFirstMatchCondition() { - return this.matchConditions.get(0).build(); - } - public V1MatchCondition buildLastMatchCondition() { - return this.matchConditions.get(matchConditions.size() - 1).build(); - } - public V1MatchCondition buildMatchingMatchCondition(Predicate predicate) { - for (V1MatchConditionBuilder item: matchConditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingMatchCondition(Predicate predicate) { - for (V1MatchConditionBuilder item: matchConditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withMatchConditions(List matchConditions) { - if (this.matchConditions != null) { _visitables.get("matchConditions").clear();} - if (matchConditions != null) {this.matchConditions = new ArrayList(); for (V1MatchCondition item : matchConditions){this.addToMatchConditions(item);}} else { this.matchConditions = null;} return (A) this; - } - public A withMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... matchConditions) { - if (this.matchConditions != null) {this.matchConditions.clear(); _visitables.remove("matchConditions"); } - if (matchConditions != null) {for (V1MatchCondition item :matchConditions){ this.addToMatchConditions(item);}} return (A) this; - } - public Boolean hasMatchConditions() { - return matchConditions != null && !matchConditions.isEmpty(); - } - public V1MutatingWebhookFluentImpl.MatchConditionsNested addNewMatchCondition() { - return new V1MutatingWebhookFluentImpl.MatchConditionsNestedImpl(); - } - public V1MutatingWebhookFluentImpl.MatchConditionsNested addNewMatchConditionLike(V1MatchCondition item) { - return new V1MutatingWebhookFluentImpl.MatchConditionsNestedImpl(-1, item); - } - public V1MutatingWebhookFluentImpl.MatchConditionsNested setNewMatchConditionLike(int index,V1MatchCondition item) { - return new V1MutatingWebhookFluentImpl.MatchConditionsNestedImpl(index, item); - } - public V1MutatingWebhookFluentImpl.MatchConditionsNested editMatchCondition(int index) { - if (matchConditions.size() <= index) throw new RuntimeException("Can't edit matchConditions. Index exceeds size."); - return setNewMatchConditionLike(index, buildMatchCondition(index)); - } - public V1MutatingWebhookFluentImpl.MatchConditionsNested editFirstMatchCondition() { - if (matchConditions.size() == 0) throw new RuntimeException("Can't edit first matchConditions. The list is empty."); - return setNewMatchConditionLike(0, buildMatchCondition(0)); - } - public V1MutatingWebhookFluentImpl.MatchConditionsNested editLastMatchCondition() { - int index = matchConditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last matchConditions. The list is empty."); - return setNewMatchConditionLike(index, buildMatchCondition(index)); - } - public V1MutatingWebhookFluentImpl.MatchConditionsNested editMatchingMatchCondition(Predicate predicate) { - int index = -1; - for (int i=0;i withNewNamespaceSelector() { - return new V1MutatingWebhookFluentImpl.NamespaceSelectorNestedImpl(); - } - public V1MutatingWebhookFluentImpl.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { - return new V1MutatingWebhookFluentImpl.NamespaceSelectorNestedImpl(item); - } - public V1MutatingWebhookFluentImpl.NamespaceSelectorNested editNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector()); - } - public V1MutatingWebhookFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): new V1LabelSelectorBuilder().build()); - } - public V1MutatingWebhookFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): item); - } - - /** - * This method has been deprecated, please use method buildObjectSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getObjectSelector() { - return this.objectSelector!=null ?this.objectSelector.build():null; - } - public V1LabelSelector buildObjectSelector() { - return this.objectSelector!=null ?this.objectSelector.build():null; - } - public A withObjectSelector(V1LabelSelector objectSelector) { - _visitables.get("objectSelector").remove(this.objectSelector); - if (objectSelector!=null){ this.objectSelector= new V1LabelSelectorBuilder(objectSelector); _visitables.get("objectSelector").add(this.objectSelector);} else { this.objectSelector = null; _visitables.get("objectSelector").remove(this.objectSelector); } return (A) this; - } - public Boolean hasObjectSelector() { - return this.objectSelector != null; - } - public V1MutatingWebhookFluentImpl.ObjectSelectorNested withNewObjectSelector() { - return new V1MutatingWebhookFluentImpl.ObjectSelectorNestedImpl(); - } - public V1MutatingWebhookFluentImpl.ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item) { - return new V1MutatingWebhookFluentImpl.ObjectSelectorNestedImpl(item); - } - public V1MutatingWebhookFluentImpl.ObjectSelectorNested editObjectSelector() { - return withNewObjectSelectorLike(getObjectSelector()); - } - public V1MutatingWebhookFluentImpl.ObjectSelectorNested editOrNewObjectSelector() { - return withNewObjectSelectorLike(getObjectSelector() != null ? getObjectSelector(): new V1LabelSelectorBuilder().build()); - } - public V1MutatingWebhookFluentImpl.ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item) { - return withNewObjectSelectorLike(getObjectSelector() != null ? getObjectSelector(): item); - } - public String getReinvocationPolicy() { - return this.reinvocationPolicy; - } - public A withReinvocationPolicy(String reinvocationPolicy) { - this.reinvocationPolicy=reinvocationPolicy; return (A) this; - } - public Boolean hasReinvocationPolicy() { - return this.reinvocationPolicy != null; - } - public A addToRules(int index,V1RuleWithOperations item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} - return (A)this; - } - public A setToRules(int index,V1RuleWithOperations item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} - return (A)this; - } - public A addToRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A addAllToRules(Collection items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A removeFromRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items) { - for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeAllFromRules(Collection items) { - for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeMatchingFromRules(Predicate predicate) { - if (rules == null) return (A) this; - final Iterator each = rules.iterator(); - final List visitables = _visitables.get("rules"); - while (each.hasNext()) { - V1RuleWithOperationsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules() { - return rules != null ? build(rules) : null; - } - public List buildRules() { - return rules != null ? build(rules) : null; - } - public V1RuleWithOperations buildRule(int index) { - return this.rules.get(index).build(); - } - public V1RuleWithOperations buildFirstRule() { - return this.rules.get(0).build(); - } - public V1RuleWithOperations buildLastRule() { - return this.rules.get(rules.size() - 1).build(); - } - public V1RuleWithOperations buildMatchingRule(Predicate predicate) { - for (V1RuleWithOperationsBuilder item: rules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRule(Predicate predicate) { - for (V1RuleWithOperationsBuilder item: rules) { if(predicate.test(item)){ return true;} } return false; - } - public A withRules(List rules) { - if (this.rules != null) { _visitables.get("rules").clear();} - if (rules != null) {this.rules = new ArrayList(); for (V1RuleWithOperations item : rules){this.addToRules(item);}} else { this.rules = null;} return (A) this; - } - public A withRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... rules) { - if (this.rules != null) {this.rules.clear(); _visitables.remove("rules"); } - if (rules != null) {for (V1RuleWithOperations item :rules){ this.addToRules(item);}} return (A) this; - } - public Boolean hasRules() { - return rules != null && !rules.isEmpty(); - } - public V1MutatingWebhookFluentImpl.RulesNested addNewRule() { - return new V1MutatingWebhookFluentImpl.RulesNestedImpl(); - } - public V1MutatingWebhookFluentImpl.RulesNested addNewRuleLike(V1RuleWithOperations item) { - return new V1MutatingWebhookFluentImpl.RulesNestedImpl(-1, item); - } - public V1MutatingWebhookFluentImpl.RulesNested setNewRuleLike(int index,V1RuleWithOperations item) { - return new V1MutatingWebhookFluentImpl.RulesNestedImpl(index, item); - } - public V1MutatingWebhookFluentImpl.RulesNested editRule(int index) { - if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); - return setNewRuleLike(index, buildRule(index)); - } - public V1MutatingWebhookFluentImpl.RulesNested editFirstRule() { - if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); - return setNewRuleLike(0, buildRule(0)); - } - public V1MutatingWebhookFluentImpl.RulesNested editLastRule() { - int index = rules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); - return setNewRuleLike(index, buildRule(index)); - } - public V1MutatingWebhookFluentImpl.RulesNested editMatchingRule(Predicate predicate) { - int index = -1; - for (int i=0;i extends AdmissionregistrationV1WebhookClientConfigFluentImpl> implements V1MutatingWebhookFluentImpl.ClientConfigNested,Nested{ - ClientConfigNestedImpl(AdmissionregistrationV1WebhookClientConfig item) { - this.builder = new AdmissionregistrationV1WebhookClientConfigBuilder(this, item); - } - ClientConfigNestedImpl() { - this.builder = new AdmissionregistrationV1WebhookClientConfigBuilder(this); - } - AdmissionregistrationV1WebhookClientConfigBuilder builder; - public N and() { - return (N) V1MutatingWebhookFluentImpl.this.withClientConfig(builder.build()); - } - public N endClientConfig() { - return and(); - } - - } - class MatchConditionsNestedImpl extends V1MatchConditionFluentImpl> implements V1MutatingWebhookFluentImpl.MatchConditionsNested,Nested{ - MatchConditionsNestedImpl(int index,V1MatchCondition item) { - this.index = index; - this.builder = new V1MatchConditionBuilder(this, item); - } - MatchConditionsNestedImpl() { - this.index = -1; - this.builder = new V1MatchConditionBuilder(this); - } - V1MatchConditionBuilder builder; - int index; - public N and() { - return (N) V1MutatingWebhookFluentImpl.this.setToMatchConditions(index,builder.build()); - } - public N endMatchCondition() { - return and(); - } - - } - class NamespaceSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1MutatingWebhookFluentImpl.NamespaceSelectorNested,Nested{ - NamespaceSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - NamespaceSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1MutatingWebhookFluentImpl.this.withNamespaceSelector(builder.build()); - } - public N endNamespaceSelector() { - return and(); - } - - } - class ObjectSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1MutatingWebhookFluentImpl.ObjectSelectorNested,Nested{ - ObjectSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - ObjectSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1MutatingWebhookFluentImpl.this.withObjectSelector(builder.build()); - } - public N endObjectSelector() { - return and(); - } - - } - class RulesNestedImpl extends V1RuleWithOperationsFluentImpl> implements V1MutatingWebhookFluentImpl.RulesNested,Nested{ - RulesNestedImpl(int index,V1RuleWithOperations item) { - this.index = index; - this.builder = new V1RuleWithOperationsBuilder(this, item); - } - RulesNestedImpl() { - this.index = -1; - this.builder = new V1RuleWithOperationsBuilder(this); - } - V1RuleWithOperationsBuilder builder; - int index; - public N and() { - return (N) V1MutatingWebhookFluentImpl.this.setToRules(index,builder.build()); - } - public N endRule() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceBuilder.java index 88fb83e6cf..eec568ae18 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NFSVolumeSourceBuilder extends V1NFSVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1NFSVolumeSourceBuilder extends V1NFSVolumeSourceFluent implements VisitableBuilder{ public V1NFSVolumeSourceBuilder() { - this(false); - } - public V1NFSVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1NFSVolumeSource(), validationEnabled); + this(new V1NFSVolumeSource()); } + public V1NFSVolumeSourceBuilder(V1NFSVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1NFSVolumeSourceBuilder(V1NFSVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NFSVolumeSource(), validationEnabled); + this(fluent, new V1NFSVolumeSource()); } + public V1NFSVolumeSourceBuilder(V1NFSVolumeSourceFluent fluent,V1NFSVolumeSource instance) { - this(fluent, instance, false); - } - public V1NFSVolumeSourceBuilder(V1NFSVolumeSourceFluent fluent,V1NFSVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPath(instance.getPath()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withServer(instance.getServer()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NFSVolumeSourceBuilder(V1NFSVolumeSource instance) { - this(instance,false); - } - public V1NFSVolumeSourceBuilder(V1NFSVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - this.withServer(instance.getServer()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NFSVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1NFSVolumeSource build() { V1NFSVolumeSource buildable = new V1NFSVolumeSource(); buildable.setPath(fluent.getPath()); @@ -49,4 +29,5 @@ public V1NFSVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceFluent.java index 60bd81e726..0e3d89bfcc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceFluent.java @@ -1,23 +1,102 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1NFSVolumeSourceFluent> extends Fluent{ - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public String getServer(); - public A withServer(String server); - public Boolean hasServer(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NFSVolumeSourceFluent> extends BaseFluent{ + public V1NFSVolumeSourceFluent() { + } + public V1NFSVolumeSourceFluent(V1NFSVolumeSource instance) { + this.copyInstance(instance); + } + private String path; + private Boolean readOnly; + private String server; + + protected void copyInstance(V1NFSVolumeSource instance) { + instance = (instance != null ? instance : new V1NFSVolumeSource()); + if (instance != null) { + this.withPath(instance.getPath()); + this.withReadOnly(instance.getReadOnly()); + this.withServer(instance.getServer()); + } + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public String getServer() { + return this.server; + } + + public A withServer(String server) { + this.server = server; + return (A) this; + } + + public boolean hasServer() { + return this.server != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NFSVolumeSourceFluent that = (V1NFSVolumeSourceFluent) o; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(server, that.server)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(path, readOnly, server, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (server != null) { sb.append("server:"); sb.append(server); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceFluentImpl.java deleted file mode 100644 index 568687f0dd..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NFSVolumeSourceFluentImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NFSVolumeSourceFluentImpl> extends BaseFluent implements V1NFSVolumeSourceFluent{ - public V1NFSVolumeSourceFluentImpl() { - } - public V1NFSVolumeSourceFluentImpl(V1NFSVolumeSource instance) { - if (instance != null) { - this.withPath(instance.getPath()); - this.withReadOnly(instance.getReadOnly()); - this.withServer(instance.getServer()); - } - } - private String path; - private Boolean readOnly; - private String server; - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public String getServer() { - return this.server; - } - public A withServer(String server) { - this.server=server; return (A) this; - } - public Boolean hasServer() { - return this.server != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NFSVolumeSourceFluentImpl that = (V1NFSVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(server, that.server)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(path, readOnly, server, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (server != null) { sb.append("server:"); sb.append(server); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceBuilder.java index 31db1221a3..8a99993529 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NamespaceBuilder extends V1NamespaceFluentImpl implements VisitableBuilder{ +public class V1NamespaceBuilder extends V1NamespaceFluent implements VisitableBuilder{ public V1NamespaceBuilder() { - this(false); - } - public V1NamespaceBuilder(Boolean validationEnabled) { - this(new V1Namespace(), validationEnabled); + this(new V1Namespace()); } + public V1NamespaceBuilder(V1NamespaceFluent fluent) { - this(fluent, false); - } - public V1NamespaceBuilder(V1NamespaceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Namespace(), validationEnabled); + this(fluent, new V1Namespace()); } + public V1NamespaceBuilder(V1NamespaceFluent fluent,V1Namespace instance) { - this(fluent, instance, false); - } - public V1NamespaceBuilder(V1NamespaceFluent fluent,V1Namespace instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NamespaceBuilder(V1Namespace instance) { - this(instance,false); - } - public V1NamespaceBuilder(V1Namespace instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NamespaceFluent fluent; - Boolean validationEnabled; + public V1Namespace build() { V1Namespace buildable = new V1Namespace(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionBuilder.java index 8558668008..ad14a9ad29 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NamespaceConditionBuilder extends V1NamespaceConditionFluentImpl implements VisitableBuilder{ +public class V1NamespaceConditionBuilder extends V1NamespaceConditionFluent implements VisitableBuilder{ public V1NamespaceConditionBuilder() { - this(false); - } - public V1NamespaceConditionBuilder(Boolean validationEnabled) { - this(new V1NamespaceCondition(), validationEnabled); + this(new V1NamespaceCondition()); } + public V1NamespaceConditionBuilder(V1NamespaceConditionFluent fluent) { - this(fluent, false); - } - public V1NamespaceConditionBuilder(V1NamespaceConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NamespaceCondition(), validationEnabled); + this(fluent, new V1NamespaceCondition()); } + public V1NamespaceConditionBuilder(V1NamespaceConditionFluent fluent,V1NamespaceCondition instance) { - this(fluent, instance, false); - } - public V1NamespaceConditionBuilder(V1NamespaceConditionFluent fluent,V1NamespaceCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NamespaceConditionBuilder(V1NamespaceCondition instance) { - this(instance,false); - } - public V1NamespaceConditionBuilder(V1NamespaceCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NamespaceConditionFluent fluent; - Boolean validationEnabled; + public V1NamespaceCondition build() { V1NamespaceCondition buildable = new V1NamespaceCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1NamespaceCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionFluent.java index e341c5e550..f63f11dfa7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NamespaceConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NamespaceConditionFluent> extends BaseFluent{ + public V1NamespaceConditionFluent() { + } + public V1NamespaceConditionFluent(V1NamespaceCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1NamespaceCondition instance) { + instance = (instance != null ? instance : new V1NamespaceCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NamespaceConditionFluent that = (V1NamespaceConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionFluentImpl.java deleted file mode 100644 index c2164e68b1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NamespaceConditionFluentImpl> extends BaseFluent implements V1NamespaceConditionFluent{ - public V1NamespaceConditionFluentImpl() { - } - public V1NamespaceConditionFluentImpl(V1NamespaceCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NamespaceConditionFluentImpl that = (V1NamespaceConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceFluent.java index 94771cd50e..0e07895cc1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1NamespaceFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1NamespaceFluent.MetadataNested withNewMetadata(); - public V1NamespaceFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1NamespaceFluent.MetadataNested editMetadata(); - public V1NamespaceFluent.MetadataNested editOrNewMetadata(); - public V1NamespaceFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1NamespaceSpec getSpec(); - public V1NamespaceSpec buildSpec(); - public A withSpec(V1NamespaceSpec spec); - public Boolean hasSpec(); - public V1NamespaceFluent.SpecNested withNewSpec(); - public V1NamespaceFluent.SpecNested withNewSpecLike(V1NamespaceSpec item); - public V1NamespaceFluent.SpecNested editSpec(); - public V1NamespaceFluent.SpecNested editOrNewSpec(); - public V1NamespaceFluent.SpecNested editOrNewSpecLike(V1NamespaceSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1NamespaceStatus getStatus(); - public V1NamespaceStatus buildStatus(); - public A withStatus(V1NamespaceStatus status); - public Boolean hasStatus(); - public V1NamespaceFluent.StatusNested withNewStatus(); - public V1NamespaceFluent.StatusNested withNewStatusLike(V1NamespaceStatus item); - public V1NamespaceFluent.StatusNested editStatus(); - public V1NamespaceFluent.StatusNested editOrNewStatus(); - public V1NamespaceFluent.StatusNested editOrNewStatusLike(V1NamespaceStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NamespaceFluent> extends BaseFluent{ + public V1NamespaceFluent() { + } + + public V1NamespaceFluent(V1Namespace instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1NamespaceSpecBuilder spec; + private V1NamespaceStatusBuilder status; + + protected void copyInstance(V1Namespace instance) { + instance = (instance != null ? instance : new V1Namespace()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1NamespaceSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1NamespaceSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1NamespaceSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1NamespaceSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1NamespaceSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1NamespaceSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1NamespaceSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1NamespaceStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1NamespaceStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1NamespaceStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1NamespaceStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1NamespaceStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1NamespaceStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NamespaceFluent that = (V1NamespaceFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1NamespaceFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1NamespaceStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1NamespaceSpecFluent> implements Nested{ + SpecNested(V1NamespaceSpec item) { + this.builder = new V1NamespaceSpecBuilder(this, item); + } + V1NamespaceSpecBuilder builder; + + public N and() { + return (N) V1NamespaceFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1NamespaceStatusFluent> implements Nested{ + StatusNested(V1NamespaceStatus item) { + this.builder = new V1NamespaceStatusBuilder(this, item); + } + V1NamespaceStatusBuilder builder; + + public N and() { + return (N) V1NamespaceFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceFluentImpl.java deleted file mode 100644 index 8d1743f3c6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NamespaceFluentImpl> extends BaseFluent implements V1NamespaceFluent{ - public V1NamespaceFluentImpl() { - } - public V1NamespaceFluentImpl(V1Namespace instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1NamespaceSpecBuilder spec; - private V1NamespaceStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1NamespaceFluentImpl.MetadataNested withNewMetadata() { - return new V1NamespaceFluentImpl.MetadataNestedImpl(); - } - public V1NamespaceFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1NamespaceFluentImpl.MetadataNestedImpl(item); - } - public V1NamespaceFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1NamespaceFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1NamespaceFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1NamespaceSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1NamespaceSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1NamespaceSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1NamespaceSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1NamespaceFluentImpl.SpecNested withNewSpec() { - return new V1NamespaceFluentImpl.SpecNestedImpl(); - } - public V1NamespaceFluentImpl.SpecNested withNewSpecLike(V1NamespaceSpec item) { - return new V1NamespaceFluentImpl.SpecNestedImpl(item); - } - public V1NamespaceFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1NamespaceFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1NamespaceSpecBuilder().build()); - } - public V1NamespaceFluentImpl.SpecNested editOrNewSpecLike(V1NamespaceSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1NamespaceStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1NamespaceStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1NamespaceStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1NamespaceStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1NamespaceFluentImpl.StatusNested withNewStatus() { - return new V1NamespaceFluentImpl.StatusNestedImpl(); - } - public V1NamespaceFluentImpl.StatusNested withNewStatusLike(V1NamespaceStatus item) { - return new V1NamespaceFluentImpl.StatusNestedImpl(item); - } - public V1NamespaceFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1NamespaceFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1NamespaceStatusBuilder().build()); - } - public V1NamespaceFluentImpl.StatusNested editOrNewStatusLike(V1NamespaceStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NamespaceFluentImpl that = (V1NamespaceFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1NamespaceFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1NamespaceFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1NamespaceSpecFluentImpl> implements V1NamespaceFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1NamespaceSpec item) { - this.builder = new V1NamespaceSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1NamespaceSpecBuilder(this); - } - V1NamespaceSpecBuilder builder; - public N and() { - return (N) V1NamespaceFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1NamespaceStatusFluentImpl> implements V1NamespaceFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1NamespaceStatus item) { - this.builder = new V1NamespaceStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1NamespaceStatusBuilder(this); - } - V1NamespaceStatusBuilder builder; - public N and() { - return (N) V1NamespaceFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListBuilder.java index 0495dccb3a..9b8899945a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NamespaceListBuilder extends V1NamespaceListFluentImpl implements VisitableBuilder{ +public class V1NamespaceListBuilder extends V1NamespaceListFluent implements VisitableBuilder{ public V1NamespaceListBuilder() { - this(false); - } - public V1NamespaceListBuilder(Boolean validationEnabled) { - this(new V1NamespaceList(), validationEnabled); + this(new V1NamespaceList()); } + public V1NamespaceListBuilder(V1NamespaceListFluent fluent) { - this(fluent, false); - } - public V1NamespaceListBuilder(V1NamespaceListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NamespaceList(), validationEnabled); + this(fluent, new V1NamespaceList()); } + public V1NamespaceListBuilder(V1NamespaceListFluent fluent,V1NamespaceList instance) { - this(fluent, instance, false); - } - public V1NamespaceListBuilder(V1NamespaceListFluent fluent,V1NamespaceList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NamespaceListBuilder(V1NamespaceList instance) { - this(instance,false); - } - public V1NamespaceListBuilder(V1NamespaceList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NamespaceListFluent fluent; - Boolean validationEnabled; + public V1NamespaceList build() { V1NamespaceList buildable = new V1NamespaceList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListFluent.java index c1af15d64a..62dbf51cf7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NamespaceListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Namespace item); - public A setToItems(int index,V1Namespace item); - public A addToItems(io.kubernetes.client.openapi.models.V1Namespace... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Namespace... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Namespace buildItem(int index); - public V1Namespace buildFirstItem(); - public V1Namespace buildLastItem(); - public V1Namespace buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Namespace... items); - public Boolean hasItems(); - public V1NamespaceListFluent.ItemsNested addNewItem(); - public V1NamespaceListFluent.ItemsNested addNewItemLike(V1Namespace item); - public V1NamespaceListFluent.ItemsNested setNewItemLike(int index,V1Namespace item); - public V1NamespaceListFluent.ItemsNested editItem(int index); - public V1NamespaceListFluent.ItemsNested editFirstItem(); - public V1NamespaceListFluent.ItemsNested editLastItem(); - public V1NamespaceListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1NamespaceListFluent.MetadataNested withNewMetadata(); - public V1NamespaceListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1NamespaceListFluent.MetadataNested editMetadata(); - public V1NamespaceListFluent.MetadataNested editOrNewMetadata(); - public V1NamespaceListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1NamespaceFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NamespaceListFluent> extends BaseFluent{ + public V1NamespaceListFluent() { + } + + public V1NamespaceListFluent(V1NamespaceList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1NamespaceList instance) { + instance = (instance != null ? instance : new V1NamespaceList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Namespace item) { + if (this.items == null) {this.items = new ArrayList();} + V1NamespaceBuilder builder = new V1NamespaceBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Namespace item) { + if (this.items == null) {this.items = new ArrayList();} + V1NamespaceBuilder builder = new V1NamespaceBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Namespace... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Namespace item : items) {V1NamespaceBuilder builder = new V1NamespaceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Namespace item : items) {V1NamespaceBuilder builder = new V1NamespaceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Namespace... items) { + if (this.items == null) return (A)this; + for (V1Namespace item : items) {V1NamespaceBuilder builder = new V1NamespaceBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Namespace item : items) {V1NamespaceBuilder builder = new V1NamespaceBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1NamespaceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Namespace buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Namespace buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Namespace buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Namespace buildMatchingItem(Predicate predicate) { + for (V1NamespaceBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1NamespaceBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Namespace item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Namespace... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Namespace item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Namespace item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Namespace item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NamespaceListFluent that = (V1NamespaceListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1NamespaceFluent> implements Nested{ + ItemsNested(int index,V1Namespace item) { + this.index = index; + this.builder = new V1NamespaceBuilder(this, item); + } + V1NamespaceBuilder builder; + int index; + public N and() { + return (N) V1NamespaceListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1NamespaceListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListFluentImpl.java deleted file mode 100644 index f2ee9a214b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NamespaceListFluentImpl> extends BaseFluent implements V1NamespaceListFluent{ - public V1NamespaceListFluentImpl() { - } - public V1NamespaceListFluentImpl(V1NamespaceList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Namespace item) { - if (this.items == null) {this.items = new ArrayList();} - V1NamespaceBuilder builder = new V1NamespaceBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Namespace item) { - if (this.items == null) {this.items = new ArrayList();} - V1NamespaceBuilder builder = new V1NamespaceBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Namespace... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Namespace item : items) {V1NamespaceBuilder builder = new V1NamespaceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Namespace item : items) {V1NamespaceBuilder builder = new V1NamespaceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Namespace... items) { - for (V1Namespace item : items) {V1NamespaceBuilder builder = new V1NamespaceBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Namespace item : items) {V1NamespaceBuilder builder = new V1NamespaceBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1NamespaceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Namespace buildItem(int index) { - return this.items.get(index).build(); - } - public V1Namespace buildFirstItem() { - return this.items.get(0).build(); - } - public V1Namespace buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Namespace buildMatchingItem(Predicate predicate) { - for (V1NamespaceBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1NamespaceBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Namespace item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Namespace... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Namespace item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1NamespaceListFluentImpl.ItemsNested addNewItem() { - return new V1NamespaceListFluentImpl.ItemsNestedImpl(); - } - public V1NamespaceListFluentImpl.ItemsNested addNewItemLike(V1Namespace item) { - return new V1NamespaceListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1NamespaceListFluentImpl.ItemsNested setNewItemLike(int index,V1Namespace item) { - return new V1NamespaceListFluentImpl.ItemsNestedImpl(index, item); - } - public V1NamespaceListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1NamespaceListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1NamespaceListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1NamespaceListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1NamespaceListFluentImpl.MetadataNestedImpl(); - } - public V1NamespaceListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1NamespaceListFluentImpl.MetadataNestedImpl(item); - } - public V1NamespaceListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1NamespaceListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1NamespaceListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NamespaceListFluentImpl that = (V1NamespaceListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1NamespaceFluentImpl> implements V1NamespaceListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Namespace item) { - this.index = index; - this.builder = new V1NamespaceBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1NamespaceBuilder(this); - } - V1NamespaceBuilder builder; - int index; - public N and() { - return (N) V1NamespaceListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1NamespaceListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1NamespaceListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecBuilder.java index 47e2e172d6..cd7d90b327 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NamespaceSpecBuilder extends V1NamespaceSpecFluentImpl implements VisitableBuilder{ +public class V1NamespaceSpecBuilder extends V1NamespaceSpecFluent implements VisitableBuilder{ public V1NamespaceSpecBuilder() { - this(false); - } - public V1NamespaceSpecBuilder(Boolean validationEnabled) { - this(new V1NamespaceSpec(), validationEnabled); + this(new V1NamespaceSpec()); } + public V1NamespaceSpecBuilder(V1NamespaceSpecFluent fluent) { - this(fluent, false); - } - public V1NamespaceSpecBuilder(V1NamespaceSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NamespaceSpec(), validationEnabled); + this(fluent, new V1NamespaceSpec()); } + public V1NamespaceSpecBuilder(V1NamespaceSpecFluent fluent,V1NamespaceSpec instance) { - this(fluent, instance, false); - } - public V1NamespaceSpecBuilder(V1NamespaceSpecFluent fluent,V1NamespaceSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFinalizers(instance.getFinalizers()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NamespaceSpecBuilder(V1NamespaceSpec instance) { - this(instance,false); - } - public V1NamespaceSpecBuilder(V1NamespaceSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFinalizers(instance.getFinalizers()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NamespaceSpecFluent fluent; - Boolean validationEnabled; + public V1NamespaceSpec build() { V1NamespaceSpec buildable = new V1NamespaceSpec(); buildable.setFinalizers(fluent.getFinalizers()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecFluent.java index a3c6446122..28a44d6c74 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecFluent.java @@ -1,32 +1,148 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1NamespaceSpecFluent> extends Fluent{ - public A addToFinalizers(int index,String item); - public A setToFinalizers(int index,String item); - public A addToFinalizers(java.lang.String... items); - public A addAllToFinalizers(Collection items); - public A removeFromFinalizers(java.lang.String... items); - public A removeAllFromFinalizers(Collection items); - public List getFinalizers(); - public String getFinalizer(int index); - public String getFirstFinalizer(); - public String getLastFinalizer(); - public String getMatchingFinalizer(Predicate predicate); - public Boolean hasMatchingFinalizer(Predicate predicate); - public A withFinalizers(List finalizers); - public A withFinalizers(java.lang.String... finalizers); - public Boolean hasFinalizers(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NamespaceSpecFluent> extends BaseFluent{ + public V1NamespaceSpecFluent() { + } + public V1NamespaceSpecFluent(V1NamespaceSpec instance) { + this.copyInstance(instance); + } + private List finalizers; + + protected void copyInstance(V1NamespaceSpec instance) { + instance = (instance != null ? instance : new V1NamespaceSpec()); + if (instance != null) { + this.withFinalizers(instance.getFinalizers()); + } + } + + public A addToFinalizers(int index,String item) { + if (this.finalizers == null) {this.finalizers = new ArrayList();} + this.finalizers.add(index, item); + return (A)this; + } + + public A setToFinalizers(int index,String item) { + if (this.finalizers == null) {this.finalizers = new ArrayList();} + this.finalizers.set(index, item); return (A)this; + } + + public A addToFinalizers(java.lang.String... items) { + if (this.finalizers == null) {this.finalizers = new ArrayList();} + for (String item : items) {this.finalizers.add(item);} return (A)this; + } + + public A addAllToFinalizers(Collection items) { + if (this.finalizers == null) {this.finalizers = new ArrayList();} + for (String item : items) {this.finalizers.add(item);} return (A)this; + } + + public A removeFromFinalizers(java.lang.String... items) { + if (this.finalizers == null) return (A)this; + for (String item : items) { this.finalizers.remove(item);} return (A)this; + } + + public A removeAllFromFinalizers(Collection items) { + if (this.finalizers == null) return (A)this; + for (String item : items) { this.finalizers.remove(item);} return (A)this; + } + + public List getFinalizers() { + return this.finalizers; + } + + public String getFinalizer(int index) { + return this.finalizers.get(index); + } + + public String getFirstFinalizer() { + return this.finalizers.get(0); + } + + public String getLastFinalizer() { + return this.finalizers.get(finalizers.size() - 1); + } + + public String getMatchingFinalizer(Predicate predicate) { + for (String item : finalizers) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingFinalizer(Predicate predicate) { + for (String item : finalizers) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withFinalizers(List finalizers) { + if (finalizers != null) { + this.finalizers = new ArrayList(); + for (String item : finalizers) { + this.addToFinalizers(item); + } + } else { + this.finalizers = null; + } + return (A) this; + } + + public A withFinalizers(java.lang.String... finalizers) { + if (this.finalizers != null) { + this.finalizers.clear(); + _visitables.remove("finalizers"); + } + if (finalizers != null) { + for (String item : finalizers) { + this.addToFinalizers(item); + } + } + return (A) this; + } + + public boolean hasFinalizers() { + return this.finalizers != null && !this.finalizers.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NamespaceSpecFluent that = (V1NamespaceSpecFluent) o; + if (!java.util.Objects.equals(finalizers, that.finalizers)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(finalizers, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (finalizers != null && !finalizers.isEmpty()) { sb.append("finalizers:"); sb.append(finalizers); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecFluentImpl.java deleted file mode 100644 index b20d8a4641..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceSpecFluentImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NamespaceSpecFluentImpl> extends BaseFluent implements V1NamespaceSpecFluent{ - public V1NamespaceSpecFluentImpl() { - } - public V1NamespaceSpecFluentImpl(V1NamespaceSpec instance) { - if (instance != null) { - this.withFinalizers(instance.getFinalizers()); - } - } - private List finalizers; - public A addToFinalizers(int index,String item) { - if (this.finalizers == null) {this.finalizers = new ArrayList();} - this.finalizers.add(index, item); - return (A)this; - } - public A setToFinalizers(int index,String item) { - if (this.finalizers == null) {this.finalizers = new ArrayList();} - this.finalizers.set(index, item); return (A)this; - } - public A addToFinalizers(java.lang.String... items) { - if (this.finalizers == null) {this.finalizers = new ArrayList();} - for (String item : items) {this.finalizers.add(item);} return (A)this; - } - public A addAllToFinalizers(Collection items) { - if (this.finalizers == null) {this.finalizers = new ArrayList();} - for (String item : items) {this.finalizers.add(item);} return (A)this; - } - public A removeFromFinalizers(java.lang.String... items) { - for (String item : items) {if (this.finalizers!= null){ this.finalizers.remove(item);}} return (A)this; - } - public A removeAllFromFinalizers(Collection items) { - for (String item : items) {if (this.finalizers!= null){ this.finalizers.remove(item);}} return (A)this; - } - public List getFinalizers() { - return this.finalizers; - } - public String getFinalizer(int index) { - return this.finalizers.get(index); - } - public String getFirstFinalizer() { - return this.finalizers.get(0); - } - public String getLastFinalizer() { - return this.finalizers.get(finalizers.size() - 1); - } - public String getMatchingFinalizer(Predicate predicate) { - for (String item: finalizers) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingFinalizer(Predicate predicate) { - for (String item: finalizers) { if(predicate.test(item)){ return true;} } return false; - } - public A withFinalizers(List finalizers) { - if (finalizers != null) {this.finalizers = new ArrayList(); for (String item : finalizers){this.addToFinalizers(item);}} else { this.finalizers = null;} return (A) this; - } - public A withFinalizers(java.lang.String... finalizers) { - if (this.finalizers != null) {this.finalizers.clear(); _visitables.remove("finalizers"); } - if (finalizers != null) {for (String item :finalizers){ this.addToFinalizers(item);}} return (A) this; - } - public Boolean hasFinalizers() { - return finalizers != null && !finalizers.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NamespaceSpecFluentImpl that = (V1NamespaceSpecFluentImpl) o; - if (!java.util.Objects.equals(finalizers, that.finalizers)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(finalizers, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (finalizers != null && !finalizers.isEmpty()) { sb.append("finalizers:"); sb.append(finalizers); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusBuilder.java index 9f0e1514e7..88bc412236 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NamespaceStatusBuilder extends V1NamespaceStatusFluentImpl implements VisitableBuilder{ +public class V1NamespaceStatusBuilder extends V1NamespaceStatusFluent implements VisitableBuilder{ public V1NamespaceStatusBuilder() { - this(false); - } - public V1NamespaceStatusBuilder(Boolean validationEnabled) { - this(new V1NamespaceStatus(), validationEnabled); + this(new V1NamespaceStatus()); } + public V1NamespaceStatusBuilder(V1NamespaceStatusFluent fluent) { - this(fluent, false); - } - public V1NamespaceStatusBuilder(V1NamespaceStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NamespaceStatus(), validationEnabled); + this(fluent, new V1NamespaceStatus()); } + public V1NamespaceStatusBuilder(V1NamespaceStatusFluent fluent,V1NamespaceStatus instance) { - this(fluent, instance, false); - } - public V1NamespaceStatusBuilder(V1NamespaceStatusFluent fluent,V1NamespaceStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - fluent.withPhase(instance.getPhase()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NamespaceStatusBuilder(V1NamespaceStatus instance) { - this(instance,false); - } - public V1NamespaceStatusBuilder(V1NamespaceStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withPhase(instance.getPhase()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NamespaceStatusFluent fluent; - Boolean validationEnabled; + public V1NamespaceStatus build() { V1NamespaceStatus buildable = new V1NamespaceStatus(); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setPhase(fluent.getPhase()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusFluent.java index cad317d138..4b5f226506 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusFluent.java @@ -1,59 +1,242 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NamespaceStatusFluent> extends Fluent{ - public A addToConditions(int index,V1NamespaceCondition item); - public A setToConditions(int index,V1NamespaceCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1NamespaceCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1NamespaceCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1NamespaceCondition buildCondition(int index); - public V1NamespaceCondition buildFirstCondition(); - public V1NamespaceCondition buildLastCondition(); - public V1NamespaceCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1NamespaceCondition... conditions); - public Boolean hasConditions(); - public V1NamespaceStatusFluent.ConditionsNested addNewCondition(); - public V1NamespaceStatusFluent.ConditionsNested addNewConditionLike(V1NamespaceCondition item); - public V1NamespaceStatusFluent.ConditionsNested setNewConditionLike(int index,V1NamespaceCondition item); - public V1NamespaceStatusFluent.ConditionsNested editCondition(int index); - public V1NamespaceStatusFluent.ConditionsNested editFirstCondition(); - public V1NamespaceStatusFluent.ConditionsNested editLastCondition(); - public V1NamespaceStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public String getPhase(); - public A withPhase(String phase); - public Boolean hasPhase(); - public interface ConditionsNested extends Nested,V1NamespaceConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NamespaceStatusFluent> extends BaseFluent{ + public V1NamespaceStatusFluent() { + } + + public V1NamespaceStatusFluent(V1NamespaceStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + private String phase; + + protected void copyInstance(V1NamespaceStatus instance) { + instance = (instance != null ? instance : new V1NamespaceStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + this.withPhase(instance.getPhase()); + } + } + + public A addToConditions(int index,V1NamespaceCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1NamespaceCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1NamespaceCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1NamespaceCondition item : items) {V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1NamespaceCondition item : items) {V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1NamespaceCondition... items) { + if (this.conditions == null) return (A)this; + for (V1NamespaceCondition item : items) {V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1NamespaceCondition item : items) {V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1NamespaceConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1NamespaceCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1NamespaceCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1NamespaceCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1NamespaceCondition buildMatchingCondition(Predicate predicate) { + for (V1NamespaceConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1NamespaceConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1NamespaceCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1NamespaceCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1NamespaceCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1NamespaceCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1NamespaceCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1NamespaceConditionFluent> implements Nested{ + ConditionsNested(int index,V1NamespaceCondition item) { + this.index = index; + this.builder = new V1NamespaceConditionBuilder(this, item); + } + V1NamespaceConditionBuilder builder; + int index; + + public N and() { + return (N) V1NamespaceStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusFluentImpl.java deleted file mode 100644 index 7abc9ed13a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NamespaceStatusFluentImpl.java +++ /dev/null @@ -1,190 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NamespaceStatusFluentImpl> extends BaseFluent implements V1NamespaceStatusFluent{ - public V1NamespaceStatusFluentImpl() { - } - public V1NamespaceStatusFluentImpl(V1NamespaceStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withPhase(instance.getPhase()); - } - } - private ArrayList conditions; - private String phase; - public A addToConditions(int index,V1NamespaceCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1NamespaceCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1NamespaceCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1NamespaceCondition item : items) {V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1NamespaceCondition item : items) {V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1NamespaceCondition... items) { - for (V1NamespaceCondition item : items) {V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1NamespaceCondition item : items) {V1NamespaceConditionBuilder builder = new V1NamespaceConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1NamespaceConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1NamespaceCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1NamespaceCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1NamespaceCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1NamespaceCondition buildMatchingCondition(Predicate predicate) { - for (V1NamespaceConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1NamespaceConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1NamespaceCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1NamespaceCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1NamespaceCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1NamespaceStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1NamespaceStatusFluentImpl.ConditionsNestedImpl(); - } - public V1NamespaceStatusFluentImpl.ConditionsNested addNewConditionLike(V1NamespaceCondition item) { - return new V1NamespaceStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1NamespaceStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1NamespaceCondition item) { - return new V1NamespaceStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1NamespaceStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1NamespaceStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1NamespaceStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1NamespaceStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1NamespaceConditionFluentImpl> implements V1NamespaceStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1NamespaceCondition item) { - this.index = index; - this.builder = new V1NamespaceConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1NamespaceConditionBuilder(this); - } - V1NamespaceConditionBuilder builder; - int index; - public N and() { - return (N) V1NamespaceStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyBuilder.java index d3f5a6cd5f..773809aa29 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyBuilder.java @@ -1,58 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NetworkPolicyBuilder extends V1NetworkPolicyFluentImpl implements VisitableBuilder{ +public class V1NetworkPolicyBuilder extends V1NetworkPolicyFluent implements VisitableBuilder{ public V1NetworkPolicyBuilder() { - this(false); - } - public V1NetworkPolicyBuilder(Boolean validationEnabled) { - this(new V1NetworkPolicy(), validationEnabled); + this(new V1NetworkPolicy()); } + public V1NetworkPolicyBuilder(V1NetworkPolicyFluent fluent) { - this(fluent, false); - } - public V1NetworkPolicyBuilder(V1NetworkPolicyFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NetworkPolicy(), validationEnabled); + this(fluent, new V1NetworkPolicy()); } + public V1NetworkPolicyBuilder(V1NetworkPolicyFluent fluent,V1NetworkPolicy instance) { - this(fluent, instance, false); - } - public V1NetworkPolicyBuilder(V1NetworkPolicyFluent fluent,V1NetworkPolicy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NetworkPolicyBuilder(V1NetworkPolicy instance) { - this(instance,false); - } - public V1NetworkPolicyBuilder(V1NetworkPolicy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NetworkPolicyFluent fluent; - Boolean validationEnabled; + public V1NetworkPolicy build() { V1NetworkPolicy buildable = new V1NetworkPolicy(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleBuilder.java index d1a43d1054..8a095c6d16 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NetworkPolicyEgressRuleBuilder extends V1NetworkPolicyEgressRuleFluentImpl implements VisitableBuilder{ +public class V1NetworkPolicyEgressRuleBuilder extends V1NetworkPolicyEgressRuleFluent implements VisitableBuilder{ public V1NetworkPolicyEgressRuleBuilder() { - this(false); - } - public V1NetworkPolicyEgressRuleBuilder(Boolean validationEnabled) { - this(new V1NetworkPolicyEgressRule(), validationEnabled); + this(new V1NetworkPolicyEgressRule()); } + public V1NetworkPolicyEgressRuleBuilder(V1NetworkPolicyEgressRuleFluent fluent) { - this(fluent, false); - } - public V1NetworkPolicyEgressRuleBuilder(V1NetworkPolicyEgressRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NetworkPolicyEgressRule(), validationEnabled); + this(fluent, new V1NetworkPolicyEgressRule()); } + public V1NetworkPolicyEgressRuleBuilder(V1NetworkPolicyEgressRuleFluent fluent,V1NetworkPolicyEgressRule instance) { - this(fluent, instance, false); - } - public V1NetworkPolicyEgressRuleBuilder(V1NetworkPolicyEgressRuleFluent fluent,V1NetworkPolicyEgressRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPorts(instance.getPorts()); - fluent.withTo(instance.getTo()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NetworkPolicyEgressRuleBuilder(V1NetworkPolicyEgressRule instance) { - this(instance,false); - } - public V1NetworkPolicyEgressRuleBuilder(V1NetworkPolicyEgressRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPorts(instance.getPorts()); - this.withTo(instance.getTo()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NetworkPolicyEgressRuleFluent fluent; - Boolean validationEnabled; + public V1NetworkPolicyEgressRule build() { V1NetworkPolicyEgressRule buildable = new V1NetworkPolicyEgressRule(); - buildable.setPorts(fluent.getPorts()); - buildable.setTo(fluent.getTo()); + buildable.setPorts(fluent.buildPorts()); + buildable.setTo(fluent.buildTo()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleFluent.java index 7173af9952..1ff9ebdce2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleFluent.java @@ -1,90 +1,398 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NetworkPolicyEgressRuleFluent> extends Fluent{ - public A addToPorts(int index,V1NetworkPolicyPort item); - public A setToPorts(int index,V1NetworkPolicyPort item); - public A addToPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items); - public A addAllToPorts(Collection items); - public A removeFromPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items); - public A removeAllFromPorts(Collection items); - public A removeMatchingFromPorts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts(); - public List buildPorts(); - public V1NetworkPolicyPort buildPort(int index); - public V1NetworkPolicyPort buildFirstPort(); - public V1NetworkPolicyPort buildLastPort(); - public V1NetworkPolicyPort buildMatchingPort(Predicate predicate); - public Boolean hasMatchingPort(Predicate predicate); - public A withPorts(List ports); - public A withPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... ports); - public Boolean hasPorts(); - public V1NetworkPolicyEgressRuleFluent.PortsNested addNewPort(); - public V1NetworkPolicyEgressRuleFluent.PortsNested addNewPortLike(V1NetworkPolicyPort item); - public V1NetworkPolicyEgressRuleFluent.PortsNested setNewPortLike(int index,V1NetworkPolicyPort item); - public V1NetworkPolicyEgressRuleFluent.PortsNested editPort(int index); - public V1NetworkPolicyEgressRuleFluent.PortsNested editFirstPort(); - public V1NetworkPolicyEgressRuleFluent.PortsNested editLastPort(); - public V1NetworkPolicyEgressRuleFluent.PortsNested editMatchingPort(Predicate predicate); - public A addToTo(int index,V1NetworkPolicyPeer item); - public A setToTo(int index,V1NetworkPolicyPeer item); - public A addToTo(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items); - public A addAllToTo(Collection items); - public A removeFromTo(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items); - public A removeAllFromTo(Collection items); - public A removeMatchingFromTo(Predicate predicate); - - /** - * This method has been deprecated, please use method buildTo instead. - * @return The buildable object. - */ - @Deprecated - public List getTo(); - public List buildTo(); - public V1NetworkPolicyPeer buildTo(int index); - public V1NetworkPolicyPeer buildFirstTo(); - public V1NetworkPolicyPeer buildLastTo(); - public V1NetworkPolicyPeer buildMatchingTo(Predicate predicate); - public Boolean hasMatchingTo(Predicate predicate); - public A withTo(List to); - public A withTo(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... to); - public Boolean hasTo(); - public V1NetworkPolicyEgressRuleFluent.ToNested addNewTo(); - public V1NetworkPolicyEgressRuleFluent.ToNested addNewToLike(V1NetworkPolicyPeer item); - public V1NetworkPolicyEgressRuleFluent.ToNested setNewToLike(int index,V1NetworkPolicyPeer item); - public V1NetworkPolicyEgressRuleFluent.ToNested editTo(int index); - public V1NetworkPolicyEgressRuleFluent.ToNested editFirstTo(); - public V1NetworkPolicyEgressRuleFluent.ToNested editLastTo(); - public V1NetworkPolicyEgressRuleFluent.ToNested editMatchingTo(Predicate predicate); - public interface PortsNested extends Nested,V1NetworkPolicyPortFluent>{ - public N and(); - public N endPort(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NetworkPolicyEgressRuleFluent> extends BaseFluent{ + public V1NetworkPolicyEgressRuleFluent() { + } + + public V1NetworkPolicyEgressRuleFluent(V1NetworkPolicyEgressRule instance) { + this.copyInstance(instance); + } + private ArrayList ports; + private ArrayList to; + + protected void copyInstance(V1NetworkPolicyEgressRule instance) { + instance = (instance != null ? instance : new V1NetworkPolicyEgressRule()); + if (instance != null) { + this.withPorts(instance.getPorts()); + this.withTo(instance.getTo()); + } + } + + public A addToPorts(int index,V1NetworkPolicyPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} + return (A)this; + } + + public A setToPorts(int index,V1NetworkPolicyPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} + return (A)this; + } + + public A addToPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A addAllToPorts(Collection items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A removeFromPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items) { + if (this.ports == null) return (A)this; + for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeAllFromPorts(Collection items) { + if (this.ports == null) return (A)this; + for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeMatchingFromPorts(Predicate predicate) { + if (ports == null) return (A) this; + final Iterator each = ports.iterator(); + final List visitables = _visitables.get("ports"); + while (each.hasNext()) { + V1NetworkPolicyPortBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPorts() { + return this.ports != null ? build(ports) : null; + } + + public V1NetworkPolicyPort buildPort(int index) { + return this.ports.get(index).build(); + } + + public V1NetworkPolicyPort buildFirstPort() { + return this.ports.get(0).build(); + } + + public V1NetworkPolicyPort buildLastPort() { + return this.ports.get(ports.size() - 1).build(); + } + + public V1NetworkPolicyPort buildMatchingPort(Predicate predicate) { + for (V1NetworkPolicyPortBuilder item : ports) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPort(Predicate predicate) { + for (V1NetworkPolicyPortBuilder item : ports) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPorts(List ports) { + if (this.ports != null) { + this._visitables.get("ports").clear(); + } + if (ports != null) { + this.ports = new ArrayList(); + for (V1NetworkPolicyPort item : ports) { + this.addToPorts(item); + } + } else { + this.ports = null; + } + return (A) this; + } + + public A withPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... ports) { + if (this.ports != null) { + this.ports.clear(); + _visitables.remove("ports"); + } + if (ports != null) { + for (V1NetworkPolicyPort item : ports) { + this.addToPorts(item); + } + } + return (A) this; + } + + public boolean hasPorts() { + return this.ports != null && !this.ports.isEmpty(); + } + + public PortsNested addNewPort() { + return new PortsNested(-1, null); + } + + public PortsNested addNewPortLike(V1NetworkPolicyPort item) { + return new PortsNested(-1, item); + } + + public PortsNested setNewPortLike(int index,V1NetworkPolicyPort item) { + return new PortsNested(index, item); + } + + public PortsNested editPort(int index) { + if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editFirstPort() { + if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); + return setNewPortLike(0, buildPort(0)); + } + + public PortsNested editLastPort() { + int index = ports.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); + return setNewPortLike(index, buildPort(index)); } - public interface ToNested extends Nested,V1NetworkPolicyPeerFluent>{ - public N and(); - public N endTo(); + + public PortsNested editMatchingPort(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item); + if (index < 0 || index >= to.size()) { _visitables.get("to").add(builder); to.add(builder); } else { _visitables.get("to").add(index, builder); to.add(index, builder);} + return (A)this; + } + + public A setToTo(int index,V1NetworkPolicyPeer item) { + if (this.to == null) {this.to = new ArrayList();} + V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item); + if (index < 0 || index >= to.size()) { _visitables.get("to").add(builder); to.add(builder); } else { _visitables.get("to").set(index, builder); to.set(index, builder);} + return (A)this; + } + + public A addToTo(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items) { + if (this.to == null) {this.to = new ArrayList();} + for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("to").add(builder);this.to.add(builder);} return (A)this; + } + + public A addAllToTo(Collection items) { + if (this.to == null) {this.to = new ArrayList();} + for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("to").add(builder);this.to.add(builder);} return (A)this; + } + + public A removeFromTo(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items) { + if (this.to == null) return (A)this; + for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("to").remove(builder); this.to.remove(builder);} return (A)this; + } + + public A removeAllFromTo(Collection items) { + if (this.to == null) return (A)this; + for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("to").remove(builder); this.to.remove(builder);} return (A)this; + } + + public A removeMatchingFromTo(Predicate predicate) { + if (to == null) return (A) this; + final Iterator each = to.iterator(); + final List visitables = _visitables.get("to"); + while (each.hasNext()) { + V1NetworkPolicyPeerBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildTo() { + return this.to != null ? build(to) : null; + } + + public V1NetworkPolicyPeer buildTo(int index) { + return this.to.get(index).build(); + } + + public V1NetworkPolicyPeer buildFirstTo() { + return this.to.get(0).build(); + } + + public V1NetworkPolicyPeer buildLastTo() { + return this.to.get(to.size() - 1).build(); + } + + public V1NetworkPolicyPeer buildMatchingTo(Predicate predicate) { + for (V1NetworkPolicyPeerBuilder item : to) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingTo(Predicate predicate) { + for (V1NetworkPolicyPeerBuilder item : to) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withTo(List to) { + if (this.to != null) { + this._visitables.get("to").clear(); + } + if (to != null) { + this.to = new ArrayList(); + for (V1NetworkPolicyPeer item : to) { + this.addToTo(item); + } + } else { + this.to = null; + } + return (A) this; + } + + public A withTo(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... to) { + if (this.to != null) { + this.to.clear(); + _visitables.remove("to"); + } + if (to != null) { + for (V1NetworkPolicyPeer item : to) { + this.addToTo(item); + } + } + return (A) this; + } + + public boolean hasTo() { + return this.to != null && !this.to.isEmpty(); + } + + public ToNested addNewTo() { + return new ToNested(-1, null); + } + + public ToNested addNewToLike(V1NetworkPolicyPeer item) { + return new ToNested(-1, item); + } + + public ToNested setNewToLike(int index,V1NetworkPolicyPeer item) { + return new ToNested(index, item); + } + + public ToNested editTo(int index) { + if (to.size() <= index) throw new RuntimeException("Can't edit to. Index exceeds size."); + return setNewToLike(index, buildTo(index)); + } + + public ToNested editFirstTo() { + if (to.size() == 0) throw new RuntimeException("Can't edit first to. The list is empty."); + return setNewToLike(0, buildTo(0)); + } + + public ToNested editLastTo() { + int index = to.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last to. The list is empty."); + return setNewToLike(index, buildTo(index)); + } + + public ToNested editMatchingTo(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1NetworkPolicyPortFluent> implements Nested{ + PortsNested(int index,V1NetworkPolicyPort item) { + this.index = index; + this.builder = new V1NetworkPolicyPortBuilder(this, item); + } + V1NetworkPolicyPortBuilder builder; + int index; + + public N and() { + return (N) V1NetworkPolicyEgressRuleFluent.this.setToPorts(index,builder.build()); + } + + public N endPort() { + return and(); + } + } + public class ToNested extends V1NetworkPolicyPeerFluent> implements Nested{ + ToNested(int index,V1NetworkPolicyPeer item) { + this.index = index; + this.builder = new V1NetworkPolicyPeerBuilder(this, item); + } + V1NetworkPolicyPeerBuilder builder; + int index; + + public N and() { + return (N) V1NetworkPolicyEgressRuleFluent.this.setToTo(index,builder.build()); + } + + public N endTo() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleFluentImpl.java deleted file mode 100644 index a307a3f2d1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyEgressRuleFluentImpl.java +++ /dev/null @@ -1,307 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NetworkPolicyEgressRuleFluentImpl> extends BaseFluent implements V1NetworkPolicyEgressRuleFluent{ - public V1NetworkPolicyEgressRuleFluentImpl() { - } - public V1NetworkPolicyEgressRuleFluentImpl(V1NetworkPolicyEgressRule instance) { - if (instance != null) { - this.withPorts(instance.getPorts()); - this.withTo(instance.getTo()); - } - } - private ArrayList ports; - private ArrayList to; - public A addToPorts(int index,V1NetworkPolicyPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} - return (A)this; - } - public A setToPorts(int index,V1NetworkPolicyPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} - return (A)this; - } - public A addToPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A addAllToPorts(Collection items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A removeFromPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items) { - for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeAllFromPorts(Collection items) { - for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeMatchingFromPorts(Predicate predicate) { - if (ports == null) return (A) this; - final Iterator each = ports.iterator(); - final List visitables = _visitables.get("ports"); - while (each.hasNext()) { - V1NetworkPolicyPortBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts() { - return ports != null ? build(ports) : null; - } - public List buildPorts() { - return ports != null ? build(ports) : null; - } - public V1NetworkPolicyPort buildPort(int index) { - return this.ports.get(index).build(); - } - public V1NetworkPolicyPort buildFirstPort() { - return this.ports.get(0).build(); - } - public V1NetworkPolicyPort buildLastPort() { - return this.ports.get(ports.size() - 1).build(); - } - public V1NetworkPolicyPort buildMatchingPort(Predicate predicate) { - for (V1NetworkPolicyPortBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPort(Predicate predicate) { - for (V1NetworkPolicyPortBuilder item: ports) { if(predicate.test(item)){ return true;} } return false; - } - public A withPorts(List ports) { - if (this.ports != null) { _visitables.get("ports").clear();} - if (ports != null) {this.ports = new ArrayList(); for (V1NetworkPolicyPort item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this; - } - public A withPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... ports) { - if (this.ports != null) {this.ports.clear(); _visitables.remove("ports"); } - if (ports != null) {for (V1NetworkPolicyPort item :ports){ this.addToPorts(item);}} return (A) this; - } - public Boolean hasPorts() { - return ports != null && !ports.isEmpty(); - } - public V1NetworkPolicyEgressRuleFluentImpl.PortsNested addNewPort() { - return new V1NetworkPolicyEgressRuleFluentImpl.PortsNestedImpl(); - } - public V1NetworkPolicyEgressRuleFluentImpl.PortsNested addNewPortLike(V1NetworkPolicyPort item) { - return new V1NetworkPolicyEgressRuleFluentImpl.PortsNestedImpl(-1, item); - } - public V1NetworkPolicyEgressRuleFluentImpl.PortsNested setNewPortLike(int index,V1NetworkPolicyPort item) { - return new V1NetworkPolicyEgressRuleFluentImpl.PortsNestedImpl(index, item); - } - public V1NetworkPolicyEgressRuleFluentImpl.PortsNested editPort(int index) { - if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); - return setNewPortLike(index, buildPort(index)); - } - public V1NetworkPolicyEgressRuleFluentImpl.PortsNested editFirstPort() { - if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); - return setNewPortLike(0, buildPort(0)); - } - public V1NetworkPolicyEgressRuleFluentImpl.PortsNested editLastPort() { - int index = ports.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); - return setNewPortLike(index, buildPort(index)); - } - public V1NetworkPolicyEgressRuleFluentImpl.PortsNested editMatchingPort(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item); - if (index < 0 || index >= to.size()) { _visitables.get("to").add(builder); to.add(builder); } else { _visitables.get("to").add(index, builder); to.add(index, builder);} - return (A)this; - } - public A setToTo(int index,V1NetworkPolicyPeer item) { - if (this.to == null) {this.to = new ArrayList();} - V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item); - if (index < 0 || index >= to.size()) { _visitables.get("to").add(builder); to.add(builder); } else { _visitables.get("to").set(index, builder); to.set(index, builder);} - return (A)this; - } - public A addToTo(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items) { - if (this.to == null) {this.to = new ArrayList();} - for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("to").add(builder);this.to.add(builder);} return (A)this; - } - public A addAllToTo(Collection items) { - if (this.to == null) {this.to = new ArrayList();} - for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("to").add(builder);this.to.add(builder);} return (A)this; - } - public A removeFromTo(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items) { - for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("to").remove(builder);if (this.to != null) {this.to.remove(builder);}} return (A)this; - } - public A removeAllFromTo(Collection items) { - for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("to").remove(builder);if (this.to != null) {this.to.remove(builder);}} return (A)this; - } - public A removeMatchingFromTo(Predicate predicate) { - if (to == null) return (A) this; - final Iterator each = to.iterator(); - final List visitables = _visitables.get("to"); - while (each.hasNext()) { - V1NetworkPolicyPeerBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildTo instead. - * @return The buildable object. - */ - @Deprecated - public List getTo() { - return to != null ? build(to) : null; - } - public List buildTo() { - return to != null ? build(to) : null; - } - public V1NetworkPolicyPeer buildTo(int index) { - return this.to.get(index).build(); - } - public V1NetworkPolicyPeer buildFirstTo() { - return this.to.get(0).build(); - } - public V1NetworkPolicyPeer buildLastTo() { - return this.to.get(to.size() - 1).build(); - } - public V1NetworkPolicyPeer buildMatchingTo(Predicate predicate) { - for (V1NetworkPolicyPeerBuilder item: to) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingTo(Predicate predicate) { - for (V1NetworkPolicyPeerBuilder item: to) { if(predicate.test(item)){ return true;} } return false; - } - public A withTo(List to) { - if (this.to != null) { _visitables.get("to").clear();} - if (to != null) {this.to = new ArrayList(); for (V1NetworkPolicyPeer item : to){this.addToTo(item);}} else { this.to = null;} return (A) this; - } - public A withTo(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... to) { - if (this.to != null) {this.to.clear(); _visitables.remove("to"); } - if (to != null) {for (V1NetworkPolicyPeer item :to){ this.addToTo(item);}} return (A) this; - } - public Boolean hasTo() { - return to != null && !to.isEmpty(); - } - public V1NetworkPolicyEgressRuleFluentImpl.ToNested addNewTo() { - return new V1NetworkPolicyEgressRuleFluentImpl.ToNestedImpl(); - } - public V1NetworkPolicyEgressRuleFluentImpl.ToNested addNewToLike(V1NetworkPolicyPeer item) { - return new V1NetworkPolicyEgressRuleFluentImpl.ToNestedImpl(-1, item); - } - public V1NetworkPolicyEgressRuleFluentImpl.ToNested setNewToLike(int index,V1NetworkPolicyPeer item) { - return new V1NetworkPolicyEgressRuleFluentImpl.ToNestedImpl(index, item); - } - public V1NetworkPolicyEgressRuleFluentImpl.ToNested editTo(int index) { - if (to.size() <= index) throw new RuntimeException("Can't edit to. Index exceeds size."); - return setNewToLike(index, buildTo(index)); - } - public V1NetworkPolicyEgressRuleFluentImpl.ToNested editFirstTo() { - if (to.size() == 0) throw new RuntimeException("Can't edit first to. The list is empty."); - return setNewToLike(0, buildTo(0)); - } - public V1NetworkPolicyEgressRuleFluentImpl.ToNested editLastTo() { - int index = to.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last to. The list is empty."); - return setNewToLike(index, buildTo(index)); - } - public V1NetworkPolicyEgressRuleFluentImpl.ToNested editMatchingTo(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1NetworkPolicyPortFluentImpl> implements V1NetworkPolicyEgressRuleFluentImpl.PortsNested,Nested{ - PortsNestedImpl(int index,V1NetworkPolicyPort item) { - this.index = index; - this.builder = new V1NetworkPolicyPortBuilder(this, item); - } - PortsNestedImpl() { - this.index = -1; - this.builder = new V1NetworkPolicyPortBuilder(this); - } - V1NetworkPolicyPortBuilder builder; - int index; - public N and() { - return (N) V1NetworkPolicyEgressRuleFluentImpl.this.setToPorts(index,builder.build()); - } - public N endPort() { - return and(); - } - - } - class ToNestedImpl extends V1NetworkPolicyPeerFluentImpl> implements V1NetworkPolicyEgressRuleFluentImpl.ToNested,Nested{ - ToNestedImpl(int index,V1NetworkPolicyPeer item) { - this.index = index; - this.builder = new V1NetworkPolicyPeerBuilder(this, item); - } - ToNestedImpl() { - this.index = -1; - this.builder = new V1NetworkPolicyPeerBuilder(this); - } - V1NetworkPolicyPeerBuilder builder; - int index; - public N and() { - return (N) V1NetworkPolicyEgressRuleFluentImpl.this.setToTo(index,builder.build()); - } - public N endTo() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyFluent.java index c0e360eb2f..6b55c7a017 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyFluent.java @@ -1,81 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1NetworkPolicyFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1NetworkPolicyFluent.MetadataNested withNewMetadata(); - public V1NetworkPolicyFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1NetworkPolicyFluent.MetadataNested editMetadata(); - public V1NetworkPolicyFluent.MetadataNested editOrNewMetadata(); - public V1NetworkPolicyFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1NetworkPolicySpec getSpec(); - public V1NetworkPolicySpec buildSpec(); - public A withSpec(V1NetworkPolicySpec spec); - public Boolean hasSpec(); - public V1NetworkPolicyFluent.SpecNested withNewSpec(); - public V1NetworkPolicyFluent.SpecNested withNewSpecLike(V1NetworkPolicySpec item); - public V1NetworkPolicyFluent.SpecNested editSpec(); - public V1NetworkPolicyFluent.SpecNested editOrNewSpec(); - public V1NetworkPolicyFluent.SpecNested editOrNewSpecLike(V1NetworkPolicySpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1NetworkPolicyStatus getStatus(); - public V1NetworkPolicyStatus buildStatus(); - public A withStatus(V1NetworkPolicyStatus status); - public Boolean hasStatus(); - public V1NetworkPolicyFluent.StatusNested withNewStatus(); - public V1NetworkPolicyFluent.StatusNested withNewStatusLike(V1NetworkPolicyStatus item); - public V1NetworkPolicyFluent.StatusNested editStatus(); - public V1NetworkPolicyFluent.StatusNested editOrNewStatus(); - public V1NetworkPolicyFluent.StatusNested editOrNewStatusLike(V1NetworkPolicyStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NetworkPolicyFluent> extends BaseFluent{ + public V1NetworkPolicyFluent() { } - public interface SpecNested extends Nested,V1NetworkPolicySpecFluent>{ - public N and(); - public N endSpec(); - + + public V1NetworkPolicyFluent(V1NetworkPolicy instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1NetworkPolicySpecBuilder spec; + + protected void copyInstance(V1NetworkPolicy instance) { + instance = (instance != null ? instance : new V1NetworkPolicy()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface StatusNested extends Nested,V1NetworkPolicyStatusFluent>{ - public N and(); - public N endStatus(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1NetworkPolicySpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1NetworkPolicySpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1NetworkPolicySpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1NetworkPolicySpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1NetworkPolicySpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1NetworkPolicySpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NetworkPolicyFluent that = (V1NetworkPolicyFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1NetworkPolicyFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1NetworkPolicySpecFluent> implements Nested{ + SpecNested(V1NetworkPolicySpec item) { + this.builder = new V1NetworkPolicySpecBuilder(this, item); + } + V1NetworkPolicySpecBuilder builder; + + public N and() { + return (N) V1NetworkPolicyFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyFluentImpl.java deleted file mode 100644 index f8dfbe70d8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NetworkPolicyFluentImpl> extends BaseFluent implements V1NetworkPolicyFluent{ - public V1NetworkPolicyFluentImpl() { - } - public V1NetworkPolicyFluentImpl(V1NetworkPolicy instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1NetworkPolicySpecBuilder spec; - private V1NetworkPolicyStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1NetworkPolicyFluentImpl.MetadataNested withNewMetadata() { - return new V1NetworkPolicyFluentImpl.MetadataNestedImpl(); - } - public V1NetworkPolicyFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1NetworkPolicyFluentImpl.MetadataNestedImpl(item); - } - public V1NetworkPolicyFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1NetworkPolicyFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1NetworkPolicyFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1NetworkPolicySpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1NetworkPolicySpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1NetworkPolicySpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1NetworkPolicySpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1NetworkPolicyFluentImpl.SpecNested withNewSpec() { - return new V1NetworkPolicyFluentImpl.SpecNestedImpl(); - } - public V1NetworkPolicyFluentImpl.SpecNested withNewSpecLike(V1NetworkPolicySpec item) { - return new V1NetworkPolicyFluentImpl.SpecNestedImpl(item); - } - public V1NetworkPolicyFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1NetworkPolicyFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1NetworkPolicySpecBuilder().build()); - } - public V1NetworkPolicyFluentImpl.SpecNested editOrNewSpecLike(V1NetworkPolicySpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1NetworkPolicyStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1NetworkPolicyStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1NetworkPolicyStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1NetworkPolicyStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1NetworkPolicyFluentImpl.StatusNested withNewStatus() { - return new V1NetworkPolicyFluentImpl.StatusNestedImpl(); - } - public V1NetworkPolicyFluentImpl.StatusNested withNewStatusLike(V1NetworkPolicyStatus item) { - return new V1NetworkPolicyFluentImpl.StatusNestedImpl(item); - } - public V1NetworkPolicyFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1NetworkPolicyFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1NetworkPolicyStatusBuilder().build()); - } - public V1NetworkPolicyFluentImpl.StatusNested editOrNewStatusLike(V1NetworkPolicyStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NetworkPolicyFluentImpl that = (V1NetworkPolicyFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1NetworkPolicyFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1NetworkPolicyFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1NetworkPolicySpecFluentImpl> implements V1NetworkPolicyFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1NetworkPolicySpec item) { - this.builder = new V1NetworkPolicySpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1NetworkPolicySpecBuilder(this); - } - V1NetworkPolicySpecBuilder builder; - public N and() { - return (N) V1NetworkPolicyFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1NetworkPolicyStatusFluentImpl> implements V1NetworkPolicyFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1NetworkPolicyStatus item) { - this.builder = new V1NetworkPolicyStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1NetworkPolicyStatusBuilder(this); - } - V1NetworkPolicyStatusBuilder builder; - public N and() { - return (N) V1NetworkPolicyFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleBuilder.java index 9f3e818721..fb1ef85751 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NetworkPolicyIngressRuleBuilder extends V1NetworkPolicyIngressRuleFluentImpl implements VisitableBuilder{ +public class V1NetworkPolicyIngressRuleBuilder extends V1NetworkPolicyIngressRuleFluent implements VisitableBuilder{ public V1NetworkPolicyIngressRuleBuilder() { - this(false); - } - public V1NetworkPolicyIngressRuleBuilder(Boolean validationEnabled) { - this(new V1NetworkPolicyIngressRule(), validationEnabled); + this(new V1NetworkPolicyIngressRule()); } + public V1NetworkPolicyIngressRuleBuilder(V1NetworkPolicyIngressRuleFluent fluent) { - this(fluent, false); - } - public V1NetworkPolicyIngressRuleBuilder(V1NetworkPolicyIngressRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NetworkPolicyIngressRule(), validationEnabled); + this(fluent, new V1NetworkPolicyIngressRule()); } + public V1NetworkPolicyIngressRuleBuilder(V1NetworkPolicyIngressRuleFluent fluent,V1NetworkPolicyIngressRule instance) { - this(fluent, instance, false); - } - public V1NetworkPolicyIngressRuleBuilder(V1NetworkPolicyIngressRuleFluent fluent,V1NetworkPolicyIngressRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFrom(instance.getFrom()); - fluent.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NetworkPolicyIngressRuleBuilder(V1NetworkPolicyIngressRule instance) { - this(instance,false); - } - public V1NetworkPolicyIngressRuleBuilder(V1NetworkPolicyIngressRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFrom(instance.getFrom()); - this.withPorts(instance.getPorts()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NetworkPolicyIngressRuleFluent fluent; - Boolean validationEnabled; + public V1NetworkPolicyIngressRule build() { V1NetworkPolicyIngressRule buildable = new V1NetworkPolicyIngressRule(); - buildable.setFrom(fluent.getFrom()); - buildable.setPorts(fluent.getPorts()); + buildable.setFrom(fluent.buildFrom()); + buildable.setPorts(fluent.buildPorts()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleFluent.java index 4784471b87..af14ae961d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleFluent.java @@ -1,90 +1,398 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NetworkPolicyIngressRuleFluent> extends Fluent{ - public A addToFrom(int index,V1NetworkPolicyPeer item); - public A setToFrom(int index,V1NetworkPolicyPeer item); - public A addToFrom(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items); - public A addAllToFrom(Collection items); - public A removeFromFrom(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items); - public A removeAllFromFrom(Collection items); - public A removeMatchingFromFrom(Predicate predicate); - - /** - * This method has been deprecated, please use method buildFrom instead. - * @return The buildable object. - */ - @Deprecated - public List getFrom(); - public List buildFrom(); - public V1NetworkPolicyPeer buildFrom(int index); - public V1NetworkPolicyPeer buildFirstFrom(); - public V1NetworkPolicyPeer buildLastFrom(); - public V1NetworkPolicyPeer buildMatchingFrom(Predicate predicate); - public Boolean hasMatchingFrom(Predicate predicate); - public A withFrom(List from); - public A withFrom(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... from); - public Boolean hasFrom(); - public V1NetworkPolicyIngressRuleFluent.FromNested addNewFrom(); - public V1NetworkPolicyIngressRuleFluent.FromNested addNewFromLike(V1NetworkPolicyPeer item); - public V1NetworkPolicyIngressRuleFluent.FromNested setNewFromLike(int index,V1NetworkPolicyPeer item); - public V1NetworkPolicyIngressRuleFluent.FromNested editFrom(int index); - public V1NetworkPolicyIngressRuleFluent.FromNested editFirstFrom(); - public V1NetworkPolicyIngressRuleFluent.FromNested editLastFrom(); - public V1NetworkPolicyIngressRuleFluent.FromNested editMatchingFrom(Predicate predicate); - public A addToPorts(int index,V1NetworkPolicyPort item); - public A setToPorts(int index,V1NetworkPolicyPort item); - public A addToPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items); - public A addAllToPorts(Collection items); - public A removeFromPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items); - public A removeAllFromPorts(Collection items); - public A removeMatchingFromPorts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts(); - public List buildPorts(); - public V1NetworkPolicyPort buildPort(int index); - public V1NetworkPolicyPort buildFirstPort(); - public V1NetworkPolicyPort buildLastPort(); - public V1NetworkPolicyPort buildMatchingPort(Predicate predicate); - public Boolean hasMatchingPort(Predicate predicate); - public A withPorts(List ports); - public A withPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... ports); - public Boolean hasPorts(); - public V1NetworkPolicyIngressRuleFluent.PortsNested addNewPort(); - public V1NetworkPolicyIngressRuleFluent.PortsNested addNewPortLike(V1NetworkPolicyPort item); - public V1NetworkPolicyIngressRuleFluent.PortsNested setNewPortLike(int index,V1NetworkPolicyPort item); - public V1NetworkPolicyIngressRuleFluent.PortsNested editPort(int index); - public V1NetworkPolicyIngressRuleFluent.PortsNested editFirstPort(); - public V1NetworkPolicyIngressRuleFluent.PortsNested editLastPort(); - public V1NetworkPolicyIngressRuleFluent.PortsNested editMatchingPort(Predicate predicate); - public interface FromNested extends Nested,V1NetworkPolicyPeerFluent>{ - public N and(); - public N endFrom(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NetworkPolicyIngressRuleFluent> extends BaseFluent{ + public V1NetworkPolicyIngressRuleFluent() { + } + + public V1NetworkPolicyIngressRuleFluent(V1NetworkPolicyIngressRule instance) { + this.copyInstance(instance); + } + private ArrayList from; + private ArrayList ports; + + protected void copyInstance(V1NetworkPolicyIngressRule instance) { + instance = (instance != null ? instance : new V1NetworkPolicyIngressRule()); + if (instance != null) { + this.withFrom(instance.getFrom()); + this.withPorts(instance.getPorts()); + } + } + + public A addToFrom(int index,V1NetworkPolicyPeer item) { + if (this.from == null) {this.from = new ArrayList();} + V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item); + if (index < 0 || index >= from.size()) { _visitables.get("from").add(builder); from.add(builder); } else { _visitables.get("from").add(index, builder); from.add(index, builder);} + return (A)this; + } + + public A setToFrom(int index,V1NetworkPolicyPeer item) { + if (this.from == null) {this.from = new ArrayList();} + V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item); + if (index < 0 || index >= from.size()) { _visitables.get("from").add(builder); from.add(builder); } else { _visitables.get("from").set(index, builder); from.set(index, builder);} + return (A)this; + } + + public A addToFrom(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items) { + if (this.from == null) {this.from = new ArrayList();} + for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("from").add(builder);this.from.add(builder);} return (A)this; + } + + public A addAllToFrom(Collection items) { + if (this.from == null) {this.from = new ArrayList();} + for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("from").add(builder);this.from.add(builder);} return (A)this; + } + + public A removeFromFrom(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items) { + if (this.from == null) return (A)this; + for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("from").remove(builder); this.from.remove(builder);} return (A)this; + } + + public A removeAllFromFrom(Collection items) { + if (this.from == null) return (A)this; + for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("from").remove(builder); this.from.remove(builder);} return (A)this; + } + + public A removeMatchingFromFrom(Predicate predicate) { + if (from == null) return (A) this; + final Iterator each = from.iterator(); + final List visitables = _visitables.get("from"); + while (each.hasNext()) { + V1NetworkPolicyPeerBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildFrom() { + return this.from != null ? build(from) : null; + } + + public V1NetworkPolicyPeer buildFrom(int index) { + return this.from.get(index).build(); + } + + public V1NetworkPolicyPeer buildFirstFrom() { + return this.from.get(0).build(); + } + + public V1NetworkPolicyPeer buildLastFrom() { + return this.from.get(from.size() - 1).build(); + } + + public V1NetworkPolicyPeer buildMatchingFrom(Predicate predicate) { + for (V1NetworkPolicyPeerBuilder item : from) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingFrom(Predicate predicate) { + for (V1NetworkPolicyPeerBuilder item : from) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withFrom(List from) { + if (this.from != null) { + this._visitables.get("from").clear(); + } + if (from != null) { + this.from = new ArrayList(); + for (V1NetworkPolicyPeer item : from) { + this.addToFrom(item); + } + } else { + this.from = null; + } + return (A) this; + } + + public A withFrom(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... from) { + if (this.from != null) { + this.from.clear(); + _visitables.remove("from"); + } + if (from != null) { + for (V1NetworkPolicyPeer item : from) { + this.addToFrom(item); + } + } + return (A) this; + } + + public boolean hasFrom() { + return this.from != null && !this.from.isEmpty(); + } + + public FromNested addNewFrom() { + return new FromNested(-1, null); + } + + public FromNested addNewFromLike(V1NetworkPolicyPeer item) { + return new FromNested(-1, item); + } + + public FromNested setNewFromLike(int index,V1NetworkPolicyPeer item) { + return new FromNested(index, item); + } + + public FromNested editFrom(int index) { + if (from.size() <= index) throw new RuntimeException("Can't edit from. Index exceeds size."); + return setNewFromLike(index, buildFrom(index)); + } + + public FromNested editFirstFrom() { + if (from.size() == 0) throw new RuntimeException("Can't edit first from. The list is empty."); + return setNewFromLike(0, buildFrom(0)); + } + + public FromNested editLastFrom() { + int index = from.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last from. The list is empty."); + return setNewFromLike(index, buildFrom(index)); } - public interface PortsNested extends Nested,V1NetworkPolicyPortFluent>{ - public N and(); - public N endPort(); + + public FromNested editMatchingFrom(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} + return (A)this; + } + + public A setToPorts(int index,V1NetworkPolicyPort item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} + return (A)this; + } + + public A addToPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A addAllToPorts(Collection items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A removeFromPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items) { + if (this.ports == null) return (A)this; + for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeAllFromPorts(Collection items) { + if (this.ports == null) return (A)this; + for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeMatchingFromPorts(Predicate predicate) { + if (ports == null) return (A) this; + final Iterator each = ports.iterator(); + final List visitables = _visitables.get("ports"); + while (each.hasNext()) { + V1NetworkPolicyPortBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPorts() { + return this.ports != null ? build(ports) : null; + } + + public V1NetworkPolicyPort buildPort(int index) { + return this.ports.get(index).build(); + } + + public V1NetworkPolicyPort buildFirstPort() { + return this.ports.get(0).build(); + } + + public V1NetworkPolicyPort buildLastPort() { + return this.ports.get(ports.size() - 1).build(); + } + + public V1NetworkPolicyPort buildMatchingPort(Predicate predicate) { + for (V1NetworkPolicyPortBuilder item : ports) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPort(Predicate predicate) { + for (V1NetworkPolicyPortBuilder item : ports) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPorts(List ports) { + if (this.ports != null) { + this._visitables.get("ports").clear(); + } + if (ports != null) { + this.ports = new ArrayList(); + for (V1NetworkPolicyPort item : ports) { + this.addToPorts(item); + } + } else { + this.ports = null; + } + return (A) this; + } + + public A withPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... ports) { + if (this.ports != null) { + this.ports.clear(); + _visitables.remove("ports"); + } + if (ports != null) { + for (V1NetworkPolicyPort item : ports) { + this.addToPorts(item); + } + } + return (A) this; + } + + public boolean hasPorts() { + return this.ports != null && !this.ports.isEmpty(); + } + + public PortsNested addNewPort() { + return new PortsNested(-1, null); + } + + public PortsNested addNewPortLike(V1NetworkPolicyPort item) { + return new PortsNested(-1, item); + } + + public PortsNested setNewPortLike(int index,V1NetworkPolicyPort item) { + return new PortsNested(index, item); + } + + public PortsNested editPort(int index) { + if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editFirstPort() { + if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); + return setNewPortLike(0, buildPort(0)); + } + + public PortsNested editLastPort() { + int index = ports.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editMatchingPort(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1NetworkPolicyPeerFluent> implements Nested{ + FromNested(int index,V1NetworkPolicyPeer item) { + this.index = index; + this.builder = new V1NetworkPolicyPeerBuilder(this, item); + } + V1NetworkPolicyPeerBuilder builder; + int index; + + public N and() { + return (N) V1NetworkPolicyIngressRuleFluent.this.setToFrom(index,builder.build()); + } + + public N endFrom() { + return and(); + } + } + public class PortsNested extends V1NetworkPolicyPortFluent> implements Nested{ + PortsNested(int index,V1NetworkPolicyPort item) { + this.index = index; + this.builder = new V1NetworkPolicyPortBuilder(this, item); + } + V1NetworkPolicyPortBuilder builder; + int index; + + public N and() { + return (N) V1NetworkPolicyIngressRuleFluent.this.setToPorts(index,builder.build()); + } + + public N endPort() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleFluentImpl.java deleted file mode 100644 index 257e1d064c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRuleFluentImpl.java +++ /dev/null @@ -1,307 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NetworkPolicyIngressRuleFluentImpl> extends BaseFluent implements V1NetworkPolicyIngressRuleFluent{ - public V1NetworkPolicyIngressRuleFluentImpl() { - } - public V1NetworkPolicyIngressRuleFluentImpl(V1NetworkPolicyIngressRule instance) { - if (instance != null) { - this.withFrom(instance.getFrom()); - this.withPorts(instance.getPorts()); - } - } - private ArrayList from; - private ArrayList ports; - public A addToFrom(int index,V1NetworkPolicyPeer item) { - if (this.from == null) {this.from = new ArrayList();} - V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item); - if (index < 0 || index >= from.size()) { _visitables.get("from").add(builder); from.add(builder); } else { _visitables.get("from").add(index, builder); from.add(index, builder);} - return (A)this; - } - public A setToFrom(int index,V1NetworkPolicyPeer item) { - if (this.from == null) {this.from = new ArrayList();} - V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item); - if (index < 0 || index >= from.size()) { _visitables.get("from").add(builder); from.add(builder); } else { _visitables.get("from").set(index, builder); from.set(index, builder);} - return (A)this; - } - public A addToFrom(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items) { - if (this.from == null) {this.from = new ArrayList();} - for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("from").add(builder);this.from.add(builder);} return (A)this; - } - public A addAllToFrom(Collection items) { - if (this.from == null) {this.from = new ArrayList();} - for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("from").add(builder);this.from.add(builder);} return (A)this; - } - public A removeFromFrom(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... items) { - for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("from").remove(builder);if (this.from != null) {this.from.remove(builder);}} return (A)this; - } - public A removeAllFromFrom(Collection items) { - for (V1NetworkPolicyPeer item : items) {V1NetworkPolicyPeerBuilder builder = new V1NetworkPolicyPeerBuilder(item);_visitables.get("from").remove(builder);if (this.from != null) {this.from.remove(builder);}} return (A)this; - } - public A removeMatchingFromFrom(Predicate predicate) { - if (from == null) return (A) this; - final Iterator each = from.iterator(); - final List visitables = _visitables.get("from"); - while (each.hasNext()) { - V1NetworkPolicyPeerBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildFrom instead. - * @return The buildable object. - */ - @Deprecated - public List getFrom() { - return from != null ? build(from) : null; - } - public List buildFrom() { - return from != null ? build(from) : null; - } - public V1NetworkPolicyPeer buildFrom(int index) { - return this.from.get(index).build(); - } - public V1NetworkPolicyPeer buildFirstFrom() { - return this.from.get(0).build(); - } - public V1NetworkPolicyPeer buildLastFrom() { - return this.from.get(from.size() - 1).build(); - } - public V1NetworkPolicyPeer buildMatchingFrom(Predicate predicate) { - for (V1NetworkPolicyPeerBuilder item: from) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingFrom(Predicate predicate) { - for (V1NetworkPolicyPeerBuilder item: from) { if(predicate.test(item)){ return true;} } return false; - } - public A withFrom(List from) { - if (this.from != null) { _visitables.get("from").clear();} - if (from != null) {this.from = new ArrayList(); for (V1NetworkPolicyPeer item : from){this.addToFrom(item);}} else { this.from = null;} return (A) this; - } - public A withFrom(io.kubernetes.client.openapi.models.V1NetworkPolicyPeer... from) { - if (this.from != null) {this.from.clear(); _visitables.remove("from"); } - if (from != null) {for (V1NetworkPolicyPeer item :from){ this.addToFrom(item);}} return (A) this; - } - public Boolean hasFrom() { - return from != null && !from.isEmpty(); - } - public V1NetworkPolicyIngressRuleFluentImpl.FromNested addNewFrom() { - return new V1NetworkPolicyIngressRuleFluentImpl.FromNestedImpl(); - } - public V1NetworkPolicyIngressRuleFluentImpl.FromNested addNewFromLike(V1NetworkPolicyPeer item) { - return new V1NetworkPolicyIngressRuleFluentImpl.FromNestedImpl(-1, item); - } - public V1NetworkPolicyIngressRuleFluentImpl.FromNested setNewFromLike(int index,V1NetworkPolicyPeer item) { - return new V1NetworkPolicyIngressRuleFluentImpl.FromNestedImpl(index, item); - } - public V1NetworkPolicyIngressRuleFluentImpl.FromNested editFrom(int index) { - if (from.size() <= index) throw new RuntimeException("Can't edit from. Index exceeds size."); - return setNewFromLike(index, buildFrom(index)); - } - public V1NetworkPolicyIngressRuleFluentImpl.FromNested editFirstFrom() { - if (from.size() == 0) throw new RuntimeException("Can't edit first from. The list is empty."); - return setNewFromLike(0, buildFrom(0)); - } - public V1NetworkPolicyIngressRuleFluentImpl.FromNested editLastFrom() { - int index = from.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last from. The list is empty."); - return setNewFromLike(index, buildFrom(index)); - } - public V1NetworkPolicyIngressRuleFluentImpl.FromNested editMatchingFrom(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} - return (A)this; - } - public A setToPorts(int index,V1NetworkPolicyPort item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} - return (A)this; - } - public A addToPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A addAllToPorts(Collection items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A removeFromPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... items) { - for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeAllFromPorts(Collection items) { - for (V1NetworkPolicyPort item : items) {V1NetworkPolicyPortBuilder builder = new V1NetworkPolicyPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeMatchingFromPorts(Predicate predicate) { - if (ports == null) return (A) this; - final Iterator each = ports.iterator(); - final List visitables = _visitables.get("ports"); - while (each.hasNext()) { - V1NetworkPolicyPortBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts() { - return ports != null ? build(ports) : null; - } - public List buildPorts() { - return ports != null ? build(ports) : null; - } - public V1NetworkPolicyPort buildPort(int index) { - return this.ports.get(index).build(); - } - public V1NetworkPolicyPort buildFirstPort() { - return this.ports.get(0).build(); - } - public V1NetworkPolicyPort buildLastPort() { - return this.ports.get(ports.size() - 1).build(); - } - public V1NetworkPolicyPort buildMatchingPort(Predicate predicate) { - for (V1NetworkPolicyPortBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPort(Predicate predicate) { - for (V1NetworkPolicyPortBuilder item: ports) { if(predicate.test(item)){ return true;} } return false; - } - public A withPorts(List ports) { - if (this.ports != null) { _visitables.get("ports").clear();} - if (ports != null) {this.ports = new ArrayList(); for (V1NetworkPolicyPort item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this; - } - public A withPorts(io.kubernetes.client.openapi.models.V1NetworkPolicyPort... ports) { - if (this.ports != null) {this.ports.clear(); _visitables.remove("ports"); } - if (ports != null) {for (V1NetworkPolicyPort item :ports){ this.addToPorts(item);}} return (A) this; - } - public Boolean hasPorts() { - return ports != null && !ports.isEmpty(); - } - public V1NetworkPolicyIngressRuleFluentImpl.PortsNested addNewPort() { - return new V1NetworkPolicyIngressRuleFluentImpl.PortsNestedImpl(); - } - public V1NetworkPolicyIngressRuleFluentImpl.PortsNested addNewPortLike(V1NetworkPolicyPort item) { - return new V1NetworkPolicyIngressRuleFluentImpl.PortsNestedImpl(-1, item); - } - public V1NetworkPolicyIngressRuleFluentImpl.PortsNested setNewPortLike(int index,V1NetworkPolicyPort item) { - return new V1NetworkPolicyIngressRuleFluentImpl.PortsNestedImpl(index, item); - } - public V1NetworkPolicyIngressRuleFluentImpl.PortsNested editPort(int index) { - if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); - return setNewPortLike(index, buildPort(index)); - } - public V1NetworkPolicyIngressRuleFluentImpl.PortsNested editFirstPort() { - if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); - return setNewPortLike(0, buildPort(0)); - } - public V1NetworkPolicyIngressRuleFluentImpl.PortsNested editLastPort() { - int index = ports.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); - return setNewPortLike(index, buildPort(index)); - } - public V1NetworkPolicyIngressRuleFluentImpl.PortsNested editMatchingPort(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1NetworkPolicyPeerFluentImpl> implements V1NetworkPolicyIngressRuleFluentImpl.FromNested,Nested{ - FromNestedImpl(int index,V1NetworkPolicyPeer item) { - this.index = index; - this.builder = new V1NetworkPolicyPeerBuilder(this, item); - } - FromNestedImpl() { - this.index = -1; - this.builder = new V1NetworkPolicyPeerBuilder(this); - } - V1NetworkPolicyPeerBuilder builder; - int index; - public N and() { - return (N) V1NetworkPolicyIngressRuleFluentImpl.this.setToFrom(index,builder.build()); - } - public N endFrom() { - return and(); - } - - } - class PortsNestedImpl extends V1NetworkPolicyPortFluentImpl> implements V1NetworkPolicyIngressRuleFluentImpl.PortsNested,Nested{ - PortsNestedImpl(int index,V1NetworkPolicyPort item) { - this.index = index; - this.builder = new V1NetworkPolicyPortBuilder(this, item); - } - PortsNestedImpl() { - this.index = -1; - this.builder = new V1NetworkPolicyPortBuilder(this); - } - V1NetworkPolicyPortBuilder builder; - int index; - public N and() { - return (N) V1NetworkPolicyIngressRuleFluentImpl.this.setToPorts(index,builder.build()); - } - public N endPort() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListBuilder.java index 9df8bde4bc..6a9d8aa834 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NetworkPolicyListBuilder extends V1NetworkPolicyListFluentImpl implements VisitableBuilder{ +public class V1NetworkPolicyListBuilder extends V1NetworkPolicyListFluent implements VisitableBuilder{ public V1NetworkPolicyListBuilder() { - this(false); - } - public V1NetworkPolicyListBuilder(Boolean validationEnabled) { - this(new V1NetworkPolicyList(), validationEnabled); + this(new V1NetworkPolicyList()); } + public V1NetworkPolicyListBuilder(V1NetworkPolicyListFluent fluent) { - this(fluent, false); - } - public V1NetworkPolicyListBuilder(V1NetworkPolicyListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NetworkPolicyList(), validationEnabled); + this(fluent, new V1NetworkPolicyList()); } + public V1NetworkPolicyListBuilder(V1NetworkPolicyListFluent fluent,V1NetworkPolicyList instance) { - this(fluent, instance, false); - } - public V1NetworkPolicyListBuilder(V1NetworkPolicyListFluent fluent,V1NetworkPolicyList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NetworkPolicyListBuilder(V1NetworkPolicyList instance) { - this(instance,false); - } - public V1NetworkPolicyListBuilder(V1NetworkPolicyList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NetworkPolicyListFluent fluent; - Boolean validationEnabled; + public V1NetworkPolicyList build() { V1NetworkPolicyList buildable = new V1NetworkPolicyList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListFluent.java index fa60f7fb96..543d682116 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NetworkPolicyListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1NetworkPolicy item); - public A setToItems(int index,V1NetworkPolicy item); - public A addToItems(io.kubernetes.client.openapi.models.V1NetworkPolicy... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1NetworkPolicy... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1NetworkPolicy buildItem(int index); - public V1NetworkPolicy buildFirstItem(); - public V1NetworkPolicy buildLastItem(); - public V1NetworkPolicy buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1NetworkPolicy... items); - public Boolean hasItems(); - public V1NetworkPolicyListFluent.ItemsNested addNewItem(); - public V1NetworkPolicyListFluent.ItemsNested addNewItemLike(V1NetworkPolicy item); - public V1NetworkPolicyListFluent.ItemsNested setNewItemLike(int index,V1NetworkPolicy item); - public V1NetworkPolicyListFluent.ItemsNested editItem(int index); - public V1NetworkPolicyListFluent.ItemsNested editFirstItem(); - public V1NetworkPolicyListFluent.ItemsNested editLastItem(); - public V1NetworkPolicyListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1NetworkPolicyListFluent.MetadataNested withNewMetadata(); - public V1NetworkPolicyListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1NetworkPolicyListFluent.MetadataNested editMetadata(); - public V1NetworkPolicyListFluent.MetadataNested editOrNewMetadata(); - public V1NetworkPolicyListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1NetworkPolicyFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NetworkPolicyListFluent> extends BaseFluent{ + public V1NetworkPolicyListFluent() { + } + + public V1NetworkPolicyListFluent(V1NetworkPolicyList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1NetworkPolicyList instance) { + instance = (instance != null ? instance : new V1NetworkPolicyList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1NetworkPolicy item) { + if (this.items == null) {this.items = new ArrayList();} + V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1NetworkPolicy item) { + if (this.items == null) {this.items = new ArrayList();} + V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1NetworkPolicy... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1NetworkPolicy item : items) {V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1NetworkPolicy item : items) {V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1NetworkPolicy... items) { + if (this.items == null) return (A)this; + for (V1NetworkPolicy item : items) {V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1NetworkPolicy item : items) {V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1NetworkPolicyBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1NetworkPolicy buildItem(int index) { + return this.items.get(index).build(); + } + + public V1NetworkPolicy buildFirstItem() { + return this.items.get(0).build(); + } + + public V1NetworkPolicy buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1NetworkPolicy buildMatchingItem(Predicate predicate) { + for (V1NetworkPolicyBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1NetworkPolicyBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1NetworkPolicy item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1NetworkPolicy... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1NetworkPolicy item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1NetworkPolicy item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1NetworkPolicy item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NetworkPolicyListFluent that = (V1NetworkPolicyListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1NetworkPolicyFluent> implements Nested{ + ItemsNested(int index,V1NetworkPolicy item) { + this.index = index; + this.builder = new V1NetworkPolicyBuilder(this, item); + } + V1NetworkPolicyBuilder builder; + int index; + public N and() { + return (N) V1NetworkPolicyListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1NetworkPolicyListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListFluentImpl.java deleted file mode 100644 index af43c2226a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NetworkPolicyListFluentImpl> extends BaseFluent implements V1NetworkPolicyListFluent{ - public V1NetworkPolicyListFluentImpl() { - } - public V1NetworkPolicyListFluentImpl(V1NetworkPolicyList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1NetworkPolicy item) { - if (this.items == null) {this.items = new ArrayList();} - V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1NetworkPolicy item) { - if (this.items == null) {this.items = new ArrayList();} - V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1NetworkPolicy... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1NetworkPolicy item : items) {V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1NetworkPolicy item : items) {V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1NetworkPolicy... items) { - for (V1NetworkPolicy item : items) {V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1NetworkPolicy item : items) {V1NetworkPolicyBuilder builder = new V1NetworkPolicyBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1NetworkPolicyBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1NetworkPolicy buildItem(int index) { - return this.items.get(index).build(); - } - public V1NetworkPolicy buildFirstItem() { - return this.items.get(0).build(); - } - public V1NetworkPolicy buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1NetworkPolicy buildMatchingItem(Predicate predicate) { - for (V1NetworkPolicyBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1NetworkPolicyBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1NetworkPolicy item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1NetworkPolicy... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1NetworkPolicy item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1NetworkPolicyListFluentImpl.ItemsNested addNewItem() { - return new V1NetworkPolicyListFluentImpl.ItemsNestedImpl(); - } - public V1NetworkPolicyListFluentImpl.ItemsNested addNewItemLike(V1NetworkPolicy item) { - return new V1NetworkPolicyListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1NetworkPolicyListFluentImpl.ItemsNested setNewItemLike(int index,V1NetworkPolicy item) { - return new V1NetworkPolicyListFluentImpl.ItemsNestedImpl(index, item); - } - public V1NetworkPolicyListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1NetworkPolicyListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1NetworkPolicyListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1NetworkPolicyListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1NetworkPolicyListFluentImpl.MetadataNestedImpl(); - } - public V1NetworkPolicyListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1NetworkPolicyListFluentImpl.MetadataNestedImpl(item); - } - public V1NetworkPolicyListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1NetworkPolicyListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1NetworkPolicyListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NetworkPolicyListFluentImpl that = (V1NetworkPolicyListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1NetworkPolicyFluentImpl> implements V1NetworkPolicyListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1NetworkPolicy item) { - this.index = index; - this.builder = new V1NetworkPolicyBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1NetworkPolicyBuilder(this); - } - V1NetworkPolicyBuilder builder; - int index; - public N and() { - return (N) V1NetworkPolicyListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1NetworkPolicyListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1NetworkPolicyListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerBuilder.java index 58ea81bdf3..d006afd5c6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NetworkPolicyPeerBuilder extends V1NetworkPolicyPeerFluentImpl implements VisitableBuilder{ +public class V1NetworkPolicyPeerBuilder extends V1NetworkPolicyPeerFluent implements VisitableBuilder{ public V1NetworkPolicyPeerBuilder() { - this(false); - } - public V1NetworkPolicyPeerBuilder(Boolean validationEnabled) { - this(new V1NetworkPolicyPeer(), validationEnabled); + this(new V1NetworkPolicyPeer()); } + public V1NetworkPolicyPeerBuilder(V1NetworkPolicyPeerFluent fluent) { - this(fluent, false); - } - public V1NetworkPolicyPeerBuilder(V1NetworkPolicyPeerFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NetworkPolicyPeer(), validationEnabled); + this(fluent, new V1NetworkPolicyPeer()); } + public V1NetworkPolicyPeerBuilder(V1NetworkPolicyPeerFluent fluent,V1NetworkPolicyPeer instance) { - this(fluent, instance, false); - } - public V1NetworkPolicyPeerBuilder(V1NetworkPolicyPeerFluent fluent,V1NetworkPolicyPeer instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withIpBlock(instance.getIpBlock()); - fluent.withNamespaceSelector(instance.getNamespaceSelector()); - fluent.withPodSelector(instance.getPodSelector()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NetworkPolicyPeerBuilder(V1NetworkPolicyPeer instance) { - this(instance,false); - } - public V1NetworkPolicyPeerBuilder(V1NetworkPolicyPeer instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withIpBlock(instance.getIpBlock()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withPodSelector(instance.getPodSelector()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NetworkPolicyPeerFluent fluent; - Boolean validationEnabled; + public V1NetworkPolicyPeer build() { V1NetworkPolicyPeer buildable = new V1NetworkPolicyPeer(); - buildable.setIpBlock(fluent.getIpBlock()); - buildable.setNamespaceSelector(fluent.getNamespaceSelector()); - buildable.setPodSelector(fluent.getPodSelector()); + buildable.setIpBlock(fluent.buildIpBlock()); + buildable.setNamespaceSelector(fluent.buildNamespaceSelector()); + buildable.setPodSelector(fluent.buildPodSelector()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerFluent.java index 72e69d88ab..fb983d7202 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerFluent.java @@ -1,74 +1,226 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1NetworkPolicyPeerFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildIpBlock instead. - * @return The buildable object. - */ - @Deprecated - public V1IPBlock getIpBlock(); - public V1IPBlock buildIpBlock(); - public A withIpBlock(V1IPBlock ipBlock); - public Boolean hasIpBlock(); - public V1NetworkPolicyPeerFluent.IpBlockNested withNewIpBlock(); - public V1NetworkPolicyPeerFluent.IpBlockNested withNewIpBlockLike(V1IPBlock item); - public V1NetworkPolicyPeerFluent.IpBlockNested editIpBlock(); - public V1NetworkPolicyPeerFluent.IpBlockNested editOrNewIpBlock(); - public V1NetworkPolicyPeerFluent.IpBlockNested editOrNewIpBlockLike(V1IPBlock item); - - /** - * This method has been deprecated, please use method buildNamespaceSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getNamespaceSelector(); - public V1LabelSelector buildNamespaceSelector(); - public A withNamespaceSelector(V1LabelSelector namespaceSelector); - public Boolean hasNamespaceSelector(); - public V1NetworkPolicyPeerFluent.NamespaceSelectorNested withNewNamespaceSelector(); - public V1NetworkPolicyPeerFluent.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item); - public V1NetworkPolicyPeerFluent.NamespaceSelectorNested editNamespaceSelector(); - public V1NetworkPolicyPeerFluent.NamespaceSelectorNested editOrNewNamespaceSelector(); - public V1NetworkPolicyPeerFluent.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item); - - /** - * This method has been deprecated, please use method buildPodSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getPodSelector(); - public V1LabelSelector buildPodSelector(); - public A withPodSelector(V1LabelSelector podSelector); - public Boolean hasPodSelector(); - public V1NetworkPolicyPeerFluent.PodSelectorNested withNewPodSelector(); - public V1NetworkPolicyPeerFluent.PodSelectorNested withNewPodSelectorLike(V1LabelSelector item); - public V1NetworkPolicyPeerFluent.PodSelectorNested editPodSelector(); - public V1NetworkPolicyPeerFluent.PodSelectorNested editOrNewPodSelector(); - public V1NetworkPolicyPeerFluent.PodSelectorNested editOrNewPodSelectorLike(V1LabelSelector item); - public interface IpBlockNested extends Nested,V1IPBlockFluent>{ - public N and(); - public N endIpBlock(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NetworkPolicyPeerFluent> extends BaseFluent{ + public V1NetworkPolicyPeerFluent() { + } + + public V1NetworkPolicyPeerFluent(V1NetworkPolicyPeer instance) { + this.copyInstance(instance); + } + private V1IPBlockBuilder ipBlock; + private V1LabelSelectorBuilder namespaceSelector; + private V1LabelSelectorBuilder podSelector; + + protected void copyInstance(V1NetworkPolicyPeer instance) { + instance = (instance != null ? instance : new V1NetworkPolicyPeer()); + if (instance != null) { + this.withIpBlock(instance.getIpBlock()); + this.withNamespaceSelector(instance.getNamespaceSelector()); + this.withPodSelector(instance.getPodSelector()); + } + } + + public V1IPBlock buildIpBlock() { + return this.ipBlock != null ? this.ipBlock.build() : null; + } + + public A withIpBlock(V1IPBlock ipBlock) { + this._visitables.remove("ipBlock"); + if (ipBlock != null) { + this.ipBlock = new V1IPBlockBuilder(ipBlock); + this._visitables.get("ipBlock").add(this.ipBlock); + } else { + this.ipBlock = null; + this._visitables.get("ipBlock").remove(this.ipBlock); + } + return (A) this; + } + + public boolean hasIpBlock() { + return this.ipBlock != null; + } + + public IpBlockNested withNewIpBlock() { + return new IpBlockNested(null); + } + + public IpBlockNested withNewIpBlockLike(V1IPBlock item) { + return new IpBlockNested(item); + } + + public IpBlockNested editIpBlock() { + return withNewIpBlockLike(java.util.Optional.ofNullable(buildIpBlock()).orElse(null)); + } + + public IpBlockNested editOrNewIpBlock() { + return withNewIpBlockLike(java.util.Optional.ofNullable(buildIpBlock()).orElse(new V1IPBlockBuilder().build())); + } + + public IpBlockNested editOrNewIpBlockLike(V1IPBlock item) { + return withNewIpBlockLike(java.util.Optional.ofNullable(buildIpBlock()).orElse(item)); + } + + public V1LabelSelector buildNamespaceSelector() { + return this.namespaceSelector != null ? this.namespaceSelector.build() : null; + } + + public A withNamespaceSelector(V1LabelSelector namespaceSelector) { + this._visitables.remove("namespaceSelector"); + if (namespaceSelector != null) { + this.namespaceSelector = new V1LabelSelectorBuilder(namespaceSelector); + this._visitables.get("namespaceSelector").add(this.namespaceSelector); + } else { + this.namespaceSelector = null; + this._visitables.get("namespaceSelector").remove(this.namespaceSelector); + } + return (A) this; + } + + public boolean hasNamespaceSelector() { + return this.namespaceSelector != null; + } + + public NamespaceSelectorNested withNewNamespaceSelector() { + return new NamespaceSelectorNested(null); + } + + public NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { + return new NamespaceSelectorNested(item); + } + + public NamespaceSelectorNested editNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(null)); + } + + public NamespaceSelectorNested editOrNewNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(new V1LabelSelectorBuilder().build())); } - public interface NamespaceSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endNamespaceSelector(); + + public NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(item)); + } + + public V1LabelSelector buildPodSelector() { + return this.podSelector != null ? this.podSelector.build() : null; + } + + public A withPodSelector(V1LabelSelector podSelector) { + this._visitables.remove("podSelector"); + if (podSelector != null) { + this.podSelector = new V1LabelSelectorBuilder(podSelector); + this._visitables.get("podSelector").add(this.podSelector); + } else { + this.podSelector = null; + this._visitables.get("podSelector").remove(this.podSelector); + } + return (A) this; + } + + public boolean hasPodSelector() { + return this.podSelector != null; + } + + public PodSelectorNested withNewPodSelector() { + return new PodSelectorNested(null); + } + + public PodSelectorNested withNewPodSelectorLike(V1LabelSelector item) { + return new PodSelectorNested(item); + } + + public PodSelectorNested editPodSelector() { + return withNewPodSelectorLike(java.util.Optional.ofNullable(buildPodSelector()).orElse(null)); + } + + public PodSelectorNested editOrNewPodSelector() { + return withNewPodSelectorLike(java.util.Optional.ofNullable(buildPodSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public PodSelectorNested editOrNewPodSelectorLike(V1LabelSelector item) { + return withNewPodSelectorLike(java.util.Optional.ofNullable(buildPodSelector()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NetworkPolicyPeerFluent that = (V1NetworkPolicyPeerFluent) o; + if (!java.util.Objects.equals(ipBlock, that.ipBlock)) return false; + if (!java.util.Objects.equals(namespaceSelector, that.namespaceSelector)) return false; + if (!java.util.Objects.equals(podSelector, that.podSelector)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(ipBlock, namespaceSelector, podSelector, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (ipBlock != null) { sb.append("ipBlock:"); sb.append(ipBlock + ","); } + if (namespaceSelector != null) { sb.append("namespaceSelector:"); sb.append(namespaceSelector + ","); } + if (podSelector != null) { sb.append("podSelector:"); sb.append(podSelector); } + sb.append("}"); + return sb.toString(); + } + public class IpBlockNested extends V1IPBlockFluent> implements Nested{ + IpBlockNested(V1IPBlock item) { + this.builder = new V1IPBlockBuilder(this, item); + } + V1IPBlockBuilder builder; + + public N and() { + return (N) V1NetworkPolicyPeerFluent.this.withIpBlock(builder.build()); + } + public N endIpBlock() { + return and(); + } + + } - public interface PodSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endPodSelector(); + public class NamespaceSelectorNested extends V1LabelSelectorFluent> implements Nested{ + NamespaceSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + public N and() { + return (N) V1NetworkPolicyPeerFluent.this.withNamespaceSelector(builder.build()); + } + + public N endNamespaceSelector() { + return and(); + } + + } + public class PodSelectorNested extends V1LabelSelectorFluent> implements Nested{ + PodSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1NetworkPolicyPeerFluent.this.withPodSelector(builder.build()); + } + + public N endPodSelector() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerFluentImpl.java deleted file mode 100644 index 4bc4ccec6b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPeerFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NetworkPolicyPeerFluentImpl> extends BaseFluent implements V1NetworkPolicyPeerFluent{ - public V1NetworkPolicyPeerFluentImpl() { - } - public V1NetworkPolicyPeerFluentImpl(V1NetworkPolicyPeer instance) { - if (instance != null) { - this.withIpBlock(instance.getIpBlock()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withPodSelector(instance.getPodSelector()); - } - } - private V1IPBlockBuilder ipBlock; - private V1LabelSelectorBuilder namespaceSelector; - private V1LabelSelectorBuilder podSelector; - - /** - * This method has been deprecated, please use method buildIpBlock instead. - * @return The buildable object. - */ - @Deprecated - public V1IPBlock getIpBlock() { - return this.ipBlock!=null ?this.ipBlock.build():null; - } - public V1IPBlock buildIpBlock() { - return this.ipBlock!=null ?this.ipBlock.build():null; - } - public A withIpBlock(V1IPBlock ipBlock) { - _visitables.get("ipBlock").remove(this.ipBlock); - if (ipBlock!=null){ this.ipBlock= new V1IPBlockBuilder(ipBlock); _visitables.get("ipBlock").add(this.ipBlock);} else { this.ipBlock = null; _visitables.get("ipBlock").remove(this.ipBlock); } return (A) this; - } - public Boolean hasIpBlock() { - return this.ipBlock != null; - } - public V1NetworkPolicyPeerFluentImpl.IpBlockNested withNewIpBlock() { - return new V1NetworkPolicyPeerFluentImpl.IpBlockNestedImpl(); - } - public V1NetworkPolicyPeerFluentImpl.IpBlockNested withNewIpBlockLike(V1IPBlock item) { - return new V1NetworkPolicyPeerFluentImpl.IpBlockNestedImpl(item); - } - public V1NetworkPolicyPeerFluentImpl.IpBlockNested editIpBlock() { - return withNewIpBlockLike(getIpBlock()); - } - public V1NetworkPolicyPeerFluentImpl.IpBlockNested editOrNewIpBlock() { - return withNewIpBlockLike(getIpBlock() != null ? getIpBlock(): new V1IPBlockBuilder().build()); - } - public V1NetworkPolicyPeerFluentImpl.IpBlockNested editOrNewIpBlockLike(V1IPBlock item) { - return withNewIpBlockLike(getIpBlock() != null ? getIpBlock(): item); - } - - /** - * This method has been deprecated, please use method buildNamespaceSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getNamespaceSelector() { - return this.namespaceSelector!=null ?this.namespaceSelector.build():null; - } - public V1LabelSelector buildNamespaceSelector() { - return this.namespaceSelector!=null ?this.namespaceSelector.build():null; - } - public A withNamespaceSelector(V1LabelSelector namespaceSelector) { - _visitables.get("namespaceSelector").remove(this.namespaceSelector); - if (namespaceSelector!=null){ this.namespaceSelector= new V1LabelSelectorBuilder(namespaceSelector); _visitables.get("namespaceSelector").add(this.namespaceSelector);} else { this.namespaceSelector = null; _visitables.get("namespaceSelector").remove(this.namespaceSelector); } return (A) this; - } - public Boolean hasNamespaceSelector() { - return this.namespaceSelector != null; - } - public V1NetworkPolicyPeerFluentImpl.NamespaceSelectorNested withNewNamespaceSelector() { - return new V1NetworkPolicyPeerFluentImpl.NamespaceSelectorNestedImpl(); - } - public V1NetworkPolicyPeerFluentImpl.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { - return new V1NetworkPolicyPeerFluentImpl.NamespaceSelectorNestedImpl(item); - } - public V1NetworkPolicyPeerFluentImpl.NamespaceSelectorNested editNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector()); - } - public V1NetworkPolicyPeerFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): new V1LabelSelectorBuilder().build()); - } - public V1NetworkPolicyPeerFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): item); - } - - /** - * This method has been deprecated, please use method buildPodSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getPodSelector() { - return this.podSelector!=null ?this.podSelector.build():null; - } - public V1LabelSelector buildPodSelector() { - return this.podSelector!=null ?this.podSelector.build():null; - } - public A withPodSelector(V1LabelSelector podSelector) { - _visitables.get("podSelector").remove(this.podSelector); - if (podSelector!=null){ this.podSelector= new V1LabelSelectorBuilder(podSelector); _visitables.get("podSelector").add(this.podSelector);} else { this.podSelector = null; _visitables.get("podSelector").remove(this.podSelector); } return (A) this; - } - public Boolean hasPodSelector() { - return this.podSelector != null; - } - public V1NetworkPolicyPeerFluentImpl.PodSelectorNested withNewPodSelector() { - return new V1NetworkPolicyPeerFluentImpl.PodSelectorNestedImpl(); - } - public V1NetworkPolicyPeerFluentImpl.PodSelectorNested withNewPodSelectorLike(V1LabelSelector item) { - return new V1NetworkPolicyPeerFluentImpl.PodSelectorNestedImpl(item); - } - public V1NetworkPolicyPeerFluentImpl.PodSelectorNested editPodSelector() { - return withNewPodSelectorLike(getPodSelector()); - } - public V1NetworkPolicyPeerFluentImpl.PodSelectorNested editOrNewPodSelector() { - return withNewPodSelectorLike(getPodSelector() != null ? getPodSelector(): new V1LabelSelectorBuilder().build()); - } - public V1NetworkPolicyPeerFluentImpl.PodSelectorNested editOrNewPodSelectorLike(V1LabelSelector item) { - return withNewPodSelectorLike(getPodSelector() != null ? getPodSelector(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NetworkPolicyPeerFluentImpl that = (V1NetworkPolicyPeerFluentImpl) o; - if (!java.util.Objects.equals(ipBlock, that.ipBlock)) return false; - - if (!java.util.Objects.equals(namespaceSelector, that.namespaceSelector)) return false; - - if (!java.util.Objects.equals(podSelector, that.podSelector)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(ipBlock, namespaceSelector, podSelector, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (ipBlock != null) { sb.append("ipBlock:"); sb.append(ipBlock + ","); } - if (namespaceSelector != null) { sb.append("namespaceSelector:"); sb.append(namespaceSelector + ","); } - if (podSelector != null) { sb.append("podSelector:"); sb.append(podSelector); } - sb.append("}"); - return sb.toString(); - } - class IpBlockNestedImpl extends V1IPBlockFluentImpl> implements V1NetworkPolicyPeerFluentImpl.IpBlockNested,Nested{ - IpBlockNestedImpl(V1IPBlock item) { - this.builder = new V1IPBlockBuilder(this, item); - } - IpBlockNestedImpl() { - this.builder = new V1IPBlockBuilder(this); - } - V1IPBlockBuilder builder; - public N and() { - return (N) V1NetworkPolicyPeerFluentImpl.this.withIpBlock(builder.build()); - } - public N endIpBlock() { - return and(); - } - - } - class NamespaceSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1NetworkPolicyPeerFluentImpl.NamespaceSelectorNested,Nested{ - NamespaceSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - NamespaceSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1NetworkPolicyPeerFluentImpl.this.withNamespaceSelector(builder.build()); - } - public N endNamespaceSelector() { - return and(); - } - - } - class PodSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1NetworkPolicyPeerFluentImpl.PodSelectorNested,Nested{ - PodSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - PodSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1NetworkPolicyPeerFluentImpl.this.withPodSelector(builder.build()); - } - public N endPodSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortBuilder.java index 4e2274a2d7..1cf86692d1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NetworkPolicyPortBuilder extends V1NetworkPolicyPortFluentImpl implements VisitableBuilder{ +public class V1NetworkPolicyPortBuilder extends V1NetworkPolicyPortFluent implements VisitableBuilder{ public V1NetworkPolicyPortBuilder() { - this(false); - } - public V1NetworkPolicyPortBuilder(Boolean validationEnabled) { - this(new V1NetworkPolicyPort(), validationEnabled); + this(new V1NetworkPolicyPort()); } + public V1NetworkPolicyPortBuilder(V1NetworkPolicyPortFluent fluent) { - this(fluent, false); - } - public V1NetworkPolicyPortBuilder(V1NetworkPolicyPortFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NetworkPolicyPort(), validationEnabled); + this(fluent, new V1NetworkPolicyPort()); } + public V1NetworkPolicyPortBuilder(V1NetworkPolicyPortFluent fluent,V1NetworkPolicyPort instance) { - this(fluent, instance, false); - } - public V1NetworkPolicyPortBuilder(V1NetworkPolicyPortFluent fluent,V1NetworkPolicyPort instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withEndPort(instance.getEndPort()); - fluent.withPort(instance.getPort()); - fluent.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NetworkPolicyPortBuilder(V1NetworkPolicyPort instance) { - this(instance,false); - } - public V1NetworkPolicyPortBuilder(V1NetworkPolicyPort instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withEndPort(instance.getEndPort()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NetworkPolicyPortFluent fluent; - Boolean validationEnabled; + public V1NetworkPolicyPort build() { V1NetworkPolicyPort buildable = new V1NetworkPolicyPort(); buildable.setEndPort(fluent.getEndPort()); @@ -49,4 +29,5 @@ public V1NetworkPolicyPort build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortFluent.java index 96e98a43d9..9ddfbc3a83 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortFluent.java @@ -2,25 +2,106 @@ import java.lang.Integer; import io.kubernetes.client.custom.IntOrString; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NetworkPolicyPortFluent> extends Fluent{ - public Integer getEndPort(); - public A withEndPort(Integer endPort); - public Boolean hasEndPort(); - public IntOrString getPort(); - public A withPort(IntOrString port); - public Boolean hasPort(); - public A withNewPort(int value); - public A withNewPort(String value); - public String getProtocol(); - public A withProtocol(String protocol); - public Boolean hasProtocol(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NetworkPolicyPortFluent> extends BaseFluent{ + public V1NetworkPolicyPortFluent() { + } + public V1NetworkPolicyPortFluent(V1NetworkPolicyPort instance) { + this.copyInstance(instance); + } + private Integer endPort; + private IntOrString port; + private String protocol; + + protected void copyInstance(V1NetworkPolicyPort instance) { + instance = (instance != null ? instance : new V1NetworkPolicyPort()); + if (instance != null) { + this.withEndPort(instance.getEndPort()); + this.withPort(instance.getPort()); + this.withProtocol(instance.getProtocol()); + } + } + + public Integer getEndPort() { + return this.endPort; + } + + public A withEndPort(Integer endPort) { + this.endPort = endPort; + return (A) this; + } + + public boolean hasEndPort() { + return this.endPort != null; + } + + public IntOrString getPort() { + return this.port; + } + + public A withPort(IntOrString port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public A withNewPort(int value) { + return (A)withPort(new IntOrString(value)); + } + + public A withNewPort(String value) { + return (A)withPort(new IntOrString(value)); + } + + public String getProtocol() { + return this.protocol; + } + + public A withProtocol(String protocol) { + this.protocol = protocol; + return (A) this; + } + + public boolean hasProtocol() { + return this.protocol != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NetworkPolicyPortFluent that = (V1NetworkPolicyPortFluent) o; + if (!java.util.Objects.equals(endPort, that.endPort)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + if (!java.util.Objects.equals(protocol, that.protocol)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(endPort, port, protocol, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (endPort != null) { sb.append("endPort:"); sb.append(endPort + ","); } + if (port != null) { sb.append("port:"); sb.append(port + ","); } + if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortFluentImpl.java deleted file mode 100644 index 77dfc02398..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyPortFluentImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import io.kubernetes.client.custom.IntOrString; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NetworkPolicyPortFluentImpl> extends BaseFluent implements V1NetworkPolicyPortFluent{ - public V1NetworkPolicyPortFluentImpl() { - } - public V1NetworkPolicyPortFluentImpl(V1NetworkPolicyPort instance) { - if (instance != null) { - this.withEndPort(instance.getEndPort()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - } - private Integer endPort; - private IntOrString port; - private String protocol; - public Integer getEndPort() { - return this.endPort; - } - public A withEndPort(Integer endPort) { - this.endPort=endPort; return (A) this; - } - public Boolean hasEndPort() { - return this.endPort != null; - } - public IntOrString getPort() { - return this.port; - } - public A withPort(IntOrString port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public A withNewPort(int value) { - return (A)withPort(new IntOrString(value)); - } - public A withNewPort(String value) { - return (A)withPort(new IntOrString(value)); - } - public String getProtocol() { - return this.protocol; - } - public A withProtocol(String protocol) { - this.protocol=protocol; return (A) this; - } - public Boolean hasProtocol() { - return this.protocol != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NetworkPolicyPortFluentImpl that = (V1NetworkPolicyPortFluentImpl) o; - if (!java.util.Objects.equals(endPort, that.endPort)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - if (!java.util.Objects.equals(protocol, that.protocol)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(endPort, port, protocol, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (endPort != null) { sb.append("endPort:"); sb.append(endPort + ","); } - if (port != null) { sb.append("port:"); sb.append(port + ","); } - if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecBuilder.java index 5bef7066df..606047d3cf 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NetworkPolicySpecBuilder extends V1NetworkPolicySpecFluentImpl implements VisitableBuilder{ +public class V1NetworkPolicySpecBuilder extends V1NetworkPolicySpecFluent implements VisitableBuilder{ public V1NetworkPolicySpecBuilder() { - this(false); - } - public V1NetworkPolicySpecBuilder(Boolean validationEnabled) { - this(new V1NetworkPolicySpec(), validationEnabled); + this(new V1NetworkPolicySpec()); } + public V1NetworkPolicySpecBuilder(V1NetworkPolicySpecFluent fluent) { - this(fluent, false); - } - public V1NetworkPolicySpecBuilder(V1NetworkPolicySpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NetworkPolicySpec(), validationEnabled); + this(fluent, new V1NetworkPolicySpec()); } + public V1NetworkPolicySpecBuilder(V1NetworkPolicySpecFluent fluent,V1NetworkPolicySpec instance) { - this(fluent, instance, false); - } - public V1NetworkPolicySpecBuilder(V1NetworkPolicySpecFluent fluent,V1NetworkPolicySpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withEgress(instance.getEgress()); - fluent.withIngress(instance.getIngress()); - fluent.withPodSelector(instance.getPodSelector()); - fluent.withPolicyTypes(instance.getPolicyTypes()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NetworkPolicySpecBuilder(V1NetworkPolicySpec instance) { - this(instance,false); - } - public V1NetworkPolicySpecBuilder(V1NetworkPolicySpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withEgress(instance.getEgress()); - this.withIngress(instance.getIngress()); - this.withPodSelector(instance.getPodSelector()); - this.withPolicyTypes(instance.getPolicyTypes()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NetworkPolicySpecFluent fluent; - Boolean validationEnabled; + public V1NetworkPolicySpec build() { V1NetworkPolicySpec buildable = new V1NetworkPolicySpec(); - buildable.setEgress(fluent.getEgress()); - buildable.setIngress(fluent.getIngress()); - buildable.setPodSelector(fluent.getPodSelector()); + buildable.setEgress(fluent.buildEgress()); + buildable.setIngress(fluent.buildIngress()); + buildable.setPodSelector(fluent.buildPodSelector()); buildable.setPolicyTypes(fluent.getPolicyTypes()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecFluent.java index b3d32aaf15..f4c76872df 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecFluent.java @@ -1,126 +1,556 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1NetworkPolicySpecFluent> extends Fluent{ - public A addToEgress(int index,V1NetworkPolicyEgressRule item); - public A setToEgress(int index,V1NetworkPolicyEgressRule item); - public A addToEgress(io.kubernetes.client.openapi.models.V1NetworkPolicyEgressRule... items); - public A addAllToEgress(Collection items); - public A removeFromEgress(io.kubernetes.client.openapi.models.V1NetworkPolicyEgressRule... items); - public A removeAllFromEgress(Collection items); - public A removeMatchingFromEgress(Predicate predicate); - - /** - * This method has been deprecated, please use method buildEgress instead. - * @return The buildable object. - */ - @Deprecated - public List getEgress(); - public List buildEgress(); - public V1NetworkPolicyEgressRule buildEgress(int index); - public V1NetworkPolicyEgressRule buildFirstEgress(); - public V1NetworkPolicyEgressRule buildLastEgress(); - public V1NetworkPolicyEgressRule buildMatchingEgress(Predicate predicate); - public Boolean hasMatchingEgress(Predicate predicate); - public A withEgress(List egress); - public A withEgress(io.kubernetes.client.openapi.models.V1NetworkPolicyEgressRule... egress); - public Boolean hasEgress(); - public V1NetworkPolicySpecFluent.EgressNested addNewEgress(); - public V1NetworkPolicySpecFluent.EgressNested addNewEgressLike(V1NetworkPolicyEgressRule item); - public V1NetworkPolicySpecFluent.EgressNested setNewEgressLike(int index,V1NetworkPolicyEgressRule item); - public V1NetworkPolicySpecFluent.EgressNested editEgress(int index); - public V1NetworkPolicySpecFluent.EgressNested editFirstEgress(); - public V1NetworkPolicySpecFluent.EgressNested editLastEgress(); - public V1NetworkPolicySpecFluent.EgressNested editMatchingEgress(Predicate predicate); - public A addToIngress(int index,V1NetworkPolicyIngressRule item); - public A setToIngress(int index,V1NetworkPolicyIngressRule item); - public A addToIngress(io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule... items); - public A addAllToIngress(Collection items); - public A removeFromIngress(io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule... items); - public A removeAllFromIngress(Collection items); - public A removeMatchingFromIngress(Predicate predicate); - - /** - * This method has been deprecated, please use method buildIngress instead. - * @return The buildable object. - */ - @Deprecated - public List getIngress(); - public List buildIngress(); - public V1NetworkPolicyIngressRule buildIngress(int index); - public V1NetworkPolicyIngressRule buildFirstIngress(); - public V1NetworkPolicyIngressRule buildLastIngress(); - public V1NetworkPolicyIngressRule buildMatchingIngress(Predicate predicate); - public Boolean hasMatchingIngress(Predicate predicate); - public A withIngress(List ingress); - public A withIngress(io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule... ingress); - public Boolean hasIngress(); - public V1NetworkPolicySpecFluent.IngressNested addNewIngress(); - public V1NetworkPolicySpecFluent.IngressNested addNewIngressLike(V1NetworkPolicyIngressRule item); - public V1NetworkPolicySpecFluent.IngressNested setNewIngressLike(int index,V1NetworkPolicyIngressRule item); - public V1NetworkPolicySpecFluent.IngressNested editIngress(int index); - public V1NetworkPolicySpecFluent.IngressNested editFirstIngress(); - public V1NetworkPolicySpecFluent.IngressNested editLastIngress(); - public V1NetworkPolicySpecFluent.IngressNested editMatchingIngress(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPodSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getPodSelector(); - public V1LabelSelector buildPodSelector(); - public A withPodSelector(V1LabelSelector podSelector); - public Boolean hasPodSelector(); - public V1NetworkPolicySpecFluent.PodSelectorNested withNewPodSelector(); - public V1NetworkPolicySpecFluent.PodSelectorNested withNewPodSelectorLike(V1LabelSelector item); - public V1NetworkPolicySpecFluent.PodSelectorNested editPodSelector(); - public V1NetworkPolicySpecFluent.PodSelectorNested editOrNewPodSelector(); - public V1NetworkPolicySpecFluent.PodSelectorNested editOrNewPodSelectorLike(V1LabelSelector item); - public A addToPolicyTypes(int index,String item); - public A setToPolicyTypes(int index,String item); - public A addToPolicyTypes(java.lang.String... items); - public A addAllToPolicyTypes(Collection items); - public A removeFromPolicyTypes(java.lang.String... items); - public A removeAllFromPolicyTypes(Collection items); - public List getPolicyTypes(); - public String getPolicyType(int index); - public String getFirstPolicyType(); - public String getLastPolicyType(); - public String getMatchingPolicyType(Predicate predicate); - public Boolean hasMatchingPolicyType(Predicate predicate); - public A withPolicyTypes(List policyTypes); - public A withPolicyTypes(java.lang.String... policyTypes); - public Boolean hasPolicyTypes(); - public interface EgressNested extends Nested,V1NetworkPolicyEgressRuleFluent>{ - public N and(); - public N endEgress(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NetworkPolicySpecFluent> extends BaseFluent{ + public V1NetworkPolicySpecFluent() { + } + + public V1NetworkPolicySpecFluent(V1NetworkPolicySpec instance) { + this.copyInstance(instance); + } + private ArrayList egress; + private ArrayList ingress; + private V1LabelSelectorBuilder podSelector; + private List policyTypes; + + protected void copyInstance(V1NetworkPolicySpec instance) { + instance = (instance != null ? instance : new V1NetworkPolicySpec()); + if (instance != null) { + this.withEgress(instance.getEgress()); + this.withIngress(instance.getIngress()); + this.withPodSelector(instance.getPodSelector()); + this.withPolicyTypes(instance.getPolicyTypes()); + } + } + + public A addToEgress(int index,V1NetworkPolicyEgressRule item) { + if (this.egress == null) {this.egress = new ArrayList();} + V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item); + if (index < 0 || index >= egress.size()) { _visitables.get("egress").add(builder); egress.add(builder); } else { _visitables.get("egress").add(index, builder); egress.add(index, builder);} + return (A)this; + } + + public A setToEgress(int index,V1NetworkPolicyEgressRule item) { + if (this.egress == null) {this.egress = new ArrayList();} + V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item); + if (index < 0 || index >= egress.size()) { _visitables.get("egress").add(builder); egress.add(builder); } else { _visitables.get("egress").set(index, builder); egress.set(index, builder);} + return (A)this; + } + + public A addToEgress(io.kubernetes.client.openapi.models.V1NetworkPolicyEgressRule... items) { + if (this.egress == null) {this.egress = new ArrayList();} + for (V1NetworkPolicyEgressRule item : items) {V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item);_visitables.get("egress").add(builder);this.egress.add(builder);} return (A)this; + } + + public A addAllToEgress(Collection items) { + if (this.egress == null) {this.egress = new ArrayList();} + for (V1NetworkPolicyEgressRule item : items) {V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item);_visitables.get("egress").add(builder);this.egress.add(builder);} return (A)this; + } + + public A removeFromEgress(io.kubernetes.client.openapi.models.V1NetworkPolicyEgressRule... items) { + if (this.egress == null) return (A)this; + for (V1NetworkPolicyEgressRule item : items) {V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item);_visitables.get("egress").remove(builder); this.egress.remove(builder);} return (A)this; + } + + public A removeAllFromEgress(Collection items) { + if (this.egress == null) return (A)this; + for (V1NetworkPolicyEgressRule item : items) {V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item);_visitables.get("egress").remove(builder); this.egress.remove(builder);} return (A)this; + } + + public A removeMatchingFromEgress(Predicate predicate) { + if (egress == null) return (A) this; + final Iterator each = egress.iterator(); + final List visitables = _visitables.get("egress"); + while (each.hasNext()) { + V1NetworkPolicyEgressRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildEgress() { + return this.egress != null ? build(egress) : null; + } + + public V1NetworkPolicyEgressRule buildEgress(int index) { + return this.egress.get(index).build(); + } + + public V1NetworkPolicyEgressRule buildFirstEgress() { + return this.egress.get(0).build(); + } + + public V1NetworkPolicyEgressRule buildLastEgress() { + return this.egress.get(egress.size() - 1).build(); + } + + public V1NetworkPolicyEgressRule buildMatchingEgress(Predicate predicate) { + for (V1NetworkPolicyEgressRuleBuilder item : egress) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingEgress(Predicate predicate) { + for (V1NetworkPolicyEgressRuleBuilder item : egress) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withEgress(List egress) { + if (this.egress != null) { + this._visitables.get("egress").clear(); + } + if (egress != null) { + this.egress = new ArrayList(); + for (V1NetworkPolicyEgressRule item : egress) { + this.addToEgress(item); + } + } else { + this.egress = null; + } + return (A) this; + } + + public A withEgress(io.kubernetes.client.openapi.models.V1NetworkPolicyEgressRule... egress) { + if (this.egress != null) { + this.egress.clear(); + _visitables.remove("egress"); + } + if (egress != null) { + for (V1NetworkPolicyEgressRule item : egress) { + this.addToEgress(item); + } + } + return (A) this; + } + + public boolean hasEgress() { + return this.egress != null && !this.egress.isEmpty(); + } + + public EgressNested addNewEgress() { + return new EgressNested(-1, null); + } + + public EgressNested addNewEgressLike(V1NetworkPolicyEgressRule item) { + return new EgressNested(-1, item); + } + + public EgressNested setNewEgressLike(int index,V1NetworkPolicyEgressRule item) { + return new EgressNested(index, item); + } + + public EgressNested editEgress(int index) { + if (egress.size() <= index) throw new RuntimeException("Can't edit egress. Index exceeds size."); + return setNewEgressLike(index, buildEgress(index)); + } + + public EgressNested editFirstEgress() { + if (egress.size() == 0) throw new RuntimeException("Can't edit first egress. The list is empty."); + return setNewEgressLike(0, buildEgress(0)); + } + + public EgressNested editLastEgress() { + int index = egress.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last egress. The list is empty."); + return setNewEgressLike(index, buildEgress(index)); + } + + public EgressNested editMatchingEgress(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item); + if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").add(index, builder); ingress.add(index, builder);} + return (A)this; + } + + public A setToIngress(int index,V1NetworkPolicyIngressRule item) { + if (this.ingress == null) {this.ingress = new ArrayList();} + V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item); + if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").set(index, builder); ingress.set(index, builder);} + return (A)this; + } + + public A addToIngress(io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule... items) { + if (this.ingress == null) {this.ingress = new ArrayList();} + for (V1NetworkPolicyIngressRule item : items) {V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; + } + + public A addAllToIngress(Collection items) { + if (this.ingress == null) {this.ingress = new ArrayList();} + for (V1NetworkPolicyIngressRule item : items) {V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; + } + + public A removeFromIngress(io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule... items) { + if (this.ingress == null) return (A)this; + for (V1NetworkPolicyIngressRule item : items) {V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item);_visitables.get("ingress").remove(builder); this.ingress.remove(builder);} return (A)this; + } + + public A removeAllFromIngress(Collection items) { + if (this.ingress == null) return (A)this; + for (V1NetworkPolicyIngressRule item : items) {V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item);_visitables.get("ingress").remove(builder); this.ingress.remove(builder);} return (A)this; + } + + public A removeMatchingFromIngress(Predicate predicate) { + if (ingress == null) return (A) this; + final Iterator each = ingress.iterator(); + final List visitables = _visitables.get("ingress"); + while (each.hasNext()) { + V1NetworkPolicyIngressRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildIngress() { + return this.ingress != null ? build(ingress) : null; + } + + public V1NetworkPolicyIngressRule buildIngress(int index) { + return this.ingress.get(index).build(); + } + + public V1NetworkPolicyIngressRule buildFirstIngress() { + return this.ingress.get(0).build(); + } + + public V1NetworkPolicyIngressRule buildLastIngress() { + return this.ingress.get(ingress.size() - 1).build(); + } + + public V1NetworkPolicyIngressRule buildMatchingIngress(Predicate predicate) { + for (V1NetworkPolicyIngressRuleBuilder item : ingress) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingIngress(Predicate predicate) { + for (V1NetworkPolicyIngressRuleBuilder item : ingress) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withIngress(List ingress) { + if (this.ingress != null) { + this._visitables.get("ingress").clear(); + } + if (ingress != null) { + this.ingress = new ArrayList(); + for (V1NetworkPolicyIngressRule item : ingress) { + this.addToIngress(item); + } + } else { + this.ingress = null; + } + return (A) this; } - public interface IngressNested extends Nested,V1NetworkPolicyIngressRuleFluent>{ - public N and(); - public N endIngress(); + + public A withIngress(io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule... ingress) { + if (this.ingress != null) { + this.ingress.clear(); + _visitables.remove("ingress"); + } + if (ingress != null) { + for (V1NetworkPolicyIngressRule item : ingress) { + this.addToIngress(item); + } + } + return (A) this; + } + + public boolean hasIngress() { + return this.ingress != null && !this.ingress.isEmpty(); + } + + public IngressNested addNewIngress() { + return new IngressNested(-1, null); + } + + public IngressNested addNewIngressLike(V1NetworkPolicyIngressRule item) { + return new IngressNested(-1, item); + } + + public IngressNested setNewIngressLike(int index,V1NetworkPolicyIngressRule item) { + return new IngressNested(index, item); + } + + public IngressNested editIngress(int index) { + if (ingress.size() <= index) throw new RuntimeException("Can't edit ingress. Index exceeds size."); + return setNewIngressLike(index, buildIngress(index)); + } + + public IngressNested editFirstIngress() { + if (ingress.size() == 0) throw new RuntimeException("Can't edit first ingress. The list is empty."); + return setNewIngressLike(0, buildIngress(0)); + } + + public IngressNested editLastIngress() { + int index = ingress.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ingress. The list is empty."); + return setNewIngressLike(index, buildIngress(index)); + } + + public IngressNested editMatchingIngress(Predicate predicate) { + int index = -1; + for (int i=0;i withNewPodSelector() { + return new PodSelectorNested(null); + } + + public PodSelectorNested withNewPodSelectorLike(V1LabelSelector item) { + return new PodSelectorNested(item); + } + + public PodSelectorNested editPodSelector() { + return withNewPodSelectorLike(java.util.Optional.ofNullable(buildPodSelector()).orElse(null)); + } + + public PodSelectorNested editOrNewPodSelector() { + return withNewPodSelectorLike(java.util.Optional.ofNullable(buildPodSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public PodSelectorNested editOrNewPodSelectorLike(V1LabelSelector item) { + return withNewPodSelectorLike(java.util.Optional.ofNullable(buildPodSelector()).orElse(item)); + } + + public A addToPolicyTypes(int index,String item) { + if (this.policyTypes == null) {this.policyTypes = new ArrayList();} + this.policyTypes.add(index, item); + return (A)this; + } + + public A setToPolicyTypes(int index,String item) { + if (this.policyTypes == null) {this.policyTypes = new ArrayList();} + this.policyTypes.set(index, item); return (A)this; + } + + public A addToPolicyTypes(java.lang.String... items) { + if (this.policyTypes == null) {this.policyTypes = new ArrayList();} + for (String item : items) {this.policyTypes.add(item);} return (A)this; + } + + public A addAllToPolicyTypes(Collection items) { + if (this.policyTypes == null) {this.policyTypes = new ArrayList();} + for (String item : items) {this.policyTypes.add(item);} return (A)this; + } + + public A removeFromPolicyTypes(java.lang.String... items) { + if (this.policyTypes == null) return (A)this; + for (String item : items) { this.policyTypes.remove(item);} return (A)this; + } + + public A removeAllFromPolicyTypes(Collection items) { + if (this.policyTypes == null) return (A)this; + for (String item : items) { this.policyTypes.remove(item);} return (A)this; + } + + public List getPolicyTypes() { + return this.policyTypes; + } + + public String getPolicyType(int index) { + return this.policyTypes.get(index); + } + + public String getFirstPolicyType() { + return this.policyTypes.get(0); + } + + public String getLastPolicyType() { + return this.policyTypes.get(policyTypes.size() - 1); + } + + public String getMatchingPolicyType(Predicate predicate) { + for (String item : policyTypes) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingPolicyType(Predicate predicate) { + for (String item : policyTypes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPolicyTypes(List policyTypes) { + if (policyTypes != null) { + this.policyTypes = new ArrayList(); + for (String item : policyTypes) { + this.addToPolicyTypes(item); + } + } else { + this.policyTypes = null; + } + return (A) this; + } + + public A withPolicyTypes(java.lang.String... policyTypes) { + if (this.policyTypes != null) { + this.policyTypes.clear(); + _visitables.remove("policyTypes"); + } + if (policyTypes != null) { + for (String item : policyTypes) { + this.addToPolicyTypes(item); + } + } + return (A) this; + } + + public boolean hasPolicyTypes() { + return this.policyTypes != null && !this.policyTypes.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NetworkPolicySpecFluent that = (V1NetworkPolicySpecFluent) o; + if (!java.util.Objects.equals(egress, that.egress)) return false; + if (!java.util.Objects.equals(ingress, that.ingress)) return false; + if (!java.util.Objects.equals(podSelector, that.podSelector)) return false; + if (!java.util.Objects.equals(policyTypes, that.policyTypes)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(egress, ingress, podSelector, policyTypes, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (egress != null && !egress.isEmpty()) { sb.append("egress:"); sb.append(egress + ","); } + if (ingress != null && !ingress.isEmpty()) { sb.append("ingress:"); sb.append(ingress + ","); } + if (podSelector != null) { sb.append("podSelector:"); sb.append(podSelector + ","); } + if (policyTypes != null && !policyTypes.isEmpty()) { sb.append("policyTypes:"); sb.append(policyTypes); } + sb.append("}"); + return sb.toString(); + } + public class EgressNested extends V1NetworkPolicyEgressRuleFluent> implements Nested{ + EgressNested(int index,V1NetworkPolicyEgressRule item) { + this.index = index; + this.builder = new V1NetworkPolicyEgressRuleBuilder(this, item); + } + V1NetworkPolicyEgressRuleBuilder builder; + int index; + + public N and() { + return (N) V1NetworkPolicySpecFluent.this.setToEgress(index,builder.build()); + } + public N endEgress() { + return and(); + } + + } - public interface PodSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endPodSelector(); + public class IngressNested extends V1NetworkPolicyIngressRuleFluent> implements Nested{ + IngressNested(int index,V1NetworkPolicyIngressRule item) { + this.index = index; + this.builder = new V1NetworkPolicyIngressRuleBuilder(this, item); + } + V1NetworkPolicyIngressRuleBuilder builder; + int index; + + public N and() { + return (N) V1NetworkPolicySpecFluent.this.setToIngress(index,builder.build()); + } + public N endIngress() { + return and(); + } + + } + public class PodSelectorNested extends V1LabelSelectorFluent> implements Nested{ + PodSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1NetworkPolicySpecFluent.this.withPodSelector(builder.build()); + } + + public N endPodSelector() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecFluentImpl.java deleted file mode 100644 index 292d3b63ea..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicySpecFluentImpl.java +++ /dev/null @@ -1,418 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NetworkPolicySpecFluentImpl> extends BaseFluent implements V1NetworkPolicySpecFluent{ - public V1NetworkPolicySpecFluentImpl() { - } - public V1NetworkPolicySpecFluentImpl(V1NetworkPolicySpec instance) { - if (instance != null) { - this.withEgress(instance.getEgress()); - this.withIngress(instance.getIngress()); - this.withPodSelector(instance.getPodSelector()); - this.withPolicyTypes(instance.getPolicyTypes()); - } - } - private ArrayList egress; - private ArrayList ingress; - private V1LabelSelectorBuilder podSelector; - private List policyTypes; - public A addToEgress(int index,V1NetworkPolicyEgressRule item) { - if (this.egress == null) {this.egress = new ArrayList();} - V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item); - if (index < 0 || index >= egress.size()) { _visitables.get("egress").add(builder); egress.add(builder); } else { _visitables.get("egress").add(index, builder); egress.add(index, builder);} - return (A)this; - } - public A setToEgress(int index,V1NetworkPolicyEgressRule item) { - if (this.egress == null) {this.egress = new ArrayList();} - V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item); - if (index < 0 || index >= egress.size()) { _visitables.get("egress").add(builder); egress.add(builder); } else { _visitables.get("egress").set(index, builder); egress.set(index, builder);} - return (A)this; - } - public A addToEgress(io.kubernetes.client.openapi.models.V1NetworkPolicyEgressRule... items) { - if (this.egress == null) {this.egress = new ArrayList();} - for (V1NetworkPolicyEgressRule item : items) {V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item);_visitables.get("egress").add(builder);this.egress.add(builder);} return (A)this; - } - public A addAllToEgress(Collection items) { - if (this.egress == null) {this.egress = new ArrayList();} - for (V1NetworkPolicyEgressRule item : items) {V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item);_visitables.get("egress").add(builder);this.egress.add(builder);} return (A)this; - } - public A removeFromEgress(io.kubernetes.client.openapi.models.V1NetworkPolicyEgressRule... items) { - for (V1NetworkPolicyEgressRule item : items) {V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item);_visitables.get("egress").remove(builder);if (this.egress != null) {this.egress.remove(builder);}} return (A)this; - } - public A removeAllFromEgress(Collection items) { - for (V1NetworkPolicyEgressRule item : items) {V1NetworkPolicyEgressRuleBuilder builder = new V1NetworkPolicyEgressRuleBuilder(item);_visitables.get("egress").remove(builder);if (this.egress != null) {this.egress.remove(builder);}} return (A)this; - } - public A removeMatchingFromEgress(Predicate predicate) { - if (egress == null) return (A) this; - final Iterator each = egress.iterator(); - final List visitables = _visitables.get("egress"); - while (each.hasNext()) { - V1NetworkPolicyEgressRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildEgress instead. - * @return The buildable object. - */ - @Deprecated - public List getEgress() { - return egress != null ? build(egress) : null; - } - public List buildEgress() { - return egress != null ? build(egress) : null; - } - public V1NetworkPolicyEgressRule buildEgress(int index) { - return this.egress.get(index).build(); - } - public V1NetworkPolicyEgressRule buildFirstEgress() { - return this.egress.get(0).build(); - } - public V1NetworkPolicyEgressRule buildLastEgress() { - return this.egress.get(egress.size() - 1).build(); - } - public V1NetworkPolicyEgressRule buildMatchingEgress(Predicate predicate) { - for (V1NetworkPolicyEgressRuleBuilder item: egress) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingEgress(Predicate predicate) { - for (V1NetworkPolicyEgressRuleBuilder item: egress) { if(predicate.test(item)){ return true;} } return false; - } - public A withEgress(List egress) { - if (this.egress != null) { _visitables.get("egress").clear();} - if (egress != null) {this.egress = new ArrayList(); for (V1NetworkPolicyEgressRule item : egress){this.addToEgress(item);}} else { this.egress = null;} return (A) this; - } - public A withEgress(io.kubernetes.client.openapi.models.V1NetworkPolicyEgressRule... egress) { - if (this.egress != null) {this.egress.clear(); _visitables.remove("egress"); } - if (egress != null) {for (V1NetworkPolicyEgressRule item :egress){ this.addToEgress(item);}} return (A) this; - } - public Boolean hasEgress() { - return egress != null && !egress.isEmpty(); - } - public V1NetworkPolicySpecFluentImpl.EgressNested addNewEgress() { - return new V1NetworkPolicySpecFluentImpl.EgressNestedImpl(); - } - public V1NetworkPolicySpecFluentImpl.EgressNested addNewEgressLike(V1NetworkPolicyEgressRule item) { - return new V1NetworkPolicySpecFluentImpl.EgressNestedImpl(-1, item); - } - public V1NetworkPolicySpecFluentImpl.EgressNested setNewEgressLike(int index,V1NetworkPolicyEgressRule item) { - return new V1NetworkPolicySpecFluentImpl.EgressNestedImpl(index, item); - } - public V1NetworkPolicySpecFluentImpl.EgressNested editEgress(int index) { - if (egress.size() <= index) throw new RuntimeException("Can't edit egress. Index exceeds size."); - return setNewEgressLike(index, buildEgress(index)); - } - public V1NetworkPolicySpecFluentImpl.EgressNested editFirstEgress() { - if (egress.size() == 0) throw new RuntimeException("Can't edit first egress. The list is empty."); - return setNewEgressLike(0, buildEgress(0)); - } - public V1NetworkPolicySpecFluentImpl.EgressNested editLastEgress() { - int index = egress.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last egress. The list is empty."); - return setNewEgressLike(index, buildEgress(index)); - } - public V1NetworkPolicySpecFluentImpl.EgressNested editMatchingEgress(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item); - if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").add(index, builder); ingress.add(index, builder);} - return (A)this; - } - public A setToIngress(int index,V1NetworkPolicyIngressRule item) { - if (this.ingress == null) {this.ingress = new ArrayList();} - V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item); - if (index < 0 || index >= ingress.size()) { _visitables.get("ingress").add(builder); ingress.add(builder); } else { _visitables.get("ingress").set(index, builder); ingress.set(index, builder);} - return (A)this; - } - public A addToIngress(io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule... items) { - if (this.ingress == null) {this.ingress = new ArrayList();} - for (V1NetworkPolicyIngressRule item : items) {V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; - } - public A addAllToIngress(Collection items) { - if (this.ingress == null) {this.ingress = new ArrayList();} - for (V1NetworkPolicyIngressRule item : items) {V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item);_visitables.get("ingress").add(builder);this.ingress.add(builder);} return (A)this; - } - public A removeFromIngress(io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule... items) { - for (V1NetworkPolicyIngressRule item : items) {V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item);_visitables.get("ingress").remove(builder);if (this.ingress != null) {this.ingress.remove(builder);}} return (A)this; - } - public A removeAllFromIngress(Collection items) { - for (V1NetworkPolicyIngressRule item : items) {V1NetworkPolicyIngressRuleBuilder builder = new V1NetworkPolicyIngressRuleBuilder(item);_visitables.get("ingress").remove(builder);if (this.ingress != null) {this.ingress.remove(builder);}} return (A)this; - } - public A removeMatchingFromIngress(Predicate predicate) { - if (ingress == null) return (A) this; - final Iterator each = ingress.iterator(); - final List visitables = _visitables.get("ingress"); - while (each.hasNext()) { - V1NetworkPolicyIngressRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildIngress instead. - * @return The buildable object. - */ - @Deprecated - public List getIngress() { - return ingress != null ? build(ingress) : null; - } - public List buildIngress() { - return ingress != null ? build(ingress) : null; - } - public V1NetworkPolicyIngressRule buildIngress(int index) { - return this.ingress.get(index).build(); - } - public V1NetworkPolicyIngressRule buildFirstIngress() { - return this.ingress.get(0).build(); - } - public V1NetworkPolicyIngressRule buildLastIngress() { - return this.ingress.get(ingress.size() - 1).build(); - } - public V1NetworkPolicyIngressRule buildMatchingIngress(Predicate predicate) { - for (V1NetworkPolicyIngressRuleBuilder item: ingress) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingIngress(Predicate predicate) { - for (V1NetworkPolicyIngressRuleBuilder item: ingress) { if(predicate.test(item)){ return true;} } return false; - } - public A withIngress(List ingress) { - if (this.ingress != null) { _visitables.get("ingress").clear();} - if (ingress != null) {this.ingress = new ArrayList(); for (V1NetworkPolicyIngressRule item : ingress){this.addToIngress(item);}} else { this.ingress = null;} return (A) this; - } - public A withIngress(io.kubernetes.client.openapi.models.V1NetworkPolicyIngressRule... ingress) { - if (this.ingress != null) {this.ingress.clear(); _visitables.remove("ingress"); } - if (ingress != null) {for (V1NetworkPolicyIngressRule item :ingress){ this.addToIngress(item);}} return (A) this; - } - public Boolean hasIngress() { - return ingress != null && !ingress.isEmpty(); - } - public V1NetworkPolicySpecFluentImpl.IngressNested addNewIngress() { - return new V1NetworkPolicySpecFluentImpl.IngressNestedImpl(); - } - public V1NetworkPolicySpecFluentImpl.IngressNested addNewIngressLike(V1NetworkPolicyIngressRule item) { - return new V1NetworkPolicySpecFluentImpl.IngressNestedImpl(-1, item); - } - public V1NetworkPolicySpecFluentImpl.IngressNested setNewIngressLike(int index,V1NetworkPolicyIngressRule item) { - return new V1NetworkPolicySpecFluentImpl.IngressNestedImpl(index, item); - } - public V1NetworkPolicySpecFluentImpl.IngressNested editIngress(int index) { - if (ingress.size() <= index) throw new RuntimeException("Can't edit ingress. Index exceeds size."); - return setNewIngressLike(index, buildIngress(index)); - } - public V1NetworkPolicySpecFluentImpl.IngressNested editFirstIngress() { - if (ingress.size() == 0) throw new RuntimeException("Can't edit first ingress. The list is empty."); - return setNewIngressLike(0, buildIngress(0)); - } - public V1NetworkPolicySpecFluentImpl.IngressNested editLastIngress() { - int index = ingress.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ingress. The list is empty."); - return setNewIngressLike(index, buildIngress(index)); - } - public V1NetworkPolicySpecFluentImpl.IngressNested editMatchingIngress(Predicate predicate) { - int index = -1; - for (int i=0;i withNewPodSelector() { - return new V1NetworkPolicySpecFluentImpl.PodSelectorNestedImpl(); - } - public V1NetworkPolicySpecFluentImpl.PodSelectorNested withNewPodSelectorLike(V1LabelSelector item) { - return new V1NetworkPolicySpecFluentImpl.PodSelectorNestedImpl(item); - } - public V1NetworkPolicySpecFluentImpl.PodSelectorNested editPodSelector() { - return withNewPodSelectorLike(getPodSelector()); - } - public V1NetworkPolicySpecFluentImpl.PodSelectorNested editOrNewPodSelector() { - return withNewPodSelectorLike(getPodSelector() != null ? getPodSelector(): new V1LabelSelectorBuilder().build()); - } - public V1NetworkPolicySpecFluentImpl.PodSelectorNested editOrNewPodSelectorLike(V1LabelSelector item) { - return withNewPodSelectorLike(getPodSelector() != null ? getPodSelector(): item); - } - public A addToPolicyTypes(int index,String item) { - if (this.policyTypes == null) {this.policyTypes = new ArrayList();} - this.policyTypes.add(index, item); - return (A)this; - } - public A setToPolicyTypes(int index,String item) { - if (this.policyTypes == null) {this.policyTypes = new ArrayList();} - this.policyTypes.set(index, item); return (A)this; - } - public A addToPolicyTypes(java.lang.String... items) { - if (this.policyTypes == null) {this.policyTypes = new ArrayList();} - for (String item : items) {this.policyTypes.add(item);} return (A)this; - } - public A addAllToPolicyTypes(Collection items) { - if (this.policyTypes == null) {this.policyTypes = new ArrayList();} - for (String item : items) {this.policyTypes.add(item);} return (A)this; - } - public A removeFromPolicyTypes(java.lang.String... items) { - for (String item : items) {if (this.policyTypes!= null){ this.policyTypes.remove(item);}} return (A)this; - } - public A removeAllFromPolicyTypes(Collection items) { - for (String item : items) {if (this.policyTypes!= null){ this.policyTypes.remove(item);}} return (A)this; - } - public List getPolicyTypes() { - return this.policyTypes; - } - public String getPolicyType(int index) { - return this.policyTypes.get(index); - } - public String getFirstPolicyType() { - return this.policyTypes.get(0); - } - public String getLastPolicyType() { - return this.policyTypes.get(policyTypes.size() - 1); - } - public String getMatchingPolicyType(Predicate predicate) { - for (String item: policyTypes) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingPolicyType(Predicate predicate) { - for (String item: policyTypes) { if(predicate.test(item)){ return true;} } return false; - } - public A withPolicyTypes(List policyTypes) { - if (policyTypes != null) {this.policyTypes = new ArrayList(); for (String item : policyTypes){this.addToPolicyTypes(item);}} else { this.policyTypes = null;} return (A) this; - } - public A withPolicyTypes(java.lang.String... policyTypes) { - if (this.policyTypes != null) {this.policyTypes.clear(); _visitables.remove("policyTypes"); } - if (policyTypes != null) {for (String item :policyTypes){ this.addToPolicyTypes(item);}} return (A) this; - } - public Boolean hasPolicyTypes() { - return policyTypes != null && !policyTypes.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NetworkPolicySpecFluentImpl that = (V1NetworkPolicySpecFluentImpl) o; - if (!java.util.Objects.equals(egress, that.egress)) return false; - - if (!java.util.Objects.equals(ingress, that.ingress)) return false; - - if (!java.util.Objects.equals(podSelector, that.podSelector)) return false; - - if (!java.util.Objects.equals(policyTypes, that.policyTypes)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(egress, ingress, podSelector, policyTypes, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (egress != null) { sb.append("egress:"); sb.append(egress + ","); } - if (ingress != null) { sb.append("ingress:"); sb.append(ingress + ","); } - if (podSelector != null) { sb.append("podSelector:"); sb.append(podSelector + ","); } - if (policyTypes != null && !policyTypes.isEmpty()) { sb.append("policyTypes:"); sb.append(policyTypes); } - sb.append("}"); - return sb.toString(); - } - class EgressNestedImpl extends V1NetworkPolicyEgressRuleFluentImpl> implements V1NetworkPolicySpecFluentImpl.EgressNested,Nested{ - EgressNestedImpl(int index,V1NetworkPolicyEgressRule item) { - this.index = index; - this.builder = new V1NetworkPolicyEgressRuleBuilder(this, item); - } - EgressNestedImpl() { - this.index = -1; - this.builder = new V1NetworkPolicyEgressRuleBuilder(this); - } - V1NetworkPolicyEgressRuleBuilder builder; - int index; - public N and() { - return (N) V1NetworkPolicySpecFluentImpl.this.setToEgress(index,builder.build()); - } - public N endEgress() { - return and(); - } - - } - class IngressNestedImpl extends V1NetworkPolicyIngressRuleFluentImpl> implements V1NetworkPolicySpecFluentImpl.IngressNested,Nested{ - IngressNestedImpl(int index,V1NetworkPolicyIngressRule item) { - this.index = index; - this.builder = new V1NetworkPolicyIngressRuleBuilder(this, item); - } - IngressNestedImpl() { - this.index = -1; - this.builder = new V1NetworkPolicyIngressRuleBuilder(this); - } - V1NetworkPolicyIngressRuleBuilder builder; - int index; - public N and() { - return (N) V1NetworkPolicySpecFluentImpl.this.setToIngress(index,builder.build()); - } - public N endIngress() { - return and(); - } - - } - class PodSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1NetworkPolicySpecFluentImpl.PodSelectorNested,Nested{ - PodSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - PodSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1NetworkPolicySpecFluentImpl.this.withPodSelector(builder.build()); - } - public N endPodSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusBuilder.java deleted file mode 100644 index 8bb75460db..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NetworkPolicyStatusBuilder extends V1NetworkPolicyStatusFluentImpl implements VisitableBuilder{ - public V1NetworkPolicyStatusBuilder() { - this(false); - } - public V1NetworkPolicyStatusBuilder(Boolean validationEnabled) { - this(new V1NetworkPolicyStatus(), validationEnabled); - } - public V1NetworkPolicyStatusBuilder(V1NetworkPolicyStatusFluent fluent) { - this(fluent, false); - } - public V1NetworkPolicyStatusBuilder(V1NetworkPolicyStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NetworkPolicyStatus(), validationEnabled); - } - public V1NetworkPolicyStatusBuilder(V1NetworkPolicyStatusFluent fluent,V1NetworkPolicyStatus instance) { - this(fluent, instance, false); - } - public V1NetworkPolicyStatusBuilder(V1NetworkPolicyStatusFluent fluent,V1NetworkPolicyStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; - } - public V1NetworkPolicyStatusBuilder(V1NetworkPolicyStatus instance) { - this(instance,false); - } - public V1NetworkPolicyStatusBuilder(V1NetworkPolicyStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; - } - V1NetworkPolicyStatusFluent fluent; - Boolean validationEnabled; - public V1NetworkPolicyStatus build() { - V1NetworkPolicyStatus buildable = new V1NetworkPolicyStatus(); - buildable.setConditions(fluent.getConditions()); - return buildable; - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusFluent.java deleted file mode 100644 index b14661f9f6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusFluent.java +++ /dev/null @@ -1,55 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.util.function.Predicate; -import java.lang.Deprecated; -import java.util.Iterator; -import java.util.Collection; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ -public interface V1NetworkPolicyStatusFluent> extends Fluent{ - public A addToConditions(int index,V1Condition item); - public A setToConditions(int index,V1Condition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1Condition buildCondition(int index); - public V1Condition buildFirstCondition(); - public V1Condition buildLastCondition(); - public V1Condition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions); - public Boolean hasConditions(); - public V1NetworkPolicyStatusFluent.ConditionsNested addNewCondition(); - public V1NetworkPolicyStatusFluent.ConditionsNested addNewConditionLike(V1Condition item); - public V1NetworkPolicyStatusFluent.ConditionsNested setNewConditionLike(int index,V1Condition item); - public V1NetworkPolicyStatusFluent.ConditionsNested editCondition(int index); - public V1NetworkPolicyStatusFluent.ConditionsNested editFirstCondition(); - public V1NetworkPolicyStatusFluent.ConditionsNested editLastCondition(); - public V1NetworkPolicyStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public interface ConditionsNested extends Nested,V1ConditionFluent>{ - public N and(); - public N endCondition(); - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusFluentImpl.java deleted file mode 100644 index 49752051c2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatusFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NetworkPolicyStatusFluentImpl> extends BaseFluent implements V1NetworkPolicyStatusFluent{ - public V1NetworkPolicyStatusFluentImpl() { - } - public V1NetworkPolicyStatusFluentImpl(V1NetworkPolicyStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - } - } - private ArrayList conditions; - public A addToConditions(int index,V1Condition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ConditionBuilder builder = new V1ConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1Condition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ConditionBuilder builder = new V1ConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items) { - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1ConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1Condition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1Condition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1Condition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1Condition buildMatchingCondition(Predicate predicate) { - for (V1ConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1ConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1Condition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1Condition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1NetworkPolicyStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1NetworkPolicyStatusFluentImpl.ConditionsNestedImpl(); - } - public V1NetworkPolicyStatusFluentImpl.ConditionsNested addNewConditionLike(V1Condition item) { - return new V1NetworkPolicyStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1NetworkPolicyStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1Condition item) { - return new V1NetworkPolicyStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1NetworkPolicyStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1NetworkPolicyStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1NetworkPolicyStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1NetworkPolicyStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ConditionFluentImpl> implements V1NetworkPolicyStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1Condition item) { - this.index = index; - this.builder = new V1ConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1ConditionBuilder(this); - } - V1ConditionBuilder builder; - int index; - public N and() { - return (N) V1NetworkPolicyStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressBuilder.java index ce7ea6d5b5..c73741fab4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeAddressBuilder extends V1NodeAddressFluentImpl implements VisitableBuilder{ +public class V1NodeAddressBuilder extends V1NodeAddressFluent implements VisitableBuilder{ public V1NodeAddressBuilder() { - this(false); - } - public V1NodeAddressBuilder(Boolean validationEnabled) { - this(new V1NodeAddress(), validationEnabled); + this(new V1NodeAddress()); } + public V1NodeAddressBuilder(V1NodeAddressFluent fluent) { - this(fluent, false); - } - public V1NodeAddressBuilder(V1NodeAddressFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeAddress(), validationEnabled); + this(fluent, new V1NodeAddress()); } + public V1NodeAddressBuilder(V1NodeAddressFluent fluent,V1NodeAddress instance) { - this(fluent, instance, false); - } - public V1NodeAddressBuilder(V1NodeAddressFluent fluent,V1NodeAddress instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAddress(instance.getAddress()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeAddressBuilder(V1NodeAddress instance) { - this(instance,false); - } - public V1NodeAddressBuilder(V1NodeAddress instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAddress(instance.getAddress()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeAddressFluent fluent; - Boolean validationEnabled; + public V1NodeAddress build() { V1NodeAddress buildable = new V1NodeAddress(); buildable.setAddress(fluent.getAddress()); @@ -46,4 +28,5 @@ public V1NodeAddress build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressFluent.java index 64f0d5fd02..63710862b3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NodeAddressFluent> extends Fluent{ - public String getAddress(); - public A withAddress(String address); - public Boolean hasAddress(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeAddressFluent> extends BaseFluent{ + public V1NodeAddressFluent() { + } + public V1NodeAddressFluent(V1NodeAddress instance) { + this.copyInstance(instance); + } + private String address; + private String type; + + protected void copyInstance(V1NodeAddress instance) { + instance = (instance != null ? instance : new V1NodeAddress()); + if (instance != null) { + this.withAddress(instance.getAddress()); + this.withType(instance.getType()); + } + } + + public String getAddress() { + return this.address; + } + + public A withAddress(String address) { + this.address = address; + return (A) this; + } + + public boolean hasAddress() { + return this.address != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeAddressFluent that = (V1NodeAddressFluent) o; + if (!java.util.Objects.equals(address, that.address)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(address, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (address != null) { sb.append("address:"); sb.append(address + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressFluentImpl.java deleted file mode 100644 index 2946506902..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAddressFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeAddressFluentImpl> extends BaseFluent implements V1NodeAddressFluent{ - public V1NodeAddressFluentImpl() { - } - public V1NodeAddressFluentImpl(V1NodeAddress instance) { - if (instance != null) { - this.withAddress(instance.getAddress()); - this.withType(instance.getType()); - } - } - private String address; - private String type; - public String getAddress() { - return this.address; - } - public A withAddress(String address) { - this.address=address; return (A) this; - } - public Boolean hasAddress() { - return this.address != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeAddressFluentImpl that = (V1NodeAddressFluentImpl) o; - if (!java.util.Objects.equals(address, that.address)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(address, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (address != null) { sb.append("address:"); sb.append(address + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityBuilder.java index e6585ff72a..13f9d4aaeb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeAffinityBuilder extends V1NodeAffinityFluentImpl implements VisitableBuilder{ +public class V1NodeAffinityBuilder extends V1NodeAffinityFluent implements VisitableBuilder{ public V1NodeAffinityBuilder() { - this(false); - } - public V1NodeAffinityBuilder(Boolean validationEnabled) { - this(new V1NodeAffinity(), validationEnabled); + this(new V1NodeAffinity()); } + public V1NodeAffinityBuilder(V1NodeAffinityFluent fluent) { - this(fluent, false); - } - public V1NodeAffinityBuilder(V1NodeAffinityFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeAffinity(), validationEnabled); + this(fluent, new V1NodeAffinity()); } + public V1NodeAffinityBuilder(V1NodeAffinityFluent fluent,V1NodeAffinity instance) { - this(fluent, instance, false); - } - public V1NodeAffinityBuilder(V1NodeAffinityFluent fluent,V1NodeAffinity instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); - fluent.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeAffinityBuilder(V1NodeAffinity instance) { - this(instance,false); - } - public V1NodeAffinityBuilder(V1NodeAffinity instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); - this.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeAffinityFluent fluent; - Boolean validationEnabled; + public V1NodeAffinity build() { V1NodeAffinity buildable = new V1NodeAffinity(); - buildable.setPreferredDuringSchedulingIgnoredDuringExecution(fluent.getPreferredDuringSchedulingIgnoredDuringExecution()); - buildable.setRequiredDuringSchedulingIgnoredDuringExecution(fluent.getRequiredDuringSchedulingIgnoredDuringExecution()); + buildable.setPreferredDuringSchedulingIgnoredDuringExecution(fluent.buildPreferredDuringSchedulingIgnoredDuringExecution()); + buildable.setRequiredDuringSchedulingIgnoredDuringExecution(fluent.buildRequiredDuringSchedulingIgnoredDuringExecution()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityFluent.java index 2000c46ed1..d97dfc8c7d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityFluent.java @@ -1,75 +1,285 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NodeAffinityFluent> extends Fluent{ - public A addToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1PreferredSchedulingTerm item); - public A setToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1PreferredSchedulingTerm item); - public A addToPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm... items); - public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeFromPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm... items); - public A removeAllFromPreferredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeMatchingFromPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPreferredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getPreferredDuringSchedulingIgnoredDuringExecution(); - public List buildPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PreferredSchedulingTerm buildPreferredDuringSchedulingIgnoredDuringExecution(int index); - public V1PreferredSchedulingTerm buildFirstPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PreferredSchedulingTerm buildLastPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PreferredSchedulingTerm buildMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public Boolean hasMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public A withPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution); - public A withPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm... preferredDuringSchedulingIgnoredDuringExecution); - public Boolean hasPreferredDuringSchedulingIgnoredDuringExecution(); - public V1NodeAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecution(); - public V1NodeAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecutionLike(V1PreferredSchedulingTerm item); - public V1NodeAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(int index,V1PreferredSchedulingTerm item); - public V1NodeAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editPreferredDuringSchedulingIgnoredDuringExecution(int index); - public V1NodeAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editFirstPreferredDuringSchedulingIgnoredDuringExecution(); - public V1NodeAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editLastPreferredDuringSchedulingIgnoredDuringExecution(); - public V1NodeAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRequiredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelector getRequiredDuringSchedulingIgnoredDuringExecution(); - public V1NodeSelector buildRequiredDuringSchedulingIgnoredDuringExecution(); - public A withRequiredDuringSchedulingIgnoredDuringExecution(V1NodeSelector requiredDuringSchedulingIgnoredDuringExecution); - public Boolean hasRequiredDuringSchedulingIgnoredDuringExecution(); - public V1NodeAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested withNewRequiredDuringSchedulingIgnoredDuringExecution(); - public V1NodeAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested withNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1NodeSelector item); - public V1NodeAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editRequiredDuringSchedulingIgnoredDuringExecution(); - public V1NodeAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editOrNewRequiredDuringSchedulingIgnoredDuringExecution(); - public V1NodeAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editOrNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1NodeSelector item); - public interface PreferredDuringSchedulingIgnoredDuringExecutionNested extends Nested,V1PreferredSchedulingTermFluent>{ - public N and(); - public N endPreferredDuringSchedulingIgnoredDuringExecution(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeAffinityFluent> extends BaseFluent{ + public V1NodeAffinityFluent() { + } + + public V1NodeAffinityFluent(V1NodeAffinity instance) { + this.copyInstance(instance); + } + private ArrayList preferredDuringSchedulingIgnoredDuringExecution; + private V1NodeSelectorBuilder requiredDuringSchedulingIgnoredDuringExecution; + + protected void copyInstance(V1NodeAffinity instance) { + instance = (instance != null ? instance : new V1NodeAffinity()); + if (instance != null) { + this.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); + this.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); + } + } + + public A addToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1PreferredSchedulingTerm item) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item); + if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(index, builder); preferredDuringSchedulingIgnoredDuringExecution.add(index, builder);} + return (A)this; + } + + public A setToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1PreferredSchedulingTerm item) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item); + if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").set(index, builder); preferredDuringSchedulingIgnoredDuringExecution.set(index, builder);} + return (A)this; + } + + public A addToPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm... items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1PreferredSchedulingTerm item : items) {V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1PreferredSchedulingTerm item : items) {V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A removeFromPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm... items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1PreferredSchedulingTerm item : items) {V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder); this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeAllFromPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1PreferredSchedulingTerm item : items) {V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder); this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeMatchingFromPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + if (preferredDuringSchedulingIgnoredDuringExecution == null) return (A) this; + final Iterator each = preferredDuringSchedulingIgnoredDuringExecution.iterator(); + final List visitables = _visitables.get("preferredDuringSchedulingIgnoredDuringExecution"); + while (each.hasNext()) { + V1PreferredSchedulingTermBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution != null ? build(preferredDuringSchedulingIgnoredDuringExecution) : null; + } + + public V1PreferredSchedulingTerm buildPreferredDuringSchedulingIgnoredDuringExecution(int index) { + return this.preferredDuringSchedulingIgnoredDuringExecution.get(index).build(); + } + + public V1PreferredSchedulingTerm buildFirstPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution.get(0).build(); + } + + public V1PreferredSchedulingTerm buildLastPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution.get(preferredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); + } + + public V1PreferredSchedulingTerm buildMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1PreferredSchedulingTermBuilder item : preferredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1PreferredSchedulingTermBuilder item : preferredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { + if (this.preferredDuringSchedulingIgnoredDuringExecution != null) { + this._visitables.get("preferredDuringSchedulingIgnoredDuringExecution").clear(); + } + if (preferredDuringSchedulingIgnoredDuringExecution != null) { + this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList(); + for (V1PreferredSchedulingTerm item : preferredDuringSchedulingIgnoredDuringExecution) { + this.addToPreferredDuringSchedulingIgnoredDuringExecution(item); + } + } else { + this.preferredDuringSchedulingIgnoredDuringExecution = null; + } + return (A) this; + } + + public A withPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm... preferredDuringSchedulingIgnoredDuringExecution) { + if (this.preferredDuringSchedulingIgnoredDuringExecution != null) { + this.preferredDuringSchedulingIgnoredDuringExecution.clear(); + _visitables.remove("preferredDuringSchedulingIgnoredDuringExecution"); + } + if (preferredDuringSchedulingIgnoredDuringExecution != null) { + for (V1PreferredSchedulingTerm item : preferredDuringSchedulingIgnoredDuringExecution) { + this.addToPreferredDuringSchedulingIgnoredDuringExecution(item); + } + } + return (A) this; + } + + public boolean hasPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution != null && !this.preferredDuringSchedulingIgnoredDuringExecution.isEmpty(); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecution() { + return new PreferredDuringSchedulingIgnoredDuringExecutionNested(-1, null); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecutionLike(V1PreferredSchedulingTerm item) { + return new PreferredDuringSchedulingIgnoredDuringExecutionNested(-1, item); } - public interface RequiredDuringSchedulingIgnoredDuringExecutionNested extends Nested,V1NodeSelectorFluent>{ - public N and(); - public N endRequiredDuringSchedulingIgnoredDuringExecution(); + + public PreferredDuringSchedulingIgnoredDuringExecutionNested setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(int index,V1PreferredSchedulingTerm item) { + return new PreferredDuringSchedulingIgnoredDuringExecutionNested(index, item); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editPreferredDuringSchedulingIgnoredDuringExecution(int index) { + if (preferredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit preferredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); + return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editFirstPreferredDuringSchedulingIgnoredDuringExecution() { + if (preferredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(0, buildPreferredDuringSchedulingIgnoredDuringExecution(0)); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editLastPreferredDuringSchedulingIgnoredDuringExecution() { + int index = preferredDuringSchedulingIgnoredDuringExecution.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + int index = -1; + for (int i=0;i withNewRequiredDuringSchedulingIgnoredDuringExecution() { + return new RequiredDuringSchedulingIgnoredDuringExecutionNested(null); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested withNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1NodeSelector item) { + return new RequiredDuringSchedulingIgnoredDuringExecutionNested(item); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editRequiredDuringSchedulingIgnoredDuringExecution() { + return withNewRequiredDuringSchedulingIgnoredDuringExecutionLike(java.util.Optional.ofNullable(buildRequiredDuringSchedulingIgnoredDuringExecution()).orElse(null)); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editOrNewRequiredDuringSchedulingIgnoredDuringExecution() { + return withNewRequiredDuringSchedulingIgnoredDuringExecutionLike(java.util.Optional.ofNullable(buildRequiredDuringSchedulingIgnoredDuringExecution()).orElse(new V1NodeSelectorBuilder().build())); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editOrNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1NodeSelector item) { + return withNewRequiredDuringSchedulingIgnoredDuringExecutionLike(java.util.Optional.ofNullable(buildRequiredDuringSchedulingIgnoredDuringExecution()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeAffinityFluent that = (V1NodeAffinityFluent) o; + if (!java.util.Objects.equals(preferredDuringSchedulingIgnoredDuringExecution, that.preferredDuringSchedulingIgnoredDuringExecution)) return false; + if (!java.util.Objects.equals(requiredDuringSchedulingIgnoredDuringExecution, that.requiredDuringSchedulingIgnoredDuringExecution)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(preferredDuringSchedulingIgnoredDuringExecution, requiredDuringSchedulingIgnoredDuringExecution, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (preferredDuringSchedulingIgnoredDuringExecution != null && !preferredDuringSchedulingIgnoredDuringExecution.isEmpty()) { sb.append("preferredDuringSchedulingIgnoredDuringExecution:"); sb.append(preferredDuringSchedulingIgnoredDuringExecution + ","); } + if (requiredDuringSchedulingIgnoredDuringExecution != null) { sb.append("requiredDuringSchedulingIgnoredDuringExecution:"); sb.append(requiredDuringSchedulingIgnoredDuringExecution); } + sb.append("}"); + return sb.toString(); + } + public class PreferredDuringSchedulingIgnoredDuringExecutionNested extends V1PreferredSchedulingTermFluent> implements Nested{ + PreferredDuringSchedulingIgnoredDuringExecutionNested(int index,V1PreferredSchedulingTerm item) { + this.index = index; + this.builder = new V1PreferredSchedulingTermBuilder(this, item); + } + V1PreferredSchedulingTermBuilder builder; + int index; + + public N and() { + return (N) V1NodeAffinityFluent.this.setToPreferredDuringSchedulingIgnoredDuringExecution(index,builder.build()); + } + public N endPreferredDuringSchedulingIgnoredDuringExecution() { + return and(); + } + + } + public class RequiredDuringSchedulingIgnoredDuringExecutionNested extends V1NodeSelectorFluent> implements Nested{ + RequiredDuringSchedulingIgnoredDuringExecutionNested(V1NodeSelector item) { + this.builder = new V1NodeSelectorBuilder(this, item); + } + V1NodeSelectorBuilder builder; + + public N and() { + return (N) V1NodeAffinityFluent.this.withRequiredDuringSchedulingIgnoredDuringExecution(builder.build()); + } + + public N endRequiredDuringSchedulingIgnoredDuringExecution() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityFluentImpl.java deleted file mode 100644 index 650567a283..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeAffinityFluentImpl.java +++ /dev/null @@ -1,231 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeAffinityFluentImpl> extends BaseFluent implements V1NodeAffinityFluent{ - public V1NodeAffinityFluentImpl() { - } - public V1NodeAffinityFluentImpl(V1NodeAffinity instance) { - if (instance != null) { - this.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); - this.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); - } - } - private ArrayList preferredDuringSchedulingIgnoredDuringExecution; - private V1NodeSelectorBuilder requiredDuringSchedulingIgnoredDuringExecution; - public A addToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1PreferredSchedulingTerm item) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item); - if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(index, builder); preferredDuringSchedulingIgnoredDuringExecution.add(index, builder);} - return (A)this; - } - public A setToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1PreferredSchedulingTerm item) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item); - if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").set(index, builder); preferredDuringSchedulingIgnoredDuringExecution.set(index, builder);} - return (A)this; - } - public A addToPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm... items) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1PreferredSchedulingTerm item : items) {V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1PreferredSchedulingTerm item : items) {V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A removeFromPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm... items) { - for (V1PreferredSchedulingTerm item : items) {V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeAllFromPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { - for (V1PreferredSchedulingTerm item : items) {V1PreferredSchedulingTermBuilder builder = new V1PreferredSchedulingTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeMatchingFromPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - if (preferredDuringSchedulingIgnoredDuringExecution == null) return (A) this; - final Iterator each = preferredDuringSchedulingIgnoredDuringExecution.iterator(); - final List visitables = _visitables.get("preferredDuringSchedulingIgnoredDuringExecution"); - while (each.hasNext()) { - V1PreferredSchedulingTermBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPreferredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getPreferredDuringSchedulingIgnoredDuringExecution() { - return preferredDuringSchedulingIgnoredDuringExecution != null ? build(preferredDuringSchedulingIgnoredDuringExecution) : null; - } - public List buildPreferredDuringSchedulingIgnoredDuringExecution() { - return preferredDuringSchedulingIgnoredDuringExecution != null ? build(preferredDuringSchedulingIgnoredDuringExecution) : null; - } - public V1PreferredSchedulingTerm buildPreferredDuringSchedulingIgnoredDuringExecution(int index) { - return this.preferredDuringSchedulingIgnoredDuringExecution.get(index).build(); - } - public V1PreferredSchedulingTerm buildFirstPreferredDuringSchedulingIgnoredDuringExecution() { - return this.preferredDuringSchedulingIgnoredDuringExecution.get(0).build(); - } - public V1PreferredSchedulingTerm buildLastPreferredDuringSchedulingIgnoredDuringExecution() { - return this.preferredDuringSchedulingIgnoredDuringExecution.get(preferredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); - } - public V1PreferredSchedulingTerm buildMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1PreferredSchedulingTermBuilder item: preferredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1PreferredSchedulingTermBuilder item: preferredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return true;} } return false; - } - public A withPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { - if (this.preferredDuringSchedulingIgnoredDuringExecution != null) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").clear();} - if (preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList(); for (V1PreferredSchedulingTerm item : preferredDuringSchedulingIgnoredDuringExecution){this.addToPreferredDuringSchedulingIgnoredDuringExecution(item);}} else { this.preferredDuringSchedulingIgnoredDuringExecution = null;} return (A) this; - } - public A withPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm... preferredDuringSchedulingIgnoredDuringExecution) { - if (this.preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution.clear(); _visitables.remove("preferredDuringSchedulingIgnoredDuringExecution"); } - if (preferredDuringSchedulingIgnoredDuringExecution != null) {for (V1PreferredSchedulingTerm item :preferredDuringSchedulingIgnoredDuringExecution){ this.addToPreferredDuringSchedulingIgnoredDuringExecution(item);}} return (A) this; - } - public Boolean hasPreferredDuringSchedulingIgnoredDuringExecution() { - return preferredDuringSchedulingIgnoredDuringExecution != null && !preferredDuringSchedulingIgnoredDuringExecution.isEmpty(); - } - public V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecution() { - return new V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(); - } - public V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecutionLike(V1PreferredSchedulingTerm item) { - return new V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(-1, item); - } - public V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(int index,V1PreferredSchedulingTerm item) { - return new V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(index, item); - } - public V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editPreferredDuringSchedulingIgnoredDuringExecution(int index) { - if (preferredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit preferredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); - return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editFirstPreferredDuringSchedulingIgnoredDuringExecution() { - if (preferredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(0, buildPreferredDuringSchedulingIgnoredDuringExecution(0)); - } - public V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editLastPreferredDuringSchedulingIgnoredDuringExecution() { - int index = preferredDuringSchedulingIgnoredDuringExecution.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - int index = -1; - for (int i=0;i withNewRequiredDuringSchedulingIgnoredDuringExecution() { - return new V1NodeAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(); - } - public V1NodeAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested withNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1NodeSelector item) { - return new V1NodeAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(item); - } - public V1NodeAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editRequiredDuringSchedulingIgnoredDuringExecution() { - return withNewRequiredDuringSchedulingIgnoredDuringExecutionLike(getRequiredDuringSchedulingIgnoredDuringExecution()); - } - public V1NodeAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editOrNewRequiredDuringSchedulingIgnoredDuringExecution() { - return withNewRequiredDuringSchedulingIgnoredDuringExecutionLike(getRequiredDuringSchedulingIgnoredDuringExecution() != null ? getRequiredDuringSchedulingIgnoredDuringExecution(): new V1NodeSelectorBuilder().build()); - } - public V1NodeAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editOrNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1NodeSelector item) { - return withNewRequiredDuringSchedulingIgnoredDuringExecutionLike(getRequiredDuringSchedulingIgnoredDuringExecution() != null ? getRequiredDuringSchedulingIgnoredDuringExecution(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeAffinityFluentImpl that = (V1NodeAffinityFluentImpl) o; - if (!java.util.Objects.equals(preferredDuringSchedulingIgnoredDuringExecution, that.preferredDuringSchedulingIgnoredDuringExecution)) return false; - - if (!java.util.Objects.equals(requiredDuringSchedulingIgnoredDuringExecution, that.requiredDuringSchedulingIgnoredDuringExecution)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(preferredDuringSchedulingIgnoredDuringExecution, requiredDuringSchedulingIgnoredDuringExecution, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (preferredDuringSchedulingIgnoredDuringExecution != null) { sb.append("preferredDuringSchedulingIgnoredDuringExecution:"); sb.append(preferredDuringSchedulingIgnoredDuringExecution + ","); } - if (requiredDuringSchedulingIgnoredDuringExecution != null) { sb.append("requiredDuringSchedulingIgnoredDuringExecution:"); sb.append(requiredDuringSchedulingIgnoredDuringExecution); } - sb.append("}"); - return sb.toString(); - } - class PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl extends V1PreferredSchedulingTermFluentImpl> implements V1NodeAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested,Nested{ - PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(int index,V1PreferredSchedulingTerm item) { - this.index = index; - this.builder = new V1PreferredSchedulingTermBuilder(this, item); - } - PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl() { - this.index = -1; - this.builder = new V1PreferredSchedulingTermBuilder(this); - } - V1PreferredSchedulingTermBuilder builder; - int index; - public N and() { - return (N) V1NodeAffinityFluentImpl.this.setToPreferredDuringSchedulingIgnoredDuringExecution(index,builder.build()); - } - public N endPreferredDuringSchedulingIgnoredDuringExecution() { - return and(); - } - - } - class RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl extends V1NodeSelectorFluentImpl> implements V1NodeAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested,Nested{ - RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(V1NodeSelector item) { - this.builder = new V1NodeSelectorBuilder(this, item); - } - RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl() { - this.builder = new V1NodeSelectorBuilder(this); - } - V1NodeSelectorBuilder builder; - public N and() { - return (N) V1NodeAffinityFluentImpl.this.withRequiredDuringSchedulingIgnoredDuringExecution(builder.build()); - } - public N endRequiredDuringSchedulingIgnoredDuringExecution() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeBuilder.java index cfb9258ecc..e3df806dc0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeBuilder extends V1NodeFluentImpl implements VisitableBuilder{ +public class V1NodeBuilder extends V1NodeFluent implements VisitableBuilder{ public V1NodeBuilder() { - this(false); - } - public V1NodeBuilder(Boolean validationEnabled) { - this(new V1Node(), validationEnabled); + this(new V1Node()); } + public V1NodeBuilder(V1NodeFluent fluent) { - this(fluent, false); - } - public V1NodeBuilder(V1NodeFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Node(), validationEnabled); + this(fluent, new V1Node()); } + public V1NodeBuilder(V1NodeFluent fluent,V1Node instance) { - this(fluent, instance, false); - } - public V1NodeBuilder(V1NodeFluent fluent,V1Node instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeBuilder(V1Node instance) { - this(instance,false); - } - public V1NodeBuilder(V1Node instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeFluent fluent; - Boolean validationEnabled; + public V1Node build() { V1Node buildable = new V1Node(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionBuilder.java index 6b611c72b9..88454e9e66 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeConditionBuilder extends V1NodeConditionFluentImpl implements VisitableBuilder{ +public class V1NodeConditionBuilder extends V1NodeConditionFluent implements VisitableBuilder{ public V1NodeConditionBuilder() { - this(false); - } - public V1NodeConditionBuilder(Boolean validationEnabled) { - this(new V1NodeCondition(), validationEnabled); + this(new V1NodeCondition()); } + public V1NodeConditionBuilder(V1NodeConditionFluent fluent) { - this(fluent, false); - } - public V1NodeConditionBuilder(V1NodeConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeCondition(), validationEnabled); + this(fluent, new V1NodeCondition()); } + public V1NodeConditionBuilder(V1NodeConditionFluent fluent,V1NodeCondition instance) { - this(fluent, instance, false); - } - public V1NodeConditionBuilder(V1NodeConditionFluent fluent,V1NodeCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastHeartbeatTime(instance.getLastHeartbeatTime()); - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeConditionBuilder(V1NodeCondition instance) { - this(instance,false); - } - public V1NodeConditionBuilder(V1NodeCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastHeartbeatTime(instance.getLastHeartbeatTime()); - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeConditionFluent fluent; - Boolean validationEnabled; + public V1NodeCondition build() { V1NodeCondition buildable = new V1NodeCondition(); buildable.setLastHeartbeatTime(fluent.getLastHeartbeatTime()); @@ -58,4 +32,5 @@ public V1NodeCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionFluent.java index 68e0ec0e7f..6cc7d33f41 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionFluent.java @@ -1,32 +1,149 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NodeConditionFluent> extends Fluent{ - public OffsetDateTime getLastHeartbeatTime(); - public A withLastHeartbeatTime(OffsetDateTime lastHeartbeatTime); - public Boolean hasLastHeartbeatTime(); - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeConditionFluent> extends BaseFluent{ + public V1NodeConditionFluent() { + } + public V1NodeConditionFluent(V1NodeCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastHeartbeatTime; + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1NodeCondition instance) { + instance = (instance != null ? instance : new V1NodeCondition()); + if (instance != null) { + this.withLastHeartbeatTime(instance.getLastHeartbeatTime()); + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastHeartbeatTime() { + return this.lastHeartbeatTime; + } + + public A withLastHeartbeatTime(OffsetDateTime lastHeartbeatTime) { + this.lastHeartbeatTime = lastHeartbeatTime; + return (A) this; + } + + public boolean hasLastHeartbeatTime() { + return this.lastHeartbeatTime != null; + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeConditionFluent that = (V1NodeConditionFluent) o; + if (!java.util.Objects.equals(lastHeartbeatTime, that.lastHeartbeatTime)) return false; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastHeartbeatTime, lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastHeartbeatTime != null) { sb.append("lastHeartbeatTime:"); sb.append(lastHeartbeatTime + ","); } + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionFluentImpl.java deleted file mode 100644 index b210310ef4..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConditionFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeConditionFluentImpl> extends BaseFluent implements V1NodeConditionFluent{ - public V1NodeConditionFluentImpl() { - } - public V1NodeConditionFluentImpl(V1NodeCondition instance) { - if (instance != null) { - this.withLastHeartbeatTime(instance.getLastHeartbeatTime()); - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastHeartbeatTime; - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastHeartbeatTime() { - return this.lastHeartbeatTime; - } - public A withLastHeartbeatTime(OffsetDateTime lastHeartbeatTime) { - this.lastHeartbeatTime=lastHeartbeatTime; return (A) this; - } - public Boolean hasLastHeartbeatTime() { - return this.lastHeartbeatTime != null; - } - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeConditionFluentImpl that = (V1NodeConditionFluentImpl) o; - if (!java.util.Objects.equals(lastHeartbeatTime, that.lastHeartbeatTime)) return false; - - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastHeartbeatTime, lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastHeartbeatTime != null) { sb.append("lastHeartbeatTime:"); sb.append(lastHeartbeatTime + ","); } - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceBuilder.java index b7c649e3bf..fe38f8407b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeConfigSourceBuilder extends V1NodeConfigSourceFluentImpl implements VisitableBuilder{ +public class V1NodeConfigSourceBuilder extends V1NodeConfigSourceFluent implements VisitableBuilder{ public V1NodeConfigSourceBuilder() { - this(false); - } - public V1NodeConfigSourceBuilder(Boolean validationEnabled) { - this(new V1NodeConfigSource(), validationEnabled); + this(new V1NodeConfigSource()); } + public V1NodeConfigSourceBuilder(V1NodeConfigSourceFluent fluent) { - this(fluent, false); - } - public V1NodeConfigSourceBuilder(V1NodeConfigSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeConfigSource(), validationEnabled); + this(fluent, new V1NodeConfigSource()); } + public V1NodeConfigSourceBuilder(V1NodeConfigSourceFluent fluent,V1NodeConfigSource instance) { - this(fluent, instance, false); - } - public V1NodeConfigSourceBuilder(V1NodeConfigSourceFluent fluent,V1NodeConfigSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConfigMap(instance.getConfigMap()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeConfigSourceBuilder(V1NodeConfigSource instance) { - this(instance,false); - } - public V1NodeConfigSourceBuilder(V1NodeConfigSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConfigMap(instance.getConfigMap()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeConfigSourceFluent fluent; - Boolean validationEnabled; + public V1NodeConfigSource build() { V1NodeConfigSource buildable = new V1NodeConfigSource(); - buildable.setConfigMap(fluent.getConfigMap()); + buildable.setConfigMap(fluent.buildConfigMap()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceFluent.java index e550e45b9a..8375836170 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1NodeConfigSourceFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildConfigMap instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapNodeConfigSource getConfigMap(); - public V1ConfigMapNodeConfigSource buildConfigMap(); - public A withConfigMap(V1ConfigMapNodeConfigSource configMap); - public Boolean hasConfigMap(); - public V1NodeConfigSourceFluent.ConfigMapNested withNewConfigMap(); - public V1NodeConfigSourceFluent.ConfigMapNested withNewConfigMapLike(V1ConfigMapNodeConfigSource item); - public V1NodeConfigSourceFluent.ConfigMapNested editConfigMap(); - public V1NodeConfigSourceFluent.ConfigMapNested editOrNewConfigMap(); - public V1NodeConfigSourceFluent.ConfigMapNested editOrNewConfigMapLike(V1ConfigMapNodeConfigSource item); - public interface ConfigMapNested extends Nested,V1ConfigMapNodeConfigSourceFluent>{ - public N and(); - public N endConfigMap(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeConfigSourceFluent> extends BaseFluent{ + public V1NodeConfigSourceFluent() { + } + + public V1NodeConfigSourceFluent(V1NodeConfigSource instance) { + this.copyInstance(instance); + } + private V1ConfigMapNodeConfigSourceBuilder configMap; + + protected void copyInstance(V1NodeConfigSource instance) { + instance = (instance != null ? instance : new V1NodeConfigSource()); + if (instance != null) { + this.withConfigMap(instance.getConfigMap()); + } + } + + public V1ConfigMapNodeConfigSource buildConfigMap() { + return this.configMap != null ? this.configMap.build() : null; + } + + public A withConfigMap(V1ConfigMapNodeConfigSource configMap) { + this._visitables.remove("configMap"); + if (configMap != null) { + this.configMap = new V1ConfigMapNodeConfigSourceBuilder(configMap); + this._visitables.get("configMap").add(this.configMap); + } else { + this.configMap = null; + this._visitables.get("configMap").remove(this.configMap); + } + return (A) this; + } + + public boolean hasConfigMap() { + return this.configMap != null; + } + + public ConfigMapNested withNewConfigMap() { + return new ConfigMapNested(null); + } + + public ConfigMapNested withNewConfigMapLike(V1ConfigMapNodeConfigSource item) { + return new ConfigMapNested(item); + } + + public ConfigMapNested editConfigMap() { + return withNewConfigMapLike(java.util.Optional.ofNullable(buildConfigMap()).orElse(null)); + } + + public ConfigMapNested editOrNewConfigMap() { + return withNewConfigMapLike(java.util.Optional.ofNullable(buildConfigMap()).orElse(new V1ConfigMapNodeConfigSourceBuilder().build())); + } + + public ConfigMapNested editOrNewConfigMapLike(V1ConfigMapNodeConfigSource item) { + return withNewConfigMapLike(java.util.Optional.ofNullable(buildConfigMap()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeConfigSourceFluent that = (V1NodeConfigSourceFluent) o; + if (!java.util.Objects.equals(configMap, that.configMap)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(configMap, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (configMap != null) { sb.append("configMap:"); sb.append(configMap); } + sb.append("}"); + return sb.toString(); } + public class ConfigMapNested extends V1ConfigMapNodeConfigSourceFluent> implements Nested{ + ConfigMapNested(V1ConfigMapNodeConfigSource item) { + this.builder = new V1ConfigMapNodeConfigSourceBuilder(this, item); + } + V1ConfigMapNodeConfigSourceBuilder builder; + + public N and() { + return (N) V1NodeConfigSourceFluent.this.withConfigMap(builder.build()); + } + + public N endConfigMap() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceFluentImpl.java deleted file mode 100644 index 80acd5b7ff..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigSourceFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeConfigSourceFluentImpl> extends BaseFluent implements V1NodeConfigSourceFluent{ - public V1NodeConfigSourceFluentImpl() { - } - public V1NodeConfigSourceFluentImpl(V1NodeConfigSource instance) { - if (instance != null) { - this.withConfigMap(instance.getConfigMap()); - } - } - private V1ConfigMapNodeConfigSourceBuilder configMap; - - /** - * This method has been deprecated, please use method buildConfigMap instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapNodeConfigSource getConfigMap() { - return this.configMap!=null ?this.configMap.build():null; - } - public V1ConfigMapNodeConfigSource buildConfigMap() { - return this.configMap!=null ?this.configMap.build():null; - } - public A withConfigMap(V1ConfigMapNodeConfigSource configMap) { - _visitables.get("configMap").remove(this.configMap); - if (configMap!=null){ this.configMap= new V1ConfigMapNodeConfigSourceBuilder(configMap); _visitables.get("configMap").add(this.configMap);} else { this.configMap = null; _visitables.get("configMap").remove(this.configMap); } return (A) this; - } - public Boolean hasConfigMap() { - return this.configMap != null; - } - public V1NodeConfigSourceFluentImpl.ConfigMapNested withNewConfigMap() { - return new V1NodeConfigSourceFluentImpl.ConfigMapNestedImpl(); - } - public V1NodeConfigSourceFluentImpl.ConfigMapNested withNewConfigMapLike(V1ConfigMapNodeConfigSource item) { - return new V1NodeConfigSourceFluentImpl.ConfigMapNestedImpl(item); - } - public V1NodeConfigSourceFluentImpl.ConfigMapNested editConfigMap() { - return withNewConfigMapLike(getConfigMap()); - } - public V1NodeConfigSourceFluentImpl.ConfigMapNested editOrNewConfigMap() { - return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): new V1ConfigMapNodeConfigSourceBuilder().build()); - } - public V1NodeConfigSourceFluentImpl.ConfigMapNested editOrNewConfigMapLike(V1ConfigMapNodeConfigSource item) { - return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeConfigSourceFluentImpl that = (V1NodeConfigSourceFluentImpl) o; - if (!java.util.Objects.equals(configMap, that.configMap)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(configMap, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (configMap != null) { sb.append("configMap:"); sb.append(configMap); } - sb.append("}"); - return sb.toString(); - } - class ConfigMapNestedImpl extends V1ConfigMapNodeConfigSourceFluentImpl> implements V1NodeConfigSourceFluentImpl.ConfigMapNested,Nested{ - ConfigMapNestedImpl(V1ConfigMapNodeConfigSource item) { - this.builder = new V1ConfigMapNodeConfigSourceBuilder(this, item); - } - ConfigMapNestedImpl() { - this.builder = new V1ConfigMapNodeConfigSourceBuilder(this); - } - V1ConfigMapNodeConfigSourceBuilder builder; - public N and() { - return (N) V1NodeConfigSourceFluentImpl.this.withConfigMap(builder.build()); - } - public N endConfigMap() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusBuilder.java index b739fd0092..0d14d091da 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeConfigStatusBuilder extends V1NodeConfigStatusFluentImpl implements VisitableBuilder{ +public class V1NodeConfigStatusBuilder extends V1NodeConfigStatusFluent implements VisitableBuilder{ public V1NodeConfigStatusBuilder() { - this(false); - } - public V1NodeConfigStatusBuilder(Boolean validationEnabled) { - this(new V1NodeConfigStatus(), validationEnabled); + this(new V1NodeConfigStatus()); } + public V1NodeConfigStatusBuilder(V1NodeConfigStatusFluent fluent) { - this(fluent, false); - } - public V1NodeConfigStatusBuilder(V1NodeConfigStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeConfigStatus(), validationEnabled); + this(fluent, new V1NodeConfigStatus()); } + public V1NodeConfigStatusBuilder(V1NodeConfigStatusFluent fluent,V1NodeConfigStatus instance) { - this(fluent, instance, false); - } - public V1NodeConfigStatusBuilder(V1NodeConfigStatusFluent fluent,V1NodeConfigStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withActive(instance.getActive()); - fluent.withAssigned(instance.getAssigned()); - fluent.withError(instance.getError()); - fluent.withLastKnownGood(instance.getLastKnownGood()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeConfigStatusBuilder(V1NodeConfigStatus instance) { - this(instance,false); - } - public V1NodeConfigStatusBuilder(V1NodeConfigStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withActive(instance.getActive()); - this.withAssigned(instance.getAssigned()); - this.withError(instance.getError()); - this.withLastKnownGood(instance.getLastKnownGood()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeConfigStatusFluent fluent; - Boolean validationEnabled; + public V1NodeConfigStatus build() { V1NodeConfigStatus buildable = new V1NodeConfigStatus(); - buildable.setActive(fluent.getActive()); - buildable.setAssigned(fluent.getAssigned()); + buildable.setActive(fluent.buildActive()); + buildable.setAssigned(fluent.buildAssigned()); buildable.setError(fluent.getError()); - buildable.setLastKnownGood(fluent.getLastKnownGood()); + buildable.setLastKnownGood(fluent.buildLastKnownGood()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusFluent.java index 43daf5c70c..2cac576d5f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusFluent.java @@ -1,78 +1,243 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1NodeConfigStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildActive instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeConfigSource getActive(); - public V1NodeConfigSource buildActive(); - public A withActive(V1NodeConfigSource active); - public Boolean hasActive(); - public V1NodeConfigStatusFluent.ActiveNested withNewActive(); - public V1NodeConfigStatusFluent.ActiveNested withNewActiveLike(V1NodeConfigSource item); - public V1NodeConfigStatusFluent.ActiveNested editActive(); - public V1NodeConfigStatusFluent.ActiveNested editOrNewActive(); - public V1NodeConfigStatusFluent.ActiveNested editOrNewActiveLike(V1NodeConfigSource item); - - /** - * This method has been deprecated, please use method buildAssigned instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeConfigSource getAssigned(); - public V1NodeConfigSource buildAssigned(); - public A withAssigned(V1NodeConfigSource assigned); - public Boolean hasAssigned(); - public V1NodeConfigStatusFluent.AssignedNested withNewAssigned(); - public V1NodeConfigStatusFluent.AssignedNested withNewAssignedLike(V1NodeConfigSource item); - public V1NodeConfigStatusFluent.AssignedNested editAssigned(); - public V1NodeConfigStatusFluent.AssignedNested editOrNewAssigned(); - public V1NodeConfigStatusFluent.AssignedNested editOrNewAssignedLike(V1NodeConfigSource item); - public String getError(); - public A withError(String error); - public Boolean hasError(); - - /** - * This method has been deprecated, please use method buildLastKnownGood instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeConfigSource getLastKnownGood(); - public V1NodeConfigSource buildLastKnownGood(); - public A withLastKnownGood(V1NodeConfigSource lastKnownGood); - public Boolean hasLastKnownGood(); - public V1NodeConfigStatusFluent.LastKnownGoodNested withNewLastKnownGood(); - public V1NodeConfigStatusFluent.LastKnownGoodNested withNewLastKnownGoodLike(V1NodeConfigSource item); - public V1NodeConfigStatusFluent.LastKnownGoodNested editLastKnownGood(); - public V1NodeConfigStatusFluent.LastKnownGoodNested editOrNewLastKnownGood(); - public V1NodeConfigStatusFluent.LastKnownGoodNested editOrNewLastKnownGoodLike(V1NodeConfigSource item); - public interface ActiveNested extends Nested,V1NodeConfigSourceFluent>{ - public N and(); - public N endActive(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeConfigStatusFluent> extends BaseFluent{ + public V1NodeConfigStatusFluent() { + } + + public V1NodeConfigStatusFluent(V1NodeConfigStatus instance) { + this.copyInstance(instance); + } + private V1NodeConfigSourceBuilder active; + private V1NodeConfigSourceBuilder assigned; + private String error; + private V1NodeConfigSourceBuilder lastKnownGood; + + protected void copyInstance(V1NodeConfigStatus instance) { + instance = (instance != null ? instance : new V1NodeConfigStatus()); + if (instance != null) { + this.withActive(instance.getActive()); + this.withAssigned(instance.getAssigned()); + this.withError(instance.getError()); + this.withLastKnownGood(instance.getLastKnownGood()); + } + } + + public V1NodeConfigSource buildActive() { + return this.active != null ? this.active.build() : null; + } + + public A withActive(V1NodeConfigSource active) { + this._visitables.remove("active"); + if (active != null) { + this.active = new V1NodeConfigSourceBuilder(active); + this._visitables.get("active").add(this.active); + } else { + this.active = null; + this._visitables.get("active").remove(this.active); + } + return (A) this; + } + + public boolean hasActive() { + return this.active != null; + } + + public ActiveNested withNewActive() { + return new ActiveNested(null); + } + + public ActiveNested withNewActiveLike(V1NodeConfigSource item) { + return new ActiveNested(item); + } + + public ActiveNested editActive() { + return withNewActiveLike(java.util.Optional.ofNullable(buildActive()).orElse(null)); + } + + public ActiveNested editOrNewActive() { + return withNewActiveLike(java.util.Optional.ofNullable(buildActive()).orElse(new V1NodeConfigSourceBuilder().build())); + } + + public ActiveNested editOrNewActiveLike(V1NodeConfigSource item) { + return withNewActiveLike(java.util.Optional.ofNullable(buildActive()).orElse(item)); + } + + public V1NodeConfigSource buildAssigned() { + return this.assigned != null ? this.assigned.build() : null; + } + + public A withAssigned(V1NodeConfigSource assigned) { + this._visitables.remove("assigned"); + if (assigned != null) { + this.assigned = new V1NodeConfigSourceBuilder(assigned); + this._visitables.get("assigned").add(this.assigned); + } else { + this.assigned = null; + this._visitables.get("assigned").remove(this.assigned); + } + return (A) this; + } + + public boolean hasAssigned() { + return this.assigned != null; + } + + public AssignedNested withNewAssigned() { + return new AssignedNested(null); + } + + public AssignedNested withNewAssignedLike(V1NodeConfigSource item) { + return new AssignedNested(item); + } + + public AssignedNested editAssigned() { + return withNewAssignedLike(java.util.Optional.ofNullable(buildAssigned()).orElse(null)); + } + + public AssignedNested editOrNewAssigned() { + return withNewAssignedLike(java.util.Optional.ofNullable(buildAssigned()).orElse(new V1NodeConfigSourceBuilder().build())); + } + + public AssignedNested editOrNewAssignedLike(V1NodeConfigSource item) { + return withNewAssignedLike(java.util.Optional.ofNullable(buildAssigned()).orElse(item)); + } + + public String getError() { + return this.error; + } + + public A withError(String error) { + this.error = error; + return (A) this; + } + + public boolean hasError() { + return this.error != null; + } + + public V1NodeConfigSource buildLastKnownGood() { + return this.lastKnownGood != null ? this.lastKnownGood.build() : null; + } + + public A withLastKnownGood(V1NodeConfigSource lastKnownGood) { + this._visitables.remove("lastKnownGood"); + if (lastKnownGood != null) { + this.lastKnownGood = new V1NodeConfigSourceBuilder(lastKnownGood); + this._visitables.get("lastKnownGood").add(this.lastKnownGood); + } else { + this.lastKnownGood = null; + this._visitables.get("lastKnownGood").remove(this.lastKnownGood); + } + return (A) this; + } + + public boolean hasLastKnownGood() { + return this.lastKnownGood != null; + } + + public LastKnownGoodNested withNewLastKnownGood() { + return new LastKnownGoodNested(null); + } + + public LastKnownGoodNested withNewLastKnownGoodLike(V1NodeConfigSource item) { + return new LastKnownGoodNested(item); + } + + public LastKnownGoodNested editLastKnownGood() { + return withNewLastKnownGoodLike(java.util.Optional.ofNullable(buildLastKnownGood()).orElse(null)); + } + + public LastKnownGoodNested editOrNewLastKnownGood() { + return withNewLastKnownGoodLike(java.util.Optional.ofNullable(buildLastKnownGood()).orElse(new V1NodeConfigSourceBuilder().build())); } - public interface AssignedNested extends Nested,V1NodeConfigSourceFluent>{ - public N and(); - public N endAssigned(); + + public LastKnownGoodNested editOrNewLastKnownGoodLike(V1NodeConfigSource item) { + return withNewLastKnownGoodLike(java.util.Optional.ofNullable(buildLastKnownGood()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeConfigStatusFluent that = (V1NodeConfigStatusFluent) o; + if (!java.util.Objects.equals(active, that.active)) return false; + if (!java.util.Objects.equals(assigned, that.assigned)) return false; + if (!java.util.Objects.equals(error, that.error)) return false; + if (!java.util.Objects.equals(lastKnownGood, that.lastKnownGood)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(active, assigned, error, lastKnownGood, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (active != null) { sb.append("active:"); sb.append(active + ","); } + if (assigned != null) { sb.append("assigned:"); sb.append(assigned + ","); } + if (error != null) { sb.append("error:"); sb.append(error + ","); } + if (lastKnownGood != null) { sb.append("lastKnownGood:"); sb.append(lastKnownGood); } + sb.append("}"); + return sb.toString(); + } + public class ActiveNested extends V1NodeConfigSourceFluent> implements Nested{ + ActiveNested(V1NodeConfigSource item) { + this.builder = new V1NodeConfigSourceBuilder(this, item); + } + V1NodeConfigSourceBuilder builder; + + public N and() { + return (N) V1NodeConfigStatusFluent.this.withActive(builder.build()); + } + + public N endActive() { + return and(); + } + } - public interface LastKnownGoodNested extends Nested,V1NodeConfigSourceFluent>{ - public N and(); - public N endLastKnownGood(); + public class AssignedNested extends V1NodeConfigSourceFluent> implements Nested{ + AssignedNested(V1NodeConfigSource item) { + this.builder = new V1NodeConfigSourceBuilder(this, item); + } + V1NodeConfigSourceBuilder builder; + + public N and() { + return (N) V1NodeConfigStatusFluent.this.withAssigned(builder.build()); + } + + public N endAssigned() { + return and(); + } + } + public class LastKnownGoodNested extends V1NodeConfigSourceFluent> implements Nested{ + LastKnownGoodNested(V1NodeConfigSource item) { + this.builder = new V1NodeConfigSourceBuilder(this, item); + } + V1NodeConfigSourceBuilder builder; + + public N and() { + return (N) V1NodeConfigStatusFluent.this.withLastKnownGood(builder.build()); + } + + public N endLastKnownGood() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusFluentImpl.java deleted file mode 100644 index e65343df81..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeConfigStatusFluentImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeConfigStatusFluentImpl> extends BaseFluent implements V1NodeConfigStatusFluent{ - public V1NodeConfigStatusFluentImpl() { - } - public V1NodeConfigStatusFluentImpl(V1NodeConfigStatus instance) { - if (instance != null) { - this.withActive(instance.getActive()); - this.withAssigned(instance.getAssigned()); - this.withError(instance.getError()); - this.withLastKnownGood(instance.getLastKnownGood()); - } - } - private V1NodeConfigSourceBuilder active; - private V1NodeConfigSourceBuilder assigned; - private String error; - private V1NodeConfigSourceBuilder lastKnownGood; - - /** - * This method has been deprecated, please use method buildActive instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeConfigSource getActive() { - return this.active!=null ?this.active.build():null; - } - public V1NodeConfigSource buildActive() { - return this.active!=null ?this.active.build():null; - } - public A withActive(V1NodeConfigSource active) { - _visitables.get("active").remove(this.active); - if (active!=null){ this.active= new V1NodeConfigSourceBuilder(active); _visitables.get("active").add(this.active);} else { this.active = null; _visitables.get("active").remove(this.active); } return (A) this; - } - public Boolean hasActive() { - return this.active != null; - } - public V1NodeConfigStatusFluentImpl.ActiveNested withNewActive() { - return new V1NodeConfigStatusFluentImpl.ActiveNestedImpl(); - } - public V1NodeConfigStatusFluentImpl.ActiveNested withNewActiveLike(V1NodeConfigSource item) { - return new V1NodeConfigStatusFluentImpl.ActiveNestedImpl(item); - } - public V1NodeConfigStatusFluentImpl.ActiveNested editActive() { - return withNewActiveLike(getActive()); - } - public V1NodeConfigStatusFluentImpl.ActiveNested editOrNewActive() { - return withNewActiveLike(getActive() != null ? getActive(): new V1NodeConfigSourceBuilder().build()); - } - public V1NodeConfigStatusFluentImpl.ActiveNested editOrNewActiveLike(V1NodeConfigSource item) { - return withNewActiveLike(getActive() != null ? getActive(): item); - } - - /** - * This method has been deprecated, please use method buildAssigned instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeConfigSource getAssigned() { - return this.assigned!=null ?this.assigned.build():null; - } - public V1NodeConfigSource buildAssigned() { - return this.assigned!=null ?this.assigned.build():null; - } - public A withAssigned(V1NodeConfigSource assigned) { - _visitables.get("assigned").remove(this.assigned); - if (assigned!=null){ this.assigned= new V1NodeConfigSourceBuilder(assigned); _visitables.get("assigned").add(this.assigned);} else { this.assigned = null; _visitables.get("assigned").remove(this.assigned); } return (A) this; - } - public Boolean hasAssigned() { - return this.assigned != null; - } - public V1NodeConfigStatusFluentImpl.AssignedNested withNewAssigned() { - return new V1NodeConfigStatusFluentImpl.AssignedNestedImpl(); - } - public V1NodeConfigStatusFluentImpl.AssignedNested withNewAssignedLike(V1NodeConfigSource item) { - return new V1NodeConfigStatusFluentImpl.AssignedNestedImpl(item); - } - public V1NodeConfigStatusFluentImpl.AssignedNested editAssigned() { - return withNewAssignedLike(getAssigned()); - } - public V1NodeConfigStatusFluentImpl.AssignedNested editOrNewAssigned() { - return withNewAssignedLike(getAssigned() != null ? getAssigned(): new V1NodeConfigSourceBuilder().build()); - } - public V1NodeConfigStatusFluentImpl.AssignedNested editOrNewAssignedLike(V1NodeConfigSource item) { - return withNewAssignedLike(getAssigned() != null ? getAssigned(): item); - } - public String getError() { - return this.error; - } - public A withError(String error) { - this.error=error; return (A) this; - } - public Boolean hasError() { - return this.error != null; - } - - /** - * This method has been deprecated, please use method buildLastKnownGood instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeConfigSource getLastKnownGood() { - return this.lastKnownGood!=null ?this.lastKnownGood.build():null; - } - public V1NodeConfigSource buildLastKnownGood() { - return this.lastKnownGood!=null ?this.lastKnownGood.build():null; - } - public A withLastKnownGood(V1NodeConfigSource lastKnownGood) { - _visitables.get("lastKnownGood").remove(this.lastKnownGood); - if (lastKnownGood!=null){ this.lastKnownGood= new V1NodeConfigSourceBuilder(lastKnownGood); _visitables.get("lastKnownGood").add(this.lastKnownGood);} else { this.lastKnownGood = null; _visitables.get("lastKnownGood").remove(this.lastKnownGood); } return (A) this; - } - public Boolean hasLastKnownGood() { - return this.lastKnownGood != null; - } - public V1NodeConfigStatusFluentImpl.LastKnownGoodNested withNewLastKnownGood() { - return new V1NodeConfigStatusFluentImpl.LastKnownGoodNestedImpl(); - } - public V1NodeConfigStatusFluentImpl.LastKnownGoodNested withNewLastKnownGoodLike(V1NodeConfigSource item) { - return new V1NodeConfigStatusFluentImpl.LastKnownGoodNestedImpl(item); - } - public V1NodeConfigStatusFluentImpl.LastKnownGoodNested editLastKnownGood() { - return withNewLastKnownGoodLike(getLastKnownGood()); - } - public V1NodeConfigStatusFluentImpl.LastKnownGoodNested editOrNewLastKnownGood() { - return withNewLastKnownGoodLike(getLastKnownGood() != null ? getLastKnownGood(): new V1NodeConfigSourceBuilder().build()); - } - public V1NodeConfigStatusFluentImpl.LastKnownGoodNested editOrNewLastKnownGoodLike(V1NodeConfigSource item) { - return withNewLastKnownGoodLike(getLastKnownGood() != null ? getLastKnownGood(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeConfigStatusFluentImpl that = (V1NodeConfigStatusFluentImpl) o; - if (!java.util.Objects.equals(active, that.active)) return false; - - if (!java.util.Objects.equals(assigned, that.assigned)) return false; - - if (!java.util.Objects.equals(error, that.error)) return false; - - if (!java.util.Objects.equals(lastKnownGood, that.lastKnownGood)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(active, assigned, error, lastKnownGood, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (active != null) { sb.append("active:"); sb.append(active + ","); } - if (assigned != null) { sb.append("assigned:"); sb.append(assigned + ","); } - if (error != null) { sb.append("error:"); sb.append(error + ","); } - if (lastKnownGood != null) { sb.append("lastKnownGood:"); sb.append(lastKnownGood); } - sb.append("}"); - return sb.toString(); - } - class ActiveNestedImpl extends V1NodeConfigSourceFluentImpl> implements V1NodeConfigStatusFluentImpl.ActiveNested,Nested{ - ActiveNestedImpl(V1NodeConfigSource item) { - this.builder = new V1NodeConfigSourceBuilder(this, item); - } - ActiveNestedImpl() { - this.builder = new V1NodeConfigSourceBuilder(this); - } - V1NodeConfigSourceBuilder builder; - public N and() { - return (N) V1NodeConfigStatusFluentImpl.this.withActive(builder.build()); - } - public N endActive() { - return and(); - } - - } - class AssignedNestedImpl extends V1NodeConfigSourceFluentImpl> implements V1NodeConfigStatusFluentImpl.AssignedNested,Nested{ - AssignedNestedImpl(V1NodeConfigSource item) { - this.builder = new V1NodeConfigSourceBuilder(this, item); - } - AssignedNestedImpl() { - this.builder = new V1NodeConfigSourceBuilder(this); - } - V1NodeConfigSourceBuilder builder; - public N and() { - return (N) V1NodeConfigStatusFluentImpl.this.withAssigned(builder.build()); - } - public N endAssigned() { - return and(); - } - - } - class LastKnownGoodNestedImpl extends V1NodeConfigSourceFluentImpl> implements V1NodeConfigStatusFluentImpl.LastKnownGoodNested,Nested{ - LastKnownGoodNestedImpl(V1NodeConfigSource item) { - this.builder = new V1NodeConfigSourceBuilder(this, item); - } - LastKnownGoodNestedImpl() { - this.builder = new V1NodeConfigSourceBuilder(this); - } - V1NodeConfigSourceBuilder builder; - public N and() { - return (N) V1NodeConfigStatusFluentImpl.this.withLastKnownGood(builder.build()); - } - public N endLastKnownGood() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsBuilder.java index e415f0734e..2ce9e7fc27 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeDaemonEndpointsBuilder extends V1NodeDaemonEndpointsFluentImpl implements VisitableBuilder{ +public class V1NodeDaemonEndpointsBuilder extends V1NodeDaemonEndpointsFluent implements VisitableBuilder{ public V1NodeDaemonEndpointsBuilder() { - this(false); - } - public V1NodeDaemonEndpointsBuilder(Boolean validationEnabled) { - this(new V1NodeDaemonEndpoints(), validationEnabled); + this(new V1NodeDaemonEndpoints()); } + public V1NodeDaemonEndpointsBuilder(V1NodeDaemonEndpointsFluent fluent) { - this(fluent, false); - } - public V1NodeDaemonEndpointsBuilder(V1NodeDaemonEndpointsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeDaemonEndpoints(), validationEnabled); + this(fluent, new V1NodeDaemonEndpoints()); } + public V1NodeDaemonEndpointsBuilder(V1NodeDaemonEndpointsFluent fluent,V1NodeDaemonEndpoints instance) { - this(fluent, instance, false); - } - public V1NodeDaemonEndpointsBuilder(V1NodeDaemonEndpointsFluent fluent,V1NodeDaemonEndpoints instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withKubeletEndpoint(instance.getKubeletEndpoint()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeDaemonEndpointsBuilder(V1NodeDaemonEndpoints instance) { - this(instance,false); - } - public V1NodeDaemonEndpointsBuilder(V1NodeDaemonEndpoints instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withKubeletEndpoint(instance.getKubeletEndpoint()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeDaemonEndpointsFluent fluent; - Boolean validationEnabled; + public V1NodeDaemonEndpoints build() { V1NodeDaemonEndpoints buildable = new V1NodeDaemonEndpoints(); - buildable.setKubeletEndpoint(fluent.getKubeletEndpoint()); + buildable.setKubeletEndpoint(fluent.buildKubeletEndpoint()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsFluent.java index 8ca2c843dc..a71f7e4a4b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1NodeDaemonEndpointsFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildKubeletEndpoint instead. - * @return The buildable object. - */ - @Deprecated - public V1DaemonEndpoint getKubeletEndpoint(); - public V1DaemonEndpoint buildKubeletEndpoint(); - public A withKubeletEndpoint(V1DaemonEndpoint kubeletEndpoint); - public Boolean hasKubeletEndpoint(); - public V1NodeDaemonEndpointsFluent.KubeletEndpointNested withNewKubeletEndpoint(); - public V1NodeDaemonEndpointsFluent.KubeletEndpointNested withNewKubeletEndpointLike(V1DaemonEndpoint item); - public V1NodeDaemonEndpointsFluent.KubeletEndpointNested editKubeletEndpoint(); - public V1NodeDaemonEndpointsFluent.KubeletEndpointNested editOrNewKubeletEndpoint(); - public V1NodeDaemonEndpointsFluent.KubeletEndpointNested editOrNewKubeletEndpointLike(V1DaemonEndpoint item); - public interface KubeletEndpointNested extends Nested,V1DaemonEndpointFluent>{ - public N and(); - public N endKubeletEndpoint(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeDaemonEndpointsFluent> extends BaseFluent{ + public V1NodeDaemonEndpointsFluent() { + } + + public V1NodeDaemonEndpointsFluent(V1NodeDaemonEndpoints instance) { + this.copyInstance(instance); + } + private V1DaemonEndpointBuilder kubeletEndpoint; + + protected void copyInstance(V1NodeDaemonEndpoints instance) { + instance = (instance != null ? instance : new V1NodeDaemonEndpoints()); + if (instance != null) { + this.withKubeletEndpoint(instance.getKubeletEndpoint()); + } + } + + public V1DaemonEndpoint buildKubeletEndpoint() { + return this.kubeletEndpoint != null ? this.kubeletEndpoint.build() : null; + } + + public A withKubeletEndpoint(V1DaemonEndpoint kubeletEndpoint) { + this._visitables.remove("kubeletEndpoint"); + if (kubeletEndpoint != null) { + this.kubeletEndpoint = new V1DaemonEndpointBuilder(kubeletEndpoint); + this._visitables.get("kubeletEndpoint").add(this.kubeletEndpoint); + } else { + this.kubeletEndpoint = null; + this._visitables.get("kubeletEndpoint").remove(this.kubeletEndpoint); + } + return (A) this; + } + + public boolean hasKubeletEndpoint() { + return this.kubeletEndpoint != null; + } + + public KubeletEndpointNested withNewKubeletEndpoint() { + return new KubeletEndpointNested(null); + } + + public KubeletEndpointNested withNewKubeletEndpointLike(V1DaemonEndpoint item) { + return new KubeletEndpointNested(item); + } + + public KubeletEndpointNested editKubeletEndpoint() { + return withNewKubeletEndpointLike(java.util.Optional.ofNullable(buildKubeletEndpoint()).orElse(null)); + } + + public KubeletEndpointNested editOrNewKubeletEndpoint() { + return withNewKubeletEndpointLike(java.util.Optional.ofNullable(buildKubeletEndpoint()).orElse(new V1DaemonEndpointBuilder().build())); + } + + public KubeletEndpointNested editOrNewKubeletEndpointLike(V1DaemonEndpoint item) { + return withNewKubeletEndpointLike(java.util.Optional.ofNullable(buildKubeletEndpoint()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeDaemonEndpointsFluent that = (V1NodeDaemonEndpointsFluent) o; + if (!java.util.Objects.equals(kubeletEndpoint, that.kubeletEndpoint)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(kubeletEndpoint, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (kubeletEndpoint != null) { sb.append("kubeletEndpoint:"); sb.append(kubeletEndpoint); } + sb.append("}"); + return sb.toString(); } + public class KubeletEndpointNested extends V1DaemonEndpointFluent> implements Nested{ + KubeletEndpointNested(V1DaemonEndpoint item) { + this.builder = new V1DaemonEndpointBuilder(this, item); + } + V1DaemonEndpointBuilder builder; + + public N and() { + return (N) V1NodeDaemonEndpointsFluent.this.withKubeletEndpoint(builder.build()); + } + + public N endKubeletEndpoint() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsFluentImpl.java deleted file mode 100644 index b21f481740..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeDaemonEndpointsFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeDaemonEndpointsFluentImpl> extends BaseFluent implements V1NodeDaemonEndpointsFluent{ - public V1NodeDaemonEndpointsFluentImpl() { - } - public V1NodeDaemonEndpointsFluentImpl(V1NodeDaemonEndpoints instance) { - if (instance != null) { - this.withKubeletEndpoint(instance.getKubeletEndpoint()); - } - } - private V1DaemonEndpointBuilder kubeletEndpoint; - - /** - * This method has been deprecated, please use method buildKubeletEndpoint instead. - * @return The buildable object. - */ - @Deprecated - public V1DaemonEndpoint getKubeletEndpoint() { - return this.kubeletEndpoint!=null ?this.kubeletEndpoint.build():null; - } - public V1DaemonEndpoint buildKubeletEndpoint() { - return this.kubeletEndpoint!=null ?this.kubeletEndpoint.build():null; - } - public A withKubeletEndpoint(V1DaemonEndpoint kubeletEndpoint) { - _visitables.get("kubeletEndpoint").remove(this.kubeletEndpoint); - if (kubeletEndpoint!=null){ this.kubeletEndpoint= new V1DaemonEndpointBuilder(kubeletEndpoint); _visitables.get("kubeletEndpoint").add(this.kubeletEndpoint);} else { this.kubeletEndpoint = null; _visitables.get("kubeletEndpoint").remove(this.kubeletEndpoint); } return (A) this; - } - public Boolean hasKubeletEndpoint() { - return this.kubeletEndpoint != null; - } - public V1NodeDaemonEndpointsFluentImpl.KubeletEndpointNested withNewKubeletEndpoint() { - return new V1NodeDaemonEndpointsFluentImpl.KubeletEndpointNestedImpl(); - } - public V1NodeDaemonEndpointsFluentImpl.KubeletEndpointNested withNewKubeletEndpointLike(V1DaemonEndpoint item) { - return new V1NodeDaemonEndpointsFluentImpl.KubeletEndpointNestedImpl(item); - } - public V1NodeDaemonEndpointsFluentImpl.KubeletEndpointNested editKubeletEndpoint() { - return withNewKubeletEndpointLike(getKubeletEndpoint()); - } - public V1NodeDaemonEndpointsFluentImpl.KubeletEndpointNested editOrNewKubeletEndpoint() { - return withNewKubeletEndpointLike(getKubeletEndpoint() != null ? getKubeletEndpoint(): new V1DaemonEndpointBuilder().build()); - } - public V1NodeDaemonEndpointsFluentImpl.KubeletEndpointNested editOrNewKubeletEndpointLike(V1DaemonEndpoint item) { - return withNewKubeletEndpointLike(getKubeletEndpoint() != null ? getKubeletEndpoint(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeDaemonEndpointsFluentImpl that = (V1NodeDaemonEndpointsFluentImpl) o; - if (!java.util.Objects.equals(kubeletEndpoint, that.kubeletEndpoint)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(kubeletEndpoint, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (kubeletEndpoint != null) { sb.append("kubeletEndpoint:"); sb.append(kubeletEndpoint); } - sb.append("}"); - return sb.toString(); - } - class KubeletEndpointNestedImpl extends V1DaemonEndpointFluentImpl> implements V1NodeDaemonEndpointsFluentImpl.KubeletEndpointNested,Nested{ - KubeletEndpointNestedImpl(V1DaemonEndpoint item) { - this.builder = new V1DaemonEndpointBuilder(this, item); - } - KubeletEndpointNestedImpl() { - this.builder = new V1DaemonEndpointBuilder(this); - } - V1DaemonEndpointBuilder builder; - public N and() { - return (N) V1NodeDaemonEndpointsFluentImpl.this.withKubeletEndpoint(builder.build()); - } - public N endKubeletEndpoint() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeFluent.java index df92a798d1..7f9e472d41 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1NodeFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1NodeFluent.MetadataNested withNewMetadata(); - public V1NodeFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1NodeFluent.MetadataNested editMetadata(); - public V1NodeFluent.MetadataNested editOrNewMetadata(); - public V1NodeFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSpec getSpec(); - public V1NodeSpec buildSpec(); - public A withSpec(V1NodeSpec spec); - public Boolean hasSpec(); - public V1NodeFluent.SpecNested withNewSpec(); - public V1NodeFluent.SpecNested withNewSpecLike(V1NodeSpec item); - public V1NodeFluent.SpecNested editSpec(); - public V1NodeFluent.SpecNested editOrNewSpec(); - public V1NodeFluent.SpecNested editOrNewSpecLike(V1NodeSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeStatus getStatus(); - public V1NodeStatus buildStatus(); - public A withStatus(V1NodeStatus status); - public Boolean hasStatus(); - public V1NodeFluent.StatusNested withNewStatus(); - public V1NodeFluent.StatusNested withNewStatusLike(V1NodeStatus item); - public V1NodeFluent.StatusNested editStatus(); - public V1NodeFluent.StatusNested editOrNewStatus(); - public V1NodeFluent.StatusNested editOrNewStatusLike(V1NodeStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeFluent> extends BaseFluent{ + public V1NodeFluent() { + } + + public V1NodeFluent(V1Node instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1NodeSpecBuilder spec; + private V1NodeStatusBuilder status; + + protected void copyInstance(V1Node instance) { + instance = (instance != null ? instance : new V1Node()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1NodeSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1NodeSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1NodeSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1NodeSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1NodeSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1NodeSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1NodeSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1NodeStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1NodeStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1NodeStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1NodeStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1NodeStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1NodeStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeFluent that = (V1NodeFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1NodeFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1NodeStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1NodeSpecFluent> implements Nested{ + SpecNested(V1NodeSpec item) { + this.builder = new V1NodeSpecBuilder(this, item); + } + V1NodeSpecBuilder builder; + + public N and() { + return (N) V1NodeFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1NodeStatusFluent> implements Nested{ + StatusNested(V1NodeStatus item) { + this.builder = new V1NodeStatusBuilder(this, item); + } + V1NodeStatusBuilder builder; + + public N and() { + return (N) V1NodeFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeFluentImpl.java deleted file mode 100644 index 50bc6be187..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeFluentImpl> extends BaseFluent implements V1NodeFluent{ - public V1NodeFluentImpl() { - } - public V1NodeFluentImpl(V1Node instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1NodeSpecBuilder spec; - private V1NodeStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1NodeFluentImpl.MetadataNested withNewMetadata() { - return new V1NodeFluentImpl.MetadataNestedImpl(); - } - public V1NodeFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1NodeFluentImpl.MetadataNestedImpl(item); - } - public V1NodeFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1NodeFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1NodeFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1NodeSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1NodeSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1NodeSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1NodeFluentImpl.SpecNested withNewSpec() { - return new V1NodeFluentImpl.SpecNestedImpl(); - } - public V1NodeFluentImpl.SpecNested withNewSpecLike(V1NodeSpec item) { - return new V1NodeFluentImpl.SpecNestedImpl(item); - } - public V1NodeFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1NodeFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1NodeSpecBuilder().build()); - } - public V1NodeFluentImpl.SpecNested editOrNewSpecLike(V1NodeSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1NodeStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1NodeStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1NodeStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1NodeFluentImpl.StatusNested withNewStatus() { - return new V1NodeFluentImpl.StatusNestedImpl(); - } - public V1NodeFluentImpl.StatusNested withNewStatusLike(V1NodeStatus item) { - return new V1NodeFluentImpl.StatusNestedImpl(item); - } - public V1NodeFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1NodeFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1NodeStatusBuilder().build()); - } - public V1NodeFluentImpl.StatusNested editOrNewStatusLike(V1NodeStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeFluentImpl that = (V1NodeFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1NodeFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1NodeFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1NodeSpecFluentImpl> implements V1NodeFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1NodeSpec item) { - this.builder = new V1NodeSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1NodeSpecBuilder(this); - } - V1NodeSpecBuilder builder; - public N and() { - return (N) V1NodeFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1NodeStatusFluentImpl> implements V1NodeFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1NodeStatus item) { - this.builder = new V1NodeStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1NodeStatusBuilder(this); - } - V1NodeStatusBuilder builder; - public N and() { - return (N) V1NodeFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListBuilder.java index e34e896b83..57d4af176c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeListBuilder extends V1NodeListFluentImpl implements VisitableBuilder{ +public class V1NodeListBuilder extends V1NodeListFluent implements VisitableBuilder{ public V1NodeListBuilder() { - this(false); - } - public V1NodeListBuilder(Boolean validationEnabled) { - this(new V1NodeList(), validationEnabled); + this(new V1NodeList()); } + public V1NodeListBuilder(V1NodeListFluent fluent) { - this(fluent, false); - } - public V1NodeListBuilder(V1NodeListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeList(), validationEnabled); + this(fluent, new V1NodeList()); } + public V1NodeListBuilder(V1NodeListFluent fluent,V1NodeList instance) { - this(fluent, instance, false); - } - public V1NodeListBuilder(V1NodeListFluent fluent,V1NodeList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeListBuilder(V1NodeList instance) { - this(instance,false); - } - public V1NodeListBuilder(V1NodeList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeListFluent fluent; - Boolean validationEnabled; + public V1NodeList build() { V1NodeList buildable = new V1NodeList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListFluent.java index e9efbff496..6c0de6e617 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NodeListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Node item); - public A setToItems(int index,V1Node item); - public A addToItems(io.kubernetes.client.openapi.models.V1Node... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Node... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Node buildItem(int index); - public V1Node buildFirstItem(); - public V1Node buildLastItem(); - public V1Node buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Node... items); - public Boolean hasItems(); - public V1NodeListFluent.ItemsNested addNewItem(); - public V1NodeListFluent.ItemsNested addNewItemLike(V1Node item); - public V1NodeListFluent.ItemsNested setNewItemLike(int index,V1Node item); - public V1NodeListFluent.ItemsNested editItem(int index); - public V1NodeListFluent.ItemsNested editFirstItem(); - public V1NodeListFluent.ItemsNested editLastItem(); - public V1NodeListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1NodeListFluent.MetadataNested withNewMetadata(); - public V1NodeListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1NodeListFluent.MetadataNested editMetadata(); - public V1NodeListFluent.MetadataNested editOrNewMetadata(); - public V1NodeListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1NodeFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeListFluent> extends BaseFluent{ + public V1NodeListFluent() { + } + + public V1NodeListFluent(V1NodeList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1NodeList instance) { + instance = (instance != null ? instance : new V1NodeList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Node item) { + if (this.items == null) {this.items = new ArrayList();} + V1NodeBuilder builder = new V1NodeBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Node item) { + if (this.items == null) {this.items = new ArrayList();} + V1NodeBuilder builder = new V1NodeBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Node... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Node item : items) {V1NodeBuilder builder = new V1NodeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Node item : items) {V1NodeBuilder builder = new V1NodeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Node... items) { + if (this.items == null) return (A)this; + for (V1Node item : items) {V1NodeBuilder builder = new V1NodeBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Node item : items) {V1NodeBuilder builder = new V1NodeBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1NodeBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Node buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Node buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Node buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Node buildMatchingItem(Predicate predicate) { + for (V1NodeBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1NodeBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Node item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Node... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Node item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Node item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Node item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeListFluent that = (V1NodeListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1NodeFluent> implements Nested{ + ItemsNested(int index,V1Node item) { + this.index = index; + this.builder = new V1NodeBuilder(this, item); + } + V1NodeBuilder builder; + int index; + public N and() { + return (N) V1NodeListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1NodeListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListFluentImpl.java deleted file mode 100644 index fac14a0324..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeListFluentImpl> extends BaseFluent implements V1NodeListFluent{ - public V1NodeListFluentImpl() { - } - public V1NodeListFluentImpl(V1NodeList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Node item) { - if (this.items == null) {this.items = new ArrayList();} - V1NodeBuilder builder = new V1NodeBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Node item) { - if (this.items == null) {this.items = new ArrayList();} - V1NodeBuilder builder = new V1NodeBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Node... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Node item : items) {V1NodeBuilder builder = new V1NodeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Node item : items) {V1NodeBuilder builder = new V1NodeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Node... items) { - for (V1Node item : items) {V1NodeBuilder builder = new V1NodeBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Node item : items) {V1NodeBuilder builder = new V1NodeBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1NodeBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Node buildItem(int index) { - return this.items.get(index).build(); - } - public V1Node buildFirstItem() { - return this.items.get(0).build(); - } - public V1Node buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Node buildMatchingItem(Predicate predicate) { - for (V1NodeBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1NodeBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Node item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Node... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Node item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1NodeListFluentImpl.ItemsNested addNewItem() { - return new V1NodeListFluentImpl.ItemsNestedImpl(); - } - public V1NodeListFluentImpl.ItemsNested addNewItemLike(V1Node item) { - return new V1NodeListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1NodeListFluentImpl.ItemsNested setNewItemLike(int index,V1Node item) { - return new V1NodeListFluentImpl.ItemsNestedImpl(index, item); - } - public V1NodeListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1NodeListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1NodeListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1NodeListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1NodeListFluentImpl.MetadataNestedImpl(); - } - public V1NodeListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1NodeListFluentImpl.MetadataNestedImpl(item); - } - public V1NodeListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1NodeListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1NodeListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeListFluentImpl that = (V1NodeListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1NodeFluentImpl> implements V1NodeListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Node item) { - this.index = index; - this.builder = new V1NodeBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1NodeBuilder(this); - } - V1NodeBuilder builder; - int index; - public N and() { - return (N) V1NodeListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1NodeListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1NodeListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorBuilder.java index 63f0dff193..2395959cca 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeSelectorBuilder extends V1NodeSelectorFluentImpl implements VisitableBuilder{ +public class V1NodeSelectorBuilder extends V1NodeSelectorFluent implements VisitableBuilder{ public V1NodeSelectorBuilder() { - this(false); - } - public V1NodeSelectorBuilder(Boolean validationEnabled) { - this(new V1NodeSelector(), validationEnabled); + this(new V1NodeSelector()); } + public V1NodeSelectorBuilder(V1NodeSelectorFluent fluent) { - this(fluent, false); - } - public V1NodeSelectorBuilder(V1NodeSelectorFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeSelector(), validationEnabled); + this(fluent, new V1NodeSelector()); } + public V1NodeSelectorBuilder(V1NodeSelectorFluent fluent,V1NodeSelector instance) { - this(fluent, instance, false); - } - public V1NodeSelectorBuilder(V1NodeSelectorFluent fluent,V1NodeSelector instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNodeSelectorTerms(instance.getNodeSelectorTerms()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeSelectorBuilder(V1NodeSelector instance) { - this(instance,false); - } - public V1NodeSelectorBuilder(V1NodeSelector instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNodeSelectorTerms(instance.getNodeSelectorTerms()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeSelectorFluent fluent; - Boolean validationEnabled; + public V1NodeSelector build() { V1NodeSelector buildable = new V1NodeSelector(); - buildable.setNodeSelectorTerms(fluent.getNodeSelectorTerms()); + buildable.setNodeSelectorTerms(fluent.buildNodeSelectorTerms()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorFluent.java index 1e5b320663..7c00dd3a12 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NodeSelectorFluent> extends Fluent{ - public A addToNodeSelectorTerms(int index,V1NodeSelectorTerm item); - public A setToNodeSelectorTerms(int index,V1NodeSelectorTerm item); - public A addToNodeSelectorTerms(io.kubernetes.client.openapi.models.V1NodeSelectorTerm... items); - public A addAllToNodeSelectorTerms(Collection items); - public A removeFromNodeSelectorTerms(io.kubernetes.client.openapi.models.V1NodeSelectorTerm... items); - public A removeAllFromNodeSelectorTerms(Collection items); - public A removeMatchingFromNodeSelectorTerms(Predicate predicate); - - /** - * This method has been deprecated, please use method buildNodeSelectorTerms instead. - * @return The buildable object. - */ - @Deprecated - public List getNodeSelectorTerms(); - public List buildNodeSelectorTerms(); - public V1NodeSelectorTerm buildNodeSelectorTerm(int index); - public V1NodeSelectorTerm buildFirstNodeSelectorTerm(); - public V1NodeSelectorTerm buildLastNodeSelectorTerm(); - public V1NodeSelectorTerm buildMatchingNodeSelectorTerm(Predicate predicate); - public Boolean hasMatchingNodeSelectorTerm(Predicate predicate); - public A withNodeSelectorTerms(List nodeSelectorTerms); - public A withNodeSelectorTerms(io.kubernetes.client.openapi.models.V1NodeSelectorTerm... nodeSelectorTerms); - public Boolean hasNodeSelectorTerms(); - public V1NodeSelectorFluent.NodeSelectorTermsNested addNewNodeSelectorTerm(); - public V1NodeSelectorFluent.NodeSelectorTermsNested addNewNodeSelectorTermLike(V1NodeSelectorTerm item); - public V1NodeSelectorFluent.NodeSelectorTermsNested setNewNodeSelectorTermLike(int index,V1NodeSelectorTerm item); - public V1NodeSelectorFluent.NodeSelectorTermsNested editNodeSelectorTerm(int index); - public V1NodeSelectorFluent.NodeSelectorTermsNested editFirstNodeSelectorTerm(); - public V1NodeSelectorFluent.NodeSelectorTermsNested editLastNodeSelectorTerm(); - public V1NodeSelectorFluent.NodeSelectorTermsNested editMatchingNodeSelectorTerm(Predicate predicate); - public interface NodeSelectorTermsNested extends Nested,V1NodeSelectorTermFluent>{ - public N and(); - public N endNodeSelectorTerm(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeSelectorFluent> extends BaseFluent{ + public V1NodeSelectorFluent() { + } + + public V1NodeSelectorFluent(V1NodeSelector instance) { + this.copyInstance(instance); + } + private ArrayList nodeSelectorTerms; + + protected void copyInstance(V1NodeSelector instance) { + instance = (instance != null ? instance : new V1NodeSelector()); + if (instance != null) { + this.withNodeSelectorTerms(instance.getNodeSelectorTerms()); + } + } + + public A addToNodeSelectorTerms(int index,V1NodeSelectorTerm item) { + if (this.nodeSelectorTerms == null) {this.nodeSelectorTerms = new ArrayList();} + V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item); + if (index < 0 || index >= nodeSelectorTerms.size()) { _visitables.get("nodeSelectorTerms").add(builder); nodeSelectorTerms.add(builder); } else { _visitables.get("nodeSelectorTerms").add(index, builder); nodeSelectorTerms.add(index, builder);} + return (A)this; + } + + public A setToNodeSelectorTerms(int index,V1NodeSelectorTerm item) { + if (this.nodeSelectorTerms == null) {this.nodeSelectorTerms = new ArrayList();} + V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item); + if (index < 0 || index >= nodeSelectorTerms.size()) { _visitables.get("nodeSelectorTerms").add(builder); nodeSelectorTerms.add(builder); } else { _visitables.get("nodeSelectorTerms").set(index, builder); nodeSelectorTerms.set(index, builder);} + return (A)this; + } + + public A addToNodeSelectorTerms(io.kubernetes.client.openapi.models.V1NodeSelectorTerm... items) { + if (this.nodeSelectorTerms == null) {this.nodeSelectorTerms = new ArrayList();} + for (V1NodeSelectorTerm item : items) {V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item);_visitables.get("nodeSelectorTerms").add(builder);this.nodeSelectorTerms.add(builder);} return (A)this; + } + + public A addAllToNodeSelectorTerms(Collection items) { + if (this.nodeSelectorTerms == null) {this.nodeSelectorTerms = new ArrayList();} + for (V1NodeSelectorTerm item : items) {V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item);_visitables.get("nodeSelectorTerms").add(builder);this.nodeSelectorTerms.add(builder);} return (A)this; + } + + public A removeFromNodeSelectorTerms(io.kubernetes.client.openapi.models.V1NodeSelectorTerm... items) { + if (this.nodeSelectorTerms == null) return (A)this; + for (V1NodeSelectorTerm item : items) {V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item);_visitables.get("nodeSelectorTerms").remove(builder); this.nodeSelectorTerms.remove(builder);} return (A)this; + } + + public A removeAllFromNodeSelectorTerms(Collection items) { + if (this.nodeSelectorTerms == null) return (A)this; + for (V1NodeSelectorTerm item : items) {V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item);_visitables.get("nodeSelectorTerms").remove(builder); this.nodeSelectorTerms.remove(builder);} return (A)this; + } + + public A removeMatchingFromNodeSelectorTerms(Predicate predicate) { + if (nodeSelectorTerms == null) return (A) this; + final Iterator each = nodeSelectorTerms.iterator(); + final List visitables = _visitables.get("nodeSelectorTerms"); + while (each.hasNext()) { + V1NodeSelectorTermBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildNodeSelectorTerms() { + return this.nodeSelectorTerms != null ? build(nodeSelectorTerms) : null; + } + + public V1NodeSelectorTerm buildNodeSelectorTerm(int index) { + return this.nodeSelectorTerms.get(index).build(); + } + + public V1NodeSelectorTerm buildFirstNodeSelectorTerm() { + return this.nodeSelectorTerms.get(0).build(); + } + + public V1NodeSelectorTerm buildLastNodeSelectorTerm() { + return this.nodeSelectorTerms.get(nodeSelectorTerms.size() - 1).build(); + } + + public V1NodeSelectorTerm buildMatchingNodeSelectorTerm(Predicate predicate) { + for (V1NodeSelectorTermBuilder item : nodeSelectorTerms) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingNodeSelectorTerm(Predicate predicate) { + for (V1NodeSelectorTermBuilder item : nodeSelectorTerms) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withNodeSelectorTerms(List nodeSelectorTerms) { + if (this.nodeSelectorTerms != null) { + this._visitables.get("nodeSelectorTerms").clear(); + } + if (nodeSelectorTerms != null) { + this.nodeSelectorTerms = new ArrayList(); + for (V1NodeSelectorTerm item : nodeSelectorTerms) { + this.addToNodeSelectorTerms(item); + } + } else { + this.nodeSelectorTerms = null; + } + return (A) this; + } + + public A withNodeSelectorTerms(io.kubernetes.client.openapi.models.V1NodeSelectorTerm... nodeSelectorTerms) { + if (this.nodeSelectorTerms != null) { + this.nodeSelectorTerms.clear(); + _visitables.remove("nodeSelectorTerms"); + } + if (nodeSelectorTerms != null) { + for (V1NodeSelectorTerm item : nodeSelectorTerms) { + this.addToNodeSelectorTerms(item); + } + } + return (A) this; + } + + public boolean hasNodeSelectorTerms() { + return this.nodeSelectorTerms != null && !this.nodeSelectorTerms.isEmpty(); + } + + public NodeSelectorTermsNested addNewNodeSelectorTerm() { + return new NodeSelectorTermsNested(-1, null); + } + + public NodeSelectorTermsNested addNewNodeSelectorTermLike(V1NodeSelectorTerm item) { + return new NodeSelectorTermsNested(-1, item); + } + + public NodeSelectorTermsNested setNewNodeSelectorTermLike(int index,V1NodeSelectorTerm item) { + return new NodeSelectorTermsNested(index, item); + } + + public NodeSelectorTermsNested editNodeSelectorTerm(int index) { + if (nodeSelectorTerms.size() <= index) throw new RuntimeException("Can't edit nodeSelectorTerms. Index exceeds size."); + return setNewNodeSelectorTermLike(index, buildNodeSelectorTerm(index)); + } + + public NodeSelectorTermsNested editFirstNodeSelectorTerm() { + if (nodeSelectorTerms.size() == 0) throw new RuntimeException("Can't edit first nodeSelectorTerms. The list is empty."); + return setNewNodeSelectorTermLike(0, buildNodeSelectorTerm(0)); + } + + public NodeSelectorTermsNested editLastNodeSelectorTerm() { + int index = nodeSelectorTerms.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last nodeSelectorTerms. The list is empty."); + return setNewNodeSelectorTermLike(index, buildNodeSelectorTerm(index)); + } + + public NodeSelectorTermsNested editMatchingNodeSelectorTerm(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1NodeSelectorTermFluent> implements Nested{ + NodeSelectorTermsNested(int index,V1NodeSelectorTerm item) { + this.index = index; + this.builder = new V1NodeSelectorTermBuilder(this, item); + } + V1NodeSelectorTermBuilder builder; + int index; + + public N and() { + return (N) V1NodeSelectorFluent.this.setToNodeSelectorTerms(index,builder.build()); + } + + public N endNodeSelectorTerm() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorFluentImpl.java deleted file mode 100644 index 134670e4cc..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeSelectorFluentImpl> extends BaseFluent implements V1NodeSelectorFluent{ - public V1NodeSelectorFluentImpl() { - } - public V1NodeSelectorFluentImpl(V1NodeSelector instance) { - if (instance != null) { - this.withNodeSelectorTerms(instance.getNodeSelectorTerms()); - } - } - private ArrayList nodeSelectorTerms; - public A addToNodeSelectorTerms(int index,V1NodeSelectorTerm item) { - if (this.nodeSelectorTerms == null) {this.nodeSelectorTerms = new ArrayList();} - V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item); - if (index < 0 || index >= nodeSelectorTerms.size()) { _visitables.get("nodeSelectorTerms").add(builder); nodeSelectorTerms.add(builder); } else { _visitables.get("nodeSelectorTerms").add(index, builder); nodeSelectorTerms.add(index, builder);} - return (A)this; - } - public A setToNodeSelectorTerms(int index,V1NodeSelectorTerm item) { - if (this.nodeSelectorTerms == null) {this.nodeSelectorTerms = new ArrayList();} - V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item); - if (index < 0 || index >= nodeSelectorTerms.size()) { _visitables.get("nodeSelectorTerms").add(builder); nodeSelectorTerms.add(builder); } else { _visitables.get("nodeSelectorTerms").set(index, builder); nodeSelectorTerms.set(index, builder);} - return (A)this; - } - public A addToNodeSelectorTerms(io.kubernetes.client.openapi.models.V1NodeSelectorTerm... items) { - if (this.nodeSelectorTerms == null) {this.nodeSelectorTerms = new ArrayList();} - for (V1NodeSelectorTerm item : items) {V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item);_visitables.get("nodeSelectorTerms").add(builder);this.nodeSelectorTerms.add(builder);} return (A)this; - } - public A addAllToNodeSelectorTerms(Collection items) { - if (this.nodeSelectorTerms == null) {this.nodeSelectorTerms = new ArrayList();} - for (V1NodeSelectorTerm item : items) {V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item);_visitables.get("nodeSelectorTerms").add(builder);this.nodeSelectorTerms.add(builder);} return (A)this; - } - public A removeFromNodeSelectorTerms(io.kubernetes.client.openapi.models.V1NodeSelectorTerm... items) { - for (V1NodeSelectorTerm item : items) {V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item);_visitables.get("nodeSelectorTerms").remove(builder);if (this.nodeSelectorTerms != null) {this.nodeSelectorTerms.remove(builder);}} return (A)this; - } - public A removeAllFromNodeSelectorTerms(Collection items) { - for (V1NodeSelectorTerm item : items) {V1NodeSelectorTermBuilder builder = new V1NodeSelectorTermBuilder(item);_visitables.get("nodeSelectorTerms").remove(builder);if (this.nodeSelectorTerms != null) {this.nodeSelectorTerms.remove(builder);}} return (A)this; - } - public A removeMatchingFromNodeSelectorTerms(Predicate predicate) { - if (nodeSelectorTerms == null) return (A) this; - final Iterator each = nodeSelectorTerms.iterator(); - final List visitables = _visitables.get("nodeSelectorTerms"); - while (each.hasNext()) { - V1NodeSelectorTermBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildNodeSelectorTerms instead. - * @return The buildable object. - */ - @Deprecated - public List getNodeSelectorTerms() { - return nodeSelectorTerms != null ? build(nodeSelectorTerms) : null; - } - public List buildNodeSelectorTerms() { - return nodeSelectorTerms != null ? build(nodeSelectorTerms) : null; - } - public V1NodeSelectorTerm buildNodeSelectorTerm(int index) { - return this.nodeSelectorTerms.get(index).build(); - } - public V1NodeSelectorTerm buildFirstNodeSelectorTerm() { - return this.nodeSelectorTerms.get(0).build(); - } - public V1NodeSelectorTerm buildLastNodeSelectorTerm() { - return this.nodeSelectorTerms.get(nodeSelectorTerms.size() - 1).build(); - } - public V1NodeSelectorTerm buildMatchingNodeSelectorTerm(Predicate predicate) { - for (V1NodeSelectorTermBuilder item: nodeSelectorTerms) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingNodeSelectorTerm(Predicate predicate) { - for (V1NodeSelectorTermBuilder item: nodeSelectorTerms) { if(predicate.test(item)){ return true;} } return false; - } - public A withNodeSelectorTerms(List nodeSelectorTerms) { - if (this.nodeSelectorTerms != null) { _visitables.get("nodeSelectorTerms").clear();} - if (nodeSelectorTerms != null) {this.nodeSelectorTerms = new ArrayList(); for (V1NodeSelectorTerm item : nodeSelectorTerms){this.addToNodeSelectorTerms(item);}} else { this.nodeSelectorTerms = null;} return (A) this; - } - public A withNodeSelectorTerms(io.kubernetes.client.openapi.models.V1NodeSelectorTerm... nodeSelectorTerms) { - if (this.nodeSelectorTerms != null) {this.nodeSelectorTerms.clear(); _visitables.remove("nodeSelectorTerms"); } - if (nodeSelectorTerms != null) {for (V1NodeSelectorTerm item :nodeSelectorTerms){ this.addToNodeSelectorTerms(item);}} return (A) this; - } - public Boolean hasNodeSelectorTerms() { - return nodeSelectorTerms != null && !nodeSelectorTerms.isEmpty(); - } - public V1NodeSelectorFluentImpl.NodeSelectorTermsNested addNewNodeSelectorTerm() { - return new V1NodeSelectorFluentImpl.NodeSelectorTermsNestedImpl(); - } - public V1NodeSelectorFluentImpl.NodeSelectorTermsNested addNewNodeSelectorTermLike(V1NodeSelectorTerm item) { - return new V1NodeSelectorFluentImpl.NodeSelectorTermsNestedImpl(-1, item); - } - public V1NodeSelectorFluentImpl.NodeSelectorTermsNested setNewNodeSelectorTermLike(int index,V1NodeSelectorTerm item) { - return new V1NodeSelectorFluentImpl.NodeSelectorTermsNestedImpl(index, item); - } - public V1NodeSelectorFluentImpl.NodeSelectorTermsNested editNodeSelectorTerm(int index) { - if (nodeSelectorTerms.size() <= index) throw new RuntimeException("Can't edit nodeSelectorTerms. Index exceeds size."); - return setNewNodeSelectorTermLike(index, buildNodeSelectorTerm(index)); - } - public V1NodeSelectorFluentImpl.NodeSelectorTermsNested editFirstNodeSelectorTerm() { - if (nodeSelectorTerms.size() == 0) throw new RuntimeException("Can't edit first nodeSelectorTerms. The list is empty."); - return setNewNodeSelectorTermLike(0, buildNodeSelectorTerm(0)); - } - public V1NodeSelectorFluentImpl.NodeSelectorTermsNested editLastNodeSelectorTerm() { - int index = nodeSelectorTerms.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last nodeSelectorTerms. The list is empty."); - return setNewNodeSelectorTermLike(index, buildNodeSelectorTerm(index)); - } - public V1NodeSelectorFluentImpl.NodeSelectorTermsNested editMatchingNodeSelectorTerm(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1NodeSelectorTermFluentImpl> implements V1NodeSelectorFluentImpl.NodeSelectorTermsNested,Nested{ - NodeSelectorTermsNestedImpl(int index,V1NodeSelectorTerm item) { - this.index = index; - this.builder = new V1NodeSelectorTermBuilder(this, item); - } - NodeSelectorTermsNestedImpl() { - this.index = -1; - this.builder = new V1NodeSelectorTermBuilder(this); - } - V1NodeSelectorTermBuilder builder; - int index; - public N and() { - return (N) V1NodeSelectorFluentImpl.this.setToNodeSelectorTerms(index,builder.build()); - } - public N endNodeSelectorTerm() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementBuilder.java index d987f4d4f4..5bb05e2eb0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeSelectorRequirementBuilder extends V1NodeSelectorRequirementFluentImpl implements VisitableBuilder{ +public class V1NodeSelectorRequirementBuilder extends V1NodeSelectorRequirementFluent implements VisitableBuilder{ public V1NodeSelectorRequirementBuilder() { - this(false); - } - public V1NodeSelectorRequirementBuilder(Boolean validationEnabled) { - this(new V1NodeSelectorRequirement(), validationEnabled); + this(new V1NodeSelectorRequirement()); } + public V1NodeSelectorRequirementBuilder(V1NodeSelectorRequirementFluent fluent) { - this(fluent, false); - } - public V1NodeSelectorRequirementBuilder(V1NodeSelectorRequirementFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeSelectorRequirement(), validationEnabled); + this(fluent, new V1NodeSelectorRequirement()); } + public V1NodeSelectorRequirementBuilder(V1NodeSelectorRequirementFluent fluent,V1NodeSelectorRequirement instance) { - this(fluent, instance, false); - } - public V1NodeSelectorRequirementBuilder(V1NodeSelectorRequirementFluent fluent,V1NodeSelectorRequirement instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withKey(instance.getKey()); - fluent.withOperator(instance.getOperator()); - fluent.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeSelectorRequirementBuilder(V1NodeSelectorRequirement instance) { - this(instance,false); - } - public V1NodeSelectorRequirementBuilder(V1NodeSelectorRequirement instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withKey(instance.getKey()); - this.withOperator(instance.getOperator()); - this.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeSelectorRequirementFluent fluent; - Boolean validationEnabled; + public V1NodeSelectorRequirement build() { V1NodeSelectorRequirement buildable = new V1NodeSelectorRequirement(); buildable.setKey(fluent.getKey()); @@ -49,4 +29,5 @@ public V1NodeSelectorRequirement build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementFluent.java index 5dafbc9c92..c5c86aaaa1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementFluent.java @@ -1,38 +1,182 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1NodeSelectorRequirementFluent> extends Fluent{ - public String getKey(); - public A withKey(String key); - public Boolean hasKey(); - public String getOperator(); - public A withOperator(String operator); - public Boolean hasOperator(); - public A addToValues(int index,String item); - public A setToValues(int index,String item); - public A addToValues(java.lang.String... items); - public A addAllToValues(Collection items); - public A removeFromValues(java.lang.String... items); - public A removeAllFromValues(Collection items); - public List getValues(); - public String getValue(int index); - public String getFirstValue(); - public String getLastValue(); - public String getMatchingValue(Predicate predicate); - public Boolean hasMatchingValue(Predicate predicate); - public A withValues(List values); - public A withValues(java.lang.String... values); - public Boolean hasValues(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeSelectorRequirementFluent> extends BaseFluent{ + public V1NodeSelectorRequirementFluent() { + } + public V1NodeSelectorRequirementFluent(V1NodeSelectorRequirement instance) { + this.copyInstance(instance); + } + private String key; + private String operator; + private List values; + + protected void copyInstance(V1NodeSelectorRequirement instance) { + instance = (instance != null ? instance : new V1NodeSelectorRequirement()); + if (instance != null) { + this.withKey(instance.getKey()); + this.withOperator(instance.getOperator()); + this.withValues(instance.getValues()); + } + } + + public String getKey() { + return this.key; + } + + public A withKey(String key) { + this.key = key; + return (A) this; + } + + public boolean hasKey() { + return this.key != null; + } + + public String getOperator() { + return this.operator; + } + + public A withOperator(String operator) { + this.operator = operator; + return (A) this; + } + + public boolean hasOperator() { + return this.operator != null; + } + + public A addToValues(int index,String item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.add(index, item); + return (A)this; + } + + public A setToValues(int index,String item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.set(index, item); return (A)this; + } + + public A addToValues(java.lang.String... items) { + if (this.values == null) {this.values = new ArrayList();} + for (String item : items) {this.values.add(item);} return (A)this; + } + + public A addAllToValues(Collection items) { + if (this.values == null) {this.values = new ArrayList();} + for (String item : items) {this.values.add(item);} return (A)this; + } + + public A removeFromValues(java.lang.String... items) { + if (this.values == null) return (A)this; + for (String item : items) { this.values.remove(item);} return (A)this; + } + + public A removeAllFromValues(Collection items) { + if (this.values == null) return (A)this; + for (String item : items) { this.values.remove(item);} return (A)this; + } + + public List getValues() { + return this.values; + } + + public String getValue(int index) { + return this.values.get(index); + } + + public String getFirstValue() { + return this.values.get(0); + } + + public String getLastValue() { + return this.values.get(values.size() - 1); + } + + public String getMatchingValue(Predicate predicate) { + for (String item : values) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingValue(Predicate predicate) { + for (String item : values) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withValues(List values) { + if (values != null) { + this.values = new ArrayList(); + for (String item : values) { + this.addToValues(item); + } + } else { + this.values = null; + } + return (A) this; + } + + public A withValues(java.lang.String... values) { + if (this.values != null) { + this.values.clear(); + _visitables.remove("values"); + } + if (values != null) { + for (String item : values) { + this.addToValues(item); + } + } + return (A) this; + } + + public boolean hasValues() { + return this.values != null && !this.values.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeSelectorRequirementFluent that = (V1NodeSelectorRequirementFluent) o; + if (!java.util.Objects.equals(key, that.key)) return false; + if (!java.util.Objects.equals(operator, that.operator)) return false; + if (!java.util.Objects.equals(values, that.values)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(key, operator, values, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (key != null) { sb.append("key:"); sb.append(key + ","); } + if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } + if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementFluentImpl.java deleted file mode 100644 index 30969abc18..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorRequirementFluentImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeSelectorRequirementFluentImpl> extends BaseFluent implements V1NodeSelectorRequirementFluent{ - public V1NodeSelectorRequirementFluentImpl() { - } - public V1NodeSelectorRequirementFluentImpl(V1NodeSelectorRequirement instance) { - if (instance != null) { - this.withKey(instance.getKey()); - this.withOperator(instance.getOperator()); - this.withValues(instance.getValues()); - } - } - private String key; - private String operator; - private List values; - public String getKey() { - return this.key; - } - public A withKey(String key) { - this.key=key; return (A) this; - } - public Boolean hasKey() { - return this.key != null; - } - public String getOperator() { - return this.operator; - } - public A withOperator(String operator) { - this.operator=operator; return (A) this; - } - public Boolean hasOperator() { - return this.operator != null; - } - public A addToValues(int index,String item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.add(index, item); - return (A)this; - } - public A setToValues(int index,String item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.set(index, item); return (A)this; - } - public A addToValues(java.lang.String... items) { - if (this.values == null) {this.values = new ArrayList();} - for (String item : items) {this.values.add(item);} return (A)this; - } - public A addAllToValues(Collection items) { - if (this.values == null) {this.values = new ArrayList();} - for (String item : items) {this.values.add(item);} return (A)this; - } - public A removeFromValues(java.lang.String... items) { - for (String item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public A removeAllFromValues(Collection items) { - for (String item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public List getValues() { - return this.values; - } - public String getValue(int index) { - return this.values.get(index); - } - public String getFirstValue() { - return this.values.get(0); - } - public String getLastValue() { - return this.values.get(values.size() - 1); - } - public String getMatchingValue(Predicate predicate) { - for (String item: values) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingValue(Predicate predicate) { - for (String item: values) { if(predicate.test(item)){ return true;} } return false; - } - public A withValues(List values) { - if (values != null) {this.values = new ArrayList(); for (String item : values){this.addToValues(item);}} else { this.values = null;} return (A) this; - } - public A withValues(java.lang.String... values) { - if (this.values != null) {this.values.clear(); _visitables.remove("values"); } - if (values != null) {for (String item :values){ this.addToValues(item);}} return (A) this; - } - public Boolean hasValues() { - return values != null && !values.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeSelectorRequirementFluentImpl that = (V1NodeSelectorRequirementFluentImpl) o; - if (!java.util.Objects.equals(key, that.key)) return false; - - if (!java.util.Objects.equals(operator, that.operator)) return false; - - if (!java.util.Objects.equals(values, that.values)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(key, operator, values, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (key != null) { sb.append("key:"); sb.append(key + ","); } - if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } - if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermBuilder.java index edd9177eea..afa36b4901 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeSelectorTermBuilder extends V1NodeSelectorTermFluentImpl implements VisitableBuilder{ +public class V1NodeSelectorTermBuilder extends V1NodeSelectorTermFluent implements VisitableBuilder{ public V1NodeSelectorTermBuilder() { - this(false); - } - public V1NodeSelectorTermBuilder(Boolean validationEnabled) { - this(new V1NodeSelectorTerm(), validationEnabled); + this(new V1NodeSelectorTerm()); } + public V1NodeSelectorTermBuilder(V1NodeSelectorTermFluent fluent) { - this(fluent, false); - } - public V1NodeSelectorTermBuilder(V1NodeSelectorTermFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeSelectorTerm(), validationEnabled); + this(fluent, new V1NodeSelectorTerm()); } + public V1NodeSelectorTermBuilder(V1NodeSelectorTermFluent fluent,V1NodeSelectorTerm instance) { - this(fluent, instance, false); - } - public V1NodeSelectorTermBuilder(V1NodeSelectorTermFluent fluent,V1NodeSelectorTerm instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMatchExpressions(instance.getMatchExpressions()); - fluent.withMatchFields(instance.getMatchFields()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeSelectorTermBuilder(V1NodeSelectorTerm instance) { - this(instance,false); - } - public V1NodeSelectorTermBuilder(V1NodeSelectorTerm instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMatchExpressions(instance.getMatchExpressions()); - this.withMatchFields(instance.getMatchFields()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeSelectorTermFluent fluent; - Boolean validationEnabled; + public V1NodeSelectorTerm build() { V1NodeSelectorTerm buildable = new V1NodeSelectorTerm(); - buildable.setMatchExpressions(fluent.getMatchExpressions()); - buildable.setMatchFields(fluent.getMatchFields()); + buildable.setMatchExpressions(fluent.buildMatchExpressions()); + buildable.setMatchFields(fluent.buildMatchFields()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermFluent.java index 6f88e0cca9..511ec51695 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermFluent.java @@ -1,90 +1,398 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NodeSelectorTermFluent> extends Fluent{ - public A addToMatchExpressions(int index,V1NodeSelectorRequirement item); - public A setToMatchExpressions(int index,V1NodeSelectorRequirement item); - public A addToMatchExpressions(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items); - public A addAllToMatchExpressions(Collection items); - public A removeFromMatchExpressions(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items); - public A removeAllFromMatchExpressions(Collection items); - public A removeMatchingFromMatchExpressions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMatchExpressions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchExpressions(); - public List buildMatchExpressions(); - public V1NodeSelectorRequirement buildMatchExpression(int index); - public V1NodeSelectorRequirement buildFirstMatchExpression(); - public V1NodeSelectorRequirement buildLastMatchExpression(); - public V1NodeSelectorRequirement buildMatchingMatchExpression(Predicate predicate); - public Boolean hasMatchingMatchExpression(Predicate predicate); - public A withMatchExpressions(List matchExpressions); - public A withMatchExpressions(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... matchExpressions); - public Boolean hasMatchExpressions(); - public V1NodeSelectorTermFluent.MatchExpressionsNested addNewMatchExpression(); - public V1NodeSelectorTermFluent.MatchExpressionsNested addNewMatchExpressionLike(V1NodeSelectorRequirement item); - public V1NodeSelectorTermFluent.MatchExpressionsNested setNewMatchExpressionLike(int index,V1NodeSelectorRequirement item); - public V1NodeSelectorTermFluent.MatchExpressionsNested editMatchExpression(int index); - public V1NodeSelectorTermFluent.MatchExpressionsNested editFirstMatchExpression(); - public V1NodeSelectorTermFluent.MatchExpressionsNested editLastMatchExpression(); - public V1NodeSelectorTermFluent.MatchExpressionsNested editMatchingMatchExpression(Predicate predicate); - public A addToMatchFields(int index,V1NodeSelectorRequirement item); - public A setToMatchFields(int index,V1NodeSelectorRequirement item); - public A addToMatchFields(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items); - public A addAllToMatchFields(Collection items); - public A removeFromMatchFields(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items); - public A removeAllFromMatchFields(Collection items); - public A removeMatchingFromMatchFields(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMatchFields instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchFields(); - public List buildMatchFields(); - public V1NodeSelectorRequirement buildMatchField(int index); - public V1NodeSelectorRequirement buildFirstMatchField(); - public V1NodeSelectorRequirement buildLastMatchField(); - public V1NodeSelectorRequirement buildMatchingMatchField(Predicate predicate); - public Boolean hasMatchingMatchField(Predicate predicate); - public A withMatchFields(List matchFields); - public A withMatchFields(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... matchFields); - public Boolean hasMatchFields(); - public V1NodeSelectorTermFluent.MatchFieldsNested addNewMatchField(); - public V1NodeSelectorTermFluent.MatchFieldsNested addNewMatchFieldLike(V1NodeSelectorRequirement item); - public V1NodeSelectorTermFluent.MatchFieldsNested setNewMatchFieldLike(int index,V1NodeSelectorRequirement item); - public V1NodeSelectorTermFluent.MatchFieldsNested editMatchField(int index); - public V1NodeSelectorTermFluent.MatchFieldsNested editFirstMatchField(); - public V1NodeSelectorTermFluent.MatchFieldsNested editLastMatchField(); - public V1NodeSelectorTermFluent.MatchFieldsNested editMatchingMatchField(Predicate predicate); - public interface MatchExpressionsNested extends Nested,V1NodeSelectorRequirementFluent>{ - public N and(); - public N endMatchExpression(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeSelectorTermFluent> extends BaseFluent{ + public V1NodeSelectorTermFluent() { + } + + public V1NodeSelectorTermFluent(V1NodeSelectorTerm instance) { + this.copyInstance(instance); + } + private ArrayList matchExpressions; + private ArrayList matchFields; + + protected void copyInstance(V1NodeSelectorTerm instance) { + instance = (instance != null ? instance : new V1NodeSelectorTerm()); + if (instance != null) { + this.withMatchExpressions(instance.getMatchExpressions()); + this.withMatchFields(instance.getMatchFields()); + } + } + + public A addToMatchExpressions(int index,V1NodeSelectorRequirement item) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item); + if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").add(index, builder); matchExpressions.add(index, builder);} + return (A)this; + } + + public A setToMatchExpressions(int index,V1NodeSelectorRequirement item) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item); + if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").set(index, builder); matchExpressions.set(index, builder);} + return (A)this; + } + + public A addToMatchExpressions(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; + } + + public A addAllToMatchExpressions(Collection items) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; + } + + public A removeFromMatchExpressions(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items) { + if (this.matchExpressions == null) return (A)this; + for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder); this.matchExpressions.remove(builder);} return (A)this; + } + + public A removeAllFromMatchExpressions(Collection items) { + if (this.matchExpressions == null) return (A)this; + for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder); this.matchExpressions.remove(builder);} return (A)this; + } + + public A removeMatchingFromMatchExpressions(Predicate predicate) { + if (matchExpressions == null) return (A) this; + final Iterator each = matchExpressions.iterator(); + final List visitables = _visitables.get("matchExpressions"); + while (each.hasNext()) { + V1NodeSelectorRequirementBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMatchExpressions() { + return this.matchExpressions != null ? build(matchExpressions) : null; + } + + public V1NodeSelectorRequirement buildMatchExpression(int index) { + return this.matchExpressions.get(index).build(); + } + + public V1NodeSelectorRequirement buildFirstMatchExpression() { + return this.matchExpressions.get(0).build(); + } + + public V1NodeSelectorRequirement buildLastMatchExpression() { + return this.matchExpressions.get(matchExpressions.size() - 1).build(); + } + + public V1NodeSelectorRequirement buildMatchingMatchExpression(Predicate predicate) { + for (V1NodeSelectorRequirementBuilder item : matchExpressions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMatchExpression(Predicate predicate) { + for (V1NodeSelectorRequirementBuilder item : matchExpressions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMatchExpressions(List matchExpressions) { + if (this.matchExpressions != null) { + this._visitables.get("matchExpressions").clear(); + } + if (matchExpressions != null) { + this.matchExpressions = new ArrayList(); + for (V1NodeSelectorRequirement item : matchExpressions) { + this.addToMatchExpressions(item); + } + } else { + this.matchExpressions = null; + } + return (A) this; + } + + public A withMatchExpressions(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... matchExpressions) { + if (this.matchExpressions != null) { + this.matchExpressions.clear(); + _visitables.remove("matchExpressions"); + } + if (matchExpressions != null) { + for (V1NodeSelectorRequirement item : matchExpressions) { + this.addToMatchExpressions(item); + } + } + return (A) this; + } + + public boolean hasMatchExpressions() { + return this.matchExpressions != null && !this.matchExpressions.isEmpty(); + } + + public MatchExpressionsNested addNewMatchExpression() { + return new MatchExpressionsNested(-1, null); + } + + public MatchExpressionsNested addNewMatchExpressionLike(V1NodeSelectorRequirement item) { + return new MatchExpressionsNested(-1, item); + } + + public MatchExpressionsNested setNewMatchExpressionLike(int index,V1NodeSelectorRequirement item) { + return new MatchExpressionsNested(index, item); + } + + public MatchExpressionsNested editMatchExpression(int index) { + if (matchExpressions.size() <= index) throw new RuntimeException("Can't edit matchExpressions. Index exceeds size."); + return setNewMatchExpressionLike(index, buildMatchExpression(index)); + } + + public MatchExpressionsNested editFirstMatchExpression() { + if (matchExpressions.size() == 0) throw new RuntimeException("Can't edit first matchExpressions. The list is empty."); + return setNewMatchExpressionLike(0, buildMatchExpression(0)); + } + + public MatchExpressionsNested editLastMatchExpression() { + int index = matchExpressions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last matchExpressions. The list is empty."); + return setNewMatchExpressionLike(index, buildMatchExpression(index)); } - public interface MatchFieldsNested extends Nested,V1NodeSelectorRequirementFluent>{ - public N and(); - public N endMatchField(); + + public MatchExpressionsNested editMatchingMatchExpression(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item); + if (index < 0 || index >= matchFields.size()) { _visitables.get("matchFields").add(builder); matchFields.add(builder); } else { _visitables.get("matchFields").add(index, builder); matchFields.add(index, builder);} + return (A)this; + } + + public A setToMatchFields(int index,V1NodeSelectorRequirement item) { + if (this.matchFields == null) {this.matchFields = new ArrayList();} + V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item); + if (index < 0 || index >= matchFields.size()) { _visitables.get("matchFields").add(builder); matchFields.add(builder); } else { _visitables.get("matchFields").set(index, builder); matchFields.set(index, builder);} + return (A)this; + } + + public A addToMatchFields(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items) { + if (this.matchFields == null) {this.matchFields = new ArrayList();} + for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchFields").add(builder);this.matchFields.add(builder);} return (A)this; + } + + public A addAllToMatchFields(Collection items) { + if (this.matchFields == null) {this.matchFields = new ArrayList();} + for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchFields").add(builder);this.matchFields.add(builder);} return (A)this; + } + + public A removeFromMatchFields(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items) { + if (this.matchFields == null) return (A)this; + for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchFields").remove(builder); this.matchFields.remove(builder);} return (A)this; + } + + public A removeAllFromMatchFields(Collection items) { + if (this.matchFields == null) return (A)this; + for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchFields").remove(builder); this.matchFields.remove(builder);} return (A)this; + } + + public A removeMatchingFromMatchFields(Predicate predicate) { + if (matchFields == null) return (A) this; + final Iterator each = matchFields.iterator(); + final List visitables = _visitables.get("matchFields"); + while (each.hasNext()) { + V1NodeSelectorRequirementBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMatchFields() { + return this.matchFields != null ? build(matchFields) : null; + } + + public V1NodeSelectorRequirement buildMatchField(int index) { + return this.matchFields.get(index).build(); + } + + public V1NodeSelectorRequirement buildFirstMatchField() { + return this.matchFields.get(0).build(); + } + + public V1NodeSelectorRequirement buildLastMatchField() { + return this.matchFields.get(matchFields.size() - 1).build(); + } + + public V1NodeSelectorRequirement buildMatchingMatchField(Predicate predicate) { + for (V1NodeSelectorRequirementBuilder item : matchFields) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMatchField(Predicate predicate) { + for (V1NodeSelectorRequirementBuilder item : matchFields) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMatchFields(List matchFields) { + if (this.matchFields != null) { + this._visitables.get("matchFields").clear(); + } + if (matchFields != null) { + this.matchFields = new ArrayList(); + for (V1NodeSelectorRequirement item : matchFields) { + this.addToMatchFields(item); + } + } else { + this.matchFields = null; + } + return (A) this; + } + + public A withMatchFields(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... matchFields) { + if (this.matchFields != null) { + this.matchFields.clear(); + _visitables.remove("matchFields"); + } + if (matchFields != null) { + for (V1NodeSelectorRequirement item : matchFields) { + this.addToMatchFields(item); + } + } + return (A) this; + } + + public boolean hasMatchFields() { + return this.matchFields != null && !this.matchFields.isEmpty(); + } + + public MatchFieldsNested addNewMatchField() { + return new MatchFieldsNested(-1, null); + } + + public MatchFieldsNested addNewMatchFieldLike(V1NodeSelectorRequirement item) { + return new MatchFieldsNested(-1, item); + } + + public MatchFieldsNested setNewMatchFieldLike(int index,V1NodeSelectorRequirement item) { + return new MatchFieldsNested(index, item); + } + + public MatchFieldsNested editMatchField(int index) { + if (matchFields.size() <= index) throw new RuntimeException("Can't edit matchFields. Index exceeds size."); + return setNewMatchFieldLike(index, buildMatchField(index)); + } + + public MatchFieldsNested editFirstMatchField() { + if (matchFields.size() == 0) throw new RuntimeException("Can't edit first matchFields. The list is empty."); + return setNewMatchFieldLike(0, buildMatchField(0)); + } + + public MatchFieldsNested editLastMatchField() { + int index = matchFields.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last matchFields. The list is empty."); + return setNewMatchFieldLike(index, buildMatchField(index)); + } + + public MatchFieldsNested editMatchingMatchField(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1NodeSelectorRequirementFluent> implements Nested{ + MatchExpressionsNested(int index,V1NodeSelectorRequirement item) { + this.index = index; + this.builder = new V1NodeSelectorRequirementBuilder(this, item); + } + V1NodeSelectorRequirementBuilder builder; + int index; + + public N and() { + return (N) V1NodeSelectorTermFluent.this.setToMatchExpressions(index,builder.build()); + } + + public N endMatchExpression() { + return and(); + } + } + public class MatchFieldsNested extends V1NodeSelectorRequirementFluent> implements Nested{ + MatchFieldsNested(int index,V1NodeSelectorRequirement item) { + this.index = index; + this.builder = new V1NodeSelectorRequirementBuilder(this, item); + } + V1NodeSelectorRequirementBuilder builder; + int index; + + public N and() { + return (N) V1NodeSelectorTermFluent.this.setToMatchFields(index,builder.build()); + } + + public N endMatchField() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermFluentImpl.java deleted file mode 100644 index b71fdc4ad5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSelectorTermFluentImpl.java +++ /dev/null @@ -1,307 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeSelectorTermFluentImpl> extends BaseFluent implements V1NodeSelectorTermFluent{ - public V1NodeSelectorTermFluentImpl() { - } - public V1NodeSelectorTermFluentImpl(V1NodeSelectorTerm instance) { - if (instance != null) { - this.withMatchExpressions(instance.getMatchExpressions()); - this.withMatchFields(instance.getMatchFields()); - } - } - private ArrayList matchExpressions; - private ArrayList matchFields; - public A addToMatchExpressions(int index,V1NodeSelectorRequirement item) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item); - if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").add(index, builder); matchExpressions.add(index, builder);} - return (A)this; - } - public A setToMatchExpressions(int index,V1NodeSelectorRequirement item) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item); - if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").set(index, builder); matchExpressions.set(index, builder);} - return (A)this; - } - public A addToMatchExpressions(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; - } - public A addAllToMatchExpressions(Collection items) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; - } - public A removeFromMatchExpressions(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items) { - for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder);if (this.matchExpressions != null) {this.matchExpressions.remove(builder);}} return (A)this; - } - public A removeAllFromMatchExpressions(Collection items) { - for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder);if (this.matchExpressions != null) {this.matchExpressions.remove(builder);}} return (A)this; - } - public A removeMatchingFromMatchExpressions(Predicate predicate) { - if (matchExpressions == null) return (A) this; - final Iterator each = matchExpressions.iterator(); - final List visitables = _visitables.get("matchExpressions"); - while (each.hasNext()) { - V1NodeSelectorRequirementBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildMatchExpressions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchExpressions() { - return matchExpressions != null ? build(matchExpressions) : null; - } - public List buildMatchExpressions() { - return matchExpressions != null ? build(matchExpressions) : null; - } - public V1NodeSelectorRequirement buildMatchExpression(int index) { - return this.matchExpressions.get(index).build(); - } - public V1NodeSelectorRequirement buildFirstMatchExpression() { - return this.matchExpressions.get(0).build(); - } - public V1NodeSelectorRequirement buildLastMatchExpression() { - return this.matchExpressions.get(matchExpressions.size() - 1).build(); - } - public V1NodeSelectorRequirement buildMatchingMatchExpression(Predicate predicate) { - for (V1NodeSelectorRequirementBuilder item: matchExpressions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingMatchExpression(Predicate predicate) { - for (V1NodeSelectorRequirementBuilder item: matchExpressions) { if(predicate.test(item)){ return true;} } return false; - } - public A withMatchExpressions(List matchExpressions) { - if (this.matchExpressions != null) { _visitables.get("matchExpressions").clear();} - if (matchExpressions != null) {this.matchExpressions = new ArrayList(); for (V1NodeSelectorRequirement item : matchExpressions){this.addToMatchExpressions(item);}} else { this.matchExpressions = null;} return (A) this; - } - public A withMatchExpressions(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... matchExpressions) { - if (this.matchExpressions != null) {this.matchExpressions.clear(); _visitables.remove("matchExpressions"); } - if (matchExpressions != null) {for (V1NodeSelectorRequirement item :matchExpressions){ this.addToMatchExpressions(item);}} return (A) this; - } - public Boolean hasMatchExpressions() { - return matchExpressions != null && !matchExpressions.isEmpty(); - } - public V1NodeSelectorTermFluentImpl.MatchExpressionsNested addNewMatchExpression() { - return new V1NodeSelectorTermFluentImpl.MatchExpressionsNestedImpl(); - } - public V1NodeSelectorTermFluentImpl.MatchExpressionsNested addNewMatchExpressionLike(V1NodeSelectorRequirement item) { - return new V1NodeSelectorTermFluentImpl.MatchExpressionsNestedImpl(-1, item); - } - public V1NodeSelectorTermFluentImpl.MatchExpressionsNested setNewMatchExpressionLike(int index,V1NodeSelectorRequirement item) { - return new V1NodeSelectorTermFluentImpl.MatchExpressionsNestedImpl(index, item); - } - public V1NodeSelectorTermFluentImpl.MatchExpressionsNested editMatchExpression(int index) { - if (matchExpressions.size() <= index) throw new RuntimeException("Can't edit matchExpressions. Index exceeds size."); - return setNewMatchExpressionLike(index, buildMatchExpression(index)); - } - public V1NodeSelectorTermFluentImpl.MatchExpressionsNested editFirstMatchExpression() { - if (matchExpressions.size() == 0) throw new RuntimeException("Can't edit first matchExpressions. The list is empty."); - return setNewMatchExpressionLike(0, buildMatchExpression(0)); - } - public V1NodeSelectorTermFluentImpl.MatchExpressionsNested editLastMatchExpression() { - int index = matchExpressions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last matchExpressions. The list is empty."); - return setNewMatchExpressionLike(index, buildMatchExpression(index)); - } - public V1NodeSelectorTermFluentImpl.MatchExpressionsNested editMatchingMatchExpression(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item); - if (index < 0 || index >= matchFields.size()) { _visitables.get("matchFields").add(builder); matchFields.add(builder); } else { _visitables.get("matchFields").add(index, builder); matchFields.add(index, builder);} - return (A)this; - } - public A setToMatchFields(int index,V1NodeSelectorRequirement item) { - if (this.matchFields == null) {this.matchFields = new ArrayList();} - V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item); - if (index < 0 || index >= matchFields.size()) { _visitables.get("matchFields").add(builder); matchFields.add(builder); } else { _visitables.get("matchFields").set(index, builder); matchFields.set(index, builder);} - return (A)this; - } - public A addToMatchFields(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items) { - if (this.matchFields == null) {this.matchFields = new ArrayList();} - for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchFields").add(builder);this.matchFields.add(builder);} return (A)this; - } - public A addAllToMatchFields(Collection items) { - if (this.matchFields == null) {this.matchFields = new ArrayList();} - for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchFields").add(builder);this.matchFields.add(builder);} return (A)this; - } - public A removeFromMatchFields(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... items) { - for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchFields").remove(builder);if (this.matchFields != null) {this.matchFields.remove(builder);}} return (A)this; - } - public A removeAllFromMatchFields(Collection items) { - for (V1NodeSelectorRequirement item : items) {V1NodeSelectorRequirementBuilder builder = new V1NodeSelectorRequirementBuilder(item);_visitables.get("matchFields").remove(builder);if (this.matchFields != null) {this.matchFields.remove(builder);}} return (A)this; - } - public A removeMatchingFromMatchFields(Predicate predicate) { - if (matchFields == null) return (A) this; - final Iterator each = matchFields.iterator(); - final List visitables = _visitables.get("matchFields"); - while (each.hasNext()) { - V1NodeSelectorRequirementBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildMatchFields instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchFields() { - return matchFields != null ? build(matchFields) : null; - } - public List buildMatchFields() { - return matchFields != null ? build(matchFields) : null; - } - public V1NodeSelectorRequirement buildMatchField(int index) { - return this.matchFields.get(index).build(); - } - public V1NodeSelectorRequirement buildFirstMatchField() { - return this.matchFields.get(0).build(); - } - public V1NodeSelectorRequirement buildLastMatchField() { - return this.matchFields.get(matchFields.size() - 1).build(); - } - public V1NodeSelectorRequirement buildMatchingMatchField(Predicate predicate) { - for (V1NodeSelectorRequirementBuilder item: matchFields) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingMatchField(Predicate predicate) { - for (V1NodeSelectorRequirementBuilder item: matchFields) { if(predicate.test(item)){ return true;} } return false; - } - public A withMatchFields(List matchFields) { - if (this.matchFields != null) { _visitables.get("matchFields").clear();} - if (matchFields != null) {this.matchFields = new ArrayList(); for (V1NodeSelectorRequirement item : matchFields){this.addToMatchFields(item);}} else { this.matchFields = null;} return (A) this; - } - public A withMatchFields(io.kubernetes.client.openapi.models.V1NodeSelectorRequirement... matchFields) { - if (this.matchFields != null) {this.matchFields.clear(); _visitables.remove("matchFields"); } - if (matchFields != null) {for (V1NodeSelectorRequirement item :matchFields){ this.addToMatchFields(item);}} return (A) this; - } - public Boolean hasMatchFields() { - return matchFields != null && !matchFields.isEmpty(); - } - public V1NodeSelectorTermFluentImpl.MatchFieldsNested addNewMatchField() { - return new V1NodeSelectorTermFluentImpl.MatchFieldsNestedImpl(); - } - public V1NodeSelectorTermFluentImpl.MatchFieldsNested addNewMatchFieldLike(V1NodeSelectorRequirement item) { - return new V1NodeSelectorTermFluentImpl.MatchFieldsNestedImpl(-1, item); - } - public V1NodeSelectorTermFluentImpl.MatchFieldsNested setNewMatchFieldLike(int index,V1NodeSelectorRequirement item) { - return new V1NodeSelectorTermFluentImpl.MatchFieldsNestedImpl(index, item); - } - public V1NodeSelectorTermFluentImpl.MatchFieldsNested editMatchField(int index) { - if (matchFields.size() <= index) throw new RuntimeException("Can't edit matchFields. Index exceeds size."); - return setNewMatchFieldLike(index, buildMatchField(index)); - } - public V1NodeSelectorTermFluentImpl.MatchFieldsNested editFirstMatchField() { - if (matchFields.size() == 0) throw new RuntimeException("Can't edit first matchFields. The list is empty."); - return setNewMatchFieldLike(0, buildMatchField(0)); - } - public V1NodeSelectorTermFluentImpl.MatchFieldsNested editLastMatchField() { - int index = matchFields.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last matchFields. The list is empty."); - return setNewMatchFieldLike(index, buildMatchField(index)); - } - public V1NodeSelectorTermFluentImpl.MatchFieldsNested editMatchingMatchField(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1NodeSelectorRequirementFluentImpl> implements V1NodeSelectorTermFluentImpl.MatchExpressionsNested,Nested{ - MatchExpressionsNestedImpl(int index,V1NodeSelectorRequirement item) { - this.index = index; - this.builder = new V1NodeSelectorRequirementBuilder(this, item); - } - MatchExpressionsNestedImpl() { - this.index = -1; - this.builder = new V1NodeSelectorRequirementBuilder(this); - } - V1NodeSelectorRequirementBuilder builder; - int index; - public N and() { - return (N) V1NodeSelectorTermFluentImpl.this.setToMatchExpressions(index,builder.build()); - } - public N endMatchExpression() { - return and(); - } - - } - class MatchFieldsNestedImpl extends V1NodeSelectorRequirementFluentImpl> implements V1NodeSelectorTermFluentImpl.MatchFieldsNested,Nested{ - MatchFieldsNestedImpl(int index,V1NodeSelectorRequirement item) { - this.index = index; - this.builder = new V1NodeSelectorRequirementBuilder(this, item); - } - MatchFieldsNestedImpl() { - this.index = -1; - this.builder = new V1NodeSelectorRequirementBuilder(this); - } - V1NodeSelectorRequirementBuilder builder; - int index; - public N and() { - return (N) V1NodeSelectorTermFluentImpl.this.setToMatchFields(index,builder.build()); - } - public N endMatchField() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecBuilder.java index 80a17d392b..d1e42a241f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecBuilder.java @@ -1,64 +1,37 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeSpecBuilder extends V1NodeSpecFluentImpl implements VisitableBuilder{ +public class V1NodeSpecBuilder extends V1NodeSpecFluent implements VisitableBuilder{ public V1NodeSpecBuilder() { - this(false); - } - public V1NodeSpecBuilder(Boolean validationEnabled) { - this(new V1NodeSpec(), validationEnabled); + this(new V1NodeSpec()); } + public V1NodeSpecBuilder(V1NodeSpecFluent fluent) { - this(fluent, false); - } - public V1NodeSpecBuilder(V1NodeSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeSpec(), validationEnabled); + this(fluent, new V1NodeSpec()); } + public V1NodeSpecBuilder(V1NodeSpecFluent fluent,V1NodeSpec instance) { - this(fluent, instance, false); - } - public V1NodeSpecBuilder(V1NodeSpecFluent fluent,V1NodeSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConfigSource(instance.getConfigSource()); - fluent.withExternalID(instance.getExternalID()); - fluent.withPodCIDR(instance.getPodCIDR()); - fluent.withPodCIDRs(instance.getPodCIDRs()); - fluent.withProviderID(instance.getProviderID()); - fluent.withTaints(instance.getTaints()); - fluent.withUnschedulable(instance.getUnschedulable()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeSpecBuilder(V1NodeSpec instance) { - this(instance,false); - } - public V1NodeSpecBuilder(V1NodeSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConfigSource(instance.getConfigSource()); - this.withExternalID(instance.getExternalID()); - this.withPodCIDR(instance.getPodCIDR()); - this.withPodCIDRs(instance.getPodCIDRs()); - this.withProviderID(instance.getProviderID()); - this.withTaints(instance.getTaints()); - this.withUnschedulable(instance.getUnschedulable()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeSpecFluent fluent; - Boolean validationEnabled; + public V1NodeSpec build() { V1NodeSpec buildable = new V1NodeSpec(); - buildable.setConfigSource(fluent.getConfigSource()); + buildable.setConfigSource(fluent.buildConfigSource()); buildable.setExternalID(fluent.getExternalID()); buildable.setPodCIDR(fluent.getPodCIDR()); buildable.setPodCIDRs(fluent.getPodCIDRs()); buildable.setProviderID(fluent.getProviderID()); - buildable.setTaints(fluent.getTaints()); + buildable.setTaints(fluent.buildTaints()); buildable.setUnschedulable(fluent.getUnschedulable()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecFluent.java index a178dff782..293f2f7b44 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecFluent.java @@ -1,104 +1,456 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1NodeSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildConfigSource instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeConfigSource getConfigSource(); - public V1NodeConfigSource buildConfigSource(); - public A withConfigSource(V1NodeConfigSource configSource); - public Boolean hasConfigSource(); - public V1NodeSpecFluent.ConfigSourceNested withNewConfigSource(); - public V1NodeSpecFluent.ConfigSourceNested withNewConfigSourceLike(V1NodeConfigSource item); - public V1NodeSpecFluent.ConfigSourceNested editConfigSource(); - public V1NodeSpecFluent.ConfigSourceNested editOrNewConfigSource(); - public V1NodeSpecFluent.ConfigSourceNested editOrNewConfigSourceLike(V1NodeConfigSource item); - public String getExternalID(); - public A withExternalID(String externalID); - public Boolean hasExternalID(); - public String getPodCIDR(); - public A withPodCIDR(String podCIDR); - public Boolean hasPodCIDR(); - public A addToPodCIDRs(int index,String item); - public A setToPodCIDRs(int index,String item); - public A addToPodCIDRs(java.lang.String... items); - public A addAllToPodCIDRs(Collection items); - public A removeFromPodCIDRs(java.lang.String... items); - public A removeAllFromPodCIDRs(Collection items); - public List getPodCIDRs(); - public String getPodCIDR(int index); - public String getFirstPodCIDR(); - public String getLastPodCIDR(); - public String getMatchingPodCIDR(Predicate predicate); - public Boolean hasMatchingPodCIDR(Predicate predicate); - public A withPodCIDRs(List podCIDRs); - public A withPodCIDRs(java.lang.String... podCIDRs); - public Boolean hasPodCIDRs(); - public String getProviderID(); - public A withProviderID(String providerID); - public Boolean hasProviderID(); - public A addToTaints(int index,V1Taint item); - public A setToTaints(int index,V1Taint item); - public A addToTaints(io.kubernetes.client.openapi.models.V1Taint... items); - public A addAllToTaints(Collection items); - public A removeFromTaints(io.kubernetes.client.openapi.models.V1Taint... items); - public A removeAllFromTaints(Collection items); - public A removeMatchingFromTaints(Predicate predicate); - - /** - * This method has been deprecated, please use method buildTaints instead. - * @return The buildable object. - */ - @Deprecated - public List getTaints(); - public List buildTaints(); - public V1Taint buildTaint(int index); - public V1Taint buildFirstTaint(); - public V1Taint buildLastTaint(); - public V1Taint buildMatchingTaint(Predicate predicate); - public Boolean hasMatchingTaint(Predicate predicate); - public A withTaints(List taints); - public A withTaints(io.kubernetes.client.openapi.models.V1Taint... taints); - public Boolean hasTaints(); - public V1NodeSpecFluent.TaintsNested addNewTaint(); - public V1NodeSpecFluent.TaintsNested addNewTaintLike(V1Taint item); - public V1NodeSpecFluent.TaintsNested setNewTaintLike(int index,V1Taint item); - public V1NodeSpecFluent.TaintsNested editTaint(int index); - public V1NodeSpecFluent.TaintsNested editFirstTaint(); - public V1NodeSpecFluent.TaintsNested editLastTaint(); - public V1NodeSpecFluent.TaintsNested editMatchingTaint(Predicate predicate); - public Boolean getUnschedulable(); - public A withUnschedulable(Boolean unschedulable); - public Boolean hasUnschedulable(); - public A withUnschedulable(); - public interface ConfigSourceNested extends Nested,V1NodeConfigSourceFluent>{ - public N and(); - public N endConfigSource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeSpecFluent> extends BaseFluent{ + public V1NodeSpecFluent() { + } + + public V1NodeSpecFluent(V1NodeSpec instance) { + this.copyInstance(instance); + } + private V1NodeConfigSourceBuilder configSource; + private String externalID; + private String podCIDR; + private List podCIDRs; + private String providerID; + private ArrayList taints; + private Boolean unschedulable; + + protected void copyInstance(V1NodeSpec instance) { + instance = (instance != null ? instance : new V1NodeSpec()); + if (instance != null) { + this.withConfigSource(instance.getConfigSource()); + this.withExternalID(instance.getExternalID()); + this.withPodCIDR(instance.getPodCIDR()); + this.withPodCIDRs(instance.getPodCIDRs()); + this.withProviderID(instance.getProviderID()); + this.withTaints(instance.getTaints()); + this.withUnschedulable(instance.getUnschedulable()); + } + } + + public V1NodeConfigSource buildConfigSource() { + return this.configSource != null ? this.configSource.build() : null; + } + + public A withConfigSource(V1NodeConfigSource configSource) { + this._visitables.remove("configSource"); + if (configSource != null) { + this.configSource = new V1NodeConfigSourceBuilder(configSource); + this._visitables.get("configSource").add(this.configSource); + } else { + this.configSource = null; + this._visitables.get("configSource").remove(this.configSource); + } + return (A) this; + } + + public boolean hasConfigSource() { + return this.configSource != null; + } + + public ConfigSourceNested withNewConfigSource() { + return new ConfigSourceNested(null); + } + + public ConfigSourceNested withNewConfigSourceLike(V1NodeConfigSource item) { + return new ConfigSourceNested(item); + } + + public ConfigSourceNested editConfigSource() { + return withNewConfigSourceLike(java.util.Optional.ofNullable(buildConfigSource()).orElse(null)); + } + + public ConfigSourceNested editOrNewConfigSource() { + return withNewConfigSourceLike(java.util.Optional.ofNullable(buildConfigSource()).orElse(new V1NodeConfigSourceBuilder().build())); + } + + public ConfigSourceNested editOrNewConfigSourceLike(V1NodeConfigSource item) { + return withNewConfigSourceLike(java.util.Optional.ofNullable(buildConfigSource()).orElse(item)); + } + + public String getExternalID() { + return this.externalID; + } + + public A withExternalID(String externalID) { + this.externalID = externalID; + return (A) this; + } + + public boolean hasExternalID() { + return this.externalID != null; + } + + public String getPodCIDR() { + return this.podCIDR; + } + + public A withPodCIDR(String podCIDR) { + this.podCIDR = podCIDR; + return (A) this; + } + + public boolean hasPodCIDR() { + return this.podCIDR != null; + } + + public A addToPodCIDRs(int index,String item) { + if (this.podCIDRs == null) {this.podCIDRs = new ArrayList();} + this.podCIDRs.add(index, item); + return (A)this; + } + + public A setToPodCIDRs(int index,String item) { + if (this.podCIDRs == null) {this.podCIDRs = new ArrayList();} + this.podCIDRs.set(index, item); return (A)this; + } + + public A addToPodCIDRs(java.lang.String... items) { + if (this.podCIDRs == null) {this.podCIDRs = new ArrayList();} + for (String item : items) {this.podCIDRs.add(item);} return (A)this; + } + + public A addAllToPodCIDRs(Collection items) { + if (this.podCIDRs == null) {this.podCIDRs = new ArrayList();} + for (String item : items) {this.podCIDRs.add(item);} return (A)this; + } + + public A removeFromPodCIDRs(java.lang.String... items) { + if (this.podCIDRs == null) return (A)this; + for (String item : items) { this.podCIDRs.remove(item);} return (A)this; + } + + public A removeAllFromPodCIDRs(Collection items) { + if (this.podCIDRs == null) return (A)this; + for (String item : items) { this.podCIDRs.remove(item);} return (A)this; + } + + public List getPodCIDRs() { + return this.podCIDRs; + } + + public String getPodCIDR(int index) { + return this.podCIDRs.get(index); + } + + public String getFirstPodCIDR() { + return this.podCIDRs.get(0); + } + + public String getLastPodCIDR() { + return this.podCIDRs.get(podCIDRs.size() - 1); + } + + public String getMatchingPodCIDR(Predicate predicate) { + for (String item : podCIDRs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingPodCIDR(Predicate predicate) { + for (String item : podCIDRs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPodCIDRs(List podCIDRs) { + if (podCIDRs != null) { + this.podCIDRs = new ArrayList(); + for (String item : podCIDRs) { + this.addToPodCIDRs(item); + } + } else { + this.podCIDRs = null; + } + return (A) this; + } + + public A withPodCIDRs(java.lang.String... podCIDRs) { + if (this.podCIDRs != null) { + this.podCIDRs.clear(); + _visitables.remove("podCIDRs"); + } + if (podCIDRs != null) { + for (String item : podCIDRs) { + this.addToPodCIDRs(item); + } + } + return (A) this; + } + + public boolean hasPodCIDRs() { + return this.podCIDRs != null && !this.podCIDRs.isEmpty(); + } + + public String getProviderID() { + return this.providerID; + } + + public A withProviderID(String providerID) { + this.providerID = providerID; + return (A) this; + } + + public boolean hasProviderID() { + return this.providerID != null; } - public interface TaintsNested extends Nested,V1TaintFluent>{ - public N and(); - public N endTaint(); + + public A addToTaints(int index,V1Taint item) { + if (this.taints == null) {this.taints = new ArrayList();} + V1TaintBuilder builder = new V1TaintBuilder(item); + if (index < 0 || index >= taints.size()) { _visitables.get("taints").add(builder); taints.add(builder); } else { _visitables.get("taints").add(index, builder); taints.add(index, builder);} + return (A)this; + } + + public A setToTaints(int index,V1Taint item) { + if (this.taints == null) {this.taints = new ArrayList();} + V1TaintBuilder builder = new V1TaintBuilder(item); + if (index < 0 || index >= taints.size()) { _visitables.get("taints").add(builder); taints.add(builder); } else { _visitables.get("taints").set(index, builder); taints.set(index, builder);} + return (A)this; + } + + public A addToTaints(io.kubernetes.client.openapi.models.V1Taint... items) { + if (this.taints == null) {this.taints = new ArrayList();} + for (V1Taint item : items) {V1TaintBuilder builder = new V1TaintBuilder(item);_visitables.get("taints").add(builder);this.taints.add(builder);} return (A)this; + } + + public A addAllToTaints(Collection items) { + if (this.taints == null) {this.taints = new ArrayList();} + for (V1Taint item : items) {V1TaintBuilder builder = new V1TaintBuilder(item);_visitables.get("taints").add(builder);this.taints.add(builder);} return (A)this; + } + + public A removeFromTaints(io.kubernetes.client.openapi.models.V1Taint... items) { + if (this.taints == null) return (A)this; + for (V1Taint item : items) {V1TaintBuilder builder = new V1TaintBuilder(item);_visitables.get("taints").remove(builder); this.taints.remove(builder);} return (A)this; + } + + public A removeAllFromTaints(Collection items) { + if (this.taints == null) return (A)this; + for (V1Taint item : items) {V1TaintBuilder builder = new V1TaintBuilder(item);_visitables.get("taints").remove(builder); this.taints.remove(builder);} return (A)this; + } + + public A removeMatchingFromTaints(Predicate predicate) { + if (taints == null) return (A) this; + final Iterator each = taints.iterator(); + final List visitables = _visitables.get("taints"); + while (each.hasNext()) { + V1TaintBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildTaints() { + return this.taints != null ? build(taints) : null; + } + + public V1Taint buildTaint(int index) { + return this.taints.get(index).build(); + } + + public V1Taint buildFirstTaint() { + return this.taints.get(0).build(); + } + + public V1Taint buildLastTaint() { + return this.taints.get(taints.size() - 1).build(); + } + + public V1Taint buildMatchingTaint(Predicate predicate) { + for (V1TaintBuilder item : taints) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingTaint(Predicate predicate) { + for (V1TaintBuilder item : taints) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withTaints(List taints) { + if (this.taints != null) { + this._visitables.get("taints").clear(); + } + if (taints != null) { + this.taints = new ArrayList(); + for (V1Taint item : taints) { + this.addToTaints(item); + } + } else { + this.taints = null; + } + return (A) this; + } + + public A withTaints(io.kubernetes.client.openapi.models.V1Taint... taints) { + if (this.taints != null) { + this.taints.clear(); + _visitables.remove("taints"); + } + if (taints != null) { + for (V1Taint item : taints) { + this.addToTaints(item); + } + } + return (A) this; + } + + public boolean hasTaints() { + return this.taints != null && !this.taints.isEmpty(); + } + + public TaintsNested addNewTaint() { + return new TaintsNested(-1, null); + } + + public TaintsNested addNewTaintLike(V1Taint item) { + return new TaintsNested(-1, item); + } + + public TaintsNested setNewTaintLike(int index,V1Taint item) { + return new TaintsNested(index, item); + } + + public TaintsNested editTaint(int index) { + if (taints.size() <= index) throw new RuntimeException("Can't edit taints. Index exceeds size."); + return setNewTaintLike(index, buildTaint(index)); + } + + public TaintsNested editFirstTaint() { + if (taints.size() == 0) throw new RuntimeException("Can't edit first taints. The list is empty."); + return setNewTaintLike(0, buildTaint(0)); + } + + public TaintsNested editLastTaint() { + int index = taints.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last taints. The list is empty."); + return setNewTaintLike(index, buildTaint(index)); + } + + public TaintsNested editMatchingTaint(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1NodeConfigSourceFluent> implements Nested{ + ConfigSourceNested(V1NodeConfigSource item) { + this.builder = new V1NodeConfigSourceBuilder(this, item); + } + V1NodeConfigSourceBuilder builder; + public N and() { + return (N) V1NodeSpecFluent.this.withConfigSource(builder.build()); + } + + public N endConfigSource() { + return and(); + } + + } + public class TaintsNested extends V1TaintFluent> implements Nested{ + TaintsNested(int index,V1Taint item) { + this.index = index; + this.builder = new V1TaintBuilder(this, item); + } + V1TaintBuilder builder; + int index; + + public N and() { + return (N) V1NodeSpecFluent.this.setToTaints(index,builder.build()); + } + + public N endTaint() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecFluentImpl.java deleted file mode 100644 index dab3d39e3e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSpecFluentImpl.java +++ /dev/null @@ -1,346 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeSpecFluentImpl> extends BaseFluent implements V1NodeSpecFluent{ - public V1NodeSpecFluentImpl() { - } - public V1NodeSpecFluentImpl(V1NodeSpec instance) { - if (instance != null) { - this.withConfigSource(instance.getConfigSource()); - this.withExternalID(instance.getExternalID()); - this.withPodCIDR(instance.getPodCIDR()); - this.withPodCIDRs(instance.getPodCIDRs()); - this.withProviderID(instance.getProviderID()); - this.withTaints(instance.getTaints()); - this.withUnschedulable(instance.getUnschedulable()); - } - } - private V1NodeConfigSourceBuilder configSource; - private String externalID; - private String podCIDR; - private List podCIDRs; - private String providerID; - private ArrayList taints; - private Boolean unschedulable; - - /** - * This method has been deprecated, please use method buildConfigSource instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeConfigSource getConfigSource() { - return this.configSource!=null ?this.configSource.build():null; - } - public V1NodeConfigSource buildConfigSource() { - return this.configSource!=null ?this.configSource.build():null; - } - public A withConfigSource(V1NodeConfigSource configSource) { - _visitables.get("configSource").remove(this.configSource); - if (configSource!=null){ this.configSource= new V1NodeConfigSourceBuilder(configSource); _visitables.get("configSource").add(this.configSource);} else { this.configSource = null; _visitables.get("configSource").remove(this.configSource); } return (A) this; - } - public Boolean hasConfigSource() { - return this.configSource != null; - } - public V1NodeSpecFluentImpl.ConfigSourceNested withNewConfigSource() { - return new V1NodeSpecFluentImpl.ConfigSourceNestedImpl(); - } - public V1NodeSpecFluentImpl.ConfigSourceNested withNewConfigSourceLike(V1NodeConfigSource item) { - return new V1NodeSpecFluentImpl.ConfigSourceNestedImpl(item); - } - public V1NodeSpecFluentImpl.ConfigSourceNested editConfigSource() { - return withNewConfigSourceLike(getConfigSource()); - } - public V1NodeSpecFluentImpl.ConfigSourceNested editOrNewConfigSource() { - return withNewConfigSourceLike(getConfigSource() != null ? getConfigSource(): new V1NodeConfigSourceBuilder().build()); - } - public V1NodeSpecFluentImpl.ConfigSourceNested editOrNewConfigSourceLike(V1NodeConfigSource item) { - return withNewConfigSourceLike(getConfigSource() != null ? getConfigSource(): item); - } - public String getExternalID() { - return this.externalID; - } - public A withExternalID(String externalID) { - this.externalID=externalID; return (A) this; - } - public Boolean hasExternalID() { - return this.externalID != null; - } - public String getPodCIDR() { - return this.podCIDR; - } - public A withPodCIDR(String podCIDR) { - this.podCIDR=podCIDR; return (A) this; - } - public Boolean hasPodCIDR() { - return this.podCIDR != null; - } - public A addToPodCIDRs(int index,String item) { - if (this.podCIDRs == null) {this.podCIDRs = new ArrayList();} - this.podCIDRs.add(index, item); - return (A)this; - } - public A setToPodCIDRs(int index,String item) { - if (this.podCIDRs == null) {this.podCIDRs = new ArrayList();} - this.podCIDRs.set(index, item); return (A)this; - } - public A addToPodCIDRs(java.lang.String... items) { - if (this.podCIDRs == null) {this.podCIDRs = new ArrayList();} - for (String item : items) {this.podCIDRs.add(item);} return (A)this; - } - public A addAllToPodCIDRs(Collection items) { - if (this.podCIDRs == null) {this.podCIDRs = new ArrayList();} - for (String item : items) {this.podCIDRs.add(item);} return (A)this; - } - public A removeFromPodCIDRs(java.lang.String... items) { - for (String item : items) {if (this.podCIDRs!= null){ this.podCIDRs.remove(item);}} return (A)this; - } - public A removeAllFromPodCIDRs(Collection items) { - for (String item : items) {if (this.podCIDRs!= null){ this.podCIDRs.remove(item);}} return (A)this; - } - public List getPodCIDRs() { - return this.podCIDRs; - } - public String getPodCIDR(int index) { - return this.podCIDRs.get(index); - } - public String getFirstPodCIDR() { - return this.podCIDRs.get(0); - } - public String getLastPodCIDR() { - return this.podCIDRs.get(podCIDRs.size() - 1); - } - public String getMatchingPodCIDR(Predicate predicate) { - for (String item: podCIDRs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingPodCIDR(Predicate predicate) { - for (String item: podCIDRs) { if(predicate.test(item)){ return true;} } return false; - } - public A withPodCIDRs(List podCIDRs) { - if (podCIDRs != null) {this.podCIDRs = new ArrayList(); for (String item : podCIDRs){this.addToPodCIDRs(item);}} else { this.podCIDRs = null;} return (A) this; - } - public A withPodCIDRs(java.lang.String... podCIDRs) { - if (this.podCIDRs != null) {this.podCIDRs.clear(); _visitables.remove("podCIDRs"); } - if (podCIDRs != null) {for (String item :podCIDRs){ this.addToPodCIDRs(item);}} return (A) this; - } - public Boolean hasPodCIDRs() { - return podCIDRs != null && !podCIDRs.isEmpty(); - } - public String getProviderID() { - return this.providerID; - } - public A withProviderID(String providerID) { - this.providerID=providerID; return (A) this; - } - public Boolean hasProviderID() { - return this.providerID != null; - } - public A addToTaints(int index,V1Taint item) { - if (this.taints == null) {this.taints = new ArrayList();} - V1TaintBuilder builder = new V1TaintBuilder(item); - if (index < 0 || index >= taints.size()) { _visitables.get("taints").add(builder); taints.add(builder); } else { _visitables.get("taints").add(index, builder); taints.add(index, builder);} - return (A)this; - } - public A setToTaints(int index,V1Taint item) { - if (this.taints == null) {this.taints = new ArrayList();} - V1TaintBuilder builder = new V1TaintBuilder(item); - if (index < 0 || index >= taints.size()) { _visitables.get("taints").add(builder); taints.add(builder); } else { _visitables.get("taints").set(index, builder); taints.set(index, builder);} - return (A)this; - } - public A addToTaints(io.kubernetes.client.openapi.models.V1Taint... items) { - if (this.taints == null) {this.taints = new ArrayList();} - for (V1Taint item : items) {V1TaintBuilder builder = new V1TaintBuilder(item);_visitables.get("taints").add(builder);this.taints.add(builder);} return (A)this; - } - public A addAllToTaints(Collection items) { - if (this.taints == null) {this.taints = new ArrayList();} - for (V1Taint item : items) {V1TaintBuilder builder = new V1TaintBuilder(item);_visitables.get("taints").add(builder);this.taints.add(builder);} return (A)this; - } - public A removeFromTaints(io.kubernetes.client.openapi.models.V1Taint... items) { - for (V1Taint item : items) {V1TaintBuilder builder = new V1TaintBuilder(item);_visitables.get("taints").remove(builder);if (this.taints != null) {this.taints.remove(builder);}} return (A)this; - } - public A removeAllFromTaints(Collection items) { - for (V1Taint item : items) {V1TaintBuilder builder = new V1TaintBuilder(item);_visitables.get("taints").remove(builder);if (this.taints != null) {this.taints.remove(builder);}} return (A)this; - } - public A removeMatchingFromTaints(Predicate predicate) { - if (taints == null) return (A) this; - final Iterator each = taints.iterator(); - final List visitables = _visitables.get("taints"); - while (each.hasNext()) { - V1TaintBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildTaints instead. - * @return The buildable object. - */ - @Deprecated - public List getTaints() { - return taints != null ? build(taints) : null; - } - public List buildTaints() { - return taints != null ? build(taints) : null; - } - public V1Taint buildTaint(int index) { - return this.taints.get(index).build(); - } - public V1Taint buildFirstTaint() { - return this.taints.get(0).build(); - } - public V1Taint buildLastTaint() { - return this.taints.get(taints.size() - 1).build(); - } - public V1Taint buildMatchingTaint(Predicate predicate) { - for (V1TaintBuilder item: taints) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingTaint(Predicate predicate) { - for (V1TaintBuilder item: taints) { if(predicate.test(item)){ return true;} } return false; - } - public A withTaints(List taints) { - if (this.taints != null) { _visitables.get("taints").clear();} - if (taints != null) {this.taints = new ArrayList(); for (V1Taint item : taints){this.addToTaints(item);}} else { this.taints = null;} return (A) this; - } - public A withTaints(io.kubernetes.client.openapi.models.V1Taint... taints) { - if (this.taints != null) {this.taints.clear(); _visitables.remove("taints"); } - if (taints != null) {for (V1Taint item :taints){ this.addToTaints(item);}} return (A) this; - } - public Boolean hasTaints() { - return taints != null && !taints.isEmpty(); - } - public V1NodeSpecFluentImpl.TaintsNested addNewTaint() { - return new V1NodeSpecFluentImpl.TaintsNestedImpl(); - } - public V1NodeSpecFluentImpl.TaintsNested addNewTaintLike(V1Taint item) { - return new V1NodeSpecFluentImpl.TaintsNestedImpl(-1, item); - } - public V1NodeSpecFluentImpl.TaintsNested setNewTaintLike(int index,V1Taint item) { - return new V1NodeSpecFluentImpl.TaintsNestedImpl(index, item); - } - public V1NodeSpecFluentImpl.TaintsNested editTaint(int index) { - if (taints.size() <= index) throw new RuntimeException("Can't edit taints. Index exceeds size."); - return setNewTaintLike(index, buildTaint(index)); - } - public V1NodeSpecFluentImpl.TaintsNested editFirstTaint() { - if (taints.size() == 0) throw new RuntimeException("Can't edit first taints. The list is empty."); - return setNewTaintLike(0, buildTaint(0)); - } - public V1NodeSpecFluentImpl.TaintsNested editLastTaint() { - int index = taints.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last taints. The list is empty."); - return setNewTaintLike(index, buildTaint(index)); - } - public V1NodeSpecFluentImpl.TaintsNested editMatchingTaint(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1NodeConfigSourceFluentImpl> implements V1NodeSpecFluentImpl.ConfigSourceNested,Nested{ - ConfigSourceNestedImpl(V1NodeConfigSource item) { - this.builder = new V1NodeConfigSourceBuilder(this, item); - } - ConfigSourceNestedImpl() { - this.builder = new V1NodeConfigSourceBuilder(this); - } - V1NodeConfigSourceBuilder builder; - public N and() { - return (N) V1NodeSpecFluentImpl.this.withConfigSource(builder.build()); - } - public N endConfigSource() { - return and(); - } - - } - class TaintsNestedImpl extends V1TaintFluentImpl> implements V1NodeSpecFluentImpl.TaintsNested,Nested{ - TaintsNestedImpl(int index,V1Taint item) { - this.index = index; - this.builder = new V1TaintBuilder(this, item); - } - TaintsNestedImpl() { - this.index = -1; - this.builder = new V1TaintBuilder(this); - } - V1TaintBuilder builder; - int index; - public N and() { - return (N) V1NodeSpecFluentImpl.this.setToTaints(index,builder.build()); - } - public N endTaint() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusBuilder.java index e98aa0af47..e4483779a8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusBuilder.java @@ -1,76 +1,41 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeStatusBuilder extends V1NodeStatusFluentImpl implements VisitableBuilder{ +public class V1NodeStatusBuilder extends V1NodeStatusFluent implements VisitableBuilder{ public V1NodeStatusBuilder() { - this(false); - } - public V1NodeStatusBuilder(Boolean validationEnabled) { - this(new V1NodeStatus(), validationEnabled); + this(new V1NodeStatus()); } + public V1NodeStatusBuilder(V1NodeStatusFluent fluent) { - this(fluent, false); - } - public V1NodeStatusBuilder(V1NodeStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeStatus(), validationEnabled); + this(fluent, new V1NodeStatus()); } + public V1NodeStatusBuilder(V1NodeStatusFluent fluent,V1NodeStatus instance) { - this(fluent, instance, false); - } - public V1NodeStatusBuilder(V1NodeStatusFluent fluent,V1NodeStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAddresses(instance.getAddresses()); - fluent.withAllocatable(instance.getAllocatable()); - fluent.withCapacity(instance.getCapacity()); - fluent.withConditions(instance.getConditions()); - fluent.withConfig(instance.getConfig()); - fluent.withDaemonEndpoints(instance.getDaemonEndpoints()); - fluent.withImages(instance.getImages()); - fluent.withNodeInfo(instance.getNodeInfo()); - fluent.withPhase(instance.getPhase()); - fluent.withVolumesAttached(instance.getVolumesAttached()); - fluent.withVolumesInUse(instance.getVolumesInUse()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeStatusBuilder(V1NodeStatus instance) { - this(instance,false); - } - public V1NodeStatusBuilder(V1NodeStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAddresses(instance.getAddresses()); - this.withAllocatable(instance.getAllocatable()); - this.withCapacity(instance.getCapacity()); - this.withConditions(instance.getConditions()); - this.withConfig(instance.getConfig()); - this.withDaemonEndpoints(instance.getDaemonEndpoints()); - this.withImages(instance.getImages()); - this.withNodeInfo(instance.getNodeInfo()); - this.withPhase(instance.getPhase()); - this.withVolumesAttached(instance.getVolumesAttached()); - this.withVolumesInUse(instance.getVolumesInUse()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeStatusFluent fluent; - Boolean validationEnabled; + public V1NodeStatus build() { V1NodeStatus buildable = new V1NodeStatus(); - buildable.setAddresses(fluent.getAddresses()); + buildable.setAddresses(fluent.buildAddresses()); buildable.setAllocatable(fluent.getAllocatable()); buildable.setCapacity(fluent.getCapacity()); - buildable.setConditions(fluent.getConditions()); - buildable.setConfig(fluent.getConfig()); - buildable.setDaemonEndpoints(fluent.getDaemonEndpoints()); - buildable.setImages(fluent.getImages()); - buildable.setNodeInfo(fluent.getNodeInfo()); + buildable.setConditions(fluent.buildConditions()); + buildable.setConfig(fluent.buildConfig()); + buildable.setDaemonEndpoints(fluent.buildDaemonEndpoints()); + buildable.setImages(fluent.buildImages()); + buildable.setNodeInfo(fluent.buildNodeInfo()); buildable.setPhase(fluent.getPhase()); - buildable.setVolumesAttached(fluent.getVolumesAttached()); + buildable.setVolumesAttached(fluent.buildVolumesAttached()); buildable.setVolumesInUse(fluent.getVolumesInUse()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusFluent.java index 6eed9737a9..7f2aa9832f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusFluent.java @@ -1,256 +1,1124 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; -import java.util.Iterator; +import io.kubernetes.client.fluent.BaseFluent; import java.util.List; -import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; -import io.kubernetes.client.custom.Quantity; import java.util.Collection; +import java.lang.Object; import java.util.Map; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.util.Iterator; +import io.kubernetes.client.custom.Quantity; - /** - * Generated - */ -public interface V1NodeStatusFluent> extends Fluent{ - public A addToAddresses(int index,V1NodeAddress item); - public A setToAddresses(int index,V1NodeAddress item); - public A addToAddresses(io.kubernetes.client.openapi.models.V1NodeAddress... items); - public A addAllToAddresses(Collection items); - public A removeFromAddresses(io.kubernetes.client.openapi.models.V1NodeAddress... items); - public A removeAllFromAddresses(Collection items); - public A removeMatchingFromAddresses(Predicate predicate); - - /** - * This method has been deprecated, please use method buildAddresses instead. - * @return The buildable object. - */ - @Deprecated - public List getAddresses(); - public List buildAddresses(); - public V1NodeAddress buildAddress(int index); - public V1NodeAddress buildFirstAddress(); - public V1NodeAddress buildLastAddress(); - public V1NodeAddress buildMatchingAddress(Predicate predicate); - public Boolean hasMatchingAddress(Predicate predicate); - public A withAddresses(List addresses); - public A withAddresses(io.kubernetes.client.openapi.models.V1NodeAddress... addresses); - public Boolean hasAddresses(); - public V1NodeStatusFluent.AddressesNested addNewAddress(); - public V1NodeStatusFluent.AddressesNested addNewAddressLike(V1NodeAddress item); - public V1NodeStatusFluent.AddressesNested setNewAddressLike(int index,V1NodeAddress item); - public V1NodeStatusFluent.AddressesNested editAddress(int index); - public V1NodeStatusFluent.AddressesNested editFirstAddress(); - public V1NodeStatusFluent.AddressesNested editLastAddress(); - public V1NodeStatusFluent.AddressesNested editMatchingAddress(Predicate predicate); - public A addToAllocatable(String key,Quantity value); - public A addToAllocatable(Map map); - public A removeFromAllocatable(String key); - public A removeFromAllocatable(Map map); - public Map getAllocatable(); - public A withAllocatable(Map allocatable); - public Boolean hasAllocatable(); - public A addToCapacity(String key,Quantity value); - public A addToCapacity(Map map); - public A removeFromCapacity(String key); - public A removeFromCapacity(Map map); - public Map getCapacity(); - public A withCapacity(Map capacity); - public Boolean hasCapacity(); - public A addToConditions(int index,V1NodeCondition item); - public A setToConditions(int index,V1NodeCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1NodeCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1NodeCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1NodeCondition buildCondition(int index); - public V1NodeCondition buildFirstCondition(); - public V1NodeCondition buildLastCondition(); - public V1NodeCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1NodeCondition... conditions); - public Boolean hasConditions(); - public V1NodeStatusFluent.ConditionsNested addNewCondition(); - public V1NodeStatusFluent.ConditionsNested addNewConditionLike(V1NodeCondition item); - public V1NodeStatusFluent.ConditionsNested setNewConditionLike(int index,V1NodeCondition item); - public V1NodeStatusFluent.ConditionsNested editCondition(int index); - public V1NodeStatusFluent.ConditionsNested editFirstCondition(); - public V1NodeStatusFluent.ConditionsNested editLastCondition(); - public V1NodeStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConfig instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeConfigStatus getConfig(); - public V1NodeConfigStatus buildConfig(); - public A withConfig(V1NodeConfigStatus config); - public Boolean hasConfig(); - public V1NodeStatusFluent.ConfigNested withNewConfig(); - public V1NodeStatusFluent.ConfigNested withNewConfigLike(V1NodeConfigStatus item); - public V1NodeStatusFluent.ConfigNested editConfig(); - public V1NodeStatusFluent.ConfigNested editOrNewConfig(); - public V1NodeStatusFluent.ConfigNested editOrNewConfigLike(V1NodeConfigStatus item); - - /** - * This method has been deprecated, please use method buildDaemonEndpoints instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeDaemonEndpoints getDaemonEndpoints(); - public V1NodeDaemonEndpoints buildDaemonEndpoints(); - public A withDaemonEndpoints(V1NodeDaemonEndpoints daemonEndpoints); - public Boolean hasDaemonEndpoints(); - public V1NodeStatusFluent.DaemonEndpointsNested withNewDaemonEndpoints(); - public V1NodeStatusFluent.DaemonEndpointsNested withNewDaemonEndpointsLike(V1NodeDaemonEndpoints item); - public V1NodeStatusFluent.DaemonEndpointsNested editDaemonEndpoints(); - public V1NodeStatusFluent.DaemonEndpointsNested editOrNewDaemonEndpoints(); - public V1NodeStatusFluent.DaemonEndpointsNested editOrNewDaemonEndpointsLike(V1NodeDaemonEndpoints item); - public A addToImages(int index,V1ContainerImage item); - public A setToImages(int index,V1ContainerImage item); - public A addToImages(io.kubernetes.client.openapi.models.V1ContainerImage... items); - public A addAllToImages(Collection items); - public A removeFromImages(io.kubernetes.client.openapi.models.V1ContainerImage... items); - public A removeAllFromImages(Collection items); - public A removeMatchingFromImages(Predicate predicate); - - /** - * This method has been deprecated, please use method buildImages instead. - * @return The buildable object. - */ - @Deprecated - public List getImages(); - public List buildImages(); - public V1ContainerImage buildImage(int index); - public V1ContainerImage buildFirstImage(); - public V1ContainerImage buildLastImage(); - public V1ContainerImage buildMatchingImage(Predicate predicate); - public Boolean hasMatchingImage(Predicate predicate); - public A withImages(List images); - public A withImages(io.kubernetes.client.openapi.models.V1ContainerImage... images); - public Boolean hasImages(); - public V1NodeStatusFluent.ImagesNested addNewImage(); - public V1NodeStatusFluent.ImagesNested addNewImageLike(V1ContainerImage item); - public V1NodeStatusFluent.ImagesNested setNewImageLike(int index,V1ContainerImage item); - public V1NodeStatusFluent.ImagesNested editImage(int index); - public V1NodeStatusFluent.ImagesNested editFirstImage(); - public V1NodeStatusFluent.ImagesNested editLastImage(); - public V1NodeStatusFluent.ImagesNested editMatchingImage(Predicate predicate); - - /** - * This method has been deprecated, please use method buildNodeInfo instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSystemInfo getNodeInfo(); - public V1NodeSystemInfo buildNodeInfo(); - public A withNodeInfo(V1NodeSystemInfo nodeInfo); - public Boolean hasNodeInfo(); - public V1NodeStatusFluent.NodeInfoNested withNewNodeInfo(); - public V1NodeStatusFluent.NodeInfoNested withNewNodeInfoLike(V1NodeSystemInfo item); - public V1NodeStatusFluent.NodeInfoNested editNodeInfo(); - public V1NodeStatusFluent.NodeInfoNested editOrNewNodeInfo(); - public V1NodeStatusFluent.NodeInfoNested editOrNewNodeInfoLike(V1NodeSystemInfo item); - public String getPhase(); - public A withPhase(String phase); - public Boolean hasPhase(); - public A addToVolumesAttached(int index,V1AttachedVolume item); - public A setToVolumesAttached(int index,V1AttachedVolume item); - public A addToVolumesAttached(io.kubernetes.client.openapi.models.V1AttachedVolume... items); - public A addAllToVolumesAttached(Collection items); - public A removeFromVolumesAttached(io.kubernetes.client.openapi.models.V1AttachedVolume... items); - public A removeAllFromVolumesAttached(Collection items); - public A removeMatchingFromVolumesAttached(Predicate predicate); - - /** - * This method has been deprecated, please use method buildVolumesAttached instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumesAttached(); - public List buildVolumesAttached(); - public V1AttachedVolume buildVolumesAttached(int index); - public V1AttachedVolume buildFirstVolumesAttached(); - public V1AttachedVolume buildLastVolumesAttached(); - public V1AttachedVolume buildMatchingVolumesAttached(Predicate predicate); - public Boolean hasMatchingVolumesAttached(Predicate predicate); - public A withVolumesAttached(List volumesAttached); - public A withVolumesAttached(io.kubernetes.client.openapi.models.V1AttachedVolume... volumesAttached); - public Boolean hasVolumesAttached(); - public V1NodeStatusFluent.VolumesAttachedNested addNewVolumesAttached(); - public V1NodeStatusFluent.VolumesAttachedNested addNewVolumesAttachedLike(V1AttachedVolume item); - public V1NodeStatusFluent.VolumesAttachedNested setNewVolumesAttachedLike(int index,V1AttachedVolume item); - public V1NodeStatusFluent.VolumesAttachedNested editVolumesAttached(int index); - public V1NodeStatusFluent.VolumesAttachedNested editFirstVolumesAttached(); - public V1NodeStatusFluent.VolumesAttachedNested editLastVolumesAttached(); - public V1NodeStatusFluent.VolumesAttachedNested editMatchingVolumesAttached(Predicate predicate); - public A addToVolumesInUse(int index,String item); - public A setToVolumesInUse(int index,String item); - public A addToVolumesInUse(java.lang.String... items); - public A addAllToVolumesInUse(Collection items); - public A removeFromVolumesInUse(java.lang.String... items); - public A removeAllFromVolumesInUse(Collection items); - public List getVolumesInUse(); - public String getVolumesInUse(int index); - public String getFirstVolumesInUse(); - public String getLastVolumesInUse(); - public String getMatchingVolumesInUse(Predicate predicate); - public Boolean hasMatchingVolumesInUse(Predicate predicate); - public A withVolumesInUse(List volumesInUse); - public A withVolumesInUse(java.lang.String... volumesInUse); - public Boolean hasVolumesInUse(); - public interface AddressesNested extends Nested,V1NodeAddressFluent>{ - public N and(); - public N endAddress(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeStatusFluent> extends BaseFluent{ + public V1NodeStatusFluent() { + } + + public V1NodeStatusFluent(V1NodeStatus instance) { + this.copyInstance(instance); + } + private ArrayList addresses; + private Map allocatable; + private Map capacity; + private ArrayList conditions; + private V1NodeConfigStatusBuilder config; + private V1NodeDaemonEndpointsBuilder daemonEndpoints; + private ArrayList images; + private V1NodeSystemInfoBuilder nodeInfo; + private String phase; + private ArrayList volumesAttached; + private List volumesInUse; + + protected void copyInstance(V1NodeStatus instance) { + instance = (instance != null ? instance : new V1NodeStatus()); + if (instance != null) { + this.withAddresses(instance.getAddresses()); + this.withAllocatable(instance.getAllocatable()); + this.withCapacity(instance.getCapacity()); + this.withConditions(instance.getConditions()); + this.withConfig(instance.getConfig()); + this.withDaemonEndpoints(instance.getDaemonEndpoints()); + this.withImages(instance.getImages()); + this.withNodeInfo(instance.getNodeInfo()); + this.withPhase(instance.getPhase()); + this.withVolumesAttached(instance.getVolumesAttached()); + this.withVolumesInUse(instance.getVolumesInUse()); + } + } + + public A addToAddresses(int index,V1NodeAddress item) { + if (this.addresses == null) {this.addresses = new ArrayList();} + V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item); + if (index < 0 || index >= addresses.size()) { _visitables.get("addresses").add(builder); addresses.add(builder); } else { _visitables.get("addresses").add(index, builder); addresses.add(index, builder);} + return (A)this; + } + + public A setToAddresses(int index,V1NodeAddress item) { + if (this.addresses == null) {this.addresses = new ArrayList();} + V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item); + if (index < 0 || index >= addresses.size()) { _visitables.get("addresses").add(builder); addresses.add(builder); } else { _visitables.get("addresses").set(index, builder); addresses.set(index, builder);} + return (A)this; + } + + public A addToAddresses(io.kubernetes.client.openapi.models.V1NodeAddress... items) { + if (this.addresses == null) {this.addresses = new ArrayList();} + for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this; + } + + public A addAllToAddresses(Collection items) { + if (this.addresses == null) {this.addresses = new ArrayList();} + for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this; + } + + public A removeFromAddresses(io.kubernetes.client.openapi.models.V1NodeAddress... items) { + if (this.addresses == null) return (A)this; + for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").remove(builder); this.addresses.remove(builder);} return (A)this; + } + + public A removeAllFromAddresses(Collection items) { + if (this.addresses == null) return (A)this; + for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").remove(builder); this.addresses.remove(builder);} return (A)this; + } + + public A removeMatchingFromAddresses(Predicate predicate) { + if (addresses == null) return (A) this; + final Iterator each = addresses.iterator(); + final List visitables = _visitables.get("addresses"); + while (each.hasNext()) { + V1NodeAddressBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildAddresses() { + return this.addresses != null ? build(addresses) : null; + } + + public V1NodeAddress buildAddress(int index) { + return this.addresses.get(index).build(); + } + + public V1NodeAddress buildFirstAddress() { + return this.addresses.get(0).build(); + } + + public V1NodeAddress buildLastAddress() { + return this.addresses.get(addresses.size() - 1).build(); + } + + public V1NodeAddress buildMatchingAddress(Predicate predicate) { + for (V1NodeAddressBuilder item : addresses) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingAddress(Predicate predicate) { + for (V1NodeAddressBuilder item : addresses) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAddresses(List addresses) { + if (this.addresses != null) { + this._visitables.get("addresses").clear(); + } + if (addresses != null) { + this.addresses = new ArrayList(); + for (V1NodeAddress item : addresses) { + this.addToAddresses(item); + } + } else { + this.addresses = null; + } + return (A) this; + } + + public A withAddresses(io.kubernetes.client.openapi.models.V1NodeAddress... addresses) { + if (this.addresses != null) { + this.addresses.clear(); + _visitables.remove("addresses"); + } + if (addresses != null) { + for (V1NodeAddress item : addresses) { + this.addToAddresses(item); + } + } + return (A) this; + } + + public boolean hasAddresses() { + return this.addresses != null && !this.addresses.isEmpty(); + } + + public AddressesNested addNewAddress() { + return new AddressesNested(-1, null); + } + + public AddressesNested addNewAddressLike(V1NodeAddress item) { + return new AddressesNested(-1, item); + } + + public AddressesNested setNewAddressLike(int index,V1NodeAddress item) { + return new AddressesNested(index, item); + } + + public AddressesNested editAddress(int index) { + if (addresses.size() <= index) throw new RuntimeException("Can't edit addresses. Index exceeds size."); + return setNewAddressLike(index, buildAddress(index)); + } + + public AddressesNested editFirstAddress() { + if (addresses.size() == 0) throw new RuntimeException("Can't edit first addresses. The list is empty."); + return setNewAddressLike(0, buildAddress(0)); + } + + public AddressesNested editLastAddress() { + int index = addresses.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last addresses. The list is empty."); + return setNewAddressLike(index, buildAddress(index)); + } + + public AddressesNested editMatchingAddress(Predicate predicate) { + int index = -1; + for (int i=0;i map) { + if(this.allocatable == null && map != null) { this.allocatable = new LinkedHashMap(); } + if(map != null) { this.allocatable.putAll(map);} return (A)this; + } + + public A removeFromAllocatable(String key) { + if(this.allocatable == null) { return (A) this; } + if(key != null && this.allocatable != null) {this.allocatable.remove(key);} return (A)this; + } + + public A removeFromAllocatable(Map map) { + if(this.allocatable == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.allocatable != null){this.allocatable.remove(key);}}} return (A)this; + } + + public Map getAllocatable() { + return this.allocatable; + } + + public A withAllocatable(Map allocatable) { + if (allocatable == null) { + this.allocatable = null; + } else { + this.allocatable = new LinkedHashMap(allocatable); + } + return (A) this; + } + + public boolean hasAllocatable() { + return this.allocatable != null; + } + + public A addToCapacity(String key,Quantity value) { + if(this.capacity == null && key != null && value != null) { this.capacity = new LinkedHashMap(); } + if(key != null && value != null) {this.capacity.put(key, value);} return (A)this; + } + + public A addToCapacity(Map map) { + if(this.capacity == null && map != null) { this.capacity = new LinkedHashMap(); } + if(map != null) { this.capacity.putAll(map);} return (A)this; + } + + public A removeFromCapacity(String key) { + if(this.capacity == null) { return (A) this; } + if(key != null && this.capacity != null) {this.capacity.remove(key);} return (A)this; + } + + public A removeFromCapacity(Map map) { + if(this.capacity == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.capacity != null){this.capacity.remove(key);}}} return (A)this; + } + + public Map getCapacity() { + return this.capacity; + } + + public A withCapacity(Map capacity) { + if (capacity == null) { + this.capacity = null; + } else { + this.capacity = new LinkedHashMap(capacity); + } + return (A) this; + } + + public boolean hasCapacity() { + return this.capacity != null; + } + + public A addToConditions(int index,V1NodeCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1NodeCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1NodeCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1NodeCondition... items) { + if (this.conditions == null) return (A)this; + for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1NodeConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1NodeCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1NodeCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1NodeCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1NodeCondition buildMatchingCondition(Predicate predicate) { + for (V1NodeConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1NodeConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1NodeCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1NodeCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1NodeCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1NodeCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1NodeCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i withNewConfig() { + return new ConfigNested(null); + } + + public ConfigNested withNewConfigLike(V1NodeConfigStatus item) { + return new ConfigNested(item); + } + + public ConfigNested editConfig() { + return withNewConfigLike(java.util.Optional.ofNullable(buildConfig()).orElse(null)); + } + + public ConfigNested editOrNewConfig() { + return withNewConfigLike(java.util.Optional.ofNullable(buildConfig()).orElse(new V1NodeConfigStatusBuilder().build())); + } + + public ConfigNested editOrNewConfigLike(V1NodeConfigStatus item) { + return withNewConfigLike(java.util.Optional.ofNullable(buildConfig()).orElse(item)); + } + + public V1NodeDaemonEndpoints buildDaemonEndpoints() { + return this.daemonEndpoints != null ? this.daemonEndpoints.build() : null; + } + + public A withDaemonEndpoints(V1NodeDaemonEndpoints daemonEndpoints) { + this._visitables.remove("daemonEndpoints"); + if (daemonEndpoints != null) { + this.daemonEndpoints = new V1NodeDaemonEndpointsBuilder(daemonEndpoints); + this._visitables.get("daemonEndpoints").add(this.daemonEndpoints); + } else { + this.daemonEndpoints = null; + this._visitables.get("daemonEndpoints").remove(this.daemonEndpoints); + } + return (A) this; + } + + public boolean hasDaemonEndpoints() { + return this.daemonEndpoints != null; + } + + public DaemonEndpointsNested withNewDaemonEndpoints() { + return new DaemonEndpointsNested(null); + } + + public DaemonEndpointsNested withNewDaemonEndpointsLike(V1NodeDaemonEndpoints item) { + return new DaemonEndpointsNested(item); + } + + public DaemonEndpointsNested editDaemonEndpoints() { + return withNewDaemonEndpointsLike(java.util.Optional.ofNullable(buildDaemonEndpoints()).orElse(null)); + } + + public DaemonEndpointsNested editOrNewDaemonEndpoints() { + return withNewDaemonEndpointsLike(java.util.Optional.ofNullable(buildDaemonEndpoints()).orElse(new V1NodeDaemonEndpointsBuilder().build())); + } + + public DaemonEndpointsNested editOrNewDaemonEndpointsLike(V1NodeDaemonEndpoints item) { + return withNewDaemonEndpointsLike(java.util.Optional.ofNullable(buildDaemonEndpoints()).orElse(item)); + } + + public A addToImages(int index,V1ContainerImage item) { + if (this.images == null) {this.images = new ArrayList();} + V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item); + if (index < 0 || index >= images.size()) { _visitables.get("images").add(builder); images.add(builder); } else { _visitables.get("images").add(index, builder); images.add(index, builder);} + return (A)this; + } + + public A setToImages(int index,V1ContainerImage item) { + if (this.images == null) {this.images = new ArrayList();} + V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item); + if (index < 0 || index >= images.size()) { _visitables.get("images").add(builder); images.add(builder); } else { _visitables.get("images").set(index, builder); images.set(index, builder);} + return (A)this; + } + + public A addToImages(io.kubernetes.client.openapi.models.V1ContainerImage... items) { + if (this.images == null) {this.images = new ArrayList();} + for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").add(builder);this.images.add(builder);} return (A)this; + } + + public A addAllToImages(Collection items) { + if (this.images == null) {this.images = new ArrayList();} + for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").add(builder);this.images.add(builder);} return (A)this; + } + + public A removeFromImages(io.kubernetes.client.openapi.models.V1ContainerImage... items) { + if (this.images == null) return (A)this; + for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").remove(builder); this.images.remove(builder);} return (A)this; + } + + public A removeAllFromImages(Collection items) { + if (this.images == null) return (A)this; + for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").remove(builder); this.images.remove(builder);} return (A)this; + } + + public A removeMatchingFromImages(Predicate predicate) { + if (images == null) return (A) this; + final Iterator each = images.iterator(); + final List visitables = _visitables.get("images"); + while (each.hasNext()) { + V1ContainerImageBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildImages() { + return this.images != null ? build(images) : null; + } + + public V1ContainerImage buildImage(int index) { + return this.images.get(index).build(); + } + + public V1ContainerImage buildFirstImage() { + return this.images.get(0).build(); + } + + public V1ContainerImage buildLastImage() { + return this.images.get(images.size() - 1).build(); + } + + public V1ContainerImage buildMatchingImage(Predicate predicate) { + for (V1ContainerImageBuilder item : images) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingImage(Predicate predicate) { + for (V1ContainerImageBuilder item : images) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withImages(List images) { + if (this.images != null) { + this._visitables.get("images").clear(); + } + if (images != null) { + this.images = new ArrayList(); + for (V1ContainerImage item : images) { + this.addToImages(item); + } + } else { + this.images = null; + } + return (A) this; + } + + public A withImages(io.kubernetes.client.openapi.models.V1ContainerImage... images) { + if (this.images != null) { + this.images.clear(); + _visitables.remove("images"); + } + if (images != null) { + for (V1ContainerImage item : images) { + this.addToImages(item); + } + } + return (A) this; + } + + public boolean hasImages() { + return this.images != null && !this.images.isEmpty(); + } + + public ImagesNested addNewImage() { + return new ImagesNested(-1, null); + } + + public ImagesNested addNewImageLike(V1ContainerImage item) { + return new ImagesNested(-1, item); + } + + public ImagesNested setNewImageLike(int index,V1ContainerImage item) { + return new ImagesNested(index, item); + } + + public ImagesNested editImage(int index) { + if (images.size() <= index) throw new RuntimeException("Can't edit images. Index exceeds size."); + return setNewImageLike(index, buildImage(index)); + } + + public ImagesNested editFirstImage() { + if (images.size() == 0) throw new RuntimeException("Can't edit first images. The list is empty."); + return setNewImageLike(0, buildImage(0)); + } + + public ImagesNested editLastImage() { + int index = images.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last images. The list is empty."); + return setNewImageLike(index, buildImage(index)); + } + + public ImagesNested editMatchingImage(Predicate predicate) { + int index = -1; + for (int i=0;i withNewNodeInfo() { + return new NodeInfoNested(null); + } + + public NodeInfoNested withNewNodeInfoLike(V1NodeSystemInfo item) { + return new NodeInfoNested(item); + } + + public NodeInfoNested editNodeInfo() { + return withNewNodeInfoLike(java.util.Optional.ofNullable(buildNodeInfo()).orElse(null)); + } + + public NodeInfoNested editOrNewNodeInfo() { + return withNewNodeInfoLike(java.util.Optional.ofNullable(buildNodeInfo()).orElse(new V1NodeSystemInfoBuilder().build())); + } + + public NodeInfoNested editOrNewNodeInfoLike(V1NodeSystemInfo item) { + return withNewNodeInfoLike(java.util.Optional.ofNullable(buildNodeInfo()).orElse(item)); + } + + public String getPhase() { + return this.phase; + } + + public A withPhase(String phase) { + this.phase = phase; + return (A) this; + } + + public boolean hasPhase() { + return this.phase != null; + } + + public A addToVolumesAttached(int index,V1AttachedVolume item) { + if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();} + V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item); + if (index < 0 || index >= volumesAttached.size()) { _visitables.get("volumesAttached").add(builder); volumesAttached.add(builder); } else { _visitables.get("volumesAttached").add(index, builder); volumesAttached.add(index, builder);} + return (A)this; + } + + public A setToVolumesAttached(int index,V1AttachedVolume item) { + if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();} + V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item); + if (index < 0 || index >= volumesAttached.size()) { _visitables.get("volumesAttached").add(builder); volumesAttached.add(builder); } else { _visitables.get("volumesAttached").set(index, builder); volumesAttached.set(index, builder);} + return (A)this; + } + + public A addToVolumesAttached(io.kubernetes.client.openapi.models.V1AttachedVolume... items) { + if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();} + for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").add(builder);this.volumesAttached.add(builder);} return (A)this; + } + + public A addAllToVolumesAttached(Collection items) { + if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();} + for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").add(builder);this.volumesAttached.add(builder);} return (A)this; + } + + public A removeFromVolumesAttached(io.kubernetes.client.openapi.models.V1AttachedVolume... items) { + if (this.volumesAttached == null) return (A)this; + for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").remove(builder); this.volumesAttached.remove(builder);} return (A)this; + } + + public A removeAllFromVolumesAttached(Collection items) { + if (this.volumesAttached == null) return (A)this; + for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").remove(builder); this.volumesAttached.remove(builder);} return (A)this; + } + + public A removeMatchingFromVolumesAttached(Predicate predicate) { + if (volumesAttached == null) return (A) this; + final Iterator each = volumesAttached.iterator(); + final List visitables = _visitables.get("volumesAttached"); + while (each.hasNext()) { + V1AttachedVolumeBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVolumesAttached() { + return this.volumesAttached != null ? build(volumesAttached) : null; + } + + public V1AttachedVolume buildVolumesAttached(int index) { + return this.volumesAttached.get(index).build(); + } + + public V1AttachedVolume buildFirstVolumesAttached() { + return this.volumesAttached.get(0).build(); + } + + public V1AttachedVolume buildLastVolumesAttached() { + return this.volumesAttached.get(volumesAttached.size() - 1).build(); + } + + public V1AttachedVolume buildMatchingVolumesAttached(Predicate predicate) { + for (V1AttachedVolumeBuilder item : volumesAttached) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVolumesAttached(Predicate predicate) { + for (V1AttachedVolumeBuilder item : volumesAttached) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVolumesAttached(List volumesAttached) { + if (this.volumesAttached != null) { + this._visitables.get("volumesAttached").clear(); + } + if (volumesAttached != null) { + this.volumesAttached = new ArrayList(); + for (V1AttachedVolume item : volumesAttached) { + this.addToVolumesAttached(item); + } + } else { + this.volumesAttached = null; + } + return (A) this; + } + + public A withVolumesAttached(io.kubernetes.client.openapi.models.V1AttachedVolume... volumesAttached) { + if (this.volumesAttached != null) { + this.volumesAttached.clear(); + _visitables.remove("volumesAttached"); + } + if (volumesAttached != null) { + for (V1AttachedVolume item : volumesAttached) { + this.addToVolumesAttached(item); + } + } + return (A) this; + } + + public boolean hasVolumesAttached() { + return this.volumesAttached != null && !this.volumesAttached.isEmpty(); + } + + public VolumesAttachedNested addNewVolumesAttached() { + return new VolumesAttachedNested(-1, null); + } + + public VolumesAttachedNested addNewVolumesAttachedLike(V1AttachedVolume item) { + return new VolumesAttachedNested(-1, item); + } + + public VolumesAttachedNested setNewVolumesAttachedLike(int index,V1AttachedVolume item) { + return new VolumesAttachedNested(index, item); + } + + public VolumesAttachedNested editVolumesAttached(int index) { + if (volumesAttached.size() <= index) throw new RuntimeException("Can't edit volumesAttached. Index exceeds size."); + return setNewVolumesAttachedLike(index, buildVolumesAttached(index)); + } + + public VolumesAttachedNested editFirstVolumesAttached() { + if (volumesAttached.size() == 0) throw new RuntimeException("Can't edit first volumesAttached. The list is empty."); + return setNewVolumesAttachedLike(0, buildVolumesAttached(0)); + } + + public VolumesAttachedNested editLastVolumesAttached() { + int index = volumesAttached.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last volumesAttached. The list is empty."); + return setNewVolumesAttachedLike(index, buildVolumesAttached(index)); + } + + public VolumesAttachedNested editMatchingVolumesAttached(Predicate predicate) { + int index = -1; + for (int i=0;i();} + this.volumesInUse.add(index, item); + return (A)this; + } + + public A setToVolumesInUse(int index,String item) { + if (this.volumesInUse == null) {this.volumesInUse = new ArrayList();} + this.volumesInUse.set(index, item); return (A)this; + } + + public A addToVolumesInUse(java.lang.String... items) { + if (this.volumesInUse == null) {this.volumesInUse = new ArrayList();} + for (String item : items) {this.volumesInUse.add(item);} return (A)this; + } + + public A addAllToVolumesInUse(Collection items) { + if (this.volumesInUse == null) {this.volumesInUse = new ArrayList();} + for (String item : items) {this.volumesInUse.add(item);} return (A)this; + } + + public A removeFromVolumesInUse(java.lang.String... items) { + if (this.volumesInUse == null) return (A)this; + for (String item : items) { this.volumesInUse.remove(item);} return (A)this; + } + + public A removeAllFromVolumesInUse(Collection items) { + if (this.volumesInUse == null) return (A)this; + for (String item : items) { this.volumesInUse.remove(item);} return (A)this; + } + + public List getVolumesInUse() { + return this.volumesInUse; + } + + public String getVolumesInUse(int index) { + return this.volumesInUse.get(index); + } + + public String getFirstVolumesInUse() { + return this.volumesInUse.get(0); + } + + public String getLastVolumesInUse() { + return this.volumesInUse.get(volumesInUse.size() - 1); + } + + public String getMatchingVolumesInUse(Predicate predicate) { + for (String item : volumesInUse) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVolumesInUse(Predicate predicate) { + for (String item : volumesInUse) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVolumesInUse(List volumesInUse) { + if (volumesInUse != null) { + this.volumesInUse = new ArrayList(); + for (String item : volumesInUse) { + this.addToVolumesInUse(item); + } + } else { + this.volumesInUse = null; + } + return (A) this; + } + + public A withVolumesInUse(java.lang.String... volumesInUse) { + if (this.volumesInUse != null) { + this.volumesInUse.clear(); + _visitables.remove("volumesInUse"); + } + if (volumesInUse != null) { + for (String item : volumesInUse) { + this.addToVolumesInUse(item); + } + } + return (A) this; } - public interface ConditionsNested extends Nested,V1NodeConditionFluent>{ - public N and(); - public N endCondition(); + + public boolean hasVolumesInUse() { + return this.volumesInUse != null && !this.volumesInUse.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeStatusFluent that = (V1NodeStatusFluent) o; + if (!java.util.Objects.equals(addresses, that.addresses)) return false; + if (!java.util.Objects.equals(allocatable, that.allocatable)) return false; + if (!java.util.Objects.equals(capacity, that.capacity)) return false; + if (!java.util.Objects.equals(conditions, that.conditions)) return false; + if (!java.util.Objects.equals(config, that.config)) return false; + if (!java.util.Objects.equals(daemonEndpoints, that.daemonEndpoints)) return false; + if (!java.util.Objects.equals(images, that.images)) return false; + if (!java.util.Objects.equals(nodeInfo, that.nodeInfo)) return false; + if (!java.util.Objects.equals(phase, that.phase)) return false; + if (!java.util.Objects.equals(volumesAttached, that.volumesAttached)) return false; + if (!java.util.Objects.equals(volumesInUse, that.volumesInUse)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(addresses, allocatable, capacity, conditions, config, daemonEndpoints, images, nodeInfo, phase, volumesAttached, volumesInUse, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (addresses != null && !addresses.isEmpty()) { sb.append("addresses:"); sb.append(addresses + ","); } + if (allocatable != null && !allocatable.isEmpty()) { sb.append("allocatable:"); sb.append(allocatable + ","); } + if (capacity != null && !capacity.isEmpty()) { sb.append("capacity:"); sb.append(capacity + ","); } + if (conditions != null && !conditions.isEmpty()) { sb.append("conditions:"); sb.append(conditions + ","); } + if (config != null) { sb.append("config:"); sb.append(config + ","); } + if (daemonEndpoints != null) { sb.append("daemonEndpoints:"); sb.append(daemonEndpoints + ","); } + if (images != null && !images.isEmpty()) { sb.append("images:"); sb.append(images + ","); } + if (nodeInfo != null) { sb.append("nodeInfo:"); sb.append(nodeInfo + ","); } + if (phase != null) { sb.append("phase:"); sb.append(phase + ","); } + if (volumesAttached != null && !volumesAttached.isEmpty()) { sb.append("volumesAttached:"); sb.append(volumesAttached + ","); } + if (volumesInUse != null && !volumesInUse.isEmpty()) { sb.append("volumesInUse:"); sb.append(volumesInUse); } + sb.append("}"); + return sb.toString(); + } + public class AddressesNested extends V1NodeAddressFluent> implements Nested{ + AddressesNested(int index,V1NodeAddress item) { + this.index = index; + this.builder = new V1NodeAddressBuilder(this, item); + } + V1NodeAddressBuilder builder; + int index; + + public N and() { + return (N) V1NodeStatusFluent.this.setToAddresses(index,builder.build()); + } + + public N endAddress() { + return and(); + } + } - public interface ConfigNested extends Nested,V1NodeConfigStatusFluent>{ - public N and(); - public N endConfig(); + public class ConditionsNested extends V1NodeConditionFluent> implements Nested{ + ConditionsNested(int index,V1NodeCondition item) { + this.index = index; + this.builder = new V1NodeConditionBuilder(this, item); + } + V1NodeConditionBuilder builder; + int index; + + public N and() { + return (N) V1NodeStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + } - public interface DaemonEndpointsNested extends Nested,V1NodeDaemonEndpointsFluent>{ - public N and(); - public N endDaemonEndpoints(); + public class ConfigNested extends V1NodeConfigStatusFluent> implements Nested{ + ConfigNested(V1NodeConfigStatus item) { + this.builder = new V1NodeConfigStatusBuilder(this, item); + } + V1NodeConfigStatusBuilder builder; + + public N and() { + return (N) V1NodeStatusFluent.this.withConfig(builder.build()); + } + + public N endConfig() { + return and(); + } + } - public interface ImagesNested extends Nested,V1ContainerImageFluent>{ - public N and(); - public N endImage(); + public class DaemonEndpointsNested extends V1NodeDaemonEndpointsFluent> implements Nested{ + DaemonEndpointsNested(V1NodeDaemonEndpoints item) { + this.builder = new V1NodeDaemonEndpointsBuilder(this, item); + } + V1NodeDaemonEndpointsBuilder builder; + + public N and() { + return (N) V1NodeStatusFluent.this.withDaemonEndpoints(builder.build()); + } + + public N endDaemonEndpoints() { + return and(); + } + } - public interface NodeInfoNested extends Nested,V1NodeSystemInfoFluent>{ - public N and(); - public N endNodeInfo(); + public class ImagesNested extends V1ContainerImageFluent> implements Nested{ + ImagesNested(int index,V1ContainerImage item) { + this.index = index; + this.builder = new V1ContainerImageBuilder(this, item); + } + V1ContainerImageBuilder builder; + int index; + + public N and() { + return (N) V1NodeStatusFluent.this.setToImages(index,builder.build()); + } + public N endImage() { + return and(); + } + + } - public interface VolumesAttachedNested extends Nested,V1AttachedVolumeFluent>{ - public N and(); - public N endVolumesAttached(); + public class NodeInfoNested extends V1NodeSystemInfoFluent> implements Nested{ + NodeInfoNested(V1NodeSystemInfo item) { + this.builder = new V1NodeSystemInfoBuilder(this, item); + } + V1NodeSystemInfoBuilder builder; + + public N and() { + return (N) V1NodeStatusFluent.this.withNodeInfo(builder.build()); + } + public N endNodeInfo() { + return and(); + } + + } + public class VolumesAttachedNested extends V1AttachedVolumeFluent> implements Nested{ + VolumesAttachedNested(int index,V1AttachedVolume item) { + this.index = index; + this.builder = new V1AttachedVolumeBuilder(this, item); + } + V1AttachedVolumeBuilder builder; + int index; + + public N and() { + return (N) V1NodeStatusFluent.this.setToVolumesAttached(index,builder.build()); + } + + public N endVolumesAttached() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusFluentImpl.java deleted file mode 100644 index 56829561c9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeStatusFluentImpl.java +++ /dev/null @@ -1,867 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; -import java.util.Map; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.util.Iterator; -import io.kubernetes.client.custom.Quantity; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeStatusFluentImpl> extends BaseFluent implements V1NodeStatusFluent{ - public V1NodeStatusFluentImpl() { - } - public V1NodeStatusFluentImpl(V1NodeStatus instance) { - if (instance != null) { - this.withAddresses(instance.getAddresses()); - this.withAllocatable(instance.getAllocatable()); - this.withCapacity(instance.getCapacity()); - this.withConditions(instance.getConditions()); - this.withConfig(instance.getConfig()); - this.withDaemonEndpoints(instance.getDaemonEndpoints()); - this.withImages(instance.getImages()); - this.withNodeInfo(instance.getNodeInfo()); - this.withPhase(instance.getPhase()); - this.withVolumesAttached(instance.getVolumesAttached()); - this.withVolumesInUse(instance.getVolumesInUse()); - } - } - private ArrayList addresses; - private Map allocatable; - private Map capacity; - private ArrayList conditions; - private V1NodeConfigStatusBuilder config; - private V1NodeDaemonEndpointsBuilder daemonEndpoints; - private ArrayList images; - private V1NodeSystemInfoBuilder nodeInfo; - private String phase; - private ArrayList volumesAttached; - private List volumesInUse; - public A addToAddresses(int index,V1NodeAddress item) { - if (this.addresses == null) {this.addresses = new ArrayList();} - V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item); - if (index < 0 || index >= addresses.size()) { _visitables.get("addresses").add(builder); addresses.add(builder); } else { _visitables.get("addresses").add(index, builder); addresses.add(index, builder);} - return (A)this; - } - public A setToAddresses(int index,V1NodeAddress item) { - if (this.addresses == null) {this.addresses = new ArrayList();} - V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item); - if (index < 0 || index >= addresses.size()) { _visitables.get("addresses").add(builder); addresses.add(builder); } else { _visitables.get("addresses").set(index, builder); addresses.set(index, builder);} - return (A)this; - } - public A addToAddresses(io.kubernetes.client.openapi.models.V1NodeAddress... items) { - if (this.addresses == null) {this.addresses = new ArrayList();} - for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this; - } - public A addAllToAddresses(Collection items) { - if (this.addresses == null) {this.addresses = new ArrayList();} - for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").add(builder);this.addresses.add(builder);} return (A)this; - } - public A removeFromAddresses(io.kubernetes.client.openapi.models.V1NodeAddress... items) { - for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").remove(builder);if (this.addresses != null) {this.addresses.remove(builder);}} return (A)this; - } - public A removeAllFromAddresses(Collection items) { - for (V1NodeAddress item : items) {V1NodeAddressBuilder builder = new V1NodeAddressBuilder(item);_visitables.get("addresses").remove(builder);if (this.addresses != null) {this.addresses.remove(builder);}} return (A)this; - } - public A removeMatchingFromAddresses(Predicate predicate) { - if (addresses == null) return (A) this; - final Iterator each = addresses.iterator(); - final List visitables = _visitables.get("addresses"); - while (each.hasNext()) { - V1NodeAddressBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildAddresses instead. - * @return The buildable object. - */ - @Deprecated - public List getAddresses() { - return addresses != null ? build(addresses) : null; - } - public List buildAddresses() { - return addresses != null ? build(addresses) : null; - } - public V1NodeAddress buildAddress(int index) { - return this.addresses.get(index).build(); - } - public V1NodeAddress buildFirstAddress() { - return this.addresses.get(0).build(); - } - public V1NodeAddress buildLastAddress() { - return this.addresses.get(addresses.size() - 1).build(); - } - public V1NodeAddress buildMatchingAddress(Predicate predicate) { - for (V1NodeAddressBuilder item: addresses) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingAddress(Predicate predicate) { - for (V1NodeAddressBuilder item: addresses) { if(predicate.test(item)){ return true;} } return false; - } - public A withAddresses(List addresses) { - if (this.addresses != null) { _visitables.get("addresses").clear();} - if (addresses != null) {this.addresses = new ArrayList(); for (V1NodeAddress item : addresses){this.addToAddresses(item);}} else { this.addresses = null;} return (A) this; - } - public A withAddresses(io.kubernetes.client.openapi.models.V1NodeAddress... addresses) { - if (this.addresses != null) {this.addresses.clear(); _visitables.remove("addresses"); } - if (addresses != null) {for (V1NodeAddress item :addresses){ this.addToAddresses(item);}} return (A) this; - } - public Boolean hasAddresses() { - return addresses != null && !addresses.isEmpty(); - } - public V1NodeStatusFluentImpl.AddressesNested addNewAddress() { - return new V1NodeStatusFluentImpl.AddressesNestedImpl(); - } - public V1NodeStatusFluentImpl.AddressesNested addNewAddressLike(V1NodeAddress item) { - return new V1NodeStatusFluentImpl.AddressesNestedImpl(-1, item); - } - public V1NodeStatusFluentImpl.AddressesNested setNewAddressLike(int index,V1NodeAddress item) { - return new V1NodeStatusFluentImpl.AddressesNestedImpl(index, item); - } - public V1NodeStatusFluentImpl.AddressesNested editAddress(int index) { - if (addresses.size() <= index) throw new RuntimeException("Can't edit addresses. Index exceeds size."); - return setNewAddressLike(index, buildAddress(index)); - } - public V1NodeStatusFluentImpl.AddressesNested editFirstAddress() { - if (addresses.size() == 0) throw new RuntimeException("Can't edit first addresses. The list is empty."); - return setNewAddressLike(0, buildAddress(0)); - } - public V1NodeStatusFluentImpl.AddressesNested editLastAddress() { - int index = addresses.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last addresses. The list is empty."); - return setNewAddressLike(index, buildAddress(index)); - } - public V1NodeStatusFluentImpl.AddressesNested editMatchingAddress(Predicate predicate) { - int index = -1; - for (int i=0;i map) { - if(this.allocatable == null && map != null) { this.allocatable = new LinkedHashMap(); } - if(map != null) { this.allocatable.putAll(map);} return (A)this; - } - public A removeFromAllocatable(String key) { - if(this.allocatable == null) { return (A) this; } - if(key != null && this.allocatable != null) {this.allocatable.remove(key);} return (A)this; - } - public A removeFromAllocatable(Map map) { - if(this.allocatable == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.allocatable != null){this.allocatable.remove(key);}}} return (A)this; - } - public Map getAllocatable() { - return this.allocatable; - } - public A withAllocatable(Map allocatable) { - if (allocatable == null) { this.allocatable = null;} else {this.allocatable = new LinkedHashMap(allocatable);} return (A) this; - } - public Boolean hasAllocatable() { - return this.allocatable != null; - } - public A addToCapacity(String key,Quantity value) { - if(this.capacity == null && key != null && value != null) { this.capacity = new LinkedHashMap(); } - if(key != null && value != null) {this.capacity.put(key, value);} return (A)this; - } - public A addToCapacity(Map map) { - if(this.capacity == null && map != null) { this.capacity = new LinkedHashMap(); } - if(map != null) { this.capacity.putAll(map);} return (A)this; - } - public A removeFromCapacity(String key) { - if(this.capacity == null) { return (A) this; } - if(key != null && this.capacity != null) {this.capacity.remove(key);} return (A)this; - } - public A removeFromCapacity(Map map) { - if(this.capacity == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.capacity != null){this.capacity.remove(key);}}} return (A)this; - } - public Map getCapacity() { - return this.capacity; - } - public A withCapacity(Map capacity) { - if (capacity == null) { this.capacity = null;} else {this.capacity = new LinkedHashMap(capacity);} return (A) this; - } - public Boolean hasCapacity() { - return this.capacity != null; - } - public A addToConditions(int index,V1NodeCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1NodeCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1NodeCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1NodeCondition... items) { - for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1NodeCondition item : items) {V1NodeConditionBuilder builder = new V1NodeConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1NodeConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1NodeCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1NodeCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1NodeCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1NodeCondition buildMatchingCondition(Predicate predicate) { - for (V1NodeConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1NodeConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1NodeCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1NodeCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1NodeCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1NodeStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1NodeStatusFluentImpl.ConditionsNestedImpl(); - } - public V1NodeStatusFluentImpl.ConditionsNested addNewConditionLike(V1NodeCondition item) { - return new V1NodeStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1NodeStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1NodeCondition item) { - return new V1NodeStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1NodeStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1NodeStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1NodeStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1NodeStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i withNewConfig() { - return new V1NodeStatusFluentImpl.ConfigNestedImpl(); - } - public V1NodeStatusFluentImpl.ConfigNested withNewConfigLike(V1NodeConfigStatus item) { - return new V1NodeStatusFluentImpl.ConfigNestedImpl(item); - } - public V1NodeStatusFluentImpl.ConfigNested editConfig() { - return withNewConfigLike(getConfig()); - } - public V1NodeStatusFluentImpl.ConfigNested editOrNewConfig() { - return withNewConfigLike(getConfig() != null ? getConfig(): new V1NodeConfigStatusBuilder().build()); - } - public V1NodeStatusFluentImpl.ConfigNested editOrNewConfigLike(V1NodeConfigStatus item) { - return withNewConfigLike(getConfig() != null ? getConfig(): item); - } - - /** - * This method has been deprecated, please use method buildDaemonEndpoints instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeDaemonEndpoints getDaemonEndpoints() { - return this.daemonEndpoints!=null ?this.daemonEndpoints.build():null; - } - public V1NodeDaemonEndpoints buildDaemonEndpoints() { - return this.daemonEndpoints!=null ?this.daemonEndpoints.build():null; - } - public A withDaemonEndpoints(V1NodeDaemonEndpoints daemonEndpoints) { - _visitables.get("daemonEndpoints").remove(this.daemonEndpoints); - if (daemonEndpoints!=null){ this.daemonEndpoints= new V1NodeDaemonEndpointsBuilder(daemonEndpoints); _visitables.get("daemonEndpoints").add(this.daemonEndpoints);} else { this.daemonEndpoints = null; _visitables.get("daemonEndpoints").remove(this.daemonEndpoints); } return (A) this; - } - public Boolean hasDaemonEndpoints() { - return this.daemonEndpoints != null; - } - public V1NodeStatusFluentImpl.DaemonEndpointsNested withNewDaemonEndpoints() { - return new V1NodeStatusFluentImpl.DaemonEndpointsNestedImpl(); - } - public V1NodeStatusFluentImpl.DaemonEndpointsNested withNewDaemonEndpointsLike(V1NodeDaemonEndpoints item) { - return new V1NodeStatusFluentImpl.DaemonEndpointsNestedImpl(item); - } - public V1NodeStatusFluentImpl.DaemonEndpointsNested editDaemonEndpoints() { - return withNewDaemonEndpointsLike(getDaemonEndpoints()); - } - public V1NodeStatusFluentImpl.DaemonEndpointsNested editOrNewDaemonEndpoints() { - return withNewDaemonEndpointsLike(getDaemonEndpoints() != null ? getDaemonEndpoints(): new V1NodeDaemonEndpointsBuilder().build()); - } - public V1NodeStatusFluentImpl.DaemonEndpointsNested editOrNewDaemonEndpointsLike(V1NodeDaemonEndpoints item) { - return withNewDaemonEndpointsLike(getDaemonEndpoints() != null ? getDaemonEndpoints(): item); - } - public A addToImages(int index,V1ContainerImage item) { - if (this.images == null) {this.images = new ArrayList();} - V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item); - if (index < 0 || index >= images.size()) { _visitables.get("images").add(builder); images.add(builder); } else { _visitables.get("images").add(index, builder); images.add(index, builder);} - return (A)this; - } - public A setToImages(int index,V1ContainerImage item) { - if (this.images == null) {this.images = new ArrayList();} - V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item); - if (index < 0 || index >= images.size()) { _visitables.get("images").add(builder); images.add(builder); } else { _visitables.get("images").set(index, builder); images.set(index, builder);} - return (A)this; - } - public A addToImages(io.kubernetes.client.openapi.models.V1ContainerImage... items) { - if (this.images == null) {this.images = new ArrayList();} - for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").add(builder);this.images.add(builder);} return (A)this; - } - public A addAllToImages(Collection items) { - if (this.images == null) {this.images = new ArrayList();} - for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").add(builder);this.images.add(builder);} return (A)this; - } - public A removeFromImages(io.kubernetes.client.openapi.models.V1ContainerImage... items) { - for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").remove(builder);if (this.images != null) {this.images.remove(builder);}} return (A)this; - } - public A removeAllFromImages(Collection items) { - for (V1ContainerImage item : items) {V1ContainerImageBuilder builder = new V1ContainerImageBuilder(item);_visitables.get("images").remove(builder);if (this.images != null) {this.images.remove(builder);}} return (A)this; - } - public A removeMatchingFromImages(Predicate predicate) { - if (images == null) return (A) this; - final Iterator each = images.iterator(); - final List visitables = _visitables.get("images"); - while (each.hasNext()) { - V1ContainerImageBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildImages instead. - * @return The buildable object. - */ - @Deprecated - public List getImages() { - return images != null ? build(images) : null; - } - public List buildImages() { - return images != null ? build(images) : null; - } - public V1ContainerImage buildImage(int index) { - return this.images.get(index).build(); - } - public V1ContainerImage buildFirstImage() { - return this.images.get(0).build(); - } - public V1ContainerImage buildLastImage() { - return this.images.get(images.size() - 1).build(); - } - public V1ContainerImage buildMatchingImage(Predicate predicate) { - for (V1ContainerImageBuilder item: images) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingImage(Predicate predicate) { - for (V1ContainerImageBuilder item: images) { if(predicate.test(item)){ return true;} } return false; - } - public A withImages(List images) { - if (this.images != null) { _visitables.get("images").clear();} - if (images != null) {this.images = new ArrayList(); for (V1ContainerImage item : images){this.addToImages(item);}} else { this.images = null;} return (A) this; - } - public A withImages(io.kubernetes.client.openapi.models.V1ContainerImage... images) { - if (this.images != null) {this.images.clear(); _visitables.remove("images"); } - if (images != null) {for (V1ContainerImage item :images){ this.addToImages(item);}} return (A) this; - } - public Boolean hasImages() { - return images != null && !images.isEmpty(); - } - public V1NodeStatusFluentImpl.ImagesNested addNewImage() { - return new V1NodeStatusFluentImpl.ImagesNestedImpl(); - } - public V1NodeStatusFluentImpl.ImagesNested addNewImageLike(V1ContainerImage item) { - return new V1NodeStatusFluentImpl.ImagesNestedImpl(-1, item); - } - public V1NodeStatusFluentImpl.ImagesNested setNewImageLike(int index,V1ContainerImage item) { - return new V1NodeStatusFluentImpl.ImagesNestedImpl(index, item); - } - public V1NodeStatusFluentImpl.ImagesNested editImage(int index) { - if (images.size() <= index) throw new RuntimeException("Can't edit images. Index exceeds size."); - return setNewImageLike(index, buildImage(index)); - } - public V1NodeStatusFluentImpl.ImagesNested editFirstImage() { - if (images.size() == 0) throw new RuntimeException("Can't edit first images. The list is empty."); - return setNewImageLike(0, buildImage(0)); - } - public V1NodeStatusFluentImpl.ImagesNested editLastImage() { - int index = images.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last images. The list is empty."); - return setNewImageLike(index, buildImage(index)); - } - public V1NodeStatusFluentImpl.ImagesNested editMatchingImage(Predicate predicate) { - int index = -1; - for (int i=0;i withNewNodeInfo() { - return new V1NodeStatusFluentImpl.NodeInfoNestedImpl(); - } - public V1NodeStatusFluentImpl.NodeInfoNested withNewNodeInfoLike(V1NodeSystemInfo item) { - return new V1NodeStatusFluentImpl.NodeInfoNestedImpl(item); - } - public V1NodeStatusFluentImpl.NodeInfoNested editNodeInfo() { - return withNewNodeInfoLike(getNodeInfo()); - } - public V1NodeStatusFluentImpl.NodeInfoNested editOrNewNodeInfo() { - return withNewNodeInfoLike(getNodeInfo() != null ? getNodeInfo(): new V1NodeSystemInfoBuilder().build()); - } - public V1NodeStatusFluentImpl.NodeInfoNested editOrNewNodeInfoLike(V1NodeSystemInfo item) { - return withNewNodeInfoLike(getNodeInfo() != null ? getNodeInfo(): item); - } - public String getPhase() { - return this.phase; - } - public A withPhase(String phase) { - this.phase=phase; return (A) this; - } - public Boolean hasPhase() { - return this.phase != null; - } - public A addToVolumesAttached(int index,V1AttachedVolume item) { - if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();} - V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item); - if (index < 0 || index >= volumesAttached.size()) { _visitables.get("volumesAttached").add(builder); volumesAttached.add(builder); } else { _visitables.get("volumesAttached").add(index, builder); volumesAttached.add(index, builder);} - return (A)this; - } - public A setToVolumesAttached(int index,V1AttachedVolume item) { - if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();} - V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item); - if (index < 0 || index >= volumesAttached.size()) { _visitables.get("volumesAttached").add(builder); volumesAttached.add(builder); } else { _visitables.get("volumesAttached").set(index, builder); volumesAttached.set(index, builder);} - return (A)this; - } - public A addToVolumesAttached(io.kubernetes.client.openapi.models.V1AttachedVolume... items) { - if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();} - for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").add(builder);this.volumesAttached.add(builder);} return (A)this; - } - public A addAllToVolumesAttached(Collection items) { - if (this.volumesAttached == null) {this.volumesAttached = new ArrayList();} - for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").add(builder);this.volumesAttached.add(builder);} return (A)this; - } - public A removeFromVolumesAttached(io.kubernetes.client.openapi.models.V1AttachedVolume... items) { - for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").remove(builder);if (this.volumesAttached != null) {this.volumesAttached.remove(builder);}} return (A)this; - } - public A removeAllFromVolumesAttached(Collection items) { - for (V1AttachedVolume item : items) {V1AttachedVolumeBuilder builder = new V1AttachedVolumeBuilder(item);_visitables.get("volumesAttached").remove(builder);if (this.volumesAttached != null) {this.volumesAttached.remove(builder);}} return (A)this; - } - public A removeMatchingFromVolumesAttached(Predicate predicate) { - if (volumesAttached == null) return (A) this; - final Iterator each = volumesAttached.iterator(); - final List visitables = _visitables.get("volumesAttached"); - while (each.hasNext()) { - V1AttachedVolumeBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildVolumesAttached instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumesAttached() { - return volumesAttached != null ? build(volumesAttached) : null; - } - public List buildVolumesAttached() { - return volumesAttached != null ? build(volumesAttached) : null; - } - public V1AttachedVolume buildVolumesAttached(int index) { - return this.volumesAttached.get(index).build(); - } - public V1AttachedVolume buildFirstVolumesAttached() { - return this.volumesAttached.get(0).build(); - } - public V1AttachedVolume buildLastVolumesAttached() { - return this.volumesAttached.get(volumesAttached.size() - 1).build(); - } - public V1AttachedVolume buildMatchingVolumesAttached(Predicate predicate) { - for (V1AttachedVolumeBuilder item: volumesAttached) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingVolumesAttached(Predicate predicate) { - for (V1AttachedVolumeBuilder item: volumesAttached) { if(predicate.test(item)){ return true;} } return false; - } - public A withVolumesAttached(List volumesAttached) { - if (this.volumesAttached != null) { _visitables.get("volumesAttached").clear();} - if (volumesAttached != null) {this.volumesAttached = new ArrayList(); for (V1AttachedVolume item : volumesAttached){this.addToVolumesAttached(item);}} else { this.volumesAttached = null;} return (A) this; - } - public A withVolumesAttached(io.kubernetes.client.openapi.models.V1AttachedVolume... volumesAttached) { - if (this.volumesAttached != null) {this.volumesAttached.clear(); _visitables.remove("volumesAttached"); } - if (volumesAttached != null) {for (V1AttachedVolume item :volumesAttached){ this.addToVolumesAttached(item);}} return (A) this; - } - public Boolean hasVolumesAttached() { - return volumesAttached != null && !volumesAttached.isEmpty(); - } - public V1NodeStatusFluentImpl.VolumesAttachedNested addNewVolumesAttached() { - return new V1NodeStatusFluentImpl.VolumesAttachedNestedImpl(); - } - public V1NodeStatusFluentImpl.VolumesAttachedNested addNewVolumesAttachedLike(V1AttachedVolume item) { - return new V1NodeStatusFluentImpl.VolumesAttachedNestedImpl(-1, item); - } - public V1NodeStatusFluentImpl.VolumesAttachedNested setNewVolumesAttachedLike(int index,V1AttachedVolume item) { - return new V1NodeStatusFluentImpl.VolumesAttachedNestedImpl(index, item); - } - public V1NodeStatusFluentImpl.VolumesAttachedNested editVolumesAttached(int index) { - if (volumesAttached.size() <= index) throw new RuntimeException("Can't edit volumesAttached. Index exceeds size."); - return setNewVolumesAttachedLike(index, buildVolumesAttached(index)); - } - public V1NodeStatusFluentImpl.VolumesAttachedNested editFirstVolumesAttached() { - if (volumesAttached.size() == 0) throw new RuntimeException("Can't edit first volumesAttached. The list is empty."); - return setNewVolumesAttachedLike(0, buildVolumesAttached(0)); - } - public V1NodeStatusFluentImpl.VolumesAttachedNested editLastVolumesAttached() { - int index = volumesAttached.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last volumesAttached. The list is empty."); - return setNewVolumesAttachedLike(index, buildVolumesAttached(index)); - } - public V1NodeStatusFluentImpl.VolumesAttachedNested editMatchingVolumesAttached(Predicate predicate) { - int index = -1; - for (int i=0;i();} - this.volumesInUse.add(index, item); - return (A)this; - } - public A setToVolumesInUse(int index,String item) { - if (this.volumesInUse == null) {this.volumesInUse = new ArrayList();} - this.volumesInUse.set(index, item); return (A)this; - } - public A addToVolumesInUse(java.lang.String... items) { - if (this.volumesInUse == null) {this.volumesInUse = new ArrayList();} - for (String item : items) {this.volumesInUse.add(item);} return (A)this; - } - public A addAllToVolumesInUse(Collection items) { - if (this.volumesInUse == null) {this.volumesInUse = new ArrayList();} - for (String item : items) {this.volumesInUse.add(item);} return (A)this; - } - public A removeFromVolumesInUse(java.lang.String... items) { - for (String item : items) {if (this.volumesInUse!= null){ this.volumesInUse.remove(item);}} return (A)this; - } - public A removeAllFromVolumesInUse(Collection items) { - for (String item : items) {if (this.volumesInUse!= null){ this.volumesInUse.remove(item);}} return (A)this; - } - public List getVolumesInUse() { - return this.volumesInUse; - } - public String getVolumesInUse(int index) { - return this.volumesInUse.get(index); - } - public String getFirstVolumesInUse() { - return this.volumesInUse.get(0); - } - public String getLastVolumesInUse() { - return this.volumesInUse.get(volumesInUse.size() - 1); - } - public String getMatchingVolumesInUse(Predicate predicate) { - for (String item: volumesInUse) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVolumesInUse(Predicate predicate) { - for (String item: volumesInUse) { if(predicate.test(item)){ return true;} } return false; - } - public A withVolumesInUse(List volumesInUse) { - if (volumesInUse != null) {this.volumesInUse = new ArrayList(); for (String item : volumesInUse){this.addToVolumesInUse(item);}} else { this.volumesInUse = null;} return (A) this; - } - public A withVolumesInUse(java.lang.String... volumesInUse) { - if (this.volumesInUse != null) {this.volumesInUse.clear(); _visitables.remove("volumesInUse"); } - if (volumesInUse != null) {for (String item :volumesInUse){ this.addToVolumesInUse(item);}} return (A) this; - } - public Boolean hasVolumesInUse() { - return volumesInUse != null && !volumesInUse.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeStatusFluentImpl that = (V1NodeStatusFluentImpl) o; - if (!java.util.Objects.equals(addresses, that.addresses)) return false; - - if (!java.util.Objects.equals(allocatable, that.allocatable)) return false; - - if (!java.util.Objects.equals(capacity, that.capacity)) return false; - - if (!java.util.Objects.equals(conditions, that.conditions)) return false; - - if (!java.util.Objects.equals(config, that.config)) return false; - - if (!java.util.Objects.equals(daemonEndpoints, that.daemonEndpoints)) return false; - - if (!java.util.Objects.equals(images, that.images)) return false; - - if (!java.util.Objects.equals(nodeInfo, that.nodeInfo)) return false; - - if (!java.util.Objects.equals(phase, that.phase)) return false; - - if (!java.util.Objects.equals(volumesAttached, that.volumesAttached)) return false; - - if (!java.util.Objects.equals(volumesInUse, that.volumesInUse)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(addresses, allocatable, capacity, conditions, config, daemonEndpoints, images, nodeInfo, phase, volumesAttached, volumesInUse, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (addresses != null) { sb.append("addresses:"); sb.append(addresses + ","); } - if (allocatable != null && !allocatable.isEmpty()) { sb.append("allocatable:"); sb.append(allocatable + ","); } - if (capacity != null && !capacity.isEmpty()) { sb.append("capacity:"); sb.append(capacity + ","); } - if (conditions != null) { sb.append("conditions:"); sb.append(conditions + ","); } - if (config != null) { sb.append("config:"); sb.append(config + ","); } - if (daemonEndpoints != null) { sb.append("daemonEndpoints:"); sb.append(daemonEndpoints + ","); } - if (images != null) { sb.append("images:"); sb.append(images + ","); } - if (nodeInfo != null) { sb.append("nodeInfo:"); sb.append(nodeInfo + ","); } - if (phase != null) { sb.append("phase:"); sb.append(phase + ","); } - if (volumesAttached != null) { sb.append("volumesAttached:"); sb.append(volumesAttached + ","); } - if (volumesInUse != null && !volumesInUse.isEmpty()) { sb.append("volumesInUse:"); sb.append(volumesInUse); } - sb.append("}"); - return sb.toString(); - } - class AddressesNestedImpl extends V1NodeAddressFluentImpl> implements V1NodeStatusFluentImpl.AddressesNested,Nested{ - AddressesNestedImpl(int index,V1NodeAddress item) { - this.index = index; - this.builder = new V1NodeAddressBuilder(this, item); - } - AddressesNestedImpl() { - this.index = -1; - this.builder = new V1NodeAddressBuilder(this); - } - V1NodeAddressBuilder builder; - int index; - public N and() { - return (N) V1NodeStatusFluentImpl.this.setToAddresses(index,builder.build()); - } - public N endAddress() { - return and(); - } - - } - class ConditionsNestedImpl extends V1NodeConditionFluentImpl> implements V1NodeStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1NodeCondition item) { - this.index = index; - this.builder = new V1NodeConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1NodeConditionBuilder(this); - } - V1NodeConditionBuilder builder; - int index; - public N and() { - return (N) V1NodeStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - class ConfigNestedImpl extends V1NodeConfigStatusFluentImpl> implements V1NodeStatusFluentImpl.ConfigNested,Nested{ - ConfigNestedImpl(V1NodeConfigStatus item) { - this.builder = new V1NodeConfigStatusBuilder(this, item); - } - ConfigNestedImpl() { - this.builder = new V1NodeConfigStatusBuilder(this); - } - V1NodeConfigStatusBuilder builder; - public N and() { - return (N) V1NodeStatusFluentImpl.this.withConfig(builder.build()); - } - public N endConfig() { - return and(); - } - - } - class DaemonEndpointsNestedImpl extends V1NodeDaemonEndpointsFluentImpl> implements V1NodeStatusFluentImpl.DaemonEndpointsNested,Nested{ - DaemonEndpointsNestedImpl(V1NodeDaemonEndpoints item) { - this.builder = new V1NodeDaemonEndpointsBuilder(this, item); - } - DaemonEndpointsNestedImpl() { - this.builder = new V1NodeDaemonEndpointsBuilder(this); - } - V1NodeDaemonEndpointsBuilder builder; - public N and() { - return (N) V1NodeStatusFluentImpl.this.withDaemonEndpoints(builder.build()); - } - public N endDaemonEndpoints() { - return and(); - } - - } - class ImagesNestedImpl extends V1ContainerImageFluentImpl> implements V1NodeStatusFluentImpl.ImagesNested,Nested{ - ImagesNestedImpl(int index,V1ContainerImage item) { - this.index = index; - this.builder = new V1ContainerImageBuilder(this, item); - } - ImagesNestedImpl() { - this.index = -1; - this.builder = new V1ContainerImageBuilder(this); - } - V1ContainerImageBuilder builder; - int index; - public N and() { - return (N) V1NodeStatusFluentImpl.this.setToImages(index,builder.build()); - } - public N endImage() { - return and(); - } - - } - class NodeInfoNestedImpl extends V1NodeSystemInfoFluentImpl> implements V1NodeStatusFluentImpl.NodeInfoNested,Nested{ - NodeInfoNestedImpl(V1NodeSystemInfo item) { - this.builder = new V1NodeSystemInfoBuilder(this, item); - } - NodeInfoNestedImpl() { - this.builder = new V1NodeSystemInfoBuilder(this); - } - V1NodeSystemInfoBuilder builder; - public N and() { - return (N) V1NodeStatusFluentImpl.this.withNodeInfo(builder.build()); - } - public N endNodeInfo() { - return and(); - } - - } - class VolumesAttachedNestedImpl extends V1AttachedVolumeFluentImpl> implements V1NodeStatusFluentImpl.VolumesAttachedNested,Nested{ - VolumesAttachedNestedImpl(int index,V1AttachedVolume item) { - this.index = index; - this.builder = new V1AttachedVolumeBuilder(this, item); - } - VolumesAttachedNestedImpl() { - this.index = -1; - this.builder = new V1AttachedVolumeBuilder(this); - } - V1AttachedVolumeBuilder builder; - int index; - public N and() { - return (N) V1NodeStatusFluentImpl.this.setToVolumesAttached(index,builder.build()); - } - public N endVolumesAttached() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoBuilder.java index bdeda3c301..f3b2873617 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoBuilder.java @@ -1,60 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NodeSystemInfoBuilder extends V1NodeSystemInfoFluentImpl implements VisitableBuilder{ +public class V1NodeSystemInfoBuilder extends V1NodeSystemInfoFluent implements VisitableBuilder{ public V1NodeSystemInfoBuilder() { - this(false); - } - public V1NodeSystemInfoBuilder(Boolean validationEnabled) { - this(new V1NodeSystemInfo(), validationEnabled); + this(new V1NodeSystemInfo()); } + public V1NodeSystemInfoBuilder(V1NodeSystemInfoFluent fluent) { - this(fluent, false); - } - public V1NodeSystemInfoBuilder(V1NodeSystemInfoFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NodeSystemInfo(), validationEnabled); + this(fluent, new V1NodeSystemInfo()); } + public V1NodeSystemInfoBuilder(V1NodeSystemInfoFluent fluent,V1NodeSystemInfo instance) { - this(fluent, instance, false); - } - public V1NodeSystemInfoBuilder(V1NodeSystemInfoFluent fluent,V1NodeSystemInfo instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withArchitecture(instance.getArchitecture()); - fluent.withBootID(instance.getBootID()); - fluent.withContainerRuntimeVersion(instance.getContainerRuntimeVersion()); - fluent.withKernelVersion(instance.getKernelVersion()); - fluent.withKubeProxyVersion(instance.getKubeProxyVersion()); - fluent.withKubeletVersion(instance.getKubeletVersion()); - fluent.withMachineID(instance.getMachineID()); - fluent.withOperatingSystem(instance.getOperatingSystem()); - fluent.withOsImage(instance.getOsImage()); - fluent.withSystemUUID(instance.getSystemUUID()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NodeSystemInfoBuilder(V1NodeSystemInfo instance) { - this(instance,false); - } - public V1NodeSystemInfoBuilder(V1NodeSystemInfo instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withArchitecture(instance.getArchitecture()); - this.withBootID(instance.getBootID()); - this.withContainerRuntimeVersion(instance.getContainerRuntimeVersion()); - this.withKernelVersion(instance.getKernelVersion()); - this.withKubeProxyVersion(instance.getKubeProxyVersion()); - this.withKubeletVersion(instance.getKubeletVersion()); - this.withMachineID(instance.getMachineID()); - this.withOperatingSystem(instance.getOperatingSystem()); - this.withOsImage(instance.getOsImage()); - this.withSystemUUID(instance.getSystemUUID()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NodeSystemInfoFluent fluent; - Boolean validationEnabled; + public V1NodeSystemInfo build() { V1NodeSystemInfo buildable = new V1NodeSystemInfo(); buildable.setArchitecture(fluent.getArchitecture()); @@ -70,4 +36,5 @@ public V1NodeSystemInfo build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoFluent.java index 5a13d0a72a..5b3cae2927 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoFluent.java @@ -1,43 +1,216 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NodeSystemInfoFluent> extends Fluent{ - public String getArchitecture(); - public A withArchitecture(String architecture); - public Boolean hasArchitecture(); - public String getBootID(); - public A withBootID(String bootID); - public Boolean hasBootID(); - public String getContainerRuntimeVersion(); - public A withContainerRuntimeVersion(String containerRuntimeVersion); - public Boolean hasContainerRuntimeVersion(); - public String getKernelVersion(); - public A withKernelVersion(String kernelVersion); - public Boolean hasKernelVersion(); - public String getKubeProxyVersion(); - public A withKubeProxyVersion(String kubeProxyVersion); - public Boolean hasKubeProxyVersion(); - public String getKubeletVersion(); - public A withKubeletVersion(String kubeletVersion); - public Boolean hasKubeletVersion(); - public String getMachineID(); - public A withMachineID(String machineID); - public Boolean hasMachineID(); - public String getOperatingSystem(); - public A withOperatingSystem(String operatingSystem); - public Boolean hasOperatingSystem(); - public String getOsImage(); - public A withOsImage(String osImage); - public Boolean hasOsImage(); - public String getSystemUUID(); - public A withSystemUUID(String systemUUID); - public Boolean hasSystemUUID(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NodeSystemInfoFluent> extends BaseFluent{ + public V1NodeSystemInfoFluent() { + } + public V1NodeSystemInfoFluent(V1NodeSystemInfo instance) { + this.copyInstance(instance); + } + private String architecture; + private String bootID; + private String containerRuntimeVersion; + private String kernelVersion; + private String kubeProxyVersion; + private String kubeletVersion; + private String machineID; + private String operatingSystem; + private String osImage; + private String systemUUID; + + protected void copyInstance(V1NodeSystemInfo instance) { + instance = (instance != null ? instance : new V1NodeSystemInfo()); + if (instance != null) { + this.withArchitecture(instance.getArchitecture()); + this.withBootID(instance.getBootID()); + this.withContainerRuntimeVersion(instance.getContainerRuntimeVersion()); + this.withKernelVersion(instance.getKernelVersion()); + this.withKubeProxyVersion(instance.getKubeProxyVersion()); + this.withKubeletVersion(instance.getKubeletVersion()); + this.withMachineID(instance.getMachineID()); + this.withOperatingSystem(instance.getOperatingSystem()); + this.withOsImage(instance.getOsImage()); + this.withSystemUUID(instance.getSystemUUID()); + } + } + + public String getArchitecture() { + return this.architecture; + } + + public A withArchitecture(String architecture) { + this.architecture = architecture; + return (A) this; + } + + public boolean hasArchitecture() { + return this.architecture != null; + } + + public String getBootID() { + return this.bootID; + } + + public A withBootID(String bootID) { + this.bootID = bootID; + return (A) this; + } + + public boolean hasBootID() { + return this.bootID != null; + } + + public String getContainerRuntimeVersion() { + return this.containerRuntimeVersion; + } + + public A withContainerRuntimeVersion(String containerRuntimeVersion) { + this.containerRuntimeVersion = containerRuntimeVersion; + return (A) this; + } + + public boolean hasContainerRuntimeVersion() { + return this.containerRuntimeVersion != null; + } + + public String getKernelVersion() { + return this.kernelVersion; + } + + public A withKernelVersion(String kernelVersion) { + this.kernelVersion = kernelVersion; + return (A) this; + } + + public boolean hasKernelVersion() { + return this.kernelVersion != null; + } + + public String getKubeProxyVersion() { + return this.kubeProxyVersion; + } + + public A withKubeProxyVersion(String kubeProxyVersion) { + this.kubeProxyVersion = kubeProxyVersion; + return (A) this; + } + + public boolean hasKubeProxyVersion() { + return this.kubeProxyVersion != null; + } + + public String getKubeletVersion() { + return this.kubeletVersion; + } + + public A withKubeletVersion(String kubeletVersion) { + this.kubeletVersion = kubeletVersion; + return (A) this; + } + + public boolean hasKubeletVersion() { + return this.kubeletVersion != null; + } + + public String getMachineID() { + return this.machineID; + } + + public A withMachineID(String machineID) { + this.machineID = machineID; + return (A) this; + } + + public boolean hasMachineID() { + return this.machineID != null; + } + + public String getOperatingSystem() { + return this.operatingSystem; + } + + public A withOperatingSystem(String operatingSystem) { + this.operatingSystem = operatingSystem; + return (A) this; + } + + public boolean hasOperatingSystem() { + return this.operatingSystem != null; + } + + public String getOsImage() { + return this.osImage; + } + + public A withOsImage(String osImage) { + this.osImage = osImage; + return (A) this; + } + + public boolean hasOsImage() { + return this.osImage != null; + } + + public String getSystemUUID() { + return this.systemUUID; + } + + public A withSystemUUID(String systemUUID) { + this.systemUUID = systemUUID; + return (A) this; + } + + public boolean hasSystemUUID() { + return this.systemUUID != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NodeSystemInfoFluent that = (V1NodeSystemInfoFluent) o; + if (!java.util.Objects.equals(architecture, that.architecture)) return false; + if (!java.util.Objects.equals(bootID, that.bootID)) return false; + if (!java.util.Objects.equals(containerRuntimeVersion, that.containerRuntimeVersion)) return false; + if (!java.util.Objects.equals(kernelVersion, that.kernelVersion)) return false; + if (!java.util.Objects.equals(kubeProxyVersion, that.kubeProxyVersion)) return false; + if (!java.util.Objects.equals(kubeletVersion, that.kubeletVersion)) return false; + if (!java.util.Objects.equals(machineID, that.machineID)) return false; + if (!java.util.Objects.equals(operatingSystem, that.operatingSystem)) return false; + if (!java.util.Objects.equals(osImage, that.osImage)) return false; + if (!java.util.Objects.equals(systemUUID, that.systemUUID)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(architecture, bootID, containerRuntimeVersion, kernelVersion, kubeProxyVersion, kubeletVersion, machineID, operatingSystem, osImage, systemUUID, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (architecture != null) { sb.append("architecture:"); sb.append(architecture + ","); } + if (bootID != null) { sb.append("bootID:"); sb.append(bootID + ","); } + if (containerRuntimeVersion != null) { sb.append("containerRuntimeVersion:"); sb.append(containerRuntimeVersion + ","); } + if (kernelVersion != null) { sb.append("kernelVersion:"); sb.append(kernelVersion + ","); } + if (kubeProxyVersion != null) { sb.append("kubeProxyVersion:"); sb.append(kubeProxyVersion + ","); } + if (kubeletVersion != null) { sb.append("kubeletVersion:"); sb.append(kubeletVersion + ","); } + if (machineID != null) { sb.append("machineID:"); sb.append(machineID + ","); } + if (operatingSystem != null) { sb.append("operatingSystem:"); sb.append(operatingSystem + ","); } + if (osImage != null) { sb.append("osImage:"); sb.append(osImage + ","); } + if (systemUUID != null) { sb.append("systemUUID:"); sb.append(systemUUID); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoFluentImpl.java deleted file mode 100644 index a5fca564e4..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NodeSystemInfoFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NodeSystemInfoFluentImpl> extends BaseFluent implements V1NodeSystemInfoFluent{ - public V1NodeSystemInfoFluentImpl() { - } - public V1NodeSystemInfoFluentImpl(V1NodeSystemInfo instance) { - if (instance != null) { - this.withArchitecture(instance.getArchitecture()); - this.withBootID(instance.getBootID()); - this.withContainerRuntimeVersion(instance.getContainerRuntimeVersion()); - this.withKernelVersion(instance.getKernelVersion()); - this.withKubeProxyVersion(instance.getKubeProxyVersion()); - this.withKubeletVersion(instance.getKubeletVersion()); - this.withMachineID(instance.getMachineID()); - this.withOperatingSystem(instance.getOperatingSystem()); - this.withOsImage(instance.getOsImage()); - this.withSystemUUID(instance.getSystemUUID()); - } - } - private String architecture; - private String bootID; - private String containerRuntimeVersion; - private String kernelVersion; - private String kubeProxyVersion; - private String kubeletVersion; - private String machineID; - private String operatingSystem; - private String osImage; - private String systemUUID; - public String getArchitecture() { - return this.architecture; - } - public A withArchitecture(String architecture) { - this.architecture=architecture; return (A) this; - } - public Boolean hasArchitecture() { - return this.architecture != null; - } - public String getBootID() { - return this.bootID; - } - public A withBootID(String bootID) { - this.bootID=bootID; return (A) this; - } - public Boolean hasBootID() { - return this.bootID != null; - } - public String getContainerRuntimeVersion() { - return this.containerRuntimeVersion; - } - public A withContainerRuntimeVersion(String containerRuntimeVersion) { - this.containerRuntimeVersion=containerRuntimeVersion; return (A) this; - } - public Boolean hasContainerRuntimeVersion() { - return this.containerRuntimeVersion != null; - } - public String getKernelVersion() { - return this.kernelVersion; - } - public A withKernelVersion(String kernelVersion) { - this.kernelVersion=kernelVersion; return (A) this; - } - public Boolean hasKernelVersion() { - return this.kernelVersion != null; - } - public String getKubeProxyVersion() { - return this.kubeProxyVersion; - } - public A withKubeProxyVersion(String kubeProxyVersion) { - this.kubeProxyVersion=kubeProxyVersion; return (A) this; - } - public Boolean hasKubeProxyVersion() { - return this.kubeProxyVersion != null; - } - public String getKubeletVersion() { - return this.kubeletVersion; - } - public A withKubeletVersion(String kubeletVersion) { - this.kubeletVersion=kubeletVersion; return (A) this; - } - public Boolean hasKubeletVersion() { - return this.kubeletVersion != null; - } - public String getMachineID() { - return this.machineID; - } - public A withMachineID(String machineID) { - this.machineID=machineID; return (A) this; - } - public Boolean hasMachineID() { - return this.machineID != null; - } - public String getOperatingSystem() { - return this.operatingSystem; - } - public A withOperatingSystem(String operatingSystem) { - this.operatingSystem=operatingSystem; return (A) this; - } - public Boolean hasOperatingSystem() { - return this.operatingSystem != null; - } - public String getOsImage() { - return this.osImage; - } - public A withOsImage(String osImage) { - this.osImage=osImage; return (A) this; - } - public Boolean hasOsImage() { - return this.osImage != null; - } - public String getSystemUUID() { - return this.systemUUID; - } - public A withSystemUUID(String systemUUID) { - this.systemUUID=systemUUID; return (A) this; - } - public Boolean hasSystemUUID() { - return this.systemUUID != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NodeSystemInfoFluentImpl that = (V1NodeSystemInfoFluentImpl) o; - if (!java.util.Objects.equals(architecture, that.architecture)) return false; - - if (!java.util.Objects.equals(bootID, that.bootID)) return false; - - if (!java.util.Objects.equals(containerRuntimeVersion, that.containerRuntimeVersion)) return false; - - if (!java.util.Objects.equals(kernelVersion, that.kernelVersion)) return false; - - if (!java.util.Objects.equals(kubeProxyVersion, that.kubeProxyVersion)) return false; - - if (!java.util.Objects.equals(kubeletVersion, that.kubeletVersion)) return false; - - if (!java.util.Objects.equals(machineID, that.machineID)) return false; - - if (!java.util.Objects.equals(operatingSystem, that.operatingSystem)) return false; - - if (!java.util.Objects.equals(osImage, that.osImage)) return false; - - if (!java.util.Objects.equals(systemUUID, that.systemUUID)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(architecture, bootID, containerRuntimeVersion, kernelVersion, kubeProxyVersion, kubeletVersion, machineID, operatingSystem, osImage, systemUUID, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (architecture != null) { sb.append("architecture:"); sb.append(architecture + ","); } - if (bootID != null) { sb.append("bootID:"); sb.append(bootID + ","); } - if (containerRuntimeVersion != null) { sb.append("containerRuntimeVersion:"); sb.append(containerRuntimeVersion + ","); } - if (kernelVersion != null) { sb.append("kernelVersion:"); sb.append(kernelVersion + ","); } - if (kubeProxyVersion != null) { sb.append("kubeProxyVersion:"); sb.append(kubeProxyVersion + ","); } - if (kubeletVersion != null) { sb.append("kubeletVersion:"); sb.append(kubeletVersion + ","); } - if (machineID != null) { sb.append("machineID:"); sb.append(machineID + ","); } - if (operatingSystem != null) { sb.append("operatingSystem:"); sb.append(operatingSystem + ","); } - if (osImage != null) { sb.append("osImage:"); sb.append(osImage + ","); } - if (systemUUID != null) { sb.append("systemUUID:"); sb.append(systemUUID); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesBuilder.java index f8894b8ca9..907aae7433 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NonResourceAttributesBuilder extends V1NonResourceAttributesFluentImpl implements VisitableBuilder{ +public class V1NonResourceAttributesBuilder extends V1NonResourceAttributesFluent implements VisitableBuilder{ public V1NonResourceAttributesBuilder() { - this(false); - } - public V1NonResourceAttributesBuilder(Boolean validationEnabled) { - this(new V1NonResourceAttributes(), validationEnabled); + this(new V1NonResourceAttributes()); } + public V1NonResourceAttributesBuilder(V1NonResourceAttributesFluent fluent) { - this(fluent, false); - } - public V1NonResourceAttributesBuilder(V1NonResourceAttributesFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NonResourceAttributes(), validationEnabled); + this(fluent, new V1NonResourceAttributes()); } + public V1NonResourceAttributesBuilder(V1NonResourceAttributesFluent fluent,V1NonResourceAttributes instance) { - this(fluent, instance, false); - } - public V1NonResourceAttributesBuilder(V1NonResourceAttributesFluent fluent,V1NonResourceAttributes instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPath(instance.getPath()); - fluent.withVerb(instance.getVerb()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NonResourceAttributesBuilder(V1NonResourceAttributes instance) { - this(instance,false); - } - public V1NonResourceAttributesBuilder(V1NonResourceAttributes instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPath(instance.getPath()); - this.withVerb(instance.getVerb()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NonResourceAttributesFluent fluent; - Boolean validationEnabled; + public V1NonResourceAttributes build() { V1NonResourceAttributes buildable = new V1NonResourceAttributes(); buildable.setPath(fluent.getPath()); @@ -46,4 +28,5 @@ public V1NonResourceAttributes build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesFluent.java index f82407c53c..76a19ecdef 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1NonResourceAttributesFluent> extends Fluent{ - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); - public String getVerb(); - public A withVerb(String verb); - public Boolean hasVerb(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NonResourceAttributesFluent> extends BaseFluent{ + public V1NonResourceAttributesFluent() { + } + public V1NonResourceAttributesFluent(V1NonResourceAttributes instance) { + this.copyInstance(instance); + } + private String path; + private String verb; + + protected void copyInstance(V1NonResourceAttributes instance) { + instance = (instance != null ? instance : new V1NonResourceAttributes()); + if (instance != null) { + this.withPath(instance.getPath()); + this.withVerb(instance.getVerb()); + } + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public String getVerb() { + return this.verb; + } + + public A withVerb(String verb) { + this.verb = verb; + return (A) this; + } + + public boolean hasVerb() { + return this.verb != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NonResourceAttributesFluent that = (V1NonResourceAttributesFluent) o; + if (!java.util.Objects.equals(path, that.path)) return false; + if (!java.util.Objects.equals(verb, that.verb)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(path, verb, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (path != null) { sb.append("path:"); sb.append(path + ","); } + if (verb != null) { sb.append("verb:"); sb.append(verb); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesFluentImpl.java deleted file mode 100644 index edea7f2d56..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceAttributesFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NonResourceAttributesFluentImpl> extends BaseFluent implements V1NonResourceAttributesFluent{ - public V1NonResourceAttributesFluentImpl() { - } - public V1NonResourceAttributesFluentImpl(V1NonResourceAttributes instance) { - if (instance != null) { - this.withPath(instance.getPath()); - this.withVerb(instance.getVerb()); - } - } - private String path; - private String verb; - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public String getVerb() { - return this.verb; - } - public A withVerb(String verb) { - this.verb=verb; return (A) this; - } - public Boolean hasVerb() { - return this.verb != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NonResourceAttributesFluentImpl that = (V1NonResourceAttributesFluentImpl) o; - if (!java.util.Objects.equals(path, that.path)) return false; - - if (!java.util.Objects.equals(verb, that.verb)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(path, verb, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (path != null) { sb.append("path:"); sb.append(path + ","); } - if (verb != null) { sb.append("verb:"); sb.append(verb); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleBuilder.java index a867835d0f..a7926f2619 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1NonResourceRuleBuilder extends V1NonResourceRuleFluentImpl implements VisitableBuilder{ +public class V1NonResourceRuleBuilder extends V1NonResourceRuleFluent implements VisitableBuilder{ public V1NonResourceRuleBuilder() { - this(false); - } - public V1NonResourceRuleBuilder(Boolean validationEnabled) { - this(new V1NonResourceRule(), validationEnabled); + this(new V1NonResourceRule()); } + public V1NonResourceRuleBuilder(V1NonResourceRuleFluent fluent) { - this(fluent, false); - } - public V1NonResourceRuleBuilder(V1NonResourceRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1NonResourceRule(), validationEnabled); + this(fluent, new V1NonResourceRule()); } + public V1NonResourceRuleBuilder(V1NonResourceRuleFluent fluent,V1NonResourceRule instance) { - this(fluent, instance, false); - } - public V1NonResourceRuleBuilder(V1NonResourceRuleFluent fluent,V1NonResourceRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNonResourceURLs(instance.getNonResourceURLs()); - fluent.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1NonResourceRuleBuilder(V1NonResourceRule instance) { - this(instance,false); - } - public V1NonResourceRuleBuilder(V1NonResourceRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNonResourceURLs(instance.getNonResourceURLs()); - this.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1NonResourceRuleFluent fluent; - Boolean validationEnabled; + public V1NonResourceRule build() { V1NonResourceRule buildable = new V1NonResourceRule(); buildable.setNonResourceURLs(fluent.getNonResourceURLs()); @@ -46,4 +28,5 @@ public V1NonResourceRule build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleFluent.java index 7cdb0adaf1..263319bc4d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleFluent.java @@ -1,47 +1,246 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1NonResourceRuleFluent> extends Fluent{ - public A addToNonResourceURLs(int index,String item); - public A setToNonResourceURLs(int index,String item); - public A addToNonResourceURLs(java.lang.String... items); - public A addAllToNonResourceURLs(Collection items); - public A removeFromNonResourceURLs(java.lang.String... items); - public A removeAllFromNonResourceURLs(Collection items); - public List getNonResourceURLs(); - public String getNonResourceURL(int index); - public String getFirstNonResourceURL(); - public String getLastNonResourceURL(); - public String getMatchingNonResourceURL(Predicate predicate); - public Boolean hasMatchingNonResourceURL(Predicate predicate); - public A withNonResourceURLs(List nonResourceURLs); - public A withNonResourceURLs(java.lang.String... nonResourceURLs); - public Boolean hasNonResourceURLs(); - public A addToVerbs(int index,String item); - public A setToVerbs(int index,String item); - public A addToVerbs(java.lang.String... items); - public A addAllToVerbs(Collection items); - public A removeFromVerbs(java.lang.String... items); - public A removeAllFromVerbs(Collection items); - public List getVerbs(); - public String getVerb(int index); - public String getFirstVerb(); - public String getLastVerb(); - public String getMatchingVerb(Predicate predicate); - public Boolean hasMatchingVerb(Predicate predicate); - public A withVerbs(List verbs); - public A withVerbs(java.lang.String... verbs); - public Boolean hasVerbs(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1NonResourceRuleFluent> extends BaseFluent{ + public V1NonResourceRuleFluent() { + } + public V1NonResourceRuleFluent(V1NonResourceRule instance) { + this.copyInstance(instance); + } + private List nonResourceURLs; + private List verbs; + + protected void copyInstance(V1NonResourceRule instance) { + instance = (instance != null ? instance : new V1NonResourceRule()); + if (instance != null) { + this.withNonResourceURLs(instance.getNonResourceURLs()); + this.withVerbs(instance.getVerbs()); + } + } + + public A addToNonResourceURLs(int index,String item) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + this.nonResourceURLs.add(index, item); + return (A)this; + } + + public A setToNonResourceURLs(int index,String item) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + this.nonResourceURLs.set(index, item); return (A)this; + } + + public A addToNonResourceURLs(java.lang.String... items) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; + } + + public A addAllToNonResourceURLs(Collection items) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; + } + + public A removeFromNonResourceURLs(java.lang.String... items) { + if (this.nonResourceURLs == null) return (A)this; + for (String item : items) { this.nonResourceURLs.remove(item);} return (A)this; + } + + public A removeAllFromNonResourceURLs(Collection items) { + if (this.nonResourceURLs == null) return (A)this; + for (String item : items) { this.nonResourceURLs.remove(item);} return (A)this; + } + + public List getNonResourceURLs() { + return this.nonResourceURLs; + } + + public String getNonResourceURL(int index) { + return this.nonResourceURLs.get(index); + } + + public String getFirstNonResourceURL() { + return this.nonResourceURLs.get(0); + } + + public String getLastNonResourceURL() { + return this.nonResourceURLs.get(nonResourceURLs.size() - 1); + } + + public String getMatchingNonResourceURL(Predicate predicate) { + for (String item : nonResourceURLs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingNonResourceURL(Predicate predicate) { + for (String item : nonResourceURLs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNonResourceURLs(List nonResourceURLs) { + if (nonResourceURLs != null) { + this.nonResourceURLs = new ArrayList(); + for (String item : nonResourceURLs) { + this.addToNonResourceURLs(item); + } + } else { + this.nonResourceURLs = null; + } + return (A) this; + } + + public A withNonResourceURLs(java.lang.String... nonResourceURLs) { + if (this.nonResourceURLs != null) { + this.nonResourceURLs.clear(); + _visitables.remove("nonResourceURLs"); + } + if (nonResourceURLs != null) { + for (String item : nonResourceURLs) { + this.addToNonResourceURLs(item); + } + } + return (A) this; + } + + public boolean hasNonResourceURLs() { + return this.nonResourceURLs != null && !this.nonResourceURLs.isEmpty(); + } + + public A addToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.add(index, item); + return (A)this; + } + + public A setToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.set(index, item); return (A)this; + } + + public A addToVerbs(java.lang.String... items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A addAllToVerbs(Collection items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A removeFromVerbs(java.lang.String... items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public A removeAllFromVerbs(Collection items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public List getVerbs() { + return this.verbs; + } + + public String getVerb(int index) { + return this.verbs.get(index); + } + + public String getFirstVerb() { + return this.verbs.get(0); + } + + public String getLastVerb() { + return this.verbs.get(verbs.size() - 1); + } + + public String getMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVerbs(List verbs) { + if (verbs != null) { + this.verbs = new ArrayList(); + for (String item : verbs) { + this.addToVerbs(item); + } + } else { + this.verbs = null; + } + return (A) this; + } + + public A withVerbs(java.lang.String... verbs) { + if (this.verbs != null) { + this.verbs.clear(); + _visitables.remove("verbs"); + } + if (verbs != null) { + for (String item : verbs) { + this.addToVerbs(item); + } + } + return (A) this; + } + + public boolean hasVerbs() { + return this.verbs != null && !this.verbs.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1NonResourceRuleFluent that = (V1NonResourceRuleFluent) o; + if (!java.util.Objects.equals(nonResourceURLs, that.nonResourceURLs)) return false; + if (!java.util.Objects.equals(verbs, that.verbs)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(nonResourceURLs, verbs, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (nonResourceURLs != null && !nonResourceURLs.isEmpty()) { sb.append("nonResourceURLs:"); sb.append(nonResourceURLs + ","); } + if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleFluentImpl.java deleted file mode 100644 index 694b68c9b7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1NonResourceRuleFluentImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1NonResourceRuleFluentImpl> extends BaseFluent implements V1NonResourceRuleFluent{ - public V1NonResourceRuleFluentImpl() { - } - public V1NonResourceRuleFluentImpl(V1NonResourceRule instance) { - if (instance != null) { - this.withNonResourceURLs(instance.getNonResourceURLs()); - this.withVerbs(instance.getVerbs()); - } - } - private List nonResourceURLs; - private List verbs; - public A addToNonResourceURLs(int index,String item) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - this.nonResourceURLs.add(index, item); - return (A)this; - } - public A setToNonResourceURLs(int index,String item) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - this.nonResourceURLs.set(index, item); return (A)this; - } - public A addToNonResourceURLs(java.lang.String... items) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; - } - public A addAllToNonResourceURLs(Collection items) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; - } - public A removeFromNonResourceURLs(java.lang.String... items) { - for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this; - } - public A removeAllFromNonResourceURLs(Collection items) { - for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this; - } - public List getNonResourceURLs() { - return this.nonResourceURLs; - } - public String getNonResourceURL(int index) { - return this.nonResourceURLs.get(index); - } - public String getFirstNonResourceURL() { - return this.nonResourceURLs.get(0); - } - public String getLastNonResourceURL() { - return this.nonResourceURLs.get(nonResourceURLs.size() - 1); - } - public String getMatchingNonResourceURL(Predicate predicate) { - for (String item: nonResourceURLs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingNonResourceURL(Predicate predicate) { - for (String item: nonResourceURLs) { if(predicate.test(item)){ return true;} } return false; - } - public A withNonResourceURLs(List nonResourceURLs) { - if (nonResourceURLs != null) {this.nonResourceURLs = new ArrayList(); for (String item : nonResourceURLs){this.addToNonResourceURLs(item);}} else { this.nonResourceURLs = null;} return (A) this; - } - public A withNonResourceURLs(java.lang.String... nonResourceURLs) { - if (this.nonResourceURLs != null) {this.nonResourceURLs.clear(); _visitables.remove("nonResourceURLs"); } - if (nonResourceURLs != null) {for (String item :nonResourceURLs){ this.addToNonResourceURLs(item);}} return (A) this; - } - public Boolean hasNonResourceURLs() { - return nonResourceURLs != null && !nonResourceURLs.isEmpty(); - } - public A addToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.add(index, item); - return (A)this; - } - public A setToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.set(index, item); return (A)this; - } - public A addToVerbs(java.lang.String... items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A addAllToVerbs(Collection items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A removeFromVerbs(java.lang.String... items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public A removeAllFromVerbs(Collection items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public List getVerbs() { - return this.verbs; - } - public String getVerb(int index) { - return this.verbs.get(index); - } - public String getFirstVerb() { - return this.verbs.get(0); - } - public String getLastVerb() { - return this.verbs.get(verbs.size() - 1); - } - public String getMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return true;} } return false; - } - public A withVerbs(List verbs) { - if (verbs != null) {this.verbs = new ArrayList(); for (String item : verbs){this.addToVerbs(item);}} else { this.verbs = null;} return (A) this; - } - public A withVerbs(java.lang.String... verbs) { - if (this.verbs != null) {this.verbs.clear(); _visitables.remove("verbs"); } - if (verbs != null) {for (String item :verbs){ this.addToVerbs(item);}} return (A) this; - } - public Boolean hasVerbs() { - return verbs != null && !verbs.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1NonResourceRuleFluentImpl that = (V1NonResourceRuleFluentImpl) o; - if (!java.util.Objects.equals(nonResourceURLs, that.nonResourceURLs)) return false; - - if (!java.util.Objects.equals(verbs, that.verbs)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(nonResourceURLs, verbs, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (nonResourceURLs != null && !nonResourceURLs.isEmpty()) { sb.append("nonResourceURLs:"); sb.append(nonResourceURLs + ","); } - if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorBuilder.java index cffd11dedc..4eca119cac 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ObjectFieldSelectorBuilder extends V1ObjectFieldSelectorFluentImpl implements VisitableBuilder{ +public class V1ObjectFieldSelectorBuilder extends V1ObjectFieldSelectorFluent implements VisitableBuilder{ public V1ObjectFieldSelectorBuilder() { - this(false); - } - public V1ObjectFieldSelectorBuilder(Boolean validationEnabled) { - this(new V1ObjectFieldSelector(), validationEnabled); + this(new V1ObjectFieldSelector()); } + public V1ObjectFieldSelectorBuilder(V1ObjectFieldSelectorFluent fluent) { - this(fluent, false); - } - public V1ObjectFieldSelectorBuilder(V1ObjectFieldSelectorFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ObjectFieldSelector(), validationEnabled); + this(fluent, new V1ObjectFieldSelector()); } + public V1ObjectFieldSelectorBuilder(V1ObjectFieldSelectorFluent fluent,V1ObjectFieldSelector instance) { - this(fluent, instance, false); - } - public V1ObjectFieldSelectorBuilder(V1ObjectFieldSelectorFluent fluent,V1ObjectFieldSelector instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withFieldPath(instance.getFieldPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ObjectFieldSelectorBuilder(V1ObjectFieldSelector instance) { - this(instance,false); - } - public V1ObjectFieldSelectorBuilder(V1ObjectFieldSelector instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withFieldPath(instance.getFieldPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ObjectFieldSelectorFluent fluent; - Boolean validationEnabled; + public V1ObjectFieldSelector build() { V1ObjectFieldSelector buildable = new V1ObjectFieldSelector(); buildable.setApiVersion(fluent.getApiVersion()); @@ -46,4 +28,5 @@ public V1ObjectFieldSelector build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorFluent.java index 1666cea0a4..a20298c2f4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ObjectFieldSelectorFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getFieldPath(); - public A withFieldPath(String fieldPath); - public Boolean hasFieldPath(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ObjectFieldSelectorFluent> extends BaseFluent{ + public V1ObjectFieldSelectorFluent() { + } + public V1ObjectFieldSelectorFluent(V1ObjectFieldSelector instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String fieldPath; + + protected void copyInstance(V1ObjectFieldSelector instance) { + instance = (instance != null ? instance : new V1ObjectFieldSelector()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withFieldPath(instance.getFieldPath()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getFieldPath() { + return this.fieldPath; + } + + public A withFieldPath(String fieldPath) { + this.fieldPath = fieldPath; + return (A) this; + } + + public boolean hasFieldPath() { + return this.fieldPath != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ObjectFieldSelectorFluent that = (V1ObjectFieldSelectorFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(fieldPath, that.fieldPath)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, fieldPath, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (fieldPath != null) { sb.append("fieldPath:"); sb.append(fieldPath); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorFluentImpl.java deleted file mode 100644 index 51310e6f28..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectFieldSelectorFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ObjectFieldSelectorFluentImpl> extends BaseFluent implements V1ObjectFieldSelectorFluent{ - public V1ObjectFieldSelectorFluentImpl() { - } - public V1ObjectFieldSelectorFluentImpl(V1ObjectFieldSelector instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withFieldPath(instance.getFieldPath()); - } - } - private String apiVersion; - private String fieldPath; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getFieldPath() { - return this.fieldPath; - } - public A withFieldPath(String fieldPath) { - this.fieldPath=fieldPath; return (A) this; - } - public Boolean hasFieldPath() { - return this.fieldPath != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ObjectFieldSelectorFluentImpl that = (V1ObjectFieldSelectorFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(fieldPath, that.fieldPath)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, fieldPath, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (fieldPath != null) { sb.append("fieldPath:"); sb.append(fieldPath); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaBuilder.java index 3341f04ad4..cb61ffcd3c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaBuilder.java @@ -1,70 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ObjectMetaBuilder extends V1ObjectMetaFluentImpl implements VisitableBuilder{ +public class V1ObjectMetaBuilder extends V1ObjectMetaFluent implements VisitableBuilder{ public V1ObjectMetaBuilder() { - this(false); - } - public V1ObjectMetaBuilder(Boolean validationEnabled) { - this(new V1ObjectMeta(), validationEnabled); + this(new V1ObjectMeta()); } + public V1ObjectMetaBuilder(V1ObjectMetaFluent fluent) { - this(fluent, false); - } - public V1ObjectMetaBuilder(V1ObjectMetaFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ObjectMeta(), validationEnabled); + this(fluent, new V1ObjectMeta()); } + public V1ObjectMetaBuilder(V1ObjectMetaFluent fluent,V1ObjectMeta instance) { - this(fluent, instance, false); - } - public V1ObjectMetaBuilder(V1ObjectMetaFluent fluent,V1ObjectMeta instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAnnotations(instance.getAnnotations()); - fluent.withCreationTimestamp(instance.getCreationTimestamp()); - fluent.withDeletionGracePeriodSeconds(instance.getDeletionGracePeriodSeconds()); - fluent.withDeletionTimestamp(instance.getDeletionTimestamp()); - fluent.withFinalizers(instance.getFinalizers()); - fluent.withGenerateName(instance.getGenerateName()); - fluent.withGeneration(instance.getGeneration()); - fluent.withLabels(instance.getLabels()); - fluent.withManagedFields(instance.getManagedFields()); - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - fluent.withOwnerReferences(instance.getOwnerReferences()); - fluent.withResourceVersion(instance.getResourceVersion()); - fluent.withSelfLink(instance.getSelfLink()); - fluent.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ObjectMetaBuilder(V1ObjectMeta instance) { - this(instance,false); - } - public V1ObjectMetaBuilder(V1ObjectMeta instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAnnotations(instance.getAnnotations()); - this.withCreationTimestamp(instance.getCreationTimestamp()); - this.withDeletionGracePeriodSeconds(instance.getDeletionGracePeriodSeconds()); - this.withDeletionTimestamp(instance.getDeletionTimestamp()); - this.withFinalizers(instance.getFinalizers()); - this.withGenerateName(instance.getGenerateName()); - this.withGeneration(instance.getGeneration()); - this.withLabels(instance.getLabels()); - this.withManagedFields(instance.getManagedFields()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withOwnerReferences(instance.getOwnerReferences()); - this.withResourceVersion(instance.getResourceVersion()); - this.withSelfLink(instance.getSelfLink()); - this.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ObjectMetaFluent fluent; - Boolean validationEnabled; + public V1ObjectMeta build() { V1ObjectMeta buildable = new V1ObjectMeta(); buildable.setAnnotations(fluent.getAnnotations()); @@ -75,14 +31,15 @@ public V1ObjectMeta build() { buildable.setGenerateName(fluent.getGenerateName()); buildable.setGeneration(fluent.getGeneration()); buildable.setLabels(fluent.getLabels()); - buildable.setManagedFields(fluent.getManagedFields()); + buildable.setManagedFields(fluent.buildManagedFields()); buildable.setName(fluent.getName()); buildable.setNamespace(fluent.getNamespace()); - buildable.setOwnerReferences(fluent.getOwnerReferences()); + buildable.setOwnerReferences(fluent.buildOwnerReferences()); buildable.setResourceVersion(fluent.getResourceVersion()); buildable.setSelfLink(fluent.getSelfLink()); buildable.setUid(fluent.getUid()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaFluent.java index b8621e822c..84e9d44754 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaFluent.java @@ -1,154 +1,752 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.List; -import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.time.OffsetDateTime; import java.lang.Long; import java.util.Collection; +import java.lang.Object; import java.util.Map; - /** - * Generated - */ -public interface V1ObjectMetaFluent> extends Fluent{ - public A addToAnnotations(String key,String value); - public A addToAnnotations(Map map); - public A removeFromAnnotations(String key); - public A removeFromAnnotations(Map map); - public Map getAnnotations(); - public A withAnnotations(Map annotations); - public Boolean hasAnnotations(); - public OffsetDateTime getCreationTimestamp(); - public A withCreationTimestamp(OffsetDateTime creationTimestamp); - public Boolean hasCreationTimestamp(); - public Long getDeletionGracePeriodSeconds(); - public A withDeletionGracePeriodSeconds(Long deletionGracePeriodSeconds); - public Boolean hasDeletionGracePeriodSeconds(); - public OffsetDateTime getDeletionTimestamp(); - public A withDeletionTimestamp(OffsetDateTime deletionTimestamp); - public Boolean hasDeletionTimestamp(); - public A addToFinalizers(int index,String item); - public A setToFinalizers(int index,String item); - public A addToFinalizers(java.lang.String... items); - public A addAllToFinalizers(Collection items); - public A removeFromFinalizers(java.lang.String... items); - public A removeAllFromFinalizers(Collection items); - public List getFinalizers(); - public String getFinalizer(int index); - public String getFirstFinalizer(); - public String getLastFinalizer(); - public String getMatchingFinalizer(Predicate predicate); - public Boolean hasMatchingFinalizer(Predicate predicate); - public A withFinalizers(List finalizers); - public A withFinalizers(java.lang.String... finalizers); - public Boolean hasFinalizers(); - public String getGenerateName(); - public A withGenerateName(String generateName); - public Boolean hasGenerateName(); - public Long getGeneration(); - public A withGeneration(Long generation); - public Boolean hasGeneration(); - public A addToLabels(String key,String value); - public A addToLabels(Map map); - public A removeFromLabels(String key); - public A removeFromLabels(Map map); - public Map getLabels(); - public A withLabels(Map labels); - public Boolean hasLabels(); - public A addToManagedFields(int index,V1ManagedFieldsEntry item); - public A setToManagedFields(int index,V1ManagedFieldsEntry item); - public A addToManagedFields(io.kubernetes.client.openapi.models.V1ManagedFieldsEntry... items); - public A addAllToManagedFields(Collection items); - public A removeFromManagedFields(io.kubernetes.client.openapi.models.V1ManagedFieldsEntry... items); - public A removeAllFromManagedFields(Collection items); - public A removeMatchingFromManagedFields(Predicate predicate); - - /** - * This method has been deprecated, please use method buildManagedFields instead. - * @return The buildable object. - */ - @Deprecated - public List getManagedFields(); - public List buildManagedFields(); - public V1ManagedFieldsEntry buildManagedField(int index); - public V1ManagedFieldsEntry buildFirstManagedField(); - public V1ManagedFieldsEntry buildLastManagedField(); - public V1ManagedFieldsEntry buildMatchingManagedField(Predicate predicate); - public Boolean hasMatchingManagedField(Predicate predicate); - public A withManagedFields(List managedFields); - public A withManagedFields(io.kubernetes.client.openapi.models.V1ManagedFieldsEntry... managedFields); - public Boolean hasManagedFields(); - public V1ObjectMetaFluent.ManagedFieldsNested addNewManagedField(); - public V1ObjectMetaFluent.ManagedFieldsNested addNewManagedFieldLike(V1ManagedFieldsEntry item); - public V1ObjectMetaFluent.ManagedFieldsNested setNewManagedFieldLike(int index,V1ManagedFieldsEntry item); - public V1ObjectMetaFluent.ManagedFieldsNested editManagedField(int index); - public V1ObjectMetaFluent.ManagedFieldsNested editFirstManagedField(); - public V1ObjectMetaFluent.ManagedFieldsNested editLastManagedField(); - public V1ObjectMetaFluent.ManagedFieldsNested editMatchingManagedField(Predicate predicate); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); - public A addToOwnerReferences(int index,V1OwnerReference item); - public A setToOwnerReferences(int index,V1OwnerReference item); - public A addToOwnerReferences(io.kubernetes.client.openapi.models.V1OwnerReference... items); - public A addAllToOwnerReferences(Collection items); - public A removeFromOwnerReferences(io.kubernetes.client.openapi.models.V1OwnerReference... items); - public A removeAllFromOwnerReferences(Collection items); - public A removeMatchingFromOwnerReferences(Predicate predicate); - - /** - * This method has been deprecated, please use method buildOwnerReferences instead. - * @return The buildable object. - */ - @Deprecated - public List getOwnerReferences(); - public List buildOwnerReferences(); - public V1OwnerReference buildOwnerReference(int index); - public V1OwnerReference buildFirstOwnerReference(); - public V1OwnerReference buildLastOwnerReference(); - public V1OwnerReference buildMatchingOwnerReference(Predicate predicate); - public Boolean hasMatchingOwnerReference(Predicate predicate); - public A withOwnerReferences(List ownerReferences); - public A withOwnerReferences(io.kubernetes.client.openapi.models.V1OwnerReference... ownerReferences); - public Boolean hasOwnerReferences(); - public V1ObjectMetaFluent.OwnerReferencesNested addNewOwnerReference(); - public V1ObjectMetaFluent.OwnerReferencesNested addNewOwnerReferenceLike(V1OwnerReference item); - public V1ObjectMetaFluent.OwnerReferencesNested setNewOwnerReferenceLike(int index,V1OwnerReference item); - public V1ObjectMetaFluent.OwnerReferencesNested editOwnerReference(int index); - public V1ObjectMetaFluent.OwnerReferencesNested editFirstOwnerReference(); - public V1ObjectMetaFluent.OwnerReferencesNested editLastOwnerReference(); - public V1ObjectMetaFluent.OwnerReferencesNested editMatchingOwnerReference(Predicate predicate); - public String getResourceVersion(); - public A withResourceVersion(String resourceVersion); - public Boolean hasResourceVersion(); - public String getSelfLink(); - public A withSelfLink(String selfLink); - public Boolean hasSelfLink(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); - public interface ManagedFieldsNested extends Nested,V1ManagedFieldsEntryFluent>{ - public N and(); - public N endManagedField(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ObjectMetaFluent> extends BaseFluent{ + public V1ObjectMetaFluent() { + } + + public V1ObjectMetaFluent(V1ObjectMeta instance) { + this.copyInstance(instance); + } + private Map annotations; + private OffsetDateTime creationTimestamp; + private Long deletionGracePeriodSeconds; + private OffsetDateTime deletionTimestamp; + private List finalizers; + private String generateName; + private Long generation; + private Map labels; + private ArrayList managedFields; + private String name; + private String namespace; + private ArrayList ownerReferences; + private String resourceVersion; + private String selfLink; + private String uid; + + protected void copyInstance(V1ObjectMeta instance) { + instance = (instance != null ? instance : new V1ObjectMeta()); + if (instance != null) { + this.withAnnotations(instance.getAnnotations()); + this.withCreationTimestamp(instance.getCreationTimestamp()); + this.withDeletionGracePeriodSeconds(instance.getDeletionGracePeriodSeconds()); + this.withDeletionTimestamp(instance.getDeletionTimestamp()); + this.withFinalizers(instance.getFinalizers()); + this.withGenerateName(instance.getGenerateName()); + this.withGeneration(instance.getGeneration()); + this.withLabels(instance.getLabels()); + this.withManagedFields(instance.getManagedFields()); + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withOwnerReferences(instance.getOwnerReferences()); + this.withResourceVersion(instance.getResourceVersion()); + this.withSelfLink(instance.getSelfLink()); + this.withUid(instance.getUid()); + } + } + + public A addToAnnotations(String key,String value) { + if(this.annotations == null && key != null && value != null) { this.annotations = new LinkedHashMap(); } + if(key != null && value != null) {this.annotations.put(key, value);} return (A)this; + } + + public A addToAnnotations(Map map) { + if(this.annotations == null && map != null) { this.annotations = new LinkedHashMap(); } + if(map != null) { this.annotations.putAll(map);} return (A)this; + } + + public A removeFromAnnotations(String key) { + if(this.annotations == null) { return (A) this; } + if(key != null && this.annotations != null) {this.annotations.remove(key);} return (A)this; + } + + public A removeFromAnnotations(Map map) { + if(this.annotations == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.annotations != null){this.annotations.remove(key);}}} return (A)this; + } + + public Map getAnnotations() { + return this.annotations; + } + + public A withAnnotations(Map annotations) { + if (annotations == null) { + this.annotations = null; + } else { + this.annotations = new LinkedHashMap(annotations); + } + return (A) this; + } + + public boolean hasAnnotations() { + return this.annotations != null; + } + + public OffsetDateTime getCreationTimestamp() { + return this.creationTimestamp; + } + + public A withCreationTimestamp(OffsetDateTime creationTimestamp) { + this.creationTimestamp = creationTimestamp; + return (A) this; + } + + public boolean hasCreationTimestamp() { + return this.creationTimestamp != null; + } + + public Long getDeletionGracePeriodSeconds() { + return this.deletionGracePeriodSeconds; + } + + public A withDeletionGracePeriodSeconds(Long deletionGracePeriodSeconds) { + this.deletionGracePeriodSeconds = deletionGracePeriodSeconds; + return (A) this; + } + + public boolean hasDeletionGracePeriodSeconds() { + return this.deletionGracePeriodSeconds != null; + } + + public OffsetDateTime getDeletionTimestamp() { + return this.deletionTimestamp; + } + + public A withDeletionTimestamp(OffsetDateTime deletionTimestamp) { + this.deletionTimestamp = deletionTimestamp; + return (A) this; + } + + public boolean hasDeletionTimestamp() { + return this.deletionTimestamp != null; + } + + public A addToFinalizers(int index,String item) { + if (this.finalizers == null) {this.finalizers = new ArrayList();} + this.finalizers.add(index, item); + return (A)this; + } + + public A setToFinalizers(int index,String item) { + if (this.finalizers == null) {this.finalizers = new ArrayList();} + this.finalizers.set(index, item); return (A)this; + } + + public A addToFinalizers(java.lang.String... items) { + if (this.finalizers == null) {this.finalizers = new ArrayList();} + for (String item : items) {this.finalizers.add(item);} return (A)this; + } + + public A addAllToFinalizers(Collection items) { + if (this.finalizers == null) {this.finalizers = new ArrayList();} + for (String item : items) {this.finalizers.add(item);} return (A)this; + } + + public A removeFromFinalizers(java.lang.String... items) { + if (this.finalizers == null) return (A)this; + for (String item : items) { this.finalizers.remove(item);} return (A)this; + } + + public A removeAllFromFinalizers(Collection items) { + if (this.finalizers == null) return (A)this; + for (String item : items) { this.finalizers.remove(item);} return (A)this; + } + + public List getFinalizers() { + return this.finalizers; + } + + public String getFinalizer(int index) { + return this.finalizers.get(index); + } + + public String getFirstFinalizer() { + return this.finalizers.get(0); + } + + public String getLastFinalizer() { + return this.finalizers.get(finalizers.size() - 1); + } + + public String getMatchingFinalizer(Predicate predicate) { + for (String item : finalizers) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingFinalizer(Predicate predicate) { + for (String item : finalizers) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withFinalizers(List finalizers) { + if (finalizers != null) { + this.finalizers = new ArrayList(); + for (String item : finalizers) { + this.addToFinalizers(item); + } + } else { + this.finalizers = null; + } + return (A) this; + } + + public A withFinalizers(java.lang.String... finalizers) { + if (this.finalizers != null) { + this.finalizers.clear(); + _visitables.remove("finalizers"); + } + if (finalizers != null) { + for (String item : finalizers) { + this.addToFinalizers(item); + } + } + return (A) this; + } + + public boolean hasFinalizers() { + return this.finalizers != null && !this.finalizers.isEmpty(); + } + + public String getGenerateName() { + return this.generateName; + } + + public A withGenerateName(String generateName) { + this.generateName = generateName; + return (A) this; + } + + public boolean hasGenerateName() { + return this.generateName != null; + } + + public Long getGeneration() { + return this.generation; + } + + public A withGeneration(Long generation) { + this.generation = generation; + return (A) this; + } + + public boolean hasGeneration() { + return this.generation != null; + } + + public A addToLabels(String key,String value) { + if(this.labels == null && key != null && value != null) { this.labels = new LinkedHashMap(); } + if(key != null && value != null) {this.labels.put(key, value);} return (A)this; + } + + public A addToLabels(Map map) { + if(this.labels == null && map != null) { this.labels = new LinkedHashMap(); } + if(map != null) { this.labels.putAll(map);} return (A)this; + } + + public A removeFromLabels(String key) { + if(this.labels == null) { return (A) this; } + if(key != null && this.labels != null) {this.labels.remove(key);} return (A)this; + } + + public A removeFromLabels(Map map) { + if(this.labels == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.labels != null){this.labels.remove(key);}}} return (A)this; + } + + public Map getLabels() { + return this.labels; + } + + public A withLabels(Map labels) { + if (labels == null) { + this.labels = null; + } else { + this.labels = new LinkedHashMap(labels); + } + return (A) this; + } + + public boolean hasLabels() { + return this.labels != null; + } + + public A addToManagedFields(int index,V1ManagedFieldsEntry item) { + if (this.managedFields == null) {this.managedFields = new ArrayList();} + V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item); + if (index < 0 || index >= managedFields.size()) { _visitables.get("managedFields").add(builder); managedFields.add(builder); } else { _visitables.get("managedFields").add(index, builder); managedFields.add(index, builder);} + return (A)this; + } + + public A setToManagedFields(int index,V1ManagedFieldsEntry item) { + if (this.managedFields == null) {this.managedFields = new ArrayList();} + V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item); + if (index < 0 || index >= managedFields.size()) { _visitables.get("managedFields").add(builder); managedFields.add(builder); } else { _visitables.get("managedFields").set(index, builder); managedFields.set(index, builder);} + return (A)this; + } + + public A addToManagedFields(io.kubernetes.client.openapi.models.V1ManagedFieldsEntry... items) { + if (this.managedFields == null) {this.managedFields = new ArrayList();} + for (V1ManagedFieldsEntry item : items) {V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item);_visitables.get("managedFields").add(builder);this.managedFields.add(builder);} return (A)this; + } + + public A addAllToManagedFields(Collection items) { + if (this.managedFields == null) {this.managedFields = new ArrayList();} + for (V1ManagedFieldsEntry item : items) {V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item);_visitables.get("managedFields").add(builder);this.managedFields.add(builder);} return (A)this; + } + + public A removeFromManagedFields(io.kubernetes.client.openapi.models.V1ManagedFieldsEntry... items) { + if (this.managedFields == null) return (A)this; + for (V1ManagedFieldsEntry item : items) {V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item);_visitables.get("managedFields").remove(builder); this.managedFields.remove(builder);} return (A)this; + } + + public A removeAllFromManagedFields(Collection items) { + if (this.managedFields == null) return (A)this; + for (V1ManagedFieldsEntry item : items) {V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item);_visitables.get("managedFields").remove(builder); this.managedFields.remove(builder);} return (A)this; + } + + public A removeMatchingFromManagedFields(Predicate predicate) { + if (managedFields == null) return (A) this; + final Iterator each = managedFields.iterator(); + final List visitables = _visitables.get("managedFields"); + while (each.hasNext()) { + V1ManagedFieldsEntryBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildManagedFields() { + return this.managedFields != null ? build(managedFields) : null; + } + + public V1ManagedFieldsEntry buildManagedField(int index) { + return this.managedFields.get(index).build(); + } + + public V1ManagedFieldsEntry buildFirstManagedField() { + return this.managedFields.get(0).build(); + } + + public V1ManagedFieldsEntry buildLastManagedField() { + return this.managedFields.get(managedFields.size() - 1).build(); } - public interface OwnerReferencesNested extends Nested,V1OwnerReferenceFluent>{ - public N and(); - public N endOwnerReference(); + + public V1ManagedFieldsEntry buildMatchingManagedField(Predicate predicate) { + for (V1ManagedFieldsEntryBuilder item : managedFields) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingManagedField(Predicate predicate) { + for (V1ManagedFieldsEntryBuilder item : managedFields) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withManagedFields(List managedFields) { + if (this.managedFields != null) { + this._visitables.get("managedFields").clear(); + } + if (managedFields != null) { + this.managedFields = new ArrayList(); + for (V1ManagedFieldsEntry item : managedFields) { + this.addToManagedFields(item); + } + } else { + this.managedFields = null; + } + return (A) this; + } + + public A withManagedFields(io.kubernetes.client.openapi.models.V1ManagedFieldsEntry... managedFields) { + if (this.managedFields != null) { + this.managedFields.clear(); + _visitables.remove("managedFields"); + } + if (managedFields != null) { + for (V1ManagedFieldsEntry item : managedFields) { + this.addToManagedFields(item); + } + } + return (A) this; + } + + public boolean hasManagedFields() { + return this.managedFields != null && !this.managedFields.isEmpty(); + } + + public ManagedFieldsNested addNewManagedField() { + return new ManagedFieldsNested(-1, null); + } + + public ManagedFieldsNested addNewManagedFieldLike(V1ManagedFieldsEntry item) { + return new ManagedFieldsNested(-1, item); + } + + public ManagedFieldsNested setNewManagedFieldLike(int index,V1ManagedFieldsEntry item) { + return new ManagedFieldsNested(index, item); + } + + public ManagedFieldsNested editManagedField(int index) { + if (managedFields.size() <= index) throw new RuntimeException("Can't edit managedFields. Index exceeds size."); + return setNewManagedFieldLike(index, buildManagedField(index)); + } + + public ManagedFieldsNested editFirstManagedField() { + if (managedFields.size() == 0) throw new RuntimeException("Can't edit first managedFields. The list is empty."); + return setNewManagedFieldLike(0, buildManagedField(0)); + } + + public ManagedFieldsNested editLastManagedField() { + int index = managedFields.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last managedFields. The list is empty."); + return setNewManagedFieldLike(index, buildManagedField(index)); + } + + public ManagedFieldsNested editMatchingManagedField(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item); + if (index < 0 || index >= ownerReferences.size()) { _visitables.get("ownerReferences").add(builder); ownerReferences.add(builder); } else { _visitables.get("ownerReferences").add(index, builder); ownerReferences.add(index, builder);} + return (A)this; + } + + public A setToOwnerReferences(int index,V1OwnerReference item) { + if (this.ownerReferences == null) {this.ownerReferences = new ArrayList();} + V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item); + if (index < 0 || index >= ownerReferences.size()) { _visitables.get("ownerReferences").add(builder); ownerReferences.add(builder); } else { _visitables.get("ownerReferences").set(index, builder); ownerReferences.set(index, builder);} + return (A)this; + } + + public A addToOwnerReferences(io.kubernetes.client.openapi.models.V1OwnerReference... items) { + if (this.ownerReferences == null) {this.ownerReferences = new ArrayList();} + for (V1OwnerReference item : items) {V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item);_visitables.get("ownerReferences").add(builder);this.ownerReferences.add(builder);} return (A)this; + } + + public A addAllToOwnerReferences(Collection items) { + if (this.ownerReferences == null) {this.ownerReferences = new ArrayList();} + for (V1OwnerReference item : items) {V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item);_visitables.get("ownerReferences").add(builder);this.ownerReferences.add(builder);} return (A)this; + } + + public A removeFromOwnerReferences(io.kubernetes.client.openapi.models.V1OwnerReference... items) { + if (this.ownerReferences == null) return (A)this; + for (V1OwnerReference item : items) {V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item);_visitables.get("ownerReferences").remove(builder); this.ownerReferences.remove(builder);} return (A)this; + } + + public A removeAllFromOwnerReferences(Collection items) { + if (this.ownerReferences == null) return (A)this; + for (V1OwnerReference item : items) {V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item);_visitables.get("ownerReferences").remove(builder); this.ownerReferences.remove(builder);} return (A)this; + } + + public A removeMatchingFromOwnerReferences(Predicate predicate) { + if (ownerReferences == null) return (A) this; + final Iterator each = ownerReferences.iterator(); + final List visitables = _visitables.get("ownerReferences"); + while (each.hasNext()) { + V1OwnerReferenceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildOwnerReferences() { + return this.ownerReferences != null ? build(ownerReferences) : null; + } + + public V1OwnerReference buildOwnerReference(int index) { + return this.ownerReferences.get(index).build(); + } + + public V1OwnerReference buildFirstOwnerReference() { + return this.ownerReferences.get(0).build(); + } + + public V1OwnerReference buildLastOwnerReference() { + return this.ownerReferences.get(ownerReferences.size() - 1).build(); + } + + public V1OwnerReference buildMatchingOwnerReference(Predicate predicate) { + for (V1OwnerReferenceBuilder item : ownerReferences) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingOwnerReference(Predicate predicate) { + for (V1OwnerReferenceBuilder item : ownerReferences) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withOwnerReferences(List ownerReferences) { + if (this.ownerReferences != null) { + this._visitables.get("ownerReferences").clear(); + } + if (ownerReferences != null) { + this.ownerReferences = new ArrayList(); + for (V1OwnerReference item : ownerReferences) { + this.addToOwnerReferences(item); + } + } else { + this.ownerReferences = null; + } + return (A) this; + } + + public A withOwnerReferences(io.kubernetes.client.openapi.models.V1OwnerReference... ownerReferences) { + if (this.ownerReferences != null) { + this.ownerReferences.clear(); + _visitables.remove("ownerReferences"); + } + if (ownerReferences != null) { + for (V1OwnerReference item : ownerReferences) { + this.addToOwnerReferences(item); + } + } + return (A) this; + } + + public boolean hasOwnerReferences() { + return this.ownerReferences != null && !this.ownerReferences.isEmpty(); + } + + public OwnerReferencesNested addNewOwnerReference() { + return new OwnerReferencesNested(-1, null); + } + + public OwnerReferencesNested addNewOwnerReferenceLike(V1OwnerReference item) { + return new OwnerReferencesNested(-1, item); + } + + public OwnerReferencesNested setNewOwnerReferenceLike(int index,V1OwnerReference item) { + return new OwnerReferencesNested(index, item); + } + + public OwnerReferencesNested editOwnerReference(int index) { + if (ownerReferences.size() <= index) throw new RuntimeException("Can't edit ownerReferences. Index exceeds size."); + return setNewOwnerReferenceLike(index, buildOwnerReference(index)); + } + + public OwnerReferencesNested editFirstOwnerReference() { + if (ownerReferences.size() == 0) throw new RuntimeException("Can't edit first ownerReferences. The list is empty."); + return setNewOwnerReferenceLike(0, buildOwnerReference(0)); + } + + public OwnerReferencesNested editLastOwnerReference() { + int index = ownerReferences.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ownerReferences. The list is empty."); + return setNewOwnerReferenceLike(index, buildOwnerReference(index)); + } + + public OwnerReferencesNested editMatchingOwnerReference(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ManagedFieldsEntryFluent> implements Nested{ + ManagedFieldsNested(int index,V1ManagedFieldsEntry item) { + this.index = index; + this.builder = new V1ManagedFieldsEntryBuilder(this, item); + } + V1ManagedFieldsEntryBuilder builder; + int index; + + public N and() { + return (N) V1ObjectMetaFluent.this.setToManagedFields(index,builder.build()); + } + public N endManagedField() { + return and(); + } + + } + public class OwnerReferencesNested extends V1OwnerReferenceFluent> implements Nested{ + OwnerReferencesNested(int index,V1OwnerReference item) { + this.index = index; + this.builder = new V1OwnerReferenceBuilder(this, item); + } + V1OwnerReferenceBuilder builder; + int index; + + public N and() { + return (N) V1ObjectMetaFluent.this.setToOwnerReferences(index,builder.build()); + } + + public N endOwnerReference() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaFluentImpl.java deleted file mode 100644 index dafa2ef978..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectMetaFluentImpl.java +++ /dev/null @@ -1,567 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.time.OffsetDateTime; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ObjectMetaFluentImpl> extends BaseFluent implements V1ObjectMetaFluent{ - public V1ObjectMetaFluentImpl() { - } - public V1ObjectMetaFluentImpl(V1ObjectMeta instance) { - if (instance != null) { - this.withAnnotations(instance.getAnnotations()); - this.withCreationTimestamp(instance.getCreationTimestamp()); - this.withDeletionGracePeriodSeconds(instance.getDeletionGracePeriodSeconds()); - this.withDeletionTimestamp(instance.getDeletionTimestamp()); - this.withFinalizers(instance.getFinalizers()); - this.withGenerateName(instance.getGenerateName()); - this.withGeneration(instance.getGeneration()); - this.withLabels(instance.getLabels()); - this.withManagedFields(instance.getManagedFields()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withOwnerReferences(instance.getOwnerReferences()); - this.withResourceVersion(instance.getResourceVersion()); - this.withSelfLink(instance.getSelfLink()); - this.withUid(instance.getUid()); - } - } - private Map annotations; - private OffsetDateTime creationTimestamp; - private Long deletionGracePeriodSeconds; - private OffsetDateTime deletionTimestamp; - private List finalizers; - private String generateName; - private Long generation; - private Map labels; - private ArrayList managedFields; - private String name; - private String namespace; - private ArrayList ownerReferences; - private String resourceVersion; - private String selfLink; - private String uid; - public A addToAnnotations(String key,String value) { - if(this.annotations == null && key != null && value != null) { this.annotations = new LinkedHashMap(); } - if(key != null && value != null) {this.annotations.put(key, value);} return (A)this; - } - public A addToAnnotations(Map map) { - if(this.annotations == null && map != null) { this.annotations = new LinkedHashMap(); } - if(map != null) { this.annotations.putAll(map);} return (A)this; - } - public A removeFromAnnotations(String key) { - if(this.annotations == null) { return (A) this; } - if(key != null && this.annotations != null) {this.annotations.remove(key);} return (A)this; - } - public A removeFromAnnotations(Map map) { - if(this.annotations == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.annotations != null){this.annotations.remove(key);}}} return (A)this; - } - public Map getAnnotations() { - return this.annotations; - } - public A withAnnotations(Map annotations) { - if (annotations == null) { this.annotations = null;} else {this.annotations = new LinkedHashMap(annotations);} return (A) this; - } - public Boolean hasAnnotations() { - return this.annotations != null; - } - public OffsetDateTime getCreationTimestamp() { - return this.creationTimestamp; - } - public A withCreationTimestamp(OffsetDateTime creationTimestamp) { - this.creationTimestamp=creationTimestamp; return (A) this; - } - public Boolean hasCreationTimestamp() { - return this.creationTimestamp != null; - } - public Long getDeletionGracePeriodSeconds() { - return this.deletionGracePeriodSeconds; - } - public A withDeletionGracePeriodSeconds(Long deletionGracePeriodSeconds) { - this.deletionGracePeriodSeconds=deletionGracePeriodSeconds; return (A) this; - } - public Boolean hasDeletionGracePeriodSeconds() { - return this.deletionGracePeriodSeconds != null; - } - public OffsetDateTime getDeletionTimestamp() { - return this.deletionTimestamp; - } - public A withDeletionTimestamp(OffsetDateTime deletionTimestamp) { - this.deletionTimestamp=deletionTimestamp; return (A) this; - } - public Boolean hasDeletionTimestamp() { - return this.deletionTimestamp != null; - } - public A addToFinalizers(int index,String item) { - if (this.finalizers == null) {this.finalizers = new ArrayList();} - this.finalizers.add(index, item); - return (A)this; - } - public A setToFinalizers(int index,String item) { - if (this.finalizers == null) {this.finalizers = new ArrayList();} - this.finalizers.set(index, item); return (A)this; - } - public A addToFinalizers(java.lang.String... items) { - if (this.finalizers == null) {this.finalizers = new ArrayList();} - for (String item : items) {this.finalizers.add(item);} return (A)this; - } - public A addAllToFinalizers(Collection items) { - if (this.finalizers == null) {this.finalizers = new ArrayList();} - for (String item : items) {this.finalizers.add(item);} return (A)this; - } - public A removeFromFinalizers(java.lang.String... items) { - for (String item : items) {if (this.finalizers!= null){ this.finalizers.remove(item);}} return (A)this; - } - public A removeAllFromFinalizers(Collection items) { - for (String item : items) {if (this.finalizers!= null){ this.finalizers.remove(item);}} return (A)this; - } - public List getFinalizers() { - return this.finalizers; - } - public String getFinalizer(int index) { - return this.finalizers.get(index); - } - public String getFirstFinalizer() { - return this.finalizers.get(0); - } - public String getLastFinalizer() { - return this.finalizers.get(finalizers.size() - 1); - } - public String getMatchingFinalizer(Predicate predicate) { - for (String item: finalizers) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingFinalizer(Predicate predicate) { - for (String item: finalizers) { if(predicate.test(item)){ return true;} } return false; - } - public A withFinalizers(List finalizers) { - if (finalizers != null) {this.finalizers = new ArrayList(); for (String item : finalizers){this.addToFinalizers(item);}} else { this.finalizers = null;} return (A) this; - } - public A withFinalizers(java.lang.String... finalizers) { - if (this.finalizers != null) {this.finalizers.clear(); _visitables.remove("finalizers"); } - if (finalizers != null) {for (String item :finalizers){ this.addToFinalizers(item);}} return (A) this; - } - public Boolean hasFinalizers() { - return finalizers != null && !finalizers.isEmpty(); - } - public String getGenerateName() { - return this.generateName; - } - public A withGenerateName(String generateName) { - this.generateName=generateName; return (A) this; - } - public Boolean hasGenerateName() { - return this.generateName != null; - } - public Long getGeneration() { - return this.generation; - } - public A withGeneration(Long generation) { - this.generation=generation; return (A) this; - } - public Boolean hasGeneration() { - return this.generation != null; - } - public A addToLabels(String key,String value) { - if(this.labels == null && key != null && value != null) { this.labels = new LinkedHashMap(); } - if(key != null && value != null) {this.labels.put(key, value);} return (A)this; - } - public A addToLabels(Map map) { - if(this.labels == null && map != null) { this.labels = new LinkedHashMap(); } - if(map != null) { this.labels.putAll(map);} return (A)this; - } - public A removeFromLabels(String key) { - if(this.labels == null) { return (A) this; } - if(key != null && this.labels != null) {this.labels.remove(key);} return (A)this; - } - public A removeFromLabels(Map map) { - if(this.labels == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.labels != null){this.labels.remove(key);}}} return (A)this; - } - public Map getLabels() { - return this.labels; - } - public A withLabels(Map labels) { - if (labels == null) { this.labels = null;} else {this.labels = new LinkedHashMap(labels);} return (A) this; - } - public Boolean hasLabels() { - return this.labels != null; - } - public A addToManagedFields(int index,V1ManagedFieldsEntry item) { - if (this.managedFields == null) {this.managedFields = new ArrayList();} - V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item); - if (index < 0 || index >= managedFields.size()) { _visitables.get("managedFields").add(builder); managedFields.add(builder); } else { _visitables.get("managedFields").add(index, builder); managedFields.add(index, builder);} - return (A)this; - } - public A setToManagedFields(int index,V1ManagedFieldsEntry item) { - if (this.managedFields == null) {this.managedFields = new ArrayList();} - V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item); - if (index < 0 || index >= managedFields.size()) { _visitables.get("managedFields").add(builder); managedFields.add(builder); } else { _visitables.get("managedFields").set(index, builder); managedFields.set(index, builder);} - return (A)this; - } - public A addToManagedFields(io.kubernetes.client.openapi.models.V1ManagedFieldsEntry... items) { - if (this.managedFields == null) {this.managedFields = new ArrayList();} - for (V1ManagedFieldsEntry item : items) {V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item);_visitables.get("managedFields").add(builder);this.managedFields.add(builder);} return (A)this; - } - public A addAllToManagedFields(Collection items) { - if (this.managedFields == null) {this.managedFields = new ArrayList();} - for (V1ManagedFieldsEntry item : items) {V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item);_visitables.get("managedFields").add(builder);this.managedFields.add(builder);} return (A)this; - } - public A removeFromManagedFields(io.kubernetes.client.openapi.models.V1ManagedFieldsEntry... items) { - for (V1ManagedFieldsEntry item : items) {V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item);_visitables.get("managedFields").remove(builder);if (this.managedFields != null) {this.managedFields.remove(builder);}} return (A)this; - } - public A removeAllFromManagedFields(Collection items) { - for (V1ManagedFieldsEntry item : items) {V1ManagedFieldsEntryBuilder builder = new V1ManagedFieldsEntryBuilder(item);_visitables.get("managedFields").remove(builder);if (this.managedFields != null) {this.managedFields.remove(builder);}} return (A)this; - } - public A removeMatchingFromManagedFields(Predicate predicate) { - if (managedFields == null) return (A) this; - final Iterator each = managedFields.iterator(); - final List visitables = _visitables.get("managedFields"); - while (each.hasNext()) { - V1ManagedFieldsEntryBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildManagedFields instead. - * @return The buildable object. - */ - @Deprecated - public List getManagedFields() { - return managedFields != null ? build(managedFields) : null; - } - public List buildManagedFields() { - return managedFields != null ? build(managedFields) : null; - } - public V1ManagedFieldsEntry buildManagedField(int index) { - return this.managedFields.get(index).build(); - } - public V1ManagedFieldsEntry buildFirstManagedField() { - return this.managedFields.get(0).build(); - } - public V1ManagedFieldsEntry buildLastManagedField() { - return this.managedFields.get(managedFields.size() - 1).build(); - } - public V1ManagedFieldsEntry buildMatchingManagedField(Predicate predicate) { - for (V1ManagedFieldsEntryBuilder item: managedFields) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingManagedField(Predicate predicate) { - for (V1ManagedFieldsEntryBuilder item: managedFields) { if(predicate.test(item)){ return true;} } return false; - } - public A withManagedFields(List managedFields) { - if (this.managedFields != null) { _visitables.get("managedFields").clear();} - if (managedFields != null) {this.managedFields = new ArrayList(); for (V1ManagedFieldsEntry item : managedFields){this.addToManagedFields(item);}} else { this.managedFields = null;} return (A) this; - } - public A withManagedFields(io.kubernetes.client.openapi.models.V1ManagedFieldsEntry... managedFields) { - if (this.managedFields != null) {this.managedFields.clear(); _visitables.remove("managedFields"); } - if (managedFields != null) {for (V1ManagedFieldsEntry item :managedFields){ this.addToManagedFields(item);}} return (A) this; - } - public Boolean hasManagedFields() { - return managedFields != null && !managedFields.isEmpty(); - } - public V1ObjectMetaFluentImpl.ManagedFieldsNested addNewManagedField() { - return new V1ObjectMetaFluentImpl.ManagedFieldsNestedImpl(); - } - public V1ObjectMetaFluentImpl.ManagedFieldsNested addNewManagedFieldLike(V1ManagedFieldsEntry item) { - return new V1ObjectMetaFluentImpl.ManagedFieldsNestedImpl(-1, item); - } - public V1ObjectMetaFluentImpl.ManagedFieldsNested setNewManagedFieldLike(int index,V1ManagedFieldsEntry item) { - return new V1ObjectMetaFluentImpl.ManagedFieldsNestedImpl(index, item); - } - public V1ObjectMetaFluentImpl.ManagedFieldsNested editManagedField(int index) { - if (managedFields.size() <= index) throw new RuntimeException("Can't edit managedFields. Index exceeds size."); - return setNewManagedFieldLike(index, buildManagedField(index)); - } - public V1ObjectMetaFluentImpl.ManagedFieldsNested editFirstManagedField() { - if (managedFields.size() == 0) throw new RuntimeException("Can't edit first managedFields. The list is empty."); - return setNewManagedFieldLike(0, buildManagedField(0)); - } - public V1ObjectMetaFluentImpl.ManagedFieldsNested editLastManagedField() { - int index = managedFields.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last managedFields. The list is empty."); - return setNewManagedFieldLike(index, buildManagedField(index)); - } - public V1ObjectMetaFluentImpl.ManagedFieldsNested editMatchingManagedField(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item); - if (index < 0 || index >= ownerReferences.size()) { _visitables.get("ownerReferences").add(builder); ownerReferences.add(builder); } else { _visitables.get("ownerReferences").add(index, builder); ownerReferences.add(index, builder);} - return (A)this; - } - public A setToOwnerReferences(int index,V1OwnerReference item) { - if (this.ownerReferences == null) {this.ownerReferences = new ArrayList();} - V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item); - if (index < 0 || index >= ownerReferences.size()) { _visitables.get("ownerReferences").add(builder); ownerReferences.add(builder); } else { _visitables.get("ownerReferences").set(index, builder); ownerReferences.set(index, builder);} - return (A)this; - } - public A addToOwnerReferences(io.kubernetes.client.openapi.models.V1OwnerReference... items) { - if (this.ownerReferences == null) {this.ownerReferences = new ArrayList();} - for (V1OwnerReference item : items) {V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item);_visitables.get("ownerReferences").add(builder);this.ownerReferences.add(builder);} return (A)this; - } - public A addAllToOwnerReferences(Collection items) { - if (this.ownerReferences == null) {this.ownerReferences = new ArrayList();} - for (V1OwnerReference item : items) {V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item);_visitables.get("ownerReferences").add(builder);this.ownerReferences.add(builder);} return (A)this; - } - public A removeFromOwnerReferences(io.kubernetes.client.openapi.models.V1OwnerReference... items) { - for (V1OwnerReference item : items) {V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item);_visitables.get("ownerReferences").remove(builder);if (this.ownerReferences != null) {this.ownerReferences.remove(builder);}} return (A)this; - } - public A removeAllFromOwnerReferences(Collection items) { - for (V1OwnerReference item : items) {V1OwnerReferenceBuilder builder = new V1OwnerReferenceBuilder(item);_visitables.get("ownerReferences").remove(builder);if (this.ownerReferences != null) {this.ownerReferences.remove(builder);}} return (A)this; - } - public A removeMatchingFromOwnerReferences(Predicate predicate) { - if (ownerReferences == null) return (A) this; - final Iterator each = ownerReferences.iterator(); - final List visitables = _visitables.get("ownerReferences"); - while (each.hasNext()) { - V1OwnerReferenceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildOwnerReferences instead. - * @return The buildable object. - */ - @Deprecated - public List getOwnerReferences() { - return ownerReferences != null ? build(ownerReferences) : null; - } - public List buildOwnerReferences() { - return ownerReferences != null ? build(ownerReferences) : null; - } - public V1OwnerReference buildOwnerReference(int index) { - return this.ownerReferences.get(index).build(); - } - public V1OwnerReference buildFirstOwnerReference() { - return this.ownerReferences.get(0).build(); - } - public V1OwnerReference buildLastOwnerReference() { - return this.ownerReferences.get(ownerReferences.size() - 1).build(); - } - public V1OwnerReference buildMatchingOwnerReference(Predicate predicate) { - for (V1OwnerReferenceBuilder item: ownerReferences) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingOwnerReference(Predicate predicate) { - for (V1OwnerReferenceBuilder item: ownerReferences) { if(predicate.test(item)){ return true;} } return false; - } - public A withOwnerReferences(List ownerReferences) { - if (this.ownerReferences != null) { _visitables.get("ownerReferences").clear();} - if (ownerReferences != null) {this.ownerReferences = new ArrayList(); for (V1OwnerReference item : ownerReferences){this.addToOwnerReferences(item);}} else { this.ownerReferences = null;} return (A) this; - } - public A withOwnerReferences(io.kubernetes.client.openapi.models.V1OwnerReference... ownerReferences) { - if (this.ownerReferences != null) {this.ownerReferences.clear(); _visitables.remove("ownerReferences"); } - if (ownerReferences != null) {for (V1OwnerReference item :ownerReferences){ this.addToOwnerReferences(item);}} return (A) this; - } - public Boolean hasOwnerReferences() { - return ownerReferences != null && !ownerReferences.isEmpty(); - } - public V1ObjectMetaFluentImpl.OwnerReferencesNested addNewOwnerReference() { - return new V1ObjectMetaFluentImpl.OwnerReferencesNestedImpl(); - } - public V1ObjectMetaFluentImpl.OwnerReferencesNested addNewOwnerReferenceLike(V1OwnerReference item) { - return new V1ObjectMetaFluentImpl.OwnerReferencesNestedImpl(-1, item); - } - public V1ObjectMetaFluentImpl.OwnerReferencesNested setNewOwnerReferenceLike(int index,V1OwnerReference item) { - return new V1ObjectMetaFluentImpl.OwnerReferencesNestedImpl(index, item); - } - public V1ObjectMetaFluentImpl.OwnerReferencesNested editOwnerReference(int index) { - if (ownerReferences.size() <= index) throw new RuntimeException("Can't edit ownerReferences. Index exceeds size."); - return setNewOwnerReferenceLike(index, buildOwnerReference(index)); - } - public V1ObjectMetaFluentImpl.OwnerReferencesNested editFirstOwnerReference() { - if (ownerReferences.size() == 0) throw new RuntimeException("Can't edit first ownerReferences. The list is empty."); - return setNewOwnerReferenceLike(0, buildOwnerReference(0)); - } - public V1ObjectMetaFluentImpl.OwnerReferencesNested editLastOwnerReference() { - int index = ownerReferences.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ownerReferences. The list is empty."); - return setNewOwnerReferenceLike(index, buildOwnerReference(index)); - } - public V1ObjectMetaFluentImpl.OwnerReferencesNested editMatchingOwnerReference(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ManagedFieldsEntryFluentImpl> implements V1ObjectMetaFluentImpl.ManagedFieldsNested,Nested{ - ManagedFieldsNestedImpl(int index,V1ManagedFieldsEntry item) { - this.index = index; - this.builder = new V1ManagedFieldsEntryBuilder(this, item); - } - ManagedFieldsNestedImpl() { - this.index = -1; - this.builder = new V1ManagedFieldsEntryBuilder(this); - } - V1ManagedFieldsEntryBuilder builder; - int index; - public N and() { - return (N) V1ObjectMetaFluentImpl.this.setToManagedFields(index,builder.build()); - } - public N endManagedField() { - return and(); - } - - } - class OwnerReferencesNestedImpl extends V1OwnerReferenceFluentImpl> implements V1ObjectMetaFluentImpl.OwnerReferencesNested,Nested{ - OwnerReferencesNestedImpl(int index,V1OwnerReference item) { - this.index = index; - this.builder = new V1OwnerReferenceBuilder(this, item); - } - OwnerReferencesNestedImpl() { - this.index = -1; - this.builder = new V1OwnerReferenceBuilder(this); - } - V1OwnerReferenceBuilder builder; - int index; - public N and() { - return (N) V1ObjectMetaFluentImpl.this.setToOwnerReferences(index,builder.build()); - } - public N endOwnerReference() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceBuilder.java index fa62cc04ac..f1bc3fd357 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceBuilder.java @@ -1,54 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ObjectReferenceBuilder extends V1ObjectReferenceFluentImpl implements VisitableBuilder{ +public class V1ObjectReferenceBuilder extends V1ObjectReferenceFluent implements VisitableBuilder{ public V1ObjectReferenceBuilder() { - this(false); - } - public V1ObjectReferenceBuilder(Boolean validationEnabled) { - this(new V1ObjectReference(), validationEnabled); + this(new V1ObjectReference()); } + public V1ObjectReferenceBuilder(V1ObjectReferenceFluent fluent) { - this(fluent, false); - } - public V1ObjectReferenceBuilder(V1ObjectReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ObjectReference(), validationEnabled); + this(fluent, new V1ObjectReference()); } + public V1ObjectReferenceBuilder(V1ObjectReferenceFluent fluent,V1ObjectReference instance) { - this(fluent, instance, false); - } - public V1ObjectReferenceBuilder(V1ObjectReferenceFluent fluent,V1ObjectReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withFieldPath(instance.getFieldPath()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - fluent.withResourceVersion(instance.getResourceVersion()); - fluent.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ObjectReferenceBuilder(V1ObjectReference instance) { - this(instance,false); - } - public V1ObjectReferenceBuilder(V1ObjectReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withFieldPath(instance.getFieldPath()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withResourceVersion(instance.getResourceVersion()); - this.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ObjectReferenceFluent fluent; - Boolean validationEnabled; + public V1ObjectReference build() { V1ObjectReference buildable = new V1ObjectReference(); buildable.setApiVersion(fluent.getApiVersion()); @@ -61,4 +33,5 @@ public V1ObjectReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceFluent.java index 22b4530aef..321a24325f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceFluent.java @@ -1,34 +1,165 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ObjectReferenceFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getFieldPath(); - public A withFieldPath(String fieldPath); - public Boolean hasFieldPath(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); - public String getResourceVersion(); - public A withResourceVersion(String resourceVersion); - public Boolean hasResourceVersion(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ObjectReferenceFluent> extends BaseFluent{ + public V1ObjectReferenceFluent() { + } + public V1ObjectReferenceFluent(V1ObjectReference instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String fieldPath; + private String kind; + private String name; + private String namespace; + private String resourceVersion; + private String uid; + + protected void copyInstance(V1ObjectReference instance) { + instance = (instance != null ? instance : new V1ObjectReference()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withFieldPath(instance.getFieldPath()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withResourceVersion(instance.getResourceVersion()); + this.withUid(instance.getUid()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getFieldPath() { + return this.fieldPath; + } + + public A withFieldPath(String fieldPath) { + this.fieldPath = fieldPath; + return (A) this; + } + + public boolean hasFieldPath() { + return this.fieldPath != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public String getResourceVersion() { + return this.resourceVersion; + } + + public A withResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + return (A) this; + } + + public boolean hasResourceVersion() { + return this.resourceVersion != null; + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ObjectReferenceFluent that = (V1ObjectReferenceFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(fieldPath, that.fieldPath)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(resourceVersion, that.resourceVersion)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, fieldPath, kind, name, namespace, resourceVersion, uid, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (fieldPath != null) { sb.append("fieldPath:"); sb.append(fieldPath + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (resourceVersion != null) { sb.append("resourceVersion:"); sb.append(resourceVersion + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceFluentImpl.java deleted file mode 100644 index 8b05abc560..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ObjectReferenceFluentImpl.java +++ /dev/null @@ -1,135 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ObjectReferenceFluentImpl> extends BaseFluent implements V1ObjectReferenceFluent{ - public V1ObjectReferenceFluentImpl() { - } - public V1ObjectReferenceFluentImpl(V1ObjectReference instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withFieldPath(instance.getFieldPath()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withResourceVersion(instance.getResourceVersion()); - this.withUid(instance.getUid()); - } - } - private String apiVersion; - private String fieldPath; - private String kind; - private String name; - private String namespace; - private String resourceVersion; - private String uid; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getFieldPath() { - return this.fieldPath; - } - public A withFieldPath(String fieldPath) { - this.fieldPath=fieldPath; return (A) this; - } - public Boolean hasFieldPath() { - return this.fieldPath != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public String getResourceVersion() { - return this.resourceVersion; - } - public A withResourceVersion(String resourceVersion) { - this.resourceVersion=resourceVersion; return (A) this; - } - public Boolean hasResourceVersion() { - return this.resourceVersion != null; - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ObjectReferenceFluentImpl that = (V1ObjectReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(fieldPath, that.fieldPath)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - if (!java.util.Objects.equals(resourceVersion, that.resourceVersion)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, fieldPath, kind, name, namespace, resourceVersion, uid, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (fieldPath != null) { sb.append("fieldPath:"); sb.append(fieldPath + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } - if (resourceVersion != null) { sb.append("resourceVersion:"); sb.append(resourceVersion + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadBuilder.java index 028440ac29..006bacfd7f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1OverheadBuilder extends V1OverheadFluentImpl implements VisitableBuilder{ +public class V1OverheadBuilder extends V1OverheadFluent implements VisitableBuilder{ public V1OverheadBuilder() { - this(false); - } - public V1OverheadBuilder(Boolean validationEnabled) { - this(new V1Overhead(), validationEnabled); + this(new V1Overhead()); } + public V1OverheadBuilder(V1OverheadFluent fluent) { - this(fluent, false); - } - public V1OverheadBuilder(V1OverheadFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Overhead(), validationEnabled); + this(fluent, new V1Overhead()); } + public V1OverheadBuilder(V1OverheadFluent fluent,V1Overhead instance) { - this(fluent, instance, false); - } - public V1OverheadBuilder(V1OverheadFluent fluent,V1Overhead instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPodFixed(instance.getPodFixed()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1OverheadBuilder(V1Overhead instance) { - this(instance,false); - } - public V1OverheadBuilder(V1Overhead instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPodFixed(instance.getPodFixed()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1OverheadFluent fluent; - Boolean validationEnabled; + public V1Overhead build() { V1Overhead buildable = new V1Overhead(); buildable.setPodFixed(fluent.getPodFixed()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadFluent.java index 241de6f6f4..19a0f8d0e8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadFluent.java @@ -1,23 +1,90 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.custom.Quantity; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; import java.util.Map; import java.util.LinkedHashMap; - /** - * Generated - */ -public interface V1OverheadFluent> extends Fluent{ - public A addToPodFixed(String key,Quantity value); - public A addToPodFixed(Map map); - public A removeFromPodFixed(String key); - public A removeFromPodFixed(Map map); - public Map getPodFixed(); - public A withPodFixed(Map podFixed); - public Boolean hasPodFixed(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1OverheadFluent> extends BaseFluent{ + public V1OverheadFluent() { + } + public V1OverheadFluent(V1Overhead instance) { + this.copyInstance(instance); + } + private Map podFixed; + + protected void copyInstance(V1Overhead instance) { + instance = (instance != null ? instance : new V1Overhead()); + if (instance != null) { + this.withPodFixed(instance.getPodFixed()); + } + } + + public A addToPodFixed(String key,Quantity value) { + if(this.podFixed == null && key != null && value != null) { this.podFixed = new LinkedHashMap(); } + if(key != null && value != null) {this.podFixed.put(key, value);} return (A)this; + } + + public A addToPodFixed(Map map) { + if(this.podFixed == null && map != null) { this.podFixed = new LinkedHashMap(); } + if(map != null) { this.podFixed.putAll(map);} return (A)this; + } + + public A removeFromPodFixed(String key) { + if(this.podFixed == null) { return (A) this; } + if(key != null && this.podFixed != null) {this.podFixed.remove(key);} return (A)this; + } + + public A removeFromPodFixed(Map map) { + if(this.podFixed == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.podFixed != null){this.podFixed.remove(key);}}} return (A)this; + } + + public Map getPodFixed() { + return this.podFixed; + } + + public A withPodFixed(Map podFixed) { + if (podFixed == null) { + this.podFixed = null; + } else { + this.podFixed = new LinkedHashMap(podFixed); + } + return (A) this; + } + + public boolean hasPodFixed() { + return this.podFixed != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1OverheadFluent that = (V1OverheadFluent) o; + if (!java.util.Objects.equals(podFixed, that.podFixed)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(podFixed, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (podFixed != null && !podFixed.isEmpty()) { sb.append("podFixed:"); sb.append(podFixed); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadFluentImpl.java deleted file mode 100644 index 9e7a4ad466..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OverheadFluentImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import io.kubernetes.client.custom.Quantity; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; -import java.util.Map; -import java.util.LinkedHashMap; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1OverheadFluentImpl> extends BaseFluent implements V1OverheadFluent{ - public V1OverheadFluentImpl() { - } - public V1OverheadFluentImpl(V1Overhead instance) { - if (instance != null) { - this.withPodFixed(instance.getPodFixed()); - } - } - private Map podFixed; - public A addToPodFixed(String key,Quantity value) { - if(this.podFixed == null && key != null && value != null) { this.podFixed = new LinkedHashMap(); } - if(key != null && value != null) {this.podFixed.put(key, value);} return (A)this; - } - public A addToPodFixed(Map map) { - if(this.podFixed == null && map != null) { this.podFixed = new LinkedHashMap(); } - if(map != null) { this.podFixed.putAll(map);} return (A)this; - } - public A removeFromPodFixed(String key) { - if(this.podFixed == null) { return (A) this; } - if(key != null && this.podFixed != null) {this.podFixed.remove(key);} return (A)this; - } - public A removeFromPodFixed(Map map) { - if(this.podFixed == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.podFixed != null){this.podFixed.remove(key);}}} return (A)this; - } - public Map getPodFixed() { - return this.podFixed; - } - public A withPodFixed(Map podFixed) { - if (podFixed == null) { this.podFixed = null;} else {this.podFixed = new LinkedHashMap(podFixed);} return (A) this; - } - public Boolean hasPodFixed() { - return this.podFixed != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1OverheadFluentImpl that = (V1OverheadFluentImpl) o; - if (!java.util.Objects.equals(podFixed, that.podFixed)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(podFixed, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (podFixed != null && !podFixed.isEmpty()) { sb.append("podFixed:"); sb.append(podFixed); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceBuilder.java index f8c318d74f..7d292fa113 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1OwnerReferenceBuilder extends V1OwnerReferenceFluentImpl implements VisitableBuilder{ +public class V1OwnerReferenceBuilder extends V1OwnerReferenceFluent implements VisitableBuilder{ public V1OwnerReferenceBuilder() { - this(false); - } - public V1OwnerReferenceBuilder(Boolean validationEnabled) { - this(new V1OwnerReference(), validationEnabled); + this(new V1OwnerReference()); } + public V1OwnerReferenceBuilder(V1OwnerReferenceFluent fluent) { - this(fluent, false); - } - public V1OwnerReferenceBuilder(V1OwnerReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1OwnerReference(), validationEnabled); + this(fluent, new V1OwnerReference()); } + public V1OwnerReferenceBuilder(V1OwnerReferenceFluent fluent,V1OwnerReference instance) { - this(fluent, instance, false); - } - public V1OwnerReferenceBuilder(V1OwnerReferenceFluent fluent,V1OwnerReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withBlockOwnerDeletion(instance.getBlockOwnerDeletion()); - fluent.withController(instance.getController()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1OwnerReferenceBuilder(V1OwnerReference instance) { - this(instance,false); - } - public V1OwnerReferenceBuilder(V1OwnerReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withBlockOwnerDeletion(instance.getBlockOwnerDeletion()); - this.withController(instance.getController()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1OwnerReferenceFluent fluent; - Boolean validationEnabled; + public V1OwnerReference build() { V1OwnerReference buildable = new V1OwnerReference(); buildable.setApiVersion(fluent.getApiVersion()); @@ -58,4 +32,5 @@ public V1OwnerReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceFluent.java index 2271b1bef6..272276b27d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceFluent.java @@ -1,33 +1,157 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1OwnerReferenceFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public Boolean getBlockOwnerDeletion(); - public A withBlockOwnerDeletion(Boolean blockOwnerDeletion); - public Boolean hasBlockOwnerDeletion(); - public Boolean getController(); - public A withController(Boolean controller); - public Boolean hasController(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); - public A withBlockOwnerDeletion(); - public A withController(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1OwnerReferenceFluent> extends BaseFluent{ + public V1OwnerReferenceFluent() { + } + public V1OwnerReferenceFluent(V1OwnerReference instance) { + this.copyInstance(instance); + } + private String apiVersion; + private Boolean blockOwnerDeletion; + private Boolean controller; + private String kind; + private String name; + private String uid; + + protected void copyInstance(V1OwnerReference instance) { + instance = (instance != null ? instance : new V1OwnerReference()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withBlockOwnerDeletion(instance.getBlockOwnerDeletion()); + this.withController(instance.getController()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withUid(instance.getUid()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public Boolean getBlockOwnerDeletion() { + return this.blockOwnerDeletion; + } + + public A withBlockOwnerDeletion(Boolean blockOwnerDeletion) { + this.blockOwnerDeletion = blockOwnerDeletion; + return (A) this; + } + + public boolean hasBlockOwnerDeletion() { + return this.blockOwnerDeletion != null; + } + + public Boolean getController() { + return this.controller; + } + + public A withController(Boolean controller) { + this.controller = controller; + return (A) this; + } + + public boolean hasController() { + return this.controller != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1OwnerReferenceFluent that = (V1OwnerReferenceFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(blockOwnerDeletion, that.blockOwnerDeletion)) return false; + if (!java.util.Objects.equals(controller, that.controller)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, blockOwnerDeletion, controller, kind, name, uid, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (blockOwnerDeletion != null) { sb.append("blockOwnerDeletion:"); sb.append(blockOwnerDeletion + ","); } + if (controller != null) { sb.append("controller:"); sb.append(controller + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid); } + sb.append("}"); + return sb.toString(); + } + + public A withBlockOwnerDeletion() { + return withBlockOwnerDeletion(true); + } + + public A withController() { + return withController(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceFluentImpl.java deleted file mode 100644 index bc50fe6a79..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1OwnerReferenceFluentImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1OwnerReferenceFluentImpl> extends BaseFluent implements V1OwnerReferenceFluent{ - public V1OwnerReferenceFluentImpl() { - } - public V1OwnerReferenceFluentImpl(V1OwnerReference instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withBlockOwnerDeletion(instance.getBlockOwnerDeletion()); - this.withController(instance.getController()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withUid(instance.getUid()); - } - } - private String apiVersion; - private Boolean blockOwnerDeletion; - private Boolean controller; - private String kind; - private String name; - private String uid; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public Boolean getBlockOwnerDeletion() { - return this.blockOwnerDeletion; - } - public A withBlockOwnerDeletion(Boolean blockOwnerDeletion) { - this.blockOwnerDeletion=blockOwnerDeletion; return (A) this; - } - public Boolean hasBlockOwnerDeletion() { - return this.blockOwnerDeletion != null; - } - public Boolean getController() { - return this.controller; - } - public A withController(Boolean controller) { - this.controller=controller; return (A) this; - } - public Boolean hasController() { - return this.controller != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1OwnerReferenceFluentImpl that = (V1OwnerReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(blockOwnerDeletion, that.blockOwnerDeletion)) return false; - - if (!java.util.Objects.equals(controller, that.controller)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, blockOwnerDeletion, controller, kind, name, uid, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (blockOwnerDeletion != null) { sb.append("blockOwnerDeletion:"); sb.append(blockOwnerDeletion + ","); } - if (controller != null) { sb.append("controller:"); sb.append(controller + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid); } - sb.append("}"); - return sb.toString(); - } - public A withBlockOwnerDeletion() { - return withBlockOwnerDeletion(true); - } - public A withController() { - return withController(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeBuilder.java index bfcc222801..bddd3062ee 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeBuilder extends V1PersistentVolumeFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeBuilder extends V1PersistentVolumeFluent implements VisitableBuilder{ public V1PersistentVolumeBuilder() { - this(false); - } - public V1PersistentVolumeBuilder(Boolean validationEnabled) { - this(new V1PersistentVolume(), validationEnabled); + this(new V1PersistentVolume()); } + public V1PersistentVolumeBuilder(V1PersistentVolumeFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeBuilder(V1PersistentVolumeFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolume(), validationEnabled); + this(fluent, new V1PersistentVolume()); } + public V1PersistentVolumeBuilder(V1PersistentVolumeFluent fluent,V1PersistentVolume instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeBuilder(V1PersistentVolumeFluent fluent,V1PersistentVolume instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeBuilder(V1PersistentVolume instance) { - this(instance,false); - } - public V1PersistentVolumeBuilder(V1PersistentVolume instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeFluent fluent; - Boolean validationEnabled; + public V1PersistentVolume build() { V1PersistentVolume buildable = new V1PersistentVolume(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimBuilder.java index 4999546a96..77485612ac 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeClaimBuilder extends V1PersistentVolumeClaimFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeClaimBuilder extends V1PersistentVolumeClaimFluent implements VisitableBuilder{ public V1PersistentVolumeClaimBuilder() { - this(false); - } - public V1PersistentVolumeClaimBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeClaim(), validationEnabled); + this(new V1PersistentVolumeClaim()); } + public V1PersistentVolumeClaimBuilder(V1PersistentVolumeClaimFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeClaimBuilder(V1PersistentVolumeClaimFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeClaim(), validationEnabled); + this(fluent, new V1PersistentVolumeClaim()); } + public V1PersistentVolumeClaimBuilder(V1PersistentVolumeClaimFluent fluent,V1PersistentVolumeClaim instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeClaimBuilder(V1PersistentVolumeClaimFluent fluent,V1PersistentVolumeClaim instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeClaimBuilder(V1PersistentVolumeClaim instance) { - this(instance,false); - } - public V1PersistentVolumeClaimBuilder(V1PersistentVolumeClaim instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeClaimFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeClaim build() { V1PersistentVolumeClaim buildable = new V1PersistentVolumeClaim(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionBuilder.java index 50339c43fb..a60d586e24 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeClaimConditionBuilder extends V1PersistentVolumeClaimConditionFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeClaimConditionBuilder extends V1PersistentVolumeClaimConditionFluent implements VisitableBuilder{ public V1PersistentVolumeClaimConditionBuilder() { - this(false); - } - public V1PersistentVolumeClaimConditionBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeClaimCondition(), validationEnabled); + this(new V1PersistentVolumeClaimCondition()); } + public V1PersistentVolumeClaimConditionBuilder(V1PersistentVolumeClaimConditionFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeClaimConditionBuilder(V1PersistentVolumeClaimConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeClaimCondition(), validationEnabled); + this(fluent, new V1PersistentVolumeClaimCondition()); } + public V1PersistentVolumeClaimConditionBuilder(V1PersistentVolumeClaimConditionFluent fluent,V1PersistentVolumeClaimCondition instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeClaimConditionBuilder(V1PersistentVolumeClaimConditionFluent fluent,V1PersistentVolumeClaimCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastProbeTime(instance.getLastProbeTime()); - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeClaimConditionBuilder(V1PersistentVolumeClaimCondition instance) { - this(instance,false); - } - public V1PersistentVolumeClaimConditionBuilder(V1PersistentVolumeClaimCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastProbeTime(instance.getLastProbeTime()); - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeClaimConditionFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeClaimCondition build() { V1PersistentVolumeClaimCondition buildable = new V1PersistentVolumeClaimCondition(); buildable.setLastProbeTime(fluent.getLastProbeTime()); @@ -58,4 +32,5 @@ public V1PersistentVolumeClaimCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionFluent.java index dda36f75de..3d94ff0e18 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionFluent.java @@ -1,32 +1,149 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PersistentVolumeClaimConditionFluent> extends Fluent{ - public OffsetDateTime getLastProbeTime(); - public A withLastProbeTime(OffsetDateTime lastProbeTime); - public Boolean hasLastProbeTime(); - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeClaimConditionFluent> extends BaseFluent{ + public V1PersistentVolumeClaimConditionFluent() { + } + public V1PersistentVolumeClaimConditionFluent(V1PersistentVolumeClaimCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastProbeTime; + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1PersistentVolumeClaimCondition instance) { + instance = (instance != null ? instance : new V1PersistentVolumeClaimCondition()); + if (instance != null) { + this.withLastProbeTime(instance.getLastProbeTime()); + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastProbeTime() { + return this.lastProbeTime; + } + + public A withLastProbeTime(OffsetDateTime lastProbeTime) { + this.lastProbeTime = lastProbeTime; + return (A) this; + } + + public boolean hasLastProbeTime() { + return this.lastProbeTime != null; + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeClaimConditionFluent that = (V1PersistentVolumeClaimConditionFluent) o; + if (!java.util.Objects.equals(lastProbeTime, that.lastProbeTime)) return false; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastProbeTime, lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastProbeTime != null) { sb.append("lastProbeTime:"); sb.append(lastProbeTime + ","); } + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionFluentImpl.java deleted file mode 100644 index 3c2e17c813..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimConditionFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeClaimConditionFluentImpl> extends BaseFluent implements V1PersistentVolumeClaimConditionFluent{ - public V1PersistentVolumeClaimConditionFluentImpl() { - } - public V1PersistentVolumeClaimConditionFluentImpl(V1PersistentVolumeClaimCondition instance) { - if (instance != null) { - this.withLastProbeTime(instance.getLastProbeTime()); - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastProbeTime; - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastProbeTime() { - return this.lastProbeTime; - } - public A withLastProbeTime(OffsetDateTime lastProbeTime) { - this.lastProbeTime=lastProbeTime; return (A) this; - } - public Boolean hasLastProbeTime() { - return this.lastProbeTime != null; - } - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeClaimConditionFluentImpl that = (V1PersistentVolumeClaimConditionFluentImpl) o; - if (!java.util.Objects.equals(lastProbeTime, that.lastProbeTime)) return false; - - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastProbeTime, lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastProbeTime != null) { sb.append("lastProbeTime:"); sb.append(lastProbeTime + ","); } - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimFluent.java index 384299cca1..cd916a4dc1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1PersistentVolumeClaimFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1PersistentVolumeClaimFluent.MetadataNested withNewMetadata(); - public V1PersistentVolumeClaimFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1PersistentVolumeClaimFluent.MetadataNested editMetadata(); - public V1PersistentVolumeClaimFluent.MetadataNested editOrNewMetadata(); - public V1PersistentVolumeClaimFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimSpec getSpec(); - public V1PersistentVolumeClaimSpec buildSpec(); - public A withSpec(V1PersistentVolumeClaimSpec spec); - public Boolean hasSpec(); - public V1PersistentVolumeClaimFluent.SpecNested withNewSpec(); - public V1PersistentVolumeClaimFluent.SpecNested withNewSpecLike(V1PersistentVolumeClaimSpec item); - public V1PersistentVolumeClaimFluent.SpecNested editSpec(); - public V1PersistentVolumeClaimFluent.SpecNested editOrNewSpec(); - public V1PersistentVolumeClaimFluent.SpecNested editOrNewSpecLike(V1PersistentVolumeClaimSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimStatus getStatus(); - public V1PersistentVolumeClaimStatus buildStatus(); - public A withStatus(V1PersistentVolumeClaimStatus status); - public Boolean hasStatus(); - public V1PersistentVolumeClaimFluent.StatusNested withNewStatus(); - public V1PersistentVolumeClaimFluent.StatusNested withNewStatusLike(V1PersistentVolumeClaimStatus item); - public V1PersistentVolumeClaimFluent.StatusNested editStatus(); - public V1PersistentVolumeClaimFluent.StatusNested editOrNewStatus(); - public V1PersistentVolumeClaimFluent.StatusNested editOrNewStatusLike(V1PersistentVolumeClaimStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeClaimFluent> extends BaseFluent{ + public V1PersistentVolumeClaimFluent() { + } + + public V1PersistentVolumeClaimFluent(V1PersistentVolumeClaim instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1PersistentVolumeClaimSpecBuilder spec; + private V1PersistentVolumeClaimStatusBuilder status; + + protected void copyInstance(V1PersistentVolumeClaim instance) { + instance = (instance != null ? instance : new V1PersistentVolumeClaim()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1PersistentVolumeClaimSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1PersistentVolumeClaimSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1PersistentVolumeClaimSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1PersistentVolumeClaimSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1PersistentVolumeClaimSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1PersistentVolumeClaimSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1PersistentVolumeClaimSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1PersistentVolumeClaimStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1PersistentVolumeClaimStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1PersistentVolumeClaimStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1PersistentVolumeClaimStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1PersistentVolumeClaimStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1PersistentVolumeClaimStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeClaimFluent that = (V1PersistentVolumeClaimFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1PersistentVolumeClaimFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1PersistentVolumeClaimStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1PersistentVolumeClaimSpecFluent> implements Nested{ + SpecNested(V1PersistentVolumeClaimSpec item) { + this.builder = new V1PersistentVolumeClaimSpecBuilder(this, item); + } + V1PersistentVolumeClaimSpecBuilder builder; + + public N and() { + return (N) V1PersistentVolumeClaimFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1PersistentVolumeClaimStatusFluent> implements Nested{ + StatusNested(V1PersistentVolumeClaimStatus item) { + this.builder = new V1PersistentVolumeClaimStatusBuilder(this, item); + } + V1PersistentVolumeClaimStatusBuilder builder; + + public N and() { + return (N) V1PersistentVolumeClaimFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimFluentImpl.java deleted file mode 100644 index 0734e4556e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeClaimFluentImpl> extends BaseFluent implements V1PersistentVolumeClaimFluent{ - public V1PersistentVolumeClaimFluentImpl() { - } - public V1PersistentVolumeClaimFluentImpl(V1PersistentVolumeClaim instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1PersistentVolumeClaimSpecBuilder spec; - private V1PersistentVolumeClaimStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1PersistentVolumeClaimFluentImpl.MetadataNested withNewMetadata() { - return new V1PersistentVolumeClaimFluentImpl.MetadataNestedImpl(); - } - public V1PersistentVolumeClaimFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1PersistentVolumeClaimFluentImpl.MetadataNestedImpl(item); - } - public V1PersistentVolumeClaimFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PersistentVolumeClaimFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1PersistentVolumeClaimFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1PersistentVolumeClaimSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1PersistentVolumeClaimSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1PersistentVolumeClaimSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1PersistentVolumeClaimFluentImpl.SpecNested withNewSpec() { - return new V1PersistentVolumeClaimFluentImpl.SpecNestedImpl(); - } - public V1PersistentVolumeClaimFluentImpl.SpecNested withNewSpecLike(V1PersistentVolumeClaimSpec item) { - return new V1PersistentVolumeClaimFluentImpl.SpecNestedImpl(item); - } - public V1PersistentVolumeClaimFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1PersistentVolumeClaimFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1PersistentVolumeClaimSpecBuilder().build()); - } - public V1PersistentVolumeClaimFluentImpl.SpecNested editOrNewSpecLike(V1PersistentVolumeClaimSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1PersistentVolumeClaimStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1PersistentVolumeClaimStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1PersistentVolumeClaimStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1PersistentVolumeClaimFluentImpl.StatusNested withNewStatus() { - return new V1PersistentVolumeClaimFluentImpl.StatusNestedImpl(); - } - public V1PersistentVolumeClaimFluentImpl.StatusNested withNewStatusLike(V1PersistentVolumeClaimStatus item) { - return new V1PersistentVolumeClaimFluentImpl.StatusNestedImpl(item); - } - public V1PersistentVolumeClaimFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1PersistentVolumeClaimFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1PersistentVolumeClaimStatusBuilder().build()); - } - public V1PersistentVolumeClaimFluentImpl.StatusNested editOrNewStatusLike(V1PersistentVolumeClaimStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeClaimFluentImpl that = (V1PersistentVolumeClaimFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1PersistentVolumeClaimFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1PersistentVolumeClaimSpecFluentImpl> implements V1PersistentVolumeClaimFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1PersistentVolumeClaimSpec item) { - this.builder = new V1PersistentVolumeClaimSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1PersistentVolumeClaimSpecBuilder(this); - } - V1PersistentVolumeClaimSpecBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1PersistentVolumeClaimStatusFluentImpl> implements V1PersistentVolumeClaimFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1PersistentVolumeClaimStatus item) { - this.builder = new V1PersistentVolumeClaimStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1PersistentVolumeClaimStatusBuilder(this); - } - V1PersistentVolumeClaimStatusBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListBuilder.java index 201fe258b8..7c30fd749b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeClaimListBuilder extends V1PersistentVolumeClaimListFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeClaimListBuilder extends V1PersistentVolumeClaimListFluent implements VisitableBuilder{ public V1PersistentVolumeClaimListBuilder() { - this(false); - } - public V1PersistentVolumeClaimListBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeClaimList(), validationEnabled); + this(new V1PersistentVolumeClaimList()); } + public V1PersistentVolumeClaimListBuilder(V1PersistentVolumeClaimListFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeClaimListBuilder(V1PersistentVolumeClaimListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeClaimList(), validationEnabled); + this(fluent, new V1PersistentVolumeClaimList()); } + public V1PersistentVolumeClaimListBuilder(V1PersistentVolumeClaimListFluent fluent,V1PersistentVolumeClaimList instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeClaimListBuilder(V1PersistentVolumeClaimListFluent fluent,V1PersistentVolumeClaimList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeClaimListBuilder(V1PersistentVolumeClaimList instance) { - this(instance,false); - } - public V1PersistentVolumeClaimListBuilder(V1PersistentVolumeClaimList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeClaimListFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeClaimList build() { V1PersistentVolumeClaimList buildable = new V1PersistentVolumeClaimList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListFluent.java index 655c75e702..7f8d33bafa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PersistentVolumeClaimListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1PersistentVolumeClaim item); - public A setToItems(int index,V1PersistentVolumeClaim item); - public A addToItems(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1PersistentVolumeClaim buildItem(int index); - public V1PersistentVolumeClaim buildFirstItem(); - public V1PersistentVolumeClaim buildLastItem(); - public V1PersistentVolumeClaim buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items); - public Boolean hasItems(); - public V1PersistentVolumeClaimListFluent.ItemsNested addNewItem(); - public V1PersistentVolumeClaimListFluent.ItemsNested addNewItemLike(V1PersistentVolumeClaim item); - public V1PersistentVolumeClaimListFluent.ItemsNested setNewItemLike(int index,V1PersistentVolumeClaim item); - public V1PersistentVolumeClaimListFluent.ItemsNested editItem(int index); - public V1PersistentVolumeClaimListFluent.ItemsNested editFirstItem(); - public V1PersistentVolumeClaimListFluent.ItemsNested editLastItem(); - public V1PersistentVolumeClaimListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1PersistentVolumeClaimListFluent.MetadataNested withNewMetadata(); - public V1PersistentVolumeClaimListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1PersistentVolumeClaimListFluent.MetadataNested editMetadata(); - public V1PersistentVolumeClaimListFluent.MetadataNested editOrNewMetadata(); - public V1PersistentVolumeClaimListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1PersistentVolumeClaimFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeClaimListFluent> extends BaseFluent{ + public V1PersistentVolumeClaimListFluent() { + } + + public V1PersistentVolumeClaimListFluent(V1PersistentVolumeClaimList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1PersistentVolumeClaimList instance) { + instance = (instance != null ? instance : new V1PersistentVolumeClaimList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1PersistentVolumeClaim item) { + if (this.items == null) {this.items = new ArrayList();} + V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1PersistentVolumeClaim item) { + if (this.items == null) {this.items = new ArrayList();} + V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { + if (this.items == null) return (A)this; + for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1PersistentVolumeClaimBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1PersistentVolumeClaim buildItem(int index) { + return this.items.get(index).build(); + } + + public V1PersistentVolumeClaim buildFirstItem() { + return this.items.get(0).build(); + } + + public V1PersistentVolumeClaim buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1PersistentVolumeClaim buildMatchingItem(Predicate predicate) { + for (V1PersistentVolumeClaimBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1PersistentVolumeClaimBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1PersistentVolumeClaim item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1PersistentVolumeClaim item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1PersistentVolumeClaim item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1PersistentVolumeClaim item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeClaimListFluent that = (V1PersistentVolumeClaimListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1PersistentVolumeClaimFluent> implements Nested{ + ItemsNested(int index,V1PersistentVolumeClaim item) { + this.index = index; + this.builder = new V1PersistentVolumeClaimBuilder(this, item); + } + V1PersistentVolumeClaimBuilder builder; + int index; + public N and() { + return (N) V1PersistentVolumeClaimListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1PersistentVolumeClaimListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListFluentImpl.java deleted file mode 100644 index 374eab0f17..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeClaimListFluentImpl> extends BaseFluent implements V1PersistentVolumeClaimListFluent{ - public V1PersistentVolumeClaimListFluentImpl() { - } - public V1PersistentVolumeClaimListFluentImpl(V1PersistentVolumeClaimList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1PersistentVolumeClaim item) { - if (this.items == null) {this.items = new ArrayList();} - V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1PersistentVolumeClaim item) { - if (this.items == null) {this.items = new ArrayList();} - V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { - for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1PersistentVolumeClaimBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1PersistentVolumeClaim buildItem(int index) { - return this.items.get(index).build(); - } - public V1PersistentVolumeClaim buildFirstItem() { - return this.items.get(0).build(); - } - public V1PersistentVolumeClaim buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1PersistentVolumeClaim buildMatchingItem(Predicate predicate) { - for (V1PersistentVolumeClaimBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1PersistentVolumeClaimBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1PersistentVolumeClaim item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1PersistentVolumeClaim item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1PersistentVolumeClaimListFluentImpl.ItemsNested addNewItem() { - return new V1PersistentVolumeClaimListFluentImpl.ItemsNestedImpl(); - } - public V1PersistentVolumeClaimListFluentImpl.ItemsNested addNewItemLike(V1PersistentVolumeClaim item) { - return new V1PersistentVolumeClaimListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1PersistentVolumeClaimListFluentImpl.ItemsNested setNewItemLike(int index,V1PersistentVolumeClaim item) { - return new V1PersistentVolumeClaimListFluentImpl.ItemsNestedImpl(index, item); - } - public V1PersistentVolumeClaimListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1PersistentVolumeClaimListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1PersistentVolumeClaimListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1PersistentVolumeClaimListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1PersistentVolumeClaimListFluentImpl.MetadataNestedImpl(); - } - public V1PersistentVolumeClaimListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1PersistentVolumeClaimListFluentImpl.MetadataNestedImpl(item); - } - public V1PersistentVolumeClaimListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PersistentVolumeClaimListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1PersistentVolumeClaimListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeClaimListFluentImpl that = (V1PersistentVolumeClaimListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1PersistentVolumeClaimFluentImpl> implements V1PersistentVolumeClaimListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1PersistentVolumeClaim item) { - this.index = index; - this.builder = new V1PersistentVolumeClaimBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1PersistentVolumeClaimBuilder(this); - } - V1PersistentVolumeClaimBuilder builder; - int index; - public N and() { - return (N) V1PersistentVolumeClaimListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1PersistentVolumeClaimListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecBuilder.java index 14f3ea83dd..bf94295b01 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecBuilder.java @@ -1,67 +1,38 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeClaimSpecBuilder extends V1PersistentVolumeClaimSpecFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeClaimSpecBuilder extends V1PersistentVolumeClaimSpecFluent implements VisitableBuilder{ public V1PersistentVolumeClaimSpecBuilder() { - this(false); - } - public V1PersistentVolumeClaimSpecBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeClaimSpec(), validationEnabled); + this(new V1PersistentVolumeClaimSpec()); } + public V1PersistentVolumeClaimSpecBuilder(V1PersistentVolumeClaimSpecFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeClaimSpecBuilder(V1PersistentVolumeClaimSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeClaimSpec(), validationEnabled); + this(fluent, new V1PersistentVolumeClaimSpec()); } + public V1PersistentVolumeClaimSpecBuilder(V1PersistentVolumeClaimSpecFluent fluent,V1PersistentVolumeClaimSpec instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeClaimSpecBuilder(V1PersistentVolumeClaimSpecFluent fluent,V1PersistentVolumeClaimSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAccessModes(instance.getAccessModes()); - fluent.withDataSource(instance.getDataSource()); - fluent.withDataSourceRef(instance.getDataSourceRef()); - fluent.withResources(instance.getResources()); - fluent.withSelector(instance.getSelector()); - fluent.withStorageClassName(instance.getStorageClassName()); - fluent.withVolumeMode(instance.getVolumeMode()); - fluent.withVolumeName(instance.getVolumeName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeClaimSpecBuilder(V1PersistentVolumeClaimSpec instance) { - this(instance,false); - } - public V1PersistentVolumeClaimSpecBuilder(V1PersistentVolumeClaimSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAccessModes(instance.getAccessModes()); - this.withDataSource(instance.getDataSource()); - this.withDataSourceRef(instance.getDataSourceRef()); - this.withResources(instance.getResources()); - this.withSelector(instance.getSelector()); - this.withStorageClassName(instance.getStorageClassName()); - this.withVolumeMode(instance.getVolumeMode()); - this.withVolumeName(instance.getVolumeName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeClaimSpecFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeClaimSpec build() { V1PersistentVolumeClaimSpec buildable = new V1PersistentVolumeClaimSpec(); buildable.setAccessModes(fluent.getAccessModes()); - buildable.setDataSource(fluent.getDataSource()); - buildable.setDataSourceRef(fluent.getDataSourceRef()); - buildable.setResources(fluent.getResources()); - buildable.setSelector(fluent.getSelector()); + buildable.setDataSource(fluent.buildDataSource()); + buildable.setDataSourceRef(fluent.buildDataSourceRef()); + buildable.setResources(fluent.buildResources()); + buildable.setSelector(fluent.buildSelector()); buildable.setStorageClassName(fluent.getStorageClassName()); buildable.setVolumeMode(fluent.getVolumeMode()); buildable.setVolumeName(fluent.getVolumeName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecFluent.java index 0cf233a13d..3ee0d31b9c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecFluent.java @@ -1,123 +1,439 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; -import java.util.Collection; +import io.kubernetes.client.fluent.BaseFluent; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1PersistentVolumeClaimSpecFluent> extends Fluent{ - public A addToAccessModes(int index,String item); - public A setToAccessModes(int index,String item); - public A addToAccessModes(java.lang.String... items); - public A addAllToAccessModes(Collection items); - public A removeFromAccessModes(java.lang.String... items); - public A removeAllFromAccessModes(Collection items); - public List getAccessModes(); - public String getAccessMode(int index); - public String getFirstAccessMode(); - public String getLastAccessMode(); - public String getMatchingAccessMode(Predicate predicate); - public Boolean hasMatchingAccessMode(Predicate predicate); - public A withAccessModes(List accessModes); - public A withAccessModes(java.lang.String... accessModes); - public Boolean hasAccessModes(); - - /** - * This method has been deprecated, please use method buildDataSource instead. - * @return The buildable object. - */ - @Deprecated - public V1TypedLocalObjectReference getDataSource(); - public V1TypedLocalObjectReference buildDataSource(); - public A withDataSource(V1TypedLocalObjectReference dataSource); - public Boolean hasDataSource(); - public V1PersistentVolumeClaimSpecFluent.DataSourceNested withNewDataSource(); - public V1PersistentVolumeClaimSpecFluent.DataSourceNested withNewDataSourceLike(V1TypedLocalObjectReference item); - public V1PersistentVolumeClaimSpecFluent.DataSourceNested editDataSource(); - public V1PersistentVolumeClaimSpecFluent.DataSourceNested editOrNewDataSource(); - public V1PersistentVolumeClaimSpecFluent.DataSourceNested editOrNewDataSourceLike(V1TypedLocalObjectReference item); - - /** - * This method has been deprecated, please use method buildDataSourceRef instead. - * @return The buildable object. - */ - @Deprecated - public V1TypedObjectReference getDataSourceRef(); - public V1TypedObjectReference buildDataSourceRef(); - public A withDataSourceRef(V1TypedObjectReference dataSourceRef); - public Boolean hasDataSourceRef(); - public V1PersistentVolumeClaimSpecFluent.DataSourceRefNested withNewDataSourceRef(); - public V1PersistentVolumeClaimSpecFluent.DataSourceRefNested withNewDataSourceRefLike(V1TypedObjectReference item); - public V1PersistentVolumeClaimSpecFluent.DataSourceRefNested editDataSourceRef(); - public V1PersistentVolumeClaimSpecFluent.DataSourceRefNested editOrNewDataSourceRef(); - public V1PersistentVolumeClaimSpecFluent.DataSourceRefNested editOrNewDataSourceRefLike(V1TypedObjectReference item); - - /** - * This method has been deprecated, please use method buildResources instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceRequirements getResources(); - public V1ResourceRequirements buildResources(); - public A withResources(V1ResourceRequirements resources); - public Boolean hasResources(); - public V1PersistentVolumeClaimSpecFluent.ResourcesNested withNewResources(); - public V1PersistentVolumeClaimSpecFluent.ResourcesNested withNewResourcesLike(V1ResourceRequirements item); - public V1PersistentVolumeClaimSpecFluent.ResourcesNested editResources(); - public V1PersistentVolumeClaimSpecFluent.ResourcesNested editOrNewResources(); - public V1PersistentVolumeClaimSpecFluent.ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item); - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector(); - public V1LabelSelector buildSelector(); - public A withSelector(V1LabelSelector selector); - public Boolean hasSelector(); - public V1PersistentVolumeClaimSpecFluent.SelectorNested withNewSelector(); - public V1PersistentVolumeClaimSpecFluent.SelectorNested withNewSelectorLike(V1LabelSelector item); - public V1PersistentVolumeClaimSpecFluent.SelectorNested editSelector(); - public V1PersistentVolumeClaimSpecFluent.SelectorNested editOrNewSelector(); - public V1PersistentVolumeClaimSpecFluent.SelectorNested editOrNewSelectorLike(V1LabelSelector item); - public String getStorageClassName(); - public A withStorageClassName(String storageClassName); - public Boolean hasStorageClassName(); - public String getVolumeMode(); - public A withVolumeMode(String volumeMode); - public Boolean hasVolumeMode(); - public String getVolumeName(); - public A withVolumeName(String volumeName); - public Boolean hasVolumeName(); - public interface DataSourceNested extends Nested,V1TypedLocalObjectReferenceFluent>{ - public N and(); - public N endDataSource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeClaimSpecFluent> extends BaseFluent{ + public V1PersistentVolumeClaimSpecFluent() { + } + + public V1PersistentVolumeClaimSpecFluent(V1PersistentVolumeClaimSpec instance) { + this.copyInstance(instance); + } + private List accessModes; + private V1TypedLocalObjectReferenceBuilder dataSource; + private V1TypedObjectReferenceBuilder dataSourceRef; + private V1ResourceRequirementsBuilder resources; + private V1LabelSelectorBuilder selector; + private String storageClassName; + private String volumeMode; + private String volumeName; + + protected void copyInstance(V1PersistentVolumeClaimSpec instance) { + instance = (instance != null ? instance : new V1PersistentVolumeClaimSpec()); + if (instance != null) { + this.withAccessModes(instance.getAccessModes()); + this.withDataSource(instance.getDataSource()); + this.withDataSourceRef(instance.getDataSourceRef()); + this.withResources(instance.getResources()); + this.withSelector(instance.getSelector()); + this.withStorageClassName(instance.getStorageClassName()); + this.withVolumeMode(instance.getVolumeMode()); + this.withVolumeName(instance.getVolumeName()); + } + } + + public A addToAccessModes(int index,String item) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + this.accessModes.add(index, item); + return (A)this; + } + + public A setToAccessModes(int index,String item) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + this.accessModes.set(index, item); return (A)this; + } + + public A addToAccessModes(java.lang.String... items) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + for (String item : items) {this.accessModes.add(item);} return (A)this; + } + + public A addAllToAccessModes(Collection items) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + for (String item : items) {this.accessModes.add(item);} return (A)this; + } + + public A removeFromAccessModes(java.lang.String... items) { + if (this.accessModes == null) return (A)this; + for (String item : items) { this.accessModes.remove(item);} return (A)this; + } + + public A removeAllFromAccessModes(Collection items) { + if (this.accessModes == null) return (A)this; + for (String item : items) { this.accessModes.remove(item);} return (A)this; + } + + public List getAccessModes() { + return this.accessModes; + } + + public String getAccessMode(int index) { + return this.accessModes.get(index); + } + + public String getFirstAccessMode() { + return this.accessModes.get(0); + } + + public String getLastAccessMode() { + return this.accessModes.get(accessModes.size() - 1); + } + + public String getMatchingAccessMode(Predicate predicate) { + for (String item : accessModes) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAccessMode(Predicate predicate) { + for (String item : accessModes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAccessModes(List accessModes) { + if (accessModes != null) { + this.accessModes = new ArrayList(); + for (String item : accessModes) { + this.addToAccessModes(item); + } + } else { + this.accessModes = null; + } + return (A) this; + } + + public A withAccessModes(java.lang.String... accessModes) { + if (this.accessModes != null) { + this.accessModes.clear(); + _visitables.remove("accessModes"); + } + if (accessModes != null) { + for (String item : accessModes) { + this.addToAccessModes(item); + } + } + return (A) this; } - public interface DataSourceRefNested extends Nested,V1TypedObjectReferenceFluent>{ - public N and(); - public N endDataSourceRef(); + + public boolean hasAccessModes() { + return this.accessModes != null && !this.accessModes.isEmpty(); + } + + public V1TypedLocalObjectReference buildDataSource() { + return this.dataSource != null ? this.dataSource.build() : null; + } + + public A withDataSource(V1TypedLocalObjectReference dataSource) { + this._visitables.remove("dataSource"); + if (dataSource != null) { + this.dataSource = new V1TypedLocalObjectReferenceBuilder(dataSource); + this._visitables.get("dataSource").add(this.dataSource); + } else { + this.dataSource = null; + this._visitables.get("dataSource").remove(this.dataSource); + } + return (A) this; + } + + public boolean hasDataSource() { + return this.dataSource != null; + } + + public DataSourceNested withNewDataSource() { + return new DataSourceNested(null); + } + + public DataSourceNested withNewDataSourceLike(V1TypedLocalObjectReference item) { + return new DataSourceNested(item); + } + + public DataSourceNested editDataSource() { + return withNewDataSourceLike(java.util.Optional.ofNullable(buildDataSource()).orElse(null)); + } + + public DataSourceNested editOrNewDataSource() { + return withNewDataSourceLike(java.util.Optional.ofNullable(buildDataSource()).orElse(new V1TypedLocalObjectReferenceBuilder().build())); + } + + public DataSourceNested editOrNewDataSourceLike(V1TypedLocalObjectReference item) { + return withNewDataSourceLike(java.util.Optional.ofNullable(buildDataSource()).orElse(item)); + } + + public V1TypedObjectReference buildDataSourceRef() { + return this.dataSourceRef != null ? this.dataSourceRef.build() : null; + } + + public A withDataSourceRef(V1TypedObjectReference dataSourceRef) { + this._visitables.remove("dataSourceRef"); + if (dataSourceRef != null) { + this.dataSourceRef = new V1TypedObjectReferenceBuilder(dataSourceRef); + this._visitables.get("dataSourceRef").add(this.dataSourceRef); + } else { + this.dataSourceRef = null; + this._visitables.get("dataSourceRef").remove(this.dataSourceRef); + } + return (A) this; + } + + public boolean hasDataSourceRef() { + return this.dataSourceRef != null; + } + + public DataSourceRefNested withNewDataSourceRef() { + return new DataSourceRefNested(null); + } + + public DataSourceRefNested withNewDataSourceRefLike(V1TypedObjectReference item) { + return new DataSourceRefNested(item); + } + + public DataSourceRefNested editDataSourceRef() { + return withNewDataSourceRefLike(java.util.Optional.ofNullable(buildDataSourceRef()).orElse(null)); + } + + public DataSourceRefNested editOrNewDataSourceRef() { + return withNewDataSourceRefLike(java.util.Optional.ofNullable(buildDataSourceRef()).orElse(new V1TypedObjectReferenceBuilder().build())); + } + + public DataSourceRefNested editOrNewDataSourceRefLike(V1TypedObjectReference item) { + return withNewDataSourceRefLike(java.util.Optional.ofNullable(buildDataSourceRef()).orElse(item)); + } + + public V1ResourceRequirements buildResources() { + return this.resources != null ? this.resources.build() : null; + } + + public A withResources(V1ResourceRequirements resources) { + this._visitables.remove("resources"); + if (resources != null) { + this.resources = new V1ResourceRequirementsBuilder(resources); + this._visitables.get("resources").add(this.resources); + } else { + this.resources = null; + this._visitables.get("resources").remove(this.resources); + } + return (A) this; + } + + public boolean hasResources() { + return this.resources != null; + } + + public ResourcesNested withNewResources() { + return new ResourcesNested(null); + } + + public ResourcesNested withNewResourcesLike(V1ResourceRequirements item) { + return new ResourcesNested(item); + } + + public ResourcesNested editResources() { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(null)); + } + + public ResourcesNested editOrNewResources() { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(new V1ResourceRequirementsBuilder().build())); + } + + public ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item) { + return withNewResourcesLike(java.util.Optional.ofNullable(buildResources()).orElse(item)); + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); + } + + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); + } + + public String getStorageClassName() { + return this.storageClassName; + } + + public A withStorageClassName(String storageClassName) { + this.storageClassName = storageClassName; + return (A) this; + } + + public boolean hasStorageClassName() { + return this.storageClassName != null; + } + + public String getVolumeMode() { + return this.volumeMode; + } + + public A withVolumeMode(String volumeMode) { + this.volumeMode = volumeMode; + return (A) this; + } + + public boolean hasVolumeMode() { + return this.volumeMode != null; + } + + public String getVolumeName() { + return this.volumeName; + } + + public A withVolumeName(String volumeName) { + this.volumeName = volumeName; + return (A) this; + } + + public boolean hasVolumeName() { + return this.volumeName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeClaimSpecFluent that = (V1PersistentVolumeClaimSpecFluent) o; + if (!java.util.Objects.equals(accessModes, that.accessModes)) return false; + if (!java.util.Objects.equals(dataSource, that.dataSource)) return false; + if (!java.util.Objects.equals(dataSourceRef, that.dataSourceRef)) return false; + if (!java.util.Objects.equals(resources, that.resources)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + if (!java.util.Objects.equals(storageClassName, that.storageClassName)) return false; + if (!java.util.Objects.equals(volumeMode, that.volumeMode)) return false; + if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(accessModes, dataSource, dataSourceRef, resources, selector, storageClassName, volumeMode, volumeName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (accessModes != null && !accessModes.isEmpty()) { sb.append("accessModes:"); sb.append(accessModes + ","); } + if (dataSource != null) { sb.append("dataSource:"); sb.append(dataSource + ","); } + if (dataSourceRef != null) { sb.append("dataSourceRef:"); sb.append(dataSourceRef + ","); } + if (resources != null) { sb.append("resources:"); sb.append(resources + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } + if (storageClassName != null) { sb.append("storageClassName:"); sb.append(storageClassName + ","); } + if (volumeMode != null) { sb.append("volumeMode:"); sb.append(volumeMode + ","); } + if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName); } + sb.append("}"); + return sb.toString(); + } + public class DataSourceNested extends V1TypedLocalObjectReferenceFluent> implements Nested{ + DataSourceNested(V1TypedLocalObjectReference item) { + this.builder = new V1TypedLocalObjectReferenceBuilder(this, item); + } + V1TypedLocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeClaimSpecFluent.this.withDataSource(builder.build()); + } + + public N endDataSource() { + return and(); + } + } - public interface ResourcesNested extends Nested,V1ResourceRequirementsFluent>{ - public N and(); - public N endResources(); + public class DataSourceRefNested extends V1TypedObjectReferenceFluent> implements Nested{ + DataSourceRefNested(V1TypedObjectReference item) { + this.builder = new V1TypedObjectReferenceBuilder(this, item); + } + V1TypedObjectReferenceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeClaimSpecFluent.this.withDataSourceRef(builder.build()); + } + public N endDataSourceRef() { + return and(); + } + + } - public interface SelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endSelector(); + public class ResourcesNested extends V1ResourceRequirementsFluent> implements Nested{ + ResourcesNested(V1ResourceRequirements item) { + this.builder = new V1ResourceRequirementsBuilder(this, item); + } + V1ResourceRequirementsBuilder builder; + public N and() { + return (N) V1PersistentVolumeClaimSpecFluent.this.withResources(builder.build()); + } + + public N endResources() { + return and(); + } + + } + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1PersistentVolumeClaimSpecFluent.this.withSelector(builder.build()); + } + + public N endSelector() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecFluentImpl.java deleted file mode 100644 index fdf50fb26e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimSpecFluentImpl.java +++ /dev/null @@ -1,361 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeClaimSpecFluentImpl> extends BaseFluent implements V1PersistentVolumeClaimSpecFluent{ - public V1PersistentVolumeClaimSpecFluentImpl() { - } - public V1PersistentVolumeClaimSpecFluentImpl(V1PersistentVolumeClaimSpec instance) { - if (instance != null) { - this.withAccessModes(instance.getAccessModes()); - this.withDataSource(instance.getDataSource()); - this.withDataSourceRef(instance.getDataSourceRef()); - this.withResources(instance.getResources()); - this.withSelector(instance.getSelector()); - this.withStorageClassName(instance.getStorageClassName()); - this.withVolumeMode(instance.getVolumeMode()); - this.withVolumeName(instance.getVolumeName()); - } - } - private List accessModes; - private V1TypedLocalObjectReferenceBuilder dataSource; - private V1TypedObjectReferenceBuilder dataSourceRef; - private V1ResourceRequirementsBuilder resources; - private V1LabelSelectorBuilder selector; - private String storageClassName; - private String volumeMode; - private String volumeName; - public A addToAccessModes(int index,String item) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - this.accessModes.add(index, item); - return (A)this; - } - public A setToAccessModes(int index,String item) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - this.accessModes.set(index, item); return (A)this; - } - public A addToAccessModes(java.lang.String... items) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - for (String item : items) {this.accessModes.add(item);} return (A)this; - } - public A addAllToAccessModes(Collection items) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - for (String item : items) {this.accessModes.add(item);} return (A)this; - } - public A removeFromAccessModes(java.lang.String... items) { - for (String item : items) {if (this.accessModes!= null){ this.accessModes.remove(item);}} return (A)this; - } - public A removeAllFromAccessModes(Collection items) { - for (String item : items) {if (this.accessModes!= null){ this.accessModes.remove(item);}} return (A)this; - } - public List getAccessModes() { - return this.accessModes; - } - public String getAccessMode(int index) { - return this.accessModes.get(index); - } - public String getFirstAccessMode() { - return this.accessModes.get(0); - } - public String getLastAccessMode() { - return this.accessModes.get(accessModes.size() - 1); - } - public String getMatchingAccessMode(Predicate predicate) { - for (String item: accessModes) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAccessMode(Predicate predicate) { - for (String item: accessModes) { if(predicate.test(item)){ return true;} } return false; - } - public A withAccessModes(List accessModes) { - if (accessModes != null) {this.accessModes = new ArrayList(); for (String item : accessModes){this.addToAccessModes(item);}} else { this.accessModes = null;} return (A) this; - } - public A withAccessModes(java.lang.String... accessModes) { - if (this.accessModes != null) {this.accessModes.clear(); _visitables.remove("accessModes"); } - if (accessModes != null) {for (String item :accessModes){ this.addToAccessModes(item);}} return (A) this; - } - public Boolean hasAccessModes() { - return accessModes != null && !accessModes.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildDataSource instead. - * @return The buildable object. - */ - @Deprecated - public V1TypedLocalObjectReference getDataSource() { - return this.dataSource!=null ?this.dataSource.build():null; - } - public V1TypedLocalObjectReference buildDataSource() { - return this.dataSource!=null ?this.dataSource.build():null; - } - public A withDataSource(V1TypedLocalObjectReference dataSource) { - _visitables.get("dataSource").remove(this.dataSource); - if (dataSource!=null){ this.dataSource= new V1TypedLocalObjectReferenceBuilder(dataSource); _visitables.get("dataSource").add(this.dataSource);} else { this.dataSource = null; _visitables.get("dataSource").remove(this.dataSource); } return (A) this; - } - public Boolean hasDataSource() { - return this.dataSource != null; - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceNested withNewDataSource() { - return new V1PersistentVolumeClaimSpecFluentImpl.DataSourceNestedImpl(); - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceNested withNewDataSourceLike(V1TypedLocalObjectReference item) { - return new V1PersistentVolumeClaimSpecFluentImpl.DataSourceNestedImpl(item); - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceNested editDataSource() { - return withNewDataSourceLike(getDataSource()); - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceNested editOrNewDataSource() { - return withNewDataSourceLike(getDataSource() != null ? getDataSource(): new V1TypedLocalObjectReferenceBuilder().build()); - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceNested editOrNewDataSourceLike(V1TypedLocalObjectReference item) { - return withNewDataSourceLike(getDataSource() != null ? getDataSource(): item); - } - - /** - * This method has been deprecated, please use method buildDataSourceRef instead. - * @return The buildable object. - */ - @Deprecated - public V1TypedObjectReference getDataSourceRef() { - return this.dataSourceRef!=null ?this.dataSourceRef.build():null; - } - public V1TypedObjectReference buildDataSourceRef() { - return this.dataSourceRef!=null ?this.dataSourceRef.build():null; - } - public A withDataSourceRef(V1TypedObjectReference dataSourceRef) { - _visitables.get("dataSourceRef").remove(this.dataSourceRef); - if (dataSourceRef!=null){ this.dataSourceRef= new V1TypedObjectReferenceBuilder(dataSourceRef); _visitables.get("dataSourceRef").add(this.dataSourceRef);} else { this.dataSourceRef = null; _visitables.get("dataSourceRef").remove(this.dataSourceRef); } return (A) this; - } - public Boolean hasDataSourceRef() { - return this.dataSourceRef != null; - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceRefNested withNewDataSourceRef() { - return new V1PersistentVolumeClaimSpecFluentImpl.DataSourceRefNestedImpl(); - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceRefNested withNewDataSourceRefLike(V1TypedObjectReference item) { - return new V1PersistentVolumeClaimSpecFluentImpl.DataSourceRefNestedImpl(item); - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceRefNested editDataSourceRef() { - return withNewDataSourceRefLike(getDataSourceRef()); - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceRefNested editOrNewDataSourceRef() { - return withNewDataSourceRefLike(getDataSourceRef() != null ? getDataSourceRef(): new V1TypedObjectReferenceBuilder().build()); - } - public V1PersistentVolumeClaimSpecFluentImpl.DataSourceRefNested editOrNewDataSourceRefLike(V1TypedObjectReference item) { - return withNewDataSourceRefLike(getDataSourceRef() != null ? getDataSourceRef(): item); - } - - /** - * This method has been deprecated, please use method buildResources instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceRequirements getResources() { - return this.resources!=null ?this.resources.build():null; - } - public V1ResourceRequirements buildResources() { - return this.resources!=null ?this.resources.build():null; - } - public A withResources(V1ResourceRequirements resources) { - _visitables.get("resources").remove(this.resources); - if (resources!=null){ this.resources= new V1ResourceRequirementsBuilder(resources); _visitables.get("resources").add(this.resources);} else { this.resources = null; _visitables.get("resources").remove(this.resources); } return (A) this; - } - public Boolean hasResources() { - return this.resources != null; - } - public V1PersistentVolumeClaimSpecFluentImpl.ResourcesNested withNewResources() { - return new V1PersistentVolumeClaimSpecFluentImpl.ResourcesNestedImpl(); - } - public V1PersistentVolumeClaimSpecFluentImpl.ResourcesNested withNewResourcesLike(V1ResourceRequirements item) { - return new V1PersistentVolumeClaimSpecFluentImpl.ResourcesNestedImpl(item); - } - public V1PersistentVolumeClaimSpecFluentImpl.ResourcesNested editResources() { - return withNewResourcesLike(getResources()); - } - public V1PersistentVolumeClaimSpecFluentImpl.ResourcesNested editOrNewResources() { - return withNewResourcesLike(getResources() != null ? getResources(): new V1ResourceRequirementsBuilder().build()); - } - public V1PersistentVolumeClaimSpecFluentImpl.ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item) { - return withNewResourcesLike(getResources() != null ? getResources(): item); - } - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector() { - return this.selector!=null ?this.selector.build():null; - } - public V1LabelSelector buildSelector() { - return this.selector!=null ?this.selector.build():null; - } - public A withSelector(V1LabelSelector selector) { - _visitables.get("selector").remove(this.selector); - if (selector!=null){ this.selector= new V1LabelSelectorBuilder(selector); _visitables.get("selector").add(this.selector);} else { this.selector = null; _visitables.get("selector").remove(this.selector); } return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public V1PersistentVolumeClaimSpecFluentImpl.SelectorNested withNewSelector() { - return new V1PersistentVolumeClaimSpecFluentImpl.SelectorNestedImpl(); - } - public V1PersistentVolumeClaimSpecFluentImpl.SelectorNested withNewSelectorLike(V1LabelSelector item) { - return new V1PersistentVolumeClaimSpecFluentImpl.SelectorNestedImpl(item); - } - public V1PersistentVolumeClaimSpecFluentImpl.SelectorNested editSelector() { - return withNewSelectorLike(getSelector()); - } - public V1PersistentVolumeClaimSpecFluentImpl.SelectorNested editOrNewSelector() { - return withNewSelectorLike(getSelector() != null ? getSelector(): new V1LabelSelectorBuilder().build()); - } - public V1PersistentVolumeClaimSpecFluentImpl.SelectorNested editOrNewSelectorLike(V1LabelSelector item) { - return withNewSelectorLike(getSelector() != null ? getSelector(): item); - } - public String getStorageClassName() { - return this.storageClassName; - } - public A withStorageClassName(String storageClassName) { - this.storageClassName=storageClassName; return (A) this; - } - public Boolean hasStorageClassName() { - return this.storageClassName != null; - } - public String getVolumeMode() { - return this.volumeMode; - } - public A withVolumeMode(String volumeMode) { - this.volumeMode=volumeMode; return (A) this; - } - public Boolean hasVolumeMode() { - return this.volumeMode != null; - } - public String getVolumeName() { - return this.volumeName; - } - public A withVolumeName(String volumeName) { - this.volumeName=volumeName; return (A) this; - } - public Boolean hasVolumeName() { - return this.volumeName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeClaimSpecFluentImpl that = (V1PersistentVolumeClaimSpecFluentImpl) o; - if (!java.util.Objects.equals(accessModes, that.accessModes)) return false; - - if (!java.util.Objects.equals(dataSource, that.dataSource)) return false; - - if (!java.util.Objects.equals(dataSourceRef, that.dataSourceRef)) return false; - - if (!java.util.Objects.equals(resources, that.resources)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - if (!java.util.Objects.equals(storageClassName, that.storageClassName)) return false; - - if (!java.util.Objects.equals(volumeMode, that.volumeMode)) return false; - - if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(accessModes, dataSource, dataSourceRef, resources, selector, storageClassName, volumeMode, volumeName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (accessModes != null && !accessModes.isEmpty()) { sb.append("accessModes:"); sb.append(accessModes + ","); } - if (dataSource != null) { sb.append("dataSource:"); sb.append(dataSource + ","); } - if (dataSourceRef != null) { sb.append("dataSourceRef:"); sb.append(dataSourceRef + ","); } - if (resources != null) { sb.append("resources:"); sb.append(resources + ","); } - if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } - if (storageClassName != null) { sb.append("storageClassName:"); sb.append(storageClassName + ","); } - if (volumeMode != null) { sb.append("volumeMode:"); sb.append(volumeMode + ","); } - if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName); } - sb.append("}"); - return sb.toString(); - } - class DataSourceNestedImpl extends V1TypedLocalObjectReferenceFluentImpl> implements V1PersistentVolumeClaimSpecFluentImpl.DataSourceNested,Nested{ - DataSourceNestedImpl(V1TypedLocalObjectReference item) { - this.builder = new V1TypedLocalObjectReferenceBuilder(this, item); - } - DataSourceNestedImpl() { - this.builder = new V1TypedLocalObjectReferenceBuilder(this); - } - V1TypedLocalObjectReferenceBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimSpecFluentImpl.this.withDataSource(builder.build()); - } - public N endDataSource() { - return and(); - } - - } - class DataSourceRefNestedImpl extends V1TypedObjectReferenceFluentImpl> implements V1PersistentVolumeClaimSpecFluentImpl.DataSourceRefNested,Nested{ - DataSourceRefNestedImpl(V1TypedObjectReference item) { - this.builder = new V1TypedObjectReferenceBuilder(this, item); - } - DataSourceRefNestedImpl() { - this.builder = new V1TypedObjectReferenceBuilder(this); - } - V1TypedObjectReferenceBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimSpecFluentImpl.this.withDataSourceRef(builder.build()); - } - public N endDataSourceRef() { - return and(); - } - - } - class ResourcesNestedImpl extends V1ResourceRequirementsFluentImpl> implements V1PersistentVolumeClaimSpecFluentImpl.ResourcesNested,Nested{ - ResourcesNestedImpl(V1ResourceRequirements item) { - this.builder = new V1ResourceRequirementsBuilder(this, item); - } - ResourcesNestedImpl() { - this.builder = new V1ResourceRequirementsBuilder(this); - } - V1ResourceRequirementsBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimSpecFluentImpl.this.withResources(builder.build()); - } - public N endResources() { - return and(); - } - - } - class SelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1PersistentVolumeClaimSpecFluentImpl.SelectorNested,Nested{ - SelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - SelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimSpecFluentImpl.this.withSelector(builder.build()); - } - public N endSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusBuilder.java index fa0165f981..d742b5e876 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeClaimStatusBuilder extends V1PersistentVolumeClaimStatusFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeClaimStatusBuilder extends V1PersistentVolumeClaimStatusFluent implements VisitableBuilder{ public V1PersistentVolumeClaimStatusBuilder() { - this(false); - } - public V1PersistentVolumeClaimStatusBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeClaimStatus(), validationEnabled); + this(new V1PersistentVolumeClaimStatus()); } + public V1PersistentVolumeClaimStatusBuilder(V1PersistentVolumeClaimStatusFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeClaimStatusBuilder(V1PersistentVolumeClaimStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeClaimStatus(), validationEnabled); + this(fluent, new V1PersistentVolumeClaimStatus()); } + public V1PersistentVolumeClaimStatusBuilder(V1PersistentVolumeClaimStatusFluent fluent,V1PersistentVolumeClaimStatus instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeClaimStatusBuilder(V1PersistentVolumeClaimStatusFluent fluent,V1PersistentVolumeClaimStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAccessModes(instance.getAccessModes()); - fluent.withAllocatedResources(instance.getAllocatedResources()); - fluent.withCapacity(instance.getCapacity()); - fluent.withConditions(instance.getConditions()); - fluent.withPhase(instance.getPhase()); - fluent.withResizeStatus(instance.getResizeStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeClaimStatusBuilder(V1PersistentVolumeClaimStatus instance) { - this(instance,false); - } - public V1PersistentVolumeClaimStatusBuilder(V1PersistentVolumeClaimStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAccessModes(instance.getAccessModes()); - this.withAllocatedResources(instance.getAllocatedResources()); - this.withCapacity(instance.getCapacity()); - this.withConditions(instance.getConditions()); - this.withPhase(instance.getPhase()); - this.withResizeStatus(instance.getResizeStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeClaimStatusFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeClaimStatus build() { V1PersistentVolumeClaimStatus buildable = new V1PersistentVolumeClaimStatus(); buildable.setAccessModes(fluent.getAccessModes()); + buildable.setAllocatedResourceStatuses(fluent.getAllocatedResourceStatuses()); buildable.setAllocatedResources(fluent.getAllocatedResources()); buildable.setCapacity(fluent.getCapacity()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setPhase(fluent.getPhase()); - buildable.setResizeStatus(fluent.getResizeStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusFluent.java index 3455627932..c79a1debda 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusFluent.java @@ -1,94 +1,466 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import io.kubernetes.client.custom.Quantity; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1PersistentVolumeClaimStatusFluent> extends Fluent{ - public A addToAccessModes(int index,String item); - public A setToAccessModes(int index,String item); - public A addToAccessModes(java.lang.String... items); - public A addAllToAccessModes(Collection items); - public A removeFromAccessModes(java.lang.String... items); - public A removeAllFromAccessModes(Collection items); - public List getAccessModes(); - public String getAccessMode(int index); - public String getFirstAccessMode(); - public String getLastAccessMode(); - public String getMatchingAccessMode(Predicate predicate); - public Boolean hasMatchingAccessMode(Predicate predicate); - public A withAccessModes(List accessModes); - public A withAccessModes(java.lang.String... accessModes); - public Boolean hasAccessModes(); - public A addToAllocatedResources(String key,Quantity value); - public A addToAllocatedResources(Map map); - public A removeFromAllocatedResources(String key); - public A removeFromAllocatedResources(Map map); - public Map getAllocatedResources(); - public A withAllocatedResources(Map allocatedResources); - public Boolean hasAllocatedResources(); - public A addToCapacity(String key,Quantity value); - public A addToCapacity(Map map); - public A removeFromCapacity(String key); - public A removeFromCapacity(Map map); - public Map getCapacity(); - public A withCapacity(Map capacity); - public Boolean hasCapacity(); - public A addToConditions(int index,V1PersistentVolumeClaimCondition item); - public A setToConditions(int index,V1PersistentVolumeClaimCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1PersistentVolumeClaimCondition buildCondition(int index); - public V1PersistentVolumeClaimCondition buildFirstCondition(); - public V1PersistentVolumeClaimCondition buildLastCondition(); - public V1PersistentVolumeClaimCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition... conditions); - public Boolean hasConditions(); - public V1PersistentVolumeClaimStatusFluent.ConditionsNested addNewCondition(); - public V1PersistentVolumeClaimStatusFluent.ConditionsNested addNewConditionLike(V1PersistentVolumeClaimCondition item); - public V1PersistentVolumeClaimStatusFluent.ConditionsNested setNewConditionLike(int index,V1PersistentVolumeClaimCondition item); - public V1PersistentVolumeClaimStatusFluent.ConditionsNested editCondition(int index); - public V1PersistentVolumeClaimStatusFluent.ConditionsNested editFirstCondition(); - public V1PersistentVolumeClaimStatusFluent.ConditionsNested editLastCondition(); - public V1PersistentVolumeClaimStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public String getPhase(); - public A withPhase(String phase); - public Boolean hasPhase(); - public String getResizeStatus(); - public A withResizeStatus(String resizeStatus); - public Boolean hasResizeStatus(); - public interface ConditionsNested extends Nested,V1PersistentVolumeClaimConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeClaimStatusFluent> extends BaseFluent{ + public V1PersistentVolumeClaimStatusFluent() { + } + + public V1PersistentVolumeClaimStatusFluent(V1PersistentVolumeClaimStatus instance) { + this.copyInstance(instance); + } + private List accessModes; + private Map allocatedResourceStatuses; + private Map allocatedResources; + private Map capacity; + private ArrayList conditions; + private String phase; + + protected void copyInstance(V1PersistentVolumeClaimStatus instance) { + instance = (instance != null ? instance : new V1PersistentVolumeClaimStatus()); + if (instance != null) { + this.withAccessModes(instance.getAccessModes()); + this.withAllocatedResourceStatuses(instance.getAllocatedResourceStatuses()); + this.withAllocatedResources(instance.getAllocatedResources()); + this.withCapacity(instance.getCapacity()); + this.withConditions(instance.getConditions()); + this.withPhase(instance.getPhase()); + } + } + + public A addToAccessModes(int index,String item) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + this.accessModes.add(index, item); + return (A)this; + } + + public A setToAccessModes(int index,String item) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + this.accessModes.set(index, item); return (A)this; + } + + public A addToAccessModes(java.lang.String... items) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + for (String item : items) {this.accessModes.add(item);} return (A)this; + } + + public A addAllToAccessModes(Collection items) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + for (String item : items) {this.accessModes.add(item);} return (A)this; + } + + public A removeFromAccessModes(java.lang.String... items) { + if (this.accessModes == null) return (A)this; + for (String item : items) { this.accessModes.remove(item);} return (A)this; + } + + public A removeAllFromAccessModes(Collection items) { + if (this.accessModes == null) return (A)this; + for (String item : items) { this.accessModes.remove(item);} return (A)this; + } + + public List getAccessModes() { + return this.accessModes; + } + + public String getAccessMode(int index) { + return this.accessModes.get(index); + } + + public String getFirstAccessMode() { + return this.accessModes.get(0); + } + + public String getLastAccessMode() { + return this.accessModes.get(accessModes.size() - 1); + } + + public String getMatchingAccessMode(Predicate predicate) { + for (String item : accessModes) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAccessMode(Predicate predicate) { + for (String item : accessModes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAccessModes(List accessModes) { + if (accessModes != null) { + this.accessModes = new ArrayList(); + for (String item : accessModes) { + this.addToAccessModes(item); + } + } else { + this.accessModes = null; + } + return (A) this; + } + + public A withAccessModes(java.lang.String... accessModes) { + if (this.accessModes != null) { + this.accessModes.clear(); + _visitables.remove("accessModes"); + } + if (accessModes != null) { + for (String item : accessModes) { + this.addToAccessModes(item); + } + } + return (A) this; + } + + public boolean hasAccessModes() { + return this.accessModes != null && !this.accessModes.isEmpty(); + } + + public A addToAllocatedResourceStatuses(String key,String value) { + if(this.allocatedResourceStatuses == null && key != null && value != null) { this.allocatedResourceStatuses = new LinkedHashMap(); } + if(key != null && value != null) {this.allocatedResourceStatuses.put(key, value);} return (A)this; + } + + public A addToAllocatedResourceStatuses(Map map) { + if(this.allocatedResourceStatuses == null && map != null) { this.allocatedResourceStatuses = new LinkedHashMap(); } + if(map != null) { this.allocatedResourceStatuses.putAll(map);} return (A)this; + } + + public A removeFromAllocatedResourceStatuses(String key) { + if(this.allocatedResourceStatuses == null) { return (A) this; } + if(key != null && this.allocatedResourceStatuses != null) {this.allocatedResourceStatuses.remove(key);} return (A)this; + } + + public A removeFromAllocatedResourceStatuses(Map map) { + if(this.allocatedResourceStatuses == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.allocatedResourceStatuses != null){this.allocatedResourceStatuses.remove(key);}}} return (A)this; + } + + public Map getAllocatedResourceStatuses() { + return this.allocatedResourceStatuses; + } + + public A withAllocatedResourceStatuses(Map allocatedResourceStatuses) { + if (allocatedResourceStatuses == null) { + this.allocatedResourceStatuses = null; + } else { + this.allocatedResourceStatuses = new LinkedHashMap(allocatedResourceStatuses); + } + return (A) this; + } + + public boolean hasAllocatedResourceStatuses() { + return this.allocatedResourceStatuses != null; + } + + public A addToAllocatedResources(String key,Quantity value) { + if(this.allocatedResources == null && key != null && value != null) { this.allocatedResources = new LinkedHashMap(); } + if(key != null && value != null) {this.allocatedResources.put(key, value);} return (A)this; + } + + public A addToAllocatedResources(Map map) { + if(this.allocatedResources == null && map != null) { this.allocatedResources = new LinkedHashMap(); } + if(map != null) { this.allocatedResources.putAll(map);} return (A)this; + } + + public A removeFromAllocatedResources(String key) { + if(this.allocatedResources == null) { return (A) this; } + if(key != null && this.allocatedResources != null) {this.allocatedResources.remove(key);} return (A)this; + } + + public A removeFromAllocatedResources(Map map) { + if(this.allocatedResources == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.allocatedResources != null){this.allocatedResources.remove(key);}}} return (A)this; + } + + public Map getAllocatedResources() { + return this.allocatedResources; + } + + public A withAllocatedResources(Map allocatedResources) { + if (allocatedResources == null) { + this.allocatedResources = null; + } else { + this.allocatedResources = new LinkedHashMap(allocatedResources); + } + return (A) this; + } + + public boolean hasAllocatedResources() { + return this.allocatedResources != null; + } + + public A addToCapacity(String key,Quantity value) { + if(this.capacity == null && key != null && value != null) { this.capacity = new LinkedHashMap(); } + if(key != null && value != null) {this.capacity.put(key, value);} return (A)this; + } + + public A addToCapacity(Map map) { + if(this.capacity == null && map != null) { this.capacity = new LinkedHashMap(); } + if(map != null) { this.capacity.putAll(map);} return (A)this; + } + + public A removeFromCapacity(String key) { + if(this.capacity == null) { return (A) this; } + if(key != null && this.capacity != null) {this.capacity.remove(key);} return (A)this; + } + + public A removeFromCapacity(Map map) { + if(this.capacity == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.capacity != null){this.capacity.remove(key);}}} return (A)this; + } + + public Map getCapacity() { + return this.capacity; + } + + public A withCapacity(Map capacity) { + if (capacity == null) { + this.capacity = null; + } else { + this.capacity = new LinkedHashMap(capacity); + } + return (A) this; + } + + public boolean hasCapacity() { + return this.capacity != null; + } + + public A addToConditions(int index,V1PersistentVolumeClaimCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1PersistentVolumeClaimCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1PersistentVolumeClaimCondition item : items) {V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1PersistentVolumeClaimCondition item : items) {V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition... items) { + if (this.conditions == null) return (A)this; + for (V1PersistentVolumeClaimCondition item : items) {V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1PersistentVolumeClaimCondition item : items) {V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1PersistentVolumeClaimConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1PersistentVolumeClaimCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1PersistentVolumeClaimCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1PersistentVolumeClaimCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1PersistentVolumeClaimCondition buildMatchingCondition(Predicate predicate) { + for (V1PersistentVolumeClaimConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1PersistentVolumeClaimConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1PersistentVolumeClaimCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; } + public A withConditions(io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1PersistentVolumeClaimCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1PersistentVolumeClaimCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1PersistentVolumeClaimCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1PersistentVolumeClaimConditionFluent> implements Nested{ + ConditionsNested(int index,V1PersistentVolumeClaimCondition item) { + this.index = index; + this.builder = new V1PersistentVolumeClaimConditionBuilder(this, item); + } + V1PersistentVolumeClaimConditionBuilder builder; + int index; + + public N and() { + return (N) V1PersistentVolumeClaimStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusFluentImpl.java deleted file mode 100644 index 131d240dc0..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimStatusFluentImpl.java +++ /dev/null @@ -1,323 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import io.kubernetes.client.custom.Quantity; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeClaimStatusFluentImpl> extends BaseFluent implements V1PersistentVolumeClaimStatusFluent{ - public V1PersistentVolumeClaimStatusFluentImpl() { - } - public V1PersistentVolumeClaimStatusFluentImpl(V1PersistentVolumeClaimStatus instance) { - if (instance != null) { - this.withAccessModes(instance.getAccessModes()); - this.withAllocatedResources(instance.getAllocatedResources()); - this.withCapacity(instance.getCapacity()); - this.withConditions(instance.getConditions()); - this.withPhase(instance.getPhase()); - this.withResizeStatus(instance.getResizeStatus()); - } - } - private List accessModes; - private Map allocatedResources; - private Map capacity; - private ArrayList conditions; - private String phase; - private String resizeStatus; - public A addToAccessModes(int index,String item) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - this.accessModes.add(index, item); - return (A)this; - } - public A setToAccessModes(int index,String item) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - this.accessModes.set(index, item); return (A)this; - } - public A addToAccessModes(java.lang.String... items) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - for (String item : items) {this.accessModes.add(item);} return (A)this; - } - public A addAllToAccessModes(Collection items) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - for (String item : items) {this.accessModes.add(item);} return (A)this; - } - public A removeFromAccessModes(java.lang.String... items) { - for (String item : items) {if (this.accessModes!= null){ this.accessModes.remove(item);}} return (A)this; - } - public A removeAllFromAccessModes(Collection items) { - for (String item : items) {if (this.accessModes!= null){ this.accessModes.remove(item);}} return (A)this; - } - public List getAccessModes() { - return this.accessModes; - } - public String getAccessMode(int index) { - return this.accessModes.get(index); - } - public String getFirstAccessMode() { - return this.accessModes.get(0); - } - public String getLastAccessMode() { - return this.accessModes.get(accessModes.size() - 1); - } - public String getMatchingAccessMode(Predicate predicate) { - for (String item: accessModes) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAccessMode(Predicate predicate) { - for (String item: accessModes) { if(predicate.test(item)){ return true;} } return false; - } - public A withAccessModes(List accessModes) { - if (accessModes != null) {this.accessModes = new ArrayList(); for (String item : accessModes){this.addToAccessModes(item);}} else { this.accessModes = null;} return (A) this; - } - public A withAccessModes(java.lang.String... accessModes) { - if (this.accessModes != null) {this.accessModes.clear(); _visitables.remove("accessModes"); } - if (accessModes != null) {for (String item :accessModes){ this.addToAccessModes(item);}} return (A) this; - } - public Boolean hasAccessModes() { - return accessModes != null && !accessModes.isEmpty(); - } - public A addToAllocatedResources(String key,Quantity value) { - if(this.allocatedResources == null && key != null && value != null) { this.allocatedResources = new LinkedHashMap(); } - if(key != null && value != null) {this.allocatedResources.put(key, value);} return (A)this; - } - public A addToAllocatedResources(Map map) { - if(this.allocatedResources == null && map != null) { this.allocatedResources = new LinkedHashMap(); } - if(map != null) { this.allocatedResources.putAll(map);} return (A)this; - } - public A removeFromAllocatedResources(String key) { - if(this.allocatedResources == null) { return (A) this; } - if(key != null && this.allocatedResources != null) {this.allocatedResources.remove(key);} return (A)this; - } - public A removeFromAllocatedResources(Map map) { - if(this.allocatedResources == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.allocatedResources != null){this.allocatedResources.remove(key);}}} return (A)this; - } - public Map getAllocatedResources() { - return this.allocatedResources; - } - public A withAllocatedResources(Map allocatedResources) { - if (allocatedResources == null) { this.allocatedResources = null;} else {this.allocatedResources = new LinkedHashMap(allocatedResources);} return (A) this; - } - public Boolean hasAllocatedResources() { - return this.allocatedResources != null; - } - public A addToCapacity(String key,Quantity value) { - if(this.capacity == null && key != null && value != null) { this.capacity = new LinkedHashMap(); } - if(key != null && value != null) {this.capacity.put(key, value);} return (A)this; - } - public A addToCapacity(Map map) { - if(this.capacity == null && map != null) { this.capacity = new LinkedHashMap(); } - if(map != null) { this.capacity.putAll(map);} return (A)this; - } - public A removeFromCapacity(String key) { - if(this.capacity == null) { return (A) this; } - if(key != null && this.capacity != null) {this.capacity.remove(key);} return (A)this; - } - public A removeFromCapacity(Map map) { - if(this.capacity == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.capacity != null){this.capacity.remove(key);}}} return (A)this; - } - public Map getCapacity() { - return this.capacity; - } - public A withCapacity(Map capacity) { - if (capacity == null) { this.capacity = null;} else {this.capacity = new LinkedHashMap(capacity);} return (A) this; - } - public Boolean hasCapacity() { - return this.capacity != null; - } - public A addToConditions(int index,V1PersistentVolumeClaimCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1PersistentVolumeClaimCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1PersistentVolumeClaimCondition item : items) {V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1PersistentVolumeClaimCondition item : items) {V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition... items) { - for (V1PersistentVolumeClaimCondition item : items) {V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1PersistentVolumeClaimCondition item : items) {V1PersistentVolumeClaimConditionBuilder builder = new V1PersistentVolumeClaimConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1PersistentVolumeClaimConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1PersistentVolumeClaimCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1PersistentVolumeClaimCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1PersistentVolumeClaimCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1PersistentVolumeClaimCondition buildMatchingCondition(Predicate predicate) { - for (V1PersistentVolumeClaimConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1PersistentVolumeClaimConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1PersistentVolumeClaimCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1PersistentVolumeClaimCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1PersistentVolumeClaimCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1PersistentVolumeClaimStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1PersistentVolumeClaimStatusFluentImpl.ConditionsNestedImpl(); - } - public V1PersistentVolumeClaimStatusFluentImpl.ConditionsNested addNewConditionLike(V1PersistentVolumeClaimCondition item) { - return new V1PersistentVolumeClaimStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1PersistentVolumeClaimStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1PersistentVolumeClaimCondition item) { - return new V1PersistentVolumeClaimStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1PersistentVolumeClaimStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1PersistentVolumeClaimStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1PersistentVolumeClaimStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1PersistentVolumeClaimStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1PersistentVolumeClaimConditionFluentImpl> implements V1PersistentVolumeClaimStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1PersistentVolumeClaimCondition item) { - this.index = index; - this.builder = new V1PersistentVolumeClaimConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1PersistentVolumeClaimConditionBuilder(this); - } - V1PersistentVolumeClaimConditionBuilder builder; - int index; - public N and() { - return (N) V1PersistentVolumeClaimStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateBuilder.java index 1782368956..57564498f2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeClaimTemplateBuilder extends V1PersistentVolumeClaimTemplateFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeClaimTemplateBuilder extends V1PersistentVolumeClaimTemplateFluent implements VisitableBuilder{ public V1PersistentVolumeClaimTemplateBuilder() { - this(false); - } - public V1PersistentVolumeClaimTemplateBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeClaimTemplate(), validationEnabled); + this(new V1PersistentVolumeClaimTemplate()); } + public V1PersistentVolumeClaimTemplateBuilder(V1PersistentVolumeClaimTemplateFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeClaimTemplateBuilder(V1PersistentVolumeClaimTemplateFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeClaimTemplate(), validationEnabled); + this(fluent, new V1PersistentVolumeClaimTemplate()); } + public V1PersistentVolumeClaimTemplateBuilder(V1PersistentVolumeClaimTemplateFluent fluent,V1PersistentVolumeClaimTemplate instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeClaimTemplateBuilder(V1PersistentVolumeClaimTemplateFluent fluent,V1PersistentVolumeClaimTemplate instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeClaimTemplateBuilder(V1PersistentVolumeClaimTemplate instance) { - this(instance,false); - } - public V1PersistentVolumeClaimTemplateBuilder(V1PersistentVolumeClaimTemplate instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeClaimTemplateFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeClaimTemplate build() { V1PersistentVolumeClaimTemplate buildable = new V1PersistentVolumeClaimTemplate(); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateFluent.java index 48e1106569..b7eff06060 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1PersistentVolumeClaimTemplateFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1PersistentVolumeClaimTemplateFluent.MetadataNested withNewMetadata(); - public V1PersistentVolumeClaimTemplateFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1PersistentVolumeClaimTemplateFluent.MetadataNested editMetadata(); - public V1PersistentVolumeClaimTemplateFluent.MetadataNested editOrNewMetadata(); - public V1PersistentVolumeClaimTemplateFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimSpec getSpec(); - public V1PersistentVolumeClaimSpec buildSpec(); - public A withSpec(V1PersistentVolumeClaimSpec spec); - public Boolean hasSpec(); - public V1PersistentVolumeClaimTemplateFluent.SpecNested withNewSpec(); - public V1PersistentVolumeClaimTemplateFluent.SpecNested withNewSpecLike(V1PersistentVolumeClaimSpec item); - public V1PersistentVolumeClaimTemplateFluent.SpecNested editSpec(); - public V1PersistentVolumeClaimTemplateFluent.SpecNested editOrNewSpec(); - public V1PersistentVolumeClaimTemplateFluent.SpecNested editOrNewSpecLike(V1PersistentVolumeClaimSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeClaimTemplateFluent> extends BaseFluent{ + public V1PersistentVolumeClaimTemplateFluent() { + } + + public V1PersistentVolumeClaimTemplateFluent(V1PersistentVolumeClaimTemplate instance) { + this.copyInstance(instance); + } + private V1ObjectMetaBuilder metadata; + private V1PersistentVolumeClaimSpecBuilder spec; + + protected void copyInstance(V1PersistentVolumeClaimTemplate instance) { + instance = (instance != null ? instance : new V1PersistentVolumeClaimTemplate()); + if (instance != null) { + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); } - public interface SpecNested extends Nested,V1PersistentVolumeClaimSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1PersistentVolumeClaimSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1PersistentVolumeClaimSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1PersistentVolumeClaimSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1PersistentVolumeClaimSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1PersistentVolumeClaimSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1PersistentVolumeClaimSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeClaimTemplateFluent that = (V1PersistentVolumeClaimTemplateFluent) o; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1PersistentVolumeClaimTemplateFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + } + public class SpecNested extends V1PersistentVolumeClaimSpecFluent> implements Nested{ + SpecNested(V1PersistentVolumeClaimSpec item) { + this.builder = new V1PersistentVolumeClaimSpecBuilder(this, item); + } + V1PersistentVolumeClaimSpecBuilder builder; + + public N and() { + return (N) V1PersistentVolumeClaimTemplateFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateFluentImpl.java deleted file mode 100644 index d487725a31..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimTemplateFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeClaimTemplateFluentImpl> extends BaseFluent implements V1PersistentVolumeClaimTemplateFluent{ - public V1PersistentVolumeClaimTemplateFluentImpl() { - } - public V1PersistentVolumeClaimTemplateFluentImpl(V1PersistentVolumeClaimTemplate instance) { - if (instance != null) { - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private V1ObjectMetaBuilder metadata; - private V1PersistentVolumeClaimSpecBuilder spec; - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1PersistentVolumeClaimTemplateFluentImpl.MetadataNested withNewMetadata() { - return new V1PersistentVolumeClaimTemplateFluentImpl.MetadataNestedImpl(); - } - public V1PersistentVolumeClaimTemplateFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1PersistentVolumeClaimTemplateFluentImpl.MetadataNestedImpl(item); - } - public V1PersistentVolumeClaimTemplateFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PersistentVolumeClaimTemplateFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1PersistentVolumeClaimTemplateFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1PersistentVolumeClaimSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1PersistentVolumeClaimSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1PersistentVolumeClaimSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1PersistentVolumeClaimTemplateFluentImpl.SpecNested withNewSpec() { - return new V1PersistentVolumeClaimTemplateFluentImpl.SpecNestedImpl(); - } - public V1PersistentVolumeClaimTemplateFluentImpl.SpecNested withNewSpecLike(V1PersistentVolumeClaimSpec item) { - return new V1PersistentVolumeClaimTemplateFluentImpl.SpecNestedImpl(item); - } - public V1PersistentVolumeClaimTemplateFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1PersistentVolumeClaimTemplateFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1PersistentVolumeClaimSpecBuilder().build()); - } - public V1PersistentVolumeClaimTemplateFluentImpl.SpecNested editOrNewSpecLike(V1PersistentVolumeClaimSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeClaimTemplateFluentImpl that = (V1PersistentVolumeClaimTemplateFluentImpl) o; - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1PersistentVolumeClaimTemplateFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimTemplateFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1PersistentVolumeClaimSpecFluentImpl> implements V1PersistentVolumeClaimTemplateFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1PersistentVolumeClaimSpec item) { - this.builder = new V1PersistentVolumeClaimSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1PersistentVolumeClaimSpecBuilder(this); - } - V1PersistentVolumeClaimSpecBuilder builder; - public N and() { - return (N) V1PersistentVolumeClaimTemplateFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceBuilder.java index 2a0b16b489..1f7b5f334d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeClaimVolumeSourceBuilder extends V1PersistentVolumeClaimVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeClaimVolumeSourceBuilder extends V1PersistentVolumeClaimVolumeSourceFluent implements VisitableBuilder{ public V1PersistentVolumeClaimVolumeSourceBuilder() { - this(false); - } - public V1PersistentVolumeClaimVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeClaimVolumeSource(), validationEnabled); + this(new V1PersistentVolumeClaimVolumeSource()); } + public V1PersistentVolumeClaimVolumeSourceBuilder(V1PersistentVolumeClaimVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeClaimVolumeSourceBuilder(V1PersistentVolumeClaimVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeClaimVolumeSource(), validationEnabled); + this(fluent, new V1PersistentVolumeClaimVolumeSource()); } + public V1PersistentVolumeClaimVolumeSourceBuilder(V1PersistentVolumeClaimVolumeSourceFluent fluent,V1PersistentVolumeClaimVolumeSource instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeClaimVolumeSourceBuilder(V1PersistentVolumeClaimVolumeSourceFluent fluent,V1PersistentVolumeClaimVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withClaimName(instance.getClaimName()); - fluent.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeClaimVolumeSourceBuilder(V1PersistentVolumeClaimVolumeSource instance) { - this(instance,false); - } - public V1PersistentVolumeClaimVolumeSourceBuilder(V1PersistentVolumeClaimVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withClaimName(instance.getClaimName()); - this.withReadOnly(instance.getReadOnly()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeClaimVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeClaimVolumeSource build() { V1PersistentVolumeClaimVolumeSource buildable = new V1PersistentVolumeClaimVolumeSource(); buildable.setClaimName(fluent.getClaimName()); @@ -46,4 +28,5 @@ public V1PersistentVolumeClaimVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceFluent.java index a38994b23c..e342d604dd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceFluent.java @@ -1,20 +1,85 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1PersistentVolumeClaimVolumeSourceFluent> extends Fluent{ - public String getClaimName(); - public A withClaimName(String claimName); - public Boolean hasClaimName(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeClaimVolumeSourceFluent> extends BaseFluent{ + public V1PersistentVolumeClaimVolumeSourceFluent() { + } + public V1PersistentVolumeClaimVolumeSourceFluent(V1PersistentVolumeClaimVolumeSource instance) { + this.copyInstance(instance); + } + private String claimName; + private Boolean readOnly; + + protected void copyInstance(V1PersistentVolumeClaimVolumeSource instance) { + instance = (instance != null ? instance : new V1PersistentVolumeClaimVolumeSource()); + if (instance != null) { + this.withClaimName(instance.getClaimName()); + this.withReadOnly(instance.getReadOnly()); + } + } + + public String getClaimName() { + return this.claimName; + } + + public A withClaimName(String claimName) { + this.claimName = claimName; + return (A) this; + } + + public boolean hasClaimName() { + return this.claimName != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeClaimVolumeSourceFluent that = (V1PersistentVolumeClaimVolumeSourceFluent) o; + if (!java.util.Objects.equals(claimName, that.claimName)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(claimName, readOnly, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (claimName != null) { sb.append("claimName:"); sb.append(claimName + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceFluentImpl.java deleted file mode 100644 index 4f3388626c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeClaimVolumeSourceFluentImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeClaimVolumeSourceFluentImpl> extends BaseFluent implements V1PersistentVolumeClaimVolumeSourceFluent{ - public V1PersistentVolumeClaimVolumeSourceFluentImpl() { - } - public V1PersistentVolumeClaimVolumeSourceFluentImpl(V1PersistentVolumeClaimVolumeSource instance) { - if (instance != null) { - this.withClaimName(instance.getClaimName()); - this.withReadOnly(instance.getReadOnly()); - } - } - private String claimName; - private Boolean readOnly; - public String getClaimName() { - return this.claimName; - } - public A withClaimName(String claimName) { - this.claimName=claimName; return (A) this; - } - public Boolean hasClaimName() { - return this.claimName != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeClaimVolumeSourceFluentImpl that = (V1PersistentVolumeClaimVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(claimName, that.claimName)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(claimName, readOnly, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (claimName != null) { sb.append("claimName:"); sb.append(claimName + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeFluent.java index 145a6bc156..6b9d26baeb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1PersistentVolumeFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1PersistentVolumeFluent.MetadataNested withNewMetadata(); - public V1PersistentVolumeFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1PersistentVolumeFluent.MetadataNested editMetadata(); - public V1PersistentVolumeFluent.MetadataNested editOrNewMetadata(); - public V1PersistentVolumeFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeSpec getSpec(); - public V1PersistentVolumeSpec buildSpec(); - public A withSpec(V1PersistentVolumeSpec spec); - public Boolean hasSpec(); - public V1PersistentVolumeFluent.SpecNested withNewSpec(); - public V1PersistentVolumeFluent.SpecNested withNewSpecLike(V1PersistentVolumeSpec item); - public V1PersistentVolumeFluent.SpecNested editSpec(); - public V1PersistentVolumeFluent.SpecNested editOrNewSpec(); - public V1PersistentVolumeFluent.SpecNested editOrNewSpecLike(V1PersistentVolumeSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeStatus getStatus(); - public V1PersistentVolumeStatus buildStatus(); - public A withStatus(V1PersistentVolumeStatus status); - public Boolean hasStatus(); - public V1PersistentVolumeFluent.StatusNested withNewStatus(); - public V1PersistentVolumeFluent.StatusNested withNewStatusLike(V1PersistentVolumeStatus item); - public V1PersistentVolumeFluent.StatusNested editStatus(); - public V1PersistentVolumeFluent.StatusNested editOrNewStatus(); - public V1PersistentVolumeFluent.StatusNested editOrNewStatusLike(V1PersistentVolumeStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeFluent> extends BaseFluent{ + public V1PersistentVolumeFluent() { + } + + public V1PersistentVolumeFluent(V1PersistentVolume instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1PersistentVolumeSpecBuilder spec; + private V1PersistentVolumeStatusBuilder status; + + protected void copyInstance(V1PersistentVolume instance) { + instance = (instance != null ? instance : new V1PersistentVolume()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1PersistentVolumeSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1PersistentVolumeSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1PersistentVolumeSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1PersistentVolumeSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1PersistentVolumeSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1PersistentVolumeSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1PersistentVolumeSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1PersistentVolumeStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1PersistentVolumeStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1PersistentVolumeStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1PersistentVolumeStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1PersistentVolumeStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1PersistentVolumeStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeFluent that = (V1PersistentVolumeFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1PersistentVolumeFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1PersistentVolumeStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1PersistentVolumeSpecFluent> implements Nested{ + SpecNested(V1PersistentVolumeSpec item) { + this.builder = new V1PersistentVolumeSpecBuilder(this, item); + } + V1PersistentVolumeSpecBuilder builder; + + public N and() { + return (N) V1PersistentVolumeFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1PersistentVolumeStatusFluent> implements Nested{ + StatusNested(V1PersistentVolumeStatus item) { + this.builder = new V1PersistentVolumeStatusBuilder(this, item); + } + V1PersistentVolumeStatusBuilder builder; + + public N and() { + return (N) V1PersistentVolumeFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeFluentImpl.java deleted file mode 100644 index 37aa2da653..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeFluentImpl> extends BaseFluent implements V1PersistentVolumeFluent{ - public V1PersistentVolumeFluentImpl() { - } - public V1PersistentVolumeFluentImpl(V1PersistentVolume instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1PersistentVolumeSpecBuilder spec; - private V1PersistentVolumeStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1PersistentVolumeFluentImpl.MetadataNested withNewMetadata() { - return new V1PersistentVolumeFluentImpl.MetadataNestedImpl(); - } - public V1PersistentVolumeFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1PersistentVolumeFluentImpl.MetadataNestedImpl(item); - } - public V1PersistentVolumeFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PersistentVolumeFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1PersistentVolumeFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1PersistentVolumeSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1PersistentVolumeSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1PersistentVolumeSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1PersistentVolumeFluentImpl.SpecNested withNewSpec() { - return new V1PersistentVolumeFluentImpl.SpecNestedImpl(); - } - public V1PersistentVolumeFluentImpl.SpecNested withNewSpecLike(V1PersistentVolumeSpec item) { - return new V1PersistentVolumeFluentImpl.SpecNestedImpl(item); - } - public V1PersistentVolumeFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1PersistentVolumeFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1PersistentVolumeSpecBuilder().build()); - } - public V1PersistentVolumeFluentImpl.SpecNested editOrNewSpecLike(V1PersistentVolumeSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1PersistentVolumeStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1PersistentVolumeStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1PersistentVolumeStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1PersistentVolumeFluentImpl.StatusNested withNewStatus() { - return new V1PersistentVolumeFluentImpl.StatusNestedImpl(); - } - public V1PersistentVolumeFluentImpl.StatusNested withNewStatusLike(V1PersistentVolumeStatus item) { - return new V1PersistentVolumeFluentImpl.StatusNestedImpl(item); - } - public V1PersistentVolumeFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1PersistentVolumeFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1PersistentVolumeStatusBuilder().build()); - } - public V1PersistentVolumeFluentImpl.StatusNested editOrNewStatusLike(V1PersistentVolumeStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeFluentImpl that = (V1PersistentVolumeFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1PersistentVolumeFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1PersistentVolumeFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1PersistentVolumeSpecFluentImpl> implements V1PersistentVolumeFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1PersistentVolumeSpec item) { - this.builder = new V1PersistentVolumeSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1PersistentVolumeSpecBuilder(this); - } - V1PersistentVolumeSpecBuilder builder; - public N and() { - return (N) V1PersistentVolumeFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1PersistentVolumeStatusFluentImpl> implements V1PersistentVolumeFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1PersistentVolumeStatus item) { - this.builder = new V1PersistentVolumeStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1PersistentVolumeStatusBuilder(this); - } - V1PersistentVolumeStatusBuilder builder; - public N and() { - return (N) V1PersistentVolumeFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListBuilder.java index 85a9822358..727622cffd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeListBuilder extends V1PersistentVolumeListFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeListBuilder extends V1PersistentVolumeListFluent implements VisitableBuilder{ public V1PersistentVolumeListBuilder() { - this(false); - } - public V1PersistentVolumeListBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeList(), validationEnabled); + this(new V1PersistentVolumeList()); } + public V1PersistentVolumeListBuilder(V1PersistentVolumeListFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeListBuilder(V1PersistentVolumeListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeList(), validationEnabled); + this(fluent, new V1PersistentVolumeList()); } + public V1PersistentVolumeListBuilder(V1PersistentVolumeListFluent fluent,V1PersistentVolumeList instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeListBuilder(V1PersistentVolumeListFluent fluent,V1PersistentVolumeList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeListBuilder(V1PersistentVolumeList instance) { - this(instance,false); - } - public V1PersistentVolumeListBuilder(V1PersistentVolumeList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeListFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeList build() { V1PersistentVolumeList buildable = new V1PersistentVolumeList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListFluent.java index 5e0b17e1dc..eb9515e68c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PersistentVolumeListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1PersistentVolume item); - public A setToItems(int index,V1PersistentVolume item); - public A addToItems(io.kubernetes.client.openapi.models.V1PersistentVolume... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1PersistentVolume... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1PersistentVolume buildItem(int index); - public V1PersistentVolume buildFirstItem(); - public V1PersistentVolume buildLastItem(); - public V1PersistentVolume buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1PersistentVolume... items); - public Boolean hasItems(); - public V1PersistentVolumeListFluent.ItemsNested addNewItem(); - public V1PersistentVolumeListFluent.ItemsNested addNewItemLike(V1PersistentVolume item); - public V1PersistentVolumeListFluent.ItemsNested setNewItemLike(int index,V1PersistentVolume item); - public V1PersistentVolumeListFluent.ItemsNested editItem(int index); - public V1PersistentVolumeListFluent.ItemsNested editFirstItem(); - public V1PersistentVolumeListFluent.ItemsNested editLastItem(); - public V1PersistentVolumeListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1PersistentVolumeListFluent.MetadataNested withNewMetadata(); - public V1PersistentVolumeListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1PersistentVolumeListFluent.MetadataNested editMetadata(); - public V1PersistentVolumeListFluent.MetadataNested editOrNewMetadata(); - public V1PersistentVolumeListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1PersistentVolumeFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeListFluent> extends BaseFluent{ + public V1PersistentVolumeListFluent() { + } + + public V1PersistentVolumeListFluent(V1PersistentVolumeList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1PersistentVolumeList instance) { + instance = (instance != null ? instance : new V1PersistentVolumeList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1PersistentVolume item) { + if (this.items == null) {this.items = new ArrayList();} + V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1PersistentVolume item) { + if (this.items == null) {this.items = new ArrayList();} + V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1PersistentVolume... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PersistentVolume item : items) {V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PersistentVolume item : items) {V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1PersistentVolume... items) { + if (this.items == null) return (A)this; + for (V1PersistentVolume item : items) {V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1PersistentVolume item : items) {V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1PersistentVolumeBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1PersistentVolume buildItem(int index) { + return this.items.get(index).build(); + } + + public V1PersistentVolume buildFirstItem() { + return this.items.get(0).build(); + } + + public V1PersistentVolume buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1PersistentVolume buildMatchingItem(Predicate predicate) { + for (V1PersistentVolumeBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1PersistentVolumeBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1PersistentVolume item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1PersistentVolume... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1PersistentVolume item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1PersistentVolume item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1PersistentVolume item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeListFluent that = (V1PersistentVolumeListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1PersistentVolumeFluent> implements Nested{ + ItemsNested(int index,V1PersistentVolume item) { + this.index = index; + this.builder = new V1PersistentVolumeBuilder(this, item); + } + V1PersistentVolumeBuilder builder; + int index; + public N and() { + return (N) V1PersistentVolumeListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1PersistentVolumeListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListFluentImpl.java deleted file mode 100644 index c04a8415fd..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeListFluentImpl> extends BaseFluent implements V1PersistentVolumeListFluent{ - public V1PersistentVolumeListFluentImpl() { - } - public V1PersistentVolumeListFluentImpl(V1PersistentVolumeList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1PersistentVolume item) { - if (this.items == null) {this.items = new ArrayList();} - V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1PersistentVolume item) { - if (this.items == null) {this.items = new ArrayList();} - V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1PersistentVolume... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PersistentVolume item : items) {V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PersistentVolume item : items) {V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1PersistentVolume... items) { - for (V1PersistentVolume item : items) {V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1PersistentVolume item : items) {V1PersistentVolumeBuilder builder = new V1PersistentVolumeBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1PersistentVolumeBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1PersistentVolume buildItem(int index) { - return this.items.get(index).build(); - } - public V1PersistentVolume buildFirstItem() { - return this.items.get(0).build(); - } - public V1PersistentVolume buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1PersistentVolume buildMatchingItem(Predicate predicate) { - for (V1PersistentVolumeBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1PersistentVolumeBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1PersistentVolume item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1PersistentVolume... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1PersistentVolume item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1PersistentVolumeListFluentImpl.ItemsNested addNewItem() { - return new V1PersistentVolumeListFluentImpl.ItemsNestedImpl(); - } - public V1PersistentVolumeListFluentImpl.ItemsNested addNewItemLike(V1PersistentVolume item) { - return new V1PersistentVolumeListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1PersistentVolumeListFluentImpl.ItemsNested setNewItemLike(int index,V1PersistentVolume item) { - return new V1PersistentVolumeListFluentImpl.ItemsNestedImpl(index, item); - } - public V1PersistentVolumeListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1PersistentVolumeListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1PersistentVolumeListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1PersistentVolumeListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1PersistentVolumeListFluentImpl.MetadataNestedImpl(); - } - public V1PersistentVolumeListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1PersistentVolumeListFluentImpl.MetadataNestedImpl(item); - } - public V1PersistentVolumeListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PersistentVolumeListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1PersistentVolumeListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeListFluentImpl that = (V1PersistentVolumeListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1PersistentVolumeFluentImpl> implements V1PersistentVolumeListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1PersistentVolume item) { - this.index = index; - this.builder = new V1PersistentVolumeBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1PersistentVolumeBuilder(this); - } - V1PersistentVolumeBuilder builder; - int index; - public N and() { - return (N) V1PersistentVolumeListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1PersistentVolumeListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1PersistentVolumeListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecBuilder.java index c17ae96dac..6f14dd603f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecBuilder.java @@ -1,133 +1,60 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeSpecBuilder extends V1PersistentVolumeSpecFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeSpecBuilder extends V1PersistentVolumeSpecFluent implements VisitableBuilder{ public V1PersistentVolumeSpecBuilder() { - this(false); - } - public V1PersistentVolumeSpecBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeSpec(), validationEnabled); + this(new V1PersistentVolumeSpec()); } + public V1PersistentVolumeSpecBuilder(V1PersistentVolumeSpecFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeSpecBuilder(V1PersistentVolumeSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeSpec(), validationEnabled); + this(fluent, new V1PersistentVolumeSpec()); } + public V1PersistentVolumeSpecBuilder(V1PersistentVolumeSpecFluent fluent,V1PersistentVolumeSpec instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeSpecBuilder(V1PersistentVolumeSpecFluent fluent,V1PersistentVolumeSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAccessModes(instance.getAccessModes()); - fluent.withAwsElasticBlockStore(instance.getAwsElasticBlockStore()); - fluent.withAzureDisk(instance.getAzureDisk()); - fluent.withAzureFile(instance.getAzureFile()); - fluent.withCapacity(instance.getCapacity()); - fluent.withCephfs(instance.getCephfs()); - fluent.withCinder(instance.getCinder()); - fluent.withClaimRef(instance.getClaimRef()); - fluent.withCsi(instance.getCsi()); - fluent.withFc(instance.getFc()); - fluent.withFlexVolume(instance.getFlexVolume()); - fluent.withFlocker(instance.getFlocker()); - fluent.withGcePersistentDisk(instance.getGcePersistentDisk()); - fluent.withGlusterfs(instance.getGlusterfs()); - fluent.withHostPath(instance.getHostPath()); - fluent.withIscsi(instance.getIscsi()); - fluent.withLocal(instance.getLocal()); - fluent.withMountOptions(instance.getMountOptions()); - fluent.withNfs(instance.getNfs()); - fluent.withNodeAffinity(instance.getNodeAffinity()); - fluent.withPersistentVolumeReclaimPolicy(instance.getPersistentVolumeReclaimPolicy()); - fluent.withPhotonPersistentDisk(instance.getPhotonPersistentDisk()); - fluent.withPortworxVolume(instance.getPortworxVolume()); - fluent.withQuobyte(instance.getQuobyte()); - fluent.withRbd(instance.getRbd()); - fluent.withScaleIO(instance.getScaleIO()); - fluent.withStorageClassName(instance.getStorageClassName()); - fluent.withStorageos(instance.getStorageos()); - fluent.withVolumeMode(instance.getVolumeMode()); - fluent.withVsphereVolume(instance.getVsphereVolume()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeSpecBuilder(V1PersistentVolumeSpec instance) { - this(instance,false); - } - public V1PersistentVolumeSpecBuilder(V1PersistentVolumeSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAccessModes(instance.getAccessModes()); - this.withAwsElasticBlockStore(instance.getAwsElasticBlockStore()); - this.withAzureDisk(instance.getAzureDisk()); - this.withAzureFile(instance.getAzureFile()); - this.withCapacity(instance.getCapacity()); - this.withCephfs(instance.getCephfs()); - this.withCinder(instance.getCinder()); - this.withClaimRef(instance.getClaimRef()); - this.withCsi(instance.getCsi()); - this.withFc(instance.getFc()); - this.withFlexVolume(instance.getFlexVolume()); - this.withFlocker(instance.getFlocker()); - this.withGcePersistentDisk(instance.getGcePersistentDisk()); - this.withGlusterfs(instance.getGlusterfs()); - this.withHostPath(instance.getHostPath()); - this.withIscsi(instance.getIscsi()); - this.withLocal(instance.getLocal()); - this.withMountOptions(instance.getMountOptions()); - this.withNfs(instance.getNfs()); - this.withNodeAffinity(instance.getNodeAffinity()); - this.withPersistentVolumeReclaimPolicy(instance.getPersistentVolumeReclaimPolicy()); - this.withPhotonPersistentDisk(instance.getPhotonPersistentDisk()); - this.withPortworxVolume(instance.getPortworxVolume()); - this.withQuobyte(instance.getQuobyte()); - this.withRbd(instance.getRbd()); - this.withScaleIO(instance.getScaleIO()); - this.withStorageClassName(instance.getStorageClassName()); - this.withStorageos(instance.getStorageos()); - this.withVolumeMode(instance.getVolumeMode()); - this.withVsphereVolume(instance.getVsphereVolume()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeSpecFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeSpec build() { V1PersistentVolumeSpec buildable = new V1PersistentVolumeSpec(); buildable.setAccessModes(fluent.getAccessModes()); - buildable.setAwsElasticBlockStore(fluent.getAwsElasticBlockStore()); - buildable.setAzureDisk(fluent.getAzureDisk()); - buildable.setAzureFile(fluent.getAzureFile()); + buildable.setAwsElasticBlockStore(fluent.buildAwsElasticBlockStore()); + buildable.setAzureDisk(fluent.buildAzureDisk()); + buildable.setAzureFile(fluent.buildAzureFile()); buildable.setCapacity(fluent.getCapacity()); - buildable.setCephfs(fluent.getCephfs()); - buildable.setCinder(fluent.getCinder()); - buildable.setClaimRef(fluent.getClaimRef()); - buildable.setCsi(fluent.getCsi()); - buildable.setFc(fluent.getFc()); - buildable.setFlexVolume(fluent.getFlexVolume()); - buildable.setFlocker(fluent.getFlocker()); - buildable.setGcePersistentDisk(fluent.getGcePersistentDisk()); - buildable.setGlusterfs(fluent.getGlusterfs()); - buildable.setHostPath(fluent.getHostPath()); - buildable.setIscsi(fluent.getIscsi()); - buildable.setLocal(fluent.getLocal()); + buildable.setCephfs(fluent.buildCephfs()); + buildable.setCinder(fluent.buildCinder()); + buildable.setClaimRef(fluent.buildClaimRef()); + buildable.setCsi(fluent.buildCsi()); + buildable.setFc(fluent.buildFc()); + buildable.setFlexVolume(fluent.buildFlexVolume()); + buildable.setFlocker(fluent.buildFlocker()); + buildable.setGcePersistentDisk(fluent.buildGcePersistentDisk()); + buildable.setGlusterfs(fluent.buildGlusterfs()); + buildable.setHostPath(fluent.buildHostPath()); + buildable.setIscsi(fluent.buildIscsi()); + buildable.setLocal(fluent.buildLocal()); buildable.setMountOptions(fluent.getMountOptions()); - buildable.setNfs(fluent.getNfs()); - buildable.setNodeAffinity(fluent.getNodeAffinity()); + buildable.setNfs(fluent.buildNfs()); + buildable.setNodeAffinity(fluent.buildNodeAffinity()); buildable.setPersistentVolumeReclaimPolicy(fluent.getPersistentVolumeReclaimPolicy()); - buildable.setPhotonPersistentDisk(fluent.getPhotonPersistentDisk()); - buildable.setPortworxVolume(fluent.getPortworxVolume()); - buildable.setQuobyte(fluent.getQuobyte()); - buildable.setRbd(fluent.getRbd()); - buildable.setScaleIO(fluent.getScaleIO()); + buildable.setPhotonPersistentDisk(fluent.buildPhotonPersistentDisk()); + buildable.setPortworxVolume(fluent.buildPortworxVolume()); + buildable.setQuobyte(fluent.buildQuobyte()); + buildable.setRbd(fluent.buildRbd()); + buildable.setScaleIO(fluent.buildScaleIO()); buildable.setStorageClassName(fluent.getStorageClassName()); - buildable.setStorageos(fluent.getStorageos()); + buildable.setStorageos(fluent.buildStorageos()); buildable.setVolumeMode(fluent.getVolumeMode()); - buildable.setVsphereVolume(fluent.getVsphereVolume()); + buildable.setVsphereVolume(fluent.buildVsphereVolume()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecFluent.java index 07e83ff317..62305e3aa2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecFluent.java @@ -1,548 +1,1781 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.util.Map; import java.util.LinkedHashMap; import java.util.function.Predicate; import java.util.List; -import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.util.Collection; -import java.util.Map; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; import io.kubernetes.client.custom.Quantity; - /** - * Generated - */ -public interface V1PersistentVolumeSpecFluent> extends Fluent{ - public A addToAccessModes(int index,String item); - public A setToAccessModes(int index,String item); - public A addToAccessModes(java.lang.String... items); - public A addAllToAccessModes(Collection items); - public A removeFromAccessModes(java.lang.String... items); - public A removeAllFromAccessModes(Collection items); - public List getAccessModes(); - public String getAccessMode(int index); - public String getFirstAccessMode(); - public String getLastAccessMode(); - public String getMatchingAccessMode(Predicate predicate); - public Boolean hasMatchingAccessMode(Predicate predicate); - public A withAccessModes(List accessModes); - public A withAccessModes(java.lang.String... accessModes); - public Boolean hasAccessModes(); - - /** - * This method has been deprecated, please use method buildAwsElasticBlockStore instead. - * @return The buildable object. - */ - @Deprecated - public V1AWSElasticBlockStoreVolumeSource getAwsElasticBlockStore(); - public V1AWSElasticBlockStoreVolumeSource buildAwsElasticBlockStore(); - public A withAwsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore); - public Boolean hasAwsElasticBlockStore(); - public V1PersistentVolumeSpecFluent.AwsElasticBlockStoreNested withNewAwsElasticBlockStore(); - public V1PersistentVolumeSpecFluent.AwsElasticBlockStoreNested withNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item); - public V1PersistentVolumeSpecFluent.AwsElasticBlockStoreNested editAwsElasticBlockStore(); - public V1PersistentVolumeSpecFluent.AwsElasticBlockStoreNested editOrNewAwsElasticBlockStore(); - public V1PersistentVolumeSpecFluent.AwsElasticBlockStoreNested editOrNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item); - - /** - * This method has been deprecated, please use method buildAzureDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1AzureDiskVolumeSource getAzureDisk(); - public V1AzureDiskVolumeSource buildAzureDisk(); - public A withAzureDisk(V1AzureDiskVolumeSource azureDisk); - public Boolean hasAzureDisk(); - public V1PersistentVolumeSpecFluent.AzureDiskNested withNewAzureDisk(); - public V1PersistentVolumeSpecFluent.AzureDiskNested withNewAzureDiskLike(V1AzureDiskVolumeSource item); - public V1PersistentVolumeSpecFluent.AzureDiskNested editAzureDisk(); - public V1PersistentVolumeSpecFluent.AzureDiskNested editOrNewAzureDisk(); - public V1PersistentVolumeSpecFluent.AzureDiskNested editOrNewAzureDiskLike(V1AzureDiskVolumeSource item); - - /** - * This method has been deprecated, please use method buildAzureFile instead. - * @return The buildable object. - */ - @Deprecated - public V1AzureFilePersistentVolumeSource getAzureFile(); - public V1AzureFilePersistentVolumeSource buildAzureFile(); - public A withAzureFile(V1AzureFilePersistentVolumeSource azureFile); - public Boolean hasAzureFile(); - public V1PersistentVolumeSpecFluent.AzureFileNested withNewAzureFile(); - public V1PersistentVolumeSpecFluent.AzureFileNested withNewAzureFileLike(V1AzureFilePersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.AzureFileNested editAzureFile(); - public V1PersistentVolumeSpecFluent.AzureFileNested editOrNewAzureFile(); - public V1PersistentVolumeSpecFluent.AzureFileNested editOrNewAzureFileLike(V1AzureFilePersistentVolumeSource item); - public A addToCapacity(String key,Quantity value); - public A addToCapacity(Map map); - public A removeFromCapacity(String key); - public A removeFromCapacity(Map map); - public Map getCapacity(); - public A withCapacity(Map capacity); - public Boolean hasCapacity(); - - /** - * This method has been deprecated, please use method buildCephfs instead. - * @return The buildable object. - */ - @Deprecated - public V1CephFSPersistentVolumeSource getCephfs(); - public V1CephFSPersistentVolumeSource buildCephfs(); - public A withCephfs(V1CephFSPersistentVolumeSource cephfs); - public Boolean hasCephfs(); - public V1PersistentVolumeSpecFluent.CephfsNested withNewCephfs(); - public V1PersistentVolumeSpecFluent.CephfsNested withNewCephfsLike(V1CephFSPersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.CephfsNested editCephfs(); - public V1PersistentVolumeSpecFluent.CephfsNested editOrNewCephfs(); - public V1PersistentVolumeSpecFluent.CephfsNested editOrNewCephfsLike(V1CephFSPersistentVolumeSource item); - - /** - * This method has been deprecated, please use method buildCinder instead. - * @return The buildable object. - */ - @Deprecated - public V1CinderPersistentVolumeSource getCinder(); - public V1CinderPersistentVolumeSource buildCinder(); - public A withCinder(V1CinderPersistentVolumeSource cinder); - public Boolean hasCinder(); - public V1PersistentVolumeSpecFluent.CinderNested withNewCinder(); - public V1PersistentVolumeSpecFluent.CinderNested withNewCinderLike(V1CinderPersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.CinderNested editCinder(); - public V1PersistentVolumeSpecFluent.CinderNested editOrNewCinder(); - public V1PersistentVolumeSpecFluent.CinderNested editOrNewCinderLike(V1CinderPersistentVolumeSource item); - - /** - * This method has been deprecated, please use method buildClaimRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getClaimRef(); - public V1ObjectReference buildClaimRef(); - public A withClaimRef(V1ObjectReference claimRef); - public Boolean hasClaimRef(); - public V1PersistentVolumeSpecFluent.ClaimRefNested withNewClaimRef(); - public V1PersistentVolumeSpecFluent.ClaimRefNested withNewClaimRefLike(V1ObjectReference item); - public V1PersistentVolumeSpecFluent.ClaimRefNested editClaimRef(); - public V1PersistentVolumeSpecFluent.ClaimRefNested editOrNewClaimRef(); - public V1PersistentVolumeSpecFluent.ClaimRefNested editOrNewClaimRefLike(V1ObjectReference item); - - /** - * This method has been deprecated, please use method buildCsi instead. - * @return The buildable object. - */ - @Deprecated - public V1CSIPersistentVolumeSource getCsi(); - public V1CSIPersistentVolumeSource buildCsi(); - public A withCsi(V1CSIPersistentVolumeSource csi); - public Boolean hasCsi(); - public V1PersistentVolumeSpecFluent.CsiNested withNewCsi(); - public V1PersistentVolumeSpecFluent.CsiNested withNewCsiLike(V1CSIPersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.CsiNested editCsi(); - public V1PersistentVolumeSpecFluent.CsiNested editOrNewCsi(); - public V1PersistentVolumeSpecFluent.CsiNested editOrNewCsiLike(V1CSIPersistentVolumeSource item); - - /** - * This method has been deprecated, please use method buildFc instead. - * @return The buildable object. - */ - @Deprecated - public V1FCVolumeSource getFc(); - public V1FCVolumeSource buildFc(); - public A withFc(V1FCVolumeSource fc); - public Boolean hasFc(); - public V1PersistentVolumeSpecFluent.FcNested withNewFc(); - public V1PersistentVolumeSpecFluent.FcNested withNewFcLike(V1FCVolumeSource item); - public V1PersistentVolumeSpecFluent.FcNested editFc(); - public V1PersistentVolumeSpecFluent.FcNested editOrNewFc(); - public V1PersistentVolumeSpecFluent.FcNested editOrNewFcLike(V1FCVolumeSource item); - - /** - * This method has been deprecated, please use method buildFlexVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1FlexPersistentVolumeSource getFlexVolume(); - public V1FlexPersistentVolumeSource buildFlexVolume(); - public A withFlexVolume(V1FlexPersistentVolumeSource flexVolume); - public Boolean hasFlexVolume(); - public V1PersistentVolumeSpecFluent.FlexVolumeNested withNewFlexVolume(); - public V1PersistentVolumeSpecFluent.FlexVolumeNested withNewFlexVolumeLike(V1FlexPersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.FlexVolumeNested editFlexVolume(); - public V1PersistentVolumeSpecFluent.FlexVolumeNested editOrNewFlexVolume(); - public V1PersistentVolumeSpecFluent.FlexVolumeNested editOrNewFlexVolumeLike(V1FlexPersistentVolumeSource item); - - /** - * This method has been deprecated, please use method buildFlocker instead. - * @return The buildable object. - */ - @Deprecated - public V1FlockerVolumeSource getFlocker(); - public V1FlockerVolumeSource buildFlocker(); - public A withFlocker(V1FlockerVolumeSource flocker); - public Boolean hasFlocker(); - public V1PersistentVolumeSpecFluent.FlockerNested withNewFlocker(); - public V1PersistentVolumeSpecFluent.FlockerNested withNewFlockerLike(V1FlockerVolumeSource item); - public V1PersistentVolumeSpecFluent.FlockerNested editFlocker(); - public V1PersistentVolumeSpecFluent.FlockerNested editOrNewFlocker(); - public V1PersistentVolumeSpecFluent.FlockerNested editOrNewFlockerLike(V1FlockerVolumeSource item); - - /** - * This method has been deprecated, please use method buildGcePersistentDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1GCEPersistentDiskVolumeSource getGcePersistentDisk(); - public V1GCEPersistentDiskVolumeSource buildGcePersistentDisk(); - public A withGcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk); - public Boolean hasGcePersistentDisk(); - public V1PersistentVolumeSpecFluent.GcePersistentDiskNested withNewGcePersistentDisk(); - public V1PersistentVolumeSpecFluent.GcePersistentDiskNested withNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item); - public V1PersistentVolumeSpecFluent.GcePersistentDiskNested editGcePersistentDisk(); - public V1PersistentVolumeSpecFluent.GcePersistentDiskNested editOrNewGcePersistentDisk(); - public V1PersistentVolumeSpecFluent.GcePersistentDiskNested editOrNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item); - - /** - * This method has been deprecated, please use method buildGlusterfs instead. - * @return The buildable object. - */ - @Deprecated - public V1GlusterfsPersistentVolumeSource getGlusterfs(); - public V1GlusterfsPersistentVolumeSource buildGlusterfs(); - public A withGlusterfs(V1GlusterfsPersistentVolumeSource glusterfs); - public Boolean hasGlusterfs(); - public V1PersistentVolumeSpecFluent.GlusterfsNested withNewGlusterfs(); - public V1PersistentVolumeSpecFluent.GlusterfsNested withNewGlusterfsLike(V1GlusterfsPersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.GlusterfsNested editGlusterfs(); - public V1PersistentVolumeSpecFluent.GlusterfsNested editOrNewGlusterfs(); - public V1PersistentVolumeSpecFluent.GlusterfsNested editOrNewGlusterfsLike(V1GlusterfsPersistentVolumeSource item); - - /** - * This method has been deprecated, please use method buildHostPath instead. - * @return The buildable object. - */ - @Deprecated - public V1HostPathVolumeSource getHostPath(); - public V1HostPathVolumeSource buildHostPath(); - public A withHostPath(V1HostPathVolumeSource hostPath); - public Boolean hasHostPath(); - public V1PersistentVolumeSpecFluent.HostPathNested withNewHostPath(); - public V1PersistentVolumeSpecFluent.HostPathNested withNewHostPathLike(V1HostPathVolumeSource item); - public V1PersistentVolumeSpecFluent.HostPathNested editHostPath(); - public V1PersistentVolumeSpecFluent.HostPathNested editOrNewHostPath(); - public V1PersistentVolumeSpecFluent.HostPathNested editOrNewHostPathLike(V1HostPathVolumeSource item); - - /** - * This method has been deprecated, please use method buildIscsi instead. - * @return The buildable object. - */ - @Deprecated - public V1ISCSIPersistentVolumeSource getIscsi(); - public V1ISCSIPersistentVolumeSource buildIscsi(); - public A withIscsi(V1ISCSIPersistentVolumeSource iscsi); - public Boolean hasIscsi(); - public V1PersistentVolumeSpecFluent.IscsiNested withNewIscsi(); - public V1PersistentVolumeSpecFluent.IscsiNested withNewIscsiLike(V1ISCSIPersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.IscsiNested editIscsi(); - public V1PersistentVolumeSpecFluent.IscsiNested editOrNewIscsi(); - public V1PersistentVolumeSpecFluent.IscsiNested editOrNewIscsiLike(V1ISCSIPersistentVolumeSource item); - - /** - * This method has been deprecated, please use method buildLocal instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalVolumeSource getLocal(); - public V1LocalVolumeSource buildLocal(); - public A withLocal(V1LocalVolumeSource local); - public Boolean hasLocal(); - public V1PersistentVolumeSpecFluent.LocalNested withNewLocal(); - public V1PersistentVolumeSpecFluent.LocalNested withNewLocalLike(V1LocalVolumeSource item); - public V1PersistentVolumeSpecFluent.LocalNested editLocal(); - public V1PersistentVolumeSpecFluent.LocalNested editOrNewLocal(); - public V1PersistentVolumeSpecFluent.LocalNested editOrNewLocalLike(V1LocalVolumeSource item); - public A addToMountOptions(int index,String item); - public A setToMountOptions(int index,String item); - public A addToMountOptions(java.lang.String... items); - public A addAllToMountOptions(Collection items); - public A removeFromMountOptions(java.lang.String... items); - public A removeAllFromMountOptions(Collection items); - public List getMountOptions(); - public String getMountOption(int index); - public String getFirstMountOption(); - public String getLastMountOption(); - public String getMatchingMountOption(Predicate predicate); - public Boolean hasMatchingMountOption(Predicate predicate); - public A withMountOptions(List mountOptions); - public A withMountOptions(java.lang.String... mountOptions); - public Boolean hasMountOptions(); - - /** - * This method has been deprecated, please use method buildNfs instead. - * @return The buildable object. - */ - @Deprecated - public V1NFSVolumeSource getNfs(); - public V1NFSVolumeSource buildNfs(); - public A withNfs(V1NFSVolumeSource nfs); - public Boolean hasNfs(); - public V1PersistentVolumeSpecFluent.NfsNested withNewNfs(); - public V1PersistentVolumeSpecFluent.NfsNested withNewNfsLike(V1NFSVolumeSource item); - public V1PersistentVolumeSpecFluent.NfsNested editNfs(); - public V1PersistentVolumeSpecFluent.NfsNested editOrNewNfs(); - public V1PersistentVolumeSpecFluent.NfsNested editOrNewNfsLike(V1NFSVolumeSource item); - - /** - * This method has been deprecated, please use method buildNodeAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeNodeAffinity getNodeAffinity(); - public V1VolumeNodeAffinity buildNodeAffinity(); - public A withNodeAffinity(V1VolumeNodeAffinity nodeAffinity); - public Boolean hasNodeAffinity(); - public V1PersistentVolumeSpecFluent.NodeAffinityNested withNewNodeAffinity(); - public V1PersistentVolumeSpecFluent.NodeAffinityNested withNewNodeAffinityLike(V1VolumeNodeAffinity item); - public V1PersistentVolumeSpecFluent.NodeAffinityNested editNodeAffinity(); - public V1PersistentVolumeSpecFluent.NodeAffinityNested editOrNewNodeAffinity(); - public V1PersistentVolumeSpecFluent.NodeAffinityNested editOrNewNodeAffinityLike(V1VolumeNodeAffinity item); - public String getPersistentVolumeReclaimPolicy(); - public A withPersistentVolumeReclaimPolicy(String persistentVolumeReclaimPolicy); - public Boolean hasPersistentVolumeReclaimPolicy(); - - /** - * This method has been deprecated, please use method buildPhotonPersistentDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1PhotonPersistentDiskVolumeSource getPhotonPersistentDisk(); - public V1PhotonPersistentDiskVolumeSource buildPhotonPersistentDisk(); - public A withPhotonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk); - public Boolean hasPhotonPersistentDisk(); - public V1PersistentVolumeSpecFluent.PhotonPersistentDiskNested withNewPhotonPersistentDisk(); - public V1PersistentVolumeSpecFluent.PhotonPersistentDiskNested withNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item); - public V1PersistentVolumeSpecFluent.PhotonPersistentDiskNested editPhotonPersistentDisk(); - public V1PersistentVolumeSpecFluent.PhotonPersistentDiskNested editOrNewPhotonPersistentDisk(); - public V1PersistentVolumeSpecFluent.PhotonPersistentDiskNested editOrNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item); - - /** - * This method has been deprecated, please use method buildPortworxVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1PortworxVolumeSource getPortworxVolume(); - public V1PortworxVolumeSource buildPortworxVolume(); - public A withPortworxVolume(V1PortworxVolumeSource portworxVolume); - public Boolean hasPortworxVolume(); - public V1PersistentVolumeSpecFluent.PortworxVolumeNested withNewPortworxVolume(); - public V1PersistentVolumeSpecFluent.PortworxVolumeNested withNewPortworxVolumeLike(V1PortworxVolumeSource item); - public V1PersistentVolumeSpecFluent.PortworxVolumeNested editPortworxVolume(); - public V1PersistentVolumeSpecFluent.PortworxVolumeNested editOrNewPortworxVolume(); - public V1PersistentVolumeSpecFluent.PortworxVolumeNested editOrNewPortworxVolumeLike(V1PortworxVolumeSource item); - - /** - * This method has been deprecated, please use method buildQuobyte instead. - * @return The buildable object. - */ - @Deprecated - public V1QuobyteVolumeSource getQuobyte(); - public V1QuobyteVolumeSource buildQuobyte(); - public A withQuobyte(V1QuobyteVolumeSource quobyte); - public Boolean hasQuobyte(); - public V1PersistentVolumeSpecFluent.QuobyteNested withNewQuobyte(); - public V1PersistentVolumeSpecFluent.QuobyteNested withNewQuobyteLike(V1QuobyteVolumeSource item); - public V1PersistentVolumeSpecFluent.QuobyteNested editQuobyte(); - public V1PersistentVolumeSpecFluent.QuobyteNested editOrNewQuobyte(); - public V1PersistentVolumeSpecFluent.QuobyteNested editOrNewQuobyteLike(V1QuobyteVolumeSource item); - - /** - * This method has been deprecated, please use method buildRbd instead. - * @return The buildable object. - */ - @Deprecated - public V1RBDPersistentVolumeSource getRbd(); - public V1RBDPersistentVolumeSource buildRbd(); - public A withRbd(V1RBDPersistentVolumeSource rbd); - public Boolean hasRbd(); - public V1PersistentVolumeSpecFluent.RbdNested withNewRbd(); - public V1PersistentVolumeSpecFluent.RbdNested withNewRbdLike(V1RBDPersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.RbdNested editRbd(); - public V1PersistentVolumeSpecFluent.RbdNested editOrNewRbd(); - public V1PersistentVolumeSpecFluent.RbdNested editOrNewRbdLike(V1RBDPersistentVolumeSource item); - - /** - * This method has been deprecated, please use method buildScaleIO instead. - * @return The buildable object. - */ - @Deprecated - public V1ScaleIOPersistentVolumeSource getScaleIO(); - public V1ScaleIOPersistentVolumeSource buildScaleIO(); - public A withScaleIO(V1ScaleIOPersistentVolumeSource scaleIO); - public Boolean hasScaleIO(); - public V1PersistentVolumeSpecFluent.ScaleIONested withNewScaleIO(); - public V1PersistentVolumeSpecFluent.ScaleIONested withNewScaleIOLike(V1ScaleIOPersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.ScaleIONested editScaleIO(); - public V1PersistentVolumeSpecFluent.ScaleIONested editOrNewScaleIO(); - public V1PersistentVolumeSpecFluent.ScaleIONested editOrNewScaleIOLike(V1ScaleIOPersistentVolumeSource item); - public String getStorageClassName(); - public A withStorageClassName(String storageClassName); - public Boolean hasStorageClassName(); - - /** - * This method has been deprecated, please use method buildStorageos instead. - * @return The buildable object. - */ - @Deprecated - public V1StorageOSPersistentVolumeSource getStorageos(); - public V1StorageOSPersistentVolumeSource buildStorageos(); - public A withStorageos(V1StorageOSPersistentVolumeSource storageos); - public Boolean hasStorageos(); - public V1PersistentVolumeSpecFluent.StorageosNested withNewStorageos(); - public V1PersistentVolumeSpecFluent.StorageosNested withNewStorageosLike(V1StorageOSPersistentVolumeSource item); - public V1PersistentVolumeSpecFluent.StorageosNested editStorageos(); - public V1PersistentVolumeSpecFluent.StorageosNested editOrNewStorageos(); - public V1PersistentVolumeSpecFluent.StorageosNested editOrNewStorageosLike(V1StorageOSPersistentVolumeSource item); - public String getVolumeMode(); - public A withVolumeMode(String volumeMode); - public Boolean hasVolumeMode(); - - /** - * This method has been deprecated, please use method buildVsphereVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1VsphereVirtualDiskVolumeSource getVsphereVolume(); - public V1VsphereVirtualDiskVolumeSource buildVsphereVolume(); - public A withVsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume); - public Boolean hasVsphereVolume(); - public V1PersistentVolumeSpecFluent.VsphereVolumeNested withNewVsphereVolume(); - public V1PersistentVolumeSpecFluent.VsphereVolumeNested withNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item); - public V1PersistentVolumeSpecFluent.VsphereVolumeNested editVsphereVolume(); - public V1PersistentVolumeSpecFluent.VsphereVolumeNested editOrNewVsphereVolume(); - public V1PersistentVolumeSpecFluent.VsphereVolumeNested editOrNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item); - public interface AwsElasticBlockStoreNested extends Nested,V1AWSElasticBlockStoreVolumeSourceFluent>{ - public N and(); - public N endAwsElasticBlockStore(); - - } - public interface AzureDiskNested extends Nested,V1AzureDiskVolumeSourceFluent>{ - public N and(); - public N endAzureDisk(); - - } - public interface AzureFileNested extends Nested,V1AzureFilePersistentVolumeSourceFluent>{ - public N and(); - public N endAzureFile(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeSpecFluent> extends BaseFluent{ + public V1PersistentVolumeSpecFluent() { + } + + public V1PersistentVolumeSpecFluent(V1PersistentVolumeSpec instance) { + this.copyInstance(instance); + } + private List accessModes; + private V1AWSElasticBlockStoreVolumeSourceBuilder awsElasticBlockStore; + private V1AzureDiskVolumeSourceBuilder azureDisk; + private V1AzureFilePersistentVolumeSourceBuilder azureFile; + private Map capacity; + private V1CephFSPersistentVolumeSourceBuilder cephfs; + private V1CinderPersistentVolumeSourceBuilder cinder; + private V1ObjectReferenceBuilder claimRef; + private V1CSIPersistentVolumeSourceBuilder csi; + private V1FCVolumeSourceBuilder fc; + private V1FlexPersistentVolumeSourceBuilder flexVolume; + private V1FlockerVolumeSourceBuilder flocker; + private V1GCEPersistentDiskVolumeSourceBuilder gcePersistentDisk; + private V1GlusterfsPersistentVolumeSourceBuilder glusterfs; + private V1HostPathVolumeSourceBuilder hostPath; + private V1ISCSIPersistentVolumeSourceBuilder iscsi; + private V1LocalVolumeSourceBuilder local; + private List mountOptions; + private V1NFSVolumeSourceBuilder nfs; + private V1VolumeNodeAffinityBuilder nodeAffinity; + private String persistentVolumeReclaimPolicy; + private V1PhotonPersistentDiskVolumeSourceBuilder photonPersistentDisk; + private V1PortworxVolumeSourceBuilder portworxVolume; + private V1QuobyteVolumeSourceBuilder quobyte; + private V1RBDPersistentVolumeSourceBuilder rbd; + private V1ScaleIOPersistentVolumeSourceBuilder scaleIO; + private String storageClassName; + private V1StorageOSPersistentVolumeSourceBuilder storageos; + private String volumeMode; + private V1VsphereVirtualDiskVolumeSourceBuilder vsphereVolume; + + protected void copyInstance(V1PersistentVolumeSpec instance) { + instance = (instance != null ? instance : new V1PersistentVolumeSpec()); + if (instance != null) { + this.withAccessModes(instance.getAccessModes()); + this.withAwsElasticBlockStore(instance.getAwsElasticBlockStore()); + this.withAzureDisk(instance.getAzureDisk()); + this.withAzureFile(instance.getAzureFile()); + this.withCapacity(instance.getCapacity()); + this.withCephfs(instance.getCephfs()); + this.withCinder(instance.getCinder()); + this.withClaimRef(instance.getClaimRef()); + this.withCsi(instance.getCsi()); + this.withFc(instance.getFc()); + this.withFlexVolume(instance.getFlexVolume()); + this.withFlocker(instance.getFlocker()); + this.withGcePersistentDisk(instance.getGcePersistentDisk()); + this.withGlusterfs(instance.getGlusterfs()); + this.withHostPath(instance.getHostPath()); + this.withIscsi(instance.getIscsi()); + this.withLocal(instance.getLocal()); + this.withMountOptions(instance.getMountOptions()); + this.withNfs(instance.getNfs()); + this.withNodeAffinity(instance.getNodeAffinity()); + this.withPersistentVolumeReclaimPolicy(instance.getPersistentVolumeReclaimPolicy()); + this.withPhotonPersistentDisk(instance.getPhotonPersistentDisk()); + this.withPortworxVolume(instance.getPortworxVolume()); + this.withQuobyte(instance.getQuobyte()); + this.withRbd(instance.getRbd()); + this.withScaleIO(instance.getScaleIO()); + this.withStorageClassName(instance.getStorageClassName()); + this.withStorageos(instance.getStorageos()); + this.withVolumeMode(instance.getVolumeMode()); + this.withVsphereVolume(instance.getVsphereVolume()); + } + } + + public A addToAccessModes(int index,String item) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + this.accessModes.add(index, item); + return (A)this; + } + + public A setToAccessModes(int index,String item) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + this.accessModes.set(index, item); return (A)this; + } + + public A addToAccessModes(java.lang.String... items) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + for (String item : items) {this.accessModes.add(item);} return (A)this; + } + + public A addAllToAccessModes(Collection items) { + if (this.accessModes == null) {this.accessModes = new ArrayList();} + for (String item : items) {this.accessModes.add(item);} return (A)this; + } + + public A removeFromAccessModes(java.lang.String... items) { + if (this.accessModes == null) return (A)this; + for (String item : items) { this.accessModes.remove(item);} return (A)this; + } + + public A removeAllFromAccessModes(Collection items) { + if (this.accessModes == null) return (A)this; + for (String item : items) { this.accessModes.remove(item);} return (A)this; + } + + public List getAccessModes() { + return this.accessModes; + } + + public String getAccessMode(int index) { + return this.accessModes.get(index); + } + + public String getFirstAccessMode() { + return this.accessModes.get(0); + } + + public String getLastAccessMode() { + return this.accessModes.get(accessModes.size() - 1); + } + + public String getMatchingAccessMode(Predicate predicate) { + for (String item : accessModes) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAccessMode(Predicate predicate) { + for (String item : accessModes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAccessModes(List accessModes) { + if (accessModes != null) { + this.accessModes = new ArrayList(); + for (String item : accessModes) { + this.addToAccessModes(item); + } + } else { + this.accessModes = null; + } + return (A) this; + } + + public A withAccessModes(java.lang.String... accessModes) { + if (this.accessModes != null) { + this.accessModes.clear(); + _visitables.remove("accessModes"); + } + if (accessModes != null) { + for (String item : accessModes) { + this.addToAccessModes(item); + } + } + return (A) this; + } + + public boolean hasAccessModes() { + return this.accessModes != null && !this.accessModes.isEmpty(); + } + + public V1AWSElasticBlockStoreVolumeSource buildAwsElasticBlockStore() { + return this.awsElasticBlockStore != null ? this.awsElasticBlockStore.build() : null; + } + + public A withAwsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore) { + this._visitables.remove("awsElasticBlockStore"); + if (awsElasticBlockStore != null) { + this.awsElasticBlockStore = new V1AWSElasticBlockStoreVolumeSourceBuilder(awsElasticBlockStore); + this._visitables.get("awsElasticBlockStore").add(this.awsElasticBlockStore); + } else { + this.awsElasticBlockStore = null; + this._visitables.get("awsElasticBlockStore").remove(this.awsElasticBlockStore); + } + return (A) this; + } + + public boolean hasAwsElasticBlockStore() { + return this.awsElasticBlockStore != null; + } + + public AwsElasticBlockStoreNested withNewAwsElasticBlockStore() { + return new AwsElasticBlockStoreNested(null); + } + + public AwsElasticBlockStoreNested withNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item) { + return new AwsElasticBlockStoreNested(item); + } + + public AwsElasticBlockStoreNested editAwsElasticBlockStore() { + return withNewAwsElasticBlockStoreLike(java.util.Optional.ofNullable(buildAwsElasticBlockStore()).orElse(null)); + } + + public AwsElasticBlockStoreNested editOrNewAwsElasticBlockStore() { + return withNewAwsElasticBlockStoreLike(java.util.Optional.ofNullable(buildAwsElasticBlockStore()).orElse(new V1AWSElasticBlockStoreVolumeSourceBuilder().build())); + } + + public AwsElasticBlockStoreNested editOrNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item) { + return withNewAwsElasticBlockStoreLike(java.util.Optional.ofNullable(buildAwsElasticBlockStore()).orElse(item)); + } + + public V1AzureDiskVolumeSource buildAzureDisk() { + return this.azureDisk != null ? this.azureDisk.build() : null; + } + + public A withAzureDisk(V1AzureDiskVolumeSource azureDisk) { + this._visitables.remove("azureDisk"); + if (azureDisk != null) { + this.azureDisk = new V1AzureDiskVolumeSourceBuilder(azureDisk); + this._visitables.get("azureDisk").add(this.azureDisk); + } else { + this.azureDisk = null; + this._visitables.get("azureDisk").remove(this.azureDisk); + } + return (A) this; + } + + public boolean hasAzureDisk() { + return this.azureDisk != null; + } + + public AzureDiskNested withNewAzureDisk() { + return new AzureDiskNested(null); + } + + public AzureDiskNested withNewAzureDiskLike(V1AzureDiskVolumeSource item) { + return new AzureDiskNested(item); + } + + public AzureDiskNested editAzureDisk() { + return withNewAzureDiskLike(java.util.Optional.ofNullable(buildAzureDisk()).orElse(null)); + } + + public AzureDiskNested editOrNewAzureDisk() { + return withNewAzureDiskLike(java.util.Optional.ofNullable(buildAzureDisk()).orElse(new V1AzureDiskVolumeSourceBuilder().build())); + } + + public AzureDiskNested editOrNewAzureDiskLike(V1AzureDiskVolumeSource item) { + return withNewAzureDiskLike(java.util.Optional.ofNullable(buildAzureDisk()).orElse(item)); + } + + public V1AzureFilePersistentVolumeSource buildAzureFile() { + return this.azureFile != null ? this.azureFile.build() : null; + } + + public A withAzureFile(V1AzureFilePersistentVolumeSource azureFile) { + this._visitables.remove("azureFile"); + if (azureFile != null) { + this.azureFile = new V1AzureFilePersistentVolumeSourceBuilder(azureFile); + this._visitables.get("azureFile").add(this.azureFile); + } else { + this.azureFile = null; + this._visitables.get("azureFile").remove(this.azureFile); + } + return (A) this; + } + + public boolean hasAzureFile() { + return this.azureFile != null; + } + + public AzureFileNested withNewAzureFile() { + return new AzureFileNested(null); + } + + public AzureFileNested withNewAzureFileLike(V1AzureFilePersistentVolumeSource item) { + return new AzureFileNested(item); + } + + public AzureFileNested editAzureFile() { + return withNewAzureFileLike(java.util.Optional.ofNullable(buildAzureFile()).orElse(null)); + } + + public AzureFileNested editOrNewAzureFile() { + return withNewAzureFileLike(java.util.Optional.ofNullable(buildAzureFile()).orElse(new V1AzureFilePersistentVolumeSourceBuilder().build())); + } + + public AzureFileNested editOrNewAzureFileLike(V1AzureFilePersistentVolumeSource item) { + return withNewAzureFileLike(java.util.Optional.ofNullable(buildAzureFile()).orElse(item)); + } + + public A addToCapacity(String key,Quantity value) { + if(this.capacity == null && key != null && value != null) { this.capacity = new LinkedHashMap(); } + if(key != null && value != null) {this.capacity.put(key, value);} return (A)this; + } + + public A addToCapacity(Map map) { + if(this.capacity == null && map != null) { this.capacity = new LinkedHashMap(); } + if(map != null) { this.capacity.putAll(map);} return (A)this; + } + + public A removeFromCapacity(String key) { + if(this.capacity == null) { return (A) this; } + if(key != null && this.capacity != null) {this.capacity.remove(key);} return (A)this; + } + + public A removeFromCapacity(Map map) { + if(this.capacity == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.capacity != null){this.capacity.remove(key);}}} return (A)this; + } + + public Map getCapacity() { + return this.capacity; + } + + public A withCapacity(Map capacity) { + if (capacity == null) { + this.capacity = null; + } else { + this.capacity = new LinkedHashMap(capacity); + } + return (A) this; + } + + public boolean hasCapacity() { + return this.capacity != null; + } + + public V1CephFSPersistentVolumeSource buildCephfs() { + return this.cephfs != null ? this.cephfs.build() : null; + } + + public A withCephfs(V1CephFSPersistentVolumeSource cephfs) { + this._visitables.remove("cephfs"); + if (cephfs != null) { + this.cephfs = new V1CephFSPersistentVolumeSourceBuilder(cephfs); + this._visitables.get("cephfs").add(this.cephfs); + } else { + this.cephfs = null; + this._visitables.get("cephfs").remove(this.cephfs); + } + return (A) this; + } + + public boolean hasCephfs() { + return this.cephfs != null; + } + + public CephfsNested withNewCephfs() { + return new CephfsNested(null); + } + + public CephfsNested withNewCephfsLike(V1CephFSPersistentVolumeSource item) { + return new CephfsNested(item); + } + + public CephfsNested editCephfs() { + return withNewCephfsLike(java.util.Optional.ofNullable(buildCephfs()).orElse(null)); + } + + public CephfsNested editOrNewCephfs() { + return withNewCephfsLike(java.util.Optional.ofNullable(buildCephfs()).orElse(new V1CephFSPersistentVolumeSourceBuilder().build())); + } + + public CephfsNested editOrNewCephfsLike(V1CephFSPersistentVolumeSource item) { + return withNewCephfsLike(java.util.Optional.ofNullable(buildCephfs()).orElse(item)); + } + + public V1CinderPersistentVolumeSource buildCinder() { + return this.cinder != null ? this.cinder.build() : null; + } + + public A withCinder(V1CinderPersistentVolumeSource cinder) { + this._visitables.remove("cinder"); + if (cinder != null) { + this.cinder = new V1CinderPersistentVolumeSourceBuilder(cinder); + this._visitables.get("cinder").add(this.cinder); + } else { + this.cinder = null; + this._visitables.get("cinder").remove(this.cinder); + } + return (A) this; + } + + public boolean hasCinder() { + return this.cinder != null; + } + + public CinderNested withNewCinder() { + return new CinderNested(null); + } + + public CinderNested withNewCinderLike(V1CinderPersistentVolumeSource item) { + return new CinderNested(item); + } + + public CinderNested editCinder() { + return withNewCinderLike(java.util.Optional.ofNullable(buildCinder()).orElse(null)); + } + + public CinderNested editOrNewCinder() { + return withNewCinderLike(java.util.Optional.ofNullable(buildCinder()).orElse(new V1CinderPersistentVolumeSourceBuilder().build())); + } + + public CinderNested editOrNewCinderLike(V1CinderPersistentVolumeSource item) { + return withNewCinderLike(java.util.Optional.ofNullable(buildCinder()).orElse(item)); + } + + public V1ObjectReference buildClaimRef() { + return this.claimRef != null ? this.claimRef.build() : null; + } + + public A withClaimRef(V1ObjectReference claimRef) { + this._visitables.remove("claimRef"); + if (claimRef != null) { + this.claimRef = new V1ObjectReferenceBuilder(claimRef); + this._visitables.get("claimRef").add(this.claimRef); + } else { + this.claimRef = null; + this._visitables.get("claimRef").remove(this.claimRef); + } + return (A) this; + } + + public boolean hasClaimRef() { + return this.claimRef != null; + } + + public ClaimRefNested withNewClaimRef() { + return new ClaimRefNested(null); + } + + public ClaimRefNested withNewClaimRefLike(V1ObjectReference item) { + return new ClaimRefNested(item); + } + + public ClaimRefNested editClaimRef() { + return withNewClaimRefLike(java.util.Optional.ofNullable(buildClaimRef()).orElse(null)); + } + + public ClaimRefNested editOrNewClaimRef() { + return withNewClaimRefLike(java.util.Optional.ofNullable(buildClaimRef()).orElse(new V1ObjectReferenceBuilder().build())); + } + + public ClaimRefNested editOrNewClaimRefLike(V1ObjectReference item) { + return withNewClaimRefLike(java.util.Optional.ofNullable(buildClaimRef()).orElse(item)); + } + + public V1CSIPersistentVolumeSource buildCsi() { + return this.csi != null ? this.csi.build() : null; + } + + public A withCsi(V1CSIPersistentVolumeSource csi) { + this._visitables.remove("csi"); + if (csi != null) { + this.csi = new V1CSIPersistentVolumeSourceBuilder(csi); + this._visitables.get("csi").add(this.csi); + } else { + this.csi = null; + this._visitables.get("csi").remove(this.csi); + } + return (A) this; + } + + public boolean hasCsi() { + return this.csi != null; + } + + public CsiNested withNewCsi() { + return new CsiNested(null); + } + + public CsiNested withNewCsiLike(V1CSIPersistentVolumeSource item) { + return new CsiNested(item); + } + + public CsiNested editCsi() { + return withNewCsiLike(java.util.Optional.ofNullable(buildCsi()).orElse(null)); + } + + public CsiNested editOrNewCsi() { + return withNewCsiLike(java.util.Optional.ofNullable(buildCsi()).orElse(new V1CSIPersistentVolumeSourceBuilder().build())); + } + + public CsiNested editOrNewCsiLike(V1CSIPersistentVolumeSource item) { + return withNewCsiLike(java.util.Optional.ofNullable(buildCsi()).orElse(item)); + } + + public V1FCVolumeSource buildFc() { + return this.fc != null ? this.fc.build() : null; + } + + public A withFc(V1FCVolumeSource fc) { + this._visitables.remove("fc"); + if (fc != null) { + this.fc = new V1FCVolumeSourceBuilder(fc); + this._visitables.get("fc").add(this.fc); + } else { + this.fc = null; + this._visitables.get("fc").remove(this.fc); + } + return (A) this; + } + + public boolean hasFc() { + return this.fc != null; + } + + public FcNested withNewFc() { + return new FcNested(null); + } + + public FcNested withNewFcLike(V1FCVolumeSource item) { + return new FcNested(item); + } + + public FcNested editFc() { + return withNewFcLike(java.util.Optional.ofNullable(buildFc()).orElse(null)); + } + + public FcNested editOrNewFc() { + return withNewFcLike(java.util.Optional.ofNullable(buildFc()).orElse(new V1FCVolumeSourceBuilder().build())); + } + + public FcNested editOrNewFcLike(V1FCVolumeSource item) { + return withNewFcLike(java.util.Optional.ofNullable(buildFc()).orElse(item)); + } + + public V1FlexPersistentVolumeSource buildFlexVolume() { + return this.flexVolume != null ? this.flexVolume.build() : null; + } + + public A withFlexVolume(V1FlexPersistentVolumeSource flexVolume) { + this._visitables.remove("flexVolume"); + if (flexVolume != null) { + this.flexVolume = new V1FlexPersistentVolumeSourceBuilder(flexVolume); + this._visitables.get("flexVolume").add(this.flexVolume); + } else { + this.flexVolume = null; + this._visitables.get("flexVolume").remove(this.flexVolume); + } + return (A) this; + } + + public boolean hasFlexVolume() { + return this.flexVolume != null; + } + + public FlexVolumeNested withNewFlexVolume() { + return new FlexVolumeNested(null); + } + + public FlexVolumeNested withNewFlexVolumeLike(V1FlexPersistentVolumeSource item) { + return new FlexVolumeNested(item); + } + + public FlexVolumeNested editFlexVolume() { + return withNewFlexVolumeLike(java.util.Optional.ofNullable(buildFlexVolume()).orElse(null)); + } + + public FlexVolumeNested editOrNewFlexVolume() { + return withNewFlexVolumeLike(java.util.Optional.ofNullable(buildFlexVolume()).orElse(new V1FlexPersistentVolumeSourceBuilder().build())); + } + + public FlexVolumeNested editOrNewFlexVolumeLike(V1FlexPersistentVolumeSource item) { + return withNewFlexVolumeLike(java.util.Optional.ofNullable(buildFlexVolume()).orElse(item)); + } + + public V1FlockerVolumeSource buildFlocker() { + return this.flocker != null ? this.flocker.build() : null; + } + + public A withFlocker(V1FlockerVolumeSource flocker) { + this._visitables.remove("flocker"); + if (flocker != null) { + this.flocker = new V1FlockerVolumeSourceBuilder(flocker); + this._visitables.get("flocker").add(this.flocker); + } else { + this.flocker = null; + this._visitables.get("flocker").remove(this.flocker); + } + return (A) this; + } + + public boolean hasFlocker() { + return this.flocker != null; + } + + public FlockerNested withNewFlocker() { + return new FlockerNested(null); + } + + public FlockerNested withNewFlockerLike(V1FlockerVolumeSource item) { + return new FlockerNested(item); + } + + public FlockerNested editFlocker() { + return withNewFlockerLike(java.util.Optional.ofNullable(buildFlocker()).orElse(null)); + } + + public FlockerNested editOrNewFlocker() { + return withNewFlockerLike(java.util.Optional.ofNullable(buildFlocker()).orElse(new V1FlockerVolumeSourceBuilder().build())); + } + + public FlockerNested editOrNewFlockerLike(V1FlockerVolumeSource item) { + return withNewFlockerLike(java.util.Optional.ofNullable(buildFlocker()).orElse(item)); + } + + public V1GCEPersistentDiskVolumeSource buildGcePersistentDisk() { + return this.gcePersistentDisk != null ? this.gcePersistentDisk.build() : null; + } + + public A withGcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk) { + this._visitables.remove("gcePersistentDisk"); + if (gcePersistentDisk != null) { + this.gcePersistentDisk = new V1GCEPersistentDiskVolumeSourceBuilder(gcePersistentDisk); + this._visitables.get("gcePersistentDisk").add(this.gcePersistentDisk); + } else { + this.gcePersistentDisk = null; + this._visitables.get("gcePersistentDisk").remove(this.gcePersistentDisk); + } + return (A) this; + } + + public boolean hasGcePersistentDisk() { + return this.gcePersistentDisk != null; + } + + public GcePersistentDiskNested withNewGcePersistentDisk() { + return new GcePersistentDiskNested(null); + } + + public GcePersistentDiskNested withNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item) { + return new GcePersistentDiskNested(item); + } + + public GcePersistentDiskNested editGcePersistentDisk() { + return withNewGcePersistentDiskLike(java.util.Optional.ofNullable(buildGcePersistentDisk()).orElse(null)); + } + + public GcePersistentDiskNested editOrNewGcePersistentDisk() { + return withNewGcePersistentDiskLike(java.util.Optional.ofNullable(buildGcePersistentDisk()).orElse(new V1GCEPersistentDiskVolumeSourceBuilder().build())); + } + + public GcePersistentDiskNested editOrNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item) { + return withNewGcePersistentDiskLike(java.util.Optional.ofNullable(buildGcePersistentDisk()).orElse(item)); + } + + public V1GlusterfsPersistentVolumeSource buildGlusterfs() { + return this.glusterfs != null ? this.glusterfs.build() : null; + } + + public A withGlusterfs(V1GlusterfsPersistentVolumeSource glusterfs) { + this._visitables.remove("glusterfs"); + if (glusterfs != null) { + this.glusterfs = new V1GlusterfsPersistentVolumeSourceBuilder(glusterfs); + this._visitables.get("glusterfs").add(this.glusterfs); + } else { + this.glusterfs = null; + this._visitables.get("glusterfs").remove(this.glusterfs); + } + return (A) this; + } + + public boolean hasGlusterfs() { + return this.glusterfs != null; + } + + public GlusterfsNested withNewGlusterfs() { + return new GlusterfsNested(null); + } + + public GlusterfsNested withNewGlusterfsLike(V1GlusterfsPersistentVolumeSource item) { + return new GlusterfsNested(item); + } + + public GlusterfsNested editGlusterfs() { + return withNewGlusterfsLike(java.util.Optional.ofNullable(buildGlusterfs()).orElse(null)); + } + + public GlusterfsNested editOrNewGlusterfs() { + return withNewGlusterfsLike(java.util.Optional.ofNullable(buildGlusterfs()).orElse(new V1GlusterfsPersistentVolumeSourceBuilder().build())); + } + + public GlusterfsNested editOrNewGlusterfsLike(V1GlusterfsPersistentVolumeSource item) { + return withNewGlusterfsLike(java.util.Optional.ofNullable(buildGlusterfs()).orElse(item)); + } + + public V1HostPathVolumeSource buildHostPath() { + return this.hostPath != null ? this.hostPath.build() : null; + } + + public A withHostPath(V1HostPathVolumeSource hostPath) { + this._visitables.remove("hostPath"); + if (hostPath != null) { + this.hostPath = new V1HostPathVolumeSourceBuilder(hostPath); + this._visitables.get("hostPath").add(this.hostPath); + } else { + this.hostPath = null; + this._visitables.get("hostPath").remove(this.hostPath); + } + return (A) this; + } + + public boolean hasHostPath() { + return this.hostPath != null; + } + + public HostPathNested withNewHostPath() { + return new HostPathNested(null); + } + + public HostPathNested withNewHostPathLike(V1HostPathVolumeSource item) { + return new HostPathNested(item); + } + + public HostPathNested editHostPath() { + return withNewHostPathLike(java.util.Optional.ofNullable(buildHostPath()).orElse(null)); + } + + public HostPathNested editOrNewHostPath() { + return withNewHostPathLike(java.util.Optional.ofNullable(buildHostPath()).orElse(new V1HostPathVolumeSourceBuilder().build())); + } + + public HostPathNested editOrNewHostPathLike(V1HostPathVolumeSource item) { + return withNewHostPathLike(java.util.Optional.ofNullable(buildHostPath()).orElse(item)); + } + + public V1ISCSIPersistentVolumeSource buildIscsi() { + return this.iscsi != null ? this.iscsi.build() : null; + } + + public A withIscsi(V1ISCSIPersistentVolumeSource iscsi) { + this._visitables.remove("iscsi"); + if (iscsi != null) { + this.iscsi = new V1ISCSIPersistentVolumeSourceBuilder(iscsi); + this._visitables.get("iscsi").add(this.iscsi); + } else { + this.iscsi = null; + this._visitables.get("iscsi").remove(this.iscsi); + } + return (A) this; + } + + public boolean hasIscsi() { + return this.iscsi != null; + } + + public IscsiNested withNewIscsi() { + return new IscsiNested(null); + } + + public IscsiNested withNewIscsiLike(V1ISCSIPersistentVolumeSource item) { + return new IscsiNested(item); + } + + public IscsiNested editIscsi() { + return withNewIscsiLike(java.util.Optional.ofNullable(buildIscsi()).orElse(null)); + } + + public IscsiNested editOrNewIscsi() { + return withNewIscsiLike(java.util.Optional.ofNullable(buildIscsi()).orElse(new V1ISCSIPersistentVolumeSourceBuilder().build())); + } + + public IscsiNested editOrNewIscsiLike(V1ISCSIPersistentVolumeSource item) { + return withNewIscsiLike(java.util.Optional.ofNullable(buildIscsi()).orElse(item)); + } + + public V1LocalVolumeSource buildLocal() { + return this.local != null ? this.local.build() : null; + } + + public A withLocal(V1LocalVolumeSource local) { + this._visitables.remove("local"); + if (local != null) { + this.local = new V1LocalVolumeSourceBuilder(local); + this._visitables.get("local").add(this.local); + } else { + this.local = null; + this._visitables.get("local").remove(this.local); + } + return (A) this; + } + + public boolean hasLocal() { + return this.local != null; + } + + public LocalNested withNewLocal() { + return new LocalNested(null); + } + + public LocalNested withNewLocalLike(V1LocalVolumeSource item) { + return new LocalNested(item); + } + + public LocalNested editLocal() { + return withNewLocalLike(java.util.Optional.ofNullable(buildLocal()).orElse(null)); + } + + public LocalNested editOrNewLocal() { + return withNewLocalLike(java.util.Optional.ofNullable(buildLocal()).orElse(new V1LocalVolumeSourceBuilder().build())); + } + + public LocalNested editOrNewLocalLike(V1LocalVolumeSource item) { + return withNewLocalLike(java.util.Optional.ofNullable(buildLocal()).orElse(item)); + } + + public A addToMountOptions(int index,String item) { + if (this.mountOptions == null) {this.mountOptions = new ArrayList();} + this.mountOptions.add(index, item); + return (A)this; + } + + public A setToMountOptions(int index,String item) { + if (this.mountOptions == null) {this.mountOptions = new ArrayList();} + this.mountOptions.set(index, item); return (A)this; + } + + public A addToMountOptions(java.lang.String... items) { + if (this.mountOptions == null) {this.mountOptions = new ArrayList();} + for (String item : items) {this.mountOptions.add(item);} return (A)this; + } + + public A addAllToMountOptions(Collection items) { + if (this.mountOptions == null) {this.mountOptions = new ArrayList();} + for (String item : items) {this.mountOptions.add(item);} return (A)this; + } + + public A removeFromMountOptions(java.lang.String... items) { + if (this.mountOptions == null) return (A)this; + for (String item : items) { this.mountOptions.remove(item);} return (A)this; + } + + public A removeAllFromMountOptions(Collection items) { + if (this.mountOptions == null) return (A)this; + for (String item : items) { this.mountOptions.remove(item);} return (A)this; + } + + public List getMountOptions() { + return this.mountOptions; + } + + public String getMountOption(int index) { + return this.mountOptions.get(index); + } + + public String getFirstMountOption() { + return this.mountOptions.get(0); + } + + public String getLastMountOption() { + return this.mountOptions.get(mountOptions.size() - 1); + } + + public String getMatchingMountOption(Predicate predicate) { + for (String item : mountOptions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingMountOption(Predicate predicate) { + for (String item : mountOptions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMountOptions(List mountOptions) { + if (mountOptions != null) { + this.mountOptions = new ArrayList(); + for (String item : mountOptions) { + this.addToMountOptions(item); + } + } else { + this.mountOptions = null; + } + return (A) this; + } + + public A withMountOptions(java.lang.String... mountOptions) { + if (this.mountOptions != null) { + this.mountOptions.clear(); + _visitables.remove("mountOptions"); + } + if (mountOptions != null) { + for (String item : mountOptions) { + this.addToMountOptions(item); + } + } + return (A) this; + } + + public boolean hasMountOptions() { + return this.mountOptions != null && !this.mountOptions.isEmpty(); + } + + public V1NFSVolumeSource buildNfs() { + return this.nfs != null ? this.nfs.build() : null; + } + + public A withNfs(V1NFSVolumeSource nfs) { + this._visitables.remove("nfs"); + if (nfs != null) { + this.nfs = new V1NFSVolumeSourceBuilder(nfs); + this._visitables.get("nfs").add(this.nfs); + } else { + this.nfs = null; + this._visitables.get("nfs").remove(this.nfs); + } + return (A) this; + } + + public boolean hasNfs() { + return this.nfs != null; + } + + public NfsNested withNewNfs() { + return new NfsNested(null); + } + + public NfsNested withNewNfsLike(V1NFSVolumeSource item) { + return new NfsNested(item); + } + + public NfsNested editNfs() { + return withNewNfsLike(java.util.Optional.ofNullable(buildNfs()).orElse(null)); + } + + public NfsNested editOrNewNfs() { + return withNewNfsLike(java.util.Optional.ofNullable(buildNfs()).orElse(new V1NFSVolumeSourceBuilder().build())); + } + + public NfsNested editOrNewNfsLike(V1NFSVolumeSource item) { + return withNewNfsLike(java.util.Optional.ofNullable(buildNfs()).orElse(item)); + } + + public V1VolumeNodeAffinity buildNodeAffinity() { + return this.nodeAffinity != null ? this.nodeAffinity.build() : null; + } + + public A withNodeAffinity(V1VolumeNodeAffinity nodeAffinity) { + this._visitables.remove("nodeAffinity"); + if (nodeAffinity != null) { + this.nodeAffinity = new V1VolumeNodeAffinityBuilder(nodeAffinity); + this._visitables.get("nodeAffinity").add(this.nodeAffinity); + } else { + this.nodeAffinity = null; + this._visitables.get("nodeAffinity").remove(this.nodeAffinity); + } + return (A) this; + } + + public boolean hasNodeAffinity() { + return this.nodeAffinity != null; + } + + public NodeAffinityNested withNewNodeAffinity() { + return new NodeAffinityNested(null); + } + + public NodeAffinityNested withNewNodeAffinityLike(V1VolumeNodeAffinity item) { + return new NodeAffinityNested(item); + } + + public NodeAffinityNested editNodeAffinity() { + return withNewNodeAffinityLike(java.util.Optional.ofNullable(buildNodeAffinity()).orElse(null)); + } + + public NodeAffinityNested editOrNewNodeAffinity() { + return withNewNodeAffinityLike(java.util.Optional.ofNullable(buildNodeAffinity()).orElse(new V1VolumeNodeAffinityBuilder().build())); + } + + public NodeAffinityNested editOrNewNodeAffinityLike(V1VolumeNodeAffinity item) { + return withNewNodeAffinityLike(java.util.Optional.ofNullable(buildNodeAffinity()).orElse(item)); + } + + public String getPersistentVolumeReclaimPolicy() { + return this.persistentVolumeReclaimPolicy; + } + + public A withPersistentVolumeReclaimPolicy(String persistentVolumeReclaimPolicy) { + this.persistentVolumeReclaimPolicy = persistentVolumeReclaimPolicy; + return (A) this; + } + + public boolean hasPersistentVolumeReclaimPolicy() { + return this.persistentVolumeReclaimPolicy != null; + } + + public V1PhotonPersistentDiskVolumeSource buildPhotonPersistentDisk() { + return this.photonPersistentDisk != null ? this.photonPersistentDisk.build() : null; + } + + public A withPhotonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk) { + this._visitables.remove("photonPersistentDisk"); + if (photonPersistentDisk != null) { + this.photonPersistentDisk = new V1PhotonPersistentDiskVolumeSourceBuilder(photonPersistentDisk); + this._visitables.get("photonPersistentDisk").add(this.photonPersistentDisk); + } else { + this.photonPersistentDisk = null; + this._visitables.get("photonPersistentDisk").remove(this.photonPersistentDisk); + } + return (A) this; + } + + public boolean hasPhotonPersistentDisk() { + return this.photonPersistentDisk != null; + } + + public PhotonPersistentDiskNested withNewPhotonPersistentDisk() { + return new PhotonPersistentDiskNested(null); + } + + public PhotonPersistentDiskNested withNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item) { + return new PhotonPersistentDiskNested(item); + } + + public PhotonPersistentDiskNested editPhotonPersistentDisk() { + return withNewPhotonPersistentDiskLike(java.util.Optional.ofNullable(buildPhotonPersistentDisk()).orElse(null)); + } + + public PhotonPersistentDiskNested editOrNewPhotonPersistentDisk() { + return withNewPhotonPersistentDiskLike(java.util.Optional.ofNullable(buildPhotonPersistentDisk()).orElse(new V1PhotonPersistentDiskVolumeSourceBuilder().build())); + } + + public PhotonPersistentDiskNested editOrNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item) { + return withNewPhotonPersistentDiskLike(java.util.Optional.ofNullable(buildPhotonPersistentDisk()).orElse(item)); + } + + public V1PortworxVolumeSource buildPortworxVolume() { + return this.portworxVolume != null ? this.portworxVolume.build() : null; + } + + public A withPortworxVolume(V1PortworxVolumeSource portworxVolume) { + this._visitables.remove("portworxVolume"); + if (portworxVolume != null) { + this.portworxVolume = new V1PortworxVolumeSourceBuilder(portworxVolume); + this._visitables.get("portworxVolume").add(this.portworxVolume); + } else { + this.portworxVolume = null; + this._visitables.get("portworxVolume").remove(this.portworxVolume); + } + return (A) this; + } + + public boolean hasPortworxVolume() { + return this.portworxVolume != null; + } + + public PortworxVolumeNested withNewPortworxVolume() { + return new PortworxVolumeNested(null); + } + + public PortworxVolumeNested withNewPortworxVolumeLike(V1PortworxVolumeSource item) { + return new PortworxVolumeNested(item); + } + + public PortworxVolumeNested editPortworxVolume() { + return withNewPortworxVolumeLike(java.util.Optional.ofNullable(buildPortworxVolume()).orElse(null)); + } + + public PortworxVolumeNested editOrNewPortworxVolume() { + return withNewPortworxVolumeLike(java.util.Optional.ofNullable(buildPortworxVolume()).orElse(new V1PortworxVolumeSourceBuilder().build())); + } + + public PortworxVolumeNested editOrNewPortworxVolumeLike(V1PortworxVolumeSource item) { + return withNewPortworxVolumeLike(java.util.Optional.ofNullable(buildPortworxVolume()).orElse(item)); + } + + public V1QuobyteVolumeSource buildQuobyte() { + return this.quobyte != null ? this.quobyte.build() : null; + } + + public A withQuobyte(V1QuobyteVolumeSource quobyte) { + this._visitables.remove("quobyte"); + if (quobyte != null) { + this.quobyte = new V1QuobyteVolumeSourceBuilder(quobyte); + this._visitables.get("quobyte").add(this.quobyte); + } else { + this.quobyte = null; + this._visitables.get("quobyte").remove(this.quobyte); + } + return (A) this; + } + + public boolean hasQuobyte() { + return this.quobyte != null; + } + + public QuobyteNested withNewQuobyte() { + return new QuobyteNested(null); + } + + public QuobyteNested withNewQuobyteLike(V1QuobyteVolumeSource item) { + return new QuobyteNested(item); + } + + public QuobyteNested editQuobyte() { + return withNewQuobyteLike(java.util.Optional.ofNullable(buildQuobyte()).orElse(null)); + } + + public QuobyteNested editOrNewQuobyte() { + return withNewQuobyteLike(java.util.Optional.ofNullable(buildQuobyte()).orElse(new V1QuobyteVolumeSourceBuilder().build())); + } + + public QuobyteNested editOrNewQuobyteLike(V1QuobyteVolumeSource item) { + return withNewQuobyteLike(java.util.Optional.ofNullable(buildQuobyte()).orElse(item)); + } + + public V1RBDPersistentVolumeSource buildRbd() { + return this.rbd != null ? this.rbd.build() : null; + } + + public A withRbd(V1RBDPersistentVolumeSource rbd) { + this._visitables.remove("rbd"); + if (rbd != null) { + this.rbd = new V1RBDPersistentVolumeSourceBuilder(rbd); + this._visitables.get("rbd").add(this.rbd); + } else { + this.rbd = null; + this._visitables.get("rbd").remove(this.rbd); + } + return (A) this; + } + + public boolean hasRbd() { + return this.rbd != null; + } + + public RbdNested withNewRbd() { + return new RbdNested(null); + } + + public RbdNested withNewRbdLike(V1RBDPersistentVolumeSource item) { + return new RbdNested(item); + } + + public RbdNested editRbd() { + return withNewRbdLike(java.util.Optional.ofNullable(buildRbd()).orElse(null)); + } + + public RbdNested editOrNewRbd() { + return withNewRbdLike(java.util.Optional.ofNullable(buildRbd()).orElse(new V1RBDPersistentVolumeSourceBuilder().build())); + } + + public RbdNested editOrNewRbdLike(V1RBDPersistentVolumeSource item) { + return withNewRbdLike(java.util.Optional.ofNullable(buildRbd()).orElse(item)); + } + + public V1ScaleIOPersistentVolumeSource buildScaleIO() { + return this.scaleIO != null ? this.scaleIO.build() : null; + } + + public A withScaleIO(V1ScaleIOPersistentVolumeSource scaleIO) { + this._visitables.remove("scaleIO"); + if (scaleIO != null) { + this.scaleIO = new V1ScaleIOPersistentVolumeSourceBuilder(scaleIO); + this._visitables.get("scaleIO").add(this.scaleIO); + } else { + this.scaleIO = null; + this._visitables.get("scaleIO").remove(this.scaleIO); + } + return (A) this; + } + + public boolean hasScaleIO() { + return this.scaleIO != null; + } + + public ScaleIONested withNewScaleIO() { + return new ScaleIONested(null); + } + + public ScaleIONested withNewScaleIOLike(V1ScaleIOPersistentVolumeSource item) { + return new ScaleIONested(item); + } + + public ScaleIONested editScaleIO() { + return withNewScaleIOLike(java.util.Optional.ofNullable(buildScaleIO()).orElse(null)); + } + + public ScaleIONested editOrNewScaleIO() { + return withNewScaleIOLike(java.util.Optional.ofNullable(buildScaleIO()).orElse(new V1ScaleIOPersistentVolumeSourceBuilder().build())); + } + + public ScaleIONested editOrNewScaleIOLike(V1ScaleIOPersistentVolumeSource item) { + return withNewScaleIOLike(java.util.Optional.ofNullable(buildScaleIO()).orElse(item)); + } + + public String getStorageClassName() { + return this.storageClassName; + } + + public A withStorageClassName(String storageClassName) { + this.storageClassName = storageClassName; + return (A) this; + } + + public boolean hasStorageClassName() { + return this.storageClassName != null; + } + + public V1StorageOSPersistentVolumeSource buildStorageos() { + return this.storageos != null ? this.storageos.build() : null; + } + + public A withStorageos(V1StorageOSPersistentVolumeSource storageos) { + this._visitables.remove("storageos"); + if (storageos != null) { + this.storageos = new V1StorageOSPersistentVolumeSourceBuilder(storageos); + this._visitables.get("storageos").add(this.storageos); + } else { + this.storageos = null; + this._visitables.get("storageos").remove(this.storageos); + } + return (A) this; + } + + public boolean hasStorageos() { + return this.storageos != null; + } + + public StorageosNested withNewStorageos() { + return new StorageosNested(null); + } + + public StorageosNested withNewStorageosLike(V1StorageOSPersistentVolumeSource item) { + return new StorageosNested(item); + } + + public StorageosNested editStorageos() { + return withNewStorageosLike(java.util.Optional.ofNullable(buildStorageos()).orElse(null)); + } + + public StorageosNested editOrNewStorageos() { + return withNewStorageosLike(java.util.Optional.ofNullable(buildStorageos()).orElse(new V1StorageOSPersistentVolumeSourceBuilder().build())); + } + + public StorageosNested editOrNewStorageosLike(V1StorageOSPersistentVolumeSource item) { + return withNewStorageosLike(java.util.Optional.ofNullable(buildStorageos()).orElse(item)); + } + + public String getVolumeMode() { + return this.volumeMode; + } + + public A withVolumeMode(String volumeMode) { + this.volumeMode = volumeMode; + return (A) this; + } + + public boolean hasVolumeMode() { + return this.volumeMode != null; + } + + public V1VsphereVirtualDiskVolumeSource buildVsphereVolume() { + return this.vsphereVolume != null ? this.vsphereVolume.build() : null; + } + + public A withVsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume) { + this._visitables.remove("vsphereVolume"); + if (vsphereVolume != null) { + this.vsphereVolume = new V1VsphereVirtualDiskVolumeSourceBuilder(vsphereVolume); + this._visitables.get("vsphereVolume").add(this.vsphereVolume); + } else { + this.vsphereVolume = null; + this._visitables.get("vsphereVolume").remove(this.vsphereVolume); + } + return (A) this; + } + + public boolean hasVsphereVolume() { + return this.vsphereVolume != null; + } + + public VsphereVolumeNested withNewVsphereVolume() { + return new VsphereVolumeNested(null); + } + + public VsphereVolumeNested withNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item) { + return new VsphereVolumeNested(item); + } + + public VsphereVolumeNested editVsphereVolume() { + return withNewVsphereVolumeLike(java.util.Optional.ofNullable(buildVsphereVolume()).orElse(null)); + } + + public VsphereVolumeNested editOrNewVsphereVolume() { + return withNewVsphereVolumeLike(java.util.Optional.ofNullable(buildVsphereVolume()).orElse(new V1VsphereVirtualDiskVolumeSourceBuilder().build())); + } + + public VsphereVolumeNested editOrNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item) { + return withNewVsphereVolumeLike(java.util.Optional.ofNullable(buildVsphereVolume()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeSpecFluent that = (V1PersistentVolumeSpecFluent) o; + if (!java.util.Objects.equals(accessModes, that.accessModes)) return false; + if (!java.util.Objects.equals(awsElasticBlockStore, that.awsElasticBlockStore)) return false; + if (!java.util.Objects.equals(azureDisk, that.azureDisk)) return false; + if (!java.util.Objects.equals(azureFile, that.azureFile)) return false; + if (!java.util.Objects.equals(capacity, that.capacity)) return false; + if (!java.util.Objects.equals(cephfs, that.cephfs)) return false; + if (!java.util.Objects.equals(cinder, that.cinder)) return false; + if (!java.util.Objects.equals(claimRef, that.claimRef)) return false; + if (!java.util.Objects.equals(csi, that.csi)) return false; + if (!java.util.Objects.equals(fc, that.fc)) return false; + if (!java.util.Objects.equals(flexVolume, that.flexVolume)) return false; + if (!java.util.Objects.equals(flocker, that.flocker)) return false; + if (!java.util.Objects.equals(gcePersistentDisk, that.gcePersistentDisk)) return false; + if (!java.util.Objects.equals(glusterfs, that.glusterfs)) return false; + if (!java.util.Objects.equals(hostPath, that.hostPath)) return false; + if (!java.util.Objects.equals(iscsi, that.iscsi)) return false; + if (!java.util.Objects.equals(local, that.local)) return false; + if (!java.util.Objects.equals(mountOptions, that.mountOptions)) return false; + if (!java.util.Objects.equals(nfs, that.nfs)) return false; + if (!java.util.Objects.equals(nodeAffinity, that.nodeAffinity)) return false; + if (!java.util.Objects.equals(persistentVolumeReclaimPolicy, that.persistentVolumeReclaimPolicy)) return false; + if (!java.util.Objects.equals(photonPersistentDisk, that.photonPersistentDisk)) return false; + if (!java.util.Objects.equals(portworxVolume, that.portworxVolume)) return false; + if (!java.util.Objects.equals(quobyte, that.quobyte)) return false; + if (!java.util.Objects.equals(rbd, that.rbd)) return false; + if (!java.util.Objects.equals(scaleIO, that.scaleIO)) return false; + if (!java.util.Objects.equals(storageClassName, that.storageClassName)) return false; + if (!java.util.Objects.equals(storageos, that.storageos)) return false; + if (!java.util.Objects.equals(volumeMode, that.volumeMode)) return false; + if (!java.util.Objects.equals(vsphereVolume, that.vsphereVolume)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(accessModes, awsElasticBlockStore, azureDisk, azureFile, capacity, cephfs, cinder, claimRef, csi, fc, flexVolume, flocker, gcePersistentDisk, glusterfs, hostPath, iscsi, local, mountOptions, nfs, nodeAffinity, persistentVolumeReclaimPolicy, photonPersistentDisk, portworxVolume, quobyte, rbd, scaleIO, storageClassName, storageos, volumeMode, vsphereVolume, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (accessModes != null && !accessModes.isEmpty()) { sb.append("accessModes:"); sb.append(accessModes + ","); } + if (awsElasticBlockStore != null) { sb.append("awsElasticBlockStore:"); sb.append(awsElasticBlockStore + ","); } + if (azureDisk != null) { sb.append("azureDisk:"); sb.append(azureDisk + ","); } + if (azureFile != null) { sb.append("azureFile:"); sb.append(azureFile + ","); } + if (capacity != null && !capacity.isEmpty()) { sb.append("capacity:"); sb.append(capacity + ","); } + if (cephfs != null) { sb.append("cephfs:"); sb.append(cephfs + ","); } + if (cinder != null) { sb.append("cinder:"); sb.append(cinder + ","); } + if (claimRef != null) { sb.append("claimRef:"); sb.append(claimRef + ","); } + if (csi != null) { sb.append("csi:"); sb.append(csi + ","); } + if (fc != null) { sb.append("fc:"); sb.append(fc + ","); } + if (flexVolume != null) { sb.append("flexVolume:"); sb.append(flexVolume + ","); } + if (flocker != null) { sb.append("flocker:"); sb.append(flocker + ","); } + if (gcePersistentDisk != null) { sb.append("gcePersistentDisk:"); sb.append(gcePersistentDisk + ","); } + if (glusterfs != null) { sb.append("glusterfs:"); sb.append(glusterfs + ","); } + if (hostPath != null) { sb.append("hostPath:"); sb.append(hostPath + ","); } + if (iscsi != null) { sb.append("iscsi:"); sb.append(iscsi + ","); } + if (local != null) { sb.append("local:"); sb.append(local + ","); } + if (mountOptions != null && !mountOptions.isEmpty()) { sb.append("mountOptions:"); sb.append(mountOptions + ","); } + if (nfs != null) { sb.append("nfs:"); sb.append(nfs + ","); } + if (nodeAffinity != null) { sb.append("nodeAffinity:"); sb.append(nodeAffinity + ","); } + if (persistentVolumeReclaimPolicy != null) { sb.append("persistentVolumeReclaimPolicy:"); sb.append(persistentVolumeReclaimPolicy + ","); } + if (photonPersistentDisk != null) { sb.append("photonPersistentDisk:"); sb.append(photonPersistentDisk + ","); } + if (portworxVolume != null) { sb.append("portworxVolume:"); sb.append(portworxVolume + ","); } + if (quobyte != null) { sb.append("quobyte:"); sb.append(quobyte + ","); } + if (rbd != null) { sb.append("rbd:"); sb.append(rbd + ","); } + if (scaleIO != null) { sb.append("scaleIO:"); sb.append(scaleIO + ","); } + if (storageClassName != null) { sb.append("storageClassName:"); sb.append(storageClassName + ","); } + if (storageos != null) { sb.append("storageos:"); sb.append(storageos + ","); } + if (volumeMode != null) { sb.append("volumeMode:"); sb.append(volumeMode + ","); } + if (vsphereVolume != null) { sb.append("vsphereVolume:"); sb.append(vsphereVolume); } + sb.append("}"); + return sb.toString(); + } + public class AwsElasticBlockStoreNested extends V1AWSElasticBlockStoreVolumeSourceFluent> implements Nested{ + AwsElasticBlockStoreNested(V1AWSElasticBlockStoreVolumeSource item) { + this.builder = new V1AWSElasticBlockStoreVolumeSourceBuilder(this, item); + } + V1AWSElasticBlockStoreVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withAwsElasticBlockStore(builder.build()); + } + + public N endAwsElasticBlockStore() { + return and(); + } + + + } + public class AzureDiskNested extends V1AzureDiskVolumeSourceFluent> implements Nested{ + AzureDiskNested(V1AzureDiskVolumeSource item) { + this.builder = new V1AzureDiskVolumeSourceBuilder(this, item); + } + V1AzureDiskVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withAzureDisk(builder.build()); + } + public N endAzureDisk() { + return and(); + } + + } - public interface CephfsNested extends Nested,V1CephFSPersistentVolumeSourceFluent>{ - public N and(); - public N endCephfs(); + public class AzureFileNested extends V1AzureFilePersistentVolumeSourceFluent> implements Nested{ + AzureFileNested(V1AzureFilePersistentVolumeSource item) { + this.builder = new V1AzureFilePersistentVolumeSourceBuilder(this, item); + } + V1AzureFilePersistentVolumeSourceBuilder builder; + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withAzureFile(builder.build()); + } + + public N endAzureFile() { + return and(); + } + + } - public interface CinderNested extends Nested,V1CinderPersistentVolumeSourceFluent>{ - public N and(); - public N endCinder(); + public class CephfsNested extends V1CephFSPersistentVolumeSourceFluent> implements Nested{ + CephfsNested(V1CephFSPersistentVolumeSource item) { + this.builder = new V1CephFSPersistentVolumeSourceBuilder(this, item); + } + V1CephFSPersistentVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withCephfs(builder.build()); + } + public N endCephfs() { + return and(); + } + + } - public interface ClaimRefNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endClaimRef(); + public class CinderNested extends V1CinderPersistentVolumeSourceFluent> implements Nested{ + CinderNested(V1CinderPersistentVolumeSource item) { + this.builder = new V1CinderPersistentVolumeSourceBuilder(this, item); + } + V1CinderPersistentVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withCinder(builder.build()); + } + + public N endCinder() { + return and(); + } + } - public interface CsiNested extends Nested,V1CSIPersistentVolumeSourceFluent>{ - public N and(); - public N endCsi(); + public class ClaimRefNested extends V1ObjectReferenceFluent> implements Nested{ + ClaimRefNested(V1ObjectReference item) { + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withClaimRef(builder.build()); + } + public N endClaimRef() { + return and(); + } + + } - public interface FcNested extends Nested,V1FCVolumeSourceFluent>{ - public N and(); - public N endFc(); + public class CsiNested extends V1CSIPersistentVolumeSourceFluent> implements Nested{ + CsiNested(V1CSIPersistentVolumeSource item) { + this.builder = new V1CSIPersistentVolumeSourceBuilder(this, item); + } + V1CSIPersistentVolumeSourceBuilder builder; + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withCsi(builder.build()); + } + + public N endCsi() { + return and(); + } + + } - public interface FlexVolumeNested extends Nested,V1FlexPersistentVolumeSourceFluent>{ - public N and(); - public N endFlexVolume(); + public class FcNested extends V1FCVolumeSourceFluent> implements Nested{ + FcNested(V1FCVolumeSource item) { + this.builder = new V1FCVolumeSourceBuilder(this, item); + } + V1FCVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withFc(builder.build()); + } + public N endFc() { + return and(); + } + + } - public interface FlockerNested extends Nested,V1FlockerVolumeSourceFluent>{ - public N and(); - public N endFlocker(); + public class FlexVolumeNested extends V1FlexPersistentVolumeSourceFluent> implements Nested{ + FlexVolumeNested(V1FlexPersistentVolumeSource item) { + this.builder = new V1FlexPersistentVolumeSourceBuilder(this, item); + } + V1FlexPersistentVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withFlexVolume(builder.build()); + } + + public N endFlexVolume() { + return and(); + } + } - public interface GcePersistentDiskNested extends Nested,V1GCEPersistentDiskVolumeSourceFluent>{ - public N and(); - public N endGcePersistentDisk(); + public class FlockerNested extends V1FlockerVolumeSourceFluent> implements Nested{ + FlockerNested(V1FlockerVolumeSource item) { + this.builder = new V1FlockerVolumeSourceBuilder(this, item); + } + V1FlockerVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withFlocker(builder.build()); + } + public N endFlocker() { + return and(); + } + + } - public interface GlusterfsNested extends Nested,V1GlusterfsPersistentVolumeSourceFluent>{ - public N and(); - public N endGlusterfs(); + public class GcePersistentDiskNested extends V1GCEPersistentDiskVolumeSourceFluent> implements Nested{ + GcePersistentDiskNested(V1GCEPersistentDiskVolumeSource item) { + this.builder = new V1GCEPersistentDiskVolumeSourceBuilder(this, item); + } + V1GCEPersistentDiskVolumeSourceBuilder builder; + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withGcePersistentDisk(builder.build()); + } + + public N endGcePersistentDisk() { + return and(); + } + + } - public interface HostPathNested extends Nested,V1HostPathVolumeSourceFluent>{ - public N and(); - public N endHostPath(); + public class GlusterfsNested extends V1GlusterfsPersistentVolumeSourceFluent> implements Nested{ + GlusterfsNested(V1GlusterfsPersistentVolumeSource item) { + this.builder = new V1GlusterfsPersistentVolumeSourceBuilder(this, item); + } + V1GlusterfsPersistentVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withGlusterfs(builder.build()); + } + public N endGlusterfs() { + return and(); + } + + } - public interface IscsiNested extends Nested,V1ISCSIPersistentVolumeSourceFluent>{ - public N and(); - public N endIscsi(); + public class HostPathNested extends V1HostPathVolumeSourceFluent> implements Nested{ + HostPathNested(V1HostPathVolumeSource item) { + this.builder = new V1HostPathVolumeSourceBuilder(this, item); + } + V1HostPathVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withHostPath(builder.build()); + } + + public N endHostPath() { + return and(); + } + } - public interface LocalNested extends Nested,V1LocalVolumeSourceFluent>{ - public N and(); - public N endLocal(); + public class IscsiNested extends V1ISCSIPersistentVolumeSourceFluent> implements Nested{ + IscsiNested(V1ISCSIPersistentVolumeSource item) { + this.builder = new V1ISCSIPersistentVolumeSourceBuilder(this, item); + } + V1ISCSIPersistentVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withIscsi(builder.build()); + } + public N endIscsi() { + return and(); + } + + } - public interface NfsNested extends Nested,V1NFSVolumeSourceFluent>{ - public N and(); - public N endNfs(); + public class LocalNested extends V1LocalVolumeSourceFluent> implements Nested{ + LocalNested(V1LocalVolumeSource item) { + this.builder = new V1LocalVolumeSourceBuilder(this, item); + } + V1LocalVolumeSourceBuilder builder; + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withLocal(builder.build()); + } + + public N endLocal() { + return and(); + } + + } - public interface NodeAffinityNested extends Nested,V1VolumeNodeAffinityFluent>{ - public N and(); - public N endNodeAffinity(); + public class NfsNested extends V1NFSVolumeSourceFluent> implements Nested{ + NfsNested(V1NFSVolumeSource item) { + this.builder = new V1NFSVolumeSourceBuilder(this, item); + } + V1NFSVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withNfs(builder.build()); + } + public N endNfs() { + return and(); + } + + } - public interface PhotonPersistentDiskNested extends Nested,V1PhotonPersistentDiskVolumeSourceFluent>{ - public N and(); - public N endPhotonPersistentDisk(); + public class NodeAffinityNested extends V1VolumeNodeAffinityFluent> implements Nested{ + NodeAffinityNested(V1VolumeNodeAffinity item) { + this.builder = new V1VolumeNodeAffinityBuilder(this, item); + } + V1VolumeNodeAffinityBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withNodeAffinity(builder.build()); + } + + public N endNodeAffinity() { + return and(); + } + } - public interface PortworxVolumeNested extends Nested,V1PortworxVolumeSourceFluent>{ - public N and(); - public N endPortworxVolume(); + public class PhotonPersistentDiskNested extends V1PhotonPersistentDiskVolumeSourceFluent> implements Nested{ + PhotonPersistentDiskNested(V1PhotonPersistentDiskVolumeSource item) { + this.builder = new V1PhotonPersistentDiskVolumeSourceBuilder(this, item); + } + V1PhotonPersistentDiskVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withPhotonPersistentDisk(builder.build()); + } + public N endPhotonPersistentDisk() { + return and(); + } + + } - public interface QuobyteNested extends Nested,V1QuobyteVolumeSourceFluent>{ - public N and(); - public N endQuobyte(); + public class PortworxVolumeNested extends V1PortworxVolumeSourceFluent> implements Nested{ + PortworxVolumeNested(V1PortworxVolumeSource item) { + this.builder = new V1PortworxVolumeSourceBuilder(this, item); + } + V1PortworxVolumeSourceBuilder builder; + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withPortworxVolume(builder.build()); + } + + public N endPortworxVolume() { + return and(); + } + + } - public interface RbdNested extends Nested,V1RBDPersistentVolumeSourceFluent>{ - public N and(); - public N endRbd(); + public class QuobyteNested extends V1QuobyteVolumeSourceFluent> implements Nested{ + QuobyteNested(V1QuobyteVolumeSource item) { + this.builder = new V1QuobyteVolumeSourceBuilder(this, item); + } + V1QuobyteVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withQuobyte(builder.build()); + } + public N endQuobyte() { + return and(); + } + + } - public interface ScaleIONested extends Nested,V1ScaleIOPersistentVolumeSourceFluent>{ - public N and(); - public N endScaleIO(); + public class RbdNested extends V1RBDPersistentVolumeSourceFluent> implements Nested{ + RbdNested(V1RBDPersistentVolumeSource item) { + this.builder = new V1RBDPersistentVolumeSourceBuilder(this, item); + } + V1RBDPersistentVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withRbd(builder.build()); + } + + public N endRbd() { + return and(); + } + } - public interface StorageosNested extends Nested,V1StorageOSPersistentVolumeSourceFluent>{ - public N and(); - public N endStorageos(); + public class ScaleIONested extends V1ScaleIOPersistentVolumeSourceFluent> implements Nested{ + ScaleIONested(V1ScaleIOPersistentVolumeSource item) { + this.builder = new V1ScaleIOPersistentVolumeSourceBuilder(this, item); + } + V1ScaleIOPersistentVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withScaleIO(builder.build()); + } + public N endScaleIO() { + return and(); + } + + } - public interface VsphereVolumeNested extends Nested,V1VsphereVirtualDiskVolumeSourceFluent>{ - public N and(); - public N endVsphereVolume(); + public class StorageosNested extends V1StorageOSPersistentVolumeSourceFluent> implements Nested{ + StorageosNested(V1StorageOSPersistentVolumeSource item) { + this.builder = new V1StorageOSPersistentVolumeSourceBuilder(this, item); + } + V1StorageOSPersistentVolumeSourceBuilder builder; + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withStorageos(builder.build()); + } + + public N endStorageos() { + return and(); + } + + } + public class VsphereVolumeNested extends V1VsphereVirtualDiskVolumeSourceFluent> implements Nested{ + VsphereVolumeNested(V1VsphereVirtualDiskVolumeSource item) { + this.builder = new V1VsphereVirtualDiskVolumeSourceBuilder(this, item); + } + V1VsphereVirtualDiskVolumeSourceBuilder builder; + + public N and() { + return (N) V1PersistentVolumeSpecFluent.this.withVsphereVolume(builder.build()); + } + + public N endVsphereVolume() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecFluentImpl.java deleted file mode 100644 index 50f32bb135..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeSpecFluentImpl.java +++ /dev/null @@ -1,1550 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.util.ArrayList; -import java.lang.String; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; -import java.util.Map; -import java.lang.Deprecated; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.util.List; -import java.util.Collection; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import io.kubernetes.client.custom.Quantity; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeSpecFluentImpl> extends BaseFluent implements V1PersistentVolumeSpecFluent{ - public V1PersistentVolumeSpecFluentImpl() { - } - public V1PersistentVolumeSpecFluentImpl(V1PersistentVolumeSpec instance) { - if (instance != null) { - this.withAccessModes(instance.getAccessModes()); - this.withAwsElasticBlockStore(instance.getAwsElasticBlockStore()); - this.withAzureDisk(instance.getAzureDisk()); - this.withAzureFile(instance.getAzureFile()); - this.withCapacity(instance.getCapacity()); - this.withCephfs(instance.getCephfs()); - this.withCinder(instance.getCinder()); - this.withClaimRef(instance.getClaimRef()); - this.withCsi(instance.getCsi()); - this.withFc(instance.getFc()); - this.withFlexVolume(instance.getFlexVolume()); - this.withFlocker(instance.getFlocker()); - this.withGcePersistentDisk(instance.getGcePersistentDisk()); - this.withGlusterfs(instance.getGlusterfs()); - this.withHostPath(instance.getHostPath()); - this.withIscsi(instance.getIscsi()); - this.withLocal(instance.getLocal()); - this.withMountOptions(instance.getMountOptions()); - this.withNfs(instance.getNfs()); - this.withNodeAffinity(instance.getNodeAffinity()); - this.withPersistentVolumeReclaimPolicy(instance.getPersistentVolumeReclaimPolicy()); - this.withPhotonPersistentDisk(instance.getPhotonPersistentDisk()); - this.withPortworxVolume(instance.getPortworxVolume()); - this.withQuobyte(instance.getQuobyte()); - this.withRbd(instance.getRbd()); - this.withScaleIO(instance.getScaleIO()); - this.withStorageClassName(instance.getStorageClassName()); - this.withStorageos(instance.getStorageos()); - this.withVolumeMode(instance.getVolumeMode()); - this.withVsphereVolume(instance.getVsphereVolume()); - } - } - private List accessModes; - private V1AWSElasticBlockStoreVolumeSourceBuilder awsElasticBlockStore; - private V1AzureDiskVolumeSourceBuilder azureDisk; - private V1AzureFilePersistentVolumeSourceBuilder azureFile; - private Map capacity; - private V1CephFSPersistentVolumeSourceBuilder cephfs; - private V1CinderPersistentVolumeSourceBuilder cinder; - private V1ObjectReferenceBuilder claimRef; - private V1CSIPersistentVolumeSourceBuilder csi; - private V1FCVolumeSourceBuilder fc; - private V1FlexPersistentVolumeSourceBuilder flexVolume; - private V1FlockerVolumeSourceBuilder flocker; - private V1GCEPersistentDiskVolumeSourceBuilder gcePersistentDisk; - private V1GlusterfsPersistentVolumeSourceBuilder glusterfs; - private V1HostPathVolumeSourceBuilder hostPath; - private V1ISCSIPersistentVolumeSourceBuilder iscsi; - private V1LocalVolumeSourceBuilder local; - private List mountOptions; - private V1NFSVolumeSourceBuilder nfs; - private V1VolumeNodeAffinityBuilder nodeAffinity; - private String persistentVolumeReclaimPolicy; - private V1PhotonPersistentDiskVolumeSourceBuilder photonPersistentDisk; - private V1PortworxVolumeSourceBuilder portworxVolume; - private V1QuobyteVolumeSourceBuilder quobyte; - private V1RBDPersistentVolumeSourceBuilder rbd; - private V1ScaleIOPersistentVolumeSourceBuilder scaleIO; - private String storageClassName; - private V1StorageOSPersistentVolumeSourceBuilder storageos; - private String volumeMode; - private V1VsphereVirtualDiskVolumeSourceBuilder vsphereVolume; - public A addToAccessModes(int index,String item) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - this.accessModes.add(index, item); - return (A)this; - } - public A setToAccessModes(int index,String item) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - this.accessModes.set(index, item); return (A)this; - } - public A addToAccessModes(java.lang.String... items) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - for (String item : items) {this.accessModes.add(item);} return (A)this; - } - public A addAllToAccessModes(Collection items) { - if (this.accessModes == null) {this.accessModes = new ArrayList();} - for (String item : items) {this.accessModes.add(item);} return (A)this; - } - public A removeFromAccessModes(java.lang.String... items) { - for (String item : items) {if (this.accessModes!= null){ this.accessModes.remove(item);}} return (A)this; - } - public A removeAllFromAccessModes(Collection items) { - for (String item : items) {if (this.accessModes!= null){ this.accessModes.remove(item);}} return (A)this; - } - public List getAccessModes() { - return this.accessModes; - } - public String getAccessMode(int index) { - return this.accessModes.get(index); - } - public String getFirstAccessMode() { - return this.accessModes.get(0); - } - public String getLastAccessMode() { - return this.accessModes.get(accessModes.size() - 1); - } - public String getMatchingAccessMode(Predicate predicate) { - for (String item: accessModes) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAccessMode(Predicate predicate) { - for (String item: accessModes) { if(predicate.test(item)){ return true;} } return false; - } - public A withAccessModes(List accessModes) { - if (accessModes != null) {this.accessModes = new ArrayList(); for (String item : accessModes){this.addToAccessModes(item);}} else { this.accessModes = null;} return (A) this; - } - public A withAccessModes(java.lang.String... accessModes) { - if (this.accessModes != null) {this.accessModes.clear(); _visitables.remove("accessModes"); } - if (accessModes != null) {for (String item :accessModes){ this.addToAccessModes(item);}} return (A) this; - } - public Boolean hasAccessModes() { - return accessModes != null && !accessModes.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildAwsElasticBlockStore instead. - * @return The buildable object. - */ - @Deprecated - public V1AWSElasticBlockStoreVolumeSource getAwsElasticBlockStore() { - return this.awsElasticBlockStore!=null ?this.awsElasticBlockStore.build():null; - } - public V1AWSElasticBlockStoreVolumeSource buildAwsElasticBlockStore() { - return this.awsElasticBlockStore!=null ?this.awsElasticBlockStore.build():null; - } - public A withAwsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore) { - _visitables.get("awsElasticBlockStore").remove(this.awsElasticBlockStore); - if (awsElasticBlockStore!=null){ this.awsElasticBlockStore= new V1AWSElasticBlockStoreVolumeSourceBuilder(awsElasticBlockStore); _visitables.get("awsElasticBlockStore").add(this.awsElasticBlockStore);} else { this.awsElasticBlockStore = null; _visitables.get("awsElasticBlockStore").remove(this.awsElasticBlockStore); } return (A) this; - } - public Boolean hasAwsElasticBlockStore() { - return this.awsElasticBlockStore != null; - } - public V1PersistentVolumeSpecFluentImpl.AwsElasticBlockStoreNested withNewAwsElasticBlockStore() { - return new V1PersistentVolumeSpecFluentImpl.AwsElasticBlockStoreNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.AwsElasticBlockStoreNested withNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.AwsElasticBlockStoreNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.AwsElasticBlockStoreNested editAwsElasticBlockStore() { - return withNewAwsElasticBlockStoreLike(getAwsElasticBlockStore()); - } - public V1PersistentVolumeSpecFluentImpl.AwsElasticBlockStoreNested editOrNewAwsElasticBlockStore() { - return withNewAwsElasticBlockStoreLike(getAwsElasticBlockStore() != null ? getAwsElasticBlockStore(): new V1AWSElasticBlockStoreVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.AwsElasticBlockStoreNested editOrNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item) { - return withNewAwsElasticBlockStoreLike(getAwsElasticBlockStore() != null ? getAwsElasticBlockStore(): item); - } - - /** - * This method has been deprecated, please use method buildAzureDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1AzureDiskVolumeSource getAzureDisk() { - return this.azureDisk!=null ?this.azureDisk.build():null; - } - public V1AzureDiskVolumeSource buildAzureDisk() { - return this.azureDisk!=null ?this.azureDisk.build():null; - } - public A withAzureDisk(V1AzureDiskVolumeSource azureDisk) { - _visitables.get("azureDisk").remove(this.azureDisk); - if (azureDisk!=null){ this.azureDisk= new V1AzureDiskVolumeSourceBuilder(azureDisk); _visitables.get("azureDisk").add(this.azureDisk);} else { this.azureDisk = null; _visitables.get("azureDisk").remove(this.azureDisk); } return (A) this; - } - public Boolean hasAzureDisk() { - return this.azureDisk != null; - } - public V1PersistentVolumeSpecFluentImpl.AzureDiskNested withNewAzureDisk() { - return new V1PersistentVolumeSpecFluentImpl.AzureDiskNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.AzureDiskNested withNewAzureDiskLike(V1AzureDiskVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.AzureDiskNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.AzureDiskNested editAzureDisk() { - return withNewAzureDiskLike(getAzureDisk()); - } - public V1PersistentVolumeSpecFluentImpl.AzureDiskNested editOrNewAzureDisk() { - return withNewAzureDiskLike(getAzureDisk() != null ? getAzureDisk(): new V1AzureDiskVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.AzureDiskNested editOrNewAzureDiskLike(V1AzureDiskVolumeSource item) { - return withNewAzureDiskLike(getAzureDisk() != null ? getAzureDisk(): item); - } - - /** - * This method has been deprecated, please use method buildAzureFile instead. - * @return The buildable object. - */ - @Deprecated - public V1AzureFilePersistentVolumeSource getAzureFile() { - return this.azureFile!=null ?this.azureFile.build():null; - } - public V1AzureFilePersistentVolumeSource buildAzureFile() { - return this.azureFile!=null ?this.azureFile.build():null; - } - public A withAzureFile(V1AzureFilePersistentVolumeSource azureFile) { - _visitables.get("azureFile").remove(this.azureFile); - if (azureFile!=null){ this.azureFile= new V1AzureFilePersistentVolumeSourceBuilder(azureFile); _visitables.get("azureFile").add(this.azureFile);} else { this.azureFile = null; _visitables.get("azureFile").remove(this.azureFile); } return (A) this; - } - public Boolean hasAzureFile() { - return this.azureFile != null; - } - public V1PersistentVolumeSpecFluentImpl.AzureFileNested withNewAzureFile() { - return new V1PersistentVolumeSpecFluentImpl.AzureFileNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.AzureFileNested withNewAzureFileLike(V1AzureFilePersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.AzureFileNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.AzureFileNested editAzureFile() { - return withNewAzureFileLike(getAzureFile()); - } - public V1PersistentVolumeSpecFluentImpl.AzureFileNested editOrNewAzureFile() { - return withNewAzureFileLike(getAzureFile() != null ? getAzureFile(): new V1AzureFilePersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.AzureFileNested editOrNewAzureFileLike(V1AzureFilePersistentVolumeSource item) { - return withNewAzureFileLike(getAzureFile() != null ? getAzureFile(): item); - } - public A addToCapacity(String key,Quantity value) { - if(this.capacity == null && key != null && value != null) { this.capacity = new LinkedHashMap(); } - if(key != null && value != null) {this.capacity.put(key, value);} return (A)this; - } - public A addToCapacity(Map map) { - if(this.capacity == null && map != null) { this.capacity = new LinkedHashMap(); } - if(map != null) { this.capacity.putAll(map);} return (A)this; - } - public A removeFromCapacity(String key) { - if(this.capacity == null) { return (A) this; } - if(key != null && this.capacity != null) {this.capacity.remove(key);} return (A)this; - } - public A removeFromCapacity(Map map) { - if(this.capacity == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.capacity != null){this.capacity.remove(key);}}} return (A)this; - } - public Map getCapacity() { - return this.capacity; - } - public A withCapacity(Map capacity) { - if (capacity == null) { this.capacity = null;} else {this.capacity = new LinkedHashMap(capacity);} return (A) this; - } - public Boolean hasCapacity() { - return this.capacity != null; - } - - /** - * This method has been deprecated, please use method buildCephfs instead. - * @return The buildable object. - */ - @Deprecated - public V1CephFSPersistentVolumeSource getCephfs() { - return this.cephfs!=null ?this.cephfs.build():null; - } - public V1CephFSPersistentVolumeSource buildCephfs() { - return this.cephfs!=null ?this.cephfs.build():null; - } - public A withCephfs(V1CephFSPersistentVolumeSource cephfs) { - _visitables.get("cephfs").remove(this.cephfs); - if (cephfs!=null){ this.cephfs= new V1CephFSPersistentVolumeSourceBuilder(cephfs); _visitables.get("cephfs").add(this.cephfs);} else { this.cephfs = null; _visitables.get("cephfs").remove(this.cephfs); } return (A) this; - } - public Boolean hasCephfs() { - return this.cephfs != null; - } - public V1PersistentVolumeSpecFluentImpl.CephfsNested withNewCephfs() { - return new V1PersistentVolumeSpecFluentImpl.CephfsNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.CephfsNested withNewCephfsLike(V1CephFSPersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.CephfsNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.CephfsNested editCephfs() { - return withNewCephfsLike(getCephfs()); - } - public V1PersistentVolumeSpecFluentImpl.CephfsNested editOrNewCephfs() { - return withNewCephfsLike(getCephfs() != null ? getCephfs(): new V1CephFSPersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.CephfsNested editOrNewCephfsLike(V1CephFSPersistentVolumeSource item) { - return withNewCephfsLike(getCephfs() != null ? getCephfs(): item); - } - - /** - * This method has been deprecated, please use method buildCinder instead. - * @return The buildable object. - */ - @Deprecated - public V1CinderPersistentVolumeSource getCinder() { - return this.cinder!=null ?this.cinder.build():null; - } - public V1CinderPersistentVolumeSource buildCinder() { - return this.cinder!=null ?this.cinder.build():null; - } - public A withCinder(V1CinderPersistentVolumeSource cinder) { - _visitables.get("cinder").remove(this.cinder); - if (cinder!=null){ this.cinder= new V1CinderPersistentVolumeSourceBuilder(cinder); _visitables.get("cinder").add(this.cinder);} else { this.cinder = null; _visitables.get("cinder").remove(this.cinder); } return (A) this; - } - public Boolean hasCinder() { - return this.cinder != null; - } - public V1PersistentVolumeSpecFluentImpl.CinderNested withNewCinder() { - return new V1PersistentVolumeSpecFluentImpl.CinderNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.CinderNested withNewCinderLike(V1CinderPersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.CinderNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.CinderNested editCinder() { - return withNewCinderLike(getCinder()); - } - public V1PersistentVolumeSpecFluentImpl.CinderNested editOrNewCinder() { - return withNewCinderLike(getCinder() != null ? getCinder(): new V1CinderPersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.CinderNested editOrNewCinderLike(V1CinderPersistentVolumeSource item) { - return withNewCinderLike(getCinder() != null ? getCinder(): item); - } - - /** - * This method has been deprecated, please use method buildClaimRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getClaimRef() { - return this.claimRef!=null ?this.claimRef.build():null; - } - public V1ObjectReference buildClaimRef() { - return this.claimRef!=null ?this.claimRef.build():null; - } - public A withClaimRef(V1ObjectReference claimRef) { - _visitables.get("claimRef").remove(this.claimRef); - if (claimRef!=null){ this.claimRef= new V1ObjectReferenceBuilder(claimRef); _visitables.get("claimRef").add(this.claimRef);} else { this.claimRef = null; _visitables.get("claimRef").remove(this.claimRef); } return (A) this; - } - public Boolean hasClaimRef() { - return this.claimRef != null; - } - public V1PersistentVolumeSpecFluentImpl.ClaimRefNested withNewClaimRef() { - return new V1PersistentVolumeSpecFluentImpl.ClaimRefNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.ClaimRefNested withNewClaimRefLike(V1ObjectReference item) { - return new V1PersistentVolumeSpecFluentImpl.ClaimRefNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.ClaimRefNested editClaimRef() { - return withNewClaimRefLike(getClaimRef()); - } - public V1PersistentVolumeSpecFluentImpl.ClaimRefNested editOrNewClaimRef() { - return withNewClaimRefLike(getClaimRef() != null ? getClaimRef(): new V1ObjectReferenceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.ClaimRefNested editOrNewClaimRefLike(V1ObjectReference item) { - return withNewClaimRefLike(getClaimRef() != null ? getClaimRef(): item); - } - - /** - * This method has been deprecated, please use method buildCsi instead. - * @return The buildable object. - */ - @Deprecated - public V1CSIPersistentVolumeSource getCsi() { - return this.csi!=null ?this.csi.build():null; - } - public V1CSIPersistentVolumeSource buildCsi() { - return this.csi!=null ?this.csi.build():null; - } - public A withCsi(V1CSIPersistentVolumeSource csi) { - _visitables.get("csi").remove(this.csi); - if (csi!=null){ this.csi= new V1CSIPersistentVolumeSourceBuilder(csi); _visitables.get("csi").add(this.csi);} else { this.csi = null; _visitables.get("csi").remove(this.csi); } return (A) this; - } - public Boolean hasCsi() { - return this.csi != null; - } - public V1PersistentVolumeSpecFluentImpl.CsiNested withNewCsi() { - return new V1PersistentVolumeSpecFluentImpl.CsiNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.CsiNested withNewCsiLike(V1CSIPersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.CsiNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.CsiNested editCsi() { - return withNewCsiLike(getCsi()); - } - public V1PersistentVolumeSpecFluentImpl.CsiNested editOrNewCsi() { - return withNewCsiLike(getCsi() != null ? getCsi(): new V1CSIPersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.CsiNested editOrNewCsiLike(V1CSIPersistentVolumeSource item) { - return withNewCsiLike(getCsi() != null ? getCsi(): item); - } - - /** - * This method has been deprecated, please use method buildFc instead. - * @return The buildable object. - */ - @Deprecated - public V1FCVolumeSource getFc() { - return this.fc!=null ?this.fc.build():null; - } - public V1FCVolumeSource buildFc() { - return this.fc!=null ?this.fc.build():null; - } - public A withFc(V1FCVolumeSource fc) { - _visitables.get("fc").remove(this.fc); - if (fc!=null){ this.fc= new V1FCVolumeSourceBuilder(fc); _visitables.get("fc").add(this.fc);} else { this.fc = null; _visitables.get("fc").remove(this.fc); } return (A) this; - } - public Boolean hasFc() { - return this.fc != null; - } - public V1PersistentVolumeSpecFluentImpl.FcNested withNewFc() { - return new V1PersistentVolumeSpecFluentImpl.FcNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.FcNested withNewFcLike(V1FCVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.FcNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.FcNested editFc() { - return withNewFcLike(getFc()); - } - public V1PersistentVolumeSpecFluentImpl.FcNested editOrNewFc() { - return withNewFcLike(getFc() != null ? getFc(): new V1FCVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.FcNested editOrNewFcLike(V1FCVolumeSource item) { - return withNewFcLike(getFc() != null ? getFc(): item); - } - - /** - * This method has been deprecated, please use method buildFlexVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1FlexPersistentVolumeSource getFlexVolume() { - return this.flexVolume!=null ?this.flexVolume.build():null; - } - public V1FlexPersistentVolumeSource buildFlexVolume() { - return this.flexVolume!=null ?this.flexVolume.build():null; - } - public A withFlexVolume(V1FlexPersistentVolumeSource flexVolume) { - _visitables.get("flexVolume").remove(this.flexVolume); - if (flexVolume!=null){ this.flexVolume= new V1FlexPersistentVolumeSourceBuilder(flexVolume); _visitables.get("flexVolume").add(this.flexVolume);} else { this.flexVolume = null; _visitables.get("flexVolume").remove(this.flexVolume); } return (A) this; - } - public Boolean hasFlexVolume() { - return this.flexVolume != null; - } - public V1PersistentVolumeSpecFluentImpl.FlexVolumeNested withNewFlexVolume() { - return new V1PersistentVolumeSpecFluentImpl.FlexVolumeNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.FlexVolumeNested withNewFlexVolumeLike(V1FlexPersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.FlexVolumeNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.FlexVolumeNested editFlexVolume() { - return withNewFlexVolumeLike(getFlexVolume()); - } - public V1PersistentVolumeSpecFluentImpl.FlexVolumeNested editOrNewFlexVolume() { - return withNewFlexVolumeLike(getFlexVolume() != null ? getFlexVolume(): new V1FlexPersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.FlexVolumeNested editOrNewFlexVolumeLike(V1FlexPersistentVolumeSource item) { - return withNewFlexVolumeLike(getFlexVolume() != null ? getFlexVolume(): item); - } - - /** - * This method has been deprecated, please use method buildFlocker instead. - * @return The buildable object. - */ - @Deprecated - public V1FlockerVolumeSource getFlocker() { - return this.flocker!=null ?this.flocker.build():null; - } - public V1FlockerVolumeSource buildFlocker() { - return this.flocker!=null ?this.flocker.build():null; - } - public A withFlocker(V1FlockerVolumeSource flocker) { - _visitables.get("flocker").remove(this.flocker); - if (flocker!=null){ this.flocker= new V1FlockerVolumeSourceBuilder(flocker); _visitables.get("flocker").add(this.flocker);} else { this.flocker = null; _visitables.get("flocker").remove(this.flocker); } return (A) this; - } - public Boolean hasFlocker() { - return this.flocker != null; - } - public V1PersistentVolumeSpecFluentImpl.FlockerNested withNewFlocker() { - return new V1PersistentVolumeSpecFluentImpl.FlockerNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.FlockerNested withNewFlockerLike(V1FlockerVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.FlockerNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.FlockerNested editFlocker() { - return withNewFlockerLike(getFlocker()); - } - public V1PersistentVolumeSpecFluentImpl.FlockerNested editOrNewFlocker() { - return withNewFlockerLike(getFlocker() != null ? getFlocker(): new V1FlockerVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.FlockerNested editOrNewFlockerLike(V1FlockerVolumeSource item) { - return withNewFlockerLike(getFlocker() != null ? getFlocker(): item); - } - - /** - * This method has been deprecated, please use method buildGcePersistentDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1GCEPersistentDiskVolumeSource getGcePersistentDisk() { - return this.gcePersistentDisk!=null ?this.gcePersistentDisk.build():null; - } - public V1GCEPersistentDiskVolumeSource buildGcePersistentDisk() { - return this.gcePersistentDisk!=null ?this.gcePersistentDisk.build():null; - } - public A withGcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk) { - _visitables.get("gcePersistentDisk").remove(this.gcePersistentDisk); - if (gcePersistentDisk!=null){ this.gcePersistentDisk= new V1GCEPersistentDiskVolumeSourceBuilder(gcePersistentDisk); _visitables.get("gcePersistentDisk").add(this.gcePersistentDisk);} else { this.gcePersistentDisk = null; _visitables.get("gcePersistentDisk").remove(this.gcePersistentDisk); } return (A) this; - } - public Boolean hasGcePersistentDisk() { - return this.gcePersistentDisk != null; - } - public V1PersistentVolumeSpecFluentImpl.GcePersistentDiskNested withNewGcePersistentDisk() { - return new V1PersistentVolumeSpecFluentImpl.GcePersistentDiskNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.GcePersistentDiskNested withNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.GcePersistentDiskNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.GcePersistentDiskNested editGcePersistentDisk() { - return withNewGcePersistentDiskLike(getGcePersistentDisk()); - } - public V1PersistentVolumeSpecFluentImpl.GcePersistentDiskNested editOrNewGcePersistentDisk() { - return withNewGcePersistentDiskLike(getGcePersistentDisk() != null ? getGcePersistentDisk(): new V1GCEPersistentDiskVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.GcePersistentDiskNested editOrNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item) { - return withNewGcePersistentDiskLike(getGcePersistentDisk() != null ? getGcePersistentDisk(): item); - } - - /** - * This method has been deprecated, please use method buildGlusterfs instead. - * @return The buildable object. - */ - @Deprecated - public V1GlusterfsPersistentVolumeSource getGlusterfs() { - return this.glusterfs!=null ?this.glusterfs.build():null; - } - public V1GlusterfsPersistentVolumeSource buildGlusterfs() { - return this.glusterfs!=null ?this.glusterfs.build():null; - } - public A withGlusterfs(V1GlusterfsPersistentVolumeSource glusterfs) { - _visitables.get("glusterfs").remove(this.glusterfs); - if (glusterfs!=null){ this.glusterfs= new V1GlusterfsPersistentVolumeSourceBuilder(glusterfs); _visitables.get("glusterfs").add(this.glusterfs);} else { this.glusterfs = null; _visitables.get("glusterfs").remove(this.glusterfs); } return (A) this; - } - public Boolean hasGlusterfs() { - return this.glusterfs != null; - } - public V1PersistentVolumeSpecFluentImpl.GlusterfsNested withNewGlusterfs() { - return new V1PersistentVolumeSpecFluentImpl.GlusterfsNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.GlusterfsNested withNewGlusterfsLike(V1GlusterfsPersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.GlusterfsNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.GlusterfsNested editGlusterfs() { - return withNewGlusterfsLike(getGlusterfs()); - } - public V1PersistentVolumeSpecFluentImpl.GlusterfsNested editOrNewGlusterfs() { - return withNewGlusterfsLike(getGlusterfs() != null ? getGlusterfs(): new V1GlusterfsPersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.GlusterfsNested editOrNewGlusterfsLike(V1GlusterfsPersistentVolumeSource item) { - return withNewGlusterfsLike(getGlusterfs() != null ? getGlusterfs(): item); - } - - /** - * This method has been deprecated, please use method buildHostPath instead. - * @return The buildable object. - */ - @Deprecated - public V1HostPathVolumeSource getHostPath() { - return this.hostPath!=null ?this.hostPath.build():null; - } - public V1HostPathVolumeSource buildHostPath() { - return this.hostPath!=null ?this.hostPath.build():null; - } - public A withHostPath(V1HostPathVolumeSource hostPath) { - _visitables.get("hostPath").remove(this.hostPath); - if (hostPath!=null){ this.hostPath= new V1HostPathVolumeSourceBuilder(hostPath); _visitables.get("hostPath").add(this.hostPath);} else { this.hostPath = null; _visitables.get("hostPath").remove(this.hostPath); } return (A) this; - } - public Boolean hasHostPath() { - return this.hostPath != null; - } - public V1PersistentVolumeSpecFluentImpl.HostPathNested withNewHostPath() { - return new V1PersistentVolumeSpecFluentImpl.HostPathNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.HostPathNested withNewHostPathLike(V1HostPathVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.HostPathNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.HostPathNested editHostPath() { - return withNewHostPathLike(getHostPath()); - } - public V1PersistentVolumeSpecFluentImpl.HostPathNested editOrNewHostPath() { - return withNewHostPathLike(getHostPath() != null ? getHostPath(): new V1HostPathVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.HostPathNested editOrNewHostPathLike(V1HostPathVolumeSource item) { - return withNewHostPathLike(getHostPath() != null ? getHostPath(): item); - } - - /** - * This method has been deprecated, please use method buildIscsi instead. - * @return The buildable object. - */ - @Deprecated - public V1ISCSIPersistentVolumeSource getIscsi() { - return this.iscsi!=null ?this.iscsi.build():null; - } - public V1ISCSIPersistentVolumeSource buildIscsi() { - return this.iscsi!=null ?this.iscsi.build():null; - } - public A withIscsi(V1ISCSIPersistentVolumeSource iscsi) { - _visitables.get("iscsi").remove(this.iscsi); - if (iscsi!=null){ this.iscsi= new V1ISCSIPersistentVolumeSourceBuilder(iscsi); _visitables.get("iscsi").add(this.iscsi);} else { this.iscsi = null; _visitables.get("iscsi").remove(this.iscsi); } return (A) this; - } - public Boolean hasIscsi() { - return this.iscsi != null; - } - public V1PersistentVolumeSpecFluentImpl.IscsiNested withNewIscsi() { - return new V1PersistentVolumeSpecFluentImpl.IscsiNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.IscsiNested withNewIscsiLike(V1ISCSIPersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.IscsiNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.IscsiNested editIscsi() { - return withNewIscsiLike(getIscsi()); - } - public V1PersistentVolumeSpecFluentImpl.IscsiNested editOrNewIscsi() { - return withNewIscsiLike(getIscsi() != null ? getIscsi(): new V1ISCSIPersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.IscsiNested editOrNewIscsiLike(V1ISCSIPersistentVolumeSource item) { - return withNewIscsiLike(getIscsi() != null ? getIscsi(): item); - } - - /** - * This method has been deprecated, please use method buildLocal instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalVolumeSource getLocal() { - return this.local!=null ?this.local.build():null; - } - public V1LocalVolumeSource buildLocal() { - return this.local!=null ?this.local.build():null; - } - public A withLocal(V1LocalVolumeSource local) { - _visitables.get("local").remove(this.local); - if (local!=null){ this.local= new V1LocalVolumeSourceBuilder(local); _visitables.get("local").add(this.local);} else { this.local = null; _visitables.get("local").remove(this.local); } return (A) this; - } - public Boolean hasLocal() { - return this.local != null; - } - public V1PersistentVolumeSpecFluentImpl.LocalNested withNewLocal() { - return new V1PersistentVolumeSpecFluentImpl.LocalNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.LocalNested withNewLocalLike(V1LocalVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.LocalNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.LocalNested editLocal() { - return withNewLocalLike(getLocal()); - } - public V1PersistentVolumeSpecFluentImpl.LocalNested editOrNewLocal() { - return withNewLocalLike(getLocal() != null ? getLocal(): new V1LocalVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.LocalNested editOrNewLocalLike(V1LocalVolumeSource item) { - return withNewLocalLike(getLocal() != null ? getLocal(): item); - } - public A addToMountOptions(int index,String item) { - if (this.mountOptions == null) {this.mountOptions = new ArrayList();} - this.mountOptions.add(index, item); - return (A)this; - } - public A setToMountOptions(int index,String item) { - if (this.mountOptions == null) {this.mountOptions = new ArrayList();} - this.mountOptions.set(index, item); return (A)this; - } - public A addToMountOptions(java.lang.String... items) { - if (this.mountOptions == null) {this.mountOptions = new ArrayList();} - for (String item : items) {this.mountOptions.add(item);} return (A)this; - } - public A addAllToMountOptions(Collection items) { - if (this.mountOptions == null) {this.mountOptions = new ArrayList();} - for (String item : items) {this.mountOptions.add(item);} return (A)this; - } - public A removeFromMountOptions(java.lang.String... items) { - for (String item : items) {if (this.mountOptions!= null){ this.mountOptions.remove(item);}} return (A)this; - } - public A removeAllFromMountOptions(Collection items) { - for (String item : items) {if (this.mountOptions!= null){ this.mountOptions.remove(item);}} return (A)this; - } - public List getMountOptions() { - return this.mountOptions; - } - public String getMountOption(int index) { - return this.mountOptions.get(index); - } - public String getFirstMountOption() { - return this.mountOptions.get(0); - } - public String getLastMountOption() { - return this.mountOptions.get(mountOptions.size() - 1); - } - public String getMatchingMountOption(Predicate predicate) { - for (String item: mountOptions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingMountOption(Predicate predicate) { - for (String item: mountOptions) { if(predicate.test(item)){ return true;} } return false; - } - public A withMountOptions(List mountOptions) { - if (mountOptions != null) {this.mountOptions = new ArrayList(); for (String item : mountOptions){this.addToMountOptions(item);}} else { this.mountOptions = null;} return (A) this; - } - public A withMountOptions(java.lang.String... mountOptions) { - if (this.mountOptions != null) {this.mountOptions.clear(); _visitables.remove("mountOptions"); } - if (mountOptions != null) {for (String item :mountOptions){ this.addToMountOptions(item);}} return (A) this; - } - public Boolean hasMountOptions() { - return mountOptions != null && !mountOptions.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildNfs instead. - * @return The buildable object. - */ - @Deprecated - public V1NFSVolumeSource getNfs() { - return this.nfs!=null ?this.nfs.build():null; - } - public V1NFSVolumeSource buildNfs() { - return this.nfs!=null ?this.nfs.build():null; - } - public A withNfs(V1NFSVolumeSource nfs) { - _visitables.get("nfs").remove(this.nfs); - if (nfs!=null){ this.nfs= new V1NFSVolumeSourceBuilder(nfs); _visitables.get("nfs").add(this.nfs);} else { this.nfs = null; _visitables.get("nfs").remove(this.nfs); } return (A) this; - } - public Boolean hasNfs() { - return this.nfs != null; - } - public V1PersistentVolumeSpecFluentImpl.NfsNested withNewNfs() { - return new V1PersistentVolumeSpecFluentImpl.NfsNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.NfsNested withNewNfsLike(V1NFSVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.NfsNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.NfsNested editNfs() { - return withNewNfsLike(getNfs()); - } - public V1PersistentVolumeSpecFluentImpl.NfsNested editOrNewNfs() { - return withNewNfsLike(getNfs() != null ? getNfs(): new V1NFSVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.NfsNested editOrNewNfsLike(V1NFSVolumeSource item) { - return withNewNfsLike(getNfs() != null ? getNfs(): item); - } - - /** - * This method has been deprecated, please use method buildNodeAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeNodeAffinity getNodeAffinity() { - return this.nodeAffinity!=null ?this.nodeAffinity.build():null; - } - public V1VolumeNodeAffinity buildNodeAffinity() { - return this.nodeAffinity!=null ?this.nodeAffinity.build():null; - } - public A withNodeAffinity(V1VolumeNodeAffinity nodeAffinity) { - _visitables.get("nodeAffinity").remove(this.nodeAffinity); - if (nodeAffinity!=null){ this.nodeAffinity= new V1VolumeNodeAffinityBuilder(nodeAffinity); _visitables.get("nodeAffinity").add(this.nodeAffinity);} else { this.nodeAffinity = null; _visitables.get("nodeAffinity").remove(this.nodeAffinity); } return (A) this; - } - public Boolean hasNodeAffinity() { - return this.nodeAffinity != null; - } - public V1PersistentVolumeSpecFluentImpl.NodeAffinityNested withNewNodeAffinity() { - return new V1PersistentVolumeSpecFluentImpl.NodeAffinityNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.NodeAffinityNested withNewNodeAffinityLike(V1VolumeNodeAffinity item) { - return new V1PersistentVolumeSpecFluentImpl.NodeAffinityNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.NodeAffinityNested editNodeAffinity() { - return withNewNodeAffinityLike(getNodeAffinity()); - } - public V1PersistentVolumeSpecFluentImpl.NodeAffinityNested editOrNewNodeAffinity() { - return withNewNodeAffinityLike(getNodeAffinity() != null ? getNodeAffinity(): new V1VolumeNodeAffinityBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.NodeAffinityNested editOrNewNodeAffinityLike(V1VolumeNodeAffinity item) { - return withNewNodeAffinityLike(getNodeAffinity() != null ? getNodeAffinity(): item); - } - public String getPersistentVolumeReclaimPolicy() { - return this.persistentVolumeReclaimPolicy; - } - public A withPersistentVolumeReclaimPolicy(String persistentVolumeReclaimPolicy) { - this.persistentVolumeReclaimPolicy=persistentVolumeReclaimPolicy; return (A) this; - } - public Boolean hasPersistentVolumeReclaimPolicy() { - return this.persistentVolumeReclaimPolicy != null; - } - - /** - * This method has been deprecated, please use method buildPhotonPersistentDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1PhotonPersistentDiskVolumeSource getPhotonPersistentDisk() { - return this.photonPersistentDisk!=null ?this.photonPersistentDisk.build():null; - } - public V1PhotonPersistentDiskVolumeSource buildPhotonPersistentDisk() { - return this.photonPersistentDisk!=null ?this.photonPersistentDisk.build():null; - } - public A withPhotonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk) { - _visitables.get("photonPersistentDisk").remove(this.photonPersistentDisk); - if (photonPersistentDisk!=null){ this.photonPersistentDisk= new V1PhotonPersistentDiskVolumeSourceBuilder(photonPersistentDisk); _visitables.get("photonPersistentDisk").add(this.photonPersistentDisk);} else { this.photonPersistentDisk = null; _visitables.get("photonPersistentDisk").remove(this.photonPersistentDisk); } return (A) this; - } - public Boolean hasPhotonPersistentDisk() { - return this.photonPersistentDisk != null; - } - public V1PersistentVolumeSpecFluentImpl.PhotonPersistentDiskNested withNewPhotonPersistentDisk() { - return new V1PersistentVolumeSpecFluentImpl.PhotonPersistentDiskNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.PhotonPersistentDiskNested withNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.PhotonPersistentDiskNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.PhotonPersistentDiskNested editPhotonPersistentDisk() { - return withNewPhotonPersistentDiskLike(getPhotonPersistentDisk()); - } - public V1PersistentVolumeSpecFluentImpl.PhotonPersistentDiskNested editOrNewPhotonPersistentDisk() { - return withNewPhotonPersistentDiskLike(getPhotonPersistentDisk() != null ? getPhotonPersistentDisk(): new V1PhotonPersistentDiskVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.PhotonPersistentDiskNested editOrNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item) { - return withNewPhotonPersistentDiskLike(getPhotonPersistentDisk() != null ? getPhotonPersistentDisk(): item); - } - - /** - * This method has been deprecated, please use method buildPortworxVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1PortworxVolumeSource getPortworxVolume() { - return this.portworxVolume!=null ?this.portworxVolume.build():null; - } - public V1PortworxVolumeSource buildPortworxVolume() { - return this.portworxVolume!=null ?this.portworxVolume.build():null; - } - public A withPortworxVolume(V1PortworxVolumeSource portworxVolume) { - _visitables.get("portworxVolume").remove(this.portworxVolume); - if (portworxVolume!=null){ this.portworxVolume= new V1PortworxVolumeSourceBuilder(portworxVolume); _visitables.get("portworxVolume").add(this.portworxVolume);} else { this.portworxVolume = null; _visitables.get("portworxVolume").remove(this.portworxVolume); } return (A) this; - } - public Boolean hasPortworxVolume() { - return this.portworxVolume != null; - } - public V1PersistentVolumeSpecFluentImpl.PortworxVolumeNested withNewPortworxVolume() { - return new V1PersistentVolumeSpecFluentImpl.PortworxVolumeNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.PortworxVolumeNested withNewPortworxVolumeLike(V1PortworxVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.PortworxVolumeNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.PortworxVolumeNested editPortworxVolume() { - return withNewPortworxVolumeLike(getPortworxVolume()); - } - public V1PersistentVolumeSpecFluentImpl.PortworxVolumeNested editOrNewPortworxVolume() { - return withNewPortworxVolumeLike(getPortworxVolume() != null ? getPortworxVolume(): new V1PortworxVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.PortworxVolumeNested editOrNewPortworxVolumeLike(V1PortworxVolumeSource item) { - return withNewPortworxVolumeLike(getPortworxVolume() != null ? getPortworxVolume(): item); - } - - /** - * This method has been deprecated, please use method buildQuobyte instead. - * @return The buildable object. - */ - @Deprecated - public V1QuobyteVolumeSource getQuobyte() { - return this.quobyte!=null ?this.quobyte.build():null; - } - public V1QuobyteVolumeSource buildQuobyte() { - return this.quobyte!=null ?this.quobyte.build():null; - } - public A withQuobyte(V1QuobyteVolumeSource quobyte) { - _visitables.get("quobyte").remove(this.quobyte); - if (quobyte!=null){ this.quobyte= new V1QuobyteVolumeSourceBuilder(quobyte); _visitables.get("quobyte").add(this.quobyte);} else { this.quobyte = null; _visitables.get("quobyte").remove(this.quobyte); } return (A) this; - } - public Boolean hasQuobyte() { - return this.quobyte != null; - } - public V1PersistentVolumeSpecFluentImpl.QuobyteNested withNewQuobyte() { - return new V1PersistentVolumeSpecFluentImpl.QuobyteNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.QuobyteNested withNewQuobyteLike(V1QuobyteVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.QuobyteNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.QuobyteNested editQuobyte() { - return withNewQuobyteLike(getQuobyte()); - } - public V1PersistentVolumeSpecFluentImpl.QuobyteNested editOrNewQuobyte() { - return withNewQuobyteLike(getQuobyte() != null ? getQuobyte(): new V1QuobyteVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.QuobyteNested editOrNewQuobyteLike(V1QuobyteVolumeSource item) { - return withNewQuobyteLike(getQuobyte() != null ? getQuobyte(): item); - } - - /** - * This method has been deprecated, please use method buildRbd instead. - * @return The buildable object. - */ - @Deprecated - public V1RBDPersistentVolumeSource getRbd() { - return this.rbd!=null ?this.rbd.build():null; - } - public V1RBDPersistentVolumeSource buildRbd() { - return this.rbd!=null ?this.rbd.build():null; - } - public A withRbd(V1RBDPersistentVolumeSource rbd) { - _visitables.get("rbd").remove(this.rbd); - if (rbd!=null){ this.rbd= new V1RBDPersistentVolumeSourceBuilder(rbd); _visitables.get("rbd").add(this.rbd);} else { this.rbd = null; _visitables.get("rbd").remove(this.rbd); } return (A) this; - } - public Boolean hasRbd() { - return this.rbd != null; - } - public V1PersistentVolumeSpecFluentImpl.RbdNested withNewRbd() { - return new V1PersistentVolumeSpecFluentImpl.RbdNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.RbdNested withNewRbdLike(V1RBDPersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.RbdNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.RbdNested editRbd() { - return withNewRbdLike(getRbd()); - } - public V1PersistentVolumeSpecFluentImpl.RbdNested editOrNewRbd() { - return withNewRbdLike(getRbd() != null ? getRbd(): new V1RBDPersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.RbdNested editOrNewRbdLike(V1RBDPersistentVolumeSource item) { - return withNewRbdLike(getRbd() != null ? getRbd(): item); - } - - /** - * This method has been deprecated, please use method buildScaleIO instead. - * @return The buildable object. - */ - @Deprecated - public V1ScaleIOPersistentVolumeSource getScaleIO() { - return this.scaleIO!=null ?this.scaleIO.build():null; - } - public V1ScaleIOPersistentVolumeSource buildScaleIO() { - return this.scaleIO!=null ?this.scaleIO.build():null; - } - public A withScaleIO(V1ScaleIOPersistentVolumeSource scaleIO) { - _visitables.get("scaleIO").remove(this.scaleIO); - if (scaleIO!=null){ this.scaleIO= new V1ScaleIOPersistentVolumeSourceBuilder(scaleIO); _visitables.get("scaleIO").add(this.scaleIO);} else { this.scaleIO = null; _visitables.get("scaleIO").remove(this.scaleIO); } return (A) this; - } - public Boolean hasScaleIO() { - return this.scaleIO != null; - } - public V1PersistentVolumeSpecFluentImpl.ScaleIONested withNewScaleIO() { - return new V1PersistentVolumeSpecFluentImpl.ScaleIONestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.ScaleIONested withNewScaleIOLike(V1ScaleIOPersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.ScaleIONestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.ScaleIONested editScaleIO() { - return withNewScaleIOLike(getScaleIO()); - } - public V1PersistentVolumeSpecFluentImpl.ScaleIONested editOrNewScaleIO() { - return withNewScaleIOLike(getScaleIO() != null ? getScaleIO(): new V1ScaleIOPersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.ScaleIONested editOrNewScaleIOLike(V1ScaleIOPersistentVolumeSource item) { - return withNewScaleIOLike(getScaleIO() != null ? getScaleIO(): item); - } - public String getStorageClassName() { - return this.storageClassName; - } - public A withStorageClassName(String storageClassName) { - this.storageClassName=storageClassName; return (A) this; - } - public Boolean hasStorageClassName() { - return this.storageClassName != null; - } - - /** - * This method has been deprecated, please use method buildStorageos instead. - * @return The buildable object. - */ - @Deprecated - public V1StorageOSPersistentVolumeSource getStorageos() { - return this.storageos!=null ?this.storageos.build():null; - } - public V1StorageOSPersistentVolumeSource buildStorageos() { - return this.storageos!=null ?this.storageos.build():null; - } - public A withStorageos(V1StorageOSPersistentVolumeSource storageos) { - _visitables.get("storageos").remove(this.storageos); - if (storageos!=null){ this.storageos= new V1StorageOSPersistentVolumeSourceBuilder(storageos); _visitables.get("storageos").add(this.storageos);} else { this.storageos = null; _visitables.get("storageos").remove(this.storageos); } return (A) this; - } - public Boolean hasStorageos() { - return this.storageos != null; - } - public V1PersistentVolumeSpecFluentImpl.StorageosNested withNewStorageos() { - return new V1PersistentVolumeSpecFluentImpl.StorageosNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.StorageosNested withNewStorageosLike(V1StorageOSPersistentVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.StorageosNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.StorageosNested editStorageos() { - return withNewStorageosLike(getStorageos()); - } - public V1PersistentVolumeSpecFluentImpl.StorageosNested editOrNewStorageos() { - return withNewStorageosLike(getStorageos() != null ? getStorageos(): new V1StorageOSPersistentVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.StorageosNested editOrNewStorageosLike(V1StorageOSPersistentVolumeSource item) { - return withNewStorageosLike(getStorageos() != null ? getStorageos(): item); - } - public String getVolumeMode() { - return this.volumeMode; - } - public A withVolumeMode(String volumeMode) { - this.volumeMode=volumeMode; return (A) this; - } - public Boolean hasVolumeMode() { - return this.volumeMode != null; - } - - /** - * This method has been deprecated, please use method buildVsphereVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1VsphereVirtualDiskVolumeSource getVsphereVolume() { - return this.vsphereVolume!=null ?this.vsphereVolume.build():null; - } - public V1VsphereVirtualDiskVolumeSource buildVsphereVolume() { - return this.vsphereVolume!=null ?this.vsphereVolume.build():null; - } - public A withVsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume) { - _visitables.get("vsphereVolume").remove(this.vsphereVolume); - if (vsphereVolume!=null){ this.vsphereVolume= new V1VsphereVirtualDiskVolumeSourceBuilder(vsphereVolume); _visitables.get("vsphereVolume").add(this.vsphereVolume);} else { this.vsphereVolume = null; _visitables.get("vsphereVolume").remove(this.vsphereVolume); } return (A) this; - } - public Boolean hasVsphereVolume() { - return this.vsphereVolume != null; - } - public V1PersistentVolumeSpecFluentImpl.VsphereVolumeNested withNewVsphereVolume() { - return new V1PersistentVolumeSpecFluentImpl.VsphereVolumeNestedImpl(); - } - public V1PersistentVolumeSpecFluentImpl.VsphereVolumeNested withNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item) { - return new V1PersistentVolumeSpecFluentImpl.VsphereVolumeNestedImpl(item); - } - public V1PersistentVolumeSpecFluentImpl.VsphereVolumeNested editVsphereVolume() { - return withNewVsphereVolumeLike(getVsphereVolume()); - } - public V1PersistentVolumeSpecFluentImpl.VsphereVolumeNested editOrNewVsphereVolume() { - return withNewVsphereVolumeLike(getVsphereVolume() != null ? getVsphereVolume(): new V1VsphereVirtualDiskVolumeSourceBuilder().build()); - } - public V1PersistentVolumeSpecFluentImpl.VsphereVolumeNested editOrNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item) { - return withNewVsphereVolumeLike(getVsphereVolume() != null ? getVsphereVolume(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeSpecFluentImpl that = (V1PersistentVolumeSpecFluentImpl) o; - if (!java.util.Objects.equals(accessModes, that.accessModes)) return false; - - if (!java.util.Objects.equals(awsElasticBlockStore, that.awsElasticBlockStore)) return false; - - if (!java.util.Objects.equals(azureDisk, that.azureDisk)) return false; - - if (!java.util.Objects.equals(azureFile, that.azureFile)) return false; - - if (!java.util.Objects.equals(capacity, that.capacity)) return false; - - if (!java.util.Objects.equals(cephfs, that.cephfs)) return false; - - if (!java.util.Objects.equals(cinder, that.cinder)) return false; - - if (!java.util.Objects.equals(claimRef, that.claimRef)) return false; - - if (!java.util.Objects.equals(csi, that.csi)) return false; - - if (!java.util.Objects.equals(fc, that.fc)) return false; - - if (!java.util.Objects.equals(flexVolume, that.flexVolume)) return false; - - if (!java.util.Objects.equals(flocker, that.flocker)) return false; - - if (!java.util.Objects.equals(gcePersistentDisk, that.gcePersistentDisk)) return false; - - if (!java.util.Objects.equals(glusterfs, that.glusterfs)) return false; - - if (!java.util.Objects.equals(hostPath, that.hostPath)) return false; - - if (!java.util.Objects.equals(iscsi, that.iscsi)) return false; - - if (!java.util.Objects.equals(local, that.local)) return false; - - if (!java.util.Objects.equals(mountOptions, that.mountOptions)) return false; - - if (!java.util.Objects.equals(nfs, that.nfs)) return false; - - if (!java.util.Objects.equals(nodeAffinity, that.nodeAffinity)) return false; - - if (!java.util.Objects.equals(persistentVolumeReclaimPolicy, that.persistentVolumeReclaimPolicy)) return false; - - if (!java.util.Objects.equals(photonPersistentDisk, that.photonPersistentDisk)) return false; - - if (!java.util.Objects.equals(portworxVolume, that.portworxVolume)) return false; - - if (!java.util.Objects.equals(quobyte, that.quobyte)) return false; - - if (!java.util.Objects.equals(rbd, that.rbd)) return false; - - if (!java.util.Objects.equals(scaleIO, that.scaleIO)) return false; - - if (!java.util.Objects.equals(storageClassName, that.storageClassName)) return false; - - if (!java.util.Objects.equals(storageos, that.storageos)) return false; - - if (!java.util.Objects.equals(volumeMode, that.volumeMode)) return false; - - if (!java.util.Objects.equals(vsphereVolume, that.vsphereVolume)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(accessModes, awsElasticBlockStore, azureDisk, azureFile, capacity, cephfs, cinder, claimRef, csi, fc, flexVolume, flocker, gcePersistentDisk, glusterfs, hostPath, iscsi, local, mountOptions, nfs, nodeAffinity, persistentVolumeReclaimPolicy, photonPersistentDisk, portworxVolume, quobyte, rbd, scaleIO, storageClassName, storageos, volumeMode, vsphereVolume, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (accessModes != null && !accessModes.isEmpty()) { sb.append("accessModes:"); sb.append(accessModes + ","); } - if (awsElasticBlockStore != null) { sb.append("awsElasticBlockStore:"); sb.append(awsElasticBlockStore + ","); } - if (azureDisk != null) { sb.append("azureDisk:"); sb.append(azureDisk + ","); } - if (azureFile != null) { sb.append("azureFile:"); sb.append(azureFile + ","); } - if (capacity != null && !capacity.isEmpty()) { sb.append("capacity:"); sb.append(capacity + ","); } - if (cephfs != null) { sb.append("cephfs:"); sb.append(cephfs + ","); } - if (cinder != null) { sb.append("cinder:"); sb.append(cinder + ","); } - if (claimRef != null) { sb.append("claimRef:"); sb.append(claimRef + ","); } - if (csi != null) { sb.append("csi:"); sb.append(csi + ","); } - if (fc != null) { sb.append("fc:"); sb.append(fc + ","); } - if (flexVolume != null) { sb.append("flexVolume:"); sb.append(flexVolume + ","); } - if (flocker != null) { sb.append("flocker:"); sb.append(flocker + ","); } - if (gcePersistentDisk != null) { sb.append("gcePersistentDisk:"); sb.append(gcePersistentDisk + ","); } - if (glusterfs != null) { sb.append("glusterfs:"); sb.append(glusterfs + ","); } - if (hostPath != null) { sb.append("hostPath:"); sb.append(hostPath + ","); } - if (iscsi != null) { sb.append("iscsi:"); sb.append(iscsi + ","); } - if (local != null) { sb.append("local:"); sb.append(local + ","); } - if (mountOptions != null && !mountOptions.isEmpty()) { sb.append("mountOptions:"); sb.append(mountOptions + ","); } - if (nfs != null) { sb.append("nfs:"); sb.append(nfs + ","); } - if (nodeAffinity != null) { sb.append("nodeAffinity:"); sb.append(nodeAffinity + ","); } - if (persistentVolumeReclaimPolicy != null) { sb.append("persistentVolumeReclaimPolicy:"); sb.append(persistentVolumeReclaimPolicy + ","); } - if (photonPersistentDisk != null) { sb.append("photonPersistentDisk:"); sb.append(photonPersistentDisk + ","); } - if (portworxVolume != null) { sb.append("portworxVolume:"); sb.append(portworxVolume + ","); } - if (quobyte != null) { sb.append("quobyte:"); sb.append(quobyte + ","); } - if (rbd != null) { sb.append("rbd:"); sb.append(rbd + ","); } - if (scaleIO != null) { sb.append("scaleIO:"); sb.append(scaleIO + ","); } - if (storageClassName != null) { sb.append("storageClassName:"); sb.append(storageClassName + ","); } - if (storageos != null) { sb.append("storageos:"); sb.append(storageos + ","); } - if (volumeMode != null) { sb.append("volumeMode:"); sb.append(volumeMode + ","); } - if (vsphereVolume != null) { sb.append("vsphereVolume:"); sb.append(vsphereVolume); } - sb.append("}"); - return sb.toString(); - } - class AwsElasticBlockStoreNestedImpl extends V1AWSElasticBlockStoreVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.AwsElasticBlockStoreNested,Nested{ - AwsElasticBlockStoreNestedImpl(V1AWSElasticBlockStoreVolumeSource item) { - this.builder = new V1AWSElasticBlockStoreVolumeSourceBuilder(this, item); - } - AwsElasticBlockStoreNestedImpl() { - this.builder = new V1AWSElasticBlockStoreVolumeSourceBuilder(this); - } - V1AWSElasticBlockStoreVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withAwsElasticBlockStore(builder.build()); - } - public N endAwsElasticBlockStore() { - return and(); - } - - } - class AzureDiskNestedImpl extends V1AzureDiskVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.AzureDiskNested,Nested{ - AzureDiskNestedImpl(V1AzureDiskVolumeSource item) { - this.builder = new V1AzureDiskVolumeSourceBuilder(this, item); - } - AzureDiskNestedImpl() { - this.builder = new V1AzureDiskVolumeSourceBuilder(this); - } - V1AzureDiskVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withAzureDisk(builder.build()); - } - public N endAzureDisk() { - return and(); - } - - } - class AzureFileNestedImpl extends V1AzureFilePersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.AzureFileNested,Nested{ - AzureFileNestedImpl(V1AzureFilePersistentVolumeSource item) { - this.builder = new V1AzureFilePersistentVolumeSourceBuilder(this, item); - } - AzureFileNestedImpl() { - this.builder = new V1AzureFilePersistentVolumeSourceBuilder(this); - } - V1AzureFilePersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withAzureFile(builder.build()); - } - public N endAzureFile() { - return and(); - } - - } - class CephfsNestedImpl extends V1CephFSPersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.CephfsNested,Nested{ - CephfsNestedImpl(V1CephFSPersistentVolumeSource item) { - this.builder = new V1CephFSPersistentVolumeSourceBuilder(this, item); - } - CephfsNestedImpl() { - this.builder = new V1CephFSPersistentVolumeSourceBuilder(this); - } - V1CephFSPersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withCephfs(builder.build()); - } - public N endCephfs() { - return and(); - } - - } - class CinderNestedImpl extends V1CinderPersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.CinderNested,Nested{ - CinderNestedImpl(V1CinderPersistentVolumeSource item) { - this.builder = new V1CinderPersistentVolumeSourceBuilder(this, item); - } - CinderNestedImpl() { - this.builder = new V1CinderPersistentVolumeSourceBuilder(this); - } - V1CinderPersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withCinder(builder.build()); - } - public N endCinder() { - return and(); - } - - } - class ClaimRefNestedImpl extends V1ObjectReferenceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.ClaimRefNested,Nested{ - ClaimRefNestedImpl(V1ObjectReference item) { - this.builder = new V1ObjectReferenceBuilder(this, item); - } - ClaimRefNestedImpl() { - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withClaimRef(builder.build()); - } - public N endClaimRef() { - return and(); - } - - } - class CsiNestedImpl extends V1CSIPersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.CsiNested,Nested{ - CsiNestedImpl(V1CSIPersistentVolumeSource item) { - this.builder = new V1CSIPersistentVolumeSourceBuilder(this, item); - } - CsiNestedImpl() { - this.builder = new V1CSIPersistentVolumeSourceBuilder(this); - } - V1CSIPersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withCsi(builder.build()); - } - public N endCsi() { - return and(); - } - - } - class FcNestedImpl extends V1FCVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.FcNested,Nested{ - FcNestedImpl(V1FCVolumeSource item) { - this.builder = new V1FCVolumeSourceBuilder(this, item); - } - FcNestedImpl() { - this.builder = new V1FCVolumeSourceBuilder(this); - } - V1FCVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withFc(builder.build()); - } - public N endFc() { - return and(); - } - - } - class FlexVolumeNestedImpl extends V1FlexPersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.FlexVolumeNested,Nested{ - FlexVolumeNestedImpl(V1FlexPersistentVolumeSource item) { - this.builder = new V1FlexPersistentVolumeSourceBuilder(this, item); - } - FlexVolumeNestedImpl() { - this.builder = new V1FlexPersistentVolumeSourceBuilder(this); - } - V1FlexPersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withFlexVolume(builder.build()); - } - public N endFlexVolume() { - return and(); - } - - } - class FlockerNestedImpl extends V1FlockerVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.FlockerNested,Nested{ - FlockerNestedImpl(V1FlockerVolumeSource item) { - this.builder = new V1FlockerVolumeSourceBuilder(this, item); - } - FlockerNestedImpl() { - this.builder = new V1FlockerVolumeSourceBuilder(this); - } - V1FlockerVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withFlocker(builder.build()); - } - public N endFlocker() { - return and(); - } - - } - class GcePersistentDiskNestedImpl extends V1GCEPersistentDiskVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.GcePersistentDiskNested,Nested{ - GcePersistentDiskNestedImpl(V1GCEPersistentDiskVolumeSource item) { - this.builder = new V1GCEPersistentDiskVolumeSourceBuilder(this, item); - } - GcePersistentDiskNestedImpl() { - this.builder = new V1GCEPersistentDiskVolumeSourceBuilder(this); - } - V1GCEPersistentDiskVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withGcePersistentDisk(builder.build()); - } - public N endGcePersistentDisk() { - return and(); - } - - } - class GlusterfsNestedImpl extends V1GlusterfsPersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.GlusterfsNested,Nested{ - GlusterfsNestedImpl(V1GlusterfsPersistentVolumeSource item) { - this.builder = new V1GlusterfsPersistentVolumeSourceBuilder(this, item); - } - GlusterfsNestedImpl() { - this.builder = new V1GlusterfsPersistentVolumeSourceBuilder(this); - } - V1GlusterfsPersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withGlusterfs(builder.build()); - } - public N endGlusterfs() { - return and(); - } - - } - class HostPathNestedImpl extends V1HostPathVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.HostPathNested,Nested{ - HostPathNestedImpl(V1HostPathVolumeSource item) { - this.builder = new V1HostPathVolumeSourceBuilder(this, item); - } - HostPathNestedImpl() { - this.builder = new V1HostPathVolumeSourceBuilder(this); - } - V1HostPathVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withHostPath(builder.build()); - } - public N endHostPath() { - return and(); - } - - } - class IscsiNestedImpl extends V1ISCSIPersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.IscsiNested,Nested{ - IscsiNestedImpl(V1ISCSIPersistentVolumeSource item) { - this.builder = new V1ISCSIPersistentVolumeSourceBuilder(this, item); - } - IscsiNestedImpl() { - this.builder = new V1ISCSIPersistentVolumeSourceBuilder(this); - } - V1ISCSIPersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withIscsi(builder.build()); - } - public N endIscsi() { - return and(); - } - - } - class LocalNestedImpl extends V1LocalVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.LocalNested,Nested{ - LocalNestedImpl(V1LocalVolumeSource item) { - this.builder = new V1LocalVolumeSourceBuilder(this, item); - } - LocalNestedImpl() { - this.builder = new V1LocalVolumeSourceBuilder(this); - } - V1LocalVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withLocal(builder.build()); - } - public N endLocal() { - return and(); - } - - } - class NfsNestedImpl extends V1NFSVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.NfsNested,Nested{ - NfsNestedImpl(V1NFSVolumeSource item) { - this.builder = new V1NFSVolumeSourceBuilder(this, item); - } - NfsNestedImpl() { - this.builder = new V1NFSVolumeSourceBuilder(this); - } - V1NFSVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withNfs(builder.build()); - } - public N endNfs() { - return and(); - } - - } - class NodeAffinityNestedImpl extends V1VolumeNodeAffinityFluentImpl> implements V1PersistentVolumeSpecFluentImpl.NodeAffinityNested,Nested{ - NodeAffinityNestedImpl(V1VolumeNodeAffinity item) { - this.builder = new V1VolumeNodeAffinityBuilder(this, item); - } - NodeAffinityNestedImpl() { - this.builder = new V1VolumeNodeAffinityBuilder(this); - } - V1VolumeNodeAffinityBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withNodeAffinity(builder.build()); - } - public N endNodeAffinity() { - return and(); - } - - } - class PhotonPersistentDiskNestedImpl extends V1PhotonPersistentDiskVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.PhotonPersistentDiskNested,Nested{ - PhotonPersistentDiskNestedImpl(V1PhotonPersistentDiskVolumeSource item) { - this.builder = new V1PhotonPersistentDiskVolumeSourceBuilder(this, item); - } - PhotonPersistentDiskNestedImpl() { - this.builder = new V1PhotonPersistentDiskVolumeSourceBuilder(this); - } - V1PhotonPersistentDiskVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withPhotonPersistentDisk(builder.build()); - } - public N endPhotonPersistentDisk() { - return and(); - } - - } - class PortworxVolumeNestedImpl extends V1PortworxVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.PortworxVolumeNested,Nested{ - PortworxVolumeNestedImpl(V1PortworxVolumeSource item) { - this.builder = new V1PortworxVolumeSourceBuilder(this, item); - } - PortworxVolumeNestedImpl() { - this.builder = new V1PortworxVolumeSourceBuilder(this); - } - V1PortworxVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withPortworxVolume(builder.build()); - } - public N endPortworxVolume() { - return and(); - } - - } - class QuobyteNestedImpl extends V1QuobyteVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.QuobyteNested,Nested{ - QuobyteNestedImpl(V1QuobyteVolumeSource item) { - this.builder = new V1QuobyteVolumeSourceBuilder(this, item); - } - QuobyteNestedImpl() { - this.builder = new V1QuobyteVolumeSourceBuilder(this); - } - V1QuobyteVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withQuobyte(builder.build()); - } - public N endQuobyte() { - return and(); - } - - } - class RbdNestedImpl extends V1RBDPersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.RbdNested,Nested{ - RbdNestedImpl(V1RBDPersistentVolumeSource item) { - this.builder = new V1RBDPersistentVolumeSourceBuilder(this, item); - } - RbdNestedImpl() { - this.builder = new V1RBDPersistentVolumeSourceBuilder(this); - } - V1RBDPersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withRbd(builder.build()); - } - public N endRbd() { - return and(); - } - - } - class ScaleIONestedImpl extends V1ScaleIOPersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.ScaleIONested,Nested{ - ScaleIONestedImpl(V1ScaleIOPersistentVolumeSource item) { - this.builder = new V1ScaleIOPersistentVolumeSourceBuilder(this, item); - } - ScaleIONestedImpl() { - this.builder = new V1ScaleIOPersistentVolumeSourceBuilder(this); - } - V1ScaleIOPersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withScaleIO(builder.build()); - } - public N endScaleIO() { - return and(); - } - - } - class StorageosNestedImpl extends V1StorageOSPersistentVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.StorageosNested,Nested{ - StorageosNestedImpl(V1StorageOSPersistentVolumeSource item) { - this.builder = new V1StorageOSPersistentVolumeSourceBuilder(this, item); - } - StorageosNestedImpl() { - this.builder = new V1StorageOSPersistentVolumeSourceBuilder(this); - } - V1StorageOSPersistentVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withStorageos(builder.build()); - } - public N endStorageos() { - return and(); - } - - } - class VsphereVolumeNestedImpl extends V1VsphereVirtualDiskVolumeSourceFluentImpl> implements V1PersistentVolumeSpecFluentImpl.VsphereVolumeNested,Nested{ - VsphereVolumeNestedImpl(V1VsphereVirtualDiskVolumeSource item) { - this.builder = new V1VsphereVirtualDiskVolumeSourceBuilder(this, item); - } - VsphereVolumeNestedImpl() { - this.builder = new V1VsphereVirtualDiskVolumeSourceBuilder(this); - } - V1VsphereVirtualDiskVolumeSourceBuilder builder; - public N and() { - return (N) V1PersistentVolumeSpecFluentImpl.this.withVsphereVolume(builder.build()); - } - public N endVsphereVolume() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusBuilder.java index 8684469c6e..2f6f320fdb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusBuilder.java @@ -1,52 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PersistentVolumeStatusBuilder extends V1PersistentVolumeStatusFluentImpl implements VisitableBuilder{ +public class V1PersistentVolumeStatusBuilder extends V1PersistentVolumeStatusFluent implements VisitableBuilder{ public V1PersistentVolumeStatusBuilder() { - this(false); - } - public V1PersistentVolumeStatusBuilder(Boolean validationEnabled) { - this(new V1PersistentVolumeStatus(), validationEnabled); + this(new V1PersistentVolumeStatus()); } + public V1PersistentVolumeStatusBuilder(V1PersistentVolumeStatusFluent fluent) { - this(fluent, false); - } - public V1PersistentVolumeStatusBuilder(V1PersistentVolumeStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PersistentVolumeStatus(), validationEnabled); + this(fluent, new V1PersistentVolumeStatus()); } + public V1PersistentVolumeStatusBuilder(V1PersistentVolumeStatusFluent fluent,V1PersistentVolumeStatus instance) { - this(fluent, instance, false); - } - public V1PersistentVolumeStatusBuilder(V1PersistentVolumeStatusFluent fluent,V1PersistentVolumeStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMessage(instance.getMessage()); - fluent.withPhase(instance.getPhase()); - fluent.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PersistentVolumeStatusBuilder(V1PersistentVolumeStatus instance) { - this(instance,false); - } - public V1PersistentVolumeStatusBuilder(V1PersistentVolumeStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMessage(instance.getMessage()); - this.withPhase(instance.getPhase()); - this.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PersistentVolumeStatusFluent fluent; - Boolean validationEnabled; + public V1PersistentVolumeStatus build() { V1PersistentVolumeStatus buildable = new V1PersistentVolumeStatus(); + buildable.setLastPhaseTransitionTime(fluent.getLastPhaseTransitionTime()); buildable.setMessage(fluent.getMessage()); buildable.setPhase(fluent.getPhase()); buildable.setReason(fluent.getReason()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusFluent.java index d288b160ac..5ef7db1309 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusFluent.java @@ -1,22 +1,115 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.time.OffsetDateTime; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PersistentVolumeStatusFluent> extends Fluent{ - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getPhase(); - public A withPhase(String phase); - public Boolean hasPhase(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PersistentVolumeStatusFluent> extends BaseFluent{ + public V1PersistentVolumeStatusFluent() { + } + public V1PersistentVolumeStatusFluent(V1PersistentVolumeStatus instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastPhaseTransitionTime; + private String message; + private String phase; + private String reason; + + protected void copyInstance(V1PersistentVolumeStatus instance) { + instance = (instance != null ? instance : new V1PersistentVolumeStatus()); + if (instance != null) { + this.withLastPhaseTransitionTime(instance.getLastPhaseTransitionTime()); + this.withMessage(instance.getMessage()); + this.withPhase(instance.getPhase()); + this.withReason(instance.getReason()); + } + } + + public OffsetDateTime getLastPhaseTransitionTime() { + return this.lastPhaseTransitionTime; + } + + public A withLastPhaseTransitionTime(OffsetDateTime lastPhaseTransitionTime) { + this.lastPhaseTransitionTime = lastPhaseTransitionTime; + return (A) this; + } + + public boolean hasLastPhaseTransitionTime() { + return this.lastPhaseTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getPhase() { + return this.phase; + } + + public A withPhase(String phase) { + this.phase = phase; + return (A) this; + } + + public boolean hasPhase() { + return this.phase != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PersistentVolumeStatusFluent that = (V1PersistentVolumeStatusFluent) o; + if (!java.util.Objects.equals(lastPhaseTransitionTime, that.lastPhaseTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(phase, that.phase)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastPhaseTransitionTime, message, phase, reason, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastPhaseTransitionTime != null) { sb.append("lastPhaseTransitionTime:"); sb.append(lastPhaseTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (phase != null) { sb.append("phase:"); sb.append(phase + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusFluentImpl.java deleted file mode 100644 index 6cfc7fa030..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PersistentVolumeStatusFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PersistentVolumeStatusFluentImpl> extends BaseFluent implements V1PersistentVolumeStatusFluent{ - public V1PersistentVolumeStatusFluentImpl() { - } - public V1PersistentVolumeStatusFluentImpl(V1PersistentVolumeStatus instance) { - if (instance != null) { - this.withMessage(instance.getMessage()); - this.withPhase(instance.getPhase()); - this.withReason(instance.getReason()); - } - } - private String message; - private String phase; - private String reason; - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getPhase() { - return this.phase; - } - public A withPhase(String phase) { - this.phase=phase; return (A) this; - } - public Boolean hasPhase() { - return this.phase != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PersistentVolumeStatusFluentImpl that = (V1PersistentVolumeStatusFluentImpl) o; - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(phase, that.phase)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(message, phase, reason, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (phase != null) { sb.append("phase:"); sb.append(phase + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceBuilder.java index f4337b3842..17ece9ca5d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PhotonPersistentDiskVolumeSourceBuilder extends V1PhotonPersistentDiskVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1PhotonPersistentDiskVolumeSourceBuilder extends V1PhotonPersistentDiskVolumeSourceFluent implements VisitableBuilder{ public V1PhotonPersistentDiskVolumeSourceBuilder() { - this(false); - } - public V1PhotonPersistentDiskVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1PhotonPersistentDiskVolumeSource(), validationEnabled); + this(new V1PhotonPersistentDiskVolumeSource()); } + public V1PhotonPersistentDiskVolumeSourceBuilder(V1PhotonPersistentDiskVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1PhotonPersistentDiskVolumeSourceBuilder(V1PhotonPersistentDiskVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PhotonPersistentDiskVolumeSource(), validationEnabled); + this(fluent, new V1PhotonPersistentDiskVolumeSource()); } + public V1PhotonPersistentDiskVolumeSourceBuilder(V1PhotonPersistentDiskVolumeSourceFluent fluent,V1PhotonPersistentDiskVolumeSource instance) { - this(fluent, instance, false); - } - public V1PhotonPersistentDiskVolumeSourceBuilder(V1PhotonPersistentDiskVolumeSourceFluent fluent,V1PhotonPersistentDiskVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withPdID(instance.getPdID()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PhotonPersistentDiskVolumeSourceBuilder(V1PhotonPersistentDiskVolumeSource instance) { - this(instance,false); - } - public V1PhotonPersistentDiskVolumeSourceBuilder(V1PhotonPersistentDiskVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withPdID(instance.getPdID()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PhotonPersistentDiskVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1PhotonPersistentDiskVolumeSource build() { V1PhotonPersistentDiskVolumeSource buildable = new V1PhotonPersistentDiskVolumeSource(); buildable.setFsType(fluent.getFsType()); @@ -46,4 +28,5 @@ public V1PhotonPersistentDiskVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceFluent.java index a974bd986a..a07e46450b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PhotonPersistentDiskVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getPdID(); - public A withPdID(String pdID); - public Boolean hasPdID(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PhotonPersistentDiskVolumeSourceFluent> extends BaseFluent{ + public V1PhotonPersistentDiskVolumeSourceFluent() { + } + public V1PhotonPersistentDiskVolumeSourceFluent(V1PhotonPersistentDiskVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private String pdID; + + protected void copyInstance(V1PhotonPersistentDiskVolumeSource instance) { + instance = (instance != null ? instance : new V1PhotonPersistentDiskVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withPdID(instance.getPdID()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getPdID() { + return this.pdID; + } + + public A withPdID(String pdID) { + this.pdID = pdID; + return (A) this; + } + + public boolean hasPdID() { + return this.pdID != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PhotonPersistentDiskVolumeSourceFluent that = (V1PhotonPersistentDiskVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(pdID, that.pdID)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, pdID, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (pdID != null) { sb.append("pdID:"); sb.append(pdID); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceFluentImpl.java deleted file mode 100644 index 1ca3796e38..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PhotonPersistentDiskVolumeSourceFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PhotonPersistentDiskVolumeSourceFluentImpl> extends BaseFluent implements V1PhotonPersistentDiskVolumeSourceFluent{ - public V1PhotonPersistentDiskVolumeSourceFluentImpl() { - } - public V1PhotonPersistentDiskVolumeSourceFluentImpl(V1PhotonPersistentDiskVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withPdID(instance.getPdID()); - } - } - private String fsType; - private String pdID; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getPdID() { - return this.pdID; - } - public A withPdID(String pdID) { - this.pdID=pdID; return (A) this; - } - public Boolean hasPdID() { - return this.pdID != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PhotonPersistentDiskVolumeSourceFluentImpl that = (V1PhotonPersistentDiskVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(pdID, that.pdID)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, pdID, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (pdID != null) { sb.append("pdID:"); sb.append(pdID); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityBuilder.java index 11a228feaa..29d928a9df 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodAffinityBuilder extends V1PodAffinityFluentImpl implements VisitableBuilder{ +public class V1PodAffinityBuilder extends V1PodAffinityFluent implements VisitableBuilder{ public V1PodAffinityBuilder() { - this(false); - } - public V1PodAffinityBuilder(Boolean validationEnabled) { - this(new V1PodAffinity(), validationEnabled); + this(new V1PodAffinity()); } + public V1PodAffinityBuilder(V1PodAffinityFluent fluent) { - this(fluent, false); - } - public V1PodAffinityBuilder(V1PodAffinityFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodAffinity(), validationEnabled); + this(fluent, new V1PodAffinity()); } + public V1PodAffinityBuilder(V1PodAffinityFluent fluent,V1PodAffinity instance) { - this(fluent, instance, false); - } - public V1PodAffinityBuilder(V1PodAffinityFluent fluent,V1PodAffinity instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); - fluent.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodAffinityBuilder(V1PodAffinity instance) { - this(instance,false); - } - public V1PodAffinityBuilder(V1PodAffinity instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); - this.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodAffinityFluent fluent; - Boolean validationEnabled; + public V1PodAffinity build() { V1PodAffinity buildable = new V1PodAffinity(); - buildable.setPreferredDuringSchedulingIgnoredDuringExecution(fluent.getPreferredDuringSchedulingIgnoredDuringExecution()); - buildable.setRequiredDuringSchedulingIgnoredDuringExecution(fluent.getRequiredDuringSchedulingIgnoredDuringExecution()); + buildable.setPreferredDuringSchedulingIgnoredDuringExecution(fluent.buildPreferredDuringSchedulingIgnoredDuringExecution()); + buildable.setRequiredDuringSchedulingIgnoredDuringExecution(fluent.buildRequiredDuringSchedulingIgnoredDuringExecution()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityFluent.java index dab21dfedc..cc6eb345a5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityFluent.java @@ -1,90 +1,398 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodAffinityFluent> extends Fluent{ - public A addToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item); - public A setToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item); - public A addToPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items); - public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeFromPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items); - public A removeAllFromPreferredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeMatchingFromPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPreferredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getPreferredDuringSchedulingIgnoredDuringExecution(); - public List buildPreferredDuringSchedulingIgnoredDuringExecution(); - public V1WeightedPodAffinityTerm buildPreferredDuringSchedulingIgnoredDuringExecution(int index); - public V1WeightedPodAffinityTerm buildFirstPreferredDuringSchedulingIgnoredDuringExecution(); - public V1WeightedPodAffinityTerm buildLastPreferredDuringSchedulingIgnoredDuringExecution(); - public V1WeightedPodAffinityTerm buildMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public Boolean hasMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public A withPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution); - public A withPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... preferredDuringSchedulingIgnoredDuringExecution); - public Boolean hasPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecutionLike(V1WeightedPodAffinityTerm item); - public V1PodAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(int index,V1WeightedPodAffinityTerm item); - public V1PodAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editPreferredDuringSchedulingIgnoredDuringExecution(int index); - public V1PodAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editFirstPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editLastPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public A addToRequiredDuringSchedulingIgnoredDuringExecution(int index,V1PodAffinityTerm item); - public A setToRequiredDuringSchedulingIgnoredDuringExecution(int index,V1PodAffinityTerm item); - public A addToRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items); - public A addAllToRequiredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeFromRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items); - public A removeAllFromRequiredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeMatchingFromRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRequiredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getRequiredDuringSchedulingIgnoredDuringExecution(); - public List buildRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityTerm buildRequiredDuringSchedulingIgnoredDuringExecution(int index); - public V1PodAffinityTerm buildFirstRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityTerm buildLastRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityTerm buildMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public Boolean hasMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public A withRequiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution); - public A withRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... requiredDuringSchedulingIgnoredDuringExecution); - public Boolean hasRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1PodAffinityTerm item); - public V1PodAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(int index,V1PodAffinityTerm item); - public V1PodAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editRequiredDuringSchedulingIgnoredDuringExecution(int index); - public V1PodAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editFirstRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editLastRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public interface PreferredDuringSchedulingIgnoredDuringExecutionNested extends Nested,V1WeightedPodAffinityTermFluent>{ - public N and(); - public N endPreferredDuringSchedulingIgnoredDuringExecution(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodAffinityFluent> extends BaseFluent{ + public V1PodAffinityFluent() { + } + + public V1PodAffinityFluent(V1PodAffinity instance) { + this.copyInstance(instance); + } + private ArrayList preferredDuringSchedulingIgnoredDuringExecution; + private ArrayList requiredDuringSchedulingIgnoredDuringExecution; + + protected void copyInstance(V1PodAffinity instance) { + instance = (instance != null ? instance : new V1PodAffinity()); + if (instance != null) { + this.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); + this.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); + } + } + + public A addToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item); + if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(index, builder); preferredDuringSchedulingIgnoredDuringExecution.add(index, builder);} + return (A)this; + } + + public A setToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item); + if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").set(index, builder); preferredDuringSchedulingIgnoredDuringExecution.set(index, builder);} + return (A)this; + } + + public A addToPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A removeFromPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder); this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeAllFromPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder); this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeMatchingFromPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + if (preferredDuringSchedulingIgnoredDuringExecution == null) return (A) this; + final Iterator each = preferredDuringSchedulingIgnoredDuringExecution.iterator(); + final List visitables = _visitables.get("preferredDuringSchedulingIgnoredDuringExecution"); + while (each.hasNext()) { + V1WeightedPodAffinityTermBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution != null ? build(preferredDuringSchedulingIgnoredDuringExecution) : null; + } + + public V1WeightedPodAffinityTerm buildPreferredDuringSchedulingIgnoredDuringExecution(int index) { + return this.preferredDuringSchedulingIgnoredDuringExecution.get(index).build(); + } + + public V1WeightedPodAffinityTerm buildFirstPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution.get(0).build(); + } + + public V1WeightedPodAffinityTerm buildLastPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution.get(preferredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); + } + + public V1WeightedPodAffinityTerm buildMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1WeightedPodAffinityTermBuilder item : preferredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1WeightedPodAffinityTermBuilder item : preferredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { + if (this.preferredDuringSchedulingIgnoredDuringExecution != null) { + this._visitables.get("preferredDuringSchedulingIgnoredDuringExecution").clear(); + } + if (preferredDuringSchedulingIgnoredDuringExecution != null) { + this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList(); + for (V1WeightedPodAffinityTerm item : preferredDuringSchedulingIgnoredDuringExecution) { + this.addToPreferredDuringSchedulingIgnoredDuringExecution(item); + } + } else { + this.preferredDuringSchedulingIgnoredDuringExecution = null; + } + return (A) this; + } + + public A withPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... preferredDuringSchedulingIgnoredDuringExecution) { + if (this.preferredDuringSchedulingIgnoredDuringExecution != null) { + this.preferredDuringSchedulingIgnoredDuringExecution.clear(); + _visitables.remove("preferredDuringSchedulingIgnoredDuringExecution"); + } + if (preferredDuringSchedulingIgnoredDuringExecution != null) { + for (V1WeightedPodAffinityTerm item : preferredDuringSchedulingIgnoredDuringExecution) { + this.addToPreferredDuringSchedulingIgnoredDuringExecution(item); + } + } + return (A) this; + } + + public boolean hasPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution != null && !this.preferredDuringSchedulingIgnoredDuringExecution.isEmpty(); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecution() { + return new PreferredDuringSchedulingIgnoredDuringExecutionNested(-1, null); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecutionLike(V1WeightedPodAffinityTerm item) { + return new PreferredDuringSchedulingIgnoredDuringExecutionNested(-1, item); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(int index,V1WeightedPodAffinityTerm item) { + return new PreferredDuringSchedulingIgnoredDuringExecutionNested(index, item); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editPreferredDuringSchedulingIgnoredDuringExecution(int index) { + if (preferredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit preferredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); + return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editFirstPreferredDuringSchedulingIgnoredDuringExecution() { + if (preferredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(0, buildPreferredDuringSchedulingIgnoredDuringExecution(0)); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editLastPreferredDuringSchedulingIgnoredDuringExecution() { + int index = preferredDuringSchedulingIgnoredDuringExecution.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); } - public interface RequiredDuringSchedulingIgnoredDuringExecutionNested extends Nested,V1PodAffinityTermFluent>{ - public N and(); - public N endRequiredDuringSchedulingIgnoredDuringExecution(); + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item); + if (index < 0 || index >= requiredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder); requiredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(index, builder); requiredDuringSchedulingIgnoredDuringExecution.add(index, builder);} + return (A)this; + } + + public A setToRequiredDuringSchedulingIgnoredDuringExecution(int index,V1PodAffinityTerm item) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item); + if (index < 0 || index >= requiredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder); requiredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").set(index, builder); requiredDuringSchedulingIgnoredDuringExecution.set(index, builder);} + return (A)this; + } + + public A addToRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder);this.requiredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A addAllToRequiredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder);this.requiredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A removeFromRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").remove(builder); this.requiredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeAllFromRequiredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").remove(builder); this.requiredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeMatchingFromRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + if (requiredDuringSchedulingIgnoredDuringExecution == null) return (A) this; + final Iterator each = requiredDuringSchedulingIgnoredDuringExecution.iterator(); + final List visitables = _visitables.get("requiredDuringSchedulingIgnoredDuringExecution"); + while (each.hasNext()) { + V1PodAffinityTermBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildRequiredDuringSchedulingIgnoredDuringExecution() { + return this.requiredDuringSchedulingIgnoredDuringExecution != null ? build(requiredDuringSchedulingIgnoredDuringExecution) : null; + } + + public V1PodAffinityTerm buildRequiredDuringSchedulingIgnoredDuringExecution(int index) { + return this.requiredDuringSchedulingIgnoredDuringExecution.get(index).build(); + } + + public V1PodAffinityTerm buildFirstRequiredDuringSchedulingIgnoredDuringExecution() { + return this.requiredDuringSchedulingIgnoredDuringExecution.get(0).build(); + } + + public V1PodAffinityTerm buildLastRequiredDuringSchedulingIgnoredDuringExecution() { + return this.requiredDuringSchedulingIgnoredDuringExecution.get(requiredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); + } + + public V1PodAffinityTerm buildMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1PodAffinityTermBuilder item : requiredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1PodAffinityTermBuilder item : requiredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRequiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution) { + if (this.requiredDuringSchedulingIgnoredDuringExecution != null) { + this._visitables.get("requiredDuringSchedulingIgnoredDuringExecution").clear(); + } + if (requiredDuringSchedulingIgnoredDuringExecution != null) { + this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList(); + for (V1PodAffinityTerm item : requiredDuringSchedulingIgnoredDuringExecution) { + this.addToRequiredDuringSchedulingIgnoredDuringExecution(item); + } + } else { + this.requiredDuringSchedulingIgnoredDuringExecution = null; + } + return (A) this; + } + + public A withRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... requiredDuringSchedulingIgnoredDuringExecution) { + if (this.requiredDuringSchedulingIgnoredDuringExecution != null) { + this.requiredDuringSchedulingIgnoredDuringExecution.clear(); + _visitables.remove("requiredDuringSchedulingIgnoredDuringExecution"); + } + if (requiredDuringSchedulingIgnoredDuringExecution != null) { + for (V1PodAffinityTerm item : requiredDuringSchedulingIgnoredDuringExecution) { + this.addToRequiredDuringSchedulingIgnoredDuringExecution(item); + } + } + return (A) this; + } + + public boolean hasRequiredDuringSchedulingIgnoredDuringExecution() { + return this.requiredDuringSchedulingIgnoredDuringExecution != null && !this.requiredDuringSchedulingIgnoredDuringExecution.isEmpty(); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecution() { + return new RequiredDuringSchedulingIgnoredDuringExecutionNested(-1, null); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1PodAffinityTerm item) { + return new RequiredDuringSchedulingIgnoredDuringExecutionNested(-1, item); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(int index,V1PodAffinityTerm item) { + return new RequiredDuringSchedulingIgnoredDuringExecutionNested(index, item); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editRequiredDuringSchedulingIgnoredDuringExecution(int index) { + if (requiredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit requiredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); + return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(index, buildRequiredDuringSchedulingIgnoredDuringExecution(index)); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editFirstRequiredDuringSchedulingIgnoredDuringExecution() { + if (requiredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first requiredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(0, buildRequiredDuringSchedulingIgnoredDuringExecution(0)); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editLastRequiredDuringSchedulingIgnoredDuringExecution() { + int index = requiredDuringSchedulingIgnoredDuringExecution.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last requiredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(index, buildRequiredDuringSchedulingIgnoredDuringExecution(index)); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1WeightedPodAffinityTermFluent> implements Nested{ + PreferredDuringSchedulingIgnoredDuringExecutionNested(int index,V1WeightedPodAffinityTerm item) { + this.index = index; + this.builder = new V1WeightedPodAffinityTermBuilder(this, item); + } + V1WeightedPodAffinityTermBuilder builder; + int index; + + public N and() { + return (N) V1PodAffinityFluent.this.setToPreferredDuringSchedulingIgnoredDuringExecution(index,builder.build()); + } + + public N endPreferredDuringSchedulingIgnoredDuringExecution() { + return and(); + } + } + public class RequiredDuringSchedulingIgnoredDuringExecutionNested extends V1PodAffinityTermFluent> implements Nested{ + RequiredDuringSchedulingIgnoredDuringExecutionNested(int index,V1PodAffinityTerm item) { + this.index = index; + this.builder = new V1PodAffinityTermBuilder(this, item); + } + V1PodAffinityTermBuilder builder; + int index; + + public N and() { + return (N) V1PodAffinityFluent.this.setToRequiredDuringSchedulingIgnoredDuringExecution(index,builder.build()); + } + + public N endRequiredDuringSchedulingIgnoredDuringExecution() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityFluentImpl.java deleted file mode 100644 index 35fd7ce9cc..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityFluentImpl.java +++ /dev/null @@ -1,307 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodAffinityFluentImpl> extends BaseFluent implements V1PodAffinityFluent{ - public V1PodAffinityFluentImpl() { - } - public V1PodAffinityFluentImpl(V1PodAffinity instance) { - if (instance != null) { - this.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); - this.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); - } - } - private ArrayList preferredDuringSchedulingIgnoredDuringExecution; - private ArrayList requiredDuringSchedulingIgnoredDuringExecution; - public A addToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item); - if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(index, builder); preferredDuringSchedulingIgnoredDuringExecution.add(index, builder);} - return (A)this; - } - public A setToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item); - if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").set(index, builder); preferredDuringSchedulingIgnoredDuringExecution.set(index, builder);} - return (A)this; - } - public A addToPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A removeFromPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items) { - for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeAllFromPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { - for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeMatchingFromPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - if (preferredDuringSchedulingIgnoredDuringExecution == null) return (A) this; - final Iterator each = preferredDuringSchedulingIgnoredDuringExecution.iterator(); - final List visitables = _visitables.get("preferredDuringSchedulingIgnoredDuringExecution"); - while (each.hasNext()) { - V1WeightedPodAffinityTermBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPreferredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getPreferredDuringSchedulingIgnoredDuringExecution() { - return preferredDuringSchedulingIgnoredDuringExecution != null ? build(preferredDuringSchedulingIgnoredDuringExecution) : null; - } - public List buildPreferredDuringSchedulingIgnoredDuringExecution() { - return preferredDuringSchedulingIgnoredDuringExecution != null ? build(preferredDuringSchedulingIgnoredDuringExecution) : null; - } - public V1WeightedPodAffinityTerm buildPreferredDuringSchedulingIgnoredDuringExecution(int index) { - return this.preferredDuringSchedulingIgnoredDuringExecution.get(index).build(); - } - public V1WeightedPodAffinityTerm buildFirstPreferredDuringSchedulingIgnoredDuringExecution() { - return this.preferredDuringSchedulingIgnoredDuringExecution.get(0).build(); - } - public V1WeightedPodAffinityTerm buildLastPreferredDuringSchedulingIgnoredDuringExecution() { - return this.preferredDuringSchedulingIgnoredDuringExecution.get(preferredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); - } - public V1WeightedPodAffinityTerm buildMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1WeightedPodAffinityTermBuilder item: preferredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1WeightedPodAffinityTermBuilder item: preferredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return true;} } return false; - } - public A withPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { - if (this.preferredDuringSchedulingIgnoredDuringExecution != null) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").clear();} - if (preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList(); for (V1WeightedPodAffinityTerm item : preferredDuringSchedulingIgnoredDuringExecution){this.addToPreferredDuringSchedulingIgnoredDuringExecution(item);}} else { this.preferredDuringSchedulingIgnoredDuringExecution = null;} return (A) this; - } - public A withPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... preferredDuringSchedulingIgnoredDuringExecution) { - if (this.preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution.clear(); _visitables.remove("preferredDuringSchedulingIgnoredDuringExecution"); } - if (preferredDuringSchedulingIgnoredDuringExecution != null) {for (V1WeightedPodAffinityTerm item :preferredDuringSchedulingIgnoredDuringExecution){ this.addToPreferredDuringSchedulingIgnoredDuringExecution(item);}} return (A) this; - } - public Boolean hasPreferredDuringSchedulingIgnoredDuringExecution() { - return preferredDuringSchedulingIgnoredDuringExecution != null && !preferredDuringSchedulingIgnoredDuringExecution.isEmpty(); - } - public V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecution() { - return new V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(); - } - public V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecutionLike(V1WeightedPodAffinityTerm item) { - return new V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(-1, item); - } - public V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(int index,V1WeightedPodAffinityTerm item) { - return new V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(index, item); - } - public V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editPreferredDuringSchedulingIgnoredDuringExecution(int index) { - if (preferredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit preferredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); - return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editFirstPreferredDuringSchedulingIgnoredDuringExecution() { - if (preferredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(0, buildPreferredDuringSchedulingIgnoredDuringExecution(0)); - } - public V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editLastPreferredDuringSchedulingIgnoredDuringExecution() { - int index = preferredDuringSchedulingIgnoredDuringExecution.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item); - if (index < 0 || index >= requiredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder); requiredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(index, builder); requiredDuringSchedulingIgnoredDuringExecution.add(index, builder);} - return (A)this; - } - public A setToRequiredDuringSchedulingIgnoredDuringExecution(int index,V1PodAffinityTerm item) { - if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item); - if (index < 0 || index >= requiredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder); requiredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").set(index, builder); requiredDuringSchedulingIgnoredDuringExecution.set(index, builder);} - return (A)this; - } - public A addToRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items) { - if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder);this.requiredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A addAllToRequiredDuringSchedulingIgnoredDuringExecution(Collection items) { - if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder);this.requiredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A removeFromRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items) { - for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.requiredDuringSchedulingIgnoredDuringExecution != null) {this.requiredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeAllFromRequiredDuringSchedulingIgnoredDuringExecution(Collection items) { - for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.requiredDuringSchedulingIgnoredDuringExecution != null) {this.requiredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeMatchingFromRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - if (requiredDuringSchedulingIgnoredDuringExecution == null) return (A) this; - final Iterator each = requiredDuringSchedulingIgnoredDuringExecution.iterator(); - final List visitables = _visitables.get("requiredDuringSchedulingIgnoredDuringExecution"); - while (each.hasNext()) { - V1PodAffinityTermBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRequiredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getRequiredDuringSchedulingIgnoredDuringExecution() { - return requiredDuringSchedulingIgnoredDuringExecution != null ? build(requiredDuringSchedulingIgnoredDuringExecution) : null; - } - public List buildRequiredDuringSchedulingIgnoredDuringExecution() { - return requiredDuringSchedulingIgnoredDuringExecution != null ? build(requiredDuringSchedulingIgnoredDuringExecution) : null; - } - public V1PodAffinityTerm buildRequiredDuringSchedulingIgnoredDuringExecution(int index) { - return this.requiredDuringSchedulingIgnoredDuringExecution.get(index).build(); - } - public V1PodAffinityTerm buildFirstRequiredDuringSchedulingIgnoredDuringExecution() { - return this.requiredDuringSchedulingIgnoredDuringExecution.get(0).build(); - } - public V1PodAffinityTerm buildLastRequiredDuringSchedulingIgnoredDuringExecution() { - return this.requiredDuringSchedulingIgnoredDuringExecution.get(requiredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); - } - public V1PodAffinityTerm buildMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1PodAffinityTermBuilder item: requiredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1PodAffinityTermBuilder item: requiredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return true;} } return false; - } - public A withRequiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution) { - if (this.requiredDuringSchedulingIgnoredDuringExecution != null) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").clear();} - if (requiredDuringSchedulingIgnoredDuringExecution != null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList(); for (V1PodAffinityTerm item : requiredDuringSchedulingIgnoredDuringExecution){this.addToRequiredDuringSchedulingIgnoredDuringExecution(item);}} else { this.requiredDuringSchedulingIgnoredDuringExecution = null;} return (A) this; - } - public A withRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... requiredDuringSchedulingIgnoredDuringExecution) { - if (this.requiredDuringSchedulingIgnoredDuringExecution != null) {this.requiredDuringSchedulingIgnoredDuringExecution.clear(); _visitables.remove("requiredDuringSchedulingIgnoredDuringExecution"); } - if (requiredDuringSchedulingIgnoredDuringExecution != null) {for (V1PodAffinityTerm item :requiredDuringSchedulingIgnoredDuringExecution){ this.addToRequiredDuringSchedulingIgnoredDuringExecution(item);}} return (A) this; - } - public Boolean hasRequiredDuringSchedulingIgnoredDuringExecution() { - return requiredDuringSchedulingIgnoredDuringExecution != null && !requiredDuringSchedulingIgnoredDuringExecution.isEmpty(); - } - public V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecution() { - return new V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(); - } - public V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1PodAffinityTerm item) { - return new V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(-1, item); - } - public V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(int index,V1PodAffinityTerm item) { - return new V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(index, item); - } - public V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editRequiredDuringSchedulingIgnoredDuringExecution(int index) { - if (requiredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit requiredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); - return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(index, buildRequiredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editFirstRequiredDuringSchedulingIgnoredDuringExecution() { - if (requiredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first requiredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(0, buildRequiredDuringSchedulingIgnoredDuringExecution(0)); - } - public V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editLastRequiredDuringSchedulingIgnoredDuringExecution() { - int index = requiredDuringSchedulingIgnoredDuringExecution.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last requiredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(index, buildRequiredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1WeightedPodAffinityTermFluentImpl> implements V1PodAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested,Nested{ - PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(int index,V1WeightedPodAffinityTerm item) { - this.index = index; - this.builder = new V1WeightedPodAffinityTermBuilder(this, item); - } - PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl() { - this.index = -1; - this.builder = new V1WeightedPodAffinityTermBuilder(this); - } - V1WeightedPodAffinityTermBuilder builder; - int index; - public N and() { - return (N) V1PodAffinityFluentImpl.this.setToPreferredDuringSchedulingIgnoredDuringExecution(index,builder.build()); - } - public N endPreferredDuringSchedulingIgnoredDuringExecution() { - return and(); - } - - } - class RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl extends V1PodAffinityTermFluentImpl> implements V1PodAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested,Nested{ - RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(int index,V1PodAffinityTerm item) { - this.index = index; - this.builder = new V1PodAffinityTermBuilder(this, item); - } - RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl() { - this.index = -1; - this.builder = new V1PodAffinityTermBuilder(this); - } - V1PodAffinityTermBuilder builder; - int index; - public N and() { - return (N) V1PodAffinityFluentImpl.this.setToRequiredDuringSchedulingIgnoredDuringExecution(index,builder.build()); - } - public N endRequiredDuringSchedulingIgnoredDuringExecution() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermBuilder.java index f3f6624099..0a0b4f3c15 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodAffinityTermBuilder extends V1PodAffinityTermFluentImpl implements VisitableBuilder{ +public class V1PodAffinityTermBuilder extends V1PodAffinityTermFluent implements VisitableBuilder{ public V1PodAffinityTermBuilder() { - this(false); - } - public V1PodAffinityTermBuilder(Boolean validationEnabled) { - this(new V1PodAffinityTerm(), validationEnabled); + this(new V1PodAffinityTerm()); } + public V1PodAffinityTermBuilder(V1PodAffinityTermFluent fluent) { - this(fluent, false); - } - public V1PodAffinityTermBuilder(V1PodAffinityTermFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodAffinityTerm(), validationEnabled); + this(fluent, new V1PodAffinityTerm()); } + public V1PodAffinityTermBuilder(V1PodAffinityTermFluent fluent,V1PodAffinityTerm instance) { - this(fluent, instance, false); - } - public V1PodAffinityTermBuilder(V1PodAffinityTermFluent fluent,V1PodAffinityTerm instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLabelSelector(instance.getLabelSelector()); - fluent.withNamespaceSelector(instance.getNamespaceSelector()); - fluent.withNamespaces(instance.getNamespaces()); - fluent.withTopologyKey(instance.getTopologyKey()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodAffinityTermBuilder(V1PodAffinityTerm instance) { - this(instance,false); - } - public V1PodAffinityTermBuilder(V1PodAffinityTerm instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLabelSelector(instance.getLabelSelector()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withNamespaces(instance.getNamespaces()); - this.withTopologyKey(instance.getTopologyKey()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodAffinityTermFluent fluent; - Boolean validationEnabled; + public V1PodAffinityTerm build() { V1PodAffinityTerm buildable = new V1PodAffinityTerm(); - buildable.setLabelSelector(fluent.getLabelSelector()); - buildable.setNamespaceSelector(fluent.getNamespaceSelector()); + buildable.setLabelSelector(fluent.buildLabelSelector()); + buildable.setNamespaceSelector(fluent.buildNamespaceSelector()); buildable.setNamespaces(fluent.getNamespaces()); buildable.setTopologyKey(fluent.getTopologyKey()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermFluent.java index f8ba6e9a17..66d8f3993a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermFluent.java @@ -1,77 +1,285 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodAffinityTermFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildLabelSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getLabelSelector(); - public V1LabelSelector buildLabelSelector(); - public A withLabelSelector(V1LabelSelector labelSelector); - public Boolean hasLabelSelector(); - public V1PodAffinityTermFluent.LabelSelectorNested withNewLabelSelector(); - public V1PodAffinityTermFluent.LabelSelectorNested withNewLabelSelectorLike(V1LabelSelector item); - public V1PodAffinityTermFluent.LabelSelectorNested editLabelSelector(); - public V1PodAffinityTermFluent.LabelSelectorNested editOrNewLabelSelector(); - public V1PodAffinityTermFluent.LabelSelectorNested editOrNewLabelSelectorLike(V1LabelSelector item); - - /** - * This method has been deprecated, please use method buildNamespaceSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getNamespaceSelector(); - public V1LabelSelector buildNamespaceSelector(); - public A withNamespaceSelector(V1LabelSelector namespaceSelector); - public Boolean hasNamespaceSelector(); - public V1PodAffinityTermFluent.NamespaceSelectorNested withNewNamespaceSelector(); - public V1PodAffinityTermFluent.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item); - public V1PodAffinityTermFluent.NamespaceSelectorNested editNamespaceSelector(); - public V1PodAffinityTermFluent.NamespaceSelectorNested editOrNewNamespaceSelector(); - public V1PodAffinityTermFluent.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item); - public A addToNamespaces(int index,String item); - public A setToNamespaces(int index,String item); - public A addToNamespaces(java.lang.String... items); - public A addAllToNamespaces(Collection items); - public A removeFromNamespaces(java.lang.String... items); - public A removeAllFromNamespaces(Collection items); - public List getNamespaces(); - public String getNamespace(int index); - public String getFirstNamespace(); - public String getLastNamespace(); - public String getMatchingNamespace(Predicate predicate); - public Boolean hasMatchingNamespace(Predicate predicate); - public A withNamespaces(List namespaces); - public A withNamespaces(java.lang.String... namespaces); - public Boolean hasNamespaces(); - public String getTopologyKey(); - public A withTopologyKey(String topologyKey); - public Boolean hasTopologyKey(); - public interface LabelSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endLabelSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodAffinityTermFluent> extends BaseFluent{ + public V1PodAffinityTermFluent() { + } + + public V1PodAffinityTermFluent(V1PodAffinityTerm instance) { + this.copyInstance(instance); + } + private V1LabelSelectorBuilder labelSelector; + private V1LabelSelectorBuilder namespaceSelector; + private List namespaces; + private String topologyKey; + + protected void copyInstance(V1PodAffinityTerm instance) { + instance = (instance != null ? instance : new V1PodAffinityTerm()); + if (instance != null) { + this.withLabelSelector(instance.getLabelSelector()); + this.withNamespaceSelector(instance.getNamespaceSelector()); + this.withNamespaces(instance.getNamespaces()); + this.withTopologyKey(instance.getTopologyKey()); + } + } + + public V1LabelSelector buildLabelSelector() { + return this.labelSelector != null ? this.labelSelector.build() : null; + } + + public A withLabelSelector(V1LabelSelector labelSelector) { + this._visitables.remove("labelSelector"); + if (labelSelector != null) { + this.labelSelector = new V1LabelSelectorBuilder(labelSelector); + this._visitables.get("labelSelector").add(this.labelSelector); + } else { + this.labelSelector = null; + this._visitables.get("labelSelector").remove(this.labelSelector); + } + return (A) this; + } + + public boolean hasLabelSelector() { + return this.labelSelector != null; + } + + public LabelSelectorNested withNewLabelSelector() { + return new LabelSelectorNested(null); + } + + public LabelSelectorNested withNewLabelSelectorLike(V1LabelSelector item) { + return new LabelSelectorNested(item); + } + + public LabelSelectorNested editLabelSelector() { + return withNewLabelSelectorLike(java.util.Optional.ofNullable(buildLabelSelector()).orElse(null)); + } + + public LabelSelectorNested editOrNewLabelSelector() { + return withNewLabelSelectorLike(java.util.Optional.ofNullable(buildLabelSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public LabelSelectorNested editOrNewLabelSelectorLike(V1LabelSelector item) { + return withNewLabelSelectorLike(java.util.Optional.ofNullable(buildLabelSelector()).orElse(item)); + } + + public V1LabelSelector buildNamespaceSelector() { + return this.namespaceSelector != null ? this.namespaceSelector.build() : null; + } + + public A withNamespaceSelector(V1LabelSelector namespaceSelector) { + this._visitables.remove("namespaceSelector"); + if (namespaceSelector != null) { + this.namespaceSelector = new V1LabelSelectorBuilder(namespaceSelector); + this._visitables.get("namespaceSelector").add(this.namespaceSelector); + } else { + this.namespaceSelector = null; + this._visitables.get("namespaceSelector").remove(this.namespaceSelector); + } + return (A) this; + } + + public boolean hasNamespaceSelector() { + return this.namespaceSelector != null; + } + + public NamespaceSelectorNested withNewNamespaceSelector() { + return new NamespaceSelectorNested(null); + } + + public NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { + return new NamespaceSelectorNested(item); + } + + public NamespaceSelectorNested editNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(null)); } - public interface NamespaceSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endNamespaceSelector(); + + public NamespaceSelectorNested editOrNewNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(item)); + } + + public A addToNamespaces(int index,String item) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + this.namespaces.add(index, item); + return (A)this; + } + + public A setToNamespaces(int index,String item) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + this.namespaces.set(index, item); return (A)this; + } + + public A addToNamespaces(java.lang.String... items) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + for (String item : items) {this.namespaces.add(item);} return (A)this; + } + + public A addAllToNamespaces(Collection items) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + for (String item : items) {this.namespaces.add(item);} return (A)this; + } + + public A removeFromNamespaces(java.lang.String... items) { + if (this.namespaces == null) return (A)this; + for (String item : items) { this.namespaces.remove(item);} return (A)this; + } + + public A removeAllFromNamespaces(Collection items) { + if (this.namespaces == null) return (A)this; + for (String item : items) { this.namespaces.remove(item);} return (A)this; + } + + public List getNamespaces() { + return this.namespaces; + } + + public String getNamespace(int index) { + return this.namespaces.get(index); + } + + public String getFirstNamespace() { + return this.namespaces.get(0); + } + + public String getLastNamespace() { + return this.namespaces.get(namespaces.size() - 1); + } + + public String getMatchingNamespace(Predicate predicate) { + for (String item : namespaces) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingNamespace(Predicate predicate) { + for (String item : namespaces) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNamespaces(List namespaces) { + if (namespaces != null) { + this.namespaces = new ArrayList(); + for (String item : namespaces) { + this.addToNamespaces(item); + } + } else { + this.namespaces = null; + } + return (A) this; + } + + public A withNamespaces(java.lang.String... namespaces) { + if (this.namespaces != null) { + this.namespaces.clear(); + _visitables.remove("namespaces"); + } + if (namespaces != null) { + for (String item : namespaces) { + this.addToNamespaces(item); + } + } + return (A) this; + } + + public boolean hasNamespaces() { + return this.namespaces != null && !this.namespaces.isEmpty(); + } + + public String getTopologyKey() { + return this.topologyKey; + } + + public A withTopologyKey(String topologyKey) { + this.topologyKey = topologyKey; + return (A) this; + } + + public boolean hasTopologyKey() { + return this.topologyKey != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodAffinityTermFluent that = (V1PodAffinityTermFluent) o; + if (!java.util.Objects.equals(labelSelector, that.labelSelector)) return false; + if (!java.util.Objects.equals(namespaceSelector, that.namespaceSelector)) return false; + if (!java.util.Objects.equals(namespaces, that.namespaces)) return false; + if (!java.util.Objects.equals(topologyKey, that.topologyKey)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(labelSelector, namespaceSelector, namespaces, topologyKey, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (labelSelector != null) { sb.append("labelSelector:"); sb.append(labelSelector + ","); } + if (namespaceSelector != null) { sb.append("namespaceSelector:"); sb.append(namespaceSelector + ","); } + if (namespaces != null && !namespaces.isEmpty()) { sb.append("namespaces:"); sb.append(namespaces + ","); } + if (topologyKey != null) { sb.append("topologyKey:"); sb.append(topologyKey); } + sb.append("}"); + return sb.toString(); + } + public class LabelSelectorNested extends V1LabelSelectorFluent> implements Nested{ + LabelSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1PodAffinityTermFluent.this.withLabelSelector(builder.build()); + } + public N endLabelSelector() { + return and(); + } + + } + public class NamespaceSelectorNested extends V1LabelSelectorFluent> implements Nested{ + NamespaceSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1PodAffinityTermFluent.this.withNamespaceSelector(builder.build()); + } + + public N endNamespaceSelector() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermFluentImpl.java deleted file mode 100644 index 818293d8f8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAffinityTermFluentImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodAffinityTermFluentImpl> extends BaseFluent implements V1PodAffinityTermFluent{ - public V1PodAffinityTermFluentImpl() { - } - public V1PodAffinityTermFluentImpl(V1PodAffinityTerm instance) { - if (instance != null) { - this.withLabelSelector(instance.getLabelSelector()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withNamespaces(instance.getNamespaces()); - this.withTopologyKey(instance.getTopologyKey()); - } - } - private V1LabelSelectorBuilder labelSelector; - private V1LabelSelectorBuilder namespaceSelector; - private List namespaces; - private String topologyKey; - - /** - * This method has been deprecated, please use method buildLabelSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getLabelSelector() { - return this.labelSelector!=null ?this.labelSelector.build():null; - } - public V1LabelSelector buildLabelSelector() { - return this.labelSelector!=null ?this.labelSelector.build():null; - } - public A withLabelSelector(V1LabelSelector labelSelector) { - _visitables.get("labelSelector").remove(this.labelSelector); - if (labelSelector!=null){ this.labelSelector= new V1LabelSelectorBuilder(labelSelector); _visitables.get("labelSelector").add(this.labelSelector);} else { this.labelSelector = null; _visitables.get("labelSelector").remove(this.labelSelector); } return (A) this; - } - public Boolean hasLabelSelector() { - return this.labelSelector != null; - } - public V1PodAffinityTermFluentImpl.LabelSelectorNested withNewLabelSelector() { - return new V1PodAffinityTermFluentImpl.LabelSelectorNestedImpl(); - } - public V1PodAffinityTermFluentImpl.LabelSelectorNested withNewLabelSelectorLike(V1LabelSelector item) { - return new V1PodAffinityTermFluentImpl.LabelSelectorNestedImpl(item); - } - public V1PodAffinityTermFluentImpl.LabelSelectorNested editLabelSelector() { - return withNewLabelSelectorLike(getLabelSelector()); - } - public V1PodAffinityTermFluentImpl.LabelSelectorNested editOrNewLabelSelector() { - return withNewLabelSelectorLike(getLabelSelector() != null ? getLabelSelector(): new V1LabelSelectorBuilder().build()); - } - public V1PodAffinityTermFluentImpl.LabelSelectorNested editOrNewLabelSelectorLike(V1LabelSelector item) { - return withNewLabelSelectorLike(getLabelSelector() != null ? getLabelSelector(): item); - } - - /** - * This method has been deprecated, please use method buildNamespaceSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getNamespaceSelector() { - return this.namespaceSelector!=null ?this.namespaceSelector.build():null; - } - public V1LabelSelector buildNamespaceSelector() { - return this.namespaceSelector!=null ?this.namespaceSelector.build():null; - } - public A withNamespaceSelector(V1LabelSelector namespaceSelector) { - _visitables.get("namespaceSelector").remove(this.namespaceSelector); - if (namespaceSelector!=null){ this.namespaceSelector= new V1LabelSelectorBuilder(namespaceSelector); _visitables.get("namespaceSelector").add(this.namespaceSelector);} else { this.namespaceSelector = null; _visitables.get("namespaceSelector").remove(this.namespaceSelector); } return (A) this; - } - public Boolean hasNamespaceSelector() { - return this.namespaceSelector != null; - } - public V1PodAffinityTermFluentImpl.NamespaceSelectorNested withNewNamespaceSelector() { - return new V1PodAffinityTermFluentImpl.NamespaceSelectorNestedImpl(); - } - public V1PodAffinityTermFluentImpl.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { - return new V1PodAffinityTermFluentImpl.NamespaceSelectorNestedImpl(item); - } - public V1PodAffinityTermFluentImpl.NamespaceSelectorNested editNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector()); - } - public V1PodAffinityTermFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): new V1LabelSelectorBuilder().build()); - } - public V1PodAffinityTermFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): item); - } - public A addToNamespaces(int index,String item) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - this.namespaces.add(index, item); - return (A)this; - } - public A setToNamespaces(int index,String item) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - this.namespaces.set(index, item); return (A)this; - } - public A addToNamespaces(java.lang.String... items) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - for (String item : items) {this.namespaces.add(item);} return (A)this; - } - public A addAllToNamespaces(Collection items) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - for (String item : items) {this.namespaces.add(item);} return (A)this; - } - public A removeFromNamespaces(java.lang.String... items) { - for (String item : items) {if (this.namespaces!= null){ this.namespaces.remove(item);}} return (A)this; - } - public A removeAllFromNamespaces(Collection items) { - for (String item : items) {if (this.namespaces!= null){ this.namespaces.remove(item);}} return (A)this; - } - public List getNamespaces() { - return this.namespaces; - } - public String getNamespace(int index) { - return this.namespaces.get(index); - } - public String getFirstNamespace() { - return this.namespaces.get(0); - } - public String getLastNamespace() { - return this.namespaces.get(namespaces.size() - 1); - } - public String getMatchingNamespace(Predicate predicate) { - for (String item: namespaces) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingNamespace(Predicate predicate) { - for (String item: namespaces) { if(predicate.test(item)){ return true;} } return false; - } - public A withNamespaces(List namespaces) { - if (namespaces != null) {this.namespaces = new ArrayList(); for (String item : namespaces){this.addToNamespaces(item);}} else { this.namespaces = null;} return (A) this; - } - public A withNamespaces(java.lang.String... namespaces) { - if (this.namespaces != null) {this.namespaces.clear(); _visitables.remove("namespaces"); } - if (namespaces != null) {for (String item :namespaces){ this.addToNamespaces(item);}} return (A) this; - } - public Boolean hasNamespaces() { - return namespaces != null && !namespaces.isEmpty(); - } - public String getTopologyKey() { - return this.topologyKey; - } - public A withTopologyKey(String topologyKey) { - this.topologyKey=topologyKey; return (A) this; - } - public Boolean hasTopologyKey() { - return this.topologyKey != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodAffinityTermFluentImpl that = (V1PodAffinityTermFluentImpl) o; - if (!java.util.Objects.equals(labelSelector, that.labelSelector)) return false; - - if (!java.util.Objects.equals(namespaceSelector, that.namespaceSelector)) return false; - - if (!java.util.Objects.equals(namespaces, that.namespaces)) return false; - - if (!java.util.Objects.equals(topologyKey, that.topologyKey)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(labelSelector, namespaceSelector, namespaces, topologyKey, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (labelSelector != null) { sb.append("labelSelector:"); sb.append(labelSelector + ","); } - if (namespaceSelector != null) { sb.append("namespaceSelector:"); sb.append(namespaceSelector + ","); } - if (namespaces != null && !namespaces.isEmpty()) { sb.append("namespaces:"); sb.append(namespaces + ","); } - if (topologyKey != null) { sb.append("topologyKey:"); sb.append(topologyKey); } - sb.append("}"); - return sb.toString(); - } - class LabelSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1PodAffinityTermFluentImpl.LabelSelectorNested,Nested{ - LabelSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - LabelSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1PodAffinityTermFluentImpl.this.withLabelSelector(builder.build()); - } - public N endLabelSelector() { - return and(); - } - - } - class NamespaceSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1PodAffinityTermFluentImpl.NamespaceSelectorNested,Nested{ - NamespaceSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - NamespaceSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1PodAffinityTermFluentImpl.this.withNamespaceSelector(builder.build()); - } - public N endNamespaceSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityBuilder.java index 81f36cb00a..10032e45d1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodAntiAffinityBuilder extends V1PodAntiAffinityFluentImpl implements VisitableBuilder{ +public class V1PodAntiAffinityBuilder extends V1PodAntiAffinityFluent implements VisitableBuilder{ public V1PodAntiAffinityBuilder() { - this(false); - } - public V1PodAntiAffinityBuilder(Boolean validationEnabled) { - this(new V1PodAntiAffinity(), validationEnabled); + this(new V1PodAntiAffinity()); } + public V1PodAntiAffinityBuilder(V1PodAntiAffinityFluent fluent) { - this(fluent, false); - } - public V1PodAntiAffinityBuilder(V1PodAntiAffinityFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodAntiAffinity(), validationEnabled); + this(fluent, new V1PodAntiAffinity()); } + public V1PodAntiAffinityBuilder(V1PodAntiAffinityFluent fluent,V1PodAntiAffinity instance) { - this(fluent, instance, false); - } - public V1PodAntiAffinityBuilder(V1PodAntiAffinityFluent fluent,V1PodAntiAffinity instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); - fluent.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodAntiAffinityBuilder(V1PodAntiAffinity instance) { - this(instance,false); - } - public V1PodAntiAffinityBuilder(V1PodAntiAffinity instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); - this.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodAntiAffinityFluent fluent; - Boolean validationEnabled; + public V1PodAntiAffinity build() { V1PodAntiAffinity buildable = new V1PodAntiAffinity(); - buildable.setPreferredDuringSchedulingIgnoredDuringExecution(fluent.getPreferredDuringSchedulingIgnoredDuringExecution()); - buildable.setRequiredDuringSchedulingIgnoredDuringExecution(fluent.getRequiredDuringSchedulingIgnoredDuringExecution()); + buildable.setPreferredDuringSchedulingIgnoredDuringExecution(fluent.buildPreferredDuringSchedulingIgnoredDuringExecution()); + buildable.setRequiredDuringSchedulingIgnoredDuringExecution(fluent.buildRequiredDuringSchedulingIgnoredDuringExecution()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityFluent.java index 8d9985a9e9..3aac0ffa99 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityFluent.java @@ -1,90 +1,398 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodAntiAffinityFluent> extends Fluent{ - public A addToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item); - public A setToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item); - public A addToPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items); - public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeFromPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items); - public A removeAllFromPreferredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeMatchingFromPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPreferredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getPreferredDuringSchedulingIgnoredDuringExecution(); - public List buildPreferredDuringSchedulingIgnoredDuringExecution(); - public V1WeightedPodAffinityTerm buildPreferredDuringSchedulingIgnoredDuringExecution(int index); - public V1WeightedPodAffinityTerm buildFirstPreferredDuringSchedulingIgnoredDuringExecution(); - public V1WeightedPodAffinityTerm buildLastPreferredDuringSchedulingIgnoredDuringExecution(); - public V1WeightedPodAffinityTerm buildMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public Boolean hasMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public A withPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution); - public A withPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... preferredDuringSchedulingIgnoredDuringExecution); - public Boolean hasPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PodAntiAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PodAntiAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecutionLike(V1WeightedPodAffinityTerm item); - public V1PodAntiAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(int index,V1WeightedPodAffinityTerm item); - public V1PodAntiAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editPreferredDuringSchedulingIgnoredDuringExecution(int index); - public V1PodAntiAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editFirstPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PodAntiAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editLastPreferredDuringSchedulingIgnoredDuringExecution(); - public V1PodAntiAffinityFluent.PreferredDuringSchedulingIgnoredDuringExecutionNested editMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public A addToRequiredDuringSchedulingIgnoredDuringExecution(int index,V1PodAffinityTerm item); - public A setToRequiredDuringSchedulingIgnoredDuringExecution(int index,V1PodAffinityTerm item); - public A addToRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items); - public A addAllToRequiredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeFromRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items); - public A removeAllFromRequiredDuringSchedulingIgnoredDuringExecution(Collection items); - public A removeMatchingFromRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRequiredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getRequiredDuringSchedulingIgnoredDuringExecution(); - public List buildRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityTerm buildRequiredDuringSchedulingIgnoredDuringExecution(int index); - public V1PodAffinityTerm buildFirstRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityTerm buildLastRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAffinityTerm buildMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public Boolean hasMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public A withRequiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution); - public A withRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... requiredDuringSchedulingIgnoredDuringExecution); - public Boolean hasRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAntiAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAntiAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1PodAffinityTerm item); - public V1PodAntiAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(int index,V1PodAffinityTerm item); - public V1PodAntiAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editRequiredDuringSchedulingIgnoredDuringExecution(int index); - public V1PodAntiAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editFirstRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAntiAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editLastRequiredDuringSchedulingIgnoredDuringExecution(); - public V1PodAntiAffinityFluent.RequiredDuringSchedulingIgnoredDuringExecutionNested editMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate); - public interface PreferredDuringSchedulingIgnoredDuringExecutionNested extends Nested,V1WeightedPodAffinityTermFluent>{ - public N and(); - public N endPreferredDuringSchedulingIgnoredDuringExecution(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodAntiAffinityFluent> extends BaseFluent{ + public V1PodAntiAffinityFluent() { + } + + public V1PodAntiAffinityFluent(V1PodAntiAffinity instance) { + this.copyInstance(instance); + } + private ArrayList preferredDuringSchedulingIgnoredDuringExecution; + private ArrayList requiredDuringSchedulingIgnoredDuringExecution; + + protected void copyInstance(V1PodAntiAffinity instance) { + instance = (instance != null ? instance : new V1PodAntiAffinity()); + if (instance != null) { + this.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); + this.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); + } + } + + public A addToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item); + if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(index, builder); preferredDuringSchedulingIgnoredDuringExecution.add(index, builder);} + return (A)this; + } + + public A setToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item); + if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").set(index, builder); preferredDuringSchedulingIgnoredDuringExecution.set(index, builder);} + return (A)this; + } + + public A addToPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A removeFromPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder); this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeAllFromPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.preferredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder); this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeMatchingFromPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + if (preferredDuringSchedulingIgnoredDuringExecution == null) return (A) this; + final Iterator each = preferredDuringSchedulingIgnoredDuringExecution.iterator(); + final List visitables = _visitables.get("preferredDuringSchedulingIgnoredDuringExecution"); + while (each.hasNext()) { + V1WeightedPodAffinityTermBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution != null ? build(preferredDuringSchedulingIgnoredDuringExecution) : null; + } + + public V1WeightedPodAffinityTerm buildPreferredDuringSchedulingIgnoredDuringExecution(int index) { + return this.preferredDuringSchedulingIgnoredDuringExecution.get(index).build(); + } + + public V1WeightedPodAffinityTerm buildFirstPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution.get(0).build(); + } + + public V1WeightedPodAffinityTerm buildLastPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution.get(preferredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); + } + + public V1WeightedPodAffinityTerm buildMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1WeightedPodAffinityTermBuilder item : preferredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1WeightedPodAffinityTermBuilder item : preferredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { + if (this.preferredDuringSchedulingIgnoredDuringExecution != null) { + this._visitables.get("preferredDuringSchedulingIgnoredDuringExecution").clear(); + } + if (preferredDuringSchedulingIgnoredDuringExecution != null) { + this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList(); + for (V1WeightedPodAffinityTerm item : preferredDuringSchedulingIgnoredDuringExecution) { + this.addToPreferredDuringSchedulingIgnoredDuringExecution(item); + } + } else { + this.preferredDuringSchedulingIgnoredDuringExecution = null; + } + return (A) this; + } + + public A withPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... preferredDuringSchedulingIgnoredDuringExecution) { + if (this.preferredDuringSchedulingIgnoredDuringExecution != null) { + this.preferredDuringSchedulingIgnoredDuringExecution.clear(); + _visitables.remove("preferredDuringSchedulingIgnoredDuringExecution"); + } + if (preferredDuringSchedulingIgnoredDuringExecution != null) { + for (V1WeightedPodAffinityTerm item : preferredDuringSchedulingIgnoredDuringExecution) { + this.addToPreferredDuringSchedulingIgnoredDuringExecution(item); + } + } + return (A) this; + } + + public boolean hasPreferredDuringSchedulingIgnoredDuringExecution() { + return this.preferredDuringSchedulingIgnoredDuringExecution != null && !this.preferredDuringSchedulingIgnoredDuringExecution.isEmpty(); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecution() { + return new PreferredDuringSchedulingIgnoredDuringExecutionNested(-1, null); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecutionLike(V1WeightedPodAffinityTerm item) { + return new PreferredDuringSchedulingIgnoredDuringExecutionNested(-1, item); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(int index,V1WeightedPodAffinityTerm item) { + return new PreferredDuringSchedulingIgnoredDuringExecutionNested(index, item); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editPreferredDuringSchedulingIgnoredDuringExecution(int index) { + if (preferredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit preferredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); + return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editFirstPreferredDuringSchedulingIgnoredDuringExecution() { + if (preferredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(0, buildPreferredDuringSchedulingIgnoredDuringExecution(0)); + } + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editLastPreferredDuringSchedulingIgnoredDuringExecution() { + int index = preferredDuringSchedulingIgnoredDuringExecution.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); } - public interface RequiredDuringSchedulingIgnoredDuringExecutionNested extends Nested,V1PodAffinityTermFluent>{ - public N and(); - public N endRequiredDuringSchedulingIgnoredDuringExecution(); + + public PreferredDuringSchedulingIgnoredDuringExecutionNested editMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item); + if (index < 0 || index >= requiredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder); requiredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(index, builder); requiredDuringSchedulingIgnoredDuringExecution.add(index, builder);} + return (A)this; + } + + public A setToRequiredDuringSchedulingIgnoredDuringExecution(int index,V1PodAffinityTerm item) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item); + if (index < 0 || index >= requiredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder); requiredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").set(index, builder); requiredDuringSchedulingIgnoredDuringExecution.set(index, builder);} + return (A)this; + } + + public A addToRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder);this.requiredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A addAllToRequiredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} + for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder);this.requiredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; + } + + public A removeFromRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").remove(builder); this.requiredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeAllFromRequiredDuringSchedulingIgnoredDuringExecution(Collection items) { + if (this.requiredDuringSchedulingIgnoredDuringExecution == null) return (A)this; + for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").remove(builder); this.requiredDuringSchedulingIgnoredDuringExecution.remove(builder);} return (A)this; + } + + public A removeMatchingFromRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + if (requiredDuringSchedulingIgnoredDuringExecution == null) return (A) this; + final Iterator each = requiredDuringSchedulingIgnoredDuringExecution.iterator(); + final List visitables = _visitables.get("requiredDuringSchedulingIgnoredDuringExecution"); + while (each.hasNext()) { + V1PodAffinityTermBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildRequiredDuringSchedulingIgnoredDuringExecution() { + return this.requiredDuringSchedulingIgnoredDuringExecution != null ? build(requiredDuringSchedulingIgnoredDuringExecution) : null; + } + + public V1PodAffinityTerm buildRequiredDuringSchedulingIgnoredDuringExecution(int index) { + return this.requiredDuringSchedulingIgnoredDuringExecution.get(index).build(); + } + + public V1PodAffinityTerm buildFirstRequiredDuringSchedulingIgnoredDuringExecution() { + return this.requiredDuringSchedulingIgnoredDuringExecution.get(0).build(); + } + + public V1PodAffinityTerm buildLastRequiredDuringSchedulingIgnoredDuringExecution() { + return this.requiredDuringSchedulingIgnoredDuringExecution.get(requiredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); + } + + public V1PodAffinityTerm buildMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1PodAffinityTermBuilder item : requiredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + for (V1PodAffinityTermBuilder item : requiredDuringSchedulingIgnoredDuringExecution) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRequiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution) { + if (this.requiredDuringSchedulingIgnoredDuringExecution != null) { + this._visitables.get("requiredDuringSchedulingIgnoredDuringExecution").clear(); + } + if (requiredDuringSchedulingIgnoredDuringExecution != null) { + this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList(); + for (V1PodAffinityTerm item : requiredDuringSchedulingIgnoredDuringExecution) { + this.addToRequiredDuringSchedulingIgnoredDuringExecution(item); + } + } else { + this.requiredDuringSchedulingIgnoredDuringExecution = null; + } + return (A) this; + } + + public A withRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... requiredDuringSchedulingIgnoredDuringExecution) { + if (this.requiredDuringSchedulingIgnoredDuringExecution != null) { + this.requiredDuringSchedulingIgnoredDuringExecution.clear(); + _visitables.remove("requiredDuringSchedulingIgnoredDuringExecution"); + } + if (requiredDuringSchedulingIgnoredDuringExecution != null) { + for (V1PodAffinityTerm item : requiredDuringSchedulingIgnoredDuringExecution) { + this.addToRequiredDuringSchedulingIgnoredDuringExecution(item); + } + } + return (A) this; + } + + public boolean hasRequiredDuringSchedulingIgnoredDuringExecution() { + return this.requiredDuringSchedulingIgnoredDuringExecution != null && !this.requiredDuringSchedulingIgnoredDuringExecution.isEmpty(); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecution() { + return new RequiredDuringSchedulingIgnoredDuringExecutionNested(-1, null); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1PodAffinityTerm item) { + return new RequiredDuringSchedulingIgnoredDuringExecutionNested(-1, item); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(int index,V1PodAffinityTerm item) { + return new RequiredDuringSchedulingIgnoredDuringExecutionNested(index, item); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editRequiredDuringSchedulingIgnoredDuringExecution(int index) { + if (requiredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit requiredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); + return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(index, buildRequiredDuringSchedulingIgnoredDuringExecution(index)); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editFirstRequiredDuringSchedulingIgnoredDuringExecution() { + if (requiredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first requiredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(0, buildRequiredDuringSchedulingIgnoredDuringExecution(0)); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editLastRequiredDuringSchedulingIgnoredDuringExecution() { + int index = requiredDuringSchedulingIgnoredDuringExecution.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last requiredDuringSchedulingIgnoredDuringExecution. The list is empty."); + return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(index, buildRequiredDuringSchedulingIgnoredDuringExecution(index)); + } + + public RequiredDuringSchedulingIgnoredDuringExecutionNested editMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1WeightedPodAffinityTermFluent> implements Nested{ + PreferredDuringSchedulingIgnoredDuringExecutionNested(int index,V1WeightedPodAffinityTerm item) { + this.index = index; + this.builder = new V1WeightedPodAffinityTermBuilder(this, item); + } + V1WeightedPodAffinityTermBuilder builder; + int index; + + public N and() { + return (N) V1PodAntiAffinityFluent.this.setToPreferredDuringSchedulingIgnoredDuringExecution(index,builder.build()); + } + + public N endPreferredDuringSchedulingIgnoredDuringExecution() { + return and(); + } + } + public class RequiredDuringSchedulingIgnoredDuringExecutionNested extends V1PodAffinityTermFluent> implements Nested{ + RequiredDuringSchedulingIgnoredDuringExecutionNested(int index,V1PodAffinityTerm item) { + this.index = index; + this.builder = new V1PodAffinityTermBuilder(this, item); + } + V1PodAffinityTermBuilder builder; + int index; + + public N and() { + return (N) V1PodAntiAffinityFluent.this.setToRequiredDuringSchedulingIgnoredDuringExecution(index,builder.build()); + } + + public N endRequiredDuringSchedulingIgnoredDuringExecution() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityFluentImpl.java deleted file mode 100644 index 834270c716..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodAntiAffinityFluentImpl.java +++ /dev/null @@ -1,307 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodAntiAffinityFluentImpl> extends BaseFluent implements V1PodAntiAffinityFluent{ - public V1PodAntiAffinityFluentImpl() { - } - public V1PodAntiAffinityFluentImpl(V1PodAntiAffinity instance) { - if (instance != null) { - this.withPreferredDuringSchedulingIgnoredDuringExecution(instance.getPreferredDuringSchedulingIgnoredDuringExecution()); - this.withRequiredDuringSchedulingIgnoredDuringExecution(instance.getRequiredDuringSchedulingIgnoredDuringExecution()); - } - } - private ArrayList preferredDuringSchedulingIgnoredDuringExecution; - private ArrayList requiredDuringSchedulingIgnoredDuringExecution; - public A addToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item); - if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(index, builder); preferredDuringSchedulingIgnoredDuringExecution.add(index, builder);} - return (A)this; - } - public A setToPreferredDuringSchedulingIgnoredDuringExecution(int index,V1WeightedPodAffinityTerm item) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item); - if (index < 0 || index >= preferredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder); preferredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").set(index, builder); preferredDuringSchedulingIgnoredDuringExecution.set(index, builder);} - return (A)this; - } - public A addToPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A addAllToPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { - if (this.preferredDuringSchedulingIgnoredDuringExecution == null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").add(builder);this.preferredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A removeFromPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... items) { - for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeAllFromPreferredDuringSchedulingIgnoredDuringExecution(Collection items) { - for (V1WeightedPodAffinityTerm item : items) {V1WeightedPodAffinityTermBuilder builder = new V1WeightedPodAffinityTermBuilder(item);_visitables.get("preferredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeMatchingFromPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - if (preferredDuringSchedulingIgnoredDuringExecution == null) return (A) this; - final Iterator each = preferredDuringSchedulingIgnoredDuringExecution.iterator(); - final List visitables = _visitables.get("preferredDuringSchedulingIgnoredDuringExecution"); - while (each.hasNext()) { - V1WeightedPodAffinityTermBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPreferredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getPreferredDuringSchedulingIgnoredDuringExecution() { - return preferredDuringSchedulingIgnoredDuringExecution != null ? build(preferredDuringSchedulingIgnoredDuringExecution) : null; - } - public List buildPreferredDuringSchedulingIgnoredDuringExecution() { - return preferredDuringSchedulingIgnoredDuringExecution != null ? build(preferredDuringSchedulingIgnoredDuringExecution) : null; - } - public V1WeightedPodAffinityTerm buildPreferredDuringSchedulingIgnoredDuringExecution(int index) { - return this.preferredDuringSchedulingIgnoredDuringExecution.get(index).build(); - } - public V1WeightedPodAffinityTerm buildFirstPreferredDuringSchedulingIgnoredDuringExecution() { - return this.preferredDuringSchedulingIgnoredDuringExecution.get(0).build(); - } - public V1WeightedPodAffinityTerm buildLastPreferredDuringSchedulingIgnoredDuringExecution() { - return this.preferredDuringSchedulingIgnoredDuringExecution.get(preferredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); - } - public V1WeightedPodAffinityTerm buildMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1WeightedPodAffinityTermBuilder item: preferredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1WeightedPodAffinityTermBuilder item: preferredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return true;} } return false; - } - public A withPreferredDuringSchedulingIgnoredDuringExecution(List preferredDuringSchedulingIgnoredDuringExecution) { - if (this.preferredDuringSchedulingIgnoredDuringExecution != null) { _visitables.get("preferredDuringSchedulingIgnoredDuringExecution").clear();} - if (preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution = new ArrayList(); for (V1WeightedPodAffinityTerm item : preferredDuringSchedulingIgnoredDuringExecution){this.addToPreferredDuringSchedulingIgnoredDuringExecution(item);}} else { this.preferredDuringSchedulingIgnoredDuringExecution = null;} return (A) this; - } - public A withPreferredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1WeightedPodAffinityTerm... preferredDuringSchedulingIgnoredDuringExecution) { - if (this.preferredDuringSchedulingIgnoredDuringExecution != null) {this.preferredDuringSchedulingIgnoredDuringExecution.clear(); _visitables.remove("preferredDuringSchedulingIgnoredDuringExecution"); } - if (preferredDuringSchedulingIgnoredDuringExecution != null) {for (V1WeightedPodAffinityTerm item :preferredDuringSchedulingIgnoredDuringExecution){ this.addToPreferredDuringSchedulingIgnoredDuringExecution(item);}} return (A) this; - } - public Boolean hasPreferredDuringSchedulingIgnoredDuringExecution() { - return preferredDuringSchedulingIgnoredDuringExecution != null && !preferredDuringSchedulingIgnoredDuringExecution.isEmpty(); - } - public V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecution() { - return new V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(); - } - public V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested addNewPreferredDuringSchedulingIgnoredDuringExecutionLike(V1WeightedPodAffinityTerm item) { - return new V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(-1, item); - } - public V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(int index,V1WeightedPodAffinityTerm item) { - return new V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(index, item); - } - public V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editPreferredDuringSchedulingIgnoredDuringExecution(int index) { - if (preferredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit preferredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); - return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editFirstPreferredDuringSchedulingIgnoredDuringExecution() { - if (preferredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(0, buildPreferredDuringSchedulingIgnoredDuringExecution(0)); - } - public V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editLastPreferredDuringSchedulingIgnoredDuringExecution() { - int index = preferredDuringSchedulingIgnoredDuringExecution.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last preferredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewPreferredDuringSchedulingIgnoredDuringExecutionLike(index, buildPreferredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested editMatchingPreferredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item); - if (index < 0 || index >= requiredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder); requiredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(index, builder); requiredDuringSchedulingIgnoredDuringExecution.add(index, builder);} - return (A)this; - } - public A setToRequiredDuringSchedulingIgnoredDuringExecution(int index,V1PodAffinityTerm item) { - if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item); - if (index < 0 || index >= requiredDuringSchedulingIgnoredDuringExecution.size()) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder); requiredDuringSchedulingIgnoredDuringExecution.add(builder); } else { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").set(index, builder); requiredDuringSchedulingIgnoredDuringExecution.set(index, builder);} - return (A)this; - } - public A addToRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items) { - if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder);this.requiredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A addAllToRequiredDuringSchedulingIgnoredDuringExecution(Collection items) { - if (this.requiredDuringSchedulingIgnoredDuringExecution == null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList();} - for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").add(builder);this.requiredDuringSchedulingIgnoredDuringExecution.add(builder);} return (A)this; - } - public A removeFromRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... items) { - for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.requiredDuringSchedulingIgnoredDuringExecution != null) {this.requiredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeAllFromRequiredDuringSchedulingIgnoredDuringExecution(Collection items) { - for (V1PodAffinityTerm item : items) {V1PodAffinityTermBuilder builder = new V1PodAffinityTermBuilder(item);_visitables.get("requiredDuringSchedulingIgnoredDuringExecution").remove(builder);if (this.requiredDuringSchedulingIgnoredDuringExecution != null) {this.requiredDuringSchedulingIgnoredDuringExecution.remove(builder);}} return (A)this; - } - public A removeMatchingFromRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - if (requiredDuringSchedulingIgnoredDuringExecution == null) return (A) this; - final Iterator each = requiredDuringSchedulingIgnoredDuringExecution.iterator(); - final List visitables = _visitables.get("requiredDuringSchedulingIgnoredDuringExecution"); - while (each.hasNext()) { - V1PodAffinityTermBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRequiredDuringSchedulingIgnoredDuringExecution instead. - * @return The buildable object. - */ - @Deprecated - public List getRequiredDuringSchedulingIgnoredDuringExecution() { - return requiredDuringSchedulingIgnoredDuringExecution != null ? build(requiredDuringSchedulingIgnoredDuringExecution) : null; - } - public List buildRequiredDuringSchedulingIgnoredDuringExecution() { - return requiredDuringSchedulingIgnoredDuringExecution != null ? build(requiredDuringSchedulingIgnoredDuringExecution) : null; - } - public V1PodAffinityTerm buildRequiredDuringSchedulingIgnoredDuringExecution(int index) { - return this.requiredDuringSchedulingIgnoredDuringExecution.get(index).build(); - } - public V1PodAffinityTerm buildFirstRequiredDuringSchedulingIgnoredDuringExecution() { - return this.requiredDuringSchedulingIgnoredDuringExecution.get(0).build(); - } - public V1PodAffinityTerm buildLastRequiredDuringSchedulingIgnoredDuringExecution() { - return this.requiredDuringSchedulingIgnoredDuringExecution.get(requiredDuringSchedulingIgnoredDuringExecution.size() - 1).build(); - } - public V1PodAffinityTerm buildMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1PodAffinityTermBuilder item: requiredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - for (V1PodAffinityTermBuilder item: requiredDuringSchedulingIgnoredDuringExecution) { if(predicate.test(item)){ return true;} } return false; - } - public A withRequiredDuringSchedulingIgnoredDuringExecution(List requiredDuringSchedulingIgnoredDuringExecution) { - if (this.requiredDuringSchedulingIgnoredDuringExecution != null) { _visitables.get("requiredDuringSchedulingIgnoredDuringExecution").clear();} - if (requiredDuringSchedulingIgnoredDuringExecution != null) {this.requiredDuringSchedulingIgnoredDuringExecution = new ArrayList(); for (V1PodAffinityTerm item : requiredDuringSchedulingIgnoredDuringExecution){this.addToRequiredDuringSchedulingIgnoredDuringExecution(item);}} else { this.requiredDuringSchedulingIgnoredDuringExecution = null;} return (A) this; - } - public A withRequiredDuringSchedulingIgnoredDuringExecution(io.kubernetes.client.openapi.models.V1PodAffinityTerm... requiredDuringSchedulingIgnoredDuringExecution) { - if (this.requiredDuringSchedulingIgnoredDuringExecution != null) {this.requiredDuringSchedulingIgnoredDuringExecution.clear(); _visitables.remove("requiredDuringSchedulingIgnoredDuringExecution"); } - if (requiredDuringSchedulingIgnoredDuringExecution != null) {for (V1PodAffinityTerm item :requiredDuringSchedulingIgnoredDuringExecution){ this.addToRequiredDuringSchedulingIgnoredDuringExecution(item);}} return (A) this; - } - public Boolean hasRequiredDuringSchedulingIgnoredDuringExecution() { - return requiredDuringSchedulingIgnoredDuringExecution != null && !requiredDuringSchedulingIgnoredDuringExecution.isEmpty(); - } - public V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecution() { - return new V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(); - } - public V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested addNewRequiredDuringSchedulingIgnoredDuringExecutionLike(V1PodAffinityTerm item) { - return new V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(-1, item); - } - public V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(int index,V1PodAffinityTerm item) { - return new V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(index, item); - } - public V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editRequiredDuringSchedulingIgnoredDuringExecution(int index) { - if (requiredDuringSchedulingIgnoredDuringExecution.size() <= index) throw new RuntimeException("Can't edit requiredDuringSchedulingIgnoredDuringExecution. Index exceeds size."); - return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(index, buildRequiredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editFirstRequiredDuringSchedulingIgnoredDuringExecution() { - if (requiredDuringSchedulingIgnoredDuringExecution.size() == 0) throw new RuntimeException("Can't edit first requiredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(0, buildRequiredDuringSchedulingIgnoredDuringExecution(0)); - } - public V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editLastRequiredDuringSchedulingIgnoredDuringExecution() { - int index = requiredDuringSchedulingIgnoredDuringExecution.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last requiredDuringSchedulingIgnoredDuringExecution. The list is empty."); - return setNewRequiredDuringSchedulingIgnoredDuringExecutionLike(index, buildRequiredDuringSchedulingIgnoredDuringExecution(index)); - } - public V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested editMatchingRequiredDuringSchedulingIgnoredDuringExecution(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1WeightedPodAffinityTermFluentImpl> implements V1PodAntiAffinityFluentImpl.PreferredDuringSchedulingIgnoredDuringExecutionNested,Nested{ - PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl(int index,V1WeightedPodAffinityTerm item) { - this.index = index; - this.builder = new V1WeightedPodAffinityTermBuilder(this, item); - } - PreferredDuringSchedulingIgnoredDuringExecutionNestedImpl() { - this.index = -1; - this.builder = new V1WeightedPodAffinityTermBuilder(this); - } - V1WeightedPodAffinityTermBuilder builder; - int index; - public N and() { - return (N) V1PodAntiAffinityFluentImpl.this.setToPreferredDuringSchedulingIgnoredDuringExecution(index,builder.build()); - } - public N endPreferredDuringSchedulingIgnoredDuringExecution() { - return and(); - } - - } - class RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl extends V1PodAffinityTermFluentImpl> implements V1PodAntiAffinityFluentImpl.RequiredDuringSchedulingIgnoredDuringExecutionNested,Nested{ - RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl(int index,V1PodAffinityTerm item) { - this.index = index; - this.builder = new V1PodAffinityTermBuilder(this, item); - } - RequiredDuringSchedulingIgnoredDuringExecutionNestedImpl() { - this.index = -1; - this.builder = new V1PodAffinityTermBuilder(this); - } - V1PodAffinityTermBuilder builder; - int index; - public N and() { - return (N) V1PodAntiAffinityFluentImpl.this.setToRequiredDuringSchedulingIgnoredDuringExecution(index,builder.build()); - } - public N endRequiredDuringSchedulingIgnoredDuringExecution() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodBuilder.java index 2dad9af05f..1bd54ed696 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodBuilder extends V1PodFluentImpl implements VisitableBuilder{ +public class V1PodBuilder extends V1PodFluent implements VisitableBuilder{ public V1PodBuilder() { - this(false); - } - public V1PodBuilder(Boolean validationEnabled) { - this(new V1Pod(), validationEnabled); + this(new V1Pod()); } + public V1PodBuilder(V1PodFluent fluent) { - this(fluent, false); - } - public V1PodBuilder(V1PodFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Pod(), validationEnabled); + this(fluent, new V1Pod()); } + public V1PodBuilder(V1PodFluent fluent,V1Pod instance) { - this(fluent, instance, false); - } - public V1PodBuilder(V1PodFluent fluent,V1Pod instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodBuilder(V1Pod instance) { - this(instance,false); - } - public V1PodBuilder(V1Pod instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodFluent fluent; - Boolean validationEnabled; + public V1Pod build() { V1Pod buildable = new V1Pod(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionBuilder.java index e0f2ad0cee..a3a2aa5fa9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodConditionBuilder extends V1PodConditionFluentImpl implements VisitableBuilder{ +public class V1PodConditionBuilder extends V1PodConditionFluent implements VisitableBuilder{ public V1PodConditionBuilder() { - this(false); - } - public V1PodConditionBuilder(Boolean validationEnabled) { - this(new V1PodCondition(), validationEnabled); + this(new V1PodCondition()); } + public V1PodConditionBuilder(V1PodConditionFluent fluent) { - this(fluent, false); - } - public V1PodConditionBuilder(V1PodConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodCondition(), validationEnabled); + this(fluent, new V1PodCondition()); } + public V1PodConditionBuilder(V1PodConditionFluent fluent,V1PodCondition instance) { - this(fluent, instance, false); - } - public V1PodConditionBuilder(V1PodConditionFluent fluent,V1PodCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastProbeTime(instance.getLastProbeTime()); - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodConditionBuilder(V1PodCondition instance) { - this(instance,false); - } - public V1PodConditionBuilder(V1PodCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastProbeTime(instance.getLastProbeTime()); - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodConditionFluent fluent; - Boolean validationEnabled; + public V1PodCondition build() { V1PodCondition buildable = new V1PodCondition(); buildable.setLastProbeTime(fluent.getLastProbeTime()); @@ -58,4 +32,5 @@ public V1PodCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionFluent.java index 7978ea2fd4..868088fa8f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionFluent.java @@ -1,32 +1,149 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodConditionFluent> extends Fluent{ - public OffsetDateTime getLastProbeTime(); - public A withLastProbeTime(OffsetDateTime lastProbeTime); - public Boolean hasLastProbeTime(); - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodConditionFluent> extends BaseFluent{ + public V1PodConditionFluent() { + } + public V1PodConditionFluent(V1PodCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastProbeTime; + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1PodCondition instance) { + instance = (instance != null ? instance : new V1PodCondition()); + if (instance != null) { + this.withLastProbeTime(instance.getLastProbeTime()); + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastProbeTime() { + return this.lastProbeTime; + } + + public A withLastProbeTime(OffsetDateTime lastProbeTime) { + this.lastProbeTime = lastProbeTime; + return (A) this; + } + + public boolean hasLastProbeTime() { + return this.lastProbeTime != null; + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodConditionFluent that = (V1PodConditionFluent) o; + if (!java.util.Objects.equals(lastProbeTime, that.lastProbeTime)) return false; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastProbeTime, lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastProbeTime != null) { sb.append("lastProbeTime:"); sb.append(lastProbeTime + ","); } + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionFluentImpl.java deleted file mode 100644 index 890deb88e8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodConditionFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodConditionFluentImpl> extends BaseFluent implements V1PodConditionFluent{ - public V1PodConditionFluentImpl() { - } - public V1PodConditionFluentImpl(V1PodCondition instance) { - if (instance != null) { - this.withLastProbeTime(instance.getLastProbeTime()); - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastProbeTime; - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastProbeTime() { - return this.lastProbeTime; - } - public A withLastProbeTime(OffsetDateTime lastProbeTime) { - this.lastProbeTime=lastProbeTime; return (A) this; - } - public Boolean hasLastProbeTime() { - return this.lastProbeTime != null; - } - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodConditionFluentImpl that = (V1PodConditionFluentImpl) o; - if (!java.util.Objects.equals(lastProbeTime, that.lastProbeTime)) return false; - - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastProbeTime, lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastProbeTime != null) { sb.append("lastProbeTime:"); sb.append(lastProbeTime + ","); } - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigBuilder.java index 8528a44f23..14bfa78965 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodDNSConfigBuilder extends V1PodDNSConfigFluentImpl implements VisitableBuilder{ +public class V1PodDNSConfigBuilder extends V1PodDNSConfigFluent implements VisitableBuilder{ public V1PodDNSConfigBuilder() { - this(false); - } - public V1PodDNSConfigBuilder(Boolean validationEnabled) { - this(new V1PodDNSConfig(), validationEnabled); + this(new V1PodDNSConfig()); } + public V1PodDNSConfigBuilder(V1PodDNSConfigFluent fluent) { - this(fluent, false); - } - public V1PodDNSConfigBuilder(V1PodDNSConfigFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodDNSConfig(), validationEnabled); + this(fluent, new V1PodDNSConfig()); } + public V1PodDNSConfigBuilder(V1PodDNSConfigFluent fluent,V1PodDNSConfig instance) { - this(fluent, instance, false); - } - public V1PodDNSConfigBuilder(V1PodDNSConfigFluent fluent,V1PodDNSConfig instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNameservers(instance.getNameservers()); - fluent.withOptions(instance.getOptions()); - fluent.withSearches(instance.getSearches()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodDNSConfigBuilder(V1PodDNSConfig instance) { - this(instance,false); - } - public V1PodDNSConfigBuilder(V1PodDNSConfig instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNameservers(instance.getNameservers()); - this.withOptions(instance.getOptions()); - this.withSearches(instance.getSearches()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodDNSConfigFluent fluent; - Boolean validationEnabled; + public V1PodDNSConfig build() { V1PodDNSConfig buildable = new V1PodDNSConfig(); buildable.setNameservers(fluent.getNameservers()); - buildable.setOptions(fluent.getOptions()); + buildable.setOptions(fluent.buildOptions()); buildable.setSearches(fluent.getSearches()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigFluent.java index bffcd2af59..41e77a98a3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigFluent.java @@ -1,86 +1,421 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodDNSConfigFluent> extends Fluent{ - public A addToNameservers(int index,String item); - public A setToNameservers(int index,String item); - public A addToNameservers(java.lang.String... items); - public A addAllToNameservers(Collection items); - public A removeFromNameservers(java.lang.String... items); - public A removeAllFromNameservers(Collection items); - public List getNameservers(); - public String getNameserver(int index); - public String getFirstNameserver(); - public String getLastNameserver(); - public String getMatchingNameserver(Predicate predicate); - public Boolean hasMatchingNameserver(Predicate predicate); - public A withNameservers(List nameservers); - public A withNameservers(java.lang.String... nameservers); - public Boolean hasNameservers(); - public A addToOptions(int index,V1PodDNSConfigOption item); - public A setToOptions(int index,V1PodDNSConfigOption item); - public A addToOptions(io.kubernetes.client.openapi.models.V1PodDNSConfigOption... items); - public A addAllToOptions(Collection items); - public A removeFromOptions(io.kubernetes.client.openapi.models.V1PodDNSConfigOption... items); - public A removeAllFromOptions(Collection items); - public A removeMatchingFromOptions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildOptions instead. - * @return The buildable object. - */ - @Deprecated - public List getOptions(); - public List buildOptions(); - public V1PodDNSConfigOption buildOption(int index); - public V1PodDNSConfigOption buildFirstOption(); - public V1PodDNSConfigOption buildLastOption(); - public V1PodDNSConfigOption buildMatchingOption(Predicate predicate); - public Boolean hasMatchingOption(Predicate predicate); - public A withOptions(List options); - public A withOptions(io.kubernetes.client.openapi.models.V1PodDNSConfigOption... options); - public Boolean hasOptions(); - public V1PodDNSConfigFluent.OptionsNested addNewOption(); - public V1PodDNSConfigFluent.OptionsNested addNewOptionLike(V1PodDNSConfigOption item); - public V1PodDNSConfigFluent.OptionsNested setNewOptionLike(int index,V1PodDNSConfigOption item); - public V1PodDNSConfigFluent.OptionsNested editOption(int index); - public V1PodDNSConfigFluent.OptionsNested editFirstOption(); - public V1PodDNSConfigFluent.OptionsNested editLastOption(); - public V1PodDNSConfigFluent.OptionsNested editMatchingOption(Predicate predicate); - public A addToSearches(int index,String item); - public A setToSearches(int index,String item); - public A addToSearches(java.lang.String... items); - public A addAllToSearches(Collection items); - public A removeFromSearches(java.lang.String... items); - public A removeAllFromSearches(Collection items); - public List getSearches(); - public String getSearch(int index); - public String getFirstSearch(); - public String getLastSearch(); - public String getMatchingSearch(Predicate predicate); - public Boolean hasMatchingSearch(Predicate predicate); - public A withSearches(List searches); - public A withSearches(java.lang.String... searches); - public Boolean hasSearches(); - public interface OptionsNested extends Nested,V1PodDNSConfigOptionFluent>{ - public N and(); - public N endOption(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodDNSConfigFluent> extends BaseFluent{ + public V1PodDNSConfigFluent() { + } + + public V1PodDNSConfigFluent(V1PodDNSConfig instance) { + this.copyInstance(instance); + } + private List nameservers; + private ArrayList options; + private List searches; + + protected void copyInstance(V1PodDNSConfig instance) { + instance = (instance != null ? instance : new V1PodDNSConfig()); + if (instance != null) { + this.withNameservers(instance.getNameservers()); + this.withOptions(instance.getOptions()); + this.withSearches(instance.getSearches()); + } + } + + public A addToNameservers(int index,String item) { + if (this.nameservers == null) {this.nameservers = new ArrayList();} + this.nameservers.add(index, item); + return (A)this; + } + + public A setToNameservers(int index,String item) { + if (this.nameservers == null) {this.nameservers = new ArrayList();} + this.nameservers.set(index, item); return (A)this; + } + + public A addToNameservers(java.lang.String... items) { + if (this.nameservers == null) {this.nameservers = new ArrayList();} + for (String item : items) {this.nameservers.add(item);} return (A)this; + } + + public A addAllToNameservers(Collection items) { + if (this.nameservers == null) {this.nameservers = new ArrayList();} + for (String item : items) {this.nameservers.add(item);} return (A)this; + } + + public A removeFromNameservers(java.lang.String... items) { + if (this.nameservers == null) return (A)this; + for (String item : items) { this.nameservers.remove(item);} return (A)this; + } + + public A removeAllFromNameservers(Collection items) { + if (this.nameservers == null) return (A)this; + for (String item : items) { this.nameservers.remove(item);} return (A)this; + } + + public List getNameservers() { + return this.nameservers; + } + + public String getNameserver(int index) { + return this.nameservers.get(index); + } + + public String getFirstNameserver() { + return this.nameservers.get(0); + } + + public String getLastNameserver() { + return this.nameservers.get(nameservers.size() - 1); + } + + public String getMatchingNameserver(Predicate predicate) { + for (String item : nameservers) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingNameserver(Predicate predicate) { + for (String item : nameservers) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNameservers(List nameservers) { + if (nameservers != null) { + this.nameservers = new ArrayList(); + for (String item : nameservers) { + this.addToNameservers(item); + } + } else { + this.nameservers = null; + } + return (A) this; + } + + public A withNameservers(java.lang.String... nameservers) { + if (this.nameservers != null) { + this.nameservers.clear(); + _visitables.remove("nameservers"); + } + if (nameservers != null) { + for (String item : nameservers) { + this.addToNameservers(item); + } + } + return (A) this; + } + + public boolean hasNameservers() { + return this.nameservers != null && !this.nameservers.isEmpty(); + } + + public A addToOptions(int index,V1PodDNSConfigOption item) { + if (this.options == null) {this.options = new ArrayList();} + V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item); + if (index < 0 || index >= options.size()) { _visitables.get("options").add(builder); options.add(builder); } else { _visitables.get("options").add(index, builder); options.add(index, builder);} + return (A)this; + } + + public A setToOptions(int index,V1PodDNSConfigOption item) { + if (this.options == null) {this.options = new ArrayList();} + V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item); + if (index < 0 || index >= options.size()) { _visitables.get("options").add(builder); options.add(builder); } else { _visitables.get("options").set(index, builder); options.set(index, builder);} + return (A)this; + } + + public A addToOptions(io.kubernetes.client.openapi.models.V1PodDNSConfigOption... items) { + if (this.options == null) {this.options = new ArrayList();} + for (V1PodDNSConfigOption item : items) {V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item);_visitables.get("options").add(builder);this.options.add(builder);} return (A)this; + } + + public A addAllToOptions(Collection items) { + if (this.options == null) {this.options = new ArrayList();} + for (V1PodDNSConfigOption item : items) {V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item);_visitables.get("options").add(builder);this.options.add(builder);} return (A)this; + } + + public A removeFromOptions(io.kubernetes.client.openapi.models.V1PodDNSConfigOption... items) { + if (this.options == null) return (A)this; + for (V1PodDNSConfigOption item : items) {V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item);_visitables.get("options").remove(builder); this.options.remove(builder);} return (A)this; + } + + public A removeAllFromOptions(Collection items) { + if (this.options == null) return (A)this; + for (V1PodDNSConfigOption item : items) {V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item);_visitables.get("options").remove(builder); this.options.remove(builder);} return (A)this; + } + + public A removeMatchingFromOptions(Predicate predicate) { + if (options == null) return (A) this; + final Iterator each = options.iterator(); + final List visitables = _visitables.get("options"); + while (each.hasNext()) { + V1PodDNSConfigOptionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildOptions() { + return this.options != null ? build(options) : null; + } + + public V1PodDNSConfigOption buildOption(int index) { + return this.options.get(index).build(); + } + + public V1PodDNSConfigOption buildFirstOption() { + return this.options.get(0).build(); + } + + public V1PodDNSConfigOption buildLastOption() { + return this.options.get(options.size() - 1).build(); + } + + public V1PodDNSConfigOption buildMatchingOption(Predicate predicate) { + for (V1PodDNSConfigOptionBuilder item : options) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingOption(Predicate predicate) { + for (V1PodDNSConfigOptionBuilder item : options) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withOptions(List options) { + if (this.options != null) { + this._visitables.get("options").clear(); + } + if (options != null) { + this.options = new ArrayList(); + for (V1PodDNSConfigOption item : options) { + this.addToOptions(item); + } + } else { + this.options = null; + } + return (A) this; + } + + public A withOptions(io.kubernetes.client.openapi.models.V1PodDNSConfigOption... options) { + if (this.options != null) { + this.options.clear(); + _visitables.remove("options"); + } + if (options != null) { + for (V1PodDNSConfigOption item : options) { + this.addToOptions(item); + } + } + return (A) this; + } + + public boolean hasOptions() { + return this.options != null && !this.options.isEmpty(); + } + + public OptionsNested addNewOption() { + return new OptionsNested(-1, null); + } + + public OptionsNested addNewOptionLike(V1PodDNSConfigOption item) { + return new OptionsNested(-1, item); + } + + public OptionsNested setNewOptionLike(int index,V1PodDNSConfigOption item) { + return new OptionsNested(index, item); + } + + public OptionsNested editOption(int index) { + if (options.size() <= index) throw new RuntimeException("Can't edit options. Index exceeds size."); + return setNewOptionLike(index, buildOption(index)); + } + + public OptionsNested editFirstOption() { + if (options.size() == 0) throw new RuntimeException("Can't edit first options. The list is empty."); + return setNewOptionLike(0, buildOption(0)); + } + + public OptionsNested editLastOption() { + int index = options.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last options. The list is empty."); + return setNewOptionLike(index, buildOption(index)); + } + + public OptionsNested editMatchingOption(Predicate predicate) { + int index = -1; + for (int i=0;i();} + this.searches.add(index, item); + return (A)this; + } + + public A setToSearches(int index,String item) { + if (this.searches == null) {this.searches = new ArrayList();} + this.searches.set(index, item); return (A)this; + } + + public A addToSearches(java.lang.String... items) { + if (this.searches == null) {this.searches = new ArrayList();} + for (String item : items) {this.searches.add(item);} return (A)this; + } + + public A addAllToSearches(Collection items) { + if (this.searches == null) {this.searches = new ArrayList();} + for (String item : items) {this.searches.add(item);} return (A)this; + } + + public A removeFromSearches(java.lang.String... items) { + if (this.searches == null) return (A)this; + for (String item : items) { this.searches.remove(item);} return (A)this; + } + + public A removeAllFromSearches(Collection items) { + if (this.searches == null) return (A)this; + for (String item : items) { this.searches.remove(item);} return (A)this; + } + + public List getSearches() { + return this.searches; + } + + public String getSearch(int index) { + return this.searches.get(index); + } + + public String getFirstSearch() { + return this.searches.get(0); + } + + public String getLastSearch() { + return this.searches.get(searches.size() - 1); + } + + public String getMatchingSearch(Predicate predicate) { + for (String item : searches) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingSearch(Predicate predicate) { + for (String item : searches) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSearches(List searches) { + if (searches != null) { + this.searches = new ArrayList(); + for (String item : searches) { + this.addToSearches(item); + } + } else { + this.searches = null; + } + return (A) this; + } + + public A withSearches(java.lang.String... searches) { + if (this.searches != null) { + this.searches.clear(); + _visitables.remove("searches"); + } + if (searches != null) { + for (String item : searches) { + this.addToSearches(item); + } + } + return (A) this; + } + + public boolean hasSearches() { + return this.searches != null && !this.searches.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodDNSConfigFluent that = (V1PodDNSConfigFluent) o; + if (!java.util.Objects.equals(nameservers, that.nameservers)) return false; + if (!java.util.Objects.equals(options, that.options)) return false; + if (!java.util.Objects.equals(searches, that.searches)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(nameservers, options, searches, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (nameservers != null && !nameservers.isEmpty()) { sb.append("nameservers:"); sb.append(nameservers + ","); } + if (options != null && !options.isEmpty()) { sb.append("options:"); sb.append(options + ","); } + if (searches != null && !searches.isEmpty()) { sb.append("searches:"); sb.append(searches); } + sb.append("}"); + return sb.toString(); + } + public class OptionsNested extends V1PodDNSConfigOptionFluent> implements Nested{ + OptionsNested(int index,V1PodDNSConfigOption item) { + this.index = index; + this.builder = new V1PodDNSConfigOptionBuilder(this, item); + } + V1PodDNSConfigOptionBuilder builder; + int index; + + public N and() { + return (N) V1PodDNSConfigFluent.this.setToOptions(index,builder.build()); + } + + public N endOption() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigFluentImpl.java deleted file mode 100644 index 47910dedb1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigFluentImpl.java +++ /dev/null @@ -1,288 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodDNSConfigFluentImpl> extends BaseFluent implements V1PodDNSConfigFluent{ - public V1PodDNSConfigFluentImpl() { - } - public V1PodDNSConfigFluentImpl(V1PodDNSConfig instance) { - if (instance != null) { - this.withNameservers(instance.getNameservers()); - this.withOptions(instance.getOptions()); - this.withSearches(instance.getSearches()); - } - } - private List nameservers; - private ArrayList options; - private List searches; - public A addToNameservers(int index,String item) { - if (this.nameservers == null) {this.nameservers = new ArrayList();} - this.nameservers.add(index, item); - return (A)this; - } - public A setToNameservers(int index,String item) { - if (this.nameservers == null) {this.nameservers = new ArrayList();} - this.nameservers.set(index, item); return (A)this; - } - public A addToNameservers(java.lang.String... items) { - if (this.nameservers == null) {this.nameservers = new ArrayList();} - for (String item : items) {this.nameservers.add(item);} return (A)this; - } - public A addAllToNameservers(Collection items) { - if (this.nameservers == null) {this.nameservers = new ArrayList();} - for (String item : items) {this.nameservers.add(item);} return (A)this; - } - public A removeFromNameservers(java.lang.String... items) { - for (String item : items) {if (this.nameservers!= null){ this.nameservers.remove(item);}} return (A)this; - } - public A removeAllFromNameservers(Collection items) { - for (String item : items) {if (this.nameservers!= null){ this.nameservers.remove(item);}} return (A)this; - } - public List getNameservers() { - return this.nameservers; - } - public String getNameserver(int index) { - return this.nameservers.get(index); - } - public String getFirstNameserver() { - return this.nameservers.get(0); - } - public String getLastNameserver() { - return this.nameservers.get(nameservers.size() - 1); - } - public String getMatchingNameserver(Predicate predicate) { - for (String item: nameservers) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingNameserver(Predicate predicate) { - for (String item: nameservers) { if(predicate.test(item)){ return true;} } return false; - } - public A withNameservers(List nameservers) { - if (nameservers != null) {this.nameservers = new ArrayList(); for (String item : nameservers){this.addToNameservers(item);}} else { this.nameservers = null;} return (A) this; - } - public A withNameservers(java.lang.String... nameservers) { - if (this.nameservers != null) {this.nameservers.clear(); _visitables.remove("nameservers"); } - if (nameservers != null) {for (String item :nameservers){ this.addToNameservers(item);}} return (A) this; - } - public Boolean hasNameservers() { - return nameservers != null && !nameservers.isEmpty(); - } - public A addToOptions(int index,V1PodDNSConfigOption item) { - if (this.options == null) {this.options = new ArrayList();} - V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item); - if (index < 0 || index >= options.size()) { _visitables.get("options").add(builder); options.add(builder); } else { _visitables.get("options").add(index, builder); options.add(index, builder);} - return (A)this; - } - public A setToOptions(int index,V1PodDNSConfigOption item) { - if (this.options == null) {this.options = new ArrayList();} - V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item); - if (index < 0 || index >= options.size()) { _visitables.get("options").add(builder); options.add(builder); } else { _visitables.get("options").set(index, builder); options.set(index, builder);} - return (A)this; - } - public A addToOptions(io.kubernetes.client.openapi.models.V1PodDNSConfigOption... items) { - if (this.options == null) {this.options = new ArrayList();} - for (V1PodDNSConfigOption item : items) {V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item);_visitables.get("options").add(builder);this.options.add(builder);} return (A)this; - } - public A addAllToOptions(Collection items) { - if (this.options == null) {this.options = new ArrayList();} - for (V1PodDNSConfigOption item : items) {V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item);_visitables.get("options").add(builder);this.options.add(builder);} return (A)this; - } - public A removeFromOptions(io.kubernetes.client.openapi.models.V1PodDNSConfigOption... items) { - for (V1PodDNSConfigOption item : items) {V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item);_visitables.get("options").remove(builder);if (this.options != null) {this.options.remove(builder);}} return (A)this; - } - public A removeAllFromOptions(Collection items) { - for (V1PodDNSConfigOption item : items) {V1PodDNSConfigOptionBuilder builder = new V1PodDNSConfigOptionBuilder(item);_visitables.get("options").remove(builder);if (this.options != null) {this.options.remove(builder);}} return (A)this; - } - public A removeMatchingFromOptions(Predicate predicate) { - if (options == null) return (A) this; - final Iterator each = options.iterator(); - final List visitables = _visitables.get("options"); - while (each.hasNext()) { - V1PodDNSConfigOptionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildOptions instead. - * @return The buildable object. - */ - @Deprecated - public List getOptions() { - return options != null ? build(options) : null; - } - public List buildOptions() { - return options != null ? build(options) : null; - } - public V1PodDNSConfigOption buildOption(int index) { - return this.options.get(index).build(); - } - public V1PodDNSConfigOption buildFirstOption() { - return this.options.get(0).build(); - } - public V1PodDNSConfigOption buildLastOption() { - return this.options.get(options.size() - 1).build(); - } - public V1PodDNSConfigOption buildMatchingOption(Predicate predicate) { - for (V1PodDNSConfigOptionBuilder item: options) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingOption(Predicate predicate) { - for (V1PodDNSConfigOptionBuilder item: options) { if(predicate.test(item)){ return true;} } return false; - } - public A withOptions(List options) { - if (this.options != null) { _visitables.get("options").clear();} - if (options != null) {this.options = new ArrayList(); for (V1PodDNSConfigOption item : options){this.addToOptions(item);}} else { this.options = null;} return (A) this; - } - public A withOptions(io.kubernetes.client.openapi.models.V1PodDNSConfigOption... options) { - if (this.options != null) {this.options.clear(); _visitables.remove("options"); } - if (options != null) {for (V1PodDNSConfigOption item :options){ this.addToOptions(item);}} return (A) this; - } - public Boolean hasOptions() { - return options != null && !options.isEmpty(); - } - public V1PodDNSConfigFluentImpl.OptionsNested addNewOption() { - return new V1PodDNSConfigFluentImpl.OptionsNestedImpl(); - } - public V1PodDNSConfigFluentImpl.OptionsNested addNewOptionLike(V1PodDNSConfigOption item) { - return new V1PodDNSConfigFluentImpl.OptionsNestedImpl(-1, item); - } - public V1PodDNSConfigFluentImpl.OptionsNested setNewOptionLike(int index,V1PodDNSConfigOption item) { - return new V1PodDNSConfigFluentImpl.OptionsNestedImpl(index, item); - } - public V1PodDNSConfigFluentImpl.OptionsNested editOption(int index) { - if (options.size() <= index) throw new RuntimeException("Can't edit options. Index exceeds size."); - return setNewOptionLike(index, buildOption(index)); - } - public V1PodDNSConfigFluentImpl.OptionsNested editFirstOption() { - if (options.size() == 0) throw new RuntimeException("Can't edit first options. The list is empty."); - return setNewOptionLike(0, buildOption(0)); - } - public V1PodDNSConfigFluentImpl.OptionsNested editLastOption() { - int index = options.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last options. The list is empty."); - return setNewOptionLike(index, buildOption(index)); - } - public V1PodDNSConfigFluentImpl.OptionsNested editMatchingOption(Predicate predicate) { - int index = -1; - for (int i=0;i();} - this.searches.add(index, item); - return (A)this; - } - public A setToSearches(int index,String item) { - if (this.searches == null) {this.searches = new ArrayList();} - this.searches.set(index, item); return (A)this; - } - public A addToSearches(java.lang.String... items) { - if (this.searches == null) {this.searches = new ArrayList();} - for (String item : items) {this.searches.add(item);} return (A)this; - } - public A addAllToSearches(Collection items) { - if (this.searches == null) {this.searches = new ArrayList();} - for (String item : items) {this.searches.add(item);} return (A)this; - } - public A removeFromSearches(java.lang.String... items) { - for (String item : items) {if (this.searches!= null){ this.searches.remove(item);}} return (A)this; - } - public A removeAllFromSearches(Collection items) { - for (String item : items) {if (this.searches!= null){ this.searches.remove(item);}} return (A)this; - } - public List getSearches() { - return this.searches; - } - public String getSearch(int index) { - return this.searches.get(index); - } - public String getFirstSearch() { - return this.searches.get(0); - } - public String getLastSearch() { - return this.searches.get(searches.size() - 1); - } - public String getMatchingSearch(Predicate predicate) { - for (String item: searches) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingSearch(Predicate predicate) { - for (String item: searches) { if(predicate.test(item)){ return true;} } return false; - } - public A withSearches(List searches) { - if (searches != null) {this.searches = new ArrayList(); for (String item : searches){this.addToSearches(item);}} else { this.searches = null;} return (A) this; - } - public A withSearches(java.lang.String... searches) { - if (this.searches != null) {this.searches.clear(); _visitables.remove("searches"); } - if (searches != null) {for (String item :searches){ this.addToSearches(item);}} return (A) this; - } - public Boolean hasSearches() { - return searches != null && !searches.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodDNSConfigFluentImpl that = (V1PodDNSConfigFluentImpl) o; - if (!java.util.Objects.equals(nameservers, that.nameservers)) return false; - - if (!java.util.Objects.equals(options, that.options)) return false; - - if (!java.util.Objects.equals(searches, that.searches)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(nameservers, options, searches, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (nameservers != null && !nameservers.isEmpty()) { sb.append("nameservers:"); sb.append(nameservers + ","); } - if (options != null) { sb.append("options:"); sb.append(options + ","); } - if (searches != null && !searches.isEmpty()) { sb.append("searches:"); sb.append(searches); } - sb.append("}"); - return sb.toString(); - } - class OptionsNestedImpl extends V1PodDNSConfigOptionFluentImpl> implements V1PodDNSConfigFluentImpl.OptionsNested,Nested{ - OptionsNestedImpl(int index,V1PodDNSConfigOption item) { - this.index = index; - this.builder = new V1PodDNSConfigOptionBuilder(this, item); - } - OptionsNestedImpl() { - this.index = -1; - this.builder = new V1PodDNSConfigOptionBuilder(this); - } - V1PodDNSConfigOptionBuilder builder; - int index; - public N and() { - return (N) V1PodDNSConfigFluentImpl.this.setToOptions(index,builder.build()); - } - public N endOption() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionBuilder.java index 662b3e393d..079610d519 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodDNSConfigOptionBuilder extends V1PodDNSConfigOptionFluentImpl implements VisitableBuilder{ +public class V1PodDNSConfigOptionBuilder extends V1PodDNSConfigOptionFluent implements VisitableBuilder{ public V1PodDNSConfigOptionBuilder() { - this(false); - } - public V1PodDNSConfigOptionBuilder(Boolean validationEnabled) { - this(new V1PodDNSConfigOption(), validationEnabled); + this(new V1PodDNSConfigOption()); } + public V1PodDNSConfigOptionBuilder(V1PodDNSConfigOptionFluent fluent) { - this(fluent, false); - } - public V1PodDNSConfigOptionBuilder(V1PodDNSConfigOptionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodDNSConfigOption(), validationEnabled); + this(fluent, new V1PodDNSConfigOption()); } + public V1PodDNSConfigOptionBuilder(V1PodDNSConfigOptionFluent fluent,V1PodDNSConfigOption instance) { - this(fluent, instance, false); - } - public V1PodDNSConfigOptionBuilder(V1PodDNSConfigOptionFluent fluent,V1PodDNSConfigOption instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodDNSConfigOptionBuilder(V1PodDNSConfigOption instance) { - this(instance,false); - } - public V1PodDNSConfigOptionBuilder(V1PodDNSConfigOption instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodDNSConfigOptionFluent fluent; - Boolean validationEnabled; + public V1PodDNSConfigOption build() { V1PodDNSConfigOption buildable = new V1PodDNSConfigOption(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1PodDNSConfigOption build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionFluent.java index d14c6cbafd..529619f733 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodDNSConfigOptionFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getValue(); - public A withValue(String value); - public Boolean hasValue(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodDNSConfigOptionFluent> extends BaseFluent{ + public V1PodDNSConfigOptionFluent() { + } + public V1PodDNSConfigOptionFluent(V1PodDNSConfigOption instance) { + this.copyInstance(instance); + } + private String name; + private String value; + + protected void copyInstance(V1PodDNSConfigOption instance) { + instance = (instance != null ? instance : new V1PodDNSConfigOption()); + if (instance != null) { + this.withName(instance.getName()); + this.withValue(instance.getValue()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getValue() { + return this.value; + } + + public A withValue(String value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodDNSConfigOptionFluent that = (V1PodDNSConfigOptionFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, value, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (value != null) { sb.append("value:"); sb.append(value); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionFluentImpl.java deleted file mode 100644 index 1e4158cd01..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDNSConfigOptionFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodDNSConfigOptionFluentImpl> extends BaseFluent implements V1PodDNSConfigOptionFluent{ - public V1PodDNSConfigOptionFluentImpl() { - } - public V1PodDNSConfigOptionFluentImpl(V1PodDNSConfigOption instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withValue(instance.getValue()); - } - } - private String name; - private String value; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getValue() { - return this.value; - } - public A withValue(String value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodDNSConfigOptionFluentImpl that = (V1PodDNSConfigOptionFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, value, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (value != null) { sb.append("value:"); sb.append(value); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetBuilder.java index f99bedd14a..9eec3ce9d6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodDisruptionBudgetBuilder extends V1PodDisruptionBudgetFluentImpl implements VisitableBuilder{ +public class V1PodDisruptionBudgetBuilder extends V1PodDisruptionBudgetFluent implements VisitableBuilder{ public V1PodDisruptionBudgetBuilder() { - this(false); - } - public V1PodDisruptionBudgetBuilder(Boolean validationEnabled) { - this(new V1PodDisruptionBudget(), validationEnabled); + this(new V1PodDisruptionBudget()); } + public V1PodDisruptionBudgetBuilder(V1PodDisruptionBudgetFluent fluent) { - this(fluent, false); - } - public V1PodDisruptionBudgetBuilder(V1PodDisruptionBudgetFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodDisruptionBudget(), validationEnabled); + this(fluent, new V1PodDisruptionBudget()); } + public V1PodDisruptionBudgetBuilder(V1PodDisruptionBudgetFluent fluent,V1PodDisruptionBudget instance) { - this(fluent, instance, false); - } - public V1PodDisruptionBudgetBuilder(V1PodDisruptionBudgetFluent fluent,V1PodDisruptionBudget instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodDisruptionBudgetBuilder(V1PodDisruptionBudget instance) { - this(instance,false); - } - public V1PodDisruptionBudgetBuilder(V1PodDisruptionBudget instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodDisruptionBudgetFluent fluent; - Boolean validationEnabled; + public V1PodDisruptionBudget build() { V1PodDisruptionBudget buildable = new V1PodDisruptionBudget(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetFluent.java index 656a47bba6..50c80eb8dc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1PodDisruptionBudgetFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1PodDisruptionBudgetFluent.MetadataNested withNewMetadata(); - public V1PodDisruptionBudgetFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1PodDisruptionBudgetFluent.MetadataNested editMetadata(); - public V1PodDisruptionBudgetFluent.MetadataNested editOrNewMetadata(); - public V1PodDisruptionBudgetFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PodDisruptionBudgetSpec getSpec(); - public V1PodDisruptionBudgetSpec buildSpec(); - public A withSpec(V1PodDisruptionBudgetSpec spec); - public Boolean hasSpec(); - public V1PodDisruptionBudgetFluent.SpecNested withNewSpec(); - public V1PodDisruptionBudgetFluent.SpecNested withNewSpecLike(V1PodDisruptionBudgetSpec item); - public V1PodDisruptionBudgetFluent.SpecNested editSpec(); - public V1PodDisruptionBudgetFluent.SpecNested editOrNewSpec(); - public V1PodDisruptionBudgetFluent.SpecNested editOrNewSpecLike(V1PodDisruptionBudgetSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1PodDisruptionBudgetStatus getStatus(); - public V1PodDisruptionBudgetStatus buildStatus(); - public A withStatus(V1PodDisruptionBudgetStatus status); - public Boolean hasStatus(); - public V1PodDisruptionBudgetFluent.StatusNested withNewStatus(); - public V1PodDisruptionBudgetFluent.StatusNested withNewStatusLike(V1PodDisruptionBudgetStatus item); - public V1PodDisruptionBudgetFluent.StatusNested editStatus(); - public V1PodDisruptionBudgetFluent.StatusNested editOrNewStatus(); - public V1PodDisruptionBudgetFluent.StatusNested editOrNewStatusLike(V1PodDisruptionBudgetStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodDisruptionBudgetFluent> extends BaseFluent{ + public V1PodDisruptionBudgetFluent() { + } + + public V1PodDisruptionBudgetFluent(V1PodDisruptionBudget instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1PodDisruptionBudgetSpecBuilder spec; + private V1PodDisruptionBudgetStatusBuilder status; + + protected void copyInstance(V1PodDisruptionBudget instance) { + instance = (instance != null ? instance : new V1PodDisruptionBudget()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1PodDisruptionBudgetSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1PodDisruptionBudgetSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1PodDisruptionBudgetSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1PodDisruptionBudgetSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1PodDisruptionBudgetSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1PodDisruptionBudgetSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1PodDisruptionBudgetSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1PodDisruptionBudgetStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1PodDisruptionBudgetStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1PodDisruptionBudgetStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1PodDisruptionBudgetStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1PodDisruptionBudgetStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1PodDisruptionBudgetStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodDisruptionBudgetFluent that = (V1PodDisruptionBudgetFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1PodDisruptionBudgetFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1PodDisruptionBudgetStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1PodDisruptionBudgetSpecFluent> implements Nested{ + SpecNested(V1PodDisruptionBudgetSpec item) { + this.builder = new V1PodDisruptionBudgetSpecBuilder(this, item); + } + V1PodDisruptionBudgetSpecBuilder builder; + + public N and() { + return (N) V1PodDisruptionBudgetFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1PodDisruptionBudgetStatusFluent> implements Nested{ + StatusNested(V1PodDisruptionBudgetStatus item) { + this.builder = new V1PodDisruptionBudgetStatusBuilder(this, item); + } + V1PodDisruptionBudgetStatusBuilder builder; + + public N and() { + return (N) V1PodDisruptionBudgetFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetFluentImpl.java deleted file mode 100644 index 2e66d01d62..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodDisruptionBudgetFluentImpl> extends BaseFluent implements V1PodDisruptionBudgetFluent{ - public V1PodDisruptionBudgetFluentImpl() { - } - public V1PodDisruptionBudgetFluentImpl(V1PodDisruptionBudget instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1PodDisruptionBudgetSpecBuilder spec; - private V1PodDisruptionBudgetStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1PodDisruptionBudgetFluentImpl.MetadataNested withNewMetadata() { - return new V1PodDisruptionBudgetFluentImpl.MetadataNestedImpl(); - } - public V1PodDisruptionBudgetFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1PodDisruptionBudgetFluentImpl.MetadataNestedImpl(item); - } - public V1PodDisruptionBudgetFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PodDisruptionBudgetFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1PodDisruptionBudgetFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PodDisruptionBudgetSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1PodDisruptionBudgetSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1PodDisruptionBudgetSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1PodDisruptionBudgetSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1PodDisruptionBudgetFluentImpl.SpecNested withNewSpec() { - return new V1PodDisruptionBudgetFluentImpl.SpecNestedImpl(); - } - public V1PodDisruptionBudgetFluentImpl.SpecNested withNewSpecLike(V1PodDisruptionBudgetSpec item) { - return new V1PodDisruptionBudgetFluentImpl.SpecNestedImpl(item); - } - public V1PodDisruptionBudgetFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1PodDisruptionBudgetFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1PodDisruptionBudgetSpecBuilder().build()); - } - public V1PodDisruptionBudgetFluentImpl.SpecNested editOrNewSpecLike(V1PodDisruptionBudgetSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1PodDisruptionBudgetStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1PodDisruptionBudgetStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1PodDisruptionBudgetStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1PodDisruptionBudgetStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1PodDisruptionBudgetFluentImpl.StatusNested withNewStatus() { - return new V1PodDisruptionBudgetFluentImpl.StatusNestedImpl(); - } - public V1PodDisruptionBudgetFluentImpl.StatusNested withNewStatusLike(V1PodDisruptionBudgetStatus item) { - return new V1PodDisruptionBudgetFluentImpl.StatusNestedImpl(item); - } - public V1PodDisruptionBudgetFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1PodDisruptionBudgetFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1PodDisruptionBudgetStatusBuilder().build()); - } - public V1PodDisruptionBudgetFluentImpl.StatusNested editOrNewStatusLike(V1PodDisruptionBudgetStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodDisruptionBudgetFluentImpl that = (V1PodDisruptionBudgetFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1PodDisruptionBudgetFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1PodDisruptionBudgetFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1PodDisruptionBudgetSpecFluentImpl> implements V1PodDisruptionBudgetFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1PodDisruptionBudgetSpec item) { - this.builder = new V1PodDisruptionBudgetSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1PodDisruptionBudgetSpecBuilder(this); - } - V1PodDisruptionBudgetSpecBuilder builder; - public N and() { - return (N) V1PodDisruptionBudgetFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1PodDisruptionBudgetStatusFluentImpl> implements V1PodDisruptionBudgetFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1PodDisruptionBudgetStatus item) { - this.builder = new V1PodDisruptionBudgetStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1PodDisruptionBudgetStatusBuilder(this); - } - V1PodDisruptionBudgetStatusBuilder builder; - public N and() { - return (N) V1PodDisruptionBudgetFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListBuilder.java index 4e1cf04516..979c3504e5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodDisruptionBudgetListBuilder extends V1PodDisruptionBudgetListFluentImpl implements VisitableBuilder{ +public class V1PodDisruptionBudgetListBuilder extends V1PodDisruptionBudgetListFluent implements VisitableBuilder{ public V1PodDisruptionBudgetListBuilder() { - this(false); - } - public V1PodDisruptionBudgetListBuilder(Boolean validationEnabled) { - this(new V1PodDisruptionBudgetList(), validationEnabled); + this(new V1PodDisruptionBudgetList()); } + public V1PodDisruptionBudgetListBuilder(V1PodDisruptionBudgetListFluent fluent) { - this(fluent, false); - } - public V1PodDisruptionBudgetListBuilder(V1PodDisruptionBudgetListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodDisruptionBudgetList(), validationEnabled); + this(fluent, new V1PodDisruptionBudgetList()); } + public V1PodDisruptionBudgetListBuilder(V1PodDisruptionBudgetListFluent fluent,V1PodDisruptionBudgetList instance) { - this(fluent, instance, false); - } - public V1PodDisruptionBudgetListBuilder(V1PodDisruptionBudgetListFluent fluent,V1PodDisruptionBudgetList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodDisruptionBudgetListBuilder(V1PodDisruptionBudgetList instance) { - this(instance,false); - } - public V1PodDisruptionBudgetListBuilder(V1PodDisruptionBudgetList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodDisruptionBudgetListFluent fluent; - Boolean validationEnabled; + public V1PodDisruptionBudgetList build() { V1PodDisruptionBudgetList buildable = new V1PodDisruptionBudgetList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListFluent.java index affb1029c1..5711f32244 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodDisruptionBudgetListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1PodDisruptionBudget item); - public A setToItems(int index,V1PodDisruptionBudget item); - public A addToItems(io.kubernetes.client.openapi.models.V1PodDisruptionBudget... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1PodDisruptionBudget... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1PodDisruptionBudget buildItem(int index); - public V1PodDisruptionBudget buildFirstItem(); - public V1PodDisruptionBudget buildLastItem(); - public V1PodDisruptionBudget buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1PodDisruptionBudget... items); - public Boolean hasItems(); - public V1PodDisruptionBudgetListFluent.ItemsNested addNewItem(); - public V1PodDisruptionBudgetListFluent.ItemsNested addNewItemLike(V1PodDisruptionBudget item); - public V1PodDisruptionBudgetListFluent.ItemsNested setNewItemLike(int index,V1PodDisruptionBudget item); - public V1PodDisruptionBudgetListFluent.ItemsNested editItem(int index); - public V1PodDisruptionBudgetListFluent.ItemsNested editFirstItem(); - public V1PodDisruptionBudgetListFluent.ItemsNested editLastItem(); - public V1PodDisruptionBudgetListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1PodDisruptionBudgetListFluent.MetadataNested withNewMetadata(); - public V1PodDisruptionBudgetListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1PodDisruptionBudgetListFluent.MetadataNested editMetadata(); - public V1PodDisruptionBudgetListFluent.MetadataNested editOrNewMetadata(); - public V1PodDisruptionBudgetListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1PodDisruptionBudgetFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodDisruptionBudgetListFluent> extends BaseFluent{ + public V1PodDisruptionBudgetListFluent() { + } + + public V1PodDisruptionBudgetListFluent(V1PodDisruptionBudgetList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1PodDisruptionBudgetList instance) { + instance = (instance != null ? instance : new V1PodDisruptionBudgetList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1PodDisruptionBudget item) { + if (this.items == null) {this.items = new ArrayList();} + V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1PodDisruptionBudget item) { + if (this.items == null) {this.items = new ArrayList();} + V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1PodDisruptionBudget... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PodDisruptionBudget item : items) {V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PodDisruptionBudget item : items) {V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1PodDisruptionBudget... items) { + if (this.items == null) return (A)this; + for (V1PodDisruptionBudget item : items) {V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1PodDisruptionBudget item : items) {V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1PodDisruptionBudgetBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1PodDisruptionBudget buildItem(int index) { + return this.items.get(index).build(); + } + + public V1PodDisruptionBudget buildFirstItem() { + return this.items.get(0).build(); + } + + public V1PodDisruptionBudget buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1PodDisruptionBudget buildMatchingItem(Predicate predicate) { + for (V1PodDisruptionBudgetBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1PodDisruptionBudgetBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1PodDisruptionBudget item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1PodDisruptionBudget... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1PodDisruptionBudget item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1PodDisruptionBudget item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1PodDisruptionBudget item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodDisruptionBudgetListFluent that = (V1PodDisruptionBudgetListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1PodDisruptionBudgetFluent> implements Nested{ + ItemsNested(int index,V1PodDisruptionBudget item) { + this.index = index; + this.builder = new V1PodDisruptionBudgetBuilder(this, item); + } + V1PodDisruptionBudgetBuilder builder; + int index; + public N and() { + return (N) V1PodDisruptionBudgetListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1PodDisruptionBudgetListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListFluentImpl.java deleted file mode 100644 index 3bb9499c79..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodDisruptionBudgetListFluentImpl> extends BaseFluent implements V1PodDisruptionBudgetListFluent{ - public V1PodDisruptionBudgetListFluentImpl() { - } - public V1PodDisruptionBudgetListFluentImpl(V1PodDisruptionBudgetList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1PodDisruptionBudget item) { - if (this.items == null) {this.items = new ArrayList();} - V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1PodDisruptionBudget item) { - if (this.items == null) {this.items = new ArrayList();} - V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1PodDisruptionBudget... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PodDisruptionBudget item : items) {V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PodDisruptionBudget item : items) {V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1PodDisruptionBudget... items) { - for (V1PodDisruptionBudget item : items) {V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1PodDisruptionBudget item : items) {V1PodDisruptionBudgetBuilder builder = new V1PodDisruptionBudgetBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1PodDisruptionBudgetBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1PodDisruptionBudget buildItem(int index) { - return this.items.get(index).build(); - } - public V1PodDisruptionBudget buildFirstItem() { - return this.items.get(0).build(); - } - public V1PodDisruptionBudget buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1PodDisruptionBudget buildMatchingItem(Predicate predicate) { - for (V1PodDisruptionBudgetBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1PodDisruptionBudgetBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1PodDisruptionBudget item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1PodDisruptionBudget... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1PodDisruptionBudget item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1PodDisruptionBudgetListFluentImpl.ItemsNested addNewItem() { - return new V1PodDisruptionBudgetListFluentImpl.ItemsNestedImpl(); - } - public V1PodDisruptionBudgetListFluentImpl.ItemsNested addNewItemLike(V1PodDisruptionBudget item) { - return new V1PodDisruptionBudgetListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1PodDisruptionBudgetListFluentImpl.ItemsNested setNewItemLike(int index,V1PodDisruptionBudget item) { - return new V1PodDisruptionBudgetListFluentImpl.ItemsNestedImpl(index, item); - } - public V1PodDisruptionBudgetListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1PodDisruptionBudgetListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1PodDisruptionBudgetListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1PodDisruptionBudgetListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1PodDisruptionBudgetListFluentImpl.MetadataNestedImpl(); - } - public V1PodDisruptionBudgetListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1PodDisruptionBudgetListFluentImpl.MetadataNestedImpl(item); - } - public V1PodDisruptionBudgetListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PodDisruptionBudgetListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1PodDisruptionBudgetListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodDisruptionBudgetListFluentImpl that = (V1PodDisruptionBudgetListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1PodDisruptionBudgetFluentImpl> implements V1PodDisruptionBudgetListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1PodDisruptionBudget item) { - this.index = index; - this.builder = new V1PodDisruptionBudgetBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1PodDisruptionBudgetBuilder(this); - } - V1PodDisruptionBudgetBuilder builder; - int index; - public N and() { - return (N) V1PodDisruptionBudgetListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1PodDisruptionBudgetListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1PodDisruptionBudgetListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecBuilder.java index 1e8c5ad8a5..0f9bf75e0a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodDisruptionBudgetSpecBuilder extends V1PodDisruptionBudgetSpecFluentImpl implements VisitableBuilder{ +public class V1PodDisruptionBudgetSpecBuilder extends V1PodDisruptionBudgetSpecFluent implements VisitableBuilder{ public V1PodDisruptionBudgetSpecBuilder() { - this(false); - } - public V1PodDisruptionBudgetSpecBuilder(Boolean validationEnabled) { - this(new V1PodDisruptionBudgetSpec(), validationEnabled); + this(new V1PodDisruptionBudgetSpec()); } + public V1PodDisruptionBudgetSpecBuilder(V1PodDisruptionBudgetSpecFluent fluent) { - this(fluent, false); - } - public V1PodDisruptionBudgetSpecBuilder(V1PodDisruptionBudgetSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodDisruptionBudgetSpec(), validationEnabled); + this(fluent, new V1PodDisruptionBudgetSpec()); } + public V1PodDisruptionBudgetSpecBuilder(V1PodDisruptionBudgetSpecFluent fluent,V1PodDisruptionBudgetSpec instance) { - this(fluent, instance, false); - } - public V1PodDisruptionBudgetSpecBuilder(V1PodDisruptionBudgetSpecFluent fluent,V1PodDisruptionBudgetSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMaxUnavailable(instance.getMaxUnavailable()); - fluent.withMinAvailable(instance.getMinAvailable()); - fluent.withSelector(instance.getSelector()); - fluent.withUnhealthyPodEvictionPolicy(instance.getUnhealthyPodEvictionPolicy()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodDisruptionBudgetSpecBuilder(V1PodDisruptionBudgetSpec instance) { - this(instance,false); - } - public V1PodDisruptionBudgetSpecBuilder(V1PodDisruptionBudgetSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMaxUnavailable(instance.getMaxUnavailable()); - this.withMinAvailable(instance.getMinAvailable()); - this.withSelector(instance.getSelector()); - this.withUnhealthyPodEvictionPolicy(instance.getUnhealthyPodEvictionPolicy()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodDisruptionBudgetSpecFluent fluent; - Boolean validationEnabled; + public V1PodDisruptionBudgetSpec build() { V1PodDisruptionBudgetSpec buildable = new V1PodDisruptionBudgetSpec(); buildable.setMaxUnavailable(fluent.getMaxUnavailable()); buildable.setMinAvailable(fluent.getMinAvailable()); - buildable.setSelector(fluent.getSelector()); + buildable.setSelector(fluent.buildSelector()); buildable.setUnhealthyPodEvictionPolicy(fluent.getUnhealthyPodEvictionPolicy()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecFluent.java index 64571f805e..72d0121250 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecFluent.java @@ -1,49 +1,174 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; import io.kubernetes.client.custom.IntOrString; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1PodDisruptionBudgetSpecFluent> extends Fluent{ - public IntOrString getMaxUnavailable(); - public A withMaxUnavailable(IntOrString maxUnavailable); - public Boolean hasMaxUnavailable(); - public A withNewMaxUnavailable(int value); - public A withNewMaxUnavailable(String value); - public IntOrString getMinAvailable(); - public A withMinAvailable(IntOrString minAvailable); - public Boolean hasMinAvailable(); - public A withNewMinAvailable(int value); - public A withNewMinAvailable(String value); - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector(); - public V1LabelSelector buildSelector(); - public A withSelector(V1LabelSelector selector); - public Boolean hasSelector(); - public V1PodDisruptionBudgetSpecFluent.SelectorNested withNewSelector(); - public V1PodDisruptionBudgetSpecFluent.SelectorNested withNewSelectorLike(V1LabelSelector item); - public V1PodDisruptionBudgetSpecFluent.SelectorNested editSelector(); - public V1PodDisruptionBudgetSpecFluent.SelectorNested editOrNewSelector(); - public V1PodDisruptionBudgetSpecFluent.SelectorNested editOrNewSelectorLike(V1LabelSelector item); - public String getUnhealthyPodEvictionPolicy(); - public A withUnhealthyPodEvictionPolicy(String unhealthyPodEvictionPolicy); - public Boolean hasUnhealthyPodEvictionPolicy(); - public interface SelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodDisruptionBudgetSpecFluent> extends BaseFluent{ + public V1PodDisruptionBudgetSpecFluent() { + } + + public V1PodDisruptionBudgetSpecFluent(V1PodDisruptionBudgetSpec instance) { + this.copyInstance(instance); + } + private IntOrString maxUnavailable; + private IntOrString minAvailable; + private V1LabelSelectorBuilder selector; + private String unhealthyPodEvictionPolicy; + + protected void copyInstance(V1PodDisruptionBudgetSpec instance) { + instance = (instance != null ? instance : new V1PodDisruptionBudgetSpec()); + if (instance != null) { + this.withMaxUnavailable(instance.getMaxUnavailable()); + this.withMinAvailable(instance.getMinAvailable()); + this.withSelector(instance.getSelector()); + this.withUnhealthyPodEvictionPolicy(instance.getUnhealthyPodEvictionPolicy()); + } + } + + public IntOrString getMaxUnavailable() { + return this.maxUnavailable; + } + + public A withMaxUnavailable(IntOrString maxUnavailable) { + this.maxUnavailable = maxUnavailable; + return (A) this; + } + + public boolean hasMaxUnavailable() { + return this.maxUnavailable != null; + } + + public A withNewMaxUnavailable(int value) { + return (A)withMaxUnavailable(new IntOrString(value)); + } + + public A withNewMaxUnavailable(String value) { + return (A)withMaxUnavailable(new IntOrString(value)); + } + + public IntOrString getMinAvailable() { + return this.minAvailable; + } + + public A withMinAvailable(IntOrString minAvailable) { + this.minAvailable = minAvailable; + return (A) this; + } + + public boolean hasMinAvailable() { + return this.minAvailable != null; + } + + public A withNewMinAvailable(int value) { + return (A)withMinAvailable(new IntOrString(value)); + } + + public A withNewMinAvailable(String value) { + return (A)withMinAvailable(new IntOrString(value)); + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; } + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); + } + + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); + } + + public String getUnhealthyPodEvictionPolicy() { + return this.unhealthyPodEvictionPolicy; + } + + public A withUnhealthyPodEvictionPolicy(String unhealthyPodEvictionPolicy) { + this.unhealthyPodEvictionPolicy = unhealthyPodEvictionPolicy; + return (A) this; + } + + public boolean hasUnhealthyPodEvictionPolicy() { + return this.unhealthyPodEvictionPolicy != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodDisruptionBudgetSpecFluent that = (V1PodDisruptionBudgetSpecFluent) o; + if (!java.util.Objects.equals(maxUnavailable, that.maxUnavailable)) return false; + if (!java.util.Objects.equals(minAvailable, that.minAvailable)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + if (!java.util.Objects.equals(unhealthyPodEvictionPolicy, that.unhealthyPodEvictionPolicy)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(maxUnavailable, minAvailable, selector, unhealthyPodEvictionPolicy, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (maxUnavailable != null) { sb.append("maxUnavailable:"); sb.append(maxUnavailable + ","); } + if (minAvailable != null) { sb.append("minAvailable:"); sb.append(minAvailable + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } + if (unhealthyPodEvictionPolicy != null) { sb.append("unhealthyPodEvictionPolicy:"); sb.append(unhealthyPodEvictionPolicy); } + sb.append("}"); + return sb.toString(); + } + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1PodDisruptionBudgetSpecFluent.this.withSelector(builder.build()); + } + + public N endSelector() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecFluentImpl.java deleted file mode 100644 index 6f3e436370..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetSpecFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.custom.IntOrString; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodDisruptionBudgetSpecFluentImpl> extends BaseFluent implements V1PodDisruptionBudgetSpecFluent{ - public V1PodDisruptionBudgetSpecFluentImpl() { - } - public V1PodDisruptionBudgetSpecFluentImpl(V1PodDisruptionBudgetSpec instance) { - if (instance != null) { - this.withMaxUnavailable(instance.getMaxUnavailable()); - this.withMinAvailable(instance.getMinAvailable()); - this.withSelector(instance.getSelector()); - this.withUnhealthyPodEvictionPolicy(instance.getUnhealthyPodEvictionPolicy()); - } - } - private IntOrString maxUnavailable; - private IntOrString minAvailable; - private V1LabelSelectorBuilder selector; - private String unhealthyPodEvictionPolicy; - public IntOrString getMaxUnavailable() { - return this.maxUnavailable; - } - public A withMaxUnavailable(IntOrString maxUnavailable) { - this.maxUnavailable=maxUnavailable; return (A) this; - } - public Boolean hasMaxUnavailable() { - return this.maxUnavailable != null; - } - public A withNewMaxUnavailable(int value) { - return (A)withMaxUnavailable(new IntOrString(value)); - } - public A withNewMaxUnavailable(String value) { - return (A)withMaxUnavailable(new IntOrString(value)); - } - public IntOrString getMinAvailable() { - return this.minAvailable; - } - public A withMinAvailable(IntOrString minAvailable) { - this.minAvailable=minAvailable; return (A) this; - } - public Boolean hasMinAvailable() { - return this.minAvailable != null; - } - public A withNewMinAvailable(int value) { - return (A)withMinAvailable(new IntOrString(value)); - } - public A withNewMinAvailable(String value) { - return (A)withMinAvailable(new IntOrString(value)); - } - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector() { - return this.selector!=null ?this.selector.build():null; - } - public V1LabelSelector buildSelector() { - return this.selector!=null ?this.selector.build():null; - } - public A withSelector(V1LabelSelector selector) { - _visitables.get("selector").remove(this.selector); - if (selector!=null){ this.selector= new V1LabelSelectorBuilder(selector); _visitables.get("selector").add(this.selector);} else { this.selector = null; _visitables.get("selector").remove(this.selector); } return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public V1PodDisruptionBudgetSpecFluentImpl.SelectorNested withNewSelector() { - return new V1PodDisruptionBudgetSpecFluentImpl.SelectorNestedImpl(); - } - public V1PodDisruptionBudgetSpecFluentImpl.SelectorNested withNewSelectorLike(V1LabelSelector item) { - return new V1PodDisruptionBudgetSpecFluentImpl.SelectorNestedImpl(item); - } - public V1PodDisruptionBudgetSpecFluentImpl.SelectorNested editSelector() { - return withNewSelectorLike(getSelector()); - } - public V1PodDisruptionBudgetSpecFluentImpl.SelectorNested editOrNewSelector() { - return withNewSelectorLike(getSelector() != null ? getSelector(): new V1LabelSelectorBuilder().build()); - } - public V1PodDisruptionBudgetSpecFluentImpl.SelectorNested editOrNewSelectorLike(V1LabelSelector item) { - return withNewSelectorLike(getSelector() != null ? getSelector(): item); - } - public String getUnhealthyPodEvictionPolicy() { - return this.unhealthyPodEvictionPolicy; - } - public A withUnhealthyPodEvictionPolicy(String unhealthyPodEvictionPolicy) { - this.unhealthyPodEvictionPolicy=unhealthyPodEvictionPolicy; return (A) this; - } - public Boolean hasUnhealthyPodEvictionPolicy() { - return this.unhealthyPodEvictionPolicy != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodDisruptionBudgetSpecFluentImpl that = (V1PodDisruptionBudgetSpecFluentImpl) o; - if (!java.util.Objects.equals(maxUnavailable, that.maxUnavailable)) return false; - - if (!java.util.Objects.equals(minAvailable, that.minAvailable)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - if (!java.util.Objects.equals(unhealthyPodEvictionPolicy, that.unhealthyPodEvictionPolicy)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(maxUnavailable, minAvailable, selector, unhealthyPodEvictionPolicy, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (maxUnavailable != null) { sb.append("maxUnavailable:"); sb.append(maxUnavailable + ","); } - if (minAvailable != null) { sb.append("minAvailable:"); sb.append(minAvailable + ","); } - if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } - if (unhealthyPodEvictionPolicy != null) { sb.append("unhealthyPodEvictionPolicy:"); sb.append(unhealthyPodEvictionPolicy); } - sb.append("}"); - return sb.toString(); - } - class SelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1PodDisruptionBudgetSpecFluentImpl.SelectorNested,Nested{ - SelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - SelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1PodDisruptionBudgetSpecFluentImpl.this.withSelector(builder.build()); - } - public N endSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusBuilder.java index 4d17194b82..7791cd450f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusBuilder.java @@ -1,57 +1,29 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodDisruptionBudgetStatusBuilder extends V1PodDisruptionBudgetStatusFluentImpl implements VisitableBuilder{ +public class V1PodDisruptionBudgetStatusBuilder extends V1PodDisruptionBudgetStatusFluent implements VisitableBuilder{ public V1PodDisruptionBudgetStatusBuilder() { - this(false); - } - public V1PodDisruptionBudgetStatusBuilder(Boolean validationEnabled) { - this(new V1PodDisruptionBudgetStatus(), validationEnabled); + this(new V1PodDisruptionBudgetStatus()); } + public V1PodDisruptionBudgetStatusBuilder(V1PodDisruptionBudgetStatusFluent fluent) { - this(fluent, false); - } - public V1PodDisruptionBudgetStatusBuilder(V1PodDisruptionBudgetStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodDisruptionBudgetStatus(), validationEnabled); + this(fluent, new V1PodDisruptionBudgetStatus()); } + public V1PodDisruptionBudgetStatusBuilder(V1PodDisruptionBudgetStatusFluent fluent,V1PodDisruptionBudgetStatus instance) { - this(fluent, instance, false); - } - public V1PodDisruptionBudgetStatusBuilder(V1PodDisruptionBudgetStatusFluent fluent,V1PodDisruptionBudgetStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - fluent.withCurrentHealthy(instance.getCurrentHealthy()); - fluent.withDesiredHealthy(instance.getDesiredHealthy()); - fluent.withDisruptedPods(instance.getDisruptedPods()); - fluent.withDisruptionsAllowed(instance.getDisruptionsAllowed()); - fluent.withExpectedPods(instance.getExpectedPods()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodDisruptionBudgetStatusBuilder(V1PodDisruptionBudgetStatus instance) { - this(instance,false); - } - public V1PodDisruptionBudgetStatusBuilder(V1PodDisruptionBudgetStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withCurrentHealthy(instance.getCurrentHealthy()); - this.withDesiredHealthy(instance.getDesiredHealthy()); - this.withDisruptedPods(instance.getDisruptedPods()); - this.withDisruptionsAllowed(instance.getDisruptionsAllowed()); - this.withExpectedPods(instance.getExpectedPods()); - this.withObservedGeneration(instance.getObservedGeneration()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodDisruptionBudgetStatusFluent fluent; - Boolean validationEnabled; + public V1PodDisruptionBudgetStatus build() { V1PodDisruptionBudgetStatus buildable = new V1PodDisruptionBudgetStatus(); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setCurrentHealthy(fluent.getCurrentHealthy()); buildable.setDesiredHealthy(fluent.getDesiredHealthy()); buildable.setDisruptedPods(fluent.getDisruptedPods()); @@ -61,4 +33,5 @@ public V1PodDisruptionBudgetStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusFluent.java index 195932bb97..04a902e1b9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusFluent.java @@ -1,83 +1,356 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; import java.time.OffsetDateTime; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1PodDisruptionBudgetStatusFluent> extends Fluent{ - public A addToConditions(int index,V1Condition item); - public A setToConditions(int index,V1Condition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1Condition buildCondition(int index); - public V1Condition buildFirstCondition(); - public V1Condition buildLastCondition(); - public V1Condition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions); - public Boolean hasConditions(); - public V1PodDisruptionBudgetStatusFluent.ConditionsNested addNewCondition(); - public V1PodDisruptionBudgetStatusFluent.ConditionsNested addNewConditionLike(V1Condition item); - public V1PodDisruptionBudgetStatusFluent.ConditionsNested setNewConditionLike(int index,V1Condition item); - public V1PodDisruptionBudgetStatusFluent.ConditionsNested editCondition(int index); - public V1PodDisruptionBudgetStatusFluent.ConditionsNested editFirstCondition(); - public V1PodDisruptionBudgetStatusFluent.ConditionsNested editLastCondition(); - public V1PodDisruptionBudgetStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public Integer getCurrentHealthy(); - public A withCurrentHealthy(Integer currentHealthy); - public Boolean hasCurrentHealthy(); - public Integer getDesiredHealthy(); - public A withDesiredHealthy(Integer desiredHealthy); - public Boolean hasDesiredHealthy(); - public A addToDisruptedPods(String key,OffsetDateTime value); - public A addToDisruptedPods(Map map); - public A removeFromDisruptedPods(String key); - public A removeFromDisruptedPods(Map map); - public Map getDisruptedPods(); - public A withDisruptedPods(Map disruptedPods); - public Boolean hasDisruptedPods(); - public Integer getDisruptionsAllowed(); - public A withDisruptionsAllowed(Integer disruptionsAllowed); - public Boolean hasDisruptionsAllowed(); - public Integer getExpectedPods(); - public A withExpectedPods(Integer expectedPods); - public Boolean hasExpectedPods(); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - public interface ConditionsNested extends Nested,V1ConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodDisruptionBudgetStatusFluent> extends BaseFluent{ + public V1PodDisruptionBudgetStatusFluent() { + } + + public V1PodDisruptionBudgetStatusFluent(V1PodDisruptionBudgetStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + private Integer currentHealthy; + private Integer desiredHealthy; + private Map disruptedPods; + private Integer disruptionsAllowed; + private Integer expectedPods; + private Long observedGeneration; + + protected void copyInstance(V1PodDisruptionBudgetStatus instance) { + instance = (instance != null ? instance : new V1PodDisruptionBudgetStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + this.withCurrentHealthy(instance.getCurrentHealthy()); + this.withDesiredHealthy(instance.getDesiredHealthy()); + this.withDisruptedPods(instance.getDisruptedPods()); + this.withDisruptionsAllowed(instance.getDisruptionsAllowed()); + this.withExpectedPods(instance.getExpectedPods()); + this.withObservedGeneration(instance.getObservedGeneration()); + } + } + + public A addToConditions(int index,V1Condition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ConditionBuilder builder = new V1ConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1Condition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ConditionBuilder builder = new V1ConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items) { + if (this.conditions == null) return (A)this; + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1ConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1Condition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1Condition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1Condition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1Condition buildMatchingCondition(Predicate predicate) { + for (V1ConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1ConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1Condition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1Condition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1Condition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1Condition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i map) { + if(this.disruptedPods == null && map != null) { this.disruptedPods = new LinkedHashMap(); } + if(map != null) { this.disruptedPods.putAll(map);} return (A)this; + } + + public A removeFromDisruptedPods(String key) { + if(this.disruptedPods == null) { return (A) this; } + if(key != null && this.disruptedPods != null) {this.disruptedPods.remove(key);} return (A)this; + } + + public A removeFromDisruptedPods(Map map) { + if(this.disruptedPods == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.disruptedPods != null){this.disruptedPods.remove(key);}}} return (A)this; + } + + public Map getDisruptedPods() { + return this.disruptedPods; + } + + public A withDisruptedPods(Map disruptedPods) { + if (disruptedPods == null) { + this.disruptedPods = null; + } else { + this.disruptedPods = new LinkedHashMap(disruptedPods); + } + return (A) this; + } + + public boolean hasDisruptedPods() { + return this.disruptedPods != null; + } + + public Integer getDisruptionsAllowed() { + return this.disruptionsAllowed; + } + + public A withDisruptionsAllowed(Integer disruptionsAllowed) { + this.disruptionsAllowed = disruptionsAllowed; + return (A) this; + } + + public boolean hasDisruptionsAllowed() { + return this.disruptionsAllowed != null; + } + + public Integer getExpectedPods() { + return this.expectedPods; + } + + public A withExpectedPods(Integer expectedPods) { + this.expectedPods = expectedPods; + return (A) this; + } + + public boolean hasExpectedPods() { + return this.expectedPods != null; + } + + public Long getObservedGeneration() { + return this.observedGeneration; + } + + public A withObservedGeneration(Long observedGeneration) { + this.observedGeneration = observedGeneration; + return (A) this; + } + + public boolean hasObservedGeneration() { + return this.observedGeneration != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodDisruptionBudgetStatusFluent that = (V1PodDisruptionBudgetStatusFluent) o; + if (!java.util.Objects.equals(conditions, that.conditions)) return false; + if (!java.util.Objects.equals(currentHealthy, that.currentHealthy)) return false; + if (!java.util.Objects.equals(desiredHealthy, that.desiredHealthy)) return false; + if (!java.util.Objects.equals(disruptedPods, that.disruptedPods)) return false; + if (!java.util.Objects.equals(disruptionsAllowed, that.disruptionsAllowed)) return false; + if (!java.util.Objects.equals(expectedPods, that.expectedPods)) return false; + if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(conditions, currentHealthy, desiredHealthy, disruptedPods, disruptionsAllowed, expectedPods, observedGeneration, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (conditions != null && !conditions.isEmpty()) { sb.append("conditions:"); sb.append(conditions + ","); } + if (currentHealthy != null) { sb.append("currentHealthy:"); sb.append(currentHealthy + ","); } + if (desiredHealthy != null) { sb.append("desiredHealthy:"); sb.append(desiredHealthy + ","); } + if (disruptedPods != null && !disruptedPods.isEmpty()) { sb.append("disruptedPods:"); sb.append(disruptedPods + ","); } + if (disruptionsAllowed != null) { sb.append("disruptionsAllowed:"); sb.append(disruptionsAllowed + ","); } + if (expectedPods != null) { sb.append("expectedPods:"); sb.append(expectedPods + ","); } + if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration); } + sb.append("}"); + return sb.toString(); + } + public class ConditionsNested extends V1ConditionFluent> implements Nested{ + ConditionsNested(int index,V1Condition item) { + this.index = index; + this.builder = new V1ConditionBuilder(this, item); + } + V1ConditionBuilder builder; + int index; + + public N and() { + return (N) V1PodDisruptionBudgetStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusFluentImpl.java deleted file mode 100644 index 6b5d0ade24..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodDisruptionBudgetStatusFluentImpl.java +++ /dev/null @@ -1,281 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodDisruptionBudgetStatusFluentImpl> extends BaseFluent implements V1PodDisruptionBudgetStatusFluent{ - public V1PodDisruptionBudgetStatusFluentImpl() { - } - public V1PodDisruptionBudgetStatusFluentImpl(V1PodDisruptionBudgetStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withCurrentHealthy(instance.getCurrentHealthy()); - this.withDesiredHealthy(instance.getDesiredHealthy()); - this.withDisruptedPods(instance.getDisruptedPods()); - this.withDisruptionsAllowed(instance.getDisruptionsAllowed()); - this.withExpectedPods(instance.getExpectedPods()); - this.withObservedGeneration(instance.getObservedGeneration()); - } - } - private ArrayList conditions; - private Integer currentHealthy; - private Integer desiredHealthy; - private Map disruptedPods; - private Integer disruptionsAllowed; - private Integer expectedPods; - private Long observedGeneration; - public A addToConditions(int index,V1Condition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ConditionBuilder builder = new V1ConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1Condition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ConditionBuilder builder = new V1ConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items) { - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1ConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1Condition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1Condition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1Condition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1Condition buildMatchingCondition(Predicate predicate) { - for (V1ConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1ConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1Condition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1Condition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1PodDisruptionBudgetStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1PodDisruptionBudgetStatusFluentImpl.ConditionsNestedImpl(); - } - public V1PodDisruptionBudgetStatusFluentImpl.ConditionsNested addNewConditionLike(V1Condition item) { - return new V1PodDisruptionBudgetStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1PodDisruptionBudgetStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1Condition item) { - return new V1PodDisruptionBudgetStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1PodDisruptionBudgetStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1PodDisruptionBudgetStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1PodDisruptionBudgetStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1PodDisruptionBudgetStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i map) { - if(this.disruptedPods == null && map != null) { this.disruptedPods = new LinkedHashMap(); } - if(map != null) { this.disruptedPods.putAll(map);} return (A)this; - } - public A removeFromDisruptedPods(String key) { - if(this.disruptedPods == null) { return (A) this; } - if(key != null && this.disruptedPods != null) {this.disruptedPods.remove(key);} return (A)this; - } - public A removeFromDisruptedPods(Map map) { - if(this.disruptedPods == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.disruptedPods != null){this.disruptedPods.remove(key);}}} return (A)this; - } - public Map getDisruptedPods() { - return this.disruptedPods; - } - public A withDisruptedPods(Map disruptedPods) { - if (disruptedPods == null) { this.disruptedPods = null;} else {this.disruptedPods = new LinkedHashMap(disruptedPods);} return (A) this; - } - public Boolean hasDisruptedPods() { - return this.disruptedPods != null; - } - public Integer getDisruptionsAllowed() { - return this.disruptionsAllowed; - } - public A withDisruptionsAllowed(Integer disruptionsAllowed) { - this.disruptionsAllowed=disruptionsAllowed; return (A) this; - } - public Boolean hasDisruptionsAllowed() { - return this.disruptionsAllowed != null; - } - public Integer getExpectedPods() { - return this.expectedPods; - } - public A withExpectedPods(Integer expectedPods) { - this.expectedPods=expectedPods; return (A) this; - } - public Boolean hasExpectedPods() { - return this.expectedPods != null; - } - public Long getObservedGeneration() { - return this.observedGeneration; - } - public A withObservedGeneration(Long observedGeneration) { - this.observedGeneration=observedGeneration; return (A) this; - } - public Boolean hasObservedGeneration() { - return this.observedGeneration != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodDisruptionBudgetStatusFluentImpl that = (V1PodDisruptionBudgetStatusFluentImpl) o; - if (!java.util.Objects.equals(conditions, that.conditions)) return false; - - if (!java.util.Objects.equals(currentHealthy, that.currentHealthy)) return false; - - if (!java.util.Objects.equals(desiredHealthy, that.desiredHealthy)) return false; - - if (!java.util.Objects.equals(disruptedPods, that.disruptedPods)) return false; - - if (!java.util.Objects.equals(disruptionsAllowed, that.disruptionsAllowed)) return false; - - if (!java.util.Objects.equals(expectedPods, that.expectedPods)) return false; - - if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(conditions, currentHealthy, desiredHealthy, disruptedPods, disruptionsAllowed, expectedPods, observedGeneration, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (conditions != null) { sb.append("conditions:"); sb.append(conditions + ","); } - if (currentHealthy != null) { sb.append("currentHealthy:"); sb.append(currentHealthy + ","); } - if (desiredHealthy != null) { sb.append("desiredHealthy:"); sb.append(desiredHealthy + ","); } - if (disruptedPods != null && !disruptedPods.isEmpty()) { sb.append("disruptedPods:"); sb.append(disruptedPods + ","); } - if (disruptionsAllowed != null) { sb.append("disruptionsAllowed:"); sb.append(disruptionsAllowed + ","); } - if (expectedPods != null) { sb.append("expectedPods:"); sb.append(expectedPods + ","); } - if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration); } - sb.append("}"); - return sb.toString(); - } - class ConditionsNestedImpl extends V1ConditionFluentImpl> implements V1PodDisruptionBudgetStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1Condition item) { - this.index = index; - this.builder = new V1ConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1ConditionBuilder(this); - } - V1ConditionBuilder builder; - int index; - public N and() { - return (N) V1PodDisruptionBudgetStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyBuilder.java index 1f41914868..2213f4f8a1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodFailurePolicyBuilder extends V1PodFailurePolicyFluentImpl implements VisitableBuilder{ +public class V1PodFailurePolicyBuilder extends V1PodFailurePolicyFluent implements VisitableBuilder{ public V1PodFailurePolicyBuilder() { - this(false); - } - public V1PodFailurePolicyBuilder(Boolean validationEnabled) { - this(new V1PodFailurePolicy(), validationEnabled); + this(new V1PodFailurePolicy()); } + public V1PodFailurePolicyBuilder(V1PodFailurePolicyFluent fluent) { - this(fluent, false); - } - public V1PodFailurePolicyBuilder(V1PodFailurePolicyFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodFailurePolicy(), validationEnabled); + this(fluent, new V1PodFailurePolicy()); } + public V1PodFailurePolicyBuilder(V1PodFailurePolicyFluent fluent,V1PodFailurePolicy instance) { - this(fluent, instance, false); - } - public V1PodFailurePolicyBuilder(V1PodFailurePolicyFluent fluent,V1PodFailurePolicy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodFailurePolicyBuilder(V1PodFailurePolicy instance) { - this(instance,false); - } - public V1PodFailurePolicyBuilder(V1PodFailurePolicy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodFailurePolicyFluent fluent; - Boolean validationEnabled; + public V1PodFailurePolicy build() { V1PodFailurePolicy buildable = new V1PodFailurePolicy(); - buildable.setRules(fluent.getRules()); + buildable.setRules(fluent.buildRules()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyFluent.java index 3826880263..b2411e2aec 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodFailurePolicyFluent> extends Fluent{ - public A addToRules(int index,V1PodFailurePolicyRule item); - public A setToRules(int index,V1PodFailurePolicyRule item); - public A addToRules(io.kubernetes.client.openapi.models.V1PodFailurePolicyRule... items); - public A addAllToRules(Collection items); - public A removeFromRules(io.kubernetes.client.openapi.models.V1PodFailurePolicyRule... items); - public A removeAllFromRules(Collection items); - public A removeMatchingFromRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules(); - public List buildRules(); - public V1PodFailurePolicyRule buildRule(int index); - public V1PodFailurePolicyRule buildFirstRule(); - public V1PodFailurePolicyRule buildLastRule(); - public V1PodFailurePolicyRule buildMatchingRule(Predicate predicate); - public Boolean hasMatchingRule(Predicate predicate); - public A withRules(List rules); - public A withRules(io.kubernetes.client.openapi.models.V1PodFailurePolicyRule... rules); - public Boolean hasRules(); - public V1PodFailurePolicyFluent.RulesNested addNewRule(); - public V1PodFailurePolicyFluent.RulesNested addNewRuleLike(V1PodFailurePolicyRule item); - public V1PodFailurePolicyFluent.RulesNested setNewRuleLike(int index,V1PodFailurePolicyRule item); - public V1PodFailurePolicyFluent.RulesNested editRule(int index); - public V1PodFailurePolicyFluent.RulesNested editFirstRule(); - public V1PodFailurePolicyFluent.RulesNested editLastRule(); - public V1PodFailurePolicyFluent.RulesNested editMatchingRule(Predicate predicate); - public interface RulesNested extends Nested,V1PodFailurePolicyRuleFluent>{ - public N and(); - public N endRule(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodFailurePolicyFluent> extends BaseFluent{ + public V1PodFailurePolicyFluent() { + } + + public V1PodFailurePolicyFluent(V1PodFailurePolicy instance) { + this.copyInstance(instance); + } + private ArrayList rules; + + protected void copyInstance(V1PodFailurePolicy instance) { + instance = (instance != null ? instance : new V1PodFailurePolicy()); + if (instance != null) { + this.withRules(instance.getRules()); + } + } + + public A addToRules(int index,V1PodFailurePolicyRule item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} + return (A)this; + } + + public A setToRules(int index,V1PodFailurePolicyRule item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} + return (A)this; + } + + public A addToRules(io.kubernetes.client.openapi.models.V1PodFailurePolicyRule... items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1PodFailurePolicyRule item : items) {V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A addAllToRules(Collection items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1PodFailurePolicyRule item : items) {V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A removeFromRules(io.kubernetes.client.openapi.models.V1PodFailurePolicyRule... items) { + if (this.rules == null) return (A)this; + for (V1PodFailurePolicyRule item : items) {V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeAllFromRules(Collection items) { + if (this.rules == null) return (A)this; + for (V1PodFailurePolicyRule item : items) {V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeMatchingFromRules(Predicate predicate) { + if (rules == null) return (A) this; + final Iterator each = rules.iterator(); + final List visitables = _visitables.get("rules"); + while (each.hasNext()) { + V1PodFailurePolicyRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildRules() { + return this.rules != null ? build(rules) : null; + } + + public V1PodFailurePolicyRule buildRule(int index) { + return this.rules.get(index).build(); + } + + public V1PodFailurePolicyRule buildFirstRule() { + return this.rules.get(0).build(); + } + + public V1PodFailurePolicyRule buildLastRule() { + return this.rules.get(rules.size() - 1).build(); + } + + public V1PodFailurePolicyRule buildMatchingRule(Predicate predicate) { + for (V1PodFailurePolicyRuleBuilder item : rules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingRule(Predicate predicate) { + for (V1PodFailurePolicyRuleBuilder item : rules) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withRules(List rules) { + if (this.rules != null) { + this._visitables.get("rules").clear(); + } + if (rules != null) { + this.rules = new ArrayList(); + for (V1PodFailurePolicyRule item : rules) { + this.addToRules(item); + } + } else { + this.rules = null; + } + return (A) this; + } + + public A withRules(io.kubernetes.client.openapi.models.V1PodFailurePolicyRule... rules) { + if (this.rules != null) { + this.rules.clear(); + _visitables.remove("rules"); + } + if (rules != null) { + for (V1PodFailurePolicyRule item : rules) { + this.addToRules(item); + } + } + return (A) this; + } + + public boolean hasRules() { + return this.rules != null && !this.rules.isEmpty(); + } + + public RulesNested addNewRule() { + return new RulesNested(-1, null); + } + + public RulesNested addNewRuleLike(V1PodFailurePolicyRule item) { + return new RulesNested(-1, item); + } + + public RulesNested setNewRuleLike(int index,V1PodFailurePolicyRule item) { + return new RulesNested(index, item); + } + + public RulesNested editRule(int index) { + if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editFirstRule() { + if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); + return setNewRuleLike(0, buildRule(0)); + } + + public RulesNested editLastRule() { + int index = rules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editMatchingRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1PodFailurePolicyRuleFluent> implements Nested{ + RulesNested(int index,V1PodFailurePolicyRule item) { + this.index = index; + this.builder = new V1PodFailurePolicyRuleBuilder(this, item); + } + V1PodFailurePolicyRuleBuilder builder; + int index; + + public N and() { + return (N) V1PodFailurePolicyFluent.this.setToRules(index,builder.build()); + } + + public N endRule() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyFluentImpl.java deleted file mode 100644 index 58965550f6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodFailurePolicyFluentImpl> extends BaseFluent implements V1PodFailurePolicyFluent{ - public V1PodFailurePolicyFluentImpl() { - } - public V1PodFailurePolicyFluentImpl(V1PodFailurePolicy instance) { - if (instance != null) { - this.withRules(instance.getRules()); - } - } - private ArrayList rules; - public A addToRules(int index,V1PodFailurePolicyRule item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} - return (A)this; - } - public A setToRules(int index,V1PodFailurePolicyRule item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} - return (A)this; - } - public A addToRules(io.kubernetes.client.openapi.models.V1PodFailurePolicyRule... items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1PodFailurePolicyRule item : items) {V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A addAllToRules(Collection items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1PodFailurePolicyRule item : items) {V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A removeFromRules(io.kubernetes.client.openapi.models.V1PodFailurePolicyRule... items) { - for (V1PodFailurePolicyRule item : items) {V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeAllFromRules(Collection items) { - for (V1PodFailurePolicyRule item : items) {V1PodFailurePolicyRuleBuilder builder = new V1PodFailurePolicyRuleBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeMatchingFromRules(Predicate predicate) { - if (rules == null) return (A) this; - final Iterator each = rules.iterator(); - final List visitables = _visitables.get("rules"); - while (each.hasNext()) { - V1PodFailurePolicyRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules() { - return rules != null ? build(rules) : null; - } - public List buildRules() { - return rules != null ? build(rules) : null; - } - public V1PodFailurePolicyRule buildRule(int index) { - return this.rules.get(index).build(); - } - public V1PodFailurePolicyRule buildFirstRule() { - return this.rules.get(0).build(); - } - public V1PodFailurePolicyRule buildLastRule() { - return this.rules.get(rules.size() - 1).build(); - } - public V1PodFailurePolicyRule buildMatchingRule(Predicate predicate) { - for (V1PodFailurePolicyRuleBuilder item: rules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRule(Predicate predicate) { - for (V1PodFailurePolicyRuleBuilder item: rules) { if(predicate.test(item)){ return true;} } return false; - } - public A withRules(List rules) { - if (this.rules != null) { _visitables.get("rules").clear();} - if (rules != null) {this.rules = new ArrayList(); for (V1PodFailurePolicyRule item : rules){this.addToRules(item);}} else { this.rules = null;} return (A) this; - } - public A withRules(io.kubernetes.client.openapi.models.V1PodFailurePolicyRule... rules) { - if (this.rules != null) {this.rules.clear(); _visitables.remove("rules"); } - if (rules != null) {for (V1PodFailurePolicyRule item :rules){ this.addToRules(item);}} return (A) this; - } - public Boolean hasRules() { - return rules != null && !rules.isEmpty(); - } - public V1PodFailurePolicyFluentImpl.RulesNested addNewRule() { - return new V1PodFailurePolicyFluentImpl.RulesNestedImpl(); - } - public V1PodFailurePolicyFluentImpl.RulesNested addNewRuleLike(V1PodFailurePolicyRule item) { - return new V1PodFailurePolicyFluentImpl.RulesNestedImpl(-1, item); - } - public V1PodFailurePolicyFluentImpl.RulesNested setNewRuleLike(int index,V1PodFailurePolicyRule item) { - return new V1PodFailurePolicyFluentImpl.RulesNestedImpl(index, item); - } - public V1PodFailurePolicyFluentImpl.RulesNested editRule(int index) { - if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); - return setNewRuleLike(index, buildRule(index)); - } - public V1PodFailurePolicyFluentImpl.RulesNested editFirstRule() { - if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); - return setNewRuleLike(0, buildRule(0)); - } - public V1PodFailurePolicyFluentImpl.RulesNested editLastRule() { - int index = rules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); - return setNewRuleLike(index, buildRule(index)); - } - public V1PodFailurePolicyFluentImpl.RulesNested editMatchingRule(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1PodFailurePolicyRuleFluentImpl> implements V1PodFailurePolicyFluentImpl.RulesNested,Nested{ - RulesNestedImpl(int index,V1PodFailurePolicyRule item) { - this.index = index; - this.builder = new V1PodFailurePolicyRuleBuilder(this, item); - } - RulesNestedImpl() { - this.index = -1; - this.builder = new V1PodFailurePolicyRuleBuilder(this); - } - V1PodFailurePolicyRuleBuilder builder; - int index; - public N and() { - return (N) V1PodFailurePolicyFluentImpl.this.setToRules(index,builder.build()); - } - public N endRule() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementBuilder.java index cff4a58b13..a29df42968 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodFailurePolicyOnExitCodesRequirementBuilder extends V1PodFailurePolicyOnExitCodesRequirementFluentImpl implements VisitableBuilder{ +public class V1PodFailurePolicyOnExitCodesRequirementBuilder extends V1PodFailurePolicyOnExitCodesRequirementFluent implements VisitableBuilder{ public V1PodFailurePolicyOnExitCodesRequirementBuilder() { - this(false); - } - public V1PodFailurePolicyOnExitCodesRequirementBuilder(Boolean validationEnabled) { - this(new V1PodFailurePolicyOnExitCodesRequirement(), validationEnabled); + this(new V1PodFailurePolicyOnExitCodesRequirement()); } + public V1PodFailurePolicyOnExitCodesRequirementBuilder(V1PodFailurePolicyOnExitCodesRequirementFluent fluent) { - this(fluent, false); - } - public V1PodFailurePolicyOnExitCodesRequirementBuilder(V1PodFailurePolicyOnExitCodesRequirementFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodFailurePolicyOnExitCodesRequirement(), validationEnabled); + this(fluent, new V1PodFailurePolicyOnExitCodesRequirement()); } + public V1PodFailurePolicyOnExitCodesRequirementBuilder(V1PodFailurePolicyOnExitCodesRequirementFluent fluent,V1PodFailurePolicyOnExitCodesRequirement instance) { - this(fluent, instance, false); - } - public V1PodFailurePolicyOnExitCodesRequirementBuilder(V1PodFailurePolicyOnExitCodesRequirementFluent fluent,V1PodFailurePolicyOnExitCodesRequirement instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withContainerName(instance.getContainerName()); - fluent.withOperator(instance.getOperator()); - fluent.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodFailurePolicyOnExitCodesRequirementBuilder(V1PodFailurePolicyOnExitCodesRequirement instance) { - this(instance,false); - } - public V1PodFailurePolicyOnExitCodesRequirementBuilder(V1PodFailurePolicyOnExitCodesRequirement instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withContainerName(instance.getContainerName()); - this.withOperator(instance.getOperator()); - this.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodFailurePolicyOnExitCodesRequirementFluent fluent; - Boolean validationEnabled; + public V1PodFailurePolicyOnExitCodesRequirement build() { V1PodFailurePolicyOnExitCodesRequirement buildable = new V1PodFailurePolicyOnExitCodesRequirement(); buildable.setContainerName(fluent.getContainerName()); @@ -49,4 +29,5 @@ public V1PodFailurePolicyOnExitCodesRequirement build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementFluent.java index 9ca46fba8e..341ac86075 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementFluent.java @@ -1,39 +1,183 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1PodFailurePolicyOnExitCodesRequirementFluent> extends Fluent{ - public String getContainerName(); - public A withContainerName(String containerName); - public Boolean hasContainerName(); - public String getOperator(); - public A withOperator(String operator); - public Boolean hasOperator(); - public A addToValues(int index,Integer item); - public A setToValues(int index,Integer item); - public A addToValues(java.lang.Integer... items); - public A addAllToValues(Collection items); - public A removeFromValues(java.lang.Integer... items); - public A removeAllFromValues(Collection items); - public List getValues(); - public Integer getValue(int index); - public Integer getFirstValue(); - public Integer getLastValue(); - public Integer getMatchingValue(Predicate predicate); - public Boolean hasMatchingValue(Predicate predicate); - public A withValues(List values); - public A withValues(java.lang.Integer... values); - public Boolean hasValues(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodFailurePolicyOnExitCodesRequirementFluent> extends BaseFluent{ + public V1PodFailurePolicyOnExitCodesRequirementFluent() { + } + public V1PodFailurePolicyOnExitCodesRequirementFluent(V1PodFailurePolicyOnExitCodesRequirement instance) { + this.copyInstance(instance); + } + private String containerName; + private String operator; + private List values; + + protected void copyInstance(V1PodFailurePolicyOnExitCodesRequirement instance) { + instance = (instance != null ? instance : new V1PodFailurePolicyOnExitCodesRequirement()); + if (instance != null) { + this.withContainerName(instance.getContainerName()); + this.withOperator(instance.getOperator()); + this.withValues(instance.getValues()); + } + } + + public String getContainerName() { + return this.containerName; + } + + public A withContainerName(String containerName) { + this.containerName = containerName; + return (A) this; + } + + public boolean hasContainerName() { + return this.containerName != null; + } + + public String getOperator() { + return this.operator; + } + + public A withOperator(String operator) { + this.operator = operator; + return (A) this; + } + + public boolean hasOperator() { + return this.operator != null; + } + + public A addToValues(int index,Integer item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.add(index, item); + return (A)this; + } + + public A setToValues(int index,Integer item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.set(index, item); return (A)this; + } + + public A addToValues(java.lang.Integer... items) { + if (this.values == null) {this.values = new ArrayList();} + for (Integer item : items) {this.values.add(item);} return (A)this; + } + + public A addAllToValues(Collection items) { + if (this.values == null) {this.values = new ArrayList();} + for (Integer item : items) {this.values.add(item);} return (A)this; + } + + public A removeFromValues(java.lang.Integer... items) { + if (this.values == null) return (A)this; + for (Integer item : items) { this.values.remove(item);} return (A)this; + } + + public A removeAllFromValues(Collection items) { + if (this.values == null) return (A)this; + for (Integer item : items) { this.values.remove(item);} return (A)this; + } + + public List getValues() { + return this.values; + } + + public Integer getValue(int index) { + return this.values.get(index); + } + + public Integer getFirstValue() { + return this.values.get(0); + } + + public Integer getLastValue() { + return this.values.get(values.size() - 1); + } + + public Integer getMatchingValue(Predicate predicate) { + for (Integer item : values) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingValue(Predicate predicate) { + for (Integer item : values) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withValues(List values) { + if (values != null) { + this.values = new ArrayList(); + for (Integer item : values) { + this.addToValues(item); + } + } else { + this.values = null; + } + return (A) this; + } + + public A withValues(java.lang.Integer... values) { + if (this.values != null) { + this.values.clear(); + _visitables.remove("values"); + } + if (values != null) { + for (Integer item : values) { + this.addToValues(item); + } + } + return (A) this; + } + + public boolean hasValues() { + return this.values != null && !this.values.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodFailurePolicyOnExitCodesRequirementFluent that = (V1PodFailurePolicyOnExitCodesRequirementFluent) o; + if (!java.util.Objects.equals(containerName, that.containerName)) return false; + if (!java.util.Objects.equals(operator, that.operator)) return false; + if (!java.util.Objects.equals(values, that.values)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(containerName, operator, values, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (containerName != null) { sb.append("containerName:"); sb.append(containerName + ","); } + if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } + if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementFluentImpl.java deleted file mode 100644 index c913d0f954..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnExitCodesRequirementFluentImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodFailurePolicyOnExitCodesRequirementFluentImpl> extends BaseFluent implements V1PodFailurePolicyOnExitCodesRequirementFluent{ - public V1PodFailurePolicyOnExitCodesRequirementFluentImpl() { - } - public V1PodFailurePolicyOnExitCodesRequirementFluentImpl(V1PodFailurePolicyOnExitCodesRequirement instance) { - if (instance != null) { - this.withContainerName(instance.getContainerName()); - this.withOperator(instance.getOperator()); - this.withValues(instance.getValues()); - } - } - private String containerName; - private String operator; - private List values; - public String getContainerName() { - return this.containerName; - } - public A withContainerName(String containerName) { - this.containerName=containerName; return (A) this; - } - public Boolean hasContainerName() { - return this.containerName != null; - } - public String getOperator() { - return this.operator; - } - public A withOperator(String operator) { - this.operator=operator; return (A) this; - } - public Boolean hasOperator() { - return this.operator != null; - } - public A addToValues(int index,Integer item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.add(index, item); - return (A)this; - } - public A setToValues(int index,Integer item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.set(index, item); return (A)this; - } - public A addToValues(java.lang.Integer... items) { - if (this.values == null) {this.values = new ArrayList();} - for (Integer item : items) {this.values.add(item);} return (A)this; - } - public A addAllToValues(Collection items) { - if (this.values == null) {this.values = new ArrayList();} - for (Integer item : items) {this.values.add(item);} return (A)this; - } - public A removeFromValues(java.lang.Integer... items) { - for (Integer item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public A removeAllFromValues(Collection items) { - for (Integer item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public List getValues() { - return this.values; - } - public Integer getValue(int index) { - return this.values.get(index); - } - public Integer getFirstValue() { - return this.values.get(0); - } - public Integer getLastValue() { - return this.values.get(values.size() - 1); - } - public Integer getMatchingValue(Predicate predicate) { - for (Integer item: values) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingValue(Predicate predicate) { - for (Integer item: values) { if(predicate.test(item)){ return true;} } return false; - } - public A withValues(List values) { - if (values != null) {this.values = new ArrayList(); for (Integer item : values){this.addToValues(item);}} else { this.values = null;} return (A) this; - } - public A withValues(java.lang.Integer... values) { - if (this.values != null) {this.values.clear(); _visitables.remove("values"); } - if (values != null) {for (Integer item :values){ this.addToValues(item);}} return (A) this; - } - public Boolean hasValues() { - return values != null && !values.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodFailurePolicyOnExitCodesRequirementFluentImpl that = (V1PodFailurePolicyOnExitCodesRequirementFluentImpl) o; - if (!java.util.Objects.equals(containerName, that.containerName)) return false; - - if (!java.util.Objects.equals(operator, that.operator)) return false; - - if (!java.util.Objects.equals(values, that.values)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(containerName, operator, values, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (containerName != null) { sb.append("containerName:"); sb.append(containerName + ","); } - if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } - if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternBuilder.java index 5fb01a107a..383251c206 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodFailurePolicyOnPodConditionsPatternBuilder extends V1PodFailurePolicyOnPodConditionsPatternFluentImpl implements VisitableBuilder{ +public class V1PodFailurePolicyOnPodConditionsPatternBuilder extends V1PodFailurePolicyOnPodConditionsPatternFluent implements VisitableBuilder{ public V1PodFailurePolicyOnPodConditionsPatternBuilder() { - this(false); - } - public V1PodFailurePolicyOnPodConditionsPatternBuilder(Boolean validationEnabled) { - this(new V1PodFailurePolicyOnPodConditionsPattern(), validationEnabled); + this(new V1PodFailurePolicyOnPodConditionsPattern()); } + public V1PodFailurePolicyOnPodConditionsPatternBuilder(V1PodFailurePolicyOnPodConditionsPatternFluent fluent) { - this(fluent, false); - } - public V1PodFailurePolicyOnPodConditionsPatternBuilder(V1PodFailurePolicyOnPodConditionsPatternFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodFailurePolicyOnPodConditionsPattern(), validationEnabled); + this(fluent, new V1PodFailurePolicyOnPodConditionsPattern()); } + public V1PodFailurePolicyOnPodConditionsPatternBuilder(V1PodFailurePolicyOnPodConditionsPatternFluent fluent,V1PodFailurePolicyOnPodConditionsPattern instance) { - this(fluent, instance, false); - } - public V1PodFailurePolicyOnPodConditionsPatternBuilder(V1PodFailurePolicyOnPodConditionsPatternFluent fluent,V1PodFailurePolicyOnPodConditionsPattern instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodFailurePolicyOnPodConditionsPatternBuilder(V1PodFailurePolicyOnPodConditionsPattern instance) { - this(instance,false); - } - public V1PodFailurePolicyOnPodConditionsPatternBuilder(V1PodFailurePolicyOnPodConditionsPattern instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodFailurePolicyOnPodConditionsPatternFluent fluent; - Boolean validationEnabled; + public V1PodFailurePolicyOnPodConditionsPattern build() { V1PodFailurePolicyOnPodConditionsPattern buildable = new V1PodFailurePolicyOnPodConditionsPattern(); buildable.setStatus(fluent.getStatus()); @@ -46,4 +28,5 @@ public V1PodFailurePolicyOnPodConditionsPattern build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternFluent.java index b623a05993..db49540166 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodFailurePolicyOnPodConditionsPatternFluent> extends Fluent{ - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodFailurePolicyOnPodConditionsPatternFluent> extends BaseFluent{ + public V1PodFailurePolicyOnPodConditionsPatternFluent() { + } + public V1PodFailurePolicyOnPodConditionsPatternFluent(V1PodFailurePolicyOnPodConditionsPattern instance) { + this.copyInstance(instance); + } + private String status; + private String type; + + protected void copyInstance(V1PodFailurePolicyOnPodConditionsPattern instance) { + instance = (instance != null ? instance : new V1PodFailurePolicyOnPodConditionsPattern()); + if (instance != null) { + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodFailurePolicyOnPodConditionsPatternFluent that = (V1PodFailurePolicyOnPodConditionsPatternFluent) o; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternFluentImpl.java deleted file mode 100644 index 33d3337907..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyOnPodConditionsPatternFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodFailurePolicyOnPodConditionsPatternFluentImpl> extends BaseFluent implements V1PodFailurePolicyOnPodConditionsPatternFluent{ - public V1PodFailurePolicyOnPodConditionsPatternFluentImpl() { - } - public V1PodFailurePolicyOnPodConditionsPatternFluentImpl(V1PodFailurePolicyOnPodConditionsPattern instance) { - if (instance != null) { - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private String status; - private String type; - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodFailurePolicyOnPodConditionsPatternFluentImpl that = (V1PodFailurePolicyOnPodConditionsPatternFluentImpl) o; - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleBuilder.java index b74c92e51c..ef40a89d30 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodFailurePolicyRuleBuilder extends V1PodFailurePolicyRuleFluentImpl implements VisitableBuilder{ +public class V1PodFailurePolicyRuleBuilder extends V1PodFailurePolicyRuleFluent implements VisitableBuilder{ public V1PodFailurePolicyRuleBuilder() { - this(false); - } - public V1PodFailurePolicyRuleBuilder(Boolean validationEnabled) { - this(new V1PodFailurePolicyRule(), validationEnabled); + this(new V1PodFailurePolicyRule()); } + public V1PodFailurePolicyRuleBuilder(V1PodFailurePolicyRuleFluent fluent) { - this(fluent, false); - } - public V1PodFailurePolicyRuleBuilder(V1PodFailurePolicyRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodFailurePolicyRule(), validationEnabled); + this(fluent, new V1PodFailurePolicyRule()); } + public V1PodFailurePolicyRuleBuilder(V1PodFailurePolicyRuleFluent fluent,V1PodFailurePolicyRule instance) { - this(fluent, instance, false); - } - public V1PodFailurePolicyRuleBuilder(V1PodFailurePolicyRuleFluent fluent,V1PodFailurePolicyRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAction(instance.getAction()); - fluent.withOnExitCodes(instance.getOnExitCodes()); - fluent.withOnPodConditions(instance.getOnPodConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodFailurePolicyRuleBuilder(V1PodFailurePolicyRule instance) { - this(instance,false); - } - public V1PodFailurePolicyRuleBuilder(V1PodFailurePolicyRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAction(instance.getAction()); - this.withOnExitCodes(instance.getOnExitCodes()); - this.withOnPodConditions(instance.getOnPodConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodFailurePolicyRuleFluent fluent; - Boolean validationEnabled; + public V1PodFailurePolicyRule build() { V1PodFailurePolicyRule buildable = new V1PodFailurePolicyRule(); buildable.setAction(fluent.getAction()); - buildable.setOnExitCodes(fluent.getOnExitCodes()); - buildable.setOnPodConditions(fluent.getOnPodConditions()); + buildable.setOnExitCodes(fluent.buildOnExitCodes()); + buildable.setOnPodConditions(fluent.buildOnPodConditions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleFluent.java index 17fbd17268..24d4475087 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleFluent.java @@ -1,79 +1,302 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodFailurePolicyRuleFluent> extends Fluent{ - public String getAction(); - public A withAction(String action); - public Boolean hasAction(); - - /** - * This method has been deprecated, please use method buildOnExitCodes instead. - * @return The buildable object. - */ - @Deprecated - public V1PodFailurePolicyOnExitCodesRequirement getOnExitCodes(); - public V1PodFailurePolicyOnExitCodesRequirement buildOnExitCodes(); - public A withOnExitCodes(V1PodFailurePolicyOnExitCodesRequirement onExitCodes); - public Boolean hasOnExitCodes(); - public V1PodFailurePolicyRuleFluent.OnExitCodesNested withNewOnExitCodes(); - public V1PodFailurePolicyRuleFluent.OnExitCodesNested withNewOnExitCodesLike(V1PodFailurePolicyOnExitCodesRequirement item); - public V1PodFailurePolicyRuleFluent.OnExitCodesNested editOnExitCodes(); - public V1PodFailurePolicyRuleFluent.OnExitCodesNested editOrNewOnExitCodes(); - public V1PodFailurePolicyRuleFluent.OnExitCodesNested editOrNewOnExitCodesLike(V1PodFailurePolicyOnExitCodesRequirement item); - public A addToOnPodConditions(int index,V1PodFailurePolicyOnPodConditionsPattern item); - public A setToOnPodConditions(int index,V1PodFailurePolicyOnPodConditionsPattern item); - public A addToOnPodConditions(io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern... items); - public A addAllToOnPodConditions(Collection items); - public A removeFromOnPodConditions(io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern... items); - public A removeAllFromOnPodConditions(Collection items); - public A removeMatchingFromOnPodConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildOnPodConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getOnPodConditions(); - public List buildOnPodConditions(); - public V1PodFailurePolicyOnPodConditionsPattern buildOnPodCondition(int index); - public V1PodFailurePolicyOnPodConditionsPattern buildFirstOnPodCondition(); - public V1PodFailurePolicyOnPodConditionsPattern buildLastOnPodCondition(); - public V1PodFailurePolicyOnPodConditionsPattern buildMatchingOnPodCondition(Predicate predicate); - public Boolean hasMatchingOnPodCondition(Predicate predicate); - public A withOnPodConditions(List onPodConditions); - public A withOnPodConditions(io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern... onPodConditions); - public Boolean hasOnPodConditions(); - public V1PodFailurePolicyRuleFluent.OnPodConditionsNested addNewOnPodCondition(); - public V1PodFailurePolicyRuleFluent.OnPodConditionsNested addNewOnPodConditionLike(V1PodFailurePolicyOnPodConditionsPattern item); - public V1PodFailurePolicyRuleFluent.OnPodConditionsNested setNewOnPodConditionLike(int index,V1PodFailurePolicyOnPodConditionsPattern item); - public V1PodFailurePolicyRuleFluent.OnPodConditionsNested editOnPodCondition(int index); - public V1PodFailurePolicyRuleFluent.OnPodConditionsNested editFirstOnPodCondition(); - public V1PodFailurePolicyRuleFluent.OnPodConditionsNested editLastOnPodCondition(); - public V1PodFailurePolicyRuleFluent.OnPodConditionsNested editMatchingOnPodCondition(Predicate predicate); - public interface OnExitCodesNested extends Nested,V1PodFailurePolicyOnExitCodesRequirementFluent>{ - public N and(); - public N endOnExitCodes(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodFailurePolicyRuleFluent> extends BaseFluent{ + public V1PodFailurePolicyRuleFluent() { + } + + public V1PodFailurePolicyRuleFluent(V1PodFailurePolicyRule instance) { + this.copyInstance(instance); + } + private String action; + private V1PodFailurePolicyOnExitCodesRequirementBuilder onExitCodes; + private ArrayList onPodConditions; + + protected void copyInstance(V1PodFailurePolicyRule instance) { + instance = (instance != null ? instance : new V1PodFailurePolicyRule()); + if (instance != null) { + this.withAction(instance.getAction()); + this.withOnExitCodes(instance.getOnExitCodes()); + this.withOnPodConditions(instance.getOnPodConditions()); + } + } + + public String getAction() { + return this.action; + } + + public A withAction(String action) { + this.action = action; + return (A) this; + } + + public boolean hasAction() { + return this.action != null; + } + + public V1PodFailurePolicyOnExitCodesRequirement buildOnExitCodes() { + return this.onExitCodes != null ? this.onExitCodes.build() : null; + } + + public A withOnExitCodes(V1PodFailurePolicyOnExitCodesRequirement onExitCodes) { + this._visitables.remove("onExitCodes"); + if (onExitCodes != null) { + this.onExitCodes = new V1PodFailurePolicyOnExitCodesRequirementBuilder(onExitCodes); + this._visitables.get("onExitCodes").add(this.onExitCodes); + } else { + this.onExitCodes = null; + this._visitables.get("onExitCodes").remove(this.onExitCodes); + } + return (A) this; + } + + public boolean hasOnExitCodes() { + return this.onExitCodes != null; + } + + public OnExitCodesNested withNewOnExitCodes() { + return new OnExitCodesNested(null); + } + + public OnExitCodesNested withNewOnExitCodesLike(V1PodFailurePolicyOnExitCodesRequirement item) { + return new OnExitCodesNested(item); + } + + public OnExitCodesNested editOnExitCodes() { + return withNewOnExitCodesLike(java.util.Optional.ofNullable(buildOnExitCodes()).orElse(null)); + } + + public OnExitCodesNested editOrNewOnExitCodes() { + return withNewOnExitCodesLike(java.util.Optional.ofNullable(buildOnExitCodes()).orElse(new V1PodFailurePolicyOnExitCodesRequirementBuilder().build())); + } + + public OnExitCodesNested editOrNewOnExitCodesLike(V1PodFailurePolicyOnExitCodesRequirement item) { + return withNewOnExitCodesLike(java.util.Optional.ofNullable(buildOnExitCodes()).orElse(item)); + } + + public A addToOnPodConditions(int index,V1PodFailurePolicyOnPodConditionsPattern item) { + if (this.onPodConditions == null) {this.onPodConditions = new ArrayList();} + V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item); + if (index < 0 || index >= onPodConditions.size()) { _visitables.get("onPodConditions").add(builder); onPodConditions.add(builder); } else { _visitables.get("onPodConditions").add(index, builder); onPodConditions.add(index, builder);} + return (A)this; + } + + public A setToOnPodConditions(int index,V1PodFailurePolicyOnPodConditionsPattern item) { + if (this.onPodConditions == null) {this.onPodConditions = new ArrayList();} + V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item); + if (index < 0 || index >= onPodConditions.size()) { _visitables.get("onPodConditions").add(builder); onPodConditions.add(builder); } else { _visitables.get("onPodConditions").set(index, builder); onPodConditions.set(index, builder);} + return (A)this; + } + + public A addToOnPodConditions(io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern... items) { + if (this.onPodConditions == null) {this.onPodConditions = new ArrayList();} + for (V1PodFailurePolicyOnPodConditionsPattern item : items) {V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item);_visitables.get("onPodConditions").add(builder);this.onPodConditions.add(builder);} return (A)this; } - public interface OnPodConditionsNested extends Nested,V1PodFailurePolicyOnPodConditionsPatternFluent>{ - public N and(); - public N endOnPodCondition(); + + public A addAllToOnPodConditions(Collection items) { + if (this.onPodConditions == null) {this.onPodConditions = new ArrayList();} + for (V1PodFailurePolicyOnPodConditionsPattern item : items) {V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item);_visitables.get("onPodConditions").add(builder);this.onPodConditions.add(builder);} return (A)this; + } + + public A removeFromOnPodConditions(io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern... items) { + if (this.onPodConditions == null) return (A)this; + for (V1PodFailurePolicyOnPodConditionsPattern item : items) {V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item);_visitables.get("onPodConditions").remove(builder); this.onPodConditions.remove(builder);} return (A)this; + } + + public A removeAllFromOnPodConditions(Collection items) { + if (this.onPodConditions == null) return (A)this; + for (V1PodFailurePolicyOnPodConditionsPattern item : items) {V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item);_visitables.get("onPodConditions").remove(builder); this.onPodConditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromOnPodConditions(Predicate predicate) { + if (onPodConditions == null) return (A) this; + final Iterator each = onPodConditions.iterator(); + final List visitables = _visitables.get("onPodConditions"); + while (each.hasNext()) { + V1PodFailurePolicyOnPodConditionsPatternBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildOnPodConditions() { + return this.onPodConditions != null ? build(onPodConditions) : null; + } + + public V1PodFailurePolicyOnPodConditionsPattern buildOnPodCondition(int index) { + return this.onPodConditions.get(index).build(); + } + + public V1PodFailurePolicyOnPodConditionsPattern buildFirstOnPodCondition() { + return this.onPodConditions.get(0).build(); + } + + public V1PodFailurePolicyOnPodConditionsPattern buildLastOnPodCondition() { + return this.onPodConditions.get(onPodConditions.size() - 1).build(); + } + + public V1PodFailurePolicyOnPodConditionsPattern buildMatchingOnPodCondition(Predicate predicate) { + for (V1PodFailurePolicyOnPodConditionsPatternBuilder item : onPodConditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingOnPodCondition(Predicate predicate) { + for (V1PodFailurePolicyOnPodConditionsPatternBuilder item : onPodConditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withOnPodConditions(List onPodConditions) { + if (this.onPodConditions != null) { + this._visitables.get("onPodConditions").clear(); + } + if (onPodConditions != null) { + this.onPodConditions = new ArrayList(); + for (V1PodFailurePolicyOnPodConditionsPattern item : onPodConditions) { + this.addToOnPodConditions(item); + } + } else { + this.onPodConditions = null; + } + return (A) this; + } + + public A withOnPodConditions(io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern... onPodConditions) { + if (this.onPodConditions != null) { + this.onPodConditions.clear(); + _visitables.remove("onPodConditions"); + } + if (onPodConditions != null) { + for (V1PodFailurePolicyOnPodConditionsPattern item : onPodConditions) { + this.addToOnPodConditions(item); + } + } + return (A) this; + } + + public boolean hasOnPodConditions() { + return this.onPodConditions != null && !this.onPodConditions.isEmpty(); + } + + public OnPodConditionsNested addNewOnPodCondition() { + return new OnPodConditionsNested(-1, null); + } + + public OnPodConditionsNested addNewOnPodConditionLike(V1PodFailurePolicyOnPodConditionsPattern item) { + return new OnPodConditionsNested(-1, item); + } + + public OnPodConditionsNested setNewOnPodConditionLike(int index,V1PodFailurePolicyOnPodConditionsPattern item) { + return new OnPodConditionsNested(index, item); + } + + public OnPodConditionsNested editOnPodCondition(int index) { + if (onPodConditions.size() <= index) throw new RuntimeException("Can't edit onPodConditions. Index exceeds size."); + return setNewOnPodConditionLike(index, buildOnPodCondition(index)); + } + + public OnPodConditionsNested editFirstOnPodCondition() { + if (onPodConditions.size() == 0) throw new RuntimeException("Can't edit first onPodConditions. The list is empty."); + return setNewOnPodConditionLike(0, buildOnPodCondition(0)); + } + + public OnPodConditionsNested editLastOnPodCondition() { + int index = onPodConditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last onPodConditions. The list is empty."); + return setNewOnPodConditionLike(index, buildOnPodCondition(index)); + } + + public OnPodConditionsNested editMatchingOnPodCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1PodFailurePolicyOnExitCodesRequirementFluent> implements Nested{ + OnExitCodesNested(V1PodFailurePolicyOnExitCodesRequirement item) { + this.builder = new V1PodFailurePolicyOnExitCodesRequirementBuilder(this, item); + } + V1PodFailurePolicyOnExitCodesRequirementBuilder builder; + + public N and() { + return (N) V1PodFailurePolicyRuleFluent.this.withOnExitCodes(builder.build()); + } + public N endOnExitCodes() { + return and(); + } + + } + public class OnPodConditionsNested extends V1PodFailurePolicyOnPodConditionsPatternFluent> implements Nested{ + OnPodConditionsNested(int index,V1PodFailurePolicyOnPodConditionsPattern item) { + this.index = index; + this.builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(this, item); + } + V1PodFailurePolicyOnPodConditionsPatternBuilder builder; + int index; + + public N and() { + return (N) V1PodFailurePolicyRuleFluent.this.setToOnPodConditions(index,builder.build()); + } + + public N endOnPodCondition() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleFluentImpl.java deleted file mode 100644 index 67d8c6caa6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFailurePolicyRuleFluentImpl.java +++ /dev/null @@ -1,245 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodFailurePolicyRuleFluentImpl> extends BaseFluent implements V1PodFailurePolicyRuleFluent{ - public V1PodFailurePolicyRuleFluentImpl() { - } - public V1PodFailurePolicyRuleFluentImpl(V1PodFailurePolicyRule instance) { - if (instance != null) { - this.withAction(instance.getAction()); - this.withOnExitCodes(instance.getOnExitCodes()); - this.withOnPodConditions(instance.getOnPodConditions()); - } - } - private String action; - private V1PodFailurePolicyOnExitCodesRequirementBuilder onExitCodes; - private ArrayList onPodConditions; - public String getAction() { - return this.action; - } - public A withAction(String action) { - this.action=action; return (A) this; - } - public Boolean hasAction() { - return this.action != null; - } - - /** - * This method has been deprecated, please use method buildOnExitCodes instead. - * @return The buildable object. - */ - @Deprecated - public V1PodFailurePolicyOnExitCodesRequirement getOnExitCodes() { - return this.onExitCodes!=null ?this.onExitCodes.build():null; - } - public V1PodFailurePolicyOnExitCodesRequirement buildOnExitCodes() { - return this.onExitCodes!=null ?this.onExitCodes.build():null; - } - public A withOnExitCodes(V1PodFailurePolicyOnExitCodesRequirement onExitCodes) { - _visitables.get("onExitCodes").remove(this.onExitCodes); - if (onExitCodes!=null){ this.onExitCodes= new V1PodFailurePolicyOnExitCodesRequirementBuilder(onExitCodes); _visitables.get("onExitCodes").add(this.onExitCodes);} else { this.onExitCodes = null; _visitables.get("onExitCodes").remove(this.onExitCodes); } return (A) this; - } - public Boolean hasOnExitCodes() { - return this.onExitCodes != null; - } - public V1PodFailurePolicyRuleFluentImpl.OnExitCodesNested withNewOnExitCodes() { - return new V1PodFailurePolicyRuleFluentImpl.OnExitCodesNestedImpl(); - } - public V1PodFailurePolicyRuleFluentImpl.OnExitCodesNested withNewOnExitCodesLike(V1PodFailurePolicyOnExitCodesRequirement item) { - return new V1PodFailurePolicyRuleFluentImpl.OnExitCodesNestedImpl(item); - } - public V1PodFailurePolicyRuleFluentImpl.OnExitCodesNested editOnExitCodes() { - return withNewOnExitCodesLike(getOnExitCodes()); - } - public V1PodFailurePolicyRuleFluentImpl.OnExitCodesNested editOrNewOnExitCodes() { - return withNewOnExitCodesLike(getOnExitCodes() != null ? getOnExitCodes(): new V1PodFailurePolicyOnExitCodesRequirementBuilder().build()); - } - public V1PodFailurePolicyRuleFluentImpl.OnExitCodesNested editOrNewOnExitCodesLike(V1PodFailurePolicyOnExitCodesRequirement item) { - return withNewOnExitCodesLike(getOnExitCodes() != null ? getOnExitCodes(): item); - } - public A addToOnPodConditions(int index,V1PodFailurePolicyOnPodConditionsPattern item) { - if (this.onPodConditions == null) {this.onPodConditions = new ArrayList();} - V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item); - if (index < 0 || index >= onPodConditions.size()) { _visitables.get("onPodConditions").add(builder); onPodConditions.add(builder); } else { _visitables.get("onPodConditions").add(index, builder); onPodConditions.add(index, builder);} - return (A)this; - } - public A setToOnPodConditions(int index,V1PodFailurePolicyOnPodConditionsPattern item) { - if (this.onPodConditions == null) {this.onPodConditions = new ArrayList();} - V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item); - if (index < 0 || index >= onPodConditions.size()) { _visitables.get("onPodConditions").add(builder); onPodConditions.add(builder); } else { _visitables.get("onPodConditions").set(index, builder); onPodConditions.set(index, builder);} - return (A)this; - } - public A addToOnPodConditions(io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern... items) { - if (this.onPodConditions == null) {this.onPodConditions = new ArrayList();} - for (V1PodFailurePolicyOnPodConditionsPattern item : items) {V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item);_visitables.get("onPodConditions").add(builder);this.onPodConditions.add(builder);} return (A)this; - } - public A addAllToOnPodConditions(Collection items) { - if (this.onPodConditions == null) {this.onPodConditions = new ArrayList();} - for (V1PodFailurePolicyOnPodConditionsPattern item : items) {V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item);_visitables.get("onPodConditions").add(builder);this.onPodConditions.add(builder);} return (A)this; - } - public A removeFromOnPodConditions(io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern... items) { - for (V1PodFailurePolicyOnPodConditionsPattern item : items) {V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item);_visitables.get("onPodConditions").remove(builder);if (this.onPodConditions != null) {this.onPodConditions.remove(builder);}} return (A)this; - } - public A removeAllFromOnPodConditions(Collection items) { - for (V1PodFailurePolicyOnPodConditionsPattern item : items) {V1PodFailurePolicyOnPodConditionsPatternBuilder builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(item);_visitables.get("onPodConditions").remove(builder);if (this.onPodConditions != null) {this.onPodConditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromOnPodConditions(Predicate predicate) { - if (onPodConditions == null) return (A) this; - final Iterator each = onPodConditions.iterator(); - final List visitables = _visitables.get("onPodConditions"); - while (each.hasNext()) { - V1PodFailurePolicyOnPodConditionsPatternBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildOnPodConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getOnPodConditions() { - return onPodConditions != null ? build(onPodConditions) : null; - } - public List buildOnPodConditions() { - return onPodConditions != null ? build(onPodConditions) : null; - } - public V1PodFailurePolicyOnPodConditionsPattern buildOnPodCondition(int index) { - return this.onPodConditions.get(index).build(); - } - public V1PodFailurePolicyOnPodConditionsPattern buildFirstOnPodCondition() { - return this.onPodConditions.get(0).build(); - } - public V1PodFailurePolicyOnPodConditionsPattern buildLastOnPodCondition() { - return this.onPodConditions.get(onPodConditions.size() - 1).build(); - } - public V1PodFailurePolicyOnPodConditionsPattern buildMatchingOnPodCondition(Predicate predicate) { - for (V1PodFailurePolicyOnPodConditionsPatternBuilder item: onPodConditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingOnPodCondition(Predicate predicate) { - for (V1PodFailurePolicyOnPodConditionsPatternBuilder item: onPodConditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withOnPodConditions(List onPodConditions) { - if (this.onPodConditions != null) { _visitables.get("onPodConditions").clear();} - if (onPodConditions != null) {this.onPodConditions = new ArrayList(); for (V1PodFailurePolicyOnPodConditionsPattern item : onPodConditions){this.addToOnPodConditions(item);}} else { this.onPodConditions = null;} return (A) this; - } - public A withOnPodConditions(io.kubernetes.client.openapi.models.V1PodFailurePolicyOnPodConditionsPattern... onPodConditions) { - if (this.onPodConditions != null) {this.onPodConditions.clear(); _visitables.remove("onPodConditions"); } - if (onPodConditions != null) {for (V1PodFailurePolicyOnPodConditionsPattern item :onPodConditions){ this.addToOnPodConditions(item);}} return (A) this; - } - public Boolean hasOnPodConditions() { - return onPodConditions != null && !onPodConditions.isEmpty(); - } - public V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNested addNewOnPodCondition() { - return new V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNestedImpl(); - } - public V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNested addNewOnPodConditionLike(V1PodFailurePolicyOnPodConditionsPattern item) { - return new V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNestedImpl(-1, item); - } - public V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNested setNewOnPodConditionLike(int index,V1PodFailurePolicyOnPodConditionsPattern item) { - return new V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNestedImpl(index, item); - } - public V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNested editOnPodCondition(int index) { - if (onPodConditions.size() <= index) throw new RuntimeException("Can't edit onPodConditions. Index exceeds size."); - return setNewOnPodConditionLike(index, buildOnPodCondition(index)); - } - public V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNested editFirstOnPodCondition() { - if (onPodConditions.size() == 0) throw new RuntimeException("Can't edit first onPodConditions. The list is empty."); - return setNewOnPodConditionLike(0, buildOnPodCondition(0)); - } - public V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNested editLastOnPodCondition() { - int index = onPodConditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last onPodConditions. The list is empty."); - return setNewOnPodConditionLike(index, buildOnPodCondition(index)); - } - public V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNested editMatchingOnPodCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1PodFailurePolicyOnExitCodesRequirementFluentImpl> implements V1PodFailurePolicyRuleFluentImpl.OnExitCodesNested,Nested{ - OnExitCodesNestedImpl(V1PodFailurePolicyOnExitCodesRequirement item) { - this.builder = new V1PodFailurePolicyOnExitCodesRequirementBuilder(this, item); - } - OnExitCodesNestedImpl() { - this.builder = new V1PodFailurePolicyOnExitCodesRequirementBuilder(this); - } - V1PodFailurePolicyOnExitCodesRequirementBuilder builder; - public N and() { - return (N) V1PodFailurePolicyRuleFluentImpl.this.withOnExitCodes(builder.build()); - } - public N endOnExitCodes() { - return and(); - } - - } - class OnPodConditionsNestedImpl extends V1PodFailurePolicyOnPodConditionsPatternFluentImpl> implements V1PodFailurePolicyRuleFluentImpl.OnPodConditionsNested,Nested{ - OnPodConditionsNestedImpl(int index,V1PodFailurePolicyOnPodConditionsPattern item) { - this.index = index; - this.builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(this, item); - } - OnPodConditionsNestedImpl() { - this.index = -1; - this.builder = new V1PodFailurePolicyOnPodConditionsPatternBuilder(this); - } - V1PodFailurePolicyOnPodConditionsPatternBuilder builder; - int index; - public N and() { - return (N) V1PodFailurePolicyRuleFluentImpl.this.setToOnPodConditions(index,builder.build()); - } - public N endOnPodCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFluent.java index 854d19b18a..39ffa72e24 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1PodFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1PodFluent.MetadataNested withNewMetadata(); - public V1PodFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1PodFluent.MetadataNested editMetadata(); - public V1PodFluent.MetadataNested editOrNewMetadata(); - public V1PodFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PodSpec getSpec(); - public V1PodSpec buildSpec(); - public A withSpec(V1PodSpec spec); - public Boolean hasSpec(); - public V1PodFluent.SpecNested withNewSpec(); - public V1PodFluent.SpecNested withNewSpecLike(V1PodSpec item); - public V1PodFluent.SpecNested editSpec(); - public V1PodFluent.SpecNested editOrNewSpec(); - public V1PodFluent.SpecNested editOrNewSpecLike(V1PodSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1PodStatus getStatus(); - public V1PodStatus buildStatus(); - public A withStatus(V1PodStatus status); - public Boolean hasStatus(); - public V1PodFluent.StatusNested withNewStatus(); - public V1PodFluent.StatusNested withNewStatusLike(V1PodStatus item); - public V1PodFluent.StatusNested editStatus(); - public V1PodFluent.StatusNested editOrNewStatus(); - public V1PodFluent.StatusNested editOrNewStatusLike(V1PodStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodFluent> extends BaseFluent{ + public V1PodFluent() { + } + + public V1PodFluent(V1Pod instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1PodSpecBuilder spec; + private V1PodStatusBuilder status; + + protected void copyInstance(V1Pod instance) { + instance = (instance != null ? instance : new V1Pod()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1PodSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1PodSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1PodSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1PodSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1PodSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1PodSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1PodSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1PodStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1PodStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1PodStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1PodStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1PodStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1PodStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodFluent that = (V1PodFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1PodFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1PodStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1PodSpecFluent> implements Nested{ + SpecNested(V1PodSpec item) { + this.builder = new V1PodSpecBuilder(this, item); + } + V1PodSpecBuilder builder; + + public N and() { + return (N) V1PodFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1PodStatusFluent> implements Nested{ + StatusNested(V1PodStatus item) { + this.builder = new V1PodStatusBuilder(this, item); + } + V1PodStatusBuilder builder; + + public N and() { + return (N) V1PodFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFluentImpl.java deleted file mode 100644 index e735cbffd1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodFluentImpl> extends BaseFluent implements V1PodFluent{ - public V1PodFluentImpl() { - } - public V1PodFluentImpl(V1Pod instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1PodSpecBuilder spec; - private V1PodStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1PodFluentImpl.MetadataNested withNewMetadata() { - return new V1PodFluentImpl.MetadataNestedImpl(); - } - public V1PodFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1PodFluentImpl.MetadataNestedImpl(item); - } - public V1PodFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PodFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1PodFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PodSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1PodSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1PodSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1PodSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1PodFluentImpl.SpecNested withNewSpec() { - return new V1PodFluentImpl.SpecNestedImpl(); - } - public V1PodFluentImpl.SpecNested withNewSpecLike(V1PodSpec item) { - return new V1PodFluentImpl.SpecNestedImpl(item); - } - public V1PodFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1PodFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1PodSpecBuilder().build()); - } - public V1PodFluentImpl.SpecNested editOrNewSpecLike(V1PodSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1PodStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1PodStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1PodStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1PodStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1PodFluentImpl.StatusNested withNewStatus() { - return new V1PodFluentImpl.StatusNestedImpl(); - } - public V1PodFluentImpl.StatusNested withNewStatusLike(V1PodStatus item) { - return new V1PodFluentImpl.StatusNestedImpl(item); - } - public V1PodFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1PodFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1PodStatusBuilder().build()); - } - public V1PodFluentImpl.StatusNested editOrNewStatusLike(V1PodStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodFluentImpl that = (V1PodFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1PodFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1PodFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1PodSpecFluentImpl> implements V1PodFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1PodSpec item) { - this.builder = new V1PodSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1PodSpecBuilder(this); - } - V1PodSpecBuilder builder; - public N and() { - return (N) V1PodFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1PodStatusFluentImpl> implements V1PodFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1PodStatus item) { - this.builder = new V1PodStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1PodStatusBuilder(this); - } - V1PodStatusBuilder builder; - public N and() { - return (N) V1PodFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPBuilder.java index 8288fcb2e1..1052ca51a4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodIPBuilder extends V1PodIPFluentImpl implements VisitableBuilder{ +public class V1PodIPBuilder extends V1PodIPFluent implements VisitableBuilder{ public V1PodIPBuilder() { - this(false); - } - public V1PodIPBuilder(Boolean validationEnabled) { - this(new V1PodIP(), validationEnabled); + this(new V1PodIP()); } + public V1PodIPBuilder(V1PodIPFluent fluent) { - this(fluent, false); - } - public V1PodIPBuilder(V1PodIPFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodIP(), validationEnabled); + this(fluent, new V1PodIP()); } + public V1PodIPBuilder(V1PodIPFluent fluent,V1PodIP instance) { - this(fluent, instance, false); - } - public V1PodIPBuilder(V1PodIPFluent fluent,V1PodIP instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withIp(instance.getIp()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodIPBuilder(V1PodIP instance) { - this(instance,false); - } - public V1PodIPBuilder(V1PodIP instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withIp(instance.getIp()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodIPFluent fluent; - Boolean validationEnabled; + public V1PodIP build() { V1PodIP buildable = new V1PodIP(); buildable.setIp(fluent.getIp()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPFluent.java index 5ff7692ed2..01133d1523 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodIPFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodIPFluent> extends Fluent{ - public String getIp(); - public A withIp(String ip); - public Boolean hasIp(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodIPFluent> extends BaseFluent{ + public V1PodIPFluent() { + } + public V1PodIPFluent(V1PodIP instance) { + this.copyInstance(instance); + } + private String ip; + + protected void copyInstance(V1PodIP instance) { + instance = (instance != null ? instance : new V1PodIP()); + if (instance != null) { + this.withIp(instance.getIp()); + } + } + + public String getIp() { + return this.ip; + } + + public A withIp(String ip) { + this.ip = ip; + return (A) this; + } + + public boolean hasIp() { + return this.ip != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodIPFluent that = (V1PodIPFluent) o; + if (!java.util.Objects.equals(ip, that.ip)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(ip, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (ip != null) { sb.append("ip:"); sb.append(ip); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListBuilder.java index fe1f7bd379..a1dac3a58d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodListBuilder extends V1PodListFluentImpl implements VisitableBuilder{ +public class V1PodListBuilder extends V1PodListFluent implements VisitableBuilder{ public V1PodListBuilder() { - this(false); - } - public V1PodListBuilder(Boolean validationEnabled) { - this(new V1PodList(), validationEnabled); + this(new V1PodList()); } + public V1PodListBuilder(V1PodListFluent fluent) { - this(fluent, false); - } - public V1PodListBuilder(V1PodListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodList(), validationEnabled); + this(fluent, new V1PodList()); } + public V1PodListBuilder(V1PodListFluent fluent,V1PodList instance) { - this(fluent, instance, false); - } - public V1PodListBuilder(V1PodListFluent fluent,V1PodList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodListBuilder(V1PodList instance) { - this(instance,false); - } - public V1PodListBuilder(V1PodList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodListFluent fluent; - Boolean validationEnabled; + public V1PodList build() { V1PodList buildable = new V1PodList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListFluent.java index a1fc7011c8..077f935acb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Pod item); - public A setToItems(int index,V1Pod item); - public A addToItems(io.kubernetes.client.openapi.models.V1Pod... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Pod... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Pod buildItem(int index); - public V1Pod buildFirstItem(); - public V1Pod buildLastItem(); - public V1Pod buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Pod... items); - public Boolean hasItems(); - public V1PodListFluent.ItemsNested addNewItem(); - public V1PodListFluent.ItemsNested addNewItemLike(V1Pod item); - public V1PodListFluent.ItemsNested setNewItemLike(int index,V1Pod item); - public V1PodListFluent.ItemsNested editItem(int index); - public V1PodListFluent.ItemsNested editFirstItem(); - public V1PodListFluent.ItemsNested editLastItem(); - public V1PodListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1PodListFluent.MetadataNested withNewMetadata(); - public V1PodListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1PodListFluent.MetadataNested editMetadata(); - public V1PodListFluent.MetadataNested editOrNewMetadata(); - public V1PodListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1PodFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodListFluent> extends BaseFluent{ + public V1PodListFluent() { + } + + public V1PodListFluent(V1PodList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1PodList instance) { + instance = (instance != null ? instance : new V1PodList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Pod item) { + if (this.items == null) {this.items = new ArrayList();} + V1PodBuilder builder = new V1PodBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Pod item) { + if (this.items == null) {this.items = new ArrayList();} + V1PodBuilder builder = new V1PodBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Pod... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Pod item : items) {V1PodBuilder builder = new V1PodBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Pod item : items) {V1PodBuilder builder = new V1PodBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Pod... items) { + if (this.items == null) return (A)this; + for (V1Pod item : items) {V1PodBuilder builder = new V1PodBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Pod item : items) {V1PodBuilder builder = new V1PodBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1PodBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Pod buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Pod buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Pod buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Pod buildMatchingItem(Predicate predicate) { + for (V1PodBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1PodBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Pod item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Pod... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Pod item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Pod item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Pod item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodListFluent that = (V1PodListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1PodFluent> implements Nested{ + ItemsNested(int index,V1Pod item) { + this.index = index; + this.builder = new V1PodBuilder(this, item); + } + V1PodBuilder builder; + int index; + public N and() { + return (N) V1PodListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1PodListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListFluentImpl.java deleted file mode 100644 index 3b06e2c848..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodListFluentImpl> extends BaseFluent implements V1PodListFluent{ - public V1PodListFluentImpl() { - } - public V1PodListFluentImpl(V1PodList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Pod item) { - if (this.items == null) {this.items = new ArrayList();} - V1PodBuilder builder = new V1PodBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Pod item) { - if (this.items == null) {this.items = new ArrayList();} - V1PodBuilder builder = new V1PodBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Pod... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Pod item : items) {V1PodBuilder builder = new V1PodBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Pod item : items) {V1PodBuilder builder = new V1PodBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Pod... items) { - for (V1Pod item : items) {V1PodBuilder builder = new V1PodBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Pod item : items) {V1PodBuilder builder = new V1PodBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1PodBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Pod buildItem(int index) { - return this.items.get(index).build(); - } - public V1Pod buildFirstItem() { - return this.items.get(0).build(); - } - public V1Pod buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Pod buildMatchingItem(Predicate predicate) { - for (V1PodBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1PodBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Pod item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Pod... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Pod item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1PodListFluentImpl.ItemsNested addNewItem() { - return new V1PodListFluentImpl.ItemsNestedImpl(); - } - public V1PodListFluentImpl.ItemsNested addNewItemLike(V1Pod item) { - return new V1PodListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1PodListFluentImpl.ItemsNested setNewItemLike(int index,V1Pod item) { - return new V1PodListFluentImpl.ItemsNestedImpl(index, item); - } - public V1PodListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1PodListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1PodListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1PodListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1PodListFluentImpl.MetadataNestedImpl(); - } - public V1PodListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1PodListFluentImpl.MetadataNestedImpl(item); - } - public V1PodListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PodListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1PodListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodListFluentImpl that = (V1PodListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1PodFluentImpl> implements V1PodListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Pod item) { - this.index = index; - this.builder = new V1PodBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1PodBuilder(this); - } - V1PodBuilder builder; - int index; - public N and() { - return (N) V1PodListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1PodListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1PodListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSBuilder.java index 4877819cbf..ce5bca133e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodOSBuilder extends V1PodOSFluentImpl implements VisitableBuilder{ +public class V1PodOSBuilder extends V1PodOSFluent implements VisitableBuilder{ public V1PodOSBuilder() { - this(false); - } - public V1PodOSBuilder(Boolean validationEnabled) { - this(new V1PodOS(), validationEnabled); + this(new V1PodOS()); } + public V1PodOSBuilder(V1PodOSFluent fluent) { - this(fluent, false); - } - public V1PodOSBuilder(V1PodOSFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodOS(), validationEnabled); + this(fluent, new V1PodOS()); } + public V1PodOSBuilder(V1PodOSFluent fluent,V1PodOS instance) { - this(fluent, instance, false); - } - public V1PodOSBuilder(V1PodOSFluent fluent,V1PodOS instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodOSBuilder(V1PodOS instance) { - this(instance,false); - } - public V1PodOSBuilder(V1PodOS instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodOSFluent fluent; - Boolean validationEnabled; + public V1PodOS build() { V1PodOS buildable = new V1PodOS(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSFluent.java index 378cb34ffb..79c5c7a911 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodOSFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodOSFluent> extends BaseFluent{ + public V1PodOSFluent() { + } + public V1PodOSFluent(V1PodOS instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1PodOS instance) { + instance = (instance != null ? instance : new V1PodOS()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodOSFluent that = (V1PodOSFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSFluentImpl.java deleted file mode 100644 index 3353d0073f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodOSFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodOSFluentImpl> extends BaseFluent implements V1PodOSFluent{ - public V1PodOSFluentImpl() { - } - public V1PodOSFluentImpl(V1PodOS instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodOSFluentImpl that = (V1PodOSFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateBuilder.java index 4917b94da5..b00d299d29 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodReadinessGateBuilder extends V1PodReadinessGateFluentImpl implements VisitableBuilder{ +public class V1PodReadinessGateBuilder extends V1PodReadinessGateFluent implements VisitableBuilder{ public V1PodReadinessGateBuilder() { - this(false); - } - public V1PodReadinessGateBuilder(Boolean validationEnabled) { - this(new V1PodReadinessGate(), validationEnabled); + this(new V1PodReadinessGate()); } + public V1PodReadinessGateBuilder(V1PodReadinessGateFluent fluent) { - this(fluent, false); - } - public V1PodReadinessGateBuilder(V1PodReadinessGateFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodReadinessGate(), validationEnabled); + this(fluent, new V1PodReadinessGate()); } + public V1PodReadinessGateBuilder(V1PodReadinessGateFluent fluent,V1PodReadinessGate instance) { - this(fluent, instance, false); - } - public V1PodReadinessGateBuilder(V1PodReadinessGateFluent fluent,V1PodReadinessGate instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditionType(instance.getConditionType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodReadinessGateBuilder(V1PodReadinessGate instance) { - this(instance,false); - } - public V1PodReadinessGateBuilder(V1PodReadinessGate instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditionType(instance.getConditionType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodReadinessGateFluent fluent; - Boolean validationEnabled; + public V1PodReadinessGate build() { V1PodReadinessGate buildable = new V1PodReadinessGate(); buildable.setConditionType(fluent.getConditionType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateFluent.java index 42b502d5e6..ac4c56f939 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodReadinessGateFluent> extends Fluent{ - public String getConditionType(); - public A withConditionType(String conditionType); - public Boolean hasConditionType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodReadinessGateFluent> extends BaseFluent{ + public V1PodReadinessGateFluent() { + } + public V1PodReadinessGateFluent(V1PodReadinessGate instance) { + this.copyInstance(instance); + } + private String conditionType; + + protected void copyInstance(V1PodReadinessGate instance) { + instance = (instance != null ? instance : new V1PodReadinessGate()); + if (instance != null) { + this.withConditionType(instance.getConditionType()); + } + } + + public String getConditionType() { + return this.conditionType; + } + + public A withConditionType(String conditionType) { + this.conditionType = conditionType; + return (A) this; + } + + public boolean hasConditionType() { + return this.conditionType != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodReadinessGateFluent that = (V1PodReadinessGateFluent) o; + if (!java.util.Objects.equals(conditionType, that.conditionType)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(conditionType, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (conditionType != null) { sb.append("conditionType:"); sb.append(conditionType); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateFluentImpl.java deleted file mode 100644 index 77643b10b1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodReadinessGateFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodReadinessGateFluentImpl> extends BaseFluent implements V1PodReadinessGateFluent{ - public V1PodReadinessGateFluentImpl() { - } - public V1PodReadinessGateFluentImpl(V1PodReadinessGate instance) { - if (instance != null) { - this.withConditionType(instance.getConditionType()); - } - } - private String conditionType; - public String getConditionType() { - return this.conditionType; - } - public A withConditionType(String conditionType) { - this.conditionType=conditionType; return (A) this; - } - public Boolean hasConditionType() { - return this.conditionType != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodReadinessGateFluentImpl that = (V1PodReadinessGateFluentImpl) o; - if (!java.util.Objects.equals(conditionType, that.conditionType)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(conditionType, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (conditionType != null) { sb.append("conditionType:"); sb.append(conditionType); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimBuilder.java index 5397ffbf44..f62e9b24cf 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodResourceClaimBuilder extends V1PodResourceClaimFluentImpl implements VisitableBuilder{ +public class V1PodResourceClaimBuilder extends V1PodResourceClaimFluent implements VisitableBuilder{ public V1PodResourceClaimBuilder() { - this(false); - } - public V1PodResourceClaimBuilder(Boolean validationEnabled) { - this(new V1PodResourceClaim(), validationEnabled); + this(new V1PodResourceClaim()); } + public V1PodResourceClaimBuilder(V1PodResourceClaimFluent fluent) { - this(fluent, false); - } - public V1PodResourceClaimBuilder(V1PodResourceClaimFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodResourceClaim(), validationEnabled); + this(fluent, new V1PodResourceClaim()); } + public V1PodResourceClaimBuilder(V1PodResourceClaimFluent fluent,V1PodResourceClaim instance) { - this(fluent, instance, false); - } - public V1PodResourceClaimBuilder(V1PodResourceClaimFluent fluent,V1PodResourceClaim instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withSource(instance.getSource()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodResourceClaimBuilder(V1PodResourceClaim instance) { - this(instance,false); - } - public V1PodResourceClaimBuilder(V1PodResourceClaim instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withSource(instance.getSource()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodResourceClaimFluent fluent; - Boolean validationEnabled; + public V1PodResourceClaim build() { V1PodResourceClaim buildable = new V1PodResourceClaim(); buildable.setName(fluent.getName()); - buildable.setSource(fluent.getSource()); + buildable.setSource(fluent.buildSource()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimFluent.java index 6a7685fd1e..06ea1764ec 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodResourceClaimFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildSource instead. - * @return The buildable object. - */ - @Deprecated - public V1ClaimSource getSource(); - public V1ClaimSource buildSource(); - public A withSource(V1ClaimSource source); - public Boolean hasSource(); - public V1PodResourceClaimFluent.SourceNested withNewSource(); - public V1PodResourceClaimFluent.SourceNested withNewSourceLike(V1ClaimSource item); - public V1PodResourceClaimFluent.SourceNested editSource(); - public V1PodResourceClaimFluent.SourceNested editOrNewSource(); - public V1PodResourceClaimFluent.SourceNested editOrNewSourceLike(V1ClaimSource item); - public interface SourceNested extends Nested,V1ClaimSourceFluent>{ - public N and(); - public N endSource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodResourceClaimFluent> extends BaseFluent{ + public V1PodResourceClaimFluent() { + } + + public V1PodResourceClaimFluent(V1PodResourceClaim instance) { + this.copyInstance(instance); + } + private String name; + private V1ClaimSourceBuilder source; + + protected void copyInstance(V1PodResourceClaim instance) { + instance = (instance != null ? instance : new V1PodResourceClaim()); + if (instance != null) { + this.withName(instance.getName()); + this.withSource(instance.getSource()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public V1ClaimSource buildSource() { + return this.source != null ? this.source.build() : null; + } + + public A withSource(V1ClaimSource source) { + this._visitables.remove("source"); + if (source != null) { + this.source = new V1ClaimSourceBuilder(source); + this._visitables.get("source").add(this.source); + } else { + this.source = null; + this._visitables.get("source").remove(this.source); + } + return (A) this; + } + + public boolean hasSource() { + return this.source != null; + } + + public SourceNested withNewSource() { + return new SourceNested(null); } + public SourceNested withNewSourceLike(V1ClaimSource item) { + return new SourceNested(item); + } + + public SourceNested editSource() { + return withNewSourceLike(java.util.Optional.ofNullable(buildSource()).orElse(null)); + } + + public SourceNested editOrNewSource() { + return withNewSourceLike(java.util.Optional.ofNullable(buildSource()).orElse(new V1ClaimSourceBuilder().build())); + } + + public SourceNested editOrNewSourceLike(V1ClaimSource item) { + return withNewSourceLike(java.util.Optional.ofNullable(buildSource()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodResourceClaimFluent that = (V1PodResourceClaimFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(source, that.source)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, source, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (source != null) { sb.append("source:"); sb.append(source); } + sb.append("}"); + return sb.toString(); + } + public class SourceNested extends V1ClaimSourceFluent> implements Nested{ + SourceNested(V1ClaimSource item) { + this.builder = new V1ClaimSourceBuilder(this, item); + } + V1ClaimSourceBuilder builder; + + public N and() { + return (N) V1PodResourceClaimFluent.this.withSource(builder.build()); + } + + public N endSource() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimFluentImpl.java deleted file mode 100644 index 69eca0be48..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodResourceClaimFluentImpl> extends BaseFluent implements V1PodResourceClaimFluent{ - public V1PodResourceClaimFluentImpl() { - } - public V1PodResourceClaimFluentImpl(V1PodResourceClaim instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withSource(instance.getSource()); - } - } - private String name; - private V1ClaimSourceBuilder source; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - - /** - * This method has been deprecated, please use method buildSource instead. - * @return The buildable object. - */ - @Deprecated - public V1ClaimSource getSource() { - return this.source!=null ?this.source.build():null; - } - public V1ClaimSource buildSource() { - return this.source!=null ?this.source.build():null; - } - public A withSource(V1ClaimSource source) { - _visitables.get("source").remove(this.source); - if (source!=null){ this.source= new V1ClaimSourceBuilder(source); _visitables.get("source").add(this.source);} else { this.source = null; _visitables.get("source").remove(this.source); } return (A) this; - } - public Boolean hasSource() { - return this.source != null; - } - public V1PodResourceClaimFluentImpl.SourceNested withNewSource() { - return new V1PodResourceClaimFluentImpl.SourceNestedImpl(); - } - public V1PodResourceClaimFluentImpl.SourceNested withNewSourceLike(V1ClaimSource item) { - return new V1PodResourceClaimFluentImpl.SourceNestedImpl(item); - } - public V1PodResourceClaimFluentImpl.SourceNested editSource() { - return withNewSourceLike(getSource()); - } - public V1PodResourceClaimFluentImpl.SourceNested editOrNewSource() { - return withNewSourceLike(getSource() != null ? getSource(): new V1ClaimSourceBuilder().build()); - } - public V1PodResourceClaimFluentImpl.SourceNested editOrNewSourceLike(V1ClaimSource item) { - return withNewSourceLike(getSource() != null ? getSource(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodResourceClaimFluentImpl that = (V1PodResourceClaimFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(source, that.source)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, source, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (source != null) { sb.append("source:"); sb.append(source); } - sb.append("}"); - return sb.toString(); - } - class SourceNestedImpl extends V1ClaimSourceFluentImpl> implements V1PodResourceClaimFluentImpl.SourceNested,Nested{ - SourceNestedImpl(V1ClaimSource item) { - this.builder = new V1ClaimSourceBuilder(this, item); - } - SourceNestedImpl() { - this.builder = new V1ClaimSourceBuilder(this); - } - V1ClaimSourceBuilder builder; - public N and() { - return (N) V1PodResourceClaimFluentImpl.this.withSource(builder.build()); - } - public N endSource() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatusBuilder.java new file mode 100644 index 0000000000..d12e578056 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatusBuilder.java @@ -0,0 +1,32 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1PodResourceClaimStatusBuilder extends V1PodResourceClaimStatusFluent implements VisitableBuilder{ + public V1PodResourceClaimStatusBuilder() { + this(new V1PodResourceClaimStatus()); + } + + public V1PodResourceClaimStatusBuilder(V1PodResourceClaimStatusFluent fluent) { + this(fluent, new V1PodResourceClaimStatus()); + } + + public V1PodResourceClaimStatusBuilder(V1PodResourceClaimStatusFluent fluent,V1PodResourceClaimStatus instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1PodResourceClaimStatusBuilder(V1PodResourceClaimStatus instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1PodResourceClaimStatusFluent fluent; + + public V1PodResourceClaimStatus build() { + V1PodResourceClaimStatus buildable = new V1PodResourceClaimStatus(); + buildable.setName(fluent.getName()); + buildable.setResourceClaimName(fluent.getResourceClaimName()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatusFluent.java new file mode 100644 index 0000000000..224f752358 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatusFluent.java @@ -0,0 +1,80 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodResourceClaimStatusFluent> extends BaseFluent{ + public V1PodResourceClaimStatusFluent() { + } + + public V1PodResourceClaimStatusFluent(V1PodResourceClaimStatus instance) { + this.copyInstance(instance); + } + private String name; + private String resourceClaimName; + + protected void copyInstance(V1PodResourceClaimStatus instance) { + instance = (instance != null ? instance : new V1PodResourceClaimStatus()); + if (instance != null) { + this.withName(instance.getName()); + this.withResourceClaimName(instance.getResourceClaimName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getResourceClaimName() { + return this.resourceClaimName; + } + + public A withResourceClaimName(String resourceClaimName) { + this.resourceClaimName = resourceClaimName; + return (A) this; + } + + public boolean hasResourceClaimName() { + return this.resourceClaimName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodResourceClaimStatusFluent that = (V1PodResourceClaimStatusFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(resourceClaimName, that.resourceClaimName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, resourceClaimName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (resourceClaimName != null) { sb.append("resourceClaimName:"); sb.append(resourceClaimName); } + sb.append("}"); + return sb.toString(); + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateBuilder.java index bbe12a4448..9ed519a22d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodSchedulingGateBuilder extends V1PodSchedulingGateFluentImpl implements VisitableBuilder{ +public class V1PodSchedulingGateBuilder extends V1PodSchedulingGateFluent implements VisitableBuilder{ public V1PodSchedulingGateBuilder() { - this(false); - } - public V1PodSchedulingGateBuilder(Boolean validationEnabled) { - this(new V1PodSchedulingGate(), validationEnabled); + this(new V1PodSchedulingGate()); } + public V1PodSchedulingGateBuilder(V1PodSchedulingGateFluent fluent) { - this(fluent, false); - } - public V1PodSchedulingGateBuilder(V1PodSchedulingGateFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodSchedulingGate(), validationEnabled); + this(fluent, new V1PodSchedulingGate()); } + public V1PodSchedulingGateBuilder(V1PodSchedulingGateFluent fluent,V1PodSchedulingGate instance) { - this(fluent, instance, false); - } - public V1PodSchedulingGateBuilder(V1PodSchedulingGateFluent fluent,V1PodSchedulingGate instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodSchedulingGateBuilder(V1PodSchedulingGate instance) { - this(instance,false); - } - public V1PodSchedulingGateBuilder(V1PodSchedulingGate instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodSchedulingGateFluent fluent; - Boolean validationEnabled; + public V1PodSchedulingGate build() { V1PodSchedulingGate buildable = new V1PodSchedulingGate(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateFluent.java index c808f50837..cb4b1c268a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodSchedulingGateFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodSchedulingGateFluent> extends BaseFluent{ + public V1PodSchedulingGateFluent() { + } + public V1PodSchedulingGateFluent(V1PodSchedulingGate instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1PodSchedulingGate instance) { + instance = (instance != null ? instance : new V1PodSchedulingGate()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodSchedulingGateFluent that = (V1PodSchedulingGateFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateFluentImpl.java deleted file mode 100644 index e900f99b8f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSchedulingGateFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodSchedulingGateFluentImpl> extends BaseFluent implements V1PodSchedulingGateFluent{ - public V1PodSchedulingGateFluentImpl() { - } - public V1PodSchedulingGateFluentImpl(V1PodSchedulingGate instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodSchedulingGateFluentImpl that = (V1PodSchedulingGateFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextBuilder.java index 47704495a1..faaa06ad8a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextBuilder.java @@ -1,60 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodSecurityContextBuilder extends V1PodSecurityContextFluentImpl implements VisitableBuilder{ +public class V1PodSecurityContextBuilder extends V1PodSecurityContextFluent implements VisitableBuilder{ public V1PodSecurityContextBuilder() { - this(false); - } - public V1PodSecurityContextBuilder(Boolean validationEnabled) { - this(new V1PodSecurityContext(), validationEnabled); + this(new V1PodSecurityContext()); } + public V1PodSecurityContextBuilder(V1PodSecurityContextFluent fluent) { - this(fluent, false); - } - public V1PodSecurityContextBuilder(V1PodSecurityContextFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodSecurityContext(), validationEnabled); + this(fluent, new V1PodSecurityContext()); } + public V1PodSecurityContextBuilder(V1PodSecurityContextFluent fluent,V1PodSecurityContext instance) { - this(fluent, instance, false); - } - public V1PodSecurityContextBuilder(V1PodSecurityContextFluent fluent,V1PodSecurityContext instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsGroup(instance.getFsGroup()); - fluent.withFsGroupChangePolicy(instance.getFsGroupChangePolicy()); - fluent.withRunAsGroup(instance.getRunAsGroup()); - fluent.withRunAsNonRoot(instance.getRunAsNonRoot()); - fluent.withRunAsUser(instance.getRunAsUser()); - fluent.withSeLinuxOptions(instance.getSeLinuxOptions()); - fluent.withSeccompProfile(instance.getSeccompProfile()); - fluent.withSupplementalGroups(instance.getSupplementalGroups()); - fluent.withSysctls(instance.getSysctls()); - fluent.withWindowsOptions(instance.getWindowsOptions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodSecurityContextBuilder(V1PodSecurityContext instance) { - this(instance,false); - } - public V1PodSecurityContextBuilder(V1PodSecurityContext instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsGroup(instance.getFsGroup()); - this.withFsGroupChangePolicy(instance.getFsGroupChangePolicy()); - this.withRunAsGroup(instance.getRunAsGroup()); - this.withRunAsNonRoot(instance.getRunAsNonRoot()); - this.withRunAsUser(instance.getRunAsUser()); - this.withSeLinuxOptions(instance.getSeLinuxOptions()); - this.withSeccompProfile(instance.getSeccompProfile()); - this.withSupplementalGroups(instance.getSupplementalGroups()); - this.withSysctls(instance.getSysctls()); - this.withWindowsOptions(instance.getWindowsOptions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodSecurityContextFluent fluent; - Boolean validationEnabled; + public V1PodSecurityContext build() { V1PodSecurityContext buildable = new V1PodSecurityContext(); buildable.setFsGroup(fluent.getFsGroup()); @@ -62,12 +28,13 @@ public V1PodSecurityContext build() { buildable.setRunAsGroup(fluent.getRunAsGroup()); buildable.setRunAsNonRoot(fluent.getRunAsNonRoot()); buildable.setRunAsUser(fluent.getRunAsUser()); - buildable.setSeLinuxOptions(fluent.getSeLinuxOptions()); - buildable.setSeccompProfile(fluent.getSeccompProfile()); + buildable.setSeLinuxOptions(fluent.buildSeLinuxOptions()); + buildable.setSeccompProfile(fluent.buildSeccompProfile()); buildable.setSupplementalGroups(fluent.getSupplementalGroups()); - buildable.setSysctls(fluent.getSysctls()); - buildable.setWindowsOptions(fluent.getWindowsOptions()); + buildable.setSysctls(fluent.buildSysctls()); + buildable.setWindowsOptions(fluent.buildWindowsOptions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextFluent.java index c75997233d..e4998675fb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextFluent.java @@ -1,148 +1,594 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.List; import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.lang.Long; import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1PodSecurityContextFluent> extends Fluent{ - public Long getFsGroup(); - public A withFsGroup(Long fsGroup); - public Boolean hasFsGroup(); - public String getFsGroupChangePolicy(); - public A withFsGroupChangePolicy(String fsGroupChangePolicy); - public Boolean hasFsGroupChangePolicy(); - public Long getRunAsGroup(); - public A withRunAsGroup(Long runAsGroup); - public Boolean hasRunAsGroup(); - public Boolean getRunAsNonRoot(); - public A withRunAsNonRoot(Boolean runAsNonRoot); - public Boolean hasRunAsNonRoot(); - public Long getRunAsUser(); - public A withRunAsUser(Long runAsUser); - public Boolean hasRunAsUser(); - - /** - * This method has been deprecated, please use method buildSeLinuxOptions instead. - * @return The buildable object. - */ - @Deprecated - public V1SELinuxOptions getSeLinuxOptions(); - public V1SELinuxOptions buildSeLinuxOptions(); - public A withSeLinuxOptions(V1SELinuxOptions seLinuxOptions); - public Boolean hasSeLinuxOptions(); - public V1PodSecurityContextFluent.SeLinuxOptionsNested withNewSeLinuxOptions(); - public V1PodSecurityContextFluent.SeLinuxOptionsNested withNewSeLinuxOptionsLike(V1SELinuxOptions item); - public V1PodSecurityContextFluent.SeLinuxOptionsNested editSeLinuxOptions(); - public V1PodSecurityContextFluent.SeLinuxOptionsNested editOrNewSeLinuxOptions(); - public V1PodSecurityContextFluent.SeLinuxOptionsNested editOrNewSeLinuxOptionsLike(V1SELinuxOptions item); - - /** - * This method has been deprecated, please use method buildSeccompProfile instead. - * @return The buildable object. - */ - @Deprecated - public V1SeccompProfile getSeccompProfile(); - public V1SeccompProfile buildSeccompProfile(); - public A withSeccompProfile(V1SeccompProfile seccompProfile); - public Boolean hasSeccompProfile(); - public V1PodSecurityContextFluent.SeccompProfileNested withNewSeccompProfile(); - public V1PodSecurityContextFluent.SeccompProfileNested withNewSeccompProfileLike(V1SeccompProfile item); - public V1PodSecurityContextFluent.SeccompProfileNested editSeccompProfile(); - public V1PodSecurityContextFluent.SeccompProfileNested editOrNewSeccompProfile(); - public V1PodSecurityContextFluent.SeccompProfileNested editOrNewSeccompProfileLike(V1SeccompProfile item); - public A addToSupplementalGroups(int index,Long item); - public A setToSupplementalGroups(int index,Long item); - public A addToSupplementalGroups(java.lang.Long... items); - public A addAllToSupplementalGroups(Collection items); - public A removeFromSupplementalGroups(java.lang.Long... items); - public A removeAllFromSupplementalGroups(Collection items); - public List getSupplementalGroups(); - public Long getSupplementalGroup(int index); - public Long getFirstSupplementalGroup(); - public Long getLastSupplementalGroup(); - public Long getMatchingSupplementalGroup(Predicate predicate); - public Boolean hasMatchingSupplementalGroup(Predicate predicate); - public A withSupplementalGroups(List supplementalGroups); - public A withSupplementalGroups(java.lang.Long... supplementalGroups); - public Boolean hasSupplementalGroups(); - public A addToSysctls(int index,V1Sysctl item); - public A setToSysctls(int index,V1Sysctl item); - public A addToSysctls(io.kubernetes.client.openapi.models.V1Sysctl... items); - public A addAllToSysctls(Collection items); - public A removeFromSysctls(io.kubernetes.client.openapi.models.V1Sysctl... items); - public A removeAllFromSysctls(Collection items); - public A removeMatchingFromSysctls(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSysctls instead. - * @return The buildable object. - */ - @Deprecated - public List getSysctls(); - public List buildSysctls(); - public V1Sysctl buildSysctl(int index); - public V1Sysctl buildFirstSysctl(); - public V1Sysctl buildLastSysctl(); - public V1Sysctl buildMatchingSysctl(Predicate predicate); - public Boolean hasMatchingSysctl(Predicate predicate); - public A withSysctls(List sysctls); - public A withSysctls(io.kubernetes.client.openapi.models.V1Sysctl... sysctls); - public Boolean hasSysctls(); - public V1PodSecurityContextFluent.SysctlsNested addNewSysctl(); - public V1PodSecurityContextFluent.SysctlsNested addNewSysctlLike(V1Sysctl item); - public V1PodSecurityContextFluent.SysctlsNested setNewSysctlLike(int index,V1Sysctl item); - public V1PodSecurityContextFluent.SysctlsNested editSysctl(int index); - public V1PodSecurityContextFluent.SysctlsNested editFirstSysctl(); - public V1PodSecurityContextFluent.SysctlsNested editLastSysctl(); - public V1PodSecurityContextFluent.SysctlsNested editMatchingSysctl(Predicate predicate); - - /** - * This method has been deprecated, please use method buildWindowsOptions instead. - * @return The buildable object. - */ - @Deprecated - public V1WindowsSecurityContextOptions getWindowsOptions(); - public V1WindowsSecurityContextOptions buildWindowsOptions(); - public A withWindowsOptions(V1WindowsSecurityContextOptions windowsOptions); - public Boolean hasWindowsOptions(); - public V1PodSecurityContextFluent.WindowsOptionsNested withNewWindowsOptions(); - public V1PodSecurityContextFluent.WindowsOptionsNested withNewWindowsOptionsLike(V1WindowsSecurityContextOptions item); - public V1PodSecurityContextFluent.WindowsOptionsNested editWindowsOptions(); - public V1PodSecurityContextFluent.WindowsOptionsNested editOrNewWindowsOptions(); - public V1PodSecurityContextFluent.WindowsOptionsNested editOrNewWindowsOptionsLike(V1WindowsSecurityContextOptions item); - public A withRunAsNonRoot(); - public interface SeLinuxOptionsNested extends Nested,V1SELinuxOptionsFluent>{ - public N and(); - public N endSeLinuxOptions(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodSecurityContextFluent> extends BaseFluent{ + public V1PodSecurityContextFluent() { + } + + public V1PodSecurityContextFluent(V1PodSecurityContext instance) { + this.copyInstance(instance); + } + private Long fsGroup; + private String fsGroupChangePolicy; + private Long runAsGroup; + private Boolean runAsNonRoot; + private Long runAsUser; + private V1SELinuxOptionsBuilder seLinuxOptions; + private V1SeccompProfileBuilder seccompProfile; + private List supplementalGroups; + private ArrayList sysctls; + private V1WindowsSecurityContextOptionsBuilder windowsOptions; + + protected void copyInstance(V1PodSecurityContext instance) { + instance = (instance != null ? instance : new V1PodSecurityContext()); + if (instance != null) { + this.withFsGroup(instance.getFsGroup()); + this.withFsGroupChangePolicy(instance.getFsGroupChangePolicy()); + this.withRunAsGroup(instance.getRunAsGroup()); + this.withRunAsNonRoot(instance.getRunAsNonRoot()); + this.withRunAsUser(instance.getRunAsUser()); + this.withSeLinuxOptions(instance.getSeLinuxOptions()); + this.withSeccompProfile(instance.getSeccompProfile()); + this.withSupplementalGroups(instance.getSupplementalGroups()); + this.withSysctls(instance.getSysctls()); + this.withWindowsOptions(instance.getWindowsOptions()); + } + } + + public Long getFsGroup() { + return this.fsGroup; + } + + public A withFsGroup(Long fsGroup) { + this.fsGroup = fsGroup; + return (A) this; + } + + public boolean hasFsGroup() { + return this.fsGroup != null; + } + + public String getFsGroupChangePolicy() { + return this.fsGroupChangePolicy; + } + + public A withFsGroupChangePolicy(String fsGroupChangePolicy) { + this.fsGroupChangePolicy = fsGroupChangePolicy; + return (A) this; + } + + public boolean hasFsGroupChangePolicy() { + return this.fsGroupChangePolicy != null; + } + + public Long getRunAsGroup() { + return this.runAsGroup; + } + + public A withRunAsGroup(Long runAsGroup) { + this.runAsGroup = runAsGroup; + return (A) this; + } + + public boolean hasRunAsGroup() { + return this.runAsGroup != null; + } + + public Boolean getRunAsNonRoot() { + return this.runAsNonRoot; + } + + public A withRunAsNonRoot(Boolean runAsNonRoot) { + this.runAsNonRoot = runAsNonRoot; + return (A) this; + } + + public boolean hasRunAsNonRoot() { + return this.runAsNonRoot != null; + } + + public Long getRunAsUser() { + return this.runAsUser; + } + + public A withRunAsUser(Long runAsUser) { + this.runAsUser = runAsUser; + return (A) this; + } + + public boolean hasRunAsUser() { + return this.runAsUser != null; + } + + public V1SELinuxOptions buildSeLinuxOptions() { + return this.seLinuxOptions != null ? this.seLinuxOptions.build() : null; + } + + public A withSeLinuxOptions(V1SELinuxOptions seLinuxOptions) { + this._visitables.remove("seLinuxOptions"); + if (seLinuxOptions != null) { + this.seLinuxOptions = new V1SELinuxOptionsBuilder(seLinuxOptions); + this._visitables.get("seLinuxOptions").add(this.seLinuxOptions); + } else { + this.seLinuxOptions = null; + this._visitables.get("seLinuxOptions").remove(this.seLinuxOptions); + } + return (A) this; + } + + public boolean hasSeLinuxOptions() { + return this.seLinuxOptions != null; + } + + public SeLinuxOptionsNested withNewSeLinuxOptions() { + return new SeLinuxOptionsNested(null); + } + + public SeLinuxOptionsNested withNewSeLinuxOptionsLike(V1SELinuxOptions item) { + return new SeLinuxOptionsNested(item); + } + + public SeLinuxOptionsNested editSeLinuxOptions() { + return withNewSeLinuxOptionsLike(java.util.Optional.ofNullable(buildSeLinuxOptions()).orElse(null)); + } + + public SeLinuxOptionsNested editOrNewSeLinuxOptions() { + return withNewSeLinuxOptionsLike(java.util.Optional.ofNullable(buildSeLinuxOptions()).orElse(new V1SELinuxOptionsBuilder().build())); + } + + public SeLinuxOptionsNested editOrNewSeLinuxOptionsLike(V1SELinuxOptions item) { + return withNewSeLinuxOptionsLike(java.util.Optional.ofNullable(buildSeLinuxOptions()).orElse(item)); + } + + public V1SeccompProfile buildSeccompProfile() { + return this.seccompProfile != null ? this.seccompProfile.build() : null; + } + + public A withSeccompProfile(V1SeccompProfile seccompProfile) { + this._visitables.remove("seccompProfile"); + if (seccompProfile != null) { + this.seccompProfile = new V1SeccompProfileBuilder(seccompProfile); + this._visitables.get("seccompProfile").add(this.seccompProfile); + } else { + this.seccompProfile = null; + this._visitables.get("seccompProfile").remove(this.seccompProfile); + } + return (A) this; + } + + public boolean hasSeccompProfile() { + return this.seccompProfile != null; + } + + public SeccompProfileNested withNewSeccompProfile() { + return new SeccompProfileNested(null); + } + + public SeccompProfileNested withNewSeccompProfileLike(V1SeccompProfile item) { + return new SeccompProfileNested(item); + } + + public SeccompProfileNested editSeccompProfile() { + return withNewSeccompProfileLike(java.util.Optional.ofNullable(buildSeccompProfile()).orElse(null)); + } + + public SeccompProfileNested editOrNewSeccompProfile() { + return withNewSeccompProfileLike(java.util.Optional.ofNullable(buildSeccompProfile()).orElse(new V1SeccompProfileBuilder().build())); + } + + public SeccompProfileNested editOrNewSeccompProfileLike(V1SeccompProfile item) { + return withNewSeccompProfileLike(java.util.Optional.ofNullable(buildSeccompProfile()).orElse(item)); + } + + public A addToSupplementalGroups(int index,Long item) { + if (this.supplementalGroups == null) {this.supplementalGroups = new ArrayList();} + this.supplementalGroups.add(index, item); + return (A)this; + } + + public A setToSupplementalGroups(int index,Long item) { + if (this.supplementalGroups == null) {this.supplementalGroups = new ArrayList();} + this.supplementalGroups.set(index, item); return (A)this; + } + + public A addToSupplementalGroups(java.lang.Long... items) { + if (this.supplementalGroups == null) {this.supplementalGroups = new ArrayList();} + for (Long item : items) {this.supplementalGroups.add(item);} return (A)this; + } + + public A addAllToSupplementalGroups(Collection items) { + if (this.supplementalGroups == null) {this.supplementalGroups = new ArrayList();} + for (Long item : items) {this.supplementalGroups.add(item);} return (A)this; + } + + public A removeFromSupplementalGroups(java.lang.Long... items) { + if (this.supplementalGroups == null) return (A)this; + for (Long item : items) { this.supplementalGroups.remove(item);} return (A)this; + } + + public A removeAllFromSupplementalGroups(Collection items) { + if (this.supplementalGroups == null) return (A)this; + for (Long item : items) { this.supplementalGroups.remove(item);} return (A)this; + } + + public List getSupplementalGroups() { + return this.supplementalGroups; + } + + public Long getSupplementalGroup(int index) { + return this.supplementalGroups.get(index); + } + + public Long getFirstSupplementalGroup() { + return this.supplementalGroups.get(0); + } + + public Long getLastSupplementalGroup() { + return this.supplementalGroups.get(supplementalGroups.size() - 1); + } + + public Long getMatchingSupplementalGroup(Predicate predicate) { + for (Long item : supplementalGroups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingSupplementalGroup(Predicate predicate) { + for (Long item : supplementalGroups) { + if (predicate.test(item)) { + return true; + } + } + return false; } - public interface SeccompProfileNested extends Nested,V1SeccompProfileFluent>{ - public N and(); - public N endSeccompProfile(); + + public A withSupplementalGroups(List supplementalGroups) { + if (supplementalGroups != null) { + this.supplementalGroups = new ArrayList(); + for (Long item : supplementalGroups) { + this.addToSupplementalGroups(item); + } + } else { + this.supplementalGroups = null; + } + return (A) this; + } + + public A withSupplementalGroups(java.lang.Long... supplementalGroups) { + if (this.supplementalGroups != null) { + this.supplementalGroups.clear(); + _visitables.remove("supplementalGroups"); + } + if (supplementalGroups != null) { + for (Long item : supplementalGroups) { + this.addToSupplementalGroups(item); + } + } + return (A) this; + } + + public boolean hasSupplementalGroups() { + return this.supplementalGroups != null && !this.supplementalGroups.isEmpty(); + } + + public A addToSysctls(int index,V1Sysctl item) { + if (this.sysctls == null) {this.sysctls = new ArrayList();} + V1SysctlBuilder builder = new V1SysctlBuilder(item); + if (index < 0 || index >= sysctls.size()) { _visitables.get("sysctls").add(builder); sysctls.add(builder); } else { _visitables.get("sysctls").add(index, builder); sysctls.add(index, builder);} + return (A)this; + } + + public A setToSysctls(int index,V1Sysctl item) { + if (this.sysctls == null) {this.sysctls = new ArrayList();} + V1SysctlBuilder builder = new V1SysctlBuilder(item); + if (index < 0 || index >= sysctls.size()) { _visitables.get("sysctls").add(builder); sysctls.add(builder); } else { _visitables.get("sysctls").set(index, builder); sysctls.set(index, builder);} + return (A)this; + } + + public A addToSysctls(io.kubernetes.client.openapi.models.V1Sysctl... items) { + if (this.sysctls == null) {this.sysctls = new ArrayList();} + for (V1Sysctl item : items) {V1SysctlBuilder builder = new V1SysctlBuilder(item);_visitables.get("sysctls").add(builder);this.sysctls.add(builder);} return (A)this; + } + + public A addAllToSysctls(Collection items) { + if (this.sysctls == null) {this.sysctls = new ArrayList();} + for (V1Sysctl item : items) {V1SysctlBuilder builder = new V1SysctlBuilder(item);_visitables.get("sysctls").add(builder);this.sysctls.add(builder);} return (A)this; + } + + public A removeFromSysctls(io.kubernetes.client.openapi.models.V1Sysctl... items) { + if (this.sysctls == null) return (A)this; + for (V1Sysctl item : items) {V1SysctlBuilder builder = new V1SysctlBuilder(item);_visitables.get("sysctls").remove(builder); this.sysctls.remove(builder);} return (A)this; + } + + public A removeAllFromSysctls(Collection items) { + if (this.sysctls == null) return (A)this; + for (V1Sysctl item : items) {V1SysctlBuilder builder = new V1SysctlBuilder(item);_visitables.get("sysctls").remove(builder); this.sysctls.remove(builder);} return (A)this; + } + + public A removeMatchingFromSysctls(Predicate predicate) { + if (sysctls == null) return (A) this; + final Iterator each = sysctls.iterator(); + final List visitables = _visitables.get("sysctls"); + while (each.hasNext()) { + V1SysctlBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildSysctls() { + return this.sysctls != null ? build(sysctls) : null; + } + + public V1Sysctl buildSysctl(int index) { + return this.sysctls.get(index).build(); + } + + public V1Sysctl buildFirstSysctl() { + return this.sysctls.get(0).build(); + } + + public V1Sysctl buildLastSysctl() { + return this.sysctls.get(sysctls.size() - 1).build(); + } + + public V1Sysctl buildMatchingSysctl(Predicate predicate) { + for (V1SysctlBuilder item : sysctls) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingSysctl(Predicate predicate) { + for (V1SysctlBuilder item : sysctls) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSysctls(List sysctls) { + if (this.sysctls != null) { + this._visitables.get("sysctls").clear(); + } + if (sysctls != null) { + this.sysctls = new ArrayList(); + for (V1Sysctl item : sysctls) { + this.addToSysctls(item); + } + } else { + this.sysctls = null; + } + return (A) this; + } + + public A withSysctls(io.kubernetes.client.openapi.models.V1Sysctl... sysctls) { + if (this.sysctls != null) { + this.sysctls.clear(); + _visitables.remove("sysctls"); + } + if (sysctls != null) { + for (V1Sysctl item : sysctls) { + this.addToSysctls(item); + } + } + return (A) this; + } + + public boolean hasSysctls() { + return this.sysctls != null && !this.sysctls.isEmpty(); + } + + public SysctlsNested addNewSysctl() { + return new SysctlsNested(-1, null); + } + + public SysctlsNested addNewSysctlLike(V1Sysctl item) { + return new SysctlsNested(-1, item); + } + + public SysctlsNested setNewSysctlLike(int index,V1Sysctl item) { + return new SysctlsNested(index, item); + } + + public SysctlsNested editSysctl(int index) { + if (sysctls.size() <= index) throw new RuntimeException("Can't edit sysctls. Index exceeds size."); + return setNewSysctlLike(index, buildSysctl(index)); + } + + public SysctlsNested editFirstSysctl() { + if (sysctls.size() == 0) throw new RuntimeException("Can't edit first sysctls. The list is empty."); + return setNewSysctlLike(0, buildSysctl(0)); + } + + public SysctlsNested editLastSysctl() { + int index = sysctls.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last sysctls. The list is empty."); + return setNewSysctlLike(index, buildSysctl(index)); + } + + public SysctlsNested editMatchingSysctl(Predicate predicate) { + int index = -1; + for (int i=0;i withNewWindowsOptions() { + return new WindowsOptionsNested(null); + } + + public WindowsOptionsNested withNewWindowsOptionsLike(V1WindowsSecurityContextOptions item) { + return new WindowsOptionsNested(item); + } + + public WindowsOptionsNested editWindowsOptions() { + return withNewWindowsOptionsLike(java.util.Optional.ofNullable(buildWindowsOptions()).orElse(null)); + } + + public WindowsOptionsNested editOrNewWindowsOptions() { + return withNewWindowsOptionsLike(java.util.Optional.ofNullable(buildWindowsOptions()).orElse(new V1WindowsSecurityContextOptionsBuilder().build())); + } + + public WindowsOptionsNested editOrNewWindowsOptionsLike(V1WindowsSecurityContextOptions item) { + return withNewWindowsOptionsLike(java.util.Optional.ofNullable(buildWindowsOptions()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodSecurityContextFluent that = (V1PodSecurityContextFluent) o; + if (!java.util.Objects.equals(fsGroup, that.fsGroup)) return false; + if (!java.util.Objects.equals(fsGroupChangePolicy, that.fsGroupChangePolicy)) return false; + if (!java.util.Objects.equals(runAsGroup, that.runAsGroup)) return false; + if (!java.util.Objects.equals(runAsNonRoot, that.runAsNonRoot)) return false; + if (!java.util.Objects.equals(runAsUser, that.runAsUser)) return false; + if (!java.util.Objects.equals(seLinuxOptions, that.seLinuxOptions)) return false; + if (!java.util.Objects.equals(seccompProfile, that.seccompProfile)) return false; + if (!java.util.Objects.equals(supplementalGroups, that.supplementalGroups)) return false; + if (!java.util.Objects.equals(sysctls, that.sysctls)) return false; + if (!java.util.Objects.equals(windowsOptions, that.windowsOptions)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsGroup, fsGroupChangePolicy, runAsGroup, runAsNonRoot, runAsUser, seLinuxOptions, seccompProfile, supplementalGroups, sysctls, windowsOptions, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsGroup != null) { sb.append("fsGroup:"); sb.append(fsGroup + ","); } + if (fsGroupChangePolicy != null) { sb.append("fsGroupChangePolicy:"); sb.append(fsGroupChangePolicy + ","); } + if (runAsGroup != null) { sb.append("runAsGroup:"); sb.append(runAsGroup + ","); } + if (runAsNonRoot != null) { sb.append("runAsNonRoot:"); sb.append(runAsNonRoot + ","); } + if (runAsUser != null) { sb.append("runAsUser:"); sb.append(runAsUser + ","); } + if (seLinuxOptions != null) { sb.append("seLinuxOptions:"); sb.append(seLinuxOptions + ","); } + if (seccompProfile != null) { sb.append("seccompProfile:"); sb.append(seccompProfile + ","); } + if (supplementalGroups != null && !supplementalGroups.isEmpty()) { sb.append("supplementalGroups:"); sb.append(supplementalGroups + ","); } + if (sysctls != null && !sysctls.isEmpty()) { sb.append("sysctls:"); sb.append(sysctls + ","); } + if (windowsOptions != null) { sb.append("windowsOptions:"); sb.append(windowsOptions); } + sb.append("}"); + return sb.toString(); + } + + public A withRunAsNonRoot() { + return withRunAsNonRoot(true); + } + public class SeLinuxOptionsNested extends V1SELinuxOptionsFluent> implements Nested{ + SeLinuxOptionsNested(V1SELinuxOptions item) { + this.builder = new V1SELinuxOptionsBuilder(this, item); + } + V1SELinuxOptionsBuilder builder; + + public N and() { + return (N) V1PodSecurityContextFluent.this.withSeLinuxOptions(builder.build()); + } + public N endSeLinuxOptions() { + return and(); + } + + } - public interface SysctlsNested extends Nested,V1SysctlFluent>{ - public N and(); - public N endSysctl(); + public class SeccompProfileNested extends V1SeccompProfileFluent> implements Nested{ + SeccompProfileNested(V1SeccompProfile item) { + this.builder = new V1SeccompProfileBuilder(this, item); + } + V1SeccompProfileBuilder builder; + public N and() { + return (N) V1PodSecurityContextFluent.this.withSeccompProfile(builder.build()); + } + + public N endSeccompProfile() { + return and(); + } + + } - public interface WindowsOptionsNested extends Nested,V1WindowsSecurityContextOptionsFluent>{ - public N and(); - public N endWindowsOptions(); + public class SysctlsNested extends V1SysctlFluent> implements Nested{ + SysctlsNested(int index,V1Sysctl item) { + this.index = index; + this.builder = new V1SysctlBuilder(this, item); + } + V1SysctlBuilder builder; + int index; + public N and() { + return (N) V1PodSecurityContextFluent.this.setToSysctls(index,builder.build()); + } + + public N endSysctl() { + return and(); + } + + } + public class WindowsOptionsNested extends V1WindowsSecurityContextOptionsFluent> implements Nested{ + WindowsOptionsNested(V1WindowsSecurityContextOptions item) { + this.builder = new V1WindowsSecurityContextOptionsBuilder(this, item); + } + V1WindowsSecurityContextOptionsBuilder builder; + + public N and() { + return (N) V1PodSecurityContextFluent.this.withWindowsOptions(builder.build()); + } + + public N endWindowsOptions() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextFluentImpl.java deleted file mode 100644 index c7884522fa..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSecurityContextFluentImpl.java +++ /dev/null @@ -1,471 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodSecurityContextFluentImpl> extends BaseFluent implements V1PodSecurityContextFluent{ - public V1PodSecurityContextFluentImpl() { - } - public V1PodSecurityContextFluentImpl(V1PodSecurityContext instance) { - if (instance != null) { - this.withFsGroup(instance.getFsGroup()); - this.withFsGroupChangePolicy(instance.getFsGroupChangePolicy()); - this.withRunAsGroup(instance.getRunAsGroup()); - this.withRunAsNonRoot(instance.getRunAsNonRoot()); - this.withRunAsUser(instance.getRunAsUser()); - this.withSeLinuxOptions(instance.getSeLinuxOptions()); - this.withSeccompProfile(instance.getSeccompProfile()); - this.withSupplementalGroups(instance.getSupplementalGroups()); - this.withSysctls(instance.getSysctls()); - this.withWindowsOptions(instance.getWindowsOptions()); - } - } - private Long fsGroup; - private String fsGroupChangePolicy; - private Long runAsGroup; - private Boolean runAsNonRoot; - private Long runAsUser; - private V1SELinuxOptionsBuilder seLinuxOptions; - private V1SeccompProfileBuilder seccompProfile; - private List supplementalGroups; - private ArrayList sysctls; - private V1WindowsSecurityContextOptionsBuilder windowsOptions; - public Long getFsGroup() { - return this.fsGroup; - } - public A withFsGroup(Long fsGroup) { - this.fsGroup=fsGroup; return (A) this; - } - public Boolean hasFsGroup() { - return this.fsGroup != null; - } - public String getFsGroupChangePolicy() { - return this.fsGroupChangePolicy; - } - public A withFsGroupChangePolicy(String fsGroupChangePolicy) { - this.fsGroupChangePolicy=fsGroupChangePolicy; return (A) this; - } - public Boolean hasFsGroupChangePolicy() { - return this.fsGroupChangePolicy != null; - } - public Long getRunAsGroup() { - return this.runAsGroup; - } - public A withRunAsGroup(Long runAsGroup) { - this.runAsGroup=runAsGroup; return (A) this; - } - public Boolean hasRunAsGroup() { - return this.runAsGroup != null; - } - public Boolean getRunAsNonRoot() { - return this.runAsNonRoot; - } - public A withRunAsNonRoot(Boolean runAsNonRoot) { - this.runAsNonRoot=runAsNonRoot; return (A) this; - } - public Boolean hasRunAsNonRoot() { - return this.runAsNonRoot != null; - } - public Long getRunAsUser() { - return this.runAsUser; - } - public A withRunAsUser(Long runAsUser) { - this.runAsUser=runAsUser; return (A) this; - } - public Boolean hasRunAsUser() { - return this.runAsUser != null; - } - - /** - * This method has been deprecated, please use method buildSeLinuxOptions instead. - * @return The buildable object. - */ - @Deprecated - public V1SELinuxOptions getSeLinuxOptions() { - return this.seLinuxOptions!=null ?this.seLinuxOptions.build():null; - } - public V1SELinuxOptions buildSeLinuxOptions() { - return this.seLinuxOptions!=null ?this.seLinuxOptions.build():null; - } - public A withSeLinuxOptions(V1SELinuxOptions seLinuxOptions) { - _visitables.get("seLinuxOptions").remove(this.seLinuxOptions); - if (seLinuxOptions!=null){ this.seLinuxOptions= new V1SELinuxOptionsBuilder(seLinuxOptions); _visitables.get("seLinuxOptions").add(this.seLinuxOptions);} else { this.seLinuxOptions = null; _visitables.get("seLinuxOptions").remove(this.seLinuxOptions); } return (A) this; - } - public Boolean hasSeLinuxOptions() { - return this.seLinuxOptions != null; - } - public V1PodSecurityContextFluentImpl.SeLinuxOptionsNested withNewSeLinuxOptions() { - return new V1PodSecurityContextFluentImpl.SeLinuxOptionsNestedImpl(); - } - public V1PodSecurityContextFluentImpl.SeLinuxOptionsNested withNewSeLinuxOptionsLike(V1SELinuxOptions item) { - return new V1PodSecurityContextFluentImpl.SeLinuxOptionsNestedImpl(item); - } - public V1PodSecurityContextFluentImpl.SeLinuxOptionsNested editSeLinuxOptions() { - return withNewSeLinuxOptionsLike(getSeLinuxOptions()); - } - public V1PodSecurityContextFluentImpl.SeLinuxOptionsNested editOrNewSeLinuxOptions() { - return withNewSeLinuxOptionsLike(getSeLinuxOptions() != null ? getSeLinuxOptions(): new V1SELinuxOptionsBuilder().build()); - } - public V1PodSecurityContextFluentImpl.SeLinuxOptionsNested editOrNewSeLinuxOptionsLike(V1SELinuxOptions item) { - return withNewSeLinuxOptionsLike(getSeLinuxOptions() != null ? getSeLinuxOptions(): item); - } - - /** - * This method has been deprecated, please use method buildSeccompProfile instead. - * @return The buildable object. - */ - @Deprecated - public V1SeccompProfile getSeccompProfile() { - return this.seccompProfile!=null ?this.seccompProfile.build():null; - } - public V1SeccompProfile buildSeccompProfile() { - return this.seccompProfile!=null ?this.seccompProfile.build():null; - } - public A withSeccompProfile(V1SeccompProfile seccompProfile) { - _visitables.get("seccompProfile").remove(this.seccompProfile); - if (seccompProfile!=null){ this.seccompProfile= new V1SeccompProfileBuilder(seccompProfile); _visitables.get("seccompProfile").add(this.seccompProfile);} else { this.seccompProfile = null; _visitables.get("seccompProfile").remove(this.seccompProfile); } return (A) this; - } - public Boolean hasSeccompProfile() { - return this.seccompProfile != null; - } - public V1PodSecurityContextFluentImpl.SeccompProfileNested withNewSeccompProfile() { - return new V1PodSecurityContextFluentImpl.SeccompProfileNestedImpl(); - } - public V1PodSecurityContextFluentImpl.SeccompProfileNested withNewSeccompProfileLike(V1SeccompProfile item) { - return new V1PodSecurityContextFluentImpl.SeccompProfileNestedImpl(item); - } - public V1PodSecurityContextFluentImpl.SeccompProfileNested editSeccompProfile() { - return withNewSeccompProfileLike(getSeccompProfile()); - } - public V1PodSecurityContextFluentImpl.SeccompProfileNested editOrNewSeccompProfile() { - return withNewSeccompProfileLike(getSeccompProfile() != null ? getSeccompProfile(): new V1SeccompProfileBuilder().build()); - } - public V1PodSecurityContextFluentImpl.SeccompProfileNested editOrNewSeccompProfileLike(V1SeccompProfile item) { - return withNewSeccompProfileLike(getSeccompProfile() != null ? getSeccompProfile(): item); - } - public A addToSupplementalGroups(int index,Long item) { - if (this.supplementalGroups == null) {this.supplementalGroups = new ArrayList();} - this.supplementalGroups.add(index, item); - return (A)this; - } - public A setToSupplementalGroups(int index,Long item) { - if (this.supplementalGroups == null) {this.supplementalGroups = new ArrayList();} - this.supplementalGroups.set(index, item); return (A)this; - } - public A addToSupplementalGroups(java.lang.Long... items) { - if (this.supplementalGroups == null) {this.supplementalGroups = new ArrayList();} - for (Long item : items) {this.supplementalGroups.add(item);} return (A)this; - } - public A addAllToSupplementalGroups(Collection items) { - if (this.supplementalGroups == null) {this.supplementalGroups = new ArrayList();} - for (Long item : items) {this.supplementalGroups.add(item);} return (A)this; - } - public A removeFromSupplementalGroups(java.lang.Long... items) { - for (Long item : items) {if (this.supplementalGroups!= null){ this.supplementalGroups.remove(item);}} return (A)this; - } - public A removeAllFromSupplementalGroups(Collection items) { - for (Long item : items) {if (this.supplementalGroups!= null){ this.supplementalGroups.remove(item);}} return (A)this; - } - public List getSupplementalGroups() { - return this.supplementalGroups; - } - public Long getSupplementalGroup(int index) { - return this.supplementalGroups.get(index); - } - public Long getFirstSupplementalGroup() { - return this.supplementalGroups.get(0); - } - public Long getLastSupplementalGroup() { - return this.supplementalGroups.get(supplementalGroups.size() - 1); - } - public Long getMatchingSupplementalGroup(Predicate predicate) { - for (Long item: supplementalGroups) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingSupplementalGroup(Predicate predicate) { - for (Long item: supplementalGroups) { if(predicate.test(item)){ return true;} } return false; - } - public A withSupplementalGroups(List supplementalGroups) { - if (supplementalGroups != null) {this.supplementalGroups = new ArrayList(); for (Long item : supplementalGroups){this.addToSupplementalGroups(item);}} else { this.supplementalGroups = null;} return (A) this; - } - public A withSupplementalGroups(java.lang.Long... supplementalGroups) { - if (this.supplementalGroups != null) {this.supplementalGroups.clear(); _visitables.remove("supplementalGroups"); } - if (supplementalGroups != null) {for (Long item :supplementalGroups){ this.addToSupplementalGroups(item);}} return (A) this; - } - public Boolean hasSupplementalGroups() { - return supplementalGroups != null && !supplementalGroups.isEmpty(); - } - public A addToSysctls(int index,V1Sysctl item) { - if (this.sysctls == null) {this.sysctls = new ArrayList();} - V1SysctlBuilder builder = new V1SysctlBuilder(item); - if (index < 0 || index >= sysctls.size()) { _visitables.get("sysctls").add(builder); sysctls.add(builder); } else { _visitables.get("sysctls").add(index, builder); sysctls.add(index, builder);} - return (A)this; - } - public A setToSysctls(int index,V1Sysctl item) { - if (this.sysctls == null) {this.sysctls = new ArrayList();} - V1SysctlBuilder builder = new V1SysctlBuilder(item); - if (index < 0 || index >= sysctls.size()) { _visitables.get("sysctls").add(builder); sysctls.add(builder); } else { _visitables.get("sysctls").set(index, builder); sysctls.set(index, builder);} - return (A)this; - } - public A addToSysctls(io.kubernetes.client.openapi.models.V1Sysctl... items) { - if (this.sysctls == null) {this.sysctls = new ArrayList();} - for (V1Sysctl item : items) {V1SysctlBuilder builder = new V1SysctlBuilder(item);_visitables.get("sysctls").add(builder);this.sysctls.add(builder);} return (A)this; - } - public A addAllToSysctls(Collection items) { - if (this.sysctls == null) {this.sysctls = new ArrayList();} - for (V1Sysctl item : items) {V1SysctlBuilder builder = new V1SysctlBuilder(item);_visitables.get("sysctls").add(builder);this.sysctls.add(builder);} return (A)this; - } - public A removeFromSysctls(io.kubernetes.client.openapi.models.V1Sysctl... items) { - for (V1Sysctl item : items) {V1SysctlBuilder builder = new V1SysctlBuilder(item);_visitables.get("sysctls").remove(builder);if (this.sysctls != null) {this.sysctls.remove(builder);}} return (A)this; - } - public A removeAllFromSysctls(Collection items) { - for (V1Sysctl item : items) {V1SysctlBuilder builder = new V1SysctlBuilder(item);_visitables.get("sysctls").remove(builder);if (this.sysctls != null) {this.sysctls.remove(builder);}} return (A)this; - } - public A removeMatchingFromSysctls(Predicate predicate) { - if (sysctls == null) return (A) this; - final Iterator each = sysctls.iterator(); - final List visitables = _visitables.get("sysctls"); - while (each.hasNext()) { - V1SysctlBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildSysctls instead. - * @return The buildable object. - */ - @Deprecated - public List getSysctls() { - return sysctls != null ? build(sysctls) : null; - } - public List buildSysctls() { - return sysctls != null ? build(sysctls) : null; - } - public V1Sysctl buildSysctl(int index) { - return this.sysctls.get(index).build(); - } - public V1Sysctl buildFirstSysctl() { - return this.sysctls.get(0).build(); - } - public V1Sysctl buildLastSysctl() { - return this.sysctls.get(sysctls.size() - 1).build(); - } - public V1Sysctl buildMatchingSysctl(Predicate predicate) { - for (V1SysctlBuilder item: sysctls) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingSysctl(Predicate predicate) { - for (V1SysctlBuilder item: sysctls) { if(predicate.test(item)){ return true;} } return false; - } - public A withSysctls(List sysctls) { - if (this.sysctls != null) { _visitables.get("sysctls").clear();} - if (sysctls != null) {this.sysctls = new ArrayList(); for (V1Sysctl item : sysctls){this.addToSysctls(item);}} else { this.sysctls = null;} return (A) this; - } - public A withSysctls(io.kubernetes.client.openapi.models.V1Sysctl... sysctls) { - if (this.sysctls != null) {this.sysctls.clear(); _visitables.remove("sysctls"); } - if (sysctls != null) {for (V1Sysctl item :sysctls){ this.addToSysctls(item);}} return (A) this; - } - public Boolean hasSysctls() { - return sysctls != null && !sysctls.isEmpty(); - } - public V1PodSecurityContextFluentImpl.SysctlsNested addNewSysctl() { - return new V1PodSecurityContextFluentImpl.SysctlsNestedImpl(); - } - public V1PodSecurityContextFluentImpl.SysctlsNested addNewSysctlLike(V1Sysctl item) { - return new V1PodSecurityContextFluentImpl.SysctlsNestedImpl(-1, item); - } - public V1PodSecurityContextFluentImpl.SysctlsNested setNewSysctlLike(int index,V1Sysctl item) { - return new V1PodSecurityContextFluentImpl.SysctlsNestedImpl(index, item); - } - public V1PodSecurityContextFluentImpl.SysctlsNested editSysctl(int index) { - if (sysctls.size() <= index) throw new RuntimeException("Can't edit sysctls. Index exceeds size."); - return setNewSysctlLike(index, buildSysctl(index)); - } - public V1PodSecurityContextFluentImpl.SysctlsNested editFirstSysctl() { - if (sysctls.size() == 0) throw new RuntimeException("Can't edit first sysctls. The list is empty."); - return setNewSysctlLike(0, buildSysctl(0)); - } - public V1PodSecurityContextFluentImpl.SysctlsNested editLastSysctl() { - int index = sysctls.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last sysctls. The list is empty."); - return setNewSysctlLike(index, buildSysctl(index)); - } - public V1PodSecurityContextFluentImpl.SysctlsNested editMatchingSysctl(Predicate predicate) { - int index = -1; - for (int i=0;i withNewWindowsOptions() { - return new V1PodSecurityContextFluentImpl.WindowsOptionsNestedImpl(); - } - public V1PodSecurityContextFluentImpl.WindowsOptionsNested withNewWindowsOptionsLike(V1WindowsSecurityContextOptions item) { - return new V1PodSecurityContextFluentImpl.WindowsOptionsNestedImpl(item); - } - public V1PodSecurityContextFluentImpl.WindowsOptionsNested editWindowsOptions() { - return withNewWindowsOptionsLike(getWindowsOptions()); - } - public V1PodSecurityContextFluentImpl.WindowsOptionsNested editOrNewWindowsOptions() { - return withNewWindowsOptionsLike(getWindowsOptions() != null ? getWindowsOptions(): new V1WindowsSecurityContextOptionsBuilder().build()); - } - public V1PodSecurityContextFluentImpl.WindowsOptionsNested editOrNewWindowsOptionsLike(V1WindowsSecurityContextOptions item) { - return withNewWindowsOptionsLike(getWindowsOptions() != null ? getWindowsOptions(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodSecurityContextFluentImpl that = (V1PodSecurityContextFluentImpl) o; - if (!java.util.Objects.equals(fsGroup, that.fsGroup)) return false; - - if (!java.util.Objects.equals(fsGroupChangePolicy, that.fsGroupChangePolicy)) return false; - - if (!java.util.Objects.equals(runAsGroup, that.runAsGroup)) return false; - - if (!java.util.Objects.equals(runAsNonRoot, that.runAsNonRoot)) return false; - - if (!java.util.Objects.equals(runAsUser, that.runAsUser)) return false; - - if (!java.util.Objects.equals(seLinuxOptions, that.seLinuxOptions)) return false; - - if (!java.util.Objects.equals(seccompProfile, that.seccompProfile)) return false; - - if (!java.util.Objects.equals(supplementalGroups, that.supplementalGroups)) return false; - - if (!java.util.Objects.equals(sysctls, that.sysctls)) return false; - - if (!java.util.Objects.equals(windowsOptions, that.windowsOptions)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsGroup, fsGroupChangePolicy, runAsGroup, runAsNonRoot, runAsUser, seLinuxOptions, seccompProfile, supplementalGroups, sysctls, windowsOptions, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsGroup != null) { sb.append("fsGroup:"); sb.append(fsGroup + ","); } - if (fsGroupChangePolicy != null) { sb.append("fsGroupChangePolicy:"); sb.append(fsGroupChangePolicy + ","); } - if (runAsGroup != null) { sb.append("runAsGroup:"); sb.append(runAsGroup + ","); } - if (runAsNonRoot != null) { sb.append("runAsNonRoot:"); sb.append(runAsNonRoot + ","); } - if (runAsUser != null) { sb.append("runAsUser:"); sb.append(runAsUser + ","); } - if (seLinuxOptions != null) { sb.append("seLinuxOptions:"); sb.append(seLinuxOptions + ","); } - if (seccompProfile != null) { sb.append("seccompProfile:"); sb.append(seccompProfile + ","); } - if (supplementalGroups != null && !supplementalGroups.isEmpty()) { sb.append("supplementalGroups:"); sb.append(supplementalGroups + ","); } - if (sysctls != null) { sb.append("sysctls:"); sb.append(sysctls + ","); } - if (windowsOptions != null) { sb.append("windowsOptions:"); sb.append(windowsOptions); } - sb.append("}"); - return sb.toString(); - } - public A withRunAsNonRoot() { - return withRunAsNonRoot(true); - } - class SeLinuxOptionsNestedImpl extends V1SELinuxOptionsFluentImpl> implements V1PodSecurityContextFluentImpl.SeLinuxOptionsNested,Nested{ - SeLinuxOptionsNestedImpl(V1SELinuxOptions item) { - this.builder = new V1SELinuxOptionsBuilder(this, item); - } - SeLinuxOptionsNestedImpl() { - this.builder = new V1SELinuxOptionsBuilder(this); - } - V1SELinuxOptionsBuilder builder; - public N and() { - return (N) V1PodSecurityContextFluentImpl.this.withSeLinuxOptions(builder.build()); - } - public N endSeLinuxOptions() { - return and(); - } - - } - class SeccompProfileNestedImpl extends V1SeccompProfileFluentImpl> implements V1PodSecurityContextFluentImpl.SeccompProfileNested,Nested{ - SeccompProfileNestedImpl(V1SeccompProfile item) { - this.builder = new V1SeccompProfileBuilder(this, item); - } - SeccompProfileNestedImpl() { - this.builder = new V1SeccompProfileBuilder(this); - } - V1SeccompProfileBuilder builder; - public N and() { - return (N) V1PodSecurityContextFluentImpl.this.withSeccompProfile(builder.build()); - } - public N endSeccompProfile() { - return and(); - } - - } - class SysctlsNestedImpl extends V1SysctlFluentImpl> implements V1PodSecurityContextFluentImpl.SysctlsNested,Nested{ - SysctlsNestedImpl(int index,V1Sysctl item) { - this.index = index; - this.builder = new V1SysctlBuilder(this, item); - } - SysctlsNestedImpl() { - this.index = -1; - this.builder = new V1SysctlBuilder(this); - } - V1SysctlBuilder builder; - int index; - public N and() { - return (N) V1PodSecurityContextFluentImpl.this.setToSysctls(index,builder.build()); - } - public N endSysctl() { - return and(); - } - - } - class WindowsOptionsNestedImpl extends V1WindowsSecurityContextOptionsFluentImpl> implements V1PodSecurityContextFluentImpl.WindowsOptionsNested,Nested{ - WindowsOptionsNestedImpl(V1WindowsSecurityContextOptions item) { - this.builder = new V1WindowsSecurityContextOptionsBuilder(this, item); - } - WindowsOptionsNestedImpl() { - this.builder = new V1WindowsSecurityContextOptionsBuilder(this); - } - V1WindowsSecurityContextOptionsBuilder builder; - public N and() { - return (N) V1PodSecurityContextFluentImpl.this.withWindowsOptions(builder.build()); - } - public N endWindowsOptions() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecBuilder.java index 6aa85231b1..50fd9c7dff 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecBuilder.java @@ -1,160 +1,69 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodSpecBuilder extends V1PodSpecFluentImpl implements VisitableBuilder{ +public class V1PodSpecBuilder extends V1PodSpecFluent implements VisitableBuilder{ public V1PodSpecBuilder() { - this(false); - } - public V1PodSpecBuilder(Boolean validationEnabled) { - this(new V1PodSpec(), validationEnabled); + this(new V1PodSpec()); } + public V1PodSpecBuilder(V1PodSpecFluent fluent) { - this(fluent, false); - } - public V1PodSpecBuilder(V1PodSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodSpec(), validationEnabled); + this(fluent, new V1PodSpec()); } + public V1PodSpecBuilder(V1PodSpecFluent fluent,V1PodSpec instance) { - this(fluent, instance, false); - } - public V1PodSpecBuilder(V1PodSpecFluent fluent,V1PodSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds()); - fluent.withAffinity(instance.getAffinity()); - fluent.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken()); - fluent.withContainers(instance.getContainers()); - fluent.withDnsConfig(instance.getDnsConfig()); - fluent.withDnsPolicy(instance.getDnsPolicy()); - fluent.withEnableServiceLinks(instance.getEnableServiceLinks()); - fluent.withEphemeralContainers(instance.getEphemeralContainers()); - fluent.withHostAliases(instance.getHostAliases()); - fluent.withHostIPC(instance.getHostIPC()); - fluent.withHostNetwork(instance.getHostNetwork()); - fluent.withHostPID(instance.getHostPID()); - fluent.withHostUsers(instance.getHostUsers()); - fluent.withHostname(instance.getHostname()); - fluent.withImagePullSecrets(instance.getImagePullSecrets()); - fluent.withInitContainers(instance.getInitContainers()); - fluent.withNodeName(instance.getNodeName()); - fluent.withNodeSelector(instance.getNodeSelector()); - fluent.withOs(instance.getOs()); - fluent.withOverhead(instance.getOverhead()); - fluent.withPreemptionPolicy(instance.getPreemptionPolicy()); - fluent.withPriority(instance.getPriority()); - fluent.withPriorityClassName(instance.getPriorityClassName()); - fluent.withReadinessGates(instance.getReadinessGates()); - fluent.withResourceClaims(instance.getResourceClaims()); - fluent.withRestartPolicy(instance.getRestartPolicy()); - fluent.withRuntimeClassName(instance.getRuntimeClassName()); - fluent.withSchedulerName(instance.getSchedulerName()); - fluent.withSchedulingGates(instance.getSchedulingGates()); - fluent.withSecurityContext(instance.getSecurityContext()); - fluent.withServiceAccount(instance.getServiceAccount()); - fluent.withServiceAccountName(instance.getServiceAccountName()); - fluent.withSetHostnameAsFQDN(instance.getSetHostnameAsFQDN()); - fluent.withShareProcessNamespace(instance.getShareProcessNamespace()); - fluent.withSubdomain(instance.getSubdomain()); - fluent.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds()); - fluent.withTolerations(instance.getTolerations()); - fluent.withTopologySpreadConstraints(instance.getTopologySpreadConstraints()); - fluent.withVolumes(instance.getVolumes()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodSpecBuilder(V1PodSpec instance) { - this(instance,false); - } - public V1PodSpecBuilder(V1PodSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds()); - this.withAffinity(instance.getAffinity()); - this.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken()); - this.withContainers(instance.getContainers()); - this.withDnsConfig(instance.getDnsConfig()); - this.withDnsPolicy(instance.getDnsPolicy()); - this.withEnableServiceLinks(instance.getEnableServiceLinks()); - this.withEphemeralContainers(instance.getEphemeralContainers()); - this.withHostAliases(instance.getHostAliases()); - this.withHostIPC(instance.getHostIPC()); - this.withHostNetwork(instance.getHostNetwork()); - this.withHostPID(instance.getHostPID()); - this.withHostUsers(instance.getHostUsers()); - this.withHostname(instance.getHostname()); - this.withImagePullSecrets(instance.getImagePullSecrets()); - this.withInitContainers(instance.getInitContainers()); - this.withNodeName(instance.getNodeName()); - this.withNodeSelector(instance.getNodeSelector()); - this.withOs(instance.getOs()); - this.withOverhead(instance.getOverhead()); - this.withPreemptionPolicy(instance.getPreemptionPolicy()); - this.withPriority(instance.getPriority()); - this.withPriorityClassName(instance.getPriorityClassName()); - this.withReadinessGates(instance.getReadinessGates()); - this.withResourceClaims(instance.getResourceClaims()); - this.withRestartPolicy(instance.getRestartPolicy()); - this.withRuntimeClassName(instance.getRuntimeClassName()); - this.withSchedulerName(instance.getSchedulerName()); - this.withSchedulingGates(instance.getSchedulingGates()); - this.withSecurityContext(instance.getSecurityContext()); - this.withServiceAccount(instance.getServiceAccount()); - this.withServiceAccountName(instance.getServiceAccountName()); - this.withSetHostnameAsFQDN(instance.getSetHostnameAsFQDN()); - this.withShareProcessNamespace(instance.getShareProcessNamespace()); - this.withSubdomain(instance.getSubdomain()); - this.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds()); - this.withTolerations(instance.getTolerations()); - this.withTopologySpreadConstraints(instance.getTopologySpreadConstraints()); - this.withVolumes(instance.getVolumes()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodSpecFluent fluent; - Boolean validationEnabled; + public V1PodSpec build() { V1PodSpec buildable = new V1PodSpec(); buildable.setActiveDeadlineSeconds(fluent.getActiveDeadlineSeconds()); - buildable.setAffinity(fluent.getAffinity()); + buildable.setAffinity(fluent.buildAffinity()); buildable.setAutomountServiceAccountToken(fluent.getAutomountServiceAccountToken()); - buildable.setContainers(fluent.getContainers()); - buildable.setDnsConfig(fluent.getDnsConfig()); + buildable.setContainers(fluent.buildContainers()); + buildable.setDnsConfig(fluent.buildDnsConfig()); buildable.setDnsPolicy(fluent.getDnsPolicy()); buildable.setEnableServiceLinks(fluent.getEnableServiceLinks()); - buildable.setEphemeralContainers(fluent.getEphemeralContainers()); - buildable.setHostAliases(fluent.getHostAliases()); + buildable.setEphemeralContainers(fluent.buildEphemeralContainers()); + buildable.setHostAliases(fluent.buildHostAliases()); buildable.setHostIPC(fluent.getHostIPC()); buildable.setHostNetwork(fluent.getHostNetwork()); buildable.setHostPID(fluent.getHostPID()); buildable.setHostUsers(fluent.getHostUsers()); buildable.setHostname(fluent.getHostname()); - buildable.setImagePullSecrets(fluent.getImagePullSecrets()); - buildable.setInitContainers(fluent.getInitContainers()); + buildable.setImagePullSecrets(fluent.buildImagePullSecrets()); + buildable.setInitContainers(fluent.buildInitContainers()); buildable.setNodeName(fluent.getNodeName()); buildable.setNodeSelector(fluent.getNodeSelector()); - buildable.setOs(fluent.getOs()); + buildable.setOs(fluent.buildOs()); buildable.setOverhead(fluent.getOverhead()); buildable.setPreemptionPolicy(fluent.getPreemptionPolicy()); buildable.setPriority(fluent.getPriority()); buildable.setPriorityClassName(fluent.getPriorityClassName()); - buildable.setReadinessGates(fluent.getReadinessGates()); - buildable.setResourceClaims(fluent.getResourceClaims()); + buildable.setReadinessGates(fluent.buildReadinessGates()); + buildable.setResourceClaims(fluent.buildResourceClaims()); buildable.setRestartPolicy(fluent.getRestartPolicy()); buildable.setRuntimeClassName(fluent.getRuntimeClassName()); buildable.setSchedulerName(fluent.getSchedulerName()); - buildable.setSchedulingGates(fluent.getSchedulingGates()); - buildable.setSecurityContext(fluent.getSecurityContext()); + buildable.setSchedulingGates(fluent.buildSchedulingGates()); + buildable.setSecurityContext(fluent.buildSecurityContext()); buildable.setServiceAccount(fluent.getServiceAccount()); buildable.setServiceAccountName(fluent.getServiceAccountName()); buildable.setSetHostnameAsFQDN(fluent.getSetHostnameAsFQDN()); buildable.setShareProcessNamespace(fluent.getShareProcessNamespace()); buildable.setSubdomain(fluent.getSubdomain()); buildable.setTerminationGracePeriodSeconds(fluent.getTerminationGracePeriodSeconds()); - buildable.setTolerations(fluent.getTolerations()); - buildable.setTopologySpreadConstraints(fluent.getTopologySpreadConstraints()); - buildable.setVolumes(fluent.getVolumes()); + buildable.setTolerations(fluent.buildTolerations()); + buildable.setTopologySpreadConstraints(fluent.buildTopologySpreadConstraints()); + buildable.setVolumes(fluent.buildVolumes()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecFluent.java index 504097b75f..b3441c3d24 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecFluent.java @@ -1,579 +1,2689 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; import java.util.List; import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.lang.Long; import java.util.Collection; +import java.lang.Object; import java.util.Map; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; import java.util.Iterator; import io.kubernetes.client.custom.Quantity; import java.lang.Integer; - /** - * Generated - */ -public interface V1PodSpecFluent> extends Fluent{ - public Long getActiveDeadlineSeconds(); - public A withActiveDeadlineSeconds(Long activeDeadlineSeconds); - public Boolean hasActiveDeadlineSeconds(); - - /** - * This method has been deprecated, please use method buildAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1Affinity getAffinity(); - public V1Affinity buildAffinity(); - public A withAffinity(V1Affinity affinity); - public Boolean hasAffinity(); - public V1PodSpecFluent.AffinityNested withNewAffinity(); - public V1PodSpecFluent.AffinityNested withNewAffinityLike(V1Affinity item); - public V1PodSpecFluent.AffinityNested editAffinity(); - public V1PodSpecFluent.AffinityNested editOrNewAffinity(); - public V1PodSpecFluent.AffinityNested editOrNewAffinityLike(V1Affinity item); - public Boolean getAutomountServiceAccountToken(); - public A withAutomountServiceAccountToken(Boolean automountServiceAccountToken); - public Boolean hasAutomountServiceAccountToken(); - public A addToContainers(int index,V1Container item); - public A setToContainers(int index,V1Container item); - public A addToContainers(io.kubernetes.client.openapi.models.V1Container... items); - public A addAllToContainers(Collection items); - public A removeFromContainers(io.kubernetes.client.openapi.models.V1Container... items); - public A removeAllFromContainers(Collection items); - public A removeMatchingFromContainers(Predicate predicate); - - /** - * This method has been deprecated, please use method buildContainers instead. - * @return The buildable object. - */ - @Deprecated - public List getContainers(); - public List buildContainers(); - public V1Container buildContainer(int index); - public V1Container buildFirstContainer(); - public V1Container buildLastContainer(); - public V1Container buildMatchingContainer(Predicate predicate); - public Boolean hasMatchingContainer(Predicate predicate); - public A withContainers(List containers); - public A withContainers(io.kubernetes.client.openapi.models.V1Container... containers); - public Boolean hasContainers(); - public V1PodSpecFluent.ContainersNested addNewContainer(); - public V1PodSpecFluent.ContainersNested addNewContainerLike(V1Container item); - public V1PodSpecFluent.ContainersNested setNewContainerLike(int index,V1Container item); - public V1PodSpecFluent.ContainersNested editContainer(int index); - public V1PodSpecFluent.ContainersNested editFirstContainer(); - public V1PodSpecFluent.ContainersNested editLastContainer(); - public V1PodSpecFluent.ContainersNested editMatchingContainer(Predicate predicate); - - /** - * This method has been deprecated, please use method buildDnsConfig instead. - * @return The buildable object. - */ - @Deprecated - public V1PodDNSConfig getDnsConfig(); - public V1PodDNSConfig buildDnsConfig(); - public A withDnsConfig(V1PodDNSConfig dnsConfig); - public Boolean hasDnsConfig(); - public V1PodSpecFluent.DnsConfigNested withNewDnsConfig(); - public V1PodSpecFluent.DnsConfigNested withNewDnsConfigLike(V1PodDNSConfig item); - public V1PodSpecFluent.DnsConfigNested editDnsConfig(); - public V1PodSpecFluent.DnsConfigNested editOrNewDnsConfig(); - public V1PodSpecFluent.DnsConfigNested editOrNewDnsConfigLike(V1PodDNSConfig item); - public String getDnsPolicy(); - public A withDnsPolicy(String dnsPolicy); - public Boolean hasDnsPolicy(); - public Boolean getEnableServiceLinks(); - public A withEnableServiceLinks(Boolean enableServiceLinks); - public Boolean hasEnableServiceLinks(); - public A addToEphemeralContainers(int index,V1EphemeralContainer item); - public A setToEphemeralContainers(int index,V1EphemeralContainer item); - public A addToEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... items); - public A addAllToEphemeralContainers(Collection items); - public A removeFromEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... items); - public A removeAllFromEphemeralContainers(Collection items); - public A removeMatchingFromEphemeralContainers(Predicate predicate); - - /** - * This method has been deprecated, please use method buildEphemeralContainers instead. - * @return The buildable object. - */ - @Deprecated - public List getEphemeralContainers(); - public List buildEphemeralContainers(); - public V1EphemeralContainer buildEphemeralContainer(int index); - public V1EphemeralContainer buildFirstEphemeralContainer(); - public V1EphemeralContainer buildLastEphemeralContainer(); - public V1EphemeralContainer buildMatchingEphemeralContainer(Predicate predicate); - public Boolean hasMatchingEphemeralContainer(Predicate predicate); - public A withEphemeralContainers(List ephemeralContainers); - public A withEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... ephemeralContainers); - public Boolean hasEphemeralContainers(); - public V1PodSpecFluent.EphemeralContainersNested addNewEphemeralContainer(); - public V1PodSpecFluent.EphemeralContainersNested addNewEphemeralContainerLike(V1EphemeralContainer item); - public V1PodSpecFluent.EphemeralContainersNested setNewEphemeralContainerLike(int index,V1EphemeralContainer item); - public V1PodSpecFluent.EphemeralContainersNested editEphemeralContainer(int index); - public V1PodSpecFluent.EphemeralContainersNested editFirstEphemeralContainer(); - public V1PodSpecFluent.EphemeralContainersNested editLastEphemeralContainer(); - public V1PodSpecFluent.EphemeralContainersNested editMatchingEphemeralContainer(Predicate predicate); - public A addToHostAliases(int index,V1HostAlias item); - public A setToHostAliases(int index,V1HostAlias item); - public A addToHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... items); - public A addAllToHostAliases(Collection items); - public A removeFromHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... items); - public A removeAllFromHostAliases(Collection items); - public A removeMatchingFromHostAliases(Predicate predicate); - - /** - * This method has been deprecated, please use method buildHostAliases instead. - * @return The buildable object. - */ - @Deprecated - public List getHostAliases(); - public List buildHostAliases(); - public V1HostAlias buildHostAlias(int index); - public V1HostAlias buildFirstHostAlias(); - public V1HostAlias buildLastHostAlias(); - public V1HostAlias buildMatchingHostAlias(Predicate predicate); - public Boolean hasMatchingHostAlias(Predicate predicate); - public A withHostAliases(List hostAliases); - public A withHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... hostAliases); - public Boolean hasHostAliases(); - public V1PodSpecFluent.HostAliasesNested addNewHostAlias(); - public V1PodSpecFluent.HostAliasesNested addNewHostAliasLike(V1HostAlias item); - public V1PodSpecFluent.HostAliasesNested setNewHostAliasLike(int index,V1HostAlias item); - public V1PodSpecFluent.HostAliasesNested editHostAlias(int index); - public V1PodSpecFluent.HostAliasesNested editFirstHostAlias(); - public V1PodSpecFluent.HostAliasesNested editLastHostAlias(); - public V1PodSpecFluent.HostAliasesNested editMatchingHostAlias(Predicate predicate); - public Boolean getHostIPC(); - public A withHostIPC(Boolean hostIPC); - public Boolean hasHostIPC(); - public Boolean getHostNetwork(); - public A withHostNetwork(Boolean hostNetwork); - public Boolean hasHostNetwork(); - public Boolean getHostPID(); - public A withHostPID(Boolean hostPID); - public Boolean hasHostPID(); - public Boolean getHostUsers(); - public A withHostUsers(Boolean hostUsers); - public Boolean hasHostUsers(); - public String getHostname(); - public A withHostname(String hostname); - public Boolean hasHostname(); - public A addToImagePullSecrets(int index,V1LocalObjectReference item); - public A setToImagePullSecrets(int index,V1LocalObjectReference item); - public A addToImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items); - public A addAllToImagePullSecrets(Collection items); - public A removeFromImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items); - public A removeAllFromImagePullSecrets(Collection items); - public A removeMatchingFromImagePullSecrets(Predicate predicate); - - /** - * This method has been deprecated, please use method buildImagePullSecrets instead. - * @return The buildable object. - */ - @Deprecated - public List getImagePullSecrets(); - public List buildImagePullSecrets(); - public V1LocalObjectReference buildImagePullSecret(int index); - public V1LocalObjectReference buildFirstImagePullSecret(); - public V1LocalObjectReference buildLastImagePullSecret(); - public V1LocalObjectReference buildMatchingImagePullSecret(Predicate predicate); - public Boolean hasMatchingImagePullSecret(Predicate predicate); - public A withImagePullSecrets(List imagePullSecrets); - public A withImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... imagePullSecrets); - public Boolean hasImagePullSecrets(); - public V1PodSpecFluent.ImagePullSecretsNested addNewImagePullSecret(); - public V1PodSpecFluent.ImagePullSecretsNested addNewImagePullSecretLike(V1LocalObjectReference item); - public V1PodSpecFluent.ImagePullSecretsNested setNewImagePullSecretLike(int index,V1LocalObjectReference item); - public V1PodSpecFluent.ImagePullSecretsNested editImagePullSecret(int index); - public V1PodSpecFluent.ImagePullSecretsNested editFirstImagePullSecret(); - public V1PodSpecFluent.ImagePullSecretsNested editLastImagePullSecret(); - public V1PodSpecFluent.ImagePullSecretsNested editMatchingImagePullSecret(Predicate predicate); - public A addToInitContainers(int index,V1Container item); - public A setToInitContainers(int index,V1Container item); - public A addToInitContainers(io.kubernetes.client.openapi.models.V1Container... items); - public A addAllToInitContainers(Collection items); - public A removeFromInitContainers(io.kubernetes.client.openapi.models.V1Container... items); - public A removeAllFromInitContainers(Collection items); - public A removeMatchingFromInitContainers(Predicate predicate); - - /** - * This method has been deprecated, please use method buildInitContainers instead. - * @return The buildable object. - */ - @Deprecated - public List getInitContainers(); - public List buildInitContainers(); - public V1Container buildInitContainer(int index); - public V1Container buildFirstInitContainer(); - public V1Container buildLastInitContainer(); - public V1Container buildMatchingInitContainer(Predicate predicate); - public Boolean hasMatchingInitContainer(Predicate predicate); - public A withInitContainers(List initContainers); - public A withInitContainers(io.kubernetes.client.openapi.models.V1Container... initContainers); - public Boolean hasInitContainers(); - public V1PodSpecFluent.InitContainersNested addNewInitContainer(); - public V1PodSpecFluent.InitContainersNested addNewInitContainerLike(V1Container item); - public V1PodSpecFluent.InitContainersNested setNewInitContainerLike(int index,V1Container item); - public V1PodSpecFluent.InitContainersNested editInitContainer(int index); - public V1PodSpecFluent.InitContainersNested editFirstInitContainer(); - public V1PodSpecFluent.InitContainersNested editLastInitContainer(); - public V1PodSpecFluent.InitContainersNested editMatchingInitContainer(Predicate predicate); - public String getNodeName(); - public A withNodeName(String nodeName); - public Boolean hasNodeName(); - public A addToNodeSelector(String key,String value); - public A addToNodeSelector(Map map); - public A removeFromNodeSelector(String key); - public A removeFromNodeSelector(Map map); - public Map getNodeSelector(); - public A withNodeSelector(Map nodeSelector); - public Boolean hasNodeSelector(); - - /** - * This method has been deprecated, please use method buildOs instead. - * @return The buildable object. - */ - @Deprecated - public V1PodOS getOs(); - public V1PodOS buildOs(); - public A withOs(V1PodOS os); - public Boolean hasOs(); - public V1PodSpecFluent.OsNested withNewOs(); - public V1PodSpecFluent.OsNested withNewOsLike(V1PodOS item); - public V1PodSpecFluent.OsNested editOs(); - public V1PodSpecFluent.OsNested editOrNewOs(); - public V1PodSpecFluent.OsNested editOrNewOsLike(V1PodOS item); - public A addToOverhead(String key,Quantity value); - public A addToOverhead(Map map); - public A removeFromOverhead(String key); - public A removeFromOverhead(Map map); - public Map getOverhead(); - public A withOverhead(Map overhead); - public Boolean hasOverhead(); - public String getPreemptionPolicy(); - public A withPreemptionPolicy(String preemptionPolicy); - public Boolean hasPreemptionPolicy(); - public Integer getPriority(); - public A withPriority(Integer priority); - public Boolean hasPriority(); - public String getPriorityClassName(); - public A withPriorityClassName(String priorityClassName); - public Boolean hasPriorityClassName(); - public A addToReadinessGates(int index,V1PodReadinessGate item); - public A setToReadinessGates(int index,V1PodReadinessGate item); - public A addToReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... items); - public A addAllToReadinessGates(Collection items); - public A removeFromReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... items); - public A removeAllFromReadinessGates(Collection items); - public A removeMatchingFromReadinessGates(Predicate predicate); - - /** - * This method has been deprecated, please use method buildReadinessGates instead. - * @return The buildable object. - */ - @Deprecated - public List getReadinessGates(); - public List buildReadinessGates(); - public V1PodReadinessGate buildReadinessGate(int index); - public V1PodReadinessGate buildFirstReadinessGate(); - public V1PodReadinessGate buildLastReadinessGate(); - public V1PodReadinessGate buildMatchingReadinessGate(Predicate predicate); - public Boolean hasMatchingReadinessGate(Predicate predicate); - public A withReadinessGates(List readinessGates); - public A withReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... readinessGates); - public Boolean hasReadinessGates(); - public V1PodSpecFluent.ReadinessGatesNested addNewReadinessGate(); - public V1PodSpecFluent.ReadinessGatesNested addNewReadinessGateLike(V1PodReadinessGate item); - public V1PodSpecFluent.ReadinessGatesNested setNewReadinessGateLike(int index,V1PodReadinessGate item); - public V1PodSpecFluent.ReadinessGatesNested editReadinessGate(int index); - public V1PodSpecFluent.ReadinessGatesNested editFirstReadinessGate(); - public V1PodSpecFluent.ReadinessGatesNested editLastReadinessGate(); - public V1PodSpecFluent.ReadinessGatesNested editMatchingReadinessGate(Predicate predicate); - public A addToResourceClaims(int index,V1PodResourceClaim item); - public A setToResourceClaims(int index,V1PodResourceClaim item); - public A addToResourceClaims(io.kubernetes.client.openapi.models.V1PodResourceClaim... items); - public A addAllToResourceClaims(Collection items); - public A removeFromResourceClaims(io.kubernetes.client.openapi.models.V1PodResourceClaim... items); - public A removeAllFromResourceClaims(Collection items); - public A removeMatchingFromResourceClaims(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResourceClaims instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceClaims(); - public List buildResourceClaims(); - public V1PodResourceClaim buildResourceClaim(int index); - public V1PodResourceClaim buildFirstResourceClaim(); - public V1PodResourceClaim buildLastResourceClaim(); - public V1PodResourceClaim buildMatchingResourceClaim(Predicate predicate); - public Boolean hasMatchingResourceClaim(Predicate predicate); - public A withResourceClaims(List resourceClaims); - public A withResourceClaims(io.kubernetes.client.openapi.models.V1PodResourceClaim... resourceClaims); - public Boolean hasResourceClaims(); - public V1PodSpecFluent.ResourceClaimsNested addNewResourceClaim(); - public V1PodSpecFluent.ResourceClaimsNested addNewResourceClaimLike(V1PodResourceClaim item); - public V1PodSpecFluent.ResourceClaimsNested setNewResourceClaimLike(int index,V1PodResourceClaim item); - public V1PodSpecFluent.ResourceClaimsNested editResourceClaim(int index); - public V1PodSpecFluent.ResourceClaimsNested editFirstResourceClaim(); - public V1PodSpecFluent.ResourceClaimsNested editLastResourceClaim(); - public V1PodSpecFluent.ResourceClaimsNested editMatchingResourceClaim(Predicate predicate); - public String getRestartPolicy(); - public A withRestartPolicy(String restartPolicy); - public Boolean hasRestartPolicy(); - public String getRuntimeClassName(); - public A withRuntimeClassName(String runtimeClassName); - public Boolean hasRuntimeClassName(); - public String getSchedulerName(); - public A withSchedulerName(String schedulerName); - public Boolean hasSchedulerName(); - public A addToSchedulingGates(int index,V1PodSchedulingGate item); - public A setToSchedulingGates(int index,V1PodSchedulingGate item); - public A addToSchedulingGates(io.kubernetes.client.openapi.models.V1PodSchedulingGate... items); - public A addAllToSchedulingGates(Collection items); - public A removeFromSchedulingGates(io.kubernetes.client.openapi.models.V1PodSchedulingGate... items); - public A removeAllFromSchedulingGates(Collection items); - public A removeMatchingFromSchedulingGates(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSchedulingGates instead. - * @return The buildable object. - */ - @Deprecated - public List getSchedulingGates(); - public List buildSchedulingGates(); - public V1PodSchedulingGate buildSchedulingGate(int index); - public V1PodSchedulingGate buildFirstSchedulingGate(); - public V1PodSchedulingGate buildLastSchedulingGate(); - public V1PodSchedulingGate buildMatchingSchedulingGate(Predicate predicate); - public Boolean hasMatchingSchedulingGate(Predicate predicate); - public A withSchedulingGates(List schedulingGates); - public A withSchedulingGates(io.kubernetes.client.openapi.models.V1PodSchedulingGate... schedulingGates); - public Boolean hasSchedulingGates(); - public V1PodSpecFluent.SchedulingGatesNested addNewSchedulingGate(); - public V1PodSpecFluent.SchedulingGatesNested addNewSchedulingGateLike(V1PodSchedulingGate item); - public V1PodSpecFluent.SchedulingGatesNested setNewSchedulingGateLike(int index,V1PodSchedulingGate item); - public V1PodSpecFluent.SchedulingGatesNested editSchedulingGate(int index); - public V1PodSpecFluent.SchedulingGatesNested editFirstSchedulingGate(); - public V1PodSpecFluent.SchedulingGatesNested editLastSchedulingGate(); - public V1PodSpecFluent.SchedulingGatesNested editMatchingSchedulingGate(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSecurityContext instead. - * @return The buildable object. - */ - @Deprecated - public V1PodSecurityContext getSecurityContext(); - public V1PodSecurityContext buildSecurityContext(); - public A withSecurityContext(V1PodSecurityContext securityContext); - public Boolean hasSecurityContext(); - public V1PodSpecFluent.SecurityContextNested withNewSecurityContext(); - public V1PodSpecFluent.SecurityContextNested withNewSecurityContextLike(V1PodSecurityContext item); - public V1PodSpecFluent.SecurityContextNested editSecurityContext(); - public V1PodSpecFluent.SecurityContextNested editOrNewSecurityContext(); - public V1PodSpecFluent.SecurityContextNested editOrNewSecurityContextLike(V1PodSecurityContext item); - public String getServiceAccount(); - public A withServiceAccount(String serviceAccount); - public Boolean hasServiceAccount(); - public String getServiceAccountName(); - public A withServiceAccountName(String serviceAccountName); - public Boolean hasServiceAccountName(); - public Boolean getSetHostnameAsFQDN(); - public A withSetHostnameAsFQDN(Boolean setHostnameAsFQDN); - public Boolean hasSetHostnameAsFQDN(); - public Boolean getShareProcessNamespace(); - public A withShareProcessNamespace(Boolean shareProcessNamespace); - public Boolean hasShareProcessNamespace(); - public String getSubdomain(); - public A withSubdomain(String subdomain); - public Boolean hasSubdomain(); - public Long getTerminationGracePeriodSeconds(); - public A withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds); - public Boolean hasTerminationGracePeriodSeconds(); - public A addToTolerations(int index,V1Toleration item); - public A setToTolerations(int index,V1Toleration item); - public A addToTolerations(io.kubernetes.client.openapi.models.V1Toleration... items); - public A addAllToTolerations(Collection items); - public A removeFromTolerations(io.kubernetes.client.openapi.models.V1Toleration... items); - public A removeAllFromTolerations(Collection items); - public A removeMatchingFromTolerations(Predicate predicate); - - /** - * This method has been deprecated, please use method buildTolerations instead. - * @return The buildable object. - */ - @Deprecated - public List getTolerations(); - public List buildTolerations(); - public V1Toleration buildToleration(int index); - public V1Toleration buildFirstToleration(); - public V1Toleration buildLastToleration(); - public V1Toleration buildMatchingToleration(Predicate predicate); - public Boolean hasMatchingToleration(Predicate predicate); - public A withTolerations(List tolerations); - public A withTolerations(io.kubernetes.client.openapi.models.V1Toleration... tolerations); - public Boolean hasTolerations(); - public V1PodSpecFluent.TolerationsNested addNewToleration(); - public V1PodSpecFluent.TolerationsNested addNewTolerationLike(V1Toleration item); - public V1PodSpecFluent.TolerationsNested setNewTolerationLike(int index,V1Toleration item); - public V1PodSpecFluent.TolerationsNested editToleration(int index); - public V1PodSpecFluent.TolerationsNested editFirstToleration(); - public V1PodSpecFluent.TolerationsNested editLastToleration(); - public V1PodSpecFluent.TolerationsNested editMatchingToleration(Predicate predicate); - public A addToTopologySpreadConstraints(int index,V1TopologySpreadConstraint item); - public A setToTopologySpreadConstraints(int index,V1TopologySpreadConstraint item); - public A addToTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... items); - public A addAllToTopologySpreadConstraints(Collection items); - public A removeFromTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... items); - public A removeAllFromTopologySpreadConstraints(Collection items); - public A removeMatchingFromTopologySpreadConstraints(Predicate predicate); - - /** - * This method has been deprecated, please use method buildTopologySpreadConstraints instead. - * @return The buildable object. - */ - @Deprecated - public List getTopologySpreadConstraints(); - public List buildTopologySpreadConstraints(); - public V1TopologySpreadConstraint buildTopologySpreadConstraint(int index); - public V1TopologySpreadConstraint buildFirstTopologySpreadConstraint(); - public V1TopologySpreadConstraint buildLastTopologySpreadConstraint(); - public V1TopologySpreadConstraint buildMatchingTopologySpreadConstraint(Predicate predicate); - public Boolean hasMatchingTopologySpreadConstraint(Predicate predicate); - public A withTopologySpreadConstraints(List topologySpreadConstraints); - public A withTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... topologySpreadConstraints); - public Boolean hasTopologySpreadConstraints(); - public V1PodSpecFluent.TopologySpreadConstraintsNested addNewTopologySpreadConstraint(); - public V1PodSpecFluent.TopologySpreadConstraintsNested addNewTopologySpreadConstraintLike(V1TopologySpreadConstraint item); - public V1PodSpecFluent.TopologySpreadConstraintsNested setNewTopologySpreadConstraintLike(int index,V1TopologySpreadConstraint item); - public V1PodSpecFluent.TopologySpreadConstraintsNested editTopologySpreadConstraint(int index); - public V1PodSpecFluent.TopologySpreadConstraintsNested editFirstTopologySpreadConstraint(); - public V1PodSpecFluent.TopologySpreadConstraintsNested editLastTopologySpreadConstraint(); - public V1PodSpecFluent.TopologySpreadConstraintsNested editMatchingTopologySpreadConstraint(Predicate predicate); - public A addToVolumes(int index,V1Volume item); - public A setToVolumes(int index,V1Volume item); - public A addToVolumes(io.kubernetes.client.openapi.models.V1Volume... items); - public A addAllToVolumes(Collection items); - public A removeFromVolumes(io.kubernetes.client.openapi.models.V1Volume... items); - public A removeAllFromVolumes(Collection items); - public A removeMatchingFromVolumes(Predicate predicate); - - /** - * This method has been deprecated, please use method buildVolumes instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumes(); - public List buildVolumes(); - public V1Volume buildVolume(int index); - public V1Volume buildFirstVolume(); - public V1Volume buildLastVolume(); - public V1Volume buildMatchingVolume(Predicate predicate); - public Boolean hasMatchingVolume(Predicate predicate); - public A withVolumes(List volumes); - public A withVolumes(io.kubernetes.client.openapi.models.V1Volume... volumes); - public Boolean hasVolumes(); - public V1PodSpecFluent.VolumesNested addNewVolume(); - public V1PodSpecFluent.VolumesNested addNewVolumeLike(V1Volume item); - public V1PodSpecFluent.VolumesNested setNewVolumeLike(int index,V1Volume item); - public V1PodSpecFluent.VolumesNested editVolume(int index); - public V1PodSpecFluent.VolumesNested editFirstVolume(); - public V1PodSpecFluent.VolumesNested editLastVolume(); - public V1PodSpecFluent.VolumesNested editMatchingVolume(Predicate predicate); - public A withAutomountServiceAccountToken(); - public A withEnableServiceLinks(); - public A withHostIPC(); - public A withHostNetwork(); - public A withHostPID(); - public A withHostUsers(); - public A withSetHostnameAsFQDN(); - public A withShareProcessNamespace(); - public interface AffinityNested extends Nested,V1AffinityFluent>{ - public N and(); - public N endAffinity(); - - } - public interface ContainersNested extends Nested,V1ContainerFluent>{ - public N and(); - public N endContainer(); - - } - public interface DnsConfigNested extends Nested,V1PodDNSConfigFluent>{ - public N and(); - public N endDnsConfig(); - - } - public interface EphemeralContainersNested extends Nested,V1EphemeralContainerFluent>{ - public N and(); - public N endEphemeralContainer(); - - } - public interface HostAliasesNested extends Nested,V1HostAliasFluent>{ - public N and(); - public N endHostAlias(); - - } - public interface ImagePullSecretsNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endImagePullSecret(); - - } - public interface InitContainersNested extends Nested,V1ContainerFluent>{ - public N and(); - public N endInitContainer(); - - } - public interface OsNested extends Nested,V1PodOSFluent>{ - public N and(); - public N endOs(); - - } - public interface ReadinessGatesNested extends Nested,V1PodReadinessGateFluent>{ - public N and(); - public N endReadinessGate(); - - } - public interface ResourceClaimsNested extends Nested,V1PodResourceClaimFluent>{ - public N and(); - public N endResourceClaim(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodSpecFluent> extends BaseFluent{ + public V1PodSpecFluent() { + } + + public V1PodSpecFluent(V1PodSpec instance) { + this.copyInstance(instance); + } + private Long activeDeadlineSeconds; + private V1AffinityBuilder affinity; + private Boolean automountServiceAccountToken; + private ArrayList containers; + private V1PodDNSConfigBuilder dnsConfig; + private String dnsPolicy; + private Boolean enableServiceLinks; + private ArrayList ephemeralContainers; + private ArrayList hostAliases; + private Boolean hostIPC; + private Boolean hostNetwork; + private Boolean hostPID; + private Boolean hostUsers; + private String hostname; + private ArrayList imagePullSecrets; + private ArrayList initContainers; + private String nodeName; + private Map nodeSelector; + private V1PodOSBuilder os; + private Map overhead; + private String preemptionPolicy; + private Integer priority; + private String priorityClassName; + private ArrayList readinessGates; + private ArrayList resourceClaims; + private String restartPolicy; + private String runtimeClassName; + private String schedulerName; + private ArrayList schedulingGates; + private V1PodSecurityContextBuilder securityContext; + private String serviceAccount; + private String serviceAccountName; + private Boolean setHostnameAsFQDN; + private Boolean shareProcessNamespace; + private String subdomain; + private Long terminationGracePeriodSeconds; + private ArrayList tolerations; + private ArrayList topologySpreadConstraints; + private ArrayList volumes; + + protected void copyInstance(V1PodSpec instance) { + instance = (instance != null ? instance : new V1PodSpec()); + if (instance != null) { + this.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds()); + this.withAffinity(instance.getAffinity()); + this.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken()); + this.withContainers(instance.getContainers()); + this.withDnsConfig(instance.getDnsConfig()); + this.withDnsPolicy(instance.getDnsPolicy()); + this.withEnableServiceLinks(instance.getEnableServiceLinks()); + this.withEphemeralContainers(instance.getEphemeralContainers()); + this.withHostAliases(instance.getHostAliases()); + this.withHostIPC(instance.getHostIPC()); + this.withHostNetwork(instance.getHostNetwork()); + this.withHostPID(instance.getHostPID()); + this.withHostUsers(instance.getHostUsers()); + this.withHostname(instance.getHostname()); + this.withImagePullSecrets(instance.getImagePullSecrets()); + this.withInitContainers(instance.getInitContainers()); + this.withNodeName(instance.getNodeName()); + this.withNodeSelector(instance.getNodeSelector()); + this.withOs(instance.getOs()); + this.withOverhead(instance.getOverhead()); + this.withPreemptionPolicy(instance.getPreemptionPolicy()); + this.withPriority(instance.getPriority()); + this.withPriorityClassName(instance.getPriorityClassName()); + this.withReadinessGates(instance.getReadinessGates()); + this.withResourceClaims(instance.getResourceClaims()); + this.withRestartPolicy(instance.getRestartPolicy()); + this.withRuntimeClassName(instance.getRuntimeClassName()); + this.withSchedulerName(instance.getSchedulerName()); + this.withSchedulingGates(instance.getSchedulingGates()); + this.withSecurityContext(instance.getSecurityContext()); + this.withServiceAccount(instance.getServiceAccount()); + this.withServiceAccountName(instance.getServiceAccountName()); + this.withSetHostnameAsFQDN(instance.getSetHostnameAsFQDN()); + this.withShareProcessNamespace(instance.getShareProcessNamespace()); + this.withSubdomain(instance.getSubdomain()); + this.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds()); + this.withTolerations(instance.getTolerations()); + this.withTopologySpreadConstraints(instance.getTopologySpreadConstraints()); + this.withVolumes(instance.getVolumes()); + } + } + + public Long getActiveDeadlineSeconds() { + return this.activeDeadlineSeconds; + } + + public A withActiveDeadlineSeconds(Long activeDeadlineSeconds) { + this.activeDeadlineSeconds = activeDeadlineSeconds; + return (A) this; + } + + public boolean hasActiveDeadlineSeconds() { + return this.activeDeadlineSeconds != null; + } + + public V1Affinity buildAffinity() { + return this.affinity != null ? this.affinity.build() : null; + } + + public A withAffinity(V1Affinity affinity) { + this._visitables.remove("affinity"); + if (affinity != null) { + this.affinity = new V1AffinityBuilder(affinity); + this._visitables.get("affinity").add(this.affinity); + } else { + this.affinity = null; + this._visitables.get("affinity").remove(this.affinity); + } + return (A) this; + } + + public boolean hasAffinity() { + return this.affinity != null; + } + + public AffinityNested withNewAffinity() { + return new AffinityNested(null); + } + + public AffinityNested withNewAffinityLike(V1Affinity item) { + return new AffinityNested(item); + } + + public AffinityNested editAffinity() { + return withNewAffinityLike(java.util.Optional.ofNullable(buildAffinity()).orElse(null)); + } + + public AffinityNested editOrNewAffinity() { + return withNewAffinityLike(java.util.Optional.ofNullable(buildAffinity()).orElse(new V1AffinityBuilder().build())); + } + + public AffinityNested editOrNewAffinityLike(V1Affinity item) { + return withNewAffinityLike(java.util.Optional.ofNullable(buildAffinity()).orElse(item)); + } + + public Boolean getAutomountServiceAccountToken() { + return this.automountServiceAccountToken; + } + + public A withAutomountServiceAccountToken(Boolean automountServiceAccountToken) { + this.automountServiceAccountToken = automountServiceAccountToken; + return (A) this; + } + + public boolean hasAutomountServiceAccountToken() { + return this.automountServiceAccountToken != null; + } + + public A addToContainers(int index,V1Container item) { + if (this.containers == null) {this.containers = new ArrayList();} + V1ContainerBuilder builder = new V1ContainerBuilder(item); + if (index < 0 || index >= containers.size()) { _visitables.get("containers").add(builder); containers.add(builder); } else { _visitables.get("containers").add(index, builder); containers.add(index, builder);} + return (A)this; + } + + public A setToContainers(int index,V1Container item) { + if (this.containers == null) {this.containers = new ArrayList();} + V1ContainerBuilder builder = new V1ContainerBuilder(item); + if (index < 0 || index >= containers.size()) { _visitables.get("containers").add(builder); containers.add(builder); } else { _visitables.get("containers").set(index, builder); containers.set(index, builder);} + return (A)this; + } + + public A addToContainers(io.kubernetes.client.openapi.models.V1Container... items) { + if (this.containers == null) {this.containers = new ArrayList();} + for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").add(builder);this.containers.add(builder);} return (A)this; + } + + public A addAllToContainers(Collection items) { + if (this.containers == null) {this.containers = new ArrayList();} + for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").add(builder);this.containers.add(builder);} return (A)this; + } + + public A removeFromContainers(io.kubernetes.client.openapi.models.V1Container... items) { + if (this.containers == null) return (A)this; + for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").remove(builder); this.containers.remove(builder);} return (A)this; + } + + public A removeAllFromContainers(Collection items) { + if (this.containers == null) return (A)this; + for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").remove(builder); this.containers.remove(builder);} return (A)this; + } + + public A removeMatchingFromContainers(Predicate predicate) { + if (containers == null) return (A) this; + final Iterator each = containers.iterator(); + final List visitables = _visitables.get("containers"); + while (each.hasNext()) { + V1ContainerBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildContainers() { + return this.containers != null ? build(containers) : null; + } + + public V1Container buildContainer(int index) { + return this.containers.get(index).build(); + } + + public V1Container buildFirstContainer() { + return this.containers.get(0).build(); + } + + public V1Container buildLastContainer() { + return this.containers.get(containers.size() - 1).build(); + } + + public V1Container buildMatchingContainer(Predicate predicate) { + for (V1ContainerBuilder item : containers) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingContainer(Predicate predicate) { + for (V1ContainerBuilder item : containers) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withContainers(List containers) { + if (this.containers != null) { + this._visitables.get("containers").clear(); + } + if (containers != null) { + this.containers = new ArrayList(); + for (V1Container item : containers) { + this.addToContainers(item); + } + } else { + this.containers = null; + } + return (A) this; + } + + public A withContainers(io.kubernetes.client.openapi.models.V1Container... containers) { + if (this.containers != null) { + this.containers.clear(); + _visitables.remove("containers"); + } + if (containers != null) { + for (V1Container item : containers) { + this.addToContainers(item); + } + } + return (A) this; + } + + public boolean hasContainers() { + return this.containers != null && !this.containers.isEmpty(); + } + + public ContainersNested addNewContainer() { + return new ContainersNested(-1, null); + } + + public ContainersNested addNewContainerLike(V1Container item) { + return new ContainersNested(-1, item); + } + + public ContainersNested setNewContainerLike(int index,V1Container item) { + return new ContainersNested(index, item); + } + + public ContainersNested editContainer(int index) { + if (containers.size() <= index) throw new RuntimeException("Can't edit containers. Index exceeds size."); + return setNewContainerLike(index, buildContainer(index)); + } + + public ContainersNested editFirstContainer() { + if (containers.size() == 0) throw new RuntimeException("Can't edit first containers. The list is empty."); + return setNewContainerLike(0, buildContainer(0)); + } + + public ContainersNested editLastContainer() { + int index = containers.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last containers. The list is empty."); + return setNewContainerLike(index, buildContainer(index)); + } + + public ContainersNested editMatchingContainer(Predicate predicate) { + int index = -1; + for (int i=0;i withNewDnsConfig() { + return new DnsConfigNested(null); + } + + public DnsConfigNested withNewDnsConfigLike(V1PodDNSConfig item) { + return new DnsConfigNested(item); + } + + public DnsConfigNested editDnsConfig() { + return withNewDnsConfigLike(java.util.Optional.ofNullable(buildDnsConfig()).orElse(null)); + } + + public DnsConfigNested editOrNewDnsConfig() { + return withNewDnsConfigLike(java.util.Optional.ofNullable(buildDnsConfig()).orElse(new V1PodDNSConfigBuilder().build())); + } + + public DnsConfigNested editOrNewDnsConfigLike(V1PodDNSConfig item) { + return withNewDnsConfigLike(java.util.Optional.ofNullable(buildDnsConfig()).orElse(item)); + } + + public String getDnsPolicy() { + return this.dnsPolicy; + } + + public A withDnsPolicy(String dnsPolicy) { + this.dnsPolicy = dnsPolicy; + return (A) this; + } + + public boolean hasDnsPolicy() { + return this.dnsPolicy != null; + } + + public Boolean getEnableServiceLinks() { + return this.enableServiceLinks; + } + + public A withEnableServiceLinks(Boolean enableServiceLinks) { + this.enableServiceLinks = enableServiceLinks; + return (A) this; + } + + public boolean hasEnableServiceLinks() { + return this.enableServiceLinks != null; + } + + public A addToEphemeralContainers(int index,V1EphemeralContainer item) { + if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();} + V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item); + if (index < 0 || index >= ephemeralContainers.size()) { _visitables.get("ephemeralContainers").add(builder); ephemeralContainers.add(builder); } else { _visitables.get("ephemeralContainers").add(index, builder); ephemeralContainers.add(index, builder);} + return (A)this; + } + + public A setToEphemeralContainers(int index,V1EphemeralContainer item) { + if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();} + V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item); + if (index < 0 || index >= ephemeralContainers.size()) { _visitables.get("ephemeralContainers").add(builder); ephemeralContainers.add(builder); } else { _visitables.get("ephemeralContainers").set(index, builder); ephemeralContainers.set(index, builder);} + return (A)this; + } + + public A addToEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... items) { + if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();} + for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").add(builder);this.ephemeralContainers.add(builder);} return (A)this; + } + + public A addAllToEphemeralContainers(Collection items) { + if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();} + for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").add(builder);this.ephemeralContainers.add(builder);} return (A)this; + } + + public A removeFromEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... items) { + if (this.ephemeralContainers == null) return (A)this; + for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").remove(builder); this.ephemeralContainers.remove(builder);} return (A)this; + } + + public A removeAllFromEphemeralContainers(Collection items) { + if (this.ephemeralContainers == null) return (A)this; + for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").remove(builder); this.ephemeralContainers.remove(builder);} return (A)this; + } + + public A removeMatchingFromEphemeralContainers(Predicate predicate) { + if (ephemeralContainers == null) return (A) this; + final Iterator each = ephemeralContainers.iterator(); + final List visitables = _visitables.get("ephemeralContainers"); + while (each.hasNext()) { + V1EphemeralContainerBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildEphemeralContainers() { + return this.ephemeralContainers != null ? build(ephemeralContainers) : null; + } + + public V1EphemeralContainer buildEphemeralContainer(int index) { + return this.ephemeralContainers.get(index).build(); + } + + public V1EphemeralContainer buildFirstEphemeralContainer() { + return this.ephemeralContainers.get(0).build(); + } + + public V1EphemeralContainer buildLastEphemeralContainer() { + return this.ephemeralContainers.get(ephemeralContainers.size() - 1).build(); + } + + public V1EphemeralContainer buildMatchingEphemeralContainer(Predicate predicate) { + for (V1EphemeralContainerBuilder item : ephemeralContainers) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingEphemeralContainer(Predicate predicate) { + for (V1EphemeralContainerBuilder item : ephemeralContainers) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withEphemeralContainers(List ephemeralContainers) { + if (this.ephemeralContainers != null) { + this._visitables.get("ephemeralContainers").clear(); + } + if (ephemeralContainers != null) { + this.ephemeralContainers = new ArrayList(); + for (V1EphemeralContainer item : ephemeralContainers) { + this.addToEphemeralContainers(item); + } + } else { + this.ephemeralContainers = null; + } + return (A) this; + } + + public A withEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... ephemeralContainers) { + if (this.ephemeralContainers != null) { + this.ephemeralContainers.clear(); + _visitables.remove("ephemeralContainers"); + } + if (ephemeralContainers != null) { + for (V1EphemeralContainer item : ephemeralContainers) { + this.addToEphemeralContainers(item); + } + } + return (A) this; + } + + public boolean hasEphemeralContainers() { + return this.ephemeralContainers != null && !this.ephemeralContainers.isEmpty(); + } + + public EphemeralContainersNested addNewEphemeralContainer() { + return new EphemeralContainersNested(-1, null); + } + + public EphemeralContainersNested addNewEphemeralContainerLike(V1EphemeralContainer item) { + return new EphemeralContainersNested(-1, item); + } + + public EphemeralContainersNested setNewEphemeralContainerLike(int index,V1EphemeralContainer item) { + return new EphemeralContainersNested(index, item); + } + + public EphemeralContainersNested editEphemeralContainer(int index) { + if (ephemeralContainers.size() <= index) throw new RuntimeException("Can't edit ephemeralContainers. Index exceeds size."); + return setNewEphemeralContainerLike(index, buildEphemeralContainer(index)); + } + + public EphemeralContainersNested editFirstEphemeralContainer() { + if (ephemeralContainers.size() == 0) throw new RuntimeException("Can't edit first ephemeralContainers. The list is empty."); + return setNewEphemeralContainerLike(0, buildEphemeralContainer(0)); + } + + public EphemeralContainersNested editLastEphemeralContainer() { + int index = ephemeralContainers.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ephemeralContainers. The list is empty."); + return setNewEphemeralContainerLike(index, buildEphemeralContainer(index)); + } + + public EphemeralContainersNested editMatchingEphemeralContainer(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1HostAliasBuilder builder = new V1HostAliasBuilder(item); + if (index < 0 || index >= hostAliases.size()) { _visitables.get("hostAliases").add(builder); hostAliases.add(builder); } else { _visitables.get("hostAliases").add(index, builder); hostAliases.add(index, builder);} + return (A)this; + } + + public A setToHostAliases(int index,V1HostAlias item) { + if (this.hostAliases == null) {this.hostAliases = new ArrayList();} + V1HostAliasBuilder builder = new V1HostAliasBuilder(item); + if (index < 0 || index >= hostAliases.size()) { _visitables.get("hostAliases").add(builder); hostAliases.add(builder); } else { _visitables.get("hostAliases").set(index, builder); hostAliases.set(index, builder);} + return (A)this; + } + + public A addToHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... items) { + if (this.hostAliases == null) {this.hostAliases = new ArrayList();} + for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").add(builder);this.hostAliases.add(builder);} return (A)this; + } + + public A addAllToHostAliases(Collection items) { + if (this.hostAliases == null) {this.hostAliases = new ArrayList();} + for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").add(builder);this.hostAliases.add(builder);} return (A)this; + } + + public A removeFromHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... items) { + if (this.hostAliases == null) return (A)this; + for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").remove(builder); this.hostAliases.remove(builder);} return (A)this; + } + + public A removeAllFromHostAliases(Collection items) { + if (this.hostAliases == null) return (A)this; + for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").remove(builder); this.hostAliases.remove(builder);} return (A)this; + } + + public A removeMatchingFromHostAliases(Predicate predicate) { + if (hostAliases == null) return (A) this; + final Iterator each = hostAliases.iterator(); + final List visitables = _visitables.get("hostAliases"); + while (each.hasNext()) { + V1HostAliasBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildHostAliases() { + return this.hostAliases != null ? build(hostAliases) : null; + } + + public V1HostAlias buildHostAlias(int index) { + return this.hostAliases.get(index).build(); + } + + public V1HostAlias buildFirstHostAlias() { + return this.hostAliases.get(0).build(); + } + + public V1HostAlias buildLastHostAlias() { + return this.hostAliases.get(hostAliases.size() - 1).build(); + } + + public V1HostAlias buildMatchingHostAlias(Predicate predicate) { + for (V1HostAliasBuilder item : hostAliases) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingHostAlias(Predicate predicate) { + for (V1HostAliasBuilder item : hostAliases) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withHostAliases(List hostAliases) { + if (this.hostAliases != null) { + this._visitables.get("hostAliases").clear(); + } + if (hostAliases != null) { + this.hostAliases = new ArrayList(); + for (V1HostAlias item : hostAliases) { + this.addToHostAliases(item); + } + } else { + this.hostAliases = null; + } + return (A) this; + } + + public A withHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... hostAliases) { + if (this.hostAliases != null) { + this.hostAliases.clear(); + _visitables.remove("hostAliases"); + } + if (hostAliases != null) { + for (V1HostAlias item : hostAliases) { + this.addToHostAliases(item); + } + } + return (A) this; + } + + public boolean hasHostAliases() { + return this.hostAliases != null && !this.hostAliases.isEmpty(); + } + + public HostAliasesNested addNewHostAlias() { + return new HostAliasesNested(-1, null); + } + + public HostAliasesNested addNewHostAliasLike(V1HostAlias item) { + return new HostAliasesNested(-1, item); + } + + public HostAliasesNested setNewHostAliasLike(int index,V1HostAlias item) { + return new HostAliasesNested(index, item); + } + + public HostAliasesNested editHostAlias(int index) { + if (hostAliases.size() <= index) throw new RuntimeException("Can't edit hostAliases. Index exceeds size."); + return setNewHostAliasLike(index, buildHostAlias(index)); + } + + public HostAliasesNested editFirstHostAlias() { + if (hostAliases.size() == 0) throw new RuntimeException("Can't edit first hostAliases. The list is empty."); + return setNewHostAliasLike(0, buildHostAlias(0)); + } + + public HostAliasesNested editLastHostAlias() { + int index = hostAliases.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last hostAliases. The list is empty."); + return setNewHostAliasLike(index, buildHostAlias(index)); + } + + public HostAliasesNested editMatchingHostAlias(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item); + if (index < 0 || index >= imagePullSecrets.size()) { _visitables.get("imagePullSecrets").add(builder); imagePullSecrets.add(builder); } else { _visitables.get("imagePullSecrets").add(index, builder); imagePullSecrets.add(index, builder);} + return (A)this; + } + + public A setToImagePullSecrets(int index,V1LocalObjectReference item) { + if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} + V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item); + if (index < 0 || index >= imagePullSecrets.size()) { _visitables.get("imagePullSecrets").add(builder); imagePullSecrets.add(builder); } else { _visitables.get("imagePullSecrets").set(index, builder); imagePullSecrets.set(index, builder);} + return (A)this; + } + + public A addToImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) { + if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} + for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this; + } + + public A addAllToImagePullSecrets(Collection items) { + if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} + for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this; + } + + public A removeFromImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) { + if (this.imagePullSecrets == null) return (A)this; + for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder); this.imagePullSecrets.remove(builder);} return (A)this; + } + + public A removeAllFromImagePullSecrets(Collection items) { + if (this.imagePullSecrets == null) return (A)this; + for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder); this.imagePullSecrets.remove(builder);} return (A)this; + } + + public A removeMatchingFromImagePullSecrets(Predicate predicate) { + if (imagePullSecrets == null) return (A) this; + final Iterator each = imagePullSecrets.iterator(); + final List visitables = _visitables.get("imagePullSecrets"); + while (each.hasNext()) { + V1LocalObjectReferenceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildImagePullSecrets() { + return this.imagePullSecrets != null ? build(imagePullSecrets) : null; + } + + public V1LocalObjectReference buildImagePullSecret(int index) { + return this.imagePullSecrets.get(index).build(); + } + + public V1LocalObjectReference buildFirstImagePullSecret() { + return this.imagePullSecrets.get(0).build(); + } + + public V1LocalObjectReference buildLastImagePullSecret() { + return this.imagePullSecrets.get(imagePullSecrets.size() - 1).build(); + } + + public V1LocalObjectReference buildMatchingImagePullSecret(Predicate predicate) { + for (V1LocalObjectReferenceBuilder item : imagePullSecrets) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingImagePullSecret(Predicate predicate) { + for (V1LocalObjectReferenceBuilder item : imagePullSecrets) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withImagePullSecrets(List imagePullSecrets) { + if (this.imagePullSecrets != null) { + this._visitables.get("imagePullSecrets").clear(); + } + if (imagePullSecrets != null) { + this.imagePullSecrets = new ArrayList(); + for (V1LocalObjectReference item : imagePullSecrets) { + this.addToImagePullSecrets(item); + } + } else { + this.imagePullSecrets = null; + } + return (A) this; + } + + public A withImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... imagePullSecrets) { + if (this.imagePullSecrets != null) { + this.imagePullSecrets.clear(); + _visitables.remove("imagePullSecrets"); + } + if (imagePullSecrets != null) { + for (V1LocalObjectReference item : imagePullSecrets) { + this.addToImagePullSecrets(item); + } + } + return (A) this; + } + + public boolean hasImagePullSecrets() { + return this.imagePullSecrets != null && !this.imagePullSecrets.isEmpty(); + } + + public ImagePullSecretsNested addNewImagePullSecret() { + return new ImagePullSecretsNested(-1, null); + } + + public ImagePullSecretsNested addNewImagePullSecretLike(V1LocalObjectReference item) { + return new ImagePullSecretsNested(-1, item); + } + + public ImagePullSecretsNested setNewImagePullSecretLike(int index,V1LocalObjectReference item) { + return new ImagePullSecretsNested(index, item); + } + + public ImagePullSecretsNested editImagePullSecret(int index) { + if (imagePullSecrets.size() <= index) throw new RuntimeException("Can't edit imagePullSecrets. Index exceeds size."); + return setNewImagePullSecretLike(index, buildImagePullSecret(index)); + } + + public ImagePullSecretsNested editFirstImagePullSecret() { + if (imagePullSecrets.size() == 0) throw new RuntimeException("Can't edit first imagePullSecrets. The list is empty."); + return setNewImagePullSecretLike(0, buildImagePullSecret(0)); + } + + public ImagePullSecretsNested editLastImagePullSecret() { + int index = imagePullSecrets.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last imagePullSecrets. The list is empty."); + return setNewImagePullSecretLike(index, buildImagePullSecret(index)); + } + + public ImagePullSecretsNested editMatchingImagePullSecret(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1ContainerBuilder builder = new V1ContainerBuilder(item); + if (index < 0 || index >= initContainers.size()) { _visitables.get("initContainers").add(builder); initContainers.add(builder); } else { _visitables.get("initContainers").add(index, builder); initContainers.add(index, builder);} + return (A)this; + } + + public A setToInitContainers(int index,V1Container item) { + if (this.initContainers == null) {this.initContainers = new ArrayList();} + V1ContainerBuilder builder = new V1ContainerBuilder(item); + if (index < 0 || index >= initContainers.size()) { _visitables.get("initContainers").add(builder); initContainers.add(builder); } else { _visitables.get("initContainers").set(index, builder); initContainers.set(index, builder);} + return (A)this; + } + + public A addToInitContainers(io.kubernetes.client.openapi.models.V1Container... items) { + if (this.initContainers == null) {this.initContainers = new ArrayList();} + for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").add(builder);this.initContainers.add(builder);} return (A)this; + } + + public A addAllToInitContainers(Collection items) { + if (this.initContainers == null) {this.initContainers = new ArrayList();} + for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").add(builder);this.initContainers.add(builder);} return (A)this; + } + + public A removeFromInitContainers(io.kubernetes.client.openapi.models.V1Container... items) { + if (this.initContainers == null) return (A)this; + for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").remove(builder); this.initContainers.remove(builder);} return (A)this; + } + + public A removeAllFromInitContainers(Collection items) { + if (this.initContainers == null) return (A)this; + for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").remove(builder); this.initContainers.remove(builder);} return (A)this; + } + + public A removeMatchingFromInitContainers(Predicate predicate) { + if (initContainers == null) return (A) this; + final Iterator each = initContainers.iterator(); + final List visitables = _visitables.get("initContainers"); + while (each.hasNext()) { + V1ContainerBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildInitContainers() { + return this.initContainers != null ? build(initContainers) : null; + } + + public V1Container buildInitContainer(int index) { + return this.initContainers.get(index).build(); + } + + public V1Container buildFirstInitContainer() { + return this.initContainers.get(0).build(); + } + + public V1Container buildLastInitContainer() { + return this.initContainers.get(initContainers.size() - 1).build(); + } + + public V1Container buildMatchingInitContainer(Predicate predicate) { + for (V1ContainerBuilder item : initContainers) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingInitContainer(Predicate predicate) { + for (V1ContainerBuilder item : initContainers) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withInitContainers(List initContainers) { + if (this.initContainers != null) { + this._visitables.get("initContainers").clear(); + } + if (initContainers != null) { + this.initContainers = new ArrayList(); + for (V1Container item : initContainers) { + this.addToInitContainers(item); + } + } else { + this.initContainers = null; + } + return (A) this; + } + + public A withInitContainers(io.kubernetes.client.openapi.models.V1Container... initContainers) { + if (this.initContainers != null) { + this.initContainers.clear(); + _visitables.remove("initContainers"); + } + if (initContainers != null) { + for (V1Container item : initContainers) { + this.addToInitContainers(item); + } + } + return (A) this; + } + + public boolean hasInitContainers() { + return this.initContainers != null && !this.initContainers.isEmpty(); + } + + public InitContainersNested addNewInitContainer() { + return new InitContainersNested(-1, null); + } + + public InitContainersNested addNewInitContainerLike(V1Container item) { + return new InitContainersNested(-1, item); + } + + public InitContainersNested setNewInitContainerLike(int index,V1Container item) { + return new InitContainersNested(index, item); + } + + public InitContainersNested editInitContainer(int index) { + if (initContainers.size() <= index) throw new RuntimeException("Can't edit initContainers. Index exceeds size."); + return setNewInitContainerLike(index, buildInitContainer(index)); + } + + public InitContainersNested editFirstInitContainer() { + if (initContainers.size() == 0) throw new RuntimeException("Can't edit first initContainers. The list is empty."); + return setNewInitContainerLike(0, buildInitContainer(0)); + } + + public InitContainersNested editLastInitContainer() { + int index = initContainers.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last initContainers. The list is empty."); + return setNewInitContainerLike(index, buildInitContainer(index)); + } + + public InitContainersNested editMatchingInitContainer(Predicate predicate) { + int index = -1; + for (int i=0;i map) { + if(this.nodeSelector == null && map != null) { this.nodeSelector = new LinkedHashMap(); } + if(map != null) { this.nodeSelector.putAll(map);} return (A)this; + } + + public A removeFromNodeSelector(String key) { + if(this.nodeSelector == null) { return (A) this; } + if(key != null && this.nodeSelector != null) {this.nodeSelector.remove(key);} return (A)this; + } + + public A removeFromNodeSelector(Map map) { + if(this.nodeSelector == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.nodeSelector != null){this.nodeSelector.remove(key);}}} return (A)this; + } + + public Map getNodeSelector() { + return this.nodeSelector; + } + + public A withNodeSelector(Map nodeSelector) { + if (nodeSelector == null) { + this.nodeSelector = null; + } else { + this.nodeSelector = new LinkedHashMap(nodeSelector); + } + return (A) this; + } + + public boolean hasNodeSelector() { + return this.nodeSelector != null; + } + + public V1PodOS buildOs() { + return this.os != null ? this.os.build() : null; + } + + public A withOs(V1PodOS os) { + this._visitables.remove("os"); + if (os != null) { + this.os = new V1PodOSBuilder(os); + this._visitables.get("os").add(this.os); + } else { + this.os = null; + this._visitables.get("os").remove(this.os); + } + return (A) this; + } + + public boolean hasOs() { + return this.os != null; + } + + public OsNested withNewOs() { + return new OsNested(null); + } + + public OsNested withNewOsLike(V1PodOS item) { + return new OsNested(item); + } + + public OsNested editOs() { + return withNewOsLike(java.util.Optional.ofNullable(buildOs()).orElse(null)); + } + + public OsNested editOrNewOs() { + return withNewOsLike(java.util.Optional.ofNullable(buildOs()).orElse(new V1PodOSBuilder().build())); + } + + public OsNested editOrNewOsLike(V1PodOS item) { + return withNewOsLike(java.util.Optional.ofNullable(buildOs()).orElse(item)); + } + + public A addToOverhead(String key,Quantity value) { + if(this.overhead == null && key != null && value != null) { this.overhead = new LinkedHashMap(); } + if(key != null && value != null) {this.overhead.put(key, value);} return (A)this; + } + + public A addToOverhead(Map map) { + if(this.overhead == null && map != null) { this.overhead = new LinkedHashMap(); } + if(map != null) { this.overhead.putAll(map);} return (A)this; + } + + public A removeFromOverhead(String key) { + if(this.overhead == null) { return (A) this; } + if(key != null && this.overhead != null) {this.overhead.remove(key);} return (A)this; + } + + public A removeFromOverhead(Map map) { + if(this.overhead == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.overhead != null){this.overhead.remove(key);}}} return (A)this; + } + + public Map getOverhead() { + return this.overhead; + } + + public A withOverhead(Map overhead) { + if (overhead == null) { + this.overhead = null; + } else { + this.overhead = new LinkedHashMap(overhead); + } + return (A) this; + } + + public boolean hasOverhead() { + return this.overhead != null; + } + + public String getPreemptionPolicy() { + return this.preemptionPolicy; + } + + public A withPreemptionPolicy(String preemptionPolicy) { + this.preemptionPolicy = preemptionPolicy; + return (A) this; + } + + public boolean hasPreemptionPolicy() { + return this.preemptionPolicy != null; + } + + public Integer getPriority() { + return this.priority; + } + + public A withPriority(Integer priority) { + this.priority = priority; + return (A) this; + } + + public boolean hasPriority() { + return this.priority != null; + } + + public String getPriorityClassName() { + return this.priorityClassName; + } + + public A withPriorityClassName(String priorityClassName) { + this.priorityClassName = priorityClassName; + return (A) this; + } + + public boolean hasPriorityClassName() { + return this.priorityClassName != null; + } + + public A addToReadinessGates(int index,V1PodReadinessGate item) { + if (this.readinessGates == null) {this.readinessGates = new ArrayList();} + V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item); + if (index < 0 || index >= readinessGates.size()) { _visitables.get("readinessGates").add(builder); readinessGates.add(builder); } else { _visitables.get("readinessGates").add(index, builder); readinessGates.add(index, builder);} + return (A)this; + } + + public A setToReadinessGates(int index,V1PodReadinessGate item) { + if (this.readinessGates == null) {this.readinessGates = new ArrayList();} + V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item); + if (index < 0 || index >= readinessGates.size()) { _visitables.get("readinessGates").add(builder); readinessGates.add(builder); } else { _visitables.get("readinessGates").set(index, builder); readinessGates.set(index, builder);} + return (A)this; + } + + public A addToReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... items) { + if (this.readinessGates == null) {this.readinessGates = new ArrayList();} + for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").add(builder);this.readinessGates.add(builder);} return (A)this; + } + + public A addAllToReadinessGates(Collection items) { + if (this.readinessGates == null) {this.readinessGates = new ArrayList();} + for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").add(builder);this.readinessGates.add(builder);} return (A)this; + } + + public A removeFromReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... items) { + if (this.readinessGates == null) return (A)this; + for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").remove(builder); this.readinessGates.remove(builder);} return (A)this; + } + + public A removeAllFromReadinessGates(Collection items) { + if (this.readinessGates == null) return (A)this; + for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").remove(builder); this.readinessGates.remove(builder);} return (A)this; + } + + public A removeMatchingFromReadinessGates(Predicate predicate) { + if (readinessGates == null) return (A) this; + final Iterator each = readinessGates.iterator(); + final List visitables = _visitables.get("readinessGates"); + while (each.hasNext()) { + V1PodReadinessGateBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildReadinessGates() { + return this.readinessGates != null ? build(readinessGates) : null; + } + + public V1PodReadinessGate buildReadinessGate(int index) { + return this.readinessGates.get(index).build(); + } + + public V1PodReadinessGate buildFirstReadinessGate() { + return this.readinessGates.get(0).build(); + } + + public V1PodReadinessGate buildLastReadinessGate() { + return this.readinessGates.get(readinessGates.size() - 1).build(); + } + + public V1PodReadinessGate buildMatchingReadinessGate(Predicate predicate) { + for (V1PodReadinessGateBuilder item : readinessGates) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingReadinessGate(Predicate predicate) { + for (V1PodReadinessGateBuilder item : readinessGates) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withReadinessGates(List readinessGates) { + if (this.readinessGates != null) { + this._visitables.get("readinessGates").clear(); + } + if (readinessGates != null) { + this.readinessGates = new ArrayList(); + for (V1PodReadinessGate item : readinessGates) { + this.addToReadinessGates(item); + } + } else { + this.readinessGates = null; + } + return (A) this; + } + + public A withReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... readinessGates) { + if (this.readinessGates != null) { + this.readinessGates.clear(); + _visitables.remove("readinessGates"); + } + if (readinessGates != null) { + for (V1PodReadinessGate item : readinessGates) { + this.addToReadinessGates(item); + } + } + return (A) this; + } + + public boolean hasReadinessGates() { + return this.readinessGates != null && !this.readinessGates.isEmpty(); + } + + public ReadinessGatesNested addNewReadinessGate() { + return new ReadinessGatesNested(-1, null); + } + + public ReadinessGatesNested addNewReadinessGateLike(V1PodReadinessGate item) { + return new ReadinessGatesNested(-1, item); + } + + public ReadinessGatesNested setNewReadinessGateLike(int index,V1PodReadinessGate item) { + return new ReadinessGatesNested(index, item); + } + + public ReadinessGatesNested editReadinessGate(int index) { + if (readinessGates.size() <= index) throw new RuntimeException("Can't edit readinessGates. Index exceeds size."); + return setNewReadinessGateLike(index, buildReadinessGate(index)); + } + + public ReadinessGatesNested editFirstReadinessGate() { + if (readinessGates.size() == 0) throw new RuntimeException("Can't edit first readinessGates. The list is empty."); + return setNewReadinessGateLike(0, buildReadinessGate(0)); + } + + public ReadinessGatesNested editLastReadinessGate() { + int index = readinessGates.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last readinessGates. The list is empty."); + return setNewReadinessGateLike(index, buildReadinessGate(index)); + } + + public ReadinessGatesNested editMatchingReadinessGate(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item); + if (index < 0 || index >= resourceClaims.size()) { _visitables.get("resourceClaims").add(builder); resourceClaims.add(builder); } else { _visitables.get("resourceClaims").add(index, builder); resourceClaims.add(index, builder);} + return (A)this; + } + + public A setToResourceClaims(int index,V1PodResourceClaim item) { + if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} + V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item); + if (index < 0 || index >= resourceClaims.size()) { _visitables.get("resourceClaims").add(builder); resourceClaims.add(builder); } else { _visitables.get("resourceClaims").set(index, builder); resourceClaims.set(index, builder);} + return (A)this; + } + + public A addToResourceClaims(io.kubernetes.client.openapi.models.V1PodResourceClaim... items) { + if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} + for (V1PodResourceClaim item : items) {V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item);_visitables.get("resourceClaims").add(builder);this.resourceClaims.add(builder);} return (A)this; + } + + public A addAllToResourceClaims(Collection items) { + if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} + for (V1PodResourceClaim item : items) {V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item);_visitables.get("resourceClaims").add(builder);this.resourceClaims.add(builder);} return (A)this; + } + + public A removeFromResourceClaims(io.kubernetes.client.openapi.models.V1PodResourceClaim... items) { + if (this.resourceClaims == null) return (A)this; + for (V1PodResourceClaim item : items) {V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item);_visitables.get("resourceClaims").remove(builder); this.resourceClaims.remove(builder);} return (A)this; + } + + public A removeAllFromResourceClaims(Collection items) { + if (this.resourceClaims == null) return (A)this; + for (V1PodResourceClaim item : items) {V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item);_visitables.get("resourceClaims").remove(builder); this.resourceClaims.remove(builder);} return (A)this; + } + + public A removeMatchingFromResourceClaims(Predicate predicate) { + if (resourceClaims == null) return (A) this; + final Iterator each = resourceClaims.iterator(); + final List visitables = _visitables.get("resourceClaims"); + while (each.hasNext()) { + V1PodResourceClaimBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResourceClaims() { + return this.resourceClaims != null ? build(resourceClaims) : null; + } + + public V1PodResourceClaim buildResourceClaim(int index) { + return this.resourceClaims.get(index).build(); + } + + public V1PodResourceClaim buildFirstResourceClaim() { + return this.resourceClaims.get(0).build(); + } + + public V1PodResourceClaim buildLastResourceClaim() { + return this.resourceClaims.get(resourceClaims.size() - 1).build(); + } + + public V1PodResourceClaim buildMatchingResourceClaim(Predicate predicate) { + for (V1PodResourceClaimBuilder item : resourceClaims) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResourceClaim(Predicate predicate) { + for (V1PodResourceClaimBuilder item : resourceClaims) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceClaims(List resourceClaims) { + if (this.resourceClaims != null) { + this._visitables.get("resourceClaims").clear(); + } + if (resourceClaims != null) { + this.resourceClaims = new ArrayList(); + for (V1PodResourceClaim item : resourceClaims) { + this.addToResourceClaims(item); + } + } else { + this.resourceClaims = null; + } + return (A) this; + } + + public A withResourceClaims(io.kubernetes.client.openapi.models.V1PodResourceClaim... resourceClaims) { + if (this.resourceClaims != null) { + this.resourceClaims.clear(); + _visitables.remove("resourceClaims"); + } + if (resourceClaims != null) { + for (V1PodResourceClaim item : resourceClaims) { + this.addToResourceClaims(item); + } + } + return (A) this; + } + + public boolean hasResourceClaims() { + return this.resourceClaims != null && !this.resourceClaims.isEmpty(); + } + + public ResourceClaimsNested addNewResourceClaim() { + return new ResourceClaimsNested(-1, null); + } + + public ResourceClaimsNested addNewResourceClaimLike(V1PodResourceClaim item) { + return new ResourceClaimsNested(-1, item); + } + + public ResourceClaimsNested setNewResourceClaimLike(int index,V1PodResourceClaim item) { + return new ResourceClaimsNested(index, item); + } + + public ResourceClaimsNested editResourceClaim(int index) { + if (resourceClaims.size() <= index) throw new RuntimeException("Can't edit resourceClaims. Index exceeds size."); + return setNewResourceClaimLike(index, buildResourceClaim(index)); + } + + public ResourceClaimsNested editFirstResourceClaim() { + if (resourceClaims.size() == 0) throw new RuntimeException("Can't edit first resourceClaims. The list is empty."); + return setNewResourceClaimLike(0, buildResourceClaim(0)); + } + + public ResourceClaimsNested editLastResourceClaim() { + int index = resourceClaims.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resourceClaims. The list is empty."); + return setNewResourceClaimLike(index, buildResourceClaim(index)); + } + + public ResourceClaimsNested editMatchingResourceClaim(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item); + if (index < 0 || index >= schedulingGates.size()) { _visitables.get("schedulingGates").add(builder); schedulingGates.add(builder); } else { _visitables.get("schedulingGates").add(index, builder); schedulingGates.add(index, builder);} + return (A)this; + } + + public A setToSchedulingGates(int index,V1PodSchedulingGate item) { + if (this.schedulingGates == null) {this.schedulingGates = new ArrayList();} + V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item); + if (index < 0 || index >= schedulingGates.size()) { _visitables.get("schedulingGates").add(builder); schedulingGates.add(builder); } else { _visitables.get("schedulingGates").set(index, builder); schedulingGates.set(index, builder);} + return (A)this; + } + + public A addToSchedulingGates(io.kubernetes.client.openapi.models.V1PodSchedulingGate... items) { + if (this.schedulingGates == null) {this.schedulingGates = new ArrayList();} + for (V1PodSchedulingGate item : items) {V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item);_visitables.get("schedulingGates").add(builder);this.schedulingGates.add(builder);} return (A)this; + } + + public A addAllToSchedulingGates(Collection items) { + if (this.schedulingGates == null) {this.schedulingGates = new ArrayList();} + for (V1PodSchedulingGate item : items) {V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item);_visitables.get("schedulingGates").add(builder);this.schedulingGates.add(builder);} return (A)this; + } + + public A removeFromSchedulingGates(io.kubernetes.client.openapi.models.V1PodSchedulingGate... items) { + if (this.schedulingGates == null) return (A)this; + for (V1PodSchedulingGate item : items) {V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item);_visitables.get("schedulingGates").remove(builder); this.schedulingGates.remove(builder);} return (A)this; + } + + public A removeAllFromSchedulingGates(Collection items) { + if (this.schedulingGates == null) return (A)this; + for (V1PodSchedulingGate item : items) {V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item);_visitables.get("schedulingGates").remove(builder); this.schedulingGates.remove(builder);} return (A)this; + } + + public A removeMatchingFromSchedulingGates(Predicate predicate) { + if (schedulingGates == null) return (A) this; + final Iterator each = schedulingGates.iterator(); + final List visitables = _visitables.get("schedulingGates"); + while (each.hasNext()) { + V1PodSchedulingGateBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildSchedulingGates() { + return this.schedulingGates != null ? build(schedulingGates) : null; + } + + public V1PodSchedulingGate buildSchedulingGate(int index) { + return this.schedulingGates.get(index).build(); + } + + public V1PodSchedulingGate buildFirstSchedulingGate() { + return this.schedulingGates.get(0).build(); + } + + public V1PodSchedulingGate buildLastSchedulingGate() { + return this.schedulingGates.get(schedulingGates.size() - 1).build(); + } + + public V1PodSchedulingGate buildMatchingSchedulingGate(Predicate predicate) { + for (V1PodSchedulingGateBuilder item : schedulingGates) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingSchedulingGate(Predicate predicate) { + for (V1PodSchedulingGateBuilder item : schedulingGates) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSchedulingGates(List schedulingGates) { + if (this.schedulingGates != null) { + this._visitables.get("schedulingGates").clear(); + } + if (schedulingGates != null) { + this.schedulingGates = new ArrayList(); + for (V1PodSchedulingGate item : schedulingGates) { + this.addToSchedulingGates(item); + } + } else { + this.schedulingGates = null; + } + return (A) this; + } + + public A withSchedulingGates(io.kubernetes.client.openapi.models.V1PodSchedulingGate... schedulingGates) { + if (this.schedulingGates != null) { + this.schedulingGates.clear(); + _visitables.remove("schedulingGates"); + } + if (schedulingGates != null) { + for (V1PodSchedulingGate item : schedulingGates) { + this.addToSchedulingGates(item); + } + } + return (A) this; + } + + public boolean hasSchedulingGates() { + return this.schedulingGates != null && !this.schedulingGates.isEmpty(); + } + + public SchedulingGatesNested addNewSchedulingGate() { + return new SchedulingGatesNested(-1, null); + } + + public SchedulingGatesNested addNewSchedulingGateLike(V1PodSchedulingGate item) { + return new SchedulingGatesNested(-1, item); + } + + public SchedulingGatesNested setNewSchedulingGateLike(int index,V1PodSchedulingGate item) { + return new SchedulingGatesNested(index, item); + } + + public SchedulingGatesNested editSchedulingGate(int index) { + if (schedulingGates.size() <= index) throw new RuntimeException("Can't edit schedulingGates. Index exceeds size."); + return setNewSchedulingGateLike(index, buildSchedulingGate(index)); + } + + public SchedulingGatesNested editFirstSchedulingGate() { + if (schedulingGates.size() == 0) throw new RuntimeException("Can't edit first schedulingGates. The list is empty."); + return setNewSchedulingGateLike(0, buildSchedulingGate(0)); + } + + public SchedulingGatesNested editLastSchedulingGate() { + int index = schedulingGates.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last schedulingGates. The list is empty."); + return setNewSchedulingGateLike(index, buildSchedulingGate(index)); + } + + public SchedulingGatesNested editMatchingSchedulingGate(Predicate predicate) { + int index = -1; + for (int i=0;i withNewSecurityContext() { + return new SecurityContextNested(null); + } + + public SecurityContextNested withNewSecurityContextLike(V1PodSecurityContext item) { + return new SecurityContextNested(item); + } + + public SecurityContextNested editSecurityContext() { + return withNewSecurityContextLike(java.util.Optional.ofNullable(buildSecurityContext()).orElse(null)); + } + + public SecurityContextNested editOrNewSecurityContext() { + return withNewSecurityContextLike(java.util.Optional.ofNullable(buildSecurityContext()).orElse(new V1PodSecurityContextBuilder().build())); + } + + public SecurityContextNested editOrNewSecurityContextLike(V1PodSecurityContext item) { + return withNewSecurityContextLike(java.util.Optional.ofNullable(buildSecurityContext()).orElse(item)); + } + + public String getServiceAccount() { + return this.serviceAccount; + } + + public A withServiceAccount(String serviceAccount) { + this.serviceAccount = serviceAccount; + return (A) this; + } + + public boolean hasServiceAccount() { + return this.serviceAccount != null; + } + + public String getServiceAccountName() { + return this.serviceAccountName; + } + + public A withServiceAccountName(String serviceAccountName) { + this.serviceAccountName = serviceAccountName; + return (A) this; + } + + public boolean hasServiceAccountName() { + return this.serviceAccountName != null; + } + + public Boolean getSetHostnameAsFQDN() { + return this.setHostnameAsFQDN; + } + + public A withSetHostnameAsFQDN(Boolean setHostnameAsFQDN) { + this.setHostnameAsFQDN = setHostnameAsFQDN; + return (A) this; + } + + public boolean hasSetHostnameAsFQDN() { + return this.setHostnameAsFQDN != null; + } + + public Boolean getShareProcessNamespace() { + return this.shareProcessNamespace; + } + + public A withShareProcessNamespace(Boolean shareProcessNamespace) { + this.shareProcessNamespace = shareProcessNamespace; + return (A) this; + } + + public boolean hasShareProcessNamespace() { + return this.shareProcessNamespace != null; + } + + public String getSubdomain() { + return this.subdomain; + } + + public A withSubdomain(String subdomain) { + this.subdomain = subdomain; + return (A) this; + } + + public boolean hasSubdomain() { + return this.subdomain != null; + } + + public Long getTerminationGracePeriodSeconds() { + return this.terminationGracePeriodSeconds; + } + + public A withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { + this.terminationGracePeriodSeconds = terminationGracePeriodSeconds; + return (A) this; + } + + public boolean hasTerminationGracePeriodSeconds() { + return this.terminationGracePeriodSeconds != null; + } + + public A addToTolerations(int index,V1Toleration item) { + if (this.tolerations == null) {this.tolerations = new ArrayList();} + V1TolerationBuilder builder = new V1TolerationBuilder(item); + if (index < 0 || index >= tolerations.size()) { _visitables.get("tolerations").add(builder); tolerations.add(builder); } else { _visitables.get("tolerations").add(index, builder); tolerations.add(index, builder);} + return (A)this; + } + + public A setToTolerations(int index,V1Toleration item) { + if (this.tolerations == null) {this.tolerations = new ArrayList();} + V1TolerationBuilder builder = new V1TolerationBuilder(item); + if (index < 0 || index >= tolerations.size()) { _visitables.get("tolerations").add(builder); tolerations.add(builder); } else { _visitables.get("tolerations").set(index, builder); tolerations.set(index, builder);} + return (A)this; + } + + public A addToTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) { + if (this.tolerations == null) {this.tolerations = new ArrayList();} + for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this; + } + + public A addAllToTolerations(Collection items) { + if (this.tolerations == null) {this.tolerations = new ArrayList();} + for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this; + } + + public A removeFromTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) { + if (this.tolerations == null) return (A)this; + for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder); this.tolerations.remove(builder);} return (A)this; + } + + public A removeAllFromTolerations(Collection items) { + if (this.tolerations == null) return (A)this; + for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder); this.tolerations.remove(builder);} return (A)this; + } + + public A removeMatchingFromTolerations(Predicate predicate) { + if (tolerations == null) return (A) this; + final Iterator each = tolerations.iterator(); + final List visitables = _visitables.get("tolerations"); + while (each.hasNext()) { + V1TolerationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildTolerations() { + return this.tolerations != null ? build(tolerations) : null; + } + + public V1Toleration buildToleration(int index) { + return this.tolerations.get(index).build(); + } + + public V1Toleration buildFirstToleration() { + return this.tolerations.get(0).build(); + } + + public V1Toleration buildLastToleration() { + return this.tolerations.get(tolerations.size() - 1).build(); + } + + public V1Toleration buildMatchingToleration(Predicate predicate) { + for (V1TolerationBuilder item : tolerations) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingToleration(Predicate predicate) { + for (V1TolerationBuilder item : tolerations) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withTolerations(List tolerations) { + if (this.tolerations != null) { + this._visitables.get("tolerations").clear(); + } + if (tolerations != null) { + this.tolerations = new ArrayList(); + for (V1Toleration item : tolerations) { + this.addToTolerations(item); + } + } else { + this.tolerations = null; + } + return (A) this; + } + + public A withTolerations(io.kubernetes.client.openapi.models.V1Toleration... tolerations) { + if (this.tolerations != null) { + this.tolerations.clear(); + _visitables.remove("tolerations"); + } + if (tolerations != null) { + for (V1Toleration item : tolerations) { + this.addToTolerations(item); + } + } + return (A) this; + } + + public boolean hasTolerations() { + return this.tolerations != null && !this.tolerations.isEmpty(); + } + + public TolerationsNested addNewToleration() { + return new TolerationsNested(-1, null); + } + + public TolerationsNested addNewTolerationLike(V1Toleration item) { + return new TolerationsNested(-1, item); + } + + public TolerationsNested setNewTolerationLike(int index,V1Toleration item) { + return new TolerationsNested(index, item); + } + + public TolerationsNested editToleration(int index) { + if (tolerations.size() <= index) throw new RuntimeException("Can't edit tolerations. Index exceeds size."); + return setNewTolerationLike(index, buildToleration(index)); + } + + public TolerationsNested editFirstToleration() { + if (tolerations.size() == 0) throw new RuntimeException("Can't edit first tolerations. The list is empty."); + return setNewTolerationLike(0, buildToleration(0)); + } + + public TolerationsNested editLastToleration() { + int index = tolerations.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last tolerations. The list is empty."); + return setNewTolerationLike(index, buildToleration(index)); + } + + public TolerationsNested editMatchingToleration(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item); + if (index < 0 || index >= topologySpreadConstraints.size()) { _visitables.get("topologySpreadConstraints").add(builder); topologySpreadConstraints.add(builder); } else { _visitables.get("topologySpreadConstraints").add(index, builder); topologySpreadConstraints.add(index, builder);} + return (A)this; + } + + public A setToTopologySpreadConstraints(int index,V1TopologySpreadConstraint item) { + if (this.topologySpreadConstraints == null) {this.topologySpreadConstraints = new ArrayList();} + V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item); + if (index < 0 || index >= topologySpreadConstraints.size()) { _visitables.get("topologySpreadConstraints").add(builder); topologySpreadConstraints.add(builder); } else { _visitables.get("topologySpreadConstraints").set(index, builder); topologySpreadConstraints.set(index, builder);} + return (A)this; + } + + public A addToTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... items) { + if (this.topologySpreadConstraints == null) {this.topologySpreadConstraints = new ArrayList();} + for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").add(builder);this.topologySpreadConstraints.add(builder);} return (A)this; + } + + public A addAllToTopologySpreadConstraints(Collection items) { + if (this.topologySpreadConstraints == null) {this.topologySpreadConstraints = new ArrayList();} + for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").add(builder);this.topologySpreadConstraints.add(builder);} return (A)this; + } + + public A removeFromTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... items) { + if (this.topologySpreadConstraints == null) return (A)this; + for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").remove(builder); this.topologySpreadConstraints.remove(builder);} return (A)this; + } + + public A removeAllFromTopologySpreadConstraints(Collection items) { + if (this.topologySpreadConstraints == null) return (A)this; + for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").remove(builder); this.topologySpreadConstraints.remove(builder);} return (A)this; + } + + public A removeMatchingFromTopologySpreadConstraints(Predicate predicate) { + if (topologySpreadConstraints == null) return (A) this; + final Iterator each = topologySpreadConstraints.iterator(); + final List visitables = _visitables.get("topologySpreadConstraints"); + while (each.hasNext()) { + V1TopologySpreadConstraintBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildTopologySpreadConstraints() { + return this.topologySpreadConstraints != null ? build(topologySpreadConstraints) : null; + } + + public V1TopologySpreadConstraint buildTopologySpreadConstraint(int index) { + return this.topologySpreadConstraints.get(index).build(); + } + + public V1TopologySpreadConstraint buildFirstTopologySpreadConstraint() { + return this.topologySpreadConstraints.get(0).build(); + } + + public V1TopologySpreadConstraint buildLastTopologySpreadConstraint() { + return this.topologySpreadConstraints.get(topologySpreadConstraints.size() - 1).build(); + } + + public V1TopologySpreadConstraint buildMatchingTopologySpreadConstraint(Predicate predicate) { + for (V1TopologySpreadConstraintBuilder item : topologySpreadConstraints) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingTopologySpreadConstraint(Predicate predicate) { + for (V1TopologySpreadConstraintBuilder item : topologySpreadConstraints) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withTopologySpreadConstraints(List topologySpreadConstraints) { + if (this.topologySpreadConstraints != null) { + this._visitables.get("topologySpreadConstraints").clear(); + } + if (topologySpreadConstraints != null) { + this.topologySpreadConstraints = new ArrayList(); + for (V1TopologySpreadConstraint item : topologySpreadConstraints) { + this.addToTopologySpreadConstraints(item); + } + } else { + this.topologySpreadConstraints = null; + } + return (A) this; + } + + public A withTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... topologySpreadConstraints) { + if (this.topologySpreadConstraints != null) { + this.topologySpreadConstraints.clear(); + _visitables.remove("topologySpreadConstraints"); + } + if (topologySpreadConstraints != null) { + for (V1TopologySpreadConstraint item : topologySpreadConstraints) { + this.addToTopologySpreadConstraints(item); + } + } + return (A) this; + } + + public boolean hasTopologySpreadConstraints() { + return this.topologySpreadConstraints != null && !this.topologySpreadConstraints.isEmpty(); + } + + public TopologySpreadConstraintsNested addNewTopologySpreadConstraint() { + return new TopologySpreadConstraintsNested(-1, null); + } + + public TopologySpreadConstraintsNested addNewTopologySpreadConstraintLike(V1TopologySpreadConstraint item) { + return new TopologySpreadConstraintsNested(-1, item); + } + + public TopologySpreadConstraintsNested setNewTopologySpreadConstraintLike(int index,V1TopologySpreadConstraint item) { + return new TopologySpreadConstraintsNested(index, item); + } + + public TopologySpreadConstraintsNested editTopologySpreadConstraint(int index) { + if (topologySpreadConstraints.size() <= index) throw new RuntimeException("Can't edit topologySpreadConstraints. Index exceeds size."); + return setNewTopologySpreadConstraintLike(index, buildTopologySpreadConstraint(index)); + } + + public TopologySpreadConstraintsNested editFirstTopologySpreadConstraint() { + if (topologySpreadConstraints.size() == 0) throw new RuntimeException("Can't edit first topologySpreadConstraints. The list is empty."); + return setNewTopologySpreadConstraintLike(0, buildTopologySpreadConstraint(0)); + } + + public TopologySpreadConstraintsNested editLastTopologySpreadConstraint() { + int index = topologySpreadConstraints.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last topologySpreadConstraints. The list is empty."); + return setNewTopologySpreadConstraintLike(index, buildTopologySpreadConstraint(index)); + } + + public TopologySpreadConstraintsNested editMatchingTopologySpreadConstraint(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1VolumeBuilder builder = new V1VolumeBuilder(item); + if (index < 0 || index >= volumes.size()) { _visitables.get("volumes").add(builder); volumes.add(builder); } else { _visitables.get("volumes").add(index, builder); volumes.add(index, builder);} + return (A)this; + } + + public A setToVolumes(int index,V1Volume item) { + if (this.volumes == null) {this.volumes = new ArrayList();} + V1VolumeBuilder builder = new V1VolumeBuilder(item); + if (index < 0 || index >= volumes.size()) { _visitables.get("volumes").add(builder); volumes.add(builder); } else { _visitables.get("volumes").set(index, builder); volumes.set(index, builder);} + return (A)this; + } + + public A addToVolumes(io.kubernetes.client.openapi.models.V1Volume... items) { + if (this.volumes == null) {this.volumes = new ArrayList();} + for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").add(builder);this.volumes.add(builder);} return (A)this; + } + + public A addAllToVolumes(Collection items) { + if (this.volumes == null) {this.volumes = new ArrayList();} + for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").add(builder);this.volumes.add(builder);} return (A)this; + } + + public A removeFromVolumes(io.kubernetes.client.openapi.models.V1Volume... items) { + if (this.volumes == null) return (A)this; + for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").remove(builder); this.volumes.remove(builder);} return (A)this; + } + + public A removeAllFromVolumes(Collection items) { + if (this.volumes == null) return (A)this; + for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").remove(builder); this.volumes.remove(builder);} return (A)this; + } + + public A removeMatchingFromVolumes(Predicate predicate) { + if (volumes == null) return (A) this; + final Iterator each = volumes.iterator(); + final List visitables = _visitables.get("volumes"); + while (each.hasNext()) { + V1VolumeBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVolumes() { + return this.volumes != null ? build(volumes) : null; + } + + public V1Volume buildVolume(int index) { + return this.volumes.get(index).build(); + } + + public V1Volume buildFirstVolume() { + return this.volumes.get(0).build(); + } + + public V1Volume buildLastVolume() { + return this.volumes.get(volumes.size() - 1).build(); + } + + public V1Volume buildMatchingVolume(Predicate predicate) { + for (V1VolumeBuilder item : volumes) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVolume(Predicate predicate) { + for (V1VolumeBuilder item : volumes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVolumes(List volumes) { + if (this.volumes != null) { + this._visitables.get("volumes").clear(); + } + if (volumes != null) { + this.volumes = new ArrayList(); + for (V1Volume item : volumes) { + this.addToVolumes(item); + } + } else { + this.volumes = null; + } + return (A) this; + } + + public A withVolumes(io.kubernetes.client.openapi.models.V1Volume... volumes) { + if (this.volumes != null) { + this.volumes.clear(); + _visitables.remove("volumes"); + } + if (volumes != null) { + for (V1Volume item : volumes) { + this.addToVolumes(item); + } + } + return (A) this; + } + + public boolean hasVolumes() { + return this.volumes != null && !this.volumes.isEmpty(); + } + + public VolumesNested addNewVolume() { + return new VolumesNested(-1, null); + } + + public VolumesNested addNewVolumeLike(V1Volume item) { + return new VolumesNested(-1, item); + } + + public VolumesNested setNewVolumeLike(int index,V1Volume item) { + return new VolumesNested(index, item); + } + + public VolumesNested editVolume(int index) { + if (volumes.size() <= index) throw new RuntimeException("Can't edit volumes. Index exceeds size."); + return setNewVolumeLike(index, buildVolume(index)); + } + + public VolumesNested editFirstVolume() { + if (volumes.size() == 0) throw new RuntimeException("Can't edit first volumes. The list is empty."); + return setNewVolumeLike(0, buildVolume(0)); + } + + public VolumesNested editLastVolume() { + int index = volumes.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last volumes. The list is empty."); + return setNewVolumeLike(index, buildVolume(index)); + } + + public VolumesNested editMatchingVolume(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1AffinityFluent> implements Nested{ + AffinityNested(V1Affinity item) { + this.builder = new V1AffinityBuilder(this, item); + } + V1AffinityBuilder builder; + + public N and() { + return (N) V1PodSpecFluent.this.withAffinity(builder.build()); + } + + public N endAffinity() { + return and(); + } + + + } + public class ContainersNested extends V1ContainerFluent> implements Nested{ + ContainersNested(int index,V1Container item) { + this.index = index; + this.builder = new V1ContainerBuilder(this, item); + } + V1ContainerBuilder builder; + int index; + + public N and() { + return (N) V1PodSpecFluent.this.setToContainers(index,builder.build()); + } + + public N endContainer() { + return and(); + } + + + } + public class DnsConfigNested extends V1PodDNSConfigFluent> implements Nested{ + DnsConfigNested(V1PodDNSConfig item) { + this.builder = new V1PodDNSConfigBuilder(this, item); + } + V1PodDNSConfigBuilder builder; + + public N and() { + return (N) V1PodSpecFluent.this.withDnsConfig(builder.build()); + } + + public N endDnsConfig() { + return and(); + } + + + } + public class EphemeralContainersNested extends V1EphemeralContainerFluent> implements Nested{ + EphemeralContainersNested(int index,V1EphemeralContainer item) { + this.index = index; + this.builder = new V1EphemeralContainerBuilder(this, item); + } + V1EphemeralContainerBuilder builder; + int index; + + public N and() { + return (N) V1PodSpecFluent.this.setToEphemeralContainers(index,builder.build()); + } + + public N endEphemeralContainer() { + return and(); + } + + + } + public class HostAliasesNested extends V1HostAliasFluent> implements Nested{ + HostAliasesNested(int index,V1HostAlias item) { + this.index = index; + this.builder = new V1HostAliasBuilder(this, item); + } + V1HostAliasBuilder builder; + int index; + + public N and() { + return (N) V1PodSpecFluent.this.setToHostAliases(index,builder.build()); + } + + public N endHostAlias() { + return and(); + } + + + } + public class ImagePullSecretsNested extends V1LocalObjectReferenceFluent> implements Nested{ + ImagePullSecretsNested(int index,V1LocalObjectReference item) { + this.index = index; + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + int index; + + public N and() { + return (N) V1PodSpecFluent.this.setToImagePullSecrets(index,builder.build()); + } + + public N endImagePullSecret() { + return and(); + } + + + } + public class InitContainersNested extends V1ContainerFluent> implements Nested{ + InitContainersNested(int index,V1Container item) { + this.index = index; + this.builder = new V1ContainerBuilder(this, item); + } + V1ContainerBuilder builder; + int index; + + public N and() { + return (N) V1PodSpecFluent.this.setToInitContainers(index,builder.build()); + } + public N endInitContainer() { + return and(); + } + + + } + public class OsNested extends V1PodOSFluent> implements Nested{ + OsNested(V1PodOS item) { + this.builder = new V1PodOSBuilder(this, item); + } + V1PodOSBuilder builder; + + public N and() { + return (N) V1PodSpecFluent.this.withOs(builder.build()); + } + + public N endOs() { + return and(); + } + + + } + public class ReadinessGatesNested extends V1PodReadinessGateFluent> implements Nested{ + ReadinessGatesNested(int index,V1PodReadinessGate item) { + this.index = index; + this.builder = new V1PodReadinessGateBuilder(this, item); + } + V1PodReadinessGateBuilder builder; + int index; + + public N and() { + return (N) V1PodSpecFluent.this.setToReadinessGates(index,builder.build()); + } + + public N endReadinessGate() { + return and(); + } + + } - public interface SchedulingGatesNested extends Nested,V1PodSchedulingGateFluent>{ - public N and(); - public N endSchedulingGate(); + public class ResourceClaimsNested extends V1PodResourceClaimFluent> implements Nested{ + ResourceClaimsNested(int index,V1PodResourceClaim item) { + this.index = index; + this.builder = new V1PodResourceClaimBuilder(this, item); + } + V1PodResourceClaimBuilder builder; + int index; + public N and() { + return (N) V1PodSpecFluent.this.setToResourceClaims(index,builder.build()); + } + + public N endResourceClaim() { + return and(); + } + + } - public interface SecurityContextNested extends Nested,V1PodSecurityContextFluent>{ - public N and(); - public N endSecurityContext(); + public class SchedulingGatesNested extends V1PodSchedulingGateFluent> implements Nested{ + SchedulingGatesNested(int index,V1PodSchedulingGate item) { + this.index = index; + this.builder = new V1PodSchedulingGateBuilder(this, item); + } + V1PodSchedulingGateBuilder builder; + int index; + + public N and() { + return (N) V1PodSpecFluent.this.setToSchedulingGates(index,builder.build()); + } + public N endSchedulingGate() { + return and(); + } + + } - public interface TolerationsNested extends Nested,V1TolerationFluent>{ - public N and(); - public N endToleration(); + public class SecurityContextNested extends V1PodSecurityContextFluent> implements Nested{ + SecurityContextNested(V1PodSecurityContext item) { + this.builder = new V1PodSecurityContextBuilder(this, item); + } + V1PodSecurityContextBuilder builder; + + public N and() { + return (N) V1PodSpecFluent.this.withSecurityContext(builder.build()); + } + + public N endSecurityContext() { + return and(); + } + } - public interface TopologySpreadConstraintsNested extends Nested,V1TopologySpreadConstraintFluent>{ - public N and(); - public N endTopologySpreadConstraint(); + public class TolerationsNested extends V1TolerationFluent> implements Nested{ + TolerationsNested(int index,V1Toleration item) { + this.index = index; + this.builder = new V1TolerationBuilder(this, item); + } + V1TolerationBuilder builder; + int index; + + public N and() { + return (N) V1PodSpecFluent.this.setToTolerations(index,builder.build()); + } + public N endToleration() { + return and(); + } + + } - public interface VolumesNested extends Nested,V1VolumeFluent>{ - public N and(); - public N endVolume(); + public class TopologySpreadConstraintsNested extends V1TopologySpreadConstraintFluent> implements Nested{ + TopologySpreadConstraintsNested(int index,V1TopologySpreadConstraint item) { + this.index = index; + this.builder = new V1TopologySpreadConstraintBuilder(this, item); + } + V1TopologySpreadConstraintBuilder builder; + int index; + public N and() { + return (N) V1PodSpecFluent.this.setToTopologySpreadConstraints(index,builder.build()); + } + + public N endTopologySpreadConstraint() { + return and(); + } + + } + public class VolumesNested extends V1VolumeFluent> implements Nested{ + VolumesNested(int index,V1Volume item) { + this.index = index; + this.builder = new V1VolumeBuilder(this, item); + } + V1VolumeBuilder builder; + int index; + + public N and() { + return (N) V1PodSpecFluent.this.setToVolumes(index,builder.build()); + } + + public N endVolume() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecFluentImpl.java deleted file mode 100644 index db3c8c926e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodSpecFluentImpl.java +++ /dev/null @@ -1,2103 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.List; -import java.lang.Boolean; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; -import java.util.Map; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.util.Iterator; -import io.kubernetes.client.custom.Quantity; -import java.lang.Integer; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodSpecFluentImpl> extends BaseFluent implements V1PodSpecFluent{ - public V1PodSpecFluentImpl() { - } - public V1PodSpecFluentImpl(V1PodSpec instance) { - if (instance != null) { - this.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds()); - this.withAffinity(instance.getAffinity()); - this.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken()); - this.withContainers(instance.getContainers()); - this.withDnsConfig(instance.getDnsConfig()); - this.withDnsPolicy(instance.getDnsPolicy()); - this.withEnableServiceLinks(instance.getEnableServiceLinks()); - this.withEphemeralContainers(instance.getEphemeralContainers()); - this.withHostAliases(instance.getHostAliases()); - this.withHostIPC(instance.getHostIPC()); - this.withHostNetwork(instance.getHostNetwork()); - this.withHostPID(instance.getHostPID()); - this.withHostUsers(instance.getHostUsers()); - this.withHostname(instance.getHostname()); - this.withImagePullSecrets(instance.getImagePullSecrets()); - this.withInitContainers(instance.getInitContainers()); - this.withNodeName(instance.getNodeName()); - this.withNodeSelector(instance.getNodeSelector()); - this.withOs(instance.getOs()); - this.withOverhead(instance.getOverhead()); - this.withPreemptionPolicy(instance.getPreemptionPolicy()); - this.withPriority(instance.getPriority()); - this.withPriorityClassName(instance.getPriorityClassName()); - this.withReadinessGates(instance.getReadinessGates()); - this.withResourceClaims(instance.getResourceClaims()); - this.withRestartPolicy(instance.getRestartPolicy()); - this.withRuntimeClassName(instance.getRuntimeClassName()); - this.withSchedulerName(instance.getSchedulerName()); - this.withSchedulingGates(instance.getSchedulingGates()); - this.withSecurityContext(instance.getSecurityContext()); - this.withServiceAccount(instance.getServiceAccount()); - this.withServiceAccountName(instance.getServiceAccountName()); - this.withSetHostnameAsFQDN(instance.getSetHostnameAsFQDN()); - this.withShareProcessNamespace(instance.getShareProcessNamespace()); - this.withSubdomain(instance.getSubdomain()); - this.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds()); - this.withTolerations(instance.getTolerations()); - this.withTopologySpreadConstraints(instance.getTopologySpreadConstraints()); - this.withVolumes(instance.getVolumes()); - } - } - private Long activeDeadlineSeconds; - private V1AffinityBuilder affinity; - private Boolean automountServiceAccountToken; - private ArrayList containers; - private V1PodDNSConfigBuilder dnsConfig; - private String dnsPolicy; - private Boolean enableServiceLinks; - private ArrayList ephemeralContainers; - private ArrayList hostAliases; - private Boolean hostIPC; - private Boolean hostNetwork; - private Boolean hostPID; - private Boolean hostUsers; - private String hostname; - private ArrayList imagePullSecrets; - private ArrayList initContainers; - private String nodeName; - private Map nodeSelector; - private V1PodOSBuilder os; - private Map overhead; - private String preemptionPolicy; - private Integer priority; - private String priorityClassName; - private ArrayList readinessGates; - private ArrayList resourceClaims; - private String restartPolicy; - private String runtimeClassName; - private String schedulerName; - private ArrayList schedulingGates; - private V1PodSecurityContextBuilder securityContext; - private String serviceAccount; - private String serviceAccountName; - private Boolean setHostnameAsFQDN; - private Boolean shareProcessNamespace; - private String subdomain; - private Long terminationGracePeriodSeconds; - private ArrayList tolerations; - private ArrayList topologySpreadConstraints; - private ArrayList volumes; - public Long getActiveDeadlineSeconds() { - return this.activeDeadlineSeconds; - } - public A withActiveDeadlineSeconds(Long activeDeadlineSeconds) { - this.activeDeadlineSeconds=activeDeadlineSeconds; return (A) this; - } - public Boolean hasActiveDeadlineSeconds() { - return this.activeDeadlineSeconds != null; - } - - /** - * This method has been deprecated, please use method buildAffinity instead. - * @return The buildable object. - */ - @Deprecated - public V1Affinity getAffinity() { - return this.affinity!=null ?this.affinity.build():null; - } - public V1Affinity buildAffinity() { - return this.affinity!=null ?this.affinity.build():null; - } - public A withAffinity(V1Affinity affinity) { - _visitables.get("affinity").remove(this.affinity); - if (affinity!=null){ this.affinity= new V1AffinityBuilder(affinity); _visitables.get("affinity").add(this.affinity);} else { this.affinity = null; _visitables.get("affinity").remove(this.affinity); } return (A) this; - } - public Boolean hasAffinity() { - return this.affinity != null; - } - public V1PodSpecFluentImpl.AffinityNested withNewAffinity() { - return new V1PodSpecFluentImpl.AffinityNestedImpl(); - } - public V1PodSpecFluentImpl.AffinityNested withNewAffinityLike(V1Affinity item) { - return new V1PodSpecFluentImpl.AffinityNestedImpl(item); - } - public V1PodSpecFluentImpl.AffinityNested editAffinity() { - return withNewAffinityLike(getAffinity()); - } - public V1PodSpecFluentImpl.AffinityNested editOrNewAffinity() { - return withNewAffinityLike(getAffinity() != null ? getAffinity(): new V1AffinityBuilder().build()); - } - public V1PodSpecFluentImpl.AffinityNested editOrNewAffinityLike(V1Affinity item) { - return withNewAffinityLike(getAffinity() != null ? getAffinity(): item); - } - public Boolean getAutomountServiceAccountToken() { - return this.automountServiceAccountToken; - } - public A withAutomountServiceAccountToken(Boolean automountServiceAccountToken) { - this.automountServiceAccountToken=automountServiceAccountToken; return (A) this; - } - public Boolean hasAutomountServiceAccountToken() { - return this.automountServiceAccountToken != null; - } - public A addToContainers(int index,V1Container item) { - if (this.containers == null) {this.containers = new ArrayList();} - V1ContainerBuilder builder = new V1ContainerBuilder(item); - if (index < 0 || index >= containers.size()) { _visitables.get("containers").add(builder); containers.add(builder); } else { _visitables.get("containers").add(index, builder); containers.add(index, builder);} - return (A)this; - } - public A setToContainers(int index,V1Container item) { - if (this.containers == null) {this.containers = new ArrayList();} - V1ContainerBuilder builder = new V1ContainerBuilder(item); - if (index < 0 || index >= containers.size()) { _visitables.get("containers").add(builder); containers.add(builder); } else { _visitables.get("containers").set(index, builder); containers.set(index, builder);} - return (A)this; - } - public A addToContainers(io.kubernetes.client.openapi.models.V1Container... items) { - if (this.containers == null) {this.containers = new ArrayList();} - for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").add(builder);this.containers.add(builder);} return (A)this; - } - public A addAllToContainers(Collection items) { - if (this.containers == null) {this.containers = new ArrayList();} - for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").add(builder);this.containers.add(builder);} return (A)this; - } - public A removeFromContainers(io.kubernetes.client.openapi.models.V1Container... items) { - for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").remove(builder);if (this.containers != null) {this.containers.remove(builder);}} return (A)this; - } - public A removeAllFromContainers(Collection items) { - for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").remove(builder);if (this.containers != null) {this.containers.remove(builder);}} return (A)this; - } - public A removeMatchingFromContainers(Predicate predicate) { - if (containers == null) return (A) this; - final Iterator each = containers.iterator(); - final List visitables = _visitables.get("containers"); - while (each.hasNext()) { - V1ContainerBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildContainers instead. - * @return The buildable object. - */ - @Deprecated - public List getContainers() { - return containers != null ? build(containers) : null; - } - public List buildContainers() { - return containers != null ? build(containers) : null; - } - public V1Container buildContainer(int index) { - return this.containers.get(index).build(); - } - public V1Container buildFirstContainer() { - return this.containers.get(0).build(); - } - public V1Container buildLastContainer() { - return this.containers.get(containers.size() - 1).build(); - } - public V1Container buildMatchingContainer(Predicate predicate) { - for (V1ContainerBuilder item: containers) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingContainer(Predicate predicate) { - for (V1ContainerBuilder item: containers) { if(predicate.test(item)){ return true;} } return false; - } - public A withContainers(List containers) { - if (this.containers != null) { _visitables.get("containers").clear();} - if (containers != null) {this.containers = new ArrayList(); for (V1Container item : containers){this.addToContainers(item);}} else { this.containers = null;} return (A) this; - } - public A withContainers(io.kubernetes.client.openapi.models.V1Container... containers) { - if (this.containers != null) {this.containers.clear(); _visitables.remove("containers"); } - if (containers != null) {for (V1Container item :containers){ this.addToContainers(item);}} return (A) this; - } - public Boolean hasContainers() { - return containers != null && !containers.isEmpty(); - } - public V1PodSpecFluentImpl.ContainersNested addNewContainer() { - return new V1PodSpecFluentImpl.ContainersNestedImpl(); - } - public V1PodSpecFluentImpl.ContainersNested addNewContainerLike(V1Container item) { - return new V1PodSpecFluentImpl.ContainersNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.ContainersNested setNewContainerLike(int index,V1Container item) { - return new V1PodSpecFluentImpl.ContainersNestedImpl(index, item); - } - public V1PodSpecFluentImpl.ContainersNested editContainer(int index) { - if (containers.size() <= index) throw new RuntimeException("Can't edit containers. Index exceeds size."); - return setNewContainerLike(index, buildContainer(index)); - } - public V1PodSpecFluentImpl.ContainersNested editFirstContainer() { - if (containers.size() == 0) throw new RuntimeException("Can't edit first containers. The list is empty."); - return setNewContainerLike(0, buildContainer(0)); - } - public V1PodSpecFluentImpl.ContainersNested editLastContainer() { - int index = containers.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last containers. The list is empty."); - return setNewContainerLike(index, buildContainer(index)); - } - public V1PodSpecFluentImpl.ContainersNested editMatchingContainer(Predicate predicate) { - int index = -1; - for (int i=0;i withNewDnsConfig() { - return new V1PodSpecFluentImpl.DnsConfigNestedImpl(); - } - public V1PodSpecFluentImpl.DnsConfigNested withNewDnsConfigLike(V1PodDNSConfig item) { - return new V1PodSpecFluentImpl.DnsConfigNestedImpl(item); - } - public V1PodSpecFluentImpl.DnsConfigNested editDnsConfig() { - return withNewDnsConfigLike(getDnsConfig()); - } - public V1PodSpecFluentImpl.DnsConfigNested editOrNewDnsConfig() { - return withNewDnsConfigLike(getDnsConfig() != null ? getDnsConfig(): new V1PodDNSConfigBuilder().build()); - } - public V1PodSpecFluentImpl.DnsConfigNested editOrNewDnsConfigLike(V1PodDNSConfig item) { - return withNewDnsConfigLike(getDnsConfig() != null ? getDnsConfig(): item); - } - public String getDnsPolicy() { - return this.dnsPolicy; - } - public A withDnsPolicy(String dnsPolicy) { - this.dnsPolicy=dnsPolicy; return (A) this; - } - public Boolean hasDnsPolicy() { - return this.dnsPolicy != null; - } - public Boolean getEnableServiceLinks() { - return this.enableServiceLinks; - } - public A withEnableServiceLinks(Boolean enableServiceLinks) { - this.enableServiceLinks=enableServiceLinks; return (A) this; - } - public Boolean hasEnableServiceLinks() { - return this.enableServiceLinks != null; - } - public A addToEphemeralContainers(int index,V1EphemeralContainer item) { - if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();} - V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item); - if (index < 0 || index >= ephemeralContainers.size()) { _visitables.get("ephemeralContainers").add(builder); ephemeralContainers.add(builder); } else { _visitables.get("ephemeralContainers").add(index, builder); ephemeralContainers.add(index, builder);} - return (A)this; - } - public A setToEphemeralContainers(int index,V1EphemeralContainer item) { - if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();} - V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item); - if (index < 0 || index >= ephemeralContainers.size()) { _visitables.get("ephemeralContainers").add(builder); ephemeralContainers.add(builder); } else { _visitables.get("ephemeralContainers").set(index, builder); ephemeralContainers.set(index, builder);} - return (A)this; - } - public A addToEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... items) { - if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();} - for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").add(builder);this.ephemeralContainers.add(builder);} return (A)this; - } - public A addAllToEphemeralContainers(Collection items) { - if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();} - for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").add(builder);this.ephemeralContainers.add(builder);} return (A)this; - } - public A removeFromEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... items) { - for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").remove(builder);if (this.ephemeralContainers != null) {this.ephemeralContainers.remove(builder);}} return (A)this; - } - public A removeAllFromEphemeralContainers(Collection items) { - for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").remove(builder);if (this.ephemeralContainers != null) {this.ephemeralContainers.remove(builder);}} return (A)this; - } - public A removeMatchingFromEphemeralContainers(Predicate predicate) { - if (ephemeralContainers == null) return (A) this; - final Iterator each = ephemeralContainers.iterator(); - final List visitables = _visitables.get("ephemeralContainers"); - while (each.hasNext()) { - V1EphemeralContainerBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildEphemeralContainers instead. - * @return The buildable object. - */ - @Deprecated - public List getEphemeralContainers() { - return ephemeralContainers != null ? build(ephemeralContainers) : null; - } - public List buildEphemeralContainers() { - return ephemeralContainers != null ? build(ephemeralContainers) : null; - } - public V1EphemeralContainer buildEphemeralContainer(int index) { - return this.ephemeralContainers.get(index).build(); - } - public V1EphemeralContainer buildFirstEphemeralContainer() { - return this.ephemeralContainers.get(0).build(); - } - public V1EphemeralContainer buildLastEphemeralContainer() { - return this.ephemeralContainers.get(ephemeralContainers.size() - 1).build(); - } - public V1EphemeralContainer buildMatchingEphemeralContainer(Predicate predicate) { - for (V1EphemeralContainerBuilder item: ephemeralContainers) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingEphemeralContainer(Predicate predicate) { - for (V1EphemeralContainerBuilder item: ephemeralContainers) { if(predicate.test(item)){ return true;} } return false; - } - public A withEphemeralContainers(List ephemeralContainers) { - if (this.ephemeralContainers != null) { _visitables.get("ephemeralContainers").clear();} - if (ephemeralContainers != null) {this.ephemeralContainers = new ArrayList(); for (V1EphemeralContainer item : ephemeralContainers){this.addToEphemeralContainers(item);}} else { this.ephemeralContainers = null;} return (A) this; - } - public A withEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... ephemeralContainers) { - if (this.ephemeralContainers != null) {this.ephemeralContainers.clear(); _visitables.remove("ephemeralContainers"); } - if (ephemeralContainers != null) {for (V1EphemeralContainer item :ephemeralContainers){ this.addToEphemeralContainers(item);}} return (A) this; - } - public Boolean hasEphemeralContainers() { - return ephemeralContainers != null && !ephemeralContainers.isEmpty(); - } - public V1PodSpecFluentImpl.EphemeralContainersNested addNewEphemeralContainer() { - return new V1PodSpecFluentImpl.EphemeralContainersNestedImpl(); - } - public V1PodSpecFluentImpl.EphemeralContainersNested addNewEphemeralContainerLike(V1EphemeralContainer item) { - return new V1PodSpecFluentImpl.EphemeralContainersNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.EphemeralContainersNested setNewEphemeralContainerLike(int index,V1EphemeralContainer item) { - return new V1PodSpecFluentImpl.EphemeralContainersNestedImpl(index, item); - } - public V1PodSpecFluentImpl.EphemeralContainersNested editEphemeralContainer(int index) { - if (ephemeralContainers.size() <= index) throw new RuntimeException("Can't edit ephemeralContainers. Index exceeds size."); - return setNewEphemeralContainerLike(index, buildEphemeralContainer(index)); - } - public V1PodSpecFluentImpl.EphemeralContainersNested editFirstEphemeralContainer() { - if (ephemeralContainers.size() == 0) throw new RuntimeException("Can't edit first ephemeralContainers. The list is empty."); - return setNewEphemeralContainerLike(0, buildEphemeralContainer(0)); - } - public V1PodSpecFluentImpl.EphemeralContainersNested editLastEphemeralContainer() { - int index = ephemeralContainers.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ephemeralContainers. The list is empty."); - return setNewEphemeralContainerLike(index, buildEphemeralContainer(index)); - } - public V1PodSpecFluentImpl.EphemeralContainersNested editMatchingEphemeralContainer(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1HostAliasBuilder builder = new V1HostAliasBuilder(item); - if (index < 0 || index >= hostAliases.size()) { _visitables.get("hostAliases").add(builder); hostAliases.add(builder); } else { _visitables.get("hostAliases").add(index, builder); hostAliases.add(index, builder);} - return (A)this; - } - public A setToHostAliases(int index,V1HostAlias item) { - if (this.hostAliases == null) {this.hostAliases = new ArrayList();} - V1HostAliasBuilder builder = new V1HostAliasBuilder(item); - if (index < 0 || index >= hostAliases.size()) { _visitables.get("hostAliases").add(builder); hostAliases.add(builder); } else { _visitables.get("hostAliases").set(index, builder); hostAliases.set(index, builder);} - return (A)this; - } - public A addToHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... items) { - if (this.hostAliases == null) {this.hostAliases = new ArrayList();} - for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").add(builder);this.hostAliases.add(builder);} return (A)this; - } - public A addAllToHostAliases(Collection items) { - if (this.hostAliases == null) {this.hostAliases = new ArrayList();} - for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").add(builder);this.hostAliases.add(builder);} return (A)this; - } - public A removeFromHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... items) { - for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").remove(builder);if (this.hostAliases != null) {this.hostAliases.remove(builder);}} return (A)this; - } - public A removeAllFromHostAliases(Collection items) { - for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").remove(builder);if (this.hostAliases != null) {this.hostAliases.remove(builder);}} return (A)this; - } - public A removeMatchingFromHostAliases(Predicate predicate) { - if (hostAliases == null) return (A) this; - final Iterator each = hostAliases.iterator(); - final List visitables = _visitables.get("hostAliases"); - while (each.hasNext()) { - V1HostAliasBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildHostAliases instead. - * @return The buildable object. - */ - @Deprecated - public List getHostAliases() { - return hostAliases != null ? build(hostAliases) : null; - } - public List buildHostAliases() { - return hostAliases != null ? build(hostAliases) : null; - } - public V1HostAlias buildHostAlias(int index) { - return this.hostAliases.get(index).build(); - } - public V1HostAlias buildFirstHostAlias() { - return this.hostAliases.get(0).build(); - } - public V1HostAlias buildLastHostAlias() { - return this.hostAliases.get(hostAliases.size() - 1).build(); - } - public V1HostAlias buildMatchingHostAlias(Predicate predicate) { - for (V1HostAliasBuilder item: hostAliases) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingHostAlias(Predicate predicate) { - for (V1HostAliasBuilder item: hostAliases) { if(predicate.test(item)){ return true;} } return false; - } - public A withHostAliases(List hostAliases) { - if (this.hostAliases != null) { _visitables.get("hostAliases").clear();} - if (hostAliases != null) {this.hostAliases = new ArrayList(); for (V1HostAlias item : hostAliases){this.addToHostAliases(item);}} else { this.hostAliases = null;} return (A) this; - } - public A withHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... hostAliases) { - if (this.hostAliases != null) {this.hostAliases.clear(); _visitables.remove("hostAliases"); } - if (hostAliases != null) {for (V1HostAlias item :hostAliases){ this.addToHostAliases(item);}} return (A) this; - } - public Boolean hasHostAliases() { - return hostAliases != null && !hostAliases.isEmpty(); - } - public V1PodSpecFluentImpl.HostAliasesNested addNewHostAlias() { - return new V1PodSpecFluentImpl.HostAliasesNestedImpl(); - } - public V1PodSpecFluentImpl.HostAliasesNested addNewHostAliasLike(V1HostAlias item) { - return new V1PodSpecFluentImpl.HostAliasesNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.HostAliasesNested setNewHostAliasLike(int index,V1HostAlias item) { - return new V1PodSpecFluentImpl.HostAliasesNestedImpl(index, item); - } - public V1PodSpecFluentImpl.HostAliasesNested editHostAlias(int index) { - if (hostAliases.size() <= index) throw new RuntimeException("Can't edit hostAliases. Index exceeds size."); - return setNewHostAliasLike(index, buildHostAlias(index)); - } - public V1PodSpecFluentImpl.HostAliasesNested editFirstHostAlias() { - if (hostAliases.size() == 0) throw new RuntimeException("Can't edit first hostAliases. The list is empty."); - return setNewHostAliasLike(0, buildHostAlias(0)); - } - public V1PodSpecFluentImpl.HostAliasesNested editLastHostAlias() { - int index = hostAliases.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last hostAliases. The list is empty."); - return setNewHostAliasLike(index, buildHostAlias(index)); - } - public V1PodSpecFluentImpl.HostAliasesNested editMatchingHostAlias(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item); - if (index < 0 || index >= imagePullSecrets.size()) { _visitables.get("imagePullSecrets").add(builder); imagePullSecrets.add(builder); } else { _visitables.get("imagePullSecrets").add(index, builder); imagePullSecrets.add(index, builder);} - return (A)this; - } - public A setToImagePullSecrets(int index,V1LocalObjectReference item) { - if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} - V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item); - if (index < 0 || index >= imagePullSecrets.size()) { _visitables.get("imagePullSecrets").add(builder); imagePullSecrets.add(builder); } else { _visitables.get("imagePullSecrets").set(index, builder); imagePullSecrets.set(index, builder);} - return (A)this; - } - public A addToImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) { - if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} - for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this; - } - public A addAllToImagePullSecrets(Collection items) { - if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} - for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this; - } - public A removeFromImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) { - for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder);if (this.imagePullSecrets != null) {this.imagePullSecrets.remove(builder);}} return (A)this; - } - public A removeAllFromImagePullSecrets(Collection items) { - for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder);if (this.imagePullSecrets != null) {this.imagePullSecrets.remove(builder);}} return (A)this; - } - public A removeMatchingFromImagePullSecrets(Predicate predicate) { - if (imagePullSecrets == null) return (A) this; - final Iterator each = imagePullSecrets.iterator(); - final List visitables = _visitables.get("imagePullSecrets"); - while (each.hasNext()) { - V1LocalObjectReferenceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildImagePullSecrets instead. - * @return The buildable object. - */ - @Deprecated - public List getImagePullSecrets() { - return imagePullSecrets != null ? build(imagePullSecrets) : null; - } - public List buildImagePullSecrets() { - return imagePullSecrets != null ? build(imagePullSecrets) : null; - } - public V1LocalObjectReference buildImagePullSecret(int index) { - return this.imagePullSecrets.get(index).build(); - } - public V1LocalObjectReference buildFirstImagePullSecret() { - return this.imagePullSecrets.get(0).build(); - } - public V1LocalObjectReference buildLastImagePullSecret() { - return this.imagePullSecrets.get(imagePullSecrets.size() - 1).build(); - } - public V1LocalObjectReference buildMatchingImagePullSecret(Predicate predicate) { - for (V1LocalObjectReferenceBuilder item: imagePullSecrets) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingImagePullSecret(Predicate predicate) { - for (V1LocalObjectReferenceBuilder item: imagePullSecrets) { if(predicate.test(item)){ return true;} } return false; - } - public A withImagePullSecrets(List imagePullSecrets) { - if (this.imagePullSecrets != null) { _visitables.get("imagePullSecrets").clear();} - if (imagePullSecrets != null) {this.imagePullSecrets = new ArrayList(); for (V1LocalObjectReference item : imagePullSecrets){this.addToImagePullSecrets(item);}} else { this.imagePullSecrets = null;} return (A) this; - } - public A withImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... imagePullSecrets) { - if (this.imagePullSecrets != null) {this.imagePullSecrets.clear(); _visitables.remove("imagePullSecrets"); } - if (imagePullSecrets != null) {for (V1LocalObjectReference item :imagePullSecrets){ this.addToImagePullSecrets(item);}} return (A) this; - } - public Boolean hasImagePullSecrets() { - return imagePullSecrets != null && !imagePullSecrets.isEmpty(); - } - public V1PodSpecFluentImpl.ImagePullSecretsNested addNewImagePullSecret() { - return new V1PodSpecFluentImpl.ImagePullSecretsNestedImpl(); - } - public V1PodSpecFluentImpl.ImagePullSecretsNested addNewImagePullSecretLike(V1LocalObjectReference item) { - return new V1PodSpecFluentImpl.ImagePullSecretsNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.ImagePullSecretsNested setNewImagePullSecretLike(int index,V1LocalObjectReference item) { - return new V1PodSpecFluentImpl.ImagePullSecretsNestedImpl(index, item); - } - public V1PodSpecFluentImpl.ImagePullSecretsNested editImagePullSecret(int index) { - if (imagePullSecrets.size() <= index) throw new RuntimeException("Can't edit imagePullSecrets. Index exceeds size."); - return setNewImagePullSecretLike(index, buildImagePullSecret(index)); - } - public V1PodSpecFluentImpl.ImagePullSecretsNested editFirstImagePullSecret() { - if (imagePullSecrets.size() == 0) throw new RuntimeException("Can't edit first imagePullSecrets. The list is empty."); - return setNewImagePullSecretLike(0, buildImagePullSecret(0)); - } - public V1PodSpecFluentImpl.ImagePullSecretsNested editLastImagePullSecret() { - int index = imagePullSecrets.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last imagePullSecrets. The list is empty."); - return setNewImagePullSecretLike(index, buildImagePullSecret(index)); - } - public V1PodSpecFluentImpl.ImagePullSecretsNested editMatchingImagePullSecret(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1ContainerBuilder builder = new V1ContainerBuilder(item); - if (index < 0 || index >= initContainers.size()) { _visitables.get("initContainers").add(builder); initContainers.add(builder); } else { _visitables.get("initContainers").add(index, builder); initContainers.add(index, builder);} - return (A)this; - } - public A setToInitContainers(int index,V1Container item) { - if (this.initContainers == null) {this.initContainers = new ArrayList();} - V1ContainerBuilder builder = new V1ContainerBuilder(item); - if (index < 0 || index >= initContainers.size()) { _visitables.get("initContainers").add(builder); initContainers.add(builder); } else { _visitables.get("initContainers").set(index, builder); initContainers.set(index, builder);} - return (A)this; - } - public A addToInitContainers(io.kubernetes.client.openapi.models.V1Container... items) { - if (this.initContainers == null) {this.initContainers = new ArrayList();} - for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").add(builder);this.initContainers.add(builder);} return (A)this; - } - public A addAllToInitContainers(Collection items) { - if (this.initContainers == null) {this.initContainers = new ArrayList();} - for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").add(builder);this.initContainers.add(builder);} return (A)this; - } - public A removeFromInitContainers(io.kubernetes.client.openapi.models.V1Container... items) { - for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").remove(builder);if (this.initContainers != null) {this.initContainers.remove(builder);}} return (A)this; - } - public A removeAllFromInitContainers(Collection items) { - for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").remove(builder);if (this.initContainers != null) {this.initContainers.remove(builder);}} return (A)this; - } - public A removeMatchingFromInitContainers(Predicate predicate) { - if (initContainers == null) return (A) this; - final Iterator each = initContainers.iterator(); - final List visitables = _visitables.get("initContainers"); - while (each.hasNext()) { - V1ContainerBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildInitContainers instead. - * @return The buildable object. - */ - @Deprecated - public List getInitContainers() { - return initContainers != null ? build(initContainers) : null; - } - public List buildInitContainers() { - return initContainers != null ? build(initContainers) : null; - } - public V1Container buildInitContainer(int index) { - return this.initContainers.get(index).build(); - } - public V1Container buildFirstInitContainer() { - return this.initContainers.get(0).build(); - } - public V1Container buildLastInitContainer() { - return this.initContainers.get(initContainers.size() - 1).build(); - } - public V1Container buildMatchingInitContainer(Predicate predicate) { - for (V1ContainerBuilder item: initContainers) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingInitContainer(Predicate predicate) { - for (V1ContainerBuilder item: initContainers) { if(predicate.test(item)){ return true;} } return false; - } - public A withInitContainers(List initContainers) { - if (this.initContainers != null) { _visitables.get("initContainers").clear();} - if (initContainers != null) {this.initContainers = new ArrayList(); for (V1Container item : initContainers){this.addToInitContainers(item);}} else { this.initContainers = null;} return (A) this; - } - public A withInitContainers(io.kubernetes.client.openapi.models.V1Container... initContainers) { - if (this.initContainers != null) {this.initContainers.clear(); _visitables.remove("initContainers"); } - if (initContainers != null) {for (V1Container item :initContainers){ this.addToInitContainers(item);}} return (A) this; - } - public Boolean hasInitContainers() { - return initContainers != null && !initContainers.isEmpty(); - } - public V1PodSpecFluentImpl.InitContainersNested addNewInitContainer() { - return new V1PodSpecFluentImpl.InitContainersNestedImpl(); - } - public V1PodSpecFluentImpl.InitContainersNested addNewInitContainerLike(V1Container item) { - return new V1PodSpecFluentImpl.InitContainersNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.InitContainersNested setNewInitContainerLike(int index,V1Container item) { - return new V1PodSpecFluentImpl.InitContainersNestedImpl(index, item); - } - public V1PodSpecFluentImpl.InitContainersNested editInitContainer(int index) { - if (initContainers.size() <= index) throw new RuntimeException("Can't edit initContainers. Index exceeds size."); - return setNewInitContainerLike(index, buildInitContainer(index)); - } - public V1PodSpecFluentImpl.InitContainersNested editFirstInitContainer() { - if (initContainers.size() == 0) throw new RuntimeException("Can't edit first initContainers. The list is empty."); - return setNewInitContainerLike(0, buildInitContainer(0)); - } - public V1PodSpecFluentImpl.InitContainersNested editLastInitContainer() { - int index = initContainers.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last initContainers. The list is empty."); - return setNewInitContainerLike(index, buildInitContainer(index)); - } - public V1PodSpecFluentImpl.InitContainersNested editMatchingInitContainer(Predicate predicate) { - int index = -1; - for (int i=0;i map) { - if(this.nodeSelector == null && map != null) { this.nodeSelector = new LinkedHashMap(); } - if(map != null) { this.nodeSelector.putAll(map);} return (A)this; - } - public A removeFromNodeSelector(String key) { - if(this.nodeSelector == null) { return (A) this; } - if(key != null && this.nodeSelector != null) {this.nodeSelector.remove(key);} return (A)this; - } - public A removeFromNodeSelector(Map map) { - if(this.nodeSelector == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.nodeSelector != null){this.nodeSelector.remove(key);}}} return (A)this; - } - public Map getNodeSelector() { - return this.nodeSelector; - } - public A withNodeSelector(Map nodeSelector) { - if (nodeSelector == null) { this.nodeSelector = null;} else {this.nodeSelector = new LinkedHashMap(nodeSelector);} return (A) this; - } - public Boolean hasNodeSelector() { - return this.nodeSelector != null; - } - - /** - * This method has been deprecated, please use method buildOs instead. - * @return The buildable object. - */ - @Deprecated - public V1PodOS getOs() { - return this.os!=null ?this.os.build():null; - } - public V1PodOS buildOs() { - return this.os!=null ?this.os.build():null; - } - public A withOs(V1PodOS os) { - _visitables.get("os").remove(this.os); - if (os!=null){ this.os= new V1PodOSBuilder(os); _visitables.get("os").add(this.os);} else { this.os = null; _visitables.get("os").remove(this.os); } return (A) this; - } - public Boolean hasOs() { - return this.os != null; - } - public V1PodSpecFluentImpl.OsNested withNewOs() { - return new V1PodSpecFluentImpl.OsNestedImpl(); - } - public V1PodSpecFluentImpl.OsNested withNewOsLike(V1PodOS item) { - return new V1PodSpecFluentImpl.OsNestedImpl(item); - } - public V1PodSpecFluentImpl.OsNested editOs() { - return withNewOsLike(getOs()); - } - public V1PodSpecFluentImpl.OsNested editOrNewOs() { - return withNewOsLike(getOs() != null ? getOs(): new V1PodOSBuilder().build()); - } - public V1PodSpecFluentImpl.OsNested editOrNewOsLike(V1PodOS item) { - return withNewOsLike(getOs() != null ? getOs(): item); - } - public A addToOverhead(String key,Quantity value) { - if(this.overhead == null && key != null && value != null) { this.overhead = new LinkedHashMap(); } - if(key != null && value != null) {this.overhead.put(key, value);} return (A)this; - } - public A addToOverhead(Map map) { - if(this.overhead == null && map != null) { this.overhead = new LinkedHashMap(); } - if(map != null) { this.overhead.putAll(map);} return (A)this; - } - public A removeFromOverhead(String key) { - if(this.overhead == null) { return (A) this; } - if(key != null && this.overhead != null) {this.overhead.remove(key);} return (A)this; - } - public A removeFromOverhead(Map map) { - if(this.overhead == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.overhead != null){this.overhead.remove(key);}}} return (A)this; - } - public Map getOverhead() { - return this.overhead; - } - public A withOverhead(Map overhead) { - if (overhead == null) { this.overhead = null;} else {this.overhead = new LinkedHashMap(overhead);} return (A) this; - } - public Boolean hasOverhead() { - return this.overhead != null; - } - public String getPreemptionPolicy() { - return this.preemptionPolicy; - } - public A withPreemptionPolicy(String preemptionPolicy) { - this.preemptionPolicy=preemptionPolicy; return (A) this; - } - public Boolean hasPreemptionPolicy() { - return this.preemptionPolicy != null; - } - public Integer getPriority() { - return this.priority; - } - public A withPriority(Integer priority) { - this.priority=priority; return (A) this; - } - public Boolean hasPriority() { - return this.priority != null; - } - public String getPriorityClassName() { - return this.priorityClassName; - } - public A withPriorityClassName(String priorityClassName) { - this.priorityClassName=priorityClassName; return (A) this; - } - public Boolean hasPriorityClassName() { - return this.priorityClassName != null; - } - public A addToReadinessGates(int index,V1PodReadinessGate item) { - if (this.readinessGates == null) {this.readinessGates = new ArrayList();} - V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item); - if (index < 0 || index >= readinessGates.size()) { _visitables.get("readinessGates").add(builder); readinessGates.add(builder); } else { _visitables.get("readinessGates").add(index, builder); readinessGates.add(index, builder);} - return (A)this; - } - public A setToReadinessGates(int index,V1PodReadinessGate item) { - if (this.readinessGates == null) {this.readinessGates = new ArrayList();} - V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item); - if (index < 0 || index >= readinessGates.size()) { _visitables.get("readinessGates").add(builder); readinessGates.add(builder); } else { _visitables.get("readinessGates").set(index, builder); readinessGates.set(index, builder);} - return (A)this; - } - public A addToReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... items) { - if (this.readinessGates == null) {this.readinessGates = new ArrayList();} - for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").add(builder);this.readinessGates.add(builder);} return (A)this; - } - public A addAllToReadinessGates(Collection items) { - if (this.readinessGates == null) {this.readinessGates = new ArrayList();} - for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").add(builder);this.readinessGates.add(builder);} return (A)this; - } - public A removeFromReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... items) { - for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").remove(builder);if (this.readinessGates != null) {this.readinessGates.remove(builder);}} return (A)this; - } - public A removeAllFromReadinessGates(Collection items) { - for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").remove(builder);if (this.readinessGates != null) {this.readinessGates.remove(builder);}} return (A)this; - } - public A removeMatchingFromReadinessGates(Predicate predicate) { - if (readinessGates == null) return (A) this; - final Iterator each = readinessGates.iterator(); - final List visitables = _visitables.get("readinessGates"); - while (each.hasNext()) { - V1PodReadinessGateBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildReadinessGates instead. - * @return The buildable object. - */ - @Deprecated - public List getReadinessGates() { - return readinessGates != null ? build(readinessGates) : null; - } - public List buildReadinessGates() { - return readinessGates != null ? build(readinessGates) : null; - } - public V1PodReadinessGate buildReadinessGate(int index) { - return this.readinessGates.get(index).build(); - } - public V1PodReadinessGate buildFirstReadinessGate() { - return this.readinessGates.get(0).build(); - } - public V1PodReadinessGate buildLastReadinessGate() { - return this.readinessGates.get(readinessGates.size() - 1).build(); - } - public V1PodReadinessGate buildMatchingReadinessGate(Predicate predicate) { - for (V1PodReadinessGateBuilder item: readinessGates) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingReadinessGate(Predicate predicate) { - for (V1PodReadinessGateBuilder item: readinessGates) { if(predicate.test(item)){ return true;} } return false; - } - public A withReadinessGates(List readinessGates) { - if (this.readinessGates != null) { _visitables.get("readinessGates").clear();} - if (readinessGates != null) {this.readinessGates = new ArrayList(); for (V1PodReadinessGate item : readinessGates){this.addToReadinessGates(item);}} else { this.readinessGates = null;} return (A) this; - } - public A withReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... readinessGates) { - if (this.readinessGates != null) {this.readinessGates.clear(); _visitables.remove("readinessGates"); } - if (readinessGates != null) {for (V1PodReadinessGate item :readinessGates){ this.addToReadinessGates(item);}} return (A) this; - } - public Boolean hasReadinessGates() { - return readinessGates != null && !readinessGates.isEmpty(); - } - public V1PodSpecFluentImpl.ReadinessGatesNested addNewReadinessGate() { - return new V1PodSpecFluentImpl.ReadinessGatesNestedImpl(); - } - public V1PodSpecFluentImpl.ReadinessGatesNested addNewReadinessGateLike(V1PodReadinessGate item) { - return new V1PodSpecFluentImpl.ReadinessGatesNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.ReadinessGatesNested setNewReadinessGateLike(int index,V1PodReadinessGate item) { - return new V1PodSpecFluentImpl.ReadinessGatesNestedImpl(index, item); - } - public V1PodSpecFluentImpl.ReadinessGatesNested editReadinessGate(int index) { - if (readinessGates.size() <= index) throw new RuntimeException("Can't edit readinessGates. Index exceeds size."); - return setNewReadinessGateLike(index, buildReadinessGate(index)); - } - public V1PodSpecFluentImpl.ReadinessGatesNested editFirstReadinessGate() { - if (readinessGates.size() == 0) throw new RuntimeException("Can't edit first readinessGates. The list is empty."); - return setNewReadinessGateLike(0, buildReadinessGate(0)); - } - public V1PodSpecFluentImpl.ReadinessGatesNested editLastReadinessGate() { - int index = readinessGates.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last readinessGates. The list is empty."); - return setNewReadinessGateLike(index, buildReadinessGate(index)); - } - public V1PodSpecFluentImpl.ReadinessGatesNested editMatchingReadinessGate(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item); - if (index < 0 || index >= resourceClaims.size()) { _visitables.get("resourceClaims").add(builder); resourceClaims.add(builder); } else { _visitables.get("resourceClaims").add(index, builder); resourceClaims.add(index, builder);} - return (A)this; - } - public A setToResourceClaims(int index,V1PodResourceClaim item) { - if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} - V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item); - if (index < 0 || index >= resourceClaims.size()) { _visitables.get("resourceClaims").add(builder); resourceClaims.add(builder); } else { _visitables.get("resourceClaims").set(index, builder); resourceClaims.set(index, builder);} - return (A)this; - } - public A addToResourceClaims(io.kubernetes.client.openapi.models.V1PodResourceClaim... items) { - if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} - for (V1PodResourceClaim item : items) {V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item);_visitables.get("resourceClaims").add(builder);this.resourceClaims.add(builder);} return (A)this; - } - public A addAllToResourceClaims(Collection items) { - if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} - for (V1PodResourceClaim item : items) {V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item);_visitables.get("resourceClaims").add(builder);this.resourceClaims.add(builder);} return (A)this; - } - public A removeFromResourceClaims(io.kubernetes.client.openapi.models.V1PodResourceClaim... items) { - for (V1PodResourceClaim item : items) {V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item);_visitables.get("resourceClaims").remove(builder);if (this.resourceClaims != null) {this.resourceClaims.remove(builder);}} return (A)this; - } - public A removeAllFromResourceClaims(Collection items) { - for (V1PodResourceClaim item : items) {V1PodResourceClaimBuilder builder = new V1PodResourceClaimBuilder(item);_visitables.get("resourceClaims").remove(builder);if (this.resourceClaims != null) {this.resourceClaims.remove(builder);}} return (A)this; - } - public A removeMatchingFromResourceClaims(Predicate predicate) { - if (resourceClaims == null) return (A) this; - final Iterator each = resourceClaims.iterator(); - final List visitables = _visitables.get("resourceClaims"); - while (each.hasNext()) { - V1PodResourceClaimBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResourceClaims instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceClaims() { - return resourceClaims != null ? build(resourceClaims) : null; - } - public List buildResourceClaims() { - return resourceClaims != null ? build(resourceClaims) : null; - } - public V1PodResourceClaim buildResourceClaim(int index) { - return this.resourceClaims.get(index).build(); - } - public V1PodResourceClaim buildFirstResourceClaim() { - return this.resourceClaims.get(0).build(); - } - public V1PodResourceClaim buildLastResourceClaim() { - return this.resourceClaims.get(resourceClaims.size() - 1).build(); - } - public V1PodResourceClaim buildMatchingResourceClaim(Predicate predicate) { - for (V1PodResourceClaimBuilder item: resourceClaims) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResourceClaim(Predicate predicate) { - for (V1PodResourceClaimBuilder item: resourceClaims) { if(predicate.test(item)){ return true;} } return false; - } - public A withResourceClaims(List resourceClaims) { - if (this.resourceClaims != null) { _visitables.get("resourceClaims").clear();} - if (resourceClaims != null) {this.resourceClaims = new ArrayList(); for (V1PodResourceClaim item : resourceClaims){this.addToResourceClaims(item);}} else { this.resourceClaims = null;} return (A) this; - } - public A withResourceClaims(io.kubernetes.client.openapi.models.V1PodResourceClaim... resourceClaims) { - if (this.resourceClaims != null) {this.resourceClaims.clear(); _visitables.remove("resourceClaims"); } - if (resourceClaims != null) {for (V1PodResourceClaim item :resourceClaims){ this.addToResourceClaims(item);}} return (A) this; - } - public Boolean hasResourceClaims() { - return resourceClaims != null && !resourceClaims.isEmpty(); - } - public V1PodSpecFluentImpl.ResourceClaimsNested addNewResourceClaim() { - return new V1PodSpecFluentImpl.ResourceClaimsNestedImpl(); - } - public V1PodSpecFluentImpl.ResourceClaimsNested addNewResourceClaimLike(V1PodResourceClaim item) { - return new V1PodSpecFluentImpl.ResourceClaimsNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.ResourceClaimsNested setNewResourceClaimLike(int index,V1PodResourceClaim item) { - return new V1PodSpecFluentImpl.ResourceClaimsNestedImpl(index, item); - } - public V1PodSpecFluentImpl.ResourceClaimsNested editResourceClaim(int index) { - if (resourceClaims.size() <= index) throw new RuntimeException("Can't edit resourceClaims. Index exceeds size."); - return setNewResourceClaimLike(index, buildResourceClaim(index)); - } - public V1PodSpecFluentImpl.ResourceClaimsNested editFirstResourceClaim() { - if (resourceClaims.size() == 0) throw new RuntimeException("Can't edit first resourceClaims. The list is empty."); - return setNewResourceClaimLike(0, buildResourceClaim(0)); - } - public V1PodSpecFluentImpl.ResourceClaimsNested editLastResourceClaim() { - int index = resourceClaims.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resourceClaims. The list is empty."); - return setNewResourceClaimLike(index, buildResourceClaim(index)); - } - public V1PodSpecFluentImpl.ResourceClaimsNested editMatchingResourceClaim(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item); - if (index < 0 || index >= schedulingGates.size()) { _visitables.get("schedulingGates").add(builder); schedulingGates.add(builder); } else { _visitables.get("schedulingGates").add(index, builder); schedulingGates.add(index, builder);} - return (A)this; - } - public A setToSchedulingGates(int index,V1PodSchedulingGate item) { - if (this.schedulingGates == null) {this.schedulingGates = new ArrayList();} - V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item); - if (index < 0 || index >= schedulingGates.size()) { _visitables.get("schedulingGates").add(builder); schedulingGates.add(builder); } else { _visitables.get("schedulingGates").set(index, builder); schedulingGates.set(index, builder);} - return (A)this; - } - public A addToSchedulingGates(io.kubernetes.client.openapi.models.V1PodSchedulingGate... items) { - if (this.schedulingGates == null) {this.schedulingGates = new ArrayList();} - for (V1PodSchedulingGate item : items) {V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item);_visitables.get("schedulingGates").add(builder);this.schedulingGates.add(builder);} return (A)this; - } - public A addAllToSchedulingGates(Collection items) { - if (this.schedulingGates == null) {this.schedulingGates = new ArrayList();} - for (V1PodSchedulingGate item : items) {V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item);_visitables.get("schedulingGates").add(builder);this.schedulingGates.add(builder);} return (A)this; - } - public A removeFromSchedulingGates(io.kubernetes.client.openapi.models.V1PodSchedulingGate... items) { - for (V1PodSchedulingGate item : items) {V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item);_visitables.get("schedulingGates").remove(builder);if (this.schedulingGates != null) {this.schedulingGates.remove(builder);}} return (A)this; - } - public A removeAllFromSchedulingGates(Collection items) { - for (V1PodSchedulingGate item : items) {V1PodSchedulingGateBuilder builder = new V1PodSchedulingGateBuilder(item);_visitables.get("schedulingGates").remove(builder);if (this.schedulingGates != null) {this.schedulingGates.remove(builder);}} return (A)this; - } - public A removeMatchingFromSchedulingGates(Predicate predicate) { - if (schedulingGates == null) return (A) this; - final Iterator each = schedulingGates.iterator(); - final List visitables = _visitables.get("schedulingGates"); - while (each.hasNext()) { - V1PodSchedulingGateBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildSchedulingGates instead. - * @return The buildable object. - */ - @Deprecated - public List getSchedulingGates() { - return schedulingGates != null ? build(schedulingGates) : null; - } - public List buildSchedulingGates() { - return schedulingGates != null ? build(schedulingGates) : null; - } - public V1PodSchedulingGate buildSchedulingGate(int index) { - return this.schedulingGates.get(index).build(); - } - public V1PodSchedulingGate buildFirstSchedulingGate() { - return this.schedulingGates.get(0).build(); - } - public V1PodSchedulingGate buildLastSchedulingGate() { - return this.schedulingGates.get(schedulingGates.size() - 1).build(); - } - public V1PodSchedulingGate buildMatchingSchedulingGate(Predicate predicate) { - for (V1PodSchedulingGateBuilder item: schedulingGates) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingSchedulingGate(Predicate predicate) { - for (V1PodSchedulingGateBuilder item: schedulingGates) { if(predicate.test(item)){ return true;} } return false; - } - public A withSchedulingGates(List schedulingGates) { - if (this.schedulingGates != null) { _visitables.get("schedulingGates").clear();} - if (schedulingGates != null) {this.schedulingGates = new ArrayList(); for (V1PodSchedulingGate item : schedulingGates){this.addToSchedulingGates(item);}} else { this.schedulingGates = null;} return (A) this; - } - public A withSchedulingGates(io.kubernetes.client.openapi.models.V1PodSchedulingGate... schedulingGates) { - if (this.schedulingGates != null) {this.schedulingGates.clear(); _visitables.remove("schedulingGates"); } - if (schedulingGates != null) {for (V1PodSchedulingGate item :schedulingGates){ this.addToSchedulingGates(item);}} return (A) this; - } - public Boolean hasSchedulingGates() { - return schedulingGates != null && !schedulingGates.isEmpty(); - } - public V1PodSpecFluentImpl.SchedulingGatesNested addNewSchedulingGate() { - return new V1PodSpecFluentImpl.SchedulingGatesNestedImpl(); - } - public V1PodSpecFluentImpl.SchedulingGatesNested addNewSchedulingGateLike(V1PodSchedulingGate item) { - return new V1PodSpecFluentImpl.SchedulingGatesNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.SchedulingGatesNested setNewSchedulingGateLike(int index,V1PodSchedulingGate item) { - return new V1PodSpecFluentImpl.SchedulingGatesNestedImpl(index, item); - } - public V1PodSpecFluentImpl.SchedulingGatesNested editSchedulingGate(int index) { - if (schedulingGates.size() <= index) throw new RuntimeException("Can't edit schedulingGates. Index exceeds size."); - return setNewSchedulingGateLike(index, buildSchedulingGate(index)); - } - public V1PodSpecFluentImpl.SchedulingGatesNested editFirstSchedulingGate() { - if (schedulingGates.size() == 0) throw new RuntimeException("Can't edit first schedulingGates. The list is empty."); - return setNewSchedulingGateLike(0, buildSchedulingGate(0)); - } - public V1PodSpecFluentImpl.SchedulingGatesNested editLastSchedulingGate() { - int index = schedulingGates.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last schedulingGates. The list is empty."); - return setNewSchedulingGateLike(index, buildSchedulingGate(index)); - } - public V1PodSpecFluentImpl.SchedulingGatesNested editMatchingSchedulingGate(Predicate predicate) { - int index = -1; - for (int i=0;i withNewSecurityContext() { - return new V1PodSpecFluentImpl.SecurityContextNestedImpl(); - } - public V1PodSpecFluentImpl.SecurityContextNested withNewSecurityContextLike(V1PodSecurityContext item) { - return new V1PodSpecFluentImpl.SecurityContextNestedImpl(item); - } - public V1PodSpecFluentImpl.SecurityContextNested editSecurityContext() { - return withNewSecurityContextLike(getSecurityContext()); - } - public V1PodSpecFluentImpl.SecurityContextNested editOrNewSecurityContext() { - return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): new V1PodSecurityContextBuilder().build()); - } - public V1PodSpecFluentImpl.SecurityContextNested editOrNewSecurityContextLike(V1PodSecurityContext item) { - return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): item); - } - public String getServiceAccount() { - return this.serviceAccount; - } - public A withServiceAccount(String serviceAccount) { - this.serviceAccount=serviceAccount; return (A) this; - } - public Boolean hasServiceAccount() { - return this.serviceAccount != null; - } - public String getServiceAccountName() { - return this.serviceAccountName; - } - public A withServiceAccountName(String serviceAccountName) { - this.serviceAccountName=serviceAccountName; return (A) this; - } - public Boolean hasServiceAccountName() { - return this.serviceAccountName != null; - } - public Boolean getSetHostnameAsFQDN() { - return this.setHostnameAsFQDN; - } - public A withSetHostnameAsFQDN(Boolean setHostnameAsFQDN) { - this.setHostnameAsFQDN=setHostnameAsFQDN; return (A) this; - } - public Boolean hasSetHostnameAsFQDN() { - return this.setHostnameAsFQDN != null; - } - public Boolean getShareProcessNamespace() { - return this.shareProcessNamespace; - } - public A withShareProcessNamespace(Boolean shareProcessNamespace) { - this.shareProcessNamespace=shareProcessNamespace; return (A) this; - } - public Boolean hasShareProcessNamespace() { - return this.shareProcessNamespace != null; - } - public String getSubdomain() { - return this.subdomain; - } - public A withSubdomain(String subdomain) { - this.subdomain=subdomain; return (A) this; - } - public Boolean hasSubdomain() { - return this.subdomain != null; - } - public Long getTerminationGracePeriodSeconds() { - return this.terminationGracePeriodSeconds; - } - public A withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { - this.terminationGracePeriodSeconds=terminationGracePeriodSeconds; return (A) this; - } - public Boolean hasTerminationGracePeriodSeconds() { - return this.terminationGracePeriodSeconds != null; - } - public A addToTolerations(int index,V1Toleration item) { - if (this.tolerations == null) {this.tolerations = new ArrayList();} - V1TolerationBuilder builder = new V1TolerationBuilder(item); - if (index < 0 || index >= tolerations.size()) { _visitables.get("tolerations").add(builder); tolerations.add(builder); } else { _visitables.get("tolerations").add(index, builder); tolerations.add(index, builder);} - return (A)this; - } - public A setToTolerations(int index,V1Toleration item) { - if (this.tolerations == null) {this.tolerations = new ArrayList();} - V1TolerationBuilder builder = new V1TolerationBuilder(item); - if (index < 0 || index >= tolerations.size()) { _visitables.get("tolerations").add(builder); tolerations.add(builder); } else { _visitables.get("tolerations").set(index, builder); tolerations.set(index, builder);} - return (A)this; - } - public A addToTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) { - if (this.tolerations == null) {this.tolerations = new ArrayList();} - for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this; - } - public A addAllToTolerations(Collection items) { - if (this.tolerations == null) {this.tolerations = new ArrayList();} - for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this; - } - public A removeFromTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) { - for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder);if (this.tolerations != null) {this.tolerations.remove(builder);}} return (A)this; - } - public A removeAllFromTolerations(Collection items) { - for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder);if (this.tolerations != null) {this.tolerations.remove(builder);}} return (A)this; - } - public A removeMatchingFromTolerations(Predicate predicate) { - if (tolerations == null) return (A) this; - final Iterator each = tolerations.iterator(); - final List visitables = _visitables.get("tolerations"); - while (each.hasNext()) { - V1TolerationBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildTolerations instead. - * @return The buildable object. - */ - @Deprecated - public List getTolerations() { - return tolerations != null ? build(tolerations) : null; - } - public List buildTolerations() { - return tolerations != null ? build(tolerations) : null; - } - public V1Toleration buildToleration(int index) { - return this.tolerations.get(index).build(); - } - public V1Toleration buildFirstToleration() { - return this.tolerations.get(0).build(); - } - public V1Toleration buildLastToleration() { - return this.tolerations.get(tolerations.size() - 1).build(); - } - public V1Toleration buildMatchingToleration(Predicate predicate) { - for (V1TolerationBuilder item: tolerations) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingToleration(Predicate predicate) { - for (V1TolerationBuilder item: tolerations) { if(predicate.test(item)){ return true;} } return false; - } - public A withTolerations(List tolerations) { - if (this.tolerations != null) { _visitables.get("tolerations").clear();} - if (tolerations != null) {this.tolerations = new ArrayList(); for (V1Toleration item : tolerations){this.addToTolerations(item);}} else { this.tolerations = null;} return (A) this; - } - public A withTolerations(io.kubernetes.client.openapi.models.V1Toleration... tolerations) { - if (this.tolerations != null) {this.tolerations.clear(); _visitables.remove("tolerations"); } - if (tolerations != null) {for (V1Toleration item :tolerations){ this.addToTolerations(item);}} return (A) this; - } - public Boolean hasTolerations() { - return tolerations != null && !tolerations.isEmpty(); - } - public V1PodSpecFluentImpl.TolerationsNested addNewToleration() { - return new V1PodSpecFluentImpl.TolerationsNestedImpl(); - } - public V1PodSpecFluentImpl.TolerationsNested addNewTolerationLike(V1Toleration item) { - return new V1PodSpecFluentImpl.TolerationsNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.TolerationsNested setNewTolerationLike(int index,V1Toleration item) { - return new V1PodSpecFluentImpl.TolerationsNestedImpl(index, item); - } - public V1PodSpecFluentImpl.TolerationsNested editToleration(int index) { - if (tolerations.size() <= index) throw new RuntimeException("Can't edit tolerations. Index exceeds size."); - return setNewTolerationLike(index, buildToleration(index)); - } - public V1PodSpecFluentImpl.TolerationsNested editFirstToleration() { - if (tolerations.size() == 0) throw new RuntimeException("Can't edit first tolerations. The list is empty."); - return setNewTolerationLike(0, buildToleration(0)); - } - public V1PodSpecFluentImpl.TolerationsNested editLastToleration() { - int index = tolerations.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last tolerations. The list is empty."); - return setNewTolerationLike(index, buildToleration(index)); - } - public V1PodSpecFluentImpl.TolerationsNested editMatchingToleration(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item); - if (index < 0 || index >= topologySpreadConstraints.size()) { _visitables.get("topologySpreadConstraints").add(builder); topologySpreadConstraints.add(builder); } else { _visitables.get("topologySpreadConstraints").add(index, builder); topologySpreadConstraints.add(index, builder);} - return (A)this; - } - public A setToTopologySpreadConstraints(int index,V1TopologySpreadConstraint item) { - if (this.topologySpreadConstraints == null) {this.topologySpreadConstraints = new ArrayList();} - V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item); - if (index < 0 || index >= topologySpreadConstraints.size()) { _visitables.get("topologySpreadConstraints").add(builder); topologySpreadConstraints.add(builder); } else { _visitables.get("topologySpreadConstraints").set(index, builder); topologySpreadConstraints.set(index, builder);} - return (A)this; - } - public A addToTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... items) { - if (this.topologySpreadConstraints == null) {this.topologySpreadConstraints = new ArrayList();} - for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").add(builder);this.topologySpreadConstraints.add(builder);} return (A)this; - } - public A addAllToTopologySpreadConstraints(Collection items) { - if (this.topologySpreadConstraints == null) {this.topologySpreadConstraints = new ArrayList();} - for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").add(builder);this.topologySpreadConstraints.add(builder);} return (A)this; - } - public A removeFromTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... items) { - for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").remove(builder);if (this.topologySpreadConstraints != null) {this.topologySpreadConstraints.remove(builder);}} return (A)this; - } - public A removeAllFromTopologySpreadConstraints(Collection items) { - for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").remove(builder);if (this.topologySpreadConstraints != null) {this.topologySpreadConstraints.remove(builder);}} return (A)this; - } - public A removeMatchingFromTopologySpreadConstraints(Predicate predicate) { - if (topologySpreadConstraints == null) return (A) this; - final Iterator each = topologySpreadConstraints.iterator(); - final List visitables = _visitables.get("topologySpreadConstraints"); - while (each.hasNext()) { - V1TopologySpreadConstraintBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildTopologySpreadConstraints instead. - * @return The buildable object. - */ - @Deprecated - public List getTopologySpreadConstraints() { - return topologySpreadConstraints != null ? build(topologySpreadConstraints) : null; - } - public List buildTopologySpreadConstraints() { - return topologySpreadConstraints != null ? build(topologySpreadConstraints) : null; - } - public V1TopologySpreadConstraint buildTopologySpreadConstraint(int index) { - return this.topologySpreadConstraints.get(index).build(); - } - public V1TopologySpreadConstraint buildFirstTopologySpreadConstraint() { - return this.topologySpreadConstraints.get(0).build(); - } - public V1TopologySpreadConstraint buildLastTopologySpreadConstraint() { - return this.topologySpreadConstraints.get(topologySpreadConstraints.size() - 1).build(); - } - public V1TopologySpreadConstraint buildMatchingTopologySpreadConstraint(Predicate predicate) { - for (V1TopologySpreadConstraintBuilder item: topologySpreadConstraints) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingTopologySpreadConstraint(Predicate predicate) { - for (V1TopologySpreadConstraintBuilder item: topologySpreadConstraints) { if(predicate.test(item)){ return true;} } return false; - } - public A withTopologySpreadConstraints(List topologySpreadConstraints) { - if (this.topologySpreadConstraints != null) { _visitables.get("topologySpreadConstraints").clear();} - if (topologySpreadConstraints != null) {this.topologySpreadConstraints = new ArrayList(); for (V1TopologySpreadConstraint item : topologySpreadConstraints){this.addToTopologySpreadConstraints(item);}} else { this.topologySpreadConstraints = null;} return (A) this; - } - public A withTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... topologySpreadConstraints) { - if (this.topologySpreadConstraints != null) {this.topologySpreadConstraints.clear(); _visitables.remove("topologySpreadConstraints"); } - if (topologySpreadConstraints != null) {for (V1TopologySpreadConstraint item :topologySpreadConstraints){ this.addToTopologySpreadConstraints(item);}} return (A) this; - } - public Boolean hasTopologySpreadConstraints() { - return topologySpreadConstraints != null && !topologySpreadConstraints.isEmpty(); - } - public V1PodSpecFluentImpl.TopologySpreadConstraintsNested addNewTopologySpreadConstraint() { - return new V1PodSpecFluentImpl.TopologySpreadConstraintsNestedImpl(); - } - public V1PodSpecFluentImpl.TopologySpreadConstraintsNested addNewTopologySpreadConstraintLike(V1TopologySpreadConstraint item) { - return new V1PodSpecFluentImpl.TopologySpreadConstraintsNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.TopologySpreadConstraintsNested setNewTopologySpreadConstraintLike(int index,V1TopologySpreadConstraint item) { - return new V1PodSpecFluentImpl.TopologySpreadConstraintsNestedImpl(index, item); - } - public V1PodSpecFluentImpl.TopologySpreadConstraintsNested editTopologySpreadConstraint(int index) { - if (topologySpreadConstraints.size() <= index) throw new RuntimeException("Can't edit topologySpreadConstraints. Index exceeds size."); - return setNewTopologySpreadConstraintLike(index, buildTopologySpreadConstraint(index)); - } - public V1PodSpecFluentImpl.TopologySpreadConstraintsNested editFirstTopologySpreadConstraint() { - if (topologySpreadConstraints.size() == 0) throw new RuntimeException("Can't edit first topologySpreadConstraints. The list is empty."); - return setNewTopologySpreadConstraintLike(0, buildTopologySpreadConstraint(0)); - } - public V1PodSpecFluentImpl.TopologySpreadConstraintsNested editLastTopologySpreadConstraint() { - int index = topologySpreadConstraints.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last topologySpreadConstraints. The list is empty."); - return setNewTopologySpreadConstraintLike(index, buildTopologySpreadConstraint(index)); - } - public V1PodSpecFluentImpl.TopologySpreadConstraintsNested editMatchingTopologySpreadConstraint(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1VolumeBuilder builder = new V1VolumeBuilder(item); - if (index < 0 || index >= volumes.size()) { _visitables.get("volumes").add(builder); volumes.add(builder); } else { _visitables.get("volumes").add(index, builder); volumes.add(index, builder);} - return (A)this; - } - public A setToVolumes(int index,V1Volume item) { - if (this.volumes == null) {this.volumes = new ArrayList();} - V1VolumeBuilder builder = new V1VolumeBuilder(item); - if (index < 0 || index >= volumes.size()) { _visitables.get("volumes").add(builder); volumes.add(builder); } else { _visitables.get("volumes").set(index, builder); volumes.set(index, builder);} - return (A)this; - } - public A addToVolumes(io.kubernetes.client.openapi.models.V1Volume... items) { - if (this.volumes == null) {this.volumes = new ArrayList();} - for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").add(builder);this.volumes.add(builder);} return (A)this; - } - public A addAllToVolumes(Collection items) { - if (this.volumes == null) {this.volumes = new ArrayList();} - for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").add(builder);this.volumes.add(builder);} return (A)this; - } - public A removeFromVolumes(io.kubernetes.client.openapi.models.V1Volume... items) { - for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").remove(builder);if (this.volumes != null) {this.volumes.remove(builder);}} return (A)this; - } - public A removeAllFromVolumes(Collection items) { - for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").remove(builder);if (this.volumes != null) {this.volumes.remove(builder);}} return (A)this; - } - public A removeMatchingFromVolumes(Predicate predicate) { - if (volumes == null) return (A) this; - final Iterator each = volumes.iterator(); - final List visitables = _visitables.get("volumes"); - while (each.hasNext()) { - V1VolumeBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildVolumes instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumes() { - return volumes != null ? build(volumes) : null; - } - public List buildVolumes() { - return volumes != null ? build(volumes) : null; - } - public V1Volume buildVolume(int index) { - return this.volumes.get(index).build(); - } - public V1Volume buildFirstVolume() { - return this.volumes.get(0).build(); - } - public V1Volume buildLastVolume() { - return this.volumes.get(volumes.size() - 1).build(); - } - public V1Volume buildMatchingVolume(Predicate predicate) { - for (V1VolumeBuilder item: volumes) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingVolume(Predicate predicate) { - for (V1VolumeBuilder item: volumes) { if(predicate.test(item)){ return true;} } return false; - } - public A withVolumes(List volumes) { - if (this.volumes != null) { _visitables.get("volumes").clear();} - if (volumes != null) {this.volumes = new ArrayList(); for (V1Volume item : volumes){this.addToVolumes(item);}} else { this.volumes = null;} return (A) this; - } - public A withVolumes(io.kubernetes.client.openapi.models.V1Volume... volumes) { - if (this.volumes != null) {this.volumes.clear(); _visitables.remove("volumes"); } - if (volumes != null) {for (V1Volume item :volumes){ this.addToVolumes(item);}} return (A) this; - } - public Boolean hasVolumes() { - return volumes != null && !volumes.isEmpty(); - } - public V1PodSpecFluentImpl.VolumesNested addNewVolume() { - return new V1PodSpecFluentImpl.VolumesNestedImpl(); - } - public V1PodSpecFluentImpl.VolumesNested addNewVolumeLike(V1Volume item) { - return new V1PodSpecFluentImpl.VolumesNestedImpl(-1, item); - } - public V1PodSpecFluentImpl.VolumesNested setNewVolumeLike(int index,V1Volume item) { - return new V1PodSpecFluentImpl.VolumesNestedImpl(index, item); - } - public V1PodSpecFluentImpl.VolumesNested editVolume(int index) { - if (volumes.size() <= index) throw new RuntimeException("Can't edit volumes. Index exceeds size."); - return setNewVolumeLike(index, buildVolume(index)); - } - public V1PodSpecFluentImpl.VolumesNested editFirstVolume() { - if (volumes.size() == 0) throw new RuntimeException("Can't edit first volumes. The list is empty."); - return setNewVolumeLike(0, buildVolume(0)); - } - public V1PodSpecFluentImpl.VolumesNested editLastVolume() { - int index = volumes.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last volumes. The list is empty."); - return setNewVolumeLike(index, buildVolume(index)); - } - public V1PodSpecFluentImpl.VolumesNested editMatchingVolume(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1AffinityFluentImpl> implements V1PodSpecFluentImpl.AffinityNested,Nested{ - AffinityNestedImpl(V1Affinity item) { - this.builder = new V1AffinityBuilder(this, item); - } - AffinityNestedImpl() { - this.builder = new V1AffinityBuilder(this); - } - V1AffinityBuilder builder; - public N and() { - return (N) V1PodSpecFluentImpl.this.withAffinity(builder.build()); - } - public N endAffinity() { - return and(); - } - - } - class ContainersNestedImpl extends V1ContainerFluentImpl> implements V1PodSpecFluentImpl.ContainersNested,Nested{ - ContainersNestedImpl(int index,V1Container item) { - this.index = index; - this.builder = new V1ContainerBuilder(this, item); - } - ContainersNestedImpl() { - this.index = -1; - this.builder = new V1ContainerBuilder(this); - } - V1ContainerBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToContainers(index,builder.build()); - } - public N endContainer() { - return and(); - } - - } - class DnsConfigNestedImpl extends V1PodDNSConfigFluentImpl> implements V1PodSpecFluentImpl.DnsConfigNested,Nested{ - DnsConfigNestedImpl(V1PodDNSConfig item) { - this.builder = new V1PodDNSConfigBuilder(this, item); - } - DnsConfigNestedImpl() { - this.builder = new V1PodDNSConfigBuilder(this); - } - V1PodDNSConfigBuilder builder; - public N and() { - return (N) V1PodSpecFluentImpl.this.withDnsConfig(builder.build()); - } - public N endDnsConfig() { - return and(); - } - - } - class EphemeralContainersNestedImpl extends V1EphemeralContainerFluentImpl> implements V1PodSpecFluentImpl.EphemeralContainersNested,Nested{ - EphemeralContainersNestedImpl(int index,V1EphemeralContainer item) { - this.index = index; - this.builder = new V1EphemeralContainerBuilder(this, item); - } - EphemeralContainersNestedImpl() { - this.index = -1; - this.builder = new V1EphemeralContainerBuilder(this); - } - V1EphemeralContainerBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToEphemeralContainers(index,builder.build()); - } - public N endEphemeralContainer() { - return and(); - } - - } - class HostAliasesNestedImpl extends V1HostAliasFluentImpl> implements V1PodSpecFluentImpl.HostAliasesNested,Nested{ - HostAliasesNestedImpl(int index,V1HostAlias item) { - this.index = index; - this.builder = new V1HostAliasBuilder(this, item); - } - HostAliasesNestedImpl() { - this.index = -1; - this.builder = new V1HostAliasBuilder(this); - } - V1HostAliasBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToHostAliases(index,builder.build()); - } - public N endHostAlias() { - return and(); - } - - } - class ImagePullSecretsNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1PodSpecFluentImpl.ImagePullSecretsNested,Nested{ - ImagePullSecretsNestedImpl(int index,V1LocalObjectReference item) { - this.index = index; - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - ImagePullSecretsNestedImpl() { - this.index = -1; - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToImagePullSecrets(index,builder.build()); - } - public N endImagePullSecret() { - return and(); - } - - } - class InitContainersNestedImpl extends V1ContainerFluentImpl> implements V1PodSpecFluentImpl.InitContainersNested,Nested{ - InitContainersNestedImpl(int index,V1Container item) { - this.index = index; - this.builder = new V1ContainerBuilder(this, item); - } - InitContainersNestedImpl() { - this.index = -1; - this.builder = new V1ContainerBuilder(this); - } - V1ContainerBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToInitContainers(index,builder.build()); - } - public N endInitContainer() { - return and(); - } - - } - class OsNestedImpl extends V1PodOSFluentImpl> implements V1PodSpecFluentImpl.OsNested,Nested{ - OsNestedImpl(V1PodOS item) { - this.builder = new V1PodOSBuilder(this, item); - } - OsNestedImpl() { - this.builder = new V1PodOSBuilder(this); - } - V1PodOSBuilder builder; - public N and() { - return (N) V1PodSpecFluentImpl.this.withOs(builder.build()); - } - public N endOs() { - return and(); - } - - } - class ReadinessGatesNestedImpl extends V1PodReadinessGateFluentImpl> implements V1PodSpecFluentImpl.ReadinessGatesNested,Nested{ - ReadinessGatesNestedImpl(int index,V1PodReadinessGate item) { - this.index = index; - this.builder = new V1PodReadinessGateBuilder(this, item); - } - ReadinessGatesNestedImpl() { - this.index = -1; - this.builder = new V1PodReadinessGateBuilder(this); - } - V1PodReadinessGateBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToReadinessGates(index,builder.build()); - } - public N endReadinessGate() { - return and(); - } - - } - class ResourceClaimsNestedImpl extends V1PodResourceClaimFluentImpl> implements V1PodSpecFluentImpl.ResourceClaimsNested,Nested{ - ResourceClaimsNestedImpl(int index,V1PodResourceClaim item) { - this.index = index; - this.builder = new V1PodResourceClaimBuilder(this, item); - } - ResourceClaimsNestedImpl() { - this.index = -1; - this.builder = new V1PodResourceClaimBuilder(this); - } - V1PodResourceClaimBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToResourceClaims(index,builder.build()); - } - public N endResourceClaim() { - return and(); - } - - } - class SchedulingGatesNestedImpl extends V1PodSchedulingGateFluentImpl> implements V1PodSpecFluentImpl.SchedulingGatesNested,Nested{ - SchedulingGatesNestedImpl(int index,V1PodSchedulingGate item) { - this.index = index; - this.builder = new V1PodSchedulingGateBuilder(this, item); - } - SchedulingGatesNestedImpl() { - this.index = -1; - this.builder = new V1PodSchedulingGateBuilder(this); - } - V1PodSchedulingGateBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToSchedulingGates(index,builder.build()); - } - public N endSchedulingGate() { - return and(); - } - - } - class SecurityContextNestedImpl extends V1PodSecurityContextFluentImpl> implements V1PodSpecFluentImpl.SecurityContextNested,Nested{ - SecurityContextNestedImpl(V1PodSecurityContext item) { - this.builder = new V1PodSecurityContextBuilder(this, item); - } - SecurityContextNestedImpl() { - this.builder = new V1PodSecurityContextBuilder(this); - } - V1PodSecurityContextBuilder builder; - public N and() { - return (N) V1PodSpecFluentImpl.this.withSecurityContext(builder.build()); - } - public N endSecurityContext() { - return and(); - } - - } - class TolerationsNestedImpl extends V1TolerationFluentImpl> implements V1PodSpecFluentImpl.TolerationsNested,Nested{ - TolerationsNestedImpl(int index,V1Toleration item) { - this.index = index; - this.builder = new V1TolerationBuilder(this, item); - } - TolerationsNestedImpl() { - this.index = -1; - this.builder = new V1TolerationBuilder(this); - } - V1TolerationBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToTolerations(index,builder.build()); - } - public N endToleration() { - return and(); - } - - } - class TopologySpreadConstraintsNestedImpl extends V1TopologySpreadConstraintFluentImpl> implements V1PodSpecFluentImpl.TopologySpreadConstraintsNested,Nested{ - TopologySpreadConstraintsNestedImpl(int index,V1TopologySpreadConstraint item) { - this.index = index; - this.builder = new V1TopologySpreadConstraintBuilder(this, item); - } - TopologySpreadConstraintsNestedImpl() { - this.index = -1; - this.builder = new V1TopologySpreadConstraintBuilder(this); - } - V1TopologySpreadConstraintBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToTopologySpreadConstraints(index,builder.build()); - } - public N endTopologySpreadConstraint() { - return and(); - } - - } - class VolumesNestedImpl extends V1VolumeFluentImpl> implements V1PodSpecFluentImpl.VolumesNested,Nested{ - VolumesNestedImpl(int index,V1Volume item) { - this.index = index; - this.builder = new V1VolumeBuilder(this, item); - } - VolumesNestedImpl() { - this.index = -1; - this.builder = new V1VolumeBuilder(this); - } - V1VolumeBuilder builder; - int index; - public N and() { - return (N) V1PodSpecFluentImpl.this.setToVolumes(index,builder.build()); - } - public N endVolume() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusBuilder.java index ad4ba9c9ce..12113620c1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusBuilder.java @@ -1,85 +1,46 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodStatusBuilder extends V1PodStatusFluentImpl implements VisitableBuilder{ +public class V1PodStatusBuilder extends V1PodStatusFluent implements VisitableBuilder{ public V1PodStatusBuilder() { - this(false); - } - public V1PodStatusBuilder(Boolean validationEnabled) { - this(new V1PodStatus(), validationEnabled); + this(new V1PodStatus()); } + public V1PodStatusBuilder(V1PodStatusFluent fluent) { - this(fluent, false); - } - public V1PodStatusBuilder(V1PodStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodStatus(), validationEnabled); + this(fluent, new V1PodStatus()); } + public V1PodStatusBuilder(V1PodStatusFluent fluent,V1PodStatus instance) { - this(fluent, instance, false); - } - public V1PodStatusBuilder(V1PodStatusFluent fluent,V1PodStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - fluent.withContainerStatuses(instance.getContainerStatuses()); - fluent.withEphemeralContainerStatuses(instance.getEphemeralContainerStatuses()); - fluent.withHostIP(instance.getHostIP()); - fluent.withInitContainerStatuses(instance.getInitContainerStatuses()); - fluent.withMessage(instance.getMessage()); - fluent.withNominatedNodeName(instance.getNominatedNodeName()); - fluent.withPhase(instance.getPhase()); - fluent.withPodIP(instance.getPodIP()); - fluent.withPodIPs(instance.getPodIPs()); - fluent.withQosClass(instance.getQosClass()); - fluent.withReason(instance.getReason()); - fluent.withResize(instance.getResize()); - fluent.withStartTime(instance.getStartTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodStatusBuilder(V1PodStatus instance) { - this(instance,false); - } - public V1PodStatusBuilder(V1PodStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withContainerStatuses(instance.getContainerStatuses()); - this.withEphemeralContainerStatuses(instance.getEphemeralContainerStatuses()); - this.withHostIP(instance.getHostIP()); - this.withInitContainerStatuses(instance.getInitContainerStatuses()); - this.withMessage(instance.getMessage()); - this.withNominatedNodeName(instance.getNominatedNodeName()); - this.withPhase(instance.getPhase()); - this.withPodIP(instance.getPodIP()); - this.withPodIPs(instance.getPodIPs()); - this.withQosClass(instance.getQosClass()); - this.withReason(instance.getReason()); - this.withResize(instance.getResize()); - this.withStartTime(instance.getStartTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodStatusFluent fluent; - Boolean validationEnabled; + public V1PodStatus build() { V1PodStatus buildable = new V1PodStatus(); - buildable.setConditions(fluent.getConditions()); - buildable.setContainerStatuses(fluent.getContainerStatuses()); - buildable.setEphemeralContainerStatuses(fluent.getEphemeralContainerStatuses()); + buildable.setConditions(fluent.buildConditions()); + buildable.setContainerStatuses(fluent.buildContainerStatuses()); + buildable.setEphemeralContainerStatuses(fluent.buildEphemeralContainerStatuses()); buildable.setHostIP(fluent.getHostIP()); - buildable.setInitContainerStatuses(fluent.getInitContainerStatuses()); + buildable.setHostIPs(fluent.buildHostIPs()); + buildable.setInitContainerStatuses(fluent.buildInitContainerStatuses()); buildable.setMessage(fluent.getMessage()); buildable.setNominatedNodeName(fluent.getNominatedNodeName()); buildable.setPhase(fluent.getPhase()); buildable.setPodIP(fluent.getPodIP()); - buildable.setPodIPs(fluent.getPodIPs()); + buildable.setPodIPs(fluent.buildPodIPs()); buildable.setQosClass(fluent.getQosClass()); buildable.setReason(fluent.getReason()); buildable.setResize(fluent.getResize()); + buildable.setResourceClaimStatuses(fluent.buildResourceClaimStatuses()); buildable.setStartTime(fluent.getStartTime()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusFluent.java index 17fb8183ac..b8912167a6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusFluent.java @@ -1,224 +1,1417 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.List; -import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.time.OffsetDateTime; import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1PodStatusFluent> extends Fluent{ - public A addToConditions(int index,V1PodCondition item); - public A setToConditions(int index,V1PodCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1PodCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1PodCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1PodCondition buildCondition(int index); - public V1PodCondition buildFirstCondition(); - public V1PodCondition buildLastCondition(); - public V1PodCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1PodCondition... conditions); - public Boolean hasConditions(); - public V1PodStatusFluent.ConditionsNested addNewCondition(); - public V1PodStatusFluent.ConditionsNested addNewConditionLike(V1PodCondition item); - public V1PodStatusFluent.ConditionsNested setNewConditionLike(int index,V1PodCondition item); - public V1PodStatusFluent.ConditionsNested editCondition(int index); - public V1PodStatusFluent.ConditionsNested editFirstCondition(); - public V1PodStatusFluent.ConditionsNested editLastCondition(); - public V1PodStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public A addToContainerStatuses(int index,V1ContainerStatus item); - public A setToContainerStatuses(int index,V1ContainerStatus item); - public A addToContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items); - public A addAllToContainerStatuses(Collection items); - public A removeFromContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items); - public A removeAllFromContainerStatuses(Collection items); - public A removeMatchingFromContainerStatuses(Predicate predicate); - - /** - * This method has been deprecated, please use method buildContainerStatuses instead. - * @return The buildable object. - */ - @Deprecated - public List getContainerStatuses(); - public List buildContainerStatuses(); - public V1ContainerStatus buildContainerStatus(int index); - public V1ContainerStatus buildFirstContainerStatus(); - public V1ContainerStatus buildLastContainerStatus(); - public V1ContainerStatus buildMatchingContainerStatus(Predicate predicate); - public Boolean hasMatchingContainerStatus(Predicate predicate); - public A withContainerStatuses(List containerStatuses); - public A withContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... containerStatuses); - public Boolean hasContainerStatuses(); - public V1PodStatusFluent.ContainerStatusesNested addNewContainerStatus(); - public V1PodStatusFluent.ContainerStatusesNested addNewContainerStatusLike(V1ContainerStatus item); - public V1PodStatusFluent.ContainerStatusesNested setNewContainerStatusLike(int index,V1ContainerStatus item); - public V1PodStatusFluent.ContainerStatusesNested editContainerStatus(int index); - public V1PodStatusFluent.ContainerStatusesNested editFirstContainerStatus(); - public V1PodStatusFluent.ContainerStatusesNested editLastContainerStatus(); - public V1PodStatusFluent.ContainerStatusesNested editMatchingContainerStatus(Predicate predicate); - public A addToEphemeralContainerStatuses(int index,V1ContainerStatus item); - public A setToEphemeralContainerStatuses(int index,V1ContainerStatus item); - public A addToEphemeralContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items); - public A addAllToEphemeralContainerStatuses(Collection items); - public A removeFromEphemeralContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items); - public A removeAllFromEphemeralContainerStatuses(Collection items); - public A removeMatchingFromEphemeralContainerStatuses(Predicate predicate); - - /** - * This method has been deprecated, please use method buildEphemeralContainerStatuses instead. - * @return The buildable object. - */ - @Deprecated - public List getEphemeralContainerStatuses(); - public List buildEphemeralContainerStatuses(); - public V1ContainerStatus buildEphemeralContainerStatus(int index); - public V1ContainerStatus buildFirstEphemeralContainerStatus(); - public V1ContainerStatus buildLastEphemeralContainerStatus(); - public V1ContainerStatus buildMatchingEphemeralContainerStatus(Predicate predicate); - public Boolean hasMatchingEphemeralContainerStatus(Predicate predicate); - public A withEphemeralContainerStatuses(List ephemeralContainerStatuses); - public A withEphemeralContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... ephemeralContainerStatuses); - public Boolean hasEphemeralContainerStatuses(); - public V1PodStatusFluent.EphemeralContainerStatusesNested addNewEphemeralContainerStatus(); - public V1PodStatusFluent.EphemeralContainerStatusesNested addNewEphemeralContainerStatusLike(V1ContainerStatus item); - public V1PodStatusFluent.EphemeralContainerStatusesNested setNewEphemeralContainerStatusLike(int index,V1ContainerStatus item); - public V1PodStatusFluent.EphemeralContainerStatusesNested editEphemeralContainerStatus(int index); - public V1PodStatusFluent.EphemeralContainerStatusesNested editFirstEphemeralContainerStatus(); - public V1PodStatusFluent.EphemeralContainerStatusesNested editLastEphemeralContainerStatus(); - public V1PodStatusFluent.EphemeralContainerStatusesNested editMatchingEphemeralContainerStatus(Predicate predicate); - public String getHostIP(); - public A withHostIP(String hostIP); - public Boolean hasHostIP(); - public A addToInitContainerStatuses(int index,V1ContainerStatus item); - public A setToInitContainerStatuses(int index,V1ContainerStatus item); - public A addToInitContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items); - public A addAllToInitContainerStatuses(Collection items); - public A removeFromInitContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items); - public A removeAllFromInitContainerStatuses(Collection items); - public A removeMatchingFromInitContainerStatuses(Predicate predicate); - - /** - * This method has been deprecated, please use method buildInitContainerStatuses instead. - * @return The buildable object. - */ - @Deprecated - public List getInitContainerStatuses(); - public List buildInitContainerStatuses(); - public V1ContainerStatus buildInitContainerStatus(int index); - public V1ContainerStatus buildFirstInitContainerStatus(); - public V1ContainerStatus buildLastInitContainerStatus(); - public V1ContainerStatus buildMatchingInitContainerStatus(Predicate predicate); - public Boolean hasMatchingInitContainerStatus(Predicate predicate); - public A withInitContainerStatuses(List initContainerStatuses); - public A withInitContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... initContainerStatuses); - public Boolean hasInitContainerStatuses(); - public V1PodStatusFluent.InitContainerStatusesNested addNewInitContainerStatus(); - public V1PodStatusFluent.InitContainerStatusesNested addNewInitContainerStatusLike(V1ContainerStatus item); - public V1PodStatusFluent.InitContainerStatusesNested setNewInitContainerStatusLike(int index,V1ContainerStatus item); - public V1PodStatusFluent.InitContainerStatusesNested editInitContainerStatus(int index); - public V1PodStatusFluent.InitContainerStatusesNested editFirstInitContainerStatus(); - public V1PodStatusFluent.InitContainerStatusesNested editLastInitContainerStatus(); - public V1PodStatusFluent.InitContainerStatusesNested editMatchingInitContainerStatus(Predicate predicate); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getNominatedNodeName(); - public A withNominatedNodeName(String nominatedNodeName); - public Boolean hasNominatedNodeName(); - public String getPhase(); - public A withPhase(String phase); - public Boolean hasPhase(); - public String getPodIP(); - public A withPodIP(String podIP); - public Boolean hasPodIP(); - public A addToPodIPs(int index,V1PodIP item); - public A setToPodIPs(int index,V1PodIP item); - public A addToPodIPs(io.kubernetes.client.openapi.models.V1PodIP... items); - public A addAllToPodIPs(Collection items); - public A removeFromPodIPs(io.kubernetes.client.openapi.models.V1PodIP... items); - public A removeAllFromPodIPs(Collection items); - public A removeMatchingFromPodIPs(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPodIPs instead. - * @return The buildable object. - */ - @Deprecated - public List getPodIPs(); - public List buildPodIPs(); - public V1PodIP buildPodIP(int index); - public V1PodIP buildFirstPodIP(); - public V1PodIP buildLastPodIP(); - public V1PodIP buildMatchingPodIP(Predicate predicate); - public Boolean hasMatchingPodIP(Predicate predicate); - public A withPodIPs(List podIPs); - public A withPodIPs(io.kubernetes.client.openapi.models.V1PodIP... podIPs); - public Boolean hasPodIPs(); - public V1PodStatusFluent.PodIPsNested addNewPodIP(); - public V1PodStatusFluent.PodIPsNested addNewPodIPLike(V1PodIP item); - public V1PodStatusFluent.PodIPsNested setNewPodIPLike(int index,V1PodIP item); - public V1PodStatusFluent.PodIPsNested editPodIP(int index); - public V1PodStatusFluent.PodIPsNested editFirstPodIP(); - public V1PodStatusFluent.PodIPsNested editLastPodIP(); - public V1PodStatusFluent.PodIPsNested editMatchingPodIP(Predicate predicate); - public String getQosClass(); - public A withQosClass(String qosClass); - public Boolean hasQosClass(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getResize(); - public A withResize(String resize); - public Boolean hasResize(); - public OffsetDateTime getStartTime(); - public A withStartTime(OffsetDateTime startTime); - public Boolean hasStartTime(); - public interface ConditionsNested extends Nested,V1PodConditionFluent>{ - public N and(); - public N endCondition(); - - } - public interface ContainerStatusesNested extends Nested,V1ContainerStatusFluent>{ - public N and(); - public N endContainerStatus(); - - } - public interface EphemeralContainerStatusesNested extends Nested,V1ContainerStatusFluent>{ - public N and(); - public N endEphemeralContainerStatus(); - - } - public interface InitContainerStatusesNested extends Nested,V1ContainerStatusFluent>{ - public N and(); - public N endInitContainerStatus(); - - } - public interface PodIPsNested extends Nested,V1PodIPFluent>{ - public N and(); - public N endPodIP(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodStatusFluent> extends BaseFluent{ + public V1PodStatusFluent() { + } + + public V1PodStatusFluent(V1PodStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + private ArrayList containerStatuses; + private ArrayList ephemeralContainerStatuses; + private String hostIP; + private ArrayList hostIPs; + private ArrayList initContainerStatuses; + private String message; + private String nominatedNodeName; + private String phase; + private String podIP; + private ArrayList podIPs; + private String qosClass; + private String reason; + private String resize; + private ArrayList resourceClaimStatuses; + private OffsetDateTime startTime; + + protected void copyInstance(V1PodStatus instance) { + instance = (instance != null ? instance : new V1PodStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + this.withContainerStatuses(instance.getContainerStatuses()); + this.withEphemeralContainerStatuses(instance.getEphemeralContainerStatuses()); + this.withHostIP(instance.getHostIP()); + this.withHostIPs(instance.getHostIPs()); + this.withInitContainerStatuses(instance.getInitContainerStatuses()); + this.withMessage(instance.getMessage()); + this.withNominatedNodeName(instance.getNominatedNodeName()); + this.withPhase(instance.getPhase()); + this.withPodIP(instance.getPodIP()); + this.withPodIPs(instance.getPodIPs()); + this.withQosClass(instance.getQosClass()); + this.withReason(instance.getReason()); + this.withResize(instance.getResize()); + this.withResourceClaimStatuses(instance.getResourceClaimStatuses()); + this.withStartTime(instance.getStartTime()); + } + } + + public A addToConditions(int index,V1PodCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1PodConditionBuilder builder = new V1PodConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1PodCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1PodConditionBuilder builder = new V1PodConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1PodCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1PodCondition item : items) {V1PodConditionBuilder builder = new V1PodConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1PodCondition item : items) {V1PodConditionBuilder builder = new V1PodConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1PodCondition... items) { + if (this.conditions == null) return (A)this; + for (V1PodCondition item : items) {V1PodConditionBuilder builder = new V1PodConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1PodCondition item : items) {V1PodConditionBuilder builder = new V1PodConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1PodConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1PodCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1PodCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1PodCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1PodCondition buildMatchingCondition(Predicate predicate) { + for (V1PodConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1PodConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1PodCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1PodCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1PodCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1PodCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1PodCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); + if (index < 0 || index >= containerStatuses.size()) { _visitables.get("containerStatuses").add(builder); containerStatuses.add(builder); } else { _visitables.get("containerStatuses").add(index, builder); containerStatuses.add(index, builder);} + return (A)this; + } + + public A setToContainerStatuses(int index,V1ContainerStatus item) { + if (this.containerStatuses == null) {this.containerStatuses = new ArrayList();} + V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); + if (index < 0 || index >= containerStatuses.size()) { _visitables.get("containerStatuses").add(builder); containerStatuses.add(builder); } else { _visitables.get("containerStatuses").set(index, builder); containerStatuses.set(index, builder);} + return (A)this; + } + + public A addToContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { + if (this.containerStatuses == null) {this.containerStatuses = new ArrayList();} + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("containerStatuses").add(builder);this.containerStatuses.add(builder);} return (A)this; + } + + public A addAllToContainerStatuses(Collection items) { + if (this.containerStatuses == null) {this.containerStatuses = new ArrayList();} + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("containerStatuses").add(builder);this.containerStatuses.add(builder);} return (A)this; + } + + public A removeFromContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { + if (this.containerStatuses == null) return (A)this; + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("containerStatuses").remove(builder); this.containerStatuses.remove(builder);} return (A)this; + } + + public A removeAllFromContainerStatuses(Collection items) { + if (this.containerStatuses == null) return (A)this; + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("containerStatuses").remove(builder); this.containerStatuses.remove(builder);} return (A)this; + } + + public A removeMatchingFromContainerStatuses(Predicate predicate) { + if (containerStatuses == null) return (A) this; + final Iterator each = containerStatuses.iterator(); + final List visitables = _visitables.get("containerStatuses"); + while (each.hasNext()) { + V1ContainerStatusBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildContainerStatuses() { + return this.containerStatuses != null ? build(containerStatuses) : null; + } + + public V1ContainerStatus buildContainerStatus(int index) { + return this.containerStatuses.get(index).build(); + } + + public V1ContainerStatus buildFirstContainerStatus() { + return this.containerStatuses.get(0).build(); + } + + public V1ContainerStatus buildLastContainerStatus() { + return this.containerStatuses.get(containerStatuses.size() - 1).build(); + } + + public V1ContainerStatus buildMatchingContainerStatus(Predicate predicate) { + for (V1ContainerStatusBuilder item : containerStatuses) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingContainerStatus(Predicate predicate) { + for (V1ContainerStatusBuilder item : containerStatuses) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withContainerStatuses(List containerStatuses) { + if (this.containerStatuses != null) { + this._visitables.get("containerStatuses").clear(); + } + if (containerStatuses != null) { + this.containerStatuses = new ArrayList(); + for (V1ContainerStatus item : containerStatuses) { + this.addToContainerStatuses(item); + } + } else { + this.containerStatuses = null; + } + return (A) this; + } + + public A withContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... containerStatuses) { + if (this.containerStatuses != null) { + this.containerStatuses.clear(); + _visitables.remove("containerStatuses"); + } + if (containerStatuses != null) { + for (V1ContainerStatus item : containerStatuses) { + this.addToContainerStatuses(item); + } + } + return (A) this; + } + + public boolean hasContainerStatuses() { + return this.containerStatuses != null && !this.containerStatuses.isEmpty(); + } + + public ContainerStatusesNested addNewContainerStatus() { + return new ContainerStatusesNested(-1, null); + } + + public ContainerStatusesNested addNewContainerStatusLike(V1ContainerStatus item) { + return new ContainerStatusesNested(-1, item); + } + + public ContainerStatusesNested setNewContainerStatusLike(int index,V1ContainerStatus item) { + return new ContainerStatusesNested(index, item); + } + + public ContainerStatusesNested editContainerStatus(int index) { + if (containerStatuses.size() <= index) throw new RuntimeException("Can't edit containerStatuses. Index exceeds size."); + return setNewContainerStatusLike(index, buildContainerStatus(index)); + } + + public ContainerStatusesNested editFirstContainerStatus() { + if (containerStatuses.size() == 0) throw new RuntimeException("Can't edit first containerStatuses. The list is empty."); + return setNewContainerStatusLike(0, buildContainerStatus(0)); + } + + public ContainerStatusesNested editLastContainerStatus() { + int index = containerStatuses.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last containerStatuses. The list is empty."); + return setNewContainerStatusLike(index, buildContainerStatus(index)); + } + + public ContainerStatusesNested editMatchingContainerStatus(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); + if (index < 0 || index >= ephemeralContainerStatuses.size()) { _visitables.get("ephemeralContainerStatuses").add(builder); ephemeralContainerStatuses.add(builder); } else { _visitables.get("ephemeralContainerStatuses").add(index, builder); ephemeralContainerStatuses.add(index, builder);} + return (A)this; + } + + public A setToEphemeralContainerStatuses(int index,V1ContainerStatus item) { + if (this.ephemeralContainerStatuses == null) {this.ephemeralContainerStatuses = new ArrayList();} + V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); + if (index < 0 || index >= ephemeralContainerStatuses.size()) { _visitables.get("ephemeralContainerStatuses").add(builder); ephemeralContainerStatuses.add(builder); } else { _visitables.get("ephemeralContainerStatuses").set(index, builder); ephemeralContainerStatuses.set(index, builder);} + return (A)this; + } + + public A addToEphemeralContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { + if (this.ephemeralContainerStatuses == null) {this.ephemeralContainerStatuses = new ArrayList();} + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("ephemeralContainerStatuses").add(builder);this.ephemeralContainerStatuses.add(builder);} return (A)this; + } + + public A addAllToEphemeralContainerStatuses(Collection items) { + if (this.ephemeralContainerStatuses == null) {this.ephemeralContainerStatuses = new ArrayList();} + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("ephemeralContainerStatuses").add(builder);this.ephemeralContainerStatuses.add(builder);} return (A)this; + } + + public A removeFromEphemeralContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { + if (this.ephemeralContainerStatuses == null) return (A)this; + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("ephemeralContainerStatuses").remove(builder); this.ephemeralContainerStatuses.remove(builder);} return (A)this; + } + + public A removeAllFromEphemeralContainerStatuses(Collection items) { + if (this.ephemeralContainerStatuses == null) return (A)this; + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("ephemeralContainerStatuses").remove(builder); this.ephemeralContainerStatuses.remove(builder);} return (A)this; + } + + public A removeMatchingFromEphemeralContainerStatuses(Predicate predicate) { + if (ephemeralContainerStatuses == null) return (A) this; + final Iterator each = ephemeralContainerStatuses.iterator(); + final List visitables = _visitables.get("ephemeralContainerStatuses"); + while (each.hasNext()) { + V1ContainerStatusBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildEphemeralContainerStatuses() { + return this.ephemeralContainerStatuses != null ? build(ephemeralContainerStatuses) : null; + } + + public V1ContainerStatus buildEphemeralContainerStatus(int index) { + return this.ephemeralContainerStatuses.get(index).build(); + } + + public V1ContainerStatus buildFirstEphemeralContainerStatus() { + return this.ephemeralContainerStatuses.get(0).build(); + } + + public V1ContainerStatus buildLastEphemeralContainerStatus() { + return this.ephemeralContainerStatuses.get(ephemeralContainerStatuses.size() - 1).build(); + } + + public V1ContainerStatus buildMatchingEphemeralContainerStatus(Predicate predicate) { + for (V1ContainerStatusBuilder item : ephemeralContainerStatuses) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingEphemeralContainerStatus(Predicate predicate) { + for (V1ContainerStatusBuilder item : ephemeralContainerStatuses) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withEphemeralContainerStatuses(List ephemeralContainerStatuses) { + if (this.ephemeralContainerStatuses != null) { + this._visitables.get("ephemeralContainerStatuses").clear(); + } + if (ephemeralContainerStatuses != null) { + this.ephemeralContainerStatuses = new ArrayList(); + for (V1ContainerStatus item : ephemeralContainerStatuses) { + this.addToEphemeralContainerStatuses(item); + } + } else { + this.ephemeralContainerStatuses = null; + } + return (A) this; + } + + public A withEphemeralContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... ephemeralContainerStatuses) { + if (this.ephemeralContainerStatuses != null) { + this.ephemeralContainerStatuses.clear(); + _visitables.remove("ephemeralContainerStatuses"); + } + if (ephemeralContainerStatuses != null) { + for (V1ContainerStatus item : ephemeralContainerStatuses) { + this.addToEphemeralContainerStatuses(item); + } + } + return (A) this; + } + + public boolean hasEphemeralContainerStatuses() { + return this.ephemeralContainerStatuses != null && !this.ephemeralContainerStatuses.isEmpty(); + } + + public EphemeralContainerStatusesNested addNewEphemeralContainerStatus() { + return new EphemeralContainerStatusesNested(-1, null); + } + + public EphemeralContainerStatusesNested addNewEphemeralContainerStatusLike(V1ContainerStatus item) { + return new EphemeralContainerStatusesNested(-1, item); + } + + public EphemeralContainerStatusesNested setNewEphemeralContainerStatusLike(int index,V1ContainerStatus item) { + return new EphemeralContainerStatusesNested(index, item); + } + + public EphemeralContainerStatusesNested editEphemeralContainerStatus(int index) { + if (ephemeralContainerStatuses.size() <= index) throw new RuntimeException("Can't edit ephemeralContainerStatuses. Index exceeds size."); + return setNewEphemeralContainerStatusLike(index, buildEphemeralContainerStatus(index)); + } + + public EphemeralContainerStatusesNested editFirstEphemeralContainerStatus() { + if (ephemeralContainerStatuses.size() == 0) throw new RuntimeException("Can't edit first ephemeralContainerStatuses. The list is empty."); + return setNewEphemeralContainerStatusLike(0, buildEphemeralContainerStatus(0)); + } + + public EphemeralContainerStatusesNested editLastEphemeralContainerStatus() { + int index = ephemeralContainerStatuses.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ephemeralContainerStatuses. The list is empty."); + return setNewEphemeralContainerStatusLike(index, buildEphemeralContainerStatus(index)); + } + + public EphemeralContainerStatusesNested editMatchingEphemeralContainerStatus(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1HostIPBuilder builder = new V1HostIPBuilder(item); + if (index < 0 || index >= hostIPs.size()) { _visitables.get("hostIPs").add(builder); hostIPs.add(builder); } else { _visitables.get("hostIPs").add(index, builder); hostIPs.add(index, builder);} + return (A)this; + } + + public A setToHostIPs(int index,V1HostIP item) { + if (this.hostIPs == null) {this.hostIPs = new ArrayList();} + V1HostIPBuilder builder = new V1HostIPBuilder(item); + if (index < 0 || index >= hostIPs.size()) { _visitables.get("hostIPs").add(builder); hostIPs.add(builder); } else { _visitables.get("hostIPs").set(index, builder); hostIPs.set(index, builder);} + return (A)this; + } + + public A addToHostIPs(io.kubernetes.client.openapi.models.V1HostIP... items) { + if (this.hostIPs == null) {this.hostIPs = new ArrayList();} + for (V1HostIP item : items) {V1HostIPBuilder builder = new V1HostIPBuilder(item);_visitables.get("hostIPs").add(builder);this.hostIPs.add(builder);} return (A)this; + } + + public A addAllToHostIPs(Collection items) { + if (this.hostIPs == null) {this.hostIPs = new ArrayList();} + for (V1HostIP item : items) {V1HostIPBuilder builder = new V1HostIPBuilder(item);_visitables.get("hostIPs").add(builder);this.hostIPs.add(builder);} return (A)this; + } + + public A removeFromHostIPs(io.kubernetes.client.openapi.models.V1HostIP... items) { + if (this.hostIPs == null) return (A)this; + for (V1HostIP item : items) {V1HostIPBuilder builder = new V1HostIPBuilder(item);_visitables.get("hostIPs").remove(builder); this.hostIPs.remove(builder);} return (A)this; + } + + public A removeAllFromHostIPs(Collection items) { + if (this.hostIPs == null) return (A)this; + for (V1HostIP item : items) {V1HostIPBuilder builder = new V1HostIPBuilder(item);_visitables.get("hostIPs").remove(builder); this.hostIPs.remove(builder);} return (A)this; + } + + public A removeMatchingFromHostIPs(Predicate predicate) { + if (hostIPs == null) return (A) this; + final Iterator each = hostIPs.iterator(); + final List visitables = _visitables.get("hostIPs"); + while (each.hasNext()) { + V1HostIPBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildHostIPs() { + return this.hostIPs != null ? build(hostIPs) : null; + } + + public V1HostIP buildHostIP(int index) { + return this.hostIPs.get(index).build(); + } + + public V1HostIP buildFirstHostIP() { + return this.hostIPs.get(0).build(); + } + + public V1HostIP buildLastHostIP() { + return this.hostIPs.get(hostIPs.size() - 1).build(); + } + + public V1HostIP buildMatchingHostIP(Predicate predicate) { + for (V1HostIPBuilder item : hostIPs) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingHostIP(Predicate predicate) { + for (V1HostIPBuilder item : hostIPs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withHostIPs(List hostIPs) { + if (this.hostIPs != null) { + this._visitables.get("hostIPs").clear(); + } + if (hostIPs != null) { + this.hostIPs = new ArrayList(); + for (V1HostIP item : hostIPs) { + this.addToHostIPs(item); + } + } else { + this.hostIPs = null; + } + return (A) this; + } + + public A withHostIPs(io.kubernetes.client.openapi.models.V1HostIP... hostIPs) { + if (this.hostIPs != null) { + this.hostIPs.clear(); + _visitables.remove("hostIPs"); + } + if (hostIPs != null) { + for (V1HostIP item : hostIPs) { + this.addToHostIPs(item); + } + } + return (A) this; + } + + public boolean hasHostIPs() { + return this.hostIPs != null && !this.hostIPs.isEmpty(); + } + + public HostIPsNested addNewHostIP() { + return new HostIPsNested(-1, null); + } + + public HostIPsNested addNewHostIPLike(V1HostIP item) { + return new HostIPsNested(-1, item); + } + + public HostIPsNested setNewHostIPLike(int index,V1HostIP item) { + return new HostIPsNested(index, item); + } + + public HostIPsNested editHostIP(int index) { + if (hostIPs.size() <= index) throw new RuntimeException("Can't edit hostIPs. Index exceeds size."); + return setNewHostIPLike(index, buildHostIP(index)); + } + + public HostIPsNested editFirstHostIP() { + if (hostIPs.size() == 0) throw new RuntimeException("Can't edit first hostIPs. The list is empty."); + return setNewHostIPLike(0, buildHostIP(0)); + } + + public HostIPsNested editLastHostIP() { + int index = hostIPs.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last hostIPs. The list is empty."); + return setNewHostIPLike(index, buildHostIP(index)); + } + + public HostIPsNested editMatchingHostIP(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); + if (index < 0 || index >= initContainerStatuses.size()) { _visitables.get("initContainerStatuses").add(builder); initContainerStatuses.add(builder); } else { _visitables.get("initContainerStatuses").add(index, builder); initContainerStatuses.add(index, builder);} + return (A)this; + } + + public A setToInitContainerStatuses(int index,V1ContainerStatus item) { + if (this.initContainerStatuses == null) {this.initContainerStatuses = new ArrayList();} + V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); + if (index < 0 || index >= initContainerStatuses.size()) { _visitables.get("initContainerStatuses").add(builder); initContainerStatuses.add(builder); } else { _visitables.get("initContainerStatuses").set(index, builder); initContainerStatuses.set(index, builder);} + return (A)this; + } + + public A addToInitContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { + if (this.initContainerStatuses == null) {this.initContainerStatuses = new ArrayList();} + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("initContainerStatuses").add(builder);this.initContainerStatuses.add(builder);} return (A)this; + } + + public A addAllToInitContainerStatuses(Collection items) { + if (this.initContainerStatuses == null) {this.initContainerStatuses = new ArrayList();} + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("initContainerStatuses").add(builder);this.initContainerStatuses.add(builder);} return (A)this; + } + + public A removeFromInitContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { + if (this.initContainerStatuses == null) return (A)this; + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("initContainerStatuses").remove(builder); this.initContainerStatuses.remove(builder);} return (A)this; + } + + public A removeAllFromInitContainerStatuses(Collection items) { + if (this.initContainerStatuses == null) return (A)this; + for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("initContainerStatuses").remove(builder); this.initContainerStatuses.remove(builder);} return (A)this; + } + + public A removeMatchingFromInitContainerStatuses(Predicate predicate) { + if (initContainerStatuses == null) return (A) this; + final Iterator each = initContainerStatuses.iterator(); + final List visitables = _visitables.get("initContainerStatuses"); + while (each.hasNext()) { + V1ContainerStatusBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildInitContainerStatuses() { + return this.initContainerStatuses != null ? build(initContainerStatuses) : null; + } + + public V1ContainerStatus buildInitContainerStatus(int index) { + return this.initContainerStatuses.get(index).build(); + } + + public V1ContainerStatus buildFirstInitContainerStatus() { + return this.initContainerStatuses.get(0).build(); + } + + public V1ContainerStatus buildLastInitContainerStatus() { + return this.initContainerStatuses.get(initContainerStatuses.size() - 1).build(); + } + + public V1ContainerStatus buildMatchingInitContainerStatus(Predicate predicate) { + for (V1ContainerStatusBuilder item : initContainerStatuses) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingInitContainerStatus(Predicate predicate) { + for (V1ContainerStatusBuilder item : initContainerStatuses) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withInitContainerStatuses(List initContainerStatuses) { + if (this.initContainerStatuses != null) { + this._visitables.get("initContainerStatuses").clear(); + } + if (initContainerStatuses != null) { + this.initContainerStatuses = new ArrayList(); + for (V1ContainerStatus item : initContainerStatuses) { + this.addToInitContainerStatuses(item); + } + } else { + this.initContainerStatuses = null; + } + return (A) this; + } + + public A withInitContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... initContainerStatuses) { + if (this.initContainerStatuses != null) { + this.initContainerStatuses.clear(); + _visitables.remove("initContainerStatuses"); + } + if (initContainerStatuses != null) { + for (V1ContainerStatus item : initContainerStatuses) { + this.addToInitContainerStatuses(item); + } + } + return (A) this; + } + + public boolean hasInitContainerStatuses() { + return this.initContainerStatuses != null && !this.initContainerStatuses.isEmpty(); + } + + public InitContainerStatusesNested addNewInitContainerStatus() { + return new InitContainerStatusesNested(-1, null); + } + + public InitContainerStatusesNested addNewInitContainerStatusLike(V1ContainerStatus item) { + return new InitContainerStatusesNested(-1, item); + } + + public InitContainerStatusesNested setNewInitContainerStatusLike(int index,V1ContainerStatus item) { + return new InitContainerStatusesNested(index, item); + } + + public InitContainerStatusesNested editInitContainerStatus(int index) { + if (initContainerStatuses.size() <= index) throw new RuntimeException("Can't edit initContainerStatuses. Index exceeds size."); + return setNewInitContainerStatusLike(index, buildInitContainerStatus(index)); + } + + public InitContainerStatusesNested editFirstInitContainerStatus() { + if (initContainerStatuses.size() == 0) throw new RuntimeException("Can't edit first initContainerStatuses. The list is empty."); + return setNewInitContainerStatusLike(0, buildInitContainerStatus(0)); + } + + public InitContainerStatusesNested editLastInitContainerStatus() { + int index = initContainerStatuses.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last initContainerStatuses. The list is empty."); + return setNewInitContainerStatusLike(index, buildInitContainerStatus(index)); + } + + public InitContainerStatusesNested editMatchingInitContainerStatus(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1PodIPBuilder builder = new V1PodIPBuilder(item); + if (index < 0 || index >= podIPs.size()) { _visitables.get("podIPs").add(builder); podIPs.add(builder); } else { _visitables.get("podIPs").add(index, builder); podIPs.add(index, builder);} + return (A)this; + } + + public A setToPodIPs(int index,V1PodIP item) { + if (this.podIPs == null) {this.podIPs = new ArrayList();} + V1PodIPBuilder builder = new V1PodIPBuilder(item); + if (index < 0 || index >= podIPs.size()) { _visitables.get("podIPs").add(builder); podIPs.add(builder); } else { _visitables.get("podIPs").set(index, builder); podIPs.set(index, builder);} + return (A)this; + } + + public A addToPodIPs(io.kubernetes.client.openapi.models.V1PodIP... items) { + if (this.podIPs == null) {this.podIPs = new ArrayList();} + for (V1PodIP item : items) {V1PodIPBuilder builder = new V1PodIPBuilder(item);_visitables.get("podIPs").add(builder);this.podIPs.add(builder);} return (A)this; + } + + public A addAllToPodIPs(Collection items) { + if (this.podIPs == null) {this.podIPs = new ArrayList();} + for (V1PodIP item : items) {V1PodIPBuilder builder = new V1PodIPBuilder(item);_visitables.get("podIPs").add(builder);this.podIPs.add(builder);} return (A)this; + } + + public A removeFromPodIPs(io.kubernetes.client.openapi.models.V1PodIP... items) { + if (this.podIPs == null) return (A)this; + for (V1PodIP item : items) {V1PodIPBuilder builder = new V1PodIPBuilder(item);_visitables.get("podIPs").remove(builder); this.podIPs.remove(builder);} return (A)this; + } + + public A removeAllFromPodIPs(Collection items) { + if (this.podIPs == null) return (A)this; + for (V1PodIP item : items) {V1PodIPBuilder builder = new V1PodIPBuilder(item);_visitables.get("podIPs").remove(builder); this.podIPs.remove(builder);} return (A)this; + } + + public A removeMatchingFromPodIPs(Predicate predicate) { + if (podIPs == null) return (A) this; + final Iterator each = podIPs.iterator(); + final List visitables = _visitables.get("podIPs"); + while (each.hasNext()) { + V1PodIPBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPodIPs() { + return this.podIPs != null ? build(podIPs) : null; + } + + public V1PodIP buildPodIP(int index) { + return this.podIPs.get(index).build(); + } + + public V1PodIP buildFirstPodIP() { + return this.podIPs.get(0).build(); + } + + public V1PodIP buildLastPodIP() { + return this.podIPs.get(podIPs.size() - 1).build(); + } + + public V1PodIP buildMatchingPodIP(Predicate predicate) { + for (V1PodIPBuilder item : podIPs) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPodIP(Predicate predicate) { + for (V1PodIPBuilder item : podIPs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPodIPs(List podIPs) { + if (this.podIPs != null) { + this._visitables.get("podIPs").clear(); + } + if (podIPs != null) { + this.podIPs = new ArrayList(); + for (V1PodIP item : podIPs) { + this.addToPodIPs(item); + } + } else { + this.podIPs = null; + } + return (A) this; + } + + public A withPodIPs(io.kubernetes.client.openapi.models.V1PodIP... podIPs) { + if (this.podIPs != null) { + this.podIPs.clear(); + _visitables.remove("podIPs"); + } + if (podIPs != null) { + for (V1PodIP item : podIPs) { + this.addToPodIPs(item); + } + } + return (A) this; + } + + public boolean hasPodIPs() { + return this.podIPs != null && !this.podIPs.isEmpty(); + } + + public PodIPsNested addNewPodIP() { + return new PodIPsNested(-1, null); + } + + public PodIPsNested addNewPodIPLike(V1PodIP item) { + return new PodIPsNested(-1, item); + } + + public PodIPsNested setNewPodIPLike(int index,V1PodIP item) { + return new PodIPsNested(index, item); + } + + public PodIPsNested editPodIP(int index) { + if (podIPs.size() <= index) throw new RuntimeException("Can't edit podIPs. Index exceeds size."); + return setNewPodIPLike(index, buildPodIP(index)); + } + + public PodIPsNested editFirstPodIP() { + if (podIPs.size() == 0) throw new RuntimeException("Can't edit first podIPs. The list is empty."); + return setNewPodIPLike(0, buildPodIP(0)); + } + + public PodIPsNested editLastPodIP() { + int index = podIPs.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last podIPs. The list is empty."); + return setNewPodIPLike(index, buildPodIP(index)); + } + + public PodIPsNested editMatchingPodIP(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1PodResourceClaimStatusBuilder builder = new V1PodResourceClaimStatusBuilder(item); + if (index < 0 || index >= resourceClaimStatuses.size()) { _visitables.get("resourceClaimStatuses").add(builder); resourceClaimStatuses.add(builder); } else { _visitables.get("resourceClaimStatuses").add(index, builder); resourceClaimStatuses.add(index, builder);} + return (A)this; + } + + public A setToResourceClaimStatuses(int index,V1PodResourceClaimStatus item) { + if (this.resourceClaimStatuses == null) {this.resourceClaimStatuses = new ArrayList();} + V1PodResourceClaimStatusBuilder builder = new V1PodResourceClaimStatusBuilder(item); + if (index < 0 || index >= resourceClaimStatuses.size()) { _visitables.get("resourceClaimStatuses").add(builder); resourceClaimStatuses.add(builder); } else { _visitables.get("resourceClaimStatuses").set(index, builder); resourceClaimStatuses.set(index, builder);} + return (A)this; + } + + public A addToResourceClaimStatuses(io.kubernetes.client.openapi.models.V1PodResourceClaimStatus... items) { + if (this.resourceClaimStatuses == null) {this.resourceClaimStatuses = new ArrayList();} + for (V1PodResourceClaimStatus item : items) {V1PodResourceClaimStatusBuilder builder = new V1PodResourceClaimStatusBuilder(item);_visitables.get("resourceClaimStatuses").add(builder);this.resourceClaimStatuses.add(builder);} return (A)this; + } + + public A addAllToResourceClaimStatuses(Collection items) { + if (this.resourceClaimStatuses == null) {this.resourceClaimStatuses = new ArrayList();} + for (V1PodResourceClaimStatus item : items) {V1PodResourceClaimStatusBuilder builder = new V1PodResourceClaimStatusBuilder(item);_visitables.get("resourceClaimStatuses").add(builder);this.resourceClaimStatuses.add(builder);} return (A)this; + } + + public A removeFromResourceClaimStatuses(io.kubernetes.client.openapi.models.V1PodResourceClaimStatus... items) { + if (this.resourceClaimStatuses == null) return (A)this; + for (V1PodResourceClaimStatus item : items) {V1PodResourceClaimStatusBuilder builder = new V1PodResourceClaimStatusBuilder(item);_visitables.get("resourceClaimStatuses").remove(builder); this.resourceClaimStatuses.remove(builder);} return (A)this; + } + + public A removeAllFromResourceClaimStatuses(Collection items) { + if (this.resourceClaimStatuses == null) return (A)this; + for (V1PodResourceClaimStatus item : items) {V1PodResourceClaimStatusBuilder builder = new V1PodResourceClaimStatusBuilder(item);_visitables.get("resourceClaimStatuses").remove(builder); this.resourceClaimStatuses.remove(builder);} return (A)this; + } + + public A removeMatchingFromResourceClaimStatuses(Predicate predicate) { + if (resourceClaimStatuses == null) return (A) this; + final Iterator each = resourceClaimStatuses.iterator(); + final List visitables = _visitables.get("resourceClaimStatuses"); + while (each.hasNext()) { + V1PodResourceClaimStatusBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResourceClaimStatuses() { + return this.resourceClaimStatuses != null ? build(resourceClaimStatuses) : null; + } + + public V1PodResourceClaimStatus buildResourceClaimStatus(int index) { + return this.resourceClaimStatuses.get(index).build(); + } + + public V1PodResourceClaimStatus buildFirstResourceClaimStatus() { + return this.resourceClaimStatuses.get(0).build(); + } + + public V1PodResourceClaimStatus buildLastResourceClaimStatus() { + return this.resourceClaimStatuses.get(resourceClaimStatuses.size() - 1).build(); + } + + public V1PodResourceClaimStatus buildMatchingResourceClaimStatus(Predicate predicate) { + for (V1PodResourceClaimStatusBuilder item : resourceClaimStatuses) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResourceClaimStatus(Predicate predicate) { + for (V1PodResourceClaimStatusBuilder item : resourceClaimStatuses) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceClaimStatuses(List resourceClaimStatuses) { + if (this.resourceClaimStatuses != null) { + this._visitables.get("resourceClaimStatuses").clear(); + } + if (resourceClaimStatuses != null) { + this.resourceClaimStatuses = new ArrayList(); + for (V1PodResourceClaimStatus item : resourceClaimStatuses) { + this.addToResourceClaimStatuses(item); + } + } else { + this.resourceClaimStatuses = null; + } + return (A) this; + } + + public A withResourceClaimStatuses(io.kubernetes.client.openapi.models.V1PodResourceClaimStatus... resourceClaimStatuses) { + if (this.resourceClaimStatuses != null) { + this.resourceClaimStatuses.clear(); + _visitables.remove("resourceClaimStatuses"); + } + if (resourceClaimStatuses != null) { + for (V1PodResourceClaimStatus item : resourceClaimStatuses) { + this.addToResourceClaimStatuses(item); + } + } + return (A) this; + } + + public boolean hasResourceClaimStatuses() { + return this.resourceClaimStatuses != null && !this.resourceClaimStatuses.isEmpty(); + } + + public ResourceClaimStatusesNested addNewResourceClaimStatus() { + return new ResourceClaimStatusesNested(-1, null); + } + + public ResourceClaimStatusesNested addNewResourceClaimStatusLike(V1PodResourceClaimStatus item) { + return new ResourceClaimStatusesNested(-1, item); + } + + public ResourceClaimStatusesNested setNewResourceClaimStatusLike(int index,V1PodResourceClaimStatus item) { + return new ResourceClaimStatusesNested(index, item); + } + + public ResourceClaimStatusesNested editResourceClaimStatus(int index) { + if (resourceClaimStatuses.size() <= index) throw new RuntimeException("Can't edit resourceClaimStatuses. Index exceeds size."); + return setNewResourceClaimStatusLike(index, buildResourceClaimStatus(index)); + } + + public ResourceClaimStatusesNested editFirstResourceClaimStatus() { + if (resourceClaimStatuses.size() == 0) throw new RuntimeException("Can't edit first resourceClaimStatuses. The list is empty."); + return setNewResourceClaimStatusLike(0, buildResourceClaimStatus(0)); + } + + public ResourceClaimStatusesNested editLastResourceClaimStatus() { + int index = resourceClaimStatuses.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resourceClaimStatuses. The list is empty."); + return setNewResourceClaimStatusLike(index, buildResourceClaimStatus(index)); + } + + public ResourceClaimStatusesNested editMatchingResourceClaimStatus(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1PodConditionFluent> implements Nested{ + ConditionsNested(int index,V1PodCondition item) { + this.index = index; + this.builder = new V1PodConditionBuilder(this, item); + } + V1PodConditionBuilder builder; + int index; + + public N and() { + return (N) V1PodStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + public class ContainerStatusesNested extends V1ContainerStatusFluent> implements Nested{ + ContainerStatusesNested(int index,V1ContainerStatus item) { + this.index = index; + this.builder = new V1ContainerStatusBuilder(this, item); + } + V1ContainerStatusBuilder builder; + int index; + + public N and() { + return (N) V1PodStatusFluent.this.setToContainerStatuses(index,builder.build()); + } + + public N endContainerStatus() { + return and(); + } + + } + public class EphemeralContainerStatusesNested extends V1ContainerStatusFluent> implements Nested{ + EphemeralContainerStatusesNested(int index,V1ContainerStatus item) { + this.index = index; + this.builder = new V1ContainerStatusBuilder(this, item); + } + V1ContainerStatusBuilder builder; + int index; + + public N and() { + return (N) V1PodStatusFluent.this.setToEphemeralContainerStatuses(index,builder.build()); + } + + public N endEphemeralContainerStatus() { + return and(); + } + + + } + public class HostIPsNested extends V1HostIPFluent> implements Nested{ + HostIPsNested(int index,V1HostIP item) { + this.index = index; + this.builder = new V1HostIPBuilder(this, item); + } + V1HostIPBuilder builder; + int index; + + public N and() { + return (N) V1PodStatusFluent.this.setToHostIPs(index,builder.build()); + } + + public N endHostIP() { + return and(); + } + + + } + public class InitContainerStatusesNested extends V1ContainerStatusFluent> implements Nested{ + InitContainerStatusesNested(int index,V1ContainerStatus item) { + this.index = index; + this.builder = new V1ContainerStatusBuilder(this, item); + } + V1ContainerStatusBuilder builder; + int index; + + public N and() { + return (N) V1PodStatusFluent.this.setToInitContainerStatuses(index,builder.build()); + } + + public N endInitContainerStatus() { + return and(); + } + + } + public class PodIPsNested extends V1PodIPFluent> implements Nested{ + PodIPsNested(int index,V1PodIP item) { + this.index = index; + this.builder = new V1PodIPBuilder(this, item); + } + V1PodIPBuilder builder; + int index; + + public N and() { + return (N) V1PodStatusFluent.this.setToPodIPs(index,builder.build()); + } + + public N endPodIP() { + return and(); + } + + } + public class ResourceClaimStatusesNested extends V1PodResourceClaimStatusFluent> implements Nested{ + ResourceClaimStatusesNested(int index,V1PodResourceClaimStatus item) { + this.index = index; + this.builder = new V1PodResourceClaimStatusBuilder(this, item); + } + V1PodResourceClaimStatusBuilder builder; + int index; + + public N and() { + return (N) V1PodStatusFluent.this.setToResourceClaimStatuses(index,builder.build()); + } + + public N endResourceClaimStatus() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusFluentImpl.java deleted file mode 100644 index b0569dfc58..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodStatusFluentImpl.java +++ /dev/null @@ -1,827 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.time.OffsetDateTime; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodStatusFluentImpl> extends BaseFluent implements V1PodStatusFluent{ - public V1PodStatusFluentImpl() { - } - public V1PodStatusFluentImpl(V1PodStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withContainerStatuses(instance.getContainerStatuses()); - this.withEphemeralContainerStatuses(instance.getEphemeralContainerStatuses()); - this.withHostIP(instance.getHostIP()); - this.withInitContainerStatuses(instance.getInitContainerStatuses()); - this.withMessage(instance.getMessage()); - this.withNominatedNodeName(instance.getNominatedNodeName()); - this.withPhase(instance.getPhase()); - this.withPodIP(instance.getPodIP()); - this.withPodIPs(instance.getPodIPs()); - this.withQosClass(instance.getQosClass()); - this.withReason(instance.getReason()); - this.withResize(instance.getResize()); - this.withStartTime(instance.getStartTime()); - } - } - private ArrayList conditions; - private ArrayList containerStatuses; - private ArrayList ephemeralContainerStatuses; - private String hostIP; - private ArrayList initContainerStatuses; - private String message; - private String nominatedNodeName; - private String phase; - private String podIP; - private ArrayList podIPs; - private String qosClass; - private String reason; - private String resize; - private OffsetDateTime startTime; - public A addToConditions(int index,V1PodCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1PodConditionBuilder builder = new V1PodConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1PodCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1PodConditionBuilder builder = new V1PodConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1PodCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1PodCondition item : items) {V1PodConditionBuilder builder = new V1PodConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1PodCondition item : items) {V1PodConditionBuilder builder = new V1PodConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1PodCondition... items) { - for (V1PodCondition item : items) {V1PodConditionBuilder builder = new V1PodConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1PodCondition item : items) {V1PodConditionBuilder builder = new V1PodConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1PodConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1PodCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1PodCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1PodCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1PodCondition buildMatchingCondition(Predicate predicate) { - for (V1PodConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1PodConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1PodCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1PodCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1PodCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1PodStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1PodStatusFluentImpl.ConditionsNestedImpl(); - } - public V1PodStatusFluentImpl.ConditionsNested addNewConditionLike(V1PodCondition item) { - return new V1PodStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1PodStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1PodCondition item) { - return new V1PodStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1PodStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1PodStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1PodStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1PodStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); - if (index < 0 || index >= containerStatuses.size()) { _visitables.get("containerStatuses").add(builder); containerStatuses.add(builder); } else { _visitables.get("containerStatuses").add(index, builder); containerStatuses.add(index, builder);} - return (A)this; - } - public A setToContainerStatuses(int index,V1ContainerStatus item) { - if (this.containerStatuses == null) {this.containerStatuses = new ArrayList();} - V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); - if (index < 0 || index >= containerStatuses.size()) { _visitables.get("containerStatuses").add(builder); containerStatuses.add(builder); } else { _visitables.get("containerStatuses").set(index, builder); containerStatuses.set(index, builder);} - return (A)this; - } - public A addToContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { - if (this.containerStatuses == null) {this.containerStatuses = new ArrayList();} - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("containerStatuses").add(builder);this.containerStatuses.add(builder);} return (A)this; - } - public A addAllToContainerStatuses(Collection items) { - if (this.containerStatuses == null) {this.containerStatuses = new ArrayList();} - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("containerStatuses").add(builder);this.containerStatuses.add(builder);} return (A)this; - } - public A removeFromContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("containerStatuses").remove(builder);if (this.containerStatuses != null) {this.containerStatuses.remove(builder);}} return (A)this; - } - public A removeAllFromContainerStatuses(Collection items) { - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("containerStatuses").remove(builder);if (this.containerStatuses != null) {this.containerStatuses.remove(builder);}} return (A)this; - } - public A removeMatchingFromContainerStatuses(Predicate predicate) { - if (containerStatuses == null) return (A) this; - final Iterator each = containerStatuses.iterator(); - final List visitables = _visitables.get("containerStatuses"); - while (each.hasNext()) { - V1ContainerStatusBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildContainerStatuses instead. - * @return The buildable object. - */ - @Deprecated - public List getContainerStatuses() { - return containerStatuses != null ? build(containerStatuses) : null; - } - public List buildContainerStatuses() { - return containerStatuses != null ? build(containerStatuses) : null; - } - public V1ContainerStatus buildContainerStatus(int index) { - return this.containerStatuses.get(index).build(); - } - public V1ContainerStatus buildFirstContainerStatus() { - return this.containerStatuses.get(0).build(); - } - public V1ContainerStatus buildLastContainerStatus() { - return this.containerStatuses.get(containerStatuses.size() - 1).build(); - } - public V1ContainerStatus buildMatchingContainerStatus(Predicate predicate) { - for (V1ContainerStatusBuilder item: containerStatuses) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingContainerStatus(Predicate predicate) { - for (V1ContainerStatusBuilder item: containerStatuses) { if(predicate.test(item)){ return true;} } return false; - } - public A withContainerStatuses(List containerStatuses) { - if (this.containerStatuses != null) { _visitables.get("containerStatuses").clear();} - if (containerStatuses != null) {this.containerStatuses = new ArrayList(); for (V1ContainerStatus item : containerStatuses){this.addToContainerStatuses(item);}} else { this.containerStatuses = null;} return (A) this; - } - public A withContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... containerStatuses) { - if (this.containerStatuses != null) {this.containerStatuses.clear(); _visitables.remove("containerStatuses"); } - if (containerStatuses != null) {for (V1ContainerStatus item :containerStatuses){ this.addToContainerStatuses(item);}} return (A) this; - } - public Boolean hasContainerStatuses() { - return containerStatuses != null && !containerStatuses.isEmpty(); - } - public V1PodStatusFluentImpl.ContainerStatusesNested addNewContainerStatus() { - return new V1PodStatusFluentImpl.ContainerStatusesNestedImpl(); - } - public V1PodStatusFluentImpl.ContainerStatusesNested addNewContainerStatusLike(V1ContainerStatus item) { - return new V1PodStatusFluentImpl.ContainerStatusesNestedImpl(-1, item); - } - public V1PodStatusFluentImpl.ContainerStatusesNested setNewContainerStatusLike(int index,V1ContainerStatus item) { - return new V1PodStatusFluentImpl.ContainerStatusesNestedImpl(index, item); - } - public V1PodStatusFluentImpl.ContainerStatusesNested editContainerStatus(int index) { - if (containerStatuses.size() <= index) throw new RuntimeException("Can't edit containerStatuses. Index exceeds size."); - return setNewContainerStatusLike(index, buildContainerStatus(index)); - } - public V1PodStatusFluentImpl.ContainerStatusesNested editFirstContainerStatus() { - if (containerStatuses.size() == 0) throw new RuntimeException("Can't edit first containerStatuses. The list is empty."); - return setNewContainerStatusLike(0, buildContainerStatus(0)); - } - public V1PodStatusFluentImpl.ContainerStatusesNested editLastContainerStatus() { - int index = containerStatuses.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last containerStatuses. The list is empty."); - return setNewContainerStatusLike(index, buildContainerStatus(index)); - } - public V1PodStatusFluentImpl.ContainerStatusesNested editMatchingContainerStatus(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); - if (index < 0 || index >= ephemeralContainerStatuses.size()) { _visitables.get("ephemeralContainerStatuses").add(builder); ephemeralContainerStatuses.add(builder); } else { _visitables.get("ephemeralContainerStatuses").add(index, builder); ephemeralContainerStatuses.add(index, builder);} - return (A)this; - } - public A setToEphemeralContainerStatuses(int index,V1ContainerStatus item) { - if (this.ephemeralContainerStatuses == null) {this.ephemeralContainerStatuses = new ArrayList();} - V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); - if (index < 0 || index >= ephemeralContainerStatuses.size()) { _visitables.get("ephemeralContainerStatuses").add(builder); ephemeralContainerStatuses.add(builder); } else { _visitables.get("ephemeralContainerStatuses").set(index, builder); ephemeralContainerStatuses.set(index, builder);} - return (A)this; - } - public A addToEphemeralContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { - if (this.ephemeralContainerStatuses == null) {this.ephemeralContainerStatuses = new ArrayList();} - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("ephemeralContainerStatuses").add(builder);this.ephemeralContainerStatuses.add(builder);} return (A)this; - } - public A addAllToEphemeralContainerStatuses(Collection items) { - if (this.ephemeralContainerStatuses == null) {this.ephemeralContainerStatuses = new ArrayList();} - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("ephemeralContainerStatuses").add(builder);this.ephemeralContainerStatuses.add(builder);} return (A)this; - } - public A removeFromEphemeralContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("ephemeralContainerStatuses").remove(builder);if (this.ephemeralContainerStatuses != null) {this.ephemeralContainerStatuses.remove(builder);}} return (A)this; - } - public A removeAllFromEphemeralContainerStatuses(Collection items) { - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("ephemeralContainerStatuses").remove(builder);if (this.ephemeralContainerStatuses != null) {this.ephemeralContainerStatuses.remove(builder);}} return (A)this; - } - public A removeMatchingFromEphemeralContainerStatuses(Predicate predicate) { - if (ephemeralContainerStatuses == null) return (A) this; - final Iterator each = ephemeralContainerStatuses.iterator(); - final List visitables = _visitables.get("ephemeralContainerStatuses"); - while (each.hasNext()) { - V1ContainerStatusBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildEphemeralContainerStatuses instead. - * @return The buildable object. - */ - @Deprecated - public List getEphemeralContainerStatuses() { - return ephemeralContainerStatuses != null ? build(ephemeralContainerStatuses) : null; - } - public List buildEphemeralContainerStatuses() { - return ephemeralContainerStatuses != null ? build(ephemeralContainerStatuses) : null; - } - public V1ContainerStatus buildEphemeralContainerStatus(int index) { - return this.ephemeralContainerStatuses.get(index).build(); - } - public V1ContainerStatus buildFirstEphemeralContainerStatus() { - return this.ephemeralContainerStatuses.get(0).build(); - } - public V1ContainerStatus buildLastEphemeralContainerStatus() { - return this.ephemeralContainerStatuses.get(ephemeralContainerStatuses.size() - 1).build(); - } - public V1ContainerStatus buildMatchingEphemeralContainerStatus(Predicate predicate) { - for (V1ContainerStatusBuilder item: ephemeralContainerStatuses) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingEphemeralContainerStatus(Predicate predicate) { - for (V1ContainerStatusBuilder item: ephemeralContainerStatuses) { if(predicate.test(item)){ return true;} } return false; - } - public A withEphemeralContainerStatuses(List ephemeralContainerStatuses) { - if (this.ephemeralContainerStatuses != null) { _visitables.get("ephemeralContainerStatuses").clear();} - if (ephemeralContainerStatuses != null) {this.ephemeralContainerStatuses = new ArrayList(); for (V1ContainerStatus item : ephemeralContainerStatuses){this.addToEphemeralContainerStatuses(item);}} else { this.ephemeralContainerStatuses = null;} return (A) this; - } - public A withEphemeralContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... ephemeralContainerStatuses) { - if (this.ephemeralContainerStatuses != null) {this.ephemeralContainerStatuses.clear(); _visitables.remove("ephemeralContainerStatuses"); } - if (ephemeralContainerStatuses != null) {for (V1ContainerStatus item :ephemeralContainerStatuses){ this.addToEphemeralContainerStatuses(item);}} return (A) this; - } - public Boolean hasEphemeralContainerStatuses() { - return ephemeralContainerStatuses != null && !ephemeralContainerStatuses.isEmpty(); - } - public V1PodStatusFluentImpl.EphemeralContainerStatusesNested addNewEphemeralContainerStatus() { - return new V1PodStatusFluentImpl.EphemeralContainerStatusesNestedImpl(); - } - public V1PodStatusFluentImpl.EphemeralContainerStatusesNested addNewEphemeralContainerStatusLike(V1ContainerStatus item) { - return new V1PodStatusFluentImpl.EphemeralContainerStatusesNestedImpl(-1, item); - } - public V1PodStatusFluentImpl.EphemeralContainerStatusesNested setNewEphemeralContainerStatusLike(int index,V1ContainerStatus item) { - return new V1PodStatusFluentImpl.EphemeralContainerStatusesNestedImpl(index, item); - } - public V1PodStatusFluentImpl.EphemeralContainerStatusesNested editEphemeralContainerStatus(int index) { - if (ephemeralContainerStatuses.size() <= index) throw new RuntimeException("Can't edit ephemeralContainerStatuses. Index exceeds size."); - return setNewEphemeralContainerStatusLike(index, buildEphemeralContainerStatus(index)); - } - public V1PodStatusFluentImpl.EphemeralContainerStatusesNested editFirstEphemeralContainerStatus() { - if (ephemeralContainerStatuses.size() == 0) throw new RuntimeException("Can't edit first ephemeralContainerStatuses. The list is empty."); - return setNewEphemeralContainerStatusLike(0, buildEphemeralContainerStatus(0)); - } - public V1PodStatusFluentImpl.EphemeralContainerStatusesNested editLastEphemeralContainerStatus() { - int index = ephemeralContainerStatuses.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ephemeralContainerStatuses. The list is empty."); - return setNewEphemeralContainerStatusLike(index, buildEphemeralContainerStatus(index)); - } - public V1PodStatusFluentImpl.EphemeralContainerStatusesNested editMatchingEphemeralContainerStatus(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); - if (index < 0 || index >= initContainerStatuses.size()) { _visitables.get("initContainerStatuses").add(builder); initContainerStatuses.add(builder); } else { _visitables.get("initContainerStatuses").add(index, builder); initContainerStatuses.add(index, builder);} - return (A)this; - } - public A setToInitContainerStatuses(int index,V1ContainerStatus item) { - if (this.initContainerStatuses == null) {this.initContainerStatuses = new ArrayList();} - V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item); - if (index < 0 || index >= initContainerStatuses.size()) { _visitables.get("initContainerStatuses").add(builder); initContainerStatuses.add(builder); } else { _visitables.get("initContainerStatuses").set(index, builder); initContainerStatuses.set(index, builder);} - return (A)this; - } - public A addToInitContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { - if (this.initContainerStatuses == null) {this.initContainerStatuses = new ArrayList();} - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("initContainerStatuses").add(builder);this.initContainerStatuses.add(builder);} return (A)this; - } - public A addAllToInitContainerStatuses(Collection items) { - if (this.initContainerStatuses == null) {this.initContainerStatuses = new ArrayList();} - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("initContainerStatuses").add(builder);this.initContainerStatuses.add(builder);} return (A)this; - } - public A removeFromInitContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... items) { - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("initContainerStatuses").remove(builder);if (this.initContainerStatuses != null) {this.initContainerStatuses.remove(builder);}} return (A)this; - } - public A removeAllFromInitContainerStatuses(Collection items) { - for (V1ContainerStatus item : items) {V1ContainerStatusBuilder builder = new V1ContainerStatusBuilder(item);_visitables.get("initContainerStatuses").remove(builder);if (this.initContainerStatuses != null) {this.initContainerStatuses.remove(builder);}} return (A)this; - } - public A removeMatchingFromInitContainerStatuses(Predicate predicate) { - if (initContainerStatuses == null) return (A) this; - final Iterator each = initContainerStatuses.iterator(); - final List visitables = _visitables.get("initContainerStatuses"); - while (each.hasNext()) { - V1ContainerStatusBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildInitContainerStatuses instead. - * @return The buildable object. - */ - @Deprecated - public List getInitContainerStatuses() { - return initContainerStatuses != null ? build(initContainerStatuses) : null; - } - public List buildInitContainerStatuses() { - return initContainerStatuses != null ? build(initContainerStatuses) : null; - } - public V1ContainerStatus buildInitContainerStatus(int index) { - return this.initContainerStatuses.get(index).build(); - } - public V1ContainerStatus buildFirstInitContainerStatus() { - return this.initContainerStatuses.get(0).build(); - } - public V1ContainerStatus buildLastInitContainerStatus() { - return this.initContainerStatuses.get(initContainerStatuses.size() - 1).build(); - } - public V1ContainerStatus buildMatchingInitContainerStatus(Predicate predicate) { - for (V1ContainerStatusBuilder item: initContainerStatuses) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingInitContainerStatus(Predicate predicate) { - for (V1ContainerStatusBuilder item: initContainerStatuses) { if(predicate.test(item)){ return true;} } return false; - } - public A withInitContainerStatuses(List initContainerStatuses) { - if (this.initContainerStatuses != null) { _visitables.get("initContainerStatuses").clear();} - if (initContainerStatuses != null) {this.initContainerStatuses = new ArrayList(); for (V1ContainerStatus item : initContainerStatuses){this.addToInitContainerStatuses(item);}} else { this.initContainerStatuses = null;} return (A) this; - } - public A withInitContainerStatuses(io.kubernetes.client.openapi.models.V1ContainerStatus... initContainerStatuses) { - if (this.initContainerStatuses != null) {this.initContainerStatuses.clear(); _visitables.remove("initContainerStatuses"); } - if (initContainerStatuses != null) {for (V1ContainerStatus item :initContainerStatuses){ this.addToInitContainerStatuses(item);}} return (A) this; - } - public Boolean hasInitContainerStatuses() { - return initContainerStatuses != null && !initContainerStatuses.isEmpty(); - } - public V1PodStatusFluentImpl.InitContainerStatusesNested addNewInitContainerStatus() { - return new V1PodStatusFluentImpl.InitContainerStatusesNestedImpl(); - } - public V1PodStatusFluentImpl.InitContainerStatusesNested addNewInitContainerStatusLike(V1ContainerStatus item) { - return new V1PodStatusFluentImpl.InitContainerStatusesNestedImpl(-1, item); - } - public V1PodStatusFluentImpl.InitContainerStatusesNested setNewInitContainerStatusLike(int index,V1ContainerStatus item) { - return new V1PodStatusFluentImpl.InitContainerStatusesNestedImpl(index, item); - } - public V1PodStatusFluentImpl.InitContainerStatusesNested editInitContainerStatus(int index) { - if (initContainerStatuses.size() <= index) throw new RuntimeException("Can't edit initContainerStatuses. Index exceeds size."); - return setNewInitContainerStatusLike(index, buildInitContainerStatus(index)); - } - public V1PodStatusFluentImpl.InitContainerStatusesNested editFirstInitContainerStatus() { - if (initContainerStatuses.size() == 0) throw new RuntimeException("Can't edit first initContainerStatuses. The list is empty."); - return setNewInitContainerStatusLike(0, buildInitContainerStatus(0)); - } - public V1PodStatusFluentImpl.InitContainerStatusesNested editLastInitContainerStatus() { - int index = initContainerStatuses.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last initContainerStatuses. The list is empty."); - return setNewInitContainerStatusLike(index, buildInitContainerStatus(index)); - } - public V1PodStatusFluentImpl.InitContainerStatusesNested editMatchingInitContainerStatus(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1PodIPBuilder builder = new V1PodIPBuilder(item); - if (index < 0 || index >= podIPs.size()) { _visitables.get("podIPs").add(builder); podIPs.add(builder); } else { _visitables.get("podIPs").add(index, builder); podIPs.add(index, builder);} - return (A)this; - } - public A setToPodIPs(int index,V1PodIP item) { - if (this.podIPs == null) {this.podIPs = new ArrayList();} - V1PodIPBuilder builder = new V1PodIPBuilder(item); - if (index < 0 || index >= podIPs.size()) { _visitables.get("podIPs").add(builder); podIPs.add(builder); } else { _visitables.get("podIPs").set(index, builder); podIPs.set(index, builder);} - return (A)this; - } - public A addToPodIPs(io.kubernetes.client.openapi.models.V1PodIP... items) { - if (this.podIPs == null) {this.podIPs = new ArrayList();} - for (V1PodIP item : items) {V1PodIPBuilder builder = new V1PodIPBuilder(item);_visitables.get("podIPs").add(builder);this.podIPs.add(builder);} return (A)this; - } - public A addAllToPodIPs(Collection items) { - if (this.podIPs == null) {this.podIPs = new ArrayList();} - for (V1PodIP item : items) {V1PodIPBuilder builder = new V1PodIPBuilder(item);_visitables.get("podIPs").add(builder);this.podIPs.add(builder);} return (A)this; - } - public A removeFromPodIPs(io.kubernetes.client.openapi.models.V1PodIP... items) { - for (V1PodIP item : items) {V1PodIPBuilder builder = new V1PodIPBuilder(item);_visitables.get("podIPs").remove(builder);if (this.podIPs != null) {this.podIPs.remove(builder);}} return (A)this; - } - public A removeAllFromPodIPs(Collection items) { - for (V1PodIP item : items) {V1PodIPBuilder builder = new V1PodIPBuilder(item);_visitables.get("podIPs").remove(builder);if (this.podIPs != null) {this.podIPs.remove(builder);}} return (A)this; - } - public A removeMatchingFromPodIPs(Predicate predicate) { - if (podIPs == null) return (A) this; - final Iterator each = podIPs.iterator(); - final List visitables = _visitables.get("podIPs"); - while (each.hasNext()) { - V1PodIPBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPodIPs instead. - * @return The buildable object. - */ - @Deprecated - public List getPodIPs() { - return podIPs != null ? build(podIPs) : null; - } - public List buildPodIPs() { - return podIPs != null ? build(podIPs) : null; - } - public V1PodIP buildPodIP(int index) { - return this.podIPs.get(index).build(); - } - public V1PodIP buildFirstPodIP() { - return this.podIPs.get(0).build(); - } - public V1PodIP buildLastPodIP() { - return this.podIPs.get(podIPs.size() - 1).build(); - } - public V1PodIP buildMatchingPodIP(Predicate predicate) { - for (V1PodIPBuilder item: podIPs) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPodIP(Predicate predicate) { - for (V1PodIPBuilder item: podIPs) { if(predicate.test(item)){ return true;} } return false; - } - public A withPodIPs(List podIPs) { - if (this.podIPs != null) { _visitables.get("podIPs").clear();} - if (podIPs != null) {this.podIPs = new ArrayList(); for (V1PodIP item : podIPs){this.addToPodIPs(item);}} else { this.podIPs = null;} return (A) this; - } - public A withPodIPs(io.kubernetes.client.openapi.models.V1PodIP... podIPs) { - if (this.podIPs != null) {this.podIPs.clear(); _visitables.remove("podIPs"); } - if (podIPs != null) {for (V1PodIP item :podIPs){ this.addToPodIPs(item);}} return (A) this; - } - public Boolean hasPodIPs() { - return podIPs != null && !podIPs.isEmpty(); - } - public V1PodStatusFluentImpl.PodIPsNested addNewPodIP() { - return new V1PodStatusFluentImpl.PodIPsNestedImpl(); - } - public V1PodStatusFluentImpl.PodIPsNested addNewPodIPLike(V1PodIP item) { - return new V1PodStatusFluentImpl.PodIPsNestedImpl(-1, item); - } - public V1PodStatusFluentImpl.PodIPsNested setNewPodIPLike(int index,V1PodIP item) { - return new V1PodStatusFluentImpl.PodIPsNestedImpl(index, item); - } - public V1PodStatusFluentImpl.PodIPsNested editPodIP(int index) { - if (podIPs.size() <= index) throw new RuntimeException("Can't edit podIPs. Index exceeds size."); - return setNewPodIPLike(index, buildPodIP(index)); - } - public V1PodStatusFluentImpl.PodIPsNested editFirstPodIP() { - if (podIPs.size() == 0) throw new RuntimeException("Can't edit first podIPs. The list is empty."); - return setNewPodIPLike(0, buildPodIP(0)); - } - public V1PodStatusFluentImpl.PodIPsNested editLastPodIP() { - int index = podIPs.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last podIPs. The list is empty."); - return setNewPodIPLike(index, buildPodIP(index)); - } - public V1PodStatusFluentImpl.PodIPsNested editMatchingPodIP(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1PodConditionFluentImpl> implements V1PodStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1PodCondition item) { - this.index = index; - this.builder = new V1PodConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1PodConditionBuilder(this); - } - V1PodConditionBuilder builder; - int index; - public N and() { - return (N) V1PodStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - class ContainerStatusesNestedImpl extends V1ContainerStatusFluentImpl> implements V1PodStatusFluentImpl.ContainerStatusesNested,Nested{ - ContainerStatusesNestedImpl(int index,V1ContainerStatus item) { - this.index = index; - this.builder = new V1ContainerStatusBuilder(this, item); - } - ContainerStatusesNestedImpl() { - this.index = -1; - this.builder = new V1ContainerStatusBuilder(this); - } - V1ContainerStatusBuilder builder; - int index; - public N and() { - return (N) V1PodStatusFluentImpl.this.setToContainerStatuses(index,builder.build()); - } - public N endContainerStatus() { - return and(); - } - - } - class EphemeralContainerStatusesNestedImpl extends V1ContainerStatusFluentImpl> implements V1PodStatusFluentImpl.EphemeralContainerStatusesNested,Nested{ - EphemeralContainerStatusesNestedImpl(int index,V1ContainerStatus item) { - this.index = index; - this.builder = new V1ContainerStatusBuilder(this, item); - } - EphemeralContainerStatusesNestedImpl() { - this.index = -1; - this.builder = new V1ContainerStatusBuilder(this); - } - V1ContainerStatusBuilder builder; - int index; - public N and() { - return (N) V1PodStatusFluentImpl.this.setToEphemeralContainerStatuses(index,builder.build()); - } - public N endEphemeralContainerStatus() { - return and(); - } - - } - class InitContainerStatusesNestedImpl extends V1ContainerStatusFluentImpl> implements V1PodStatusFluentImpl.InitContainerStatusesNested,Nested{ - InitContainerStatusesNestedImpl(int index,V1ContainerStatus item) { - this.index = index; - this.builder = new V1ContainerStatusBuilder(this, item); - } - InitContainerStatusesNestedImpl() { - this.index = -1; - this.builder = new V1ContainerStatusBuilder(this); - } - V1ContainerStatusBuilder builder; - int index; - public N and() { - return (N) V1PodStatusFluentImpl.this.setToInitContainerStatuses(index,builder.build()); - } - public N endInitContainerStatus() { - return and(); - } - - } - class PodIPsNestedImpl extends V1PodIPFluentImpl> implements V1PodStatusFluentImpl.PodIPsNested,Nested{ - PodIPsNestedImpl(int index,V1PodIP item) { - this.index = index; - this.builder = new V1PodIPBuilder(this, item); - } - PodIPsNestedImpl() { - this.index = -1; - this.builder = new V1PodIPBuilder(this); - } - V1PodIPBuilder builder; - int index; - public N and() { - return (N) V1PodStatusFluentImpl.this.setToPodIPs(index,builder.build()); - } - public N endPodIP() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateBuilder.java index f4d5444740..9a5220ce02 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodTemplateBuilder extends V1PodTemplateFluentImpl implements VisitableBuilder{ +public class V1PodTemplateBuilder extends V1PodTemplateFluent implements VisitableBuilder{ public V1PodTemplateBuilder() { - this(false); - } - public V1PodTemplateBuilder(Boolean validationEnabled) { - this(new V1PodTemplate(), validationEnabled); + this(new V1PodTemplate()); } + public V1PodTemplateBuilder(V1PodTemplateFluent fluent) { - this(fluent, false); - } - public V1PodTemplateBuilder(V1PodTemplateFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodTemplate(), validationEnabled); + this(fluent, new V1PodTemplate()); } + public V1PodTemplateBuilder(V1PodTemplateFluent fluent,V1PodTemplate instance) { - this(fluent, instance, false); - } - public V1PodTemplateBuilder(V1PodTemplateFluent fluent,V1PodTemplate instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withTemplate(instance.getTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodTemplateBuilder(V1PodTemplate instance) { - this(instance,false); - } - public V1PodTemplateBuilder(V1PodTemplate instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withTemplate(instance.getTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodTemplateFluent fluent; - Boolean validationEnabled; + public V1PodTemplate build() { V1PodTemplate buildable = new V1PodTemplate(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setTemplate(fluent.getTemplate()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setTemplate(fluent.buildTemplate()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateFluent.java index 4b0f07c505..7086c50d70 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1PodTemplateFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1PodTemplateFluent.MetadataNested withNewMetadata(); - public V1PodTemplateFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1PodTemplateFluent.MetadataNested editMetadata(); - public V1PodTemplateFluent.MetadataNested editOrNewMetadata(); - public V1PodTemplateFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate(); - public V1PodTemplateSpec buildTemplate(); - public A withTemplate(V1PodTemplateSpec template); - public Boolean hasTemplate(); - public V1PodTemplateFluent.TemplateNested withNewTemplate(); - public V1PodTemplateFluent.TemplateNested withNewTemplateLike(V1PodTemplateSpec item); - public V1PodTemplateFluent.TemplateNested editTemplate(); - public V1PodTemplateFluent.TemplateNested editOrNewTemplate(); - public V1PodTemplateFluent.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodTemplateFluent> extends BaseFluent{ + public V1PodTemplateFluent() { + } + + public V1PodTemplateFluent(V1PodTemplate instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1PodTemplateSpecBuilder template; + + protected void copyInstance(V1PodTemplate instance) { + instance = (instance != null ? instance : new V1PodTemplate()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withTemplate(instance.getTemplate()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface TemplateNested extends Nested,V1PodTemplateSpecFluent>{ - public N and(); - public N endTemplate(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1PodTemplateSpec buildTemplate() { + return this.template != null ? this.template.build() : null; + } + + public A withTemplate(V1PodTemplateSpec template) { + this._visitables.remove("template"); + if (template != null) { + this.template = new V1PodTemplateSpecBuilder(template); + this._visitables.get("template").add(this.template); + } else { + this.template = null; + this._visitables.get("template").remove(this.template); + } + return (A) this; + } + + public boolean hasTemplate() { + return this.template != null; + } + + public TemplateNested withNewTemplate() { + return new TemplateNested(null); + } + + public TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { + return new TemplateNested(item); + } + + public TemplateNested editTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(null)); + } + + public TemplateNested editOrNewTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(new V1PodTemplateSpecBuilder().build())); + } + + public TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodTemplateFluent that = (V1PodTemplateFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(template, that.template)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, template, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (template != null) { sb.append("template:"); sb.append(template); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1PodTemplateFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class TemplateNested extends V1PodTemplateSpecFluent> implements Nested{ + TemplateNested(V1PodTemplateSpec item) { + this.builder = new V1PodTemplateSpecBuilder(this, item); + } + V1PodTemplateSpecBuilder builder; + + public N and() { + return (N) V1PodTemplateFluent.this.withTemplate(builder.build()); + } + + public N endTemplate() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateFluentImpl.java deleted file mode 100644 index f773f11be4..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodTemplateFluentImpl> extends BaseFluent implements V1PodTemplateFluent{ - public V1PodTemplateFluentImpl() { - } - public V1PodTemplateFluentImpl(V1PodTemplate instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withTemplate(instance.getTemplate()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1PodTemplateSpecBuilder template; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1PodTemplateFluentImpl.MetadataNested withNewMetadata() { - return new V1PodTemplateFluentImpl.MetadataNestedImpl(); - } - public V1PodTemplateFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1PodTemplateFluentImpl.MetadataNestedImpl(item); - } - public V1PodTemplateFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PodTemplateFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1PodTemplateFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate() { - return this.template!=null ?this.template.build():null; - } - public V1PodTemplateSpec buildTemplate() { - return this.template!=null ?this.template.build():null; - } - public A withTemplate(V1PodTemplateSpec template) { - _visitables.get("template").remove(this.template); - if (template!=null){ this.template= new V1PodTemplateSpecBuilder(template); _visitables.get("template").add(this.template);} else { this.template = null; _visitables.get("template").remove(this.template); } return (A) this; - } - public Boolean hasTemplate() { - return this.template != null; - } - public V1PodTemplateFluentImpl.TemplateNested withNewTemplate() { - return new V1PodTemplateFluentImpl.TemplateNestedImpl(); - } - public V1PodTemplateFluentImpl.TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { - return new V1PodTemplateFluentImpl.TemplateNestedImpl(item); - } - public V1PodTemplateFluentImpl.TemplateNested editTemplate() { - return withNewTemplateLike(getTemplate()); - } - public V1PodTemplateFluentImpl.TemplateNested editOrNewTemplate() { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): new V1PodTemplateSpecBuilder().build()); - } - public V1PodTemplateFluentImpl.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodTemplateFluentImpl that = (V1PodTemplateFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(template, that.template)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, template, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (template != null) { sb.append("template:"); sb.append(template); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1PodTemplateFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1PodTemplateFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class TemplateNestedImpl extends V1PodTemplateSpecFluentImpl> implements V1PodTemplateFluentImpl.TemplateNested,Nested{ - TemplateNestedImpl(V1PodTemplateSpec item) { - this.builder = new V1PodTemplateSpecBuilder(this, item); - } - TemplateNestedImpl() { - this.builder = new V1PodTemplateSpecBuilder(this); - } - V1PodTemplateSpecBuilder builder; - public N and() { - return (N) V1PodTemplateFluentImpl.this.withTemplate(builder.build()); - } - public N endTemplate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListBuilder.java index 233e2c224b..305a5fdc36 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodTemplateListBuilder extends V1PodTemplateListFluentImpl implements VisitableBuilder{ +public class V1PodTemplateListBuilder extends V1PodTemplateListFluent implements VisitableBuilder{ public V1PodTemplateListBuilder() { - this(false); - } - public V1PodTemplateListBuilder(Boolean validationEnabled) { - this(new V1PodTemplateList(), validationEnabled); + this(new V1PodTemplateList()); } + public V1PodTemplateListBuilder(V1PodTemplateListFluent fluent) { - this(fluent, false); - } - public V1PodTemplateListBuilder(V1PodTemplateListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodTemplateList(), validationEnabled); + this(fluent, new V1PodTemplateList()); } + public V1PodTemplateListBuilder(V1PodTemplateListFluent fluent,V1PodTemplateList instance) { - this(fluent, instance, false); - } - public V1PodTemplateListBuilder(V1PodTemplateListFluent fluent,V1PodTemplateList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodTemplateListBuilder(V1PodTemplateList instance) { - this(instance,false); - } - public V1PodTemplateListBuilder(V1PodTemplateList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodTemplateListFluent fluent; - Boolean validationEnabled; + public V1PodTemplateList build() { V1PodTemplateList buildable = new V1PodTemplateList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListFluent.java index b303c0eeb9..feebd38813 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PodTemplateListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1PodTemplate item); - public A setToItems(int index,V1PodTemplate item); - public A addToItems(io.kubernetes.client.openapi.models.V1PodTemplate... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1PodTemplate... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1PodTemplate buildItem(int index); - public V1PodTemplate buildFirstItem(); - public V1PodTemplate buildLastItem(); - public V1PodTemplate buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1PodTemplate... items); - public Boolean hasItems(); - public V1PodTemplateListFluent.ItemsNested addNewItem(); - public V1PodTemplateListFluent.ItemsNested addNewItemLike(V1PodTemplate item); - public V1PodTemplateListFluent.ItemsNested setNewItemLike(int index,V1PodTemplate item); - public V1PodTemplateListFluent.ItemsNested editItem(int index); - public V1PodTemplateListFluent.ItemsNested editFirstItem(); - public V1PodTemplateListFluent.ItemsNested editLastItem(); - public V1PodTemplateListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1PodTemplateListFluent.MetadataNested withNewMetadata(); - public V1PodTemplateListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1PodTemplateListFluent.MetadataNested editMetadata(); - public V1PodTemplateListFluent.MetadataNested editOrNewMetadata(); - public V1PodTemplateListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1PodTemplateFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodTemplateListFluent> extends BaseFluent{ + public V1PodTemplateListFluent() { + } + + public V1PodTemplateListFluent(V1PodTemplateList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1PodTemplateList instance) { + instance = (instance != null ? instance : new V1PodTemplateList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1PodTemplate item) { + if (this.items == null) {this.items = new ArrayList();} + V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1PodTemplate item) { + if (this.items == null) {this.items = new ArrayList();} + V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1PodTemplate... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PodTemplate item : items) {V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PodTemplate item : items) {V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1PodTemplate... items) { + if (this.items == null) return (A)this; + for (V1PodTemplate item : items) {V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1PodTemplate item : items) {V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1PodTemplateBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1PodTemplate buildItem(int index) { + return this.items.get(index).build(); + } + + public V1PodTemplate buildFirstItem() { + return this.items.get(0).build(); + } + + public V1PodTemplate buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1PodTemplate buildMatchingItem(Predicate predicate) { + for (V1PodTemplateBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1PodTemplateBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1PodTemplate item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1PodTemplate... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1PodTemplate item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1PodTemplate item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1PodTemplate item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodTemplateListFluent that = (V1PodTemplateListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1PodTemplateFluent> implements Nested{ + ItemsNested(int index,V1PodTemplate item) { + this.index = index; + this.builder = new V1PodTemplateBuilder(this, item); + } + V1PodTemplateBuilder builder; + int index; + public N and() { + return (N) V1PodTemplateListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1PodTemplateListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListFluentImpl.java deleted file mode 100644 index 0609699d37..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodTemplateListFluentImpl> extends BaseFluent implements V1PodTemplateListFluent{ - public V1PodTemplateListFluentImpl() { - } - public V1PodTemplateListFluentImpl(V1PodTemplateList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1PodTemplate item) { - if (this.items == null) {this.items = new ArrayList();} - V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1PodTemplate item) { - if (this.items == null) {this.items = new ArrayList();} - V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1PodTemplate... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PodTemplate item : items) {V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PodTemplate item : items) {V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1PodTemplate... items) { - for (V1PodTemplate item : items) {V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1PodTemplate item : items) {V1PodTemplateBuilder builder = new V1PodTemplateBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1PodTemplateBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1PodTemplate buildItem(int index) { - return this.items.get(index).build(); - } - public V1PodTemplate buildFirstItem() { - return this.items.get(0).build(); - } - public V1PodTemplate buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1PodTemplate buildMatchingItem(Predicate predicate) { - for (V1PodTemplateBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1PodTemplateBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1PodTemplate item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1PodTemplate... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1PodTemplate item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1PodTemplateListFluentImpl.ItemsNested addNewItem() { - return new V1PodTemplateListFluentImpl.ItemsNestedImpl(); - } - public V1PodTemplateListFluentImpl.ItemsNested addNewItemLike(V1PodTemplate item) { - return new V1PodTemplateListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1PodTemplateListFluentImpl.ItemsNested setNewItemLike(int index,V1PodTemplate item) { - return new V1PodTemplateListFluentImpl.ItemsNestedImpl(index, item); - } - public V1PodTemplateListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1PodTemplateListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1PodTemplateListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1PodTemplateListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1PodTemplateListFluentImpl.MetadataNestedImpl(); - } - public V1PodTemplateListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1PodTemplateListFluentImpl.MetadataNestedImpl(item); - } - public V1PodTemplateListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PodTemplateListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1PodTemplateListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodTemplateListFluentImpl that = (V1PodTemplateListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1PodTemplateFluentImpl> implements V1PodTemplateListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1PodTemplate item) { - this.index = index; - this.builder = new V1PodTemplateBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1PodTemplateBuilder(this); - } - V1PodTemplateBuilder builder; - int index; - public N and() { - return (N) V1PodTemplateListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1PodTemplateListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1PodTemplateListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecBuilder.java index c97065e735..c208cabaad 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PodTemplateSpecBuilder extends V1PodTemplateSpecFluentImpl implements VisitableBuilder{ +public class V1PodTemplateSpecBuilder extends V1PodTemplateSpecFluent implements VisitableBuilder{ public V1PodTemplateSpecBuilder() { - this(false); - } - public V1PodTemplateSpecBuilder(Boolean validationEnabled) { - this(new V1PodTemplateSpec(), validationEnabled); + this(new V1PodTemplateSpec()); } + public V1PodTemplateSpecBuilder(V1PodTemplateSpecFluent fluent) { - this(fluent, false); - } - public V1PodTemplateSpecBuilder(V1PodTemplateSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PodTemplateSpec(), validationEnabled); + this(fluent, new V1PodTemplateSpec()); } + public V1PodTemplateSpecBuilder(V1PodTemplateSpecFluent fluent,V1PodTemplateSpec instance) { - this(fluent, instance, false); - } - public V1PodTemplateSpecBuilder(V1PodTemplateSpecFluent fluent,V1PodTemplateSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PodTemplateSpecBuilder(V1PodTemplateSpec instance) { - this(instance,false); - } - public V1PodTemplateSpecBuilder(V1PodTemplateSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PodTemplateSpecFluent fluent; - Boolean validationEnabled; + public V1PodTemplateSpec build() { V1PodTemplateSpec buildable = new V1PodTemplateSpec(); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecFluent.java index 58cd4fda03..8a08b05c1c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1PodTemplateSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1PodTemplateSpecFluent.MetadataNested withNewMetadata(); - public V1PodTemplateSpecFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1PodTemplateSpecFluent.MetadataNested editMetadata(); - public V1PodTemplateSpecFluent.MetadataNested editOrNewMetadata(); - public V1PodTemplateSpecFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PodSpec getSpec(); - public V1PodSpec buildSpec(); - public A withSpec(V1PodSpec spec); - public Boolean hasSpec(); - public V1PodTemplateSpecFluent.SpecNested withNewSpec(); - public V1PodTemplateSpecFluent.SpecNested withNewSpecLike(V1PodSpec item); - public V1PodTemplateSpecFluent.SpecNested editSpec(); - public V1PodTemplateSpecFluent.SpecNested editOrNewSpec(); - public V1PodTemplateSpecFluent.SpecNested editOrNewSpecLike(V1PodSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PodTemplateSpecFluent> extends BaseFluent{ + public V1PodTemplateSpecFluent() { + } + + public V1PodTemplateSpecFluent(V1PodTemplateSpec instance) { + this.copyInstance(instance); + } + private V1ObjectMetaBuilder metadata; + private V1PodSpecBuilder spec; + + protected void copyInstance(V1PodTemplateSpec instance) { + instance = (instance != null ? instance : new V1PodTemplateSpec()); + if (instance != null) { + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); } - public interface SpecNested extends Nested,V1PodSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1PodSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1PodSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1PodSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1PodSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1PodSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1PodSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PodTemplateSpecFluent that = (V1PodTemplateSpecFluent) o; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1PodTemplateSpecFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + } + public class SpecNested extends V1PodSpecFluent> implements Nested{ + SpecNested(V1PodSpec item) { + this.builder = new V1PodSpecBuilder(this, item); + } + V1PodSpecBuilder builder; + + public N and() { + return (N) V1PodTemplateSpecFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecFluentImpl.java deleted file mode 100644 index e58839a4c0..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PodTemplateSpecFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PodTemplateSpecFluentImpl> extends BaseFluent implements V1PodTemplateSpecFluent{ - public V1PodTemplateSpecFluentImpl() { - } - public V1PodTemplateSpecFluentImpl(V1PodTemplateSpec instance) { - if (instance != null) { - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private V1ObjectMetaBuilder metadata; - private V1PodSpecBuilder spec; - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1PodTemplateSpecFluentImpl.MetadataNested withNewMetadata() { - return new V1PodTemplateSpecFluentImpl.MetadataNestedImpl(); - } - public V1PodTemplateSpecFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1PodTemplateSpecFluentImpl.MetadataNestedImpl(item); - } - public V1PodTemplateSpecFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PodTemplateSpecFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1PodTemplateSpecFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PodSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1PodSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1PodSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1PodSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1PodTemplateSpecFluentImpl.SpecNested withNewSpec() { - return new V1PodTemplateSpecFluentImpl.SpecNestedImpl(); - } - public V1PodTemplateSpecFluentImpl.SpecNested withNewSpecLike(V1PodSpec item) { - return new V1PodTemplateSpecFluentImpl.SpecNestedImpl(item); - } - public V1PodTemplateSpecFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1PodTemplateSpecFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1PodSpecBuilder().build()); - } - public V1PodTemplateSpecFluentImpl.SpecNested editOrNewSpecLike(V1PodSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PodTemplateSpecFluentImpl that = (V1PodTemplateSpecFluentImpl) o; - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1PodTemplateSpecFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1PodTemplateSpecFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1PodSpecFluentImpl> implements V1PodTemplateSpecFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1PodSpec item) { - this.builder = new V1PodSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1PodSpecBuilder(this); - } - V1PodSpecBuilder builder; - public N and() { - return (N) V1PodTemplateSpecFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleBuilder.java index 47bd436122..cc3d026fe7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PolicyRuleBuilder extends V1PolicyRuleFluentImpl implements VisitableBuilder{ +public class V1PolicyRuleBuilder extends V1PolicyRuleFluent implements VisitableBuilder{ public V1PolicyRuleBuilder() { - this(false); - } - public V1PolicyRuleBuilder(Boolean validationEnabled) { - this(new V1PolicyRule(), validationEnabled); + this(new V1PolicyRule()); } + public V1PolicyRuleBuilder(V1PolicyRuleFluent fluent) { - this(fluent, false); - } - public V1PolicyRuleBuilder(V1PolicyRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PolicyRule(), validationEnabled); + this(fluent, new V1PolicyRule()); } + public V1PolicyRuleBuilder(V1PolicyRuleFluent fluent,V1PolicyRule instance) { - this(fluent, instance, false); - } - public V1PolicyRuleBuilder(V1PolicyRuleFluent fluent,V1PolicyRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroups(instance.getApiGroups()); - fluent.withNonResourceURLs(instance.getNonResourceURLs()); - fluent.withResourceNames(instance.getResourceNames()); - fluent.withResources(instance.getResources()); - fluent.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PolicyRuleBuilder(V1PolicyRule instance) { - this(instance,false); - } - public V1PolicyRuleBuilder(V1PolicyRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withNonResourceURLs(instance.getNonResourceURLs()); - this.withResourceNames(instance.getResourceNames()); - this.withResources(instance.getResources()); - this.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PolicyRuleFluent fluent; - Boolean validationEnabled; + public V1PolicyRule build() { V1PolicyRule buildable = new V1PolicyRule(); buildable.setApiGroups(fluent.getApiGroups()); @@ -55,4 +31,5 @@ public V1PolicyRule build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleFluent.java index 54a056bc63..f281402550 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleFluent.java @@ -1,92 +1,540 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1PolicyRuleFluent> extends Fluent{ - public A addToApiGroups(int index,String item); - public A setToApiGroups(int index,String item); - public A addToApiGroups(java.lang.String... items); - public A addAllToApiGroups(Collection items); - public A removeFromApiGroups(java.lang.String... items); - public A removeAllFromApiGroups(Collection items); - public List getApiGroups(); - public String getApiGroup(int index); - public String getFirstApiGroup(); - public String getLastApiGroup(); - public String getMatchingApiGroup(Predicate predicate); - public Boolean hasMatchingApiGroup(Predicate predicate); - public A withApiGroups(List apiGroups); - public A withApiGroups(java.lang.String... apiGroups); - public Boolean hasApiGroups(); - public A addToNonResourceURLs(int index,String item); - public A setToNonResourceURLs(int index,String item); - public A addToNonResourceURLs(java.lang.String... items); - public A addAllToNonResourceURLs(Collection items); - public A removeFromNonResourceURLs(java.lang.String... items); - public A removeAllFromNonResourceURLs(Collection items); - public List getNonResourceURLs(); - public String getNonResourceURL(int index); - public String getFirstNonResourceURL(); - public String getLastNonResourceURL(); - public String getMatchingNonResourceURL(Predicate predicate); - public Boolean hasMatchingNonResourceURL(Predicate predicate); - public A withNonResourceURLs(List nonResourceURLs); - public A withNonResourceURLs(java.lang.String... nonResourceURLs); - public Boolean hasNonResourceURLs(); - public A addToResourceNames(int index,String item); - public A setToResourceNames(int index,String item); - public A addToResourceNames(java.lang.String... items); - public A addAllToResourceNames(Collection items); - public A removeFromResourceNames(java.lang.String... items); - public A removeAllFromResourceNames(Collection items); - public List getResourceNames(); - public String getResourceName(int index); - public String getFirstResourceName(); - public String getLastResourceName(); - public String getMatchingResourceName(Predicate predicate); - public Boolean hasMatchingResourceName(Predicate predicate); - public A withResourceNames(List resourceNames); - public A withResourceNames(java.lang.String... resourceNames); - public Boolean hasResourceNames(); - public A addToResources(int index,String item); - public A setToResources(int index,String item); - public A addToResources(java.lang.String... items); - public A addAllToResources(Collection items); - public A removeFromResources(java.lang.String... items); - public A removeAllFromResources(Collection items); - public List getResources(); - public String getResource(int index); - public String getFirstResource(); - public String getLastResource(); - public String getMatchingResource(Predicate predicate); - public Boolean hasMatchingResource(Predicate predicate); - public A withResources(List resources); - public A withResources(java.lang.String... resources); - public Boolean hasResources(); - public A addToVerbs(int index,String item); - public A setToVerbs(int index,String item); - public A addToVerbs(java.lang.String... items); - public A addAllToVerbs(Collection items); - public A removeFromVerbs(java.lang.String... items); - public A removeAllFromVerbs(Collection items); - public List getVerbs(); - public String getVerb(int index); - public String getFirstVerb(); - public String getLastVerb(); - public String getMatchingVerb(Predicate predicate); - public Boolean hasMatchingVerb(Predicate predicate); - public A withVerbs(List verbs); - public A withVerbs(java.lang.String... verbs); - public Boolean hasVerbs(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PolicyRuleFluent> extends BaseFluent{ + public V1PolicyRuleFluent() { + } + public V1PolicyRuleFluent(V1PolicyRule instance) { + this.copyInstance(instance); + } + private List apiGroups; + private List nonResourceURLs; + private List resourceNames; + private List resources; + private List verbs; + + protected void copyInstance(V1PolicyRule instance) { + instance = (instance != null ? instance : new V1PolicyRule()); + if (instance != null) { + this.withApiGroups(instance.getApiGroups()); + this.withNonResourceURLs(instance.getNonResourceURLs()); + this.withResourceNames(instance.getResourceNames()); + this.withResources(instance.getResources()); + this.withVerbs(instance.getVerbs()); + } + } + + public A addToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.add(index, item); + return (A)this; + } + + public A setToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.set(index, item); return (A)this; + } + + public A addToApiGroups(java.lang.String... items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A addAllToApiGroups(Collection items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A removeFromApiGroups(java.lang.String... items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public A removeAllFromApiGroups(Collection items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public List getApiGroups() { + return this.apiGroups; + } + + public String getApiGroup(int index) { + return this.apiGroups.get(index); + } + + public String getFirstApiGroup() { + return this.apiGroups.get(0); + } + + public String getLastApiGroup() { + return this.apiGroups.get(apiGroups.size() - 1); + } + + public String getMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withApiGroups(List apiGroups) { + if (apiGroups != null) { + this.apiGroups = new ArrayList(); + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } else { + this.apiGroups = null; + } + return (A) this; + } + + public A withApiGroups(java.lang.String... apiGroups) { + if (this.apiGroups != null) { + this.apiGroups.clear(); + _visitables.remove("apiGroups"); + } + if (apiGroups != null) { + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } + return (A) this; + } + + public boolean hasApiGroups() { + return this.apiGroups != null && !this.apiGroups.isEmpty(); + } + + public A addToNonResourceURLs(int index,String item) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + this.nonResourceURLs.add(index, item); + return (A)this; + } + + public A setToNonResourceURLs(int index,String item) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + this.nonResourceURLs.set(index, item); return (A)this; + } + + public A addToNonResourceURLs(java.lang.String... items) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; + } + + public A addAllToNonResourceURLs(Collection items) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; + } + + public A removeFromNonResourceURLs(java.lang.String... items) { + if (this.nonResourceURLs == null) return (A)this; + for (String item : items) { this.nonResourceURLs.remove(item);} return (A)this; + } + + public A removeAllFromNonResourceURLs(Collection items) { + if (this.nonResourceURLs == null) return (A)this; + for (String item : items) { this.nonResourceURLs.remove(item);} return (A)this; + } + + public List getNonResourceURLs() { + return this.nonResourceURLs; + } + + public String getNonResourceURL(int index) { + return this.nonResourceURLs.get(index); + } + + public String getFirstNonResourceURL() { + return this.nonResourceURLs.get(0); + } + + public String getLastNonResourceURL() { + return this.nonResourceURLs.get(nonResourceURLs.size() - 1); + } + + public String getMatchingNonResourceURL(Predicate predicate) { + for (String item : nonResourceURLs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingNonResourceURL(Predicate predicate) { + for (String item : nonResourceURLs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNonResourceURLs(List nonResourceURLs) { + if (nonResourceURLs != null) { + this.nonResourceURLs = new ArrayList(); + for (String item : nonResourceURLs) { + this.addToNonResourceURLs(item); + } + } else { + this.nonResourceURLs = null; + } + return (A) this; + } + + public A withNonResourceURLs(java.lang.String... nonResourceURLs) { + if (this.nonResourceURLs != null) { + this.nonResourceURLs.clear(); + _visitables.remove("nonResourceURLs"); + } + if (nonResourceURLs != null) { + for (String item : nonResourceURLs) { + this.addToNonResourceURLs(item); + } + } + return (A) this; + } + + public boolean hasNonResourceURLs() { + return this.nonResourceURLs != null && !this.nonResourceURLs.isEmpty(); + } + + public A addToResourceNames(int index,String item) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + this.resourceNames.add(index, item); + return (A)this; + } + + public A setToResourceNames(int index,String item) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + this.resourceNames.set(index, item); return (A)this; + } + + public A addToResourceNames(java.lang.String... items) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + for (String item : items) {this.resourceNames.add(item);} return (A)this; + } + + public A addAllToResourceNames(Collection items) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + for (String item : items) {this.resourceNames.add(item);} return (A)this; + } + + public A removeFromResourceNames(java.lang.String... items) { + if (this.resourceNames == null) return (A)this; + for (String item : items) { this.resourceNames.remove(item);} return (A)this; + } + + public A removeAllFromResourceNames(Collection items) { + if (this.resourceNames == null) return (A)this; + for (String item : items) { this.resourceNames.remove(item);} return (A)this; + } + + public List getResourceNames() { + return this.resourceNames; + } + + public String getResourceName(int index) { + return this.resourceNames.get(index); + } + + public String getFirstResourceName() { + return this.resourceNames.get(0); + } + + public String getLastResourceName() { + return this.resourceNames.get(resourceNames.size() - 1); + } + + public String getMatchingResourceName(Predicate predicate) { + for (String item : resourceNames) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingResourceName(Predicate predicate) { + for (String item : resourceNames) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceNames(List resourceNames) { + if (resourceNames != null) { + this.resourceNames = new ArrayList(); + for (String item : resourceNames) { + this.addToResourceNames(item); + } + } else { + this.resourceNames = null; + } + return (A) this; + } + + public A withResourceNames(java.lang.String... resourceNames) { + if (this.resourceNames != null) { + this.resourceNames.clear(); + _visitables.remove("resourceNames"); + } + if (resourceNames != null) { + for (String item : resourceNames) { + this.addToResourceNames(item); + } + } + return (A) this; + } + + public boolean hasResourceNames() { + return this.resourceNames != null && !this.resourceNames.isEmpty(); + } + + public A addToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.add(index, item); + return (A)this; + } + + public A setToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.set(index, item); return (A)this; + } + + public A addToResources(java.lang.String... items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A addAllToResources(Collection items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A removeFromResources(java.lang.String... items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public A removeAllFromResources(Collection items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public List getResources() { + return this.resources; + } + + public String getResource(int index) { + return this.resources.get(index); + } + + public String getFirstResource() { + return this.resources.get(0); + } + + public String getLastResource() { + return this.resources.get(resources.size() - 1); + } + + public String getMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResources(List resources) { + if (resources != null) { + this.resources = new ArrayList(); + for (String item : resources) { + this.addToResources(item); + } + } else { + this.resources = null; + } + return (A) this; + } + + public A withResources(java.lang.String... resources) { + if (this.resources != null) { + this.resources.clear(); + _visitables.remove("resources"); + } + if (resources != null) { + for (String item : resources) { + this.addToResources(item); + } + } + return (A) this; + } + + public boolean hasResources() { + return this.resources != null && !this.resources.isEmpty(); + } + + public A addToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.add(index, item); + return (A)this; + } + + public A setToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.set(index, item); return (A)this; + } + + public A addToVerbs(java.lang.String... items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A addAllToVerbs(Collection items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A removeFromVerbs(java.lang.String... items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public A removeAllFromVerbs(Collection items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public List getVerbs() { + return this.verbs; + } + + public String getVerb(int index) { + return this.verbs.get(index); + } + + public String getFirstVerb() { + return this.verbs.get(0); + } + + public String getLastVerb() { + return this.verbs.get(verbs.size() - 1); + } + + public String getMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVerbs(List verbs) { + if (verbs != null) { + this.verbs = new ArrayList(); + for (String item : verbs) { + this.addToVerbs(item); + } + } else { + this.verbs = null; + } + return (A) this; + } + + public A withVerbs(java.lang.String... verbs) { + if (this.verbs != null) { + this.verbs.clear(); + _visitables.remove("verbs"); + } + if (verbs != null) { + for (String item : verbs) { + this.addToVerbs(item); + } + } + return (A) this; + } + + public boolean hasVerbs() { + return this.verbs != null && !this.verbs.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PolicyRuleFluent that = (V1PolicyRuleFluent) o; + if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; + if (!java.util.Objects.equals(nonResourceURLs, that.nonResourceURLs)) return false; + if (!java.util.Objects.equals(resourceNames, that.resourceNames)) return false; + if (!java.util.Objects.equals(resources, that.resources)) return false; + if (!java.util.Objects.equals(verbs, that.verbs)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroups, nonResourceURLs, resourceNames, resources, verbs, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } + if (nonResourceURLs != null && !nonResourceURLs.isEmpty()) { sb.append("nonResourceURLs:"); sb.append(nonResourceURLs + ","); } + if (resourceNames != null && !resourceNames.isEmpty()) { sb.append("resourceNames:"); sb.append(resourceNames + ","); } + if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } + if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleFluentImpl.java deleted file mode 100644 index 1e97e20572..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PolicyRuleFluentImpl.java +++ /dev/null @@ -1,321 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PolicyRuleFluentImpl> extends BaseFluent implements V1PolicyRuleFluent{ - public V1PolicyRuleFluentImpl() { - } - public V1PolicyRuleFluentImpl(V1PolicyRule instance) { - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withNonResourceURLs(instance.getNonResourceURLs()); - this.withResourceNames(instance.getResourceNames()); - this.withResources(instance.getResources()); - this.withVerbs(instance.getVerbs()); - } - } - private List apiGroups; - private List nonResourceURLs; - private List resourceNames; - private List resources; - private List verbs; - public A addToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.add(index, item); - return (A)this; - } - public A setToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.set(index, item); return (A)this; - } - public A addToApiGroups(java.lang.String... items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A addAllToApiGroups(Collection items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A removeFromApiGroups(java.lang.String... items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public A removeAllFromApiGroups(Collection items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public List getApiGroups() { - return this.apiGroups; - } - public String getApiGroup(int index) { - return this.apiGroups.get(index); - } - public String getFirstApiGroup() { - return this.apiGroups.get(0); - } - public String getLastApiGroup() { - return this.apiGroups.get(apiGroups.size() - 1); - } - public String getMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return true;} } return false; - } - public A withApiGroups(List apiGroups) { - if (apiGroups != null) {this.apiGroups = new ArrayList(); for (String item : apiGroups){this.addToApiGroups(item);}} else { this.apiGroups = null;} return (A) this; - } - public A withApiGroups(java.lang.String... apiGroups) { - if (this.apiGroups != null) {this.apiGroups.clear(); _visitables.remove("apiGroups"); } - if (apiGroups != null) {for (String item :apiGroups){ this.addToApiGroups(item);}} return (A) this; - } - public Boolean hasApiGroups() { - return apiGroups != null && !apiGroups.isEmpty(); - } - public A addToNonResourceURLs(int index,String item) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - this.nonResourceURLs.add(index, item); - return (A)this; - } - public A setToNonResourceURLs(int index,String item) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - this.nonResourceURLs.set(index, item); return (A)this; - } - public A addToNonResourceURLs(java.lang.String... items) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; - } - public A addAllToNonResourceURLs(Collection items) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; - } - public A removeFromNonResourceURLs(java.lang.String... items) { - for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this; - } - public A removeAllFromNonResourceURLs(Collection items) { - for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this; - } - public List getNonResourceURLs() { - return this.nonResourceURLs; - } - public String getNonResourceURL(int index) { - return this.nonResourceURLs.get(index); - } - public String getFirstNonResourceURL() { - return this.nonResourceURLs.get(0); - } - public String getLastNonResourceURL() { - return this.nonResourceURLs.get(nonResourceURLs.size() - 1); - } - public String getMatchingNonResourceURL(Predicate predicate) { - for (String item: nonResourceURLs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingNonResourceURL(Predicate predicate) { - for (String item: nonResourceURLs) { if(predicate.test(item)){ return true;} } return false; - } - public A withNonResourceURLs(List nonResourceURLs) { - if (nonResourceURLs != null) {this.nonResourceURLs = new ArrayList(); for (String item : nonResourceURLs){this.addToNonResourceURLs(item);}} else { this.nonResourceURLs = null;} return (A) this; - } - public A withNonResourceURLs(java.lang.String... nonResourceURLs) { - if (this.nonResourceURLs != null) {this.nonResourceURLs.clear(); _visitables.remove("nonResourceURLs"); } - if (nonResourceURLs != null) {for (String item :nonResourceURLs){ this.addToNonResourceURLs(item);}} return (A) this; - } - public Boolean hasNonResourceURLs() { - return nonResourceURLs != null && !nonResourceURLs.isEmpty(); - } - public A addToResourceNames(int index,String item) { - if (this.resourceNames == null) {this.resourceNames = new ArrayList();} - this.resourceNames.add(index, item); - return (A)this; - } - public A setToResourceNames(int index,String item) { - if (this.resourceNames == null) {this.resourceNames = new ArrayList();} - this.resourceNames.set(index, item); return (A)this; - } - public A addToResourceNames(java.lang.String... items) { - if (this.resourceNames == null) {this.resourceNames = new ArrayList();} - for (String item : items) {this.resourceNames.add(item);} return (A)this; - } - public A addAllToResourceNames(Collection items) { - if (this.resourceNames == null) {this.resourceNames = new ArrayList();} - for (String item : items) {this.resourceNames.add(item);} return (A)this; - } - public A removeFromResourceNames(java.lang.String... items) { - for (String item : items) {if (this.resourceNames!= null){ this.resourceNames.remove(item);}} return (A)this; - } - public A removeAllFromResourceNames(Collection items) { - for (String item : items) {if (this.resourceNames!= null){ this.resourceNames.remove(item);}} return (A)this; - } - public List getResourceNames() { - return this.resourceNames; - } - public String getResourceName(int index) { - return this.resourceNames.get(index); - } - public String getFirstResourceName() { - return this.resourceNames.get(0); - } - public String getLastResourceName() { - return this.resourceNames.get(resourceNames.size() - 1); - } - public String getMatchingResourceName(Predicate predicate) { - for (String item: resourceNames) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingResourceName(Predicate predicate) { - for (String item: resourceNames) { if(predicate.test(item)){ return true;} } return false; - } - public A withResourceNames(List resourceNames) { - if (resourceNames != null) {this.resourceNames = new ArrayList(); for (String item : resourceNames){this.addToResourceNames(item);}} else { this.resourceNames = null;} return (A) this; - } - public A withResourceNames(java.lang.String... resourceNames) { - if (this.resourceNames != null) {this.resourceNames.clear(); _visitables.remove("resourceNames"); } - if (resourceNames != null) {for (String item :resourceNames){ this.addToResourceNames(item);}} return (A) this; - } - public Boolean hasResourceNames() { - return resourceNames != null && !resourceNames.isEmpty(); - } - public A addToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.add(index, item); - return (A)this; - } - public A setToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.set(index, item); return (A)this; - } - public A addToResources(java.lang.String... items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A addAllToResources(Collection items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A removeFromResources(java.lang.String... items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public A removeAllFromResources(Collection items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public List getResources() { - return this.resources; - } - public String getResource(int index) { - return this.resources.get(index); - } - public String getFirstResource() { - return this.resources.get(0); - } - public String getLastResource() { - return this.resources.get(resources.size() - 1); - } - public String getMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return true;} } return false; - } - public A withResources(List resources) { - if (resources != null) {this.resources = new ArrayList(); for (String item : resources){this.addToResources(item);}} else { this.resources = null;} return (A) this; - } - public A withResources(java.lang.String... resources) { - if (this.resources != null) {this.resources.clear(); _visitables.remove("resources"); } - if (resources != null) {for (String item :resources){ this.addToResources(item);}} return (A) this; - } - public Boolean hasResources() { - return resources != null && !resources.isEmpty(); - } - public A addToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.add(index, item); - return (A)this; - } - public A setToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.set(index, item); return (A)this; - } - public A addToVerbs(java.lang.String... items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A addAllToVerbs(Collection items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A removeFromVerbs(java.lang.String... items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public A removeAllFromVerbs(Collection items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public List getVerbs() { - return this.verbs; - } - public String getVerb(int index) { - return this.verbs.get(index); - } - public String getFirstVerb() { - return this.verbs.get(0); - } - public String getLastVerb() { - return this.verbs.get(verbs.size() - 1); - } - public String getMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return true;} } return false; - } - public A withVerbs(List verbs) { - if (verbs != null) {this.verbs = new ArrayList(); for (String item : verbs){this.addToVerbs(item);}} else { this.verbs = null;} return (A) this; - } - public A withVerbs(java.lang.String... verbs) { - if (this.verbs != null) {this.verbs.clear(); _visitables.remove("verbs"); } - if (verbs != null) {for (String item :verbs){ this.addToVerbs(item);}} return (A) this; - } - public Boolean hasVerbs() { - return verbs != null && !verbs.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PolicyRuleFluentImpl that = (V1PolicyRuleFluentImpl) o; - if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; - - if (!java.util.Objects.equals(nonResourceURLs, that.nonResourceURLs)) return false; - - if (!java.util.Objects.equals(resourceNames, that.resourceNames)) return false; - - if (!java.util.Objects.equals(resources, that.resources)) return false; - - if (!java.util.Objects.equals(verbs, that.verbs)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroups, nonResourceURLs, resourceNames, resources, verbs, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } - if (nonResourceURLs != null && !nonResourceURLs.isEmpty()) { sb.append("nonResourceURLs:"); sb.append(nonResourceURLs + ","); } - if (resourceNames != null && !resourceNames.isEmpty()) { sb.append("resourceNames:"); sb.append(resourceNames + ","); } - if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } - if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusBuilder.java index c36cefec2a..41a76b1960 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PortStatusBuilder extends V1PortStatusFluentImpl implements VisitableBuilder{ +public class V1PortStatusBuilder extends V1PortStatusFluent implements VisitableBuilder{ public V1PortStatusBuilder() { - this(false); - } - public V1PortStatusBuilder(Boolean validationEnabled) { - this(new V1PortStatus(), validationEnabled); + this(new V1PortStatus()); } + public V1PortStatusBuilder(V1PortStatusFluent fluent) { - this(fluent, false); - } - public V1PortStatusBuilder(V1PortStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PortStatus(), validationEnabled); + this(fluent, new V1PortStatus()); } + public V1PortStatusBuilder(V1PortStatusFluent fluent,V1PortStatus instance) { - this(fluent, instance, false); - } - public V1PortStatusBuilder(V1PortStatusFluent fluent,V1PortStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withError(instance.getError()); - fluent.withPort(instance.getPort()); - fluent.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PortStatusBuilder(V1PortStatus instance) { - this(instance,false); - } - public V1PortStatusBuilder(V1PortStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withError(instance.getError()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PortStatusFluent fluent; - Boolean validationEnabled; + public V1PortStatus build() { V1PortStatus buildable = new V1PortStatus(); buildable.setError(fluent.getError()); @@ -49,4 +29,5 @@ public V1PortStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusFluent.java index ca57ee662c..fb24c8be92 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusFluent.java @@ -1,23 +1,98 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PortStatusFluent> extends Fluent{ - public String getError(); - public A withError(String error); - public Boolean hasError(); - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); - public String getProtocol(); - public A withProtocol(String protocol); - public Boolean hasProtocol(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PortStatusFluent> extends BaseFluent{ + public V1PortStatusFluent() { + } + public V1PortStatusFluent(V1PortStatus instance) { + this.copyInstance(instance); + } + private String error; + private Integer port; + private String protocol; + + protected void copyInstance(V1PortStatus instance) { + instance = (instance != null ? instance : new V1PortStatus()); + if (instance != null) { + this.withError(instance.getError()); + this.withPort(instance.getPort()); + this.withProtocol(instance.getProtocol()); + } + } + + public String getError() { + return this.error; + } + + public A withError(String error) { + this.error = error; + return (A) this; + } + + public boolean hasError() { + return this.error != null; + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public String getProtocol() { + return this.protocol; + } + + public A withProtocol(String protocol) { + this.protocol = protocol; + return (A) this; + } + + public boolean hasProtocol() { + return this.protocol != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PortStatusFluent that = (V1PortStatusFluent) o; + if (!java.util.Objects.equals(error, that.error)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + if (!java.util.Objects.equals(protocol, that.protocol)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(error, port, protocol, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (error != null) { sb.append("error:"); sb.append(error + ","); } + if (port != null) { sb.append("port:"); sb.append(port + ","); } + if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusFluentImpl.java deleted file mode 100644 index beaabd6eba..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortStatusFluentImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PortStatusFluentImpl> extends BaseFluent implements V1PortStatusFluent{ - public V1PortStatusFluentImpl() { - } - public V1PortStatusFluentImpl(V1PortStatus instance) { - if (instance != null) { - this.withError(instance.getError()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - } - } - private String error; - private Integer port; - private String protocol; - public String getError() { - return this.error; - } - public A withError(String error) { - this.error=error; return (A) this; - } - public Boolean hasError() { - return this.error != null; - } - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public String getProtocol() { - return this.protocol; - } - public A withProtocol(String protocol) { - this.protocol=protocol; return (A) this; - } - public Boolean hasProtocol() { - return this.protocol != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PortStatusFluentImpl that = (V1PortStatusFluentImpl) o; - if (!java.util.Objects.equals(error, that.error)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - if (!java.util.Objects.equals(protocol, that.protocol)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(error, port, protocol, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (error != null) { sb.append("error:"); sb.append(error + ","); } - if (port != null) { sb.append("port:"); sb.append(port + ","); } - if (protocol != null) { sb.append("protocol:"); sb.append(protocol); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceBuilder.java index 2d069645ff..77c3db9fd8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PortworxVolumeSourceBuilder extends V1PortworxVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1PortworxVolumeSourceBuilder extends V1PortworxVolumeSourceFluent implements VisitableBuilder{ public V1PortworxVolumeSourceBuilder() { - this(false); - } - public V1PortworxVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1PortworxVolumeSource(), validationEnabled); + this(new V1PortworxVolumeSource()); } + public V1PortworxVolumeSourceBuilder(V1PortworxVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1PortworxVolumeSourceBuilder(V1PortworxVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PortworxVolumeSource(), validationEnabled); + this(fluent, new V1PortworxVolumeSource()); } + public V1PortworxVolumeSourceBuilder(V1PortworxVolumeSourceFluent fluent,V1PortworxVolumeSource instance) { - this(fluent, instance, false); - } - public V1PortworxVolumeSourceBuilder(V1PortworxVolumeSourceFluent fluent,V1PortworxVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withVolumeID(instance.getVolumeID()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PortworxVolumeSourceBuilder(V1PortworxVolumeSource instance) { - this(instance,false); - } - public V1PortworxVolumeSourceBuilder(V1PortworxVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withVolumeID(instance.getVolumeID()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PortworxVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1PortworxVolumeSource build() { V1PortworxVolumeSource buildable = new V1PortworxVolumeSource(); buildable.setFsType(fluent.getFsType()); @@ -49,4 +29,5 @@ public V1PortworxVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceFluent.java index f0028375aa..70ac442b30 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceFluent.java @@ -1,23 +1,102 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1PortworxVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public String getVolumeID(); - public A withVolumeID(String volumeID); - public Boolean hasVolumeID(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PortworxVolumeSourceFluent> extends BaseFluent{ + public V1PortworxVolumeSourceFluent() { + } + public V1PortworxVolumeSourceFluent(V1PortworxVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private Boolean readOnly; + private String volumeID; + + protected void copyInstance(V1PortworxVolumeSource instance) { + instance = (instance != null ? instance : new V1PortworxVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withReadOnly(instance.getReadOnly()); + this.withVolumeID(instance.getVolumeID()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public String getVolumeID() { + return this.volumeID; + } + + public A withVolumeID(String volumeID) { + this.volumeID = volumeID; + return (A) this; + } + + public boolean hasVolumeID() { + return this.volumeID != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PortworxVolumeSourceFluent that = (V1PortworxVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(volumeID, that.volumeID)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, readOnly, volumeID, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (volumeID != null) { sb.append("volumeID:"); sb.append(volumeID); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceFluentImpl.java deleted file mode 100644 index 3a3e5f0732..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PortworxVolumeSourceFluentImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PortworxVolumeSourceFluentImpl> extends BaseFluent implements V1PortworxVolumeSourceFluent{ - public V1PortworxVolumeSourceFluentImpl() { - } - public V1PortworxVolumeSourceFluentImpl(V1PortworxVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withVolumeID(instance.getVolumeID()); - } - } - private String fsType; - private Boolean readOnly; - private String volumeID; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public String getVolumeID() { - return this.volumeID; - } - public A withVolumeID(String volumeID) { - this.volumeID=volumeID; return (A) this; - } - public Boolean hasVolumeID() { - return this.volumeID != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PortworxVolumeSourceFluentImpl that = (V1PortworxVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(volumeID, that.volumeID)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, readOnly, volumeID, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (volumeID != null) { sb.append("volumeID:"); sb.append(volumeID); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsBuilder.java index e4411ed579..4dc7ff1453 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PreconditionsBuilder extends V1PreconditionsFluentImpl implements VisitableBuilder{ +public class V1PreconditionsBuilder extends V1PreconditionsFluent implements VisitableBuilder{ public V1PreconditionsBuilder() { - this(false); - } - public V1PreconditionsBuilder(Boolean validationEnabled) { - this(new V1Preconditions(), validationEnabled); + this(new V1Preconditions()); } + public V1PreconditionsBuilder(V1PreconditionsFluent fluent) { - this(fluent, false); - } - public V1PreconditionsBuilder(V1PreconditionsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Preconditions(), validationEnabled); + this(fluent, new V1Preconditions()); } + public V1PreconditionsBuilder(V1PreconditionsFluent fluent,V1Preconditions instance) { - this(fluent, instance, false); - } - public V1PreconditionsBuilder(V1PreconditionsFluent fluent,V1Preconditions instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withResourceVersion(instance.getResourceVersion()); - fluent.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PreconditionsBuilder(V1Preconditions instance) { - this(instance,false); - } - public V1PreconditionsBuilder(V1Preconditions instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withResourceVersion(instance.getResourceVersion()); - this.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PreconditionsFluent fluent; - Boolean validationEnabled; + public V1Preconditions build() { V1Preconditions buildable = new V1Preconditions(); buildable.setResourceVersion(fluent.getResourceVersion()); @@ -46,4 +28,5 @@ public V1Preconditions build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsFluent.java index 15f98dc4de..7749540073 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PreconditionsFluent> extends Fluent{ - public String getResourceVersion(); - public A withResourceVersion(String resourceVersion); - public Boolean hasResourceVersion(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PreconditionsFluent> extends BaseFluent{ + public V1PreconditionsFluent() { + } + public V1PreconditionsFluent(V1Preconditions instance) { + this.copyInstance(instance); + } + private String resourceVersion; + private String uid; + + protected void copyInstance(V1Preconditions instance) { + instance = (instance != null ? instance : new V1Preconditions()); + if (instance != null) { + this.withResourceVersion(instance.getResourceVersion()); + this.withUid(instance.getUid()); + } + } + + public String getResourceVersion() { + return this.resourceVersion; + } + + public A withResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + return (A) this; + } + + public boolean hasResourceVersion() { + return this.resourceVersion != null; + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PreconditionsFluent that = (V1PreconditionsFluent) o; + if (!java.util.Objects.equals(resourceVersion, that.resourceVersion)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(resourceVersion, uid, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (resourceVersion != null) { sb.append("resourceVersion:"); sb.append(resourceVersion + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsFluentImpl.java deleted file mode 100644 index c8cfee41d2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreconditionsFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PreconditionsFluentImpl> extends BaseFluent implements V1PreconditionsFluent{ - public V1PreconditionsFluentImpl() { - } - public V1PreconditionsFluentImpl(V1Preconditions instance) { - if (instance != null) { - this.withResourceVersion(instance.getResourceVersion()); - this.withUid(instance.getUid()); - } - } - private String resourceVersion; - private String uid; - public String getResourceVersion() { - return this.resourceVersion; - } - public A withResourceVersion(String resourceVersion) { - this.resourceVersion=resourceVersion; return (A) this; - } - public Boolean hasResourceVersion() { - return this.resourceVersion != null; - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PreconditionsFluentImpl that = (V1PreconditionsFluentImpl) o; - if (!java.util.Objects.equals(resourceVersion, that.resourceVersion)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(resourceVersion, uid, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (resourceVersion != null) { sb.append("resourceVersion:"); sb.append(resourceVersion + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermBuilder.java index 63a1b22155..1e060fe8cc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PreferredSchedulingTermBuilder extends V1PreferredSchedulingTermFluentImpl implements VisitableBuilder{ +public class V1PreferredSchedulingTermBuilder extends V1PreferredSchedulingTermFluent implements VisitableBuilder{ public V1PreferredSchedulingTermBuilder() { - this(false); - } - public V1PreferredSchedulingTermBuilder(Boolean validationEnabled) { - this(new V1PreferredSchedulingTerm(), validationEnabled); + this(new V1PreferredSchedulingTerm()); } + public V1PreferredSchedulingTermBuilder(V1PreferredSchedulingTermFluent fluent) { - this(fluent, false); - } - public V1PreferredSchedulingTermBuilder(V1PreferredSchedulingTermFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PreferredSchedulingTerm(), validationEnabled); + this(fluent, new V1PreferredSchedulingTerm()); } + public V1PreferredSchedulingTermBuilder(V1PreferredSchedulingTermFluent fluent,V1PreferredSchedulingTerm instance) { - this(fluent, instance, false); - } - public V1PreferredSchedulingTermBuilder(V1PreferredSchedulingTermFluent fluent,V1PreferredSchedulingTerm instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPreference(instance.getPreference()); - fluent.withWeight(instance.getWeight()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PreferredSchedulingTermBuilder(V1PreferredSchedulingTerm instance) { - this(instance,false); - } - public V1PreferredSchedulingTermBuilder(V1PreferredSchedulingTerm instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPreference(instance.getPreference()); - this.withWeight(instance.getWeight()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PreferredSchedulingTermFluent fluent; - Boolean validationEnabled; + public V1PreferredSchedulingTerm build() { V1PreferredSchedulingTerm buildable = new V1PreferredSchedulingTerm(); - buildable.setPreference(fluent.getPreference()); + buildable.setPreference(fluent.buildPreference()); buildable.setWeight(fluent.getWeight()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermFluent.java index a3499cd8ba..c58150f25a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermFluent.java @@ -1,38 +1,124 @@ package io.kubernetes.client.openapi.models; -import java.lang.Integer; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import java.lang.Integer; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1PreferredSchedulingTermFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildPreference instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelectorTerm getPreference(); - public V1NodeSelectorTerm buildPreference(); - public A withPreference(V1NodeSelectorTerm preference); - public Boolean hasPreference(); - public V1PreferredSchedulingTermFluent.PreferenceNested withNewPreference(); - public V1PreferredSchedulingTermFluent.PreferenceNested withNewPreferenceLike(V1NodeSelectorTerm item); - public V1PreferredSchedulingTermFluent.PreferenceNested editPreference(); - public V1PreferredSchedulingTermFluent.PreferenceNested editOrNewPreference(); - public V1PreferredSchedulingTermFluent.PreferenceNested editOrNewPreferenceLike(V1NodeSelectorTerm item); - public Integer getWeight(); - public A withWeight(Integer weight); - public Boolean hasWeight(); - public interface PreferenceNested extends Nested,V1NodeSelectorTermFluent>{ - public N and(); - public N endPreference(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PreferredSchedulingTermFluent> extends BaseFluent{ + public V1PreferredSchedulingTermFluent() { + } + + public V1PreferredSchedulingTermFluent(V1PreferredSchedulingTerm instance) { + this.copyInstance(instance); + } + private V1NodeSelectorTermBuilder preference; + private Integer weight; + + protected void copyInstance(V1PreferredSchedulingTerm instance) { + instance = (instance != null ? instance : new V1PreferredSchedulingTerm()); + if (instance != null) { + this.withPreference(instance.getPreference()); + this.withWeight(instance.getWeight()); + } + } + + public V1NodeSelectorTerm buildPreference() { + return this.preference != null ? this.preference.build() : null; + } + + public A withPreference(V1NodeSelectorTerm preference) { + this._visitables.remove("preference"); + if (preference != null) { + this.preference = new V1NodeSelectorTermBuilder(preference); + this._visitables.get("preference").add(this.preference); + } else { + this.preference = null; + this._visitables.get("preference").remove(this.preference); + } + return (A) this; + } + + public boolean hasPreference() { + return this.preference != null; + } + + public PreferenceNested withNewPreference() { + return new PreferenceNested(null); + } + + public PreferenceNested withNewPreferenceLike(V1NodeSelectorTerm item) { + return new PreferenceNested(item); + } + + public PreferenceNested editPreference() { + return withNewPreferenceLike(java.util.Optional.ofNullable(buildPreference()).orElse(null)); + } + + public PreferenceNested editOrNewPreference() { + return withNewPreferenceLike(java.util.Optional.ofNullable(buildPreference()).orElse(new V1NodeSelectorTermBuilder().build())); + } + + public PreferenceNested editOrNewPreferenceLike(V1NodeSelectorTerm item) { + return withNewPreferenceLike(java.util.Optional.ofNullable(buildPreference()).orElse(item)); + } + + public Integer getWeight() { + return this.weight; + } + + public A withWeight(Integer weight) { + this.weight = weight; + return (A) this; + } + + public boolean hasWeight() { + return this.weight != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PreferredSchedulingTermFluent that = (V1PreferredSchedulingTermFluent) o; + if (!java.util.Objects.equals(preference, that.preference)) return false; + if (!java.util.Objects.equals(weight, that.weight)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(preference, weight, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (preference != null) { sb.append("preference:"); sb.append(preference + ","); } + if (weight != null) { sb.append("weight:"); sb.append(weight); } + sb.append("}"); + return sb.toString(); } + public class PreferenceNested extends V1NodeSelectorTermFluent> implements Nested{ + PreferenceNested(V1NodeSelectorTerm item) { + this.builder = new V1NodeSelectorTermBuilder(this, item); + } + V1NodeSelectorTermBuilder builder; + + public N and() { + return (N) V1PreferredSchedulingTermFluent.this.withPreference(builder.build()); + } + + public N endPreference() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermFluentImpl.java deleted file mode 100644 index ab4787b0ec..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PreferredSchedulingTermFluentImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PreferredSchedulingTermFluentImpl> extends BaseFluent implements V1PreferredSchedulingTermFluent{ - public V1PreferredSchedulingTermFluentImpl() { - } - public V1PreferredSchedulingTermFluentImpl(V1PreferredSchedulingTerm instance) { - if (instance != null) { - this.withPreference(instance.getPreference()); - this.withWeight(instance.getWeight()); - } - } - private V1NodeSelectorTermBuilder preference; - private Integer weight; - - /** - * This method has been deprecated, please use method buildPreference instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelectorTerm getPreference() { - return this.preference!=null ?this.preference.build():null; - } - public V1NodeSelectorTerm buildPreference() { - return this.preference!=null ?this.preference.build():null; - } - public A withPreference(V1NodeSelectorTerm preference) { - _visitables.get("preference").remove(this.preference); - if (preference!=null){ this.preference= new V1NodeSelectorTermBuilder(preference); _visitables.get("preference").add(this.preference);} else { this.preference = null; _visitables.get("preference").remove(this.preference); } return (A) this; - } - public Boolean hasPreference() { - return this.preference != null; - } - public V1PreferredSchedulingTermFluentImpl.PreferenceNested withNewPreference() { - return new V1PreferredSchedulingTermFluentImpl.PreferenceNestedImpl(); - } - public V1PreferredSchedulingTermFluentImpl.PreferenceNested withNewPreferenceLike(V1NodeSelectorTerm item) { - return new V1PreferredSchedulingTermFluentImpl.PreferenceNestedImpl(item); - } - public V1PreferredSchedulingTermFluentImpl.PreferenceNested editPreference() { - return withNewPreferenceLike(getPreference()); - } - public V1PreferredSchedulingTermFluentImpl.PreferenceNested editOrNewPreference() { - return withNewPreferenceLike(getPreference() != null ? getPreference(): new V1NodeSelectorTermBuilder().build()); - } - public V1PreferredSchedulingTermFluentImpl.PreferenceNested editOrNewPreferenceLike(V1NodeSelectorTerm item) { - return withNewPreferenceLike(getPreference() != null ? getPreference(): item); - } - public Integer getWeight() { - return this.weight; - } - public A withWeight(Integer weight) { - this.weight=weight; return (A) this; - } - public Boolean hasWeight() { - return this.weight != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PreferredSchedulingTermFluentImpl that = (V1PreferredSchedulingTermFluentImpl) o; - if (!java.util.Objects.equals(preference, that.preference)) return false; - - if (!java.util.Objects.equals(weight, that.weight)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(preference, weight, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (preference != null) { sb.append("preference:"); sb.append(preference + ","); } - if (weight != null) { sb.append("weight:"); sb.append(weight); } - sb.append("}"); - return sb.toString(); - } - class PreferenceNestedImpl extends V1NodeSelectorTermFluentImpl> implements V1PreferredSchedulingTermFluentImpl.PreferenceNested,Nested{ - PreferenceNestedImpl(V1NodeSelectorTerm item) { - this.builder = new V1NodeSelectorTermBuilder(this, item); - } - PreferenceNestedImpl() { - this.builder = new V1NodeSelectorTermBuilder(this); - } - V1NodeSelectorTermBuilder builder; - public N and() { - return (N) V1PreferredSchedulingTermFluentImpl.this.withPreference(builder.build()); - } - public N endPreference() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassBuilder.java index 55ce4a601a..f22f6cb9b0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassBuilder.java @@ -1,64 +1,37 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PriorityClassBuilder extends V1PriorityClassFluentImpl implements VisitableBuilder{ +public class V1PriorityClassBuilder extends V1PriorityClassFluent implements VisitableBuilder{ public V1PriorityClassBuilder() { - this(false); - } - public V1PriorityClassBuilder(Boolean validationEnabled) { - this(new V1PriorityClass(), validationEnabled); + this(new V1PriorityClass()); } + public V1PriorityClassBuilder(V1PriorityClassFluent fluent) { - this(fluent, false); - } - public V1PriorityClassBuilder(V1PriorityClassFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PriorityClass(), validationEnabled); + this(fluent, new V1PriorityClass()); } + public V1PriorityClassBuilder(V1PriorityClassFluent fluent,V1PriorityClass instance) { - this(fluent, instance, false); - } - public V1PriorityClassBuilder(V1PriorityClassFluent fluent,V1PriorityClass instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withDescription(instance.getDescription()); - fluent.withGlobalDefault(instance.getGlobalDefault()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withPreemptionPolicy(instance.getPreemptionPolicy()); - fluent.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PriorityClassBuilder(V1PriorityClass instance) { - this(instance,false); - } - public V1PriorityClassBuilder(V1PriorityClass instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withDescription(instance.getDescription()); - this.withGlobalDefault(instance.getGlobalDefault()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withPreemptionPolicy(instance.getPreemptionPolicy()); - this.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PriorityClassFluent fluent; - Boolean validationEnabled; + public V1PriorityClass build() { V1PriorityClass buildable = new V1PriorityClass(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setDescription(fluent.getDescription()); buildable.setGlobalDefault(fluent.getGlobalDefault()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); buildable.setPreemptionPolicy(fluent.getPreemptionPolicy()); buildable.setValue(fluent.getValue()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassFluent.java index 383eddc4fc..2d0d87de06 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassFluent.java @@ -1,55 +1,214 @@ package io.kubernetes.client.openapi.models; -import java.lang.Integer; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import java.lang.Integer; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; - /** - * Generated - */ -public interface V1PriorityClassFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getDescription(); - public A withDescription(String description); - public Boolean hasDescription(); - public Boolean getGlobalDefault(); - public A withGlobalDefault(Boolean globalDefault); - public Boolean hasGlobalDefault(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1PriorityClassFluent.MetadataNested withNewMetadata(); - public V1PriorityClassFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1PriorityClassFluent.MetadataNested editMetadata(); - public V1PriorityClassFluent.MetadataNested editOrNewMetadata(); - public V1PriorityClassFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public String getPreemptionPolicy(); - public A withPreemptionPolicy(String preemptionPolicy); - public Boolean hasPreemptionPolicy(); - public Integer getValue(); - public A withValue(Integer value); - public Boolean hasValue(); - public A withGlobalDefault(); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PriorityClassFluent> extends BaseFluent{ + public V1PriorityClassFluent() { + } + + public V1PriorityClassFluent(V1PriorityClass instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String description; + private Boolean globalDefault; + private String kind; + private V1ObjectMetaBuilder metadata; + private String preemptionPolicy; + private Integer value; + + protected void copyInstance(V1PriorityClass instance) { + instance = (instance != null ? instance : new V1PriorityClass()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withDescription(instance.getDescription()); + this.withGlobalDefault(instance.getGlobalDefault()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withPreemptionPolicy(instance.getPreemptionPolicy()); + this.withValue(instance.getValue()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getDescription() { + return this.description; + } + + public A withDescription(String description) { + this.description = description; + return (A) this; + } + + public boolean hasDescription() { + return this.description != null; + } + + public Boolean getGlobalDefault() { + return this.globalDefault; + } + + public A withGlobalDefault(Boolean globalDefault) { + this.globalDefault = globalDefault; + return (A) this; + } + + public boolean hasGlobalDefault() { + return this.globalDefault != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public String getPreemptionPolicy() { + return this.preemptionPolicy; + } + + public A withPreemptionPolicy(String preemptionPolicy) { + this.preemptionPolicy = preemptionPolicy; + return (A) this; + } + + public boolean hasPreemptionPolicy() { + return this.preemptionPolicy != null; + } + + public Integer getValue() { + return this.value; + } + + public A withValue(Integer value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PriorityClassFluent that = (V1PriorityClassFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(description, that.description)) return false; + if (!java.util.Objects.equals(globalDefault, that.globalDefault)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(preemptionPolicy, that.preemptionPolicy)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, description, globalDefault, kind, metadata, preemptionPolicy, value, super.hashCode()); } + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (description != null) { sb.append("description:"); sb.append(description + ","); } + if (globalDefault != null) { sb.append("globalDefault:"); sb.append(globalDefault + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (preemptionPolicy != null) { sb.append("preemptionPolicy:"); sb.append(preemptionPolicy + ","); } + if (value != null) { sb.append("value:"); sb.append(value); } + sb.append("}"); + return sb.toString(); + } + + public A withGlobalDefault() { + return withGlobalDefault(true); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1PriorityClassFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassFluentImpl.java deleted file mode 100644 index ef7220cc7a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassFluentImpl.java +++ /dev/null @@ -1,182 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PriorityClassFluentImpl> extends BaseFluent implements V1PriorityClassFluent{ - public V1PriorityClassFluentImpl() { - } - public V1PriorityClassFluentImpl(V1PriorityClass instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withDescription(instance.getDescription()); - this.withGlobalDefault(instance.getGlobalDefault()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withPreemptionPolicy(instance.getPreemptionPolicy()); - this.withValue(instance.getValue()); - } - } - private String apiVersion; - private String description; - private Boolean globalDefault; - private String kind; - private V1ObjectMetaBuilder metadata; - private String preemptionPolicy; - private Integer value; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getDescription() { - return this.description; - } - public A withDescription(String description) { - this.description=description; return (A) this; - } - public Boolean hasDescription() { - return this.description != null; - } - public Boolean getGlobalDefault() { - return this.globalDefault; - } - public A withGlobalDefault(Boolean globalDefault) { - this.globalDefault=globalDefault; return (A) this; - } - public Boolean hasGlobalDefault() { - return this.globalDefault != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1PriorityClassFluentImpl.MetadataNested withNewMetadata() { - return new V1PriorityClassFluentImpl.MetadataNestedImpl(); - } - public V1PriorityClassFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1PriorityClassFluentImpl.MetadataNestedImpl(item); - } - public V1PriorityClassFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PriorityClassFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1PriorityClassFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public String getPreemptionPolicy() { - return this.preemptionPolicy; - } - public A withPreemptionPolicy(String preemptionPolicy) { - this.preemptionPolicy=preemptionPolicy; return (A) this; - } - public Boolean hasPreemptionPolicy() { - return this.preemptionPolicy != null; - } - public Integer getValue() { - return this.value; - } - public A withValue(Integer value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PriorityClassFluentImpl that = (V1PriorityClassFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(description, that.description)) return false; - - if (!java.util.Objects.equals(globalDefault, that.globalDefault)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(preemptionPolicy, that.preemptionPolicy)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, description, globalDefault, kind, metadata, preemptionPolicy, value, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (description != null) { sb.append("description:"); sb.append(description + ","); } - if (globalDefault != null) { sb.append("globalDefault:"); sb.append(globalDefault + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (preemptionPolicy != null) { sb.append("preemptionPolicy:"); sb.append(preemptionPolicy + ","); } - if (value != null) { sb.append("value:"); sb.append(value); } - sb.append("}"); - return sb.toString(); - } - public A withGlobalDefault() { - return withGlobalDefault(true); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1PriorityClassFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1PriorityClassFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListBuilder.java index 72481240ad..f346dfb609 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1PriorityClassListBuilder extends V1PriorityClassListFluentImpl implements VisitableBuilder{ +public class V1PriorityClassListBuilder extends V1PriorityClassListFluent implements VisitableBuilder{ public V1PriorityClassListBuilder() { - this(false); - } - public V1PriorityClassListBuilder(Boolean validationEnabled) { - this(new V1PriorityClassList(), validationEnabled); + this(new V1PriorityClassList()); } + public V1PriorityClassListBuilder(V1PriorityClassListFluent fluent) { - this(fluent, false); - } - public V1PriorityClassListBuilder(V1PriorityClassListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1PriorityClassList(), validationEnabled); + this(fluent, new V1PriorityClassList()); } + public V1PriorityClassListBuilder(V1PriorityClassListFluent fluent,V1PriorityClassList instance) { - this(fluent, instance, false); - } - public V1PriorityClassListBuilder(V1PriorityClassListFluent fluent,V1PriorityClassList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1PriorityClassListBuilder(V1PriorityClassList instance) { - this(instance,false); - } - public V1PriorityClassListBuilder(V1PriorityClassList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1PriorityClassListFluent fluent; - Boolean validationEnabled; + public V1PriorityClassList build() { V1PriorityClassList buildable = new V1PriorityClassList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListFluent.java index 490e29eeff..890272aa95 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1PriorityClassListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1PriorityClass item); - public A setToItems(int index,V1PriorityClass item); - public A addToItems(io.kubernetes.client.openapi.models.V1PriorityClass... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1PriorityClass... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1PriorityClass buildItem(int index); - public V1PriorityClass buildFirstItem(); - public V1PriorityClass buildLastItem(); - public V1PriorityClass buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1PriorityClass... items); - public Boolean hasItems(); - public V1PriorityClassListFluent.ItemsNested addNewItem(); - public V1PriorityClassListFluent.ItemsNested addNewItemLike(V1PriorityClass item); - public V1PriorityClassListFluent.ItemsNested setNewItemLike(int index,V1PriorityClass item); - public V1PriorityClassListFluent.ItemsNested editItem(int index); - public V1PriorityClassListFluent.ItemsNested editFirstItem(); - public V1PriorityClassListFluent.ItemsNested editLastItem(); - public V1PriorityClassListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1PriorityClassListFluent.MetadataNested withNewMetadata(); - public V1PriorityClassListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1PriorityClassListFluent.MetadataNested editMetadata(); - public V1PriorityClassListFluent.MetadataNested editOrNewMetadata(); - public V1PriorityClassListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1PriorityClassFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1PriorityClassListFluent> extends BaseFluent{ + public V1PriorityClassListFluent() { + } + + public V1PriorityClassListFluent(V1PriorityClassList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1PriorityClassList instance) { + instance = (instance != null ? instance : new V1PriorityClassList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1PriorityClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1PriorityClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1PriorityClass... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PriorityClass item : items) {V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1PriorityClass item : items) {V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1PriorityClass... items) { + if (this.items == null) return (A)this; + for (V1PriorityClass item : items) {V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1PriorityClass item : items) {V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1PriorityClassBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1PriorityClass buildItem(int index) { + return this.items.get(index).build(); + } + + public V1PriorityClass buildFirstItem() { + return this.items.get(0).build(); + } + + public V1PriorityClass buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1PriorityClass buildMatchingItem(Predicate predicate) { + for (V1PriorityClassBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1PriorityClassBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1PriorityClass item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1PriorityClass... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1PriorityClass item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1PriorityClass item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1PriorityClass item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1PriorityClassListFluent that = (V1PriorityClassListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1PriorityClassFluent> implements Nested{ + ItemsNested(int index,V1PriorityClass item) { + this.index = index; + this.builder = new V1PriorityClassBuilder(this, item); + } + V1PriorityClassBuilder builder; + int index; + public N and() { + return (N) V1PriorityClassListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1PriorityClassListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListFluentImpl.java deleted file mode 100644 index 0d89a033bb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1PriorityClassListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1PriorityClassListFluentImpl> extends BaseFluent implements V1PriorityClassListFluent{ - public V1PriorityClassListFluentImpl() { - } - public V1PriorityClassListFluentImpl(V1PriorityClassList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1PriorityClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1PriorityClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1PriorityClass... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PriorityClass item : items) {V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1PriorityClass item : items) {V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1PriorityClass... items) { - for (V1PriorityClass item : items) {V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1PriorityClass item : items) {V1PriorityClassBuilder builder = new V1PriorityClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1PriorityClassBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1PriorityClass buildItem(int index) { - return this.items.get(index).build(); - } - public V1PriorityClass buildFirstItem() { - return this.items.get(0).build(); - } - public V1PriorityClass buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1PriorityClass buildMatchingItem(Predicate predicate) { - for (V1PriorityClassBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1PriorityClassBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1PriorityClass item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1PriorityClass... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1PriorityClass item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1PriorityClassListFluentImpl.ItemsNested addNewItem() { - return new V1PriorityClassListFluentImpl.ItemsNestedImpl(); - } - public V1PriorityClassListFluentImpl.ItemsNested addNewItemLike(V1PriorityClass item) { - return new V1PriorityClassListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1PriorityClassListFluentImpl.ItemsNested setNewItemLike(int index,V1PriorityClass item) { - return new V1PriorityClassListFluentImpl.ItemsNestedImpl(index, item); - } - public V1PriorityClassListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1PriorityClassListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1PriorityClassListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1PriorityClassListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1PriorityClassListFluentImpl.MetadataNestedImpl(); - } - public V1PriorityClassListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1PriorityClassListFluentImpl.MetadataNestedImpl(item); - } - public V1PriorityClassListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1PriorityClassListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1PriorityClassListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1PriorityClassListFluentImpl that = (V1PriorityClassListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1PriorityClassFluentImpl> implements V1PriorityClassListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1PriorityClass item) { - this.index = index; - this.builder = new V1PriorityClassBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1PriorityClassBuilder(this); - } - V1PriorityClassBuilder builder; - int index; - public N and() { - return (N) V1PriorityClassListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1PriorityClassListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1PriorityClassListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeBuilder.java index 342decc233..cfdb3f23d3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeBuilder.java @@ -1,73 +1,40 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ProbeBuilder extends V1ProbeFluentImpl implements VisitableBuilder{ +public class V1ProbeBuilder extends V1ProbeFluent implements VisitableBuilder{ public V1ProbeBuilder() { - this(false); - } - public V1ProbeBuilder(Boolean validationEnabled) { - this(new V1Probe(), validationEnabled); + this(new V1Probe()); } + public V1ProbeBuilder(V1ProbeFluent fluent) { - this(fluent, false); - } - public V1ProbeBuilder(V1ProbeFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Probe(), validationEnabled); + this(fluent, new V1Probe()); } + public V1ProbeBuilder(V1ProbeFluent fluent,V1Probe instance) { - this(fluent, instance, false); - } - public V1ProbeBuilder(V1ProbeFluent fluent,V1Probe instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExec(instance.getExec()); - fluent.withFailureThreshold(instance.getFailureThreshold()); - fluent.withGrpc(instance.getGrpc()); - fluent.withHttpGet(instance.getHttpGet()); - fluent.withInitialDelaySeconds(instance.getInitialDelaySeconds()); - fluent.withPeriodSeconds(instance.getPeriodSeconds()); - fluent.withSuccessThreshold(instance.getSuccessThreshold()); - fluent.withTcpSocket(instance.getTcpSocket()); - fluent.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds()); - fluent.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ProbeBuilder(V1Probe instance) { - this(instance,false); - } - public V1ProbeBuilder(V1Probe instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExec(instance.getExec()); - this.withFailureThreshold(instance.getFailureThreshold()); - this.withGrpc(instance.getGrpc()); - this.withHttpGet(instance.getHttpGet()); - this.withInitialDelaySeconds(instance.getInitialDelaySeconds()); - this.withPeriodSeconds(instance.getPeriodSeconds()); - this.withSuccessThreshold(instance.getSuccessThreshold()); - this.withTcpSocket(instance.getTcpSocket()); - this.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds()); - this.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ProbeFluent fluent; - Boolean validationEnabled; + public V1Probe build() { V1Probe buildable = new V1Probe(); - buildable.setExec(fluent.getExec()); + buildable.setExec(fluent.buildExec()); buildable.setFailureThreshold(fluent.getFailureThreshold()); - buildable.setGrpc(fluent.getGrpc()); - buildable.setHttpGet(fluent.getHttpGet()); + buildable.setGrpc(fluent.buildGrpc()); + buildable.setHttpGet(fluent.buildHttpGet()); buildable.setInitialDelaySeconds(fluent.getInitialDelaySeconds()); buildable.setPeriodSeconds(fluent.getPeriodSeconds()); buildable.setSuccessThreshold(fluent.getSuccessThreshold()); - buildable.setTcpSocket(fluent.getTcpSocket()); + buildable.setTcpSocket(fluent.buildTcpSocket()); buildable.setTerminationGracePeriodSeconds(fluent.getTerminationGracePeriodSeconds()); buildable.setTimeoutSeconds(fluent.getTimeoutSeconds()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeFluent.java index 97e60cd15b..76048edeec 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeFluent.java @@ -1,114 +1,390 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Integer; -import java.lang.Deprecated; import java.lang.Long; -import java.lang.Boolean; +import java.lang.Object; - /** - * Generated - */ -public interface V1ProbeFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildExec instead. - * @return The buildable object. - */ - @Deprecated - public V1ExecAction getExec(); - public V1ExecAction buildExec(); - public A withExec(V1ExecAction exec); - public Boolean hasExec(); - public V1ProbeFluent.ExecNested withNewExec(); - public V1ProbeFluent.ExecNested withNewExecLike(V1ExecAction item); - public V1ProbeFluent.ExecNested editExec(); - public V1ProbeFluent.ExecNested editOrNewExec(); - public V1ProbeFluent.ExecNested editOrNewExecLike(V1ExecAction item); - public Integer getFailureThreshold(); - public A withFailureThreshold(Integer failureThreshold); - public Boolean hasFailureThreshold(); - - /** - * This method has been deprecated, please use method buildGrpc instead. - * @return The buildable object. - */ - @Deprecated - public V1GRPCAction getGrpc(); - public V1GRPCAction buildGrpc(); - public A withGrpc(V1GRPCAction grpc); - public Boolean hasGrpc(); - public V1ProbeFluent.GrpcNested withNewGrpc(); - public V1ProbeFluent.GrpcNested withNewGrpcLike(V1GRPCAction item); - public V1ProbeFluent.GrpcNested editGrpc(); - public V1ProbeFluent.GrpcNested editOrNewGrpc(); - public V1ProbeFluent.GrpcNested editOrNewGrpcLike(V1GRPCAction item); - - /** - * This method has been deprecated, please use method buildHttpGet instead. - * @return The buildable object. - */ - @Deprecated - public V1HTTPGetAction getHttpGet(); - public V1HTTPGetAction buildHttpGet(); - public A withHttpGet(V1HTTPGetAction httpGet); - public Boolean hasHttpGet(); - public V1ProbeFluent.HttpGetNested withNewHttpGet(); - public V1ProbeFluent.HttpGetNested withNewHttpGetLike(V1HTTPGetAction item); - public V1ProbeFluent.HttpGetNested editHttpGet(); - public V1ProbeFluent.HttpGetNested editOrNewHttpGet(); - public V1ProbeFluent.HttpGetNested editOrNewHttpGetLike(V1HTTPGetAction item); - public Integer getInitialDelaySeconds(); - public A withInitialDelaySeconds(Integer initialDelaySeconds); - public Boolean hasInitialDelaySeconds(); - public Integer getPeriodSeconds(); - public A withPeriodSeconds(Integer periodSeconds); - public Boolean hasPeriodSeconds(); - public Integer getSuccessThreshold(); - public A withSuccessThreshold(Integer successThreshold); - public Boolean hasSuccessThreshold(); - - /** - * This method has been deprecated, please use method buildTcpSocket instead. - * @return The buildable object. - */ - @Deprecated - public V1TCPSocketAction getTcpSocket(); - public V1TCPSocketAction buildTcpSocket(); - public A withTcpSocket(V1TCPSocketAction tcpSocket); - public Boolean hasTcpSocket(); - public V1ProbeFluent.TcpSocketNested withNewTcpSocket(); - public V1ProbeFluent.TcpSocketNested withNewTcpSocketLike(V1TCPSocketAction item); - public V1ProbeFluent.TcpSocketNested editTcpSocket(); - public V1ProbeFluent.TcpSocketNested editOrNewTcpSocket(); - public V1ProbeFluent.TcpSocketNested editOrNewTcpSocketLike(V1TCPSocketAction item); - public Long getTerminationGracePeriodSeconds(); - public A withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds); - public Boolean hasTerminationGracePeriodSeconds(); - public Integer getTimeoutSeconds(); - public A withTimeoutSeconds(Integer timeoutSeconds); - public Boolean hasTimeoutSeconds(); - public interface ExecNested extends Nested,V1ExecActionFluent>{ - public N and(); - public N endExec(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ProbeFluent> extends BaseFluent{ + public V1ProbeFluent() { + } + + public V1ProbeFluent(V1Probe instance) { + this.copyInstance(instance); + } + private V1ExecActionBuilder exec; + private Integer failureThreshold; + private V1GRPCActionBuilder grpc; + private V1HTTPGetActionBuilder httpGet; + private Integer initialDelaySeconds; + private Integer periodSeconds; + private Integer successThreshold; + private V1TCPSocketActionBuilder tcpSocket; + private Long terminationGracePeriodSeconds; + private Integer timeoutSeconds; + + protected void copyInstance(V1Probe instance) { + instance = (instance != null ? instance : new V1Probe()); + if (instance != null) { + this.withExec(instance.getExec()); + this.withFailureThreshold(instance.getFailureThreshold()); + this.withGrpc(instance.getGrpc()); + this.withHttpGet(instance.getHttpGet()); + this.withInitialDelaySeconds(instance.getInitialDelaySeconds()); + this.withPeriodSeconds(instance.getPeriodSeconds()); + this.withSuccessThreshold(instance.getSuccessThreshold()); + this.withTcpSocket(instance.getTcpSocket()); + this.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds()); + this.withTimeoutSeconds(instance.getTimeoutSeconds()); + } + } + + public V1ExecAction buildExec() { + return this.exec != null ? this.exec.build() : null; + } + + public A withExec(V1ExecAction exec) { + this._visitables.remove("exec"); + if (exec != null) { + this.exec = new V1ExecActionBuilder(exec); + this._visitables.get("exec").add(this.exec); + } else { + this.exec = null; + this._visitables.get("exec").remove(this.exec); + } + return (A) this; + } + + public boolean hasExec() { + return this.exec != null; + } + + public ExecNested withNewExec() { + return new ExecNested(null); + } + + public ExecNested withNewExecLike(V1ExecAction item) { + return new ExecNested(item); + } + + public ExecNested editExec() { + return withNewExecLike(java.util.Optional.ofNullable(buildExec()).orElse(null)); + } + + public ExecNested editOrNewExec() { + return withNewExecLike(java.util.Optional.ofNullable(buildExec()).orElse(new V1ExecActionBuilder().build())); + } + + public ExecNested editOrNewExecLike(V1ExecAction item) { + return withNewExecLike(java.util.Optional.ofNullable(buildExec()).orElse(item)); + } + + public Integer getFailureThreshold() { + return this.failureThreshold; + } + + public A withFailureThreshold(Integer failureThreshold) { + this.failureThreshold = failureThreshold; + return (A) this; + } + + public boolean hasFailureThreshold() { + return this.failureThreshold != null; + } + + public V1GRPCAction buildGrpc() { + return this.grpc != null ? this.grpc.build() : null; + } + + public A withGrpc(V1GRPCAction grpc) { + this._visitables.remove("grpc"); + if (grpc != null) { + this.grpc = new V1GRPCActionBuilder(grpc); + this._visitables.get("grpc").add(this.grpc); + } else { + this.grpc = null; + this._visitables.get("grpc").remove(this.grpc); + } + return (A) this; + } + + public boolean hasGrpc() { + return this.grpc != null; + } + + public GrpcNested withNewGrpc() { + return new GrpcNested(null); + } + + public GrpcNested withNewGrpcLike(V1GRPCAction item) { + return new GrpcNested(item); + } + + public GrpcNested editGrpc() { + return withNewGrpcLike(java.util.Optional.ofNullable(buildGrpc()).orElse(null)); + } + + public GrpcNested editOrNewGrpc() { + return withNewGrpcLike(java.util.Optional.ofNullable(buildGrpc()).orElse(new V1GRPCActionBuilder().build())); + } + + public GrpcNested editOrNewGrpcLike(V1GRPCAction item) { + return withNewGrpcLike(java.util.Optional.ofNullable(buildGrpc()).orElse(item)); + } + + public V1HTTPGetAction buildHttpGet() { + return this.httpGet != null ? this.httpGet.build() : null; + } + + public A withHttpGet(V1HTTPGetAction httpGet) { + this._visitables.remove("httpGet"); + if (httpGet != null) { + this.httpGet = new V1HTTPGetActionBuilder(httpGet); + this._visitables.get("httpGet").add(this.httpGet); + } else { + this.httpGet = null; + this._visitables.get("httpGet").remove(this.httpGet); + } + return (A) this; + } + + public boolean hasHttpGet() { + return this.httpGet != null; + } + + public HttpGetNested withNewHttpGet() { + return new HttpGetNested(null); + } + + public HttpGetNested withNewHttpGetLike(V1HTTPGetAction item) { + return new HttpGetNested(item); + } + + public HttpGetNested editHttpGet() { + return withNewHttpGetLike(java.util.Optional.ofNullable(buildHttpGet()).orElse(null)); + } + + public HttpGetNested editOrNewHttpGet() { + return withNewHttpGetLike(java.util.Optional.ofNullable(buildHttpGet()).orElse(new V1HTTPGetActionBuilder().build())); + } + + public HttpGetNested editOrNewHttpGetLike(V1HTTPGetAction item) { + return withNewHttpGetLike(java.util.Optional.ofNullable(buildHttpGet()).orElse(item)); + } + + public Integer getInitialDelaySeconds() { + return this.initialDelaySeconds; + } + + public A withInitialDelaySeconds(Integer initialDelaySeconds) { + this.initialDelaySeconds = initialDelaySeconds; + return (A) this; } - public interface GrpcNested extends Nested,V1GRPCActionFluent>{ - public N and(); - public N endGrpc(); + + public boolean hasInitialDelaySeconds() { + return this.initialDelaySeconds != null; + } + + public Integer getPeriodSeconds() { + return this.periodSeconds; + } + + public A withPeriodSeconds(Integer periodSeconds) { + this.periodSeconds = periodSeconds; + return (A) this; + } + + public boolean hasPeriodSeconds() { + return this.periodSeconds != null; + } + + public Integer getSuccessThreshold() { + return this.successThreshold; + } + + public A withSuccessThreshold(Integer successThreshold) { + this.successThreshold = successThreshold; + return (A) this; + } + + public boolean hasSuccessThreshold() { + return this.successThreshold != null; + } + + public V1TCPSocketAction buildTcpSocket() { + return this.tcpSocket != null ? this.tcpSocket.build() : null; + } + + public A withTcpSocket(V1TCPSocketAction tcpSocket) { + this._visitables.remove("tcpSocket"); + if (tcpSocket != null) { + this.tcpSocket = new V1TCPSocketActionBuilder(tcpSocket); + this._visitables.get("tcpSocket").add(this.tcpSocket); + } else { + this.tcpSocket = null; + this._visitables.get("tcpSocket").remove(this.tcpSocket); + } + return (A) this; + } + + public boolean hasTcpSocket() { + return this.tcpSocket != null; + } + + public TcpSocketNested withNewTcpSocket() { + return new TcpSocketNested(null); + } + + public TcpSocketNested withNewTcpSocketLike(V1TCPSocketAction item) { + return new TcpSocketNested(item); + } + + public TcpSocketNested editTcpSocket() { + return withNewTcpSocketLike(java.util.Optional.ofNullable(buildTcpSocket()).orElse(null)); + } + + public TcpSocketNested editOrNewTcpSocket() { + return withNewTcpSocketLike(java.util.Optional.ofNullable(buildTcpSocket()).orElse(new V1TCPSocketActionBuilder().build())); + } + + public TcpSocketNested editOrNewTcpSocketLike(V1TCPSocketAction item) { + return withNewTcpSocketLike(java.util.Optional.ofNullable(buildTcpSocket()).orElse(item)); + } + + public Long getTerminationGracePeriodSeconds() { + return this.terminationGracePeriodSeconds; + } + + public A withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { + this.terminationGracePeriodSeconds = terminationGracePeriodSeconds; + return (A) this; + } + + public boolean hasTerminationGracePeriodSeconds() { + return this.terminationGracePeriodSeconds != null; + } + + public Integer getTimeoutSeconds() { + return this.timeoutSeconds; + } + + public A withTimeoutSeconds(Integer timeoutSeconds) { + this.timeoutSeconds = timeoutSeconds; + return (A) this; + } + + public boolean hasTimeoutSeconds() { + return this.timeoutSeconds != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ProbeFluent that = (V1ProbeFluent) o; + if (!java.util.Objects.equals(exec, that.exec)) return false; + if (!java.util.Objects.equals(failureThreshold, that.failureThreshold)) return false; + if (!java.util.Objects.equals(grpc, that.grpc)) return false; + if (!java.util.Objects.equals(httpGet, that.httpGet)) return false; + if (!java.util.Objects.equals(initialDelaySeconds, that.initialDelaySeconds)) return false; + if (!java.util.Objects.equals(periodSeconds, that.periodSeconds)) return false; + if (!java.util.Objects.equals(successThreshold, that.successThreshold)) return false; + if (!java.util.Objects.equals(tcpSocket, that.tcpSocket)) return false; + if (!java.util.Objects.equals(terminationGracePeriodSeconds, that.terminationGracePeriodSeconds)) return false; + if (!java.util.Objects.equals(timeoutSeconds, that.timeoutSeconds)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(exec, failureThreshold, grpc, httpGet, initialDelaySeconds, periodSeconds, successThreshold, tcpSocket, terminationGracePeriodSeconds, timeoutSeconds, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (exec != null) { sb.append("exec:"); sb.append(exec + ","); } + if (failureThreshold != null) { sb.append("failureThreshold:"); sb.append(failureThreshold + ","); } + if (grpc != null) { sb.append("grpc:"); sb.append(grpc + ","); } + if (httpGet != null) { sb.append("httpGet:"); sb.append(httpGet + ","); } + if (initialDelaySeconds != null) { sb.append("initialDelaySeconds:"); sb.append(initialDelaySeconds + ","); } + if (periodSeconds != null) { sb.append("periodSeconds:"); sb.append(periodSeconds + ","); } + if (successThreshold != null) { sb.append("successThreshold:"); sb.append(successThreshold + ","); } + if (tcpSocket != null) { sb.append("tcpSocket:"); sb.append(tcpSocket + ","); } + if (terminationGracePeriodSeconds != null) { sb.append("terminationGracePeriodSeconds:"); sb.append(terminationGracePeriodSeconds + ","); } + if (timeoutSeconds != null) { sb.append("timeoutSeconds:"); sb.append(timeoutSeconds); } + sb.append("}"); + return sb.toString(); + } + public class ExecNested extends V1ExecActionFluent> implements Nested{ + ExecNested(V1ExecAction item) { + this.builder = new V1ExecActionBuilder(this, item); + } + V1ExecActionBuilder builder; + + public N and() { + return (N) V1ProbeFluent.this.withExec(builder.build()); + } + public N endExec() { + return and(); + } + + } - public interface HttpGetNested extends Nested,V1HTTPGetActionFluent>{ - public N and(); - public N endHttpGet(); + public class GrpcNested extends V1GRPCActionFluent> implements Nested{ + GrpcNested(V1GRPCAction item) { + this.builder = new V1GRPCActionBuilder(this, item); + } + V1GRPCActionBuilder builder; + public N and() { + return (N) V1ProbeFluent.this.withGrpc(builder.build()); + } + + public N endGrpc() { + return and(); + } + + } - public interface TcpSocketNested extends Nested,V1TCPSocketActionFluent>{ - public N and(); - public N endTcpSocket(); + public class HttpGetNested extends V1HTTPGetActionFluent> implements Nested{ + HttpGetNested(V1HTTPGetAction item) { + this.builder = new V1HTTPGetActionBuilder(this, item); + } + V1HTTPGetActionBuilder builder; + + public N and() { + return (N) V1ProbeFluent.this.withHttpGet(builder.build()); + } + public N endHttpGet() { + return and(); + } + + } + public class TcpSocketNested extends V1TCPSocketActionFluent> implements Nested{ + TcpSocketNested(V1TCPSocketAction item) { + this.builder = new V1TCPSocketActionBuilder(this, item); + } + V1TCPSocketActionBuilder builder; + + public N and() { + return (N) V1ProbeFluent.this.withTcpSocket(builder.build()); + } + + public N endTcpSocket() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeFluentImpl.java deleted file mode 100644 index d411ac2dba..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProbeFluentImpl.java +++ /dev/null @@ -1,345 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.Long; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ProbeFluentImpl> extends BaseFluent implements V1ProbeFluent{ - public V1ProbeFluentImpl() { - } - public V1ProbeFluentImpl(V1Probe instance) { - if (instance != null) { - this.withExec(instance.getExec()); - this.withFailureThreshold(instance.getFailureThreshold()); - this.withGrpc(instance.getGrpc()); - this.withHttpGet(instance.getHttpGet()); - this.withInitialDelaySeconds(instance.getInitialDelaySeconds()); - this.withPeriodSeconds(instance.getPeriodSeconds()); - this.withSuccessThreshold(instance.getSuccessThreshold()); - this.withTcpSocket(instance.getTcpSocket()); - this.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds()); - this.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - } - private V1ExecActionBuilder exec; - private Integer failureThreshold; - private V1GRPCActionBuilder grpc; - private V1HTTPGetActionBuilder httpGet; - private Integer initialDelaySeconds; - private Integer periodSeconds; - private Integer successThreshold; - private V1TCPSocketActionBuilder tcpSocket; - private Long terminationGracePeriodSeconds; - private Integer timeoutSeconds; - - /** - * This method has been deprecated, please use method buildExec instead. - * @return The buildable object. - */ - @Deprecated - public V1ExecAction getExec() { - return this.exec!=null ?this.exec.build():null; - } - public V1ExecAction buildExec() { - return this.exec!=null ?this.exec.build():null; - } - public A withExec(V1ExecAction exec) { - _visitables.get("exec").remove(this.exec); - if (exec!=null){ this.exec= new V1ExecActionBuilder(exec); _visitables.get("exec").add(this.exec);} else { this.exec = null; _visitables.get("exec").remove(this.exec); } return (A) this; - } - public Boolean hasExec() { - return this.exec != null; - } - public V1ProbeFluentImpl.ExecNested withNewExec() { - return new V1ProbeFluentImpl.ExecNestedImpl(); - } - public V1ProbeFluentImpl.ExecNested withNewExecLike(V1ExecAction item) { - return new V1ProbeFluentImpl.ExecNestedImpl(item); - } - public V1ProbeFluentImpl.ExecNested editExec() { - return withNewExecLike(getExec()); - } - public V1ProbeFluentImpl.ExecNested editOrNewExec() { - return withNewExecLike(getExec() != null ? getExec(): new V1ExecActionBuilder().build()); - } - public V1ProbeFluentImpl.ExecNested editOrNewExecLike(V1ExecAction item) { - return withNewExecLike(getExec() != null ? getExec(): item); - } - public Integer getFailureThreshold() { - return this.failureThreshold; - } - public A withFailureThreshold(Integer failureThreshold) { - this.failureThreshold=failureThreshold; return (A) this; - } - public Boolean hasFailureThreshold() { - return this.failureThreshold != null; - } - - /** - * This method has been deprecated, please use method buildGrpc instead. - * @return The buildable object. - */ - @Deprecated - public V1GRPCAction getGrpc() { - return this.grpc!=null ?this.grpc.build():null; - } - public V1GRPCAction buildGrpc() { - return this.grpc!=null ?this.grpc.build():null; - } - public A withGrpc(V1GRPCAction grpc) { - _visitables.get("grpc").remove(this.grpc); - if (grpc!=null){ this.grpc= new V1GRPCActionBuilder(grpc); _visitables.get("grpc").add(this.grpc);} else { this.grpc = null; _visitables.get("grpc").remove(this.grpc); } return (A) this; - } - public Boolean hasGrpc() { - return this.grpc != null; - } - public V1ProbeFluentImpl.GrpcNested withNewGrpc() { - return new V1ProbeFluentImpl.GrpcNestedImpl(); - } - public V1ProbeFluentImpl.GrpcNested withNewGrpcLike(V1GRPCAction item) { - return new V1ProbeFluentImpl.GrpcNestedImpl(item); - } - public V1ProbeFluentImpl.GrpcNested editGrpc() { - return withNewGrpcLike(getGrpc()); - } - public V1ProbeFluentImpl.GrpcNested editOrNewGrpc() { - return withNewGrpcLike(getGrpc() != null ? getGrpc(): new V1GRPCActionBuilder().build()); - } - public V1ProbeFluentImpl.GrpcNested editOrNewGrpcLike(V1GRPCAction item) { - return withNewGrpcLike(getGrpc() != null ? getGrpc(): item); - } - - /** - * This method has been deprecated, please use method buildHttpGet instead. - * @return The buildable object. - */ - @Deprecated - public V1HTTPGetAction getHttpGet() { - return this.httpGet!=null ?this.httpGet.build():null; - } - public V1HTTPGetAction buildHttpGet() { - return this.httpGet!=null ?this.httpGet.build():null; - } - public A withHttpGet(V1HTTPGetAction httpGet) { - _visitables.get("httpGet").remove(this.httpGet); - if (httpGet!=null){ this.httpGet= new V1HTTPGetActionBuilder(httpGet); _visitables.get("httpGet").add(this.httpGet);} else { this.httpGet = null; _visitables.get("httpGet").remove(this.httpGet); } return (A) this; - } - public Boolean hasHttpGet() { - return this.httpGet != null; - } - public V1ProbeFluentImpl.HttpGetNested withNewHttpGet() { - return new V1ProbeFluentImpl.HttpGetNestedImpl(); - } - public V1ProbeFluentImpl.HttpGetNested withNewHttpGetLike(V1HTTPGetAction item) { - return new V1ProbeFluentImpl.HttpGetNestedImpl(item); - } - public V1ProbeFluentImpl.HttpGetNested editHttpGet() { - return withNewHttpGetLike(getHttpGet()); - } - public V1ProbeFluentImpl.HttpGetNested editOrNewHttpGet() { - return withNewHttpGetLike(getHttpGet() != null ? getHttpGet(): new V1HTTPGetActionBuilder().build()); - } - public V1ProbeFluentImpl.HttpGetNested editOrNewHttpGetLike(V1HTTPGetAction item) { - return withNewHttpGetLike(getHttpGet() != null ? getHttpGet(): item); - } - public Integer getInitialDelaySeconds() { - return this.initialDelaySeconds; - } - public A withInitialDelaySeconds(Integer initialDelaySeconds) { - this.initialDelaySeconds=initialDelaySeconds; return (A) this; - } - public Boolean hasInitialDelaySeconds() { - return this.initialDelaySeconds != null; - } - public Integer getPeriodSeconds() { - return this.periodSeconds; - } - public A withPeriodSeconds(Integer periodSeconds) { - this.periodSeconds=periodSeconds; return (A) this; - } - public Boolean hasPeriodSeconds() { - return this.periodSeconds != null; - } - public Integer getSuccessThreshold() { - return this.successThreshold; - } - public A withSuccessThreshold(Integer successThreshold) { - this.successThreshold=successThreshold; return (A) this; - } - public Boolean hasSuccessThreshold() { - return this.successThreshold != null; - } - - /** - * This method has been deprecated, please use method buildTcpSocket instead. - * @return The buildable object. - */ - @Deprecated - public V1TCPSocketAction getTcpSocket() { - return this.tcpSocket!=null ?this.tcpSocket.build():null; - } - public V1TCPSocketAction buildTcpSocket() { - return this.tcpSocket!=null ?this.tcpSocket.build():null; - } - public A withTcpSocket(V1TCPSocketAction tcpSocket) { - _visitables.get("tcpSocket").remove(this.tcpSocket); - if (tcpSocket!=null){ this.tcpSocket= new V1TCPSocketActionBuilder(tcpSocket); _visitables.get("tcpSocket").add(this.tcpSocket);} else { this.tcpSocket = null; _visitables.get("tcpSocket").remove(this.tcpSocket); } return (A) this; - } - public Boolean hasTcpSocket() { - return this.tcpSocket != null; - } - public V1ProbeFluentImpl.TcpSocketNested withNewTcpSocket() { - return new V1ProbeFluentImpl.TcpSocketNestedImpl(); - } - public V1ProbeFluentImpl.TcpSocketNested withNewTcpSocketLike(V1TCPSocketAction item) { - return new V1ProbeFluentImpl.TcpSocketNestedImpl(item); - } - public V1ProbeFluentImpl.TcpSocketNested editTcpSocket() { - return withNewTcpSocketLike(getTcpSocket()); - } - public V1ProbeFluentImpl.TcpSocketNested editOrNewTcpSocket() { - return withNewTcpSocketLike(getTcpSocket() != null ? getTcpSocket(): new V1TCPSocketActionBuilder().build()); - } - public V1ProbeFluentImpl.TcpSocketNested editOrNewTcpSocketLike(V1TCPSocketAction item) { - return withNewTcpSocketLike(getTcpSocket() != null ? getTcpSocket(): item); - } - public Long getTerminationGracePeriodSeconds() { - return this.terminationGracePeriodSeconds; - } - public A withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { - this.terminationGracePeriodSeconds=terminationGracePeriodSeconds; return (A) this; - } - public Boolean hasTerminationGracePeriodSeconds() { - return this.terminationGracePeriodSeconds != null; - } - public Integer getTimeoutSeconds() { - return this.timeoutSeconds; - } - public A withTimeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds=timeoutSeconds; return (A) this; - } - public Boolean hasTimeoutSeconds() { - return this.timeoutSeconds != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ProbeFluentImpl that = (V1ProbeFluentImpl) o; - if (!java.util.Objects.equals(exec, that.exec)) return false; - - if (!java.util.Objects.equals(failureThreshold, that.failureThreshold)) return false; - - if (!java.util.Objects.equals(grpc, that.grpc)) return false; - - if (!java.util.Objects.equals(httpGet, that.httpGet)) return false; - - if (!java.util.Objects.equals(initialDelaySeconds, that.initialDelaySeconds)) return false; - - if (!java.util.Objects.equals(periodSeconds, that.periodSeconds)) return false; - - if (!java.util.Objects.equals(successThreshold, that.successThreshold)) return false; - - if (!java.util.Objects.equals(tcpSocket, that.tcpSocket)) return false; - - if (!java.util.Objects.equals(terminationGracePeriodSeconds, that.terminationGracePeriodSeconds)) return false; - - if (!java.util.Objects.equals(timeoutSeconds, that.timeoutSeconds)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(exec, failureThreshold, grpc, httpGet, initialDelaySeconds, periodSeconds, successThreshold, tcpSocket, terminationGracePeriodSeconds, timeoutSeconds, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (exec != null) { sb.append("exec:"); sb.append(exec + ","); } - if (failureThreshold != null) { sb.append("failureThreshold:"); sb.append(failureThreshold + ","); } - if (grpc != null) { sb.append("grpc:"); sb.append(grpc + ","); } - if (httpGet != null) { sb.append("httpGet:"); sb.append(httpGet + ","); } - if (initialDelaySeconds != null) { sb.append("initialDelaySeconds:"); sb.append(initialDelaySeconds + ","); } - if (periodSeconds != null) { sb.append("periodSeconds:"); sb.append(periodSeconds + ","); } - if (successThreshold != null) { sb.append("successThreshold:"); sb.append(successThreshold + ","); } - if (tcpSocket != null) { sb.append("tcpSocket:"); sb.append(tcpSocket + ","); } - if (terminationGracePeriodSeconds != null) { sb.append("terminationGracePeriodSeconds:"); sb.append(terminationGracePeriodSeconds + ","); } - if (timeoutSeconds != null) { sb.append("timeoutSeconds:"); sb.append(timeoutSeconds); } - sb.append("}"); - return sb.toString(); - } - class ExecNestedImpl extends V1ExecActionFluentImpl> implements V1ProbeFluentImpl.ExecNested,Nested{ - ExecNestedImpl(V1ExecAction item) { - this.builder = new V1ExecActionBuilder(this, item); - } - ExecNestedImpl() { - this.builder = new V1ExecActionBuilder(this); - } - V1ExecActionBuilder builder; - public N and() { - return (N) V1ProbeFluentImpl.this.withExec(builder.build()); - } - public N endExec() { - return and(); - } - - } - class GrpcNestedImpl extends V1GRPCActionFluentImpl> implements V1ProbeFluentImpl.GrpcNested,Nested{ - GrpcNestedImpl(V1GRPCAction item) { - this.builder = new V1GRPCActionBuilder(this, item); - } - GrpcNestedImpl() { - this.builder = new V1GRPCActionBuilder(this); - } - V1GRPCActionBuilder builder; - public N and() { - return (N) V1ProbeFluentImpl.this.withGrpc(builder.build()); - } - public N endGrpc() { - return and(); - } - - } - class HttpGetNestedImpl extends V1HTTPGetActionFluentImpl> implements V1ProbeFluentImpl.HttpGetNested,Nested{ - HttpGetNestedImpl(V1HTTPGetAction item) { - this.builder = new V1HTTPGetActionBuilder(this, item); - } - HttpGetNestedImpl() { - this.builder = new V1HTTPGetActionBuilder(this); - } - V1HTTPGetActionBuilder builder; - public N and() { - return (N) V1ProbeFluentImpl.this.withHttpGet(builder.build()); - } - public N endHttpGet() { - return and(); - } - - } - class TcpSocketNestedImpl extends V1TCPSocketActionFluentImpl> implements V1ProbeFluentImpl.TcpSocketNested,Nested{ - TcpSocketNestedImpl(V1TCPSocketAction item) { - this.builder = new V1TCPSocketActionBuilder(this, item); - } - TcpSocketNestedImpl() { - this.builder = new V1TCPSocketActionBuilder(this); - } - V1TCPSocketActionBuilder builder; - public N and() { - return (N) V1ProbeFluentImpl.this.withTcpSocket(builder.build()); - } - public N endTcpSocket() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceBuilder.java index 71bc86f203..57d5a3cc42 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ProjectedVolumeSourceBuilder extends V1ProjectedVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1ProjectedVolumeSourceBuilder extends V1ProjectedVolumeSourceFluent implements VisitableBuilder{ public V1ProjectedVolumeSourceBuilder() { - this(false); - } - public V1ProjectedVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1ProjectedVolumeSource(), validationEnabled); + this(new V1ProjectedVolumeSource()); } + public V1ProjectedVolumeSourceBuilder(V1ProjectedVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1ProjectedVolumeSourceBuilder(V1ProjectedVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ProjectedVolumeSource(), validationEnabled); + this(fluent, new V1ProjectedVolumeSource()); } + public V1ProjectedVolumeSourceBuilder(V1ProjectedVolumeSourceFluent fluent,V1ProjectedVolumeSource instance) { - this(fluent, instance, false); - } - public V1ProjectedVolumeSourceBuilder(V1ProjectedVolumeSourceFluent fluent,V1ProjectedVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDefaultMode(instance.getDefaultMode()); - fluent.withSources(instance.getSources()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ProjectedVolumeSourceBuilder(V1ProjectedVolumeSource instance) { - this(instance,false); - } - public V1ProjectedVolumeSourceBuilder(V1ProjectedVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDefaultMode(instance.getDefaultMode()); - this.withSources(instance.getSources()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ProjectedVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1ProjectedVolumeSource build() { V1ProjectedVolumeSource buildable = new V1ProjectedVolumeSource(); buildable.setDefaultMode(fluent.getDefaultMode()); - buildable.setSources(fluent.getSources()); + buildable.setSources(fluent.buildSources()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceFluent.java index c7f01408ee..a46c8cd331 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceFluent.java @@ -1,59 +1,243 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ProjectedVolumeSourceFluent> extends Fluent{ - public Integer getDefaultMode(); - public A withDefaultMode(Integer defaultMode); - public Boolean hasDefaultMode(); - public A addToSources(int index,V1VolumeProjection item); - public A setToSources(int index,V1VolumeProjection item); - public A addToSources(io.kubernetes.client.openapi.models.V1VolumeProjection... items); - public A addAllToSources(Collection items); - public A removeFromSources(io.kubernetes.client.openapi.models.V1VolumeProjection... items); - public A removeAllFromSources(Collection items); - public A removeMatchingFromSources(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSources instead. - * @return The buildable object. - */ - @Deprecated - public List getSources(); - public List buildSources(); - public V1VolumeProjection buildSource(int index); - public V1VolumeProjection buildFirstSource(); - public V1VolumeProjection buildLastSource(); - public V1VolumeProjection buildMatchingSource(Predicate predicate); - public Boolean hasMatchingSource(Predicate predicate); - public A withSources(List sources); - public A withSources(io.kubernetes.client.openapi.models.V1VolumeProjection... sources); - public Boolean hasSources(); - public V1ProjectedVolumeSourceFluent.SourcesNested addNewSource(); - public V1ProjectedVolumeSourceFluent.SourcesNested addNewSourceLike(V1VolumeProjection item); - public V1ProjectedVolumeSourceFluent.SourcesNested setNewSourceLike(int index,V1VolumeProjection item); - public V1ProjectedVolumeSourceFluent.SourcesNested editSource(int index); - public V1ProjectedVolumeSourceFluent.SourcesNested editFirstSource(); - public V1ProjectedVolumeSourceFluent.SourcesNested editLastSource(); - public V1ProjectedVolumeSourceFluent.SourcesNested editMatchingSource(Predicate predicate); - public interface SourcesNested extends Nested,V1VolumeProjectionFluent>{ - public N and(); - public N endSource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ProjectedVolumeSourceFluent> extends BaseFluent{ + public V1ProjectedVolumeSourceFluent() { + } + + public V1ProjectedVolumeSourceFluent(V1ProjectedVolumeSource instance) { + this.copyInstance(instance); + } + private Integer defaultMode; + private ArrayList sources; + + protected void copyInstance(V1ProjectedVolumeSource instance) { + instance = (instance != null ? instance : new V1ProjectedVolumeSource()); + if (instance != null) { + this.withDefaultMode(instance.getDefaultMode()); + this.withSources(instance.getSources()); + } + } + + public Integer getDefaultMode() { + return this.defaultMode; + } + + public A withDefaultMode(Integer defaultMode) { + this.defaultMode = defaultMode; + return (A) this; + } + + public boolean hasDefaultMode() { + return this.defaultMode != null; + } + + public A addToSources(int index,V1VolumeProjection item) { + if (this.sources == null) {this.sources = new ArrayList();} + V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item); + if (index < 0 || index >= sources.size()) { _visitables.get("sources").add(builder); sources.add(builder); } else { _visitables.get("sources").add(index, builder); sources.add(index, builder);} + return (A)this; + } + + public A setToSources(int index,V1VolumeProjection item) { + if (this.sources == null) {this.sources = new ArrayList();} + V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item); + if (index < 0 || index >= sources.size()) { _visitables.get("sources").add(builder); sources.add(builder); } else { _visitables.get("sources").set(index, builder); sources.set(index, builder);} + return (A)this; + } + + public A addToSources(io.kubernetes.client.openapi.models.V1VolumeProjection... items) { + if (this.sources == null) {this.sources = new ArrayList();} + for (V1VolumeProjection item : items) {V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item);_visitables.get("sources").add(builder);this.sources.add(builder);} return (A)this; + } + + public A addAllToSources(Collection items) { + if (this.sources == null) {this.sources = new ArrayList();} + for (V1VolumeProjection item : items) {V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item);_visitables.get("sources").add(builder);this.sources.add(builder);} return (A)this; + } + + public A removeFromSources(io.kubernetes.client.openapi.models.V1VolumeProjection... items) { + if (this.sources == null) return (A)this; + for (V1VolumeProjection item : items) {V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item);_visitables.get("sources").remove(builder); this.sources.remove(builder);} return (A)this; + } + + public A removeAllFromSources(Collection items) { + if (this.sources == null) return (A)this; + for (V1VolumeProjection item : items) {V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item);_visitables.get("sources").remove(builder); this.sources.remove(builder);} return (A)this; + } + + public A removeMatchingFromSources(Predicate predicate) { + if (sources == null) return (A) this; + final Iterator each = sources.iterator(); + final List visitables = _visitables.get("sources"); + while (each.hasNext()) { + V1VolumeProjectionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildSources() { + return this.sources != null ? build(sources) : null; + } + + public V1VolumeProjection buildSource(int index) { + return this.sources.get(index).build(); + } + + public V1VolumeProjection buildFirstSource() { + return this.sources.get(0).build(); + } + + public V1VolumeProjection buildLastSource() { + return this.sources.get(sources.size() - 1).build(); + } + + public V1VolumeProjection buildMatchingSource(Predicate predicate) { + for (V1VolumeProjectionBuilder item : sources) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingSource(Predicate predicate) { + for (V1VolumeProjectionBuilder item : sources) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSources(List sources) { + if (this.sources != null) { + this._visitables.get("sources").clear(); + } + if (sources != null) { + this.sources = new ArrayList(); + for (V1VolumeProjection item : sources) { + this.addToSources(item); + } + } else { + this.sources = null; + } + return (A) this; + } + + public A withSources(io.kubernetes.client.openapi.models.V1VolumeProjection... sources) { + if (this.sources != null) { + this.sources.clear(); + _visitables.remove("sources"); + } + if (sources != null) { + for (V1VolumeProjection item : sources) { + this.addToSources(item); + } + } + return (A) this; + } + + public boolean hasSources() { + return this.sources != null && !this.sources.isEmpty(); + } + + public SourcesNested addNewSource() { + return new SourcesNested(-1, null); + } + + public SourcesNested addNewSourceLike(V1VolumeProjection item) { + return new SourcesNested(-1, item); + } + + public SourcesNested setNewSourceLike(int index,V1VolumeProjection item) { + return new SourcesNested(index, item); + } + + public SourcesNested editSource(int index) { + if (sources.size() <= index) throw new RuntimeException("Can't edit sources. Index exceeds size."); + return setNewSourceLike(index, buildSource(index)); } + public SourcesNested editFirstSource() { + if (sources.size() == 0) throw new RuntimeException("Can't edit first sources. The list is empty."); + return setNewSourceLike(0, buildSource(0)); + } + + public SourcesNested editLastSource() { + int index = sources.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last sources. The list is empty."); + return setNewSourceLike(index, buildSource(index)); + } + + public SourcesNested editMatchingSource(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1VolumeProjectionFluent> implements Nested{ + SourcesNested(int index,V1VolumeProjection item) { + this.index = index; + this.builder = new V1VolumeProjectionBuilder(this, item); + } + V1VolumeProjectionBuilder builder; + int index; + + public N and() { + return (N) V1ProjectedVolumeSourceFluent.this.setToSources(index,builder.build()); + } + + public N endSource() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceFluentImpl.java deleted file mode 100644 index 25fe35ef71..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ProjectedVolumeSourceFluentImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ProjectedVolumeSourceFluentImpl> extends BaseFluent implements V1ProjectedVolumeSourceFluent{ - public V1ProjectedVolumeSourceFluentImpl() { - } - public V1ProjectedVolumeSourceFluentImpl(V1ProjectedVolumeSource instance) { - if (instance != null) { - this.withDefaultMode(instance.getDefaultMode()); - this.withSources(instance.getSources()); - } - } - private Integer defaultMode; - private ArrayList sources; - public Integer getDefaultMode() { - return this.defaultMode; - } - public A withDefaultMode(Integer defaultMode) { - this.defaultMode=defaultMode; return (A) this; - } - public Boolean hasDefaultMode() { - return this.defaultMode != null; - } - public A addToSources(int index,V1VolumeProjection item) { - if (this.sources == null) {this.sources = new ArrayList();} - V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item); - if (index < 0 || index >= sources.size()) { _visitables.get("sources").add(builder); sources.add(builder); } else { _visitables.get("sources").add(index, builder); sources.add(index, builder);} - return (A)this; - } - public A setToSources(int index,V1VolumeProjection item) { - if (this.sources == null) {this.sources = new ArrayList();} - V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item); - if (index < 0 || index >= sources.size()) { _visitables.get("sources").add(builder); sources.add(builder); } else { _visitables.get("sources").set(index, builder); sources.set(index, builder);} - return (A)this; - } - public A addToSources(io.kubernetes.client.openapi.models.V1VolumeProjection... items) { - if (this.sources == null) {this.sources = new ArrayList();} - for (V1VolumeProjection item : items) {V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item);_visitables.get("sources").add(builder);this.sources.add(builder);} return (A)this; - } - public A addAllToSources(Collection items) { - if (this.sources == null) {this.sources = new ArrayList();} - for (V1VolumeProjection item : items) {V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item);_visitables.get("sources").add(builder);this.sources.add(builder);} return (A)this; - } - public A removeFromSources(io.kubernetes.client.openapi.models.V1VolumeProjection... items) { - for (V1VolumeProjection item : items) {V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item);_visitables.get("sources").remove(builder);if (this.sources != null) {this.sources.remove(builder);}} return (A)this; - } - public A removeAllFromSources(Collection items) { - for (V1VolumeProjection item : items) {V1VolumeProjectionBuilder builder = new V1VolumeProjectionBuilder(item);_visitables.get("sources").remove(builder);if (this.sources != null) {this.sources.remove(builder);}} return (A)this; - } - public A removeMatchingFromSources(Predicate predicate) { - if (sources == null) return (A) this; - final Iterator each = sources.iterator(); - final List visitables = _visitables.get("sources"); - while (each.hasNext()) { - V1VolumeProjectionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildSources instead. - * @return The buildable object. - */ - @Deprecated - public List getSources() { - return sources != null ? build(sources) : null; - } - public List buildSources() { - return sources != null ? build(sources) : null; - } - public V1VolumeProjection buildSource(int index) { - return this.sources.get(index).build(); - } - public V1VolumeProjection buildFirstSource() { - return this.sources.get(0).build(); - } - public V1VolumeProjection buildLastSource() { - return this.sources.get(sources.size() - 1).build(); - } - public V1VolumeProjection buildMatchingSource(Predicate predicate) { - for (V1VolumeProjectionBuilder item: sources) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingSource(Predicate predicate) { - for (V1VolumeProjectionBuilder item: sources) { if(predicate.test(item)){ return true;} } return false; - } - public A withSources(List sources) { - if (this.sources != null) { _visitables.get("sources").clear();} - if (sources != null) {this.sources = new ArrayList(); for (V1VolumeProjection item : sources){this.addToSources(item);}} else { this.sources = null;} return (A) this; - } - public A withSources(io.kubernetes.client.openapi.models.V1VolumeProjection... sources) { - if (this.sources != null) {this.sources.clear(); _visitables.remove("sources"); } - if (sources != null) {for (V1VolumeProjection item :sources){ this.addToSources(item);}} return (A) this; - } - public Boolean hasSources() { - return sources != null && !sources.isEmpty(); - } - public V1ProjectedVolumeSourceFluentImpl.SourcesNested addNewSource() { - return new V1ProjectedVolumeSourceFluentImpl.SourcesNestedImpl(); - } - public V1ProjectedVolumeSourceFluentImpl.SourcesNested addNewSourceLike(V1VolumeProjection item) { - return new V1ProjectedVolumeSourceFluentImpl.SourcesNestedImpl(-1, item); - } - public V1ProjectedVolumeSourceFluentImpl.SourcesNested setNewSourceLike(int index,V1VolumeProjection item) { - return new V1ProjectedVolumeSourceFluentImpl.SourcesNestedImpl(index, item); - } - public V1ProjectedVolumeSourceFluentImpl.SourcesNested editSource(int index) { - if (sources.size() <= index) throw new RuntimeException("Can't edit sources. Index exceeds size."); - return setNewSourceLike(index, buildSource(index)); - } - public V1ProjectedVolumeSourceFluentImpl.SourcesNested editFirstSource() { - if (sources.size() == 0) throw new RuntimeException("Can't edit first sources. The list is empty."); - return setNewSourceLike(0, buildSource(0)); - } - public V1ProjectedVolumeSourceFluentImpl.SourcesNested editLastSource() { - int index = sources.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last sources. The list is empty."); - return setNewSourceLike(index, buildSource(index)); - } - public V1ProjectedVolumeSourceFluentImpl.SourcesNested editMatchingSource(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1VolumeProjectionFluentImpl> implements V1ProjectedVolumeSourceFluentImpl.SourcesNested,Nested{ - SourcesNestedImpl(int index,V1VolumeProjection item) { - this.index = index; - this.builder = new V1VolumeProjectionBuilder(this, item); - } - SourcesNestedImpl() { - this.index = -1; - this.builder = new V1VolumeProjectionBuilder(this); - } - V1VolumeProjectionBuilder builder; - int index; - public N and() { - return (N) V1ProjectedVolumeSourceFluentImpl.this.setToSources(index,builder.build()); - } - public N endSource() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceBuilder.java index ff1df1e6ab..cde2a5765b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1QuobyteVolumeSourceBuilder extends V1QuobyteVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1QuobyteVolumeSourceBuilder extends V1QuobyteVolumeSourceFluent implements VisitableBuilder{ public V1QuobyteVolumeSourceBuilder() { - this(false); - } - public V1QuobyteVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1QuobyteVolumeSource(), validationEnabled); + this(new V1QuobyteVolumeSource()); } + public V1QuobyteVolumeSourceBuilder(V1QuobyteVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1QuobyteVolumeSourceBuilder(V1QuobyteVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1QuobyteVolumeSource(), validationEnabled); + this(fluent, new V1QuobyteVolumeSource()); } + public V1QuobyteVolumeSourceBuilder(V1QuobyteVolumeSourceFluent fluent,V1QuobyteVolumeSource instance) { - this(fluent, instance, false); - } - public V1QuobyteVolumeSourceBuilder(V1QuobyteVolumeSourceFluent fluent,V1QuobyteVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withGroup(instance.getGroup()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withRegistry(instance.getRegistry()); - fluent.withTenant(instance.getTenant()); - fluent.withUser(instance.getUser()); - fluent.withVolume(instance.getVolume()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1QuobyteVolumeSourceBuilder(V1QuobyteVolumeSource instance) { - this(instance,false); - } - public V1QuobyteVolumeSourceBuilder(V1QuobyteVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withReadOnly(instance.getReadOnly()); - this.withRegistry(instance.getRegistry()); - this.withTenant(instance.getTenant()); - this.withUser(instance.getUser()); - this.withVolume(instance.getVolume()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1QuobyteVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1QuobyteVolumeSource build() { V1QuobyteVolumeSource buildable = new V1QuobyteVolumeSource(); buildable.setGroup(fluent.getGroup()); @@ -58,4 +32,5 @@ public V1QuobyteVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceFluent.java index a0b2db4939..ffe6a32619 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceFluent.java @@ -1,32 +1,153 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1QuobyteVolumeSourceFluent> extends Fluent{ - public String getGroup(); - public A withGroup(String group); - public Boolean hasGroup(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public String getRegistry(); - public A withRegistry(String registry); - public Boolean hasRegistry(); - public String getTenant(); - public A withTenant(String tenant); - public Boolean hasTenant(); - public String getUser(); - public A withUser(String user); - public Boolean hasUser(); - public String getVolume(); - public A withVolume(String volume); - public Boolean hasVolume(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1QuobyteVolumeSourceFluent> extends BaseFluent{ + public V1QuobyteVolumeSourceFluent() { + } + public V1QuobyteVolumeSourceFluent(V1QuobyteVolumeSource instance) { + this.copyInstance(instance); + } + private String group; + private Boolean readOnly; + private String registry; + private String tenant; + private String user; + private String volume; + + protected void copyInstance(V1QuobyteVolumeSource instance) { + instance = (instance != null ? instance : new V1QuobyteVolumeSource()); + if (instance != null) { + this.withGroup(instance.getGroup()); + this.withReadOnly(instance.getReadOnly()); + this.withRegistry(instance.getRegistry()); + this.withTenant(instance.getTenant()); + this.withUser(instance.getUser()); + this.withVolume(instance.getVolume()); + } + } + + public String getGroup() { + return this.group; + } + + public A withGroup(String group) { + this.group = group; + return (A) this; + } + + public boolean hasGroup() { + return this.group != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public String getRegistry() { + return this.registry; + } + + public A withRegistry(String registry) { + this.registry = registry; + return (A) this; + } + + public boolean hasRegistry() { + return this.registry != null; + } + + public String getTenant() { + return this.tenant; + } + + public A withTenant(String tenant) { + this.tenant = tenant; + return (A) this; + } + + public boolean hasTenant() { + return this.tenant != null; + } + + public String getUser() { + return this.user; + } + + public A withUser(String user) { + this.user = user; + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public String getVolume() { + return this.volume; + } + + public A withVolume(String volume) { + this.volume = volume; + return (A) this; + } + + public boolean hasVolume() { + return this.volume != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1QuobyteVolumeSourceFluent that = (V1QuobyteVolumeSourceFluent) o; + if (!java.util.Objects.equals(group, that.group)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(registry, that.registry)) return false; + if (!java.util.Objects.equals(tenant, that.tenant)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + if (!java.util.Objects.equals(volume, that.volume)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(group, readOnly, registry, tenant, user, volume, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (group != null) { sb.append("group:"); sb.append(group + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (registry != null) { sb.append("registry:"); sb.append(registry + ","); } + if (tenant != null) { sb.append("tenant:"); sb.append(tenant + ","); } + if (user != null) { sb.append("user:"); sb.append(user + ","); } + if (volume != null) { sb.append("volume:"); sb.append(volume); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceFluentImpl.java deleted file mode 100644 index bacbf1e54d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1QuobyteVolumeSourceFluentImpl.java +++ /dev/null @@ -1,124 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1QuobyteVolumeSourceFluentImpl> extends BaseFluent implements V1QuobyteVolumeSourceFluent{ - public V1QuobyteVolumeSourceFluentImpl() { - } - public V1QuobyteVolumeSourceFluentImpl(V1QuobyteVolumeSource instance) { - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withReadOnly(instance.getReadOnly()); - this.withRegistry(instance.getRegistry()); - this.withTenant(instance.getTenant()); - this.withUser(instance.getUser()); - this.withVolume(instance.getVolume()); - } - } - private String group; - private Boolean readOnly; - private String registry; - private String tenant; - private String user; - private String volume; - public String getGroup() { - return this.group; - } - public A withGroup(String group) { - this.group=group; return (A) this; - } - public Boolean hasGroup() { - return this.group != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public String getRegistry() { - return this.registry; - } - public A withRegistry(String registry) { - this.registry=registry; return (A) this; - } - public Boolean hasRegistry() { - return this.registry != null; - } - public String getTenant() { - return this.tenant; - } - public A withTenant(String tenant) { - this.tenant=tenant; return (A) this; - } - public Boolean hasTenant() { - return this.tenant != null; - } - public String getUser() { - return this.user; - } - public A withUser(String user) { - this.user=user; return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public String getVolume() { - return this.volume; - } - public A withVolume(String volume) { - this.volume=volume; return (A) this; - } - public Boolean hasVolume() { - return this.volume != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1QuobyteVolumeSourceFluentImpl that = (V1QuobyteVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(group, that.group)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(registry, that.registry)) return false; - - if (!java.util.Objects.equals(tenant, that.tenant)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - if (!java.util.Objects.equals(volume, that.volume)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(group, readOnly, registry, tenant, user, volume, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (group != null) { sb.append("group:"); sb.append(group + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (registry != null) { sb.append("registry:"); sb.append(registry + ","); } - if (tenant != null) { sb.append("tenant:"); sb.append(tenant + ","); } - if (user != null) { sb.append("user:"); sb.append(user + ","); } - if (volume != null) { sb.append("volume:"); sb.append(volume); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceBuilder.java index 40426802ef..efb72113fa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceBuilder.java @@ -1,56 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RBDPersistentVolumeSourceBuilder extends V1RBDPersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1RBDPersistentVolumeSourceBuilder extends V1RBDPersistentVolumeSourceFluent implements VisitableBuilder{ public V1RBDPersistentVolumeSourceBuilder() { - this(false); - } - public V1RBDPersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1RBDPersistentVolumeSource(), validationEnabled); + this(new V1RBDPersistentVolumeSource()); } + public V1RBDPersistentVolumeSourceBuilder(V1RBDPersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1RBDPersistentVolumeSourceBuilder(V1RBDPersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RBDPersistentVolumeSource(), validationEnabled); + this(fluent, new V1RBDPersistentVolumeSource()); } + public V1RBDPersistentVolumeSourceBuilder(V1RBDPersistentVolumeSourceFluent fluent,V1RBDPersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1RBDPersistentVolumeSourceBuilder(V1RBDPersistentVolumeSourceFluent fluent,V1RBDPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withImage(instance.getImage()); - fluent.withKeyring(instance.getKeyring()); - fluent.withMonitors(instance.getMonitors()); - fluent.withPool(instance.getPool()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RBDPersistentVolumeSourceBuilder(V1RBDPersistentVolumeSource instance) { - this(instance,false); - } - public V1RBDPersistentVolumeSourceBuilder(V1RBDPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withImage(instance.getImage()); - this.withKeyring(instance.getKeyring()); - this.withMonitors(instance.getMonitors()); - this.withPool(instance.getPool()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RBDPersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1RBDPersistentVolumeSource build() { V1RBDPersistentVolumeSource buildable = new V1RBDPersistentVolumeSource(); buildable.setFsType(fluent.getFsType()); @@ -59,9 +29,10 @@ public V1RBDPersistentVolumeSource build() { buildable.setMonitors(fluent.getMonitors()); buildable.setPool(fluent.getPool()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setUser(fluent.getUser()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceFluent.java index ea1fe66e8f..2c4f855fd1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceFluent.java @@ -1,73 +1,315 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1RBDPersistentVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getImage(); - public A withImage(String image); - public Boolean hasImage(); - public String getKeyring(); - public A withKeyring(String keyring); - public Boolean hasKeyring(); - public A addToMonitors(int index,String item); - public A setToMonitors(int index,String item); - public A addToMonitors(java.lang.String... items); - public A addAllToMonitors(Collection items); - public A removeFromMonitors(java.lang.String... items); - public A removeAllFromMonitors(Collection items); - public List getMonitors(); - public String getMonitor(int index); - public String getFirstMonitor(); - public String getLastMonitor(); - public String getMatchingMonitor(Predicate predicate); - public Boolean hasMatchingMonitor(Predicate predicate); - public A withMonitors(List monitors); - public A withMonitors(java.lang.String... monitors); - public Boolean hasMonitors(); - public String getPool(); - public A withPool(String pool); - public Boolean hasPool(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef(); - public V1SecretReference buildSecretRef(); - public A withSecretRef(V1SecretReference secretRef); - public Boolean hasSecretRef(); - public V1RBDPersistentVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1RBDPersistentVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1SecretReference item); - public V1RBDPersistentVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1RBDPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1RBDPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1SecretReference item); - public String getUser(); - public A withUser(String user); - public Boolean hasUser(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RBDPersistentVolumeSourceFluent> extends BaseFluent{ + public V1RBDPersistentVolumeSourceFluent() { + } + + public V1RBDPersistentVolumeSourceFluent(V1RBDPersistentVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private String image; + private String keyring; + private List monitors; + private String pool; + private Boolean readOnly; + private V1SecretReferenceBuilder secretRef; + private String user; + + protected void copyInstance(V1RBDPersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1RBDPersistentVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withImage(instance.getImage()); + this.withKeyring(instance.getKeyring()); + this.withMonitors(instance.getMonitors()); + this.withPool(instance.getPool()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withUser(instance.getUser()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getImage() { + return this.image; + } + + public A withImage(String image) { + this.image = image; + return (A) this; + } + + public boolean hasImage() { + return this.image != null; + } + + public String getKeyring() { + return this.keyring; + } + + public A withKeyring(String keyring) { + this.keyring = keyring; + return (A) this; + } + + public boolean hasKeyring() { + return this.keyring != null; + } + + public A addToMonitors(int index,String item) { + if (this.monitors == null) {this.monitors = new ArrayList();} + this.monitors.add(index, item); + return (A)this; + } + + public A setToMonitors(int index,String item) { + if (this.monitors == null) {this.monitors = new ArrayList();} + this.monitors.set(index, item); return (A)this; + } + + public A addToMonitors(java.lang.String... items) { + if (this.monitors == null) {this.monitors = new ArrayList();} + for (String item : items) {this.monitors.add(item);} return (A)this; + } + + public A addAllToMonitors(Collection items) { + if (this.monitors == null) {this.monitors = new ArrayList();} + for (String item : items) {this.monitors.add(item);} return (A)this; + } + + public A removeFromMonitors(java.lang.String... items) { + if (this.monitors == null) return (A)this; + for (String item : items) { this.monitors.remove(item);} return (A)this; + } + + public A removeAllFromMonitors(Collection items) { + if (this.monitors == null) return (A)this; + for (String item : items) { this.monitors.remove(item);} return (A)this; + } + + public List getMonitors() { + return this.monitors; + } + + public String getMonitor(int index) { + return this.monitors.get(index); + } + + public String getFirstMonitor() { + return this.monitors.get(0); + } + + public String getLastMonitor() { + return this.monitors.get(monitors.size() - 1); + } + + public String getMatchingMonitor(Predicate predicate) { + for (String item : monitors) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingMonitor(Predicate predicate) { + for (String item : monitors) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMonitors(List monitors) { + if (monitors != null) { + this.monitors = new ArrayList(); + for (String item : monitors) { + this.addToMonitors(item); + } + } else { + this.monitors = null; + } + return (A) this; + } + + public A withMonitors(java.lang.String... monitors) { + if (this.monitors != null) { + this.monitors.clear(); + _visitables.remove("monitors"); + } + if (monitors != null) { + for (String item : monitors) { + this.addToMonitors(item); + } + } + return (A) this; + } + + public boolean hasMonitors() { + return this.monitors != null && !this.monitors.isEmpty(); + } + + public String getPool() { + return this.pool; + } + + public A withPool(String pool) { + this.pool = pool; + return (A) this; + } + + public boolean hasPool() { + return this.pool != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1SecretReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1SecretReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1SecretReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1SecretReference item) { + return new SecretRefNested(item); } + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getUser() { + return this.user; + } + + public A withUser(String user) { + this.user = user; + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RBDPersistentVolumeSourceFluent that = (V1RBDPersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(image, that.image)) return false; + if (!java.util.Objects.equals(keyring, that.keyring)) return false; + if (!java.util.Objects.equals(monitors, that.monitors)) return false; + if (!java.util.Objects.equals(pool, that.pool)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, image, keyring, monitors, pool, readOnly, secretRef, user, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (image != null) { sb.append("image:"); sb.append(image + ","); } + if (keyring != null) { sb.append("keyring:"); sb.append(keyring + ","); } + if (monitors != null && !monitors.isEmpty()) { sb.append("monitors:"); sb.append(monitors + ","); } + if (pool != null) { sb.append("pool:"); sb.append(pool + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (user != null) { sb.append("user:"); sb.append(user); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1SecretReferenceFluent> implements Nested{ + SecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1RBDPersistentVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceFluentImpl.java deleted file mode 100644 index aed95c6ea2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDPersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,241 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RBDPersistentVolumeSourceFluentImpl> extends BaseFluent implements V1RBDPersistentVolumeSourceFluent{ - public V1RBDPersistentVolumeSourceFluentImpl() { - } - public V1RBDPersistentVolumeSourceFluentImpl(V1RBDPersistentVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withImage(instance.getImage()); - this.withKeyring(instance.getKeyring()); - this.withMonitors(instance.getMonitors()); - this.withPool(instance.getPool()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withUser(instance.getUser()); - } - } - private String fsType; - private String image; - private String keyring; - private List monitors; - private String pool; - private Boolean readOnly; - private V1SecretReferenceBuilder secretRef; - private String user; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getImage() { - return this.image; - } - public A withImage(String image) { - this.image=image; return (A) this; - } - public Boolean hasImage() { - return this.image != null; - } - public String getKeyring() { - return this.keyring; - } - public A withKeyring(String keyring) { - this.keyring=keyring; return (A) this; - } - public Boolean hasKeyring() { - return this.keyring != null; - } - public A addToMonitors(int index,String item) { - if (this.monitors == null) {this.monitors = new ArrayList();} - this.monitors.add(index, item); - return (A)this; - } - public A setToMonitors(int index,String item) { - if (this.monitors == null) {this.monitors = new ArrayList();} - this.monitors.set(index, item); return (A)this; - } - public A addToMonitors(java.lang.String... items) { - if (this.monitors == null) {this.monitors = new ArrayList();} - for (String item : items) {this.monitors.add(item);} return (A)this; - } - public A addAllToMonitors(Collection items) { - if (this.monitors == null) {this.monitors = new ArrayList();} - for (String item : items) {this.monitors.add(item);} return (A)this; - } - public A removeFromMonitors(java.lang.String... items) { - for (String item : items) {if (this.monitors!= null){ this.monitors.remove(item);}} return (A)this; - } - public A removeAllFromMonitors(Collection items) { - for (String item : items) {if (this.monitors!= null){ this.monitors.remove(item);}} return (A)this; - } - public List getMonitors() { - return this.monitors; - } - public String getMonitor(int index) { - return this.monitors.get(index); - } - public String getFirstMonitor() { - return this.monitors.get(0); - } - public String getLastMonitor() { - return this.monitors.get(monitors.size() - 1); - } - public String getMatchingMonitor(Predicate predicate) { - for (String item: monitors) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingMonitor(Predicate predicate) { - for (String item: monitors) { if(predicate.test(item)){ return true;} } return false; - } - public A withMonitors(List monitors) { - if (monitors != null) {this.monitors = new ArrayList(); for (String item : monitors){this.addToMonitors(item);}} else { this.monitors = null;} return (A) this; - } - public A withMonitors(java.lang.String... monitors) { - if (this.monitors != null) {this.monitors.clear(); _visitables.remove("monitors"); } - if (monitors != null) {for (String item :monitors){ this.addToMonitors(item);}} return (A) this; - } - public Boolean hasMonitors() { - return monitors != null && !monitors.isEmpty(); - } - public String getPool() { - return this.pool; - } - public A withPool(String pool) { - this.pool=pool; return (A) this; - } - public Boolean hasPool() { - return this.pool != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1SecretReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1SecretReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1SecretReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1RBDPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1RBDPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1RBDPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1SecretReference item) { - return new V1RBDPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1RBDPersistentVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1RBDPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1RBDPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getUser() { - return this.user; - } - public A withUser(String user) { - this.user=user; return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RBDPersistentVolumeSourceFluentImpl that = (V1RBDPersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(image, that.image)) return false; - - if (!java.util.Objects.equals(keyring, that.keyring)) return false; - - if (!java.util.Objects.equals(monitors, that.monitors)) return false; - - if (!java.util.Objects.equals(pool, that.pool)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, image, keyring, monitors, pool, readOnly, secretRef, user, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (image != null) { sb.append("image:"); sb.append(image + ","); } - if (keyring != null) { sb.append("keyring:"); sb.append(keyring + ","); } - if (monitors != null && !monitors.isEmpty()) { sb.append("monitors:"); sb.append(monitors + ","); } - if (pool != null) { sb.append("pool:"); sb.append(pool + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (user != null) { sb.append("user:"); sb.append(user); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1RBDPersistentVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1RBDPersistentVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceBuilder.java index aed9eccec5..ee1ee86af3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceBuilder.java @@ -1,56 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RBDVolumeSourceBuilder extends V1RBDVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1RBDVolumeSourceBuilder extends V1RBDVolumeSourceFluent implements VisitableBuilder{ public V1RBDVolumeSourceBuilder() { - this(false); - } - public V1RBDVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1RBDVolumeSource(), validationEnabled); + this(new V1RBDVolumeSource()); } + public V1RBDVolumeSourceBuilder(V1RBDVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1RBDVolumeSourceBuilder(V1RBDVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RBDVolumeSource(), validationEnabled); + this(fluent, new V1RBDVolumeSource()); } + public V1RBDVolumeSourceBuilder(V1RBDVolumeSourceFluent fluent,V1RBDVolumeSource instance) { - this(fluent, instance, false); - } - public V1RBDVolumeSourceBuilder(V1RBDVolumeSourceFluent fluent,V1RBDVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withImage(instance.getImage()); - fluent.withKeyring(instance.getKeyring()); - fluent.withMonitors(instance.getMonitors()); - fluent.withPool(instance.getPool()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RBDVolumeSourceBuilder(V1RBDVolumeSource instance) { - this(instance,false); - } - public V1RBDVolumeSourceBuilder(V1RBDVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withImage(instance.getImage()); - this.withKeyring(instance.getKeyring()); - this.withMonitors(instance.getMonitors()); - this.withPool(instance.getPool()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RBDVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1RBDVolumeSource build() { V1RBDVolumeSource buildable = new V1RBDVolumeSource(); buildable.setFsType(fluent.getFsType()); @@ -59,9 +29,10 @@ public V1RBDVolumeSource build() { buildable.setMonitors(fluent.getMonitors()); buildable.setPool(fluent.getPool()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setUser(fluent.getUser()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceFluent.java index dc58d529f3..29183804af 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceFluent.java @@ -1,73 +1,315 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1RBDVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getImage(); - public A withImage(String image); - public Boolean hasImage(); - public String getKeyring(); - public A withKeyring(String keyring); - public Boolean hasKeyring(); - public A addToMonitors(int index,String item); - public A setToMonitors(int index,String item); - public A addToMonitors(java.lang.String... items); - public A addAllToMonitors(Collection items); - public A removeFromMonitors(java.lang.String... items); - public A removeAllFromMonitors(Collection items); - public List getMonitors(); - public String getMonitor(int index); - public String getFirstMonitor(); - public String getLastMonitor(); - public String getMatchingMonitor(Predicate predicate); - public Boolean hasMatchingMonitor(Predicate predicate); - public A withMonitors(List monitors); - public A withMonitors(java.lang.String... monitors); - public Boolean hasMonitors(); - public String getPool(); - public A withPool(String pool); - public Boolean hasPool(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef(); - public V1LocalObjectReference buildSecretRef(); - public A withSecretRef(V1LocalObjectReference secretRef); - public Boolean hasSecretRef(); - public V1RBDVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1RBDVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item); - public V1RBDVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1RBDVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1RBDVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item); - public String getUser(); - public A withUser(String user); - public Boolean hasUser(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RBDVolumeSourceFluent> extends BaseFluent{ + public V1RBDVolumeSourceFluent() { + } + + public V1RBDVolumeSourceFluent(V1RBDVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private String image; + private String keyring; + private List monitors; + private String pool; + private Boolean readOnly; + private V1LocalObjectReferenceBuilder secretRef; + private String user; + + protected void copyInstance(V1RBDVolumeSource instance) { + instance = (instance != null ? instance : new V1RBDVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withImage(instance.getImage()); + this.withKeyring(instance.getKeyring()); + this.withMonitors(instance.getMonitors()); + this.withPool(instance.getPool()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withUser(instance.getUser()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getImage() { + return this.image; + } + + public A withImage(String image) { + this.image = image; + return (A) this; + } + + public boolean hasImage() { + return this.image != null; + } + + public String getKeyring() { + return this.keyring; + } + + public A withKeyring(String keyring) { + this.keyring = keyring; + return (A) this; + } + + public boolean hasKeyring() { + return this.keyring != null; + } + + public A addToMonitors(int index,String item) { + if (this.monitors == null) {this.monitors = new ArrayList();} + this.monitors.add(index, item); + return (A)this; + } + + public A setToMonitors(int index,String item) { + if (this.monitors == null) {this.monitors = new ArrayList();} + this.monitors.set(index, item); return (A)this; + } + + public A addToMonitors(java.lang.String... items) { + if (this.monitors == null) {this.monitors = new ArrayList();} + for (String item : items) {this.monitors.add(item);} return (A)this; + } + + public A addAllToMonitors(Collection items) { + if (this.monitors == null) {this.monitors = new ArrayList();} + for (String item : items) {this.monitors.add(item);} return (A)this; + } + + public A removeFromMonitors(java.lang.String... items) { + if (this.monitors == null) return (A)this; + for (String item : items) { this.monitors.remove(item);} return (A)this; + } + + public A removeAllFromMonitors(Collection items) { + if (this.monitors == null) return (A)this; + for (String item : items) { this.monitors.remove(item);} return (A)this; + } + + public List getMonitors() { + return this.monitors; + } + + public String getMonitor(int index) { + return this.monitors.get(index); + } + + public String getFirstMonitor() { + return this.monitors.get(0); + } + + public String getLastMonitor() { + return this.monitors.get(monitors.size() - 1); + } + + public String getMatchingMonitor(Predicate predicate) { + for (String item : monitors) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingMonitor(Predicate predicate) { + for (String item : monitors) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMonitors(List monitors) { + if (monitors != null) { + this.monitors = new ArrayList(); + for (String item : monitors) { + this.addToMonitors(item); + } + } else { + this.monitors = null; + } + return (A) this; + } + + public A withMonitors(java.lang.String... monitors) { + if (this.monitors != null) { + this.monitors.clear(); + _visitables.remove("monitors"); + } + if (monitors != null) { + for (String item : monitors) { + this.addToMonitors(item); + } + } + return (A) this; + } + + public boolean hasMonitors() { + return this.monitors != null && !this.monitors.isEmpty(); + } + + public String getPool() { + return this.pool; + } + + public A withPool(String pool) { + this.pool = pool; + return (A) this; + } + + public boolean hasPool() { + return this.pool != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1LocalObjectReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1LocalObjectReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1LocalObjectReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { + return new SecretRefNested(item); } + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1LocalObjectReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getUser() { + return this.user; + } + + public A withUser(String user) { + this.user = user; + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RBDVolumeSourceFluent that = (V1RBDVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(image, that.image)) return false; + if (!java.util.Objects.equals(keyring, that.keyring)) return false; + if (!java.util.Objects.equals(monitors, that.monitors)) return false; + if (!java.util.Objects.equals(pool, that.pool)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, image, keyring, monitors, pool, readOnly, secretRef, user, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (image != null) { sb.append("image:"); sb.append(image + ","); } + if (keyring != null) { sb.append("keyring:"); sb.append(keyring + ","); } + if (monitors != null && !monitors.isEmpty()) { sb.append("monitors:"); sb.append(monitors + ","); } + if (pool != null) { sb.append("pool:"); sb.append(pool + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (user != null) { sb.append("user:"); sb.append(user); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1LocalObjectReferenceFluent> implements Nested{ + SecretRefNested(V1LocalObjectReference item) { + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1RBDVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceFluentImpl.java deleted file mode 100644 index 37f03733cb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RBDVolumeSourceFluentImpl.java +++ /dev/null @@ -1,241 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RBDVolumeSourceFluentImpl> extends BaseFluent implements V1RBDVolumeSourceFluent{ - public V1RBDVolumeSourceFluentImpl() { - } - public V1RBDVolumeSourceFluentImpl(V1RBDVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withImage(instance.getImage()); - this.withKeyring(instance.getKeyring()); - this.withMonitors(instance.getMonitors()); - this.withPool(instance.getPool()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withUser(instance.getUser()); - } - } - private String fsType; - private String image; - private String keyring; - private List monitors; - private String pool; - private Boolean readOnly; - private V1LocalObjectReferenceBuilder secretRef; - private String user; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getImage() { - return this.image; - } - public A withImage(String image) { - this.image=image; return (A) this; - } - public Boolean hasImage() { - return this.image != null; - } - public String getKeyring() { - return this.keyring; - } - public A withKeyring(String keyring) { - this.keyring=keyring; return (A) this; - } - public Boolean hasKeyring() { - return this.keyring != null; - } - public A addToMonitors(int index,String item) { - if (this.monitors == null) {this.monitors = new ArrayList();} - this.monitors.add(index, item); - return (A)this; - } - public A setToMonitors(int index,String item) { - if (this.monitors == null) {this.monitors = new ArrayList();} - this.monitors.set(index, item); return (A)this; - } - public A addToMonitors(java.lang.String... items) { - if (this.monitors == null) {this.monitors = new ArrayList();} - for (String item : items) {this.monitors.add(item);} return (A)this; - } - public A addAllToMonitors(Collection items) { - if (this.monitors == null) {this.monitors = new ArrayList();} - for (String item : items) {this.monitors.add(item);} return (A)this; - } - public A removeFromMonitors(java.lang.String... items) { - for (String item : items) {if (this.monitors!= null){ this.monitors.remove(item);}} return (A)this; - } - public A removeAllFromMonitors(Collection items) { - for (String item : items) {if (this.monitors!= null){ this.monitors.remove(item);}} return (A)this; - } - public List getMonitors() { - return this.monitors; - } - public String getMonitor(int index) { - return this.monitors.get(index); - } - public String getFirstMonitor() { - return this.monitors.get(0); - } - public String getLastMonitor() { - return this.monitors.get(monitors.size() - 1); - } - public String getMatchingMonitor(Predicate predicate) { - for (String item: monitors) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingMonitor(Predicate predicate) { - for (String item: monitors) { if(predicate.test(item)){ return true;} } return false; - } - public A withMonitors(List monitors) { - if (monitors != null) {this.monitors = new ArrayList(); for (String item : monitors){this.addToMonitors(item);}} else { this.monitors = null;} return (A) this; - } - public A withMonitors(java.lang.String... monitors) { - if (this.monitors != null) {this.monitors.clear(); _visitables.remove("monitors"); } - if (monitors != null) {for (String item :monitors){ this.addToMonitors(item);}} return (A) this; - } - public Boolean hasMonitors() { - return monitors != null && !monitors.isEmpty(); - } - public String getPool() { - return this.pool; - } - public A withPool(String pool) { - this.pool=pool; return (A) this; - } - public Boolean hasPool() { - return this.pool != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1LocalObjectReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1LocalObjectReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1LocalObjectReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1RBDVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1RBDVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1RBDVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { - return new V1RBDVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1RBDVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1RBDVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1LocalObjectReferenceBuilder().build()); - } - public V1RBDVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getUser() { - return this.user; - } - public A withUser(String user) { - this.user=user; return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RBDVolumeSourceFluentImpl that = (V1RBDVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(image, that.image)) return false; - - if (!java.util.Objects.equals(keyring, that.keyring)) return false; - - if (!java.util.Objects.equals(monitors, that.monitors)) return false; - - if (!java.util.Objects.equals(pool, that.pool)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, image, keyring, monitors, pool, readOnly, secretRef, user, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (image != null) { sb.append("image:"); sb.append(image + ","); } - if (keyring != null) { sb.append("keyring:"); sb.append(keyring + ","); } - if (monitors != null && !monitors.isEmpty()) { sb.append("monitors:"); sb.append(monitors + ","); } - if (pool != null) { sb.append("pool:"); sb.append(pool + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (user != null) { sb.append("user:"); sb.append(user); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1RBDVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1LocalObjectReference item) { - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - public N and() { - return (N) V1RBDVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetBuilder.java index 1c4ea89b1f..914dc1069f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicaSetBuilder extends V1ReplicaSetFluentImpl implements VisitableBuilder{ +public class V1ReplicaSetBuilder extends V1ReplicaSetFluent implements VisitableBuilder{ public V1ReplicaSetBuilder() { - this(false); - } - public V1ReplicaSetBuilder(Boolean validationEnabled) { - this(new V1ReplicaSet(), validationEnabled); + this(new V1ReplicaSet()); } + public V1ReplicaSetBuilder(V1ReplicaSetFluent fluent) { - this(fluent, false); - } - public V1ReplicaSetBuilder(V1ReplicaSetFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicaSet(), validationEnabled); + this(fluent, new V1ReplicaSet()); } + public V1ReplicaSetBuilder(V1ReplicaSetFluent fluent,V1ReplicaSet instance) { - this(fluent, instance, false); - } - public V1ReplicaSetBuilder(V1ReplicaSetFluent fluent,V1ReplicaSet instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicaSetBuilder(V1ReplicaSet instance) { - this(instance,false); - } - public V1ReplicaSetBuilder(V1ReplicaSet instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicaSetFluent fluent; - Boolean validationEnabled; + public V1ReplicaSet build() { V1ReplicaSet buildable = new V1ReplicaSet(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionBuilder.java index 320cda092f..557dd1cd1b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicaSetConditionBuilder extends V1ReplicaSetConditionFluentImpl implements VisitableBuilder{ +public class V1ReplicaSetConditionBuilder extends V1ReplicaSetConditionFluent implements VisitableBuilder{ public V1ReplicaSetConditionBuilder() { - this(false); - } - public V1ReplicaSetConditionBuilder(Boolean validationEnabled) { - this(new V1ReplicaSetCondition(), validationEnabled); + this(new V1ReplicaSetCondition()); } + public V1ReplicaSetConditionBuilder(V1ReplicaSetConditionFluent fluent) { - this(fluent, false); - } - public V1ReplicaSetConditionBuilder(V1ReplicaSetConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicaSetCondition(), validationEnabled); + this(fluent, new V1ReplicaSetCondition()); } + public V1ReplicaSetConditionBuilder(V1ReplicaSetConditionFluent fluent,V1ReplicaSetCondition instance) { - this(fluent, instance, false); - } - public V1ReplicaSetConditionBuilder(V1ReplicaSetConditionFluent fluent,V1ReplicaSetCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicaSetConditionBuilder(V1ReplicaSetCondition instance) { - this(instance,false); - } - public V1ReplicaSetConditionBuilder(V1ReplicaSetCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicaSetConditionFluent fluent; - Boolean validationEnabled; + public V1ReplicaSetCondition build() { V1ReplicaSetCondition buildable = new V1ReplicaSetCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1ReplicaSetCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionFluent.java index 143ab6135a..e9b9983e4e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ReplicaSetConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicaSetConditionFluent> extends BaseFluent{ + public V1ReplicaSetConditionFluent() { + } + public V1ReplicaSetConditionFluent(V1ReplicaSetCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1ReplicaSetCondition instance) { + instance = (instance != null ? instance : new V1ReplicaSetCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ReplicaSetConditionFluent that = (V1ReplicaSetConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionFluentImpl.java deleted file mode 100644 index d09e1bfa8b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicaSetConditionFluentImpl> extends BaseFluent implements V1ReplicaSetConditionFluent{ - public V1ReplicaSetConditionFluentImpl() { - } - public V1ReplicaSetConditionFluentImpl(V1ReplicaSetCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ReplicaSetConditionFluentImpl that = (V1ReplicaSetConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetFluent.java index c1fc6c205d..db0d20c54d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1ReplicaSetFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ReplicaSetFluent.MetadataNested withNewMetadata(); - public V1ReplicaSetFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ReplicaSetFluent.MetadataNested editMetadata(); - public V1ReplicaSetFluent.MetadataNested editOrNewMetadata(); - public V1ReplicaSetFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ReplicaSetSpec getSpec(); - public V1ReplicaSetSpec buildSpec(); - public A withSpec(V1ReplicaSetSpec spec); - public Boolean hasSpec(); - public V1ReplicaSetFluent.SpecNested withNewSpec(); - public V1ReplicaSetFluent.SpecNested withNewSpecLike(V1ReplicaSetSpec item); - public V1ReplicaSetFluent.SpecNested editSpec(); - public V1ReplicaSetFluent.SpecNested editOrNewSpec(); - public V1ReplicaSetFluent.SpecNested editOrNewSpecLike(V1ReplicaSetSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ReplicaSetStatus getStatus(); - public V1ReplicaSetStatus buildStatus(); - public A withStatus(V1ReplicaSetStatus status); - public Boolean hasStatus(); - public V1ReplicaSetFluent.StatusNested withNewStatus(); - public V1ReplicaSetFluent.StatusNested withNewStatusLike(V1ReplicaSetStatus item); - public V1ReplicaSetFluent.StatusNested editStatus(); - public V1ReplicaSetFluent.StatusNested editOrNewStatus(); - public V1ReplicaSetFluent.StatusNested editOrNewStatusLike(V1ReplicaSetStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicaSetFluent> extends BaseFluent{ + public V1ReplicaSetFluent() { + } + + public V1ReplicaSetFluent(V1ReplicaSet instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1ReplicaSetSpecBuilder spec; + private V1ReplicaSetStatusBuilder status; + + protected void copyInstance(V1ReplicaSet instance) { + instance = (instance != null ? instance : new V1ReplicaSet()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1ReplicaSetSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1ReplicaSetSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1ReplicaSetSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1ReplicaSetSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1ReplicaSetSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1ReplicaSetSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1ReplicaSetSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1ReplicaSetStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1ReplicaSetStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1ReplicaSetStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1ReplicaSetStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1ReplicaSetStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1ReplicaSetStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ReplicaSetFluent that = (V1ReplicaSetFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ReplicaSetFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1ReplicaSetStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1ReplicaSetSpecFluent> implements Nested{ + SpecNested(V1ReplicaSetSpec item) { + this.builder = new V1ReplicaSetSpecBuilder(this, item); + } + V1ReplicaSetSpecBuilder builder; + + public N and() { + return (N) V1ReplicaSetFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1ReplicaSetStatusFluent> implements Nested{ + StatusNested(V1ReplicaSetStatus item) { + this.builder = new V1ReplicaSetStatusBuilder(this, item); + } + V1ReplicaSetStatusBuilder builder; + + public N and() { + return (N) V1ReplicaSetFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetFluentImpl.java deleted file mode 100644 index c78d597e9b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicaSetFluentImpl> extends BaseFluent implements V1ReplicaSetFluent{ - public V1ReplicaSetFluentImpl() { - } - public V1ReplicaSetFluentImpl(V1ReplicaSet instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1ReplicaSetSpecBuilder spec; - private V1ReplicaSetStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ReplicaSetFluentImpl.MetadataNested withNewMetadata() { - return new V1ReplicaSetFluentImpl.MetadataNestedImpl(); - } - public V1ReplicaSetFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ReplicaSetFluentImpl.MetadataNestedImpl(item); - } - public V1ReplicaSetFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ReplicaSetFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ReplicaSetFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ReplicaSetSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1ReplicaSetSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1ReplicaSetSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1ReplicaSetSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1ReplicaSetFluentImpl.SpecNested withNewSpec() { - return new V1ReplicaSetFluentImpl.SpecNestedImpl(); - } - public V1ReplicaSetFluentImpl.SpecNested withNewSpecLike(V1ReplicaSetSpec item) { - return new V1ReplicaSetFluentImpl.SpecNestedImpl(item); - } - public V1ReplicaSetFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1ReplicaSetFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1ReplicaSetSpecBuilder().build()); - } - public V1ReplicaSetFluentImpl.SpecNested editOrNewSpecLike(V1ReplicaSetSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ReplicaSetStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1ReplicaSetStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1ReplicaSetStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1ReplicaSetStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1ReplicaSetFluentImpl.StatusNested withNewStatus() { - return new V1ReplicaSetFluentImpl.StatusNestedImpl(); - } - public V1ReplicaSetFluentImpl.StatusNested withNewStatusLike(V1ReplicaSetStatus item) { - return new V1ReplicaSetFluentImpl.StatusNestedImpl(item); - } - public V1ReplicaSetFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1ReplicaSetFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1ReplicaSetStatusBuilder().build()); - } - public V1ReplicaSetFluentImpl.StatusNested editOrNewStatusLike(V1ReplicaSetStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ReplicaSetFluentImpl that = (V1ReplicaSetFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ReplicaSetFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ReplicaSetFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1ReplicaSetSpecFluentImpl> implements V1ReplicaSetFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1ReplicaSetSpec item) { - this.builder = new V1ReplicaSetSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1ReplicaSetSpecBuilder(this); - } - V1ReplicaSetSpecBuilder builder; - public N and() { - return (N) V1ReplicaSetFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1ReplicaSetStatusFluentImpl> implements V1ReplicaSetFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1ReplicaSetStatus item) { - this.builder = new V1ReplicaSetStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1ReplicaSetStatusBuilder(this); - } - V1ReplicaSetStatusBuilder builder; - public N and() { - return (N) V1ReplicaSetFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListBuilder.java index 3150cc4393..bcad626162 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicaSetListBuilder extends V1ReplicaSetListFluentImpl implements VisitableBuilder{ +public class V1ReplicaSetListBuilder extends V1ReplicaSetListFluent implements VisitableBuilder{ public V1ReplicaSetListBuilder() { - this(false); - } - public V1ReplicaSetListBuilder(Boolean validationEnabled) { - this(new V1ReplicaSetList(), validationEnabled); + this(new V1ReplicaSetList()); } + public V1ReplicaSetListBuilder(V1ReplicaSetListFluent fluent) { - this(fluent, false); - } - public V1ReplicaSetListBuilder(V1ReplicaSetListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicaSetList(), validationEnabled); + this(fluent, new V1ReplicaSetList()); } + public V1ReplicaSetListBuilder(V1ReplicaSetListFluent fluent,V1ReplicaSetList instance) { - this(fluent, instance, false); - } - public V1ReplicaSetListBuilder(V1ReplicaSetListFluent fluent,V1ReplicaSetList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicaSetListBuilder(V1ReplicaSetList instance) { - this(instance,false); - } - public V1ReplicaSetListBuilder(V1ReplicaSetList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicaSetListFluent fluent; - Boolean validationEnabled; + public V1ReplicaSetList build() { V1ReplicaSetList buildable = new V1ReplicaSetList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListFluent.java index 62ce7b2e3e..084526b939 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ReplicaSetListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ReplicaSet item); - public A setToItems(int index,V1ReplicaSet item); - public A addToItems(io.kubernetes.client.openapi.models.V1ReplicaSet... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ReplicaSet... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ReplicaSet buildItem(int index); - public V1ReplicaSet buildFirstItem(); - public V1ReplicaSet buildLastItem(); - public V1ReplicaSet buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ReplicaSet... items); - public Boolean hasItems(); - public V1ReplicaSetListFluent.ItemsNested addNewItem(); - public V1ReplicaSetListFluent.ItemsNested addNewItemLike(V1ReplicaSet item); - public V1ReplicaSetListFluent.ItemsNested setNewItemLike(int index,V1ReplicaSet item); - public V1ReplicaSetListFluent.ItemsNested editItem(int index); - public V1ReplicaSetListFluent.ItemsNested editFirstItem(); - public V1ReplicaSetListFluent.ItemsNested editLastItem(); - public V1ReplicaSetListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ReplicaSetListFluent.MetadataNested withNewMetadata(); - public V1ReplicaSetListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ReplicaSetListFluent.MetadataNested editMetadata(); - public V1ReplicaSetListFluent.MetadataNested editOrNewMetadata(); - public V1ReplicaSetListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ReplicaSetFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicaSetListFluent> extends BaseFluent{ + public V1ReplicaSetListFluent() { + } + + public V1ReplicaSetListFluent(V1ReplicaSetList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ReplicaSetList instance) { + instance = (instance != null ? instance : new V1ReplicaSetList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ReplicaSet item) { + if (this.items == null) {this.items = new ArrayList();} + V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ReplicaSet item) { + if (this.items == null) {this.items = new ArrayList();} + V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ReplicaSet... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ReplicaSet item : items) {V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ReplicaSet item : items) {V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ReplicaSet... items) { + if (this.items == null) return (A)this; + for (V1ReplicaSet item : items) {V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ReplicaSet item : items) {V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ReplicaSetBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ReplicaSet buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ReplicaSet buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ReplicaSet buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ReplicaSet buildMatchingItem(Predicate predicate) { + for (V1ReplicaSetBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ReplicaSetBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ReplicaSet item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ReplicaSet... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ReplicaSet item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ReplicaSet item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ReplicaSet item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ReplicaSetListFluent that = (V1ReplicaSetListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ReplicaSetFluent> implements Nested{ + ItemsNested(int index,V1ReplicaSet item) { + this.index = index; + this.builder = new V1ReplicaSetBuilder(this, item); + } + V1ReplicaSetBuilder builder; + int index; + public N and() { + return (N) V1ReplicaSetListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ReplicaSetListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListFluentImpl.java deleted file mode 100644 index 71a2d30585..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicaSetListFluentImpl> extends BaseFluent implements V1ReplicaSetListFluent{ - public V1ReplicaSetListFluentImpl() { - } - public V1ReplicaSetListFluentImpl(V1ReplicaSetList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ReplicaSet item) { - if (this.items == null) {this.items = new ArrayList();} - V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ReplicaSet item) { - if (this.items == null) {this.items = new ArrayList();} - V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ReplicaSet... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ReplicaSet item : items) {V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ReplicaSet item : items) {V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ReplicaSet... items) { - for (V1ReplicaSet item : items) {V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ReplicaSet item : items) {V1ReplicaSetBuilder builder = new V1ReplicaSetBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ReplicaSetBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ReplicaSet buildItem(int index) { - return this.items.get(index).build(); - } - public V1ReplicaSet buildFirstItem() { - return this.items.get(0).build(); - } - public V1ReplicaSet buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ReplicaSet buildMatchingItem(Predicate predicate) { - for (V1ReplicaSetBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ReplicaSetBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ReplicaSet item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ReplicaSet... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ReplicaSet item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ReplicaSetListFluentImpl.ItemsNested addNewItem() { - return new V1ReplicaSetListFluentImpl.ItemsNestedImpl(); - } - public V1ReplicaSetListFluentImpl.ItemsNested addNewItemLike(V1ReplicaSet item) { - return new V1ReplicaSetListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ReplicaSetListFluentImpl.ItemsNested setNewItemLike(int index,V1ReplicaSet item) { - return new V1ReplicaSetListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ReplicaSetListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ReplicaSetListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ReplicaSetListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ReplicaSetListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ReplicaSetListFluentImpl.MetadataNestedImpl(); - } - public V1ReplicaSetListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ReplicaSetListFluentImpl.MetadataNestedImpl(item); - } - public V1ReplicaSetListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ReplicaSetListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ReplicaSetListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ReplicaSetListFluentImpl that = (V1ReplicaSetListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ReplicaSetFluentImpl> implements V1ReplicaSetListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ReplicaSet item) { - this.index = index; - this.builder = new V1ReplicaSetBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ReplicaSetBuilder(this); - } - V1ReplicaSetBuilder builder; - int index; - public N and() { - return (N) V1ReplicaSetListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ReplicaSetListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ReplicaSetListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecBuilder.java index 11994f203b..12ce345128 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicaSetSpecBuilder extends V1ReplicaSetSpecFluentImpl implements VisitableBuilder{ +public class V1ReplicaSetSpecBuilder extends V1ReplicaSetSpecFluent implements VisitableBuilder{ public V1ReplicaSetSpecBuilder() { - this(false); - } - public V1ReplicaSetSpecBuilder(Boolean validationEnabled) { - this(new V1ReplicaSetSpec(), validationEnabled); + this(new V1ReplicaSetSpec()); } + public V1ReplicaSetSpecBuilder(V1ReplicaSetSpecFluent fluent) { - this(fluent, false); - } - public V1ReplicaSetSpecBuilder(V1ReplicaSetSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicaSetSpec(), validationEnabled); + this(fluent, new V1ReplicaSetSpec()); } + public V1ReplicaSetSpecBuilder(V1ReplicaSetSpecFluent fluent,V1ReplicaSetSpec instance) { - this(fluent, instance, false); - } - public V1ReplicaSetSpecBuilder(V1ReplicaSetSpecFluent fluent,V1ReplicaSetSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMinReadySeconds(instance.getMinReadySeconds()); - fluent.withReplicas(instance.getReplicas()); - fluent.withSelector(instance.getSelector()); - fluent.withTemplate(instance.getTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicaSetSpecBuilder(V1ReplicaSetSpec instance) { - this(instance,false); - } - public V1ReplicaSetSpecBuilder(V1ReplicaSetSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withReplicas(instance.getReplicas()); - this.withSelector(instance.getSelector()); - this.withTemplate(instance.getTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicaSetSpecFluent fluent; - Boolean validationEnabled; + public V1ReplicaSetSpec build() { V1ReplicaSetSpec buildable = new V1ReplicaSetSpec(); buildable.setMinReadySeconds(fluent.getMinReadySeconds()); buildable.setReplicas(fluent.getReplicas()); - buildable.setSelector(fluent.getSelector()); - buildable.setTemplate(fluent.getTemplate()); + buildable.setSelector(fluent.buildSelector()); + buildable.setTemplate(fluent.buildTemplate()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecFluent.java index 78303b1616..0378338d4b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecFluent.java @@ -1,61 +1,201 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; +import java.lang.String; import java.lang.Integer; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1ReplicaSetSpecFluent> extends Fluent{ - public Integer getMinReadySeconds(); - public A withMinReadySeconds(Integer minReadySeconds); - public Boolean hasMinReadySeconds(); - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector(); - public V1LabelSelector buildSelector(); - public A withSelector(V1LabelSelector selector); - public Boolean hasSelector(); - public V1ReplicaSetSpecFluent.SelectorNested withNewSelector(); - public V1ReplicaSetSpecFluent.SelectorNested withNewSelectorLike(V1LabelSelector item); - public V1ReplicaSetSpecFluent.SelectorNested editSelector(); - public V1ReplicaSetSpecFluent.SelectorNested editOrNewSelector(); - public V1ReplicaSetSpecFluent.SelectorNested editOrNewSelectorLike(V1LabelSelector item); - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate(); - public V1PodTemplateSpec buildTemplate(); - public A withTemplate(V1PodTemplateSpec template); - public Boolean hasTemplate(); - public V1ReplicaSetSpecFluent.TemplateNested withNewTemplate(); - public V1ReplicaSetSpecFluent.TemplateNested withNewTemplateLike(V1PodTemplateSpec item); - public V1ReplicaSetSpecFluent.TemplateNested editTemplate(); - public V1ReplicaSetSpecFluent.TemplateNested editOrNewTemplate(); - public V1ReplicaSetSpecFluent.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item); - public interface SelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicaSetSpecFluent> extends BaseFluent{ + public V1ReplicaSetSpecFluent() { + } + + public V1ReplicaSetSpecFluent(V1ReplicaSetSpec instance) { + this.copyInstance(instance); + } + private Integer minReadySeconds; + private Integer replicas; + private V1LabelSelectorBuilder selector; + private V1PodTemplateSpecBuilder template; + + protected void copyInstance(V1ReplicaSetSpec instance) { + instance = (instance != null ? instance : new V1ReplicaSetSpec()); + if (instance != null) { + this.withMinReadySeconds(instance.getMinReadySeconds()); + this.withReplicas(instance.getReplicas()); + this.withSelector(instance.getSelector()); + this.withTemplate(instance.getTemplate()); + } + } + + public Integer getMinReadySeconds() { + return this.minReadySeconds; + } + + public A withMinReadySeconds(Integer minReadySeconds) { + this.minReadySeconds = minReadySeconds; + return (A) this; + } + + public boolean hasMinReadySeconds() { + return this.minReadySeconds != null; + } + + public Integer getReplicas() { + return this.replicas; + } + + public A withReplicas(Integer replicas) { + this.replicas = replicas; + return (A) this; + } + + public boolean hasReplicas() { + return this.replicas != null; + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); + } + + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); } - public interface TemplateNested extends Nested,V1PodTemplateSpecFluent>{ - public N and(); - public N endTemplate(); + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); + } + + public V1PodTemplateSpec buildTemplate() { + return this.template != null ? this.template.build() : null; + } + + public A withTemplate(V1PodTemplateSpec template) { + this._visitables.remove("template"); + if (template != null) { + this.template = new V1PodTemplateSpecBuilder(template); + this._visitables.get("template").add(this.template); + } else { + this.template = null; + this._visitables.get("template").remove(this.template); + } + return (A) this; + } + + public boolean hasTemplate() { + return this.template != null; + } + + public TemplateNested withNewTemplate() { + return new TemplateNested(null); + } + + public TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { + return new TemplateNested(item); + } + + public TemplateNested editTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(null)); + } + + public TemplateNested editOrNewTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(new V1PodTemplateSpecBuilder().build())); + } + + public TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ReplicaSetSpecFluent that = (V1ReplicaSetSpecFluent) o; + if (!java.util.Objects.equals(minReadySeconds, that.minReadySeconds)) return false; + if (!java.util.Objects.equals(replicas, that.replicas)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + if (!java.util.Objects.equals(template, that.template)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(minReadySeconds, replicas, selector, template, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (minReadySeconds != null) { sb.append("minReadySeconds:"); sb.append(minReadySeconds + ","); } + if (replicas != null) { sb.append("replicas:"); sb.append(replicas + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } + if (template != null) { sb.append("template:"); sb.append(template); } + sb.append("}"); + return sb.toString(); + } + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1ReplicaSetSpecFluent.this.withSelector(builder.build()); + } + public N endSelector() { + return and(); + } + + } + public class TemplateNested extends V1PodTemplateSpecFluent> implements Nested{ + TemplateNested(V1PodTemplateSpec item) { + this.builder = new V1PodTemplateSpecBuilder(this, item); + } + V1PodTemplateSpecBuilder builder; + + public N and() { + return (N) V1ReplicaSetSpecFluent.this.withTemplate(builder.build()); + } + + public N endTemplate() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecFluentImpl.java deleted file mode 100644 index 54282ea611..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetSpecFluentImpl.java +++ /dev/null @@ -1,178 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicaSetSpecFluentImpl> extends BaseFluent implements V1ReplicaSetSpecFluent{ - public V1ReplicaSetSpecFluentImpl() { - } - public V1ReplicaSetSpecFluentImpl(V1ReplicaSetSpec instance) { - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withReplicas(instance.getReplicas()); - this.withSelector(instance.getSelector()); - this.withTemplate(instance.getTemplate()); - } - } - private Integer minReadySeconds; - private Integer replicas; - private V1LabelSelectorBuilder selector; - private V1PodTemplateSpecBuilder template; - public Integer getMinReadySeconds() { - return this.minReadySeconds; - } - public A withMinReadySeconds(Integer minReadySeconds) { - this.minReadySeconds=minReadySeconds; return (A) this; - } - public Boolean hasMinReadySeconds() { - return this.minReadySeconds != null; - } - public Integer getReplicas() { - return this.replicas; - } - public A withReplicas(Integer replicas) { - this.replicas=replicas; return (A) this; - } - public Boolean hasReplicas() { - return this.replicas != null; - } - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector() { - return this.selector!=null ?this.selector.build():null; - } - public V1LabelSelector buildSelector() { - return this.selector!=null ?this.selector.build():null; - } - public A withSelector(V1LabelSelector selector) { - _visitables.get("selector").remove(this.selector); - if (selector!=null){ this.selector= new V1LabelSelectorBuilder(selector); _visitables.get("selector").add(this.selector);} else { this.selector = null; _visitables.get("selector").remove(this.selector); } return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public V1ReplicaSetSpecFluentImpl.SelectorNested withNewSelector() { - return new V1ReplicaSetSpecFluentImpl.SelectorNestedImpl(); - } - public V1ReplicaSetSpecFluentImpl.SelectorNested withNewSelectorLike(V1LabelSelector item) { - return new V1ReplicaSetSpecFluentImpl.SelectorNestedImpl(item); - } - public V1ReplicaSetSpecFluentImpl.SelectorNested editSelector() { - return withNewSelectorLike(getSelector()); - } - public V1ReplicaSetSpecFluentImpl.SelectorNested editOrNewSelector() { - return withNewSelectorLike(getSelector() != null ? getSelector(): new V1LabelSelectorBuilder().build()); - } - public V1ReplicaSetSpecFluentImpl.SelectorNested editOrNewSelectorLike(V1LabelSelector item) { - return withNewSelectorLike(getSelector() != null ? getSelector(): item); - } - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate() { - return this.template!=null ?this.template.build():null; - } - public V1PodTemplateSpec buildTemplate() { - return this.template!=null ?this.template.build():null; - } - public A withTemplate(V1PodTemplateSpec template) { - _visitables.get("template").remove(this.template); - if (template!=null){ this.template= new V1PodTemplateSpecBuilder(template); _visitables.get("template").add(this.template);} else { this.template = null; _visitables.get("template").remove(this.template); } return (A) this; - } - public Boolean hasTemplate() { - return this.template != null; - } - public V1ReplicaSetSpecFluentImpl.TemplateNested withNewTemplate() { - return new V1ReplicaSetSpecFluentImpl.TemplateNestedImpl(); - } - public V1ReplicaSetSpecFluentImpl.TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { - return new V1ReplicaSetSpecFluentImpl.TemplateNestedImpl(item); - } - public V1ReplicaSetSpecFluentImpl.TemplateNested editTemplate() { - return withNewTemplateLike(getTemplate()); - } - public V1ReplicaSetSpecFluentImpl.TemplateNested editOrNewTemplate() { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): new V1PodTemplateSpecBuilder().build()); - } - public V1ReplicaSetSpecFluentImpl.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ReplicaSetSpecFluentImpl that = (V1ReplicaSetSpecFluentImpl) o; - if (!java.util.Objects.equals(minReadySeconds, that.minReadySeconds)) return false; - - if (!java.util.Objects.equals(replicas, that.replicas)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - if (!java.util.Objects.equals(template, that.template)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(minReadySeconds, replicas, selector, template, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (minReadySeconds != null) { sb.append("minReadySeconds:"); sb.append(minReadySeconds + ","); } - if (replicas != null) { sb.append("replicas:"); sb.append(replicas + ","); } - if (selector != null) { sb.append("selector:"); sb.append(selector + ","); } - if (template != null) { sb.append("template:"); sb.append(template); } - sb.append("}"); - return sb.toString(); - } - class SelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1ReplicaSetSpecFluentImpl.SelectorNested,Nested{ - SelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - SelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1ReplicaSetSpecFluentImpl.this.withSelector(builder.build()); - } - public N endSelector() { - return and(); - } - - } - class TemplateNestedImpl extends V1PodTemplateSpecFluentImpl> implements V1ReplicaSetSpecFluentImpl.TemplateNested,Nested{ - TemplateNestedImpl(V1PodTemplateSpec item) { - this.builder = new V1PodTemplateSpecBuilder(this, item); - } - TemplateNestedImpl() { - this.builder = new V1PodTemplateSpecBuilder(this); - } - V1PodTemplateSpecBuilder builder; - public N and() { - return (N) V1ReplicaSetSpecFluentImpl.this.withTemplate(builder.build()); - } - public N endTemplate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusBuilder.java index a9017aa816..ae32760011 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusBuilder.java @@ -1,56 +1,30 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicaSetStatusBuilder extends V1ReplicaSetStatusFluentImpl implements VisitableBuilder{ +public class V1ReplicaSetStatusBuilder extends V1ReplicaSetStatusFluent implements VisitableBuilder{ public V1ReplicaSetStatusBuilder() { - this(false); - } - public V1ReplicaSetStatusBuilder(Boolean validationEnabled) { - this(new V1ReplicaSetStatus(), validationEnabled); + this(new V1ReplicaSetStatus()); } + public V1ReplicaSetStatusBuilder(V1ReplicaSetStatusFluent fluent) { - this(fluent, false); - } - public V1ReplicaSetStatusBuilder(V1ReplicaSetStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicaSetStatus(), validationEnabled); + this(fluent, new V1ReplicaSetStatus()); } + public V1ReplicaSetStatusBuilder(V1ReplicaSetStatusFluent fluent,V1ReplicaSetStatus instance) { - this(fluent, instance, false); - } - public V1ReplicaSetStatusBuilder(V1ReplicaSetStatusFluent fluent,V1ReplicaSetStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAvailableReplicas(instance.getAvailableReplicas()); - fluent.withConditions(instance.getConditions()); - fluent.withFullyLabeledReplicas(instance.getFullyLabeledReplicas()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - fluent.withReadyReplicas(instance.getReadyReplicas()); - fluent.withReplicas(instance.getReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicaSetStatusBuilder(V1ReplicaSetStatus instance) { - this(instance,false); - } - public V1ReplicaSetStatusBuilder(V1ReplicaSetStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAvailableReplicas(instance.getAvailableReplicas()); - this.withConditions(instance.getConditions()); - this.withFullyLabeledReplicas(instance.getFullyLabeledReplicas()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReadyReplicas(instance.getReadyReplicas()); - this.withReplicas(instance.getReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicaSetStatusFluent fluent; - Boolean validationEnabled; + public V1ReplicaSetStatus build() { V1ReplicaSetStatus buildable = new V1ReplicaSetStatus(); buildable.setAvailableReplicas(fluent.getAvailableReplicas()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setFullyLabeledReplicas(fluent.getFullyLabeledReplicas()); buildable.setObservedGeneration(fluent.getObservedGeneration()); buildable.setReadyReplicas(fluent.getReadyReplicas()); @@ -58,4 +32,5 @@ public V1ReplicaSetStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusFluent.java index 04cd184328..8e25405f5b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusFluent.java @@ -1,72 +1,312 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ReplicaSetStatusFluent> extends Fluent{ - public Integer getAvailableReplicas(); - public A withAvailableReplicas(Integer availableReplicas); - public Boolean hasAvailableReplicas(); - public A addToConditions(int index,V1ReplicaSetCondition item); - public A setToConditions(int index,V1ReplicaSetCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1ReplicaSetCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1ReplicaSetCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1ReplicaSetCondition buildCondition(int index); - public V1ReplicaSetCondition buildFirstCondition(); - public V1ReplicaSetCondition buildLastCondition(); - public V1ReplicaSetCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1ReplicaSetCondition... conditions); - public Boolean hasConditions(); - public V1ReplicaSetStatusFluent.ConditionsNested addNewCondition(); - public V1ReplicaSetStatusFluent.ConditionsNested addNewConditionLike(V1ReplicaSetCondition item); - public V1ReplicaSetStatusFluent.ConditionsNested setNewConditionLike(int index,V1ReplicaSetCondition item); - public V1ReplicaSetStatusFluent.ConditionsNested editCondition(int index); - public V1ReplicaSetStatusFluent.ConditionsNested editFirstCondition(); - public V1ReplicaSetStatusFluent.ConditionsNested editLastCondition(); - public V1ReplicaSetStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public Integer getFullyLabeledReplicas(); - public A withFullyLabeledReplicas(Integer fullyLabeledReplicas); - public Boolean hasFullyLabeledReplicas(); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - public Integer getReadyReplicas(); - public A withReadyReplicas(Integer readyReplicas); - public Boolean hasReadyReplicas(); - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); - public interface ConditionsNested extends Nested,V1ReplicaSetConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicaSetStatusFluent> extends BaseFluent{ + public V1ReplicaSetStatusFluent() { + } + + public V1ReplicaSetStatusFluent(V1ReplicaSetStatus instance) { + this.copyInstance(instance); + } + private Integer availableReplicas; + private ArrayList conditions; + private Integer fullyLabeledReplicas; + private Long observedGeneration; + private Integer readyReplicas; + private Integer replicas; + + protected void copyInstance(V1ReplicaSetStatus instance) { + instance = (instance != null ? instance : new V1ReplicaSetStatus()); + if (instance != null) { + this.withAvailableReplicas(instance.getAvailableReplicas()); + this.withConditions(instance.getConditions()); + this.withFullyLabeledReplicas(instance.getFullyLabeledReplicas()); + this.withObservedGeneration(instance.getObservedGeneration()); + this.withReadyReplicas(instance.getReadyReplicas()); + this.withReplicas(instance.getReplicas()); + } + } + + public Integer getAvailableReplicas() { + return this.availableReplicas; + } + + public A withAvailableReplicas(Integer availableReplicas) { + this.availableReplicas = availableReplicas; + return (A) this; + } + + public boolean hasAvailableReplicas() { + return this.availableReplicas != null; + } + + public A addToConditions(int index,V1ReplicaSetCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1ReplicaSetCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1ReplicaSetCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1ReplicaSetCondition item : items) {V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1ReplicaSetCondition item : items) {V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1ReplicaSetCondition... items) { + if (this.conditions == null) return (A)this; + for (V1ReplicaSetCondition item : items) {V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1ReplicaSetCondition item : items) {V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1ReplicaSetConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1ReplicaSetCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1ReplicaSetCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1ReplicaSetCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1ReplicaSetCondition buildMatchingCondition(Predicate predicate) { + for (V1ReplicaSetConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1ReplicaSetConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1ReplicaSetCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1ReplicaSetCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1ReplicaSetCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1ReplicaSetCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1ReplicaSetCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ReplicaSetConditionFluent> implements Nested{ + ConditionsNested(int index,V1ReplicaSetCondition item) { + this.index = index; + this.builder = new V1ReplicaSetConditionBuilder(this, item); + } + V1ReplicaSetConditionBuilder builder; + int index; + + public N and() { + return (N) V1ReplicaSetStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusFluentImpl.java deleted file mode 100644 index 8ea8e3f836..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicaSetStatusFluentImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicaSetStatusFluentImpl> extends BaseFluent implements V1ReplicaSetStatusFluent{ - public V1ReplicaSetStatusFluentImpl() { - } - public V1ReplicaSetStatusFluentImpl(V1ReplicaSetStatus instance) { - if (instance != null) { - this.withAvailableReplicas(instance.getAvailableReplicas()); - this.withConditions(instance.getConditions()); - this.withFullyLabeledReplicas(instance.getFullyLabeledReplicas()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReadyReplicas(instance.getReadyReplicas()); - this.withReplicas(instance.getReplicas()); - } - } - private Integer availableReplicas; - private ArrayList conditions; - private Integer fullyLabeledReplicas; - private Long observedGeneration; - private Integer readyReplicas; - private Integer replicas; - public Integer getAvailableReplicas() { - return this.availableReplicas; - } - public A withAvailableReplicas(Integer availableReplicas) { - this.availableReplicas=availableReplicas; return (A) this; - } - public Boolean hasAvailableReplicas() { - return this.availableReplicas != null; - } - public A addToConditions(int index,V1ReplicaSetCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1ReplicaSetCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1ReplicaSetCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1ReplicaSetCondition item : items) {V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1ReplicaSetCondition item : items) {V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1ReplicaSetCondition... items) { - for (V1ReplicaSetCondition item : items) {V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1ReplicaSetCondition item : items) {V1ReplicaSetConditionBuilder builder = new V1ReplicaSetConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1ReplicaSetConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1ReplicaSetCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1ReplicaSetCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1ReplicaSetCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1ReplicaSetCondition buildMatchingCondition(Predicate predicate) { - for (V1ReplicaSetConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1ReplicaSetConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1ReplicaSetCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1ReplicaSetCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1ReplicaSetCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1ReplicaSetStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1ReplicaSetStatusFluentImpl.ConditionsNestedImpl(); - } - public V1ReplicaSetStatusFluentImpl.ConditionsNested addNewConditionLike(V1ReplicaSetCondition item) { - return new V1ReplicaSetStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1ReplicaSetStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1ReplicaSetCondition item) { - return new V1ReplicaSetStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1ReplicaSetStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1ReplicaSetStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1ReplicaSetStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1ReplicaSetStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ReplicaSetConditionFluentImpl> implements V1ReplicaSetStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1ReplicaSetCondition item) { - this.index = index; - this.builder = new V1ReplicaSetConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1ReplicaSetConditionBuilder(this); - } - V1ReplicaSetConditionBuilder builder; - int index; - public N and() { - return (N) V1ReplicaSetStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerBuilder.java index b78562c318..7e1ede7a06 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicationControllerBuilder extends V1ReplicationControllerFluentImpl implements VisitableBuilder{ +public class V1ReplicationControllerBuilder extends V1ReplicationControllerFluent implements VisitableBuilder{ public V1ReplicationControllerBuilder() { - this(false); - } - public V1ReplicationControllerBuilder(Boolean validationEnabled) { - this(new V1ReplicationController(), validationEnabled); + this(new V1ReplicationController()); } + public V1ReplicationControllerBuilder(V1ReplicationControllerFluent fluent) { - this(fluent, false); - } - public V1ReplicationControllerBuilder(V1ReplicationControllerFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicationController(), validationEnabled); + this(fluent, new V1ReplicationController()); } + public V1ReplicationControllerBuilder(V1ReplicationControllerFluent fluent,V1ReplicationController instance) { - this(fluent, instance, false); - } - public V1ReplicationControllerBuilder(V1ReplicationControllerFluent fluent,V1ReplicationController instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicationControllerBuilder(V1ReplicationController instance) { - this(instance,false); - } - public V1ReplicationControllerBuilder(V1ReplicationController instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicationControllerFluent fluent; - Boolean validationEnabled; + public V1ReplicationController build() { V1ReplicationController buildable = new V1ReplicationController(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionBuilder.java index 1b51c147bb..695b4c53be 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicationControllerConditionBuilder extends V1ReplicationControllerConditionFluentImpl implements VisitableBuilder{ +public class V1ReplicationControllerConditionBuilder extends V1ReplicationControllerConditionFluent implements VisitableBuilder{ public V1ReplicationControllerConditionBuilder() { - this(false); - } - public V1ReplicationControllerConditionBuilder(Boolean validationEnabled) { - this(new V1ReplicationControllerCondition(), validationEnabled); + this(new V1ReplicationControllerCondition()); } + public V1ReplicationControllerConditionBuilder(V1ReplicationControllerConditionFluent fluent) { - this(fluent, false); - } - public V1ReplicationControllerConditionBuilder(V1ReplicationControllerConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicationControllerCondition(), validationEnabled); + this(fluent, new V1ReplicationControllerCondition()); } + public V1ReplicationControllerConditionBuilder(V1ReplicationControllerConditionFluent fluent,V1ReplicationControllerCondition instance) { - this(fluent, instance, false); - } - public V1ReplicationControllerConditionBuilder(V1ReplicationControllerConditionFluent fluent,V1ReplicationControllerCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicationControllerConditionBuilder(V1ReplicationControllerCondition instance) { - this(instance,false); - } - public V1ReplicationControllerConditionBuilder(V1ReplicationControllerCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicationControllerConditionFluent fluent; - Boolean validationEnabled; + public V1ReplicationControllerCondition build() { V1ReplicationControllerCondition buildable = new V1ReplicationControllerCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1ReplicationControllerCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionFluent.java index a2af1462df..61ba63c8ef 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ReplicationControllerConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicationControllerConditionFluent> extends BaseFluent{ + public V1ReplicationControllerConditionFluent() { + } + public V1ReplicationControllerConditionFluent(V1ReplicationControllerCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1ReplicationControllerCondition instance) { + instance = (instance != null ? instance : new V1ReplicationControllerCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ReplicationControllerConditionFluent that = (V1ReplicationControllerConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionFluentImpl.java deleted file mode 100644 index e22982112f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicationControllerConditionFluentImpl> extends BaseFluent implements V1ReplicationControllerConditionFluent{ - public V1ReplicationControllerConditionFluentImpl() { - } - public V1ReplicationControllerConditionFluentImpl(V1ReplicationControllerCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ReplicationControllerConditionFluentImpl that = (V1ReplicationControllerConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerFluent.java index 45c6ab0113..2edb82c971 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1ReplicationControllerFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ReplicationControllerFluent.MetadataNested withNewMetadata(); - public V1ReplicationControllerFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ReplicationControllerFluent.MetadataNested editMetadata(); - public V1ReplicationControllerFluent.MetadataNested editOrNewMetadata(); - public V1ReplicationControllerFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ReplicationControllerSpec getSpec(); - public V1ReplicationControllerSpec buildSpec(); - public A withSpec(V1ReplicationControllerSpec spec); - public Boolean hasSpec(); - public V1ReplicationControllerFluent.SpecNested withNewSpec(); - public V1ReplicationControllerFluent.SpecNested withNewSpecLike(V1ReplicationControllerSpec item); - public V1ReplicationControllerFluent.SpecNested editSpec(); - public V1ReplicationControllerFluent.SpecNested editOrNewSpec(); - public V1ReplicationControllerFluent.SpecNested editOrNewSpecLike(V1ReplicationControllerSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ReplicationControllerStatus getStatus(); - public V1ReplicationControllerStatus buildStatus(); - public A withStatus(V1ReplicationControllerStatus status); - public Boolean hasStatus(); - public V1ReplicationControllerFluent.StatusNested withNewStatus(); - public V1ReplicationControllerFluent.StatusNested withNewStatusLike(V1ReplicationControllerStatus item); - public V1ReplicationControllerFluent.StatusNested editStatus(); - public V1ReplicationControllerFluent.StatusNested editOrNewStatus(); - public V1ReplicationControllerFluent.StatusNested editOrNewStatusLike(V1ReplicationControllerStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicationControllerFluent> extends BaseFluent{ + public V1ReplicationControllerFluent() { + } + + public V1ReplicationControllerFluent(V1ReplicationController instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1ReplicationControllerSpecBuilder spec; + private V1ReplicationControllerStatusBuilder status; + + protected void copyInstance(V1ReplicationController instance) { + instance = (instance != null ? instance : new V1ReplicationController()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1ReplicationControllerSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1ReplicationControllerSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1ReplicationControllerSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1ReplicationControllerSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1ReplicationControllerSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1ReplicationControllerSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1ReplicationControllerSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1ReplicationControllerStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1ReplicationControllerStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1ReplicationControllerStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1ReplicationControllerStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1ReplicationControllerStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1ReplicationControllerStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ReplicationControllerFluent that = (V1ReplicationControllerFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ReplicationControllerFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1ReplicationControllerStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1ReplicationControllerSpecFluent> implements Nested{ + SpecNested(V1ReplicationControllerSpec item) { + this.builder = new V1ReplicationControllerSpecBuilder(this, item); + } + V1ReplicationControllerSpecBuilder builder; + + public N and() { + return (N) V1ReplicationControllerFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1ReplicationControllerStatusFluent> implements Nested{ + StatusNested(V1ReplicationControllerStatus item) { + this.builder = new V1ReplicationControllerStatusBuilder(this, item); + } + V1ReplicationControllerStatusBuilder builder; + + public N and() { + return (N) V1ReplicationControllerFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerFluentImpl.java deleted file mode 100644 index 25d6c6d6e8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicationControllerFluentImpl> extends BaseFluent implements V1ReplicationControllerFluent{ - public V1ReplicationControllerFluentImpl() { - } - public V1ReplicationControllerFluentImpl(V1ReplicationController instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1ReplicationControllerSpecBuilder spec; - private V1ReplicationControllerStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ReplicationControllerFluentImpl.MetadataNested withNewMetadata() { - return new V1ReplicationControllerFluentImpl.MetadataNestedImpl(); - } - public V1ReplicationControllerFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ReplicationControllerFluentImpl.MetadataNestedImpl(item); - } - public V1ReplicationControllerFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ReplicationControllerFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ReplicationControllerFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ReplicationControllerSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1ReplicationControllerSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1ReplicationControllerSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1ReplicationControllerSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1ReplicationControllerFluentImpl.SpecNested withNewSpec() { - return new V1ReplicationControllerFluentImpl.SpecNestedImpl(); - } - public V1ReplicationControllerFluentImpl.SpecNested withNewSpecLike(V1ReplicationControllerSpec item) { - return new V1ReplicationControllerFluentImpl.SpecNestedImpl(item); - } - public V1ReplicationControllerFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1ReplicationControllerFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1ReplicationControllerSpecBuilder().build()); - } - public V1ReplicationControllerFluentImpl.SpecNested editOrNewSpecLike(V1ReplicationControllerSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ReplicationControllerStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1ReplicationControllerStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1ReplicationControllerStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1ReplicationControllerStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1ReplicationControllerFluentImpl.StatusNested withNewStatus() { - return new V1ReplicationControllerFluentImpl.StatusNestedImpl(); - } - public V1ReplicationControllerFluentImpl.StatusNested withNewStatusLike(V1ReplicationControllerStatus item) { - return new V1ReplicationControllerFluentImpl.StatusNestedImpl(item); - } - public V1ReplicationControllerFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1ReplicationControllerFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1ReplicationControllerStatusBuilder().build()); - } - public V1ReplicationControllerFluentImpl.StatusNested editOrNewStatusLike(V1ReplicationControllerStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ReplicationControllerFluentImpl that = (V1ReplicationControllerFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ReplicationControllerFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ReplicationControllerFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1ReplicationControllerSpecFluentImpl> implements V1ReplicationControllerFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1ReplicationControllerSpec item) { - this.builder = new V1ReplicationControllerSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1ReplicationControllerSpecBuilder(this); - } - V1ReplicationControllerSpecBuilder builder; - public N and() { - return (N) V1ReplicationControllerFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1ReplicationControllerStatusFluentImpl> implements V1ReplicationControllerFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1ReplicationControllerStatus item) { - this.builder = new V1ReplicationControllerStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1ReplicationControllerStatusBuilder(this); - } - V1ReplicationControllerStatusBuilder builder; - public N and() { - return (N) V1ReplicationControllerFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListBuilder.java index 19d262a5be..14561809eb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicationControllerListBuilder extends V1ReplicationControllerListFluentImpl implements VisitableBuilder{ +public class V1ReplicationControllerListBuilder extends V1ReplicationControllerListFluent implements VisitableBuilder{ public V1ReplicationControllerListBuilder() { - this(false); - } - public V1ReplicationControllerListBuilder(Boolean validationEnabled) { - this(new V1ReplicationControllerList(), validationEnabled); + this(new V1ReplicationControllerList()); } + public V1ReplicationControllerListBuilder(V1ReplicationControllerListFluent fluent) { - this(fluent, false); - } - public V1ReplicationControllerListBuilder(V1ReplicationControllerListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicationControllerList(), validationEnabled); + this(fluent, new V1ReplicationControllerList()); } + public V1ReplicationControllerListBuilder(V1ReplicationControllerListFluent fluent,V1ReplicationControllerList instance) { - this(fluent, instance, false); - } - public V1ReplicationControllerListBuilder(V1ReplicationControllerListFluent fluent,V1ReplicationControllerList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicationControllerListBuilder(V1ReplicationControllerList instance) { - this(instance,false); - } - public V1ReplicationControllerListBuilder(V1ReplicationControllerList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicationControllerListFluent fluent; - Boolean validationEnabled; + public V1ReplicationControllerList build() { V1ReplicationControllerList buildable = new V1ReplicationControllerList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListFluent.java index 8b4ae98132..1ab1d87df0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ReplicationControllerListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ReplicationController item); - public A setToItems(int index,V1ReplicationController item); - public A addToItems(io.kubernetes.client.openapi.models.V1ReplicationController... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ReplicationController... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ReplicationController buildItem(int index); - public V1ReplicationController buildFirstItem(); - public V1ReplicationController buildLastItem(); - public V1ReplicationController buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ReplicationController... items); - public Boolean hasItems(); - public V1ReplicationControllerListFluent.ItemsNested addNewItem(); - public V1ReplicationControllerListFluent.ItemsNested addNewItemLike(V1ReplicationController item); - public V1ReplicationControllerListFluent.ItemsNested setNewItemLike(int index,V1ReplicationController item); - public V1ReplicationControllerListFluent.ItemsNested editItem(int index); - public V1ReplicationControllerListFluent.ItemsNested editFirstItem(); - public V1ReplicationControllerListFluent.ItemsNested editLastItem(); - public V1ReplicationControllerListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ReplicationControllerListFluent.MetadataNested withNewMetadata(); - public V1ReplicationControllerListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ReplicationControllerListFluent.MetadataNested editMetadata(); - public V1ReplicationControllerListFluent.MetadataNested editOrNewMetadata(); - public V1ReplicationControllerListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ReplicationControllerFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicationControllerListFluent> extends BaseFluent{ + public V1ReplicationControllerListFluent() { + } + + public V1ReplicationControllerListFluent(V1ReplicationControllerList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ReplicationControllerList instance) { + instance = (instance != null ? instance : new V1ReplicationControllerList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ReplicationController item) { + if (this.items == null) {this.items = new ArrayList();} + V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ReplicationController item) { + if (this.items == null) {this.items = new ArrayList();} + V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ReplicationController... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ReplicationController item : items) {V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ReplicationController item : items) {V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ReplicationController... items) { + if (this.items == null) return (A)this; + for (V1ReplicationController item : items) {V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ReplicationController item : items) {V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ReplicationControllerBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ReplicationController buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ReplicationController buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ReplicationController buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ReplicationController buildMatchingItem(Predicate predicate) { + for (V1ReplicationControllerBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ReplicationControllerBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ReplicationController item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ReplicationController... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ReplicationController item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ReplicationController item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ReplicationController item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ReplicationControllerListFluent that = (V1ReplicationControllerListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ReplicationControllerFluent> implements Nested{ + ItemsNested(int index,V1ReplicationController item) { + this.index = index; + this.builder = new V1ReplicationControllerBuilder(this, item); + } + V1ReplicationControllerBuilder builder; + int index; + public N and() { + return (N) V1ReplicationControllerListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ReplicationControllerListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListFluentImpl.java deleted file mode 100644 index 48d1989429..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicationControllerListFluentImpl> extends BaseFluent implements V1ReplicationControllerListFluent{ - public V1ReplicationControllerListFluentImpl() { - } - public V1ReplicationControllerListFluentImpl(V1ReplicationControllerList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ReplicationController item) { - if (this.items == null) {this.items = new ArrayList();} - V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ReplicationController item) { - if (this.items == null) {this.items = new ArrayList();} - V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ReplicationController... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ReplicationController item : items) {V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ReplicationController item : items) {V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ReplicationController... items) { - for (V1ReplicationController item : items) {V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ReplicationController item : items) {V1ReplicationControllerBuilder builder = new V1ReplicationControllerBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ReplicationControllerBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ReplicationController buildItem(int index) { - return this.items.get(index).build(); - } - public V1ReplicationController buildFirstItem() { - return this.items.get(0).build(); - } - public V1ReplicationController buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ReplicationController buildMatchingItem(Predicate predicate) { - for (V1ReplicationControllerBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ReplicationControllerBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ReplicationController item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ReplicationController... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ReplicationController item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ReplicationControllerListFluentImpl.ItemsNested addNewItem() { - return new V1ReplicationControllerListFluentImpl.ItemsNestedImpl(); - } - public V1ReplicationControllerListFluentImpl.ItemsNested addNewItemLike(V1ReplicationController item) { - return new V1ReplicationControllerListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ReplicationControllerListFluentImpl.ItemsNested setNewItemLike(int index,V1ReplicationController item) { - return new V1ReplicationControllerListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ReplicationControllerListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ReplicationControllerListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ReplicationControllerListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ReplicationControllerListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ReplicationControllerListFluentImpl.MetadataNestedImpl(); - } - public V1ReplicationControllerListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ReplicationControllerListFluentImpl.MetadataNestedImpl(item); - } - public V1ReplicationControllerListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ReplicationControllerListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ReplicationControllerListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ReplicationControllerListFluentImpl that = (V1ReplicationControllerListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ReplicationControllerFluentImpl> implements V1ReplicationControllerListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ReplicationController item) { - this.index = index; - this.builder = new V1ReplicationControllerBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ReplicationControllerBuilder(this); - } - V1ReplicationControllerBuilder builder; - int index; - public N and() { - return (N) V1ReplicationControllerListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ReplicationControllerListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ReplicationControllerListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecBuilder.java index d6c6b18ab9..45f050cb55 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicationControllerSpecBuilder extends V1ReplicationControllerSpecFluentImpl implements VisitableBuilder{ +public class V1ReplicationControllerSpecBuilder extends V1ReplicationControllerSpecFluent implements VisitableBuilder{ public V1ReplicationControllerSpecBuilder() { - this(false); - } - public V1ReplicationControllerSpecBuilder(Boolean validationEnabled) { - this(new V1ReplicationControllerSpec(), validationEnabled); + this(new V1ReplicationControllerSpec()); } + public V1ReplicationControllerSpecBuilder(V1ReplicationControllerSpecFluent fluent) { - this(fluent, false); - } - public V1ReplicationControllerSpecBuilder(V1ReplicationControllerSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicationControllerSpec(), validationEnabled); + this(fluent, new V1ReplicationControllerSpec()); } + public V1ReplicationControllerSpecBuilder(V1ReplicationControllerSpecFluent fluent,V1ReplicationControllerSpec instance) { - this(fluent, instance, false); - } - public V1ReplicationControllerSpecBuilder(V1ReplicationControllerSpecFluent fluent,V1ReplicationControllerSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMinReadySeconds(instance.getMinReadySeconds()); - fluent.withReplicas(instance.getReplicas()); - fluent.withSelector(instance.getSelector()); - fluent.withTemplate(instance.getTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicationControllerSpecBuilder(V1ReplicationControllerSpec instance) { - this(instance,false); - } - public V1ReplicationControllerSpecBuilder(V1ReplicationControllerSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withReplicas(instance.getReplicas()); - this.withSelector(instance.getSelector()); - this.withTemplate(instance.getTemplate()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicationControllerSpecFluent fluent; - Boolean validationEnabled; + public V1ReplicationControllerSpec build() { V1ReplicationControllerSpec buildable = new V1ReplicationControllerSpec(); buildable.setMinReadySeconds(fluent.getMinReadySeconds()); buildable.setReplicas(fluent.getReplicas()); buildable.setSelector(fluent.getSelector()); - buildable.setTemplate(fluent.getTemplate()); + buildable.setTemplate(fluent.buildTemplate()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecFluent.java index 83f6b9d7ad..f4fdf01072 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecFluent.java @@ -1,51 +1,184 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; import java.util.LinkedHashMap; import java.lang.Integer; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.util.Map; - /** - * Generated - */ -public interface V1ReplicationControllerSpecFluent> extends Fluent{ - public Integer getMinReadySeconds(); - public A withMinReadySeconds(Integer minReadySeconds); - public Boolean hasMinReadySeconds(); - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); - public A addToSelector(String key,String value); - public A addToSelector(Map map); - public A removeFromSelector(String key); - public A removeFromSelector(Map map); - public Map getSelector(); - public A withSelector(Map selector); - public Boolean hasSelector(); - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate(); - public V1PodTemplateSpec buildTemplate(); - public A withTemplate(V1PodTemplateSpec template); - public Boolean hasTemplate(); - public V1ReplicationControllerSpecFluent.TemplateNested withNewTemplate(); - public V1ReplicationControllerSpecFluent.TemplateNested withNewTemplateLike(V1PodTemplateSpec item); - public V1ReplicationControllerSpecFluent.TemplateNested editTemplate(); - public V1ReplicationControllerSpecFluent.TemplateNested editOrNewTemplate(); - public V1ReplicationControllerSpecFluent.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item); - public interface TemplateNested extends Nested,V1PodTemplateSpecFluent>{ - public N and(); - public N endTemplate(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicationControllerSpecFluent> extends BaseFluent{ + public V1ReplicationControllerSpecFluent() { + } + + public V1ReplicationControllerSpecFluent(V1ReplicationControllerSpec instance) { + this.copyInstance(instance); + } + private Integer minReadySeconds; + private Integer replicas; + private Map selector; + private V1PodTemplateSpecBuilder template; + + protected void copyInstance(V1ReplicationControllerSpec instance) { + instance = (instance != null ? instance : new V1ReplicationControllerSpec()); + if (instance != null) { + this.withMinReadySeconds(instance.getMinReadySeconds()); + this.withReplicas(instance.getReplicas()); + this.withSelector(instance.getSelector()); + this.withTemplate(instance.getTemplate()); + } + } + + public Integer getMinReadySeconds() { + return this.minReadySeconds; + } + + public A withMinReadySeconds(Integer minReadySeconds) { + this.minReadySeconds = minReadySeconds; + return (A) this; + } + + public boolean hasMinReadySeconds() { + return this.minReadySeconds != null; + } + + public Integer getReplicas() { + return this.replicas; + } + + public A withReplicas(Integer replicas) { + this.replicas = replicas; + return (A) this; + } + + public boolean hasReplicas() { + return this.replicas != null; + } + + public A addToSelector(String key,String value) { + if(this.selector == null && key != null && value != null) { this.selector = new LinkedHashMap(); } + if(key != null && value != null) {this.selector.put(key, value);} return (A)this; + } + + public A addToSelector(Map map) { + if(this.selector == null && map != null) { this.selector = new LinkedHashMap(); } + if(map != null) { this.selector.putAll(map);} return (A)this; + } + + public A removeFromSelector(String key) { + if(this.selector == null) { return (A) this; } + if(key != null && this.selector != null) {this.selector.remove(key);} return (A)this; + } + + public A removeFromSelector(Map map) { + if(this.selector == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.selector != null){this.selector.remove(key);}}} return (A)this; + } + + public Map getSelector() { + return this.selector; + } + + public A withSelector(Map selector) { + if (selector == null) { + this.selector = null; + } else { + this.selector = new LinkedHashMap(selector); + } + return (A) this; } + public boolean hasSelector() { + return this.selector != null; + } + + public V1PodTemplateSpec buildTemplate() { + return this.template != null ? this.template.build() : null; + } + + public A withTemplate(V1PodTemplateSpec template) { + this._visitables.remove("template"); + if (template != null) { + this.template = new V1PodTemplateSpecBuilder(template); + this._visitables.get("template").add(this.template); + } else { + this.template = null; + this._visitables.get("template").remove(this.template); + } + return (A) this; + } + + public boolean hasTemplate() { + return this.template != null; + } + + public TemplateNested withNewTemplate() { + return new TemplateNested(null); + } + + public TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { + return new TemplateNested(item); + } + + public TemplateNested editTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(null)); + } + + public TemplateNested editOrNewTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(new V1PodTemplateSpecBuilder().build())); + } + + public TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ReplicationControllerSpecFluent that = (V1ReplicationControllerSpecFluent) o; + if (!java.util.Objects.equals(minReadySeconds, that.minReadySeconds)) return false; + if (!java.util.Objects.equals(replicas, that.replicas)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + if (!java.util.Objects.equals(template, that.template)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(minReadySeconds, replicas, selector, template, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (minReadySeconds != null) { sb.append("minReadySeconds:"); sb.append(minReadySeconds + ","); } + if (replicas != null) { sb.append("replicas:"); sb.append(replicas + ","); } + if (selector != null && !selector.isEmpty()) { sb.append("selector:"); sb.append(selector + ","); } + if (template != null) { sb.append("template:"); sb.append(template); } + sb.append("}"); + return sb.toString(); + } + public class TemplateNested extends V1PodTemplateSpecFluent> implements Nested{ + TemplateNested(V1PodTemplateSpec item) { + this.builder = new V1PodTemplateSpecBuilder(this, item); + } + V1PodTemplateSpecBuilder builder; + + public N and() { + return (N) V1ReplicationControllerSpecFluent.this.withTemplate(builder.build()); + } + + public N endTemplate() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecFluentImpl.java deleted file mode 100644 index 98b1a711b3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerSpecFluentImpl.java +++ /dev/null @@ -1,155 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.util.LinkedHashMap; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicationControllerSpecFluentImpl> extends BaseFluent implements V1ReplicationControllerSpecFluent{ - public V1ReplicationControllerSpecFluentImpl() { - } - public V1ReplicationControllerSpecFluentImpl(V1ReplicationControllerSpec instance) { - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withReplicas(instance.getReplicas()); - this.withSelector(instance.getSelector()); - this.withTemplate(instance.getTemplate()); - } - } - private Integer minReadySeconds; - private Integer replicas; - private Map selector; - private V1PodTemplateSpecBuilder template; - public Integer getMinReadySeconds() { - return this.minReadySeconds; - } - public A withMinReadySeconds(Integer minReadySeconds) { - this.minReadySeconds=minReadySeconds; return (A) this; - } - public Boolean hasMinReadySeconds() { - return this.minReadySeconds != null; - } - public Integer getReplicas() { - return this.replicas; - } - public A withReplicas(Integer replicas) { - this.replicas=replicas; return (A) this; - } - public Boolean hasReplicas() { - return this.replicas != null; - } - public A addToSelector(String key,String value) { - if(this.selector == null && key != null && value != null) { this.selector = new LinkedHashMap(); } - if(key != null && value != null) {this.selector.put(key, value);} return (A)this; - } - public A addToSelector(Map map) { - if(this.selector == null && map != null) { this.selector = new LinkedHashMap(); } - if(map != null) { this.selector.putAll(map);} return (A)this; - } - public A removeFromSelector(String key) { - if(this.selector == null) { return (A) this; } - if(key != null && this.selector != null) {this.selector.remove(key);} return (A)this; - } - public A removeFromSelector(Map map) { - if(this.selector == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.selector != null){this.selector.remove(key);}}} return (A)this; - } - public Map getSelector() { - return this.selector; - } - public A withSelector(Map selector) { - if (selector == null) { this.selector = null;} else {this.selector = new LinkedHashMap(selector);} return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate() { - return this.template!=null ?this.template.build():null; - } - public V1PodTemplateSpec buildTemplate() { - return this.template!=null ?this.template.build():null; - } - public A withTemplate(V1PodTemplateSpec template) { - _visitables.get("template").remove(this.template); - if (template!=null){ this.template= new V1PodTemplateSpecBuilder(template); _visitables.get("template").add(this.template);} else { this.template = null; _visitables.get("template").remove(this.template); } return (A) this; - } - public Boolean hasTemplate() { - return this.template != null; - } - public V1ReplicationControllerSpecFluentImpl.TemplateNested withNewTemplate() { - return new V1ReplicationControllerSpecFluentImpl.TemplateNestedImpl(); - } - public V1ReplicationControllerSpecFluentImpl.TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { - return new V1ReplicationControllerSpecFluentImpl.TemplateNestedImpl(item); - } - public V1ReplicationControllerSpecFluentImpl.TemplateNested editTemplate() { - return withNewTemplateLike(getTemplate()); - } - public V1ReplicationControllerSpecFluentImpl.TemplateNested editOrNewTemplate() { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): new V1PodTemplateSpecBuilder().build()); - } - public V1ReplicationControllerSpecFluentImpl.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ReplicationControllerSpecFluentImpl that = (V1ReplicationControllerSpecFluentImpl) o; - if (!java.util.Objects.equals(minReadySeconds, that.minReadySeconds)) return false; - - if (!java.util.Objects.equals(replicas, that.replicas)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - if (!java.util.Objects.equals(template, that.template)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(minReadySeconds, replicas, selector, template, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (minReadySeconds != null) { sb.append("minReadySeconds:"); sb.append(minReadySeconds + ","); } - if (replicas != null) { sb.append("replicas:"); sb.append(replicas + ","); } - if (selector != null && !selector.isEmpty()) { sb.append("selector:"); sb.append(selector + ","); } - if (template != null) { sb.append("template:"); sb.append(template); } - sb.append("}"); - return sb.toString(); - } - class TemplateNestedImpl extends V1PodTemplateSpecFluentImpl> implements V1ReplicationControllerSpecFluentImpl.TemplateNested,Nested{ - TemplateNestedImpl(V1PodTemplateSpec item) { - this.builder = new V1PodTemplateSpecBuilder(this, item); - } - TemplateNestedImpl() { - this.builder = new V1PodTemplateSpecBuilder(this); - } - V1PodTemplateSpecBuilder builder; - public N and() { - return (N) V1ReplicationControllerSpecFluentImpl.this.withTemplate(builder.build()); - } - public N endTemplate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusBuilder.java index 0b269197be..6f65403aa2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusBuilder.java @@ -1,56 +1,30 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ReplicationControllerStatusBuilder extends V1ReplicationControllerStatusFluentImpl implements VisitableBuilder{ +public class V1ReplicationControllerStatusBuilder extends V1ReplicationControllerStatusFluent implements VisitableBuilder{ public V1ReplicationControllerStatusBuilder() { - this(false); - } - public V1ReplicationControllerStatusBuilder(Boolean validationEnabled) { - this(new V1ReplicationControllerStatus(), validationEnabled); + this(new V1ReplicationControllerStatus()); } + public V1ReplicationControllerStatusBuilder(V1ReplicationControllerStatusFluent fluent) { - this(fluent, false); - } - public V1ReplicationControllerStatusBuilder(V1ReplicationControllerStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ReplicationControllerStatus(), validationEnabled); + this(fluent, new V1ReplicationControllerStatus()); } + public V1ReplicationControllerStatusBuilder(V1ReplicationControllerStatusFluent fluent,V1ReplicationControllerStatus instance) { - this(fluent, instance, false); - } - public V1ReplicationControllerStatusBuilder(V1ReplicationControllerStatusFluent fluent,V1ReplicationControllerStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAvailableReplicas(instance.getAvailableReplicas()); - fluent.withConditions(instance.getConditions()); - fluent.withFullyLabeledReplicas(instance.getFullyLabeledReplicas()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - fluent.withReadyReplicas(instance.getReadyReplicas()); - fluent.withReplicas(instance.getReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ReplicationControllerStatusBuilder(V1ReplicationControllerStatus instance) { - this(instance,false); - } - public V1ReplicationControllerStatusBuilder(V1ReplicationControllerStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAvailableReplicas(instance.getAvailableReplicas()); - this.withConditions(instance.getConditions()); - this.withFullyLabeledReplicas(instance.getFullyLabeledReplicas()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReadyReplicas(instance.getReadyReplicas()); - this.withReplicas(instance.getReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ReplicationControllerStatusFluent fluent; - Boolean validationEnabled; + public V1ReplicationControllerStatus build() { V1ReplicationControllerStatus buildable = new V1ReplicationControllerStatus(); buildable.setAvailableReplicas(fluent.getAvailableReplicas()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setFullyLabeledReplicas(fluent.getFullyLabeledReplicas()); buildable.setObservedGeneration(fluent.getObservedGeneration()); buildable.setReadyReplicas(fluent.getReadyReplicas()); @@ -58,4 +32,5 @@ public V1ReplicationControllerStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusFluent.java index 093efd359c..8e8c7a36f3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusFluent.java @@ -1,72 +1,312 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ReplicationControllerStatusFluent> extends Fluent{ - public Integer getAvailableReplicas(); - public A withAvailableReplicas(Integer availableReplicas); - public Boolean hasAvailableReplicas(); - public A addToConditions(int index,V1ReplicationControllerCondition item); - public A setToConditions(int index,V1ReplicationControllerCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1ReplicationControllerCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1ReplicationControllerCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1ReplicationControllerCondition buildCondition(int index); - public V1ReplicationControllerCondition buildFirstCondition(); - public V1ReplicationControllerCondition buildLastCondition(); - public V1ReplicationControllerCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1ReplicationControllerCondition... conditions); - public Boolean hasConditions(); - public V1ReplicationControllerStatusFluent.ConditionsNested addNewCondition(); - public V1ReplicationControllerStatusFluent.ConditionsNested addNewConditionLike(V1ReplicationControllerCondition item); - public V1ReplicationControllerStatusFluent.ConditionsNested setNewConditionLike(int index,V1ReplicationControllerCondition item); - public V1ReplicationControllerStatusFluent.ConditionsNested editCondition(int index); - public V1ReplicationControllerStatusFluent.ConditionsNested editFirstCondition(); - public V1ReplicationControllerStatusFluent.ConditionsNested editLastCondition(); - public V1ReplicationControllerStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public Integer getFullyLabeledReplicas(); - public A withFullyLabeledReplicas(Integer fullyLabeledReplicas); - public Boolean hasFullyLabeledReplicas(); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - public Integer getReadyReplicas(); - public A withReadyReplicas(Integer readyReplicas); - public Boolean hasReadyReplicas(); - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); - public interface ConditionsNested extends Nested,V1ReplicationControllerConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ReplicationControllerStatusFluent> extends BaseFluent{ + public V1ReplicationControllerStatusFluent() { + } + + public V1ReplicationControllerStatusFluent(V1ReplicationControllerStatus instance) { + this.copyInstance(instance); + } + private Integer availableReplicas; + private ArrayList conditions; + private Integer fullyLabeledReplicas; + private Long observedGeneration; + private Integer readyReplicas; + private Integer replicas; + + protected void copyInstance(V1ReplicationControllerStatus instance) { + instance = (instance != null ? instance : new V1ReplicationControllerStatus()); + if (instance != null) { + this.withAvailableReplicas(instance.getAvailableReplicas()); + this.withConditions(instance.getConditions()); + this.withFullyLabeledReplicas(instance.getFullyLabeledReplicas()); + this.withObservedGeneration(instance.getObservedGeneration()); + this.withReadyReplicas(instance.getReadyReplicas()); + this.withReplicas(instance.getReplicas()); + } + } + + public Integer getAvailableReplicas() { + return this.availableReplicas; + } + + public A withAvailableReplicas(Integer availableReplicas) { + this.availableReplicas = availableReplicas; + return (A) this; + } + + public boolean hasAvailableReplicas() { + return this.availableReplicas != null; + } + + public A addToConditions(int index,V1ReplicationControllerCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1ReplicationControllerCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1ReplicationControllerCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1ReplicationControllerCondition item : items) {V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1ReplicationControllerCondition item : items) {V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1ReplicationControllerCondition... items) { + if (this.conditions == null) return (A)this; + for (V1ReplicationControllerCondition item : items) {V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1ReplicationControllerCondition item : items) {V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1ReplicationControllerConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1ReplicationControllerCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1ReplicationControllerCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1ReplicationControllerCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1ReplicationControllerCondition buildMatchingCondition(Predicate predicate) { + for (V1ReplicationControllerConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1ReplicationControllerConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1ReplicationControllerCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1ReplicationControllerCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1ReplicationControllerCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1ReplicationControllerCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1ReplicationControllerCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ReplicationControllerConditionFluent> implements Nested{ + ConditionsNested(int index,V1ReplicationControllerCondition item) { + this.index = index; + this.builder = new V1ReplicationControllerConditionBuilder(this, item); + } + V1ReplicationControllerConditionBuilder builder; + int index; + + public N and() { + return (N) V1ReplicationControllerStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusFluentImpl.java deleted file mode 100644 index 1b1a99a696..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ReplicationControllerStatusFluentImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ReplicationControllerStatusFluentImpl> extends BaseFluent implements V1ReplicationControllerStatusFluent{ - public V1ReplicationControllerStatusFluentImpl() { - } - public V1ReplicationControllerStatusFluentImpl(V1ReplicationControllerStatus instance) { - if (instance != null) { - this.withAvailableReplicas(instance.getAvailableReplicas()); - this.withConditions(instance.getConditions()); - this.withFullyLabeledReplicas(instance.getFullyLabeledReplicas()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReadyReplicas(instance.getReadyReplicas()); - this.withReplicas(instance.getReplicas()); - } - } - private Integer availableReplicas; - private ArrayList conditions; - private Integer fullyLabeledReplicas; - private Long observedGeneration; - private Integer readyReplicas; - private Integer replicas; - public Integer getAvailableReplicas() { - return this.availableReplicas; - } - public A withAvailableReplicas(Integer availableReplicas) { - this.availableReplicas=availableReplicas; return (A) this; - } - public Boolean hasAvailableReplicas() { - return this.availableReplicas != null; - } - public A addToConditions(int index,V1ReplicationControllerCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1ReplicationControllerCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1ReplicationControllerCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1ReplicationControllerCondition item : items) {V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1ReplicationControllerCondition item : items) {V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1ReplicationControllerCondition... items) { - for (V1ReplicationControllerCondition item : items) {V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1ReplicationControllerCondition item : items) {V1ReplicationControllerConditionBuilder builder = new V1ReplicationControllerConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1ReplicationControllerConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1ReplicationControllerCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1ReplicationControllerCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1ReplicationControllerCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1ReplicationControllerCondition buildMatchingCondition(Predicate predicate) { - for (V1ReplicationControllerConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1ReplicationControllerConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1ReplicationControllerCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1ReplicationControllerCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1ReplicationControllerCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1ReplicationControllerStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1ReplicationControllerStatusFluentImpl.ConditionsNestedImpl(); - } - public V1ReplicationControllerStatusFluentImpl.ConditionsNested addNewConditionLike(V1ReplicationControllerCondition item) { - return new V1ReplicationControllerStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1ReplicationControllerStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1ReplicationControllerCondition item) { - return new V1ReplicationControllerStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1ReplicationControllerStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1ReplicationControllerStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1ReplicationControllerStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1ReplicationControllerStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ReplicationControllerConditionFluentImpl> implements V1ReplicationControllerStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1ReplicationControllerCondition item) { - this.index = index; - this.builder = new V1ReplicationControllerConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1ReplicationControllerConditionBuilder(this); - } - V1ReplicationControllerConditionBuilder builder; - int index; - public N and() { - return (N) V1ReplicationControllerStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesBuilder.java index b44f7dac33..340563355a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesBuilder.java @@ -1,54 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ResourceAttributesBuilder extends V1ResourceAttributesFluentImpl implements VisitableBuilder{ +public class V1ResourceAttributesBuilder extends V1ResourceAttributesFluent implements VisitableBuilder{ public V1ResourceAttributesBuilder() { - this(false); - } - public V1ResourceAttributesBuilder(Boolean validationEnabled) { - this(new V1ResourceAttributes(), validationEnabled); + this(new V1ResourceAttributes()); } + public V1ResourceAttributesBuilder(V1ResourceAttributesFluent fluent) { - this(fluent, false); - } - public V1ResourceAttributesBuilder(V1ResourceAttributesFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ResourceAttributes(), validationEnabled); + this(fluent, new V1ResourceAttributes()); } + public V1ResourceAttributesBuilder(V1ResourceAttributesFluent fluent,V1ResourceAttributes instance) { - this(fluent, instance, false); - } - public V1ResourceAttributesBuilder(V1ResourceAttributesFluent fluent,V1ResourceAttributes instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withGroup(instance.getGroup()); - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - fluent.withResource(instance.getResource()); - fluent.withSubresource(instance.getSubresource()); - fluent.withVerb(instance.getVerb()); - fluent.withVersion(instance.getVersion()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ResourceAttributesBuilder(V1ResourceAttributes instance) { - this(instance,false); - } - public V1ResourceAttributesBuilder(V1ResourceAttributes instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withResource(instance.getResource()); - this.withSubresource(instance.getSubresource()); - this.withVerb(instance.getVerb()); - this.withVersion(instance.getVersion()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ResourceAttributesFluent fluent; - Boolean validationEnabled; + public V1ResourceAttributes build() { V1ResourceAttributes buildable = new V1ResourceAttributes(); buildable.setGroup(fluent.getGroup()); @@ -61,4 +33,5 @@ public V1ResourceAttributes build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesFluent.java index ffc0605353..c6512d09ae 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesFluent.java @@ -1,34 +1,165 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ResourceAttributesFluent> extends Fluent{ - public String getGroup(); - public A withGroup(String group); - public Boolean hasGroup(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); - public String getResource(); - public A withResource(String resource); - public Boolean hasResource(); - public String getSubresource(); - public A withSubresource(String subresource); - public Boolean hasSubresource(); - public String getVerb(); - public A withVerb(String verb); - public Boolean hasVerb(); - public String getVersion(); - public A withVersion(String version); - public Boolean hasVersion(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ResourceAttributesFluent> extends BaseFluent{ + public V1ResourceAttributesFluent() { + } + public V1ResourceAttributesFluent(V1ResourceAttributes instance) { + this.copyInstance(instance); + } + private String group; + private String name; + private String namespace; + private String resource; + private String subresource; + private String verb; + private String version; + + protected void copyInstance(V1ResourceAttributes instance) { + instance = (instance != null ? instance : new V1ResourceAttributes()); + if (instance != null) { + this.withGroup(instance.getGroup()); + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withResource(instance.getResource()); + this.withSubresource(instance.getSubresource()); + this.withVerb(instance.getVerb()); + this.withVersion(instance.getVersion()); + } + } + + public String getGroup() { + return this.group; + } + + public A withGroup(String group) { + this.group = group; + return (A) this; + } + + public boolean hasGroup() { + return this.group != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public String getResource() { + return this.resource; + } + + public A withResource(String resource) { + this.resource = resource; + return (A) this; + } + + public boolean hasResource() { + return this.resource != null; + } + + public String getSubresource() { + return this.subresource; + } + + public A withSubresource(String subresource) { + this.subresource = subresource; + return (A) this; + } + + public boolean hasSubresource() { + return this.subresource != null; + } + + public String getVerb() { + return this.verb; + } + + public A withVerb(String verb) { + this.verb = verb; + return (A) this; + } + + public boolean hasVerb() { + return this.verb != null; + } + + public String getVersion() { + return this.version; + } + + public A withVersion(String version) { + this.version = version; + return (A) this; + } + + public boolean hasVersion() { + return this.version != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ResourceAttributesFluent that = (V1ResourceAttributesFluent) o; + if (!java.util.Objects.equals(group, that.group)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(resource, that.resource)) return false; + if (!java.util.Objects.equals(subresource, that.subresource)) return false; + if (!java.util.Objects.equals(verb, that.verb)) return false; + if (!java.util.Objects.equals(version, that.version)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(group, name, namespace, resource, subresource, verb, version, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (group != null) { sb.append("group:"); sb.append(group + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } + if (subresource != null) { sb.append("subresource:"); sb.append(subresource + ","); } + if (verb != null) { sb.append("verb:"); sb.append(verb + ","); } + if (version != null) { sb.append("version:"); sb.append(version); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesFluentImpl.java deleted file mode 100644 index 72b475f859..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceAttributesFluentImpl.java +++ /dev/null @@ -1,135 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ResourceAttributesFluentImpl> extends BaseFluent implements V1ResourceAttributesFluent{ - public V1ResourceAttributesFluentImpl() { - } - public V1ResourceAttributesFluentImpl(V1ResourceAttributes instance) { - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withResource(instance.getResource()); - this.withSubresource(instance.getSubresource()); - this.withVerb(instance.getVerb()); - this.withVersion(instance.getVersion()); - } - } - private String group; - private String name; - private String namespace; - private String resource; - private String subresource; - private String verb; - private String version; - public String getGroup() { - return this.group; - } - public A withGroup(String group) { - this.group=group; return (A) this; - } - public Boolean hasGroup() { - return this.group != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public String getResource() { - return this.resource; - } - public A withResource(String resource) { - this.resource=resource; return (A) this; - } - public Boolean hasResource() { - return this.resource != null; - } - public String getSubresource() { - return this.subresource; - } - public A withSubresource(String subresource) { - this.subresource=subresource; return (A) this; - } - public Boolean hasSubresource() { - return this.subresource != null; - } - public String getVerb() { - return this.verb; - } - public A withVerb(String verb) { - this.verb=verb; return (A) this; - } - public Boolean hasVerb() { - return this.verb != null; - } - public String getVersion() { - return this.version; - } - public A withVersion(String version) { - this.version=version; return (A) this; - } - public Boolean hasVersion() { - return this.version != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ResourceAttributesFluentImpl that = (V1ResourceAttributesFluentImpl) o; - if (!java.util.Objects.equals(group, that.group)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - if (!java.util.Objects.equals(resource, that.resource)) return false; - - if (!java.util.Objects.equals(subresource, that.subresource)) return false; - - if (!java.util.Objects.equals(verb, that.verb)) return false; - - if (!java.util.Objects.equals(version, that.version)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(group, name, namespace, resource, subresource, verb, version, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (group != null) { sb.append("group:"); sb.append(group + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } - if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } - if (subresource != null) { sb.append("subresource:"); sb.append(subresource + ","); } - if (verb != null) { sb.append("verb:"); sb.append(verb + ","); } - if (version != null) { sb.append("version:"); sb.append(version); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimBuilder.java index c6435c1ca9..02b63a681f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ResourceClaimBuilder extends V1ResourceClaimFluentImpl implements VisitableBuilder{ +public class V1ResourceClaimBuilder extends V1ResourceClaimFluent implements VisitableBuilder{ public V1ResourceClaimBuilder() { - this(false); - } - public V1ResourceClaimBuilder(Boolean validationEnabled) { - this(new V1ResourceClaim(), validationEnabled); + this(new V1ResourceClaim()); } + public V1ResourceClaimBuilder(V1ResourceClaimFluent fluent) { - this(fluent, false); - } - public V1ResourceClaimBuilder(V1ResourceClaimFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ResourceClaim(), validationEnabled); + this(fluent, new V1ResourceClaim()); } + public V1ResourceClaimBuilder(V1ResourceClaimFluent fluent,V1ResourceClaim instance) { - this(fluent, instance, false); - } - public V1ResourceClaimBuilder(V1ResourceClaimFluent fluent,V1ResourceClaim instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ResourceClaimBuilder(V1ResourceClaim instance) { - this(instance,false); - } - public V1ResourceClaimBuilder(V1ResourceClaim instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ResourceClaimFluent fluent; - Boolean validationEnabled; + public V1ResourceClaim build() { V1ResourceClaim buildable = new V1ResourceClaim(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimFluent.java index 74df428b11..5dd8b62463 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ResourceClaimFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ResourceClaimFluent> extends BaseFluent{ + public V1ResourceClaimFluent() { + } + public V1ResourceClaimFluent(V1ResourceClaim instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1ResourceClaim instance) { + instance = (instance != null ? instance : new V1ResourceClaim()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ResourceClaimFluent that = (V1ResourceClaimFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimFluentImpl.java deleted file mode 100644 index df0f5d6470..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceClaimFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ResourceClaimFluentImpl> extends BaseFluent implements V1ResourceClaimFluent{ - public V1ResourceClaimFluentImpl() { - } - public V1ResourceClaimFluentImpl(V1ResourceClaim instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ResourceClaimFluentImpl that = (V1ResourceClaimFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorBuilder.java index a16652fb08..5c6974e022 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ResourceFieldSelectorBuilder extends V1ResourceFieldSelectorFluentImpl implements VisitableBuilder{ +public class V1ResourceFieldSelectorBuilder extends V1ResourceFieldSelectorFluent implements VisitableBuilder{ public V1ResourceFieldSelectorBuilder() { - this(false); - } - public V1ResourceFieldSelectorBuilder(Boolean validationEnabled) { - this(new V1ResourceFieldSelector(), validationEnabled); + this(new V1ResourceFieldSelector()); } + public V1ResourceFieldSelectorBuilder(V1ResourceFieldSelectorFluent fluent) { - this(fluent, false); - } - public V1ResourceFieldSelectorBuilder(V1ResourceFieldSelectorFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ResourceFieldSelector(), validationEnabled); + this(fluent, new V1ResourceFieldSelector()); } + public V1ResourceFieldSelectorBuilder(V1ResourceFieldSelectorFluent fluent,V1ResourceFieldSelector instance) { - this(fluent, instance, false); - } - public V1ResourceFieldSelectorBuilder(V1ResourceFieldSelectorFluent fluent,V1ResourceFieldSelector instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withContainerName(instance.getContainerName()); - fluent.withDivisor(instance.getDivisor()); - fluent.withResource(instance.getResource()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ResourceFieldSelectorBuilder(V1ResourceFieldSelector instance) { - this(instance,false); - } - public V1ResourceFieldSelectorBuilder(V1ResourceFieldSelector instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withContainerName(instance.getContainerName()); - this.withDivisor(instance.getDivisor()); - this.withResource(instance.getResource()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ResourceFieldSelectorFluent fluent; - Boolean validationEnabled; + public V1ResourceFieldSelector build() { V1ResourceFieldSelector buildable = new V1ResourceFieldSelector(); buildable.setContainerName(fluent.getContainerName()); @@ -49,4 +29,5 @@ public V1ResourceFieldSelector build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorFluent.java index e9579527dd..50333e3877 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorFluent.java @@ -1,24 +1,102 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.custom.Quantity; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ResourceFieldSelectorFluent> extends Fluent{ - public String getContainerName(); - public A withContainerName(String containerName); - public Boolean hasContainerName(); - public Quantity getDivisor(); - public A withDivisor(Quantity divisor); - public Boolean hasDivisor(); - public A withNewDivisor(String value); - public String getResource(); - public A withResource(String resource); - public Boolean hasResource(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ResourceFieldSelectorFluent> extends BaseFluent{ + public V1ResourceFieldSelectorFluent() { + } + public V1ResourceFieldSelectorFluent(V1ResourceFieldSelector instance) { + this.copyInstance(instance); + } + private String containerName; + private Quantity divisor; + private String resource; + + protected void copyInstance(V1ResourceFieldSelector instance) { + instance = (instance != null ? instance : new V1ResourceFieldSelector()); + if (instance != null) { + this.withContainerName(instance.getContainerName()); + this.withDivisor(instance.getDivisor()); + this.withResource(instance.getResource()); + } + } + + public String getContainerName() { + return this.containerName; + } + + public A withContainerName(String containerName) { + this.containerName = containerName; + return (A) this; + } + + public boolean hasContainerName() { + return this.containerName != null; + } + + public Quantity getDivisor() { + return this.divisor; + } + + public A withDivisor(Quantity divisor) { + this.divisor = divisor; + return (A) this; + } + + public boolean hasDivisor() { + return this.divisor != null; + } + + public A withNewDivisor(String value) { + return (A)withDivisor(new Quantity(value)); + } + + public String getResource() { + return this.resource; + } + + public A withResource(String resource) { + this.resource = resource; + return (A) this; + } + + public boolean hasResource() { + return this.resource != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ResourceFieldSelectorFluent that = (V1ResourceFieldSelectorFluent) o; + if (!java.util.Objects.equals(containerName, that.containerName)) return false; + if (!java.util.Objects.equals(divisor, that.divisor)) return false; + if (!java.util.Objects.equals(resource, that.resource)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(containerName, divisor, resource, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (containerName != null) { sb.append("containerName:"); sb.append(containerName + ","); } + if (divisor != null) { sb.append("divisor:"); sb.append(divisor + ","); } + if (resource != null) { sb.append("resource:"); sb.append(resource); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorFluentImpl.java deleted file mode 100644 index b756073272..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceFieldSelectorFluentImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import io.kubernetes.client.custom.Quantity; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ResourceFieldSelectorFluentImpl> extends BaseFluent implements V1ResourceFieldSelectorFluent{ - public V1ResourceFieldSelectorFluentImpl() { - } - public V1ResourceFieldSelectorFluentImpl(V1ResourceFieldSelector instance) { - if (instance != null) { - this.withContainerName(instance.getContainerName()); - this.withDivisor(instance.getDivisor()); - this.withResource(instance.getResource()); - } - } - private String containerName; - private Quantity divisor; - private String resource; - public String getContainerName() { - return this.containerName; - } - public A withContainerName(String containerName) { - this.containerName=containerName; return (A) this; - } - public Boolean hasContainerName() { - return this.containerName != null; - } - public Quantity getDivisor() { - return this.divisor; - } - public A withDivisor(Quantity divisor) { - this.divisor=divisor; return (A) this; - } - public Boolean hasDivisor() { - return this.divisor != null; - } - public A withNewDivisor(String value) { - return (A)withDivisor(new Quantity(value)); - } - public String getResource() { - return this.resource; - } - public A withResource(String resource) { - this.resource=resource; return (A) this; - } - public Boolean hasResource() { - return this.resource != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ResourceFieldSelectorFluentImpl that = (V1ResourceFieldSelectorFluentImpl) o; - if (!java.util.Objects.equals(containerName, that.containerName)) return false; - - if (!java.util.Objects.equals(divisor, that.divisor)) return false; - - if (!java.util.Objects.equals(resource, that.resource)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(containerName, divisor, resource, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (containerName != null) { sb.append("containerName:"); sb.append(containerName + ","); } - if (divisor != null) { sb.append("divisor:"); sb.append(divisor + ","); } - if (resource != null) { sb.append("resource:"); sb.append(resource); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaBuilder.java index 5f306920d4..5b506c9caa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ResourceQuotaBuilder extends V1ResourceQuotaFluentImpl implements VisitableBuilder{ +public class V1ResourceQuotaBuilder extends V1ResourceQuotaFluent implements VisitableBuilder{ public V1ResourceQuotaBuilder() { - this(false); - } - public V1ResourceQuotaBuilder(Boolean validationEnabled) { - this(new V1ResourceQuota(), validationEnabled); + this(new V1ResourceQuota()); } + public V1ResourceQuotaBuilder(V1ResourceQuotaFluent fluent) { - this(fluent, false); - } - public V1ResourceQuotaBuilder(V1ResourceQuotaFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ResourceQuota(), validationEnabled); + this(fluent, new V1ResourceQuota()); } + public V1ResourceQuotaBuilder(V1ResourceQuotaFluent fluent,V1ResourceQuota instance) { - this(fluent, instance, false); - } - public V1ResourceQuotaBuilder(V1ResourceQuotaFluent fluent,V1ResourceQuota instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ResourceQuotaBuilder(V1ResourceQuota instance) { - this(instance,false); - } - public V1ResourceQuotaBuilder(V1ResourceQuota instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ResourceQuotaFluent fluent; - Boolean validationEnabled; + public V1ResourceQuota build() { V1ResourceQuota buildable = new V1ResourceQuota(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaFluent.java index cda13ebba9..c9e52a58eb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1ResourceQuotaFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ResourceQuotaFluent.MetadataNested withNewMetadata(); - public V1ResourceQuotaFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ResourceQuotaFluent.MetadataNested editMetadata(); - public V1ResourceQuotaFluent.MetadataNested editOrNewMetadata(); - public V1ResourceQuotaFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceQuotaSpec getSpec(); - public V1ResourceQuotaSpec buildSpec(); - public A withSpec(V1ResourceQuotaSpec spec); - public Boolean hasSpec(); - public V1ResourceQuotaFluent.SpecNested withNewSpec(); - public V1ResourceQuotaFluent.SpecNested withNewSpecLike(V1ResourceQuotaSpec item); - public V1ResourceQuotaFluent.SpecNested editSpec(); - public V1ResourceQuotaFluent.SpecNested editOrNewSpec(); - public V1ResourceQuotaFluent.SpecNested editOrNewSpecLike(V1ResourceQuotaSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceQuotaStatus getStatus(); - public V1ResourceQuotaStatus buildStatus(); - public A withStatus(V1ResourceQuotaStatus status); - public Boolean hasStatus(); - public V1ResourceQuotaFluent.StatusNested withNewStatus(); - public V1ResourceQuotaFluent.StatusNested withNewStatusLike(V1ResourceQuotaStatus item); - public V1ResourceQuotaFluent.StatusNested editStatus(); - public V1ResourceQuotaFluent.StatusNested editOrNewStatus(); - public V1ResourceQuotaFluent.StatusNested editOrNewStatusLike(V1ResourceQuotaStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ResourceQuotaFluent> extends BaseFluent{ + public V1ResourceQuotaFluent() { + } + + public V1ResourceQuotaFluent(V1ResourceQuota instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1ResourceQuotaSpecBuilder spec; + private V1ResourceQuotaStatusBuilder status; + + protected void copyInstance(V1ResourceQuota instance) { + instance = (instance != null ? instance : new V1ResourceQuota()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1ResourceQuotaSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1ResourceQuotaSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1ResourceQuotaSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1ResourceQuotaSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1ResourceQuotaSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1ResourceQuotaSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1ResourceQuotaSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1ResourceQuotaStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1ResourceQuotaStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1ResourceQuotaStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1ResourceQuotaStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1ResourceQuotaStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1ResourceQuotaStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ResourceQuotaFluent that = (V1ResourceQuotaFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ResourceQuotaFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1ResourceQuotaStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1ResourceQuotaSpecFluent> implements Nested{ + SpecNested(V1ResourceQuotaSpec item) { + this.builder = new V1ResourceQuotaSpecBuilder(this, item); + } + V1ResourceQuotaSpecBuilder builder; + + public N and() { + return (N) V1ResourceQuotaFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1ResourceQuotaStatusFluent> implements Nested{ + StatusNested(V1ResourceQuotaStatus item) { + this.builder = new V1ResourceQuotaStatusBuilder(this, item); + } + V1ResourceQuotaStatusBuilder builder; + + public N and() { + return (N) V1ResourceQuotaFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaFluentImpl.java deleted file mode 100644 index 63229be588..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ResourceQuotaFluentImpl> extends BaseFluent implements V1ResourceQuotaFluent{ - public V1ResourceQuotaFluentImpl() { - } - public V1ResourceQuotaFluentImpl(V1ResourceQuota instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1ResourceQuotaSpecBuilder spec; - private V1ResourceQuotaStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ResourceQuotaFluentImpl.MetadataNested withNewMetadata() { - return new V1ResourceQuotaFluentImpl.MetadataNestedImpl(); - } - public V1ResourceQuotaFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ResourceQuotaFluentImpl.MetadataNestedImpl(item); - } - public V1ResourceQuotaFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ResourceQuotaFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ResourceQuotaFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceQuotaSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1ResourceQuotaSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1ResourceQuotaSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1ResourceQuotaSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1ResourceQuotaFluentImpl.SpecNested withNewSpec() { - return new V1ResourceQuotaFluentImpl.SpecNestedImpl(); - } - public V1ResourceQuotaFluentImpl.SpecNested withNewSpecLike(V1ResourceQuotaSpec item) { - return new V1ResourceQuotaFluentImpl.SpecNestedImpl(item); - } - public V1ResourceQuotaFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1ResourceQuotaFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1ResourceQuotaSpecBuilder().build()); - } - public V1ResourceQuotaFluentImpl.SpecNested editOrNewSpecLike(V1ResourceQuotaSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceQuotaStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1ResourceQuotaStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1ResourceQuotaStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1ResourceQuotaStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1ResourceQuotaFluentImpl.StatusNested withNewStatus() { - return new V1ResourceQuotaFluentImpl.StatusNestedImpl(); - } - public V1ResourceQuotaFluentImpl.StatusNested withNewStatusLike(V1ResourceQuotaStatus item) { - return new V1ResourceQuotaFluentImpl.StatusNestedImpl(item); - } - public V1ResourceQuotaFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1ResourceQuotaFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1ResourceQuotaStatusBuilder().build()); - } - public V1ResourceQuotaFluentImpl.StatusNested editOrNewStatusLike(V1ResourceQuotaStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ResourceQuotaFluentImpl that = (V1ResourceQuotaFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ResourceQuotaFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ResourceQuotaFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1ResourceQuotaSpecFluentImpl> implements V1ResourceQuotaFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1ResourceQuotaSpec item) { - this.builder = new V1ResourceQuotaSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1ResourceQuotaSpecBuilder(this); - } - V1ResourceQuotaSpecBuilder builder; - public N and() { - return (N) V1ResourceQuotaFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1ResourceQuotaStatusFluentImpl> implements V1ResourceQuotaFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1ResourceQuotaStatus item) { - this.builder = new V1ResourceQuotaStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1ResourceQuotaStatusBuilder(this); - } - V1ResourceQuotaStatusBuilder builder; - public N and() { - return (N) V1ResourceQuotaFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListBuilder.java index cc8a06e71a..8cd33f5f94 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ResourceQuotaListBuilder extends V1ResourceQuotaListFluentImpl implements VisitableBuilder{ +public class V1ResourceQuotaListBuilder extends V1ResourceQuotaListFluent implements VisitableBuilder{ public V1ResourceQuotaListBuilder() { - this(false); - } - public V1ResourceQuotaListBuilder(Boolean validationEnabled) { - this(new V1ResourceQuotaList(), validationEnabled); + this(new V1ResourceQuotaList()); } + public V1ResourceQuotaListBuilder(V1ResourceQuotaListFluent fluent) { - this(fluent, false); - } - public V1ResourceQuotaListBuilder(V1ResourceQuotaListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ResourceQuotaList(), validationEnabled); + this(fluent, new V1ResourceQuotaList()); } + public V1ResourceQuotaListBuilder(V1ResourceQuotaListFluent fluent,V1ResourceQuotaList instance) { - this(fluent, instance, false); - } - public V1ResourceQuotaListBuilder(V1ResourceQuotaListFluent fluent,V1ResourceQuotaList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ResourceQuotaListBuilder(V1ResourceQuotaList instance) { - this(instance,false); - } - public V1ResourceQuotaListBuilder(V1ResourceQuotaList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ResourceQuotaListFluent fluent; - Boolean validationEnabled; + public V1ResourceQuotaList build() { V1ResourceQuotaList buildable = new V1ResourceQuotaList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListFluent.java index 5d85029a7e..327b846844 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ResourceQuotaListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ResourceQuota item); - public A setToItems(int index,V1ResourceQuota item); - public A addToItems(io.kubernetes.client.openapi.models.V1ResourceQuota... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ResourceQuota... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ResourceQuota buildItem(int index); - public V1ResourceQuota buildFirstItem(); - public V1ResourceQuota buildLastItem(); - public V1ResourceQuota buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ResourceQuota... items); - public Boolean hasItems(); - public V1ResourceQuotaListFluent.ItemsNested addNewItem(); - public V1ResourceQuotaListFluent.ItemsNested addNewItemLike(V1ResourceQuota item); - public V1ResourceQuotaListFluent.ItemsNested setNewItemLike(int index,V1ResourceQuota item); - public V1ResourceQuotaListFluent.ItemsNested editItem(int index); - public V1ResourceQuotaListFluent.ItemsNested editFirstItem(); - public V1ResourceQuotaListFluent.ItemsNested editLastItem(); - public V1ResourceQuotaListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ResourceQuotaListFluent.MetadataNested withNewMetadata(); - public V1ResourceQuotaListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ResourceQuotaListFluent.MetadataNested editMetadata(); - public V1ResourceQuotaListFluent.MetadataNested editOrNewMetadata(); - public V1ResourceQuotaListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ResourceQuotaFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ResourceQuotaListFluent> extends BaseFluent{ + public V1ResourceQuotaListFluent() { + } + + public V1ResourceQuotaListFluent(V1ResourceQuotaList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ResourceQuotaList instance) { + instance = (instance != null ? instance : new V1ResourceQuotaList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ResourceQuota item) { + if (this.items == null) {this.items = new ArrayList();} + V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ResourceQuota item) { + if (this.items == null) {this.items = new ArrayList();} + V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ResourceQuota... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ResourceQuota item : items) {V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ResourceQuota item : items) {V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ResourceQuota... items) { + if (this.items == null) return (A)this; + for (V1ResourceQuota item : items) {V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ResourceQuota item : items) {V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ResourceQuotaBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ResourceQuota buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ResourceQuota buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ResourceQuota buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ResourceQuota buildMatchingItem(Predicate predicate) { + for (V1ResourceQuotaBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ResourceQuotaBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ResourceQuota item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ResourceQuota... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ResourceQuota item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ResourceQuota item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ResourceQuota item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ResourceQuotaListFluent that = (V1ResourceQuotaListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ResourceQuotaFluent> implements Nested{ + ItemsNested(int index,V1ResourceQuota item) { + this.index = index; + this.builder = new V1ResourceQuotaBuilder(this, item); + } + V1ResourceQuotaBuilder builder; + int index; + public N and() { + return (N) V1ResourceQuotaListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ResourceQuotaListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListFluentImpl.java deleted file mode 100644 index f28f3427eb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ResourceQuotaListFluentImpl> extends BaseFluent implements V1ResourceQuotaListFluent{ - public V1ResourceQuotaListFluentImpl() { - } - public V1ResourceQuotaListFluentImpl(V1ResourceQuotaList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ResourceQuota item) { - if (this.items == null) {this.items = new ArrayList();} - V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ResourceQuota item) { - if (this.items == null) {this.items = new ArrayList();} - V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ResourceQuota... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ResourceQuota item : items) {V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ResourceQuota item : items) {V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ResourceQuota... items) { - for (V1ResourceQuota item : items) {V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ResourceQuota item : items) {V1ResourceQuotaBuilder builder = new V1ResourceQuotaBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ResourceQuotaBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ResourceQuota buildItem(int index) { - return this.items.get(index).build(); - } - public V1ResourceQuota buildFirstItem() { - return this.items.get(0).build(); - } - public V1ResourceQuota buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ResourceQuota buildMatchingItem(Predicate predicate) { - for (V1ResourceQuotaBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ResourceQuotaBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ResourceQuota item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ResourceQuota... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ResourceQuota item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ResourceQuotaListFluentImpl.ItemsNested addNewItem() { - return new V1ResourceQuotaListFluentImpl.ItemsNestedImpl(); - } - public V1ResourceQuotaListFluentImpl.ItemsNested addNewItemLike(V1ResourceQuota item) { - return new V1ResourceQuotaListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ResourceQuotaListFluentImpl.ItemsNested setNewItemLike(int index,V1ResourceQuota item) { - return new V1ResourceQuotaListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ResourceQuotaListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ResourceQuotaListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ResourceQuotaListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ResourceQuotaListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ResourceQuotaListFluentImpl.MetadataNestedImpl(); - } - public V1ResourceQuotaListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ResourceQuotaListFluentImpl.MetadataNestedImpl(item); - } - public V1ResourceQuotaListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ResourceQuotaListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ResourceQuotaListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ResourceQuotaListFluentImpl that = (V1ResourceQuotaListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ResourceQuotaFluentImpl> implements V1ResourceQuotaListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ResourceQuota item) { - this.index = index; - this.builder = new V1ResourceQuotaBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ResourceQuotaBuilder(this); - } - V1ResourceQuotaBuilder builder; - int index; - public N and() { - return (N) V1ResourceQuotaListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ResourceQuotaListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ResourceQuotaListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecBuilder.java index 7d7616a530..fed27b2673 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ResourceQuotaSpecBuilder extends V1ResourceQuotaSpecFluentImpl implements VisitableBuilder{ +public class V1ResourceQuotaSpecBuilder extends V1ResourceQuotaSpecFluent implements VisitableBuilder{ public V1ResourceQuotaSpecBuilder() { - this(false); - } - public V1ResourceQuotaSpecBuilder(Boolean validationEnabled) { - this(new V1ResourceQuotaSpec(), validationEnabled); + this(new V1ResourceQuotaSpec()); } + public V1ResourceQuotaSpecBuilder(V1ResourceQuotaSpecFluent fluent) { - this(fluent, false); - } - public V1ResourceQuotaSpecBuilder(V1ResourceQuotaSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ResourceQuotaSpec(), validationEnabled); + this(fluent, new V1ResourceQuotaSpec()); } + public V1ResourceQuotaSpecBuilder(V1ResourceQuotaSpecFluent fluent,V1ResourceQuotaSpec instance) { - this(fluent, instance, false); - } - public V1ResourceQuotaSpecBuilder(V1ResourceQuotaSpecFluent fluent,V1ResourceQuotaSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHard(instance.getHard()); - fluent.withScopeSelector(instance.getScopeSelector()); - fluent.withScopes(instance.getScopes()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ResourceQuotaSpecBuilder(V1ResourceQuotaSpec instance) { - this(instance,false); - } - public V1ResourceQuotaSpecBuilder(V1ResourceQuotaSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHard(instance.getHard()); - this.withScopeSelector(instance.getScopeSelector()); - this.withScopes(instance.getScopes()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ResourceQuotaSpecFluent fluent; - Boolean validationEnabled; + public V1ResourceQuotaSpec build() { V1ResourceQuotaSpec buildable = new V1ResourceQuotaSpec(); buildable.setHard(fluent.getHard()); - buildable.setScopeSelector(fluent.getScopeSelector()); + buildable.setScopeSelector(fluent.buildScopeSelector()); buildable.setScopes(fluent.getScopes()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecFluent.java index ad3480ba2c..89bd38d08b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecFluent.java @@ -1,64 +1,252 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import io.kubernetes.client.custom.Quantity; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1ResourceQuotaSpecFluent> extends Fluent{ - public A addToHard(String key,Quantity value); - public A addToHard(Map map); - public A removeFromHard(String key); - public A removeFromHard(Map map); - public Map getHard(); - public A withHard(Map hard); - public Boolean hasHard(); - - /** - * This method has been deprecated, please use method buildScopeSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1ScopeSelector getScopeSelector(); - public V1ScopeSelector buildScopeSelector(); - public A withScopeSelector(V1ScopeSelector scopeSelector); - public Boolean hasScopeSelector(); - public V1ResourceQuotaSpecFluent.ScopeSelectorNested withNewScopeSelector(); - public V1ResourceQuotaSpecFluent.ScopeSelectorNested withNewScopeSelectorLike(V1ScopeSelector item); - public V1ResourceQuotaSpecFluent.ScopeSelectorNested editScopeSelector(); - public V1ResourceQuotaSpecFluent.ScopeSelectorNested editOrNewScopeSelector(); - public V1ResourceQuotaSpecFluent.ScopeSelectorNested editOrNewScopeSelectorLike(V1ScopeSelector item); - public A addToScopes(int index,String item); - public A setToScopes(int index,String item); - public A addToScopes(java.lang.String... items); - public A addAllToScopes(Collection items); - public A removeFromScopes(java.lang.String... items); - public A removeAllFromScopes(Collection items); - public List getScopes(); - public String getScope(int index); - public String getFirstScope(); - public String getLastScope(); - public String getMatchingScope(Predicate predicate); - public Boolean hasMatchingScope(Predicate predicate); - public A withScopes(List scopes); - public A withScopes(java.lang.String... scopes); - public Boolean hasScopes(); - public interface ScopeSelectorNested extends Nested,V1ScopeSelectorFluent>{ - public N and(); - public N endScopeSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ResourceQuotaSpecFluent> extends BaseFluent{ + public V1ResourceQuotaSpecFluent() { + } + + public V1ResourceQuotaSpecFluent(V1ResourceQuotaSpec instance) { + this.copyInstance(instance); + } + private Map hard; + private V1ScopeSelectorBuilder scopeSelector; + private List scopes; + + protected void copyInstance(V1ResourceQuotaSpec instance) { + instance = (instance != null ? instance : new V1ResourceQuotaSpec()); + if (instance != null) { + this.withHard(instance.getHard()); + this.withScopeSelector(instance.getScopeSelector()); + this.withScopes(instance.getScopes()); + } + } + + public A addToHard(String key,Quantity value) { + if(this.hard == null && key != null && value != null) { this.hard = new LinkedHashMap(); } + if(key != null && value != null) {this.hard.put(key, value);} return (A)this; + } + + public A addToHard(Map map) { + if(this.hard == null && map != null) { this.hard = new LinkedHashMap(); } + if(map != null) { this.hard.putAll(map);} return (A)this; + } + + public A removeFromHard(String key) { + if(this.hard == null) { return (A) this; } + if(key != null && this.hard != null) {this.hard.remove(key);} return (A)this; + } + + public A removeFromHard(Map map) { + if(this.hard == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.hard != null){this.hard.remove(key);}}} return (A)this; + } + + public Map getHard() { + return this.hard; + } + + public A withHard(Map hard) { + if (hard == null) { + this.hard = null; + } else { + this.hard = new LinkedHashMap(hard); + } + return (A) this; + } + + public boolean hasHard() { + return this.hard != null; + } + + public V1ScopeSelector buildScopeSelector() { + return this.scopeSelector != null ? this.scopeSelector.build() : null; + } + + public A withScopeSelector(V1ScopeSelector scopeSelector) { + this._visitables.remove("scopeSelector"); + if (scopeSelector != null) { + this.scopeSelector = new V1ScopeSelectorBuilder(scopeSelector); + this._visitables.get("scopeSelector").add(this.scopeSelector); + } else { + this.scopeSelector = null; + this._visitables.get("scopeSelector").remove(this.scopeSelector); + } + return (A) this; + } + + public boolean hasScopeSelector() { + return this.scopeSelector != null; + } + + public ScopeSelectorNested withNewScopeSelector() { + return new ScopeSelectorNested(null); + } + + public ScopeSelectorNested withNewScopeSelectorLike(V1ScopeSelector item) { + return new ScopeSelectorNested(item); + } + + public ScopeSelectorNested editScopeSelector() { + return withNewScopeSelectorLike(java.util.Optional.ofNullable(buildScopeSelector()).orElse(null)); + } + + public ScopeSelectorNested editOrNewScopeSelector() { + return withNewScopeSelectorLike(java.util.Optional.ofNullable(buildScopeSelector()).orElse(new V1ScopeSelectorBuilder().build())); + } + + public ScopeSelectorNested editOrNewScopeSelectorLike(V1ScopeSelector item) { + return withNewScopeSelectorLike(java.util.Optional.ofNullable(buildScopeSelector()).orElse(item)); + } + + public A addToScopes(int index,String item) { + if (this.scopes == null) {this.scopes = new ArrayList();} + this.scopes.add(index, item); + return (A)this; + } + + public A setToScopes(int index,String item) { + if (this.scopes == null) {this.scopes = new ArrayList();} + this.scopes.set(index, item); return (A)this; + } + + public A addToScopes(java.lang.String... items) { + if (this.scopes == null) {this.scopes = new ArrayList();} + for (String item : items) {this.scopes.add(item);} return (A)this; + } + + public A addAllToScopes(Collection items) { + if (this.scopes == null) {this.scopes = new ArrayList();} + for (String item : items) {this.scopes.add(item);} return (A)this; + } + + public A removeFromScopes(java.lang.String... items) { + if (this.scopes == null) return (A)this; + for (String item : items) { this.scopes.remove(item);} return (A)this; + } + + public A removeAllFromScopes(Collection items) { + if (this.scopes == null) return (A)this; + for (String item : items) { this.scopes.remove(item);} return (A)this; + } + + public List getScopes() { + return this.scopes; + } + + public String getScope(int index) { + return this.scopes.get(index); + } + + public String getFirstScope() { + return this.scopes.get(0); + } + + public String getLastScope() { + return this.scopes.get(scopes.size() - 1); + } + + public String getMatchingScope(Predicate predicate) { + for (String item : scopes) { + if (predicate.test(item)) { + return item; + } + } + return null; } + public boolean hasMatchingScope(Predicate predicate) { + for (String item : scopes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withScopes(List scopes) { + if (scopes != null) { + this.scopes = new ArrayList(); + for (String item : scopes) { + this.addToScopes(item); + } + } else { + this.scopes = null; + } + return (A) this; + } + + public A withScopes(java.lang.String... scopes) { + if (this.scopes != null) { + this.scopes.clear(); + _visitables.remove("scopes"); + } + if (scopes != null) { + for (String item : scopes) { + this.addToScopes(item); + } + } + return (A) this; + } + + public boolean hasScopes() { + return this.scopes != null && !this.scopes.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ResourceQuotaSpecFluent that = (V1ResourceQuotaSpecFluent) o; + if (!java.util.Objects.equals(hard, that.hard)) return false; + if (!java.util.Objects.equals(scopeSelector, that.scopeSelector)) return false; + if (!java.util.Objects.equals(scopes, that.scopes)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(hard, scopeSelector, scopes, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (hard != null && !hard.isEmpty()) { sb.append("hard:"); sb.append(hard + ","); } + if (scopeSelector != null) { sb.append("scopeSelector:"); sb.append(scopeSelector + ","); } + if (scopes != null && !scopes.isEmpty()) { sb.append("scopes:"); sb.append(scopes); } + sb.append("}"); + return sb.toString(); + } + public class ScopeSelectorNested extends V1ScopeSelectorFluent> implements Nested{ + ScopeSelectorNested(V1ScopeSelector item) { + this.builder = new V1ScopeSelectorBuilder(this, item); + } + V1ScopeSelectorBuilder builder; + + public N and() { + return (N) V1ResourceQuotaSpecFluent.this.withScopeSelector(builder.build()); + } + + public N endScopeSelector() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecFluentImpl.java deleted file mode 100644 index 1b88f26cc1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaSpecFluentImpl.java +++ /dev/null @@ -1,187 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import io.kubernetes.client.custom.Quantity; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ResourceQuotaSpecFluentImpl> extends BaseFluent implements V1ResourceQuotaSpecFluent{ - public V1ResourceQuotaSpecFluentImpl() { - } - public V1ResourceQuotaSpecFluentImpl(V1ResourceQuotaSpec instance) { - if (instance != null) { - this.withHard(instance.getHard()); - this.withScopeSelector(instance.getScopeSelector()); - this.withScopes(instance.getScopes()); - } - } - private Map hard; - private V1ScopeSelectorBuilder scopeSelector; - private List scopes; - public A addToHard(String key,Quantity value) { - if(this.hard == null && key != null && value != null) { this.hard = new LinkedHashMap(); } - if(key != null && value != null) {this.hard.put(key, value);} return (A)this; - } - public A addToHard(Map map) { - if(this.hard == null && map != null) { this.hard = new LinkedHashMap(); } - if(map != null) { this.hard.putAll(map);} return (A)this; - } - public A removeFromHard(String key) { - if(this.hard == null) { return (A) this; } - if(key != null && this.hard != null) {this.hard.remove(key);} return (A)this; - } - public A removeFromHard(Map map) { - if(this.hard == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.hard != null){this.hard.remove(key);}}} return (A)this; - } - public Map getHard() { - return this.hard; - } - public A withHard(Map hard) { - if (hard == null) { this.hard = null;} else {this.hard = new LinkedHashMap(hard);} return (A) this; - } - public Boolean hasHard() { - return this.hard != null; - } - - /** - * This method has been deprecated, please use method buildScopeSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1ScopeSelector getScopeSelector() { - return this.scopeSelector!=null ?this.scopeSelector.build():null; - } - public V1ScopeSelector buildScopeSelector() { - return this.scopeSelector!=null ?this.scopeSelector.build():null; - } - public A withScopeSelector(V1ScopeSelector scopeSelector) { - _visitables.get("scopeSelector").remove(this.scopeSelector); - if (scopeSelector!=null){ this.scopeSelector= new V1ScopeSelectorBuilder(scopeSelector); _visitables.get("scopeSelector").add(this.scopeSelector);} else { this.scopeSelector = null; _visitables.get("scopeSelector").remove(this.scopeSelector); } return (A) this; - } - public Boolean hasScopeSelector() { - return this.scopeSelector != null; - } - public V1ResourceQuotaSpecFluentImpl.ScopeSelectorNested withNewScopeSelector() { - return new V1ResourceQuotaSpecFluentImpl.ScopeSelectorNestedImpl(); - } - public V1ResourceQuotaSpecFluentImpl.ScopeSelectorNested withNewScopeSelectorLike(V1ScopeSelector item) { - return new V1ResourceQuotaSpecFluentImpl.ScopeSelectorNestedImpl(item); - } - public V1ResourceQuotaSpecFluentImpl.ScopeSelectorNested editScopeSelector() { - return withNewScopeSelectorLike(getScopeSelector()); - } - public V1ResourceQuotaSpecFluentImpl.ScopeSelectorNested editOrNewScopeSelector() { - return withNewScopeSelectorLike(getScopeSelector() != null ? getScopeSelector(): new V1ScopeSelectorBuilder().build()); - } - public V1ResourceQuotaSpecFluentImpl.ScopeSelectorNested editOrNewScopeSelectorLike(V1ScopeSelector item) { - return withNewScopeSelectorLike(getScopeSelector() != null ? getScopeSelector(): item); - } - public A addToScopes(int index,String item) { - if (this.scopes == null) {this.scopes = new ArrayList();} - this.scopes.add(index, item); - return (A)this; - } - public A setToScopes(int index,String item) { - if (this.scopes == null) {this.scopes = new ArrayList();} - this.scopes.set(index, item); return (A)this; - } - public A addToScopes(java.lang.String... items) { - if (this.scopes == null) {this.scopes = new ArrayList();} - for (String item : items) {this.scopes.add(item);} return (A)this; - } - public A addAllToScopes(Collection items) { - if (this.scopes == null) {this.scopes = new ArrayList();} - for (String item : items) {this.scopes.add(item);} return (A)this; - } - public A removeFromScopes(java.lang.String... items) { - for (String item : items) {if (this.scopes!= null){ this.scopes.remove(item);}} return (A)this; - } - public A removeAllFromScopes(Collection items) { - for (String item : items) {if (this.scopes!= null){ this.scopes.remove(item);}} return (A)this; - } - public List getScopes() { - return this.scopes; - } - public String getScope(int index) { - return this.scopes.get(index); - } - public String getFirstScope() { - return this.scopes.get(0); - } - public String getLastScope() { - return this.scopes.get(scopes.size() - 1); - } - public String getMatchingScope(Predicate predicate) { - for (String item: scopes) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingScope(Predicate predicate) { - for (String item: scopes) { if(predicate.test(item)){ return true;} } return false; - } - public A withScopes(List scopes) { - if (scopes != null) {this.scopes = new ArrayList(); for (String item : scopes){this.addToScopes(item);}} else { this.scopes = null;} return (A) this; - } - public A withScopes(java.lang.String... scopes) { - if (this.scopes != null) {this.scopes.clear(); _visitables.remove("scopes"); } - if (scopes != null) {for (String item :scopes){ this.addToScopes(item);}} return (A) this; - } - public Boolean hasScopes() { - return scopes != null && !scopes.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ResourceQuotaSpecFluentImpl that = (V1ResourceQuotaSpecFluentImpl) o; - if (!java.util.Objects.equals(hard, that.hard)) return false; - - if (!java.util.Objects.equals(scopeSelector, that.scopeSelector)) return false; - - if (!java.util.Objects.equals(scopes, that.scopes)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(hard, scopeSelector, scopes, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (hard != null && !hard.isEmpty()) { sb.append("hard:"); sb.append(hard + ","); } - if (scopeSelector != null) { sb.append("scopeSelector:"); sb.append(scopeSelector + ","); } - if (scopes != null && !scopes.isEmpty()) { sb.append("scopes:"); sb.append(scopes); } - sb.append("}"); - return sb.toString(); - } - class ScopeSelectorNestedImpl extends V1ScopeSelectorFluentImpl> implements V1ResourceQuotaSpecFluentImpl.ScopeSelectorNested,Nested{ - ScopeSelectorNestedImpl(V1ScopeSelector item) { - this.builder = new V1ScopeSelectorBuilder(this, item); - } - ScopeSelectorNestedImpl() { - this.builder = new V1ScopeSelectorBuilder(this); - } - V1ScopeSelectorBuilder builder; - public N and() { - return (N) V1ResourceQuotaSpecFluentImpl.this.withScopeSelector(builder.build()); - } - public N endScopeSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusBuilder.java index e08976fe75..300a780578 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ResourceQuotaStatusBuilder extends V1ResourceQuotaStatusFluentImpl implements VisitableBuilder{ +public class V1ResourceQuotaStatusBuilder extends V1ResourceQuotaStatusFluent implements VisitableBuilder{ public V1ResourceQuotaStatusBuilder() { - this(false); - } - public V1ResourceQuotaStatusBuilder(Boolean validationEnabled) { - this(new V1ResourceQuotaStatus(), validationEnabled); + this(new V1ResourceQuotaStatus()); } + public V1ResourceQuotaStatusBuilder(V1ResourceQuotaStatusFluent fluent) { - this(fluent, false); - } - public V1ResourceQuotaStatusBuilder(V1ResourceQuotaStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ResourceQuotaStatus(), validationEnabled); + this(fluent, new V1ResourceQuotaStatus()); } + public V1ResourceQuotaStatusBuilder(V1ResourceQuotaStatusFluent fluent,V1ResourceQuotaStatus instance) { - this(fluent, instance, false); - } - public V1ResourceQuotaStatusBuilder(V1ResourceQuotaStatusFluent fluent,V1ResourceQuotaStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHard(instance.getHard()); - fluent.withUsed(instance.getUsed()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ResourceQuotaStatusBuilder(V1ResourceQuotaStatus instance) { - this(instance,false); - } - public V1ResourceQuotaStatusBuilder(V1ResourceQuotaStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHard(instance.getHard()); - this.withUsed(instance.getUsed()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ResourceQuotaStatusFluent fluent; - Boolean validationEnabled; + public V1ResourceQuotaStatus build() { V1ResourceQuotaStatus buildable = new V1ResourceQuotaStatus(); buildable.setHard(fluent.getHard()); @@ -46,4 +28,5 @@ public V1ResourceQuotaStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusFluent.java index cae9f32330..29f673841e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusFluent.java @@ -1,30 +1,131 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.custom.Quantity; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; import java.util.Map; import java.util.LinkedHashMap; - /** - * Generated - */ -public interface V1ResourceQuotaStatusFluent> extends Fluent{ - public A addToHard(String key,Quantity value); - public A addToHard(Map map); - public A removeFromHard(String key); - public A removeFromHard(Map map); - public Map getHard(); - public A withHard(Map hard); - public Boolean hasHard(); - public A addToUsed(String key,Quantity value); - public A addToUsed(Map map); - public A removeFromUsed(String key); - public A removeFromUsed(Map map); - public Map getUsed(); - public A withUsed(Map used); - public Boolean hasUsed(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ResourceQuotaStatusFluent> extends BaseFluent{ + public V1ResourceQuotaStatusFluent() { + } + public V1ResourceQuotaStatusFluent(V1ResourceQuotaStatus instance) { + this.copyInstance(instance); + } + private Map hard; + private Map used; + + protected void copyInstance(V1ResourceQuotaStatus instance) { + instance = (instance != null ? instance : new V1ResourceQuotaStatus()); + if (instance != null) { + this.withHard(instance.getHard()); + this.withUsed(instance.getUsed()); + } + } + + public A addToHard(String key,Quantity value) { + if(this.hard == null && key != null && value != null) { this.hard = new LinkedHashMap(); } + if(key != null && value != null) {this.hard.put(key, value);} return (A)this; + } + + public A addToHard(Map map) { + if(this.hard == null && map != null) { this.hard = new LinkedHashMap(); } + if(map != null) { this.hard.putAll(map);} return (A)this; + } + + public A removeFromHard(String key) { + if(this.hard == null) { return (A) this; } + if(key != null && this.hard != null) {this.hard.remove(key);} return (A)this; + } + + public A removeFromHard(Map map) { + if(this.hard == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.hard != null){this.hard.remove(key);}}} return (A)this; + } + + public Map getHard() { + return this.hard; + } + + public A withHard(Map hard) { + if (hard == null) { + this.hard = null; + } else { + this.hard = new LinkedHashMap(hard); + } + return (A) this; + } + + public boolean hasHard() { + return this.hard != null; + } + + public A addToUsed(String key,Quantity value) { + if(this.used == null && key != null && value != null) { this.used = new LinkedHashMap(); } + if(key != null && value != null) {this.used.put(key, value);} return (A)this; + } + + public A addToUsed(Map map) { + if(this.used == null && map != null) { this.used = new LinkedHashMap(); } + if(map != null) { this.used.putAll(map);} return (A)this; + } + + public A removeFromUsed(String key) { + if(this.used == null) { return (A) this; } + if(key != null && this.used != null) {this.used.remove(key);} return (A)this; + } + + public A removeFromUsed(Map map) { + if(this.used == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.used != null){this.used.remove(key);}}} return (A)this; + } + + public Map getUsed() { + return this.used; + } + + public A withUsed(Map used) { + if (used == null) { + this.used = null; + } else { + this.used = new LinkedHashMap(used); + } + return (A) this; + } + + public boolean hasUsed() { + return this.used != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ResourceQuotaStatusFluent that = (V1ResourceQuotaStatusFluent) o; + if (!java.util.Objects.equals(hard, that.hard)) return false; + if (!java.util.Objects.equals(used, that.used)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(hard, used, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (hard != null && !hard.isEmpty()) { sb.append("hard:"); sb.append(hard + ","); } + if (used != null && !used.isEmpty()) { sb.append("used:"); sb.append(used); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusFluentImpl.java deleted file mode 100644 index 3b9505c92b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceQuotaStatusFluentImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import io.kubernetes.client.custom.Quantity; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; -import java.util.Map; -import java.util.LinkedHashMap; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ResourceQuotaStatusFluentImpl> extends BaseFluent implements V1ResourceQuotaStatusFluent{ - public V1ResourceQuotaStatusFluentImpl() { - } - public V1ResourceQuotaStatusFluentImpl(V1ResourceQuotaStatus instance) { - if (instance != null) { - this.withHard(instance.getHard()); - this.withUsed(instance.getUsed()); - } - } - private Map hard; - private Map used; - public A addToHard(String key,Quantity value) { - if(this.hard == null && key != null && value != null) { this.hard = new LinkedHashMap(); } - if(key != null && value != null) {this.hard.put(key, value);} return (A)this; - } - public A addToHard(Map map) { - if(this.hard == null && map != null) { this.hard = new LinkedHashMap(); } - if(map != null) { this.hard.putAll(map);} return (A)this; - } - public A removeFromHard(String key) { - if(this.hard == null) { return (A) this; } - if(key != null && this.hard != null) {this.hard.remove(key);} return (A)this; - } - public A removeFromHard(Map map) { - if(this.hard == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.hard != null){this.hard.remove(key);}}} return (A)this; - } - public Map getHard() { - return this.hard; - } - public A withHard(Map hard) { - if (hard == null) { this.hard = null;} else {this.hard = new LinkedHashMap(hard);} return (A) this; - } - public Boolean hasHard() { - return this.hard != null; - } - public A addToUsed(String key,Quantity value) { - if(this.used == null && key != null && value != null) { this.used = new LinkedHashMap(); } - if(key != null && value != null) {this.used.put(key, value);} return (A)this; - } - public A addToUsed(Map map) { - if(this.used == null && map != null) { this.used = new LinkedHashMap(); } - if(map != null) { this.used.putAll(map);} return (A)this; - } - public A removeFromUsed(String key) { - if(this.used == null) { return (A) this; } - if(key != null && this.used != null) {this.used.remove(key);} return (A)this; - } - public A removeFromUsed(Map map) { - if(this.used == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.used != null){this.used.remove(key);}}} return (A)this; - } - public Map getUsed() { - return this.used; - } - public A withUsed(Map used) { - if (used == null) { this.used = null;} else {this.used = new LinkedHashMap(used);} return (A) this; - } - public Boolean hasUsed() { - return this.used != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ResourceQuotaStatusFluentImpl that = (V1ResourceQuotaStatusFluentImpl) o; - if (!java.util.Objects.equals(hard, that.hard)) return false; - - if (!java.util.Objects.equals(used, that.used)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(hard, used, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (hard != null && !hard.isEmpty()) { sb.append("hard:"); sb.append(hard + ","); } - if (used != null && !used.isEmpty()) { sb.append("used:"); sb.append(used); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsBuilder.java index 6228805661..ac2778937a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ResourceRequirementsBuilder extends V1ResourceRequirementsFluentImpl implements VisitableBuilder{ +public class V1ResourceRequirementsBuilder extends V1ResourceRequirementsFluent implements VisitableBuilder{ public V1ResourceRequirementsBuilder() { - this(false); - } - public V1ResourceRequirementsBuilder(Boolean validationEnabled) { - this(new V1ResourceRequirements(), validationEnabled); + this(new V1ResourceRequirements()); } + public V1ResourceRequirementsBuilder(V1ResourceRequirementsFluent fluent) { - this(fluent, false); - } - public V1ResourceRequirementsBuilder(V1ResourceRequirementsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ResourceRequirements(), validationEnabled); + this(fluent, new V1ResourceRequirements()); } + public V1ResourceRequirementsBuilder(V1ResourceRequirementsFluent fluent,V1ResourceRequirements instance) { - this(fluent, instance, false); - } - public V1ResourceRequirementsBuilder(V1ResourceRequirementsFluent fluent,V1ResourceRequirements instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withClaims(instance.getClaims()); - fluent.withLimits(instance.getLimits()); - fluent.withRequests(instance.getRequests()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ResourceRequirementsBuilder(V1ResourceRequirements instance) { - this(instance,false); - } - public V1ResourceRequirementsBuilder(V1ResourceRequirements instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withClaims(instance.getClaims()); - this.withLimits(instance.getLimits()); - this.withRequests(instance.getRequests()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ResourceRequirementsFluent fluent; - Boolean validationEnabled; + public V1ResourceRequirements build() { V1ResourceRequirements buildable = new V1ResourceRequirements(); - buildable.setClaims(fluent.getClaims()); + buildable.setClaims(fluent.buildClaims()); buildable.setLimits(fluent.getLimits()); buildable.setRequests(fluent.getRequests()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsFluent.java index fa16bb05c4..e634f57fed 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsFluent.java @@ -1,73 +1,310 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import io.kubernetes.client.custom.Quantity; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1ResourceRequirementsFluent> extends Fluent{ - public A addToClaims(int index,V1ResourceClaim item); - public A setToClaims(int index,V1ResourceClaim item); - public A addToClaims(io.kubernetes.client.openapi.models.V1ResourceClaim... items); - public A addAllToClaims(Collection items); - public A removeFromClaims(io.kubernetes.client.openapi.models.V1ResourceClaim... items); - public A removeAllFromClaims(Collection items); - public A removeMatchingFromClaims(Predicate predicate); - - /** - * This method has been deprecated, please use method buildClaims instead. - * @return The buildable object. - */ - @Deprecated - public List getClaims(); - public List buildClaims(); - public V1ResourceClaim buildClaim(int index); - public V1ResourceClaim buildFirstClaim(); - public V1ResourceClaim buildLastClaim(); - public V1ResourceClaim buildMatchingClaim(Predicate predicate); - public Boolean hasMatchingClaim(Predicate predicate); - public A withClaims(List claims); - public A withClaims(io.kubernetes.client.openapi.models.V1ResourceClaim... claims); - public Boolean hasClaims(); - public V1ResourceRequirementsFluent.ClaimsNested addNewClaim(); - public V1ResourceRequirementsFluent.ClaimsNested addNewClaimLike(V1ResourceClaim item); - public V1ResourceRequirementsFluent.ClaimsNested setNewClaimLike(int index,V1ResourceClaim item); - public V1ResourceRequirementsFluent.ClaimsNested editClaim(int index); - public V1ResourceRequirementsFluent.ClaimsNested editFirstClaim(); - public V1ResourceRequirementsFluent.ClaimsNested editLastClaim(); - public V1ResourceRequirementsFluent.ClaimsNested editMatchingClaim(Predicate predicate); - public A addToLimits(String key,Quantity value); - public A addToLimits(Map map); - public A removeFromLimits(String key); - public A removeFromLimits(Map map); - public Map getLimits(); - public A withLimits(Map limits); - public Boolean hasLimits(); - public A addToRequests(String key,Quantity value); - public A addToRequests(Map map); - public A removeFromRequests(String key); - public A removeFromRequests(Map map); - public Map getRequests(); - public A withRequests(Map requests); - public Boolean hasRequests(); - public interface ClaimsNested extends Nested,V1ResourceClaimFluent>{ - public N and(); - public N endClaim(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ResourceRequirementsFluent> extends BaseFluent{ + public V1ResourceRequirementsFluent() { + } + + public V1ResourceRequirementsFluent(V1ResourceRequirements instance) { + this.copyInstance(instance); + } + private ArrayList claims; + private Map limits; + private Map requests; + + protected void copyInstance(V1ResourceRequirements instance) { + instance = (instance != null ? instance : new V1ResourceRequirements()); + if (instance != null) { + this.withClaims(instance.getClaims()); + this.withLimits(instance.getLimits()); + this.withRequests(instance.getRequests()); + } + } + + public A addToClaims(int index,V1ResourceClaim item) { + if (this.claims == null) {this.claims = new ArrayList();} + V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item); + if (index < 0 || index >= claims.size()) { _visitables.get("claims").add(builder); claims.add(builder); } else { _visitables.get("claims").add(index, builder); claims.add(index, builder);} + return (A)this; + } + + public A setToClaims(int index,V1ResourceClaim item) { + if (this.claims == null) {this.claims = new ArrayList();} + V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item); + if (index < 0 || index >= claims.size()) { _visitables.get("claims").add(builder); claims.add(builder); } else { _visitables.get("claims").set(index, builder); claims.set(index, builder);} + return (A)this; + } + + public A addToClaims(io.kubernetes.client.openapi.models.V1ResourceClaim... items) { + if (this.claims == null) {this.claims = new ArrayList();} + for (V1ResourceClaim item : items) {V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item);_visitables.get("claims").add(builder);this.claims.add(builder);} return (A)this; + } + + public A addAllToClaims(Collection items) { + if (this.claims == null) {this.claims = new ArrayList();} + for (V1ResourceClaim item : items) {V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item);_visitables.get("claims").add(builder);this.claims.add(builder);} return (A)this; + } + + public A removeFromClaims(io.kubernetes.client.openapi.models.V1ResourceClaim... items) { + if (this.claims == null) return (A)this; + for (V1ResourceClaim item : items) {V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item);_visitables.get("claims").remove(builder); this.claims.remove(builder);} return (A)this; + } + + public A removeAllFromClaims(Collection items) { + if (this.claims == null) return (A)this; + for (V1ResourceClaim item : items) {V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item);_visitables.get("claims").remove(builder); this.claims.remove(builder);} return (A)this; + } + + public A removeMatchingFromClaims(Predicate predicate) { + if (claims == null) return (A) this; + final Iterator each = claims.iterator(); + final List visitables = _visitables.get("claims"); + while (each.hasNext()) { + V1ResourceClaimBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildClaims() { + return this.claims != null ? build(claims) : null; + } + + public V1ResourceClaim buildClaim(int index) { + return this.claims.get(index).build(); + } + + public V1ResourceClaim buildFirstClaim() { + return this.claims.get(0).build(); + } + + public V1ResourceClaim buildLastClaim() { + return this.claims.get(claims.size() - 1).build(); + } + + public V1ResourceClaim buildMatchingClaim(Predicate predicate) { + for (V1ResourceClaimBuilder item : claims) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingClaim(Predicate predicate) { + for (V1ResourceClaimBuilder item : claims) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withClaims(List claims) { + if (this.claims != null) { + this._visitables.get("claims").clear(); + } + if (claims != null) { + this.claims = new ArrayList(); + for (V1ResourceClaim item : claims) { + this.addToClaims(item); + } + } else { + this.claims = null; + } + return (A) this; + } + + public A withClaims(io.kubernetes.client.openapi.models.V1ResourceClaim... claims) { + if (this.claims != null) { + this.claims.clear(); + _visitables.remove("claims"); + } + if (claims != null) { + for (V1ResourceClaim item : claims) { + this.addToClaims(item); + } + } + return (A) this; + } + + public boolean hasClaims() { + return this.claims != null && !this.claims.isEmpty(); + } + + public ClaimsNested addNewClaim() { + return new ClaimsNested(-1, null); + } + + public ClaimsNested addNewClaimLike(V1ResourceClaim item) { + return new ClaimsNested(-1, item); + } + + public ClaimsNested setNewClaimLike(int index,V1ResourceClaim item) { + return new ClaimsNested(index, item); + } + + public ClaimsNested editClaim(int index) { + if (claims.size() <= index) throw new RuntimeException("Can't edit claims. Index exceeds size."); + return setNewClaimLike(index, buildClaim(index)); } + public ClaimsNested editFirstClaim() { + if (claims.size() == 0) throw new RuntimeException("Can't edit first claims. The list is empty."); + return setNewClaimLike(0, buildClaim(0)); + } + + public ClaimsNested editLastClaim() { + int index = claims.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last claims. The list is empty."); + return setNewClaimLike(index, buildClaim(index)); + } + + public ClaimsNested editMatchingClaim(Predicate predicate) { + int index = -1; + for (int i=0;i map) { + if(this.limits == null && map != null) { this.limits = new LinkedHashMap(); } + if(map != null) { this.limits.putAll(map);} return (A)this; + } + + public A removeFromLimits(String key) { + if(this.limits == null) { return (A) this; } + if(key != null && this.limits != null) {this.limits.remove(key);} return (A)this; + } + + public A removeFromLimits(Map map) { + if(this.limits == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.limits != null){this.limits.remove(key);}}} return (A)this; + } + + public Map getLimits() { + return this.limits; + } + + public A withLimits(Map limits) { + if (limits == null) { + this.limits = null; + } else { + this.limits = new LinkedHashMap(limits); + } + return (A) this; + } + + public boolean hasLimits() { + return this.limits != null; + } + + public A addToRequests(String key,Quantity value) { + if(this.requests == null && key != null && value != null) { this.requests = new LinkedHashMap(); } + if(key != null && value != null) {this.requests.put(key, value);} return (A)this; + } + + public A addToRequests(Map map) { + if(this.requests == null && map != null) { this.requests = new LinkedHashMap(); } + if(map != null) { this.requests.putAll(map);} return (A)this; + } + + public A removeFromRequests(String key) { + if(this.requests == null) { return (A) this; } + if(key != null && this.requests != null) {this.requests.remove(key);} return (A)this; + } + + public A removeFromRequests(Map map) { + if(this.requests == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.requests != null){this.requests.remove(key);}}} return (A)this; + } + + public Map getRequests() { + return this.requests; + } + + public A withRequests(Map requests) { + if (requests == null) { + this.requests = null; + } else { + this.requests = new LinkedHashMap(requests); + } + return (A) this; + } + + public boolean hasRequests() { + return this.requests != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ResourceRequirementsFluent that = (V1ResourceRequirementsFluent) o; + if (!java.util.Objects.equals(claims, that.claims)) return false; + if (!java.util.Objects.equals(limits, that.limits)) return false; + if (!java.util.Objects.equals(requests, that.requests)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(claims, limits, requests, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (claims != null && !claims.isEmpty()) { sb.append("claims:"); sb.append(claims + ","); } + if (limits != null && !limits.isEmpty()) { sb.append("limits:"); sb.append(limits + ","); } + if (requests != null && !requests.isEmpty()) { sb.append("requests:"); sb.append(requests); } + sb.append("}"); + return sb.toString(); + } + public class ClaimsNested extends V1ResourceClaimFluent> implements Nested{ + ClaimsNested(int index,V1ResourceClaim item) { + this.index = index; + this.builder = new V1ResourceClaimBuilder(this, item); + } + V1ResourceClaimBuilder builder; + int index; + + public N and() { + return (N) V1ResourceRequirementsFluent.this.setToClaims(index,builder.build()); + } + + public N endClaim() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsFluentImpl.java deleted file mode 100644 index 08a28678ca..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRequirementsFluentImpl.java +++ /dev/null @@ -1,239 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import io.kubernetes.client.custom.Quantity; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ResourceRequirementsFluentImpl> extends BaseFluent implements V1ResourceRequirementsFluent{ - public V1ResourceRequirementsFluentImpl() { - } - public V1ResourceRequirementsFluentImpl(V1ResourceRequirements instance) { - if (instance != null) { - this.withClaims(instance.getClaims()); - this.withLimits(instance.getLimits()); - this.withRequests(instance.getRequests()); - } - } - private ArrayList claims; - private Map limits; - private Map requests; - public A addToClaims(int index,V1ResourceClaim item) { - if (this.claims == null) {this.claims = new ArrayList();} - V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item); - if (index < 0 || index >= claims.size()) { _visitables.get("claims").add(builder); claims.add(builder); } else { _visitables.get("claims").add(index, builder); claims.add(index, builder);} - return (A)this; - } - public A setToClaims(int index,V1ResourceClaim item) { - if (this.claims == null) {this.claims = new ArrayList();} - V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item); - if (index < 0 || index >= claims.size()) { _visitables.get("claims").add(builder); claims.add(builder); } else { _visitables.get("claims").set(index, builder); claims.set(index, builder);} - return (A)this; - } - public A addToClaims(io.kubernetes.client.openapi.models.V1ResourceClaim... items) { - if (this.claims == null) {this.claims = new ArrayList();} - for (V1ResourceClaim item : items) {V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item);_visitables.get("claims").add(builder);this.claims.add(builder);} return (A)this; - } - public A addAllToClaims(Collection items) { - if (this.claims == null) {this.claims = new ArrayList();} - for (V1ResourceClaim item : items) {V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item);_visitables.get("claims").add(builder);this.claims.add(builder);} return (A)this; - } - public A removeFromClaims(io.kubernetes.client.openapi.models.V1ResourceClaim... items) { - for (V1ResourceClaim item : items) {V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item);_visitables.get("claims").remove(builder);if (this.claims != null) {this.claims.remove(builder);}} return (A)this; - } - public A removeAllFromClaims(Collection items) { - for (V1ResourceClaim item : items) {V1ResourceClaimBuilder builder = new V1ResourceClaimBuilder(item);_visitables.get("claims").remove(builder);if (this.claims != null) {this.claims.remove(builder);}} return (A)this; - } - public A removeMatchingFromClaims(Predicate predicate) { - if (claims == null) return (A) this; - final Iterator each = claims.iterator(); - final List visitables = _visitables.get("claims"); - while (each.hasNext()) { - V1ResourceClaimBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildClaims instead. - * @return The buildable object. - */ - @Deprecated - public List getClaims() { - return claims != null ? build(claims) : null; - } - public List buildClaims() { - return claims != null ? build(claims) : null; - } - public V1ResourceClaim buildClaim(int index) { - return this.claims.get(index).build(); - } - public V1ResourceClaim buildFirstClaim() { - return this.claims.get(0).build(); - } - public V1ResourceClaim buildLastClaim() { - return this.claims.get(claims.size() - 1).build(); - } - public V1ResourceClaim buildMatchingClaim(Predicate predicate) { - for (V1ResourceClaimBuilder item: claims) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingClaim(Predicate predicate) { - for (V1ResourceClaimBuilder item: claims) { if(predicate.test(item)){ return true;} } return false; - } - public A withClaims(List claims) { - if (this.claims != null) { _visitables.get("claims").clear();} - if (claims != null) {this.claims = new ArrayList(); for (V1ResourceClaim item : claims){this.addToClaims(item);}} else { this.claims = null;} return (A) this; - } - public A withClaims(io.kubernetes.client.openapi.models.V1ResourceClaim... claims) { - if (this.claims != null) {this.claims.clear(); _visitables.remove("claims"); } - if (claims != null) {for (V1ResourceClaim item :claims){ this.addToClaims(item);}} return (A) this; - } - public Boolean hasClaims() { - return claims != null && !claims.isEmpty(); - } - public V1ResourceRequirementsFluentImpl.ClaimsNested addNewClaim() { - return new V1ResourceRequirementsFluentImpl.ClaimsNestedImpl(); - } - public V1ResourceRequirementsFluentImpl.ClaimsNested addNewClaimLike(V1ResourceClaim item) { - return new V1ResourceRequirementsFluentImpl.ClaimsNestedImpl(-1, item); - } - public V1ResourceRequirementsFluentImpl.ClaimsNested setNewClaimLike(int index,V1ResourceClaim item) { - return new V1ResourceRequirementsFluentImpl.ClaimsNestedImpl(index, item); - } - public V1ResourceRequirementsFluentImpl.ClaimsNested editClaim(int index) { - if (claims.size() <= index) throw new RuntimeException("Can't edit claims. Index exceeds size."); - return setNewClaimLike(index, buildClaim(index)); - } - public V1ResourceRequirementsFluentImpl.ClaimsNested editFirstClaim() { - if (claims.size() == 0) throw new RuntimeException("Can't edit first claims. The list is empty."); - return setNewClaimLike(0, buildClaim(0)); - } - public V1ResourceRequirementsFluentImpl.ClaimsNested editLastClaim() { - int index = claims.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last claims. The list is empty."); - return setNewClaimLike(index, buildClaim(index)); - } - public V1ResourceRequirementsFluentImpl.ClaimsNested editMatchingClaim(Predicate predicate) { - int index = -1; - for (int i=0;i map) { - if(this.limits == null && map != null) { this.limits = new LinkedHashMap(); } - if(map != null) { this.limits.putAll(map);} return (A)this; - } - public A removeFromLimits(String key) { - if(this.limits == null) { return (A) this; } - if(key != null && this.limits != null) {this.limits.remove(key);} return (A)this; - } - public A removeFromLimits(Map map) { - if(this.limits == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.limits != null){this.limits.remove(key);}}} return (A)this; - } - public Map getLimits() { - return this.limits; - } - public A withLimits(Map limits) { - if (limits == null) { this.limits = null;} else {this.limits = new LinkedHashMap(limits);} return (A) this; - } - public Boolean hasLimits() { - return this.limits != null; - } - public A addToRequests(String key,Quantity value) { - if(this.requests == null && key != null && value != null) { this.requests = new LinkedHashMap(); } - if(key != null && value != null) {this.requests.put(key, value);} return (A)this; - } - public A addToRequests(Map map) { - if(this.requests == null && map != null) { this.requests = new LinkedHashMap(); } - if(map != null) { this.requests.putAll(map);} return (A)this; - } - public A removeFromRequests(String key) { - if(this.requests == null) { return (A) this; } - if(key != null && this.requests != null) {this.requests.remove(key);} return (A)this; - } - public A removeFromRequests(Map map) { - if(this.requests == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.requests != null){this.requests.remove(key);}}} return (A)this; - } - public Map getRequests() { - return this.requests; - } - public A withRequests(Map requests) { - if (requests == null) { this.requests = null;} else {this.requests = new LinkedHashMap(requests);} return (A) this; - } - public Boolean hasRequests() { - return this.requests != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ResourceRequirementsFluentImpl that = (V1ResourceRequirementsFluentImpl) o; - if (!java.util.Objects.equals(claims, that.claims)) return false; - - if (!java.util.Objects.equals(limits, that.limits)) return false; - - if (!java.util.Objects.equals(requests, that.requests)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(claims, limits, requests, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (claims != null) { sb.append("claims:"); sb.append(claims + ","); } - if (limits != null && !limits.isEmpty()) { sb.append("limits:"); sb.append(limits + ","); } - if (requests != null && !requests.isEmpty()) { sb.append("requests:"); sb.append(requests); } - sb.append("}"); - return sb.toString(); - } - class ClaimsNestedImpl extends V1ResourceClaimFluentImpl> implements V1ResourceRequirementsFluentImpl.ClaimsNested,Nested{ - ClaimsNestedImpl(int index,V1ResourceClaim item) { - this.index = index; - this.builder = new V1ResourceClaimBuilder(this, item); - } - ClaimsNestedImpl() { - this.index = -1; - this.builder = new V1ResourceClaimBuilder(this); - } - V1ResourceClaimBuilder builder; - int index; - public N and() { - return (N) V1ResourceRequirementsFluentImpl.this.setToClaims(index,builder.build()); - } - public N endClaim() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleBuilder.java index 01c8ea3fba..3c8a999f6c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ResourceRuleBuilder extends V1ResourceRuleFluentImpl implements VisitableBuilder{ +public class V1ResourceRuleBuilder extends V1ResourceRuleFluent implements VisitableBuilder{ public V1ResourceRuleBuilder() { - this(false); - } - public V1ResourceRuleBuilder(Boolean validationEnabled) { - this(new V1ResourceRule(), validationEnabled); + this(new V1ResourceRule()); } + public V1ResourceRuleBuilder(V1ResourceRuleFluent fluent) { - this(fluent, false); - } - public V1ResourceRuleBuilder(V1ResourceRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ResourceRule(), validationEnabled); + this(fluent, new V1ResourceRule()); } + public V1ResourceRuleBuilder(V1ResourceRuleFluent fluent,V1ResourceRule instance) { - this(fluent, instance, false); - } - public V1ResourceRuleBuilder(V1ResourceRuleFluent fluent,V1ResourceRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroups(instance.getApiGroups()); - fluent.withResourceNames(instance.getResourceNames()); - fluent.withResources(instance.getResources()); - fluent.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ResourceRuleBuilder(V1ResourceRule instance) { - this(instance,false); - } - public V1ResourceRuleBuilder(V1ResourceRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withResourceNames(instance.getResourceNames()); - this.withResources(instance.getResources()); - this.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ResourceRuleFluent fluent; - Boolean validationEnabled; + public V1ResourceRule build() { V1ResourceRule buildable = new V1ResourceRule(); buildable.setApiGroups(fluent.getApiGroups()); @@ -52,4 +30,5 @@ public V1ResourceRule build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleFluent.java index 1d567f0872..fa3711d9af 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleFluent.java @@ -1,77 +1,442 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1ResourceRuleFluent> extends Fluent{ - public A addToApiGroups(int index,String item); - public A setToApiGroups(int index,String item); - public A addToApiGroups(java.lang.String... items); - public A addAllToApiGroups(Collection items); - public A removeFromApiGroups(java.lang.String... items); - public A removeAllFromApiGroups(Collection items); - public List getApiGroups(); - public String getApiGroup(int index); - public String getFirstApiGroup(); - public String getLastApiGroup(); - public String getMatchingApiGroup(Predicate predicate); - public Boolean hasMatchingApiGroup(Predicate predicate); - public A withApiGroups(List apiGroups); - public A withApiGroups(java.lang.String... apiGroups); - public Boolean hasApiGroups(); - public A addToResourceNames(int index,String item); - public A setToResourceNames(int index,String item); - public A addToResourceNames(java.lang.String... items); - public A addAllToResourceNames(Collection items); - public A removeFromResourceNames(java.lang.String... items); - public A removeAllFromResourceNames(Collection items); - public List getResourceNames(); - public String getResourceName(int index); - public String getFirstResourceName(); - public String getLastResourceName(); - public String getMatchingResourceName(Predicate predicate); - public Boolean hasMatchingResourceName(Predicate predicate); - public A withResourceNames(List resourceNames); - public A withResourceNames(java.lang.String... resourceNames); - public Boolean hasResourceNames(); - public A addToResources(int index,String item); - public A setToResources(int index,String item); - public A addToResources(java.lang.String... items); - public A addAllToResources(Collection items); - public A removeFromResources(java.lang.String... items); - public A removeAllFromResources(Collection items); - public List getResources(); - public String getResource(int index); - public String getFirstResource(); - public String getLastResource(); - public String getMatchingResource(Predicate predicate); - public Boolean hasMatchingResource(Predicate predicate); - public A withResources(List resources); - public A withResources(java.lang.String... resources); - public Boolean hasResources(); - public A addToVerbs(int index,String item); - public A setToVerbs(int index,String item); - public A addToVerbs(java.lang.String... items); - public A addAllToVerbs(Collection items); - public A removeFromVerbs(java.lang.String... items); - public A removeAllFromVerbs(Collection items); - public List getVerbs(); - public String getVerb(int index); - public String getFirstVerb(); - public String getLastVerb(); - public String getMatchingVerb(Predicate predicate); - public Boolean hasMatchingVerb(Predicate predicate); - public A withVerbs(List verbs); - public A withVerbs(java.lang.String... verbs); - public Boolean hasVerbs(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ResourceRuleFluent> extends BaseFluent{ + public V1ResourceRuleFluent() { + } + public V1ResourceRuleFluent(V1ResourceRule instance) { + this.copyInstance(instance); + } + private List apiGroups; + private List resourceNames; + private List resources; + private List verbs; + + protected void copyInstance(V1ResourceRule instance) { + instance = (instance != null ? instance : new V1ResourceRule()); + if (instance != null) { + this.withApiGroups(instance.getApiGroups()); + this.withResourceNames(instance.getResourceNames()); + this.withResources(instance.getResources()); + this.withVerbs(instance.getVerbs()); + } + } + + public A addToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.add(index, item); + return (A)this; + } + + public A setToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.set(index, item); return (A)this; + } + + public A addToApiGroups(java.lang.String... items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A addAllToApiGroups(Collection items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A removeFromApiGroups(java.lang.String... items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public A removeAllFromApiGroups(Collection items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public List getApiGroups() { + return this.apiGroups; + } + + public String getApiGroup(int index) { + return this.apiGroups.get(index); + } + + public String getFirstApiGroup() { + return this.apiGroups.get(0); + } + + public String getLastApiGroup() { + return this.apiGroups.get(apiGroups.size() - 1); + } + + public String getMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withApiGroups(List apiGroups) { + if (apiGroups != null) { + this.apiGroups = new ArrayList(); + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } else { + this.apiGroups = null; + } + return (A) this; + } + + public A withApiGroups(java.lang.String... apiGroups) { + if (this.apiGroups != null) { + this.apiGroups.clear(); + _visitables.remove("apiGroups"); + } + if (apiGroups != null) { + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } + return (A) this; + } + + public boolean hasApiGroups() { + return this.apiGroups != null && !this.apiGroups.isEmpty(); + } + + public A addToResourceNames(int index,String item) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + this.resourceNames.add(index, item); + return (A)this; + } + + public A setToResourceNames(int index,String item) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + this.resourceNames.set(index, item); return (A)this; + } + + public A addToResourceNames(java.lang.String... items) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + for (String item : items) {this.resourceNames.add(item);} return (A)this; + } + + public A addAllToResourceNames(Collection items) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + for (String item : items) {this.resourceNames.add(item);} return (A)this; + } + + public A removeFromResourceNames(java.lang.String... items) { + if (this.resourceNames == null) return (A)this; + for (String item : items) { this.resourceNames.remove(item);} return (A)this; + } + + public A removeAllFromResourceNames(Collection items) { + if (this.resourceNames == null) return (A)this; + for (String item : items) { this.resourceNames.remove(item);} return (A)this; + } + + public List getResourceNames() { + return this.resourceNames; + } + + public String getResourceName(int index) { + return this.resourceNames.get(index); + } + + public String getFirstResourceName() { + return this.resourceNames.get(0); + } + + public String getLastResourceName() { + return this.resourceNames.get(resourceNames.size() - 1); + } + + public String getMatchingResourceName(Predicate predicate) { + for (String item : resourceNames) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingResourceName(Predicate predicate) { + for (String item : resourceNames) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceNames(List resourceNames) { + if (resourceNames != null) { + this.resourceNames = new ArrayList(); + for (String item : resourceNames) { + this.addToResourceNames(item); + } + } else { + this.resourceNames = null; + } + return (A) this; + } + + public A withResourceNames(java.lang.String... resourceNames) { + if (this.resourceNames != null) { + this.resourceNames.clear(); + _visitables.remove("resourceNames"); + } + if (resourceNames != null) { + for (String item : resourceNames) { + this.addToResourceNames(item); + } + } + return (A) this; + } + + public boolean hasResourceNames() { + return this.resourceNames != null && !this.resourceNames.isEmpty(); + } + + public A addToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.add(index, item); + return (A)this; + } + + public A setToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.set(index, item); return (A)this; + } + + public A addToResources(java.lang.String... items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A addAllToResources(Collection items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A removeFromResources(java.lang.String... items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public A removeAllFromResources(Collection items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public List getResources() { + return this.resources; + } + + public String getResource(int index) { + return this.resources.get(index); + } + + public String getFirstResource() { + return this.resources.get(0); + } + + public String getLastResource() { + return this.resources.get(resources.size() - 1); + } + + public String getMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResources(List resources) { + if (resources != null) { + this.resources = new ArrayList(); + for (String item : resources) { + this.addToResources(item); + } + } else { + this.resources = null; + } + return (A) this; + } + + public A withResources(java.lang.String... resources) { + if (this.resources != null) { + this.resources.clear(); + _visitables.remove("resources"); + } + if (resources != null) { + for (String item : resources) { + this.addToResources(item); + } + } + return (A) this; + } + + public boolean hasResources() { + return this.resources != null && !this.resources.isEmpty(); + } + + public A addToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.add(index, item); + return (A)this; + } + + public A setToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.set(index, item); return (A)this; + } + + public A addToVerbs(java.lang.String... items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A addAllToVerbs(Collection items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A removeFromVerbs(java.lang.String... items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public A removeAllFromVerbs(Collection items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public List getVerbs() { + return this.verbs; + } + + public String getVerb(int index) { + return this.verbs.get(index); + } + + public String getFirstVerb() { + return this.verbs.get(0); + } + + public String getLastVerb() { + return this.verbs.get(verbs.size() - 1); + } + + public String getMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVerbs(List verbs) { + if (verbs != null) { + this.verbs = new ArrayList(); + for (String item : verbs) { + this.addToVerbs(item); + } + } else { + this.verbs = null; + } + return (A) this; + } + + public A withVerbs(java.lang.String... verbs) { + if (this.verbs != null) { + this.verbs.clear(); + _visitables.remove("verbs"); + } + if (verbs != null) { + for (String item : verbs) { + this.addToVerbs(item); + } + } + return (A) this; + } + + public boolean hasVerbs() { + return this.verbs != null && !this.verbs.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ResourceRuleFluent that = (V1ResourceRuleFluent) o; + if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; + if (!java.util.Objects.equals(resourceNames, that.resourceNames)) return false; + if (!java.util.Objects.equals(resources, that.resources)) return false; + if (!java.util.Objects.equals(verbs, that.verbs)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroups, resourceNames, resources, verbs, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } + if (resourceNames != null && !resourceNames.isEmpty()) { sb.append("resourceNames:"); sb.append(resourceNames + ","); } + if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } + if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleFluentImpl.java deleted file mode 100644 index c312f41872..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ResourceRuleFluentImpl.java +++ /dev/null @@ -1,265 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ResourceRuleFluentImpl> extends BaseFluent implements V1ResourceRuleFluent{ - public V1ResourceRuleFluentImpl() { - } - public V1ResourceRuleFluentImpl(V1ResourceRule instance) { - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withResourceNames(instance.getResourceNames()); - this.withResources(instance.getResources()); - this.withVerbs(instance.getVerbs()); - } - } - private List apiGroups; - private List resourceNames; - private List resources; - private List verbs; - public A addToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.add(index, item); - return (A)this; - } - public A setToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.set(index, item); return (A)this; - } - public A addToApiGroups(java.lang.String... items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A addAllToApiGroups(Collection items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A removeFromApiGroups(java.lang.String... items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public A removeAllFromApiGroups(Collection items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public List getApiGroups() { - return this.apiGroups; - } - public String getApiGroup(int index) { - return this.apiGroups.get(index); - } - public String getFirstApiGroup() { - return this.apiGroups.get(0); - } - public String getLastApiGroup() { - return this.apiGroups.get(apiGroups.size() - 1); - } - public String getMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return true;} } return false; - } - public A withApiGroups(List apiGroups) { - if (apiGroups != null) {this.apiGroups = new ArrayList(); for (String item : apiGroups){this.addToApiGroups(item);}} else { this.apiGroups = null;} return (A) this; - } - public A withApiGroups(java.lang.String... apiGroups) { - if (this.apiGroups != null) {this.apiGroups.clear(); _visitables.remove("apiGroups"); } - if (apiGroups != null) {for (String item :apiGroups){ this.addToApiGroups(item);}} return (A) this; - } - public Boolean hasApiGroups() { - return apiGroups != null && !apiGroups.isEmpty(); - } - public A addToResourceNames(int index,String item) { - if (this.resourceNames == null) {this.resourceNames = new ArrayList();} - this.resourceNames.add(index, item); - return (A)this; - } - public A setToResourceNames(int index,String item) { - if (this.resourceNames == null) {this.resourceNames = new ArrayList();} - this.resourceNames.set(index, item); return (A)this; - } - public A addToResourceNames(java.lang.String... items) { - if (this.resourceNames == null) {this.resourceNames = new ArrayList();} - for (String item : items) {this.resourceNames.add(item);} return (A)this; - } - public A addAllToResourceNames(Collection items) { - if (this.resourceNames == null) {this.resourceNames = new ArrayList();} - for (String item : items) {this.resourceNames.add(item);} return (A)this; - } - public A removeFromResourceNames(java.lang.String... items) { - for (String item : items) {if (this.resourceNames!= null){ this.resourceNames.remove(item);}} return (A)this; - } - public A removeAllFromResourceNames(Collection items) { - for (String item : items) {if (this.resourceNames!= null){ this.resourceNames.remove(item);}} return (A)this; - } - public List getResourceNames() { - return this.resourceNames; - } - public String getResourceName(int index) { - return this.resourceNames.get(index); - } - public String getFirstResourceName() { - return this.resourceNames.get(0); - } - public String getLastResourceName() { - return this.resourceNames.get(resourceNames.size() - 1); - } - public String getMatchingResourceName(Predicate predicate) { - for (String item: resourceNames) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingResourceName(Predicate predicate) { - for (String item: resourceNames) { if(predicate.test(item)){ return true;} } return false; - } - public A withResourceNames(List resourceNames) { - if (resourceNames != null) {this.resourceNames = new ArrayList(); for (String item : resourceNames){this.addToResourceNames(item);}} else { this.resourceNames = null;} return (A) this; - } - public A withResourceNames(java.lang.String... resourceNames) { - if (this.resourceNames != null) {this.resourceNames.clear(); _visitables.remove("resourceNames"); } - if (resourceNames != null) {for (String item :resourceNames){ this.addToResourceNames(item);}} return (A) this; - } - public Boolean hasResourceNames() { - return resourceNames != null && !resourceNames.isEmpty(); - } - public A addToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.add(index, item); - return (A)this; - } - public A setToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.set(index, item); return (A)this; - } - public A addToResources(java.lang.String... items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A addAllToResources(Collection items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A removeFromResources(java.lang.String... items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public A removeAllFromResources(Collection items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public List getResources() { - return this.resources; - } - public String getResource(int index) { - return this.resources.get(index); - } - public String getFirstResource() { - return this.resources.get(0); - } - public String getLastResource() { - return this.resources.get(resources.size() - 1); - } - public String getMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return true;} } return false; - } - public A withResources(List resources) { - if (resources != null) {this.resources = new ArrayList(); for (String item : resources){this.addToResources(item);}} else { this.resources = null;} return (A) this; - } - public A withResources(java.lang.String... resources) { - if (this.resources != null) {this.resources.clear(); _visitables.remove("resources"); } - if (resources != null) {for (String item :resources){ this.addToResources(item);}} return (A) this; - } - public Boolean hasResources() { - return resources != null && !resources.isEmpty(); - } - public A addToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.add(index, item); - return (A)this; - } - public A setToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.set(index, item); return (A)this; - } - public A addToVerbs(java.lang.String... items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A addAllToVerbs(Collection items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A removeFromVerbs(java.lang.String... items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public A removeAllFromVerbs(Collection items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public List getVerbs() { - return this.verbs; - } - public String getVerb(int index) { - return this.verbs.get(index); - } - public String getFirstVerb() { - return this.verbs.get(0); - } - public String getLastVerb() { - return this.verbs.get(verbs.size() - 1); - } - public String getMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return true;} } return false; - } - public A withVerbs(List verbs) { - if (verbs != null) {this.verbs = new ArrayList(); for (String item : verbs){this.addToVerbs(item);}} else { this.verbs = null;} return (A) this; - } - public A withVerbs(java.lang.String... verbs) { - if (this.verbs != null) {this.verbs.clear(); _visitables.remove("verbs"); } - if (verbs != null) {for (String item :verbs){ this.addToVerbs(item);}} return (A) this; - } - public Boolean hasVerbs() { - return verbs != null && !verbs.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ResourceRuleFluentImpl that = (V1ResourceRuleFluentImpl) o; - if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; - - if (!java.util.Objects.equals(resourceNames, that.resourceNames)) return false; - - if (!java.util.Objects.equals(resources, that.resources)) return false; - - if (!java.util.Objects.equals(verbs, that.verbs)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroups, resourceNames, resources, verbs, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } - if (resourceNames != null && !resourceNames.isEmpty()) { sb.append("resourceNames:"); sb.append(resourceNames + ","); } - if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } - if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingBuilder.java index bed41f0bbe..b4f177350e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RoleBindingBuilder extends V1RoleBindingFluentImpl implements VisitableBuilder{ +public class V1RoleBindingBuilder extends V1RoleBindingFluent implements VisitableBuilder{ public V1RoleBindingBuilder() { - this(false); - } - public V1RoleBindingBuilder(Boolean validationEnabled) { - this(new V1RoleBinding(), validationEnabled); + this(new V1RoleBinding()); } + public V1RoleBindingBuilder(V1RoleBindingFluent fluent) { - this(fluent, false); - } - public V1RoleBindingBuilder(V1RoleBindingFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RoleBinding(), validationEnabled); + this(fluent, new V1RoleBinding()); } + public V1RoleBindingBuilder(V1RoleBindingFluent fluent,V1RoleBinding instance) { - this(fluent, instance, false); - } - public V1RoleBindingBuilder(V1RoleBindingFluent fluent,V1RoleBinding instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withRoleRef(instance.getRoleRef()); - fluent.withSubjects(instance.getSubjects()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RoleBindingBuilder(V1RoleBinding instance) { - this(instance,false); - } - public V1RoleBindingBuilder(V1RoleBinding instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRoleRef(instance.getRoleRef()); - this.withSubjects(instance.getSubjects()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RoleBindingFluent fluent; - Boolean validationEnabled; + public V1RoleBinding build() { V1RoleBinding buildable = new V1RoleBinding(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setRoleRef(fluent.getRoleRef()); - buildable.setSubjects(fluent.getSubjects()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setRoleRef(fluent.buildRoleRef()); + buildable.setSubjects(fluent.buildSubjects()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingFluent.java index b2c2c7d18b..ceaeb2a593 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingFluent.java @@ -1,102 +1,379 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1RoleBindingFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1RoleBindingFluent.MetadataNested withNewMetadata(); - public V1RoleBindingFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1RoleBindingFluent.MetadataNested editMetadata(); - public V1RoleBindingFluent.MetadataNested editOrNewMetadata(); - public V1RoleBindingFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildRoleRef instead. - * @return The buildable object. - */ - @Deprecated - public V1RoleRef getRoleRef(); - public V1RoleRef buildRoleRef(); - public A withRoleRef(V1RoleRef roleRef); - public Boolean hasRoleRef(); - public V1RoleBindingFluent.RoleRefNested withNewRoleRef(); - public V1RoleBindingFluent.RoleRefNested withNewRoleRefLike(V1RoleRef item); - public V1RoleBindingFluent.RoleRefNested editRoleRef(); - public V1RoleBindingFluent.RoleRefNested editOrNewRoleRef(); - public V1RoleBindingFluent.RoleRefNested editOrNewRoleRefLike(V1RoleRef item); - public A addToSubjects(int index,V1Subject item); - public A setToSubjects(int index,V1Subject item); - public A addToSubjects(io.kubernetes.client.openapi.models.V1Subject... items); - public A addAllToSubjects(Collection items); - public A removeFromSubjects(io.kubernetes.client.openapi.models.V1Subject... items); - public A removeAllFromSubjects(Collection items); - public A removeMatchingFromSubjects(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSubjects instead. - * @return The buildable object. - */ - @Deprecated - public List getSubjects(); - public List buildSubjects(); - public V1Subject buildSubject(int index); - public V1Subject buildFirstSubject(); - public V1Subject buildLastSubject(); - public V1Subject buildMatchingSubject(Predicate predicate); - public Boolean hasMatchingSubject(Predicate predicate); - public A withSubjects(List subjects); - public A withSubjects(io.kubernetes.client.openapi.models.V1Subject... subjects); - public Boolean hasSubjects(); - public V1RoleBindingFluent.SubjectsNested addNewSubject(); - public V1RoleBindingFluent.SubjectsNested addNewSubjectLike(V1Subject item); - public V1RoleBindingFluent.SubjectsNested setNewSubjectLike(int index,V1Subject item); - public V1RoleBindingFluent.SubjectsNested editSubject(int index); - public V1RoleBindingFluent.SubjectsNested editFirstSubject(); - public V1RoleBindingFluent.SubjectsNested editLastSubject(); - public V1RoleBindingFluent.SubjectsNested editMatchingSubject(Predicate predicate); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RoleBindingFluent> extends BaseFluent{ + public V1RoleBindingFluent() { + } + + public V1RoleBindingFluent(V1RoleBinding instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1RoleRefBuilder roleRef; + private ArrayList subjects; + + protected void copyInstance(V1RoleBinding instance) { + instance = (instance != null ? instance : new V1RoleBinding()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withRoleRef(instance.getRoleRef()); + this.withSubjects(instance.getSubjects()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1RoleRef buildRoleRef() { + return this.roleRef != null ? this.roleRef.build() : null; + } + + public A withRoleRef(V1RoleRef roleRef) { + this._visitables.remove("roleRef"); + if (roleRef != null) { + this.roleRef = new V1RoleRefBuilder(roleRef); + this._visitables.get("roleRef").add(this.roleRef); + } else { + this.roleRef = null; + this._visitables.get("roleRef").remove(this.roleRef); + } + return (A) this; + } + + public boolean hasRoleRef() { + return this.roleRef != null; + } + + public RoleRefNested withNewRoleRef() { + return new RoleRefNested(null); + } + + public RoleRefNested withNewRoleRefLike(V1RoleRef item) { + return new RoleRefNested(item); + } + + public RoleRefNested editRoleRef() { + return withNewRoleRefLike(java.util.Optional.ofNullable(buildRoleRef()).orElse(null)); + } + + public RoleRefNested editOrNewRoleRef() { + return withNewRoleRefLike(java.util.Optional.ofNullable(buildRoleRef()).orElse(new V1RoleRefBuilder().build())); + } + + public RoleRefNested editOrNewRoleRefLike(V1RoleRef item) { + return withNewRoleRefLike(java.util.Optional.ofNullable(buildRoleRef()).orElse(item)); + } + + public A addToSubjects(int index,V1Subject item) { + if (this.subjects == null) {this.subjects = new ArrayList();} + V1SubjectBuilder builder = new V1SubjectBuilder(item); + if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").add(index, builder); subjects.add(index, builder);} + return (A)this; + } + + public A setToSubjects(int index,V1Subject item) { + if (this.subjects == null) {this.subjects = new ArrayList();} + V1SubjectBuilder builder = new V1SubjectBuilder(item); + if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").set(index, builder); subjects.set(index, builder);} + return (A)this; + } + + public A addToSubjects(io.kubernetes.client.openapi.models.V1Subject... items) { + if (this.subjects == null) {this.subjects = new ArrayList();} + for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; } - public interface RoleRefNested extends Nested,V1RoleRefFluent>{ - public N and(); - public N endRoleRef(); + + public A addAllToSubjects(Collection items) { + if (this.subjects == null) {this.subjects = new ArrayList();} + for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; + } + + public A removeFromSubjects(io.kubernetes.client.openapi.models.V1Subject... items) { + if (this.subjects == null) return (A)this; + for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").remove(builder); this.subjects.remove(builder);} return (A)this; + } + + public A removeAllFromSubjects(Collection items) { + if (this.subjects == null) return (A)this; + for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").remove(builder); this.subjects.remove(builder);} return (A)this; + } + + public A removeMatchingFromSubjects(Predicate predicate) { + if (subjects == null) return (A) this; + final Iterator each = subjects.iterator(); + final List visitables = _visitables.get("subjects"); + while (each.hasNext()) { + V1SubjectBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildSubjects() { + return this.subjects != null ? build(subjects) : null; + } + + public V1Subject buildSubject(int index) { + return this.subjects.get(index).build(); + } + + public V1Subject buildFirstSubject() { + return this.subjects.get(0).build(); + } + + public V1Subject buildLastSubject() { + return this.subjects.get(subjects.size() - 1).build(); + } + + public V1Subject buildMatchingSubject(Predicate predicate) { + for (V1SubjectBuilder item : subjects) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingSubject(Predicate predicate) { + for (V1SubjectBuilder item : subjects) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSubjects(List subjects) { + if (this.subjects != null) { + this._visitables.get("subjects").clear(); + } + if (subjects != null) { + this.subjects = new ArrayList(); + for (V1Subject item : subjects) { + this.addToSubjects(item); + } + } else { + this.subjects = null; + } + return (A) this; + } + + public A withSubjects(io.kubernetes.client.openapi.models.V1Subject... subjects) { + if (this.subjects != null) { + this.subjects.clear(); + _visitables.remove("subjects"); + } + if (subjects != null) { + for (V1Subject item : subjects) { + this.addToSubjects(item); + } + } + return (A) this; + } + + public boolean hasSubjects() { + return this.subjects != null && !this.subjects.isEmpty(); + } + + public SubjectsNested addNewSubject() { + return new SubjectsNested(-1, null); + } + + public SubjectsNested addNewSubjectLike(V1Subject item) { + return new SubjectsNested(-1, item); + } + + public SubjectsNested setNewSubjectLike(int index,V1Subject item) { + return new SubjectsNested(index, item); + } + + public SubjectsNested editSubject(int index) { + if (subjects.size() <= index) throw new RuntimeException("Can't edit subjects. Index exceeds size."); + return setNewSubjectLike(index, buildSubject(index)); + } + + public SubjectsNested editFirstSubject() { + if (subjects.size() == 0) throw new RuntimeException("Can't edit first subjects. The list is empty."); + return setNewSubjectLike(0, buildSubject(0)); + } + + public SubjectsNested editLastSubject() { + int index = subjects.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last subjects. The list is empty."); + return setNewSubjectLike(index, buildSubject(index)); + } + + public SubjectsNested editMatchingSubject(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1RoleBindingFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface SubjectsNested extends Nested,V1SubjectFluent>{ - public N and(); - public N endSubject(); + public class RoleRefNested extends V1RoleRefFluent> implements Nested{ + RoleRefNested(V1RoleRef item) { + this.builder = new V1RoleRefBuilder(this, item); + } + V1RoleRefBuilder builder; + + public N and() { + return (N) V1RoleBindingFluent.this.withRoleRef(builder.build()); + } + public N endRoleRef() { + return and(); + } + + } + public class SubjectsNested extends V1SubjectFluent> implements Nested{ + SubjectsNested(int index,V1Subject item) { + this.index = index; + this.builder = new V1SubjectBuilder(this, item); + } + V1SubjectBuilder builder; + int index; + + public N and() { + return (N) V1RoleBindingFluent.this.setToSubjects(index,builder.build()); + } + + public N endSubject() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingFluentImpl.java deleted file mode 100644 index 92fcaed65a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingFluentImpl.java +++ /dev/null @@ -1,314 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RoleBindingFluentImpl> extends BaseFluent implements V1RoleBindingFluent{ - public V1RoleBindingFluentImpl() { - } - public V1RoleBindingFluentImpl(V1RoleBinding instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRoleRef(instance.getRoleRef()); - this.withSubjects(instance.getSubjects()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1RoleRefBuilder roleRef; - private ArrayList subjects; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1RoleBindingFluentImpl.MetadataNested withNewMetadata() { - return new V1RoleBindingFluentImpl.MetadataNestedImpl(); - } - public V1RoleBindingFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1RoleBindingFluentImpl.MetadataNestedImpl(item); - } - public V1RoleBindingFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1RoleBindingFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1RoleBindingFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildRoleRef instead. - * @return The buildable object. - */ - @Deprecated - public V1RoleRef getRoleRef() { - return this.roleRef!=null ?this.roleRef.build():null; - } - public V1RoleRef buildRoleRef() { - return this.roleRef!=null ?this.roleRef.build():null; - } - public A withRoleRef(V1RoleRef roleRef) { - _visitables.get("roleRef").remove(this.roleRef); - if (roleRef!=null){ this.roleRef= new V1RoleRefBuilder(roleRef); _visitables.get("roleRef").add(this.roleRef);} else { this.roleRef = null; _visitables.get("roleRef").remove(this.roleRef); } return (A) this; - } - public Boolean hasRoleRef() { - return this.roleRef != null; - } - public V1RoleBindingFluentImpl.RoleRefNested withNewRoleRef() { - return new V1RoleBindingFluentImpl.RoleRefNestedImpl(); - } - public V1RoleBindingFluentImpl.RoleRefNested withNewRoleRefLike(V1RoleRef item) { - return new V1RoleBindingFluentImpl.RoleRefNestedImpl(item); - } - public V1RoleBindingFluentImpl.RoleRefNested editRoleRef() { - return withNewRoleRefLike(getRoleRef()); - } - public V1RoleBindingFluentImpl.RoleRefNested editOrNewRoleRef() { - return withNewRoleRefLike(getRoleRef() != null ? getRoleRef(): new V1RoleRefBuilder().build()); - } - public V1RoleBindingFluentImpl.RoleRefNested editOrNewRoleRefLike(V1RoleRef item) { - return withNewRoleRefLike(getRoleRef() != null ? getRoleRef(): item); - } - public A addToSubjects(int index,V1Subject item) { - if (this.subjects == null) {this.subjects = new ArrayList();} - V1SubjectBuilder builder = new V1SubjectBuilder(item); - if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").add(index, builder); subjects.add(index, builder);} - return (A)this; - } - public A setToSubjects(int index,V1Subject item) { - if (this.subjects == null) {this.subjects = new ArrayList();} - V1SubjectBuilder builder = new V1SubjectBuilder(item); - if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").set(index, builder); subjects.set(index, builder);} - return (A)this; - } - public A addToSubjects(io.kubernetes.client.openapi.models.V1Subject... items) { - if (this.subjects == null) {this.subjects = new ArrayList();} - for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; - } - public A addAllToSubjects(Collection items) { - if (this.subjects == null) {this.subjects = new ArrayList();} - for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; - } - public A removeFromSubjects(io.kubernetes.client.openapi.models.V1Subject... items) { - for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").remove(builder);if (this.subjects != null) {this.subjects.remove(builder);}} return (A)this; - } - public A removeAllFromSubjects(Collection items) { - for (V1Subject item : items) {V1SubjectBuilder builder = new V1SubjectBuilder(item);_visitables.get("subjects").remove(builder);if (this.subjects != null) {this.subjects.remove(builder);}} return (A)this; - } - public A removeMatchingFromSubjects(Predicate predicate) { - if (subjects == null) return (A) this; - final Iterator each = subjects.iterator(); - final List visitables = _visitables.get("subjects"); - while (each.hasNext()) { - V1SubjectBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildSubjects instead. - * @return The buildable object. - */ - @Deprecated - public List getSubjects() { - return subjects != null ? build(subjects) : null; - } - public List buildSubjects() { - return subjects != null ? build(subjects) : null; - } - public V1Subject buildSubject(int index) { - return this.subjects.get(index).build(); - } - public V1Subject buildFirstSubject() { - return this.subjects.get(0).build(); - } - public V1Subject buildLastSubject() { - return this.subjects.get(subjects.size() - 1).build(); - } - public V1Subject buildMatchingSubject(Predicate predicate) { - for (V1SubjectBuilder item: subjects) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingSubject(Predicate predicate) { - for (V1SubjectBuilder item: subjects) { if(predicate.test(item)){ return true;} } return false; - } - public A withSubjects(List subjects) { - if (this.subjects != null) { _visitables.get("subjects").clear();} - if (subjects != null) {this.subjects = new ArrayList(); for (V1Subject item : subjects){this.addToSubjects(item);}} else { this.subjects = null;} return (A) this; - } - public A withSubjects(io.kubernetes.client.openapi.models.V1Subject... subjects) { - if (this.subjects != null) {this.subjects.clear(); _visitables.remove("subjects"); } - if (subjects != null) {for (V1Subject item :subjects){ this.addToSubjects(item);}} return (A) this; - } - public Boolean hasSubjects() { - return subjects != null && !subjects.isEmpty(); - } - public V1RoleBindingFluentImpl.SubjectsNested addNewSubject() { - return new V1RoleBindingFluentImpl.SubjectsNestedImpl(); - } - public V1RoleBindingFluentImpl.SubjectsNested addNewSubjectLike(V1Subject item) { - return new V1RoleBindingFluentImpl.SubjectsNestedImpl(-1, item); - } - public V1RoleBindingFluentImpl.SubjectsNested setNewSubjectLike(int index,V1Subject item) { - return new V1RoleBindingFluentImpl.SubjectsNestedImpl(index, item); - } - public V1RoleBindingFluentImpl.SubjectsNested editSubject(int index) { - if (subjects.size() <= index) throw new RuntimeException("Can't edit subjects. Index exceeds size."); - return setNewSubjectLike(index, buildSubject(index)); - } - public V1RoleBindingFluentImpl.SubjectsNested editFirstSubject() { - if (subjects.size() == 0) throw new RuntimeException("Can't edit first subjects. The list is empty."); - return setNewSubjectLike(0, buildSubject(0)); - } - public V1RoleBindingFluentImpl.SubjectsNested editLastSubject() { - int index = subjects.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last subjects. The list is empty."); - return setNewSubjectLike(index, buildSubject(index)); - } - public V1RoleBindingFluentImpl.SubjectsNested editMatchingSubject(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ObjectMetaFluentImpl> implements V1RoleBindingFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1RoleBindingFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class RoleRefNestedImpl extends V1RoleRefFluentImpl> implements V1RoleBindingFluentImpl.RoleRefNested,Nested{ - RoleRefNestedImpl(V1RoleRef item) { - this.builder = new V1RoleRefBuilder(this, item); - } - RoleRefNestedImpl() { - this.builder = new V1RoleRefBuilder(this); - } - V1RoleRefBuilder builder; - public N and() { - return (N) V1RoleBindingFluentImpl.this.withRoleRef(builder.build()); - } - public N endRoleRef() { - return and(); - } - - } - class SubjectsNestedImpl extends V1SubjectFluentImpl> implements V1RoleBindingFluentImpl.SubjectsNested,Nested{ - SubjectsNestedImpl(int index,V1Subject item) { - this.index = index; - this.builder = new V1SubjectBuilder(this, item); - } - SubjectsNestedImpl() { - this.index = -1; - this.builder = new V1SubjectBuilder(this); - } - V1SubjectBuilder builder; - int index; - public N and() { - return (N) V1RoleBindingFluentImpl.this.setToSubjects(index,builder.build()); - } - public N endSubject() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListBuilder.java index 0a18dc3447..4b97be5863 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RoleBindingListBuilder extends V1RoleBindingListFluentImpl implements VisitableBuilder{ +public class V1RoleBindingListBuilder extends V1RoleBindingListFluent implements VisitableBuilder{ public V1RoleBindingListBuilder() { - this(false); - } - public V1RoleBindingListBuilder(Boolean validationEnabled) { - this(new V1RoleBindingList(), validationEnabled); + this(new V1RoleBindingList()); } + public V1RoleBindingListBuilder(V1RoleBindingListFluent fluent) { - this(fluent, false); - } - public V1RoleBindingListBuilder(V1RoleBindingListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RoleBindingList(), validationEnabled); + this(fluent, new V1RoleBindingList()); } + public V1RoleBindingListBuilder(V1RoleBindingListFluent fluent,V1RoleBindingList instance) { - this(fluent, instance, false); - } - public V1RoleBindingListBuilder(V1RoleBindingListFluent fluent,V1RoleBindingList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RoleBindingListBuilder(V1RoleBindingList instance) { - this(instance,false); - } - public V1RoleBindingListBuilder(V1RoleBindingList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RoleBindingListFluent fluent; - Boolean validationEnabled; + public V1RoleBindingList build() { V1RoleBindingList buildable = new V1RoleBindingList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListFluent.java index dbf583f25b..2e0f63ef09 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1RoleBindingListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1RoleBinding item); - public A setToItems(int index,V1RoleBinding item); - public A addToItems(io.kubernetes.client.openapi.models.V1RoleBinding... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1RoleBinding... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1RoleBinding buildItem(int index); - public V1RoleBinding buildFirstItem(); - public V1RoleBinding buildLastItem(); - public V1RoleBinding buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1RoleBinding... items); - public Boolean hasItems(); - public V1RoleBindingListFluent.ItemsNested addNewItem(); - public V1RoleBindingListFluent.ItemsNested addNewItemLike(V1RoleBinding item); - public V1RoleBindingListFluent.ItemsNested setNewItemLike(int index,V1RoleBinding item); - public V1RoleBindingListFluent.ItemsNested editItem(int index); - public V1RoleBindingListFluent.ItemsNested editFirstItem(); - public V1RoleBindingListFluent.ItemsNested editLastItem(); - public V1RoleBindingListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1RoleBindingListFluent.MetadataNested withNewMetadata(); - public V1RoleBindingListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1RoleBindingListFluent.MetadataNested editMetadata(); - public V1RoleBindingListFluent.MetadataNested editOrNewMetadata(); - public V1RoleBindingListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1RoleBindingFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RoleBindingListFluent> extends BaseFluent{ + public V1RoleBindingListFluent() { + } + + public V1RoleBindingListFluent(V1RoleBindingList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1RoleBindingList instance) { + instance = (instance != null ? instance : new V1RoleBindingList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1RoleBinding item) { + if (this.items == null) {this.items = new ArrayList();} + V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1RoleBinding item) { + if (this.items == null) {this.items = new ArrayList();} + V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1RoleBinding... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1RoleBinding item : items) {V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1RoleBinding item : items) {V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1RoleBinding... items) { + if (this.items == null) return (A)this; + for (V1RoleBinding item : items) {V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1RoleBinding item : items) {V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1RoleBindingBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1RoleBinding buildItem(int index) { + return this.items.get(index).build(); + } + + public V1RoleBinding buildFirstItem() { + return this.items.get(0).build(); + } + + public V1RoleBinding buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1RoleBinding buildMatchingItem(Predicate predicate) { + for (V1RoleBindingBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1RoleBindingBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1RoleBinding item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1RoleBinding... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1RoleBinding item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1RoleBinding item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1RoleBinding item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RoleBindingListFluent that = (V1RoleBindingListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1RoleBindingFluent> implements Nested{ + ItemsNested(int index,V1RoleBinding item) { + this.index = index; + this.builder = new V1RoleBindingBuilder(this, item); + } + V1RoleBindingBuilder builder; + int index; + public N and() { + return (N) V1RoleBindingListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1RoleBindingListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListFluentImpl.java deleted file mode 100644 index 881d70e8e5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBindingListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RoleBindingListFluentImpl> extends BaseFluent implements V1RoleBindingListFluent{ - public V1RoleBindingListFluentImpl() { - } - public V1RoleBindingListFluentImpl(V1RoleBindingList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1RoleBinding item) { - if (this.items == null) {this.items = new ArrayList();} - V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1RoleBinding item) { - if (this.items == null) {this.items = new ArrayList();} - V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1RoleBinding... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1RoleBinding item : items) {V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1RoleBinding item : items) {V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1RoleBinding... items) { - for (V1RoleBinding item : items) {V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1RoleBinding item : items) {V1RoleBindingBuilder builder = new V1RoleBindingBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1RoleBindingBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1RoleBinding buildItem(int index) { - return this.items.get(index).build(); - } - public V1RoleBinding buildFirstItem() { - return this.items.get(0).build(); - } - public V1RoleBinding buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1RoleBinding buildMatchingItem(Predicate predicate) { - for (V1RoleBindingBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1RoleBindingBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1RoleBinding item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1RoleBinding... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1RoleBinding item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1RoleBindingListFluentImpl.ItemsNested addNewItem() { - return new V1RoleBindingListFluentImpl.ItemsNestedImpl(); - } - public V1RoleBindingListFluentImpl.ItemsNested addNewItemLike(V1RoleBinding item) { - return new V1RoleBindingListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1RoleBindingListFluentImpl.ItemsNested setNewItemLike(int index,V1RoleBinding item) { - return new V1RoleBindingListFluentImpl.ItemsNestedImpl(index, item); - } - public V1RoleBindingListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1RoleBindingListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1RoleBindingListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1RoleBindingListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1RoleBindingListFluentImpl.MetadataNestedImpl(); - } - public V1RoleBindingListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1RoleBindingListFluentImpl.MetadataNestedImpl(item); - } - public V1RoleBindingListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1RoleBindingListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1RoleBindingListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RoleBindingListFluentImpl that = (V1RoleBindingListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1RoleBindingFluentImpl> implements V1RoleBindingListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1RoleBinding item) { - this.index = index; - this.builder = new V1RoleBindingBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1RoleBindingBuilder(this); - } - V1RoleBindingBuilder builder; - int index; - public N and() { - return (N) V1RoleBindingListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1RoleBindingListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1RoleBindingListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBuilder.java index 849cea9ced..8e3c62cc16 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RoleBuilder extends V1RoleFluentImpl implements VisitableBuilder{ +public class V1RoleBuilder extends V1RoleFluent implements VisitableBuilder{ public V1RoleBuilder() { - this(false); - } - public V1RoleBuilder(Boolean validationEnabled) { - this(new V1Role(), validationEnabled); + this(new V1Role()); } + public V1RoleBuilder(V1RoleFluent fluent) { - this(fluent, false); - } - public V1RoleBuilder(V1RoleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Role(), validationEnabled); + this(fluent, new V1Role()); } + public V1RoleBuilder(V1RoleFluent fluent,V1Role instance) { - this(fluent, instance, false); - } - public V1RoleBuilder(V1RoleFluent fluent,V1Role instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RoleBuilder(V1Role instance) { - this(instance,false); - } - public V1RoleBuilder(V1Role instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RoleFluent fluent; - Boolean validationEnabled; + public V1Role build() { V1Role buildable = new V1Role(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setRules(fluent.getRules()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setRules(fluent.buildRules()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleFluent.java index fd3c16e6d4..b39b598e05 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1RoleFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1RoleFluent.MetadataNested withNewMetadata(); - public V1RoleFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1RoleFluent.MetadataNested editMetadata(); - public V1RoleFluent.MetadataNested editOrNewMetadata(); - public V1RoleFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A addToRules(int index,V1PolicyRule item); - public A setToRules(int index,V1PolicyRule item); - public A addToRules(io.kubernetes.client.openapi.models.V1PolicyRule... items); - public A addAllToRules(Collection items); - public A removeFromRules(io.kubernetes.client.openapi.models.V1PolicyRule... items); - public A removeAllFromRules(Collection items); - public A removeMatchingFromRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules(); - public List buildRules(); - public V1PolicyRule buildRule(int index); - public V1PolicyRule buildFirstRule(); - public V1PolicyRule buildLastRule(); - public V1PolicyRule buildMatchingRule(Predicate predicate); - public Boolean hasMatchingRule(Predicate predicate); - public A withRules(List rules); - public A withRules(io.kubernetes.client.openapi.models.V1PolicyRule... rules); - public Boolean hasRules(); - public V1RoleFluent.RulesNested addNewRule(); - public V1RoleFluent.RulesNested addNewRuleLike(V1PolicyRule item); - public V1RoleFluent.RulesNested setNewRuleLike(int index,V1PolicyRule item); - public V1RoleFluent.RulesNested editRule(int index); - public V1RoleFluent.RulesNested editFirstRule(); - public V1RoleFluent.RulesNested editLastRule(); - public V1RoleFluent.RulesNested editMatchingRule(Predicate predicate); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RoleFluent> extends BaseFluent{ + public V1RoleFluent() { + } + + public V1RoleFluent(V1Role instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private ArrayList rules; + + protected void copyInstance(V1Role instance) { + instance = (instance != null ? instance : new V1Role()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withRules(instance.getRules()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public A addToRules(int index,V1PolicyRule item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} + return (A)this; + } + + public A setToRules(int index,V1PolicyRule item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} + return (A)this; + } + + public A addToRules(io.kubernetes.client.openapi.models.V1PolicyRule... items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A addAllToRules(Collection items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A removeFromRules(io.kubernetes.client.openapi.models.V1PolicyRule... items) { + if (this.rules == null) return (A)this; + for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeAllFromRules(Collection items) { + if (this.rules == null) return (A)this; + for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeMatchingFromRules(Predicate predicate) { + if (rules == null) return (A) this; + final Iterator each = rules.iterator(); + final List visitables = _visitables.get("rules"); + while (each.hasNext()) { + V1PolicyRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; } - public interface RulesNested extends Nested,V1PolicyRuleFluent>{ - public N and(); - public N endRule(); + + public List buildRules() { + return this.rules != null ? build(rules) : null; + } + + public V1PolicyRule buildRule(int index) { + return this.rules.get(index).build(); + } + + public V1PolicyRule buildFirstRule() { + return this.rules.get(0).build(); + } + + public V1PolicyRule buildLastRule() { + return this.rules.get(rules.size() - 1).build(); + } + + public V1PolicyRule buildMatchingRule(Predicate predicate) { + for (V1PolicyRuleBuilder item : rules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingRule(Predicate predicate) { + for (V1PolicyRuleBuilder item : rules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRules(List rules) { + if (this.rules != null) { + this._visitables.get("rules").clear(); + } + if (rules != null) { + this.rules = new ArrayList(); + for (V1PolicyRule item : rules) { + this.addToRules(item); + } + } else { + this.rules = null; + } + return (A) this; + } + + public A withRules(io.kubernetes.client.openapi.models.V1PolicyRule... rules) { + if (this.rules != null) { + this.rules.clear(); + _visitables.remove("rules"); + } + if (rules != null) { + for (V1PolicyRule item : rules) { + this.addToRules(item); + } + } + return (A) this; + } + + public boolean hasRules() { + return this.rules != null && !this.rules.isEmpty(); + } + + public RulesNested addNewRule() { + return new RulesNested(-1, null); + } + + public RulesNested addNewRuleLike(V1PolicyRule item) { + return new RulesNested(-1, item); + } + + public RulesNested setNewRuleLike(int index,V1PolicyRule item) { + return new RulesNested(index, item); + } + + public RulesNested editRule(int index) { + if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editFirstRule() { + if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); + return setNewRuleLike(0, buildRule(0)); + } + + public RulesNested editLastRule() { + int index = rules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editMatchingRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + public N and() { + return (N) V1RoleFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + public class RulesNested extends V1PolicyRuleFluent> implements Nested{ + RulesNested(int index,V1PolicyRule item) { + this.index = index; + this.builder = new V1PolicyRuleBuilder(this, item); + } + V1PolicyRuleBuilder builder; + int index; + + public N and() { + return (N) V1RoleFluent.this.setToRules(index,builder.build()); + } + + public N endRule() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleFluentImpl.java deleted file mode 100644 index 8dc75c881e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RoleFluentImpl> extends BaseFluent implements V1RoleFluent{ - public V1RoleFluentImpl() { - } - public V1RoleFluentImpl(V1Role instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withRules(instance.getRules()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private ArrayList rules; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1RoleFluentImpl.MetadataNested withNewMetadata() { - return new V1RoleFluentImpl.MetadataNestedImpl(); - } - public V1RoleFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1RoleFluentImpl.MetadataNestedImpl(item); - } - public V1RoleFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1RoleFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1RoleFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public A addToRules(int index,V1PolicyRule item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} - return (A)this; - } - public A setToRules(int index,V1PolicyRule item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} - return (A)this; - } - public A addToRules(io.kubernetes.client.openapi.models.V1PolicyRule... items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A addAllToRules(Collection items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A removeFromRules(io.kubernetes.client.openapi.models.V1PolicyRule... items) { - for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeAllFromRules(Collection items) { - for (V1PolicyRule item : items) {V1PolicyRuleBuilder builder = new V1PolicyRuleBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeMatchingFromRules(Predicate predicate) { - if (rules == null) return (A) this; - final Iterator each = rules.iterator(); - final List visitables = _visitables.get("rules"); - while (each.hasNext()) { - V1PolicyRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules() { - return rules != null ? build(rules) : null; - } - public List buildRules() { - return rules != null ? build(rules) : null; - } - public V1PolicyRule buildRule(int index) { - return this.rules.get(index).build(); - } - public V1PolicyRule buildFirstRule() { - return this.rules.get(0).build(); - } - public V1PolicyRule buildLastRule() { - return this.rules.get(rules.size() - 1).build(); - } - public V1PolicyRule buildMatchingRule(Predicate predicate) { - for (V1PolicyRuleBuilder item: rules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRule(Predicate predicate) { - for (V1PolicyRuleBuilder item: rules) { if(predicate.test(item)){ return true;} } return false; - } - public A withRules(List rules) { - if (this.rules != null) { _visitables.get("rules").clear();} - if (rules != null) {this.rules = new ArrayList(); for (V1PolicyRule item : rules){this.addToRules(item);}} else { this.rules = null;} return (A) this; - } - public A withRules(io.kubernetes.client.openapi.models.V1PolicyRule... rules) { - if (this.rules != null) {this.rules.clear(); _visitables.remove("rules"); } - if (rules != null) {for (V1PolicyRule item :rules){ this.addToRules(item);}} return (A) this; - } - public Boolean hasRules() { - return rules != null && !rules.isEmpty(); - } - public V1RoleFluentImpl.RulesNested addNewRule() { - return new V1RoleFluentImpl.RulesNestedImpl(); - } - public V1RoleFluentImpl.RulesNested addNewRuleLike(V1PolicyRule item) { - return new V1RoleFluentImpl.RulesNestedImpl(-1, item); - } - public V1RoleFluentImpl.RulesNested setNewRuleLike(int index,V1PolicyRule item) { - return new V1RoleFluentImpl.RulesNestedImpl(index, item); - } - public V1RoleFluentImpl.RulesNested editRule(int index) { - if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); - return setNewRuleLike(index, buildRule(index)); - } - public V1RoleFluentImpl.RulesNested editFirstRule() { - if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); - return setNewRuleLike(0, buildRule(0)); - } - public V1RoleFluentImpl.RulesNested editLastRule() { - int index = rules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); - return setNewRuleLike(index, buildRule(index)); - } - public V1RoleFluentImpl.RulesNested editMatchingRule(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ObjectMetaFluentImpl> implements V1RoleFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1RoleFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class RulesNestedImpl extends V1PolicyRuleFluentImpl> implements V1RoleFluentImpl.RulesNested,Nested{ - RulesNestedImpl(int index,V1PolicyRule item) { - this.index = index; - this.builder = new V1PolicyRuleBuilder(this, item); - } - RulesNestedImpl() { - this.index = -1; - this.builder = new V1PolicyRuleBuilder(this); - } - V1PolicyRuleBuilder builder; - int index; - public N and() { - return (N) V1RoleFluentImpl.this.setToRules(index,builder.build()); - } - public N endRule() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListBuilder.java index 51331912bc..f6691cfde0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RoleListBuilder extends V1RoleListFluentImpl implements VisitableBuilder{ +public class V1RoleListBuilder extends V1RoleListFluent implements VisitableBuilder{ public V1RoleListBuilder() { - this(false); - } - public V1RoleListBuilder(Boolean validationEnabled) { - this(new V1RoleList(), validationEnabled); + this(new V1RoleList()); } + public V1RoleListBuilder(V1RoleListFluent fluent) { - this(fluent, false); - } - public V1RoleListBuilder(V1RoleListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RoleList(), validationEnabled); + this(fluent, new V1RoleList()); } + public V1RoleListBuilder(V1RoleListFluent fluent,V1RoleList instance) { - this(fluent, instance, false); - } - public V1RoleListBuilder(V1RoleListFluent fluent,V1RoleList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RoleListBuilder(V1RoleList instance) { - this(instance,false); - } - public V1RoleListBuilder(V1RoleList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RoleListFluent fluent; - Boolean validationEnabled; + public V1RoleList build() { V1RoleList buildable = new V1RoleList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListFluent.java index 89085cc0f6..6586d6e9f2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1RoleListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Role item); - public A setToItems(int index,V1Role item); - public A addToItems(io.kubernetes.client.openapi.models.V1Role... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Role... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Role buildItem(int index); - public V1Role buildFirstItem(); - public V1Role buildLastItem(); - public V1Role buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Role... items); - public Boolean hasItems(); - public V1RoleListFluent.ItemsNested addNewItem(); - public V1RoleListFluent.ItemsNested addNewItemLike(V1Role item); - public V1RoleListFluent.ItemsNested setNewItemLike(int index,V1Role item); - public V1RoleListFluent.ItemsNested editItem(int index); - public V1RoleListFluent.ItemsNested editFirstItem(); - public V1RoleListFluent.ItemsNested editLastItem(); - public V1RoleListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1RoleListFluent.MetadataNested withNewMetadata(); - public V1RoleListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1RoleListFluent.MetadataNested editMetadata(); - public V1RoleListFluent.MetadataNested editOrNewMetadata(); - public V1RoleListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1RoleFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RoleListFluent> extends BaseFluent{ + public V1RoleListFluent() { + } + + public V1RoleListFluent(V1RoleList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1RoleList instance) { + instance = (instance != null ? instance : new V1RoleList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Role item) { + if (this.items == null) {this.items = new ArrayList();} + V1RoleBuilder builder = new V1RoleBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Role item) { + if (this.items == null) {this.items = new ArrayList();} + V1RoleBuilder builder = new V1RoleBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Role... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Role item : items) {V1RoleBuilder builder = new V1RoleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Role item : items) {V1RoleBuilder builder = new V1RoleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Role... items) { + if (this.items == null) return (A)this; + for (V1Role item : items) {V1RoleBuilder builder = new V1RoleBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Role item : items) {V1RoleBuilder builder = new V1RoleBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1RoleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Role buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Role buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Role buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Role buildMatchingItem(Predicate predicate) { + for (V1RoleBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1RoleBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Role item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Role... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Role item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Role item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Role item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RoleListFluent that = (V1RoleListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1RoleFluent> implements Nested{ + ItemsNested(int index,V1Role item) { + this.index = index; + this.builder = new V1RoleBuilder(this, item); + } + V1RoleBuilder builder; + int index; + public N and() { + return (N) V1RoleListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1RoleListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListFluentImpl.java deleted file mode 100644 index 5616db44c9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RoleListFluentImpl> extends BaseFluent implements V1RoleListFluent{ - public V1RoleListFluentImpl() { - } - public V1RoleListFluentImpl(V1RoleList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Role item) { - if (this.items == null) {this.items = new ArrayList();} - V1RoleBuilder builder = new V1RoleBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Role item) { - if (this.items == null) {this.items = new ArrayList();} - V1RoleBuilder builder = new V1RoleBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Role... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Role item : items) {V1RoleBuilder builder = new V1RoleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Role item : items) {V1RoleBuilder builder = new V1RoleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Role... items) { - for (V1Role item : items) {V1RoleBuilder builder = new V1RoleBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Role item : items) {V1RoleBuilder builder = new V1RoleBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1RoleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Role buildItem(int index) { - return this.items.get(index).build(); - } - public V1Role buildFirstItem() { - return this.items.get(0).build(); - } - public V1Role buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Role buildMatchingItem(Predicate predicate) { - for (V1RoleBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1RoleBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Role item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Role... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Role item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1RoleListFluentImpl.ItemsNested addNewItem() { - return new V1RoleListFluentImpl.ItemsNestedImpl(); - } - public V1RoleListFluentImpl.ItemsNested addNewItemLike(V1Role item) { - return new V1RoleListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1RoleListFluentImpl.ItemsNested setNewItemLike(int index,V1Role item) { - return new V1RoleListFluentImpl.ItemsNestedImpl(index, item); - } - public V1RoleListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1RoleListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1RoleListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1RoleListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1RoleListFluentImpl.MetadataNestedImpl(); - } - public V1RoleListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1RoleListFluentImpl.MetadataNestedImpl(item); - } - public V1RoleListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1RoleListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1RoleListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RoleListFluentImpl that = (V1RoleListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1RoleFluentImpl> implements V1RoleListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Role item) { - this.index = index; - this.builder = new V1RoleBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1RoleBuilder(this); - } - V1RoleBuilder builder; - int index; - public N and() { - return (N) V1RoleListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1RoleListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1RoleListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefBuilder.java index ececac0f06..bf87789b64 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RoleRefBuilder extends V1RoleRefFluentImpl implements VisitableBuilder{ +public class V1RoleRefBuilder extends V1RoleRefFluent implements VisitableBuilder{ public V1RoleRefBuilder() { - this(false); - } - public V1RoleRefBuilder(Boolean validationEnabled) { - this(new V1RoleRef(), validationEnabled); + this(new V1RoleRef()); } + public V1RoleRefBuilder(V1RoleRefFluent fluent) { - this(fluent, false); - } - public V1RoleRefBuilder(V1RoleRefFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RoleRef(), validationEnabled); + this(fluent, new V1RoleRef()); } + public V1RoleRefBuilder(V1RoleRefFluent fluent,V1RoleRef instance) { - this(fluent, instance, false); - } - public V1RoleRefBuilder(V1RoleRefFluent fluent,V1RoleRef instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroup(instance.getApiGroup()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RoleRefBuilder(V1RoleRef instance) { - this(instance,false); - } - public V1RoleRefBuilder(V1RoleRef instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RoleRefFluent fluent; - Boolean validationEnabled; + public V1RoleRef build() { V1RoleRef buildable = new V1RoleRef(); buildable.setApiGroup(fluent.getApiGroup()); @@ -49,4 +29,5 @@ public V1RoleRef build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefFluent.java index a1b0d462c5..bd8b0737c4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefFluent.java @@ -1,22 +1,97 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1RoleRefFluent> extends Fluent{ - public String getApiGroup(); - public A withApiGroup(String apiGroup); - public Boolean hasApiGroup(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RoleRefFluent> extends BaseFluent{ + public V1RoleRefFluent() { + } + public V1RoleRefFluent(V1RoleRef instance) { + this.copyInstance(instance); + } + private String apiGroup; + private String kind; + private String name; + + protected void copyInstance(V1RoleRef instance) { + instance = (instance != null ? instance : new V1RoleRef()); + if (instance != null) { + this.withApiGroup(instance.getApiGroup()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + } + } + + public String getApiGroup() { + return this.apiGroup; + } + + public A withApiGroup(String apiGroup) { + this.apiGroup = apiGroup; + return (A) this; + } + + public boolean hasApiGroup() { + return this.apiGroup != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RoleRefFluent that = (V1RoleRefFluent) o; + if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroup, kind, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefFluentImpl.java deleted file mode 100644 index 0562414908..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RoleRefFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RoleRefFluentImpl> extends BaseFluent implements V1RoleRefFluent{ - public V1RoleRefFluentImpl() { - } - public V1RoleRefFluentImpl(V1RoleRef instance) { - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - } - private String apiGroup; - private String kind; - private String name; - public String getApiGroup() { - return this.apiGroup; - } - public A withApiGroup(String apiGroup) { - this.apiGroup=apiGroup; return (A) this; - } - public Boolean hasApiGroup() { - return this.apiGroup != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RoleRefFluentImpl that = (V1RoleRefFluentImpl) o; - if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroup, kind, name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetBuilder.java index 7f00cf7194..6f1cb211f0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RollingUpdateDaemonSetBuilder extends V1RollingUpdateDaemonSetFluentImpl implements VisitableBuilder{ +public class V1RollingUpdateDaemonSetBuilder extends V1RollingUpdateDaemonSetFluent implements VisitableBuilder{ public V1RollingUpdateDaemonSetBuilder() { - this(false); - } - public V1RollingUpdateDaemonSetBuilder(Boolean validationEnabled) { - this(new V1RollingUpdateDaemonSet(), validationEnabled); + this(new V1RollingUpdateDaemonSet()); } + public V1RollingUpdateDaemonSetBuilder(V1RollingUpdateDaemonSetFluent fluent) { - this(fluent, false); - } - public V1RollingUpdateDaemonSetBuilder(V1RollingUpdateDaemonSetFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RollingUpdateDaemonSet(), validationEnabled); + this(fluent, new V1RollingUpdateDaemonSet()); } + public V1RollingUpdateDaemonSetBuilder(V1RollingUpdateDaemonSetFluent fluent,V1RollingUpdateDaemonSet instance) { - this(fluent, instance, false); - } - public V1RollingUpdateDaemonSetBuilder(V1RollingUpdateDaemonSetFluent fluent,V1RollingUpdateDaemonSet instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMaxSurge(instance.getMaxSurge()); - fluent.withMaxUnavailable(instance.getMaxUnavailable()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RollingUpdateDaemonSetBuilder(V1RollingUpdateDaemonSet instance) { - this(instance,false); - } - public V1RollingUpdateDaemonSetBuilder(V1RollingUpdateDaemonSet instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMaxSurge(instance.getMaxSurge()); - this.withMaxUnavailable(instance.getMaxUnavailable()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RollingUpdateDaemonSetFluent fluent; - Boolean validationEnabled; + public V1RollingUpdateDaemonSet build() { V1RollingUpdateDaemonSet buildable = new V1RollingUpdateDaemonSet(); buildable.setMaxSurge(fluent.getMaxSurge()); @@ -46,4 +28,5 @@ public V1RollingUpdateDaemonSet build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetFluent.java index 049548e4ad..2c071af1f5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetFluent.java @@ -1,24 +1,97 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.custom.IntOrString; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1RollingUpdateDaemonSetFluent> extends Fluent{ - public IntOrString getMaxSurge(); - public A withMaxSurge(IntOrString maxSurge); - public Boolean hasMaxSurge(); - public A withNewMaxSurge(int value); - public A withNewMaxSurge(String value); - public IntOrString getMaxUnavailable(); - public A withMaxUnavailable(IntOrString maxUnavailable); - public Boolean hasMaxUnavailable(); - public A withNewMaxUnavailable(int value); - public A withNewMaxUnavailable(String value); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RollingUpdateDaemonSetFluent> extends BaseFluent{ + public V1RollingUpdateDaemonSetFluent() { + } + public V1RollingUpdateDaemonSetFluent(V1RollingUpdateDaemonSet instance) { + this.copyInstance(instance); + } + private IntOrString maxSurge; + private IntOrString maxUnavailable; + + protected void copyInstance(V1RollingUpdateDaemonSet instance) { + instance = (instance != null ? instance : new V1RollingUpdateDaemonSet()); + if (instance != null) { + this.withMaxSurge(instance.getMaxSurge()); + this.withMaxUnavailable(instance.getMaxUnavailable()); + } + } + + public IntOrString getMaxSurge() { + return this.maxSurge; + } + + public A withMaxSurge(IntOrString maxSurge) { + this.maxSurge = maxSurge; + return (A) this; + } + + public boolean hasMaxSurge() { + return this.maxSurge != null; + } + + public A withNewMaxSurge(int value) { + return (A)withMaxSurge(new IntOrString(value)); + } + + public A withNewMaxSurge(String value) { + return (A)withMaxSurge(new IntOrString(value)); + } + + public IntOrString getMaxUnavailable() { + return this.maxUnavailable; + } + + public A withMaxUnavailable(IntOrString maxUnavailable) { + this.maxUnavailable = maxUnavailable; + return (A) this; + } + + public boolean hasMaxUnavailable() { + return this.maxUnavailable != null; + } + + public A withNewMaxUnavailable(int value) { + return (A)withMaxUnavailable(new IntOrString(value)); + } + + public A withNewMaxUnavailable(String value) { + return (A)withMaxUnavailable(new IntOrString(value)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RollingUpdateDaemonSetFluent that = (V1RollingUpdateDaemonSetFluent) o; + if (!java.util.Objects.equals(maxSurge, that.maxSurge)) return false; + if (!java.util.Objects.equals(maxUnavailable, that.maxUnavailable)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(maxSurge, maxUnavailable, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (maxSurge != null) { sb.append("maxSurge:"); sb.append(maxSurge + ","); } + if (maxUnavailable != null) { sb.append("maxUnavailable:"); sb.append(maxUnavailable); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetFluentImpl.java deleted file mode 100644 index 3a005d370d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDaemonSetFluentImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.custom.IntOrString; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RollingUpdateDaemonSetFluentImpl> extends BaseFluent implements V1RollingUpdateDaemonSetFluent{ - public V1RollingUpdateDaemonSetFluentImpl() { - } - public V1RollingUpdateDaemonSetFluentImpl(V1RollingUpdateDaemonSet instance) { - if (instance != null) { - this.withMaxSurge(instance.getMaxSurge()); - this.withMaxUnavailable(instance.getMaxUnavailable()); - } - } - private IntOrString maxSurge; - private IntOrString maxUnavailable; - public IntOrString getMaxSurge() { - return this.maxSurge; - } - public A withMaxSurge(IntOrString maxSurge) { - this.maxSurge=maxSurge; return (A) this; - } - public Boolean hasMaxSurge() { - return this.maxSurge != null; - } - public A withNewMaxSurge(int value) { - return (A)withMaxSurge(new IntOrString(value)); - } - public A withNewMaxSurge(String value) { - return (A)withMaxSurge(new IntOrString(value)); - } - public IntOrString getMaxUnavailable() { - return this.maxUnavailable; - } - public A withMaxUnavailable(IntOrString maxUnavailable) { - this.maxUnavailable=maxUnavailable; return (A) this; - } - public Boolean hasMaxUnavailable() { - return this.maxUnavailable != null; - } - public A withNewMaxUnavailable(int value) { - return (A)withMaxUnavailable(new IntOrString(value)); - } - public A withNewMaxUnavailable(String value) { - return (A)withMaxUnavailable(new IntOrString(value)); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RollingUpdateDaemonSetFluentImpl that = (V1RollingUpdateDaemonSetFluentImpl) o; - if (!java.util.Objects.equals(maxSurge, that.maxSurge)) return false; - - if (!java.util.Objects.equals(maxUnavailable, that.maxUnavailable)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(maxSurge, maxUnavailable, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (maxSurge != null) { sb.append("maxSurge:"); sb.append(maxSurge + ","); } - if (maxUnavailable != null) { sb.append("maxUnavailable:"); sb.append(maxUnavailable); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentBuilder.java index 4ad4935b7f..14e05d6d99 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RollingUpdateDeploymentBuilder extends V1RollingUpdateDeploymentFluentImpl implements VisitableBuilder{ +public class V1RollingUpdateDeploymentBuilder extends V1RollingUpdateDeploymentFluent implements VisitableBuilder{ public V1RollingUpdateDeploymentBuilder() { - this(false); - } - public V1RollingUpdateDeploymentBuilder(Boolean validationEnabled) { - this(new V1RollingUpdateDeployment(), validationEnabled); + this(new V1RollingUpdateDeployment()); } + public V1RollingUpdateDeploymentBuilder(V1RollingUpdateDeploymentFluent fluent) { - this(fluent, false); - } - public V1RollingUpdateDeploymentBuilder(V1RollingUpdateDeploymentFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RollingUpdateDeployment(), validationEnabled); + this(fluent, new V1RollingUpdateDeployment()); } + public V1RollingUpdateDeploymentBuilder(V1RollingUpdateDeploymentFluent fluent,V1RollingUpdateDeployment instance) { - this(fluent, instance, false); - } - public V1RollingUpdateDeploymentBuilder(V1RollingUpdateDeploymentFluent fluent,V1RollingUpdateDeployment instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMaxSurge(instance.getMaxSurge()); - fluent.withMaxUnavailable(instance.getMaxUnavailable()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RollingUpdateDeploymentBuilder(V1RollingUpdateDeployment instance) { - this(instance,false); - } - public V1RollingUpdateDeploymentBuilder(V1RollingUpdateDeployment instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMaxSurge(instance.getMaxSurge()); - this.withMaxUnavailable(instance.getMaxUnavailable()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RollingUpdateDeploymentFluent fluent; - Boolean validationEnabled; + public V1RollingUpdateDeployment build() { V1RollingUpdateDeployment buildable = new V1RollingUpdateDeployment(); buildable.setMaxSurge(fluent.getMaxSurge()); @@ -46,4 +28,5 @@ public V1RollingUpdateDeployment build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentFluent.java index 4d294ce5e9..82cbfbbe84 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentFluent.java @@ -1,24 +1,97 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.custom.IntOrString; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1RollingUpdateDeploymentFluent> extends Fluent{ - public IntOrString getMaxSurge(); - public A withMaxSurge(IntOrString maxSurge); - public Boolean hasMaxSurge(); - public A withNewMaxSurge(int value); - public A withNewMaxSurge(String value); - public IntOrString getMaxUnavailable(); - public A withMaxUnavailable(IntOrString maxUnavailable); - public Boolean hasMaxUnavailable(); - public A withNewMaxUnavailable(int value); - public A withNewMaxUnavailable(String value); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RollingUpdateDeploymentFluent> extends BaseFluent{ + public V1RollingUpdateDeploymentFluent() { + } + public V1RollingUpdateDeploymentFluent(V1RollingUpdateDeployment instance) { + this.copyInstance(instance); + } + private IntOrString maxSurge; + private IntOrString maxUnavailable; + + protected void copyInstance(V1RollingUpdateDeployment instance) { + instance = (instance != null ? instance : new V1RollingUpdateDeployment()); + if (instance != null) { + this.withMaxSurge(instance.getMaxSurge()); + this.withMaxUnavailable(instance.getMaxUnavailable()); + } + } + + public IntOrString getMaxSurge() { + return this.maxSurge; + } + + public A withMaxSurge(IntOrString maxSurge) { + this.maxSurge = maxSurge; + return (A) this; + } + + public boolean hasMaxSurge() { + return this.maxSurge != null; + } + + public A withNewMaxSurge(int value) { + return (A)withMaxSurge(new IntOrString(value)); + } + + public A withNewMaxSurge(String value) { + return (A)withMaxSurge(new IntOrString(value)); + } + + public IntOrString getMaxUnavailable() { + return this.maxUnavailable; + } + + public A withMaxUnavailable(IntOrString maxUnavailable) { + this.maxUnavailable = maxUnavailable; + return (A) this; + } + + public boolean hasMaxUnavailable() { + return this.maxUnavailable != null; + } + + public A withNewMaxUnavailable(int value) { + return (A)withMaxUnavailable(new IntOrString(value)); + } + + public A withNewMaxUnavailable(String value) { + return (A)withMaxUnavailable(new IntOrString(value)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RollingUpdateDeploymentFluent that = (V1RollingUpdateDeploymentFluent) o; + if (!java.util.Objects.equals(maxSurge, that.maxSurge)) return false; + if (!java.util.Objects.equals(maxUnavailable, that.maxUnavailable)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(maxSurge, maxUnavailable, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (maxSurge != null) { sb.append("maxSurge:"); sb.append(maxSurge + ","); } + if (maxUnavailable != null) { sb.append("maxUnavailable:"); sb.append(maxUnavailable); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentFluentImpl.java deleted file mode 100644 index 79ef900d5b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateDeploymentFluentImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.custom.IntOrString; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RollingUpdateDeploymentFluentImpl> extends BaseFluent implements V1RollingUpdateDeploymentFluent{ - public V1RollingUpdateDeploymentFluentImpl() { - } - public V1RollingUpdateDeploymentFluentImpl(V1RollingUpdateDeployment instance) { - if (instance != null) { - this.withMaxSurge(instance.getMaxSurge()); - this.withMaxUnavailable(instance.getMaxUnavailable()); - } - } - private IntOrString maxSurge; - private IntOrString maxUnavailable; - public IntOrString getMaxSurge() { - return this.maxSurge; - } - public A withMaxSurge(IntOrString maxSurge) { - this.maxSurge=maxSurge; return (A) this; - } - public Boolean hasMaxSurge() { - return this.maxSurge != null; - } - public A withNewMaxSurge(int value) { - return (A)withMaxSurge(new IntOrString(value)); - } - public A withNewMaxSurge(String value) { - return (A)withMaxSurge(new IntOrString(value)); - } - public IntOrString getMaxUnavailable() { - return this.maxUnavailable; - } - public A withMaxUnavailable(IntOrString maxUnavailable) { - this.maxUnavailable=maxUnavailable; return (A) this; - } - public Boolean hasMaxUnavailable() { - return this.maxUnavailable != null; - } - public A withNewMaxUnavailable(int value) { - return (A)withMaxUnavailable(new IntOrString(value)); - } - public A withNewMaxUnavailable(String value) { - return (A)withMaxUnavailable(new IntOrString(value)); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RollingUpdateDeploymentFluentImpl that = (V1RollingUpdateDeploymentFluentImpl) o; - if (!java.util.Objects.equals(maxSurge, that.maxSurge)) return false; - - if (!java.util.Objects.equals(maxUnavailable, that.maxUnavailable)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(maxSurge, maxUnavailable, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (maxSurge != null) { sb.append("maxSurge:"); sb.append(maxSurge + ","); } - if (maxUnavailable != null) { sb.append("maxUnavailable:"); sb.append(maxUnavailable); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyBuilder.java index 5020b2c9b3..dd1f6a065b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RollingUpdateStatefulSetStrategyBuilder extends V1RollingUpdateStatefulSetStrategyFluentImpl implements VisitableBuilder{ +public class V1RollingUpdateStatefulSetStrategyBuilder extends V1RollingUpdateStatefulSetStrategyFluent implements VisitableBuilder{ public V1RollingUpdateStatefulSetStrategyBuilder() { - this(false); - } - public V1RollingUpdateStatefulSetStrategyBuilder(Boolean validationEnabled) { - this(new V1RollingUpdateStatefulSetStrategy(), validationEnabled); + this(new V1RollingUpdateStatefulSetStrategy()); } + public V1RollingUpdateStatefulSetStrategyBuilder(V1RollingUpdateStatefulSetStrategyFluent fluent) { - this(fluent, false); - } - public V1RollingUpdateStatefulSetStrategyBuilder(V1RollingUpdateStatefulSetStrategyFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RollingUpdateStatefulSetStrategy(), validationEnabled); + this(fluent, new V1RollingUpdateStatefulSetStrategy()); } + public V1RollingUpdateStatefulSetStrategyBuilder(V1RollingUpdateStatefulSetStrategyFluent fluent,V1RollingUpdateStatefulSetStrategy instance) { - this(fluent, instance, false); - } - public V1RollingUpdateStatefulSetStrategyBuilder(V1RollingUpdateStatefulSetStrategyFluent fluent,V1RollingUpdateStatefulSetStrategy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMaxUnavailable(instance.getMaxUnavailable()); - fluent.withPartition(instance.getPartition()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RollingUpdateStatefulSetStrategyBuilder(V1RollingUpdateStatefulSetStrategy instance) { - this(instance,false); - } - public V1RollingUpdateStatefulSetStrategyBuilder(V1RollingUpdateStatefulSetStrategy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMaxUnavailable(instance.getMaxUnavailable()); - this.withPartition(instance.getPartition()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RollingUpdateStatefulSetStrategyFluent fluent; - Boolean validationEnabled; + public V1RollingUpdateStatefulSetStrategy build() { V1RollingUpdateStatefulSetStrategy buildable = new V1RollingUpdateStatefulSetStrategy(); buildable.setMaxUnavailable(fluent.getMaxUnavailable()); @@ -46,4 +28,5 @@ public V1RollingUpdateStatefulSetStrategy build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyFluent.java index 733f3838ca..ce8d066ff8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyFluent.java @@ -2,22 +2,89 @@ import java.lang.Integer; import io.kubernetes.client.custom.IntOrString; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1RollingUpdateStatefulSetStrategyFluent> extends Fluent{ - public IntOrString getMaxUnavailable(); - public A withMaxUnavailable(IntOrString maxUnavailable); - public Boolean hasMaxUnavailable(); - public A withNewMaxUnavailable(int value); - public A withNewMaxUnavailable(String value); - public Integer getPartition(); - public A withPartition(Integer partition); - public Boolean hasPartition(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RollingUpdateStatefulSetStrategyFluent> extends BaseFluent{ + public V1RollingUpdateStatefulSetStrategyFluent() { + } + public V1RollingUpdateStatefulSetStrategyFluent(V1RollingUpdateStatefulSetStrategy instance) { + this.copyInstance(instance); + } + private IntOrString maxUnavailable; + private Integer partition; + + protected void copyInstance(V1RollingUpdateStatefulSetStrategy instance) { + instance = (instance != null ? instance : new V1RollingUpdateStatefulSetStrategy()); + if (instance != null) { + this.withMaxUnavailable(instance.getMaxUnavailable()); + this.withPartition(instance.getPartition()); + } + } + + public IntOrString getMaxUnavailable() { + return this.maxUnavailable; + } + + public A withMaxUnavailable(IntOrString maxUnavailable) { + this.maxUnavailable = maxUnavailable; + return (A) this; + } + + public boolean hasMaxUnavailable() { + return this.maxUnavailable != null; + } + + public A withNewMaxUnavailable(int value) { + return (A)withMaxUnavailable(new IntOrString(value)); + } + + public A withNewMaxUnavailable(String value) { + return (A)withMaxUnavailable(new IntOrString(value)); + } + + public Integer getPartition() { + return this.partition; + } + + public A withPartition(Integer partition) { + this.partition = partition; + return (A) this; + } + + public boolean hasPartition() { + return this.partition != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RollingUpdateStatefulSetStrategyFluent that = (V1RollingUpdateStatefulSetStrategyFluent) o; + if (!java.util.Objects.equals(maxUnavailable, that.maxUnavailable)) return false; + if (!java.util.Objects.equals(partition, that.partition)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(maxUnavailable, partition, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (maxUnavailable != null) { sb.append("maxUnavailable:"); sb.append(maxUnavailable + ","); } + if (partition != null) { sb.append("partition:"); sb.append(partition); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyFluentImpl.java deleted file mode 100644 index 35d19bbd8f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RollingUpdateStatefulSetStrategyFluentImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import io.kubernetes.client.custom.IntOrString; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RollingUpdateStatefulSetStrategyFluentImpl> extends BaseFluent implements V1RollingUpdateStatefulSetStrategyFluent{ - public V1RollingUpdateStatefulSetStrategyFluentImpl() { - } - public V1RollingUpdateStatefulSetStrategyFluentImpl(V1RollingUpdateStatefulSetStrategy instance) { - if (instance != null) { - this.withMaxUnavailable(instance.getMaxUnavailable()); - this.withPartition(instance.getPartition()); - } - } - private IntOrString maxUnavailable; - private Integer partition; - public IntOrString getMaxUnavailable() { - return this.maxUnavailable; - } - public A withMaxUnavailable(IntOrString maxUnavailable) { - this.maxUnavailable=maxUnavailable; return (A) this; - } - public Boolean hasMaxUnavailable() { - return this.maxUnavailable != null; - } - public A withNewMaxUnavailable(int value) { - return (A)withMaxUnavailable(new IntOrString(value)); - } - public A withNewMaxUnavailable(String value) { - return (A)withMaxUnavailable(new IntOrString(value)); - } - public Integer getPartition() { - return this.partition; - } - public A withPartition(Integer partition) { - this.partition=partition; return (A) this; - } - public Boolean hasPartition() { - return this.partition != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RollingUpdateStatefulSetStrategyFluentImpl that = (V1RollingUpdateStatefulSetStrategyFluentImpl) o; - if (!java.util.Objects.equals(maxUnavailable, that.maxUnavailable)) return false; - - if (!java.util.Objects.equals(partition, that.partition)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(maxUnavailable, partition, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (maxUnavailable != null) { sb.append("maxUnavailable:"); sb.append(maxUnavailable + ","); } - if (partition != null) { sb.append("partition:"); sb.append(partition); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsBuilder.java index e176da65f2..c0d8b6b5ee 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RuleWithOperationsBuilder extends V1RuleWithOperationsFluentImpl implements VisitableBuilder{ +public class V1RuleWithOperationsBuilder extends V1RuleWithOperationsFluent implements VisitableBuilder{ public V1RuleWithOperationsBuilder() { - this(false); - } - public V1RuleWithOperationsBuilder(Boolean validationEnabled) { - this(new V1RuleWithOperations(), validationEnabled); + this(new V1RuleWithOperations()); } + public V1RuleWithOperationsBuilder(V1RuleWithOperationsFluent fluent) { - this(fluent, false); - } - public V1RuleWithOperationsBuilder(V1RuleWithOperationsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RuleWithOperations(), validationEnabled); + this(fluent, new V1RuleWithOperations()); } + public V1RuleWithOperationsBuilder(V1RuleWithOperationsFluent fluent,V1RuleWithOperations instance) { - this(fluent, instance, false); - } - public V1RuleWithOperationsBuilder(V1RuleWithOperationsFluent fluent,V1RuleWithOperations instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroups(instance.getApiGroups()); - fluent.withApiVersions(instance.getApiVersions()); - fluent.withOperations(instance.getOperations()); - fluent.withResources(instance.getResources()); - fluent.withScope(instance.getScope()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RuleWithOperationsBuilder(V1RuleWithOperations instance) { - this(instance,false); - } - public V1RuleWithOperationsBuilder(V1RuleWithOperations instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withApiVersions(instance.getApiVersions()); - this.withOperations(instance.getOperations()); - this.withResources(instance.getResources()); - this.withScope(instance.getScope()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RuleWithOperationsFluent fluent; - Boolean validationEnabled; + public V1RuleWithOperations build() { V1RuleWithOperations buildable = new V1RuleWithOperations(); buildable.setApiGroups(fluent.getApiGroups()); @@ -55,4 +31,5 @@ public V1RuleWithOperations build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsFluent.java index c902103623..39fcea9908 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsFluent.java @@ -1,80 +1,459 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1RuleWithOperationsFluent> extends Fluent{ - public A addToApiGroups(int index,String item); - public A setToApiGroups(int index,String item); - public A addToApiGroups(java.lang.String... items); - public A addAllToApiGroups(Collection items); - public A removeFromApiGroups(java.lang.String... items); - public A removeAllFromApiGroups(Collection items); - public List getApiGroups(); - public String getApiGroup(int index); - public String getFirstApiGroup(); - public String getLastApiGroup(); - public String getMatchingApiGroup(Predicate predicate); - public Boolean hasMatchingApiGroup(Predicate predicate); - public A withApiGroups(List apiGroups); - public A withApiGroups(java.lang.String... apiGroups); - public Boolean hasApiGroups(); - public A addToApiVersions(int index,String item); - public A setToApiVersions(int index,String item); - public A addToApiVersions(java.lang.String... items); - public A addAllToApiVersions(Collection items); - public A removeFromApiVersions(java.lang.String... items); - public A removeAllFromApiVersions(Collection items); - public List getApiVersions(); - public String getApiVersion(int index); - public String getFirstApiVersion(); - public String getLastApiVersion(); - public String getMatchingApiVersion(Predicate predicate); - public Boolean hasMatchingApiVersion(Predicate predicate); - public A withApiVersions(List apiVersions); - public A withApiVersions(java.lang.String... apiVersions); - public Boolean hasApiVersions(); - public A addToOperations(int index,String item); - public A setToOperations(int index,String item); - public A addToOperations(java.lang.String... items); - public A addAllToOperations(Collection items); - public A removeFromOperations(java.lang.String... items); - public A removeAllFromOperations(Collection items); - public List getOperations(); - public String getOperation(int index); - public String getFirstOperation(); - public String getLastOperation(); - public String getMatchingOperation(Predicate predicate); - public Boolean hasMatchingOperation(Predicate predicate); - public A withOperations(List operations); - public A withOperations(java.lang.String... operations); - public Boolean hasOperations(); - public A addToResources(int index,String item); - public A setToResources(int index,String item); - public A addToResources(java.lang.String... items); - public A addAllToResources(Collection items); - public A removeFromResources(java.lang.String... items); - public A removeAllFromResources(Collection items); - public List getResources(); - public String getResource(int index); - public String getFirstResource(); - public String getLastResource(); - public String getMatchingResource(Predicate predicate); - public Boolean hasMatchingResource(Predicate predicate); - public A withResources(List resources); - public A withResources(java.lang.String... resources); - public Boolean hasResources(); - public String getScope(); - public A withScope(String scope); - public Boolean hasScope(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RuleWithOperationsFluent> extends BaseFluent{ + public V1RuleWithOperationsFluent() { + } + public V1RuleWithOperationsFluent(V1RuleWithOperations instance) { + this.copyInstance(instance); + } + private List apiGroups; + private List apiVersions; + private List operations; + private List resources; + private String scope; + + protected void copyInstance(V1RuleWithOperations instance) { + instance = (instance != null ? instance : new V1RuleWithOperations()); + if (instance != null) { + this.withApiGroups(instance.getApiGroups()); + this.withApiVersions(instance.getApiVersions()); + this.withOperations(instance.getOperations()); + this.withResources(instance.getResources()); + this.withScope(instance.getScope()); + } + } + + public A addToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.add(index, item); + return (A)this; + } + + public A setToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.set(index, item); return (A)this; + } + + public A addToApiGroups(java.lang.String... items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A addAllToApiGroups(Collection items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A removeFromApiGroups(java.lang.String... items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public A removeAllFromApiGroups(Collection items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public List getApiGroups() { + return this.apiGroups; + } + + public String getApiGroup(int index) { + return this.apiGroups.get(index); + } + + public String getFirstApiGroup() { + return this.apiGroups.get(0); + } + + public String getLastApiGroup() { + return this.apiGroups.get(apiGroups.size() - 1); + } + + public String getMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withApiGroups(List apiGroups) { + if (apiGroups != null) { + this.apiGroups = new ArrayList(); + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } else { + this.apiGroups = null; + } + return (A) this; + } + + public A withApiGroups(java.lang.String... apiGroups) { + if (this.apiGroups != null) { + this.apiGroups.clear(); + _visitables.remove("apiGroups"); + } + if (apiGroups != null) { + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } + return (A) this; + } + + public boolean hasApiGroups() { + return this.apiGroups != null && !this.apiGroups.isEmpty(); + } + + public A addToApiVersions(int index,String item) { + if (this.apiVersions == null) {this.apiVersions = new ArrayList();} + this.apiVersions.add(index, item); + return (A)this; + } + + public A setToApiVersions(int index,String item) { + if (this.apiVersions == null) {this.apiVersions = new ArrayList();} + this.apiVersions.set(index, item); return (A)this; + } + + public A addToApiVersions(java.lang.String... items) { + if (this.apiVersions == null) {this.apiVersions = new ArrayList();} + for (String item : items) {this.apiVersions.add(item);} return (A)this; + } + + public A addAllToApiVersions(Collection items) { + if (this.apiVersions == null) {this.apiVersions = new ArrayList();} + for (String item : items) {this.apiVersions.add(item);} return (A)this; + } + + public A removeFromApiVersions(java.lang.String... items) { + if (this.apiVersions == null) return (A)this; + for (String item : items) { this.apiVersions.remove(item);} return (A)this; + } + + public A removeAllFromApiVersions(Collection items) { + if (this.apiVersions == null) return (A)this; + for (String item : items) { this.apiVersions.remove(item);} return (A)this; + } + + public List getApiVersions() { + return this.apiVersions; + } + + public String getApiVersion(int index) { + return this.apiVersions.get(index); + } + + public String getFirstApiVersion() { + return this.apiVersions.get(0); + } + + public String getLastApiVersion() { + return this.apiVersions.get(apiVersions.size() - 1); + } + + public String getMatchingApiVersion(Predicate predicate) { + for (String item : apiVersions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingApiVersion(Predicate predicate) { + for (String item : apiVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withApiVersions(List apiVersions) { + if (apiVersions != null) { + this.apiVersions = new ArrayList(); + for (String item : apiVersions) { + this.addToApiVersions(item); + } + } else { + this.apiVersions = null; + } + return (A) this; + } + + public A withApiVersions(java.lang.String... apiVersions) { + if (this.apiVersions != null) { + this.apiVersions.clear(); + _visitables.remove("apiVersions"); + } + if (apiVersions != null) { + for (String item : apiVersions) { + this.addToApiVersions(item); + } + } + return (A) this; + } + + public boolean hasApiVersions() { + return this.apiVersions != null && !this.apiVersions.isEmpty(); + } + + public A addToOperations(int index,String item) { + if (this.operations == null) {this.operations = new ArrayList();} + this.operations.add(index, item); + return (A)this; + } + + public A setToOperations(int index,String item) { + if (this.operations == null) {this.operations = new ArrayList();} + this.operations.set(index, item); return (A)this; + } + + public A addToOperations(java.lang.String... items) { + if (this.operations == null) {this.operations = new ArrayList();} + for (String item : items) {this.operations.add(item);} return (A)this; + } + + public A addAllToOperations(Collection items) { + if (this.operations == null) {this.operations = new ArrayList();} + for (String item : items) {this.operations.add(item);} return (A)this; + } + + public A removeFromOperations(java.lang.String... items) { + if (this.operations == null) return (A)this; + for (String item : items) { this.operations.remove(item);} return (A)this; + } + + public A removeAllFromOperations(Collection items) { + if (this.operations == null) return (A)this; + for (String item : items) { this.operations.remove(item);} return (A)this; + } + + public List getOperations() { + return this.operations; + } + + public String getOperation(int index) { + return this.operations.get(index); + } + + public String getFirstOperation() { + return this.operations.get(0); + } + + public String getLastOperation() { + return this.operations.get(operations.size() - 1); + } + + public String getMatchingOperation(Predicate predicate) { + for (String item : operations) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingOperation(Predicate predicate) { + for (String item : operations) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withOperations(List operations) { + if (operations != null) { + this.operations = new ArrayList(); + for (String item : operations) { + this.addToOperations(item); + } + } else { + this.operations = null; + } + return (A) this; + } + + public A withOperations(java.lang.String... operations) { + if (this.operations != null) { + this.operations.clear(); + _visitables.remove("operations"); + } + if (operations != null) { + for (String item : operations) { + this.addToOperations(item); + } + } + return (A) this; + } + + public boolean hasOperations() { + return this.operations != null && !this.operations.isEmpty(); + } + + public A addToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.add(index, item); + return (A)this; + } + + public A setToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.set(index, item); return (A)this; + } + + public A addToResources(java.lang.String... items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A addAllToResources(Collection items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A removeFromResources(java.lang.String... items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public A removeAllFromResources(Collection items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public List getResources() { + return this.resources; + } + + public String getResource(int index) { + return this.resources.get(index); + } + + public String getFirstResource() { + return this.resources.get(0); + } + + public String getLastResource() { + return this.resources.get(resources.size() - 1); + } + + public String getMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResources(List resources) { + if (resources != null) { + this.resources = new ArrayList(); + for (String item : resources) { + this.addToResources(item); + } + } else { + this.resources = null; + } + return (A) this; + } + + public A withResources(java.lang.String... resources) { + if (this.resources != null) { + this.resources.clear(); + _visitables.remove("resources"); + } + if (resources != null) { + for (String item : resources) { + this.addToResources(item); + } + } + return (A) this; + } + + public boolean hasResources() { + return this.resources != null && !this.resources.isEmpty(); + } + + public String getScope() { + return this.scope; + } + + public A withScope(String scope) { + this.scope = scope; + return (A) this; + } + + public boolean hasScope() { + return this.scope != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RuleWithOperationsFluent that = (V1RuleWithOperationsFluent) o; + if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; + if (!java.util.Objects.equals(apiVersions, that.apiVersions)) return false; + if (!java.util.Objects.equals(operations, that.operations)) return false; + if (!java.util.Objects.equals(resources, that.resources)) return false; + if (!java.util.Objects.equals(scope, that.scope)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroups, apiVersions, operations, resources, scope, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } + if (apiVersions != null && !apiVersions.isEmpty()) { sb.append("apiVersions:"); sb.append(apiVersions + ","); } + if (operations != null && !operations.isEmpty()) { sb.append("operations:"); sb.append(operations + ","); } + if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } + if (scope != null) { sb.append("scope:"); sb.append(scope); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsFluentImpl.java deleted file mode 100644 index abd6b7b1d9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuleWithOperationsFluentImpl.java +++ /dev/null @@ -1,279 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RuleWithOperationsFluentImpl> extends BaseFluent implements V1RuleWithOperationsFluent{ - public V1RuleWithOperationsFluentImpl() { - } - public V1RuleWithOperationsFluentImpl(V1RuleWithOperations instance) { - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withApiVersions(instance.getApiVersions()); - this.withOperations(instance.getOperations()); - this.withResources(instance.getResources()); - this.withScope(instance.getScope()); - } - } - private List apiGroups; - private List apiVersions; - private List operations; - private List resources; - private String scope; - public A addToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.add(index, item); - return (A)this; - } - public A setToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.set(index, item); return (A)this; - } - public A addToApiGroups(java.lang.String... items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A addAllToApiGroups(Collection items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A removeFromApiGroups(java.lang.String... items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public A removeAllFromApiGroups(Collection items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public List getApiGroups() { - return this.apiGroups; - } - public String getApiGroup(int index) { - return this.apiGroups.get(index); - } - public String getFirstApiGroup() { - return this.apiGroups.get(0); - } - public String getLastApiGroup() { - return this.apiGroups.get(apiGroups.size() - 1); - } - public String getMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return true;} } return false; - } - public A withApiGroups(List apiGroups) { - if (apiGroups != null) {this.apiGroups = new ArrayList(); for (String item : apiGroups){this.addToApiGroups(item);}} else { this.apiGroups = null;} return (A) this; - } - public A withApiGroups(java.lang.String... apiGroups) { - if (this.apiGroups != null) {this.apiGroups.clear(); _visitables.remove("apiGroups"); } - if (apiGroups != null) {for (String item :apiGroups){ this.addToApiGroups(item);}} return (A) this; - } - public Boolean hasApiGroups() { - return apiGroups != null && !apiGroups.isEmpty(); - } - public A addToApiVersions(int index,String item) { - if (this.apiVersions == null) {this.apiVersions = new ArrayList();} - this.apiVersions.add(index, item); - return (A)this; - } - public A setToApiVersions(int index,String item) { - if (this.apiVersions == null) {this.apiVersions = new ArrayList();} - this.apiVersions.set(index, item); return (A)this; - } - public A addToApiVersions(java.lang.String... items) { - if (this.apiVersions == null) {this.apiVersions = new ArrayList();} - for (String item : items) {this.apiVersions.add(item);} return (A)this; - } - public A addAllToApiVersions(Collection items) { - if (this.apiVersions == null) {this.apiVersions = new ArrayList();} - for (String item : items) {this.apiVersions.add(item);} return (A)this; - } - public A removeFromApiVersions(java.lang.String... items) { - for (String item : items) {if (this.apiVersions!= null){ this.apiVersions.remove(item);}} return (A)this; - } - public A removeAllFromApiVersions(Collection items) { - for (String item : items) {if (this.apiVersions!= null){ this.apiVersions.remove(item);}} return (A)this; - } - public List getApiVersions() { - return this.apiVersions; - } - public String getApiVersion(int index) { - return this.apiVersions.get(index); - } - public String getFirstApiVersion() { - return this.apiVersions.get(0); - } - public String getLastApiVersion() { - return this.apiVersions.get(apiVersions.size() - 1); - } - public String getMatchingApiVersion(Predicate predicate) { - for (String item: apiVersions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingApiVersion(Predicate predicate) { - for (String item: apiVersions) { if(predicate.test(item)){ return true;} } return false; - } - public A withApiVersions(List apiVersions) { - if (apiVersions != null) {this.apiVersions = new ArrayList(); for (String item : apiVersions){this.addToApiVersions(item);}} else { this.apiVersions = null;} return (A) this; - } - public A withApiVersions(java.lang.String... apiVersions) { - if (this.apiVersions != null) {this.apiVersions.clear(); _visitables.remove("apiVersions"); } - if (apiVersions != null) {for (String item :apiVersions){ this.addToApiVersions(item);}} return (A) this; - } - public Boolean hasApiVersions() { - return apiVersions != null && !apiVersions.isEmpty(); - } - public A addToOperations(int index,String item) { - if (this.operations == null) {this.operations = new ArrayList();} - this.operations.add(index, item); - return (A)this; - } - public A setToOperations(int index,String item) { - if (this.operations == null) {this.operations = new ArrayList();} - this.operations.set(index, item); return (A)this; - } - public A addToOperations(java.lang.String... items) { - if (this.operations == null) {this.operations = new ArrayList();} - for (String item : items) {this.operations.add(item);} return (A)this; - } - public A addAllToOperations(Collection items) { - if (this.operations == null) {this.operations = new ArrayList();} - for (String item : items) {this.operations.add(item);} return (A)this; - } - public A removeFromOperations(java.lang.String... items) { - for (String item : items) {if (this.operations!= null){ this.operations.remove(item);}} return (A)this; - } - public A removeAllFromOperations(Collection items) { - for (String item : items) {if (this.operations!= null){ this.operations.remove(item);}} return (A)this; - } - public List getOperations() { - return this.operations; - } - public String getOperation(int index) { - return this.operations.get(index); - } - public String getFirstOperation() { - return this.operations.get(0); - } - public String getLastOperation() { - return this.operations.get(operations.size() - 1); - } - public String getMatchingOperation(Predicate predicate) { - for (String item: operations) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingOperation(Predicate predicate) { - for (String item: operations) { if(predicate.test(item)){ return true;} } return false; - } - public A withOperations(List operations) { - if (operations != null) {this.operations = new ArrayList(); for (String item : operations){this.addToOperations(item);}} else { this.operations = null;} return (A) this; - } - public A withOperations(java.lang.String... operations) { - if (this.operations != null) {this.operations.clear(); _visitables.remove("operations"); } - if (operations != null) {for (String item :operations){ this.addToOperations(item);}} return (A) this; - } - public Boolean hasOperations() { - return operations != null && !operations.isEmpty(); - } - public A addToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.add(index, item); - return (A)this; - } - public A setToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.set(index, item); return (A)this; - } - public A addToResources(java.lang.String... items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A addAllToResources(Collection items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A removeFromResources(java.lang.String... items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public A removeAllFromResources(Collection items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public List getResources() { - return this.resources; - } - public String getResource(int index) { - return this.resources.get(index); - } - public String getFirstResource() { - return this.resources.get(0); - } - public String getLastResource() { - return this.resources.get(resources.size() - 1); - } - public String getMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return true;} } return false; - } - public A withResources(List resources) { - if (resources != null) {this.resources = new ArrayList(); for (String item : resources){this.addToResources(item);}} else { this.resources = null;} return (A) this; - } - public A withResources(java.lang.String... resources) { - if (this.resources != null) {this.resources.clear(); _visitables.remove("resources"); } - if (resources != null) {for (String item :resources){ this.addToResources(item);}} return (A) this; - } - public Boolean hasResources() { - return resources != null && !resources.isEmpty(); - } - public String getScope() { - return this.scope; - } - public A withScope(String scope) { - this.scope=scope; return (A) this; - } - public Boolean hasScope() { - return this.scope != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RuleWithOperationsFluentImpl that = (V1RuleWithOperationsFluentImpl) o; - if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; - - if (!java.util.Objects.equals(apiVersions, that.apiVersions)) return false; - - if (!java.util.Objects.equals(operations, that.operations)) return false; - - if (!java.util.Objects.equals(resources, that.resources)) return false; - - if (!java.util.Objects.equals(scope, that.scope)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroups, apiVersions, operations, resources, scope, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } - if (apiVersions != null && !apiVersions.isEmpty()) { sb.append("apiVersions:"); sb.append(apiVersions + ","); } - if (operations != null && !operations.isEmpty()) { sb.append("operations:"); sb.append(operations + ","); } - if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } - if (scope != null) { sb.append("scope:"); sb.append(scope); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassBuilder.java index 102c2ee4fd..4a6e60709a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RuntimeClassBuilder extends V1RuntimeClassFluentImpl implements VisitableBuilder{ +public class V1RuntimeClassBuilder extends V1RuntimeClassFluent implements VisitableBuilder{ public V1RuntimeClassBuilder() { - this(false); - } - public V1RuntimeClassBuilder(Boolean validationEnabled) { - this(new V1RuntimeClass(), validationEnabled); + this(new V1RuntimeClass()); } + public V1RuntimeClassBuilder(V1RuntimeClassFluent fluent) { - this(fluent, false); - } - public V1RuntimeClassBuilder(V1RuntimeClassFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RuntimeClass(), validationEnabled); + this(fluent, new V1RuntimeClass()); } + public V1RuntimeClassBuilder(V1RuntimeClassFluent fluent,V1RuntimeClass instance) { - this(fluent, instance, false); - } - public V1RuntimeClassBuilder(V1RuntimeClassFluent fluent,V1RuntimeClass instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withHandler(instance.getHandler()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withOverhead(instance.getOverhead()); - fluent.withScheduling(instance.getScheduling()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RuntimeClassBuilder(V1RuntimeClass instance) { - this(instance,false); - } - public V1RuntimeClassBuilder(V1RuntimeClass instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withHandler(instance.getHandler()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withOverhead(instance.getOverhead()); - this.withScheduling(instance.getScheduling()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RuntimeClassFluent fluent; - Boolean validationEnabled; + public V1RuntimeClass build() { V1RuntimeClass buildable = new V1RuntimeClass(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setHandler(fluent.getHandler()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setOverhead(fluent.getOverhead()); - buildable.setScheduling(fluent.getScheduling()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setOverhead(fluent.buildOverhead()); + buildable.setScheduling(fluent.buildScheduling()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassFluent.java index 67fe75aefc..1c607dbad4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassFluent.java @@ -1,84 +1,277 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1RuntimeClassFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getHandler(); - public A withHandler(String handler); - public Boolean hasHandler(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1RuntimeClassFluent.MetadataNested withNewMetadata(); - public V1RuntimeClassFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1RuntimeClassFluent.MetadataNested editMetadata(); - public V1RuntimeClassFluent.MetadataNested editOrNewMetadata(); - public V1RuntimeClassFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildOverhead instead. - * @return The buildable object. - */ - @Deprecated - public V1Overhead getOverhead(); - public V1Overhead buildOverhead(); - public A withOverhead(V1Overhead overhead); - public Boolean hasOverhead(); - public V1RuntimeClassFluent.OverheadNested withNewOverhead(); - public V1RuntimeClassFluent.OverheadNested withNewOverheadLike(V1Overhead item); - public V1RuntimeClassFluent.OverheadNested editOverhead(); - public V1RuntimeClassFluent.OverheadNested editOrNewOverhead(); - public V1RuntimeClassFluent.OverheadNested editOrNewOverheadLike(V1Overhead item); - - /** - * This method has been deprecated, please use method buildScheduling instead. - * @return The buildable object. - */ - @Deprecated - public V1Scheduling getScheduling(); - public V1Scheduling buildScheduling(); - public A withScheduling(V1Scheduling scheduling); - public Boolean hasScheduling(); - public V1RuntimeClassFluent.SchedulingNested withNewScheduling(); - public V1RuntimeClassFluent.SchedulingNested withNewSchedulingLike(V1Scheduling item); - public V1RuntimeClassFluent.SchedulingNested editScheduling(); - public V1RuntimeClassFluent.SchedulingNested editOrNewScheduling(); - public V1RuntimeClassFluent.SchedulingNested editOrNewSchedulingLike(V1Scheduling item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RuntimeClassFluent> extends BaseFluent{ + public V1RuntimeClassFluent() { + } + + public V1RuntimeClassFluent(V1RuntimeClass instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String handler; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1OverheadBuilder overhead; + private V1SchedulingBuilder scheduling; + + protected void copyInstance(V1RuntimeClass instance) { + instance = (instance != null ? instance : new V1RuntimeClass()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withHandler(instance.getHandler()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withOverhead(instance.getOverhead()); + this.withScheduling(instance.getScheduling()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getHandler() { + return this.handler; + } + + public A withHandler(String handler) { + this.handler = handler; + return (A) this; + } + + public boolean hasHandler() { + return this.handler != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1Overhead buildOverhead() { + return this.overhead != null ? this.overhead.build() : null; + } + + public A withOverhead(V1Overhead overhead) { + this._visitables.remove("overhead"); + if (overhead != null) { + this.overhead = new V1OverheadBuilder(overhead); + this._visitables.get("overhead").add(this.overhead); + } else { + this.overhead = null; + this._visitables.get("overhead").remove(this.overhead); + } + return (A) this; + } + + public boolean hasOverhead() { + return this.overhead != null; + } + + public OverheadNested withNewOverhead() { + return new OverheadNested(null); + } + + public OverheadNested withNewOverheadLike(V1Overhead item) { + return new OverheadNested(item); + } + + public OverheadNested editOverhead() { + return withNewOverheadLike(java.util.Optional.ofNullable(buildOverhead()).orElse(null)); + } + + public OverheadNested editOrNewOverhead() { + return withNewOverheadLike(java.util.Optional.ofNullable(buildOverhead()).orElse(new V1OverheadBuilder().build())); + } + + public OverheadNested editOrNewOverheadLike(V1Overhead item) { + return withNewOverheadLike(java.util.Optional.ofNullable(buildOverhead()).orElse(item)); + } + + public V1Scheduling buildScheduling() { + return this.scheduling != null ? this.scheduling.build() : null; + } + + public A withScheduling(V1Scheduling scheduling) { + this._visitables.remove("scheduling"); + if (scheduling != null) { + this.scheduling = new V1SchedulingBuilder(scheduling); + this._visitables.get("scheduling").add(this.scheduling); + } else { + this.scheduling = null; + this._visitables.get("scheduling").remove(this.scheduling); + } + return (A) this; + } + + public boolean hasScheduling() { + return this.scheduling != null; + } + + public SchedulingNested withNewScheduling() { + return new SchedulingNested(null); + } + + public SchedulingNested withNewSchedulingLike(V1Scheduling item) { + return new SchedulingNested(item); + } + + public SchedulingNested editScheduling() { + return withNewSchedulingLike(java.util.Optional.ofNullable(buildScheduling()).orElse(null)); + } + + public SchedulingNested editOrNewScheduling() { + return withNewSchedulingLike(java.util.Optional.ofNullable(buildScheduling()).orElse(new V1SchedulingBuilder().build())); + } + + public SchedulingNested editOrNewSchedulingLike(V1Scheduling item) { + return withNewSchedulingLike(java.util.Optional.ofNullable(buildScheduling()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RuntimeClassFluent that = (V1RuntimeClassFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(handler, that.handler)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(overhead, that.overhead)) return false; + if (!java.util.Objects.equals(scheduling, that.scheduling)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, handler, kind, metadata, overhead, scheduling, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (handler != null) { sb.append("handler:"); sb.append(handler + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (overhead != null) { sb.append("overhead:"); sb.append(overhead + ","); } + if (scheduling != null) { sb.append("scheduling:"); sb.append(scheduling); } + sb.append("}"); + return sb.toString(); } - public interface OverheadNested extends Nested,V1OverheadFluent>{ - public N and(); - public N endOverhead(); + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + public N and() { + return (N) V1RuntimeClassFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } - public interface SchedulingNested extends Nested,V1SchedulingFluent>{ - public N and(); - public N endScheduling(); + public class OverheadNested extends V1OverheadFluent> implements Nested{ + OverheadNested(V1Overhead item) { + this.builder = new V1OverheadBuilder(this, item); + } + V1OverheadBuilder builder; + public N and() { + return (N) V1RuntimeClassFluent.this.withOverhead(builder.build()); + } + + public N endOverhead() { + return and(); + } + + } + public class SchedulingNested extends V1SchedulingFluent> implements Nested{ + SchedulingNested(V1Scheduling item) { + this.builder = new V1SchedulingBuilder(this, item); + } + V1SchedulingBuilder builder; + + public N and() { + return (N) V1RuntimeClassFluent.this.withScheduling(builder.build()); + } + + public N endScheduling() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassFluentImpl.java deleted file mode 100644 index 893acfe570..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassFluentImpl.java +++ /dev/null @@ -1,246 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RuntimeClassFluentImpl> extends BaseFluent implements V1RuntimeClassFluent{ - public V1RuntimeClassFluentImpl() { - } - public V1RuntimeClassFluentImpl(V1RuntimeClass instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withHandler(instance.getHandler()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withOverhead(instance.getOverhead()); - this.withScheduling(instance.getScheduling()); - } - } - private String apiVersion; - private String handler; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1OverheadBuilder overhead; - private V1SchedulingBuilder scheduling; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getHandler() { - return this.handler; - } - public A withHandler(String handler) { - this.handler=handler; return (A) this; - } - public Boolean hasHandler() { - return this.handler != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1RuntimeClassFluentImpl.MetadataNested withNewMetadata() { - return new V1RuntimeClassFluentImpl.MetadataNestedImpl(); - } - public V1RuntimeClassFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1RuntimeClassFluentImpl.MetadataNestedImpl(item); - } - public V1RuntimeClassFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1RuntimeClassFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1RuntimeClassFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildOverhead instead. - * @return The buildable object. - */ - @Deprecated - public V1Overhead getOverhead() { - return this.overhead!=null ?this.overhead.build():null; - } - public V1Overhead buildOverhead() { - return this.overhead!=null ?this.overhead.build():null; - } - public A withOverhead(V1Overhead overhead) { - _visitables.get("overhead").remove(this.overhead); - if (overhead!=null){ this.overhead= new V1OverheadBuilder(overhead); _visitables.get("overhead").add(this.overhead);} else { this.overhead = null; _visitables.get("overhead").remove(this.overhead); } return (A) this; - } - public Boolean hasOverhead() { - return this.overhead != null; - } - public V1RuntimeClassFluentImpl.OverheadNested withNewOverhead() { - return new V1RuntimeClassFluentImpl.OverheadNestedImpl(); - } - public V1RuntimeClassFluentImpl.OverheadNested withNewOverheadLike(V1Overhead item) { - return new V1RuntimeClassFluentImpl.OverheadNestedImpl(item); - } - public V1RuntimeClassFluentImpl.OverheadNested editOverhead() { - return withNewOverheadLike(getOverhead()); - } - public V1RuntimeClassFluentImpl.OverheadNested editOrNewOverhead() { - return withNewOverheadLike(getOverhead() != null ? getOverhead(): new V1OverheadBuilder().build()); - } - public V1RuntimeClassFluentImpl.OverheadNested editOrNewOverheadLike(V1Overhead item) { - return withNewOverheadLike(getOverhead() != null ? getOverhead(): item); - } - - /** - * This method has been deprecated, please use method buildScheduling instead. - * @return The buildable object. - */ - @Deprecated - public V1Scheduling getScheduling() { - return this.scheduling!=null ?this.scheduling.build():null; - } - public V1Scheduling buildScheduling() { - return this.scheduling!=null ?this.scheduling.build():null; - } - public A withScheduling(V1Scheduling scheduling) { - _visitables.get("scheduling").remove(this.scheduling); - if (scheduling!=null){ this.scheduling= new V1SchedulingBuilder(scheduling); _visitables.get("scheduling").add(this.scheduling);} else { this.scheduling = null; _visitables.get("scheduling").remove(this.scheduling); } return (A) this; - } - public Boolean hasScheduling() { - return this.scheduling != null; - } - public V1RuntimeClassFluentImpl.SchedulingNested withNewScheduling() { - return new V1RuntimeClassFluentImpl.SchedulingNestedImpl(); - } - public V1RuntimeClassFluentImpl.SchedulingNested withNewSchedulingLike(V1Scheduling item) { - return new V1RuntimeClassFluentImpl.SchedulingNestedImpl(item); - } - public V1RuntimeClassFluentImpl.SchedulingNested editScheduling() { - return withNewSchedulingLike(getScheduling()); - } - public V1RuntimeClassFluentImpl.SchedulingNested editOrNewScheduling() { - return withNewSchedulingLike(getScheduling() != null ? getScheduling(): new V1SchedulingBuilder().build()); - } - public V1RuntimeClassFluentImpl.SchedulingNested editOrNewSchedulingLike(V1Scheduling item) { - return withNewSchedulingLike(getScheduling() != null ? getScheduling(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RuntimeClassFluentImpl that = (V1RuntimeClassFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(handler, that.handler)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(overhead, that.overhead)) return false; - - if (!java.util.Objects.equals(scheduling, that.scheduling)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, handler, kind, metadata, overhead, scheduling, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (handler != null) { sb.append("handler:"); sb.append(handler + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (overhead != null) { sb.append("overhead:"); sb.append(overhead + ","); } - if (scheduling != null) { sb.append("scheduling:"); sb.append(scheduling); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1RuntimeClassFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1RuntimeClassFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class OverheadNestedImpl extends V1OverheadFluentImpl> implements V1RuntimeClassFluentImpl.OverheadNested,Nested{ - OverheadNestedImpl(V1Overhead item) { - this.builder = new V1OverheadBuilder(this, item); - } - OverheadNestedImpl() { - this.builder = new V1OverheadBuilder(this); - } - V1OverheadBuilder builder; - public N and() { - return (N) V1RuntimeClassFluentImpl.this.withOverhead(builder.build()); - } - public N endOverhead() { - return and(); - } - - } - class SchedulingNestedImpl extends V1SchedulingFluentImpl> implements V1RuntimeClassFluentImpl.SchedulingNested,Nested{ - SchedulingNestedImpl(V1Scheduling item) { - this.builder = new V1SchedulingBuilder(this, item); - } - SchedulingNestedImpl() { - this.builder = new V1SchedulingBuilder(this); - } - V1SchedulingBuilder builder; - public N and() { - return (N) V1RuntimeClassFluentImpl.this.withScheduling(builder.build()); - } - public N endScheduling() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListBuilder.java index 9f50c9e0bb..8486bb68ef 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1RuntimeClassListBuilder extends V1RuntimeClassListFluentImpl implements VisitableBuilder{ +public class V1RuntimeClassListBuilder extends V1RuntimeClassListFluent implements VisitableBuilder{ public V1RuntimeClassListBuilder() { - this(false); - } - public V1RuntimeClassListBuilder(Boolean validationEnabled) { - this(new V1RuntimeClassList(), validationEnabled); + this(new V1RuntimeClassList()); } + public V1RuntimeClassListBuilder(V1RuntimeClassListFluent fluent) { - this(fluent, false); - } - public V1RuntimeClassListBuilder(V1RuntimeClassListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1RuntimeClassList(), validationEnabled); + this(fluent, new V1RuntimeClassList()); } + public V1RuntimeClassListBuilder(V1RuntimeClassListFluent fluent,V1RuntimeClassList instance) { - this(fluent, instance, false); - } - public V1RuntimeClassListBuilder(V1RuntimeClassListFluent fluent,V1RuntimeClassList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1RuntimeClassListBuilder(V1RuntimeClassList instance) { - this(instance,false); - } - public V1RuntimeClassListBuilder(V1RuntimeClassList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1RuntimeClassListFluent fluent; - Boolean validationEnabled; + public V1RuntimeClassList build() { V1RuntimeClassList buildable = new V1RuntimeClassList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListFluent.java index c57ed36282..87f8164969 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1RuntimeClassListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1RuntimeClass item); - public A setToItems(int index,V1RuntimeClass item); - public A addToItems(io.kubernetes.client.openapi.models.V1RuntimeClass... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1RuntimeClass... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1RuntimeClass buildItem(int index); - public V1RuntimeClass buildFirstItem(); - public V1RuntimeClass buildLastItem(); - public V1RuntimeClass buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1RuntimeClass... items); - public Boolean hasItems(); - public V1RuntimeClassListFluent.ItemsNested addNewItem(); - public V1RuntimeClassListFluent.ItemsNested addNewItemLike(V1RuntimeClass item); - public V1RuntimeClassListFluent.ItemsNested setNewItemLike(int index,V1RuntimeClass item); - public V1RuntimeClassListFluent.ItemsNested editItem(int index); - public V1RuntimeClassListFluent.ItemsNested editFirstItem(); - public V1RuntimeClassListFluent.ItemsNested editLastItem(); - public V1RuntimeClassListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1RuntimeClassListFluent.MetadataNested withNewMetadata(); - public V1RuntimeClassListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1RuntimeClassListFluent.MetadataNested editMetadata(); - public V1RuntimeClassListFluent.MetadataNested editOrNewMetadata(); - public V1RuntimeClassListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1RuntimeClassFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1RuntimeClassListFluent> extends BaseFluent{ + public V1RuntimeClassListFluent() { + } + + public V1RuntimeClassListFluent(V1RuntimeClassList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1RuntimeClassList instance) { + instance = (instance != null ? instance : new V1RuntimeClassList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1RuntimeClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1RuntimeClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1RuntimeClass... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1RuntimeClass item : items) {V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1RuntimeClass item : items) {V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1RuntimeClass... items) { + if (this.items == null) return (A)this; + for (V1RuntimeClass item : items) {V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1RuntimeClass item : items) {V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1RuntimeClassBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1RuntimeClass buildItem(int index) { + return this.items.get(index).build(); + } + + public V1RuntimeClass buildFirstItem() { + return this.items.get(0).build(); + } + + public V1RuntimeClass buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1RuntimeClass buildMatchingItem(Predicate predicate) { + for (V1RuntimeClassBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1RuntimeClassBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1RuntimeClass item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1RuntimeClass... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1RuntimeClass item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1RuntimeClass item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1RuntimeClass item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1RuntimeClassListFluent that = (V1RuntimeClassListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1RuntimeClassFluent> implements Nested{ + ItemsNested(int index,V1RuntimeClass item) { + this.index = index; + this.builder = new V1RuntimeClassBuilder(this, item); + } + V1RuntimeClassBuilder builder; + int index; + public N and() { + return (N) V1RuntimeClassListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1RuntimeClassListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListFluentImpl.java deleted file mode 100644 index ba38d70692..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1RuntimeClassListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1RuntimeClassListFluentImpl> extends BaseFluent implements V1RuntimeClassListFluent{ - public V1RuntimeClassListFluentImpl() { - } - public V1RuntimeClassListFluentImpl(V1RuntimeClassList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1RuntimeClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1RuntimeClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1RuntimeClass... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1RuntimeClass item : items) {V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1RuntimeClass item : items) {V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1RuntimeClass... items) { - for (V1RuntimeClass item : items) {V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1RuntimeClass item : items) {V1RuntimeClassBuilder builder = new V1RuntimeClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1RuntimeClassBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1RuntimeClass buildItem(int index) { - return this.items.get(index).build(); - } - public V1RuntimeClass buildFirstItem() { - return this.items.get(0).build(); - } - public V1RuntimeClass buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1RuntimeClass buildMatchingItem(Predicate predicate) { - for (V1RuntimeClassBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1RuntimeClassBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1RuntimeClass item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1RuntimeClass... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1RuntimeClass item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1RuntimeClassListFluentImpl.ItemsNested addNewItem() { - return new V1RuntimeClassListFluentImpl.ItemsNestedImpl(); - } - public V1RuntimeClassListFluentImpl.ItemsNested addNewItemLike(V1RuntimeClass item) { - return new V1RuntimeClassListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1RuntimeClassListFluentImpl.ItemsNested setNewItemLike(int index,V1RuntimeClass item) { - return new V1RuntimeClassListFluentImpl.ItemsNestedImpl(index, item); - } - public V1RuntimeClassListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1RuntimeClassListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1RuntimeClassListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1RuntimeClassListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1RuntimeClassListFluentImpl.MetadataNestedImpl(); - } - public V1RuntimeClassListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1RuntimeClassListFluentImpl.MetadataNestedImpl(item); - } - public V1RuntimeClassListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1RuntimeClassListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1RuntimeClassListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1RuntimeClassListFluentImpl that = (V1RuntimeClassListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1RuntimeClassFluentImpl> implements V1RuntimeClassListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1RuntimeClass item) { - this.index = index; - this.builder = new V1RuntimeClassBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1RuntimeClassBuilder(this); - } - V1RuntimeClassBuilder builder; - int index; - public N and() { - return (N) V1RuntimeClassListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1RuntimeClassListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1RuntimeClassListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsBuilder.java index 38463d5968..87dede1097 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SELinuxOptionsBuilder extends V1SELinuxOptionsFluentImpl implements VisitableBuilder{ +public class V1SELinuxOptionsBuilder extends V1SELinuxOptionsFluent implements VisitableBuilder{ public V1SELinuxOptionsBuilder() { - this(false); - } - public V1SELinuxOptionsBuilder(Boolean validationEnabled) { - this(new V1SELinuxOptions(), validationEnabled); + this(new V1SELinuxOptions()); } + public V1SELinuxOptionsBuilder(V1SELinuxOptionsFluent fluent) { - this(fluent, false); - } - public V1SELinuxOptionsBuilder(V1SELinuxOptionsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SELinuxOptions(), validationEnabled); + this(fluent, new V1SELinuxOptions()); } + public V1SELinuxOptionsBuilder(V1SELinuxOptionsFluent fluent,V1SELinuxOptions instance) { - this(fluent, instance, false); - } - public V1SELinuxOptionsBuilder(V1SELinuxOptionsFluent fluent,V1SELinuxOptions instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLevel(instance.getLevel()); - fluent.withRole(instance.getRole()); - fluent.withType(instance.getType()); - fluent.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SELinuxOptionsBuilder(V1SELinuxOptions instance) { - this(instance,false); - } - public V1SELinuxOptionsBuilder(V1SELinuxOptions instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLevel(instance.getLevel()); - this.withRole(instance.getRole()); - this.withType(instance.getType()); - this.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SELinuxOptionsFluent fluent; - Boolean validationEnabled; + public V1SELinuxOptions build() { V1SELinuxOptions buildable = new V1SELinuxOptions(); buildable.setLevel(fluent.getLevel()); @@ -52,4 +30,5 @@ public V1SELinuxOptions build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsFluent.java index 3db016bf10..1283c5736c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsFluent.java @@ -1,25 +1,114 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1SELinuxOptionsFluent> extends Fluent{ - public String getLevel(); - public A withLevel(String level); - public Boolean hasLevel(); - public String getRole(); - public A withRole(String role); - public Boolean hasRole(); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public String getUser(); - public A withUser(String user); - public Boolean hasUser(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SELinuxOptionsFluent> extends BaseFluent{ + public V1SELinuxOptionsFluent() { + } + public V1SELinuxOptionsFluent(V1SELinuxOptions instance) { + this.copyInstance(instance); + } + private String level; + private String role; + private String type; + private String user; + + protected void copyInstance(V1SELinuxOptions instance) { + instance = (instance != null ? instance : new V1SELinuxOptions()); + if (instance != null) { + this.withLevel(instance.getLevel()); + this.withRole(instance.getRole()); + this.withType(instance.getType()); + this.withUser(instance.getUser()); + } + } + + public String getLevel() { + return this.level; + } + + public A withLevel(String level) { + this.level = level; + return (A) this; + } + + public boolean hasLevel() { + return this.level != null; + } + + public String getRole() { + return this.role; + } + + public A withRole(String role) { + this.role = role; + return (A) this; + } + + public boolean hasRole() { + return this.role != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public String getUser() { + return this.user; + } + + public A withUser(String user) { + this.user = user; + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SELinuxOptionsFluent that = (V1SELinuxOptionsFluent) o; + if (!java.util.Objects.equals(level, that.level)) return false; + if (!java.util.Objects.equals(role, that.role)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(level, role, type, user, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (level != null) { sb.append("level:"); sb.append(level + ","); } + if (role != null) { sb.append("role:"); sb.append(role + ","); } + if (type != null) { sb.append("type:"); sb.append(type + ","); } + if (user != null) { sb.append("user:"); sb.append(user); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsFluentImpl.java deleted file mode 100644 index 4c5c47e559..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SELinuxOptionsFluentImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SELinuxOptionsFluentImpl> extends BaseFluent implements V1SELinuxOptionsFluent{ - public V1SELinuxOptionsFluentImpl() { - } - public V1SELinuxOptionsFluentImpl(V1SELinuxOptions instance) { - if (instance != null) { - this.withLevel(instance.getLevel()); - this.withRole(instance.getRole()); - this.withType(instance.getType()); - this.withUser(instance.getUser()); - } - } - private String level; - private String role; - private String type; - private String user; - public String getLevel() { - return this.level; - } - public A withLevel(String level) { - this.level=level; return (A) this; - } - public Boolean hasLevel() { - return this.level != null; - } - public String getRole() { - return this.role; - } - public A withRole(String role) { - this.role=role; return (A) this; - } - public Boolean hasRole() { - return this.role != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public String getUser() { - return this.user; - } - public A withUser(String user) { - this.user=user; return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SELinuxOptionsFluentImpl that = (V1SELinuxOptionsFluentImpl) o; - if (!java.util.Objects.equals(level, that.level)) return false; - - if (!java.util.Objects.equals(role, that.role)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(level, role, type, user, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (level != null) { sb.append("level:"); sb.append(level + ","); } - if (role != null) { sb.append("role:"); sb.append(role + ","); } - if (type != null) { sb.append("type:"); sb.append(type + ","); } - if (user != null) { sb.append("user:"); sb.append(user); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleBuilder.java index 5fab71b816..a4657fcd2b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ScaleBuilder extends V1ScaleFluentImpl implements VisitableBuilder{ +public class V1ScaleBuilder extends V1ScaleFluent implements VisitableBuilder{ public V1ScaleBuilder() { - this(false); - } - public V1ScaleBuilder(Boolean validationEnabled) { - this(new V1Scale(), validationEnabled); + this(new V1Scale()); } + public V1ScaleBuilder(V1ScaleFluent fluent) { - this(fluent, false); - } - public V1ScaleBuilder(V1ScaleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Scale(), validationEnabled); + this(fluent, new V1Scale()); } + public V1ScaleBuilder(V1ScaleFluent fluent,V1Scale instance) { - this(fluent, instance, false); - } - public V1ScaleBuilder(V1ScaleFluent fluent,V1Scale instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ScaleBuilder(V1Scale instance) { - this(instance,false); - } - public V1ScaleBuilder(V1Scale instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ScaleFluent fluent; - Boolean validationEnabled; + public V1Scale build() { V1Scale buildable = new V1Scale(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleFluent.java index f50dbd37bf..2ecd469dc4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1ScaleFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ScaleFluent.MetadataNested withNewMetadata(); - public V1ScaleFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ScaleFluent.MetadataNested editMetadata(); - public V1ScaleFluent.MetadataNested editOrNewMetadata(); - public V1ScaleFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ScaleSpec getSpec(); - public V1ScaleSpec buildSpec(); - public A withSpec(V1ScaleSpec spec); - public Boolean hasSpec(); - public V1ScaleFluent.SpecNested withNewSpec(); - public V1ScaleFluent.SpecNested withNewSpecLike(V1ScaleSpec item); - public V1ScaleFluent.SpecNested editSpec(); - public V1ScaleFluent.SpecNested editOrNewSpec(); - public V1ScaleFluent.SpecNested editOrNewSpecLike(V1ScaleSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ScaleStatus getStatus(); - public V1ScaleStatus buildStatus(); - public A withStatus(V1ScaleStatus status); - public Boolean hasStatus(); - public V1ScaleFluent.StatusNested withNewStatus(); - public V1ScaleFluent.StatusNested withNewStatusLike(V1ScaleStatus item); - public V1ScaleFluent.StatusNested editStatus(); - public V1ScaleFluent.StatusNested editOrNewStatus(); - public V1ScaleFluent.StatusNested editOrNewStatusLike(V1ScaleStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ScaleFluent> extends BaseFluent{ + public V1ScaleFluent() { + } + + public V1ScaleFluent(V1Scale instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1ScaleSpecBuilder spec; + private V1ScaleStatusBuilder status; + + protected void copyInstance(V1Scale instance) { + instance = (instance != null ? instance : new V1Scale()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1ScaleSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1ScaleSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1ScaleSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1ScaleSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1ScaleSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1ScaleSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1ScaleSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1ScaleStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1ScaleStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1ScaleStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1ScaleStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1ScaleStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1ScaleStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ScaleFluent that = (V1ScaleFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ScaleFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1ScaleStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1ScaleSpecFluent> implements Nested{ + SpecNested(V1ScaleSpec item) { + this.builder = new V1ScaleSpecBuilder(this, item); + } + V1ScaleSpecBuilder builder; + + public N and() { + return (N) V1ScaleFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1ScaleStatusFluent> implements Nested{ + StatusNested(V1ScaleStatus item) { + this.builder = new V1ScaleStatusBuilder(this, item); + } + V1ScaleStatusBuilder builder; + + public N and() { + return (N) V1ScaleFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleFluentImpl.java deleted file mode 100644 index f791466110..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ScaleFluentImpl> extends BaseFluent implements V1ScaleFluent{ - public V1ScaleFluentImpl() { - } - public V1ScaleFluentImpl(V1Scale instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1ScaleSpecBuilder spec; - private V1ScaleStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ScaleFluentImpl.MetadataNested withNewMetadata() { - return new V1ScaleFluentImpl.MetadataNestedImpl(); - } - public V1ScaleFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ScaleFluentImpl.MetadataNestedImpl(item); - } - public V1ScaleFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ScaleFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ScaleFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ScaleSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1ScaleSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1ScaleSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1ScaleSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1ScaleFluentImpl.SpecNested withNewSpec() { - return new V1ScaleFluentImpl.SpecNestedImpl(); - } - public V1ScaleFluentImpl.SpecNested withNewSpecLike(V1ScaleSpec item) { - return new V1ScaleFluentImpl.SpecNestedImpl(item); - } - public V1ScaleFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1ScaleFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1ScaleSpecBuilder().build()); - } - public V1ScaleFluentImpl.SpecNested editOrNewSpecLike(V1ScaleSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ScaleStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1ScaleStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1ScaleStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1ScaleStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1ScaleFluentImpl.StatusNested withNewStatus() { - return new V1ScaleFluentImpl.StatusNestedImpl(); - } - public V1ScaleFluentImpl.StatusNested withNewStatusLike(V1ScaleStatus item) { - return new V1ScaleFluentImpl.StatusNestedImpl(item); - } - public V1ScaleFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1ScaleFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1ScaleStatusBuilder().build()); - } - public V1ScaleFluentImpl.StatusNested editOrNewStatusLike(V1ScaleStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ScaleFluentImpl that = (V1ScaleFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ScaleFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ScaleFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1ScaleSpecFluentImpl> implements V1ScaleFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1ScaleSpec item) { - this.builder = new V1ScaleSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1ScaleSpecBuilder(this); - } - V1ScaleSpecBuilder builder; - public N and() { - return (N) V1ScaleFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1ScaleStatusFluentImpl> implements V1ScaleFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1ScaleStatus item) { - this.builder = new V1ScaleStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1ScaleStatusBuilder(this); - } - V1ScaleStatusBuilder builder; - public N and() { - return (N) V1ScaleFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceBuilder.java index 53e862db80..c4c41cc940 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceBuilder.java @@ -1,67 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ScaleIOPersistentVolumeSourceBuilder extends V1ScaleIOPersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1ScaleIOPersistentVolumeSourceBuilder extends V1ScaleIOPersistentVolumeSourceFluent implements VisitableBuilder{ public V1ScaleIOPersistentVolumeSourceBuilder() { - this(false); - } - public V1ScaleIOPersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1ScaleIOPersistentVolumeSource(), validationEnabled); + this(new V1ScaleIOPersistentVolumeSource()); } + public V1ScaleIOPersistentVolumeSourceBuilder(V1ScaleIOPersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1ScaleIOPersistentVolumeSourceBuilder(V1ScaleIOPersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ScaleIOPersistentVolumeSource(), validationEnabled); + this(fluent, new V1ScaleIOPersistentVolumeSource()); } + public V1ScaleIOPersistentVolumeSourceBuilder(V1ScaleIOPersistentVolumeSourceFluent fluent,V1ScaleIOPersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1ScaleIOPersistentVolumeSourceBuilder(V1ScaleIOPersistentVolumeSourceFluent fluent,V1ScaleIOPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withGateway(instance.getGateway()); - fluent.withProtectionDomain(instance.getProtectionDomain()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withSslEnabled(instance.getSslEnabled()); - fluent.withStorageMode(instance.getStorageMode()); - fluent.withStoragePool(instance.getStoragePool()); - fluent.withSystem(instance.getSystem()); - fluent.withVolumeName(instance.getVolumeName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ScaleIOPersistentVolumeSourceBuilder(V1ScaleIOPersistentVolumeSource instance) { - this(instance,false); - } - public V1ScaleIOPersistentVolumeSourceBuilder(V1ScaleIOPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withGateway(instance.getGateway()); - this.withProtectionDomain(instance.getProtectionDomain()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withSslEnabled(instance.getSslEnabled()); - this.withStorageMode(instance.getStorageMode()); - this.withStoragePool(instance.getStoragePool()); - this.withSystem(instance.getSystem()); - this.withVolumeName(instance.getVolumeName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ScaleIOPersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1ScaleIOPersistentVolumeSource build() { V1ScaleIOPersistentVolumeSource buildable = new V1ScaleIOPersistentVolumeSource(); buildable.setFsType(fluent.getFsType()); buildable.setGateway(fluent.getGateway()); buildable.setProtectionDomain(fluent.getProtectionDomain()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setSslEnabled(fluent.getSslEnabled()); buildable.setStorageMode(fluent.getStorageMode()); buildable.setStoragePool(fluent.getStoragePool()); @@ -70,4 +36,5 @@ public V1ScaleIOPersistentVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceFluent.java index 5b633eb22d..f38035752e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceFluent.java @@ -1,64 +1,268 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; - /** - * Generated - */ -public interface V1ScaleIOPersistentVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getGateway(); - public A withGateway(String gateway); - public Boolean hasGateway(); - public String getProtectionDomain(); - public A withProtectionDomain(String protectionDomain); - public Boolean hasProtectionDomain(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef(); - public V1SecretReference buildSecretRef(); - public A withSecretRef(V1SecretReference secretRef); - public Boolean hasSecretRef(); - public V1ScaleIOPersistentVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1ScaleIOPersistentVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1SecretReference item); - public V1ScaleIOPersistentVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1ScaleIOPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1ScaleIOPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1SecretReference item); - public Boolean getSslEnabled(); - public A withSslEnabled(Boolean sslEnabled); - public Boolean hasSslEnabled(); - public String getStorageMode(); - public A withStorageMode(String storageMode); - public Boolean hasStorageMode(); - public String getStoragePool(); - public A withStoragePool(String storagePool); - public Boolean hasStoragePool(); - public String getSystem(); - public A withSystem(String system); - public Boolean hasSystem(); - public String getVolumeName(); - public A withVolumeName(String volumeName); - public Boolean hasVolumeName(); - public A withReadOnly(); - public A withSslEnabled(); - public interface SecretRefNested extends Nested,V1SecretReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ScaleIOPersistentVolumeSourceFluent> extends BaseFluent{ + public V1ScaleIOPersistentVolumeSourceFluent() { + } + + public V1ScaleIOPersistentVolumeSourceFluent(V1ScaleIOPersistentVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private String gateway; + private String protectionDomain; + private Boolean readOnly; + private V1SecretReferenceBuilder secretRef; + private Boolean sslEnabled; + private String storageMode; + private String storagePool; + private String system; + private String volumeName; + + protected void copyInstance(V1ScaleIOPersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1ScaleIOPersistentVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withGateway(instance.getGateway()); + this.withProtectionDomain(instance.getProtectionDomain()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withSslEnabled(instance.getSslEnabled()); + this.withStorageMode(instance.getStorageMode()); + this.withStoragePool(instance.getStoragePool()); + this.withSystem(instance.getSystem()); + this.withVolumeName(instance.getVolumeName()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getGateway() { + return this.gateway; + } + + public A withGateway(String gateway) { + this.gateway = gateway; + return (A) this; + } + + public boolean hasGateway() { + return this.gateway != null; + } + + public String getProtectionDomain() { + return this.protectionDomain; + } + + public A withProtectionDomain(String protectionDomain) { + this.protectionDomain = protectionDomain; + return (A) this; + } + + public boolean hasProtectionDomain() { + return this.protectionDomain != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1SecretReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1SecretReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1SecretReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1SecretReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1SecretReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); } + public Boolean getSslEnabled() { + return this.sslEnabled; + } + + public A withSslEnabled(Boolean sslEnabled) { + this.sslEnabled = sslEnabled; + return (A) this; + } + + public boolean hasSslEnabled() { + return this.sslEnabled != null; + } + + public String getStorageMode() { + return this.storageMode; + } + + public A withStorageMode(String storageMode) { + this.storageMode = storageMode; + return (A) this; + } + + public boolean hasStorageMode() { + return this.storageMode != null; + } + + public String getStoragePool() { + return this.storagePool; + } + + public A withStoragePool(String storagePool) { + this.storagePool = storagePool; + return (A) this; + } + + public boolean hasStoragePool() { + return this.storagePool != null; + } + + public String getSystem() { + return this.system; + } + + public A withSystem(String system) { + this.system = system; + return (A) this; + } + + public boolean hasSystem() { + return this.system != null; + } + + public String getVolumeName() { + return this.volumeName; + } + + public A withVolumeName(String volumeName) { + this.volumeName = volumeName; + return (A) this; + } + + public boolean hasVolumeName() { + return this.volumeName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ScaleIOPersistentVolumeSourceFluent that = (V1ScaleIOPersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(gateway, that.gateway)) return false; + if (!java.util.Objects.equals(protectionDomain, that.protectionDomain)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(sslEnabled, that.sslEnabled)) return false; + if (!java.util.Objects.equals(storageMode, that.storageMode)) return false; + if (!java.util.Objects.equals(storagePool, that.storagePool)) return false; + if (!java.util.Objects.equals(system, that.system)) return false; + if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, gateway, protectionDomain, readOnly, secretRef, sslEnabled, storageMode, storagePool, system, volumeName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (gateway != null) { sb.append("gateway:"); sb.append(gateway + ","); } + if (protectionDomain != null) { sb.append("protectionDomain:"); sb.append(protectionDomain + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (sslEnabled != null) { sb.append("sslEnabled:"); sb.append(sslEnabled + ","); } + if (storageMode != null) { sb.append("storageMode:"); sb.append(storageMode + ","); } + if (storagePool != null) { sb.append("storagePool:"); sb.append(storagePool + ","); } + if (system != null) { sb.append("system:"); sb.append(system + ","); } + if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + public A withSslEnabled() { + return withSslEnabled(true); + } + public class SecretRefNested extends V1SecretReferenceFluent> implements Nested{ + SecretRefNested(V1SecretReference item) { + this.builder = new V1SecretReferenceBuilder(this, item); + } + V1SecretReferenceBuilder builder; + + public N and() { + return (N) V1ScaleIOPersistentVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceFluentImpl.java deleted file mode 100644 index f3a6794d93..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOPersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ScaleIOPersistentVolumeSourceFluentImpl> extends BaseFluent implements V1ScaleIOPersistentVolumeSourceFluent{ - public V1ScaleIOPersistentVolumeSourceFluentImpl() { - } - public V1ScaleIOPersistentVolumeSourceFluentImpl(V1ScaleIOPersistentVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withGateway(instance.getGateway()); - this.withProtectionDomain(instance.getProtectionDomain()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withSslEnabled(instance.getSslEnabled()); - this.withStorageMode(instance.getStorageMode()); - this.withStoragePool(instance.getStoragePool()); - this.withSystem(instance.getSystem()); - this.withVolumeName(instance.getVolumeName()); - } - } - private String fsType; - private String gateway; - private String protectionDomain; - private Boolean readOnly; - private V1SecretReferenceBuilder secretRef; - private Boolean sslEnabled; - private String storageMode; - private String storagePool; - private String system; - private String volumeName; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getGateway() { - return this.gateway; - } - public A withGateway(String gateway) { - this.gateway=gateway; return (A) this; - } - public Boolean hasGateway() { - return this.gateway != null; - } - public String getProtectionDomain() { - return this.protectionDomain; - } - public A withProtectionDomain(String protectionDomain) { - this.protectionDomain=protectionDomain; return (A) this; - } - public Boolean hasProtectionDomain() { - return this.protectionDomain != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1SecretReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1SecretReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1SecretReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1ScaleIOPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1ScaleIOPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1ScaleIOPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1SecretReference item) { - return new V1ScaleIOPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1ScaleIOPersistentVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1ScaleIOPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1SecretReferenceBuilder().build()); - } - public V1ScaleIOPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1SecretReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public Boolean getSslEnabled() { - return this.sslEnabled; - } - public A withSslEnabled(Boolean sslEnabled) { - this.sslEnabled=sslEnabled; return (A) this; - } - public Boolean hasSslEnabled() { - return this.sslEnabled != null; - } - public String getStorageMode() { - return this.storageMode; - } - public A withStorageMode(String storageMode) { - this.storageMode=storageMode; return (A) this; - } - public Boolean hasStorageMode() { - return this.storageMode != null; - } - public String getStoragePool() { - return this.storagePool; - } - public A withStoragePool(String storagePool) { - this.storagePool=storagePool; return (A) this; - } - public Boolean hasStoragePool() { - return this.storagePool != null; - } - public String getSystem() { - return this.system; - } - public A withSystem(String system) { - this.system=system; return (A) this; - } - public Boolean hasSystem() { - return this.system != null; - } - public String getVolumeName() { - return this.volumeName; - } - public A withVolumeName(String volumeName) { - this.volumeName=volumeName; return (A) this; - } - public Boolean hasVolumeName() { - return this.volumeName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ScaleIOPersistentVolumeSourceFluentImpl that = (V1ScaleIOPersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(gateway, that.gateway)) return false; - - if (!java.util.Objects.equals(protectionDomain, that.protectionDomain)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(sslEnabled, that.sslEnabled)) return false; - - if (!java.util.Objects.equals(storageMode, that.storageMode)) return false; - - if (!java.util.Objects.equals(storagePool, that.storagePool)) return false; - - if (!java.util.Objects.equals(system, that.system)) return false; - - if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, gateway, protectionDomain, readOnly, secretRef, sslEnabled, storageMode, storagePool, system, volumeName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (gateway != null) { sb.append("gateway:"); sb.append(gateway + ","); } - if (protectionDomain != null) { sb.append("protectionDomain:"); sb.append(protectionDomain + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (sslEnabled != null) { sb.append("sslEnabled:"); sb.append(sslEnabled + ","); } - if (storageMode != null) { sb.append("storageMode:"); sb.append(storageMode + ","); } - if (storagePool != null) { sb.append("storagePool:"); sb.append(storagePool + ","); } - if (system != null) { sb.append("system:"); sb.append(system + ","); } - if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - public A withSslEnabled() { - return withSslEnabled(true); - } - class SecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1ScaleIOPersistentVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1SecretReference item) { - this.builder = new V1SecretReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1SecretReferenceBuilder(this); - } - V1SecretReferenceBuilder builder; - public N and() { - return (N) V1ScaleIOPersistentVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceBuilder.java index 288e02014b..1470252a33 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceBuilder.java @@ -1,67 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ScaleIOVolumeSourceBuilder extends V1ScaleIOVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1ScaleIOVolumeSourceBuilder extends V1ScaleIOVolumeSourceFluent implements VisitableBuilder{ public V1ScaleIOVolumeSourceBuilder() { - this(false); - } - public V1ScaleIOVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1ScaleIOVolumeSource(), validationEnabled); + this(new V1ScaleIOVolumeSource()); } + public V1ScaleIOVolumeSourceBuilder(V1ScaleIOVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1ScaleIOVolumeSourceBuilder(V1ScaleIOVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ScaleIOVolumeSource(), validationEnabled); + this(fluent, new V1ScaleIOVolumeSource()); } + public V1ScaleIOVolumeSourceBuilder(V1ScaleIOVolumeSourceFluent fluent,V1ScaleIOVolumeSource instance) { - this(fluent, instance, false); - } - public V1ScaleIOVolumeSourceBuilder(V1ScaleIOVolumeSourceFluent fluent,V1ScaleIOVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withGateway(instance.getGateway()); - fluent.withProtectionDomain(instance.getProtectionDomain()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withSslEnabled(instance.getSslEnabled()); - fluent.withStorageMode(instance.getStorageMode()); - fluent.withStoragePool(instance.getStoragePool()); - fluent.withSystem(instance.getSystem()); - fluent.withVolumeName(instance.getVolumeName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ScaleIOVolumeSourceBuilder(V1ScaleIOVolumeSource instance) { - this(instance,false); - } - public V1ScaleIOVolumeSourceBuilder(V1ScaleIOVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withGateway(instance.getGateway()); - this.withProtectionDomain(instance.getProtectionDomain()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withSslEnabled(instance.getSslEnabled()); - this.withStorageMode(instance.getStorageMode()); - this.withStoragePool(instance.getStoragePool()); - this.withSystem(instance.getSystem()); - this.withVolumeName(instance.getVolumeName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ScaleIOVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1ScaleIOVolumeSource build() { V1ScaleIOVolumeSource buildable = new V1ScaleIOVolumeSource(); buildable.setFsType(fluent.getFsType()); buildable.setGateway(fluent.getGateway()); buildable.setProtectionDomain(fluent.getProtectionDomain()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setSslEnabled(fluent.getSslEnabled()); buildable.setStorageMode(fluent.getStorageMode()); buildable.setStoragePool(fluent.getStoragePool()); @@ -70,4 +36,5 @@ public V1ScaleIOVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceFluent.java index 7c58c1a0d4..5090f4378b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceFluent.java @@ -1,64 +1,268 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; - /** - * Generated - */ -public interface V1ScaleIOVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getGateway(); - public A withGateway(String gateway); - public Boolean hasGateway(); - public String getProtectionDomain(); - public A withProtectionDomain(String protectionDomain); - public Boolean hasProtectionDomain(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef(); - public V1LocalObjectReference buildSecretRef(); - public A withSecretRef(V1LocalObjectReference secretRef); - public Boolean hasSecretRef(); - public V1ScaleIOVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1ScaleIOVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item); - public V1ScaleIOVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1ScaleIOVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1ScaleIOVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item); - public Boolean getSslEnabled(); - public A withSslEnabled(Boolean sslEnabled); - public Boolean hasSslEnabled(); - public String getStorageMode(); - public A withStorageMode(String storageMode); - public Boolean hasStorageMode(); - public String getStoragePool(); - public A withStoragePool(String storagePool); - public Boolean hasStoragePool(); - public String getSystem(); - public A withSystem(String system); - public Boolean hasSystem(); - public String getVolumeName(); - public A withVolumeName(String volumeName); - public Boolean hasVolumeName(); - public A withReadOnly(); - public A withSslEnabled(); - public interface SecretRefNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ScaleIOVolumeSourceFluent> extends BaseFluent{ + public V1ScaleIOVolumeSourceFluent() { + } + + public V1ScaleIOVolumeSourceFluent(V1ScaleIOVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private String gateway; + private String protectionDomain; + private Boolean readOnly; + private V1LocalObjectReferenceBuilder secretRef; + private Boolean sslEnabled; + private String storageMode; + private String storagePool; + private String system; + private String volumeName; + + protected void copyInstance(V1ScaleIOVolumeSource instance) { + instance = (instance != null ? instance : new V1ScaleIOVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withGateway(instance.getGateway()); + this.withProtectionDomain(instance.getProtectionDomain()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withSslEnabled(instance.getSslEnabled()); + this.withStorageMode(instance.getStorageMode()); + this.withStoragePool(instance.getStoragePool()); + this.withSystem(instance.getSystem()); + this.withVolumeName(instance.getVolumeName()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getGateway() { + return this.gateway; + } + + public A withGateway(String gateway) { + this.gateway = gateway; + return (A) this; + } + + public boolean hasGateway() { + return this.gateway != null; + } + + public String getProtectionDomain() { + return this.protectionDomain; + } + + public A withProtectionDomain(String protectionDomain) { + this.protectionDomain = protectionDomain; + return (A) this; + } + + public boolean hasProtectionDomain() { + return this.protectionDomain != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1LocalObjectReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1LocalObjectReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1LocalObjectReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); + } + + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1LocalObjectReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); } + public Boolean getSslEnabled() { + return this.sslEnabled; + } + + public A withSslEnabled(Boolean sslEnabled) { + this.sslEnabled = sslEnabled; + return (A) this; + } + + public boolean hasSslEnabled() { + return this.sslEnabled != null; + } + + public String getStorageMode() { + return this.storageMode; + } + + public A withStorageMode(String storageMode) { + this.storageMode = storageMode; + return (A) this; + } + + public boolean hasStorageMode() { + return this.storageMode != null; + } + + public String getStoragePool() { + return this.storagePool; + } + + public A withStoragePool(String storagePool) { + this.storagePool = storagePool; + return (A) this; + } + + public boolean hasStoragePool() { + return this.storagePool != null; + } + + public String getSystem() { + return this.system; + } + + public A withSystem(String system) { + this.system = system; + return (A) this; + } + + public boolean hasSystem() { + return this.system != null; + } + + public String getVolumeName() { + return this.volumeName; + } + + public A withVolumeName(String volumeName) { + this.volumeName = volumeName; + return (A) this; + } + + public boolean hasVolumeName() { + return this.volumeName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ScaleIOVolumeSourceFluent that = (V1ScaleIOVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(gateway, that.gateway)) return false; + if (!java.util.Objects.equals(protectionDomain, that.protectionDomain)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(sslEnabled, that.sslEnabled)) return false; + if (!java.util.Objects.equals(storageMode, that.storageMode)) return false; + if (!java.util.Objects.equals(storagePool, that.storagePool)) return false; + if (!java.util.Objects.equals(system, that.system)) return false; + if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, gateway, protectionDomain, readOnly, secretRef, sslEnabled, storageMode, storagePool, system, volumeName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (gateway != null) { sb.append("gateway:"); sb.append(gateway + ","); } + if (protectionDomain != null) { sb.append("protectionDomain:"); sb.append(protectionDomain + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (sslEnabled != null) { sb.append("sslEnabled:"); sb.append(sslEnabled + ","); } + if (storageMode != null) { sb.append("storageMode:"); sb.append(storageMode + ","); } + if (storagePool != null) { sb.append("storagePool:"); sb.append(storagePool + ","); } + if (system != null) { sb.append("system:"); sb.append(system + ","); } + if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + public A withSslEnabled() { + return withSslEnabled(true); + } + public class SecretRefNested extends V1LocalObjectReferenceFluent> implements Nested{ + SecretRefNested(V1LocalObjectReference item) { + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1ScaleIOVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceFluentImpl.java deleted file mode 100644 index 831152f7a5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleIOVolumeSourceFluentImpl.java +++ /dev/null @@ -1,226 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ScaleIOVolumeSourceFluentImpl> extends BaseFluent implements V1ScaleIOVolumeSourceFluent{ - public V1ScaleIOVolumeSourceFluentImpl() { - } - public V1ScaleIOVolumeSourceFluentImpl(V1ScaleIOVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withGateway(instance.getGateway()); - this.withProtectionDomain(instance.getProtectionDomain()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withSslEnabled(instance.getSslEnabled()); - this.withStorageMode(instance.getStorageMode()); - this.withStoragePool(instance.getStoragePool()); - this.withSystem(instance.getSystem()); - this.withVolumeName(instance.getVolumeName()); - } - } - private String fsType; - private String gateway; - private String protectionDomain; - private Boolean readOnly; - private V1LocalObjectReferenceBuilder secretRef; - private Boolean sslEnabled; - private String storageMode; - private String storagePool; - private String system; - private String volumeName; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getGateway() { - return this.gateway; - } - public A withGateway(String gateway) { - this.gateway=gateway; return (A) this; - } - public Boolean hasGateway() { - return this.gateway != null; - } - public String getProtectionDomain() { - return this.protectionDomain; - } - public A withProtectionDomain(String protectionDomain) { - this.protectionDomain=protectionDomain; return (A) this; - } - public Boolean hasProtectionDomain() { - return this.protectionDomain != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1LocalObjectReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1LocalObjectReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1LocalObjectReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1ScaleIOVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1ScaleIOVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1ScaleIOVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { - return new V1ScaleIOVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1ScaleIOVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1ScaleIOVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1LocalObjectReferenceBuilder().build()); - } - public V1ScaleIOVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public Boolean getSslEnabled() { - return this.sslEnabled; - } - public A withSslEnabled(Boolean sslEnabled) { - this.sslEnabled=sslEnabled; return (A) this; - } - public Boolean hasSslEnabled() { - return this.sslEnabled != null; - } - public String getStorageMode() { - return this.storageMode; - } - public A withStorageMode(String storageMode) { - this.storageMode=storageMode; return (A) this; - } - public Boolean hasStorageMode() { - return this.storageMode != null; - } - public String getStoragePool() { - return this.storagePool; - } - public A withStoragePool(String storagePool) { - this.storagePool=storagePool; return (A) this; - } - public Boolean hasStoragePool() { - return this.storagePool != null; - } - public String getSystem() { - return this.system; - } - public A withSystem(String system) { - this.system=system; return (A) this; - } - public Boolean hasSystem() { - return this.system != null; - } - public String getVolumeName() { - return this.volumeName; - } - public A withVolumeName(String volumeName) { - this.volumeName=volumeName; return (A) this; - } - public Boolean hasVolumeName() { - return this.volumeName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ScaleIOVolumeSourceFluentImpl that = (V1ScaleIOVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(gateway, that.gateway)) return false; - - if (!java.util.Objects.equals(protectionDomain, that.protectionDomain)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(sslEnabled, that.sslEnabled)) return false; - - if (!java.util.Objects.equals(storageMode, that.storageMode)) return false; - - if (!java.util.Objects.equals(storagePool, that.storagePool)) return false; - - if (!java.util.Objects.equals(system, that.system)) return false; - - if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, gateway, protectionDomain, readOnly, secretRef, sslEnabled, storageMode, storagePool, system, volumeName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (gateway != null) { sb.append("gateway:"); sb.append(gateway + ","); } - if (protectionDomain != null) { sb.append("protectionDomain:"); sb.append(protectionDomain + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (sslEnabled != null) { sb.append("sslEnabled:"); sb.append(sslEnabled + ","); } - if (storageMode != null) { sb.append("storageMode:"); sb.append(storageMode + ","); } - if (storagePool != null) { sb.append("storagePool:"); sb.append(storagePool + ","); } - if (system != null) { sb.append("system:"); sb.append(system + ","); } - if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - public A withSslEnabled() { - return withSslEnabled(true); - } - class SecretRefNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1ScaleIOVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1LocalObjectReference item) { - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - public N and() { - return (N) V1ScaleIOVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecBuilder.java index a7865a7231..c75525f37c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ScaleSpecBuilder extends V1ScaleSpecFluentImpl implements VisitableBuilder{ +public class V1ScaleSpecBuilder extends V1ScaleSpecFluent implements VisitableBuilder{ public V1ScaleSpecBuilder() { - this(false); - } - public V1ScaleSpecBuilder(Boolean validationEnabled) { - this(new V1ScaleSpec(), validationEnabled); + this(new V1ScaleSpec()); } + public V1ScaleSpecBuilder(V1ScaleSpecFluent fluent) { - this(fluent, false); - } - public V1ScaleSpecBuilder(V1ScaleSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ScaleSpec(), validationEnabled); + this(fluent, new V1ScaleSpec()); } + public V1ScaleSpecBuilder(V1ScaleSpecFluent fluent,V1ScaleSpec instance) { - this(fluent, instance, false); - } - public V1ScaleSpecBuilder(V1ScaleSpecFluent fluent,V1ScaleSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withReplicas(instance.getReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ScaleSpecBuilder(V1ScaleSpec instance) { - this(instance,false); - } - public V1ScaleSpecBuilder(V1ScaleSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withReplicas(instance.getReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ScaleSpecFluent fluent; - Boolean validationEnabled; + public V1ScaleSpec build() { V1ScaleSpec buildable = new V1ScaleSpec(); buildable.setReplicas(fluent.getReplicas()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecFluent.java index 098840e9fc..568a508398 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecFluent.java @@ -1,16 +1,64 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1ScaleSpecFluent> extends Fluent{ - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ScaleSpecFluent> extends BaseFluent{ + public V1ScaleSpecFluent() { + } + public V1ScaleSpecFluent(V1ScaleSpec instance) { + this.copyInstance(instance); + } + private Integer replicas; + + protected void copyInstance(V1ScaleSpec instance) { + instance = (instance != null ? instance : new V1ScaleSpec()); + if (instance != null) { + this.withReplicas(instance.getReplicas()); + } + } + + public Integer getReplicas() { + return this.replicas; + } + + public A withReplicas(Integer replicas) { + this.replicas = replicas; + return (A) this; + } + + public boolean hasReplicas() { + return this.replicas != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ScaleSpecFluent that = (V1ScaleSpecFluent) o; + if (!java.util.Objects.equals(replicas, that.replicas)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(replicas, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (replicas != null) { sb.append("replicas:"); sb.append(replicas); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecFluentImpl.java deleted file mode 100644 index 7ea9640ec6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleSpecFluentImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ScaleSpecFluentImpl> extends BaseFluent implements V1ScaleSpecFluent{ - public V1ScaleSpecFluentImpl() { - } - public V1ScaleSpecFluentImpl(V1ScaleSpec instance) { - if (instance != null) { - this.withReplicas(instance.getReplicas()); - } - } - private Integer replicas; - public Integer getReplicas() { - return this.replicas; - } - public A withReplicas(Integer replicas) { - this.replicas=replicas; return (A) this; - } - public Boolean hasReplicas() { - return this.replicas != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ScaleSpecFluentImpl that = (V1ScaleSpecFluentImpl) o; - if (!java.util.Objects.equals(replicas, that.replicas)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(replicas, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (replicas != null) { sb.append("replicas:"); sb.append(replicas); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusBuilder.java index 4a3c82ae98..a2ba69563d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ScaleStatusBuilder extends V1ScaleStatusFluentImpl implements VisitableBuilder{ +public class V1ScaleStatusBuilder extends V1ScaleStatusFluent implements VisitableBuilder{ public V1ScaleStatusBuilder() { - this(false); - } - public V1ScaleStatusBuilder(Boolean validationEnabled) { - this(new V1ScaleStatus(), validationEnabled); + this(new V1ScaleStatus()); } + public V1ScaleStatusBuilder(V1ScaleStatusFluent fluent) { - this(fluent, false); - } - public V1ScaleStatusBuilder(V1ScaleStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ScaleStatus(), validationEnabled); + this(fluent, new V1ScaleStatus()); } + public V1ScaleStatusBuilder(V1ScaleStatusFluent fluent,V1ScaleStatus instance) { - this(fluent, instance, false); - } - public V1ScaleStatusBuilder(V1ScaleStatusFluent fluent,V1ScaleStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withReplicas(instance.getReplicas()); - fluent.withSelector(instance.getSelector()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ScaleStatusBuilder(V1ScaleStatus instance) { - this(instance,false); - } - public V1ScaleStatusBuilder(V1ScaleStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withReplicas(instance.getReplicas()); - this.withSelector(instance.getSelector()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ScaleStatusFluent fluent; - Boolean validationEnabled; + public V1ScaleStatus build() { V1ScaleStatus buildable = new V1ScaleStatus(); buildable.setReplicas(fluent.getReplicas()); @@ -46,4 +28,5 @@ public V1ScaleStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusFluent.java index 8e327cf391..9673b528e3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusFluent.java @@ -1,20 +1,81 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ScaleStatusFluent> extends Fluent{ - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); - public String getSelector(); - public A withSelector(String selector); - public Boolean hasSelector(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ScaleStatusFluent> extends BaseFluent{ + public V1ScaleStatusFluent() { + } + public V1ScaleStatusFluent(V1ScaleStatus instance) { + this.copyInstance(instance); + } + private Integer replicas; + private String selector; + + protected void copyInstance(V1ScaleStatus instance) { + instance = (instance != null ? instance : new V1ScaleStatus()); + if (instance != null) { + this.withReplicas(instance.getReplicas()); + this.withSelector(instance.getSelector()); + } + } + + public Integer getReplicas() { + return this.replicas; + } + + public A withReplicas(Integer replicas) { + this.replicas = replicas; + return (A) this; + } + + public boolean hasReplicas() { + return this.replicas != null; + } + + public String getSelector() { + return this.selector; + } + + public A withSelector(String selector) { + this.selector = selector; + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ScaleStatusFluent that = (V1ScaleStatusFluent) o; + if (!java.util.Objects.equals(replicas, that.replicas)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(replicas, selector, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (replicas != null) { sb.append("replicas:"); sb.append(replicas + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusFluentImpl.java deleted file mode 100644 index c05d95d8f3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScaleStatusFluentImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ScaleStatusFluentImpl> extends BaseFluent implements V1ScaleStatusFluent{ - public V1ScaleStatusFluentImpl() { - } - public V1ScaleStatusFluentImpl(V1ScaleStatus instance) { - if (instance != null) { - this.withReplicas(instance.getReplicas()); - this.withSelector(instance.getSelector()); - } - } - private Integer replicas; - private String selector; - public Integer getReplicas() { - return this.replicas; - } - public A withReplicas(Integer replicas) { - this.replicas=replicas; return (A) this; - } - public Boolean hasReplicas() { - return this.replicas != null; - } - public String getSelector() { - return this.selector; - } - public A withSelector(String selector) { - this.selector=selector; return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ScaleStatusFluentImpl that = (V1ScaleStatusFluentImpl) o; - if (!java.util.Objects.equals(replicas, that.replicas)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(replicas, selector, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (replicas != null) { sb.append("replicas:"); sb.append(replicas + ","); } - if (selector != null) { sb.append("selector:"); sb.append(selector); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingBuilder.java index 132c6d8ed4..272bb268c5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SchedulingBuilder extends V1SchedulingFluentImpl implements VisitableBuilder{ +public class V1SchedulingBuilder extends V1SchedulingFluent implements VisitableBuilder{ public V1SchedulingBuilder() { - this(false); - } - public V1SchedulingBuilder(Boolean validationEnabled) { - this(new V1Scheduling(), validationEnabled); + this(new V1Scheduling()); } + public V1SchedulingBuilder(V1SchedulingFluent fluent) { - this(fluent, false); - } - public V1SchedulingBuilder(V1SchedulingFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Scheduling(), validationEnabled); + this(fluent, new V1Scheduling()); } + public V1SchedulingBuilder(V1SchedulingFluent fluent,V1Scheduling instance) { - this(fluent, instance, false); - } - public V1SchedulingBuilder(V1SchedulingFluent fluent,V1Scheduling instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNodeSelector(instance.getNodeSelector()); - fluent.withTolerations(instance.getTolerations()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SchedulingBuilder(V1Scheduling instance) { - this(instance,false); - } - public V1SchedulingBuilder(V1Scheduling instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNodeSelector(instance.getNodeSelector()); - this.withTolerations(instance.getTolerations()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SchedulingFluent fluent; - Boolean validationEnabled; + public V1Scheduling build() { V1Scheduling buildable = new V1Scheduling(); buildable.setNodeSelector(fluent.getNodeSelector()); - buildable.setTolerations(fluent.getTolerations()); + buildable.setTolerations(fluent.buildTolerations()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingFluent.java index 3c414f07ee..f3396b1a84 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingFluent.java @@ -1,65 +1,268 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1SchedulingFluent> extends Fluent{ - public A addToNodeSelector(String key,String value); - public A addToNodeSelector(Map map); - public A removeFromNodeSelector(String key); - public A removeFromNodeSelector(Map map); - public Map getNodeSelector(); - public A withNodeSelector(Map nodeSelector); - public Boolean hasNodeSelector(); - public A addToTolerations(int index,V1Toleration item); - public A setToTolerations(int index,V1Toleration item); - public A addToTolerations(io.kubernetes.client.openapi.models.V1Toleration... items); - public A addAllToTolerations(Collection items); - public A removeFromTolerations(io.kubernetes.client.openapi.models.V1Toleration... items); - public A removeAllFromTolerations(Collection items); - public A removeMatchingFromTolerations(Predicate predicate); - - /** - * This method has been deprecated, please use method buildTolerations instead. - * @return The buildable object. - */ - @Deprecated - public List getTolerations(); - public List buildTolerations(); - public V1Toleration buildToleration(int index); - public V1Toleration buildFirstToleration(); - public V1Toleration buildLastToleration(); - public V1Toleration buildMatchingToleration(Predicate predicate); - public Boolean hasMatchingToleration(Predicate predicate); - public A withTolerations(List tolerations); - public A withTolerations(io.kubernetes.client.openapi.models.V1Toleration... tolerations); - public Boolean hasTolerations(); - public V1SchedulingFluent.TolerationsNested addNewToleration(); - public V1SchedulingFluent.TolerationsNested addNewTolerationLike(V1Toleration item); - public V1SchedulingFluent.TolerationsNested setNewTolerationLike(int index,V1Toleration item); - public V1SchedulingFluent.TolerationsNested editToleration(int index); - public V1SchedulingFluent.TolerationsNested editFirstToleration(); - public V1SchedulingFluent.TolerationsNested editLastToleration(); - public V1SchedulingFluent.TolerationsNested editMatchingToleration(Predicate predicate); - public interface TolerationsNested extends Nested,V1TolerationFluent>{ - public N and(); - public N endToleration(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SchedulingFluent> extends BaseFluent{ + public V1SchedulingFluent() { + } + + public V1SchedulingFluent(V1Scheduling instance) { + this.copyInstance(instance); + } + private Map nodeSelector; + private ArrayList tolerations; + + protected void copyInstance(V1Scheduling instance) { + instance = (instance != null ? instance : new V1Scheduling()); + if (instance != null) { + this.withNodeSelector(instance.getNodeSelector()); + this.withTolerations(instance.getTolerations()); + } + } + + public A addToNodeSelector(String key,String value) { + if(this.nodeSelector == null && key != null && value != null) { this.nodeSelector = new LinkedHashMap(); } + if(key != null && value != null) {this.nodeSelector.put(key, value);} return (A)this; + } + + public A addToNodeSelector(Map map) { + if(this.nodeSelector == null && map != null) { this.nodeSelector = new LinkedHashMap(); } + if(map != null) { this.nodeSelector.putAll(map);} return (A)this; + } + + public A removeFromNodeSelector(String key) { + if(this.nodeSelector == null) { return (A) this; } + if(key != null && this.nodeSelector != null) {this.nodeSelector.remove(key);} return (A)this; + } + + public A removeFromNodeSelector(Map map) { + if(this.nodeSelector == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.nodeSelector != null){this.nodeSelector.remove(key);}}} return (A)this; + } + + public Map getNodeSelector() { + return this.nodeSelector; + } + + public A withNodeSelector(Map nodeSelector) { + if (nodeSelector == null) { + this.nodeSelector = null; + } else { + this.nodeSelector = new LinkedHashMap(nodeSelector); + } + return (A) this; + } + + public boolean hasNodeSelector() { + return this.nodeSelector != null; + } + + public A addToTolerations(int index,V1Toleration item) { + if (this.tolerations == null) {this.tolerations = new ArrayList();} + V1TolerationBuilder builder = new V1TolerationBuilder(item); + if (index < 0 || index >= tolerations.size()) { _visitables.get("tolerations").add(builder); tolerations.add(builder); } else { _visitables.get("tolerations").add(index, builder); tolerations.add(index, builder);} + return (A)this; + } + + public A setToTolerations(int index,V1Toleration item) { + if (this.tolerations == null) {this.tolerations = new ArrayList();} + V1TolerationBuilder builder = new V1TolerationBuilder(item); + if (index < 0 || index >= tolerations.size()) { _visitables.get("tolerations").add(builder); tolerations.add(builder); } else { _visitables.get("tolerations").set(index, builder); tolerations.set(index, builder);} + return (A)this; + } + + public A addToTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) { + if (this.tolerations == null) {this.tolerations = new ArrayList();} + for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this; + } + + public A addAllToTolerations(Collection items) { + if (this.tolerations == null) {this.tolerations = new ArrayList();} + for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this; + } + + public A removeFromTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) { + if (this.tolerations == null) return (A)this; + for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder); this.tolerations.remove(builder);} return (A)this; + } + + public A removeAllFromTolerations(Collection items) { + if (this.tolerations == null) return (A)this; + for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder); this.tolerations.remove(builder);} return (A)this; + } + + public A removeMatchingFromTolerations(Predicate predicate) { + if (tolerations == null) return (A) this; + final Iterator each = tolerations.iterator(); + final List visitables = _visitables.get("tolerations"); + while (each.hasNext()) { + V1TolerationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildTolerations() { + return this.tolerations != null ? build(tolerations) : null; + } + + public V1Toleration buildToleration(int index) { + return this.tolerations.get(index).build(); + } + + public V1Toleration buildFirstToleration() { + return this.tolerations.get(0).build(); + } + + public V1Toleration buildLastToleration() { + return this.tolerations.get(tolerations.size() - 1).build(); + } + + public V1Toleration buildMatchingToleration(Predicate predicate) { + for (V1TolerationBuilder item : tolerations) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingToleration(Predicate predicate) { + for (V1TolerationBuilder item : tolerations) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withTolerations(List tolerations) { + if (this.tolerations != null) { + this._visitables.get("tolerations").clear(); + } + if (tolerations != null) { + this.tolerations = new ArrayList(); + for (V1Toleration item : tolerations) { + this.addToTolerations(item); + } + } else { + this.tolerations = null; + } + return (A) this; + } + + public A withTolerations(io.kubernetes.client.openapi.models.V1Toleration... tolerations) { + if (this.tolerations != null) { + this.tolerations.clear(); + _visitables.remove("tolerations"); + } + if (tolerations != null) { + for (V1Toleration item : tolerations) { + this.addToTolerations(item); + } + } + return (A) this; + } + + public boolean hasTolerations() { + return this.tolerations != null && !this.tolerations.isEmpty(); + } + + public TolerationsNested addNewToleration() { + return new TolerationsNested(-1, null); + } + + public TolerationsNested addNewTolerationLike(V1Toleration item) { + return new TolerationsNested(-1, item); + } + + public TolerationsNested setNewTolerationLike(int index,V1Toleration item) { + return new TolerationsNested(index, item); } + public TolerationsNested editToleration(int index) { + if (tolerations.size() <= index) throw new RuntimeException("Can't edit tolerations. Index exceeds size."); + return setNewTolerationLike(index, buildToleration(index)); + } + + public TolerationsNested editFirstToleration() { + if (tolerations.size() == 0) throw new RuntimeException("Can't edit first tolerations. The list is empty."); + return setNewTolerationLike(0, buildToleration(0)); + } + + public TolerationsNested editLastToleration() { + int index = tolerations.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last tolerations. The list is empty."); + return setNewTolerationLike(index, buildToleration(index)); + } + + public TolerationsNested editMatchingToleration(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1TolerationFluent> implements Nested{ + TolerationsNested(int index,V1Toleration item) { + this.index = index; + this.builder = new V1TolerationBuilder(this, item); + } + V1TolerationBuilder builder; + int index; + + public N and() { + return (N) V1SchedulingFluent.this.setToTolerations(index,builder.build()); + } + + public N endToleration() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingFluentImpl.java deleted file mode 100644 index 884efb4833..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SchedulingFluentImpl.java +++ /dev/null @@ -1,208 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SchedulingFluentImpl> extends BaseFluent implements V1SchedulingFluent{ - public V1SchedulingFluentImpl() { - } - public V1SchedulingFluentImpl(V1Scheduling instance) { - if (instance != null) { - this.withNodeSelector(instance.getNodeSelector()); - this.withTolerations(instance.getTolerations()); - } - } - private Map nodeSelector; - private ArrayList tolerations; - public A addToNodeSelector(String key,String value) { - if(this.nodeSelector == null && key != null && value != null) { this.nodeSelector = new LinkedHashMap(); } - if(key != null && value != null) {this.nodeSelector.put(key, value);} return (A)this; - } - public A addToNodeSelector(Map map) { - if(this.nodeSelector == null && map != null) { this.nodeSelector = new LinkedHashMap(); } - if(map != null) { this.nodeSelector.putAll(map);} return (A)this; - } - public A removeFromNodeSelector(String key) { - if(this.nodeSelector == null) { return (A) this; } - if(key != null && this.nodeSelector != null) {this.nodeSelector.remove(key);} return (A)this; - } - public A removeFromNodeSelector(Map map) { - if(this.nodeSelector == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.nodeSelector != null){this.nodeSelector.remove(key);}}} return (A)this; - } - public Map getNodeSelector() { - return this.nodeSelector; - } - public A withNodeSelector(Map nodeSelector) { - if (nodeSelector == null) { this.nodeSelector = null;} else {this.nodeSelector = new LinkedHashMap(nodeSelector);} return (A) this; - } - public Boolean hasNodeSelector() { - return this.nodeSelector != null; - } - public A addToTolerations(int index,V1Toleration item) { - if (this.tolerations == null) {this.tolerations = new ArrayList();} - V1TolerationBuilder builder = new V1TolerationBuilder(item); - if (index < 0 || index >= tolerations.size()) { _visitables.get("tolerations").add(builder); tolerations.add(builder); } else { _visitables.get("tolerations").add(index, builder); tolerations.add(index, builder);} - return (A)this; - } - public A setToTolerations(int index,V1Toleration item) { - if (this.tolerations == null) {this.tolerations = new ArrayList();} - V1TolerationBuilder builder = new V1TolerationBuilder(item); - if (index < 0 || index >= tolerations.size()) { _visitables.get("tolerations").add(builder); tolerations.add(builder); } else { _visitables.get("tolerations").set(index, builder); tolerations.set(index, builder);} - return (A)this; - } - public A addToTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) { - if (this.tolerations == null) {this.tolerations = new ArrayList();} - for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this; - } - public A addAllToTolerations(Collection items) { - if (this.tolerations == null) {this.tolerations = new ArrayList();} - for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this; - } - public A removeFromTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) { - for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder);if (this.tolerations != null) {this.tolerations.remove(builder);}} return (A)this; - } - public A removeAllFromTolerations(Collection items) { - for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder);if (this.tolerations != null) {this.tolerations.remove(builder);}} return (A)this; - } - public A removeMatchingFromTolerations(Predicate predicate) { - if (tolerations == null) return (A) this; - final Iterator each = tolerations.iterator(); - final List visitables = _visitables.get("tolerations"); - while (each.hasNext()) { - V1TolerationBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildTolerations instead. - * @return The buildable object. - */ - @Deprecated - public List getTolerations() { - return tolerations != null ? build(tolerations) : null; - } - public List buildTolerations() { - return tolerations != null ? build(tolerations) : null; - } - public V1Toleration buildToleration(int index) { - return this.tolerations.get(index).build(); - } - public V1Toleration buildFirstToleration() { - return this.tolerations.get(0).build(); - } - public V1Toleration buildLastToleration() { - return this.tolerations.get(tolerations.size() - 1).build(); - } - public V1Toleration buildMatchingToleration(Predicate predicate) { - for (V1TolerationBuilder item: tolerations) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingToleration(Predicate predicate) { - for (V1TolerationBuilder item: tolerations) { if(predicate.test(item)){ return true;} } return false; - } - public A withTolerations(List tolerations) { - if (this.tolerations != null) { _visitables.get("tolerations").clear();} - if (tolerations != null) {this.tolerations = new ArrayList(); for (V1Toleration item : tolerations){this.addToTolerations(item);}} else { this.tolerations = null;} return (A) this; - } - public A withTolerations(io.kubernetes.client.openapi.models.V1Toleration... tolerations) { - if (this.tolerations != null) {this.tolerations.clear(); _visitables.remove("tolerations"); } - if (tolerations != null) {for (V1Toleration item :tolerations){ this.addToTolerations(item);}} return (A) this; - } - public Boolean hasTolerations() { - return tolerations != null && !tolerations.isEmpty(); - } - public V1SchedulingFluentImpl.TolerationsNested addNewToleration() { - return new V1SchedulingFluentImpl.TolerationsNestedImpl(); - } - public V1SchedulingFluentImpl.TolerationsNested addNewTolerationLike(V1Toleration item) { - return new V1SchedulingFluentImpl.TolerationsNestedImpl(-1, item); - } - public V1SchedulingFluentImpl.TolerationsNested setNewTolerationLike(int index,V1Toleration item) { - return new V1SchedulingFluentImpl.TolerationsNestedImpl(index, item); - } - public V1SchedulingFluentImpl.TolerationsNested editToleration(int index) { - if (tolerations.size() <= index) throw new RuntimeException("Can't edit tolerations. Index exceeds size."); - return setNewTolerationLike(index, buildToleration(index)); - } - public V1SchedulingFluentImpl.TolerationsNested editFirstToleration() { - if (tolerations.size() == 0) throw new RuntimeException("Can't edit first tolerations. The list is empty."); - return setNewTolerationLike(0, buildToleration(0)); - } - public V1SchedulingFluentImpl.TolerationsNested editLastToleration() { - int index = tolerations.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last tolerations. The list is empty."); - return setNewTolerationLike(index, buildToleration(index)); - } - public V1SchedulingFluentImpl.TolerationsNested editMatchingToleration(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1TolerationFluentImpl> implements V1SchedulingFluentImpl.TolerationsNested,Nested{ - TolerationsNestedImpl(int index,V1Toleration item) { - this.index = index; - this.builder = new V1TolerationBuilder(this, item); - } - TolerationsNestedImpl() { - this.index = -1; - this.builder = new V1TolerationBuilder(this); - } - V1TolerationBuilder builder; - int index; - public N and() { - return (N) V1SchedulingFluentImpl.this.setToTolerations(index,builder.build()); - } - public N endToleration() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorBuilder.java index 4e04742747..4518cdf27c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ScopeSelectorBuilder extends V1ScopeSelectorFluentImpl implements VisitableBuilder{ +public class V1ScopeSelectorBuilder extends V1ScopeSelectorFluent implements VisitableBuilder{ public V1ScopeSelectorBuilder() { - this(false); - } - public V1ScopeSelectorBuilder(Boolean validationEnabled) { - this(new V1ScopeSelector(), validationEnabled); + this(new V1ScopeSelector()); } + public V1ScopeSelectorBuilder(V1ScopeSelectorFluent fluent) { - this(fluent, false); - } - public V1ScopeSelectorBuilder(V1ScopeSelectorFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ScopeSelector(), validationEnabled); + this(fluent, new V1ScopeSelector()); } + public V1ScopeSelectorBuilder(V1ScopeSelectorFluent fluent,V1ScopeSelector instance) { - this(fluent, instance, false); - } - public V1ScopeSelectorBuilder(V1ScopeSelectorFluent fluent,V1ScopeSelector instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMatchExpressions(instance.getMatchExpressions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ScopeSelectorBuilder(V1ScopeSelector instance) { - this(instance,false); - } - public V1ScopeSelectorBuilder(V1ScopeSelector instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMatchExpressions(instance.getMatchExpressions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ScopeSelectorFluent fluent; - Boolean validationEnabled; + public V1ScopeSelector build() { V1ScopeSelector buildable = new V1ScopeSelector(); - buildable.setMatchExpressions(fluent.getMatchExpressions()); + buildable.setMatchExpressions(fluent.buildMatchExpressions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorFluent.java index cee4c1560a..fddd0dd515 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ScopeSelectorFluent> extends Fluent{ - public A addToMatchExpressions(int index,V1ScopedResourceSelectorRequirement item); - public A setToMatchExpressions(int index,V1ScopedResourceSelectorRequirement item); - public A addToMatchExpressions(io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement... items); - public A addAllToMatchExpressions(Collection items); - public A removeFromMatchExpressions(io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement... items); - public A removeAllFromMatchExpressions(Collection items); - public A removeMatchingFromMatchExpressions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMatchExpressions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchExpressions(); - public List buildMatchExpressions(); - public V1ScopedResourceSelectorRequirement buildMatchExpression(int index); - public V1ScopedResourceSelectorRequirement buildFirstMatchExpression(); - public V1ScopedResourceSelectorRequirement buildLastMatchExpression(); - public V1ScopedResourceSelectorRequirement buildMatchingMatchExpression(Predicate predicate); - public Boolean hasMatchingMatchExpression(Predicate predicate); - public A withMatchExpressions(List matchExpressions); - public A withMatchExpressions(io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement... matchExpressions); - public Boolean hasMatchExpressions(); - public V1ScopeSelectorFluent.MatchExpressionsNested addNewMatchExpression(); - public V1ScopeSelectorFluent.MatchExpressionsNested addNewMatchExpressionLike(V1ScopedResourceSelectorRequirement item); - public V1ScopeSelectorFluent.MatchExpressionsNested setNewMatchExpressionLike(int index,V1ScopedResourceSelectorRequirement item); - public V1ScopeSelectorFluent.MatchExpressionsNested editMatchExpression(int index); - public V1ScopeSelectorFluent.MatchExpressionsNested editFirstMatchExpression(); - public V1ScopeSelectorFluent.MatchExpressionsNested editLastMatchExpression(); - public V1ScopeSelectorFluent.MatchExpressionsNested editMatchingMatchExpression(Predicate predicate); - public interface MatchExpressionsNested extends Nested,V1ScopedResourceSelectorRequirementFluent>{ - public N and(); - public N endMatchExpression(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ScopeSelectorFluent> extends BaseFluent{ + public V1ScopeSelectorFluent() { + } + + public V1ScopeSelectorFluent(V1ScopeSelector instance) { + this.copyInstance(instance); + } + private ArrayList matchExpressions; + + protected void copyInstance(V1ScopeSelector instance) { + instance = (instance != null ? instance : new V1ScopeSelector()); + if (instance != null) { + this.withMatchExpressions(instance.getMatchExpressions()); + } + } + + public A addToMatchExpressions(int index,V1ScopedResourceSelectorRequirement item) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item); + if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").add(index, builder); matchExpressions.add(index, builder);} + return (A)this; + } + + public A setToMatchExpressions(int index,V1ScopedResourceSelectorRequirement item) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item); + if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").set(index, builder); matchExpressions.set(index, builder);} + return (A)this; + } + + public A addToMatchExpressions(io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement... items) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + for (V1ScopedResourceSelectorRequirement item : items) {V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; + } + + public A addAllToMatchExpressions(Collection items) { + if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} + for (V1ScopedResourceSelectorRequirement item : items) {V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; + } + + public A removeFromMatchExpressions(io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement... items) { + if (this.matchExpressions == null) return (A)this; + for (V1ScopedResourceSelectorRequirement item : items) {V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder); this.matchExpressions.remove(builder);} return (A)this; + } + + public A removeAllFromMatchExpressions(Collection items) { + if (this.matchExpressions == null) return (A)this; + for (V1ScopedResourceSelectorRequirement item : items) {V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder); this.matchExpressions.remove(builder);} return (A)this; + } + + public A removeMatchingFromMatchExpressions(Predicate predicate) { + if (matchExpressions == null) return (A) this; + final Iterator each = matchExpressions.iterator(); + final List visitables = _visitables.get("matchExpressions"); + while (each.hasNext()) { + V1ScopedResourceSelectorRequirementBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMatchExpressions() { + return this.matchExpressions != null ? build(matchExpressions) : null; + } + + public V1ScopedResourceSelectorRequirement buildMatchExpression(int index) { + return this.matchExpressions.get(index).build(); + } + + public V1ScopedResourceSelectorRequirement buildFirstMatchExpression() { + return this.matchExpressions.get(0).build(); + } + + public V1ScopedResourceSelectorRequirement buildLastMatchExpression() { + return this.matchExpressions.get(matchExpressions.size() - 1).build(); + } + + public V1ScopedResourceSelectorRequirement buildMatchingMatchExpression(Predicate predicate) { + for (V1ScopedResourceSelectorRequirementBuilder item : matchExpressions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMatchExpression(Predicate predicate) { + for (V1ScopedResourceSelectorRequirementBuilder item : matchExpressions) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withMatchExpressions(List matchExpressions) { + if (this.matchExpressions != null) { + this._visitables.get("matchExpressions").clear(); + } + if (matchExpressions != null) { + this.matchExpressions = new ArrayList(); + for (V1ScopedResourceSelectorRequirement item : matchExpressions) { + this.addToMatchExpressions(item); + } + } else { + this.matchExpressions = null; + } + return (A) this; + } + + public A withMatchExpressions(io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement... matchExpressions) { + if (this.matchExpressions != null) { + this.matchExpressions.clear(); + _visitables.remove("matchExpressions"); + } + if (matchExpressions != null) { + for (V1ScopedResourceSelectorRequirement item : matchExpressions) { + this.addToMatchExpressions(item); + } + } + return (A) this; + } + + public boolean hasMatchExpressions() { + return this.matchExpressions != null && !this.matchExpressions.isEmpty(); + } + + public MatchExpressionsNested addNewMatchExpression() { + return new MatchExpressionsNested(-1, null); + } + + public MatchExpressionsNested addNewMatchExpressionLike(V1ScopedResourceSelectorRequirement item) { + return new MatchExpressionsNested(-1, item); + } + + public MatchExpressionsNested setNewMatchExpressionLike(int index,V1ScopedResourceSelectorRequirement item) { + return new MatchExpressionsNested(index, item); + } + + public MatchExpressionsNested editMatchExpression(int index) { + if (matchExpressions.size() <= index) throw new RuntimeException("Can't edit matchExpressions. Index exceeds size."); + return setNewMatchExpressionLike(index, buildMatchExpression(index)); + } + + public MatchExpressionsNested editFirstMatchExpression() { + if (matchExpressions.size() == 0) throw new RuntimeException("Can't edit first matchExpressions. The list is empty."); + return setNewMatchExpressionLike(0, buildMatchExpression(0)); + } + + public MatchExpressionsNested editLastMatchExpression() { + int index = matchExpressions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last matchExpressions. The list is empty."); + return setNewMatchExpressionLike(index, buildMatchExpression(index)); + } + + public MatchExpressionsNested editMatchingMatchExpression(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ScopedResourceSelectorRequirementFluent> implements Nested{ + MatchExpressionsNested(int index,V1ScopedResourceSelectorRequirement item) { + this.index = index; + this.builder = new V1ScopedResourceSelectorRequirementBuilder(this, item); + } + V1ScopedResourceSelectorRequirementBuilder builder; + int index; + + public N and() { + return (N) V1ScopeSelectorFluent.this.setToMatchExpressions(index,builder.build()); + } + + public N endMatchExpression() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorFluentImpl.java deleted file mode 100644 index b736bd9fce..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopeSelectorFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ScopeSelectorFluentImpl> extends BaseFluent implements V1ScopeSelectorFluent{ - public V1ScopeSelectorFluentImpl() { - } - public V1ScopeSelectorFluentImpl(V1ScopeSelector instance) { - if (instance != null) { - this.withMatchExpressions(instance.getMatchExpressions()); - } - } - private ArrayList matchExpressions; - public A addToMatchExpressions(int index,V1ScopedResourceSelectorRequirement item) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item); - if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").add(index, builder); matchExpressions.add(index, builder);} - return (A)this; - } - public A setToMatchExpressions(int index,V1ScopedResourceSelectorRequirement item) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item); - if (index < 0 || index >= matchExpressions.size()) { _visitables.get("matchExpressions").add(builder); matchExpressions.add(builder); } else { _visitables.get("matchExpressions").set(index, builder); matchExpressions.set(index, builder);} - return (A)this; - } - public A addToMatchExpressions(io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement... items) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - for (V1ScopedResourceSelectorRequirement item : items) {V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; - } - public A addAllToMatchExpressions(Collection items) { - if (this.matchExpressions == null) {this.matchExpressions = new ArrayList();} - for (V1ScopedResourceSelectorRequirement item : items) {V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item);_visitables.get("matchExpressions").add(builder);this.matchExpressions.add(builder);} return (A)this; - } - public A removeFromMatchExpressions(io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement... items) { - for (V1ScopedResourceSelectorRequirement item : items) {V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder);if (this.matchExpressions != null) {this.matchExpressions.remove(builder);}} return (A)this; - } - public A removeAllFromMatchExpressions(Collection items) { - for (V1ScopedResourceSelectorRequirement item : items) {V1ScopedResourceSelectorRequirementBuilder builder = new V1ScopedResourceSelectorRequirementBuilder(item);_visitables.get("matchExpressions").remove(builder);if (this.matchExpressions != null) {this.matchExpressions.remove(builder);}} return (A)this; - } - public A removeMatchingFromMatchExpressions(Predicate predicate) { - if (matchExpressions == null) return (A) this; - final Iterator each = matchExpressions.iterator(); - final List visitables = _visitables.get("matchExpressions"); - while (each.hasNext()) { - V1ScopedResourceSelectorRequirementBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildMatchExpressions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchExpressions() { - return matchExpressions != null ? build(matchExpressions) : null; - } - public List buildMatchExpressions() { - return matchExpressions != null ? build(matchExpressions) : null; - } - public V1ScopedResourceSelectorRequirement buildMatchExpression(int index) { - return this.matchExpressions.get(index).build(); - } - public V1ScopedResourceSelectorRequirement buildFirstMatchExpression() { - return this.matchExpressions.get(0).build(); - } - public V1ScopedResourceSelectorRequirement buildLastMatchExpression() { - return this.matchExpressions.get(matchExpressions.size() - 1).build(); - } - public V1ScopedResourceSelectorRequirement buildMatchingMatchExpression(Predicate predicate) { - for (V1ScopedResourceSelectorRequirementBuilder item: matchExpressions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingMatchExpression(Predicate predicate) { - for (V1ScopedResourceSelectorRequirementBuilder item: matchExpressions) { if(predicate.test(item)){ return true;} } return false; - } - public A withMatchExpressions(List matchExpressions) { - if (this.matchExpressions != null) { _visitables.get("matchExpressions").clear();} - if (matchExpressions != null) {this.matchExpressions = new ArrayList(); for (V1ScopedResourceSelectorRequirement item : matchExpressions){this.addToMatchExpressions(item);}} else { this.matchExpressions = null;} return (A) this; - } - public A withMatchExpressions(io.kubernetes.client.openapi.models.V1ScopedResourceSelectorRequirement... matchExpressions) { - if (this.matchExpressions != null) {this.matchExpressions.clear(); _visitables.remove("matchExpressions"); } - if (matchExpressions != null) {for (V1ScopedResourceSelectorRequirement item :matchExpressions){ this.addToMatchExpressions(item);}} return (A) this; - } - public Boolean hasMatchExpressions() { - return matchExpressions != null && !matchExpressions.isEmpty(); - } - public V1ScopeSelectorFluentImpl.MatchExpressionsNested addNewMatchExpression() { - return new V1ScopeSelectorFluentImpl.MatchExpressionsNestedImpl(); - } - public V1ScopeSelectorFluentImpl.MatchExpressionsNested addNewMatchExpressionLike(V1ScopedResourceSelectorRequirement item) { - return new V1ScopeSelectorFluentImpl.MatchExpressionsNestedImpl(-1, item); - } - public V1ScopeSelectorFluentImpl.MatchExpressionsNested setNewMatchExpressionLike(int index,V1ScopedResourceSelectorRequirement item) { - return new V1ScopeSelectorFluentImpl.MatchExpressionsNestedImpl(index, item); - } - public V1ScopeSelectorFluentImpl.MatchExpressionsNested editMatchExpression(int index) { - if (matchExpressions.size() <= index) throw new RuntimeException("Can't edit matchExpressions. Index exceeds size."); - return setNewMatchExpressionLike(index, buildMatchExpression(index)); - } - public V1ScopeSelectorFluentImpl.MatchExpressionsNested editFirstMatchExpression() { - if (matchExpressions.size() == 0) throw new RuntimeException("Can't edit first matchExpressions. The list is empty."); - return setNewMatchExpressionLike(0, buildMatchExpression(0)); - } - public V1ScopeSelectorFluentImpl.MatchExpressionsNested editLastMatchExpression() { - int index = matchExpressions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last matchExpressions. The list is empty."); - return setNewMatchExpressionLike(index, buildMatchExpression(index)); - } - public V1ScopeSelectorFluentImpl.MatchExpressionsNested editMatchingMatchExpression(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ScopedResourceSelectorRequirementFluentImpl> implements V1ScopeSelectorFluentImpl.MatchExpressionsNested,Nested{ - MatchExpressionsNestedImpl(int index,V1ScopedResourceSelectorRequirement item) { - this.index = index; - this.builder = new V1ScopedResourceSelectorRequirementBuilder(this, item); - } - MatchExpressionsNestedImpl() { - this.index = -1; - this.builder = new V1ScopedResourceSelectorRequirementBuilder(this); - } - V1ScopedResourceSelectorRequirementBuilder builder; - int index; - public N and() { - return (N) V1ScopeSelectorFluentImpl.this.setToMatchExpressions(index,builder.build()); - } - public N endMatchExpression() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementBuilder.java index 780ce07e98..636acba0e3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ScopedResourceSelectorRequirementBuilder extends V1ScopedResourceSelectorRequirementFluentImpl implements VisitableBuilder{ +public class V1ScopedResourceSelectorRequirementBuilder extends V1ScopedResourceSelectorRequirementFluent implements VisitableBuilder{ public V1ScopedResourceSelectorRequirementBuilder() { - this(false); - } - public V1ScopedResourceSelectorRequirementBuilder(Boolean validationEnabled) { - this(new V1ScopedResourceSelectorRequirement(), validationEnabled); + this(new V1ScopedResourceSelectorRequirement()); } + public V1ScopedResourceSelectorRequirementBuilder(V1ScopedResourceSelectorRequirementFluent fluent) { - this(fluent, false); - } - public V1ScopedResourceSelectorRequirementBuilder(V1ScopedResourceSelectorRequirementFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ScopedResourceSelectorRequirement(), validationEnabled); + this(fluent, new V1ScopedResourceSelectorRequirement()); } + public V1ScopedResourceSelectorRequirementBuilder(V1ScopedResourceSelectorRequirementFluent fluent,V1ScopedResourceSelectorRequirement instance) { - this(fluent, instance, false); - } - public V1ScopedResourceSelectorRequirementBuilder(V1ScopedResourceSelectorRequirementFluent fluent,V1ScopedResourceSelectorRequirement instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withOperator(instance.getOperator()); - fluent.withScopeName(instance.getScopeName()); - fluent.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ScopedResourceSelectorRequirementBuilder(V1ScopedResourceSelectorRequirement instance) { - this(instance,false); - } - public V1ScopedResourceSelectorRequirementBuilder(V1ScopedResourceSelectorRequirement instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withOperator(instance.getOperator()); - this.withScopeName(instance.getScopeName()); - this.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ScopedResourceSelectorRequirementFluent fluent; - Boolean validationEnabled; + public V1ScopedResourceSelectorRequirement build() { V1ScopedResourceSelectorRequirement buildable = new V1ScopedResourceSelectorRequirement(); buildable.setOperator(fluent.getOperator()); @@ -49,4 +29,5 @@ public V1ScopedResourceSelectorRequirement build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementFluent.java index b047d93923..d3be316153 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementFluent.java @@ -1,38 +1,182 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1ScopedResourceSelectorRequirementFluent> extends Fluent{ - public String getOperator(); - public A withOperator(String operator); - public Boolean hasOperator(); - public String getScopeName(); - public A withScopeName(String scopeName); - public Boolean hasScopeName(); - public A addToValues(int index,String item); - public A setToValues(int index,String item); - public A addToValues(java.lang.String... items); - public A addAllToValues(Collection items); - public A removeFromValues(java.lang.String... items); - public A removeAllFromValues(Collection items); - public List getValues(); - public String getValue(int index); - public String getFirstValue(); - public String getLastValue(); - public String getMatchingValue(Predicate predicate); - public Boolean hasMatchingValue(Predicate predicate); - public A withValues(List values); - public A withValues(java.lang.String... values); - public Boolean hasValues(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ScopedResourceSelectorRequirementFluent> extends BaseFluent{ + public V1ScopedResourceSelectorRequirementFluent() { + } + public V1ScopedResourceSelectorRequirementFluent(V1ScopedResourceSelectorRequirement instance) { + this.copyInstance(instance); + } + private String operator; + private String scopeName; + private List values; + + protected void copyInstance(V1ScopedResourceSelectorRequirement instance) { + instance = (instance != null ? instance : new V1ScopedResourceSelectorRequirement()); + if (instance != null) { + this.withOperator(instance.getOperator()); + this.withScopeName(instance.getScopeName()); + this.withValues(instance.getValues()); + } + } + + public String getOperator() { + return this.operator; + } + + public A withOperator(String operator) { + this.operator = operator; + return (A) this; + } + + public boolean hasOperator() { + return this.operator != null; + } + + public String getScopeName() { + return this.scopeName; + } + + public A withScopeName(String scopeName) { + this.scopeName = scopeName; + return (A) this; + } + + public boolean hasScopeName() { + return this.scopeName != null; + } + + public A addToValues(int index,String item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.add(index, item); + return (A)this; + } + + public A setToValues(int index,String item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.set(index, item); return (A)this; + } + + public A addToValues(java.lang.String... items) { + if (this.values == null) {this.values = new ArrayList();} + for (String item : items) {this.values.add(item);} return (A)this; + } + + public A addAllToValues(Collection items) { + if (this.values == null) {this.values = new ArrayList();} + for (String item : items) {this.values.add(item);} return (A)this; + } + + public A removeFromValues(java.lang.String... items) { + if (this.values == null) return (A)this; + for (String item : items) { this.values.remove(item);} return (A)this; + } + + public A removeAllFromValues(Collection items) { + if (this.values == null) return (A)this; + for (String item : items) { this.values.remove(item);} return (A)this; + } + + public List getValues() { + return this.values; + } + + public String getValue(int index) { + return this.values.get(index); + } + + public String getFirstValue() { + return this.values.get(0); + } + + public String getLastValue() { + return this.values.get(values.size() - 1); + } + + public String getMatchingValue(Predicate predicate) { + for (String item : values) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingValue(Predicate predicate) { + for (String item : values) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withValues(List values) { + if (values != null) { + this.values = new ArrayList(); + for (String item : values) { + this.addToValues(item); + } + } else { + this.values = null; + } + return (A) this; + } + + public A withValues(java.lang.String... values) { + if (this.values != null) { + this.values.clear(); + _visitables.remove("values"); + } + if (values != null) { + for (String item : values) { + this.addToValues(item); + } + } + return (A) this; + } + + public boolean hasValues() { + return this.values != null && !this.values.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ScopedResourceSelectorRequirementFluent that = (V1ScopedResourceSelectorRequirementFluent) o; + if (!java.util.Objects.equals(operator, that.operator)) return false; + if (!java.util.Objects.equals(scopeName, that.scopeName)) return false; + if (!java.util.Objects.equals(values, that.values)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(operator, scopeName, values, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } + if (scopeName != null) { sb.append("scopeName:"); sb.append(scopeName + ","); } + if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementFluentImpl.java deleted file mode 100644 index c4d7cf7b80..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ScopedResourceSelectorRequirementFluentImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ScopedResourceSelectorRequirementFluentImpl> extends BaseFluent implements V1ScopedResourceSelectorRequirementFluent{ - public V1ScopedResourceSelectorRequirementFluentImpl() { - } - public V1ScopedResourceSelectorRequirementFluentImpl(V1ScopedResourceSelectorRequirement instance) { - if (instance != null) { - this.withOperator(instance.getOperator()); - this.withScopeName(instance.getScopeName()); - this.withValues(instance.getValues()); - } - } - private String operator; - private String scopeName; - private List values; - public String getOperator() { - return this.operator; - } - public A withOperator(String operator) { - this.operator=operator; return (A) this; - } - public Boolean hasOperator() { - return this.operator != null; - } - public String getScopeName() { - return this.scopeName; - } - public A withScopeName(String scopeName) { - this.scopeName=scopeName; return (A) this; - } - public Boolean hasScopeName() { - return this.scopeName != null; - } - public A addToValues(int index,String item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.add(index, item); - return (A)this; - } - public A setToValues(int index,String item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.set(index, item); return (A)this; - } - public A addToValues(java.lang.String... items) { - if (this.values == null) {this.values = new ArrayList();} - for (String item : items) {this.values.add(item);} return (A)this; - } - public A addAllToValues(Collection items) { - if (this.values == null) {this.values = new ArrayList();} - for (String item : items) {this.values.add(item);} return (A)this; - } - public A removeFromValues(java.lang.String... items) { - for (String item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public A removeAllFromValues(Collection items) { - for (String item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public List getValues() { - return this.values; - } - public String getValue(int index) { - return this.values.get(index); - } - public String getFirstValue() { - return this.values.get(0); - } - public String getLastValue() { - return this.values.get(values.size() - 1); - } - public String getMatchingValue(Predicate predicate) { - for (String item: values) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingValue(Predicate predicate) { - for (String item: values) { if(predicate.test(item)){ return true;} } return false; - } - public A withValues(List values) { - if (values != null) {this.values = new ArrayList(); for (String item : values){this.addToValues(item);}} else { this.values = null;} return (A) this; - } - public A withValues(java.lang.String... values) { - if (this.values != null) {this.values.clear(); _visitables.remove("values"); } - if (values != null) {for (String item :values){ this.addToValues(item);}} return (A) this; - } - public Boolean hasValues() { - return values != null && !values.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ScopedResourceSelectorRequirementFluentImpl that = (V1ScopedResourceSelectorRequirementFluentImpl) o; - if (!java.util.Objects.equals(operator, that.operator)) return false; - - if (!java.util.Objects.equals(scopeName, that.scopeName)) return false; - - if (!java.util.Objects.equals(values, that.values)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(operator, scopeName, values, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } - if (scopeName != null) { sb.append("scopeName:"); sb.append(scopeName + ","); } - if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileBuilder.java index e2594ec11b..8c0c4c45c7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SeccompProfileBuilder extends V1SeccompProfileFluentImpl implements VisitableBuilder{ +public class V1SeccompProfileBuilder extends V1SeccompProfileFluent implements VisitableBuilder{ public V1SeccompProfileBuilder() { - this(false); - } - public V1SeccompProfileBuilder(Boolean validationEnabled) { - this(new V1SeccompProfile(), validationEnabled); + this(new V1SeccompProfile()); } + public V1SeccompProfileBuilder(V1SeccompProfileFluent fluent) { - this(fluent, false); - } - public V1SeccompProfileBuilder(V1SeccompProfileFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SeccompProfile(), validationEnabled); + this(fluent, new V1SeccompProfile()); } + public V1SeccompProfileBuilder(V1SeccompProfileFluent fluent,V1SeccompProfile instance) { - this(fluent, instance, false); - } - public V1SeccompProfileBuilder(V1SeccompProfileFluent fluent,V1SeccompProfile instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLocalhostProfile(instance.getLocalhostProfile()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SeccompProfileBuilder(V1SeccompProfile instance) { - this(instance,false); - } - public V1SeccompProfileBuilder(V1SeccompProfile instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLocalhostProfile(instance.getLocalhostProfile()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SeccompProfileFluent fluent; - Boolean validationEnabled; + public V1SeccompProfile build() { V1SeccompProfile buildable = new V1SeccompProfile(); buildable.setLocalhostProfile(fluent.getLocalhostProfile()); @@ -46,4 +28,5 @@ public V1SeccompProfile build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileFluent.java index f142464e62..f9fb598e79 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1SeccompProfileFluent> extends Fluent{ - public String getLocalhostProfile(); - public A withLocalhostProfile(String localhostProfile); - public Boolean hasLocalhostProfile(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SeccompProfileFluent> extends BaseFluent{ + public V1SeccompProfileFluent() { + } + public V1SeccompProfileFluent(V1SeccompProfile instance) { + this.copyInstance(instance); + } + private String localhostProfile; + private String type; + + protected void copyInstance(V1SeccompProfile instance) { + instance = (instance != null ? instance : new V1SeccompProfile()); + if (instance != null) { + this.withLocalhostProfile(instance.getLocalhostProfile()); + this.withType(instance.getType()); + } + } + + public String getLocalhostProfile() { + return this.localhostProfile; + } + + public A withLocalhostProfile(String localhostProfile) { + this.localhostProfile = localhostProfile; + return (A) this; + } + + public boolean hasLocalhostProfile() { + return this.localhostProfile != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SeccompProfileFluent that = (V1SeccompProfileFluent) o; + if (!java.util.Objects.equals(localhostProfile, that.localhostProfile)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(localhostProfile, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (localhostProfile != null) { sb.append("localhostProfile:"); sb.append(localhostProfile + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileFluentImpl.java deleted file mode 100644 index aab3a95e70..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SeccompProfileFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SeccompProfileFluentImpl> extends BaseFluent implements V1SeccompProfileFluent{ - public V1SeccompProfileFluentImpl() { - } - public V1SeccompProfileFluentImpl(V1SeccompProfile instance) { - if (instance != null) { - this.withLocalhostProfile(instance.getLocalhostProfile()); - this.withType(instance.getType()); - } - } - private String localhostProfile; - private String type; - public String getLocalhostProfile() { - return this.localhostProfile; - } - public A withLocalhostProfile(String localhostProfile) { - this.localhostProfile=localhostProfile; return (A) this; - } - public Boolean hasLocalhostProfile() { - return this.localhostProfile != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SeccompProfileFluentImpl that = (V1SeccompProfileFluentImpl) o; - if (!java.util.Objects.equals(localhostProfile, that.localhostProfile)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(localhostProfile, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (localhostProfile != null) { sb.append("localhostProfile:"); sb.append(localhostProfile + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretBuilder.java index 10a60078d5..8f98f08706 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretBuilder.java @@ -1,64 +1,37 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SecretBuilder extends V1SecretFluentImpl implements VisitableBuilder{ +public class V1SecretBuilder extends V1SecretFluent implements VisitableBuilder{ public V1SecretBuilder() { - this(false); - } - public V1SecretBuilder(Boolean validationEnabled) { - this(new V1Secret(), validationEnabled); + this(new V1Secret()); } + public V1SecretBuilder(V1SecretFluent fluent) { - this(fluent, false); - } - public V1SecretBuilder(V1SecretFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Secret(), validationEnabled); + this(fluent, new V1Secret()); } + public V1SecretBuilder(V1SecretFluent fluent,V1Secret instance) { - this(fluent, instance, false); - } - public V1SecretBuilder(V1SecretFluent fluent,V1Secret instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withData(instance.getData()); - fluent.withImmutable(instance.getImmutable()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withStringData(instance.getStringData()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SecretBuilder(V1Secret instance) { - this(instance,false); - } - public V1SecretBuilder(V1Secret instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withData(instance.getData()); - this.withImmutable(instance.getImmutable()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withStringData(instance.getStringData()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SecretFluent fluent; - Boolean validationEnabled; + public V1Secret build() { V1Secret buildable = new V1Secret(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setData(fluent.getData()); buildable.setImmutable(fluent.getImmutable()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); buildable.setStringData(fluent.getStringData()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceBuilder.java index b4f2451876..ae9b0f077b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SecretEnvSourceBuilder extends V1SecretEnvSourceFluentImpl implements VisitableBuilder{ +public class V1SecretEnvSourceBuilder extends V1SecretEnvSourceFluent implements VisitableBuilder{ public V1SecretEnvSourceBuilder() { - this(false); - } - public V1SecretEnvSourceBuilder(Boolean validationEnabled) { - this(new V1SecretEnvSource(), validationEnabled); + this(new V1SecretEnvSource()); } + public V1SecretEnvSourceBuilder(V1SecretEnvSourceFluent fluent) { - this(fluent, false); - } - public V1SecretEnvSourceBuilder(V1SecretEnvSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SecretEnvSource(), validationEnabled); + this(fluent, new V1SecretEnvSource()); } + public V1SecretEnvSourceBuilder(V1SecretEnvSourceFluent fluent,V1SecretEnvSource instance) { - this(fluent, instance, false); - } - public V1SecretEnvSourceBuilder(V1SecretEnvSourceFluent fluent,V1SecretEnvSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SecretEnvSourceBuilder(V1SecretEnvSource instance) { - this(instance,false); - } - public V1SecretEnvSourceBuilder(V1SecretEnvSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SecretEnvSourceFluent fluent; - Boolean validationEnabled; + public V1SecretEnvSource build() { V1SecretEnvSource buildable = new V1SecretEnvSource(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1SecretEnvSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceFluent.java index f4eb6e2d6e..fa654d662e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceFluent.java @@ -1,20 +1,85 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1SecretEnvSourceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getOptional(); - public A withOptional(Boolean optional); - public Boolean hasOptional(); - public A withOptional(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SecretEnvSourceFluent> extends BaseFluent{ + public V1SecretEnvSourceFluent() { + } + public V1SecretEnvSourceFluent(V1SecretEnvSource instance) { + this.copyInstance(instance); + } + private String name; + private Boolean optional; + + protected void copyInstance(V1SecretEnvSource instance) { + instance = (instance != null ? instance : new V1SecretEnvSource()); + if (instance != null) { + this.withName(instance.getName()); + this.withOptional(instance.getOptional()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Boolean getOptional() { + return this.optional; + } + + public A withOptional(Boolean optional) { + this.optional = optional; + return (A) this; + } + + public boolean hasOptional() { + return this.optional != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SecretEnvSourceFluent that = (V1SecretEnvSourceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(optional, that.optional)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, optional, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (optional != null) { sb.append("optional:"); sb.append(optional); } + sb.append("}"); + return sb.toString(); + } + + public A withOptional() { + return withOptional(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceFluentImpl.java deleted file mode 100644 index 91eee6c1ce..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretEnvSourceFluentImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SecretEnvSourceFluentImpl> extends BaseFluent implements V1SecretEnvSourceFluent{ - public V1SecretEnvSourceFluentImpl() { - } - public V1SecretEnvSourceFluentImpl(V1SecretEnvSource instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - } - private String name; - private Boolean optional; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Boolean getOptional() { - return this.optional; - } - public A withOptional(Boolean optional) { - this.optional=optional; return (A) this; - } - public Boolean hasOptional() { - return this.optional != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SecretEnvSourceFluentImpl that = (V1SecretEnvSourceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(optional, that.optional)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, optional, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (optional != null) { sb.append("optional:"); sb.append(optional); } - sb.append("}"); - return sb.toString(); - } - public A withOptional() { - return withOptional(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretFluent.java index 5bc6ca5af1..bbc32a9618 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretFluent.java @@ -1,64 +1,263 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import java.util.LinkedHashMap; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; import java.util.Map; -import java.util.LinkedHashMap; - /** - * Generated - */ -public interface V1SecretFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToData(String key,byte[] value); - public A addToData(Map map); - public A removeFromData(String key); - public A removeFromData(Map map); - public Map getData(); - public A withData(Map data); - public Boolean hasData(); - public Boolean getImmutable(); - public A withImmutable(Boolean immutable); - public Boolean hasImmutable(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1SecretFluent.MetadataNested withNewMetadata(); - public V1SecretFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1SecretFluent.MetadataNested editMetadata(); - public V1SecretFluent.MetadataNested editOrNewMetadata(); - public V1SecretFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A addToStringData(String key,String value); - public A addToStringData(Map map); - public A removeFromStringData(String key); - public A removeFromStringData(Map map); - public Map getStringData(); - public A withStringData(Map stringData); - public Boolean hasStringData(); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public A withImmutable(); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SecretFluent> extends BaseFluent{ + public V1SecretFluent() { + } + + public V1SecretFluent(V1Secret instance) { + this.copyInstance(instance); + } + private String apiVersion; + private Map data; + private Boolean immutable; + private String kind; + private V1ObjectMetaBuilder metadata; + private Map stringData; + private String type; + + protected void copyInstance(V1Secret instance) { + instance = (instance != null ? instance : new V1Secret()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withData(instance.getData()); + this.withImmutable(instance.getImmutable()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withStringData(instance.getStringData()); + this.withType(instance.getType()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToData(String key,byte[] value) { + if(this.data == null && key != null && value != null) { this.data = new LinkedHashMap(); } + if(key != null && value != null) {this.data.put(key, value);} return (A)this; + } + + public A addToData(Map map) { + if(this.data == null && map != null) { this.data = new LinkedHashMap(); } + if(map != null) { this.data.putAll(map);} return (A)this; + } + + public A removeFromData(String key) { + if(this.data == null) { return (A) this; } + if(key != null && this.data != null) {this.data.remove(key);} return (A)this; + } + + public A removeFromData(Map map) { + if(this.data == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.data != null){this.data.remove(key);}}} return (A)this; + } + + public Map getData() { + return this.data; + } + + public A withData(Map data) { + if (data == null) { + this.data = null; + } else { + this.data = new LinkedHashMap(data); + } + return (A) this; + } + + public boolean hasData() { + return this.data != null; + } + + public Boolean getImmutable() { + return this.immutable; + } + + public A withImmutable(Boolean immutable) { + this.immutable = immutable; + return (A) this; + } + + public boolean hasImmutable() { + return this.immutable != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public A addToStringData(String key,String value) { + if(this.stringData == null && key != null && value != null) { this.stringData = new LinkedHashMap(); } + if(key != null && value != null) {this.stringData.put(key, value);} return (A)this; + } + + public A addToStringData(Map map) { + if(this.stringData == null && map != null) { this.stringData = new LinkedHashMap(); } + if(map != null) { this.stringData.putAll(map);} return (A)this; + } + + public A removeFromStringData(String key) { + if(this.stringData == null) { return (A) this; } + if(key != null && this.stringData != null) {this.stringData.remove(key);} return (A)this; + } + + public A removeFromStringData(Map map) { + if(this.stringData == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.stringData != null){this.stringData.remove(key);}}} return (A)this; + } + + public Map getStringData() { + return this.stringData; + } + + public A withStringData(Map stringData) { + if (stringData == null) { + this.stringData = null; + } else { + this.stringData = new LinkedHashMap(stringData); + } + return (A) this; + } + + public boolean hasStringData() { + return this.stringData != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SecretFluent that = (V1SecretFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(data, that.data)) return false; + if (!java.util.Objects.equals(immutable, that.immutable)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(stringData, that.stringData)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; } + public int hashCode() { + return java.util.Objects.hash(apiVersion, data, immutable, kind, metadata, stringData, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (data != null && !data.isEmpty()) { sb.append("data:"); sb.append(data + ","); } + if (immutable != null) { sb.append("immutable:"); sb.append(immutable + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (stringData != null && !stringData.isEmpty()) { sb.append("stringData:"); sb.append(stringData + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + public A withImmutable() { + return withImmutable(true); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1SecretFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretFluentImpl.java deleted file mode 100644 index 5fdb4c66f1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretFluentImpl.java +++ /dev/null @@ -1,215 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.util.LinkedHashMap; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SecretFluentImpl> extends BaseFluent implements V1SecretFluent{ - public V1SecretFluentImpl() { - } - public V1SecretFluentImpl(V1Secret instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withData(instance.getData()); - this.withImmutable(instance.getImmutable()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withStringData(instance.getStringData()); - this.withType(instance.getType()); - } - } - private String apiVersion; - private Map data; - private Boolean immutable; - private String kind; - private V1ObjectMetaBuilder metadata; - private Map stringData; - private String type; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToData(String key,byte[] value) { - if(this.data == null && key != null && value != null) { this.data = new LinkedHashMap(); } - if(key != null && value != null) {this.data.put(key, value);} return (A)this; - } - public A addToData(Map map) { - if(this.data == null && map != null) { this.data = new LinkedHashMap(); } - if(map != null) { this.data.putAll(map);} return (A)this; - } - public A removeFromData(String key) { - if(this.data == null) { return (A) this; } - if(key != null && this.data != null) {this.data.remove(key);} return (A)this; - } - public A removeFromData(Map map) { - if(this.data == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.data != null){this.data.remove(key);}}} return (A)this; - } - public Map getData() { - return this.data; - } - public A withData(Map data) { - if (data == null) { this.data = null;} else {this.data = new LinkedHashMap(data);} return (A) this; - } - public Boolean hasData() { - return this.data != null; - } - public Boolean getImmutable() { - return this.immutable; - } - public A withImmutable(Boolean immutable) { - this.immutable=immutable; return (A) this; - } - public Boolean hasImmutable() { - return this.immutable != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1SecretFluentImpl.MetadataNested withNewMetadata() { - return new V1SecretFluentImpl.MetadataNestedImpl(); - } - public V1SecretFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1SecretFluentImpl.MetadataNestedImpl(item); - } - public V1SecretFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1SecretFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1SecretFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public A addToStringData(String key,String value) { - if(this.stringData == null && key != null && value != null) { this.stringData = new LinkedHashMap(); } - if(key != null && value != null) {this.stringData.put(key, value);} return (A)this; - } - public A addToStringData(Map map) { - if(this.stringData == null && map != null) { this.stringData = new LinkedHashMap(); } - if(map != null) { this.stringData.putAll(map);} return (A)this; - } - public A removeFromStringData(String key) { - if(this.stringData == null) { return (A) this; } - if(key != null && this.stringData != null) {this.stringData.remove(key);} return (A)this; - } - public A removeFromStringData(Map map) { - if(this.stringData == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.stringData != null){this.stringData.remove(key);}}} return (A)this; - } - public Map getStringData() { - return this.stringData; - } - public A withStringData(Map stringData) { - if (stringData == null) { this.stringData = null;} else {this.stringData = new LinkedHashMap(stringData);} return (A) this; - } - public Boolean hasStringData() { - return this.stringData != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SecretFluentImpl that = (V1SecretFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(data, that.data)) return false; - - if (!java.util.Objects.equals(immutable, that.immutable)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(stringData, that.stringData)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, data, immutable, kind, metadata, stringData, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (data != null && !data.isEmpty()) { sb.append("data:"); sb.append(data + ","); } - if (immutable != null) { sb.append("immutable:"); sb.append(immutable + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (stringData != null && !stringData.isEmpty()) { sb.append("stringData:"); sb.append(stringData + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - public A withImmutable() { - return withImmutable(true); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1SecretFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1SecretFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorBuilder.java index 50ad0f13c5..43376f6c85 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SecretKeySelectorBuilder extends V1SecretKeySelectorFluentImpl implements VisitableBuilder{ +public class V1SecretKeySelectorBuilder extends V1SecretKeySelectorFluent implements VisitableBuilder{ public V1SecretKeySelectorBuilder() { - this(false); - } - public V1SecretKeySelectorBuilder(Boolean validationEnabled) { - this(new V1SecretKeySelector(), validationEnabled); + this(new V1SecretKeySelector()); } + public V1SecretKeySelectorBuilder(V1SecretKeySelectorFluent fluent) { - this(fluent, false); - } - public V1SecretKeySelectorBuilder(V1SecretKeySelectorFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SecretKeySelector(), validationEnabled); + this(fluent, new V1SecretKeySelector()); } + public V1SecretKeySelectorBuilder(V1SecretKeySelectorFluent fluent,V1SecretKeySelector instance) { - this(fluent, instance, false); - } - public V1SecretKeySelectorBuilder(V1SecretKeySelectorFluent fluent,V1SecretKeySelector instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withKey(instance.getKey()); - fluent.withName(instance.getName()); - fluent.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SecretKeySelectorBuilder(V1SecretKeySelector instance) { - this(instance,false); - } - public V1SecretKeySelectorBuilder(V1SecretKeySelector instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withKey(instance.getKey()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SecretKeySelectorFluent fluent; - Boolean validationEnabled; + public V1SecretKeySelector build() { V1SecretKeySelector buildable = new V1SecretKeySelector(); buildable.setKey(fluent.getKey()); @@ -49,4 +29,5 @@ public V1SecretKeySelector build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorFluent.java index 66502fe296..3eebc027a8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorFluent.java @@ -1,23 +1,102 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1SecretKeySelectorFluent> extends Fluent{ - public String getKey(); - public A withKey(String key); - public Boolean hasKey(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getOptional(); - public A withOptional(Boolean optional); - public Boolean hasOptional(); - public A withOptional(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SecretKeySelectorFluent> extends BaseFluent{ + public V1SecretKeySelectorFluent() { + } + public V1SecretKeySelectorFluent(V1SecretKeySelector instance) { + this.copyInstance(instance); + } + private String key; + private String name; + private Boolean optional; + + protected void copyInstance(V1SecretKeySelector instance) { + instance = (instance != null ? instance : new V1SecretKeySelector()); + if (instance != null) { + this.withKey(instance.getKey()); + this.withName(instance.getName()); + this.withOptional(instance.getOptional()); + } + } + + public String getKey() { + return this.key; + } + + public A withKey(String key) { + this.key = key; + return (A) this; + } + + public boolean hasKey() { + return this.key != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Boolean getOptional() { + return this.optional; + } + + public A withOptional(Boolean optional) { + this.optional = optional; + return (A) this; + } + + public boolean hasOptional() { + return this.optional != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SecretKeySelectorFluent that = (V1SecretKeySelectorFluent) o; + if (!java.util.Objects.equals(key, that.key)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(optional, that.optional)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(key, name, optional, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (key != null) { sb.append("key:"); sb.append(key + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (optional != null) { sb.append("optional:"); sb.append(optional); } + sb.append("}"); + return sb.toString(); + } + + public A withOptional() { + return withOptional(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorFluentImpl.java deleted file mode 100644 index 75aa1a25e3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretKeySelectorFluentImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SecretKeySelectorFluentImpl> extends BaseFluent implements V1SecretKeySelectorFluent{ - public V1SecretKeySelectorFluentImpl() { - } - public V1SecretKeySelectorFluentImpl(V1SecretKeySelector instance) { - if (instance != null) { - this.withKey(instance.getKey()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - } - private String key; - private String name; - private Boolean optional; - public String getKey() { - return this.key; - } - public A withKey(String key) { - this.key=key; return (A) this; - } - public Boolean hasKey() { - return this.key != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Boolean getOptional() { - return this.optional; - } - public A withOptional(Boolean optional) { - this.optional=optional; return (A) this; - } - public Boolean hasOptional() { - return this.optional != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SecretKeySelectorFluentImpl that = (V1SecretKeySelectorFluentImpl) o; - if (!java.util.Objects.equals(key, that.key)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(optional, that.optional)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(key, name, optional, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (key != null) { sb.append("key:"); sb.append(key + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (optional != null) { sb.append("optional:"); sb.append(optional); } - sb.append("}"); - return sb.toString(); - } - public A withOptional() { - return withOptional(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListBuilder.java index 8ecd3d6c42..c0c9a311ec 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SecretListBuilder extends V1SecretListFluentImpl implements VisitableBuilder{ +public class V1SecretListBuilder extends V1SecretListFluent implements VisitableBuilder{ public V1SecretListBuilder() { - this(false); - } - public V1SecretListBuilder(Boolean validationEnabled) { - this(new V1SecretList(), validationEnabled); + this(new V1SecretList()); } + public V1SecretListBuilder(V1SecretListFluent fluent) { - this(fluent, false); - } - public V1SecretListBuilder(V1SecretListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SecretList(), validationEnabled); + this(fluent, new V1SecretList()); } + public V1SecretListBuilder(V1SecretListFluent fluent,V1SecretList instance) { - this(fluent, instance, false); - } - public V1SecretListBuilder(V1SecretListFluent fluent,V1SecretList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SecretListBuilder(V1SecretList instance) { - this(instance,false); - } - public V1SecretListBuilder(V1SecretList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SecretListFluent fluent; - Boolean validationEnabled; + public V1SecretList build() { V1SecretList buildable = new V1SecretList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListFluent.java index ad93aed62a..69ea8f610b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1SecretListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Secret item); - public A setToItems(int index,V1Secret item); - public A addToItems(io.kubernetes.client.openapi.models.V1Secret... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Secret... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Secret buildItem(int index); - public V1Secret buildFirstItem(); - public V1Secret buildLastItem(); - public V1Secret buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Secret... items); - public Boolean hasItems(); - public V1SecretListFluent.ItemsNested addNewItem(); - public V1SecretListFluent.ItemsNested addNewItemLike(V1Secret item); - public V1SecretListFluent.ItemsNested setNewItemLike(int index,V1Secret item); - public V1SecretListFluent.ItemsNested editItem(int index); - public V1SecretListFluent.ItemsNested editFirstItem(); - public V1SecretListFluent.ItemsNested editLastItem(); - public V1SecretListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1SecretListFluent.MetadataNested withNewMetadata(); - public V1SecretListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1SecretListFluent.MetadataNested editMetadata(); - public V1SecretListFluent.MetadataNested editOrNewMetadata(); - public V1SecretListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1SecretFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SecretListFluent> extends BaseFluent{ + public V1SecretListFluent() { + } + + public V1SecretListFluent(V1SecretList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1SecretList instance) { + instance = (instance != null ? instance : new V1SecretList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Secret item) { + if (this.items == null) {this.items = new ArrayList();} + V1SecretBuilder builder = new V1SecretBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Secret item) { + if (this.items == null) {this.items = new ArrayList();} + V1SecretBuilder builder = new V1SecretBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Secret... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Secret item : items) {V1SecretBuilder builder = new V1SecretBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Secret item : items) {V1SecretBuilder builder = new V1SecretBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Secret... items) { + if (this.items == null) return (A)this; + for (V1Secret item : items) {V1SecretBuilder builder = new V1SecretBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Secret item : items) {V1SecretBuilder builder = new V1SecretBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1SecretBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Secret buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Secret buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Secret buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Secret buildMatchingItem(Predicate predicate) { + for (V1SecretBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1SecretBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Secret item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Secret... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Secret item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Secret item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Secret item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SecretListFluent that = (V1SecretListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1SecretFluent> implements Nested{ + ItemsNested(int index,V1Secret item) { + this.index = index; + this.builder = new V1SecretBuilder(this, item); + } + V1SecretBuilder builder; + int index; + public N and() { + return (N) V1SecretListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1SecretListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListFluentImpl.java deleted file mode 100644 index f4bb1fe0d9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SecretListFluentImpl> extends BaseFluent implements V1SecretListFluent{ - public V1SecretListFluentImpl() { - } - public V1SecretListFluentImpl(V1SecretList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Secret item) { - if (this.items == null) {this.items = new ArrayList();} - V1SecretBuilder builder = new V1SecretBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Secret item) { - if (this.items == null) {this.items = new ArrayList();} - V1SecretBuilder builder = new V1SecretBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Secret... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Secret item : items) {V1SecretBuilder builder = new V1SecretBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Secret item : items) {V1SecretBuilder builder = new V1SecretBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Secret... items) { - for (V1Secret item : items) {V1SecretBuilder builder = new V1SecretBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Secret item : items) {V1SecretBuilder builder = new V1SecretBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1SecretBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Secret buildItem(int index) { - return this.items.get(index).build(); - } - public V1Secret buildFirstItem() { - return this.items.get(0).build(); - } - public V1Secret buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Secret buildMatchingItem(Predicate predicate) { - for (V1SecretBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1SecretBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Secret item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Secret... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Secret item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1SecretListFluentImpl.ItemsNested addNewItem() { - return new V1SecretListFluentImpl.ItemsNestedImpl(); - } - public V1SecretListFluentImpl.ItemsNested addNewItemLike(V1Secret item) { - return new V1SecretListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1SecretListFluentImpl.ItemsNested setNewItemLike(int index,V1Secret item) { - return new V1SecretListFluentImpl.ItemsNestedImpl(index, item); - } - public V1SecretListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1SecretListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1SecretListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1SecretListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1SecretListFluentImpl.MetadataNestedImpl(); - } - public V1SecretListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1SecretListFluentImpl.MetadataNestedImpl(item); - } - public V1SecretListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1SecretListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1SecretListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SecretListFluentImpl that = (V1SecretListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1SecretFluentImpl> implements V1SecretListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Secret item) { - this.index = index; - this.builder = new V1SecretBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1SecretBuilder(this); - } - V1SecretBuilder builder; - int index; - public N and() { - return (N) V1SecretListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1SecretListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1SecretListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionBuilder.java index abaf465f4f..1ca9cf51a8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SecretProjectionBuilder extends V1SecretProjectionFluentImpl implements VisitableBuilder{ +public class V1SecretProjectionBuilder extends V1SecretProjectionFluent implements VisitableBuilder{ public V1SecretProjectionBuilder() { - this(false); - } - public V1SecretProjectionBuilder(Boolean validationEnabled) { - this(new V1SecretProjection(), validationEnabled); + this(new V1SecretProjection()); } + public V1SecretProjectionBuilder(V1SecretProjectionFluent fluent) { - this(fluent, false); - } - public V1SecretProjectionBuilder(V1SecretProjectionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SecretProjection(), validationEnabled); + this(fluent, new V1SecretProjection()); } + public V1SecretProjectionBuilder(V1SecretProjectionFluent fluent,V1SecretProjection instance) { - this(fluent, instance, false); - } - public V1SecretProjectionBuilder(V1SecretProjectionFluent fluent,V1SecretProjection instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withItems(instance.getItems()); - fluent.withName(instance.getName()); - fluent.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SecretProjectionBuilder(V1SecretProjection instance) { - this(instance,false); - } - public V1SecretProjectionBuilder(V1SecretProjection instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withItems(instance.getItems()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SecretProjectionFluent fluent; - Boolean validationEnabled; + public V1SecretProjection build() { V1SecretProjection buildable = new V1SecretProjection(); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setName(fluent.getName()); buildable.setOptional(fluent.getOptional()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionFluent.java index 0d84f6e25b..d3db610a9b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionFluent.java @@ -1,63 +1,264 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1SecretProjectionFluent> extends Fluent{ - public A addToItems(int index,V1KeyToPath item); - public A setToItems(int index,V1KeyToPath item); - public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1KeyToPath buildItem(int index); - public V1KeyToPath buildFirstItem(); - public V1KeyToPath buildLastItem(); - public V1KeyToPath buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public Boolean hasItems(); - public V1SecretProjectionFluent.ItemsNested addNewItem(); - public V1SecretProjectionFluent.ItemsNested addNewItemLike(V1KeyToPath item); - public V1SecretProjectionFluent.ItemsNested setNewItemLike(int index,V1KeyToPath item); - public V1SecretProjectionFluent.ItemsNested editItem(int index); - public V1SecretProjectionFluent.ItemsNested editFirstItem(); - public V1SecretProjectionFluent.ItemsNested editLastItem(); - public V1SecretProjectionFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getOptional(); - public A withOptional(Boolean optional); - public Boolean hasOptional(); - public A withOptional(); - public interface ItemsNested extends Nested,V1KeyToPathFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SecretProjectionFluent> extends BaseFluent{ + public V1SecretProjectionFluent() { + } + + public V1SecretProjectionFluent(V1SecretProjection instance) { + this.copyInstance(instance); + } + private ArrayList items; + private String name; + private Boolean optional; + + protected void copyInstance(V1SecretProjection instance) { + instance = (instance != null ? instance : new V1SecretProjection()); + if (instance != null) { + this.withItems(instance.getItems()); + this.withName(instance.getName()); + this.withOptional(instance.getOptional()); + } + } + + public A addToItems(int index,V1KeyToPath item) { + if (this.items == null) {this.items = new ArrayList();} + V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1KeyToPath item) { + if (this.items == null) {this.items = new ArrayList();} + V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items == null) return (A)this; + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1KeyToPathBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1KeyToPath buildItem(int index) { + return this.items.get(index).build(); + } + + public V1KeyToPath buildFirstItem() { + return this.items.get(0).build(); + } + + public V1KeyToPath buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1KeyToPath buildMatchingItem(Predicate predicate) { + for (V1KeyToPathBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1KeyToPathBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1KeyToPath item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1KeyToPath item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1KeyToPath item) { + return new ItemsNested(-1, item); + } + + public ItemsNested setNewItemLike(int index,V1KeyToPath item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1KeyToPathFluent> implements Nested{ + ItemsNested(int index,V1KeyToPath item) { + this.index = index; + this.builder = new V1KeyToPathBuilder(this, item); + } + V1KeyToPathBuilder builder; + int index; + + public N and() { + return (N) V1SecretProjectionFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionFluentImpl.java deleted file mode 100644 index 355529f3b6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretProjectionFluentImpl.java +++ /dev/null @@ -1,207 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SecretProjectionFluentImpl> extends BaseFluent implements V1SecretProjectionFluent{ - public V1SecretProjectionFluentImpl() { - } - public V1SecretProjectionFluentImpl(V1SecretProjection instance) { - if (instance != null) { - this.withItems(instance.getItems()); - this.withName(instance.getName()); - this.withOptional(instance.getOptional()); - } - } - private ArrayList items; - private String name; - private Boolean optional; - public A addToItems(int index,V1KeyToPath item) { - if (this.items == null) {this.items = new ArrayList();} - V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1KeyToPath item) { - if (this.items == null) {this.items = new ArrayList();} - V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1KeyToPathBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1KeyToPath buildItem(int index) { - return this.items.get(index).build(); - } - public V1KeyToPath buildFirstItem() { - return this.items.get(0).build(); - } - public V1KeyToPath buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1KeyToPath buildMatchingItem(Predicate predicate) { - for (V1KeyToPathBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1KeyToPathBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1KeyToPath item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1KeyToPath item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1SecretProjectionFluentImpl.ItemsNested addNewItem() { - return new V1SecretProjectionFluentImpl.ItemsNestedImpl(); - } - public V1SecretProjectionFluentImpl.ItemsNested addNewItemLike(V1KeyToPath item) { - return new V1SecretProjectionFluentImpl.ItemsNestedImpl(-1, item); - } - public V1SecretProjectionFluentImpl.ItemsNested setNewItemLike(int index,V1KeyToPath item) { - return new V1SecretProjectionFluentImpl.ItemsNestedImpl(index, item); - } - public V1SecretProjectionFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1SecretProjectionFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1SecretProjectionFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1SecretProjectionFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1KeyToPathFluentImpl> implements V1SecretProjectionFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1KeyToPath item) { - this.index = index; - this.builder = new V1KeyToPathBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1KeyToPathBuilder(this); - } - V1KeyToPathBuilder builder; - int index; - public N and() { - return (N) V1SecretProjectionFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceBuilder.java index 93a48e92ec..78013ec9bd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SecretReferenceBuilder extends V1SecretReferenceFluentImpl implements VisitableBuilder{ +public class V1SecretReferenceBuilder extends V1SecretReferenceFluent implements VisitableBuilder{ public V1SecretReferenceBuilder() { - this(false); - } - public V1SecretReferenceBuilder(Boolean validationEnabled) { - this(new V1SecretReference(), validationEnabled); + this(new V1SecretReference()); } + public V1SecretReferenceBuilder(V1SecretReferenceFluent fluent) { - this(fluent, false); - } - public V1SecretReferenceBuilder(V1SecretReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SecretReference(), validationEnabled); + this(fluent, new V1SecretReference()); } + public V1SecretReferenceBuilder(V1SecretReferenceFluent fluent,V1SecretReference instance) { - this(fluent, instance, false); - } - public V1SecretReferenceBuilder(V1SecretReferenceFluent fluent,V1SecretReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SecretReferenceBuilder(V1SecretReference instance) { - this(instance,false); - } - public V1SecretReferenceBuilder(V1SecretReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SecretReferenceFluent fluent; - Boolean validationEnabled; + public V1SecretReference build() { V1SecretReference buildable = new V1SecretReference(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1SecretReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceFluent.java index 9dcc80da2b..799a9a6d2e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1SecretReferenceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SecretReferenceFluent> extends BaseFluent{ + public V1SecretReferenceFluent() { + } + public V1SecretReferenceFluent(V1SecretReference instance) { + this.copyInstance(instance); + } + private String name; + private String namespace; + + protected void copyInstance(V1SecretReference instance) { + instance = (instance != null ? instance : new V1SecretReference()); + if (instance != null) { + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SecretReferenceFluent that = (V1SecretReferenceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, namespace, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceFluentImpl.java deleted file mode 100644 index e36f0e33a5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretReferenceFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SecretReferenceFluentImpl> extends BaseFluent implements V1SecretReferenceFluent{ - public V1SecretReferenceFluentImpl() { - } - public V1SecretReferenceFluentImpl(V1SecretReference instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - } - private String name; - private String namespace; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SecretReferenceFluentImpl that = (V1SecretReferenceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, namespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceBuilder.java index 6e3370c969..a294cad4e3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SecretVolumeSourceBuilder extends V1SecretVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1SecretVolumeSourceBuilder extends V1SecretVolumeSourceFluent implements VisitableBuilder{ public V1SecretVolumeSourceBuilder() { - this(false); - } - public V1SecretVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1SecretVolumeSource(), validationEnabled); + this(new V1SecretVolumeSource()); } + public V1SecretVolumeSourceBuilder(V1SecretVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1SecretVolumeSourceBuilder(V1SecretVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SecretVolumeSource(), validationEnabled); + this(fluent, new V1SecretVolumeSource()); } + public V1SecretVolumeSourceBuilder(V1SecretVolumeSourceFluent fluent,V1SecretVolumeSource instance) { - this(fluent, instance, false); - } - public V1SecretVolumeSourceBuilder(V1SecretVolumeSourceFluent fluent,V1SecretVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDefaultMode(instance.getDefaultMode()); - fluent.withItems(instance.getItems()); - fluent.withOptional(instance.getOptional()); - fluent.withSecretName(instance.getSecretName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SecretVolumeSourceBuilder(V1SecretVolumeSource instance) { - this(instance,false); - } - public V1SecretVolumeSourceBuilder(V1SecretVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDefaultMode(instance.getDefaultMode()); - this.withItems(instance.getItems()); - this.withOptional(instance.getOptional()); - this.withSecretName(instance.getSecretName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SecretVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1SecretVolumeSource build() { V1SecretVolumeSource buildable = new V1SecretVolumeSource(); buildable.setDefaultMode(fluent.getDefaultMode()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setOptional(fluent.getOptional()); buildable.setSecretName(fluent.getSecretName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceFluent.java index 1265a110ca..7c7ba1fb0e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceFluent.java @@ -1,67 +1,282 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1SecretVolumeSourceFluent> extends Fluent{ - public Integer getDefaultMode(); - public A withDefaultMode(Integer defaultMode); - public Boolean hasDefaultMode(); - public A addToItems(int index,V1KeyToPath item); - public A setToItems(int index,V1KeyToPath item); - public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1KeyToPath buildItem(int index); - public V1KeyToPath buildFirstItem(); - public V1KeyToPath buildLastItem(); - public V1KeyToPath buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items); - public Boolean hasItems(); - public V1SecretVolumeSourceFluent.ItemsNested addNewItem(); - public V1SecretVolumeSourceFluent.ItemsNested addNewItemLike(V1KeyToPath item); - public V1SecretVolumeSourceFluent.ItemsNested setNewItemLike(int index,V1KeyToPath item); - public V1SecretVolumeSourceFluent.ItemsNested editItem(int index); - public V1SecretVolumeSourceFluent.ItemsNested editFirstItem(); - public V1SecretVolumeSourceFluent.ItemsNested editLastItem(); - public V1SecretVolumeSourceFluent.ItemsNested editMatchingItem(Predicate predicate); - public Boolean getOptional(); - public A withOptional(Boolean optional); - public Boolean hasOptional(); - public String getSecretName(); - public A withSecretName(String secretName); - public Boolean hasSecretName(); - public A withOptional(); - public interface ItemsNested extends Nested,V1KeyToPathFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SecretVolumeSourceFluent> extends BaseFluent{ + public V1SecretVolumeSourceFluent() { + } + + public V1SecretVolumeSourceFluent(V1SecretVolumeSource instance) { + this.copyInstance(instance); + } + private Integer defaultMode; + private ArrayList items; + private Boolean optional; + private String secretName; + + protected void copyInstance(V1SecretVolumeSource instance) { + instance = (instance != null ? instance : new V1SecretVolumeSource()); + if (instance != null) { + this.withDefaultMode(instance.getDefaultMode()); + this.withItems(instance.getItems()); + this.withOptional(instance.getOptional()); + this.withSecretName(instance.getSecretName()); + } + } + + public Integer getDefaultMode() { + return this.defaultMode; + } + + public A withDefaultMode(Integer defaultMode) { + this.defaultMode = defaultMode; + return (A) this; + } + + public boolean hasDefaultMode() { + return this.defaultMode != null; + } + + public A addToItems(int index,V1KeyToPath item) { + if (this.items == null) {this.items = new ArrayList();} + V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1KeyToPath item) { + if (this.items == null) {this.items = new ArrayList();} + V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items == null) return (A)this; + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1KeyToPathBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1KeyToPath buildItem(int index) { + return this.items.get(index).build(); + } + + public V1KeyToPath buildFirstItem() { + return this.items.get(0).build(); + } + + public V1KeyToPath buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1KeyToPath buildMatchingItem(Predicate predicate) { + for (V1KeyToPathBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1KeyToPathBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1KeyToPath item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1KeyToPath item : items) { + this.addToItems(item); + } + } + return (A) this; } + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1KeyToPath item) { + return new ItemsNested(-1, item); + } + + public ItemsNested setNewItemLike(int index,V1KeyToPath item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1KeyToPathFluent> implements Nested{ + ItemsNested(int index,V1KeyToPath item) { + this.index = index; + this.builder = new V1KeyToPathBuilder(this, item); + } + V1KeyToPathBuilder builder; + int index; + + public N and() { + return (N) V1SecretVolumeSourceFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceFluentImpl.java deleted file mode 100644 index c73675a6ea..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecretVolumeSourceFluentImpl.java +++ /dev/null @@ -1,222 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SecretVolumeSourceFluentImpl> extends BaseFluent implements V1SecretVolumeSourceFluent{ - public V1SecretVolumeSourceFluentImpl() { - } - public V1SecretVolumeSourceFluentImpl(V1SecretVolumeSource instance) { - if (instance != null) { - this.withDefaultMode(instance.getDefaultMode()); - this.withItems(instance.getItems()); - this.withOptional(instance.getOptional()); - this.withSecretName(instance.getSecretName()); - } - } - private Integer defaultMode; - private ArrayList items; - private Boolean optional; - private String secretName; - public Integer getDefaultMode() { - return this.defaultMode; - } - public A withDefaultMode(Integer defaultMode) { - this.defaultMode=defaultMode; return (A) this; - } - public Boolean hasDefaultMode() { - return this.defaultMode != null; - } - public A addToItems(int index,V1KeyToPath item) { - if (this.items == null) {this.items = new ArrayList();} - V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1KeyToPath item) { - if (this.items == null) {this.items = new ArrayList();} - V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1KeyToPath item : items) {V1KeyToPathBuilder builder = new V1KeyToPathBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1KeyToPathBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1KeyToPath buildItem(int index) { - return this.items.get(index).build(); - } - public V1KeyToPath buildFirstItem() { - return this.items.get(0).build(); - } - public V1KeyToPath buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1KeyToPath buildMatchingItem(Predicate predicate) { - for (V1KeyToPathBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1KeyToPathBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1KeyToPath item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1KeyToPath... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1KeyToPath item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1SecretVolumeSourceFluentImpl.ItemsNested addNewItem() { - return new V1SecretVolumeSourceFluentImpl.ItemsNestedImpl(); - } - public V1SecretVolumeSourceFluentImpl.ItemsNested addNewItemLike(V1KeyToPath item) { - return new V1SecretVolumeSourceFluentImpl.ItemsNestedImpl(-1, item); - } - public V1SecretVolumeSourceFluentImpl.ItemsNested setNewItemLike(int index,V1KeyToPath item) { - return new V1SecretVolumeSourceFluentImpl.ItemsNestedImpl(index, item); - } - public V1SecretVolumeSourceFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1SecretVolumeSourceFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1SecretVolumeSourceFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1SecretVolumeSourceFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1KeyToPathFluentImpl> implements V1SecretVolumeSourceFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1KeyToPath item) { - this.index = index; - this.builder = new V1KeyToPathBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1KeyToPathBuilder(this); - } - V1KeyToPathBuilder builder; - int index; - public N and() { - return (N) V1SecretVolumeSourceFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextBuilder.java index 08405870da..eca3ee621a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextBuilder.java @@ -1,76 +1,41 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SecurityContextBuilder extends V1SecurityContextFluentImpl implements VisitableBuilder{ +public class V1SecurityContextBuilder extends V1SecurityContextFluent implements VisitableBuilder{ public V1SecurityContextBuilder() { - this(false); - } - public V1SecurityContextBuilder(Boolean validationEnabled) { - this(new V1SecurityContext(), validationEnabled); + this(new V1SecurityContext()); } + public V1SecurityContextBuilder(V1SecurityContextFluent fluent) { - this(fluent, false); - } - public V1SecurityContextBuilder(V1SecurityContextFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SecurityContext(), validationEnabled); + this(fluent, new V1SecurityContext()); } + public V1SecurityContextBuilder(V1SecurityContextFluent fluent,V1SecurityContext instance) { - this(fluent, instance, false); - } - public V1SecurityContextBuilder(V1SecurityContextFluent fluent,V1SecurityContext instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAllowPrivilegeEscalation(instance.getAllowPrivilegeEscalation()); - fluent.withCapabilities(instance.getCapabilities()); - fluent.withPrivileged(instance.getPrivileged()); - fluent.withProcMount(instance.getProcMount()); - fluent.withReadOnlyRootFilesystem(instance.getReadOnlyRootFilesystem()); - fluent.withRunAsGroup(instance.getRunAsGroup()); - fluent.withRunAsNonRoot(instance.getRunAsNonRoot()); - fluent.withRunAsUser(instance.getRunAsUser()); - fluent.withSeLinuxOptions(instance.getSeLinuxOptions()); - fluent.withSeccompProfile(instance.getSeccompProfile()); - fluent.withWindowsOptions(instance.getWindowsOptions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SecurityContextBuilder(V1SecurityContext instance) { - this(instance,false); - } - public V1SecurityContextBuilder(V1SecurityContext instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAllowPrivilegeEscalation(instance.getAllowPrivilegeEscalation()); - this.withCapabilities(instance.getCapabilities()); - this.withPrivileged(instance.getPrivileged()); - this.withProcMount(instance.getProcMount()); - this.withReadOnlyRootFilesystem(instance.getReadOnlyRootFilesystem()); - this.withRunAsGroup(instance.getRunAsGroup()); - this.withRunAsNonRoot(instance.getRunAsNonRoot()); - this.withRunAsUser(instance.getRunAsUser()); - this.withSeLinuxOptions(instance.getSeLinuxOptions()); - this.withSeccompProfile(instance.getSeccompProfile()); - this.withWindowsOptions(instance.getWindowsOptions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SecurityContextFluent fluent; - Boolean validationEnabled; + public V1SecurityContext build() { V1SecurityContext buildable = new V1SecurityContext(); buildable.setAllowPrivilegeEscalation(fluent.getAllowPrivilegeEscalation()); - buildable.setCapabilities(fluent.getCapabilities()); + buildable.setCapabilities(fluent.buildCapabilities()); buildable.setPrivileged(fluent.getPrivileged()); buildable.setProcMount(fluent.getProcMount()); buildable.setReadOnlyRootFilesystem(fluent.getReadOnlyRootFilesystem()); buildable.setRunAsGroup(fluent.getRunAsGroup()); buildable.setRunAsNonRoot(fluent.getRunAsNonRoot()); buildable.setRunAsUser(fluent.getRunAsUser()); - buildable.setSeLinuxOptions(fluent.getSeLinuxOptions()); - buildable.setSeccompProfile(fluent.getSeccompProfile()); - buildable.setWindowsOptions(fluent.getWindowsOptions()); + buildable.setSeLinuxOptions(fluent.buildSeLinuxOptions()); + buildable.setSeccompProfile(fluent.buildSeccompProfile()); + buildable.setWindowsOptions(fluent.buildWindowsOptions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextFluent.java index 421fadf049..71e2d424de 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextFluent.java @@ -1,121 +1,423 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Long; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; - /** - * Generated - */ -public interface V1SecurityContextFluent> extends Fluent{ - public Boolean getAllowPrivilegeEscalation(); - public A withAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation); - public Boolean hasAllowPrivilegeEscalation(); - - /** - * This method has been deprecated, please use method buildCapabilities instead. - * @return The buildable object. - */ - @Deprecated - public V1Capabilities getCapabilities(); - public V1Capabilities buildCapabilities(); - public A withCapabilities(V1Capabilities capabilities); - public Boolean hasCapabilities(); - public V1SecurityContextFluent.CapabilitiesNested withNewCapabilities(); - public V1SecurityContextFluent.CapabilitiesNested withNewCapabilitiesLike(V1Capabilities item); - public V1SecurityContextFluent.CapabilitiesNested editCapabilities(); - public V1SecurityContextFluent.CapabilitiesNested editOrNewCapabilities(); - public V1SecurityContextFluent.CapabilitiesNested editOrNewCapabilitiesLike(V1Capabilities item); - public Boolean getPrivileged(); - public A withPrivileged(Boolean privileged); - public Boolean hasPrivileged(); - public String getProcMount(); - public A withProcMount(String procMount); - public Boolean hasProcMount(); - public Boolean getReadOnlyRootFilesystem(); - public A withReadOnlyRootFilesystem(Boolean readOnlyRootFilesystem); - public Boolean hasReadOnlyRootFilesystem(); - public Long getRunAsGroup(); - public A withRunAsGroup(Long runAsGroup); - public Boolean hasRunAsGroup(); - public Boolean getRunAsNonRoot(); - public A withRunAsNonRoot(Boolean runAsNonRoot); - public Boolean hasRunAsNonRoot(); - public Long getRunAsUser(); - public A withRunAsUser(Long runAsUser); - public Boolean hasRunAsUser(); - - /** - * This method has been deprecated, please use method buildSeLinuxOptions instead. - * @return The buildable object. - */ - @Deprecated - public V1SELinuxOptions getSeLinuxOptions(); - public V1SELinuxOptions buildSeLinuxOptions(); - public A withSeLinuxOptions(V1SELinuxOptions seLinuxOptions); - public Boolean hasSeLinuxOptions(); - public V1SecurityContextFluent.SeLinuxOptionsNested withNewSeLinuxOptions(); - public V1SecurityContextFluent.SeLinuxOptionsNested withNewSeLinuxOptionsLike(V1SELinuxOptions item); - public V1SecurityContextFluent.SeLinuxOptionsNested editSeLinuxOptions(); - public V1SecurityContextFluent.SeLinuxOptionsNested editOrNewSeLinuxOptions(); - public V1SecurityContextFluent.SeLinuxOptionsNested editOrNewSeLinuxOptionsLike(V1SELinuxOptions item); - - /** - * This method has been deprecated, please use method buildSeccompProfile instead. - * @return The buildable object. - */ - @Deprecated - public V1SeccompProfile getSeccompProfile(); - public V1SeccompProfile buildSeccompProfile(); - public A withSeccompProfile(V1SeccompProfile seccompProfile); - public Boolean hasSeccompProfile(); - public V1SecurityContextFluent.SeccompProfileNested withNewSeccompProfile(); - public V1SecurityContextFluent.SeccompProfileNested withNewSeccompProfileLike(V1SeccompProfile item); - public V1SecurityContextFluent.SeccompProfileNested editSeccompProfile(); - public V1SecurityContextFluent.SeccompProfileNested editOrNewSeccompProfile(); - public V1SecurityContextFluent.SeccompProfileNested editOrNewSeccompProfileLike(V1SeccompProfile item); - - /** - * This method has been deprecated, please use method buildWindowsOptions instead. - * @return The buildable object. - */ - @Deprecated - public V1WindowsSecurityContextOptions getWindowsOptions(); - public V1WindowsSecurityContextOptions buildWindowsOptions(); - public A withWindowsOptions(V1WindowsSecurityContextOptions windowsOptions); - public Boolean hasWindowsOptions(); - public V1SecurityContextFluent.WindowsOptionsNested withNewWindowsOptions(); - public V1SecurityContextFluent.WindowsOptionsNested withNewWindowsOptionsLike(V1WindowsSecurityContextOptions item); - public V1SecurityContextFluent.WindowsOptionsNested editWindowsOptions(); - public V1SecurityContextFluent.WindowsOptionsNested editOrNewWindowsOptions(); - public V1SecurityContextFluent.WindowsOptionsNested editOrNewWindowsOptionsLike(V1WindowsSecurityContextOptions item); - public A withAllowPrivilegeEscalation(); - public A withPrivileged(); - public A withReadOnlyRootFilesystem(); - public A withRunAsNonRoot(); - public interface CapabilitiesNested extends Nested,V1CapabilitiesFluent>{ - public N and(); - public N endCapabilities(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SecurityContextFluent> extends BaseFluent{ + public V1SecurityContextFluent() { + } + + public V1SecurityContextFluent(V1SecurityContext instance) { + this.copyInstance(instance); + } + private Boolean allowPrivilegeEscalation; + private V1CapabilitiesBuilder capabilities; + private Boolean privileged; + private String procMount; + private Boolean readOnlyRootFilesystem; + private Long runAsGroup; + private Boolean runAsNonRoot; + private Long runAsUser; + private V1SELinuxOptionsBuilder seLinuxOptions; + private V1SeccompProfileBuilder seccompProfile; + private V1WindowsSecurityContextOptionsBuilder windowsOptions; + + protected void copyInstance(V1SecurityContext instance) { + instance = (instance != null ? instance : new V1SecurityContext()); + if (instance != null) { + this.withAllowPrivilegeEscalation(instance.getAllowPrivilegeEscalation()); + this.withCapabilities(instance.getCapabilities()); + this.withPrivileged(instance.getPrivileged()); + this.withProcMount(instance.getProcMount()); + this.withReadOnlyRootFilesystem(instance.getReadOnlyRootFilesystem()); + this.withRunAsGroup(instance.getRunAsGroup()); + this.withRunAsNonRoot(instance.getRunAsNonRoot()); + this.withRunAsUser(instance.getRunAsUser()); + this.withSeLinuxOptions(instance.getSeLinuxOptions()); + this.withSeccompProfile(instance.getSeccompProfile()); + this.withWindowsOptions(instance.getWindowsOptions()); + } + } + + public Boolean getAllowPrivilegeEscalation() { + return this.allowPrivilegeEscalation; + } + + public A withAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation) { + this.allowPrivilegeEscalation = allowPrivilegeEscalation; + return (A) this; + } + + public boolean hasAllowPrivilegeEscalation() { + return this.allowPrivilegeEscalation != null; + } + + public V1Capabilities buildCapabilities() { + return this.capabilities != null ? this.capabilities.build() : null; + } + + public A withCapabilities(V1Capabilities capabilities) { + this._visitables.remove("capabilities"); + if (capabilities != null) { + this.capabilities = new V1CapabilitiesBuilder(capabilities); + this._visitables.get("capabilities").add(this.capabilities); + } else { + this.capabilities = null; + this._visitables.get("capabilities").remove(this.capabilities); + } + return (A) this; + } + + public boolean hasCapabilities() { + return this.capabilities != null; + } + + public CapabilitiesNested withNewCapabilities() { + return new CapabilitiesNested(null); + } + + public CapabilitiesNested withNewCapabilitiesLike(V1Capabilities item) { + return new CapabilitiesNested(item); + } + + public CapabilitiesNested editCapabilities() { + return withNewCapabilitiesLike(java.util.Optional.ofNullable(buildCapabilities()).orElse(null)); + } + + public CapabilitiesNested editOrNewCapabilities() { + return withNewCapabilitiesLike(java.util.Optional.ofNullable(buildCapabilities()).orElse(new V1CapabilitiesBuilder().build())); + } + + public CapabilitiesNested editOrNewCapabilitiesLike(V1Capabilities item) { + return withNewCapabilitiesLike(java.util.Optional.ofNullable(buildCapabilities()).orElse(item)); + } + + public Boolean getPrivileged() { + return this.privileged; + } + + public A withPrivileged(Boolean privileged) { + this.privileged = privileged; + return (A) this; + } + + public boolean hasPrivileged() { + return this.privileged != null; + } + + public String getProcMount() { + return this.procMount; + } + + public A withProcMount(String procMount) { + this.procMount = procMount; + return (A) this; + } + + public boolean hasProcMount() { + return this.procMount != null; + } + + public Boolean getReadOnlyRootFilesystem() { + return this.readOnlyRootFilesystem; + } + + public A withReadOnlyRootFilesystem(Boolean readOnlyRootFilesystem) { + this.readOnlyRootFilesystem = readOnlyRootFilesystem; + return (A) this; + } + + public boolean hasReadOnlyRootFilesystem() { + return this.readOnlyRootFilesystem != null; + } + + public Long getRunAsGroup() { + return this.runAsGroup; + } + + public A withRunAsGroup(Long runAsGroup) { + this.runAsGroup = runAsGroup; + return (A) this; + } + + public boolean hasRunAsGroup() { + return this.runAsGroup != null; + } + + public Boolean getRunAsNonRoot() { + return this.runAsNonRoot; + } + + public A withRunAsNonRoot(Boolean runAsNonRoot) { + this.runAsNonRoot = runAsNonRoot; + return (A) this; + } + + public boolean hasRunAsNonRoot() { + return this.runAsNonRoot != null; + } + + public Long getRunAsUser() { + return this.runAsUser; + } + + public A withRunAsUser(Long runAsUser) { + this.runAsUser = runAsUser; + return (A) this; + } + + public boolean hasRunAsUser() { + return this.runAsUser != null; + } + + public V1SELinuxOptions buildSeLinuxOptions() { + return this.seLinuxOptions != null ? this.seLinuxOptions.build() : null; + } + + public A withSeLinuxOptions(V1SELinuxOptions seLinuxOptions) { + this._visitables.remove("seLinuxOptions"); + if (seLinuxOptions != null) { + this.seLinuxOptions = new V1SELinuxOptionsBuilder(seLinuxOptions); + this._visitables.get("seLinuxOptions").add(this.seLinuxOptions); + } else { + this.seLinuxOptions = null; + this._visitables.get("seLinuxOptions").remove(this.seLinuxOptions); + } + return (A) this; + } + + public boolean hasSeLinuxOptions() { + return this.seLinuxOptions != null; } - public interface SeLinuxOptionsNested extends Nested,V1SELinuxOptionsFluent>{ - public N and(); - public N endSeLinuxOptions(); + + public SeLinuxOptionsNested withNewSeLinuxOptions() { + return new SeLinuxOptionsNested(null); + } + + public SeLinuxOptionsNested withNewSeLinuxOptionsLike(V1SELinuxOptions item) { + return new SeLinuxOptionsNested(item); + } + + public SeLinuxOptionsNested editSeLinuxOptions() { + return withNewSeLinuxOptionsLike(java.util.Optional.ofNullable(buildSeLinuxOptions()).orElse(null)); + } + + public SeLinuxOptionsNested editOrNewSeLinuxOptions() { + return withNewSeLinuxOptionsLike(java.util.Optional.ofNullable(buildSeLinuxOptions()).orElse(new V1SELinuxOptionsBuilder().build())); + } + + public SeLinuxOptionsNested editOrNewSeLinuxOptionsLike(V1SELinuxOptions item) { + return withNewSeLinuxOptionsLike(java.util.Optional.ofNullable(buildSeLinuxOptions()).orElse(item)); + } + + public V1SeccompProfile buildSeccompProfile() { + return this.seccompProfile != null ? this.seccompProfile.build() : null; + } + + public A withSeccompProfile(V1SeccompProfile seccompProfile) { + this._visitables.remove("seccompProfile"); + if (seccompProfile != null) { + this.seccompProfile = new V1SeccompProfileBuilder(seccompProfile); + this._visitables.get("seccompProfile").add(this.seccompProfile); + } else { + this.seccompProfile = null; + this._visitables.get("seccompProfile").remove(this.seccompProfile); + } + return (A) this; + } + + public boolean hasSeccompProfile() { + return this.seccompProfile != null; + } + + public SeccompProfileNested withNewSeccompProfile() { + return new SeccompProfileNested(null); + } + + public SeccompProfileNested withNewSeccompProfileLike(V1SeccompProfile item) { + return new SeccompProfileNested(item); + } + + public SeccompProfileNested editSeccompProfile() { + return withNewSeccompProfileLike(java.util.Optional.ofNullable(buildSeccompProfile()).orElse(null)); + } + + public SeccompProfileNested editOrNewSeccompProfile() { + return withNewSeccompProfileLike(java.util.Optional.ofNullable(buildSeccompProfile()).orElse(new V1SeccompProfileBuilder().build())); + } + + public SeccompProfileNested editOrNewSeccompProfileLike(V1SeccompProfile item) { + return withNewSeccompProfileLike(java.util.Optional.ofNullable(buildSeccompProfile()).orElse(item)); + } + + public V1WindowsSecurityContextOptions buildWindowsOptions() { + return this.windowsOptions != null ? this.windowsOptions.build() : null; + } + + public A withWindowsOptions(V1WindowsSecurityContextOptions windowsOptions) { + this._visitables.remove("windowsOptions"); + if (windowsOptions != null) { + this.windowsOptions = new V1WindowsSecurityContextOptionsBuilder(windowsOptions); + this._visitables.get("windowsOptions").add(this.windowsOptions); + } else { + this.windowsOptions = null; + this._visitables.get("windowsOptions").remove(this.windowsOptions); + } + return (A) this; + } + + public boolean hasWindowsOptions() { + return this.windowsOptions != null; + } + + public WindowsOptionsNested withNewWindowsOptions() { + return new WindowsOptionsNested(null); + } + + public WindowsOptionsNested withNewWindowsOptionsLike(V1WindowsSecurityContextOptions item) { + return new WindowsOptionsNested(item); + } + + public WindowsOptionsNested editWindowsOptions() { + return withNewWindowsOptionsLike(java.util.Optional.ofNullable(buildWindowsOptions()).orElse(null)); + } + + public WindowsOptionsNested editOrNewWindowsOptions() { + return withNewWindowsOptionsLike(java.util.Optional.ofNullable(buildWindowsOptions()).orElse(new V1WindowsSecurityContextOptionsBuilder().build())); + } + + public WindowsOptionsNested editOrNewWindowsOptionsLike(V1WindowsSecurityContextOptions item) { + return withNewWindowsOptionsLike(java.util.Optional.ofNullable(buildWindowsOptions()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SecurityContextFluent that = (V1SecurityContextFluent) o; + if (!java.util.Objects.equals(allowPrivilegeEscalation, that.allowPrivilegeEscalation)) return false; + if (!java.util.Objects.equals(capabilities, that.capabilities)) return false; + if (!java.util.Objects.equals(privileged, that.privileged)) return false; + if (!java.util.Objects.equals(procMount, that.procMount)) return false; + if (!java.util.Objects.equals(readOnlyRootFilesystem, that.readOnlyRootFilesystem)) return false; + if (!java.util.Objects.equals(runAsGroup, that.runAsGroup)) return false; + if (!java.util.Objects.equals(runAsNonRoot, that.runAsNonRoot)) return false; + if (!java.util.Objects.equals(runAsUser, that.runAsUser)) return false; + if (!java.util.Objects.equals(seLinuxOptions, that.seLinuxOptions)) return false; + if (!java.util.Objects.equals(seccompProfile, that.seccompProfile)) return false; + if (!java.util.Objects.equals(windowsOptions, that.windowsOptions)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(allowPrivilegeEscalation, capabilities, privileged, procMount, readOnlyRootFilesystem, runAsGroup, runAsNonRoot, runAsUser, seLinuxOptions, seccompProfile, windowsOptions, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (allowPrivilegeEscalation != null) { sb.append("allowPrivilegeEscalation:"); sb.append(allowPrivilegeEscalation + ","); } + if (capabilities != null) { sb.append("capabilities:"); sb.append(capabilities + ","); } + if (privileged != null) { sb.append("privileged:"); sb.append(privileged + ","); } + if (procMount != null) { sb.append("procMount:"); sb.append(procMount + ","); } + if (readOnlyRootFilesystem != null) { sb.append("readOnlyRootFilesystem:"); sb.append(readOnlyRootFilesystem + ","); } + if (runAsGroup != null) { sb.append("runAsGroup:"); sb.append(runAsGroup + ","); } + if (runAsNonRoot != null) { sb.append("runAsNonRoot:"); sb.append(runAsNonRoot + ","); } + if (runAsUser != null) { sb.append("runAsUser:"); sb.append(runAsUser + ","); } + if (seLinuxOptions != null) { sb.append("seLinuxOptions:"); sb.append(seLinuxOptions + ","); } + if (seccompProfile != null) { sb.append("seccompProfile:"); sb.append(seccompProfile + ","); } + if (windowsOptions != null) { sb.append("windowsOptions:"); sb.append(windowsOptions); } + sb.append("}"); + return sb.toString(); + } + + public A withAllowPrivilegeEscalation() { + return withAllowPrivilegeEscalation(true); + } + + public A withPrivileged() { + return withPrivileged(true); + } + + public A withReadOnlyRootFilesystem() { + return withReadOnlyRootFilesystem(true); + } + + public A withRunAsNonRoot() { + return withRunAsNonRoot(true); + } + public class CapabilitiesNested extends V1CapabilitiesFluent> implements Nested{ + CapabilitiesNested(V1Capabilities item) { + this.builder = new V1CapabilitiesBuilder(this, item); + } + V1CapabilitiesBuilder builder; + + public N and() { + return (N) V1SecurityContextFluent.this.withCapabilities(builder.build()); + } + + public N endCapabilities() { + return and(); + } + } - public interface SeccompProfileNested extends Nested,V1SeccompProfileFluent>{ - public N and(); - public N endSeccompProfile(); + public class SeLinuxOptionsNested extends V1SELinuxOptionsFluent> implements Nested{ + SeLinuxOptionsNested(V1SELinuxOptions item) { + this.builder = new V1SELinuxOptionsBuilder(this, item); + } + V1SELinuxOptionsBuilder builder; + + public N and() { + return (N) V1SecurityContextFluent.this.withSeLinuxOptions(builder.build()); + } + public N endSeLinuxOptions() { + return and(); + } + + } - public interface WindowsOptionsNested extends Nested,V1WindowsSecurityContextOptionsFluent>{ - public N and(); - public N endWindowsOptions(); + public class SeccompProfileNested extends V1SeccompProfileFluent> implements Nested{ + SeccompProfileNested(V1SeccompProfile item) { + this.builder = new V1SeccompProfileBuilder(this, item); + } + V1SeccompProfileBuilder builder; + public N and() { + return (N) V1SecurityContextFluent.this.withSeccompProfile(builder.build()); + } + + public N endSeccompProfile() { + return and(); + } + + } + public class WindowsOptionsNested extends V1WindowsSecurityContextOptionsFluent> implements Nested{ + WindowsOptionsNested(V1WindowsSecurityContextOptions item) { + this.builder = new V1WindowsSecurityContextOptionsBuilder(this, item); + } + V1WindowsSecurityContextOptionsBuilder builder; + + public N and() { + return (N) V1SecurityContextFluent.this.withWindowsOptions(builder.build()); + } + + public N endWindowsOptions() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextFluentImpl.java deleted file mode 100644 index b70657d799..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SecurityContextFluentImpl.java +++ /dev/null @@ -1,370 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Long; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SecurityContextFluentImpl> extends BaseFluent implements V1SecurityContextFluent{ - public V1SecurityContextFluentImpl() { - } - public V1SecurityContextFluentImpl(V1SecurityContext instance) { - if (instance != null) { - this.withAllowPrivilegeEscalation(instance.getAllowPrivilegeEscalation()); - this.withCapabilities(instance.getCapabilities()); - this.withPrivileged(instance.getPrivileged()); - this.withProcMount(instance.getProcMount()); - this.withReadOnlyRootFilesystem(instance.getReadOnlyRootFilesystem()); - this.withRunAsGroup(instance.getRunAsGroup()); - this.withRunAsNonRoot(instance.getRunAsNonRoot()); - this.withRunAsUser(instance.getRunAsUser()); - this.withSeLinuxOptions(instance.getSeLinuxOptions()); - this.withSeccompProfile(instance.getSeccompProfile()); - this.withWindowsOptions(instance.getWindowsOptions()); - } - } - private Boolean allowPrivilegeEscalation; - private V1CapabilitiesBuilder capabilities; - private Boolean privileged; - private String procMount; - private Boolean readOnlyRootFilesystem; - private Long runAsGroup; - private Boolean runAsNonRoot; - private Long runAsUser; - private V1SELinuxOptionsBuilder seLinuxOptions; - private V1SeccompProfileBuilder seccompProfile; - private V1WindowsSecurityContextOptionsBuilder windowsOptions; - public Boolean getAllowPrivilegeEscalation() { - return this.allowPrivilegeEscalation; - } - public A withAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation) { - this.allowPrivilegeEscalation=allowPrivilegeEscalation; return (A) this; - } - public Boolean hasAllowPrivilegeEscalation() { - return this.allowPrivilegeEscalation != null; - } - - /** - * This method has been deprecated, please use method buildCapabilities instead. - * @return The buildable object. - */ - @Deprecated - public V1Capabilities getCapabilities() { - return this.capabilities!=null ?this.capabilities.build():null; - } - public V1Capabilities buildCapabilities() { - return this.capabilities!=null ?this.capabilities.build():null; - } - public A withCapabilities(V1Capabilities capabilities) { - _visitables.get("capabilities").remove(this.capabilities); - if (capabilities!=null){ this.capabilities= new V1CapabilitiesBuilder(capabilities); _visitables.get("capabilities").add(this.capabilities);} else { this.capabilities = null; _visitables.get("capabilities").remove(this.capabilities); } return (A) this; - } - public Boolean hasCapabilities() { - return this.capabilities != null; - } - public V1SecurityContextFluentImpl.CapabilitiesNested withNewCapabilities() { - return new V1SecurityContextFluentImpl.CapabilitiesNestedImpl(); - } - public V1SecurityContextFluentImpl.CapabilitiesNested withNewCapabilitiesLike(V1Capabilities item) { - return new V1SecurityContextFluentImpl.CapabilitiesNestedImpl(item); - } - public V1SecurityContextFluentImpl.CapabilitiesNested editCapabilities() { - return withNewCapabilitiesLike(getCapabilities()); - } - public V1SecurityContextFluentImpl.CapabilitiesNested editOrNewCapabilities() { - return withNewCapabilitiesLike(getCapabilities() != null ? getCapabilities(): new V1CapabilitiesBuilder().build()); - } - public V1SecurityContextFluentImpl.CapabilitiesNested editOrNewCapabilitiesLike(V1Capabilities item) { - return withNewCapabilitiesLike(getCapabilities() != null ? getCapabilities(): item); - } - public Boolean getPrivileged() { - return this.privileged; - } - public A withPrivileged(Boolean privileged) { - this.privileged=privileged; return (A) this; - } - public Boolean hasPrivileged() { - return this.privileged != null; - } - public String getProcMount() { - return this.procMount; - } - public A withProcMount(String procMount) { - this.procMount=procMount; return (A) this; - } - public Boolean hasProcMount() { - return this.procMount != null; - } - public Boolean getReadOnlyRootFilesystem() { - return this.readOnlyRootFilesystem; - } - public A withReadOnlyRootFilesystem(Boolean readOnlyRootFilesystem) { - this.readOnlyRootFilesystem=readOnlyRootFilesystem; return (A) this; - } - public Boolean hasReadOnlyRootFilesystem() { - return this.readOnlyRootFilesystem != null; - } - public Long getRunAsGroup() { - return this.runAsGroup; - } - public A withRunAsGroup(Long runAsGroup) { - this.runAsGroup=runAsGroup; return (A) this; - } - public Boolean hasRunAsGroup() { - return this.runAsGroup != null; - } - public Boolean getRunAsNonRoot() { - return this.runAsNonRoot; - } - public A withRunAsNonRoot(Boolean runAsNonRoot) { - this.runAsNonRoot=runAsNonRoot; return (A) this; - } - public Boolean hasRunAsNonRoot() { - return this.runAsNonRoot != null; - } - public Long getRunAsUser() { - return this.runAsUser; - } - public A withRunAsUser(Long runAsUser) { - this.runAsUser=runAsUser; return (A) this; - } - public Boolean hasRunAsUser() { - return this.runAsUser != null; - } - - /** - * This method has been deprecated, please use method buildSeLinuxOptions instead. - * @return The buildable object. - */ - @Deprecated - public V1SELinuxOptions getSeLinuxOptions() { - return this.seLinuxOptions!=null ?this.seLinuxOptions.build():null; - } - public V1SELinuxOptions buildSeLinuxOptions() { - return this.seLinuxOptions!=null ?this.seLinuxOptions.build():null; - } - public A withSeLinuxOptions(V1SELinuxOptions seLinuxOptions) { - _visitables.get("seLinuxOptions").remove(this.seLinuxOptions); - if (seLinuxOptions!=null){ this.seLinuxOptions= new V1SELinuxOptionsBuilder(seLinuxOptions); _visitables.get("seLinuxOptions").add(this.seLinuxOptions);} else { this.seLinuxOptions = null; _visitables.get("seLinuxOptions").remove(this.seLinuxOptions); } return (A) this; - } - public Boolean hasSeLinuxOptions() { - return this.seLinuxOptions != null; - } - public V1SecurityContextFluentImpl.SeLinuxOptionsNested withNewSeLinuxOptions() { - return new V1SecurityContextFluentImpl.SeLinuxOptionsNestedImpl(); - } - public V1SecurityContextFluentImpl.SeLinuxOptionsNested withNewSeLinuxOptionsLike(V1SELinuxOptions item) { - return new V1SecurityContextFluentImpl.SeLinuxOptionsNestedImpl(item); - } - public V1SecurityContextFluentImpl.SeLinuxOptionsNested editSeLinuxOptions() { - return withNewSeLinuxOptionsLike(getSeLinuxOptions()); - } - public V1SecurityContextFluentImpl.SeLinuxOptionsNested editOrNewSeLinuxOptions() { - return withNewSeLinuxOptionsLike(getSeLinuxOptions() != null ? getSeLinuxOptions(): new V1SELinuxOptionsBuilder().build()); - } - public V1SecurityContextFluentImpl.SeLinuxOptionsNested editOrNewSeLinuxOptionsLike(V1SELinuxOptions item) { - return withNewSeLinuxOptionsLike(getSeLinuxOptions() != null ? getSeLinuxOptions(): item); - } - - /** - * This method has been deprecated, please use method buildSeccompProfile instead. - * @return The buildable object. - */ - @Deprecated - public V1SeccompProfile getSeccompProfile() { - return this.seccompProfile!=null ?this.seccompProfile.build():null; - } - public V1SeccompProfile buildSeccompProfile() { - return this.seccompProfile!=null ?this.seccompProfile.build():null; - } - public A withSeccompProfile(V1SeccompProfile seccompProfile) { - _visitables.get("seccompProfile").remove(this.seccompProfile); - if (seccompProfile!=null){ this.seccompProfile= new V1SeccompProfileBuilder(seccompProfile); _visitables.get("seccompProfile").add(this.seccompProfile);} else { this.seccompProfile = null; _visitables.get("seccompProfile").remove(this.seccompProfile); } return (A) this; - } - public Boolean hasSeccompProfile() { - return this.seccompProfile != null; - } - public V1SecurityContextFluentImpl.SeccompProfileNested withNewSeccompProfile() { - return new V1SecurityContextFluentImpl.SeccompProfileNestedImpl(); - } - public V1SecurityContextFluentImpl.SeccompProfileNested withNewSeccompProfileLike(V1SeccompProfile item) { - return new V1SecurityContextFluentImpl.SeccompProfileNestedImpl(item); - } - public V1SecurityContextFluentImpl.SeccompProfileNested editSeccompProfile() { - return withNewSeccompProfileLike(getSeccompProfile()); - } - public V1SecurityContextFluentImpl.SeccompProfileNested editOrNewSeccompProfile() { - return withNewSeccompProfileLike(getSeccompProfile() != null ? getSeccompProfile(): new V1SeccompProfileBuilder().build()); - } - public V1SecurityContextFluentImpl.SeccompProfileNested editOrNewSeccompProfileLike(V1SeccompProfile item) { - return withNewSeccompProfileLike(getSeccompProfile() != null ? getSeccompProfile(): item); - } - - /** - * This method has been deprecated, please use method buildWindowsOptions instead. - * @return The buildable object. - */ - @Deprecated - public V1WindowsSecurityContextOptions getWindowsOptions() { - return this.windowsOptions!=null ?this.windowsOptions.build():null; - } - public V1WindowsSecurityContextOptions buildWindowsOptions() { - return this.windowsOptions!=null ?this.windowsOptions.build():null; - } - public A withWindowsOptions(V1WindowsSecurityContextOptions windowsOptions) { - _visitables.get("windowsOptions").remove(this.windowsOptions); - if (windowsOptions!=null){ this.windowsOptions= new V1WindowsSecurityContextOptionsBuilder(windowsOptions); _visitables.get("windowsOptions").add(this.windowsOptions);} else { this.windowsOptions = null; _visitables.get("windowsOptions").remove(this.windowsOptions); } return (A) this; - } - public Boolean hasWindowsOptions() { - return this.windowsOptions != null; - } - public V1SecurityContextFluentImpl.WindowsOptionsNested withNewWindowsOptions() { - return new V1SecurityContextFluentImpl.WindowsOptionsNestedImpl(); - } - public V1SecurityContextFluentImpl.WindowsOptionsNested withNewWindowsOptionsLike(V1WindowsSecurityContextOptions item) { - return new V1SecurityContextFluentImpl.WindowsOptionsNestedImpl(item); - } - public V1SecurityContextFluentImpl.WindowsOptionsNested editWindowsOptions() { - return withNewWindowsOptionsLike(getWindowsOptions()); - } - public V1SecurityContextFluentImpl.WindowsOptionsNested editOrNewWindowsOptions() { - return withNewWindowsOptionsLike(getWindowsOptions() != null ? getWindowsOptions(): new V1WindowsSecurityContextOptionsBuilder().build()); - } - public V1SecurityContextFluentImpl.WindowsOptionsNested editOrNewWindowsOptionsLike(V1WindowsSecurityContextOptions item) { - return withNewWindowsOptionsLike(getWindowsOptions() != null ? getWindowsOptions(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SecurityContextFluentImpl that = (V1SecurityContextFluentImpl) o; - if (!java.util.Objects.equals(allowPrivilegeEscalation, that.allowPrivilegeEscalation)) return false; - - if (!java.util.Objects.equals(capabilities, that.capabilities)) return false; - - if (!java.util.Objects.equals(privileged, that.privileged)) return false; - - if (!java.util.Objects.equals(procMount, that.procMount)) return false; - - if (!java.util.Objects.equals(readOnlyRootFilesystem, that.readOnlyRootFilesystem)) return false; - - if (!java.util.Objects.equals(runAsGroup, that.runAsGroup)) return false; - - if (!java.util.Objects.equals(runAsNonRoot, that.runAsNonRoot)) return false; - - if (!java.util.Objects.equals(runAsUser, that.runAsUser)) return false; - - if (!java.util.Objects.equals(seLinuxOptions, that.seLinuxOptions)) return false; - - if (!java.util.Objects.equals(seccompProfile, that.seccompProfile)) return false; - - if (!java.util.Objects.equals(windowsOptions, that.windowsOptions)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(allowPrivilegeEscalation, capabilities, privileged, procMount, readOnlyRootFilesystem, runAsGroup, runAsNonRoot, runAsUser, seLinuxOptions, seccompProfile, windowsOptions, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (allowPrivilegeEscalation != null) { sb.append("allowPrivilegeEscalation:"); sb.append(allowPrivilegeEscalation + ","); } - if (capabilities != null) { sb.append("capabilities:"); sb.append(capabilities + ","); } - if (privileged != null) { sb.append("privileged:"); sb.append(privileged + ","); } - if (procMount != null) { sb.append("procMount:"); sb.append(procMount + ","); } - if (readOnlyRootFilesystem != null) { sb.append("readOnlyRootFilesystem:"); sb.append(readOnlyRootFilesystem + ","); } - if (runAsGroup != null) { sb.append("runAsGroup:"); sb.append(runAsGroup + ","); } - if (runAsNonRoot != null) { sb.append("runAsNonRoot:"); sb.append(runAsNonRoot + ","); } - if (runAsUser != null) { sb.append("runAsUser:"); sb.append(runAsUser + ","); } - if (seLinuxOptions != null) { sb.append("seLinuxOptions:"); sb.append(seLinuxOptions + ","); } - if (seccompProfile != null) { sb.append("seccompProfile:"); sb.append(seccompProfile + ","); } - if (windowsOptions != null) { sb.append("windowsOptions:"); sb.append(windowsOptions); } - sb.append("}"); - return sb.toString(); - } - public A withAllowPrivilegeEscalation() { - return withAllowPrivilegeEscalation(true); - } - public A withPrivileged() { - return withPrivileged(true); - } - public A withReadOnlyRootFilesystem() { - return withReadOnlyRootFilesystem(true); - } - public A withRunAsNonRoot() { - return withRunAsNonRoot(true); - } - class CapabilitiesNestedImpl extends V1CapabilitiesFluentImpl> implements V1SecurityContextFluentImpl.CapabilitiesNested,Nested{ - CapabilitiesNestedImpl(V1Capabilities item) { - this.builder = new V1CapabilitiesBuilder(this, item); - } - CapabilitiesNestedImpl() { - this.builder = new V1CapabilitiesBuilder(this); - } - V1CapabilitiesBuilder builder; - public N and() { - return (N) V1SecurityContextFluentImpl.this.withCapabilities(builder.build()); - } - public N endCapabilities() { - return and(); - } - - } - class SeLinuxOptionsNestedImpl extends V1SELinuxOptionsFluentImpl> implements V1SecurityContextFluentImpl.SeLinuxOptionsNested,Nested{ - SeLinuxOptionsNestedImpl(V1SELinuxOptions item) { - this.builder = new V1SELinuxOptionsBuilder(this, item); - } - SeLinuxOptionsNestedImpl() { - this.builder = new V1SELinuxOptionsBuilder(this); - } - V1SELinuxOptionsBuilder builder; - public N and() { - return (N) V1SecurityContextFluentImpl.this.withSeLinuxOptions(builder.build()); - } - public N endSeLinuxOptions() { - return and(); - } - - } - class SeccompProfileNestedImpl extends V1SeccompProfileFluentImpl> implements V1SecurityContextFluentImpl.SeccompProfileNested,Nested{ - SeccompProfileNestedImpl(V1SeccompProfile item) { - this.builder = new V1SeccompProfileBuilder(this, item); - } - SeccompProfileNestedImpl() { - this.builder = new V1SeccompProfileBuilder(this); - } - V1SeccompProfileBuilder builder; - public N and() { - return (N) V1SecurityContextFluentImpl.this.withSeccompProfile(builder.build()); - } - public N endSeccompProfile() { - return and(); - } - - } - class WindowsOptionsNestedImpl extends V1WindowsSecurityContextOptionsFluentImpl> implements V1SecurityContextFluentImpl.WindowsOptionsNested,Nested{ - WindowsOptionsNestedImpl(V1WindowsSecurityContextOptions item) { - this.builder = new V1WindowsSecurityContextOptionsBuilder(this, item); - } - WindowsOptionsNestedImpl() { - this.builder = new V1WindowsSecurityContextOptionsBuilder(this); - } - V1WindowsSecurityContextOptionsBuilder builder; - public N and() { - return (N) V1SecurityContextFluentImpl.this.withWindowsOptions(builder.build()); - } - public N endWindowsOptions() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewBuilder.java index 8edbdf5e08..a1d3b2425b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SelfSubjectAccessReviewBuilder extends V1SelfSubjectAccessReviewFluentImpl implements VisitableBuilder{ +public class V1SelfSubjectAccessReviewBuilder extends V1SelfSubjectAccessReviewFluent implements VisitableBuilder{ public V1SelfSubjectAccessReviewBuilder() { - this(false); - } - public V1SelfSubjectAccessReviewBuilder(Boolean validationEnabled) { - this(new V1SelfSubjectAccessReview(), validationEnabled); + this(new V1SelfSubjectAccessReview()); } + public V1SelfSubjectAccessReviewBuilder(V1SelfSubjectAccessReviewFluent fluent) { - this(fluent, false); - } - public V1SelfSubjectAccessReviewBuilder(V1SelfSubjectAccessReviewFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SelfSubjectAccessReview(), validationEnabled); + this(fluent, new V1SelfSubjectAccessReview()); } + public V1SelfSubjectAccessReviewBuilder(V1SelfSubjectAccessReviewFluent fluent,V1SelfSubjectAccessReview instance) { - this(fluent, instance, false); - } - public V1SelfSubjectAccessReviewBuilder(V1SelfSubjectAccessReviewFluent fluent,V1SelfSubjectAccessReview instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SelfSubjectAccessReviewBuilder(V1SelfSubjectAccessReview instance) { - this(instance,false); - } - public V1SelfSubjectAccessReviewBuilder(V1SelfSubjectAccessReview instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SelfSubjectAccessReviewFluent fluent; - Boolean validationEnabled; + public V1SelfSubjectAccessReview build() { V1SelfSubjectAccessReview buildable = new V1SelfSubjectAccessReview(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewFluent.java index 53e2ff5732..9fc46c0698 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1SelfSubjectAccessReviewFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1SelfSubjectAccessReviewFluent.MetadataNested withNewMetadata(); - public V1SelfSubjectAccessReviewFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1SelfSubjectAccessReviewFluent.MetadataNested editMetadata(); - public V1SelfSubjectAccessReviewFluent.MetadataNested editOrNewMetadata(); - public V1SelfSubjectAccessReviewFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1SelfSubjectAccessReviewSpec getSpec(); - public V1SelfSubjectAccessReviewSpec buildSpec(); - public A withSpec(V1SelfSubjectAccessReviewSpec spec); - public Boolean hasSpec(); - public V1SelfSubjectAccessReviewFluent.SpecNested withNewSpec(); - public V1SelfSubjectAccessReviewFluent.SpecNested withNewSpecLike(V1SelfSubjectAccessReviewSpec item); - public V1SelfSubjectAccessReviewFluent.SpecNested editSpec(); - public V1SelfSubjectAccessReviewFluent.SpecNested editOrNewSpec(); - public V1SelfSubjectAccessReviewFluent.SpecNested editOrNewSpecLike(V1SelfSubjectAccessReviewSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewStatus getStatus(); - public V1SubjectAccessReviewStatus buildStatus(); - public A withStatus(V1SubjectAccessReviewStatus status); - public Boolean hasStatus(); - public V1SelfSubjectAccessReviewFluent.StatusNested withNewStatus(); - public V1SelfSubjectAccessReviewFluent.StatusNested withNewStatusLike(V1SubjectAccessReviewStatus item); - public V1SelfSubjectAccessReviewFluent.StatusNested editStatus(); - public V1SelfSubjectAccessReviewFluent.StatusNested editOrNewStatus(); - public V1SelfSubjectAccessReviewFluent.StatusNested editOrNewStatusLike(V1SubjectAccessReviewStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SelfSubjectAccessReviewFluent> extends BaseFluent{ + public V1SelfSubjectAccessReviewFluent() { + } + + public V1SelfSubjectAccessReviewFluent(V1SelfSubjectAccessReview instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1SelfSubjectAccessReviewSpecBuilder spec; + private V1SubjectAccessReviewStatusBuilder status; + + protected void copyInstance(V1SelfSubjectAccessReview instance) { + instance = (instance != null ? instance : new V1SelfSubjectAccessReview()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1SelfSubjectAccessReviewSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1SelfSubjectAccessReviewSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1SelfSubjectAccessReviewSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1SelfSubjectAccessReviewSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1SelfSubjectAccessReviewSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1SelfSubjectAccessReviewSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1SelfSubjectAccessReviewSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1SubjectAccessReviewStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1SubjectAccessReviewStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1SubjectAccessReviewStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1SubjectAccessReviewStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1SubjectAccessReviewStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1SubjectAccessReviewStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SelfSubjectAccessReviewFluent that = (V1SelfSubjectAccessReviewFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1SelfSubjectAccessReviewFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1SubjectAccessReviewStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1SelfSubjectAccessReviewSpecFluent> implements Nested{ + SpecNested(V1SelfSubjectAccessReviewSpec item) { + this.builder = new V1SelfSubjectAccessReviewSpecBuilder(this, item); + } + V1SelfSubjectAccessReviewSpecBuilder builder; + + public N and() { + return (N) V1SelfSubjectAccessReviewFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1SubjectAccessReviewStatusFluent> implements Nested{ + StatusNested(V1SubjectAccessReviewStatus item) { + this.builder = new V1SubjectAccessReviewStatusBuilder(this, item); + } + V1SubjectAccessReviewStatusBuilder builder; + + public N and() { + return (N) V1SelfSubjectAccessReviewFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewFluentImpl.java deleted file mode 100644 index 77f27553db..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SelfSubjectAccessReviewFluentImpl> extends BaseFluent implements V1SelfSubjectAccessReviewFluent{ - public V1SelfSubjectAccessReviewFluentImpl() { - } - public V1SelfSubjectAccessReviewFluentImpl(V1SelfSubjectAccessReview instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1SelfSubjectAccessReviewSpecBuilder spec; - private V1SubjectAccessReviewStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1SelfSubjectAccessReviewFluentImpl.MetadataNested withNewMetadata() { - return new V1SelfSubjectAccessReviewFluentImpl.MetadataNestedImpl(); - } - public V1SelfSubjectAccessReviewFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1SelfSubjectAccessReviewFluentImpl.MetadataNestedImpl(item); - } - public V1SelfSubjectAccessReviewFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1SelfSubjectAccessReviewFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1SelfSubjectAccessReviewFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1SelfSubjectAccessReviewSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1SelfSubjectAccessReviewSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1SelfSubjectAccessReviewSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1SelfSubjectAccessReviewSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1SelfSubjectAccessReviewFluentImpl.SpecNested withNewSpec() { - return new V1SelfSubjectAccessReviewFluentImpl.SpecNestedImpl(); - } - public V1SelfSubjectAccessReviewFluentImpl.SpecNested withNewSpecLike(V1SelfSubjectAccessReviewSpec item) { - return new V1SelfSubjectAccessReviewFluentImpl.SpecNestedImpl(item); - } - public V1SelfSubjectAccessReviewFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1SelfSubjectAccessReviewFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1SelfSubjectAccessReviewSpecBuilder().build()); - } - public V1SelfSubjectAccessReviewFluentImpl.SpecNested editOrNewSpecLike(V1SelfSubjectAccessReviewSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1SubjectAccessReviewStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1SubjectAccessReviewStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1SubjectAccessReviewStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1SelfSubjectAccessReviewFluentImpl.StatusNested withNewStatus() { - return new V1SelfSubjectAccessReviewFluentImpl.StatusNestedImpl(); - } - public V1SelfSubjectAccessReviewFluentImpl.StatusNested withNewStatusLike(V1SubjectAccessReviewStatus item) { - return new V1SelfSubjectAccessReviewFluentImpl.StatusNestedImpl(item); - } - public V1SelfSubjectAccessReviewFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1SelfSubjectAccessReviewFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1SubjectAccessReviewStatusBuilder().build()); - } - public V1SelfSubjectAccessReviewFluentImpl.StatusNested editOrNewStatusLike(V1SubjectAccessReviewStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SelfSubjectAccessReviewFluentImpl that = (V1SelfSubjectAccessReviewFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1SelfSubjectAccessReviewFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1SelfSubjectAccessReviewFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1SelfSubjectAccessReviewSpecFluentImpl> implements V1SelfSubjectAccessReviewFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1SelfSubjectAccessReviewSpec item) { - this.builder = new V1SelfSubjectAccessReviewSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1SelfSubjectAccessReviewSpecBuilder(this); - } - V1SelfSubjectAccessReviewSpecBuilder builder; - public N and() { - return (N) V1SelfSubjectAccessReviewFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1SubjectAccessReviewStatusFluentImpl> implements V1SelfSubjectAccessReviewFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1SubjectAccessReviewStatus item) { - this.builder = new V1SubjectAccessReviewStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1SubjectAccessReviewStatusBuilder(this); - } - V1SubjectAccessReviewStatusBuilder builder; - public N and() { - return (N) V1SelfSubjectAccessReviewFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecBuilder.java index 4c64900bcd..2dbe91a797 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SelfSubjectAccessReviewSpecBuilder extends V1SelfSubjectAccessReviewSpecFluentImpl implements VisitableBuilder{ +public class V1SelfSubjectAccessReviewSpecBuilder extends V1SelfSubjectAccessReviewSpecFluent implements VisitableBuilder{ public V1SelfSubjectAccessReviewSpecBuilder() { - this(false); - } - public V1SelfSubjectAccessReviewSpecBuilder(Boolean validationEnabled) { - this(new V1SelfSubjectAccessReviewSpec(), validationEnabled); + this(new V1SelfSubjectAccessReviewSpec()); } + public V1SelfSubjectAccessReviewSpecBuilder(V1SelfSubjectAccessReviewSpecFluent fluent) { - this(fluent, false); - } - public V1SelfSubjectAccessReviewSpecBuilder(V1SelfSubjectAccessReviewSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SelfSubjectAccessReviewSpec(), validationEnabled); + this(fluent, new V1SelfSubjectAccessReviewSpec()); } + public V1SelfSubjectAccessReviewSpecBuilder(V1SelfSubjectAccessReviewSpecFluent fluent,V1SelfSubjectAccessReviewSpec instance) { - this(fluent, instance, false); - } - public V1SelfSubjectAccessReviewSpecBuilder(V1SelfSubjectAccessReviewSpecFluent fluent,V1SelfSubjectAccessReviewSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNonResourceAttributes(instance.getNonResourceAttributes()); - fluent.withResourceAttributes(instance.getResourceAttributes()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SelfSubjectAccessReviewSpecBuilder(V1SelfSubjectAccessReviewSpec instance) { - this(instance,false); - } - public V1SelfSubjectAccessReviewSpecBuilder(V1SelfSubjectAccessReviewSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNonResourceAttributes(instance.getNonResourceAttributes()); - this.withResourceAttributes(instance.getResourceAttributes()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SelfSubjectAccessReviewSpecFluent fluent; - Boolean validationEnabled; + public V1SelfSubjectAccessReviewSpec build() { V1SelfSubjectAccessReviewSpec buildable = new V1SelfSubjectAccessReviewSpec(); - buildable.setNonResourceAttributes(fluent.getNonResourceAttributes()); - buildable.setResourceAttributes(fluent.getResourceAttributes()); + buildable.setNonResourceAttributes(fluent.buildNonResourceAttributes()); + buildable.setResourceAttributes(fluent.buildResourceAttributes()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecFluent.java index 24ea1b715e..2df99913dc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1SelfSubjectAccessReviewSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildNonResourceAttributes instead. - * @return The buildable object. - */ - @Deprecated - public V1NonResourceAttributes getNonResourceAttributes(); - public V1NonResourceAttributes buildNonResourceAttributes(); - public A withNonResourceAttributes(V1NonResourceAttributes nonResourceAttributes); - public Boolean hasNonResourceAttributes(); - public V1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested withNewNonResourceAttributes(); - public V1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested withNewNonResourceAttributesLike(V1NonResourceAttributes item); - public V1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested editNonResourceAttributes(); - public V1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested editOrNewNonResourceAttributes(); - public V1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested editOrNewNonResourceAttributesLike(V1NonResourceAttributes item); - - /** - * This method has been deprecated, please use method buildResourceAttributes instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceAttributes getResourceAttributes(); - public V1ResourceAttributes buildResourceAttributes(); - public A withResourceAttributes(V1ResourceAttributes resourceAttributes); - public Boolean hasResourceAttributes(); - public V1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested withNewResourceAttributes(); - public V1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested withNewResourceAttributesLike(V1ResourceAttributes item); - public V1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested editResourceAttributes(); - public V1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested editOrNewResourceAttributes(); - public V1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested editOrNewResourceAttributesLike(V1ResourceAttributes item); - public interface NonResourceAttributesNested extends Nested,V1NonResourceAttributesFluent>{ - public N and(); - public N endNonResourceAttributes(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SelfSubjectAccessReviewSpecFluent> extends BaseFluent{ + public V1SelfSubjectAccessReviewSpecFluent() { + } + + public V1SelfSubjectAccessReviewSpecFluent(V1SelfSubjectAccessReviewSpec instance) { + this.copyInstance(instance); + } + private V1NonResourceAttributesBuilder nonResourceAttributes; + private V1ResourceAttributesBuilder resourceAttributes; + + protected void copyInstance(V1SelfSubjectAccessReviewSpec instance) { + instance = (instance != null ? instance : new V1SelfSubjectAccessReviewSpec()); + if (instance != null) { + this.withNonResourceAttributes(instance.getNonResourceAttributes()); + this.withResourceAttributes(instance.getResourceAttributes()); + } + } + + public V1NonResourceAttributes buildNonResourceAttributes() { + return this.nonResourceAttributes != null ? this.nonResourceAttributes.build() : null; + } + + public A withNonResourceAttributes(V1NonResourceAttributes nonResourceAttributes) { + this._visitables.remove("nonResourceAttributes"); + if (nonResourceAttributes != null) { + this.nonResourceAttributes = new V1NonResourceAttributesBuilder(nonResourceAttributes); + this._visitables.get("nonResourceAttributes").add(this.nonResourceAttributes); + } else { + this.nonResourceAttributes = null; + this._visitables.get("nonResourceAttributes").remove(this.nonResourceAttributes); + } + return (A) this; + } + + public boolean hasNonResourceAttributes() { + return this.nonResourceAttributes != null; + } + + public NonResourceAttributesNested withNewNonResourceAttributes() { + return new NonResourceAttributesNested(null); } - public interface ResourceAttributesNested extends Nested,V1ResourceAttributesFluent>{ - public N and(); - public N endResourceAttributes(); + + public NonResourceAttributesNested withNewNonResourceAttributesLike(V1NonResourceAttributes item) { + return new NonResourceAttributesNested(item); + } + + public NonResourceAttributesNested editNonResourceAttributes() { + return withNewNonResourceAttributesLike(java.util.Optional.ofNullable(buildNonResourceAttributes()).orElse(null)); + } + + public NonResourceAttributesNested editOrNewNonResourceAttributes() { + return withNewNonResourceAttributesLike(java.util.Optional.ofNullable(buildNonResourceAttributes()).orElse(new V1NonResourceAttributesBuilder().build())); + } + + public NonResourceAttributesNested editOrNewNonResourceAttributesLike(V1NonResourceAttributes item) { + return withNewNonResourceAttributesLike(java.util.Optional.ofNullable(buildNonResourceAttributes()).orElse(item)); + } + + public V1ResourceAttributes buildResourceAttributes() { + return this.resourceAttributes != null ? this.resourceAttributes.build() : null; + } + + public A withResourceAttributes(V1ResourceAttributes resourceAttributes) { + this._visitables.remove("resourceAttributes"); + if (resourceAttributes != null) { + this.resourceAttributes = new V1ResourceAttributesBuilder(resourceAttributes); + this._visitables.get("resourceAttributes").add(this.resourceAttributes); + } else { + this.resourceAttributes = null; + this._visitables.get("resourceAttributes").remove(this.resourceAttributes); + } + return (A) this; + } + + public boolean hasResourceAttributes() { + return this.resourceAttributes != null; + } + + public ResourceAttributesNested withNewResourceAttributes() { + return new ResourceAttributesNested(null); + } + + public ResourceAttributesNested withNewResourceAttributesLike(V1ResourceAttributes item) { + return new ResourceAttributesNested(item); + } + + public ResourceAttributesNested editResourceAttributes() { + return withNewResourceAttributesLike(java.util.Optional.ofNullable(buildResourceAttributes()).orElse(null)); + } + + public ResourceAttributesNested editOrNewResourceAttributes() { + return withNewResourceAttributesLike(java.util.Optional.ofNullable(buildResourceAttributes()).orElse(new V1ResourceAttributesBuilder().build())); + } + + public ResourceAttributesNested editOrNewResourceAttributesLike(V1ResourceAttributes item) { + return withNewResourceAttributesLike(java.util.Optional.ofNullable(buildResourceAttributes()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SelfSubjectAccessReviewSpecFluent that = (V1SelfSubjectAccessReviewSpecFluent) o; + if (!java.util.Objects.equals(nonResourceAttributes, that.nonResourceAttributes)) return false; + if (!java.util.Objects.equals(resourceAttributes, that.resourceAttributes)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(nonResourceAttributes, resourceAttributes, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (nonResourceAttributes != null) { sb.append("nonResourceAttributes:"); sb.append(nonResourceAttributes + ","); } + if (resourceAttributes != null) { sb.append("resourceAttributes:"); sb.append(resourceAttributes); } + sb.append("}"); + return sb.toString(); + } + public class NonResourceAttributesNested extends V1NonResourceAttributesFluent> implements Nested{ + NonResourceAttributesNested(V1NonResourceAttributes item) { + this.builder = new V1NonResourceAttributesBuilder(this, item); + } + V1NonResourceAttributesBuilder builder; + + public N and() { + return (N) V1SelfSubjectAccessReviewSpecFluent.this.withNonResourceAttributes(builder.build()); + } + + public N endNonResourceAttributes() { + return and(); + } + } + public class ResourceAttributesNested extends V1ResourceAttributesFluent> implements Nested{ + ResourceAttributesNested(V1ResourceAttributes item) { + this.builder = new V1ResourceAttributesBuilder(this, item); + } + V1ResourceAttributesBuilder builder; + + public N and() { + return (N) V1SelfSubjectAccessReviewSpecFluent.this.withResourceAttributes(builder.build()); + } + + public N endResourceAttributes() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecFluentImpl.java deleted file mode 100644 index ac2d94cae8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectAccessReviewSpecFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SelfSubjectAccessReviewSpecFluentImpl> extends BaseFluent implements V1SelfSubjectAccessReviewSpecFluent{ - public V1SelfSubjectAccessReviewSpecFluentImpl() { - } - public V1SelfSubjectAccessReviewSpecFluentImpl(V1SelfSubjectAccessReviewSpec instance) { - if (instance != null) { - this.withNonResourceAttributes(instance.getNonResourceAttributes()); - this.withResourceAttributes(instance.getResourceAttributes()); - } - } - private V1NonResourceAttributesBuilder nonResourceAttributes; - private V1ResourceAttributesBuilder resourceAttributes; - - /** - * This method has been deprecated, please use method buildNonResourceAttributes instead. - * @return The buildable object. - */ - @Deprecated - public V1NonResourceAttributes getNonResourceAttributes() { - return this.nonResourceAttributes!=null ?this.nonResourceAttributes.build():null; - } - public V1NonResourceAttributes buildNonResourceAttributes() { - return this.nonResourceAttributes!=null ?this.nonResourceAttributes.build():null; - } - public A withNonResourceAttributes(V1NonResourceAttributes nonResourceAttributes) { - _visitables.get("nonResourceAttributes").remove(this.nonResourceAttributes); - if (nonResourceAttributes!=null){ this.nonResourceAttributes= new V1NonResourceAttributesBuilder(nonResourceAttributes); _visitables.get("nonResourceAttributes").add(this.nonResourceAttributes);} else { this.nonResourceAttributes = null; _visitables.get("nonResourceAttributes").remove(this.nonResourceAttributes); } return (A) this; - } - public Boolean hasNonResourceAttributes() { - return this.nonResourceAttributes != null; - } - public V1SelfSubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested withNewNonResourceAttributes() { - return new V1SelfSubjectAccessReviewSpecFluentImpl.NonResourceAttributesNestedImpl(); - } - public V1SelfSubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested withNewNonResourceAttributesLike(V1NonResourceAttributes item) { - return new V1SelfSubjectAccessReviewSpecFluentImpl.NonResourceAttributesNestedImpl(item); - } - public V1SelfSubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested editNonResourceAttributes() { - return withNewNonResourceAttributesLike(getNonResourceAttributes()); - } - public V1SelfSubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested editOrNewNonResourceAttributes() { - return withNewNonResourceAttributesLike(getNonResourceAttributes() != null ? getNonResourceAttributes(): new V1NonResourceAttributesBuilder().build()); - } - public V1SelfSubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested editOrNewNonResourceAttributesLike(V1NonResourceAttributes item) { - return withNewNonResourceAttributesLike(getNonResourceAttributes() != null ? getNonResourceAttributes(): item); - } - - /** - * This method has been deprecated, please use method buildResourceAttributes instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceAttributes getResourceAttributes() { - return this.resourceAttributes!=null ?this.resourceAttributes.build():null; - } - public V1ResourceAttributes buildResourceAttributes() { - return this.resourceAttributes!=null ?this.resourceAttributes.build():null; - } - public A withResourceAttributes(V1ResourceAttributes resourceAttributes) { - _visitables.get("resourceAttributes").remove(this.resourceAttributes); - if (resourceAttributes!=null){ this.resourceAttributes= new V1ResourceAttributesBuilder(resourceAttributes); _visitables.get("resourceAttributes").add(this.resourceAttributes);} else { this.resourceAttributes = null; _visitables.get("resourceAttributes").remove(this.resourceAttributes); } return (A) this; - } - public Boolean hasResourceAttributes() { - return this.resourceAttributes != null; - } - public V1SelfSubjectAccessReviewSpecFluentImpl.ResourceAttributesNested withNewResourceAttributes() { - return new V1SelfSubjectAccessReviewSpecFluentImpl.ResourceAttributesNestedImpl(); - } - public V1SelfSubjectAccessReviewSpecFluentImpl.ResourceAttributesNested withNewResourceAttributesLike(V1ResourceAttributes item) { - return new V1SelfSubjectAccessReviewSpecFluentImpl.ResourceAttributesNestedImpl(item); - } - public V1SelfSubjectAccessReviewSpecFluentImpl.ResourceAttributesNested editResourceAttributes() { - return withNewResourceAttributesLike(getResourceAttributes()); - } - public V1SelfSubjectAccessReviewSpecFluentImpl.ResourceAttributesNested editOrNewResourceAttributes() { - return withNewResourceAttributesLike(getResourceAttributes() != null ? getResourceAttributes(): new V1ResourceAttributesBuilder().build()); - } - public V1SelfSubjectAccessReviewSpecFluentImpl.ResourceAttributesNested editOrNewResourceAttributesLike(V1ResourceAttributes item) { - return withNewResourceAttributesLike(getResourceAttributes() != null ? getResourceAttributes(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SelfSubjectAccessReviewSpecFluentImpl that = (V1SelfSubjectAccessReviewSpecFluentImpl) o; - if (!java.util.Objects.equals(nonResourceAttributes, that.nonResourceAttributes)) return false; - - if (!java.util.Objects.equals(resourceAttributes, that.resourceAttributes)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(nonResourceAttributes, resourceAttributes, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (nonResourceAttributes != null) { sb.append("nonResourceAttributes:"); sb.append(nonResourceAttributes + ","); } - if (resourceAttributes != null) { sb.append("resourceAttributes:"); sb.append(resourceAttributes); } - sb.append("}"); - return sb.toString(); - } - class NonResourceAttributesNestedImpl extends V1NonResourceAttributesFluentImpl> implements V1SelfSubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested,Nested{ - NonResourceAttributesNestedImpl(V1NonResourceAttributes item) { - this.builder = new V1NonResourceAttributesBuilder(this, item); - } - NonResourceAttributesNestedImpl() { - this.builder = new V1NonResourceAttributesBuilder(this); - } - V1NonResourceAttributesBuilder builder; - public N and() { - return (N) V1SelfSubjectAccessReviewSpecFluentImpl.this.withNonResourceAttributes(builder.build()); - } - public N endNonResourceAttributes() { - return and(); - } - - } - class ResourceAttributesNestedImpl extends V1ResourceAttributesFluentImpl> implements V1SelfSubjectAccessReviewSpecFluentImpl.ResourceAttributesNested,Nested{ - ResourceAttributesNestedImpl(V1ResourceAttributes item) { - this.builder = new V1ResourceAttributesBuilder(this, item); - } - ResourceAttributesNestedImpl() { - this.builder = new V1ResourceAttributesBuilder(this); - } - V1ResourceAttributesBuilder builder; - public N and() { - return (N) V1SelfSubjectAccessReviewSpecFluentImpl.this.withResourceAttributes(builder.build()); - } - public N endResourceAttributes() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewBuilder.java new file mode 100644 index 0000000000..f1d9826999 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewBuilder.java @@ -0,0 +1,34 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1SelfSubjectReviewBuilder extends V1SelfSubjectReviewFluent implements VisitableBuilder{ + public V1SelfSubjectReviewBuilder() { + this(new V1SelfSubjectReview()); + } + + public V1SelfSubjectReviewBuilder(V1SelfSubjectReviewFluent fluent) { + this(fluent, new V1SelfSubjectReview()); + } + + public V1SelfSubjectReviewBuilder(V1SelfSubjectReviewFluent fluent,V1SelfSubjectReview instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1SelfSubjectReviewBuilder(V1SelfSubjectReview instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1SelfSubjectReviewFluent fluent; + + public V1SelfSubjectReview build() { + V1SelfSubjectReview buildable = new V1SelfSubjectReview(); + buildable.setApiVersion(fluent.getApiVersion()); + buildable.setKind(fluent.getKind()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setStatus(fluent.buildStatus()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewFluent.java new file mode 100644 index 0000000000..5c1031689b --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewFluent.java @@ -0,0 +1,200 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SelfSubjectReviewFluent> extends BaseFluent{ + public V1SelfSubjectReviewFluent() { + } + + public V1SelfSubjectReviewFluent(V1SelfSubjectReview instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1SelfSubjectReviewStatusBuilder status; + + protected void copyInstance(V1SelfSubjectReview instance) { + instance = (instance != null ? instance : new V1SelfSubjectReview()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1SelfSubjectReviewStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1SelfSubjectReviewStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1SelfSubjectReviewStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1SelfSubjectReviewStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1SelfSubjectReviewStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1SelfSubjectReviewStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SelfSubjectReviewFluent that = (V1SelfSubjectReviewFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1SelfSubjectReviewFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + + } + public class StatusNested extends V1SelfSubjectReviewStatusFluent> implements Nested{ + StatusNested(V1SelfSubjectReviewStatus item) { + this.builder = new V1SelfSubjectReviewStatusBuilder(this, item); + } + V1SelfSubjectReviewStatusBuilder builder; + + public N and() { + return (N) V1SelfSubjectReviewFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatusBuilder.java new file mode 100644 index 0000000000..c3665c506d --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatusBuilder.java @@ -0,0 +1,31 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1SelfSubjectReviewStatusBuilder extends V1SelfSubjectReviewStatusFluent implements VisitableBuilder{ + public V1SelfSubjectReviewStatusBuilder() { + this(new V1SelfSubjectReviewStatus()); + } + + public V1SelfSubjectReviewStatusBuilder(V1SelfSubjectReviewStatusFluent fluent) { + this(fluent, new V1SelfSubjectReviewStatus()); + } + + public V1SelfSubjectReviewStatusBuilder(V1SelfSubjectReviewStatusFluent fluent,V1SelfSubjectReviewStatus instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1SelfSubjectReviewStatusBuilder(V1SelfSubjectReviewStatus instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1SelfSubjectReviewStatusFluent fluent; + + public V1SelfSubjectReviewStatus build() { + V1SelfSubjectReviewStatus buildable = new V1SelfSubjectReviewStatus(); + buildable.setUserInfo(fluent.buildUserInfo()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatusFluent.java new file mode 100644 index 0000000000..66b92592ab --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatusFluent.java @@ -0,0 +1,106 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import io.kubernetes.client.fluent.Nested; +import java.lang.Object; +import java.lang.String; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SelfSubjectReviewStatusFluent> extends BaseFluent{ + public V1SelfSubjectReviewStatusFluent() { + } + + public V1SelfSubjectReviewStatusFluent(V1SelfSubjectReviewStatus instance) { + this.copyInstance(instance); + } + private V1UserInfoBuilder userInfo; + + protected void copyInstance(V1SelfSubjectReviewStatus instance) { + instance = (instance != null ? instance : new V1SelfSubjectReviewStatus()); + if (instance != null) { + this.withUserInfo(instance.getUserInfo()); + } + } + + public V1UserInfo buildUserInfo() { + return this.userInfo != null ? this.userInfo.build() : null; + } + + public A withUserInfo(V1UserInfo userInfo) { + this._visitables.remove("userInfo"); + if (userInfo != null) { + this.userInfo = new V1UserInfoBuilder(userInfo); + this._visitables.get("userInfo").add(this.userInfo); + } else { + this.userInfo = null; + this._visitables.get("userInfo").remove(this.userInfo); + } + return (A) this; + } + + public boolean hasUserInfo() { + return this.userInfo != null; + } + + public UserInfoNested withNewUserInfo() { + return new UserInfoNested(null); + } + + public UserInfoNested withNewUserInfoLike(V1UserInfo item) { + return new UserInfoNested(item); + } + + public UserInfoNested editUserInfo() { + return withNewUserInfoLike(java.util.Optional.ofNullable(buildUserInfo()).orElse(null)); + } + + public UserInfoNested editOrNewUserInfo() { + return withNewUserInfoLike(java.util.Optional.ofNullable(buildUserInfo()).orElse(new V1UserInfoBuilder().build())); + } + + public UserInfoNested editOrNewUserInfoLike(V1UserInfo item) { + return withNewUserInfoLike(java.util.Optional.ofNullable(buildUserInfo()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SelfSubjectReviewStatusFluent that = (V1SelfSubjectReviewStatusFluent) o; + if (!java.util.Objects.equals(userInfo, that.userInfo)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(userInfo, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (userInfo != null) { sb.append("userInfo:"); sb.append(userInfo); } + sb.append("}"); + return sb.toString(); + } + public class UserInfoNested extends V1UserInfoFluent> implements Nested{ + UserInfoNested(V1UserInfo item) { + this.builder = new V1UserInfoBuilder(this, item); + } + V1UserInfoBuilder builder; + + public N and() { + return (N) V1SelfSubjectReviewStatusFluent.this.withUserInfo(builder.build()); + } + + public N endUserInfo() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewBuilder.java index 5d1260b477..959ead8e08 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SelfSubjectRulesReviewBuilder extends V1SelfSubjectRulesReviewFluentImpl implements VisitableBuilder{ +public class V1SelfSubjectRulesReviewBuilder extends V1SelfSubjectRulesReviewFluent implements VisitableBuilder{ public V1SelfSubjectRulesReviewBuilder() { - this(false); - } - public V1SelfSubjectRulesReviewBuilder(Boolean validationEnabled) { - this(new V1SelfSubjectRulesReview(), validationEnabled); + this(new V1SelfSubjectRulesReview()); } + public V1SelfSubjectRulesReviewBuilder(V1SelfSubjectRulesReviewFluent fluent) { - this(fluent, false); - } - public V1SelfSubjectRulesReviewBuilder(V1SelfSubjectRulesReviewFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SelfSubjectRulesReview(), validationEnabled); + this(fluent, new V1SelfSubjectRulesReview()); } + public V1SelfSubjectRulesReviewBuilder(V1SelfSubjectRulesReviewFluent fluent,V1SelfSubjectRulesReview instance) { - this(fluent, instance, false); - } - public V1SelfSubjectRulesReviewBuilder(V1SelfSubjectRulesReviewFluent fluent,V1SelfSubjectRulesReview instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SelfSubjectRulesReviewBuilder(V1SelfSubjectRulesReview instance) { - this(instance,false); - } - public V1SelfSubjectRulesReviewBuilder(V1SelfSubjectRulesReview instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SelfSubjectRulesReviewFluent fluent; - Boolean validationEnabled; + public V1SelfSubjectRulesReview build() { V1SelfSubjectRulesReview buildable = new V1SelfSubjectRulesReview(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewFluent.java index 2556e0f53e..f6ca13cb93 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1SelfSubjectRulesReviewFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1SelfSubjectRulesReviewFluent.MetadataNested withNewMetadata(); - public V1SelfSubjectRulesReviewFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1SelfSubjectRulesReviewFluent.MetadataNested editMetadata(); - public V1SelfSubjectRulesReviewFluent.MetadataNested editOrNewMetadata(); - public V1SelfSubjectRulesReviewFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1SelfSubjectRulesReviewSpec getSpec(); - public V1SelfSubjectRulesReviewSpec buildSpec(); - public A withSpec(V1SelfSubjectRulesReviewSpec spec); - public Boolean hasSpec(); - public V1SelfSubjectRulesReviewFluent.SpecNested withNewSpec(); - public V1SelfSubjectRulesReviewFluent.SpecNested withNewSpecLike(V1SelfSubjectRulesReviewSpec item); - public V1SelfSubjectRulesReviewFluent.SpecNested editSpec(); - public V1SelfSubjectRulesReviewFluent.SpecNested editOrNewSpec(); - public V1SelfSubjectRulesReviewFluent.SpecNested editOrNewSpecLike(V1SelfSubjectRulesReviewSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectRulesReviewStatus getStatus(); - public V1SubjectRulesReviewStatus buildStatus(); - public A withStatus(V1SubjectRulesReviewStatus status); - public Boolean hasStatus(); - public V1SelfSubjectRulesReviewFluent.StatusNested withNewStatus(); - public V1SelfSubjectRulesReviewFluent.StatusNested withNewStatusLike(V1SubjectRulesReviewStatus item); - public V1SelfSubjectRulesReviewFluent.StatusNested editStatus(); - public V1SelfSubjectRulesReviewFluent.StatusNested editOrNewStatus(); - public V1SelfSubjectRulesReviewFluent.StatusNested editOrNewStatusLike(V1SubjectRulesReviewStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SelfSubjectRulesReviewFluent> extends BaseFluent{ + public V1SelfSubjectRulesReviewFluent() { + } + + public V1SelfSubjectRulesReviewFluent(V1SelfSubjectRulesReview instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1SelfSubjectRulesReviewSpecBuilder spec; + private V1SubjectRulesReviewStatusBuilder status; + + protected void copyInstance(V1SelfSubjectRulesReview instance) { + instance = (instance != null ? instance : new V1SelfSubjectRulesReview()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1SelfSubjectRulesReviewSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1SelfSubjectRulesReviewSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1SelfSubjectRulesReviewSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1SelfSubjectRulesReviewSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1SelfSubjectRulesReviewSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1SelfSubjectRulesReviewSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1SelfSubjectRulesReviewSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1SubjectRulesReviewStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1SubjectRulesReviewStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1SubjectRulesReviewStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1SubjectRulesReviewStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1SubjectRulesReviewStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1SubjectRulesReviewStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SelfSubjectRulesReviewFluent that = (V1SelfSubjectRulesReviewFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1SelfSubjectRulesReviewFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1SubjectRulesReviewStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1SelfSubjectRulesReviewSpecFluent> implements Nested{ + SpecNested(V1SelfSubjectRulesReviewSpec item) { + this.builder = new V1SelfSubjectRulesReviewSpecBuilder(this, item); + } + V1SelfSubjectRulesReviewSpecBuilder builder; + + public N and() { + return (N) V1SelfSubjectRulesReviewFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1SubjectRulesReviewStatusFluent> implements Nested{ + StatusNested(V1SubjectRulesReviewStatus item) { + this.builder = new V1SubjectRulesReviewStatusBuilder(this, item); + } + V1SubjectRulesReviewStatusBuilder builder; + + public N and() { + return (N) V1SelfSubjectRulesReviewFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewFluentImpl.java deleted file mode 100644 index 81fce7a79d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SelfSubjectRulesReviewFluentImpl> extends BaseFluent implements V1SelfSubjectRulesReviewFluent{ - public V1SelfSubjectRulesReviewFluentImpl() { - } - public V1SelfSubjectRulesReviewFluentImpl(V1SelfSubjectRulesReview instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1SelfSubjectRulesReviewSpecBuilder spec; - private V1SubjectRulesReviewStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1SelfSubjectRulesReviewFluentImpl.MetadataNested withNewMetadata() { - return new V1SelfSubjectRulesReviewFluentImpl.MetadataNestedImpl(); - } - public V1SelfSubjectRulesReviewFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1SelfSubjectRulesReviewFluentImpl.MetadataNestedImpl(item); - } - public V1SelfSubjectRulesReviewFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1SelfSubjectRulesReviewFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1SelfSubjectRulesReviewFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1SelfSubjectRulesReviewSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1SelfSubjectRulesReviewSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1SelfSubjectRulesReviewSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1SelfSubjectRulesReviewSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1SelfSubjectRulesReviewFluentImpl.SpecNested withNewSpec() { - return new V1SelfSubjectRulesReviewFluentImpl.SpecNestedImpl(); - } - public V1SelfSubjectRulesReviewFluentImpl.SpecNested withNewSpecLike(V1SelfSubjectRulesReviewSpec item) { - return new V1SelfSubjectRulesReviewFluentImpl.SpecNestedImpl(item); - } - public V1SelfSubjectRulesReviewFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1SelfSubjectRulesReviewFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1SelfSubjectRulesReviewSpecBuilder().build()); - } - public V1SelfSubjectRulesReviewFluentImpl.SpecNested editOrNewSpecLike(V1SelfSubjectRulesReviewSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectRulesReviewStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1SubjectRulesReviewStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1SubjectRulesReviewStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1SubjectRulesReviewStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1SelfSubjectRulesReviewFluentImpl.StatusNested withNewStatus() { - return new V1SelfSubjectRulesReviewFluentImpl.StatusNestedImpl(); - } - public V1SelfSubjectRulesReviewFluentImpl.StatusNested withNewStatusLike(V1SubjectRulesReviewStatus item) { - return new V1SelfSubjectRulesReviewFluentImpl.StatusNestedImpl(item); - } - public V1SelfSubjectRulesReviewFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1SelfSubjectRulesReviewFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1SubjectRulesReviewStatusBuilder().build()); - } - public V1SelfSubjectRulesReviewFluentImpl.StatusNested editOrNewStatusLike(V1SubjectRulesReviewStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SelfSubjectRulesReviewFluentImpl that = (V1SelfSubjectRulesReviewFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1SelfSubjectRulesReviewFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1SelfSubjectRulesReviewFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1SelfSubjectRulesReviewSpecFluentImpl> implements V1SelfSubjectRulesReviewFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1SelfSubjectRulesReviewSpec item) { - this.builder = new V1SelfSubjectRulesReviewSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1SelfSubjectRulesReviewSpecBuilder(this); - } - V1SelfSubjectRulesReviewSpecBuilder builder; - public N and() { - return (N) V1SelfSubjectRulesReviewFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1SubjectRulesReviewStatusFluentImpl> implements V1SelfSubjectRulesReviewFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1SubjectRulesReviewStatus item) { - this.builder = new V1SubjectRulesReviewStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1SubjectRulesReviewStatusBuilder(this); - } - V1SubjectRulesReviewStatusBuilder builder; - public N and() { - return (N) V1SelfSubjectRulesReviewFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecBuilder.java index a95f69b068..6f63428ece 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SelfSubjectRulesReviewSpecBuilder extends V1SelfSubjectRulesReviewSpecFluentImpl implements VisitableBuilder{ +public class V1SelfSubjectRulesReviewSpecBuilder extends V1SelfSubjectRulesReviewSpecFluent implements VisitableBuilder{ public V1SelfSubjectRulesReviewSpecBuilder() { - this(false); - } - public V1SelfSubjectRulesReviewSpecBuilder(Boolean validationEnabled) { - this(new V1SelfSubjectRulesReviewSpec(), validationEnabled); + this(new V1SelfSubjectRulesReviewSpec()); } + public V1SelfSubjectRulesReviewSpecBuilder(V1SelfSubjectRulesReviewSpecFluent fluent) { - this(fluent, false); - } - public V1SelfSubjectRulesReviewSpecBuilder(V1SelfSubjectRulesReviewSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SelfSubjectRulesReviewSpec(), validationEnabled); + this(fluent, new V1SelfSubjectRulesReviewSpec()); } + public V1SelfSubjectRulesReviewSpecBuilder(V1SelfSubjectRulesReviewSpecFluent fluent,V1SelfSubjectRulesReviewSpec instance) { - this(fluent, instance, false); - } - public V1SelfSubjectRulesReviewSpecBuilder(V1SelfSubjectRulesReviewSpecFluent fluent,V1SelfSubjectRulesReviewSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SelfSubjectRulesReviewSpecBuilder(V1SelfSubjectRulesReviewSpec instance) { - this(instance,false); - } - public V1SelfSubjectRulesReviewSpecBuilder(V1SelfSubjectRulesReviewSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SelfSubjectRulesReviewSpecFluent fluent; - Boolean validationEnabled; + public V1SelfSubjectRulesReviewSpec build() { V1SelfSubjectRulesReviewSpec buildable = new V1SelfSubjectRulesReviewSpec(); buildable.setNamespace(fluent.getNamespace()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecFluent.java index 5fb76f7edf..d2ead8c37a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1SelfSubjectRulesReviewSpecFluent> extends Fluent{ - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SelfSubjectRulesReviewSpecFluent> extends BaseFluent{ + public V1SelfSubjectRulesReviewSpecFluent() { + } + public V1SelfSubjectRulesReviewSpecFluent(V1SelfSubjectRulesReviewSpec instance) { + this.copyInstance(instance); + } + private String namespace; + + protected void copyInstance(V1SelfSubjectRulesReviewSpec instance) { + instance = (instance != null ? instance : new V1SelfSubjectRulesReviewSpec()); + if (instance != null) { + this.withNamespace(instance.getNamespace()); + } + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SelfSubjectRulesReviewSpecFluent that = (V1SelfSubjectRulesReviewSpecFluent) o; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(namespace, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecFluentImpl.java deleted file mode 100644 index 0055b46fdb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectRulesReviewSpecFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SelfSubjectRulesReviewSpecFluentImpl> extends BaseFluent implements V1SelfSubjectRulesReviewSpecFluent{ - public V1SelfSubjectRulesReviewSpecFluentImpl() { - } - public V1SelfSubjectRulesReviewSpecFluentImpl(V1SelfSubjectRulesReviewSpec instance) { - if (instance != null) { - this.withNamespace(instance.getNamespace()); - } - } - private String namespace; - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SelfSubjectRulesReviewSpecFluentImpl that = (V1SelfSubjectRulesReviewSpecFluentImpl) o; - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(namespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRBuilder.java index 4190be7c80..94ed49347e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServerAddressByClientCIDRBuilder extends V1ServerAddressByClientCIDRFluentImpl implements VisitableBuilder{ +public class V1ServerAddressByClientCIDRBuilder extends V1ServerAddressByClientCIDRFluent implements VisitableBuilder{ public V1ServerAddressByClientCIDRBuilder() { - this(false); - } - public V1ServerAddressByClientCIDRBuilder(Boolean validationEnabled) { - this(new V1ServerAddressByClientCIDR(), validationEnabled); + this(new V1ServerAddressByClientCIDR()); } + public V1ServerAddressByClientCIDRBuilder(V1ServerAddressByClientCIDRFluent fluent) { - this(fluent, false); - } - public V1ServerAddressByClientCIDRBuilder(V1ServerAddressByClientCIDRFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ServerAddressByClientCIDR(), validationEnabled); + this(fluent, new V1ServerAddressByClientCIDR()); } + public V1ServerAddressByClientCIDRBuilder(V1ServerAddressByClientCIDRFluent fluent,V1ServerAddressByClientCIDR instance) { - this(fluent, instance, false); - } - public V1ServerAddressByClientCIDRBuilder(V1ServerAddressByClientCIDRFluent fluent,V1ServerAddressByClientCIDR instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withClientCIDR(instance.getClientCIDR()); - fluent.withServerAddress(instance.getServerAddress()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServerAddressByClientCIDRBuilder(V1ServerAddressByClientCIDR instance) { - this(instance,false); - } - public V1ServerAddressByClientCIDRBuilder(V1ServerAddressByClientCIDR instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withClientCIDR(instance.getClientCIDR()); - this.withServerAddress(instance.getServerAddress()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServerAddressByClientCIDRFluent fluent; - Boolean validationEnabled; + public V1ServerAddressByClientCIDR build() { V1ServerAddressByClientCIDR buildable = new V1ServerAddressByClientCIDR(); buildable.setClientCIDR(fluent.getClientCIDR()); @@ -46,4 +28,5 @@ public V1ServerAddressByClientCIDR build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRFluent.java index ea141c5375..483fd5276a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ServerAddressByClientCIDRFluent> extends Fluent{ - public String getClientCIDR(); - public A withClientCIDR(String clientCIDR); - public Boolean hasClientCIDR(); - public String getServerAddress(); - public A withServerAddress(String serverAddress); - public Boolean hasServerAddress(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServerAddressByClientCIDRFluent> extends BaseFluent{ + public V1ServerAddressByClientCIDRFluent() { + } + public V1ServerAddressByClientCIDRFluent(V1ServerAddressByClientCIDR instance) { + this.copyInstance(instance); + } + private String clientCIDR; + private String serverAddress; + + protected void copyInstance(V1ServerAddressByClientCIDR instance) { + instance = (instance != null ? instance : new V1ServerAddressByClientCIDR()); + if (instance != null) { + this.withClientCIDR(instance.getClientCIDR()); + this.withServerAddress(instance.getServerAddress()); + } + } + + public String getClientCIDR() { + return this.clientCIDR; + } + + public A withClientCIDR(String clientCIDR) { + this.clientCIDR = clientCIDR; + return (A) this; + } + + public boolean hasClientCIDR() { + return this.clientCIDR != null; + } + + public String getServerAddress() { + return this.serverAddress; + } + + public A withServerAddress(String serverAddress) { + this.serverAddress = serverAddress; + return (A) this; + } + + public boolean hasServerAddress() { + return this.serverAddress != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServerAddressByClientCIDRFluent that = (V1ServerAddressByClientCIDRFluent) o; + if (!java.util.Objects.equals(clientCIDR, that.clientCIDR)) return false; + if (!java.util.Objects.equals(serverAddress, that.serverAddress)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(clientCIDR, serverAddress, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (clientCIDR != null) { sb.append("clientCIDR:"); sb.append(clientCIDR + ","); } + if (serverAddress != null) { sb.append("serverAddress:"); sb.append(serverAddress); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRFluentImpl.java deleted file mode 100644 index 544fd99c1b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServerAddressByClientCIDRFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServerAddressByClientCIDRFluentImpl> extends BaseFluent implements V1ServerAddressByClientCIDRFluent{ - public V1ServerAddressByClientCIDRFluentImpl() { - } - public V1ServerAddressByClientCIDRFluentImpl(V1ServerAddressByClientCIDR instance) { - if (instance != null) { - this.withClientCIDR(instance.getClientCIDR()); - this.withServerAddress(instance.getServerAddress()); - } - } - private String clientCIDR; - private String serverAddress; - public String getClientCIDR() { - return this.clientCIDR; - } - public A withClientCIDR(String clientCIDR) { - this.clientCIDR=clientCIDR; return (A) this; - } - public Boolean hasClientCIDR() { - return this.clientCIDR != null; - } - public String getServerAddress() { - return this.serverAddress; - } - public A withServerAddress(String serverAddress) { - this.serverAddress=serverAddress; return (A) this; - } - public Boolean hasServerAddress() { - return this.serverAddress != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ServerAddressByClientCIDRFluentImpl that = (V1ServerAddressByClientCIDRFluentImpl) o; - if (!java.util.Objects.equals(clientCIDR, that.clientCIDR)) return false; - - if (!java.util.Objects.equals(serverAddress, that.serverAddress)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(clientCIDR, serverAddress, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (clientCIDR != null) { sb.append("clientCIDR:"); sb.append(clientCIDR + ","); } - if (serverAddress != null) { sb.append("serverAddress:"); sb.append(serverAddress); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountBuilder.java index 1a5e57045f..92ef392aeb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServiceAccountBuilder extends V1ServiceAccountFluentImpl implements VisitableBuilder{ +public class V1ServiceAccountBuilder extends V1ServiceAccountFluent implements VisitableBuilder{ public V1ServiceAccountBuilder() { - this(false); - } - public V1ServiceAccountBuilder(Boolean validationEnabled) { - this(new V1ServiceAccount(), validationEnabled); + this(new V1ServiceAccount()); } + public V1ServiceAccountBuilder(V1ServiceAccountFluent fluent) { - this(fluent, false); - } - public V1ServiceAccountBuilder(V1ServiceAccountFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ServiceAccount(), validationEnabled); + this(fluent, new V1ServiceAccount()); } + public V1ServiceAccountBuilder(V1ServiceAccountFluent fluent,V1ServiceAccount instance) { - this(fluent, instance, false); - } - public V1ServiceAccountBuilder(V1ServiceAccountFluent fluent,V1ServiceAccount instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken()); - fluent.withImagePullSecrets(instance.getImagePullSecrets()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSecrets(instance.getSecrets()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServiceAccountBuilder(V1ServiceAccount instance) { - this(instance,false); - } - public V1ServiceAccountBuilder(V1ServiceAccount instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken()); - this.withImagePullSecrets(instance.getImagePullSecrets()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSecrets(instance.getSecrets()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServiceAccountFluent fluent; - Boolean validationEnabled; + public V1ServiceAccount build() { V1ServiceAccount buildable = new V1ServiceAccount(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setAutomountServiceAccountToken(fluent.getAutomountServiceAccountToken()); - buildable.setImagePullSecrets(fluent.getImagePullSecrets()); + buildable.setImagePullSecrets(fluent.buildImagePullSecrets()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSecrets(fluent.getSecrets()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSecrets(fluent.buildSecrets()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountFluent.java index fe6cc04501..868a6abe88 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountFluent.java @@ -1,121 +1,514 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1ServiceAccountFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public Boolean getAutomountServiceAccountToken(); - public A withAutomountServiceAccountToken(Boolean automountServiceAccountToken); - public Boolean hasAutomountServiceAccountToken(); - public A addToImagePullSecrets(int index,V1LocalObjectReference item); - public A setToImagePullSecrets(int index,V1LocalObjectReference item); - public A addToImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items); - public A addAllToImagePullSecrets(Collection items); - public A removeFromImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items); - public A removeAllFromImagePullSecrets(Collection items); - public A removeMatchingFromImagePullSecrets(Predicate predicate); - - /** - * This method has been deprecated, please use method buildImagePullSecrets instead. - * @return The buildable object. - */ - @Deprecated - public List getImagePullSecrets(); - public List buildImagePullSecrets(); - public V1LocalObjectReference buildImagePullSecret(int index); - public V1LocalObjectReference buildFirstImagePullSecret(); - public V1LocalObjectReference buildLastImagePullSecret(); - public V1LocalObjectReference buildMatchingImagePullSecret(Predicate predicate); - public Boolean hasMatchingImagePullSecret(Predicate predicate); - public A withImagePullSecrets(List imagePullSecrets); - public A withImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... imagePullSecrets); - public Boolean hasImagePullSecrets(); - public V1ServiceAccountFluent.ImagePullSecretsNested addNewImagePullSecret(); - public V1ServiceAccountFluent.ImagePullSecretsNested addNewImagePullSecretLike(V1LocalObjectReference item); - public V1ServiceAccountFluent.ImagePullSecretsNested setNewImagePullSecretLike(int index,V1LocalObjectReference item); - public V1ServiceAccountFluent.ImagePullSecretsNested editImagePullSecret(int index); - public V1ServiceAccountFluent.ImagePullSecretsNested editFirstImagePullSecret(); - public V1ServiceAccountFluent.ImagePullSecretsNested editLastImagePullSecret(); - public V1ServiceAccountFluent.ImagePullSecretsNested editMatchingImagePullSecret(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ServiceAccountFluent.MetadataNested withNewMetadata(); - public V1ServiceAccountFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ServiceAccountFluent.MetadataNested editMetadata(); - public V1ServiceAccountFluent.MetadataNested editOrNewMetadata(); - public V1ServiceAccountFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A addToSecrets(int index,V1ObjectReference item); - public A setToSecrets(int index,V1ObjectReference item); - public A addToSecrets(io.kubernetes.client.openapi.models.V1ObjectReference... items); - public A addAllToSecrets(Collection items); - public A removeFromSecrets(io.kubernetes.client.openapi.models.V1ObjectReference... items); - public A removeAllFromSecrets(Collection items); - public A removeMatchingFromSecrets(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSecrets instead. - * @return The buildable object. - */ - @Deprecated - public List getSecrets(); - public List buildSecrets(); - public V1ObjectReference buildSecret(int index); - public V1ObjectReference buildFirstSecret(); - public V1ObjectReference buildLastSecret(); - public V1ObjectReference buildMatchingSecret(Predicate predicate); - public Boolean hasMatchingSecret(Predicate predicate); - public A withSecrets(List secrets); - public A withSecrets(io.kubernetes.client.openapi.models.V1ObjectReference... secrets); - public Boolean hasSecrets(); - public V1ServiceAccountFluent.SecretsNested addNewSecret(); - public V1ServiceAccountFluent.SecretsNested addNewSecretLike(V1ObjectReference item); - public V1ServiceAccountFluent.SecretsNested setNewSecretLike(int index,V1ObjectReference item); - public V1ServiceAccountFluent.SecretsNested editSecret(int index); - public V1ServiceAccountFluent.SecretsNested editFirstSecret(); - public V1ServiceAccountFluent.SecretsNested editLastSecret(); - public V1ServiceAccountFluent.SecretsNested editMatchingSecret(Predicate predicate); - public A withAutomountServiceAccountToken(); - public interface ImagePullSecretsNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endImagePullSecret(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServiceAccountFluent> extends BaseFluent{ + public V1ServiceAccountFluent() { + } + + public V1ServiceAccountFluent(V1ServiceAccount instance) { + this.copyInstance(instance); + } + private String apiVersion; + private Boolean automountServiceAccountToken; + private ArrayList imagePullSecrets; + private String kind; + private V1ObjectMetaBuilder metadata; + private ArrayList secrets; + + protected void copyInstance(V1ServiceAccount instance) { + instance = (instance != null ? instance : new V1ServiceAccount()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken()); + this.withImagePullSecrets(instance.getImagePullSecrets()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSecrets(instance.getSecrets()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public Boolean getAutomountServiceAccountToken() { + return this.automountServiceAccountToken; + } + + public A withAutomountServiceAccountToken(Boolean automountServiceAccountToken) { + this.automountServiceAccountToken = automountServiceAccountToken; + return (A) this; + } + + public boolean hasAutomountServiceAccountToken() { + return this.automountServiceAccountToken != null; + } + + public A addToImagePullSecrets(int index,V1LocalObjectReference item) { + if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} + V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item); + if (index < 0 || index >= imagePullSecrets.size()) { _visitables.get("imagePullSecrets").add(builder); imagePullSecrets.add(builder); } else { _visitables.get("imagePullSecrets").add(index, builder); imagePullSecrets.add(index, builder);} + return (A)this; + } + + public A setToImagePullSecrets(int index,V1LocalObjectReference item) { + if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} + V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item); + if (index < 0 || index >= imagePullSecrets.size()) { _visitables.get("imagePullSecrets").add(builder); imagePullSecrets.add(builder); } else { _visitables.get("imagePullSecrets").set(index, builder); imagePullSecrets.set(index, builder);} + return (A)this; + } + + public A addToImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) { + if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} + for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this; + } + + public A addAllToImagePullSecrets(Collection items) { + if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} + for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this; + } + + public A removeFromImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) { + if (this.imagePullSecrets == null) return (A)this; + for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder); this.imagePullSecrets.remove(builder);} return (A)this; + } + + public A removeAllFromImagePullSecrets(Collection items) { + if (this.imagePullSecrets == null) return (A)this; + for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder); this.imagePullSecrets.remove(builder);} return (A)this; + } + + public A removeMatchingFromImagePullSecrets(Predicate predicate) { + if (imagePullSecrets == null) return (A) this; + final Iterator each = imagePullSecrets.iterator(); + final List visitables = _visitables.get("imagePullSecrets"); + while (each.hasNext()) { + V1LocalObjectReferenceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildImagePullSecrets() { + return this.imagePullSecrets != null ? build(imagePullSecrets) : null; + } + + public V1LocalObjectReference buildImagePullSecret(int index) { + return this.imagePullSecrets.get(index).build(); + } + + public V1LocalObjectReference buildFirstImagePullSecret() { + return this.imagePullSecrets.get(0).build(); + } + + public V1LocalObjectReference buildLastImagePullSecret() { + return this.imagePullSecrets.get(imagePullSecrets.size() - 1).build(); + } + + public V1LocalObjectReference buildMatchingImagePullSecret(Predicate predicate) { + for (V1LocalObjectReferenceBuilder item : imagePullSecrets) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingImagePullSecret(Predicate predicate) { + for (V1LocalObjectReferenceBuilder item : imagePullSecrets) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withImagePullSecrets(List imagePullSecrets) { + if (this.imagePullSecrets != null) { + this._visitables.get("imagePullSecrets").clear(); + } + if (imagePullSecrets != null) { + this.imagePullSecrets = new ArrayList(); + for (V1LocalObjectReference item : imagePullSecrets) { + this.addToImagePullSecrets(item); + } + } else { + this.imagePullSecrets = null; + } + return (A) this; + } + + public A withImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... imagePullSecrets) { + if (this.imagePullSecrets != null) { + this.imagePullSecrets.clear(); + _visitables.remove("imagePullSecrets"); + } + if (imagePullSecrets != null) { + for (V1LocalObjectReference item : imagePullSecrets) { + this.addToImagePullSecrets(item); + } + } + return (A) this; + } + + public boolean hasImagePullSecrets() { + return this.imagePullSecrets != null && !this.imagePullSecrets.isEmpty(); + } + + public ImagePullSecretsNested addNewImagePullSecret() { + return new ImagePullSecretsNested(-1, null); + } + + public ImagePullSecretsNested addNewImagePullSecretLike(V1LocalObjectReference item) { + return new ImagePullSecretsNested(-1, item); + } + + public ImagePullSecretsNested setNewImagePullSecretLike(int index,V1LocalObjectReference item) { + return new ImagePullSecretsNested(index, item); + } + + public ImagePullSecretsNested editImagePullSecret(int index) { + if (imagePullSecrets.size() <= index) throw new RuntimeException("Can't edit imagePullSecrets. Index exceeds size."); + return setNewImagePullSecretLike(index, buildImagePullSecret(index)); + } + + public ImagePullSecretsNested editFirstImagePullSecret() { + if (imagePullSecrets.size() == 0) throw new RuntimeException("Can't edit first imagePullSecrets. The list is empty."); + return setNewImagePullSecretLike(0, buildImagePullSecret(0)); + } + + public ImagePullSecretsNested editLastImagePullSecret() { + int index = imagePullSecrets.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last imagePullSecrets. The list is empty."); + return setNewImagePullSecretLike(index, buildImagePullSecret(index)); + } + + public ImagePullSecretsNested editMatchingImagePullSecret(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public A addToSecrets(int index,V1ObjectReference item) { + if (this.secrets == null) {this.secrets = new ArrayList();} + V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item); + if (index < 0 || index >= secrets.size()) { _visitables.get("secrets").add(builder); secrets.add(builder); } else { _visitables.get("secrets").add(index, builder); secrets.add(index, builder);} + return (A)this; + } + + public A setToSecrets(int index,V1ObjectReference item) { + if (this.secrets == null) {this.secrets = new ArrayList();} + V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item); + if (index < 0 || index >= secrets.size()) { _visitables.get("secrets").add(builder); secrets.add(builder); } else { _visitables.get("secrets").set(index, builder); secrets.set(index, builder);} + return (A)this; + } + + public A addToSecrets(io.kubernetes.client.openapi.models.V1ObjectReference... items) { + if (this.secrets == null) {this.secrets = new ArrayList();} + for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("secrets").add(builder);this.secrets.add(builder);} return (A)this; + } + + public A addAllToSecrets(Collection items) { + if (this.secrets == null) {this.secrets = new ArrayList();} + for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("secrets").add(builder);this.secrets.add(builder);} return (A)this; + } + + public A removeFromSecrets(io.kubernetes.client.openapi.models.V1ObjectReference... items) { + if (this.secrets == null) return (A)this; + for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("secrets").remove(builder); this.secrets.remove(builder);} return (A)this; + } + + public A removeAllFromSecrets(Collection items) { + if (this.secrets == null) return (A)this; + for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("secrets").remove(builder); this.secrets.remove(builder);} return (A)this; + } + + public A removeMatchingFromSecrets(Predicate predicate) { + if (secrets == null) return (A) this; + final Iterator each = secrets.iterator(); + final List visitables = _visitables.get("secrets"); + while (each.hasNext()) { + V1ObjectReferenceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildSecrets() { + return this.secrets != null ? build(secrets) : null; + } + + public V1ObjectReference buildSecret(int index) { + return this.secrets.get(index).build(); + } + + public V1ObjectReference buildFirstSecret() { + return this.secrets.get(0).build(); + } + + public V1ObjectReference buildLastSecret() { + return this.secrets.get(secrets.size() - 1).build(); + } + + public V1ObjectReference buildMatchingSecret(Predicate predicate) { + for (V1ObjectReferenceBuilder item : secrets) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingSecret(Predicate predicate) { + for (V1ObjectReferenceBuilder item : secrets) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSecrets(List secrets) { + if (this.secrets != null) { + this._visitables.get("secrets").clear(); + } + if (secrets != null) { + this.secrets = new ArrayList(); + for (V1ObjectReference item : secrets) { + this.addToSecrets(item); + } + } else { + this.secrets = null; + } + return (A) this; + } + + public A withSecrets(io.kubernetes.client.openapi.models.V1ObjectReference... secrets) { + if (this.secrets != null) { + this.secrets.clear(); + _visitables.remove("secrets"); + } + if (secrets != null) { + for (V1ObjectReference item : secrets) { + this.addToSecrets(item); + } + } + return (A) this; + } + + public boolean hasSecrets() { + return this.secrets != null && !this.secrets.isEmpty(); + } + + public SecretsNested addNewSecret() { + return new SecretsNested(-1, null); + } + + public SecretsNested addNewSecretLike(V1ObjectReference item) { + return new SecretsNested(-1, item); + } + + public SecretsNested setNewSecretLike(int index,V1ObjectReference item) { + return new SecretsNested(index, item); + } + + public SecretsNested editSecret(int index) { + if (secrets.size() <= index) throw new RuntimeException("Can't edit secrets. Index exceeds size."); + return setNewSecretLike(index, buildSecret(index)); + } + + public SecretsNested editFirstSecret() { + if (secrets.size() == 0) throw new RuntimeException("Can't edit first secrets. The list is empty."); + return setNewSecretLike(0, buildSecret(0)); + } + + public SecretsNested editLastSecret() { + int index = secrets.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last secrets. The list is empty."); + return setNewSecretLike(index, buildSecret(index)); + } + + public SecretsNested editMatchingSecret(Predicate predicate) { + int index = -1; + for (int i=0;i extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServiceAccountFluent that = (V1ServiceAccountFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(automountServiceAccountToken, that.automountServiceAccountToken)) return false; + if (!java.util.Objects.equals(imagePullSecrets, that.imagePullSecrets)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(secrets, that.secrets)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, automountServiceAccountToken, imagePullSecrets, kind, metadata, secrets, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (automountServiceAccountToken != null) { sb.append("automountServiceAccountToken:"); sb.append(automountServiceAccountToken + ","); } + if (imagePullSecrets != null && !imagePullSecrets.isEmpty()) { sb.append("imagePullSecrets:"); sb.append(imagePullSecrets + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (secrets != null && !secrets.isEmpty()) { sb.append("secrets:"); sb.append(secrets); } + sb.append("}"); + return sb.toString(); + } + + public A withAutomountServiceAccountToken() { + return withAutomountServiceAccountToken(true); + } + public class ImagePullSecretsNested extends V1LocalObjectReferenceFluent> implements Nested{ + ImagePullSecretsNested(int index,V1LocalObjectReference item) { + this.index = index; + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + int index; + + public N and() { + return (N) V1ServiceAccountFluent.this.setToImagePullSecrets(index,builder.build()); + } + + public N endImagePullSecret() { + return and(); + } + } - public interface SecretsNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endSecret(); + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ServiceAccountFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + } + public class SecretsNested extends V1ObjectReferenceFluent> implements Nested{ + SecretsNested(int index,V1ObjectReference item) { + this.index = index; + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + int index; + + public N and() { + return (N) V1ServiceAccountFluent.this.setToSecrets(index,builder.build()); + } + + public N endSecret() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountFluentImpl.java deleted file mode 100644 index 778d250d81..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountFluentImpl.java +++ /dev/null @@ -1,407 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServiceAccountFluentImpl> extends BaseFluent implements V1ServiceAccountFluent{ - public V1ServiceAccountFluentImpl() { - } - public V1ServiceAccountFluentImpl(V1ServiceAccount instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken()); - this.withImagePullSecrets(instance.getImagePullSecrets()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSecrets(instance.getSecrets()); - } - } - private String apiVersion; - private Boolean automountServiceAccountToken; - private ArrayList imagePullSecrets; - private String kind; - private V1ObjectMetaBuilder metadata; - private ArrayList secrets; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public Boolean getAutomountServiceAccountToken() { - return this.automountServiceAccountToken; - } - public A withAutomountServiceAccountToken(Boolean automountServiceAccountToken) { - this.automountServiceAccountToken=automountServiceAccountToken; return (A) this; - } - public Boolean hasAutomountServiceAccountToken() { - return this.automountServiceAccountToken != null; - } - public A addToImagePullSecrets(int index,V1LocalObjectReference item) { - if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} - V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item); - if (index < 0 || index >= imagePullSecrets.size()) { _visitables.get("imagePullSecrets").add(builder); imagePullSecrets.add(builder); } else { _visitables.get("imagePullSecrets").add(index, builder); imagePullSecrets.add(index, builder);} - return (A)this; - } - public A setToImagePullSecrets(int index,V1LocalObjectReference item) { - if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} - V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item); - if (index < 0 || index >= imagePullSecrets.size()) { _visitables.get("imagePullSecrets").add(builder); imagePullSecrets.add(builder); } else { _visitables.get("imagePullSecrets").set(index, builder); imagePullSecrets.set(index, builder);} - return (A)this; - } - public A addToImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) { - if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} - for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this; - } - public A addAllToImagePullSecrets(Collection items) { - if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();} - for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this; - } - public A removeFromImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) { - for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder);if (this.imagePullSecrets != null) {this.imagePullSecrets.remove(builder);}} return (A)this; - } - public A removeAllFromImagePullSecrets(Collection items) { - for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder);if (this.imagePullSecrets != null) {this.imagePullSecrets.remove(builder);}} return (A)this; - } - public A removeMatchingFromImagePullSecrets(Predicate predicate) { - if (imagePullSecrets == null) return (A) this; - final Iterator each = imagePullSecrets.iterator(); - final List visitables = _visitables.get("imagePullSecrets"); - while (each.hasNext()) { - V1LocalObjectReferenceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildImagePullSecrets instead. - * @return The buildable object. - */ - @Deprecated - public List getImagePullSecrets() { - return imagePullSecrets != null ? build(imagePullSecrets) : null; - } - public List buildImagePullSecrets() { - return imagePullSecrets != null ? build(imagePullSecrets) : null; - } - public V1LocalObjectReference buildImagePullSecret(int index) { - return this.imagePullSecrets.get(index).build(); - } - public V1LocalObjectReference buildFirstImagePullSecret() { - return this.imagePullSecrets.get(0).build(); - } - public V1LocalObjectReference buildLastImagePullSecret() { - return this.imagePullSecrets.get(imagePullSecrets.size() - 1).build(); - } - public V1LocalObjectReference buildMatchingImagePullSecret(Predicate predicate) { - for (V1LocalObjectReferenceBuilder item: imagePullSecrets) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingImagePullSecret(Predicate predicate) { - for (V1LocalObjectReferenceBuilder item: imagePullSecrets) { if(predicate.test(item)){ return true;} } return false; - } - public A withImagePullSecrets(List imagePullSecrets) { - if (this.imagePullSecrets != null) { _visitables.get("imagePullSecrets").clear();} - if (imagePullSecrets != null) {this.imagePullSecrets = new ArrayList(); for (V1LocalObjectReference item : imagePullSecrets){this.addToImagePullSecrets(item);}} else { this.imagePullSecrets = null;} return (A) this; - } - public A withImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... imagePullSecrets) { - if (this.imagePullSecrets != null) {this.imagePullSecrets.clear(); _visitables.remove("imagePullSecrets"); } - if (imagePullSecrets != null) {for (V1LocalObjectReference item :imagePullSecrets){ this.addToImagePullSecrets(item);}} return (A) this; - } - public Boolean hasImagePullSecrets() { - return imagePullSecrets != null && !imagePullSecrets.isEmpty(); - } - public V1ServiceAccountFluentImpl.ImagePullSecretsNested addNewImagePullSecret() { - return new V1ServiceAccountFluentImpl.ImagePullSecretsNestedImpl(); - } - public V1ServiceAccountFluentImpl.ImagePullSecretsNested addNewImagePullSecretLike(V1LocalObjectReference item) { - return new V1ServiceAccountFluentImpl.ImagePullSecretsNestedImpl(-1, item); - } - public V1ServiceAccountFluentImpl.ImagePullSecretsNested setNewImagePullSecretLike(int index,V1LocalObjectReference item) { - return new V1ServiceAccountFluentImpl.ImagePullSecretsNestedImpl(index, item); - } - public V1ServiceAccountFluentImpl.ImagePullSecretsNested editImagePullSecret(int index) { - if (imagePullSecrets.size() <= index) throw new RuntimeException("Can't edit imagePullSecrets. Index exceeds size."); - return setNewImagePullSecretLike(index, buildImagePullSecret(index)); - } - public V1ServiceAccountFluentImpl.ImagePullSecretsNested editFirstImagePullSecret() { - if (imagePullSecrets.size() == 0) throw new RuntimeException("Can't edit first imagePullSecrets. The list is empty."); - return setNewImagePullSecretLike(0, buildImagePullSecret(0)); - } - public V1ServiceAccountFluentImpl.ImagePullSecretsNested editLastImagePullSecret() { - int index = imagePullSecrets.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last imagePullSecrets. The list is empty."); - return setNewImagePullSecretLike(index, buildImagePullSecret(index)); - } - public V1ServiceAccountFluentImpl.ImagePullSecretsNested editMatchingImagePullSecret(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ServiceAccountFluentImpl.MetadataNestedImpl(); - } - public V1ServiceAccountFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ServiceAccountFluentImpl.MetadataNestedImpl(item); - } - public V1ServiceAccountFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ServiceAccountFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ServiceAccountFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public A addToSecrets(int index,V1ObjectReference item) { - if (this.secrets == null) {this.secrets = new ArrayList();} - V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item); - if (index < 0 || index >= secrets.size()) { _visitables.get("secrets").add(builder); secrets.add(builder); } else { _visitables.get("secrets").add(index, builder); secrets.add(index, builder);} - return (A)this; - } - public A setToSecrets(int index,V1ObjectReference item) { - if (this.secrets == null) {this.secrets = new ArrayList();} - V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item); - if (index < 0 || index >= secrets.size()) { _visitables.get("secrets").add(builder); secrets.add(builder); } else { _visitables.get("secrets").set(index, builder); secrets.set(index, builder);} - return (A)this; - } - public A addToSecrets(io.kubernetes.client.openapi.models.V1ObjectReference... items) { - if (this.secrets == null) {this.secrets = new ArrayList();} - for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("secrets").add(builder);this.secrets.add(builder);} return (A)this; - } - public A addAllToSecrets(Collection items) { - if (this.secrets == null) {this.secrets = new ArrayList();} - for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("secrets").add(builder);this.secrets.add(builder);} return (A)this; - } - public A removeFromSecrets(io.kubernetes.client.openapi.models.V1ObjectReference... items) { - for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("secrets").remove(builder);if (this.secrets != null) {this.secrets.remove(builder);}} return (A)this; - } - public A removeAllFromSecrets(Collection items) { - for (V1ObjectReference item : items) {V1ObjectReferenceBuilder builder = new V1ObjectReferenceBuilder(item);_visitables.get("secrets").remove(builder);if (this.secrets != null) {this.secrets.remove(builder);}} return (A)this; - } - public A removeMatchingFromSecrets(Predicate predicate) { - if (secrets == null) return (A) this; - final Iterator each = secrets.iterator(); - final List visitables = _visitables.get("secrets"); - while (each.hasNext()) { - V1ObjectReferenceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildSecrets instead. - * @return The buildable object. - */ - @Deprecated - public List getSecrets() { - return secrets != null ? build(secrets) : null; - } - public List buildSecrets() { - return secrets != null ? build(secrets) : null; - } - public V1ObjectReference buildSecret(int index) { - return this.secrets.get(index).build(); - } - public V1ObjectReference buildFirstSecret() { - return this.secrets.get(0).build(); - } - public V1ObjectReference buildLastSecret() { - return this.secrets.get(secrets.size() - 1).build(); - } - public V1ObjectReference buildMatchingSecret(Predicate predicate) { - for (V1ObjectReferenceBuilder item: secrets) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingSecret(Predicate predicate) { - for (V1ObjectReferenceBuilder item: secrets) { if(predicate.test(item)){ return true;} } return false; - } - public A withSecrets(List secrets) { - if (this.secrets != null) { _visitables.get("secrets").clear();} - if (secrets != null) {this.secrets = new ArrayList(); for (V1ObjectReference item : secrets){this.addToSecrets(item);}} else { this.secrets = null;} return (A) this; - } - public A withSecrets(io.kubernetes.client.openapi.models.V1ObjectReference... secrets) { - if (this.secrets != null) {this.secrets.clear(); _visitables.remove("secrets"); } - if (secrets != null) {for (V1ObjectReference item :secrets){ this.addToSecrets(item);}} return (A) this; - } - public Boolean hasSecrets() { - return secrets != null && !secrets.isEmpty(); - } - public V1ServiceAccountFluentImpl.SecretsNested addNewSecret() { - return new V1ServiceAccountFluentImpl.SecretsNestedImpl(); - } - public V1ServiceAccountFluentImpl.SecretsNested addNewSecretLike(V1ObjectReference item) { - return new V1ServiceAccountFluentImpl.SecretsNestedImpl(-1, item); - } - public V1ServiceAccountFluentImpl.SecretsNested setNewSecretLike(int index,V1ObjectReference item) { - return new V1ServiceAccountFluentImpl.SecretsNestedImpl(index, item); - } - public V1ServiceAccountFluentImpl.SecretsNested editSecret(int index) { - if (secrets.size() <= index) throw new RuntimeException("Can't edit secrets. Index exceeds size."); - return setNewSecretLike(index, buildSecret(index)); - } - public V1ServiceAccountFluentImpl.SecretsNested editFirstSecret() { - if (secrets.size() == 0) throw new RuntimeException("Can't edit first secrets. The list is empty."); - return setNewSecretLike(0, buildSecret(0)); - } - public V1ServiceAccountFluentImpl.SecretsNested editLastSecret() { - int index = secrets.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last secrets. The list is empty."); - return setNewSecretLike(index, buildSecret(index)); - } - public V1ServiceAccountFluentImpl.SecretsNested editMatchingSecret(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1LocalObjectReferenceFluentImpl> implements V1ServiceAccountFluentImpl.ImagePullSecretsNested,Nested{ - ImagePullSecretsNestedImpl(int index,V1LocalObjectReference item) { - this.index = index; - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - ImagePullSecretsNestedImpl() { - this.index = -1; - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - int index; - public N and() { - return (N) V1ServiceAccountFluentImpl.this.setToImagePullSecrets(index,builder.build()); - } - public N endImagePullSecret() { - return and(); - } - - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ServiceAccountFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ServiceAccountFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SecretsNestedImpl extends V1ObjectReferenceFluentImpl> implements V1ServiceAccountFluentImpl.SecretsNested,Nested{ - SecretsNestedImpl(int index,V1ObjectReference item) { - this.index = index; - this.builder = new V1ObjectReferenceBuilder(this, item); - } - SecretsNestedImpl() { - this.index = -1; - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - int index; - public N and() { - return (N) V1ServiceAccountFluentImpl.this.setToSecrets(index,builder.build()); - } - public N endSecret() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListBuilder.java index 311b22fca7..705e2f1155 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServiceAccountListBuilder extends V1ServiceAccountListFluentImpl implements VisitableBuilder{ +public class V1ServiceAccountListBuilder extends V1ServiceAccountListFluent implements VisitableBuilder{ public V1ServiceAccountListBuilder() { - this(false); - } - public V1ServiceAccountListBuilder(Boolean validationEnabled) { - this(new V1ServiceAccountList(), validationEnabled); + this(new V1ServiceAccountList()); } + public V1ServiceAccountListBuilder(V1ServiceAccountListFluent fluent) { - this(fluent, false); - } - public V1ServiceAccountListBuilder(V1ServiceAccountListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ServiceAccountList(), validationEnabled); + this(fluent, new V1ServiceAccountList()); } + public V1ServiceAccountListBuilder(V1ServiceAccountListFluent fluent,V1ServiceAccountList instance) { - this(fluent, instance, false); - } - public V1ServiceAccountListBuilder(V1ServiceAccountListFluent fluent,V1ServiceAccountList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServiceAccountListBuilder(V1ServiceAccountList instance) { - this(instance,false); - } - public V1ServiceAccountListBuilder(V1ServiceAccountList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServiceAccountListFluent fluent; - Boolean validationEnabled; + public V1ServiceAccountList build() { V1ServiceAccountList buildable = new V1ServiceAccountList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListFluent.java index 5e976c6237..8a97948d71 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ServiceAccountListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ServiceAccount item); - public A setToItems(int index,V1ServiceAccount item); - public A addToItems(io.kubernetes.client.openapi.models.V1ServiceAccount... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ServiceAccount... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ServiceAccount buildItem(int index); - public V1ServiceAccount buildFirstItem(); - public V1ServiceAccount buildLastItem(); - public V1ServiceAccount buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ServiceAccount... items); - public Boolean hasItems(); - public V1ServiceAccountListFluent.ItemsNested addNewItem(); - public V1ServiceAccountListFluent.ItemsNested addNewItemLike(V1ServiceAccount item); - public V1ServiceAccountListFluent.ItemsNested setNewItemLike(int index,V1ServiceAccount item); - public V1ServiceAccountListFluent.ItemsNested editItem(int index); - public V1ServiceAccountListFluent.ItemsNested editFirstItem(); - public V1ServiceAccountListFluent.ItemsNested editLastItem(); - public V1ServiceAccountListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ServiceAccountListFluent.MetadataNested withNewMetadata(); - public V1ServiceAccountListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ServiceAccountListFluent.MetadataNested editMetadata(); - public V1ServiceAccountListFluent.MetadataNested editOrNewMetadata(); - public V1ServiceAccountListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ServiceAccountFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServiceAccountListFluent> extends BaseFluent{ + public V1ServiceAccountListFluent() { + } + + public V1ServiceAccountListFluent(V1ServiceAccountList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ServiceAccountList instance) { + instance = (instance != null ? instance : new V1ServiceAccountList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ServiceAccount item) { + if (this.items == null) {this.items = new ArrayList();} + V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ServiceAccount item) { + if (this.items == null) {this.items = new ArrayList();} + V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ServiceAccount... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ServiceAccount item : items) {V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ServiceAccount item : items) {V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ServiceAccount... items) { + if (this.items == null) return (A)this; + for (V1ServiceAccount item : items) {V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ServiceAccount item : items) {V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ServiceAccountBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ServiceAccount buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ServiceAccount buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ServiceAccount buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ServiceAccount buildMatchingItem(Predicate predicate) { + for (V1ServiceAccountBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ServiceAccountBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ServiceAccount item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ServiceAccount... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ServiceAccount item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ServiceAccount item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ServiceAccount item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServiceAccountListFluent that = (V1ServiceAccountListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ServiceAccountFluent> implements Nested{ + ItemsNested(int index,V1ServiceAccount item) { + this.index = index; + this.builder = new V1ServiceAccountBuilder(this, item); + } + V1ServiceAccountBuilder builder; + int index; + public N and() { + return (N) V1ServiceAccountListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ServiceAccountListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListFluentImpl.java deleted file mode 100644 index e935d5a4cd..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServiceAccountListFluentImpl> extends BaseFluent implements V1ServiceAccountListFluent{ - public V1ServiceAccountListFluentImpl() { - } - public V1ServiceAccountListFluentImpl(V1ServiceAccountList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ServiceAccount item) { - if (this.items == null) {this.items = new ArrayList();} - V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ServiceAccount item) { - if (this.items == null) {this.items = new ArrayList();} - V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ServiceAccount... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ServiceAccount item : items) {V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ServiceAccount item : items) {V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ServiceAccount... items) { - for (V1ServiceAccount item : items) {V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ServiceAccount item : items) {V1ServiceAccountBuilder builder = new V1ServiceAccountBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ServiceAccountBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ServiceAccount buildItem(int index) { - return this.items.get(index).build(); - } - public V1ServiceAccount buildFirstItem() { - return this.items.get(0).build(); - } - public V1ServiceAccount buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ServiceAccount buildMatchingItem(Predicate predicate) { - for (V1ServiceAccountBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ServiceAccountBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ServiceAccount item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ServiceAccount... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ServiceAccount item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ServiceAccountListFluentImpl.ItemsNested addNewItem() { - return new V1ServiceAccountListFluentImpl.ItemsNestedImpl(); - } - public V1ServiceAccountListFluentImpl.ItemsNested addNewItemLike(V1ServiceAccount item) { - return new V1ServiceAccountListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ServiceAccountListFluentImpl.ItemsNested setNewItemLike(int index,V1ServiceAccount item) { - return new V1ServiceAccountListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ServiceAccountListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ServiceAccountListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ServiceAccountListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ServiceAccountListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ServiceAccountListFluentImpl.MetadataNestedImpl(); - } - public V1ServiceAccountListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ServiceAccountListFluentImpl.MetadataNestedImpl(item); - } - public V1ServiceAccountListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ServiceAccountListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ServiceAccountListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ServiceAccountListFluentImpl that = (V1ServiceAccountListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ServiceAccountFluentImpl> implements V1ServiceAccountListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ServiceAccount item) { - this.index = index; - this.builder = new V1ServiceAccountBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ServiceAccountBuilder(this); - } - V1ServiceAccountBuilder builder; - int index; - public N and() { - return (N) V1ServiceAccountListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ServiceAccountListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ServiceAccountListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionBuilder.java index 076a27b233..db3c1273b5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServiceAccountTokenProjectionBuilder extends V1ServiceAccountTokenProjectionFluentImpl implements VisitableBuilder{ +public class V1ServiceAccountTokenProjectionBuilder extends V1ServiceAccountTokenProjectionFluent implements VisitableBuilder{ public V1ServiceAccountTokenProjectionBuilder() { - this(false); - } - public V1ServiceAccountTokenProjectionBuilder(Boolean validationEnabled) { - this(new V1ServiceAccountTokenProjection(), validationEnabled); + this(new V1ServiceAccountTokenProjection()); } + public V1ServiceAccountTokenProjectionBuilder(V1ServiceAccountTokenProjectionFluent fluent) { - this(fluent, false); - } - public V1ServiceAccountTokenProjectionBuilder(V1ServiceAccountTokenProjectionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ServiceAccountTokenProjection(), validationEnabled); + this(fluent, new V1ServiceAccountTokenProjection()); } + public V1ServiceAccountTokenProjectionBuilder(V1ServiceAccountTokenProjectionFluent fluent,V1ServiceAccountTokenProjection instance) { - this(fluent, instance, false); - } - public V1ServiceAccountTokenProjectionBuilder(V1ServiceAccountTokenProjectionFluent fluent,V1ServiceAccountTokenProjection instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAudience(instance.getAudience()); - fluent.withExpirationSeconds(instance.getExpirationSeconds()); - fluent.withPath(instance.getPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServiceAccountTokenProjectionBuilder(V1ServiceAccountTokenProjection instance) { - this(instance,false); - } - public V1ServiceAccountTokenProjectionBuilder(V1ServiceAccountTokenProjection instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAudience(instance.getAudience()); - this.withExpirationSeconds(instance.getExpirationSeconds()); - this.withPath(instance.getPath()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServiceAccountTokenProjectionFluent fluent; - Boolean validationEnabled; + public V1ServiceAccountTokenProjection build() { V1ServiceAccountTokenProjection buildable = new V1ServiceAccountTokenProjection(); buildable.setAudience(fluent.getAudience()); @@ -49,4 +29,5 @@ public V1ServiceAccountTokenProjection build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionFluent.java index 1078f83b66..00589a2a40 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionFluent.java @@ -1,23 +1,98 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ServiceAccountTokenProjectionFluent> extends Fluent{ - public String getAudience(); - public A withAudience(String audience); - public Boolean hasAudience(); - public Long getExpirationSeconds(); - public A withExpirationSeconds(Long expirationSeconds); - public Boolean hasExpirationSeconds(); - public String getPath(); - public A withPath(String path); - public Boolean hasPath(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServiceAccountTokenProjectionFluent> extends BaseFluent{ + public V1ServiceAccountTokenProjectionFluent() { + } + public V1ServiceAccountTokenProjectionFluent(V1ServiceAccountTokenProjection instance) { + this.copyInstance(instance); + } + private String audience; + private Long expirationSeconds; + private String path; + + protected void copyInstance(V1ServiceAccountTokenProjection instance) { + instance = (instance != null ? instance : new V1ServiceAccountTokenProjection()); + if (instance != null) { + this.withAudience(instance.getAudience()); + this.withExpirationSeconds(instance.getExpirationSeconds()); + this.withPath(instance.getPath()); + } + } + + public String getAudience() { + return this.audience; + } + + public A withAudience(String audience) { + this.audience = audience; + return (A) this; + } + + public boolean hasAudience() { + return this.audience != null; + } + + public Long getExpirationSeconds() { + return this.expirationSeconds; + } + + public A withExpirationSeconds(Long expirationSeconds) { + this.expirationSeconds = expirationSeconds; + return (A) this; + } + + public boolean hasExpirationSeconds() { + return this.expirationSeconds != null; + } + + public String getPath() { + return this.path; + } + + public A withPath(String path) { + this.path = path; + return (A) this; + } + + public boolean hasPath() { + return this.path != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServiceAccountTokenProjectionFluent that = (V1ServiceAccountTokenProjectionFluent) o; + if (!java.util.Objects.equals(audience, that.audience)) return false; + if (!java.util.Objects.equals(expirationSeconds, that.expirationSeconds)) return false; + if (!java.util.Objects.equals(path, that.path)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(audience, expirationSeconds, path, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (audience != null) { sb.append("audience:"); sb.append(audience + ","); } + if (expirationSeconds != null) { sb.append("expirationSeconds:"); sb.append(expirationSeconds + ","); } + if (path != null) { sb.append("path:"); sb.append(path); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionFluentImpl.java deleted file mode 100644 index 4ea4a75b57..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceAccountTokenProjectionFluentImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServiceAccountTokenProjectionFluentImpl> extends BaseFluent implements V1ServiceAccountTokenProjectionFluent{ - public V1ServiceAccountTokenProjectionFluentImpl() { - } - public V1ServiceAccountTokenProjectionFluentImpl(V1ServiceAccountTokenProjection instance) { - if (instance != null) { - this.withAudience(instance.getAudience()); - this.withExpirationSeconds(instance.getExpirationSeconds()); - this.withPath(instance.getPath()); - } - } - private String audience; - private Long expirationSeconds; - private String path; - public String getAudience() { - return this.audience; - } - public A withAudience(String audience) { - this.audience=audience; return (A) this; - } - public Boolean hasAudience() { - return this.audience != null; - } - public Long getExpirationSeconds() { - return this.expirationSeconds; - } - public A withExpirationSeconds(Long expirationSeconds) { - this.expirationSeconds=expirationSeconds; return (A) this; - } - public Boolean hasExpirationSeconds() { - return this.expirationSeconds != null; - } - public String getPath() { - return this.path; - } - public A withPath(String path) { - this.path=path; return (A) this; - } - public Boolean hasPath() { - return this.path != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ServiceAccountTokenProjectionFluentImpl that = (V1ServiceAccountTokenProjectionFluentImpl) o; - if (!java.util.Objects.equals(audience, that.audience)) return false; - - if (!java.util.Objects.equals(expirationSeconds, that.expirationSeconds)) return false; - - if (!java.util.Objects.equals(path, that.path)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(audience, expirationSeconds, path, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (audience != null) { sb.append("audience:"); sb.append(audience + ","); } - if (expirationSeconds != null) { sb.append("expirationSeconds:"); sb.append(expirationSeconds + ","); } - if (path != null) { sb.append("path:"); sb.append(path); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortBuilder.java index 3825506a87..71aff254d3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServiceBackendPortBuilder extends V1ServiceBackendPortFluentImpl implements VisitableBuilder{ +public class V1ServiceBackendPortBuilder extends V1ServiceBackendPortFluent implements VisitableBuilder{ public V1ServiceBackendPortBuilder() { - this(false); - } - public V1ServiceBackendPortBuilder(Boolean validationEnabled) { - this(new V1ServiceBackendPort(), validationEnabled); + this(new V1ServiceBackendPort()); } + public V1ServiceBackendPortBuilder(V1ServiceBackendPortFluent fluent) { - this(fluent, false); - } - public V1ServiceBackendPortBuilder(V1ServiceBackendPortFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ServiceBackendPort(), validationEnabled); + this(fluent, new V1ServiceBackendPort()); } + public V1ServiceBackendPortBuilder(V1ServiceBackendPortFluent fluent,V1ServiceBackendPort instance) { - this(fluent, instance, false); - } - public V1ServiceBackendPortBuilder(V1ServiceBackendPortFluent fluent,V1ServiceBackendPort instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withNumber(instance.getNumber()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServiceBackendPortBuilder(V1ServiceBackendPort instance) { - this(instance,false); - } - public V1ServiceBackendPortBuilder(V1ServiceBackendPort instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withNumber(instance.getNumber()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServiceBackendPortFluent fluent; - Boolean validationEnabled; + public V1ServiceBackendPort build() { V1ServiceBackendPort buildable = new V1ServiceBackendPort(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1ServiceBackendPort build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortFluent.java index 5d39e871a8..b4b1a08078 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortFluent.java @@ -1,20 +1,81 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ServiceBackendPortFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Integer getNumber(); - public A withNumber(Integer number); - public Boolean hasNumber(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServiceBackendPortFluent> extends BaseFluent{ + public V1ServiceBackendPortFluent() { + } + public V1ServiceBackendPortFluent(V1ServiceBackendPort instance) { + this.copyInstance(instance); + } + private String name; + private Integer number; + + protected void copyInstance(V1ServiceBackendPort instance) { + instance = (instance != null ? instance : new V1ServiceBackendPort()); + if (instance != null) { + this.withName(instance.getName()); + this.withNumber(instance.getNumber()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Integer getNumber() { + return this.number; + } + + public A withNumber(Integer number) { + this.number = number; + return (A) this; + } + + public boolean hasNumber() { + return this.number != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServiceBackendPortFluent that = (V1ServiceBackendPortFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(number, that.number)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, number, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (number != null) { sb.append("number:"); sb.append(number); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortFluentImpl.java deleted file mode 100644 index f89583d19e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBackendPortFluentImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServiceBackendPortFluentImpl> extends BaseFluent implements V1ServiceBackendPortFluent{ - public V1ServiceBackendPortFluentImpl() { - } - public V1ServiceBackendPortFluentImpl(V1ServiceBackendPort instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withNumber(instance.getNumber()); - } - } - private String name; - private Integer number; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Integer getNumber() { - return this.number; - } - public A withNumber(Integer number) { - this.number=number; return (A) this; - } - public Boolean hasNumber() { - return this.number != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ServiceBackendPortFluentImpl that = (V1ServiceBackendPortFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(number, that.number)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, number, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (number != null) { sb.append("number:"); sb.append(number); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBuilder.java index 00a4677536..b6c2375c31 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServiceBuilder extends V1ServiceFluentImpl implements VisitableBuilder{ +public class V1ServiceBuilder extends V1ServiceFluent implements VisitableBuilder{ public V1ServiceBuilder() { - this(false); - } - public V1ServiceBuilder(Boolean validationEnabled) { - this(new V1Service(), validationEnabled); + this(new V1Service()); } + public V1ServiceBuilder(V1ServiceFluent fluent) { - this(fluent, false); - } - public V1ServiceBuilder(V1ServiceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Service(), validationEnabled); + this(fluent, new V1Service()); } + public V1ServiceBuilder(V1ServiceFluent fluent,V1Service instance) { - this(fluent, instance, false); - } - public V1ServiceBuilder(V1ServiceFluent fluent,V1Service instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServiceBuilder(V1Service instance) { - this(instance,false); - } - public V1ServiceBuilder(V1Service instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServiceFluent fluent; - Boolean validationEnabled; + public V1Service build() { V1Service buildable = new V1Service(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceFluent.java index c43d657ab8..dddb2cbcab 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1ServiceFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ServiceFluent.MetadataNested withNewMetadata(); - public V1ServiceFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ServiceFluent.MetadataNested editMetadata(); - public V1ServiceFluent.MetadataNested editOrNewMetadata(); - public V1ServiceFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ServiceSpec getSpec(); - public V1ServiceSpec buildSpec(); - public A withSpec(V1ServiceSpec spec); - public Boolean hasSpec(); - public V1ServiceFluent.SpecNested withNewSpec(); - public V1ServiceFluent.SpecNested withNewSpecLike(V1ServiceSpec item); - public V1ServiceFluent.SpecNested editSpec(); - public V1ServiceFluent.SpecNested editOrNewSpec(); - public V1ServiceFluent.SpecNested editOrNewSpecLike(V1ServiceSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ServiceStatus getStatus(); - public V1ServiceStatus buildStatus(); - public A withStatus(V1ServiceStatus status); - public Boolean hasStatus(); - public V1ServiceFluent.StatusNested withNewStatus(); - public V1ServiceFluent.StatusNested withNewStatusLike(V1ServiceStatus item); - public V1ServiceFluent.StatusNested editStatus(); - public V1ServiceFluent.StatusNested editOrNewStatus(); - public V1ServiceFluent.StatusNested editOrNewStatusLike(V1ServiceStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServiceFluent> extends BaseFluent{ + public V1ServiceFluent() { + } + + public V1ServiceFluent(V1Service instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1ServiceSpecBuilder spec; + private V1ServiceStatusBuilder status; + + protected void copyInstance(V1Service instance) { + instance = (instance != null ? instance : new V1Service()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1ServiceSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1ServiceSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1ServiceSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1ServiceSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1ServiceSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1ServiceSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1ServiceSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1ServiceStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1ServiceStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1ServiceStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1ServiceStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1ServiceStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1ServiceStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServiceFluent that = (V1ServiceFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1ServiceFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1ServiceStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1ServiceSpecFluent> implements Nested{ + SpecNested(V1ServiceSpec item) { + this.builder = new V1ServiceSpecBuilder(this, item); + } + V1ServiceSpecBuilder builder; + + public N and() { + return (N) V1ServiceFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1ServiceStatusFluent> implements Nested{ + StatusNested(V1ServiceStatus item) { + this.builder = new V1ServiceStatusBuilder(this, item); + } + V1ServiceStatusBuilder builder; + + public N and() { + return (N) V1ServiceFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceFluentImpl.java deleted file mode 100644 index 1cb71be632..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServiceFluentImpl> extends BaseFluent implements V1ServiceFluent{ - public V1ServiceFluentImpl() { - } - public V1ServiceFluentImpl(V1Service instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1ServiceSpecBuilder spec; - private V1ServiceStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ServiceFluentImpl.MetadataNested withNewMetadata() { - return new V1ServiceFluentImpl.MetadataNestedImpl(); - } - public V1ServiceFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ServiceFluentImpl.MetadataNestedImpl(item); - } - public V1ServiceFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ServiceFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ServiceFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1ServiceSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1ServiceSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1ServiceSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1ServiceSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1ServiceFluentImpl.SpecNested withNewSpec() { - return new V1ServiceFluentImpl.SpecNestedImpl(); - } - public V1ServiceFluentImpl.SpecNested withNewSpecLike(V1ServiceSpec item) { - return new V1ServiceFluentImpl.SpecNestedImpl(item); - } - public V1ServiceFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1ServiceFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1ServiceSpecBuilder().build()); - } - public V1ServiceFluentImpl.SpecNested editOrNewSpecLike(V1ServiceSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1ServiceStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1ServiceStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1ServiceStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1ServiceStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1ServiceFluentImpl.StatusNested withNewStatus() { - return new V1ServiceFluentImpl.StatusNestedImpl(); - } - public V1ServiceFluentImpl.StatusNested withNewStatusLike(V1ServiceStatus item) { - return new V1ServiceFluentImpl.StatusNestedImpl(item); - } - public V1ServiceFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1ServiceFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1ServiceStatusBuilder().build()); - } - public V1ServiceFluentImpl.StatusNested editOrNewStatusLike(V1ServiceStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ServiceFluentImpl that = (V1ServiceFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1ServiceFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ServiceFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1ServiceSpecFluentImpl> implements V1ServiceFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1ServiceSpec item) { - this.builder = new V1ServiceSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1ServiceSpecBuilder(this); - } - V1ServiceSpecBuilder builder; - public N and() { - return (N) V1ServiceFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1ServiceStatusFluentImpl> implements V1ServiceFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1ServiceStatus item) { - this.builder = new V1ServiceStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1ServiceStatusBuilder(this); - } - V1ServiceStatusBuilder builder; - public N and() { - return (N) V1ServiceFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListBuilder.java index 14f86c40ae..ebde06c333 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServiceListBuilder extends V1ServiceListFluentImpl implements VisitableBuilder{ +public class V1ServiceListBuilder extends V1ServiceListFluent implements VisitableBuilder{ public V1ServiceListBuilder() { - this(false); - } - public V1ServiceListBuilder(Boolean validationEnabled) { - this(new V1ServiceList(), validationEnabled); + this(new V1ServiceList()); } + public V1ServiceListBuilder(V1ServiceListFluent fluent) { - this(fluent, false); - } - public V1ServiceListBuilder(V1ServiceListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ServiceList(), validationEnabled); + this(fluent, new V1ServiceList()); } + public V1ServiceListBuilder(V1ServiceListFluent fluent,V1ServiceList instance) { - this(fluent, instance, false); - } - public V1ServiceListBuilder(V1ServiceListFluent fluent,V1ServiceList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServiceListBuilder(V1ServiceList instance) { - this(instance,false); - } - public V1ServiceListBuilder(V1ServiceList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServiceListFluent fluent; - Boolean validationEnabled; + public V1ServiceList build() { V1ServiceList buildable = new V1ServiceList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListFluent.java index 18a6578322..24b4fae0f2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ServiceListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1Service item); - public A setToItems(int index,V1Service item); - public A addToItems(io.kubernetes.client.openapi.models.V1Service... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1Service... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1Service buildItem(int index); - public V1Service buildFirstItem(); - public V1Service buildLastItem(); - public V1Service buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1Service... items); - public Boolean hasItems(); - public V1ServiceListFluent.ItemsNested addNewItem(); - public V1ServiceListFluent.ItemsNested addNewItemLike(V1Service item); - public V1ServiceListFluent.ItemsNested setNewItemLike(int index,V1Service item); - public V1ServiceListFluent.ItemsNested editItem(int index); - public V1ServiceListFluent.ItemsNested editFirstItem(); - public V1ServiceListFluent.ItemsNested editLastItem(); - public V1ServiceListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ServiceListFluent.MetadataNested withNewMetadata(); - public V1ServiceListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ServiceListFluent.MetadataNested editMetadata(); - public V1ServiceListFluent.MetadataNested editOrNewMetadata(); - public V1ServiceListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ServiceFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServiceListFluent> extends BaseFluent{ + public V1ServiceListFluent() { + } + + public V1ServiceListFluent(V1ServiceList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ServiceList instance) { + instance = (instance != null ? instance : new V1ServiceList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1Service item) { + if (this.items == null) {this.items = new ArrayList();} + V1ServiceBuilder builder = new V1ServiceBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1Service item) { + if (this.items == null) {this.items = new ArrayList();} + V1ServiceBuilder builder = new V1ServiceBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1Service... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Service item : items) {V1ServiceBuilder builder = new V1ServiceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1Service item : items) {V1ServiceBuilder builder = new V1ServiceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1Service... items) { + if (this.items == null) return (A)this; + for (V1Service item : items) {V1ServiceBuilder builder = new V1ServiceBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1Service item : items) {V1ServiceBuilder builder = new V1ServiceBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ServiceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1Service buildItem(int index) { + return this.items.get(index).build(); + } + + public V1Service buildFirstItem() { + return this.items.get(0).build(); + } + + public V1Service buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1Service buildMatchingItem(Predicate predicate) { + for (V1ServiceBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ServiceBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1Service item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1Service... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1Service item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1Service item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1Service item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServiceListFluent that = (V1ServiceListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ServiceFluent> implements Nested{ + ItemsNested(int index,V1Service item) { + this.index = index; + this.builder = new V1ServiceBuilder(this, item); + } + V1ServiceBuilder builder; + int index; + public N and() { + return (N) V1ServiceListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ServiceListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListFluentImpl.java deleted file mode 100644 index a29aee931a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServiceListFluentImpl> extends BaseFluent implements V1ServiceListFluent{ - public V1ServiceListFluentImpl() { - } - public V1ServiceListFluentImpl(V1ServiceList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1Service item) { - if (this.items == null) {this.items = new ArrayList();} - V1ServiceBuilder builder = new V1ServiceBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1Service item) { - if (this.items == null) {this.items = new ArrayList();} - V1ServiceBuilder builder = new V1ServiceBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1Service... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Service item : items) {V1ServiceBuilder builder = new V1ServiceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1Service item : items) {V1ServiceBuilder builder = new V1ServiceBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1Service... items) { - for (V1Service item : items) {V1ServiceBuilder builder = new V1ServiceBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1Service item : items) {V1ServiceBuilder builder = new V1ServiceBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ServiceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1Service buildItem(int index) { - return this.items.get(index).build(); - } - public V1Service buildFirstItem() { - return this.items.get(0).build(); - } - public V1Service buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1Service buildMatchingItem(Predicate predicate) { - for (V1ServiceBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ServiceBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1Service item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1Service... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1Service item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ServiceListFluentImpl.ItemsNested addNewItem() { - return new V1ServiceListFluentImpl.ItemsNestedImpl(); - } - public V1ServiceListFluentImpl.ItemsNested addNewItemLike(V1Service item) { - return new V1ServiceListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ServiceListFluentImpl.ItemsNested setNewItemLike(int index,V1Service item) { - return new V1ServiceListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ServiceListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ServiceListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ServiceListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ServiceListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ServiceListFluentImpl.MetadataNestedImpl(); - } - public V1ServiceListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ServiceListFluentImpl.MetadataNestedImpl(item); - } - public V1ServiceListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ServiceListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ServiceListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ServiceListFluentImpl that = (V1ServiceListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ServiceFluentImpl> implements V1ServiceListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1Service item) { - this.index = index; - this.builder = new V1ServiceBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ServiceBuilder(this); - } - V1ServiceBuilder builder; - int index; - public N and() { - return (N) V1ServiceListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ServiceListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ServiceListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortBuilder.java index 1ef2d1a6e8..c2cbe7f5b9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServicePortBuilder extends V1ServicePortFluentImpl implements VisitableBuilder{ +public class V1ServicePortBuilder extends V1ServicePortFluent implements VisitableBuilder{ public V1ServicePortBuilder() { - this(false); - } - public V1ServicePortBuilder(Boolean validationEnabled) { - this(new V1ServicePort(), validationEnabled); + this(new V1ServicePort()); } + public V1ServicePortBuilder(V1ServicePortFluent fluent) { - this(fluent, false); - } - public V1ServicePortBuilder(V1ServicePortFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ServicePort(), validationEnabled); + this(fluent, new V1ServicePort()); } + public V1ServicePortBuilder(V1ServicePortFluent fluent,V1ServicePort instance) { - this(fluent, instance, false); - } - public V1ServicePortBuilder(V1ServicePortFluent fluent,V1ServicePort instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAppProtocol(instance.getAppProtocol()); - fluent.withName(instance.getName()); - fluent.withNodePort(instance.getNodePort()); - fluent.withPort(instance.getPort()); - fluent.withProtocol(instance.getProtocol()); - fluent.withTargetPort(instance.getTargetPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServicePortBuilder(V1ServicePort instance) { - this(instance,false); - } - public V1ServicePortBuilder(V1ServicePort instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAppProtocol(instance.getAppProtocol()); - this.withName(instance.getName()); - this.withNodePort(instance.getNodePort()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - this.withTargetPort(instance.getTargetPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServicePortFluent fluent; - Boolean validationEnabled; + public V1ServicePort build() { V1ServicePort buildable = new V1ServicePort(); buildable.setAppProtocol(fluent.getAppProtocol()); @@ -58,4 +32,5 @@ public V1ServicePort build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortFluent.java index 7392ce7984..1ebdb2e74a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortFluent.java @@ -2,34 +2,157 @@ import java.lang.Integer; import io.kubernetes.client.custom.IntOrString; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ServicePortFluent> extends Fluent{ - public String getAppProtocol(); - public A withAppProtocol(String appProtocol); - public Boolean hasAppProtocol(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Integer getNodePort(); - public A withNodePort(Integer nodePort); - public Boolean hasNodePort(); - public Integer getPort(); - public A withPort(Integer port); - public Boolean hasPort(); - public String getProtocol(); - public A withProtocol(String protocol); - public Boolean hasProtocol(); - public IntOrString getTargetPort(); - public A withTargetPort(IntOrString targetPort); - public Boolean hasTargetPort(); - public A withNewTargetPort(int value); - public A withNewTargetPort(String value); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServicePortFluent> extends BaseFluent{ + public V1ServicePortFluent() { + } + public V1ServicePortFluent(V1ServicePort instance) { + this.copyInstance(instance); + } + private String appProtocol; + private String name; + private Integer nodePort; + private Integer port; + private String protocol; + private IntOrString targetPort; + + protected void copyInstance(V1ServicePort instance) { + instance = (instance != null ? instance : new V1ServicePort()); + if (instance != null) { + this.withAppProtocol(instance.getAppProtocol()); + this.withName(instance.getName()); + this.withNodePort(instance.getNodePort()); + this.withPort(instance.getPort()); + this.withProtocol(instance.getProtocol()); + this.withTargetPort(instance.getTargetPort()); + } + } + + public String getAppProtocol() { + return this.appProtocol; + } + + public A withAppProtocol(String appProtocol) { + this.appProtocol = appProtocol; + return (A) this; + } + + public boolean hasAppProtocol() { + return this.appProtocol != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Integer getNodePort() { + return this.nodePort; + } + + public A withNodePort(Integer nodePort) { + this.nodePort = nodePort; + return (A) this; + } + + public boolean hasNodePort() { + return this.nodePort != null; + } + + public Integer getPort() { + return this.port; + } + + public A withPort(Integer port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public String getProtocol() { + return this.protocol; + } + + public A withProtocol(String protocol) { + this.protocol = protocol; + return (A) this; + } + + public boolean hasProtocol() { + return this.protocol != null; + } + + public IntOrString getTargetPort() { + return this.targetPort; + } + + public A withTargetPort(IntOrString targetPort) { + this.targetPort = targetPort; + return (A) this; + } + + public boolean hasTargetPort() { + return this.targetPort != null; + } + + public A withNewTargetPort(int value) { + return (A)withTargetPort(new IntOrString(value)); + } + + public A withNewTargetPort(String value) { + return (A)withTargetPort(new IntOrString(value)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServicePortFluent that = (V1ServicePortFluent) o; + if (!java.util.Objects.equals(appProtocol, that.appProtocol)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(nodePort, that.nodePort)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + if (!java.util.Objects.equals(protocol, that.protocol)) return false; + if (!java.util.Objects.equals(targetPort, that.targetPort)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(appProtocol, name, nodePort, port, protocol, targetPort, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (appProtocol != null) { sb.append("appProtocol:"); sb.append(appProtocol + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (nodePort != null) { sb.append("nodePort:"); sb.append(nodePort + ","); } + if (port != null) { sb.append("port:"); sb.append(port + ","); } + if (protocol != null) { sb.append("protocol:"); sb.append(protocol + ","); } + if (targetPort != null) { sb.append("targetPort:"); sb.append(targetPort); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortFluentImpl.java deleted file mode 100644 index 467b4eae2e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServicePortFluentImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import io.kubernetes.client.custom.IntOrString; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServicePortFluentImpl> extends BaseFluent implements V1ServicePortFluent{ - public V1ServicePortFluentImpl() { - } - public V1ServicePortFluentImpl(V1ServicePort instance) { - if (instance != null) { - this.withAppProtocol(instance.getAppProtocol()); - this.withName(instance.getName()); - this.withNodePort(instance.getNodePort()); - this.withPort(instance.getPort()); - this.withProtocol(instance.getProtocol()); - this.withTargetPort(instance.getTargetPort()); - } - } - private String appProtocol; - private String name; - private Integer nodePort; - private Integer port; - private String protocol; - private IntOrString targetPort; - public String getAppProtocol() { - return this.appProtocol; - } - public A withAppProtocol(String appProtocol) { - this.appProtocol=appProtocol; return (A) this; - } - public Boolean hasAppProtocol() { - return this.appProtocol != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Integer getNodePort() { - return this.nodePort; - } - public A withNodePort(Integer nodePort) { - this.nodePort=nodePort; return (A) this; - } - public Boolean hasNodePort() { - return this.nodePort != null; - } - public Integer getPort() { - return this.port; - } - public A withPort(Integer port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public String getProtocol() { - return this.protocol; - } - public A withProtocol(String protocol) { - this.protocol=protocol; return (A) this; - } - public Boolean hasProtocol() { - return this.protocol != null; - } - public IntOrString getTargetPort() { - return this.targetPort; - } - public A withTargetPort(IntOrString targetPort) { - this.targetPort=targetPort; return (A) this; - } - public Boolean hasTargetPort() { - return this.targetPort != null; - } - public A withNewTargetPort(int value) { - return (A)withTargetPort(new IntOrString(value)); - } - public A withNewTargetPort(String value) { - return (A)withTargetPort(new IntOrString(value)); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ServicePortFluentImpl that = (V1ServicePortFluentImpl) o; - if (!java.util.Objects.equals(appProtocol, that.appProtocol)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(nodePort, that.nodePort)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - if (!java.util.Objects.equals(protocol, that.protocol)) return false; - - if (!java.util.Objects.equals(targetPort, that.targetPort)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(appProtocol, name, nodePort, port, protocol, targetPort, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (appProtocol != null) { sb.append("appProtocol:"); sb.append(appProtocol + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (nodePort != null) { sb.append("nodePort:"); sb.append(nodePort + ","); } - if (port != null) { sb.append("port:"); sb.append(port + ","); } - if (protocol != null) { sb.append("protocol:"); sb.append(protocol + ","); } - if (targetPort != null) { sb.append("targetPort:"); sb.append(targetPort); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecBuilder.java index 9a7d6c0cea..c79afeff60 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecBuilder.java @@ -1,78 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServiceSpecBuilder extends V1ServiceSpecFluentImpl implements VisitableBuilder{ +public class V1ServiceSpecBuilder extends V1ServiceSpecFluent implements VisitableBuilder{ public V1ServiceSpecBuilder() { - this(false); - } - public V1ServiceSpecBuilder(Boolean validationEnabled) { - this(new V1ServiceSpec(), validationEnabled); + this(new V1ServiceSpec()); } + public V1ServiceSpecBuilder(V1ServiceSpecFluent fluent) { - this(fluent, false); - } - public V1ServiceSpecBuilder(V1ServiceSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ServiceSpec(), validationEnabled); + this(fluent, new V1ServiceSpec()); } + public V1ServiceSpecBuilder(V1ServiceSpecFluent fluent,V1ServiceSpec instance) { - this(fluent, instance, false); - } - public V1ServiceSpecBuilder(V1ServiceSpecFluent fluent,V1ServiceSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAllocateLoadBalancerNodePorts(instance.getAllocateLoadBalancerNodePorts()); - fluent.withClusterIP(instance.getClusterIP()); - fluent.withClusterIPs(instance.getClusterIPs()); - fluent.withExternalIPs(instance.getExternalIPs()); - fluent.withExternalName(instance.getExternalName()); - fluent.withExternalTrafficPolicy(instance.getExternalTrafficPolicy()); - fluent.withHealthCheckNodePort(instance.getHealthCheckNodePort()); - fluent.withInternalTrafficPolicy(instance.getInternalTrafficPolicy()); - fluent.withIpFamilies(instance.getIpFamilies()); - fluent.withIpFamilyPolicy(instance.getIpFamilyPolicy()); - fluent.withLoadBalancerClass(instance.getLoadBalancerClass()); - fluent.withLoadBalancerIP(instance.getLoadBalancerIP()); - fluent.withLoadBalancerSourceRanges(instance.getLoadBalancerSourceRanges()); - fluent.withPorts(instance.getPorts()); - fluent.withPublishNotReadyAddresses(instance.getPublishNotReadyAddresses()); - fluent.withSelector(instance.getSelector()); - fluent.withSessionAffinity(instance.getSessionAffinity()); - fluent.withSessionAffinityConfig(instance.getSessionAffinityConfig()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServiceSpecBuilder(V1ServiceSpec instance) { - this(instance,false); - } - public V1ServiceSpecBuilder(V1ServiceSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAllocateLoadBalancerNodePorts(instance.getAllocateLoadBalancerNodePorts()); - this.withClusterIP(instance.getClusterIP()); - this.withClusterIPs(instance.getClusterIPs()); - this.withExternalIPs(instance.getExternalIPs()); - this.withExternalName(instance.getExternalName()); - this.withExternalTrafficPolicy(instance.getExternalTrafficPolicy()); - this.withHealthCheckNodePort(instance.getHealthCheckNodePort()); - this.withInternalTrafficPolicy(instance.getInternalTrafficPolicy()); - this.withIpFamilies(instance.getIpFamilies()); - this.withIpFamilyPolicy(instance.getIpFamilyPolicy()); - this.withLoadBalancerClass(instance.getLoadBalancerClass()); - this.withLoadBalancerIP(instance.getLoadBalancerIP()); - this.withLoadBalancerSourceRanges(instance.getLoadBalancerSourceRanges()); - this.withPorts(instance.getPorts()); - this.withPublishNotReadyAddresses(instance.getPublishNotReadyAddresses()); - this.withSelector(instance.getSelector()); - this.withSessionAffinity(instance.getSessionAffinity()); - this.withSessionAffinityConfig(instance.getSessionAffinityConfig()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServiceSpecFluent fluent; - Boolean validationEnabled; + public V1ServiceSpec build() { V1ServiceSpec buildable = new V1ServiceSpec(); buildable.setAllocateLoadBalancerNodePorts(fluent.getAllocateLoadBalancerNodePorts()); @@ -88,13 +36,14 @@ public V1ServiceSpec build() { buildable.setLoadBalancerClass(fluent.getLoadBalancerClass()); buildable.setLoadBalancerIP(fluent.getLoadBalancerIP()); buildable.setLoadBalancerSourceRanges(fluent.getLoadBalancerSourceRanges()); - buildable.setPorts(fluent.getPorts()); + buildable.setPorts(fluent.buildPorts()); buildable.setPublishNotReadyAddresses(fluent.getPublishNotReadyAddresses()); buildable.setSelector(fluent.getSelector()); buildable.setSessionAffinity(fluent.getSessionAffinity()); - buildable.setSessionAffinityConfig(fluent.getSessionAffinityConfig()); + buildable.setSessionAffinityConfig(fluent.buildSessionAffinityConfig()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecFluent.java index 5412841664..d5804f27a9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecFluent.java @@ -1,184 +1,934 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; import java.lang.Boolean; +import java.lang.Integer; +import java.util.Collection; +import java.lang.Object; import java.util.Map; - /** - * Generated - */ -public interface V1ServiceSpecFluent> extends Fluent{ - public Boolean getAllocateLoadBalancerNodePorts(); - public A withAllocateLoadBalancerNodePorts(Boolean allocateLoadBalancerNodePorts); - public Boolean hasAllocateLoadBalancerNodePorts(); - public String getClusterIP(); - public A withClusterIP(String clusterIP); - public Boolean hasClusterIP(); - public A addToClusterIPs(int index,String item); - public A setToClusterIPs(int index,String item); - public A addToClusterIPs(java.lang.String... items); - public A addAllToClusterIPs(Collection items); - public A removeFromClusterIPs(java.lang.String... items); - public A removeAllFromClusterIPs(Collection items); - public List getClusterIPs(); - public String getClusterIP(int index); - public String getFirstClusterIP(); - public String getLastClusterIP(); - public String getMatchingClusterIP(Predicate predicate); - public Boolean hasMatchingClusterIP(Predicate predicate); - public A withClusterIPs(List clusterIPs); - public A withClusterIPs(java.lang.String... clusterIPs); - public Boolean hasClusterIPs(); - public A addToExternalIPs(int index,String item); - public A setToExternalIPs(int index,String item); - public A addToExternalIPs(java.lang.String... items); - public A addAllToExternalIPs(Collection items); - public A removeFromExternalIPs(java.lang.String... items); - public A removeAllFromExternalIPs(Collection items); - public List getExternalIPs(); - public String getExternalIP(int index); - public String getFirstExternalIP(); - public String getLastExternalIP(); - public String getMatchingExternalIP(Predicate predicate); - public Boolean hasMatchingExternalIP(Predicate predicate); - public A withExternalIPs(List externalIPs); - public A withExternalIPs(java.lang.String... externalIPs); - public Boolean hasExternalIPs(); - public String getExternalName(); - public A withExternalName(String externalName); - public Boolean hasExternalName(); - public String getExternalTrafficPolicy(); - public A withExternalTrafficPolicy(String externalTrafficPolicy); - public Boolean hasExternalTrafficPolicy(); - public Integer getHealthCheckNodePort(); - public A withHealthCheckNodePort(Integer healthCheckNodePort); - public Boolean hasHealthCheckNodePort(); - public String getInternalTrafficPolicy(); - public A withInternalTrafficPolicy(String internalTrafficPolicy); - public Boolean hasInternalTrafficPolicy(); - public A addToIpFamilies(int index,String item); - public A setToIpFamilies(int index,String item); - public A addToIpFamilies(java.lang.String... items); - public A addAllToIpFamilies(Collection items); - public A removeFromIpFamilies(java.lang.String... items); - public A removeAllFromIpFamilies(Collection items); - public List getIpFamilies(); - public String getIpFamily(int index); - public String getFirstIpFamily(); - public String getLastIpFamily(); - public String getMatchingIpFamily(Predicate predicate); - public Boolean hasMatchingIpFamily(Predicate predicate); - public A withIpFamilies(List ipFamilies); - public A withIpFamilies(java.lang.String... ipFamilies); - public Boolean hasIpFamilies(); - public String getIpFamilyPolicy(); - public A withIpFamilyPolicy(String ipFamilyPolicy); - public Boolean hasIpFamilyPolicy(); - public String getLoadBalancerClass(); - public A withLoadBalancerClass(String loadBalancerClass); - public Boolean hasLoadBalancerClass(); - public String getLoadBalancerIP(); - public A withLoadBalancerIP(String loadBalancerIP); - public Boolean hasLoadBalancerIP(); - public A addToLoadBalancerSourceRanges(int index,String item); - public A setToLoadBalancerSourceRanges(int index,String item); - public A addToLoadBalancerSourceRanges(java.lang.String... items); - public A addAllToLoadBalancerSourceRanges(Collection items); - public A removeFromLoadBalancerSourceRanges(java.lang.String... items); - public A removeAllFromLoadBalancerSourceRanges(Collection items); - public List getLoadBalancerSourceRanges(); - public String getLoadBalancerSourceRange(int index); - public String getFirstLoadBalancerSourceRange(); - public String getLastLoadBalancerSourceRange(); - public String getMatchingLoadBalancerSourceRange(Predicate predicate); - public Boolean hasMatchingLoadBalancerSourceRange(Predicate predicate); - public A withLoadBalancerSourceRanges(List loadBalancerSourceRanges); - public A withLoadBalancerSourceRanges(java.lang.String... loadBalancerSourceRanges); - public Boolean hasLoadBalancerSourceRanges(); - public A addToPorts(int index,V1ServicePort item); - public A setToPorts(int index,V1ServicePort item); - public A addToPorts(io.kubernetes.client.openapi.models.V1ServicePort... items); - public A addAllToPorts(Collection items); - public A removeFromPorts(io.kubernetes.client.openapi.models.V1ServicePort... items); - public A removeAllFromPorts(Collection items); - public A removeMatchingFromPorts(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts(); - public List buildPorts(); - public V1ServicePort buildPort(int index); - public V1ServicePort buildFirstPort(); - public V1ServicePort buildLastPort(); - public V1ServicePort buildMatchingPort(Predicate predicate); - public Boolean hasMatchingPort(Predicate predicate); - public A withPorts(List ports); - public A withPorts(io.kubernetes.client.openapi.models.V1ServicePort... ports); - public Boolean hasPorts(); - public V1ServiceSpecFluent.PortsNested addNewPort(); - public V1ServiceSpecFluent.PortsNested addNewPortLike(V1ServicePort item); - public V1ServiceSpecFluent.PortsNested setNewPortLike(int index,V1ServicePort item); - public V1ServiceSpecFluent.PortsNested editPort(int index); - public V1ServiceSpecFluent.PortsNested editFirstPort(); - public V1ServiceSpecFluent.PortsNested editLastPort(); - public V1ServiceSpecFluent.PortsNested editMatchingPort(Predicate predicate); - public Boolean getPublishNotReadyAddresses(); - public A withPublishNotReadyAddresses(Boolean publishNotReadyAddresses); - public Boolean hasPublishNotReadyAddresses(); - public A addToSelector(String key,String value); - public A addToSelector(Map map); - public A removeFromSelector(String key); - public A removeFromSelector(Map map); - public Map getSelector(); - public A withSelector(Map selector); - public Boolean hasSelector(); - public String getSessionAffinity(); - public A withSessionAffinity(String sessionAffinity); - public Boolean hasSessionAffinity(); - - /** - * This method has been deprecated, please use method buildSessionAffinityConfig instead. - * @return The buildable object. - */ - @Deprecated - public V1SessionAffinityConfig getSessionAffinityConfig(); - public V1SessionAffinityConfig buildSessionAffinityConfig(); - public A withSessionAffinityConfig(V1SessionAffinityConfig sessionAffinityConfig); - public Boolean hasSessionAffinityConfig(); - public V1ServiceSpecFluent.SessionAffinityConfigNested withNewSessionAffinityConfig(); - public V1ServiceSpecFluent.SessionAffinityConfigNested withNewSessionAffinityConfigLike(V1SessionAffinityConfig item); - public V1ServiceSpecFluent.SessionAffinityConfigNested editSessionAffinityConfig(); - public V1ServiceSpecFluent.SessionAffinityConfigNested editOrNewSessionAffinityConfig(); - public V1ServiceSpecFluent.SessionAffinityConfigNested editOrNewSessionAffinityConfigLike(V1SessionAffinityConfig item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public A withAllocateLoadBalancerNodePorts(); - public A withPublishNotReadyAddresses(); - public interface PortsNested extends Nested,V1ServicePortFluent>{ - public N and(); - public N endPort(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServiceSpecFluent> extends BaseFluent{ + public V1ServiceSpecFluent() { + } + + public V1ServiceSpecFluent(V1ServiceSpec instance) { + this.copyInstance(instance); + } + private Boolean allocateLoadBalancerNodePorts; + private String clusterIP; + private List clusterIPs; + private List externalIPs; + private String externalName; + private String externalTrafficPolicy; + private Integer healthCheckNodePort; + private String internalTrafficPolicy; + private List ipFamilies; + private String ipFamilyPolicy; + private String loadBalancerClass; + private String loadBalancerIP; + private List loadBalancerSourceRanges; + private ArrayList ports; + private Boolean publishNotReadyAddresses; + private Map selector; + private String sessionAffinity; + private V1SessionAffinityConfigBuilder sessionAffinityConfig; + private String type; + + protected void copyInstance(V1ServiceSpec instance) { + instance = (instance != null ? instance : new V1ServiceSpec()); + if (instance != null) { + this.withAllocateLoadBalancerNodePorts(instance.getAllocateLoadBalancerNodePorts()); + this.withClusterIP(instance.getClusterIP()); + this.withClusterIPs(instance.getClusterIPs()); + this.withExternalIPs(instance.getExternalIPs()); + this.withExternalName(instance.getExternalName()); + this.withExternalTrafficPolicy(instance.getExternalTrafficPolicy()); + this.withHealthCheckNodePort(instance.getHealthCheckNodePort()); + this.withInternalTrafficPolicy(instance.getInternalTrafficPolicy()); + this.withIpFamilies(instance.getIpFamilies()); + this.withIpFamilyPolicy(instance.getIpFamilyPolicy()); + this.withLoadBalancerClass(instance.getLoadBalancerClass()); + this.withLoadBalancerIP(instance.getLoadBalancerIP()); + this.withLoadBalancerSourceRanges(instance.getLoadBalancerSourceRanges()); + this.withPorts(instance.getPorts()); + this.withPublishNotReadyAddresses(instance.getPublishNotReadyAddresses()); + this.withSelector(instance.getSelector()); + this.withSessionAffinity(instance.getSessionAffinity()); + this.withSessionAffinityConfig(instance.getSessionAffinityConfig()); + this.withType(instance.getType()); + } + } + + public Boolean getAllocateLoadBalancerNodePorts() { + return this.allocateLoadBalancerNodePorts; + } + + public A withAllocateLoadBalancerNodePorts(Boolean allocateLoadBalancerNodePorts) { + this.allocateLoadBalancerNodePorts = allocateLoadBalancerNodePorts; + return (A) this; + } + + public boolean hasAllocateLoadBalancerNodePorts() { + return this.allocateLoadBalancerNodePorts != null; + } + + public String getClusterIP() { + return this.clusterIP; + } + + public A withClusterIP(String clusterIP) { + this.clusterIP = clusterIP; + return (A) this; + } + + public boolean hasClusterIP() { + return this.clusterIP != null; + } + + public A addToClusterIPs(int index,String item) { + if (this.clusterIPs == null) {this.clusterIPs = new ArrayList();} + this.clusterIPs.add(index, item); + return (A)this; + } + + public A setToClusterIPs(int index,String item) { + if (this.clusterIPs == null) {this.clusterIPs = new ArrayList();} + this.clusterIPs.set(index, item); return (A)this; + } + + public A addToClusterIPs(java.lang.String... items) { + if (this.clusterIPs == null) {this.clusterIPs = new ArrayList();} + for (String item : items) {this.clusterIPs.add(item);} return (A)this; + } + + public A addAllToClusterIPs(Collection items) { + if (this.clusterIPs == null) {this.clusterIPs = new ArrayList();} + for (String item : items) {this.clusterIPs.add(item);} return (A)this; + } + + public A removeFromClusterIPs(java.lang.String... items) { + if (this.clusterIPs == null) return (A)this; + for (String item : items) { this.clusterIPs.remove(item);} return (A)this; + } + + public A removeAllFromClusterIPs(Collection items) { + if (this.clusterIPs == null) return (A)this; + for (String item : items) { this.clusterIPs.remove(item);} return (A)this; + } + + public List getClusterIPs() { + return this.clusterIPs; + } + + public String getClusterIP(int index) { + return this.clusterIPs.get(index); + } + + public String getFirstClusterIP() { + return this.clusterIPs.get(0); + } + + public String getLastClusterIP() { + return this.clusterIPs.get(clusterIPs.size() - 1); + } + + public String getMatchingClusterIP(Predicate predicate) { + for (String item : clusterIPs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingClusterIP(Predicate predicate) { + for (String item : clusterIPs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withClusterIPs(List clusterIPs) { + if (clusterIPs != null) { + this.clusterIPs = new ArrayList(); + for (String item : clusterIPs) { + this.addToClusterIPs(item); + } + } else { + this.clusterIPs = null; + } + return (A) this; + } + + public A withClusterIPs(java.lang.String... clusterIPs) { + if (this.clusterIPs != null) { + this.clusterIPs.clear(); + _visitables.remove("clusterIPs"); + } + if (clusterIPs != null) { + for (String item : clusterIPs) { + this.addToClusterIPs(item); + } + } + return (A) this; + } + + public boolean hasClusterIPs() { + return this.clusterIPs != null && !this.clusterIPs.isEmpty(); + } + + public A addToExternalIPs(int index,String item) { + if (this.externalIPs == null) {this.externalIPs = new ArrayList();} + this.externalIPs.add(index, item); + return (A)this; + } + + public A setToExternalIPs(int index,String item) { + if (this.externalIPs == null) {this.externalIPs = new ArrayList();} + this.externalIPs.set(index, item); return (A)this; + } + + public A addToExternalIPs(java.lang.String... items) { + if (this.externalIPs == null) {this.externalIPs = new ArrayList();} + for (String item : items) {this.externalIPs.add(item);} return (A)this; + } + + public A addAllToExternalIPs(Collection items) { + if (this.externalIPs == null) {this.externalIPs = new ArrayList();} + for (String item : items) {this.externalIPs.add(item);} return (A)this; + } + + public A removeFromExternalIPs(java.lang.String... items) { + if (this.externalIPs == null) return (A)this; + for (String item : items) { this.externalIPs.remove(item);} return (A)this; + } + + public A removeAllFromExternalIPs(Collection items) { + if (this.externalIPs == null) return (A)this; + for (String item : items) { this.externalIPs.remove(item);} return (A)this; + } + + public List getExternalIPs() { + return this.externalIPs; + } + + public String getExternalIP(int index) { + return this.externalIPs.get(index); + } + + public String getFirstExternalIP() { + return this.externalIPs.get(0); + } + + public String getLastExternalIP() { + return this.externalIPs.get(externalIPs.size() - 1); + } + + public String getMatchingExternalIP(Predicate predicate) { + for (String item : externalIPs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingExternalIP(Predicate predicate) { + for (String item : externalIPs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withExternalIPs(List externalIPs) { + if (externalIPs != null) { + this.externalIPs = new ArrayList(); + for (String item : externalIPs) { + this.addToExternalIPs(item); + } + } else { + this.externalIPs = null; + } + return (A) this; + } + + public A withExternalIPs(java.lang.String... externalIPs) { + if (this.externalIPs != null) { + this.externalIPs.clear(); + _visitables.remove("externalIPs"); + } + if (externalIPs != null) { + for (String item : externalIPs) { + this.addToExternalIPs(item); + } + } + return (A) this; + } + + public boolean hasExternalIPs() { + return this.externalIPs != null && !this.externalIPs.isEmpty(); + } + + public String getExternalName() { + return this.externalName; + } + + public A withExternalName(String externalName) { + this.externalName = externalName; + return (A) this; + } + + public boolean hasExternalName() { + return this.externalName != null; + } + + public String getExternalTrafficPolicy() { + return this.externalTrafficPolicy; + } + + public A withExternalTrafficPolicy(String externalTrafficPolicy) { + this.externalTrafficPolicy = externalTrafficPolicy; + return (A) this; + } + + public boolean hasExternalTrafficPolicy() { + return this.externalTrafficPolicy != null; + } + + public Integer getHealthCheckNodePort() { + return this.healthCheckNodePort; + } + + public A withHealthCheckNodePort(Integer healthCheckNodePort) { + this.healthCheckNodePort = healthCheckNodePort; + return (A) this; + } + + public boolean hasHealthCheckNodePort() { + return this.healthCheckNodePort != null; + } + + public String getInternalTrafficPolicy() { + return this.internalTrafficPolicy; + } + + public A withInternalTrafficPolicy(String internalTrafficPolicy) { + this.internalTrafficPolicy = internalTrafficPolicy; + return (A) this; + } + + public boolean hasInternalTrafficPolicy() { + return this.internalTrafficPolicy != null; + } + + public A addToIpFamilies(int index,String item) { + if (this.ipFamilies == null) {this.ipFamilies = new ArrayList();} + this.ipFamilies.add(index, item); + return (A)this; + } + + public A setToIpFamilies(int index,String item) { + if (this.ipFamilies == null) {this.ipFamilies = new ArrayList();} + this.ipFamilies.set(index, item); return (A)this; + } + + public A addToIpFamilies(java.lang.String... items) { + if (this.ipFamilies == null) {this.ipFamilies = new ArrayList();} + for (String item : items) {this.ipFamilies.add(item);} return (A)this; } - public interface SessionAffinityConfigNested extends Nested,V1SessionAffinityConfigFluent>{ - public N and(); - public N endSessionAffinityConfig(); + + public A addAllToIpFamilies(Collection items) { + if (this.ipFamilies == null) {this.ipFamilies = new ArrayList();} + for (String item : items) {this.ipFamilies.add(item);} return (A)this; + } + + public A removeFromIpFamilies(java.lang.String... items) { + if (this.ipFamilies == null) return (A)this; + for (String item : items) { this.ipFamilies.remove(item);} return (A)this; + } + + public A removeAllFromIpFamilies(Collection items) { + if (this.ipFamilies == null) return (A)this; + for (String item : items) { this.ipFamilies.remove(item);} return (A)this; + } + + public List getIpFamilies() { + return this.ipFamilies; + } + + public String getIpFamily(int index) { + return this.ipFamilies.get(index); + } + + public String getFirstIpFamily() { + return this.ipFamilies.get(0); + } + + public String getLastIpFamily() { + return this.ipFamilies.get(ipFamilies.size() - 1); + } + + public String getMatchingIpFamily(Predicate predicate) { + for (String item : ipFamilies) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingIpFamily(Predicate predicate) { + for (String item : ipFamilies) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withIpFamilies(List ipFamilies) { + if (ipFamilies != null) { + this.ipFamilies = new ArrayList(); + for (String item : ipFamilies) { + this.addToIpFamilies(item); + } + } else { + this.ipFamilies = null; + } + return (A) this; + } + + public A withIpFamilies(java.lang.String... ipFamilies) { + if (this.ipFamilies != null) { + this.ipFamilies.clear(); + _visitables.remove("ipFamilies"); + } + if (ipFamilies != null) { + for (String item : ipFamilies) { + this.addToIpFamilies(item); + } + } + return (A) this; + } + + public boolean hasIpFamilies() { + return this.ipFamilies != null && !this.ipFamilies.isEmpty(); + } + + public String getIpFamilyPolicy() { + return this.ipFamilyPolicy; + } + + public A withIpFamilyPolicy(String ipFamilyPolicy) { + this.ipFamilyPolicy = ipFamilyPolicy; + return (A) this; + } + + public boolean hasIpFamilyPolicy() { + return this.ipFamilyPolicy != null; + } + + public String getLoadBalancerClass() { + return this.loadBalancerClass; + } + + public A withLoadBalancerClass(String loadBalancerClass) { + this.loadBalancerClass = loadBalancerClass; + return (A) this; + } + + public boolean hasLoadBalancerClass() { + return this.loadBalancerClass != null; + } + + public String getLoadBalancerIP() { + return this.loadBalancerIP; + } + + public A withLoadBalancerIP(String loadBalancerIP) { + this.loadBalancerIP = loadBalancerIP; + return (A) this; + } + + public boolean hasLoadBalancerIP() { + return this.loadBalancerIP != null; + } + + public A addToLoadBalancerSourceRanges(int index,String item) { + if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();} + this.loadBalancerSourceRanges.add(index, item); + return (A)this; + } + + public A setToLoadBalancerSourceRanges(int index,String item) { + if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();} + this.loadBalancerSourceRanges.set(index, item); return (A)this; + } + + public A addToLoadBalancerSourceRanges(java.lang.String... items) { + if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();} + for (String item : items) {this.loadBalancerSourceRanges.add(item);} return (A)this; + } + + public A addAllToLoadBalancerSourceRanges(Collection items) { + if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();} + for (String item : items) {this.loadBalancerSourceRanges.add(item);} return (A)this; + } + + public A removeFromLoadBalancerSourceRanges(java.lang.String... items) { + if (this.loadBalancerSourceRanges == null) return (A)this; + for (String item : items) { this.loadBalancerSourceRanges.remove(item);} return (A)this; + } + + public A removeAllFromLoadBalancerSourceRanges(Collection items) { + if (this.loadBalancerSourceRanges == null) return (A)this; + for (String item : items) { this.loadBalancerSourceRanges.remove(item);} return (A)this; + } + + public List getLoadBalancerSourceRanges() { + return this.loadBalancerSourceRanges; + } + + public String getLoadBalancerSourceRange(int index) { + return this.loadBalancerSourceRanges.get(index); + } + + public String getFirstLoadBalancerSourceRange() { + return this.loadBalancerSourceRanges.get(0); + } + + public String getLastLoadBalancerSourceRange() { + return this.loadBalancerSourceRanges.get(loadBalancerSourceRanges.size() - 1); + } + + public String getMatchingLoadBalancerSourceRange(Predicate predicate) { + for (String item : loadBalancerSourceRanges) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingLoadBalancerSourceRange(Predicate predicate) { + for (String item : loadBalancerSourceRanges) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withLoadBalancerSourceRanges(List loadBalancerSourceRanges) { + if (loadBalancerSourceRanges != null) { + this.loadBalancerSourceRanges = new ArrayList(); + for (String item : loadBalancerSourceRanges) { + this.addToLoadBalancerSourceRanges(item); + } + } else { + this.loadBalancerSourceRanges = null; + } + return (A) this; + } + + public A withLoadBalancerSourceRanges(java.lang.String... loadBalancerSourceRanges) { + if (this.loadBalancerSourceRanges != null) { + this.loadBalancerSourceRanges.clear(); + _visitables.remove("loadBalancerSourceRanges"); + } + if (loadBalancerSourceRanges != null) { + for (String item : loadBalancerSourceRanges) { + this.addToLoadBalancerSourceRanges(item); + } + } + return (A) this; + } + + public boolean hasLoadBalancerSourceRanges() { + return this.loadBalancerSourceRanges != null && !this.loadBalancerSourceRanges.isEmpty(); + } + + public A addToPorts(int index,V1ServicePort item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1ServicePortBuilder builder = new V1ServicePortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} + return (A)this; + } + + public A setToPorts(int index,V1ServicePort item) { + if (this.ports == null) {this.ports = new ArrayList();} + V1ServicePortBuilder builder = new V1ServicePortBuilder(item); + if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} + return (A)this; + } + + public A addToPorts(io.kubernetes.client.openapi.models.V1ServicePort... items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1ServicePort item : items) {V1ServicePortBuilder builder = new V1ServicePortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A addAllToPorts(Collection items) { + if (this.ports == null) {this.ports = new ArrayList();} + for (V1ServicePort item : items) {V1ServicePortBuilder builder = new V1ServicePortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; + } + + public A removeFromPorts(io.kubernetes.client.openapi.models.V1ServicePort... items) { + if (this.ports == null) return (A)this; + for (V1ServicePort item : items) {V1ServicePortBuilder builder = new V1ServicePortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeAllFromPorts(Collection items) { + if (this.ports == null) return (A)this; + for (V1ServicePort item : items) {V1ServicePortBuilder builder = new V1ServicePortBuilder(item);_visitables.get("ports").remove(builder); this.ports.remove(builder);} return (A)this; + } + + public A removeMatchingFromPorts(Predicate predicate) { + if (ports == null) return (A) this; + final Iterator each = ports.iterator(); + final List visitables = _visitables.get("ports"); + while (each.hasNext()) { + V1ServicePortBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPorts() { + return this.ports != null ? build(ports) : null; + } + + public V1ServicePort buildPort(int index) { + return this.ports.get(index).build(); + } + + public V1ServicePort buildFirstPort() { + return this.ports.get(0).build(); + } + + public V1ServicePort buildLastPort() { + return this.ports.get(ports.size() - 1).build(); + } + + public V1ServicePort buildMatchingPort(Predicate predicate) { + for (V1ServicePortBuilder item : ports) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPort(Predicate predicate) { + for (V1ServicePortBuilder item : ports) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPorts(List ports) { + if (this.ports != null) { + this._visitables.get("ports").clear(); + } + if (ports != null) { + this.ports = new ArrayList(); + for (V1ServicePort item : ports) { + this.addToPorts(item); + } + } else { + this.ports = null; + } + return (A) this; + } + + public A withPorts(io.kubernetes.client.openapi.models.V1ServicePort... ports) { + if (this.ports != null) { + this.ports.clear(); + _visitables.remove("ports"); + } + if (ports != null) { + for (V1ServicePort item : ports) { + this.addToPorts(item); + } + } + return (A) this; + } + + public boolean hasPorts() { + return this.ports != null && !this.ports.isEmpty(); + } + + public PortsNested addNewPort() { + return new PortsNested(-1, null); + } + + public PortsNested addNewPortLike(V1ServicePort item) { + return new PortsNested(-1, item); + } + + public PortsNested setNewPortLike(int index,V1ServicePort item) { + return new PortsNested(index, item); + } + + public PortsNested editPort(int index) { + if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editFirstPort() { + if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); + return setNewPortLike(0, buildPort(0)); + } + + public PortsNested editLastPort() { + int index = ports.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); + return setNewPortLike(index, buildPort(index)); + } + + public PortsNested editMatchingPort(Predicate predicate) { + int index = -1; + for (int i=0;i map) { + if(this.selector == null && map != null) { this.selector = new LinkedHashMap(); } + if(map != null) { this.selector.putAll(map);} return (A)this; + } + + public A removeFromSelector(String key) { + if(this.selector == null) { return (A) this; } + if(key != null && this.selector != null) {this.selector.remove(key);} return (A)this; + } + + public A removeFromSelector(Map map) { + if(this.selector == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.selector != null){this.selector.remove(key);}}} return (A)this; + } + + public Map getSelector() { + return this.selector; + } + + public A withSelector(Map selector) { + if (selector == null) { + this.selector = null; + } else { + this.selector = new LinkedHashMap(selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public String getSessionAffinity() { + return this.sessionAffinity; + } + + public A withSessionAffinity(String sessionAffinity) { + this.sessionAffinity = sessionAffinity; + return (A) this; + } + + public boolean hasSessionAffinity() { + return this.sessionAffinity != null; + } + + public V1SessionAffinityConfig buildSessionAffinityConfig() { + return this.sessionAffinityConfig != null ? this.sessionAffinityConfig.build() : null; + } + + public A withSessionAffinityConfig(V1SessionAffinityConfig sessionAffinityConfig) { + this._visitables.remove("sessionAffinityConfig"); + if (sessionAffinityConfig != null) { + this.sessionAffinityConfig = new V1SessionAffinityConfigBuilder(sessionAffinityConfig); + this._visitables.get("sessionAffinityConfig").add(this.sessionAffinityConfig); + } else { + this.sessionAffinityConfig = null; + this._visitables.get("sessionAffinityConfig").remove(this.sessionAffinityConfig); + } + return (A) this; + } + + public boolean hasSessionAffinityConfig() { + return this.sessionAffinityConfig != null; + } + + public SessionAffinityConfigNested withNewSessionAffinityConfig() { + return new SessionAffinityConfigNested(null); + } + + public SessionAffinityConfigNested withNewSessionAffinityConfigLike(V1SessionAffinityConfig item) { + return new SessionAffinityConfigNested(item); + } + + public SessionAffinityConfigNested editSessionAffinityConfig() { + return withNewSessionAffinityConfigLike(java.util.Optional.ofNullable(buildSessionAffinityConfig()).orElse(null)); + } + + public SessionAffinityConfigNested editOrNewSessionAffinityConfig() { + return withNewSessionAffinityConfigLike(java.util.Optional.ofNullable(buildSessionAffinityConfig()).orElse(new V1SessionAffinityConfigBuilder().build())); + } + + public SessionAffinityConfigNested editOrNewSessionAffinityConfigLike(V1SessionAffinityConfig item) { + return withNewSessionAffinityConfigLike(java.util.Optional.ofNullable(buildSessionAffinityConfig()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServiceSpecFluent that = (V1ServiceSpecFluent) o; + if (!java.util.Objects.equals(allocateLoadBalancerNodePorts, that.allocateLoadBalancerNodePorts)) return false; + if (!java.util.Objects.equals(clusterIP, that.clusterIP)) return false; + if (!java.util.Objects.equals(clusterIPs, that.clusterIPs)) return false; + if (!java.util.Objects.equals(externalIPs, that.externalIPs)) return false; + if (!java.util.Objects.equals(externalName, that.externalName)) return false; + if (!java.util.Objects.equals(externalTrafficPolicy, that.externalTrafficPolicy)) return false; + if (!java.util.Objects.equals(healthCheckNodePort, that.healthCheckNodePort)) return false; + if (!java.util.Objects.equals(internalTrafficPolicy, that.internalTrafficPolicy)) return false; + if (!java.util.Objects.equals(ipFamilies, that.ipFamilies)) return false; + if (!java.util.Objects.equals(ipFamilyPolicy, that.ipFamilyPolicy)) return false; + if (!java.util.Objects.equals(loadBalancerClass, that.loadBalancerClass)) return false; + if (!java.util.Objects.equals(loadBalancerIP, that.loadBalancerIP)) return false; + if (!java.util.Objects.equals(loadBalancerSourceRanges, that.loadBalancerSourceRanges)) return false; + if (!java.util.Objects.equals(ports, that.ports)) return false; + if (!java.util.Objects.equals(publishNotReadyAddresses, that.publishNotReadyAddresses)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + if (!java.util.Objects.equals(sessionAffinity, that.sessionAffinity)) return false; + if (!java.util.Objects.equals(sessionAffinityConfig, that.sessionAffinityConfig)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(allocateLoadBalancerNodePorts, clusterIP, clusterIPs, externalIPs, externalName, externalTrafficPolicy, healthCheckNodePort, internalTrafficPolicy, ipFamilies, ipFamilyPolicy, loadBalancerClass, loadBalancerIP, loadBalancerSourceRanges, ports, publishNotReadyAddresses, selector, sessionAffinity, sessionAffinityConfig, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (allocateLoadBalancerNodePorts != null) { sb.append("allocateLoadBalancerNodePorts:"); sb.append(allocateLoadBalancerNodePorts + ","); } + if (clusterIP != null) { sb.append("clusterIP:"); sb.append(clusterIP + ","); } + if (clusterIPs != null && !clusterIPs.isEmpty()) { sb.append("clusterIPs:"); sb.append(clusterIPs + ","); } + if (externalIPs != null && !externalIPs.isEmpty()) { sb.append("externalIPs:"); sb.append(externalIPs + ","); } + if (externalName != null) { sb.append("externalName:"); sb.append(externalName + ","); } + if (externalTrafficPolicy != null) { sb.append("externalTrafficPolicy:"); sb.append(externalTrafficPolicy + ","); } + if (healthCheckNodePort != null) { sb.append("healthCheckNodePort:"); sb.append(healthCheckNodePort + ","); } + if (internalTrafficPolicy != null) { sb.append("internalTrafficPolicy:"); sb.append(internalTrafficPolicy + ","); } + if (ipFamilies != null && !ipFamilies.isEmpty()) { sb.append("ipFamilies:"); sb.append(ipFamilies + ","); } + if (ipFamilyPolicy != null) { sb.append("ipFamilyPolicy:"); sb.append(ipFamilyPolicy + ","); } + if (loadBalancerClass != null) { sb.append("loadBalancerClass:"); sb.append(loadBalancerClass + ","); } + if (loadBalancerIP != null) { sb.append("loadBalancerIP:"); sb.append(loadBalancerIP + ","); } + if (loadBalancerSourceRanges != null && !loadBalancerSourceRanges.isEmpty()) { sb.append("loadBalancerSourceRanges:"); sb.append(loadBalancerSourceRanges + ","); } + if (ports != null && !ports.isEmpty()) { sb.append("ports:"); sb.append(ports + ","); } + if (publishNotReadyAddresses != null) { sb.append("publishNotReadyAddresses:"); sb.append(publishNotReadyAddresses + ","); } + if (selector != null && !selector.isEmpty()) { sb.append("selector:"); sb.append(selector + ","); } + if (sessionAffinity != null) { sb.append("sessionAffinity:"); sb.append(sessionAffinity + ","); } + if (sessionAffinityConfig != null) { sb.append("sessionAffinityConfig:"); sb.append(sessionAffinityConfig + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + public A withAllocateLoadBalancerNodePorts() { + return withAllocateLoadBalancerNodePorts(true); + } + + public A withPublishNotReadyAddresses() { + return withPublishNotReadyAddresses(true); + } + public class PortsNested extends V1ServicePortFluent> implements Nested{ + PortsNested(int index,V1ServicePort item) { + this.index = index; + this.builder = new V1ServicePortBuilder(this, item); + } + V1ServicePortBuilder builder; + int index; + + public N and() { + return (N) V1ServiceSpecFluent.this.setToPorts(index,builder.build()); + } + + public N endPort() { + return and(); + } + } + public class SessionAffinityConfigNested extends V1SessionAffinityConfigFluent> implements Nested{ + SessionAffinityConfigNested(V1SessionAffinityConfig item) { + this.builder = new V1SessionAffinityConfigBuilder(this, item); + } + V1SessionAffinityConfigBuilder builder; + + public N and() { + return (N) V1ServiceSpecFluent.this.withSessionAffinityConfig(builder.build()); + } + + public N endSessionAffinityConfig() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecFluentImpl.java deleted file mode 100644 index e9291177fa..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceSpecFluentImpl.java +++ /dev/null @@ -1,662 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.util.Collection; -import java.lang.Object; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServiceSpecFluentImpl> extends BaseFluent implements V1ServiceSpecFluent{ - public V1ServiceSpecFluentImpl() { - } - public V1ServiceSpecFluentImpl(V1ServiceSpec instance) { - if (instance != null) { - this.withAllocateLoadBalancerNodePorts(instance.getAllocateLoadBalancerNodePorts()); - this.withClusterIP(instance.getClusterIP()); - this.withClusterIPs(instance.getClusterIPs()); - this.withExternalIPs(instance.getExternalIPs()); - this.withExternalName(instance.getExternalName()); - this.withExternalTrafficPolicy(instance.getExternalTrafficPolicy()); - this.withHealthCheckNodePort(instance.getHealthCheckNodePort()); - this.withInternalTrafficPolicy(instance.getInternalTrafficPolicy()); - this.withIpFamilies(instance.getIpFamilies()); - this.withIpFamilyPolicy(instance.getIpFamilyPolicy()); - this.withLoadBalancerClass(instance.getLoadBalancerClass()); - this.withLoadBalancerIP(instance.getLoadBalancerIP()); - this.withLoadBalancerSourceRanges(instance.getLoadBalancerSourceRanges()); - this.withPorts(instance.getPorts()); - this.withPublishNotReadyAddresses(instance.getPublishNotReadyAddresses()); - this.withSelector(instance.getSelector()); - this.withSessionAffinity(instance.getSessionAffinity()); - this.withSessionAffinityConfig(instance.getSessionAffinityConfig()); - this.withType(instance.getType()); - } - } - private Boolean allocateLoadBalancerNodePorts; - private String clusterIP; - private List clusterIPs; - private List externalIPs; - private String externalName; - private String externalTrafficPolicy; - private Integer healthCheckNodePort; - private String internalTrafficPolicy; - private List ipFamilies; - private String ipFamilyPolicy; - private String loadBalancerClass; - private String loadBalancerIP; - private List loadBalancerSourceRanges; - private ArrayList ports; - private Boolean publishNotReadyAddresses; - private Map selector; - private String sessionAffinity; - private V1SessionAffinityConfigBuilder sessionAffinityConfig; - private String type; - public Boolean getAllocateLoadBalancerNodePorts() { - return this.allocateLoadBalancerNodePorts; - } - public A withAllocateLoadBalancerNodePorts(Boolean allocateLoadBalancerNodePorts) { - this.allocateLoadBalancerNodePorts=allocateLoadBalancerNodePorts; return (A) this; - } - public Boolean hasAllocateLoadBalancerNodePorts() { - return this.allocateLoadBalancerNodePorts != null; - } - public String getClusterIP() { - return this.clusterIP; - } - public A withClusterIP(String clusterIP) { - this.clusterIP=clusterIP; return (A) this; - } - public Boolean hasClusterIP() { - return this.clusterIP != null; - } - public A addToClusterIPs(int index,String item) { - if (this.clusterIPs == null) {this.clusterIPs = new ArrayList();} - this.clusterIPs.add(index, item); - return (A)this; - } - public A setToClusterIPs(int index,String item) { - if (this.clusterIPs == null) {this.clusterIPs = new ArrayList();} - this.clusterIPs.set(index, item); return (A)this; - } - public A addToClusterIPs(java.lang.String... items) { - if (this.clusterIPs == null) {this.clusterIPs = new ArrayList();} - for (String item : items) {this.clusterIPs.add(item);} return (A)this; - } - public A addAllToClusterIPs(Collection items) { - if (this.clusterIPs == null) {this.clusterIPs = new ArrayList();} - for (String item : items) {this.clusterIPs.add(item);} return (A)this; - } - public A removeFromClusterIPs(java.lang.String... items) { - for (String item : items) {if (this.clusterIPs!= null){ this.clusterIPs.remove(item);}} return (A)this; - } - public A removeAllFromClusterIPs(Collection items) { - for (String item : items) {if (this.clusterIPs!= null){ this.clusterIPs.remove(item);}} return (A)this; - } - public List getClusterIPs() { - return this.clusterIPs; - } - public String getClusterIP(int index) { - return this.clusterIPs.get(index); - } - public String getFirstClusterIP() { - return this.clusterIPs.get(0); - } - public String getLastClusterIP() { - return this.clusterIPs.get(clusterIPs.size() - 1); - } - public String getMatchingClusterIP(Predicate predicate) { - for (String item: clusterIPs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingClusterIP(Predicate predicate) { - for (String item: clusterIPs) { if(predicate.test(item)){ return true;} } return false; - } - public A withClusterIPs(List clusterIPs) { - if (clusterIPs != null) {this.clusterIPs = new ArrayList(); for (String item : clusterIPs){this.addToClusterIPs(item);}} else { this.clusterIPs = null;} return (A) this; - } - public A withClusterIPs(java.lang.String... clusterIPs) { - if (this.clusterIPs != null) {this.clusterIPs.clear(); _visitables.remove("clusterIPs"); } - if (clusterIPs != null) {for (String item :clusterIPs){ this.addToClusterIPs(item);}} return (A) this; - } - public Boolean hasClusterIPs() { - return clusterIPs != null && !clusterIPs.isEmpty(); - } - public A addToExternalIPs(int index,String item) { - if (this.externalIPs == null) {this.externalIPs = new ArrayList();} - this.externalIPs.add(index, item); - return (A)this; - } - public A setToExternalIPs(int index,String item) { - if (this.externalIPs == null) {this.externalIPs = new ArrayList();} - this.externalIPs.set(index, item); return (A)this; - } - public A addToExternalIPs(java.lang.String... items) { - if (this.externalIPs == null) {this.externalIPs = new ArrayList();} - for (String item : items) {this.externalIPs.add(item);} return (A)this; - } - public A addAllToExternalIPs(Collection items) { - if (this.externalIPs == null) {this.externalIPs = new ArrayList();} - for (String item : items) {this.externalIPs.add(item);} return (A)this; - } - public A removeFromExternalIPs(java.lang.String... items) { - for (String item : items) {if (this.externalIPs!= null){ this.externalIPs.remove(item);}} return (A)this; - } - public A removeAllFromExternalIPs(Collection items) { - for (String item : items) {if (this.externalIPs!= null){ this.externalIPs.remove(item);}} return (A)this; - } - public List getExternalIPs() { - return this.externalIPs; - } - public String getExternalIP(int index) { - return this.externalIPs.get(index); - } - public String getFirstExternalIP() { - return this.externalIPs.get(0); - } - public String getLastExternalIP() { - return this.externalIPs.get(externalIPs.size() - 1); - } - public String getMatchingExternalIP(Predicate predicate) { - for (String item: externalIPs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingExternalIP(Predicate predicate) { - for (String item: externalIPs) { if(predicate.test(item)){ return true;} } return false; - } - public A withExternalIPs(List externalIPs) { - if (externalIPs != null) {this.externalIPs = new ArrayList(); for (String item : externalIPs){this.addToExternalIPs(item);}} else { this.externalIPs = null;} return (A) this; - } - public A withExternalIPs(java.lang.String... externalIPs) { - if (this.externalIPs != null) {this.externalIPs.clear(); _visitables.remove("externalIPs"); } - if (externalIPs != null) {for (String item :externalIPs){ this.addToExternalIPs(item);}} return (A) this; - } - public Boolean hasExternalIPs() { - return externalIPs != null && !externalIPs.isEmpty(); - } - public String getExternalName() { - return this.externalName; - } - public A withExternalName(String externalName) { - this.externalName=externalName; return (A) this; - } - public Boolean hasExternalName() { - return this.externalName != null; - } - public String getExternalTrafficPolicy() { - return this.externalTrafficPolicy; - } - public A withExternalTrafficPolicy(String externalTrafficPolicy) { - this.externalTrafficPolicy=externalTrafficPolicy; return (A) this; - } - public Boolean hasExternalTrafficPolicy() { - return this.externalTrafficPolicy != null; - } - public Integer getHealthCheckNodePort() { - return this.healthCheckNodePort; - } - public A withHealthCheckNodePort(Integer healthCheckNodePort) { - this.healthCheckNodePort=healthCheckNodePort; return (A) this; - } - public Boolean hasHealthCheckNodePort() { - return this.healthCheckNodePort != null; - } - public String getInternalTrafficPolicy() { - return this.internalTrafficPolicy; - } - public A withInternalTrafficPolicy(String internalTrafficPolicy) { - this.internalTrafficPolicy=internalTrafficPolicy; return (A) this; - } - public Boolean hasInternalTrafficPolicy() { - return this.internalTrafficPolicy != null; - } - public A addToIpFamilies(int index,String item) { - if (this.ipFamilies == null) {this.ipFamilies = new ArrayList();} - this.ipFamilies.add(index, item); - return (A)this; - } - public A setToIpFamilies(int index,String item) { - if (this.ipFamilies == null) {this.ipFamilies = new ArrayList();} - this.ipFamilies.set(index, item); return (A)this; - } - public A addToIpFamilies(java.lang.String... items) { - if (this.ipFamilies == null) {this.ipFamilies = new ArrayList();} - for (String item : items) {this.ipFamilies.add(item);} return (A)this; - } - public A addAllToIpFamilies(Collection items) { - if (this.ipFamilies == null) {this.ipFamilies = new ArrayList();} - for (String item : items) {this.ipFamilies.add(item);} return (A)this; - } - public A removeFromIpFamilies(java.lang.String... items) { - for (String item : items) {if (this.ipFamilies!= null){ this.ipFamilies.remove(item);}} return (A)this; - } - public A removeAllFromIpFamilies(Collection items) { - for (String item : items) {if (this.ipFamilies!= null){ this.ipFamilies.remove(item);}} return (A)this; - } - public List getIpFamilies() { - return this.ipFamilies; - } - public String getIpFamily(int index) { - return this.ipFamilies.get(index); - } - public String getFirstIpFamily() { - return this.ipFamilies.get(0); - } - public String getLastIpFamily() { - return this.ipFamilies.get(ipFamilies.size() - 1); - } - public String getMatchingIpFamily(Predicate predicate) { - for (String item: ipFamilies) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingIpFamily(Predicate predicate) { - for (String item: ipFamilies) { if(predicate.test(item)){ return true;} } return false; - } - public A withIpFamilies(List ipFamilies) { - if (ipFamilies != null) {this.ipFamilies = new ArrayList(); for (String item : ipFamilies){this.addToIpFamilies(item);}} else { this.ipFamilies = null;} return (A) this; - } - public A withIpFamilies(java.lang.String... ipFamilies) { - if (this.ipFamilies != null) {this.ipFamilies.clear(); _visitables.remove("ipFamilies"); } - if (ipFamilies != null) {for (String item :ipFamilies){ this.addToIpFamilies(item);}} return (A) this; - } - public Boolean hasIpFamilies() { - return ipFamilies != null && !ipFamilies.isEmpty(); - } - public String getIpFamilyPolicy() { - return this.ipFamilyPolicy; - } - public A withIpFamilyPolicy(String ipFamilyPolicy) { - this.ipFamilyPolicy=ipFamilyPolicy; return (A) this; - } - public Boolean hasIpFamilyPolicy() { - return this.ipFamilyPolicy != null; - } - public String getLoadBalancerClass() { - return this.loadBalancerClass; - } - public A withLoadBalancerClass(String loadBalancerClass) { - this.loadBalancerClass=loadBalancerClass; return (A) this; - } - public Boolean hasLoadBalancerClass() { - return this.loadBalancerClass != null; - } - public String getLoadBalancerIP() { - return this.loadBalancerIP; - } - public A withLoadBalancerIP(String loadBalancerIP) { - this.loadBalancerIP=loadBalancerIP; return (A) this; - } - public Boolean hasLoadBalancerIP() { - return this.loadBalancerIP != null; - } - public A addToLoadBalancerSourceRanges(int index,String item) { - if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();} - this.loadBalancerSourceRanges.add(index, item); - return (A)this; - } - public A setToLoadBalancerSourceRanges(int index,String item) { - if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();} - this.loadBalancerSourceRanges.set(index, item); return (A)this; - } - public A addToLoadBalancerSourceRanges(java.lang.String... items) { - if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();} - for (String item : items) {this.loadBalancerSourceRanges.add(item);} return (A)this; - } - public A addAllToLoadBalancerSourceRanges(Collection items) { - if (this.loadBalancerSourceRanges == null) {this.loadBalancerSourceRanges = new ArrayList();} - for (String item : items) {this.loadBalancerSourceRanges.add(item);} return (A)this; - } - public A removeFromLoadBalancerSourceRanges(java.lang.String... items) { - for (String item : items) {if (this.loadBalancerSourceRanges!= null){ this.loadBalancerSourceRanges.remove(item);}} return (A)this; - } - public A removeAllFromLoadBalancerSourceRanges(Collection items) { - for (String item : items) {if (this.loadBalancerSourceRanges!= null){ this.loadBalancerSourceRanges.remove(item);}} return (A)this; - } - public List getLoadBalancerSourceRanges() { - return this.loadBalancerSourceRanges; - } - public String getLoadBalancerSourceRange(int index) { - return this.loadBalancerSourceRanges.get(index); - } - public String getFirstLoadBalancerSourceRange() { - return this.loadBalancerSourceRanges.get(0); - } - public String getLastLoadBalancerSourceRange() { - return this.loadBalancerSourceRanges.get(loadBalancerSourceRanges.size() - 1); - } - public String getMatchingLoadBalancerSourceRange(Predicate predicate) { - for (String item: loadBalancerSourceRanges) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingLoadBalancerSourceRange(Predicate predicate) { - for (String item: loadBalancerSourceRanges) { if(predicate.test(item)){ return true;} } return false; - } - public A withLoadBalancerSourceRanges(List loadBalancerSourceRanges) { - if (loadBalancerSourceRanges != null) {this.loadBalancerSourceRanges = new ArrayList(); for (String item : loadBalancerSourceRanges){this.addToLoadBalancerSourceRanges(item);}} else { this.loadBalancerSourceRanges = null;} return (A) this; - } - public A withLoadBalancerSourceRanges(java.lang.String... loadBalancerSourceRanges) { - if (this.loadBalancerSourceRanges != null) {this.loadBalancerSourceRanges.clear(); _visitables.remove("loadBalancerSourceRanges"); } - if (loadBalancerSourceRanges != null) {for (String item :loadBalancerSourceRanges){ this.addToLoadBalancerSourceRanges(item);}} return (A) this; - } - public Boolean hasLoadBalancerSourceRanges() { - return loadBalancerSourceRanges != null && !loadBalancerSourceRanges.isEmpty(); - } - public A addToPorts(int index,V1ServicePort item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1ServicePortBuilder builder = new V1ServicePortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").add(index, builder); ports.add(index, builder);} - return (A)this; - } - public A setToPorts(int index,V1ServicePort item) { - if (this.ports == null) {this.ports = new ArrayList();} - V1ServicePortBuilder builder = new V1ServicePortBuilder(item); - if (index < 0 || index >= ports.size()) { _visitables.get("ports").add(builder); ports.add(builder); } else { _visitables.get("ports").set(index, builder); ports.set(index, builder);} - return (A)this; - } - public A addToPorts(io.kubernetes.client.openapi.models.V1ServicePort... items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1ServicePort item : items) {V1ServicePortBuilder builder = new V1ServicePortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A addAllToPorts(Collection items) { - if (this.ports == null) {this.ports = new ArrayList();} - for (V1ServicePort item : items) {V1ServicePortBuilder builder = new V1ServicePortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this; - } - public A removeFromPorts(io.kubernetes.client.openapi.models.V1ServicePort... items) { - for (V1ServicePort item : items) {V1ServicePortBuilder builder = new V1ServicePortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeAllFromPorts(Collection items) { - for (V1ServicePort item : items) {V1ServicePortBuilder builder = new V1ServicePortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this; - } - public A removeMatchingFromPorts(Predicate predicate) { - if (ports == null) return (A) this; - final Iterator each = ports.iterator(); - final List visitables = _visitables.get("ports"); - while (each.hasNext()) { - V1ServicePortBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPorts instead. - * @return The buildable object. - */ - @Deprecated - public List getPorts() { - return ports != null ? build(ports) : null; - } - public List buildPorts() { - return ports != null ? build(ports) : null; - } - public V1ServicePort buildPort(int index) { - return this.ports.get(index).build(); - } - public V1ServicePort buildFirstPort() { - return this.ports.get(0).build(); - } - public V1ServicePort buildLastPort() { - return this.ports.get(ports.size() - 1).build(); - } - public V1ServicePort buildMatchingPort(Predicate predicate) { - for (V1ServicePortBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPort(Predicate predicate) { - for (V1ServicePortBuilder item: ports) { if(predicate.test(item)){ return true;} } return false; - } - public A withPorts(List ports) { - if (this.ports != null) { _visitables.get("ports").clear();} - if (ports != null) {this.ports = new ArrayList(); for (V1ServicePort item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this; - } - public A withPorts(io.kubernetes.client.openapi.models.V1ServicePort... ports) { - if (this.ports != null) {this.ports.clear(); _visitables.remove("ports"); } - if (ports != null) {for (V1ServicePort item :ports){ this.addToPorts(item);}} return (A) this; - } - public Boolean hasPorts() { - return ports != null && !ports.isEmpty(); - } - public V1ServiceSpecFluentImpl.PortsNested addNewPort() { - return new V1ServiceSpecFluentImpl.PortsNestedImpl(); - } - public V1ServiceSpecFluentImpl.PortsNested addNewPortLike(V1ServicePort item) { - return new V1ServiceSpecFluentImpl.PortsNestedImpl(-1, item); - } - public V1ServiceSpecFluentImpl.PortsNested setNewPortLike(int index,V1ServicePort item) { - return new V1ServiceSpecFluentImpl.PortsNestedImpl(index, item); - } - public V1ServiceSpecFluentImpl.PortsNested editPort(int index) { - if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size."); - return setNewPortLike(index, buildPort(index)); - } - public V1ServiceSpecFluentImpl.PortsNested editFirstPort() { - if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty."); - return setNewPortLike(0, buildPort(0)); - } - public V1ServiceSpecFluentImpl.PortsNested editLastPort() { - int index = ports.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty."); - return setNewPortLike(index, buildPort(index)); - } - public V1ServiceSpecFluentImpl.PortsNested editMatchingPort(Predicate predicate) { - int index = -1; - for (int i=0;i map) { - if(this.selector == null && map != null) { this.selector = new LinkedHashMap(); } - if(map != null) { this.selector.putAll(map);} return (A)this; - } - public A removeFromSelector(String key) { - if(this.selector == null) { return (A) this; } - if(key != null && this.selector != null) {this.selector.remove(key);} return (A)this; - } - public A removeFromSelector(Map map) { - if(this.selector == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.selector != null){this.selector.remove(key);}}} return (A)this; - } - public Map getSelector() { - return this.selector; - } - public A withSelector(Map selector) { - if (selector == null) { this.selector = null;} else {this.selector = new LinkedHashMap(selector);} return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public String getSessionAffinity() { - return this.sessionAffinity; - } - public A withSessionAffinity(String sessionAffinity) { - this.sessionAffinity=sessionAffinity; return (A) this; - } - public Boolean hasSessionAffinity() { - return this.sessionAffinity != null; - } - - /** - * This method has been deprecated, please use method buildSessionAffinityConfig instead. - * @return The buildable object. - */ - @Deprecated - public V1SessionAffinityConfig getSessionAffinityConfig() { - return this.sessionAffinityConfig!=null ?this.sessionAffinityConfig.build():null; - } - public V1SessionAffinityConfig buildSessionAffinityConfig() { - return this.sessionAffinityConfig!=null ?this.sessionAffinityConfig.build():null; - } - public A withSessionAffinityConfig(V1SessionAffinityConfig sessionAffinityConfig) { - _visitables.get("sessionAffinityConfig").remove(this.sessionAffinityConfig); - if (sessionAffinityConfig!=null){ this.sessionAffinityConfig= new V1SessionAffinityConfigBuilder(sessionAffinityConfig); _visitables.get("sessionAffinityConfig").add(this.sessionAffinityConfig);} else { this.sessionAffinityConfig = null; _visitables.get("sessionAffinityConfig").remove(this.sessionAffinityConfig); } return (A) this; - } - public Boolean hasSessionAffinityConfig() { - return this.sessionAffinityConfig != null; - } - public V1ServiceSpecFluentImpl.SessionAffinityConfigNested withNewSessionAffinityConfig() { - return new V1ServiceSpecFluentImpl.SessionAffinityConfigNestedImpl(); - } - public V1ServiceSpecFluentImpl.SessionAffinityConfigNested withNewSessionAffinityConfigLike(V1SessionAffinityConfig item) { - return new V1ServiceSpecFluentImpl.SessionAffinityConfigNestedImpl(item); - } - public V1ServiceSpecFluentImpl.SessionAffinityConfigNested editSessionAffinityConfig() { - return withNewSessionAffinityConfigLike(getSessionAffinityConfig()); - } - public V1ServiceSpecFluentImpl.SessionAffinityConfigNested editOrNewSessionAffinityConfig() { - return withNewSessionAffinityConfigLike(getSessionAffinityConfig() != null ? getSessionAffinityConfig(): new V1SessionAffinityConfigBuilder().build()); - } - public V1ServiceSpecFluentImpl.SessionAffinityConfigNested editOrNewSessionAffinityConfigLike(V1SessionAffinityConfig item) { - return withNewSessionAffinityConfigLike(getSessionAffinityConfig() != null ? getSessionAffinityConfig(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ServiceSpecFluentImpl that = (V1ServiceSpecFluentImpl) o; - if (!java.util.Objects.equals(allocateLoadBalancerNodePorts, that.allocateLoadBalancerNodePorts)) return false; - - if (!java.util.Objects.equals(clusterIP, that.clusterIP)) return false; - - if (!java.util.Objects.equals(clusterIPs, that.clusterIPs)) return false; - - if (!java.util.Objects.equals(externalIPs, that.externalIPs)) return false; - - if (!java.util.Objects.equals(externalName, that.externalName)) return false; - - if (!java.util.Objects.equals(externalTrafficPolicy, that.externalTrafficPolicy)) return false; - - if (!java.util.Objects.equals(healthCheckNodePort, that.healthCheckNodePort)) return false; - - if (!java.util.Objects.equals(internalTrafficPolicy, that.internalTrafficPolicy)) return false; - - if (!java.util.Objects.equals(ipFamilies, that.ipFamilies)) return false; - - if (!java.util.Objects.equals(ipFamilyPolicy, that.ipFamilyPolicy)) return false; - - if (!java.util.Objects.equals(loadBalancerClass, that.loadBalancerClass)) return false; - - if (!java.util.Objects.equals(loadBalancerIP, that.loadBalancerIP)) return false; - - if (!java.util.Objects.equals(loadBalancerSourceRanges, that.loadBalancerSourceRanges)) return false; - - if (!java.util.Objects.equals(ports, that.ports)) return false; - - if (!java.util.Objects.equals(publishNotReadyAddresses, that.publishNotReadyAddresses)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - if (!java.util.Objects.equals(sessionAffinity, that.sessionAffinity)) return false; - - if (!java.util.Objects.equals(sessionAffinityConfig, that.sessionAffinityConfig)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(allocateLoadBalancerNodePorts, clusterIP, clusterIPs, externalIPs, externalName, externalTrafficPolicy, healthCheckNodePort, internalTrafficPolicy, ipFamilies, ipFamilyPolicy, loadBalancerClass, loadBalancerIP, loadBalancerSourceRanges, ports, publishNotReadyAddresses, selector, sessionAffinity, sessionAffinityConfig, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (allocateLoadBalancerNodePorts != null) { sb.append("allocateLoadBalancerNodePorts:"); sb.append(allocateLoadBalancerNodePorts + ","); } - if (clusterIP != null) { sb.append("clusterIP:"); sb.append(clusterIP + ","); } - if (clusterIPs != null && !clusterIPs.isEmpty()) { sb.append("clusterIPs:"); sb.append(clusterIPs + ","); } - if (externalIPs != null && !externalIPs.isEmpty()) { sb.append("externalIPs:"); sb.append(externalIPs + ","); } - if (externalName != null) { sb.append("externalName:"); sb.append(externalName + ","); } - if (externalTrafficPolicy != null) { sb.append("externalTrafficPolicy:"); sb.append(externalTrafficPolicy + ","); } - if (healthCheckNodePort != null) { sb.append("healthCheckNodePort:"); sb.append(healthCheckNodePort + ","); } - if (internalTrafficPolicy != null) { sb.append("internalTrafficPolicy:"); sb.append(internalTrafficPolicy + ","); } - if (ipFamilies != null && !ipFamilies.isEmpty()) { sb.append("ipFamilies:"); sb.append(ipFamilies + ","); } - if (ipFamilyPolicy != null) { sb.append("ipFamilyPolicy:"); sb.append(ipFamilyPolicy + ","); } - if (loadBalancerClass != null) { sb.append("loadBalancerClass:"); sb.append(loadBalancerClass + ","); } - if (loadBalancerIP != null) { sb.append("loadBalancerIP:"); sb.append(loadBalancerIP + ","); } - if (loadBalancerSourceRanges != null && !loadBalancerSourceRanges.isEmpty()) { sb.append("loadBalancerSourceRanges:"); sb.append(loadBalancerSourceRanges + ","); } - if (ports != null) { sb.append("ports:"); sb.append(ports + ","); } - if (publishNotReadyAddresses != null) { sb.append("publishNotReadyAddresses:"); sb.append(publishNotReadyAddresses + ","); } - if (selector != null && !selector.isEmpty()) { sb.append("selector:"); sb.append(selector + ","); } - if (sessionAffinity != null) { sb.append("sessionAffinity:"); sb.append(sessionAffinity + ","); } - if (sessionAffinityConfig != null) { sb.append("sessionAffinityConfig:"); sb.append(sessionAffinityConfig + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - public A withAllocateLoadBalancerNodePorts() { - return withAllocateLoadBalancerNodePorts(true); - } - public A withPublishNotReadyAddresses() { - return withPublishNotReadyAddresses(true); - } - class PortsNestedImpl extends V1ServicePortFluentImpl> implements V1ServiceSpecFluentImpl.PortsNested,Nested{ - PortsNestedImpl(int index,V1ServicePort item) { - this.index = index; - this.builder = new V1ServicePortBuilder(this, item); - } - PortsNestedImpl() { - this.index = -1; - this.builder = new V1ServicePortBuilder(this); - } - V1ServicePortBuilder builder; - int index; - public N and() { - return (N) V1ServiceSpecFluentImpl.this.setToPorts(index,builder.build()); - } - public N endPort() { - return and(); - } - - } - class SessionAffinityConfigNestedImpl extends V1SessionAffinityConfigFluentImpl> implements V1ServiceSpecFluentImpl.SessionAffinityConfigNested,Nested{ - SessionAffinityConfigNestedImpl(V1SessionAffinityConfig item) { - this.builder = new V1SessionAffinityConfigBuilder(this, item); - } - SessionAffinityConfigNestedImpl() { - this.builder = new V1SessionAffinityConfigBuilder(this); - } - V1SessionAffinityConfigBuilder builder; - public N and() { - return (N) V1ServiceSpecFluentImpl.this.withSessionAffinityConfig(builder.build()); - } - public N endSessionAffinityConfig() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusBuilder.java index d7770574f3..3196ea48f4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ServiceStatusBuilder extends V1ServiceStatusFluentImpl implements VisitableBuilder{ +public class V1ServiceStatusBuilder extends V1ServiceStatusFluent implements VisitableBuilder{ public V1ServiceStatusBuilder() { - this(false); - } - public V1ServiceStatusBuilder(Boolean validationEnabled) { - this(new V1ServiceStatus(), validationEnabled); + this(new V1ServiceStatus()); } + public V1ServiceStatusBuilder(V1ServiceStatusFluent fluent) { - this(fluent, false); - } - public V1ServiceStatusBuilder(V1ServiceStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ServiceStatus(), validationEnabled); + this(fluent, new V1ServiceStatus()); } + public V1ServiceStatusBuilder(V1ServiceStatusFluent fluent,V1ServiceStatus instance) { - this(fluent, instance, false); - } - public V1ServiceStatusBuilder(V1ServiceStatusFluent fluent,V1ServiceStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - fluent.withLoadBalancer(instance.getLoadBalancer()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ServiceStatusBuilder(V1ServiceStatus instance) { - this(instance,false); - } - public V1ServiceStatusBuilder(V1ServiceStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withLoadBalancer(instance.getLoadBalancer()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ServiceStatusFluent fluent; - Boolean validationEnabled; + public V1ServiceStatus build() { V1ServiceStatus buildable = new V1ServiceStatus(); - buildable.setConditions(fluent.getConditions()); - buildable.setLoadBalancer(fluent.getLoadBalancer()); + buildable.setConditions(fluent.buildConditions()); + buildable.setLoadBalancer(fluent.buildLoadBalancer()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusFluent.java index 24aab5a9eb..7e723d698e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusFluent.java @@ -1,75 +1,285 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ServiceStatusFluent> extends Fluent{ - public A addToConditions(int index,V1Condition item); - public A setToConditions(int index,V1Condition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1Condition buildCondition(int index); - public V1Condition buildFirstCondition(); - public V1Condition buildLastCondition(); - public V1Condition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions); - public Boolean hasConditions(); - public V1ServiceStatusFluent.ConditionsNested addNewCondition(); - public V1ServiceStatusFluent.ConditionsNested addNewConditionLike(V1Condition item); - public V1ServiceStatusFluent.ConditionsNested setNewConditionLike(int index,V1Condition item); - public V1ServiceStatusFluent.ConditionsNested editCondition(int index); - public V1ServiceStatusFluent.ConditionsNested editFirstCondition(); - public V1ServiceStatusFluent.ConditionsNested editLastCondition(); - public V1ServiceStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - - /** - * This method has been deprecated, please use method buildLoadBalancer instead. - * @return The buildable object. - */ - @Deprecated - public V1LoadBalancerStatus getLoadBalancer(); - public V1LoadBalancerStatus buildLoadBalancer(); - public A withLoadBalancer(V1LoadBalancerStatus loadBalancer); - public Boolean hasLoadBalancer(); - public V1ServiceStatusFluent.LoadBalancerNested withNewLoadBalancer(); - public V1ServiceStatusFluent.LoadBalancerNested withNewLoadBalancerLike(V1LoadBalancerStatus item); - public V1ServiceStatusFluent.LoadBalancerNested editLoadBalancer(); - public V1ServiceStatusFluent.LoadBalancerNested editOrNewLoadBalancer(); - public V1ServiceStatusFluent.LoadBalancerNested editOrNewLoadBalancerLike(V1LoadBalancerStatus item); - public interface ConditionsNested extends Nested,V1ConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ServiceStatusFluent> extends BaseFluent{ + public V1ServiceStatusFluent() { + } + + public V1ServiceStatusFluent(V1ServiceStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + private V1LoadBalancerStatusBuilder loadBalancer; + + protected void copyInstance(V1ServiceStatus instance) { + instance = (instance != null ? instance : new V1ServiceStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + this.withLoadBalancer(instance.getLoadBalancer()); + } + } + + public A addToConditions(int index,V1Condition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ConditionBuilder builder = new V1ConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1Condition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ConditionBuilder builder = new V1ConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items) { + if (this.conditions == null) return (A)this; + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1ConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1Condition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1Condition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1Condition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1Condition buildMatchingCondition(Predicate predicate) { + for (V1ConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1ConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1Condition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1Condition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1Condition item) { + return new ConditionsNested(-1, item); } - public interface LoadBalancerNested extends Nested,V1LoadBalancerStatusFluent>{ - public N and(); - public N endLoadBalancer(); + + public ConditionsNested setNewConditionLike(int index,V1Condition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i withNewLoadBalancer() { + return new LoadBalancerNested(null); + } + + public LoadBalancerNested withNewLoadBalancerLike(V1LoadBalancerStatus item) { + return new LoadBalancerNested(item); + } + + public LoadBalancerNested editLoadBalancer() { + return withNewLoadBalancerLike(java.util.Optional.ofNullable(buildLoadBalancer()).orElse(null)); + } + + public LoadBalancerNested editOrNewLoadBalancer() { + return withNewLoadBalancerLike(java.util.Optional.ofNullable(buildLoadBalancer()).orElse(new V1LoadBalancerStatusBuilder().build())); + } + + public LoadBalancerNested editOrNewLoadBalancerLike(V1LoadBalancerStatus item) { + return withNewLoadBalancerLike(java.util.Optional.ofNullable(buildLoadBalancer()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ServiceStatusFluent that = (V1ServiceStatusFluent) o; + if (!java.util.Objects.equals(conditions, that.conditions)) return false; + if (!java.util.Objects.equals(loadBalancer, that.loadBalancer)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(conditions, loadBalancer, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (conditions != null && !conditions.isEmpty()) { sb.append("conditions:"); sb.append(conditions + ","); } + if (loadBalancer != null) { sb.append("loadBalancer:"); sb.append(loadBalancer); } + sb.append("}"); + return sb.toString(); + } + public class ConditionsNested extends V1ConditionFluent> implements Nested{ + ConditionsNested(int index,V1Condition item) { + this.index = index; + this.builder = new V1ConditionBuilder(this, item); + } + V1ConditionBuilder builder; + int index; + + public N and() { + return (N) V1ServiceStatusFluent.this.setToConditions(index,builder.build()); + } + public N endCondition() { + return and(); + } + + } + public class LoadBalancerNested extends V1LoadBalancerStatusFluent> implements Nested{ + LoadBalancerNested(V1LoadBalancerStatus item) { + this.builder = new V1LoadBalancerStatusBuilder(this, item); + } + V1LoadBalancerStatusBuilder builder; + + public N and() { + return (N) V1ServiceStatusFluent.this.withLoadBalancer(builder.build()); + } + + public N endLoadBalancer() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusFluentImpl.java deleted file mode 100644 index 98a6641a44..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ServiceStatusFluentImpl.java +++ /dev/null @@ -1,231 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ServiceStatusFluentImpl> extends BaseFluent implements V1ServiceStatusFluent{ - public V1ServiceStatusFluentImpl() { - } - public V1ServiceStatusFluentImpl(V1ServiceStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withLoadBalancer(instance.getLoadBalancer()); - } - } - private ArrayList conditions; - private V1LoadBalancerStatusBuilder loadBalancer; - public A addToConditions(int index,V1Condition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ConditionBuilder builder = new V1ConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1Condition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ConditionBuilder builder = new V1ConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items) { - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1ConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1Condition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1Condition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1Condition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1Condition buildMatchingCondition(Predicate predicate) { - for (V1ConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1ConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1Condition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1Condition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1ServiceStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1ServiceStatusFluentImpl.ConditionsNestedImpl(); - } - public V1ServiceStatusFluentImpl.ConditionsNested addNewConditionLike(V1Condition item) { - return new V1ServiceStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1ServiceStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1Condition item) { - return new V1ServiceStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1ServiceStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1ServiceStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1ServiceStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1ServiceStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i withNewLoadBalancer() { - return new V1ServiceStatusFluentImpl.LoadBalancerNestedImpl(); - } - public V1ServiceStatusFluentImpl.LoadBalancerNested withNewLoadBalancerLike(V1LoadBalancerStatus item) { - return new V1ServiceStatusFluentImpl.LoadBalancerNestedImpl(item); - } - public V1ServiceStatusFluentImpl.LoadBalancerNested editLoadBalancer() { - return withNewLoadBalancerLike(getLoadBalancer()); - } - public V1ServiceStatusFluentImpl.LoadBalancerNested editOrNewLoadBalancer() { - return withNewLoadBalancerLike(getLoadBalancer() != null ? getLoadBalancer(): new V1LoadBalancerStatusBuilder().build()); - } - public V1ServiceStatusFluentImpl.LoadBalancerNested editOrNewLoadBalancerLike(V1LoadBalancerStatus item) { - return withNewLoadBalancerLike(getLoadBalancer() != null ? getLoadBalancer(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ServiceStatusFluentImpl that = (V1ServiceStatusFluentImpl) o; - if (!java.util.Objects.equals(conditions, that.conditions)) return false; - - if (!java.util.Objects.equals(loadBalancer, that.loadBalancer)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(conditions, loadBalancer, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (conditions != null) { sb.append("conditions:"); sb.append(conditions + ","); } - if (loadBalancer != null) { sb.append("loadBalancer:"); sb.append(loadBalancer); } - sb.append("}"); - return sb.toString(); - } - class ConditionsNestedImpl extends V1ConditionFluentImpl> implements V1ServiceStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1Condition item) { - this.index = index; - this.builder = new V1ConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1ConditionBuilder(this); - } - V1ConditionBuilder builder; - int index; - public N and() { - return (N) V1ServiceStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - class LoadBalancerNestedImpl extends V1LoadBalancerStatusFluentImpl> implements V1ServiceStatusFluentImpl.LoadBalancerNested,Nested{ - LoadBalancerNestedImpl(V1LoadBalancerStatus item) { - this.builder = new V1LoadBalancerStatusBuilder(this, item); - } - LoadBalancerNestedImpl() { - this.builder = new V1LoadBalancerStatusBuilder(this); - } - V1LoadBalancerStatusBuilder builder; - public N and() { - return (N) V1ServiceStatusFluentImpl.this.withLoadBalancer(builder.build()); - } - public N endLoadBalancer() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigBuilder.java index b0eebf709a..e0b3b5e5b4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SessionAffinityConfigBuilder extends V1SessionAffinityConfigFluentImpl implements VisitableBuilder{ +public class V1SessionAffinityConfigBuilder extends V1SessionAffinityConfigFluent implements VisitableBuilder{ public V1SessionAffinityConfigBuilder() { - this(false); - } - public V1SessionAffinityConfigBuilder(Boolean validationEnabled) { - this(new V1SessionAffinityConfig(), validationEnabled); + this(new V1SessionAffinityConfig()); } + public V1SessionAffinityConfigBuilder(V1SessionAffinityConfigFluent fluent) { - this(fluent, false); - } - public V1SessionAffinityConfigBuilder(V1SessionAffinityConfigFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SessionAffinityConfig(), validationEnabled); + this(fluent, new V1SessionAffinityConfig()); } + public V1SessionAffinityConfigBuilder(V1SessionAffinityConfigFluent fluent,V1SessionAffinityConfig instance) { - this(fluent, instance, false); - } - public V1SessionAffinityConfigBuilder(V1SessionAffinityConfigFluent fluent,V1SessionAffinityConfig instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withClientIP(instance.getClientIP()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SessionAffinityConfigBuilder(V1SessionAffinityConfig instance) { - this(instance,false); - } - public V1SessionAffinityConfigBuilder(V1SessionAffinityConfig instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withClientIP(instance.getClientIP()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SessionAffinityConfigFluent fluent; - Boolean validationEnabled; + public V1SessionAffinityConfig build() { V1SessionAffinityConfig buildable = new V1SessionAffinityConfig(); - buildable.setClientIP(fluent.getClientIP()); + buildable.setClientIP(fluent.buildClientIP()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigFluent.java index ab35358113..a5943dfe2f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1SessionAffinityConfigFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildClientIP instead. - * @return The buildable object. - */ - @Deprecated - public V1ClientIPConfig getClientIP(); - public V1ClientIPConfig buildClientIP(); - public A withClientIP(V1ClientIPConfig clientIP); - public Boolean hasClientIP(); - public V1SessionAffinityConfigFluent.ClientIPNested withNewClientIP(); - public V1SessionAffinityConfigFluent.ClientIPNested withNewClientIPLike(V1ClientIPConfig item); - public V1SessionAffinityConfigFluent.ClientIPNested editClientIP(); - public V1SessionAffinityConfigFluent.ClientIPNested editOrNewClientIP(); - public V1SessionAffinityConfigFluent.ClientIPNested editOrNewClientIPLike(V1ClientIPConfig item); - public interface ClientIPNested extends Nested,V1ClientIPConfigFluent>{ - public N and(); - public N endClientIP(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SessionAffinityConfigFluent> extends BaseFluent{ + public V1SessionAffinityConfigFluent() { + } + + public V1SessionAffinityConfigFluent(V1SessionAffinityConfig instance) { + this.copyInstance(instance); + } + private V1ClientIPConfigBuilder clientIP; + + protected void copyInstance(V1SessionAffinityConfig instance) { + instance = (instance != null ? instance : new V1SessionAffinityConfig()); + if (instance != null) { + this.withClientIP(instance.getClientIP()); + } + } + + public V1ClientIPConfig buildClientIP() { + return this.clientIP != null ? this.clientIP.build() : null; + } + + public A withClientIP(V1ClientIPConfig clientIP) { + this._visitables.remove("clientIP"); + if (clientIP != null) { + this.clientIP = new V1ClientIPConfigBuilder(clientIP); + this._visitables.get("clientIP").add(this.clientIP); + } else { + this.clientIP = null; + this._visitables.get("clientIP").remove(this.clientIP); + } + return (A) this; + } + + public boolean hasClientIP() { + return this.clientIP != null; + } + + public ClientIPNested withNewClientIP() { + return new ClientIPNested(null); + } + + public ClientIPNested withNewClientIPLike(V1ClientIPConfig item) { + return new ClientIPNested(item); + } + + public ClientIPNested editClientIP() { + return withNewClientIPLike(java.util.Optional.ofNullable(buildClientIP()).orElse(null)); + } + + public ClientIPNested editOrNewClientIP() { + return withNewClientIPLike(java.util.Optional.ofNullable(buildClientIP()).orElse(new V1ClientIPConfigBuilder().build())); + } + + public ClientIPNested editOrNewClientIPLike(V1ClientIPConfig item) { + return withNewClientIPLike(java.util.Optional.ofNullable(buildClientIP()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SessionAffinityConfigFluent that = (V1SessionAffinityConfigFluent) o; + if (!java.util.Objects.equals(clientIP, that.clientIP)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(clientIP, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (clientIP != null) { sb.append("clientIP:"); sb.append(clientIP); } + sb.append("}"); + return sb.toString(); } + public class ClientIPNested extends V1ClientIPConfigFluent> implements Nested{ + ClientIPNested(V1ClientIPConfig item) { + this.builder = new V1ClientIPConfigBuilder(this, item); + } + V1ClientIPConfigBuilder builder; + + public N and() { + return (N) V1SessionAffinityConfigFluent.this.withClientIP(builder.build()); + } + + public N endClientIP() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigFluentImpl.java deleted file mode 100644 index df224cdad9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SessionAffinityConfigFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SessionAffinityConfigFluentImpl> extends BaseFluent implements V1SessionAffinityConfigFluent{ - public V1SessionAffinityConfigFluentImpl() { - } - public V1SessionAffinityConfigFluentImpl(V1SessionAffinityConfig instance) { - if (instance != null) { - this.withClientIP(instance.getClientIP()); - } - } - private V1ClientIPConfigBuilder clientIP; - - /** - * This method has been deprecated, please use method buildClientIP instead. - * @return The buildable object. - */ - @Deprecated - public V1ClientIPConfig getClientIP() { - return this.clientIP!=null ?this.clientIP.build():null; - } - public V1ClientIPConfig buildClientIP() { - return this.clientIP!=null ?this.clientIP.build():null; - } - public A withClientIP(V1ClientIPConfig clientIP) { - _visitables.get("clientIP").remove(this.clientIP); - if (clientIP!=null){ this.clientIP= new V1ClientIPConfigBuilder(clientIP); _visitables.get("clientIP").add(this.clientIP);} else { this.clientIP = null; _visitables.get("clientIP").remove(this.clientIP); } return (A) this; - } - public Boolean hasClientIP() { - return this.clientIP != null; - } - public V1SessionAffinityConfigFluentImpl.ClientIPNested withNewClientIP() { - return new V1SessionAffinityConfigFluentImpl.ClientIPNestedImpl(); - } - public V1SessionAffinityConfigFluentImpl.ClientIPNested withNewClientIPLike(V1ClientIPConfig item) { - return new V1SessionAffinityConfigFluentImpl.ClientIPNestedImpl(item); - } - public V1SessionAffinityConfigFluentImpl.ClientIPNested editClientIP() { - return withNewClientIPLike(getClientIP()); - } - public V1SessionAffinityConfigFluentImpl.ClientIPNested editOrNewClientIP() { - return withNewClientIPLike(getClientIP() != null ? getClientIP(): new V1ClientIPConfigBuilder().build()); - } - public V1SessionAffinityConfigFluentImpl.ClientIPNested editOrNewClientIPLike(V1ClientIPConfig item) { - return withNewClientIPLike(getClientIP() != null ? getClientIP(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SessionAffinityConfigFluentImpl that = (V1SessionAffinityConfigFluentImpl) o; - if (!java.util.Objects.equals(clientIP, that.clientIP)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(clientIP, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (clientIP != null) { sb.append("clientIP:"); sb.append(clientIP); } - sb.append("}"); - return sb.toString(); - } - class ClientIPNestedImpl extends V1ClientIPConfigFluentImpl> implements V1SessionAffinityConfigFluentImpl.ClientIPNested,Nested{ - ClientIPNestedImpl(V1ClientIPConfig item) { - this.builder = new V1ClientIPConfigBuilder(this, item); - } - ClientIPNestedImpl() { - this.builder = new V1ClientIPConfigBuilder(this); - } - V1ClientIPConfigBuilder builder; - public N and() { - return (N) V1SessionAffinityConfigFluentImpl.this.withClientIP(builder.build()); - } - public N endClientIP() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetBuilder.java index 4ac2e71bfd..11d8a248cc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatefulSetBuilder extends V1StatefulSetFluentImpl implements VisitableBuilder{ +public class V1StatefulSetBuilder extends V1StatefulSetFluent implements VisitableBuilder{ public V1StatefulSetBuilder() { - this(false); - } - public V1StatefulSetBuilder(Boolean validationEnabled) { - this(new V1StatefulSet(), validationEnabled); + this(new V1StatefulSet()); } + public V1StatefulSetBuilder(V1StatefulSetFluent fluent) { - this(fluent, false); - } - public V1StatefulSetBuilder(V1StatefulSetFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatefulSet(), validationEnabled); + this(fluent, new V1StatefulSet()); } + public V1StatefulSetBuilder(V1StatefulSetFluent fluent,V1StatefulSet instance) { - this(fluent, instance, false); - } - public V1StatefulSetBuilder(V1StatefulSetFluent fluent,V1StatefulSet instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatefulSetBuilder(V1StatefulSet instance) { - this(instance,false); - } - public V1StatefulSetBuilder(V1StatefulSet instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatefulSetFluent fluent; - Boolean validationEnabled; + public V1StatefulSet build() { V1StatefulSet buildable = new V1StatefulSet(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionBuilder.java index 45d67a5c60..f44b6cfc3b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatefulSetConditionBuilder extends V1StatefulSetConditionFluentImpl implements VisitableBuilder{ +public class V1StatefulSetConditionBuilder extends V1StatefulSetConditionFluent implements VisitableBuilder{ public V1StatefulSetConditionBuilder() { - this(false); - } - public V1StatefulSetConditionBuilder(Boolean validationEnabled) { - this(new V1StatefulSetCondition(), validationEnabled); + this(new V1StatefulSetCondition()); } + public V1StatefulSetConditionBuilder(V1StatefulSetConditionFluent fluent) { - this(fluent, false); - } - public V1StatefulSetConditionBuilder(V1StatefulSetConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatefulSetCondition(), validationEnabled); + this(fluent, new V1StatefulSetCondition()); } + public V1StatefulSetConditionBuilder(V1StatefulSetConditionFluent fluent,V1StatefulSetCondition instance) { - this(fluent, instance, false); - } - public V1StatefulSetConditionBuilder(V1StatefulSetConditionFluent fluent,V1StatefulSetCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatefulSetConditionBuilder(V1StatefulSetCondition instance) { - this(instance,false); - } - public V1StatefulSetConditionBuilder(V1StatefulSetCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatefulSetConditionFluent fluent; - Boolean validationEnabled; + public V1StatefulSetCondition build() { V1StatefulSetCondition buildable = new V1StatefulSetCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1StatefulSetCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionFluent.java index f14f75f4d0..89b9419182 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1StatefulSetConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatefulSetConditionFluent> extends BaseFluent{ + public V1StatefulSetConditionFluent() { + } + public V1StatefulSetConditionFluent(V1StatefulSetCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1StatefulSetCondition instance) { + instance = (instance != null ? instance : new V1StatefulSetCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StatefulSetConditionFluent that = (V1StatefulSetConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionFluentImpl.java deleted file mode 100644 index d2931fe92e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatefulSetConditionFluentImpl> extends BaseFluent implements V1StatefulSetConditionFluent{ - public V1StatefulSetConditionFluentImpl() { - } - public V1StatefulSetConditionFluentImpl(V1StatefulSetCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StatefulSetConditionFluentImpl that = (V1StatefulSetConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetFluent.java index 46ab80c487..394864639e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1StatefulSetFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1StatefulSetFluent.MetadataNested withNewMetadata(); - public V1StatefulSetFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1StatefulSetFluent.MetadataNested editMetadata(); - public V1StatefulSetFluent.MetadataNested editOrNewMetadata(); - public V1StatefulSetFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetSpec getSpec(); - public V1StatefulSetSpec buildSpec(); - public A withSpec(V1StatefulSetSpec spec); - public Boolean hasSpec(); - public V1StatefulSetFluent.SpecNested withNewSpec(); - public V1StatefulSetFluent.SpecNested withNewSpecLike(V1StatefulSetSpec item); - public V1StatefulSetFluent.SpecNested editSpec(); - public V1StatefulSetFluent.SpecNested editOrNewSpec(); - public V1StatefulSetFluent.SpecNested editOrNewSpecLike(V1StatefulSetSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetStatus getStatus(); - public V1StatefulSetStatus buildStatus(); - public A withStatus(V1StatefulSetStatus status); - public Boolean hasStatus(); - public V1StatefulSetFluent.StatusNested withNewStatus(); - public V1StatefulSetFluent.StatusNested withNewStatusLike(V1StatefulSetStatus item); - public V1StatefulSetFluent.StatusNested editStatus(); - public V1StatefulSetFluent.StatusNested editOrNewStatus(); - public V1StatefulSetFluent.StatusNested editOrNewStatusLike(V1StatefulSetStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatefulSetFluent> extends BaseFluent{ + public V1StatefulSetFluent() { + } + + public V1StatefulSetFluent(V1StatefulSet instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1StatefulSetSpecBuilder spec; + private V1StatefulSetStatusBuilder status; + + protected void copyInstance(V1StatefulSet instance) { + instance = (instance != null ? instance : new V1StatefulSet()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1StatefulSetSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1StatefulSetSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1StatefulSetSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1StatefulSetSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1StatefulSetSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1StatefulSetSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1StatefulSetSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1StatefulSetStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1StatefulSetStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1StatefulSetStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1StatefulSetStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1StatefulSetStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1StatefulSetStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StatefulSetFluent that = (V1StatefulSetFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1StatefulSetFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1StatefulSetStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1StatefulSetSpecFluent> implements Nested{ + SpecNested(V1StatefulSetSpec item) { + this.builder = new V1StatefulSetSpecBuilder(this, item); + } + V1StatefulSetSpecBuilder builder; + + public N and() { + return (N) V1StatefulSetFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1StatefulSetStatusFluent> implements Nested{ + StatusNested(V1StatefulSetStatus item) { + this.builder = new V1StatefulSetStatusBuilder(this, item); + } + V1StatefulSetStatusBuilder builder; + + public N and() { + return (N) V1StatefulSetFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetFluentImpl.java deleted file mode 100644 index 4853631087..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatefulSetFluentImpl> extends BaseFluent implements V1StatefulSetFluent{ - public V1StatefulSetFluentImpl() { - } - public V1StatefulSetFluentImpl(V1StatefulSet instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1StatefulSetSpecBuilder spec; - private V1StatefulSetStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1StatefulSetFluentImpl.MetadataNested withNewMetadata() { - return new V1StatefulSetFluentImpl.MetadataNestedImpl(); - } - public V1StatefulSetFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1StatefulSetFluentImpl.MetadataNestedImpl(item); - } - public V1StatefulSetFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1StatefulSetFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1StatefulSetFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1StatefulSetSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1StatefulSetSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1StatefulSetSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1StatefulSetFluentImpl.SpecNested withNewSpec() { - return new V1StatefulSetFluentImpl.SpecNestedImpl(); - } - public V1StatefulSetFluentImpl.SpecNested withNewSpecLike(V1StatefulSetSpec item) { - return new V1StatefulSetFluentImpl.SpecNestedImpl(item); - } - public V1StatefulSetFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1StatefulSetFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1StatefulSetSpecBuilder().build()); - } - public V1StatefulSetFluentImpl.SpecNested editOrNewSpecLike(V1StatefulSetSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1StatefulSetStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1StatefulSetStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1StatefulSetStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1StatefulSetFluentImpl.StatusNested withNewStatus() { - return new V1StatefulSetFluentImpl.StatusNestedImpl(); - } - public V1StatefulSetFluentImpl.StatusNested withNewStatusLike(V1StatefulSetStatus item) { - return new V1StatefulSetFluentImpl.StatusNestedImpl(item); - } - public V1StatefulSetFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1StatefulSetFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1StatefulSetStatusBuilder().build()); - } - public V1StatefulSetFluentImpl.StatusNested editOrNewStatusLike(V1StatefulSetStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StatefulSetFluentImpl that = (V1StatefulSetFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1StatefulSetFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1StatefulSetFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1StatefulSetSpecFluentImpl> implements V1StatefulSetFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1StatefulSetSpec item) { - this.builder = new V1StatefulSetSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1StatefulSetSpecBuilder(this); - } - V1StatefulSetSpecBuilder builder; - public N and() { - return (N) V1StatefulSetFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1StatefulSetStatusFluentImpl> implements V1StatefulSetFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1StatefulSetStatus item) { - this.builder = new V1StatefulSetStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1StatefulSetStatusBuilder(this); - } - V1StatefulSetStatusBuilder builder; - public N and() { - return (N) V1StatefulSetFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListBuilder.java index 6efa958b10..04dbfd274a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatefulSetListBuilder extends V1StatefulSetListFluentImpl implements VisitableBuilder{ +public class V1StatefulSetListBuilder extends V1StatefulSetListFluent implements VisitableBuilder{ public V1StatefulSetListBuilder() { - this(false); - } - public V1StatefulSetListBuilder(Boolean validationEnabled) { - this(new V1StatefulSetList(), validationEnabled); + this(new V1StatefulSetList()); } + public V1StatefulSetListBuilder(V1StatefulSetListFluent fluent) { - this(fluent, false); - } - public V1StatefulSetListBuilder(V1StatefulSetListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatefulSetList(), validationEnabled); + this(fluent, new V1StatefulSetList()); } + public V1StatefulSetListBuilder(V1StatefulSetListFluent fluent,V1StatefulSetList instance) { - this(fluent, instance, false); - } - public V1StatefulSetListBuilder(V1StatefulSetListFluent fluent,V1StatefulSetList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatefulSetListBuilder(V1StatefulSetList instance) { - this(instance,false); - } - public V1StatefulSetListBuilder(V1StatefulSetList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatefulSetListFluent fluent; - Boolean validationEnabled; + public V1StatefulSetList build() { V1StatefulSetList buildable = new V1StatefulSetList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListFluent.java index cfca8872e1..b77b1cab03 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1StatefulSetListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1StatefulSet item); - public A setToItems(int index,V1StatefulSet item); - public A addToItems(io.kubernetes.client.openapi.models.V1StatefulSet... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1StatefulSet... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1StatefulSet buildItem(int index); - public V1StatefulSet buildFirstItem(); - public V1StatefulSet buildLastItem(); - public V1StatefulSet buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1StatefulSet... items); - public Boolean hasItems(); - public V1StatefulSetListFluent.ItemsNested addNewItem(); - public V1StatefulSetListFluent.ItemsNested addNewItemLike(V1StatefulSet item); - public V1StatefulSetListFluent.ItemsNested setNewItemLike(int index,V1StatefulSet item); - public V1StatefulSetListFluent.ItemsNested editItem(int index); - public V1StatefulSetListFluent.ItemsNested editFirstItem(); - public V1StatefulSetListFluent.ItemsNested editLastItem(); - public V1StatefulSetListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1StatefulSetListFluent.MetadataNested withNewMetadata(); - public V1StatefulSetListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1StatefulSetListFluent.MetadataNested editMetadata(); - public V1StatefulSetListFluent.MetadataNested editOrNewMetadata(); - public V1StatefulSetListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1StatefulSetFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatefulSetListFluent> extends BaseFluent{ + public V1StatefulSetListFluent() { + } + + public V1StatefulSetListFluent(V1StatefulSetList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1StatefulSetList instance) { + instance = (instance != null ? instance : new V1StatefulSetList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1StatefulSet item) { + if (this.items == null) {this.items = new ArrayList();} + V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1StatefulSet item) { + if (this.items == null) {this.items = new ArrayList();} + V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1StatefulSet... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1StatefulSet item : items) {V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1StatefulSet item : items) {V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1StatefulSet... items) { + if (this.items == null) return (A)this; + for (V1StatefulSet item : items) {V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1StatefulSet item : items) {V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1StatefulSetBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1StatefulSet buildItem(int index) { + return this.items.get(index).build(); + } + + public V1StatefulSet buildFirstItem() { + return this.items.get(0).build(); + } + + public V1StatefulSet buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1StatefulSet buildMatchingItem(Predicate predicate) { + for (V1StatefulSetBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1StatefulSetBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1StatefulSet item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1StatefulSet... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1StatefulSet item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1StatefulSet item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1StatefulSet item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StatefulSetListFluent that = (V1StatefulSetListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1StatefulSetFluent> implements Nested{ + ItemsNested(int index,V1StatefulSet item) { + this.index = index; + this.builder = new V1StatefulSetBuilder(this, item); + } + V1StatefulSetBuilder builder; + int index; + public N and() { + return (N) V1StatefulSetListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1StatefulSetListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListFluentImpl.java deleted file mode 100644 index dd66ba275e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatefulSetListFluentImpl> extends BaseFluent implements V1StatefulSetListFluent{ - public V1StatefulSetListFluentImpl() { - } - public V1StatefulSetListFluentImpl(V1StatefulSetList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1StatefulSet item) { - if (this.items == null) {this.items = new ArrayList();} - V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1StatefulSet item) { - if (this.items == null) {this.items = new ArrayList();} - V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1StatefulSet... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1StatefulSet item : items) {V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1StatefulSet item : items) {V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1StatefulSet... items) { - for (V1StatefulSet item : items) {V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1StatefulSet item : items) {V1StatefulSetBuilder builder = new V1StatefulSetBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1StatefulSetBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1StatefulSet buildItem(int index) { - return this.items.get(index).build(); - } - public V1StatefulSet buildFirstItem() { - return this.items.get(0).build(); - } - public V1StatefulSet buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1StatefulSet buildMatchingItem(Predicate predicate) { - for (V1StatefulSetBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1StatefulSetBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1StatefulSet item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1StatefulSet... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1StatefulSet item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1StatefulSetListFluentImpl.ItemsNested addNewItem() { - return new V1StatefulSetListFluentImpl.ItemsNestedImpl(); - } - public V1StatefulSetListFluentImpl.ItemsNested addNewItemLike(V1StatefulSet item) { - return new V1StatefulSetListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1StatefulSetListFluentImpl.ItemsNested setNewItemLike(int index,V1StatefulSet item) { - return new V1StatefulSetListFluentImpl.ItemsNestedImpl(index, item); - } - public V1StatefulSetListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1StatefulSetListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1StatefulSetListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1StatefulSetListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1StatefulSetListFluentImpl.MetadataNestedImpl(); - } - public V1StatefulSetListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1StatefulSetListFluentImpl.MetadataNestedImpl(item); - } - public V1StatefulSetListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1StatefulSetListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1StatefulSetListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StatefulSetListFluentImpl that = (V1StatefulSetListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1StatefulSetFluentImpl> implements V1StatefulSetListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1StatefulSet item) { - this.index = index; - this.builder = new V1StatefulSetBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1StatefulSetBuilder(this); - } - V1StatefulSetBuilder builder; - int index; - public N and() { - return (N) V1StatefulSetListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1StatefulSetListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1StatefulSetListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsBuilder.java index edff4d0c4f..2d8e02b984 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatefulSetOrdinalsBuilder extends V1StatefulSetOrdinalsFluentImpl implements VisitableBuilder{ +public class V1StatefulSetOrdinalsBuilder extends V1StatefulSetOrdinalsFluent implements VisitableBuilder{ public V1StatefulSetOrdinalsBuilder() { - this(false); - } - public V1StatefulSetOrdinalsBuilder(Boolean validationEnabled) { - this(new V1StatefulSetOrdinals(), validationEnabled); + this(new V1StatefulSetOrdinals()); } + public V1StatefulSetOrdinalsBuilder(V1StatefulSetOrdinalsFluent fluent) { - this(fluent, false); - } - public V1StatefulSetOrdinalsBuilder(V1StatefulSetOrdinalsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatefulSetOrdinals(), validationEnabled); + this(fluent, new V1StatefulSetOrdinals()); } + public V1StatefulSetOrdinalsBuilder(V1StatefulSetOrdinalsFluent fluent,V1StatefulSetOrdinals instance) { - this(fluent, instance, false); - } - public V1StatefulSetOrdinalsBuilder(V1StatefulSetOrdinalsFluent fluent,V1StatefulSetOrdinals instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withStart(instance.getStart()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatefulSetOrdinalsBuilder(V1StatefulSetOrdinals instance) { - this(instance,false); - } - public V1StatefulSetOrdinalsBuilder(V1StatefulSetOrdinals instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withStart(instance.getStart()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatefulSetOrdinalsFluent fluent; - Boolean validationEnabled; + public V1StatefulSetOrdinals build() { V1StatefulSetOrdinals buildable = new V1StatefulSetOrdinals(); buildable.setStart(fluent.getStart()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsFluent.java index 574c98fe15..582c535f39 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsFluent.java @@ -1,16 +1,64 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1StatefulSetOrdinalsFluent> extends Fluent{ - public Integer getStart(); - public A withStart(Integer start); - public Boolean hasStart(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatefulSetOrdinalsFluent> extends BaseFluent{ + public V1StatefulSetOrdinalsFluent() { + } + public V1StatefulSetOrdinalsFluent(V1StatefulSetOrdinals instance) { + this.copyInstance(instance); + } + private Integer start; + + protected void copyInstance(V1StatefulSetOrdinals instance) { + instance = (instance != null ? instance : new V1StatefulSetOrdinals()); + if (instance != null) { + this.withStart(instance.getStart()); + } + } + + public Integer getStart() { + return this.start; + } + + public A withStart(Integer start) { + this.start = start; + return (A) this; + } + + public boolean hasStart() { + return this.start != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StatefulSetOrdinalsFluent that = (V1StatefulSetOrdinalsFluent) o; + if (!java.util.Objects.equals(start, that.start)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(start, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (start != null) { sb.append("start:"); sb.append(start); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsFluentImpl.java deleted file mode 100644 index fd82ab6185..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetOrdinalsFluentImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatefulSetOrdinalsFluentImpl> extends BaseFluent implements V1StatefulSetOrdinalsFluent{ - public V1StatefulSetOrdinalsFluentImpl() { - } - public V1StatefulSetOrdinalsFluentImpl(V1StatefulSetOrdinals instance) { - if (instance != null) { - this.withStart(instance.getStart()); - } - } - private Integer start; - public Integer getStart() { - return this.start; - } - public A withStart(Integer start) { - this.start=start; return (A) this; - } - public Boolean hasStart() { - return this.start != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StatefulSetOrdinalsFluentImpl that = (V1StatefulSetOrdinalsFluentImpl) o; - if (!java.util.Objects.equals(start, that.start)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(start, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (start != null) { sb.append("start:"); sb.append(start); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder.java index b709192190..91a57ae759 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder extends V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl implements VisitableBuilder{ +public class V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder extends V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent implements VisitableBuilder{ public V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder() { - this(false); - } - public V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(Boolean validationEnabled) { - this(new V1StatefulSetPersistentVolumeClaimRetentionPolicy(), validationEnabled); + this(new V1StatefulSetPersistentVolumeClaimRetentionPolicy()); } + public V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent fluent) { - this(fluent, false); - } - public V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatefulSetPersistentVolumeClaimRetentionPolicy(), validationEnabled); + this(fluent, new V1StatefulSetPersistentVolumeClaimRetentionPolicy()); } + public V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent fluent,V1StatefulSetPersistentVolumeClaimRetentionPolicy instance) { - this(fluent, instance, false); - } - public V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent fluent,V1StatefulSetPersistentVolumeClaimRetentionPolicy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withWhenDeleted(instance.getWhenDeleted()); - fluent.withWhenScaled(instance.getWhenScaled()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(V1StatefulSetPersistentVolumeClaimRetentionPolicy instance) { - this(instance,false); - } - public V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(V1StatefulSetPersistentVolumeClaimRetentionPolicy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withWhenDeleted(instance.getWhenDeleted()); - this.withWhenScaled(instance.getWhenScaled()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent fluent; - Boolean validationEnabled; + public V1StatefulSetPersistentVolumeClaimRetentionPolicy build() { V1StatefulSetPersistentVolumeClaimRetentionPolicy buildable = new V1StatefulSetPersistentVolumeClaimRetentionPolicy(); buildable.setWhenDeleted(fluent.getWhenDeleted()); @@ -46,4 +28,5 @@ public V1StatefulSetPersistentVolumeClaimRetentionPolicy build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent.java index 9df98e4c5b..6556bb9328 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent> extends Fluent{ - public String getWhenDeleted(); - public A withWhenDeleted(String whenDeleted); - public Boolean hasWhenDeleted(); - public String getWhenScaled(); - public A withWhenScaled(String whenScaled); - public Boolean hasWhenScaled(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent> extends BaseFluent{ + public V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent() { + } + public V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent(V1StatefulSetPersistentVolumeClaimRetentionPolicy instance) { + this.copyInstance(instance); + } + private String whenDeleted; + private String whenScaled; + + protected void copyInstance(V1StatefulSetPersistentVolumeClaimRetentionPolicy instance) { + instance = (instance != null ? instance : new V1StatefulSetPersistentVolumeClaimRetentionPolicy()); + if (instance != null) { + this.withWhenDeleted(instance.getWhenDeleted()); + this.withWhenScaled(instance.getWhenScaled()); + } + } + + public String getWhenDeleted() { + return this.whenDeleted; + } + + public A withWhenDeleted(String whenDeleted) { + this.whenDeleted = whenDeleted; + return (A) this; + } + + public boolean hasWhenDeleted() { + return this.whenDeleted != null; + } + + public String getWhenScaled() { + return this.whenScaled; + } + + public A withWhenScaled(String whenScaled) { + this.whenScaled = whenScaled; + return (A) this; + } + + public boolean hasWhenScaled() { + return this.whenScaled != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent that = (V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent) o; + if (!java.util.Objects.equals(whenDeleted, that.whenDeleted)) return false; + if (!java.util.Objects.equals(whenScaled, that.whenScaled)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(whenDeleted, whenScaled, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (whenDeleted != null) { sb.append("whenDeleted:"); sb.append(whenDeleted + ","); } + if (whenScaled != null) { sb.append("whenScaled:"); sb.append(whenScaled); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl.java deleted file mode 100644 index fbdb6a1398..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl> extends BaseFluent implements V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent{ - public V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl() { - } - public V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl(V1StatefulSetPersistentVolumeClaimRetentionPolicy instance) { - if (instance != null) { - this.withWhenDeleted(instance.getWhenDeleted()); - this.withWhenScaled(instance.getWhenScaled()); - } - } - private String whenDeleted; - private String whenScaled; - public String getWhenDeleted() { - return this.whenDeleted; - } - public A withWhenDeleted(String whenDeleted) { - this.whenDeleted=whenDeleted; return (A) this; - } - public Boolean hasWhenDeleted() { - return this.whenDeleted != null; - } - public String getWhenScaled() { - return this.whenScaled; - } - public A withWhenScaled(String whenScaled) { - this.whenScaled=whenScaled; return (A) this; - } - public Boolean hasWhenScaled() { - return this.whenScaled != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl that = (V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl) o; - if (!java.util.Objects.equals(whenDeleted, that.whenDeleted)) return false; - - if (!java.util.Objects.equals(whenScaled, that.whenScaled)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(whenDeleted, whenScaled, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (whenDeleted != null) { sb.append("whenDeleted:"); sb.append(whenDeleted + ","); } - if (whenScaled != null) { sb.append("whenScaled:"); sb.append(whenScaled); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecBuilder.java index 57b428aad4..64a602f3e6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecBuilder.java @@ -1,76 +1,41 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatefulSetSpecBuilder extends V1StatefulSetSpecFluentImpl implements VisitableBuilder{ +public class V1StatefulSetSpecBuilder extends V1StatefulSetSpecFluent implements VisitableBuilder{ public V1StatefulSetSpecBuilder() { - this(false); - } - public V1StatefulSetSpecBuilder(Boolean validationEnabled) { - this(new V1StatefulSetSpec(), validationEnabled); + this(new V1StatefulSetSpec()); } + public V1StatefulSetSpecBuilder(V1StatefulSetSpecFluent fluent) { - this(fluent, false); - } - public V1StatefulSetSpecBuilder(V1StatefulSetSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatefulSetSpec(), validationEnabled); + this(fluent, new V1StatefulSetSpec()); } + public V1StatefulSetSpecBuilder(V1StatefulSetSpecFluent fluent,V1StatefulSetSpec instance) { - this(fluent, instance, false); - } - public V1StatefulSetSpecBuilder(V1StatefulSetSpecFluent fluent,V1StatefulSetSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMinReadySeconds(instance.getMinReadySeconds()); - fluent.withOrdinals(instance.getOrdinals()); - fluent.withPersistentVolumeClaimRetentionPolicy(instance.getPersistentVolumeClaimRetentionPolicy()); - fluent.withPodManagementPolicy(instance.getPodManagementPolicy()); - fluent.withReplicas(instance.getReplicas()); - fluent.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); - fluent.withSelector(instance.getSelector()); - fluent.withServiceName(instance.getServiceName()); - fluent.withTemplate(instance.getTemplate()); - fluent.withUpdateStrategy(instance.getUpdateStrategy()); - fluent.withVolumeClaimTemplates(instance.getVolumeClaimTemplates()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatefulSetSpecBuilder(V1StatefulSetSpec instance) { - this(instance,false); - } - public V1StatefulSetSpecBuilder(V1StatefulSetSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withOrdinals(instance.getOrdinals()); - this.withPersistentVolumeClaimRetentionPolicy(instance.getPersistentVolumeClaimRetentionPolicy()); - this.withPodManagementPolicy(instance.getPodManagementPolicy()); - this.withReplicas(instance.getReplicas()); - this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); - this.withSelector(instance.getSelector()); - this.withServiceName(instance.getServiceName()); - this.withTemplate(instance.getTemplate()); - this.withUpdateStrategy(instance.getUpdateStrategy()); - this.withVolumeClaimTemplates(instance.getVolumeClaimTemplates()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatefulSetSpecFluent fluent; - Boolean validationEnabled; + public V1StatefulSetSpec build() { V1StatefulSetSpec buildable = new V1StatefulSetSpec(); buildable.setMinReadySeconds(fluent.getMinReadySeconds()); - buildable.setOrdinals(fluent.getOrdinals()); - buildable.setPersistentVolumeClaimRetentionPolicy(fluent.getPersistentVolumeClaimRetentionPolicy()); + buildable.setOrdinals(fluent.buildOrdinals()); + buildable.setPersistentVolumeClaimRetentionPolicy(fluent.buildPersistentVolumeClaimRetentionPolicy()); buildable.setPodManagementPolicy(fluent.getPodManagementPolicy()); buildable.setReplicas(fluent.getReplicas()); buildable.setRevisionHistoryLimit(fluent.getRevisionHistoryLimit()); - buildable.setSelector(fluent.getSelector()); + buildable.setSelector(fluent.buildSelector()); buildable.setServiceName(fluent.getServiceName()); - buildable.setTemplate(fluent.getTemplate()); - buildable.setUpdateStrategy(fluent.getUpdateStrategy()); - buildable.setVolumeClaimTemplates(fluent.getVolumeClaimTemplates()); + buildable.setTemplate(fluent.buildTemplate()); + buildable.setUpdateStrategy(fluent.buildUpdateStrategy()); + buildable.setVolumeClaimTemplates(fluent.buildVolumeClaimTemplates()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecFluent.java index 6182e3dd49..6ffbf921c4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecFluent.java @@ -1,172 +1,611 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.List; -import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.lang.Integer; import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1StatefulSetSpecFluent> extends Fluent{ - public Integer getMinReadySeconds(); - public A withMinReadySeconds(Integer minReadySeconds); - public Boolean hasMinReadySeconds(); - - /** - * This method has been deprecated, please use method buildOrdinals instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetOrdinals getOrdinals(); - public V1StatefulSetOrdinals buildOrdinals(); - public A withOrdinals(V1StatefulSetOrdinals ordinals); - public Boolean hasOrdinals(); - public V1StatefulSetSpecFluent.OrdinalsNested withNewOrdinals(); - public V1StatefulSetSpecFluent.OrdinalsNested withNewOrdinalsLike(V1StatefulSetOrdinals item); - public V1StatefulSetSpecFluent.OrdinalsNested editOrdinals(); - public V1StatefulSetSpecFluent.OrdinalsNested editOrNewOrdinals(); - public V1StatefulSetSpecFluent.OrdinalsNested editOrNewOrdinalsLike(V1StatefulSetOrdinals item); - - /** - * This method has been deprecated, please use method buildPersistentVolumeClaimRetentionPolicy instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetPersistentVolumeClaimRetentionPolicy getPersistentVolumeClaimRetentionPolicy(); - public V1StatefulSetPersistentVolumeClaimRetentionPolicy buildPersistentVolumeClaimRetentionPolicy(); - public A withPersistentVolumeClaimRetentionPolicy(V1StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy); - public Boolean hasPersistentVolumeClaimRetentionPolicy(); - public V1StatefulSetSpecFluent.PersistentVolumeClaimRetentionPolicyNested withNewPersistentVolumeClaimRetentionPolicy(); - public V1StatefulSetSpecFluent.PersistentVolumeClaimRetentionPolicyNested withNewPersistentVolumeClaimRetentionPolicyLike(V1StatefulSetPersistentVolumeClaimRetentionPolicy item); - public V1StatefulSetSpecFluent.PersistentVolumeClaimRetentionPolicyNested editPersistentVolumeClaimRetentionPolicy(); - public V1StatefulSetSpecFluent.PersistentVolumeClaimRetentionPolicyNested editOrNewPersistentVolumeClaimRetentionPolicy(); - public V1StatefulSetSpecFluent.PersistentVolumeClaimRetentionPolicyNested editOrNewPersistentVolumeClaimRetentionPolicyLike(V1StatefulSetPersistentVolumeClaimRetentionPolicy item); - public String getPodManagementPolicy(); - public A withPodManagementPolicy(String podManagementPolicy); - public Boolean hasPodManagementPolicy(); - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); - public Integer getRevisionHistoryLimit(); - public A withRevisionHistoryLimit(Integer revisionHistoryLimit); - public Boolean hasRevisionHistoryLimit(); - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector(); - public V1LabelSelector buildSelector(); - public A withSelector(V1LabelSelector selector); - public Boolean hasSelector(); - public V1StatefulSetSpecFluent.SelectorNested withNewSelector(); - public V1StatefulSetSpecFluent.SelectorNested withNewSelectorLike(V1LabelSelector item); - public V1StatefulSetSpecFluent.SelectorNested editSelector(); - public V1StatefulSetSpecFluent.SelectorNested editOrNewSelector(); - public V1StatefulSetSpecFluent.SelectorNested editOrNewSelectorLike(V1LabelSelector item); - public String getServiceName(); - public A withServiceName(String serviceName); - public Boolean hasServiceName(); - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate(); - public V1PodTemplateSpec buildTemplate(); - public A withTemplate(V1PodTemplateSpec template); - public Boolean hasTemplate(); - public V1StatefulSetSpecFluent.TemplateNested withNewTemplate(); - public V1StatefulSetSpecFluent.TemplateNested withNewTemplateLike(V1PodTemplateSpec item); - public V1StatefulSetSpecFluent.TemplateNested editTemplate(); - public V1StatefulSetSpecFluent.TemplateNested editOrNewTemplate(); - public V1StatefulSetSpecFluent.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item); - - /** - * This method has been deprecated, please use method buildUpdateStrategy instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetUpdateStrategy getUpdateStrategy(); - public V1StatefulSetUpdateStrategy buildUpdateStrategy(); - public A withUpdateStrategy(V1StatefulSetUpdateStrategy updateStrategy); - public Boolean hasUpdateStrategy(); - public V1StatefulSetSpecFluent.UpdateStrategyNested withNewUpdateStrategy(); - public V1StatefulSetSpecFluent.UpdateStrategyNested withNewUpdateStrategyLike(V1StatefulSetUpdateStrategy item); - public V1StatefulSetSpecFluent.UpdateStrategyNested editUpdateStrategy(); - public V1StatefulSetSpecFluent.UpdateStrategyNested editOrNewUpdateStrategy(); - public V1StatefulSetSpecFluent.UpdateStrategyNested editOrNewUpdateStrategyLike(V1StatefulSetUpdateStrategy item); - public A addToVolumeClaimTemplates(int index,V1PersistentVolumeClaim item); - public A setToVolumeClaimTemplates(int index,V1PersistentVolumeClaim item); - public A addToVolumeClaimTemplates(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items); - public A addAllToVolumeClaimTemplates(Collection items); - public A removeFromVolumeClaimTemplates(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items); - public A removeAllFromVolumeClaimTemplates(Collection items); - public A removeMatchingFromVolumeClaimTemplates(Predicate predicate); - - /** - * This method has been deprecated, please use method buildVolumeClaimTemplates instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeClaimTemplates(); - public List buildVolumeClaimTemplates(); - public V1PersistentVolumeClaim buildVolumeClaimTemplate(int index); - public V1PersistentVolumeClaim buildFirstVolumeClaimTemplate(); - public V1PersistentVolumeClaim buildLastVolumeClaimTemplate(); - public V1PersistentVolumeClaim buildMatchingVolumeClaimTemplate(Predicate predicate); - public Boolean hasMatchingVolumeClaimTemplate(Predicate predicate); - public A withVolumeClaimTemplates(List volumeClaimTemplates); - public A withVolumeClaimTemplates(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... volumeClaimTemplates); - public Boolean hasVolumeClaimTemplates(); - public V1StatefulSetSpecFluent.VolumeClaimTemplatesNested addNewVolumeClaimTemplate(); - public V1StatefulSetSpecFluent.VolumeClaimTemplatesNested addNewVolumeClaimTemplateLike(V1PersistentVolumeClaim item); - public V1StatefulSetSpecFluent.VolumeClaimTemplatesNested setNewVolumeClaimTemplateLike(int index,V1PersistentVolumeClaim item); - public V1StatefulSetSpecFluent.VolumeClaimTemplatesNested editVolumeClaimTemplate(int index); - public V1StatefulSetSpecFluent.VolumeClaimTemplatesNested editFirstVolumeClaimTemplate(); - public V1StatefulSetSpecFluent.VolumeClaimTemplatesNested editLastVolumeClaimTemplate(); - public V1StatefulSetSpecFluent.VolumeClaimTemplatesNested editMatchingVolumeClaimTemplate(Predicate predicate); - public interface OrdinalsNested extends Nested,V1StatefulSetOrdinalsFluent>{ - public N and(); - public N endOrdinals(); - - } - public interface PersistentVolumeClaimRetentionPolicyNested extends Nested,V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent>{ - public N and(); - public N endPersistentVolumeClaimRetentionPolicy(); - - } - public interface SelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endSelector(); - - } - public interface TemplateNested extends Nested,V1PodTemplateSpecFluent>{ - public N and(); - public N endTemplate(); - - } - public interface UpdateStrategyNested extends Nested,V1StatefulSetUpdateStrategyFluent>{ - public N and(); - public N endUpdateStrategy(); - - } - public interface VolumeClaimTemplatesNested extends Nested,V1PersistentVolumeClaimFluent>{ - public N and(); - public N endVolumeClaimTemplate(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatefulSetSpecFluent> extends BaseFluent{ + public V1StatefulSetSpecFluent() { + } + + public V1StatefulSetSpecFluent(V1StatefulSetSpec instance) { + this.copyInstance(instance); + } + private Integer minReadySeconds; + private V1StatefulSetOrdinalsBuilder ordinals; + private V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder persistentVolumeClaimRetentionPolicy; + private String podManagementPolicy; + private Integer replicas; + private Integer revisionHistoryLimit; + private V1LabelSelectorBuilder selector; + private String serviceName; + private V1PodTemplateSpecBuilder template; + private V1StatefulSetUpdateStrategyBuilder updateStrategy; + private ArrayList volumeClaimTemplates; + + protected void copyInstance(V1StatefulSetSpec instance) { + instance = (instance != null ? instance : new V1StatefulSetSpec()); + if (instance != null) { + this.withMinReadySeconds(instance.getMinReadySeconds()); + this.withOrdinals(instance.getOrdinals()); + this.withPersistentVolumeClaimRetentionPolicy(instance.getPersistentVolumeClaimRetentionPolicy()); + this.withPodManagementPolicy(instance.getPodManagementPolicy()); + this.withReplicas(instance.getReplicas()); + this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); + this.withSelector(instance.getSelector()); + this.withServiceName(instance.getServiceName()); + this.withTemplate(instance.getTemplate()); + this.withUpdateStrategy(instance.getUpdateStrategy()); + this.withVolumeClaimTemplates(instance.getVolumeClaimTemplates()); + } + } + + public Integer getMinReadySeconds() { + return this.minReadySeconds; + } + + public A withMinReadySeconds(Integer minReadySeconds) { + this.minReadySeconds = minReadySeconds; + return (A) this; + } + + public boolean hasMinReadySeconds() { + return this.minReadySeconds != null; + } + + public V1StatefulSetOrdinals buildOrdinals() { + return this.ordinals != null ? this.ordinals.build() : null; + } + + public A withOrdinals(V1StatefulSetOrdinals ordinals) { + this._visitables.remove("ordinals"); + if (ordinals != null) { + this.ordinals = new V1StatefulSetOrdinalsBuilder(ordinals); + this._visitables.get("ordinals").add(this.ordinals); + } else { + this.ordinals = null; + this._visitables.get("ordinals").remove(this.ordinals); + } + return (A) this; + } + + public boolean hasOrdinals() { + return this.ordinals != null; + } + + public OrdinalsNested withNewOrdinals() { + return new OrdinalsNested(null); + } + + public OrdinalsNested withNewOrdinalsLike(V1StatefulSetOrdinals item) { + return new OrdinalsNested(item); + } + + public OrdinalsNested editOrdinals() { + return withNewOrdinalsLike(java.util.Optional.ofNullable(buildOrdinals()).orElse(null)); + } + + public OrdinalsNested editOrNewOrdinals() { + return withNewOrdinalsLike(java.util.Optional.ofNullable(buildOrdinals()).orElse(new V1StatefulSetOrdinalsBuilder().build())); + } + + public OrdinalsNested editOrNewOrdinalsLike(V1StatefulSetOrdinals item) { + return withNewOrdinalsLike(java.util.Optional.ofNullable(buildOrdinals()).orElse(item)); + } + + public V1StatefulSetPersistentVolumeClaimRetentionPolicy buildPersistentVolumeClaimRetentionPolicy() { + return this.persistentVolumeClaimRetentionPolicy != null ? this.persistentVolumeClaimRetentionPolicy.build() : null; + } + + public A withPersistentVolumeClaimRetentionPolicy(V1StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy) { + this._visitables.remove("persistentVolumeClaimRetentionPolicy"); + if (persistentVolumeClaimRetentionPolicy != null) { + this.persistentVolumeClaimRetentionPolicy = new V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(persistentVolumeClaimRetentionPolicy); + this._visitables.get("persistentVolumeClaimRetentionPolicy").add(this.persistentVolumeClaimRetentionPolicy); + } else { + this.persistentVolumeClaimRetentionPolicy = null; + this._visitables.get("persistentVolumeClaimRetentionPolicy").remove(this.persistentVolumeClaimRetentionPolicy); + } + return (A) this; + } + + public boolean hasPersistentVolumeClaimRetentionPolicy() { + return this.persistentVolumeClaimRetentionPolicy != null; + } + + public PersistentVolumeClaimRetentionPolicyNested withNewPersistentVolumeClaimRetentionPolicy() { + return new PersistentVolumeClaimRetentionPolicyNested(null); + } + + public PersistentVolumeClaimRetentionPolicyNested withNewPersistentVolumeClaimRetentionPolicyLike(V1StatefulSetPersistentVolumeClaimRetentionPolicy item) { + return new PersistentVolumeClaimRetentionPolicyNested(item); + } + + public PersistentVolumeClaimRetentionPolicyNested editPersistentVolumeClaimRetentionPolicy() { + return withNewPersistentVolumeClaimRetentionPolicyLike(java.util.Optional.ofNullable(buildPersistentVolumeClaimRetentionPolicy()).orElse(null)); + } + + public PersistentVolumeClaimRetentionPolicyNested editOrNewPersistentVolumeClaimRetentionPolicy() { + return withNewPersistentVolumeClaimRetentionPolicyLike(java.util.Optional.ofNullable(buildPersistentVolumeClaimRetentionPolicy()).orElse(new V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder().build())); + } + + public PersistentVolumeClaimRetentionPolicyNested editOrNewPersistentVolumeClaimRetentionPolicyLike(V1StatefulSetPersistentVolumeClaimRetentionPolicy item) { + return withNewPersistentVolumeClaimRetentionPolicyLike(java.util.Optional.ofNullable(buildPersistentVolumeClaimRetentionPolicy()).orElse(item)); + } + + public String getPodManagementPolicy() { + return this.podManagementPolicy; + } + + public A withPodManagementPolicy(String podManagementPolicy) { + this.podManagementPolicy = podManagementPolicy; + return (A) this; + } + + public boolean hasPodManagementPolicy() { + return this.podManagementPolicy != null; + } + + public Integer getReplicas() { + return this.replicas; + } + + public A withReplicas(Integer replicas) { + this.replicas = replicas; + return (A) this; + } + + public boolean hasReplicas() { + return this.replicas != null; + } + + public Integer getRevisionHistoryLimit() { + return this.revisionHistoryLimit; + } + + public A withRevisionHistoryLimit(Integer revisionHistoryLimit) { + this.revisionHistoryLimit = revisionHistoryLimit; + return (A) this; + } + + public boolean hasRevisionHistoryLimit() { + return this.revisionHistoryLimit != null; + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); + } + + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); + } + + public String getServiceName() { + return this.serviceName; + } + + public A withServiceName(String serviceName) { + this.serviceName = serviceName; + return (A) this; + } + + public boolean hasServiceName() { + return this.serviceName != null; + } + + public V1PodTemplateSpec buildTemplate() { + return this.template != null ? this.template.build() : null; + } + + public A withTemplate(V1PodTemplateSpec template) { + this._visitables.remove("template"); + if (template != null) { + this.template = new V1PodTemplateSpecBuilder(template); + this._visitables.get("template").add(this.template); + } else { + this.template = null; + this._visitables.get("template").remove(this.template); + } + return (A) this; + } + + public boolean hasTemplate() { + return this.template != null; + } + + public TemplateNested withNewTemplate() { + return new TemplateNested(null); + } + + public TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { + return new TemplateNested(item); + } + + public TemplateNested editTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(null)); + } + + public TemplateNested editOrNewTemplate() { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(new V1PodTemplateSpecBuilder().build())); + } + + public TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { + return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(item)); + } + + public V1StatefulSetUpdateStrategy buildUpdateStrategy() { + return this.updateStrategy != null ? this.updateStrategy.build() : null; + } + + public A withUpdateStrategy(V1StatefulSetUpdateStrategy updateStrategy) { + this._visitables.remove("updateStrategy"); + if (updateStrategy != null) { + this.updateStrategy = new V1StatefulSetUpdateStrategyBuilder(updateStrategy); + this._visitables.get("updateStrategy").add(this.updateStrategy); + } else { + this.updateStrategy = null; + this._visitables.get("updateStrategy").remove(this.updateStrategy); + } + return (A) this; + } + + public boolean hasUpdateStrategy() { + return this.updateStrategy != null; + } + + public UpdateStrategyNested withNewUpdateStrategy() { + return new UpdateStrategyNested(null); + } + + public UpdateStrategyNested withNewUpdateStrategyLike(V1StatefulSetUpdateStrategy item) { + return new UpdateStrategyNested(item); + } + + public UpdateStrategyNested editUpdateStrategy() { + return withNewUpdateStrategyLike(java.util.Optional.ofNullable(buildUpdateStrategy()).orElse(null)); + } + + public UpdateStrategyNested editOrNewUpdateStrategy() { + return withNewUpdateStrategyLike(java.util.Optional.ofNullable(buildUpdateStrategy()).orElse(new V1StatefulSetUpdateStrategyBuilder().build())); + } + + public UpdateStrategyNested editOrNewUpdateStrategyLike(V1StatefulSetUpdateStrategy item) { + return withNewUpdateStrategyLike(java.util.Optional.ofNullable(buildUpdateStrategy()).orElse(item)); + } + + public A addToVolumeClaimTemplates(int index,V1PersistentVolumeClaim item) { + if (this.volumeClaimTemplates == null) {this.volumeClaimTemplates = new ArrayList();} + V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item); + if (index < 0 || index >= volumeClaimTemplates.size()) { _visitables.get("volumeClaimTemplates").add(builder); volumeClaimTemplates.add(builder); } else { _visitables.get("volumeClaimTemplates").add(index, builder); volumeClaimTemplates.add(index, builder);} + return (A)this; + } + + public A setToVolumeClaimTemplates(int index,V1PersistentVolumeClaim item) { + if (this.volumeClaimTemplates == null) {this.volumeClaimTemplates = new ArrayList();} + V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item); + if (index < 0 || index >= volumeClaimTemplates.size()) { _visitables.get("volumeClaimTemplates").add(builder); volumeClaimTemplates.add(builder); } else { _visitables.get("volumeClaimTemplates").set(index, builder); volumeClaimTemplates.set(index, builder);} + return (A)this; + } + + public A addToVolumeClaimTemplates(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { + if (this.volumeClaimTemplates == null) {this.volumeClaimTemplates = new ArrayList();} + for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("volumeClaimTemplates").add(builder);this.volumeClaimTemplates.add(builder);} return (A)this; + } + + public A addAllToVolumeClaimTemplates(Collection items) { + if (this.volumeClaimTemplates == null) {this.volumeClaimTemplates = new ArrayList();} + for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("volumeClaimTemplates").add(builder);this.volumeClaimTemplates.add(builder);} return (A)this; + } + + public A removeFromVolumeClaimTemplates(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { + if (this.volumeClaimTemplates == null) return (A)this; + for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("volumeClaimTemplates").remove(builder); this.volumeClaimTemplates.remove(builder);} return (A)this; + } + + public A removeAllFromVolumeClaimTemplates(Collection items) { + if (this.volumeClaimTemplates == null) return (A)this; + for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("volumeClaimTemplates").remove(builder); this.volumeClaimTemplates.remove(builder);} return (A)this; + } + + public A removeMatchingFromVolumeClaimTemplates(Predicate predicate) { + if (volumeClaimTemplates == null) return (A) this; + final Iterator each = volumeClaimTemplates.iterator(); + final List visitables = _visitables.get("volumeClaimTemplates"); + while (each.hasNext()) { + V1PersistentVolumeClaimBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVolumeClaimTemplates() { + return this.volumeClaimTemplates != null ? build(volumeClaimTemplates) : null; + } + + public V1PersistentVolumeClaim buildVolumeClaimTemplate(int index) { + return this.volumeClaimTemplates.get(index).build(); + } + + public V1PersistentVolumeClaim buildFirstVolumeClaimTemplate() { + return this.volumeClaimTemplates.get(0).build(); + } + + public V1PersistentVolumeClaim buildLastVolumeClaimTemplate() { + return this.volumeClaimTemplates.get(volumeClaimTemplates.size() - 1).build(); + } + + public V1PersistentVolumeClaim buildMatchingVolumeClaimTemplate(Predicate predicate) { + for (V1PersistentVolumeClaimBuilder item : volumeClaimTemplates) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVolumeClaimTemplate(Predicate predicate) { + for (V1PersistentVolumeClaimBuilder item : volumeClaimTemplates) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVolumeClaimTemplates(List volumeClaimTemplates) { + if (this.volumeClaimTemplates != null) { + this._visitables.get("volumeClaimTemplates").clear(); + } + if (volumeClaimTemplates != null) { + this.volumeClaimTemplates = new ArrayList(); + for (V1PersistentVolumeClaim item : volumeClaimTemplates) { + this.addToVolumeClaimTemplates(item); + } + } else { + this.volumeClaimTemplates = null; + } + return (A) this; + } + + public A withVolumeClaimTemplates(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... volumeClaimTemplates) { + if (this.volumeClaimTemplates != null) { + this.volumeClaimTemplates.clear(); + _visitables.remove("volumeClaimTemplates"); + } + if (volumeClaimTemplates != null) { + for (V1PersistentVolumeClaim item : volumeClaimTemplates) { + this.addToVolumeClaimTemplates(item); + } + } + return (A) this; + } + + public boolean hasVolumeClaimTemplates() { + return this.volumeClaimTemplates != null && !this.volumeClaimTemplates.isEmpty(); + } + + public VolumeClaimTemplatesNested addNewVolumeClaimTemplate() { + return new VolumeClaimTemplatesNested(-1, null); + } + + public VolumeClaimTemplatesNested addNewVolumeClaimTemplateLike(V1PersistentVolumeClaim item) { + return new VolumeClaimTemplatesNested(-1, item); + } + + public VolumeClaimTemplatesNested setNewVolumeClaimTemplateLike(int index,V1PersistentVolumeClaim item) { + return new VolumeClaimTemplatesNested(index, item); + } + + public VolumeClaimTemplatesNested editVolumeClaimTemplate(int index) { + if (volumeClaimTemplates.size() <= index) throw new RuntimeException("Can't edit volumeClaimTemplates. Index exceeds size."); + return setNewVolumeClaimTemplateLike(index, buildVolumeClaimTemplate(index)); + } + + public VolumeClaimTemplatesNested editFirstVolumeClaimTemplate() { + if (volumeClaimTemplates.size() == 0) throw new RuntimeException("Can't edit first volumeClaimTemplates. The list is empty."); + return setNewVolumeClaimTemplateLike(0, buildVolumeClaimTemplate(0)); + } + + public VolumeClaimTemplatesNested editLastVolumeClaimTemplate() { + int index = volumeClaimTemplates.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last volumeClaimTemplates. The list is empty."); + return setNewVolumeClaimTemplateLike(index, buildVolumeClaimTemplate(index)); + } + + public VolumeClaimTemplatesNested editMatchingVolumeClaimTemplate(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1StatefulSetOrdinalsFluent> implements Nested{ + OrdinalsNested(V1StatefulSetOrdinals item) { + this.builder = new V1StatefulSetOrdinalsBuilder(this, item); + } + V1StatefulSetOrdinalsBuilder builder; + + public N and() { + return (N) V1StatefulSetSpecFluent.this.withOrdinals(builder.build()); + } + + public N endOrdinals() { + return and(); + } + + + } + public class PersistentVolumeClaimRetentionPolicyNested extends V1StatefulSetPersistentVolumeClaimRetentionPolicyFluent> implements Nested{ + PersistentVolumeClaimRetentionPolicyNested(V1StatefulSetPersistentVolumeClaimRetentionPolicy item) { + this.builder = new V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(this, item); + } + V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder builder; + + public N and() { + return (N) V1StatefulSetSpecFluent.this.withPersistentVolumeClaimRetentionPolicy(builder.build()); + } + + public N endPersistentVolumeClaimRetentionPolicy() { + return and(); + } + + + } + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1StatefulSetSpecFluent.this.withSelector(builder.build()); + } + + public N endSelector() { + return and(); + } + + + } + public class TemplateNested extends V1PodTemplateSpecFluent> implements Nested{ + TemplateNested(V1PodTemplateSpec item) { + this.builder = new V1PodTemplateSpecBuilder(this, item); + } + V1PodTemplateSpecBuilder builder; + + public N and() { + return (N) V1StatefulSetSpecFluent.this.withTemplate(builder.build()); + } + public N endTemplate() { + return and(); + } + + + } + public class UpdateStrategyNested extends V1StatefulSetUpdateStrategyFluent> implements Nested{ + UpdateStrategyNested(V1StatefulSetUpdateStrategy item) { + this.builder = new V1StatefulSetUpdateStrategyBuilder(this, item); + } + V1StatefulSetUpdateStrategyBuilder builder; + + public N and() { + return (N) V1StatefulSetSpecFluent.this.withUpdateStrategy(builder.build()); + } + + public N endUpdateStrategy() { + return and(); + } + + } + public class VolumeClaimTemplatesNested extends V1PersistentVolumeClaimFluent> implements Nested{ + VolumeClaimTemplatesNested(int index,V1PersistentVolumeClaim item) { + this.index = index; + this.builder = new V1PersistentVolumeClaimBuilder(this, item); + } + V1PersistentVolumeClaimBuilder builder; + int index; + + public N and() { + return (N) V1StatefulSetSpecFluent.this.setToVolumeClaimTemplates(index,builder.build()); + } + + public N endVolumeClaimTemplate() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecFluentImpl.java deleted file mode 100644 index 8d2d7ea379..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetSpecFluentImpl.java +++ /dev/null @@ -1,522 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatefulSetSpecFluentImpl> extends BaseFluent implements V1StatefulSetSpecFluent{ - public V1StatefulSetSpecFluentImpl() { - } - public V1StatefulSetSpecFluentImpl(V1StatefulSetSpec instance) { - if (instance != null) { - this.withMinReadySeconds(instance.getMinReadySeconds()); - this.withOrdinals(instance.getOrdinals()); - this.withPersistentVolumeClaimRetentionPolicy(instance.getPersistentVolumeClaimRetentionPolicy()); - this.withPodManagementPolicy(instance.getPodManagementPolicy()); - this.withReplicas(instance.getReplicas()); - this.withRevisionHistoryLimit(instance.getRevisionHistoryLimit()); - this.withSelector(instance.getSelector()); - this.withServiceName(instance.getServiceName()); - this.withTemplate(instance.getTemplate()); - this.withUpdateStrategy(instance.getUpdateStrategy()); - this.withVolumeClaimTemplates(instance.getVolumeClaimTemplates()); - } - } - private Integer minReadySeconds; - private V1StatefulSetOrdinalsBuilder ordinals; - private V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder persistentVolumeClaimRetentionPolicy; - private String podManagementPolicy; - private Integer replicas; - private Integer revisionHistoryLimit; - private V1LabelSelectorBuilder selector; - private String serviceName; - private V1PodTemplateSpecBuilder template; - private V1StatefulSetUpdateStrategyBuilder updateStrategy; - private ArrayList volumeClaimTemplates; - public Integer getMinReadySeconds() { - return this.minReadySeconds; - } - public A withMinReadySeconds(Integer minReadySeconds) { - this.minReadySeconds=minReadySeconds; return (A) this; - } - public Boolean hasMinReadySeconds() { - return this.minReadySeconds != null; - } - - /** - * This method has been deprecated, please use method buildOrdinals instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetOrdinals getOrdinals() { - return this.ordinals!=null ?this.ordinals.build():null; - } - public V1StatefulSetOrdinals buildOrdinals() { - return this.ordinals!=null ?this.ordinals.build():null; - } - public A withOrdinals(V1StatefulSetOrdinals ordinals) { - _visitables.get("ordinals").remove(this.ordinals); - if (ordinals!=null){ this.ordinals= new V1StatefulSetOrdinalsBuilder(ordinals); _visitables.get("ordinals").add(this.ordinals);} else { this.ordinals = null; _visitables.get("ordinals").remove(this.ordinals); } return (A) this; - } - public Boolean hasOrdinals() { - return this.ordinals != null; - } - public V1StatefulSetSpecFluentImpl.OrdinalsNested withNewOrdinals() { - return new V1StatefulSetSpecFluentImpl.OrdinalsNestedImpl(); - } - public V1StatefulSetSpecFluentImpl.OrdinalsNested withNewOrdinalsLike(V1StatefulSetOrdinals item) { - return new V1StatefulSetSpecFluentImpl.OrdinalsNestedImpl(item); - } - public V1StatefulSetSpecFluentImpl.OrdinalsNested editOrdinals() { - return withNewOrdinalsLike(getOrdinals()); - } - public V1StatefulSetSpecFluentImpl.OrdinalsNested editOrNewOrdinals() { - return withNewOrdinalsLike(getOrdinals() != null ? getOrdinals(): new V1StatefulSetOrdinalsBuilder().build()); - } - public V1StatefulSetSpecFluentImpl.OrdinalsNested editOrNewOrdinalsLike(V1StatefulSetOrdinals item) { - return withNewOrdinalsLike(getOrdinals() != null ? getOrdinals(): item); - } - - /** - * This method has been deprecated, please use method buildPersistentVolumeClaimRetentionPolicy instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetPersistentVolumeClaimRetentionPolicy getPersistentVolumeClaimRetentionPolicy() { - return this.persistentVolumeClaimRetentionPolicy!=null ?this.persistentVolumeClaimRetentionPolicy.build():null; - } - public V1StatefulSetPersistentVolumeClaimRetentionPolicy buildPersistentVolumeClaimRetentionPolicy() { - return this.persistentVolumeClaimRetentionPolicy!=null ?this.persistentVolumeClaimRetentionPolicy.build():null; - } - public A withPersistentVolumeClaimRetentionPolicy(V1StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy) { - _visitables.get("persistentVolumeClaimRetentionPolicy").remove(this.persistentVolumeClaimRetentionPolicy); - if (persistentVolumeClaimRetentionPolicy!=null){ this.persistentVolumeClaimRetentionPolicy= new V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(persistentVolumeClaimRetentionPolicy); _visitables.get("persistentVolumeClaimRetentionPolicy").add(this.persistentVolumeClaimRetentionPolicy);} else { this.persistentVolumeClaimRetentionPolicy = null; _visitables.get("persistentVolumeClaimRetentionPolicy").remove(this.persistentVolumeClaimRetentionPolicy); } return (A) this; - } - public Boolean hasPersistentVolumeClaimRetentionPolicy() { - return this.persistentVolumeClaimRetentionPolicy != null; - } - public V1StatefulSetSpecFluentImpl.PersistentVolumeClaimRetentionPolicyNested withNewPersistentVolumeClaimRetentionPolicy() { - return new V1StatefulSetSpecFluentImpl.PersistentVolumeClaimRetentionPolicyNestedImpl(); - } - public V1StatefulSetSpecFluentImpl.PersistentVolumeClaimRetentionPolicyNested withNewPersistentVolumeClaimRetentionPolicyLike(V1StatefulSetPersistentVolumeClaimRetentionPolicy item) { - return new V1StatefulSetSpecFluentImpl.PersistentVolumeClaimRetentionPolicyNestedImpl(item); - } - public V1StatefulSetSpecFluentImpl.PersistentVolumeClaimRetentionPolicyNested editPersistentVolumeClaimRetentionPolicy() { - return withNewPersistentVolumeClaimRetentionPolicyLike(getPersistentVolumeClaimRetentionPolicy()); - } - public V1StatefulSetSpecFluentImpl.PersistentVolumeClaimRetentionPolicyNested editOrNewPersistentVolumeClaimRetentionPolicy() { - return withNewPersistentVolumeClaimRetentionPolicyLike(getPersistentVolumeClaimRetentionPolicy() != null ? getPersistentVolumeClaimRetentionPolicy(): new V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder().build()); - } - public V1StatefulSetSpecFluentImpl.PersistentVolumeClaimRetentionPolicyNested editOrNewPersistentVolumeClaimRetentionPolicyLike(V1StatefulSetPersistentVolumeClaimRetentionPolicy item) { - return withNewPersistentVolumeClaimRetentionPolicyLike(getPersistentVolumeClaimRetentionPolicy() != null ? getPersistentVolumeClaimRetentionPolicy(): item); - } - public String getPodManagementPolicy() { - return this.podManagementPolicy; - } - public A withPodManagementPolicy(String podManagementPolicy) { - this.podManagementPolicy=podManagementPolicy; return (A) this; - } - public Boolean hasPodManagementPolicy() { - return this.podManagementPolicy != null; - } - public Integer getReplicas() { - return this.replicas; - } - public A withReplicas(Integer replicas) { - this.replicas=replicas; return (A) this; - } - public Boolean hasReplicas() { - return this.replicas != null; - } - public Integer getRevisionHistoryLimit() { - return this.revisionHistoryLimit; - } - public A withRevisionHistoryLimit(Integer revisionHistoryLimit) { - this.revisionHistoryLimit=revisionHistoryLimit; return (A) this; - } - public Boolean hasRevisionHistoryLimit() { - return this.revisionHistoryLimit != null; - } - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector() { - return this.selector!=null ?this.selector.build():null; - } - public V1LabelSelector buildSelector() { - return this.selector!=null ?this.selector.build():null; - } - public A withSelector(V1LabelSelector selector) { - _visitables.get("selector").remove(this.selector); - if (selector!=null){ this.selector= new V1LabelSelectorBuilder(selector); _visitables.get("selector").add(this.selector);} else { this.selector = null; _visitables.get("selector").remove(this.selector); } return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public V1StatefulSetSpecFluentImpl.SelectorNested withNewSelector() { - return new V1StatefulSetSpecFluentImpl.SelectorNestedImpl(); - } - public V1StatefulSetSpecFluentImpl.SelectorNested withNewSelectorLike(V1LabelSelector item) { - return new V1StatefulSetSpecFluentImpl.SelectorNestedImpl(item); - } - public V1StatefulSetSpecFluentImpl.SelectorNested editSelector() { - return withNewSelectorLike(getSelector()); - } - public V1StatefulSetSpecFluentImpl.SelectorNested editOrNewSelector() { - return withNewSelectorLike(getSelector() != null ? getSelector(): new V1LabelSelectorBuilder().build()); - } - public V1StatefulSetSpecFluentImpl.SelectorNested editOrNewSelectorLike(V1LabelSelector item) { - return withNewSelectorLike(getSelector() != null ? getSelector(): item); - } - public String getServiceName() { - return this.serviceName; - } - public A withServiceName(String serviceName) { - this.serviceName=serviceName; return (A) this; - } - public Boolean hasServiceName() { - return this.serviceName != null; - } - - /** - * This method has been deprecated, please use method buildTemplate instead. - * @return The buildable object. - */ - @Deprecated - public V1PodTemplateSpec getTemplate() { - return this.template!=null ?this.template.build():null; - } - public V1PodTemplateSpec buildTemplate() { - return this.template!=null ?this.template.build():null; - } - public A withTemplate(V1PodTemplateSpec template) { - _visitables.get("template").remove(this.template); - if (template!=null){ this.template= new V1PodTemplateSpecBuilder(template); _visitables.get("template").add(this.template);} else { this.template = null; _visitables.get("template").remove(this.template); } return (A) this; - } - public Boolean hasTemplate() { - return this.template != null; - } - public V1StatefulSetSpecFluentImpl.TemplateNested withNewTemplate() { - return new V1StatefulSetSpecFluentImpl.TemplateNestedImpl(); - } - public V1StatefulSetSpecFluentImpl.TemplateNested withNewTemplateLike(V1PodTemplateSpec item) { - return new V1StatefulSetSpecFluentImpl.TemplateNestedImpl(item); - } - public V1StatefulSetSpecFluentImpl.TemplateNested editTemplate() { - return withNewTemplateLike(getTemplate()); - } - public V1StatefulSetSpecFluentImpl.TemplateNested editOrNewTemplate() { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): new V1PodTemplateSpecBuilder().build()); - } - public V1StatefulSetSpecFluentImpl.TemplateNested editOrNewTemplateLike(V1PodTemplateSpec item) { - return withNewTemplateLike(getTemplate() != null ? getTemplate(): item); - } - - /** - * This method has been deprecated, please use method buildUpdateStrategy instead. - * @return The buildable object. - */ - @Deprecated - public V1StatefulSetUpdateStrategy getUpdateStrategy() { - return this.updateStrategy!=null ?this.updateStrategy.build():null; - } - public V1StatefulSetUpdateStrategy buildUpdateStrategy() { - return this.updateStrategy!=null ?this.updateStrategy.build():null; - } - public A withUpdateStrategy(V1StatefulSetUpdateStrategy updateStrategy) { - _visitables.get("updateStrategy").remove(this.updateStrategy); - if (updateStrategy!=null){ this.updateStrategy= new V1StatefulSetUpdateStrategyBuilder(updateStrategy); _visitables.get("updateStrategy").add(this.updateStrategy);} else { this.updateStrategy = null; _visitables.get("updateStrategy").remove(this.updateStrategy); } return (A) this; - } - public Boolean hasUpdateStrategy() { - return this.updateStrategy != null; - } - public V1StatefulSetSpecFluentImpl.UpdateStrategyNested withNewUpdateStrategy() { - return new V1StatefulSetSpecFluentImpl.UpdateStrategyNestedImpl(); - } - public V1StatefulSetSpecFluentImpl.UpdateStrategyNested withNewUpdateStrategyLike(V1StatefulSetUpdateStrategy item) { - return new V1StatefulSetSpecFluentImpl.UpdateStrategyNestedImpl(item); - } - public V1StatefulSetSpecFluentImpl.UpdateStrategyNested editUpdateStrategy() { - return withNewUpdateStrategyLike(getUpdateStrategy()); - } - public V1StatefulSetSpecFluentImpl.UpdateStrategyNested editOrNewUpdateStrategy() { - return withNewUpdateStrategyLike(getUpdateStrategy() != null ? getUpdateStrategy(): new V1StatefulSetUpdateStrategyBuilder().build()); - } - public V1StatefulSetSpecFluentImpl.UpdateStrategyNested editOrNewUpdateStrategyLike(V1StatefulSetUpdateStrategy item) { - return withNewUpdateStrategyLike(getUpdateStrategy() != null ? getUpdateStrategy(): item); - } - public A addToVolumeClaimTemplates(int index,V1PersistentVolumeClaim item) { - if (this.volumeClaimTemplates == null) {this.volumeClaimTemplates = new ArrayList();} - V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item); - if (index < 0 || index >= volumeClaimTemplates.size()) { _visitables.get("volumeClaimTemplates").add(builder); volumeClaimTemplates.add(builder); } else { _visitables.get("volumeClaimTemplates").add(index, builder); volumeClaimTemplates.add(index, builder);} - return (A)this; - } - public A setToVolumeClaimTemplates(int index,V1PersistentVolumeClaim item) { - if (this.volumeClaimTemplates == null) {this.volumeClaimTemplates = new ArrayList();} - V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item); - if (index < 0 || index >= volumeClaimTemplates.size()) { _visitables.get("volumeClaimTemplates").add(builder); volumeClaimTemplates.add(builder); } else { _visitables.get("volumeClaimTemplates").set(index, builder); volumeClaimTemplates.set(index, builder);} - return (A)this; - } - public A addToVolumeClaimTemplates(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { - if (this.volumeClaimTemplates == null) {this.volumeClaimTemplates = new ArrayList();} - for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("volumeClaimTemplates").add(builder);this.volumeClaimTemplates.add(builder);} return (A)this; - } - public A addAllToVolumeClaimTemplates(Collection items) { - if (this.volumeClaimTemplates == null) {this.volumeClaimTemplates = new ArrayList();} - for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("volumeClaimTemplates").add(builder);this.volumeClaimTemplates.add(builder);} return (A)this; - } - public A removeFromVolumeClaimTemplates(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... items) { - for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("volumeClaimTemplates").remove(builder);if (this.volumeClaimTemplates != null) {this.volumeClaimTemplates.remove(builder);}} return (A)this; - } - public A removeAllFromVolumeClaimTemplates(Collection items) { - for (V1PersistentVolumeClaim item : items) {V1PersistentVolumeClaimBuilder builder = new V1PersistentVolumeClaimBuilder(item);_visitables.get("volumeClaimTemplates").remove(builder);if (this.volumeClaimTemplates != null) {this.volumeClaimTemplates.remove(builder);}} return (A)this; - } - public A removeMatchingFromVolumeClaimTemplates(Predicate predicate) { - if (volumeClaimTemplates == null) return (A) this; - final Iterator each = volumeClaimTemplates.iterator(); - final List visitables = _visitables.get("volumeClaimTemplates"); - while (each.hasNext()) { - V1PersistentVolumeClaimBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildVolumeClaimTemplates instead. - * @return The buildable object. - */ - @Deprecated - public List getVolumeClaimTemplates() { - return volumeClaimTemplates != null ? build(volumeClaimTemplates) : null; - } - public List buildVolumeClaimTemplates() { - return volumeClaimTemplates != null ? build(volumeClaimTemplates) : null; - } - public V1PersistentVolumeClaim buildVolumeClaimTemplate(int index) { - return this.volumeClaimTemplates.get(index).build(); - } - public V1PersistentVolumeClaim buildFirstVolumeClaimTemplate() { - return this.volumeClaimTemplates.get(0).build(); - } - public V1PersistentVolumeClaim buildLastVolumeClaimTemplate() { - return this.volumeClaimTemplates.get(volumeClaimTemplates.size() - 1).build(); - } - public V1PersistentVolumeClaim buildMatchingVolumeClaimTemplate(Predicate predicate) { - for (V1PersistentVolumeClaimBuilder item: volumeClaimTemplates) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingVolumeClaimTemplate(Predicate predicate) { - for (V1PersistentVolumeClaimBuilder item: volumeClaimTemplates) { if(predicate.test(item)){ return true;} } return false; - } - public A withVolumeClaimTemplates(List volumeClaimTemplates) { - if (this.volumeClaimTemplates != null) { _visitables.get("volumeClaimTemplates").clear();} - if (volumeClaimTemplates != null) {this.volumeClaimTemplates = new ArrayList(); for (V1PersistentVolumeClaim item : volumeClaimTemplates){this.addToVolumeClaimTemplates(item);}} else { this.volumeClaimTemplates = null;} return (A) this; - } - public A withVolumeClaimTemplates(io.kubernetes.client.openapi.models.V1PersistentVolumeClaim... volumeClaimTemplates) { - if (this.volumeClaimTemplates != null) {this.volumeClaimTemplates.clear(); _visitables.remove("volumeClaimTemplates"); } - if (volumeClaimTemplates != null) {for (V1PersistentVolumeClaim item :volumeClaimTemplates){ this.addToVolumeClaimTemplates(item);}} return (A) this; - } - public Boolean hasVolumeClaimTemplates() { - return volumeClaimTemplates != null && !volumeClaimTemplates.isEmpty(); - } - public V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNested addNewVolumeClaimTemplate() { - return new V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNestedImpl(); - } - public V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNested addNewVolumeClaimTemplateLike(V1PersistentVolumeClaim item) { - return new V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNestedImpl(-1, item); - } - public V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNested setNewVolumeClaimTemplateLike(int index,V1PersistentVolumeClaim item) { - return new V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNestedImpl(index, item); - } - public V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNested editVolumeClaimTemplate(int index) { - if (volumeClaimTemplates.size() <= index) throw new RuntimeException("Can't edit volumeClaimTemplates. Index exceeds size."); - return setNewVolumeClaimTemplateLike(index, buildVolumeClaimTemplate(index)); - } - public V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNested editFirstVolumeClaimTemplate() { - if (volumeClaimTemplates.size() == 0) throw new RuntimeException("Can't edit first volumeClaimTemplates. The list is empty."); - return setNewVolumeClaimTemplateLike(0, buildVolumeClaimTemplate(0)); - } - public V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNested editLastVolumeClaimTemplate() { - int index = volumeClaimTemplates.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last volumeClaimTemplates. The list is empty."); - return setNewVolumeClaimTemplateLike(index, buildVolumeClaimTemplate(index)); - } - public V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNested editMatchingVolumeClaimTemplate(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1StatefulSetOrdinalsFluentImpl> implements V1StatefulSetSpecFluentImpl.OrdinalsNested,Nested{ - OrdinalsNestedImpl(V1StatefulSetOrdinals item) { - this.builder = new V1StatefulSetOrdinalsBuilder(this, item); - } - OrdinalsNestedImpl() { - this.builder = new V1StatefulSetOrdinalsBuilder(this); - } - V1StatefulSetOrdinalsBuilder builder; - public N and() { - return (N) V1StatefulSetSpecFluentImpl.this.withOrdinals(builder.build()); - } - public N endOrdinals() { - return and(); - } - - } - class PersistentVolumeClaimRetentionPolicyNestedImpl extends V1StatefulSetPersistentVolumeClaimRetentionPolicyFluentImpl> implements V1StatefulSetSpecFluentImpl.PersistentVolumeClaimRetentionPolicyNested,Nested{ - PersistentVolumeClaimRetentionPolicyNestedImpl(V1StatefulSetPersistentVolumeClaimRetentionPolicy item) { - this.builder = new V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(this, item); - } - PersistentVolumeClaimRetentionPolicyNestedImpl() { - this.builder = new V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder(this); - } - V1StatefulSetPersistentVolumeClaimRetentionPolicyBuilder builder; - public N and() { - return (N) V1StatefulSetSpecFluentImpl.this.withPersistentVolumeClaimRetentionPolicy(builder.build()); - } - public N endPersistentVolumeClaimRetentionPolicy() { - return and(); - } - - } - class SelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1StatefulSetSpecFluentImpl.SelectorNested,Nested{ - SelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - SelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1StatefulSetSpecFluentImpl.this.withSelector(builder.build()); - } - public N endSelector() { - return and(); - } - - } - class TemplateNestedImpl extends V1PodTemplateSpecFluentImpl> implements V1StatefulSetSpecFluentImpl.TemplateNested,Nested{ - TemplateNestedImpl(V1PodTemplateSpec item) { - this.builder = new V1PodTemplateSpecBuilder(this, item); - } - TemplateNestedImpl() { - this.builder = new V1PodTemplateSpecBuilder(this); - } - V1PodTemplateSpecBuilder builder; - public N and() { - return (N) V1StatefulSetSpecFluentImpl.this.withTemplate(builder.build()); - } - public N endTemplate() { - return and(); - } - - } - class UpdateStrategyNestedImpl extends V1StatefulSetUpdateStrategyFluentImpl> implements V1StatefulSetSpecFluentImpl.UpdateStrategyNested,Nested{ - UpdateStrategyNestedImpl(V1StatefulSetUpdateStrategy item) { - this.builder = new V1StatefulSetUpdateStrategyBuilder(this, item); - } - UpdateStrategyNestedImpl() { - this.builder = new V1StatefulSetUpdateStrategyBuilder(this); - } - V1StatefulSetUpdateStrategyBuilder builder; - public N and() { - return (N) V1StatefulSetSpecFluentImpl.this.withUpdateStrategy(builder.build()); - } - public N endUpdateStrategy() { - return and(); - } - - } - class VolumeClaimTemplatesNestedImpl extends V1PersistentVolumeClaimFluentImpl> implements V1StatefulSetSpecFluentImpl.VolumeClaimTemplatesNested,Nested{ - VolumeClaimTemplatesNestedImpl(int index,V1PersistentVolumeClaim item) { - this.index = index; - this.builder = new V1PersistentVolumeClaimBuilder(this, item); - } - VolumeClaimTemplatesNestedImpl() { - this.index = -1; - this.builder = new V1PersistentVolumeClaimBuilder(this); - } - V1PersistentVolumeClaimBuilder builder; - int index; - public N and() { - return (N) V1StatefulSetSpecFluentImpl.this.setToVolumeClaimTemplates(index,builder.build()); - } - public N endVolumeClaimTemplate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusBuilder.java index 57091313f7..fdf8bfd80f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusBuilder.java @@ -1,65 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatefulSetStatusBuilder extends V1StatefulSetStatusFluentImpl implements VisitableBuilder{ +public class V1StatefulSetStatusBuilder extends V1StatefulSetStatusFluent implements VisitableBuilder{ public V1StatefulSetStatusBuilder() { - this(false); - } - public V1StatefulSetStatusBuilder(Boolean validationEnabled) { - this(new V1StatefulSetStatus(), validationEnabled); + this(new V1StatefulSetStatus()); } + public V1StatefulSetStatusBuilder(V1StatefulSetStatusFluent fluent) { - this(fluent, false); - } - public V1StatefulSetStatusBuilder(V1StatefulSetStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatefulSetStatus(), validationEnabled); + this(fluent, new V1StatefulSetStatus()); } + public V1StatefulSetStatusBuilder(V1StatefulSetStatusFluent fluent,V1StatefulSetStatus instance) { - this(fluent, instance, false); - } - public V1StatefulSetStatusBuilder(V1StatefulSetStatusFluent fluent,V1StatefulSetStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAvailableReplicas(instance.getAvailableReplicas()); - fluent.withCollisionCount(instance.getCollisionCount()); - fluent.withConditions(instance.getConditions()); - fluent.withCurrentReplicas(instance.getCurrentReplicas()); - fluent.withCurrentRevision(instance.getCurrentRevision()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - fluent.withReadyReplicas(instance.getReadyReplicas()); - fluent.withReplicas(instance.getReplicas()); - fluent.withUpdateRevision(instance.getUpdateRevision()); - fluent.withUpdatedReplicas(instance.getUpdatedReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatefulSetStatusBuilder(V1StatefulSetStatus instance) { - this(instance,false); - } - public V1StatefulSetStatusBuilder(V1StatefulSetStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAvailableReplicas(instance.getAvailableReplicas()); - this.withCollisionCount(instance.getCollisionCount()); - this.withConditions(instance.getConditions()); - this.withCurrentReplicas(instance.getCurrentReplicas()); - this.withCurrentRevision(instance.getCurrentRevision()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReadyReplicas(instance.getReadyReplicas()); - this.withReplicas(instance.getReplicas()); - this.withUpdateRevision(instance.getUpdateRevision()); - this.withUpdatedReplicas(instance.getUpdatedReplicas()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatefulSetStatusFluent fluent; - Boolean validationEnabled; + public V1StatefulSetStatus build() { V1StatefulSetStatus buildable = new V1StatefulSetStatus(); buildable.setAvailableReplicas(fluent.getAvailableReplicas()); buildable.setCollisionCount(fluent.getCollisionCount()); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setCurrentReplicas(fluent.getCurrentReplicas()); buildable.setCurrentRevision(fluent.getCurrentRevision()); buildable.setObservedGeneration(fluent.getObservedGeneration()); @@ -70,4 +36,5 @@ public V1StatefulSetStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusFluent.java index 79b98253fa..c82423fa6e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusFluent.java @@ -1,85 +1,380 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1StatefulSetStatusFluent> extends Fluent{ - public Integer getAvailableReplicas(); - public A withAvailableReplicas(Integer availableReplicas); - public Boolean hasAvailableReplicas(); - public Integer getCollisionCount(); - public A withCollisionCount(Integer collisionCount); - public Boolean hasCollisionCount(); - public A addToConditions(int index,V1StatefulSetCondition item); - public A setToConditions(int index,V1StatefulSetCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1StatefulSetCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1StatefulSetCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1StatefulSetCondition buildCondition(int index); - public V1StatefulSetCondition buildFirstCondition(); - public V1StatefulSetCondition buildLastCondition(); - public V1StatefulSetCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1StatefulSetCondition... conditions); - public Boolean hasConditions(); - public V1StatefulSetStatusFluent.ConditionsNested addNewCondition(); - public V1StatefulSetStatusFluent.ConditionsNested addNewConditionLike(V1StatefulSetCondition item); - public V1StatefulSetStatusFluent.ConditionsNested setNewConditionLike(int index,V1StatefulSetCondition item); - public V1StatefulSetStatusFluent.ConditionsNested editCondition(int index); - public V1StatefulSetStatusFluent.ConditionsNested editFirstCondition(); - public V1StatefulSetStatusFluent.ConditionsNested editLastCondition(); - public V1StatefulSetStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public Integer getCurrentReplicas(); - public A withCurrentReplicas(Integer currentReplicas); - public Boolean hasCurrentReplicas(); - public String getCurrentRevision(); - public A withCurrentRevision(String currentRevision); - public Boolean hasCurrentRevision(); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - public Integer getReadyReplicas(); - public A withReadyReplicas(Integer readyReplicas); - public Boolean hasReadyReplicas(); - public Integer getReplicas(); - public A withReplicas(Integer replicas); - public Boolean hasReplicas(); - public String getUpdateRevision(); - public A withUpdateRevision(String updateRevision); - public Boolean hasUpdateRevision(); - public Integer getUpdatedReplicas(); - public A withUpdatedReplicas(Integer updatedReplicas); - public Boolean hasUpdatedReplicas(); - public interface ConditionsNested extends Nested,V1StatefulSetConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatefulSetStatusFluent> extends BaseFluent{ + public V1StatefulSetStatusFluent() { + } + + public V1StatefulSetStatusFluent(V1StatefulSetStatus instance) { + this.copyInstance(instance); + } + private Integer availableReplicas; + private Integer collisionCount; + private ArrayList conditions; + private Integer currentReplicas; + private String currentRevision; + private Long observedGeneration; + private Integer readyReplicas; + private Integer replicas; + private String updateRevision; + private Integer updatedReplicas; + + protected void copyInstance(V1StatefulSetStatus instance) { + instance = (instance != null ? instance : new V1StatefulSetStatus()); + if (instance != null) { + this.withAvailableReplicas(instance.getAvailableReplicas()); + this.withCollisionCount(instance.getCollisionCount()); + this.withConditions(instance.getConditions()); + this.withCurrentReplicas(instance.getCurrentReplicas()); + this.withCurrentRevision(instance.getCurrentRevision()); + this.withObservedGeneration(instance.getObservedGeneration()); + this.withReadyReplicas(instance.getReadyReplicas()); + this.withReplicas(instance.getReplicas()); + this.withUpdateRevision(instance.getUpdateRevision()); + this.withUpdatedReplicas(instance.getUpdatedReplicas()); + } + } + + public Integer getAvailableReplicas() { + return this.availableReplicas; + } + + public A withAvailableReplicas(Integer availableReplicas) { + this.availableReplicas = availableReplicas; + return (A) this; + } + + public boolean hasAvailableReplicas() { + return this.availableReplicas != null; + } + + public Integer getCollisionCount() { + return this.collisionCount; + } + + public A withCollisionCount(Integer collisionCount) { + this.collisionCount = collisionCount; + return (A) this; + } + + public boolean hasCollisionCount() { + return this.collisionCount != null; + } + + public A addToConditions(int index,V1StatefulSetCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1StatefulSetCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1StatefulSetCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1StatefulSetCondition item : items) {V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1StatefulSetCondition item : items) {V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1StatefulSetCondition... items) { + if (this.conditions == null) return (A)this; + for (V1StatefulSetCondition item : items) {V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1StatefulSetCondition item : items) {V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1StatefulSetConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1StatefulSetCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1StatefulSetCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1StatefulSetCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1StatefulSetCondition buildMatchingCondition(Predicate predicate) { + for (V1StatefulSetConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1StatefulSetConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1StatefulSetCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1StatefulSetCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1StatefulSetCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1StatefulSetCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1StatefulSetCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1StatefulSetConditionFluent> implements Nested{ + ConditionsNested(int index,V1StatefulSetCondition item) { + this.index = index; + this.builder = new V1StatefulSetConditionBuilder(this, item); + } + V1StatefulSetConditionBuilder builder; + int index; + + public N and() { + return (N) V1StatefulSetStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusFluentImpl.java deleted file mode 100644 index 20e4812f6b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetStatusFluentImpl.java +++ /dev/null @@ -1,304 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatefulSetStatusFluentImpl> extends BaseFluent implements V1StatefulSetStatusFluent{ - public V1StatefulSetStatusFluentImpl() { - } - public V1StatefulSetStatusFluentImpl(V1StatefulSetStatus instance) { - if (instance != null) { - this.withAvailableReplicas(instance.getAvailableReplicas()); - this.withCollisionCount(instance.getCollisionCount()); - this.withConditions(instance.getConditions()); - this.withCurrentReplicas(instance.getCurrentReplicas()); - this.withCurrentRevision(instance.getCurrentRevision()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReadyReplicas(instance.getReadyReplicas()); - this.withReplicas(instance.getReplicas()); - this.withUpdateRevision(instance.getUpdateRevision()); - this.withUpdatedReplicas(instance.getUpdatedReplicas()); - } - } - private Integer availableReplicas; - private Integer collisionCount; - private ArrayList conditions; - private Integer currentReplicas; - private String currentRevision; - private Long observedGeneration; - private Integer readyReplicas; - private Integer replicas; - private String updateRevision; - private Integer updatedReplicas; - public Integer getAvailableReplicas() { - return this.availableReplicas; - } - public A withAvailableReplicas(Integer availableReplicas) { - this.availableReplicas=availableReplicas; return (A) this; - } - public Boolean hasAvailableReplicas() { - return this.availableReplicas != null; - } - public Integer getCollisionCount() { - return this.collisionCount; - } - public A withCollisionCount(Integer collisionCount) { - this.collisionCount=collisionCount; return (A) this; - } - public Boolean hasCollisionCount() { - return this.collisionCount != null; - } - public A addToConditions(int index,V1StatefulSetCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1StatefulSetCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1StatefulSetCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1StatefulSetCondition item : items) {V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1StatefulSetCondition item : items) {V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1StatefulSetCondition... items) { - for (V1StatefulSetCondition item : items) {V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1StatefulSetCondition item : items) {V1StatefulSetConditionBuilder builder = new V1StatefulSetConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1StatefulSetConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1StatefulSetCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1StatefulSetCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1StatefulSetCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1StatefulSetCondition buildMatchingCondition(Predicate predicate) { - for (V1StatefulSetConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1StatefulSetConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1StatefulSetCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1StatefulSetCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1StatefulSetCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1StatefulSetStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1StatefulSetStatusFluentImpl.ConditionsNestedImpl(); - } - public V1StatefulSetStatusFluentImpl.ConditionsNested addNewConditionLike(V1StatefulSetCondition item) { - return new V1StatefulSetStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1StatefulSetStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1StatefulSetCondition item) { - return new V1StatefulSetStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1StatefulSetStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1StatefulSetStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1StatefulSetStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1StatefulSetStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1StatefulSetConditionFluentImpl> implements V1StatefulSetStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1StatefulSetCondition item) { - this.index = index; - this.builder = new V1StatefulSetConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1StatefulSetConditionBuilder(this); - } - V1StatefulSetConditionBuilder builder; - int index; - public N and() { - return (N) V1StatefulSetStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyBuilder.java index b53c601d82..9469641f2c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatefulSetUpdateStrategyBuilder extends V1StatefulSetUpdateStrategyFluentImpl implements VisitableBuilder{ +public class V1StatefulSetUpdateStrategyBuilder extends V1StatefulSetUpdateStrategyFluent implements VisitableBuilder{ public V1StatefulSetUpdateStrategyBuilder() { - this(false); - } - public V1StatefulSetUpdateStrategyBuilder(Boolean validationEnabled) { - this(new V1StatefulSetUpdateStrategy(), validationEnabled); + this(new V1StatefulSetUpdateStrategy()); } + public V1StatefulSetUpdateStrategyBuilder(V1StatefulSetUpdateStrategyFluent fluent) { - this(fluent, false); - } - public V1StatefulSetUpdateStrategyBuilder(V1StatefulSetUpdateStrategyFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatefulSetUpdateStrategy(), validationEnabled); + this(fluent, new V1StatefulSetUpdateStrategy()); } + public V1StatefulSetUpdateStrategyBuilder(V1StatefulSetUpdateStrategyFluent fluent,V1StatefulSetUpdateStrategy instance) { - this(fluent, instance, false); - } - public V1StatefulSetUpdateStrategyBuilder(V1StatefulSetUpdateStrategyFluent fluent,V1StatefulSetUpdateStrategy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withRollingUpdate(instance.getRollingUpdate()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatefulSetUpdateStrategyBuilder(V1StatefulSetUpdateStrategy instance) { - this(instance,false); - } - public V1StatefulSetUpdateStrategyBuilder(V1StatefulSetUpdateStrategy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withRollingUpdate(instance.getRollingUpdate()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatefulSetUpdateStrategyFluent fluent; - Boolean validationEnabled; + public V1StatefulSetUpdateStrategy build() { V1StatefulSetUpdateStrategy buildable = new V1StatefulSetUpdateStrategy(); - buildable.setRollingUpdate(fluent.getRollingUpdate()); + buildable.setRollingUpdate(fluent.buildRollingUpdate()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyFluent.java index 65ed0e591b..65140ef9f9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1StatefulSetUpdateStrategyFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildRollingUpdate instead. - * @return The buildable object. - */ - @Deprecated - public V1RollingUpdateStatefulSetStrategy getRollingUpdate(); - public V1RollingUpdateStatefulSetStrategy buildRollingUpdate(); - public A withRollingUpdate(V1RollingUpdateStatefulSetStrategy rollingUpdate); - public Boolean hasRollingUpdate(); - public V1StatefulSetUpdateStrategyFluent.RollingUpdateNested withNewRollingUpdate(); - public V1StatefulSetUpdateStrategyFluent.RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateStatefulSetStrategy item); - public V1StatefulSetUpdateStrategyFluent.RollingUpdateNested editRollingUpdate(); - public V1StatefulSetUpdateStrategyFluent.RollingUpdateNested editOrNewRollingUpdate(); - public V1StatefulSetUpdateStrategyFluent.RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateStatefulSetStrategy item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface RollingUpdateNested extends Nested,V1RollingUpdateStatefulSetStrategyFluent>{ - public N and(); - public N endRollingUpdate(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatefulSetUpdateStrategyFluent> extends BaseFluent{ + public V1StatefulSetUpdateStrategyFluent() { + } + + public V1StatefulSetUpdateStrategyFluent(V1StatefulSetUpdateStrategy instance) { + this.copyInstance(instance); + } + private V1RollingUpdateStatefulSetStrategyBuilder rollingUpdate; + private String type; + + protected void copyInstance(V1StatefulSetUpdateStrategy instance) { + instance = (instance != null ? instance : new V1StatefulSetUpdateStrategy()); + if (instance != null) { + this.withRollingUpdate(instance.getRollingUpdate()); + this.withType(instance.getType()); + } + } + + public V1RollingUpdateStatefulSetStrategy buildRollingUpdate() { + return this.rollingUpdate != null ? this.rollingUpdate.build() : null; + } + + public A withRollingUpdate(V1RollingUpdateStatefulSetStrategy rollingUpdate) { + this._visitables.remove("rollingUpdate"); + if (rollingUpdate != null) { + this.rollingUpdate = new V1RollingUpdateStatefulSetStrategyBuilder(rollingUpdate); + this._visitables.get("rollingUpdate").add(this.rollingUpdate); + } else { + this.rollingUpdate = null; + this._visitables.get("rollingUpdate").remove(this.rollingUpdate); + } + return (A) this; + } + + public boolean hasRollingUpdate() { + return this.rollingUpdate != null; + } + + public RollingUpdateNested withNewRollingUpdate() { + return new RollingUpdateNested(null); + } + + public RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateStatefulSetStrategy item) { + return new RollingUpdateNested(item); + } + + public RollingUpdateNested editRollingUpdate() { + return withNewRollingUpdateLike(java.util.Optional.ofNullable(buildRollingUpdate()).orElse(null)); + } + + public RollingUpdateNested editOrNewRollingUpdate() { + return withNewRollingUpdateLike(java.util.Optional.ofNullable(buildRollingUpdate()).orElse(new V1RollingUpdateStatefulSetStrategyBuilder().build())); } + public RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateStatefulSetStrategy item) { + return withNewRollingUpdateLike(java.util.Optional.ofNullable(buildRollingUpdate()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StatefulSetUpdateStrategyFluent that = (V1StatefulSetUpdateStrategyFluent) o; + if (!java.util.Objects.equals(rollingUpdate, that.rollingUpdate)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(rollingUpdate, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (rollingUpdate != null) { sb.append("rollingUpdate:"); sb.append(rollingUpdate + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class RollingUpdateNested extends V1RollingUpdateStatefulSetStrategyFluent> implements Nested{ + RollingUpdateNested(V1RollingUpdateStatefulSetStrategy item) { + this.builder = new V1RollingUpdateStatefulSetStrategyBuilder(this, item); + } + V1RollingUpdateStatefulSetStrategyBuilder builder; + + public N and() { + return (N) V1StatefulSetUpdateStrategyFluent.this.withRollingUpdate(builder.build()); + } + + public N endRollingUpdate() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyFluentImpl.java deleted file mode 100644 index dec4d51712..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatefulSetUpdateStrategyFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatefulSetUpdateStrategyFluentImpl> extends BaseFluent implements V1StatefulSetUpdateStrategyFluent{ - public V1StatefulSetUpdateStrategyFluentImpl() { - } - public V1StatefulSetUpdateStrategyFluentImpl(V1StatefulSetUpdateStrategy instance) { - if (instance != null) { - this.withRollingUpdate(instance.getRollingUpdate()); - this.withType(instance.getType()); - } - } - private V1RollingUpdateStatefulSetStrategyBuilder rollingUpdate; - private String type; - - /** - * This method has been deprecated, please use method buildRollingUpdate instead. - * @return The buildable object. - */ - @Deprecated - public V1RollingUpdateStatefulSetStrategy getRollingUpdate() { - return this.rollingUpdate!=null ?this.rollingUpdate.build():null; - } - public V1RollingUpdateStatefulSetStrategy buildRollingUpdate() { - return this.rollingUpdate!=null ?this.rollingUpdate.build():null; - } - public A withRollingUpdate(V1RollingUpdateStatefulSetStrategy rollingUpdate) { - _visitables.get("rollingUpdate").remove(this.rollingUpdate); - if (rollingUpdate!=null){ this.rollingUpdate= new V1RollingUpdateStatefulSetStrategyBuilder(rollingUpdate); _visitables.get("rollingUpdate").add(this.rollingUpdate);} else { this.rollingUpdate = null; _visitables.get("rollingUpdate").remove(this.rollingUpdate); } return (A) this; - } - public Boolean hasRollingUpdate() { - return this.rollingUpdate != null; - } - public V1StatefulSetUpdateStrategyFluentImpl.RollingUpdateNested withNewRollingUpdate() { - return new V1StatefulSetUpdateStrategyFluentImpl.RollingUpdateNestedImpl(); - } - public V1StatefulSetUpdateStrategyFluentImpl.RollingUpdateNested withNewRollingUpdateLike(V1RollingUpdateStatefulSetStrategy item) { - return new V1StatefulSetUpdateStrategyFluentImpl.RollingUpdateNestedImpl(item); - } - public V1StatefulSetUpdateStrategyFluentImpl.RollingUpdateNested editRollingUpdate() { - return withNewRollingUpdateLike(getRollingUpdate()); - } - public V1StatefulSetUpdateStrategyFluentImpl.RollingUpdateNested editOrNewRollingUpdate() { - return withNewRollingUpdateLike(getRollingUpdate() != null ? getRollingUpdate(): new V1RollingUpdateStatefulSetStrategyBuilder().build()); - } - public V1StatefulSetUpdateStrategyFluentImpl.RollingUpdateNested editOrNewRollingUpdateLike(V1RollingUpdateStatefulSetStrategy item) { - return withNewRollingUpdateLike(getRollingUpdate() != null ? getRollingUpdate(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StatefulSetUpdateStrategyFluentImpl that = (V1StatefulSetUpdateStrategyFluentImpl) o; - if (!java.util.Objects.equals(rollingUpdate, that.rollingUpdate)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(rollingUpdate, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (rollingUpdate != null) { sb.append("rollingUpdate:"); sb.append(rollingUpdate + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class RollingUpdateNestedImpl extends V1RollingUpdateStatefulSetStrategyFluentImpl> implements V1StatefulSetUpdateStrategyFluentImpl.RollingUpdateNested,Nested{ - RollingUpdateNestedImpl(V1RollingUpdateStatefulSetStrategy item) { - this.builder = new V1RollingUpdateStatefulSetStrategyBuilder(this, item); - } - RollingUpdateNestedImpl() { - this.builder = new V1RollingUpdateStatefulSetStrategyBuilder(this); - } - V1RollingUpdateStatefulSetStrategyBuilder builder; - public N and() { - return (N) V1StatefulSetUpdateStrategyFluentImpl.this.withRollingUpdate(builder.build()); - } - public N endRollingUpdate() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusBuilder.java index 0226f2b0d0..40ada78b44 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusBuilder.java @@ -1,67 +1,38 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatusBuilder extends V1StatusFluentImpl implements VisitableBuilder{ +public class V1StatusBuilder extends V1StatusFluent implements VisitableBuilder{ public V1StatusBuilder() { - this(false); - } - public V1StatusBuilder(Boolean validationEnabled) { - this(new V1Status(), validationEnabled); + this(new V1Status()); } + public V1StatusBuilder(V1StatusFluent fluent) { - this(fluent, false); - } - public V1StatusBuilder(V1StatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Status(), validationEnabled); + this(fluent, new V1Status()); } + public V1StatusBuilder(V1StatusFluent fluent,V1Status instance) { - this(fluent, instance, false); - } - public V1StatusBuilder(V1StatusFluent fluent,V1Status instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withCode(instance.getCode()); - fluent.withDetails(instance.getDetails()); - fluent.withKind(instance.getKind()); - fluent.withMessage(instance.getMessage()); - fluent.withMetadata(instance.getMetadata()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatusBuilder(V1Status instance) { - this(instance,false); - } - public V1StatusBuilder(V1Status instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withCode(instance.getCode()); - this.withDetails(instance.getDetails()); - this.withKind(instance.getKind()); - this.withMessage(instance.getMessage()); - this.withMetadata(instance.getMetadata()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatusFluent fluent; - Boolean validationEnabled; + public V1Status build() { V1Status buildable = new V1Status(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setCode(fluent.getCode()); - buildable.setDetails(fluent.getDetails()); + buildable.setDetails(fluent.buildDetails()); buildable.setKind(fluent.getKind()); buildable.setMessage(fluent.getMessage()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); buildable.setReason(fluent.getReason()); buildable.setStatus(fluent.getStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseBuilder.java index f0b64ed0ae..282ca99f4d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatusCauseBuilder extends V1StatusCauseFluentImpl implements VisitableBuilder{ +public class V1StatusCauseBuilder extends V1StatusCauseFluent implements VisitableBuilder{ public V1StatusCauseBuilder() { - this(false); - } - public V1StatusCauseBuilder(Boolean validationEnabled) { - this(new V1StatusCause(), validationEnabled); + this(new V1StatusCause()); } + public V1StatusCauseBuilder(V1StatusCauseFluent fluent) { - this(fluent, false); - } - public V1StatusCauseBuilder(V1StatusCauseFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatusCause(), validationEnabled); + this(fluent, new V1StatusCause()); } + public V1StatusCauseBuilder(V1StatusCauseFluent fluent,V1StatusCause instance) { - this(fluent, instance, false); - } - public V1StatusCauseBuilder(V1StatusCauseFluent fluent,V1StatusCause instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withField(instance.getField()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatusCauseBuilder(V1StatusCause instance) { - this(instance,false); - } - public V1StatusCauseBuilder(V1StatusCause instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withField(instance.getField()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatusCauseFluent fluent; - Boolean validationEnabled; + public V1StatusCause build() { V1StatusCause buildable = new V1StatusCause(); buildable.setField(fluent.getField()); @@ -49,4 +29,5 @@ public V1StatusCause build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseFluent.java index 510906afd5..0db54946fd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseFluent.java @@ -1,22 +1,97 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1StatusCauseFluent> extends Fluent{ - public String getField(); - public A withField(String field); - public Boolean hasField(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatusCauseFluent> extends BaseFluent{ + public V1StatusCauseFluent() { + } + public V1StatusCauseFluent(V1StatusCause instance) { + this.copyInstance(instance); + } + private String field; + private String message; + private String reason; + + protected void copyInstance(V1StatusCause instance) { + instance = (instance != null ? instance : new V1StatusCause()); + if (instance != null) { + this.withField(instance.getField()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + } + } + + public String getField() { + return this.field; + } + + public A withField(String field) { + this.field = field; + return (A) this; + } + + public boolean hasField() { + return this.field != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StatusCauseFluent that = (V1StatusCauseFluent) o; + if (!java.util.Objects.equals(field, that.field)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(field, message, reason, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (field != null) { sb.append("field:"); sb.append(field + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseFluentImpl.java deleted file mode 100644 index 96c51a82e3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusCauseFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatusCauseFluentImpl> extends BaseFluent implements V1StatusCauseFluent{ - public V1StatusCauseFluentImpl() { - } - public V1StatusCauseFluentImpl(V1StatusCause instance) { - if (instance != null) { - this.withField(instance.getField()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - } - } - private String field; - private String message; - private String reason; - public String getField() { - return this.field; - } - public A withField(String field) { - this.field=field; return (A) this; - } - public Boolean hasField() { - return this.field != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StatusCauseFluentImpl that = (V1StatusCauseFluentImpl) o; - if (!java.util.Objects.equals(field, that.field)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(field, message, reason, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (field != null) { sb.append("field:"); sb.append(field + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsBuilder.java index 4b8d83f94f..9b902656fe 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsBuilder.java @@ -1,55 +1,29 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StatusDetailsBuilder extends V1StatusDetailsFluentImpl implements VisitableBuilder{ +public class V1StatusDetailsBuilder extends V1StatusDetailsFluent implements VisitableBuilder{ public V1StatusDetailsBuilder() { - this(false); - } - public V1StatusDetailsBuilder(Boolean validationEnabled) { - this(new V1StatusDetails(), validationEnabled); + this(new V1StatusDetails()); } + public V1StatusDetailsBuilder(V1StatusDetailsFluent fluent) { - this(fluent, false); - } - public V1StatusDetailsBuilder(V1StatusDetailsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StatusDetails(), validationEnabled); + this(fluent, new V1StatusDetails()); } + public V1StatusDetailsBuilder(V1StatusDetailsFluent fluent,V1StatusDetails instance) { - this(fluent, instance, false); - } - public V1StatusDetailsBuilder(V1StatusDetailsFluent fluent,V1StatusDetails instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCauses(instance.getCauses()); - fluent.withGroup(instance.getGroup()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withRetryAfterSeconds(instance.getRetryAfterSeconds()); - fluent.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StatusDetailsBuilder(V1StatusDetails instance) { - this(instance,false); - } - public V1StatusDetailsBuilder(V1StatusDetails instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCauses(instance.getCauses()); - this.withGroup(instance.getGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withRetryAfterSeconds(instance.getRetryAfterSeconds()); - this.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StatusDetailsFluent fluent; - Boolean validationEnabled; + public V1StatusDetails build() { V1StatusDetails buildable = new V1StatusDetails(); - buildable.setCauses(fluent.getCauses()); + buildable.setCauses(fluent.buildCauses()); buildable.setGroup(fluent.getGroup()); buildable.setKind(fluent.getKind()); buildable.setName(fluent.getName()); @@ -58,4 +32,5 @@ public V1StatusDetails build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsFluent.java index a815a1adf8..bd9c64daa6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsFluent.java @@ -1,72 +1,311 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1StatusDetailsFluent> extends Fluent{ - public A addToCauses(int index,V1StatusCause item); - public A setToCauses(int index,V1StatusCause item); - public A addToCauses(io.kubernetes.client.openapi.models.V1StatusCause... items); - public A addAllToCauses(Collection items); - public A removeFromCauses(io.kubernetes.client.openapi.models.V1StatusCause... items); - public A removeAllFromCauses(Collection items); - public A removeMatchingFromCauses(Predicate predicate); - - /** - * This method has been deprecated, please use method buildCauses instead. - * @return The buildable object. - */ - @Deprecated - public List getCauses(); - public List buildCauses(); - public V1StatusCause buildCause(int index); - public V1StatusCause buildFirstCause(); - public V1StatusCause buildLastCause(); - public V1StatusCause buildMatchingCause(Predicate predicate); - public Boolean hasMatchingCause(Predicate predicate); - public A withCauses(List causes); - public A withCauses(io.kubernetes.client.openapi.models.V1StatusCause... causes); - public Boolean hasCauses(); - public V1StatusDetailsFluent.CausesNested addNewCause(); - public V1StatusDetailsFluent.CausesNested addNewCauseLike(V1StatusCause item); - public V1StatusDetailsFluent.CausesNested setNewCauseLike(int index,V1StatusCause item); - public V1StatusDetailsFluent.CausesNested editCause(int index); - public V1StatusDetailsFluent.CausesNested editFirstCause(); - public V1StatusDetailsFluent.CausesNested editLastCause(); - public V1StatusDetailsFluent.CausesNested editMatchingCause(Predicate predicate); - public String getGroup(); - public A withGroup(String group); - public Boolean hasGroup(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Integer getRetryAfterSeconds(); - public A withRetryAfterSeconds(Integer retryAfterSeconds); - public Boolean hasRetryAfterSeconds(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); - public interface CausesNested extends Nested,V1StatusCauseFluent>{ - public N and(); - public N endCause(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatusDetailsFluent> extends BaseFluent{ + public V1StatusDetailsFluent() { + } + + public V1StatusDetailsFluent(V1StatusDetails instance) { + this.copyInstance(instance); + } + private ArrayList causes; + private String group; + private String kind; + private String name; + private Integer retryAfterSeconds; + private String uid; + + protected void copyInstance(V1StatusDetails instance) { + instance = (instance != null ? instance : new V1StatusDetails()); + if (instance != null) { + this.withCauses(instance.getCauses()); + this.withGroup(instance.getGroup()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withRetryAfterSeconds(instance.getRetryAfterSeconds()); + this.withUid(instance.getUid()); + } + } + + public A addToCauses(int index,V1StatusCause item) { + if (this.causes == null) {this.causes = new ArrayList();} + V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item); + if (index < 0 || index >= causes.size()) { _visitables.get("causes").add(builder); causes.add(builder); } else { _visitables.get("causes").add(index, builder); causes.add(index, builder);} + return (A)this; + } + + public A setToCauses(int index,V1StatusCause item) { + if (this.causes == null) {this.causes = new ArrayList();} + V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item); + if (index < 0 || index >= causes.size()) { _visitables.get("causes").add(builder); causes.add(builder); } else { _visitables.get("causes").set(index, builder); causes.set(index, builder);} + return (A)this; + } + + public A addToCauses(io.kubernetes.client.openapi.models.V1StatusCause... items) { + if (this.causes == null) {this.causes = new ArrayList();} + for (V1StatusCause item : items) {V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item);_visitables.get("causes").add(builder);this.causes.add(builder);} return (A)this; + } + + public A addAllToCauses(Collection items) { + if (this.causes == null) {this.causes = new ArrayList();} + for (V1StatusCause item : items) {V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item);_visitables.get("causes").add(builder);this.causes.add(builder);} return (A)this; + } + + public A removeFromCauses(io.kubernetes.client.openapi.models.V1StatusCause... items) { + if (this.causes == null) return (A)this; + for (V1StatusCause item : items) {V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item);_visitables.get("causes").remove(builder); this.causes.remove(builder);} return (A)this; + } + + public A removeAllFromCauses(Collection items) { + if (this.causes == null) return (A)this; + for (V1StatusCause item : items) {V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item);_visitables.get("causes").remove(builder); this.causes.remove(builder);} return (A)this; + } + + public A removeMatchingFromCauses(Predicate predicate) { + if (causes == null) return (A) this; + final Iterator each = causes.iterator(); + final List visitables = _visitables.get("causes"); + while (each.hasNext()) { + V1StatusCauseBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildCauses() { + return this.causes != null ? build(causes) : null; + } + + public V1StatusCause buildCause(int index) { + return this.causes.get(index).build(); + } + + public V1StatusCause buildFirstCause() { + return this.causes.get(0).build(); + } + + public V1StatusCause buildLastCause() { + return this.causes.get(causes.size() - 1).build(); + } + + public V1StatusCause buildMatchingCause(Predicate predicate) { + for (V1StatusCauseBuilder item : causes) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCause(Predicate predicate) { + for (V1StatusCauseBuilder item : causes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withCauses(List causes) { + if (this.causes != null) { + this._visitables.get("causes").clear(); + } + if (causes != null) { + this.causes = new ArrayList(); + for (V1StatusCause item : causes) { + this.addToCauses(item); + } + } else { + this.causes = null; + } + return (A) this; + } + + public A withCauses(io.kubernetes.client.openapi.models.V1StatusCause... causes) { + if (this.causes != null) { + this.causes.clear(); + _visitables.remove("causes"); + } + if (causes != null) { + for (V1StatusCause item : causes) { + this.addToCauses(item); + } + } + return (A) this; + } + + public boolean hasCauses() { + return this.causes != null && !this.causes.isEmpty(); + } + + public CausesNested addNewCause() { + return new CausesNested(-1, null); + } + + public CausesNested addNewCauseLike(V1StatusCause item) { + return new CausesNested(-1, item); + } + + public CausesNested setNewCauseLike(int index,V1StatusCause item) { + return new CausesNested(index, item); + } + + public CausesNested editCause(int index) { + if (causes.size() <= index) throw new RuntimeException("Can't edit causes. Index exceeds size."); + return setNewCauseLike(index, buildCause(index)); + } + + public CausesNested editFirstCause() { + if (causes.size() == 0) throw new RuntimeException("Can't edit first causes. The list is empty."); + return setNewCauseLike(0, buildCause(0)); + } + + public CausesNested editLastCause() { + int index = causes.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last causes. The list is empty."); + return setNewCauseLike(index, buildCause(index)); + } + + public CausesNested editMatchingCause(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1StatusCauseFluent> implements Nested{ + CausesNested(int index,V1StatusCause item) { + this.index = index; + this.builder = new V1StatusCauseBuilder(this, item); + } + V1StatusCauseBuilder builder; + int index; + + public N and() { + return (N) V1StatusDetailsFluent.this.setToCauses(index,builder.build()); + } + + public N endCause() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsFluentImpl.java deleted file mode 100644 index 25b69e034e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusDetailsFluentImpl.java +++ /dev/null @@ -1,247 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatusDetailsFluentImpl> extends BaseFluent implements V1StatusDetailsFluent{ - public V1StatusDetailsFluentImpl() { - } - public V1StatusDetailsFluentImpl(V1StatusDetails instance) { - if (instance != null) { - this.withCauses(instance.getCauses()); - this.withGroup(instance.getGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withRetryAfterSeconds(instance.getRetryAfterSeconds()); - this.withUid(instance.getUid()); - } - } - private ArrayList causes; - private String group; - private String kind; - private String name; - private Integer retryAfterSeconds; - private String uid; - public A addToCauses(int index,V1StatusCause item) { - if (this.causes == null) {this.causes = new ArrayList();} - V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item); - if (index < 0 || index >= causes.size()) { _visitables.get("causes").add(builder); causes.add(builder); } else { _visitables.get("causes").add(index, builder); causes.add(index, builder);} - return (A)this; - } - public A setToCauses(int index,V1StatusCause item) { - if (this.causes == null) {this.causes = new ArrayList();} - V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item); - if (index < 0 || index >= causes.size()) { _visitables.get("causes").add(builder); causes.add(builder); } else { _visitables.get("causes").set(index, builder); causes.set(index, builder);} - return (A)this; - } - public A addToCauses(io.kubernetes.client.openapi.models.V1StatusCause... items) { - if (this.causes == null) {this.causes = new ArrayList();} - for (V1StatusCause item : items) {V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item);_visitables.get("causes").add(builder);this.causes.add(builder);} return (A)this; - } - public A addAllToCauses(Collection items) { - if (this.causes == null) {this.causes = new ArrayList();} - for (V1StatusCause item : items) {V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item);_visitables.get("causes").add(builder);this.causes.add(builder);} return (A)this; - } - public A removeFromCauses(io.kubernetes.client.openapi.models.V1StatusCause... items) { - for (V1StatusCause item : items) {V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item);_visitables.get("causes").remove(builder);if (this.causes != null) {this.causes.remove(builder);}} return (A)this; - } - public A removeAllFromCauses(Collection items) { - for (V1StatusCause item : items) {V1StatusCauseBuilder builder = new V1StatusCauseBuilder(item);_visitables.get("causes").remove(builder);if (this.causes != null) {this.causes.remove(builder);}} return (A)this; - } - public A removeMatchingFromCauses(Predicate predicate) { - if (causes == null) return (A) this; - final Iterator each = causes.iterator(); - final List visitables = _visitables.get("causes"); - while (each.hasNext()) { - V1StatusCauseBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildCauses instead. - * @return The buildable object. - */ - @Deprecated - public List getCauses() { - return causes != null ? build(causes) : null; - } - public List buildCauses() { - return causes != null ? build(causes) : null; - } - public V1StatusCause buildCause(int index) { - return this.causes.get(index).build(); - } - public V1StatusCause buildFirstCause() { - return this.causes.get(0).build(); - } - public V1StatusCause buildLastCause() { - return this.causes.get(causes.size() - 1).build(); - } - public V1StatusCause buildMatchingCause(Predicate predicate) { - for (V1StatusCauseBuilder item: causes) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCause(Predicate predicate) { - for (V1StatusCauseBuilder item: causes) { if(predicate.test(item)){ return true;} } return false; - } - public A withCauses(List causes) { - if (this.causes != null) { _visitables.get("causes").clear();} - if (causes != null) {this.causes = new ArrayList(); for (V1StatusCause item : causes){this.addToCauses(item);}} else { this.causes = null;} return (A) this; - } - public A withCauses(io.kubernetes.client.openapi.models.V1StatusCause... causes) { - if (this.causes != null) {this.causes.clear(); _visitables.remove("causes"); } - if (causes != null) {for (V1StatusCause item :causes){ this.addToCauses(item);}} return (A) this; - } - public Boolean hasCauses() { - return causes != null && !causes.isEmpty(); - } - public V1StatusDetailsFluentImpl.CausesNested addNewCause() { - return new V1StatusDetailsFluentImpl.CausesNestedImpl(); - } - public V1StatusDetailsFluentImpl.CausesNested addNewCauseLike(V1StatusCause item) { - return new V1StatusDetailsFluentImpl.CausesNestedImpl(-1, item); - } - public V1StatusDetailsFluentImpl.CausesNested setNewCauseLike(int index,V1StatusCause item) { - return new V1StatusDetailsFluentImpl.CausesNestedImpl(index, item); - } - public V1StatusDetailsFluentImpl.CausesNested editCause(int index) { - if (causes.size() <= index) throw new RuntimeException("Can't edit causes. Index exceeds size."); - return setNewCauseLike(index, buildCause(index)); - } - public V1StatusDetailsFluentImpl.CausesNested editFirstCause() { - if (causes.size() == 0) throw new RuntimeException("Can't edit first causes. The list is empty."); - return setNewCauseLike(0, buildCause(0)); - } - public V1StatusDetailsFluentImpl.CausesNested editLastCause() { - int index = causes.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last causes. The list is empty."); - return setNewCauseLike(index, buildCause(index)); - } - public V1StatusDetailsFluentImpl.CausesNested editMatchingCause(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1StatusCauseFluentImpl> implements V1StatusDetailsFluentImpl.CausesNested,Nested{ - CausesNestedImpl(int index,V1StatusCause item) { - this.index = index; - this.builder = new V1StatusCauseBuilder(this, item); - } - CausesNestedImpl() { - this.index = -1; - this.builder = new V1StatusCauseBuilder(this); - } - V1StatusCauseBuilder builder; - int index; - public N and() { - return (N) V1StatusDetailsFluentImpl.this.setToCauses(index,builder.build()); - } - public N endCause() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusFluent.java index 41fc1b17eb..5e531fe992 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusFluent.java @@ -1,74 +1,269 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; import java.lang.Integer; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1StatusFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public Integer getCode(); - public A withCode(Integer code); - public Boolean hasCode(); - - /** - * This method has been deprecated, please use method buildDetails instead. - * @return The buildable object. - */ - @Deprecated - public V1StatusDetails getDetails(); - public V1StatusDetails buildDetails(); - public A withDetails(V1StatusDetails details); - public Boolean hasDetails(); - public V1StatusFluent.DetailsNested withNewDetails(); - public V1StatusFluent.DetailsNested withNewDetailsLike(V1StatusDetails item); - public V1StatusFluent.DetailsNested editDetails(); - public V1StatusFluent.DetailsNested editOrNewDetails(); - public V1StatusFluent.DetailsNested editOrNewDetailsLike(V1StatusDetails item); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1StatusFluent.MetadataNested withNewMetadata(); - public V1StatusFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1StatusFluent.MetadataNested editMetadata(); - public V1StatusFluent.MetadataNested editOrNewMetadata(); - public V1StatusFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public interface DetailsNested extends Nested,V1StatusDetailsFluent>{ - public N and(); - public N endDetails(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StatusFluent> extends BaseFluent{ + public V1StatusFluent() { + } + + public V1StatusFluent(V1Status instance) { + this.copyInstance(instance); + } + private String apiVersion; + private Integer code; + private V1StatusDetailsBuilder details; + private String kind; + private String message; + private V1ListMetaBuilder metadata; + private String reason; + private String status; + + protected void copyInstance(V1Status instance) { + instance = (instance != null ? instance : new V1Status()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withCode(instance.getCode()); + this.withDetails(instance.getDetails()); + this.withKind(instance.getKind()); + this.withMessage(instance.getMessage()); + this.withMetadata(instance.getMetadata()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public Integer getCode() { + return this.code; + } + + public A withCode(Integer code) { + this.code = code; + return (A) this; + } + + public boolean hasCode() { + return this.code != null; + } + + public V1StatusDetails buildDetails() { + return this.details != null ? this.details.build() : null; + } + + public A withDetails(V1StatusDetails details) { + this._visitables.remove("details"); + if (details != null) { + this.details = new V1StatusDetailsBuilder(details); + this._visitables.get("details").add(this.details); + } else { + this.details = null; + this._visitables.get("details").remove(this.details); + } + return (A) this; + } + + public boolean hasDetails() { + return this.details != null; + } + + public DetailsNested withNewDetails() { + return new DetailsNested(null); + } + + public DetailsNested withNewDetailsLike(V1StatusDetails item) { + return new DetailsNested(item); + } + + public DetailsNested editDetails() { + return withNewDetailsLike(java.util.Optional.ofNullable(buildDetails()).orElse(null)); + } + + public DetailsNested editOrNewDetails() { + return withNewDetailsLike(java.util.Optional.ofNullable(buildDetails()).orElse(new V1StatusDetailsBuilder().build())); + } + + public DetailsNested editOrNewDetailsLike(V1StatusDetails item) { + return withNewDetailsLike(java.util.Optional.ofNullable(buildDetails()).orElse(item)); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public V1ListMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ListMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ListMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StatusFluent that = (V1StatusFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(code, that.code)) return false; + if (!java.util.Objects.equals(details, that.details)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, code, details, kind, message, metadata, reason, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (code != null) { sb.append("code:"); sb.append(code + ","); } + if (details != null) { sb.append("details:"); sb.append(details + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class DetailsNested extends V1StatusDetailsFluent> implements Nested{ + DetailsNested(V1StatusDetails item) { + this.builder = new V1StatusDetailsBuilder(this, item); + } + V1StatusDetailsBuilder builder; + + public N and() { + return (N) V1StatusFluent.this.withDetails(builder.build()); + } + public N endDetails() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1StatusFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusFluentImpl.java deleted file mode 100644 index fc6d4b01a7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StatusFluentImpl.java +++ /dev/null @@ -1,234 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StatusFluentImpl> extends BaseFluent implements V1StatusFluent{ - public V1StatusFluentImpl() { - } - public V1StatusFluentImpl(V1Status instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withCode(instance.getCode()); - this.withDetails(instance.getDetails()); - this.withKind(instance.getKind()); - this.withMessage(instance.getMessage()); - this.withMetadata(instance.getMetadata()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private Integer code; - private V1StatusDetailsBuilder details; - private String kind; - private String message; - private V1ListMetaBuilder metadata; - private String reason; - private String status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public Integer getCode() { - return this.code; - } - public A withCode(Integer code) { - this.code=code; return (A) this; - } - public Boolean hasCode() { - return this.code != null; - } - - /** - * This method has been deprecated, please use method buildDetails instead. - * @return The buildable object. - */ - @Deprecated - public V1StatusDetails getDetails() { - return this.details!=null ?this.details.build():null; - } - public V1StatusDetails buildDetails() { - return this.details!=null ?this.details.build():null; - } - public A withDetails(V1StatusDetails details) { - _visitables.get("details").remove(this.details); - if (details!=null){ this.details= new V1StatusDetailsBuilder(details); _visitables.get("details").add(this.details);} else { this.details = null; _visitables.get("details").remove(this.details); } return (A) this; - } - public Boolean hasDetails() { - return this.details != null; - } - public V1StatusFluentImpl.DetailsNested withNewDetails() { - return new V1StatusFluentImpl.DetailsNestedImpl(); - } - public V1StatusFluentImpl.DetailsNested withNewDetailsLike(V1StatusDetails item) { - return new V1StatusFluentImpl.DetailsNestedImpl(item); - } - public V1StatusFluentImpl.DetailsNested editDetails() { - return withNewDetailsLike(getDetails()); - } - public V1StatusFluentImpl.DetailsNested editOrNewDetails() { - return withNewDetailsLike(getDetails() != null ? getDetails(): new V1StatusDetailsBuilder().build()); - } - public V1StatusFluentImpl.DetailsNested editOrNewDetailsLike(V1StatusDetails item) { - return withNewDetailsLike(getDetails() != null ? getDetails(): item); - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ListMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ListMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ListMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1StatusFluentImpl.MetadataNested withNewMetadata() { - return new V1StatusFluentImpl.MetadataNestedImpl(); - } - public V1StatusFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1StatusFluentImpl.MetadataNestedImpl(item); - } - public V1StatusFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1StatusFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1StatusFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StatusFluentImpl that = (V1StatusFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(code, that.code)) return false; - - if (!java.util.Objects.equals(details, that.details)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, code, details, kind, message, metadata, reason, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (code != null) { sb.append("code:"); sb.append(code + ","); } - if (details != null) { sb.append("details:"); sb.append(details + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class DetailsNestedImpl extends V1StatusDetailsFluentImpl> implements V1StatusFluentImpl.DetailsNested,Nested{ - DetailsNestedImpl(V1StatusDetails item) { - this.builder = new V1StatusDetailsBuilder(this, item); - } - DetailsNestedImpl() { - this.builder = new V1StatusDetailsBuilder(this); - } - V1StatusDetailsBuilder builder; - public N and() { - return (N) V1StatusFluentImpl.this.withDetails(builder.build()); - } - public N endDetails() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1StatusFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1StatusFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassBuilder.java index c6fedd8d35..82fe5eb151 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassBuilder.java @@ -1,67 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StorageClassBuilder extends V1StorageClassFluentImpl implements VisitableBuilder{ +public class V1StorageClassBuilder extends V1StorageClassFluent implements VisitableBuilder{ public V1StorageClassBuilder() { - this(false); - } - public V1StorageClassBuilder(Boolean validationEnabled) { - this(new V1StorageClass(), validationEnabled); + this(new V1StorageClass()); } + public V1StorageClassBuilder(V1StorageClassFluent fluent) { - this(fluent, false); - } - public V1StorageClassBuilder(V1StorageClassFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StorageClass(), validationEnabled); + this(fluent, new V1StorageClass()); } + public V1StorageClassBuilder(V1StorageClassFluent fluent,V1StorageClass instance) { - this(fluent, instance, false); - } - public V1StorageClassBuilder(V1StorageClassFluent fluent,V1StorageClass instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAllowVolumeExpansion(instance.getAllowVolumeExpansion()); - fluent.withAllowedTopologies(instance.getAllowedTopologies()); - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withMountOptions(instance.getMountOptions()); - fluent.withParameters(instance.getParameters()); - fluent.withProvisioner(instance.getProvisioner()); - fluent.withReclaimPolicy(instance.getReclaimPolicy()); - fluent.withVolumeBindingMode(instance.getVolumeBindingMode()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StorageClassBuilder(V1StorageClass instance) { - this(instance,false); - } - public V1StorageClassBuilder(V1StorageClass instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAllowVolumeExpansion(instance.getAllowVolumeExpansion()); - this.withAllowedTopologies(instance.getAllowedTopologies()); - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withMountOptions(instance.getMountOptions()); - this.withParameters(instance.getParameters()); - this.withProvisioner(instance.getProvisioner()); - this.withReclaimPolicy(instance.getReclaimPolicy()); - this.withVolumeBindingMode(instance.getVolumeBindingMode()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StorageClassFluent fluent; - Boolean validationEnabled; + public V1StorageClass build() { V1StorageClass buildable = new V1StorageClass(); buildable.setAllowVolumeExpansion(fluent.getAllowVolumeExpansion()); - buildable.setAllowedTopologies(fluent.getAllowedTopologies()); + buildable.setAllowedTopologies(fluent.buildAllowedTopologies()); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); buildable.setMountOptions(fluent.getMountOptions()); buildable.setParameters(fluent.getParameters()); buildable.setProvisioner(fluent.getProvisioner()); @@ -70,4 +36,5 @@ public V1StorageClass build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassFluent.java index 3632b28273..a49c913813 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassFluent.java @@ -1,119 +1,533 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; import java.util.Map; - /** - * Generated - */ -public interface V1StorageClassFluent> extends Fluent{ - public Boolean getAllowVolumeExpansion(); - public A withAllowVolumeExpansion(Boolean allowVolumeExpansion); - public Boolean hasAllowVolumeExpansion(); - public A addToAllowedTopologies(int index,V1TopologySelectorTerm item); - public A setToAllowedTopologies(int index,V1TopologySelectorTerm item); - public A addToAllowedTopologies(io.kubernetes.client.openapi.models.V1TopologySelectorTerm... items); - public A addAllToAllowedTopologies(Collection items); - public A removeFromAllowedTopologies(io.kubernetes.client.openapi.models.V1TopologySelectorTerm... items); - public A removeAllFromAllowedTopologies(Collection items); - public A removeMatchingFromAllowedTopologies(Predicate predicate); - - /** - * This method has been deprecated, please use method buildAllowedTopologies instead. - * @return The buildable object. - */ - @Deprecated - public List getAllowedTopologies(); - public List buildAllowedTopologies(); - public V1TopologySelectorTerm buildAllowedTopology(int index); - public V1TopologySelectorTerm buildFirstAllowedTopology(); - public V1TopologySelectorTerm buildLastAllowedTopology(); - public V1TopologySelectorTerm buildMatchingAllowedTopology(Predicate predicate); - public Boolean hasMatchingAllowedTopology(Predicate predicate); - public A withAllowedTopologies(List allowedTopologies); - public A withAllowedTopologies(io.kubernetes.client.openapi.models.V1TopologySelectorTerm... allowedTopologies); - public Boolean hasAllowedTopologies(); - public V1StorageClassFluent.AllowedTopologiesNested addNewAllowedTopology(); - public V1StorageClassFluent.AllowedTopologiesNested addNewAllowedTopologyLike(V1TopologySelectorTerm item); - public V1StorageClassFluent.AllowedTopologiesNested setNewAllowedTopologyLike(int index,V1TopologySelectorTerm item); - public V1StorageClassFluent.AllowedTopologiesNested editAllowedTopology(int index); - public V1StorageClassFluent.AllowedTopologiesNested editFirstAllowedTopology(); - public V1StorageClassFluent.AllowedTopologiesNested editLastAllowedTopology(); - public V1StorageClassFluent.AllowedTopologiesNested editMatchingAllowedTopology(Predicate predicate); - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1StorageClassFluent.MetadataNested withNewMetadata(); - public V1StorageClassFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1StorageClassFluent.MetadataNested editMetadata(); - public V1StorageClassFluent.MetadataNested editOrNewMetadata(); - public V1StorageClassFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A addToMountOptions(int index,String item); - public A setToMountOptions(int index,String item); - public A addToMountOptions(java.lang.String... items); - public A addAllToMountOptions(Collection items); - public A removeFromMountOptions(java.lang.String... items); - public A removeAllFromMountOptions(Collection items); - public List getMountOptions(); - public String getMountOption(int index); - public String getFirstMountOption(); - public String getLastMountOption(); - public String getMatchingMountOption(Predicate predicate); - public Boolean hasMatchingMountOption(Predicate predicate); - public A withMountOptions(List mountOptions); - public A withMountOptions(java.lang.String... mountOptions); - public Boolean hasMountOptions(); - public A addToParameters(String key,String value); - public A addToParameters(Map map); - public A removeFromParameters(String key); - public A removeFromParameters(Map map); - public Map getParameters(); - public A withParameters(Map parameters); - public Boolean hasParameters(); - public String getProvisioner(); - public A withProvisioner(String provisioner); - public Boolean hasProvisioner(); - public String getReclaimPolicy(); - public A withReclaimPolicy(String reclaimPolicy); - public Boolean hasReclaimPolicy(); - public String getVolumeBindingMode(); - public A withVolumeBindingMode(String volumeBindingMode); - public Boolean hasVolumeBindingMode(); - public A withAllowVolumeExpansion(); - public interface AllowedTopologiesNested extends Nested,V1TopologySelectorTermFluent>{ - public N and(); - public N endAllowedTopology(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StorageClassFluent> extends BaseFluent{ + public V1StorageClassFluent() { + } + + public V1StorageClassFluent(V1StorageClass instance) { + this.copyInstance(instance); + } + private Boolean allowVolumeExpansion; + private ArrayList allowedTopologies; + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private List mountOptions; + private Map parameters; + private String provisioner; + private String reclaimPolicy; + private String volumeBindingMode; + + protected void copyInstance(V1StorageClass instance) { + instance = (instance != null ? instance : new V1StorageClass()); + if (instance != null) { + this.withAllowVolumeExpansion(instance.getAllowVolumeExpansion()); + this.withAllowedTopologies(instance.getAllowedTopologies()); + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withMountOptions(instance.getMountOptions()); + this.withParameters(instance.getParameters()); + this.withProvisioner(instance.getProvisioner()); + this.withReclaimPolicy(instance.getReclaimPolicy()); + this.withVolumeBindingMode(instance.getVolumeBindingMode()); + } + } + + public Boolean getAllowVolumeExpansion() { + return this.allowVolumeExpansion; + } + + public A withAllowVolumeExpansion(Boolean allowVolumeExpansion) { + this.allowVolumeExpansion = allowVolumeExpansion; + return (A) this; + } + + public boolean hasAllowVolumeExpansion() { + return this.allowVolumeExpansion != null; + } + + public A addToAllowedTopologies(int index,V1TopologySelectorTerm item) { + if (this.allowedTopologies == null) {this.allowedTopologies = new ArrayList();} + V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item); + if (index < 0 || index >= allowedTopologies.size()) { _visitables.get("allowedTopologies").add(builder); allowedTopologies.add(builder); } else { _visitables.get("allowedTopologies").add(index, builder); allowedTopologies.add(index, builder);} + return (A)this; + } + + public A setToAllowedTopologies(int index,V1TopologySelectorTerm item) { + if (this.allowedTopologies == null) {this.allowedTopologies = new ArrayList();} + V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item); + if (index < 0 || index >= allowedTopologies.size()) { _visitables.get("allowedTopologies").add(builder); allowedTopologies.add(builder); } else { _visitables.get("allowedTopologies").set(index, builder); allowedTopologies.set(index, builder);} + return (A)this; + } + + public A addToAllowedTopologies(io.kubernetes.client.openapi.models.V1TopologySelectorTerm... items) { + if (this.allowedTopologies == null) {this.allowedTopologies = new ArrayList();} + for (V1TopologySelectorTerm item : items) {V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item);_visitables.get("allowedTopologies").add(builder);this.allowedTopologies.add(builder);} return (A)this; + } + + public A addAllToAllowedTopologies(Collection items) { + if (this.allowedTopologies == null) {this.allowedTopologies = new ArrayList();} + for (V1TopologySelectorTerm item : items) {V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item);_visitables.get("allowedTopologies").add(builder);this.allowedTopologies.add(builder);} return (A)this; + } + + public A removeFromAllowedTopologies(io.kubernetes.client.openapi.models.V1TopologySelectorTerm... items) { + if (this.allowedTopologies == null) return (A)this; + for (V1TopologySelectorTerm item : items) {V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item);_visitables.get("allowedTopologies").remove(builder); this.allowedTopologies.remove(builder);} return (A)this; + } + + public A removeAllFromAllowedTopologies(Collection items) { + if (this.allowedTopologies == null) return (A)this; + for (V1TopologySelectorTerm item : items) {V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item);_visitables.get("allowedTopologies").remove(builder); this.allowedTopologies.remove(builder);} return (A)this; + } + + public A removeMatchingFromAllowedTopologies(Predicate predicate) { + if (allowedTopologies == null) return (A) this; + final Iterator each = allowedTopologies.iterator(); + final List visitables = _visitables.get("allowedTopologies"); + while (each.hasNext()) { + V1TopologySelectorTermBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildAllowedTopologies() { + return this.allowedTopologies != null ? build(allowedTopologies) : null; + } + + public V1TopologySelectorTerm buildAllowedTopology(int index) { + return this.allowedTopologies.get(index).build(); + } + + public V1TopologySelectorTerm buildFirstAllowedTopology() { + return this.allowedTopologies.get(0).build(); + } + + public V1TopologySelectorTerm buildLastAllowedTopology() { + return this.allowedTopologies.get(allowedTopologies.size() - 1).build(); + } + + public V1TopologySelectorTerm buildMatchingAllowedTopology(Predicate predicate) { + for (V1TopologySelectorTermBuilder item : allowedTopologies) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingAllowedTopology(Predicate predicate) { + for (V1TopologySelectorTermBuilder item : allowedTopologies) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAllowedTopologies(List allowedTopologies) { + if (this.allowedTopologies != null) { + this._visitables.get("allowedTopologies").clear(); + } + if (allowedTopologies != null) { + this.allowedTopologies = new ArrayList(); + for (V1TopologySelectorTerm item : allowedTopologies) { + this.addToAllowedTopologies(item); + } + } else { + this.allowedTopologies = null; + } + return (A) this; + } + + public A withAllowedTopologies(io.kubernetes.client.openapi.models.V1TopologySelectorTerm... allowedTopologies) { + if (this.allowedTopologies != null) { + this.allowedTopologies.clear(); + _visitables.remove("allowedTopologies"); + } + if (allowedTopologies != null) { + for (V1TopologySelectorTerm item : allowedTopologies) { + this.addToAllowedTopologies(item); + } + } + return (A) this; + } + + public boolean hasAllowedTopologies() { + return this.allowedTopologies != null && !this.allowedTopologies.isEmpty(); + } + + public AllowedTopologiesNested addNewAllowedTopology() { + return new AllowedTopologiesNested(-1, null); + } + + public AllowedTopologiesNested addNewAllowedTopologyLike(V1TopologySelectorTerm item) { + return new AllowedTopologiesNested(-1, item); + } + + public AllowedTopologiesNested setNewAllowedTopologyLike(int index,V1TopologySelectorTerm item) { + return new AllowedTopologiesNested(index, item); + } + + public AllowedTopologiesNested editAllowedTopology(int index) { + if (allowedTopologies.size() <= index) throw new RuntimeException("Can't edit allowedTopologies. Index exceeds size."); + return setNewAllowedTopologyLike(index, buildAllowedTopology(index)); + } + + public AllowedTopologiesNested editFirstAllowedTopology() { + if (allowedTopologies.size() == 0) throw new RuntimeException("Can't edit first allowedTopologies. The list is empty."); + return setNewAllowedTopologyLike(0, buildAllowedTopology(0)); + } + + public AllowedTopologiesNested editLastAllowedTopology() { + int index = allowedTopologies.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last allowedTopologies. The list is empty."); + return setNewAllowedTopologyLike(index, buildAllowedTopology(index)); + } + + public AllowedTopologiesNested editMatchingAllowedTopology(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); } - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public A addToMountOptions(int index,String item) { + if (this.mountOptions == null) {this.mountOptions = new ArrayList();} + this.mountOptions.add(index, item); + return (A)this; + } + + public A setToMountOptions(int index,String item) { + if (this.mountOptions == null) {this.mountOptions = new ArrayList();} + this.mountOptions.set(index, item); return (A)this; + } + + public A addToMountOptions(java.lang.String... items) { + if (this.mountOptions == null) {this.mountOptions = new ArrayList();} + for (String item : items) {this.mountOptions.add(item);} return (A)this; + } + + public A addAllToMountOptions(Collection items) { + if (this.mountOptions == null) {this.mountOptions = new ArrayList();} + for (String item : items) {this.mountOptions.add(item);} return (A)this; + } + + public A removeFromMountOptions(java.lang.String... items) { + if (this.mountOptions == null) return (A)this; + for (String item : items) { this.mountOptions.remove(item);} return (A)this; + } + + public A removeAllFromMountOptions(Collection items) { + if (this.mountOptions == null) return (A)this; + for (String item : items) { this.mountOptions.remove(item);} return (A)this; + } + + public List getMountOptions() { + return this.mountOptions; + } + + public String getMountOption(int index) { + return this.mountOptions.get(index); + } + + public String getFirstMountOption() { + return this.mountOptions.get(0); + } + + public String getLastMountOption() { + return this.mountOptions.get(mountOptions.size() - 1); + } + + public String getMatchingMountOption(Predicate predicate) { + for (String item : mountOptions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingMountOption(Predicate predicate) { + for (String item : mountOptions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMountOptions(List mountOptions) { + if (mountOptions != null) { + this.mountOptions = new ArrayList(); + for (String item : mountOptions) { + this.addToMountOptions(item); + } + } else { + this.mountOptions = null; + } + return (A) this; + } + + public A withMountOptions(java.lang.String... mountOptions) { + if (this.mountOptions != null) { + this.mountOptions.clear(); + _visitables.remove("mountOptions"); + } + if (mountOptions != null) { + for (String item : mountOptions) { + this.addToMountOptions(item); + } + } + return (A) this; + } + + public boolean hasMountOptions() { + return this.mountOptions != null && !this.mountOptions.isEmpty(); + } + + public A addToParameters(String key,String value) { + if(this.parameters == null && key != null && value != null) { this.parameters = new LinkedHashMap(); } + if(key != null && value != null) {this.parameters.put(key, value);} return (A)this; + } + + public A addToParameters(Map map) { + if(this.parameters == null && map != null) { this.parameters = new LinkedHashMap(); } + if(map != null) { this.parameters.putAll(map);} return (A)this; + } + + public A removeFromParameters(String key) { + if(this.parameters == null) { return (A) this; } + if(key != null && this.parameters != null) {this.parameters.remove(key);} return (A)this; + } + + public A removeFromParameters(Map map) { + if(this.parameters == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.parameters != null){this.parameters.remove(key);}}} return (A)this; + } + + public Map getParameters() { + return this.parameters; + } + + public A withParameters(Map parameters) { + if (parameters == null) { + this.parameters = null; + } else { + this.parameters = new LinkedHashMap(parameters); + } + return (A) this; + } + + public boolean hasParameters() { + return this.parameters != null; + } + + public String getProvisioner() { + return this.provisioner; + } + + public A withProvisioner(String provisioner) { + this.provisioner = provisioner; + return (A) this; + } + + public boolean hasProvisioner() { + return this.provisioner != null; + } + + public String getReclaimPolicy() { + return this.reclaimPolicy; + } + + public A withReclaimPolicy(String reclaimPolicy) { + this.reclaimPolicy = reclaimPolicy; + return (A) this; + } + + public boolean hasReclaimPolicy() { + return this.reclaimPolicy != null; + } + + public String getVolumeBindingMode() { + return this.volumeBindingMode; + } + + public A withVolumeBindingMode(String volumeBindingMode) { + this.volumeBindingMode = volumeBindingMode; + return (A) this; + } + + public boolean hasVolumeBindingMode() { + return this.volumeBindingMode != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StorageClassFluent that = (V1StorageClassFluent) o; + if (!java.util.Objects.equals(allowVolumeExpansion, that.allowVolumeExpansion)) return false; + if (!java.util.Objects.equals(allowedTopologies, that.allowedTopologies)) return false; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(mountOptions, that.mountOptions)) return false; + if (!java.util.Objects.equals(parameters, that.parameters)) return false; + if (!java.util.Objects.equals(provisioner, that.provisioner)) return false; + if (!java.util.Objects.equals(reclaimPolicy, that.reclaimPolicy)) return false; + if (!java.util.Objects.equals(volumeBindingMode, that.volumeBindingMode)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(allowVolumeExpansion, allowedTopologies, apiVersion, kind, metadata, mountOptions, parameters, provisioner, reclaimPolicy, volumeBindingMode, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (allowVolumeExpansion != null) { sb.append("allowVolumeExpansion:"); sb.append(allowVolumeExpansion + ","); } + if (allowedTopologies != null && !allowedTopologies.isEmpty()) { sb.append("allowedTopologies:"); sb.append(allowedTopologies + ","); } + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (mountOptions != null && !mountOptions.isEmpty()) { sb.append("mountOptions:"); sb.append(mountOptions + ","); } + if (parameters != null && !parameters.isEmpty()) { sb.append("parameters:"); sb.append(parameters + ","); } + if (provisioner != null) { sb.append("provisioner:"); sb.append(provisioner + ","); } + if (reclaimPolicy != null) { sb.append("reclaimPolicy:"); sb.append(reclaimPolicy + ","); } + if (volumeBindingMode != null) { sb.append("volumeBindingMode:"); sb.append(volumeBindingMode); } + sb.append("}"); + return sb.toString(); + } + + public A withAllowVolumeExpansion() { + return withAllowVolumeExpansion(true); + } + public class AllowedTopologiesNested extends V1TopologySelectorTermFluent> implements Nested{ + AllowedTopologiesNested(int index,V1TopologySelectorTerm item) { + this.index = index; + this.builder = new V1TopologySelectorTermBuilder(this, item); + } + V1TopologySelectorTermBuilder builder; + int index; + + public N and() { + return (N) V1StorageClassFluent.this.setToAllowedTopologies(index,builder.build()); + } + public N endAllowedTopology() { + return and(); + } + + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1StorageClassFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassFluentImpl.java deleted file mode 100644 index e1bef99bc9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassFluentImpl.java +++ /dev/null @@ -1,406 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StorageClassFluentImpl> extends BaseFluent implements V1StorageClassFluent{ - public V1StorageClassFluentImpl() { - } - public V1StorageClassFluentImpl(V1StorageClass instance) { - if (instance != null) { - this.withAllowVolumeExpansion(instance.getAllowVolumeExpansion()); - this.withAllowedTopologies(instance.getAllowedTopologies()); - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withMountOptions(instance.getMountOptions()); - this.withParameters(instance.getParameters()); - this.withProvisioner(instance.getProvisioner()); - this.withReclaimPolicy(instance.getReclaimPolicy()); - this.withVolumeBindingMode(instance.getVolumeBindingMode()); - } - } - private Boolean allowVolumeExpansion; - private ArrayList allowedTopologies; - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private List mountOptions; - private Map parameters; - private String provisioner; - private String reclaimPolicy; - private String volumeBindingMode; - public Boolean getAllowVolumeExpansion() { - return this.allowVolumeExpansion; - } - public A withAllowVolumeExpansion(Boolean allowVolumeExpansion) { - this.allowVolumeExpansion=allowVolumeExpansion; return (A) this; - } - public Boolean hasAllowVolumeExpansion() { - return this.allowVolumeExpansion != null; - } - public A addToAllowedTopologies(int index,V1TopologySelectorTerm item) { - if (this.allowedTopologies == null) {this.allowedTopologies = new ArrayList();} - V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item); - if (index < 0 || index >= allowedTopologies.size()) { _visitables.get("allowedTopologies").add(builder); allowedTopologies.add(builder); } else { _visitables.get("allowedTopologies").add(index, builder); allowedTopologies.add(index, builder);} - return (A)this; - } - public A setToAllowedTopologies(int index,V1TopologySelectorTerm item) { - if (this.allowedTopologies == null) {this.allowedTopologies = new ArrayList();} - V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item); - if (index < 0 || index >= allowedTopologies.size()) { _visitables.get("allowedTopologies").add(builder); allowedTopologies.add(builder); } else { _visitables.get("allowedTopologies").set(index, builder); allowedTopologies.set(index, builder);} - return (A)this; - } - public A addToAllowedTopologies(io.kubernetes.client.openapi.models.V1TopologySelectorTerm... items) { - if (this.allowedTopologies == null) {this.allowedTopologies = new ArrayList();} - for (V1TopologySelectorTerm item : items) {V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item);_visitables.get("allowedTopologies").add(builder);this.allowedTopologies.add(builder);} return (A)this; - } - public A addAllToAllowedTopologies(Collection items) { - if (this.allowedTopologies == null) {this.allowedTopologies = new ArrayList();} - for (V1TopologySelectorTerm item : items) {V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item);_visitables.get("allowedTopologies").add(builder);this.allowedTopologies.add(builder);} return (A)this; - } - public A removeFromAllowedTopologies(io.kubernetes.client.openapi.models.V1TopologySelectorTerm... items) { - for (V1TopologySelectorTerm item : items) {V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item);_visitables.get("allowedTopologies").remove(builder);if (this.allowedTopologies != null) {this.allowedTopologies.remove(builder);}} return (A)this; - } - public A removeAllFromAllowedTopologies(Collection items) { - for (V1TopologySelectorTerm item : items) {V1TopologySelectorTermBuilder builder = new V1TopologySelectorTermBuilder(item);_visitables.get("allowedTopologies").remove(builder);if (this.allowedTopologies != null) {this.allowedTopologies.remove(builder);}} return (A)this; - } - public A removeMatchingFromAllowedTopologies(Predicate predicate) { - if (allowedTopologies == null) return (A) this; - final Iterator each = allowedTopologies.iterator(); - final List visitables = _visitables.get("allowedTopologies"); - while (each.hasNext()) { - V1TopologySelectorTermBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildAllowedTopologies instead. - * @return The buildable object. - */ - @Deprecated - public List getAllowedTopologies() { - return allowedTopologies != null ? build(allowedTopologies) : null; - } - public List buildAllowedTopologies() { - return allowedTopologies != null ? build(allowedTopologies) : null; - } - public V1TopologySelectorTerm buildAllowedTopology(int index) { - return this.allowedTopologies.get(index).build(); - } - public V1TopologySelectorTerm buildFirstAllowedTopology() { - return this.allowedTopologies.get(0).build(); - } - public V1TopologySelectorTerm buildLastAllowedTopology() { - return this.allowedTopologies.get(allowedTopologies.size() - 1).build(); - } - public V1TopologySelectorTerm buildMatchingAllowedTopology(Predicate predicate) { - for (V1TopologySelectorTermBuilder item: allowedTopologies) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingAllowedTopology(Predicate predicate) { - for (V1TopologySelectorTermBuilder item: allowedTopologies) { if(predicate.test(item)){ return true;} } return false; - } - public A withAllowedTopologies(List allowedTopologies) { - if (this.allowedTopologies != null) { _visitables.get("allowedTopologies").clear();} - if (allowedTopologies != null) {this.allowedTopologies = new ArrayList(); for (V1TopologySelectorTerm item : allowedTopologies){this.addToAllowedTopologies(item);}} else { this.allowedTopologies = null;} return (A) this; - } - public A withAllowedTopologies(io.kubernetes.client.openapi.models.V1TopologySelectorTerm... allowedTopologies) { - if (this.allowedTopologies != null) {this.allowedTopologies.clear(); _visitables.remove("allowedTopologies"); } - if (allowedTopologies != null) {for (V1TopologySelectorTerm item :allowedTopologies){ this.addToAllowedTopologies(item);}} return (A) this; - } - public Boolean hasAllowedTopologies() { - return allowedTopologies != null && !allowedTopologies.isEmpty(); - } - public V1StorageClassFluentImpl.AllowedTopologiesNested addNewAllowedTopology() { - return new V1StorageClassFluentImpl.AllowedTopologiesNestedImpl(); - } - public V1StorageClassFluentImpl.AllowedTopologiesNested addNewAllowedTopologyLike(V1TopologySelectorTerm item) { - return new V1StorageClassFluentImpl.AllowedTopologiesNestedImpl(-1, item); - } - public V1StorageClassFluentImpl.AllowedTopologiesNested setNewAllowedTopologyLike(int index,V1TopologySelectorTerm item) { - return new V1StorageClassFluentImpl.AllowedTopologiesNestedImpl(index, item); - } - public V1StorageClassFluentImpl.AllowedTopologiesNested editAllowedTopology(int index) { - if (allowedTopologies.size() <= index) throw new RuntimeException("Can't edit allowedTopologies. Index exceeds size."); - return setNewAllowedTopologyLike(index, buildAllowedTopology(index)); - } - public V1StorageClassFluentImpl.AllowedTopologiesNested editFirstAllowedTopology() { - if (allowedTopologies.size() == 0) throw new RuntimeException("Can't edit first allowedTopologies. The list is empty."); - return setNewAllowedTopologyLike(0, buildAllowedTopology(0)); - } - public V1StorageClassFluentImpl.AllowedTopologiesNested editLastAllowedTopology() { - int index = allowedTopologies.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last allowedTopologies. The list is empty."); - return setNewAllowedTopologyLike(index, buildAllowedTopology(index)); - } - public V1StorageClassFluentImpl.AllowedTopologiesNested editMatchingAllowedTopology(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1StorageClassFluentImpl.MetadataNestedImpl(); - } - public V1StorageClassFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1StorageClassFluentImpl.MetadataNestedImpl(item); - } - public V1StorageClassFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1StorageClassFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1StorageClassFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public A addToMountOptions(int index,String item) { - if (this.mountOptions == null) {this.mountOptions = new ArrayList();} - this.mountOptions.add(index, item); - return (A)this; - } - public A setToMountOptions(int index,String item) { - if (this.mountOptions == null) {this.mountOptions = new ArrayList();} - this.mountOptions.set(index, item); return (A)this; - } - public A addToMountOptions(java.lang.String... items) { - if (this.mountOptions == null) {this.mountOptions = new ArrayList();} - for (String item : items) {this.mountOptions.add(item);} return (A)this; - } - public A addAllToMountOptions(Collection items) { - if (this.mountOptions == null) {this.mountOptions = new ArrayList();} - for (String item : items) {this.mountOptions.add(item);} return (A)this; - } - public A removeFromMountOptions(java.lang.String... items) { - for (String item : items) {if (this.mountOptions!= null){ this.mountOptions.remove(item);}} return (A)this; - } - public A removeAllFromMountOptions(Collection items) { - for (String item : items) {if (this.mountOptions!= null){ this.mountOptions.remove(item);}} return (A)this; - } - public List getMountOptions() { - return this.mountOptions; - } - public String getMountOption(int index) { - return this.mountOptions.get(index); - } - public String getFirstMountOption() { - return this.mountOptions.get(0); - } - public String getLastMountOption() { - return this.mountOptions.get(mountOptions.size() - 1); - } - public String getMatchingMountOption(Predicate predicate) { - for (String item: mountOptions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingMountOption(Predicate predicate) { - for (String item: mountOptions) { if(predicate.test(item)){ return true;} } return false; - } - public A withMountOptions(List mountOptions) { - if (mountOptions != null) {this.mountOptions = new ArrayList(); for (String item : mountOptions){this.addToMountOptions(item);}} else { this.mountOptions = null;} return (A) this; - } - public A withMountOptions(java.lang.String... mountOptions) { - if (this.mountOptions != null) {this.mountOptions.clear(); _visitables.remove("mountOptions"); } - if (mountOptions != null) {for (String item :mountOptions){ this.addToMountOptions(item);}} return (A) this; - } - public Boolean hasMountOptions() { - return mountOptions != null && !mountOptions.isEmpty(); - } - public A addToParameters(String key,String value) { - if(this.parameters == null && key != null && value != null) { this.parameters = new LinkedHashMap(); } - if(key != null && value != null) {this.parameters.put(key, value);} return (A)this; - } - public A addToParameters(Map map) { - if(this.parameters == null && map != null) { this.parameters = new LinkedHashMap(); } - if(map != null) { this.parameters.putAll(map);} return (A)this; - } - public A removeFromParameters(String key) { - if(this.parameters == null) { return (A) this; } - if(key != null && this.parameters != null) {this.parameters.remove(key);} return (A)this; - } - public A removeFromParameters(Map map) { - if(this.parameters == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.parameters != null){this.parameters.remove(key);}}} return (A)this; - } - public Map getParameters() { - return this.parameters; - } - public A withParameters(Map parameters) { - if (parameters == null) { this.parameters = null;} else {this.parameters = new LinkedHashMap(parameters);} return (A) this; - } - public Boolean hasParameters() { - return this.parameters != null; - } - public String getProvisioner() { - return this.provisioner; - } - public A withProvisioner(String provisioner) { - this.provisioner=provisioner; return (A) this; - } - public Boolean hasProvisioner() { - return this.provisioner != null; - } - public String getReclaimPolicy() { - return this.reclaimPolicy; - } - public A withReclaimPolicy(String reclaimPolicy) { - this.reclaimPolicy=reclaimPolicy; return (A) this; - } - public Boolean hasReclaimPolicy() { - return this.reclaimPolicy != null; - } - public String getVolumeBindingMode() { - return this.volumeBindingMode; - } - public A withVolumeBindingMode(String volumeBindingMode) { - this.volumeBindingMode=volumeBindingMode; return (A) this; - } - public Boolean hasVolumeBindingMode() { - return this.volumeBindingMode != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StorageClassFluentImpl that = (V1StorageClassFluentImpl) o; - if (!java.util.Objects.equals(allowVolumeExpansion, that.allowVolumeExpansion)) return false; - - if (!java.util.Objects.equals(allowedTopologies, that.allowedTopologies)) return false; - - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(mountOptions, that.mountOptions)) return false; - - if (!java.util.Objects.equals(parameters, that.parameters)) return false; - - if (!java.util.Objects.equals(provisioner, that.provisioner)) return false; - - if (!java.util.Objects.equals(reclaimPolicy, that.reclaimPolicy)) return false; - - if (!java.util.Objects.equals(volumeBindingMode, that.volumeBindingMode)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(allowVolumeExpansion, allowedTopologies, apiVersion, kind, metadata, mountOptions, parameters, provisioner, reclaimPolicy, volumeBindingMode, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (allowVolumeExpansion != null) { sb.append("allowVolumeExpansion:"); sb.append(allowVolumeExpansion + ","); } - if (allowedTopologies != null) { sb.append("allowedTopologies:"); sb.append(allowedTopologies + ","); } - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (mountOptions != null && !mountOptions.isEmpty()) { sb.append("mountOptions:"); sb.append(mountOptions + ","); } - if (parameters != null && !parameters.isEmpty()) { sb.append("parameters:"); sb.append(parameters + ","); } - if (provisioner != null) { sb.append("provisioner:"); sb.append(provisioner + ","); } - if (reclaimPolicy != null) { sb.append("reclaimPolicy:"); sb.append(reclaimPolicy + ","); } - if (volumeBindingMode != null) { sb.append("volumeBindingMode:"); sb.append(volumeBindingMode); } - sb.append("}"); - return sb.toString(); - } - public A withAllowVolumeExpansion() { - return withAllowVolumeExpansion(true); - } - class AllowedTopologiesNestedImpl extends V1TopologySelectorTermFluentImpl> implements V1StorageClassFluentImpl.AllowedTopologiesNested,Nested{ - AllowedTopologiesNestedImpl(int index,V1TopologySelectorTerm item) { - this.index = index; - this.builder = new V1TopologySelectorTermBuilder(this, item); - } - AllowedTopologiesNestedImpl() { - this.index = -1; - this.builder = new V1TopologySelectorTermBuilder(this); - } - V1TopologySelectorTermBuilder builder; - int index; - public N and() { - return (N) V1StorageClassFluentImpl.this.setToAllowedTopologies(index,builder.build()); - } - public N endAllowedTopology() { - return and(); - } - - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1StorageClassFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1StorageClassFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListBuilder.java index 5260b94e24..53c37c41bd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StorageClassListBuilder extends V1StorageClassListFluentImpl implements VisitableBuilder{ +public class V1StorageClassListBuilder extends V1StorageClassListFluent implements VisitableBuilder{ public V1StorageClassListBuilder() { - this(false); - } - public V1StorageClassListBuilder(Boolean validationEnabled) { - this(new V1StorageClassList(), validationEnabled); + this(new V1StorageClassList()); } + public V1StorageClassListBuilder(V1StorageClassListFluent fluent) { - this(fluent, false); - } - public V1StorageClassListBuilder(V1StorageClassListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StorageClassList(), validationEnabled); + this(fluent, new V1StorageClassList()); } + public V1StorageClassListBuilder(V1StorageClassListFluent fluent,V1StorageClassList instance) { - this(fluent, instance, false); - } - public V1StorageClassListBuilder(V1StorageClassListFluent fluent,V1StorageClassList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StorageClassListBuilder(V1StorageClassList instance) { - this(instance,false); - } - public V1StorageClassListBuilder(V1StorageClassList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StorageClassListFluent fluent; - Boolean validationEnabled; + public V1StorageClassList build() { V1StorageClassList buildable = new V1StorageClassList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListFluent.java index a109bab2c7..3cadf3615f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1StorageClassListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1StorageClass item); - public A setToItems(int index,V1StorageClass item); - public A addToItems(io.kubernetes.client.openapi.models.V1StorageClass... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1StorageClass... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1StorageClass buildItem(int index); - public V1StorageClass buildFirstItem(); - public V1StorageClass buildLastItem(); - public V1StorageClass buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1StorageClass... items); - public Boolean hasItems(); - public V1StorageClassListFluent.ItemsNested addNewItem(); - public V1StorageClassListFluent.ItemsNested addNewItemLike(V1StorageClass item); - public V1StorageClassListFluent.ItemsNested setNewItemLike(int index,V1StorageClass item); - public V1StorageClassListFluent.ItemsNested editItem(int index); - public V1StorageClassListFluent.ItemsNested editFirstItem(); - public V1StorageClassListFluent.ItemsNested editLastItem(); - public V1StorageClassListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1StorageClassListFluent.MetadataNested withNewMetadata(); - public V1StorageClassListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1StorageClassListFluent.MetadataNested editMetadata(); - public V1StorageClassListFluent.MetadataNested editOrNewMetadata(); - public V1StorageClassListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1StorageClassFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StorageClassListFluent> extends BaseFluent{ + public V1StorageClassListFluent() { + } + + public V1StorageClassListFluent(V1StorageClassList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1StorageClassList instance) { + instance = (instance != null ? instance : new V1StorageClassList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1StorageClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1StorageClassBuilder builder = new V1StorageClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1StorageClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1StorageClassBuilder builder = new V1StorageClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1StorageClass... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1StorageClass item : items) {V1StorageClassBuilder builder = new V1StorageClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1StorageClass item : items) {V1StorageClassBuilder builder = new V1StorageClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1StorageClass... items) { + if (this.items == null) return (A)this; + for (V1StorageClass item : items) {V1StorageClassBuilder builder = new V1StorageClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1StorageClass item : items) {V1StorageClassBuilder builder = new V1StorageClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1StorageClassBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1StorageClass buildItem(int index) { + return this.items.get(index).build(); + } + + public V1StorageClass buildFirstItem() { + return this.items.get(0).build(); + } + + public V1StorageClass buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1StorageClass buildMatchingItem(Predicate predicate) { + for (V1StorageClassBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1StorageClassBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1StorageClass item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1StorageClass... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1StorageClass item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1StorageClass item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1StorageClass item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StorageClassListFluent that = (V1StorageClassListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1StorageClassFluent> implements Nested{ + ItemsNested(int index,V1StorageClass item) { + this.index = index; + this.builder = new V1StorageClassBuilder(this, item); + } + V1StorageClassBuilder builder; + int index; + public N and() { + return (N) V1StorageClassListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1StorageClassListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListFluentImpl.java deleted file mode 100644 index 551f7c440d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageClassListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StorageClassListFluentImpl> extends BaseFluent implements V1StorageClassListFluent{ - public V1StorageClassListFluentImpl() { - } - public V1StorageClassListFluentImpl(V1StorageClassList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1StorageClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1StorageClassBuilder builder = new V1StorageClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1StorageClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1StorageClassBuilder builder = new V1StorageClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1StorageClass... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1StorageClass item : items) {V1StorageClassBuilder builder = new V1StorageClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1StorageClass item : items) {V1StorageClassBuilder builder = new V1StorageClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1StorageClass... items) { - for (V1StorageClass item : items) {V1StorageClassBuilder builder = new V1StorageClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1StorageClass item : items) {V1StorageClassBuilder builder = new V1StorageClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1StorageClassBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1StorageClass buildItem(int index) { - return this.items.get(index).build(); - } - public V1StorageClass buildFirstItem() { - return this.items.get(0).build(); - } - public V1StorageClass buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1StorageClass buildMatchingItem(Predicate predicate) { - for (V1StorageClassBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1StorageClassBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1StorageClass item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1StorageClass... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1StorageClass item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1StorageClassListFluentImpl.ItemsNested addNewItem() { - return new V1StorageClassListFluentImpl.ItemsNestedImpl(); - } - public V1StorageClassListFluentImpl.ItemsNested addNewItemLike(V1StorageClass item) { - return new V1StorageClassListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1StorageClassListFluentImpl.ItemsNested setNewItemLike(int index,V1StorageClass item) { - return new V1StorageClassListFluentImpl.ItemsNestedImpl(index, item); - } - public V1StorageClassListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1StorageClassListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1StorageClassListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1StorageClassListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1StorageClassListFluentImpl.MetadataNestedImpl(); - } - public V1StorageClassListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1StorageClassListFluentImpl.MetadataNestedImpl(item); - } - public V1StorageClassListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1StorageClassListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1StorageClassListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StorageClassListFluentImpl that = (V1StorageClassListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1StorageClassFluentImpl> implements V1StorageClassListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1StorageClass item) { - this.index = index; - this.builder = new V1StorageClassBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1StorageClassBuilder(this); - } - V1StorageClassBuilder builder; - int index; - public N and() { - return (N) V1StorageClassListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1StorageClassListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1StorageClassListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceBuilder.java index 903d0c9052..29f1f23c4d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StorageOSPersistentVolumeSourceBuilder extends V1StorageOSPersistentVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1StorageOSPersistentVolumeSourceBuilder extends V1StorageOSPersistentVolumeSourceFluent implements VisitableBuilder{ public V1StorageOSPersistentVolumeSourceBuilder() { - this(false); - } - public V1StorageOSPersistentVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1StorageOSPersistentVolumeSource(), validationEnabled); + this(new V1StorageOSPersistentVolumeSource()); } + public V1StorageOSPersistentVolumeSourceBuilder(V1StorageOSPersistentVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1StorageOSPersistentVolumeSourceBuilder(V1StorageOSPersistentVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StorageOSPersistentVolumeSource(), validationEnabled); + this(fluent, new V1StorageOSPersistentVolumeSource()); } + public V1StorageOSPersistentVolumeSourceBuilder(V1StorageOSPersistentVolumeSourceFluent fluent,V1StorageOSPersistentVolumeSource instance) { - this(fluent, instance, false); - } - public V1StorageOSPersistentVolumeSourceBuilder(V1StorageOSPersistentVolumeSourceFluent fluent,V1StorageOSPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withVolumeName(instance.getVolumeName()); - fluent.withVolumeNamespace(instance.getVolumeNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StorageOSPersistentVolumeSourceBuilder(V1StorageOSPersistentVolumeSource instance) { - this(instance,false); - } - public V1StorageOSPersistentVolumeSourceBuilder(V1StorageOSPersistentVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withVolumeName(instance.getVolumeName()); - this.withVolumeNamespace(instance.getVolumeNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StorageOSPersistentVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1StorageOSPersistentVolumeSource build() { V1StorageOSPersistentVolumeSource buildable = new V1StorageOSPersistentVolumeSource(); buildable.setFsType(fluent.getFsType()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setVolumeName(fluent.getVolumeName()); buildable.setVolumeNamespace(fluent.getVolumeNamespace()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceFluent.java index cd3b5689f4..b8e4352540 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceFluent.java @@ -1,48 +1,179 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; - /** - * Generated - */ -public interface V1StorageOSPersistentVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getSecretRef(); - public V1ObjectReference buildSecretRef(); - public A withSecretRef(V1ObjectReference secretRef); - public Boolean hasSecretRef(); - public V1StorageOSPersistentVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1StorageOSPersistentVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1ObjectReference item); - public V1StorageOSPersistentVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1StorageOSPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1StorageOSPersistentVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1ObjectReference item); - public String getVolumeName(); - public A withVolumeName(String volumeName); - public Boolean hasVolumeName(); - public String getVolumeNamespace(); - public A withVolumeNamespace(String volumeNamespace); - public Boolean hasVolumeNamespace(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1ObjectReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StorageOSPersistentVolumeSourceFluent> extends BaseFluent{ + public V1StorageOSPersistentVolumeSourceFluent() { + } + + public V1StorageOSPersistentVolumeSourceFluent(V1StorageOSPersistentVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private Boolean readOnly; + private V1ObjectReferenceBuilder secretRef; + private String volumeName; + private String volumeNamespace; + + protected void copyInstance(V1StorageOSPersistentVolumeSource instance) { + instance = (instance != null ? instance : new V1StorageOSPersistentVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withVolumeName(instance.getVolumeName()); + this.withVolumeNamespace(instance.getVolumeNamespace()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1ObjectReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1ObjectReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1ObjectReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1ObjectReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); } + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1ObjectReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1ObjectReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getVolumeName() { + return this.volumeName; + } + + public A withVolumeName(String volumeName) { + this.volumeName = volumeName; + return (A) this; + } + + public boolean hasVolumeName() { + return this.volumeName != null; + } + + public String getVolumeNamespace() { + return this.volumeNamespace; + } + + public A withVolumeNamespace(String volumeNamespace) { + this.volumeNamespace = volumeNamespace; + return (A) this; + } + + public boolean hasVolumeNamespace() { + return this.volumeNamespace != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StorageOSPersistentVolumeSourceFluent that = (V1StorageOSPersistentVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; + if (!java.util.Objects.equals(volumeNamespace, that.volumeNamespace)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, readOnly, secretRef, volumeName, volumeNamespace, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName + ","); } + if (volumeNamespace != null) { sb.append("volumeNamespace:"); sb.append(volumeNamespace); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1ObjectReferenceFluent> implements Nested{ + SecretRefNested(V1ObjectReference item) { + this.builder = new V1ObjectReferenceBuilder(this, item); + } + V1ObjectReferenceBuilder builder; + + public N and() { + return (N) V1StorageOSPersistentVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceFluentImpl.java deleted file mode 100644 index 84e68a1496..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSPersistentVolumeSourceFluentImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StorageOSPersistentVolumeSourceFluentImpl> extends BaseFluent implements V1StorageOSPersistentVolumeSourceFluent{ - public V1StorageOSPersistentVolumeSourceFluentImpl() { - } - public V1StorageOSPersistentVolumeSourceFluentImpl(V1StorageOSPersistentVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withVolumeName(instance.getVolumeName()); - this.withVolumeNamespace(instance.getVolumeNamespace()); - } - } - private String fsType; - private Boolean readOnly; - private V1ObjectReferenceBuilder secretRef; - private String volumeName; - private String volumeNamespace; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1ObjectReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1ObjectReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1ObjectReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1StorageOSPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1StorageOSPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1StorageOSPersistentVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1ObjectReference item) { - return new V1StorageOSPersistentVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1StorageOSPersistentVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1StorageOSPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1ObjectReferenceBuilder().build()); - } - public V1StorageOSPersistentVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1ObjectReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getVolumeName() { - return this.volumeName; - } - public A withVolumeName(String volumeName) { - this.volumeName=volumeName; return (A) this; - } - public Boolean hasVolumeName() { - return this.volumeName != null; - } - public String getVolumeNamespace() { - return this.volumeNamespace; - } - public A withVolumeNamespace(String volumeNamespace) { - this.volumeNamespace=volumeNamespace; return (A) this; - } - public Boolean hasVolumeNamespace() { - return this.volumeNamespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StorageOSPersistentVolumeSourceFluentImpl that = (V1StorageOSPersistentVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; - - if (!java.util.Objects.equals(volumeNamespace, that.volumeNamespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, readOnly, secretRef, volumeName, volumeNamespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName + ","); } - if (volumeNamespace != null) { sb.append("volumeNamespace:"); sb.append(volumeNamespace); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1ObjectReferenceFluentImpl> implements V1StorageOSPersistentVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1ObjectReference item) { - this.builder = new V1ObjectReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1ObjectReferenceBuilder(this); - } - V1ObjectReferenceBuilder builder; - public N and() { - return (N) V1StorageOSPersistentVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceBuilder.java index 63872451c4..62266f9f4f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1StorageOSVolumeSourceBuilder extends V1StorageOSVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1StorageOSVolumeSourceBuilder extends V1StorageOSVolumeSourceFluent implements VisitableBuilder{ public V1StorageOSVolumeSourceBuilder() { - this(false); - } - public V1StorageOSVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1StorageOSVolumeSource(), validationEnabled); + this(new V1StorageOSVolumeSource()); } + public V1StorageOSVolumeSourceBuilder(V1StorageOSVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1StorageOSVolumeSourceBuilder(V1StorageOSVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1StorageOSVolumeSource(), validationEnabled); + this(fluent, new V1StorageOSVolumeSource()); } + public V1StorageOSVolumeSourceBuilder(V1StorageOSVolumeSourceFluent fluent,V1StorageOSVolumeSource instance) { - this(fluent, instance, false); - } - public V1StorageOSVolumeSourceBuilder(V1StorageOSVolumeSourceFluent fluent,V1StorageOSVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSecretRef(instance.getSecretRef()); - fluent.withVolumeName(instance.getVolumeName()); - fluent.withVolumeNamespace(instance.getVolumeNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1StorageOSVolumeSourceBuilder(V1StorageOSVolumeSource instance) { - this(instance,false); - } - public V1StorageOSVolumeSourceBuilder(V1StorageOSVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withVolumeName(instance.getVolumeName()); - this.withVolumeNamespace(instance.getVolumeNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1StorageOSVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1StorageOSVolumeSource build() { V1StorageOSVolumeSource buildable = new V1StorageOSVolumeSource(); buildable.setFsType(fluent.getFsType()); buildable.setReadOnly(fluent.getReadOnly()); - buildable.setSecretRef(fluent.getSecretRef()); + buildable.setSecretRef(fluent.buildSecretRef()); buildable.setVolumeName(fluent.getVolumeName()); buildable.setVolumeNamespace(fluent.getVolumeNamespace()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceFluent.java index c1b3378bb0..30c20c62fe 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceFluent.java @@ -1,48 +1,179 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; - /** - * Generated - */ -public interface V1StorageOSVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef(); - public V1LocalObjectReference buildSecretRef(); - public A withSecretRef(V1LocalObjectReference secretRef); - public Boolean hasSecretRef(); - public V1StorageOSVolumeSourceFluent.SecretRefNested withNewSecretRef(); - public V1StorageOSVolumeSourceFluent.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item); - public V1StorageOSVolumeSourceFluent.SecretRefNested editSecretRef(); - public V1StorageOSVolumeSourceFluent.SecretRefNested editOrNewSecretRef(); - public V1StorageOSVolumeSourceFluent.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item); - public String getVolumeName(); - public A withVolumeName(String volumeName); - public Boolean hasVolumeName(); - public String getVolumeNamespace(); - public A withVolumeNamespace(String volumeNamespace); - public Boolean hasVolumeNamespace(); - public A withReadOnly(); - public interface SecretRefNested extends Nested,V1LocalObjectReferenceFluent>{ - public N and(); - public N endSecretRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1StorageOSVolumeSourceFluent> extends BaseFluent{ + public V1StorageOSVolumeSourceFluent() { + } + + public V1StorageOSVolumeSourceFluent(V1StorageOSVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private Boolean readOnly; + private V1LocalObjectReferenceBuilder secretRef; + private String volumeName; + private String volumeNamespace; + + protected void copyInstance(V1StorageOSVolumeSource instance) { + instance = (instance != null ? instance : new V1StorageOSVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withReadOnly(instance.getReadOnly()); + this.withSecretRef(instance.getSecretRef()); + this.withVolumeName(instance.getVolumeName()); + this.withVolumeNamespace(instance.getVolumeNamespace()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public V1LocalObjectReference buildSecretRef() { + return this.secretRef != null ? this.secretRef.build() : null; + } + + public A withSecretRef(V1LocalObjectReference secretRef) { + this._visitables.remove("secretRef"); + if (secretRef != null) { + this.secretRef = new V1LocalObjectReferenceBuilder(secretRef); + this._visitables.get("secretRef").add(this.secretRef); + } else { + this.secretRef = null; + this._visitables.get("secretRef").remove(this.secretRef); + } + return (A) this; + } + + public boolean hasSecretRef() { + return this.secretRef != null; + } + + public SecretRefNested withNewSecretRef() { + return new SecretRefNested(null); + } + + public SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { + return new SecretRefNested(item); + } + + public SecretRefNested editSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null)); } + public SecretRefNested editOrNewSecretRef() { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new V1LocalObjectReferenceBuilder().build())); + } + + public SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { + return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item)); + } + + public String getVolumeName() { + return this.volumeName; + } + + public A withVolumeName(String volumeName) { + this.volumeName = volumeName; + return (A) this; + } + + public boolean hasVolumeName() { + return this.volumeName != null; + } + + public String getVolumeNamespace() { + return this.volumeNamespace; + } + + public A withVolumeNamespace(String volumeNamespace) { + this.volumeNamespace = volumeNamespace; + return (A) this; + } + + public boolean hasVolumeNamespace() { + return this.volumeNamespace != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1StorageOSVolumeSourceFluent that = (V1StorageOSVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; + if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; + if (!java.util.Objects.equals(volumeNamespace, that.volumeNamespace)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, readOnly, secretRef, volumeName, volumeNamespace, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } + if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName + ","); } + if (volumeNamespace != null) { sb.append("volumeNamespace:"); sb.append(volumeNamespace); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + public class SecretRefNested extends V1LocalObjectReferenceFluent> implements Nested{ + SecretRefNested(V1LocalObjectReference item) { + this.builder = new V1LocalObjectReferenceBuilder(this, item); + } + V1LocalObjectReferenceBuilder builder; + + public N and() { + return (N) V1StorageOSVolumeSourceFluent.this.withSecretRef(builder.build()); + } + + public N endSecretRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceFluentImpl.java deleted file mode 100644 index 57bb89ed39..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1StorageOSVolumeSourceFluentImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1StorageOSVolumeSourceFluentImpl> extends BaseFluent implements V1StorageOSVolumeSourceFluent{ - public V1StorageOSVolumeSourceFluentImpl() { - } - public V1StorageOSVolumeSourceFluentImpl(V1StorageOSVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withReadOnly(instance.getReadOnly()); - this.withSecretRef(instance.getSecretRef()); - this.withVolumeName(instance.getVolumeName()); - this.withVolumeNamespace(instance.getVolumeNamespace()); - } - } - private String fsType; - private Boolean readOnly; - private V1LocalObjectReferenceBuilder secretRef; - private String volumeName; - private String volumeNamespace; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - - /** - * This method has been deprecated, please use method buildSecretRef instead. - * @return The buildable object. - */ - @Deprecated - public V1LocalObjectReference getSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public V1LocalObjectReference buildSecretRef() { - return this.secretRef!=null ?this.secretRef.build():null; - } - public A withSecretRef(V1LocalObjectReference secretRef) { - _visitables.get("secretRef").remove(this.secretRef); - if (secretRef!=null){ this.secretRef= new V1LocalObjectReferenceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} else { this.secretRef = null; _visitables.get("secretRef").remove(this.secretRef); } return (A) this; - } - public Boolean hasSecretRef() { - return this.secretRef != null; - } - public V1StorageOSVolumeSourceFluentImpl.SecretRefNested withNewSecretRef() { - return new V1StorageOSVolumeSourceFluentImpl.SecretRefNestedImpl(); - } - public V1StorageOSVolumeSourceFluentImpl.SecretRefNested withNewSecretRefLike(V1LocalObjectReference item) { - return new V1StorageOSVolumeSourceFluentImpl.SecretRefNestedImpl(item); - } - public V1StorageOSVolumeSourceFluentImpl.SecretRefNested editSecretRef() { - return withNewSecretRefLike(getSecretRef()); - } - public V1StorageOSVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRef() { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new V1LocalObjectReferenceBuilder().build()); - } - public V1StorageOSVolumeSourceFluentImpl.SecretRefNested editOrNewSecretRefLike(V1LocalObjectReference item) { - return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item); - } - public String getVolumeName() { - return this.volumeName; - } - public A withVolumeName(String volumeName) { - this.volumeName=volumeName; return (A) this; - } - public Boolean hasVolumeName() { - return this.volumeName != null; - } - public String getVolumeNamespace() { - return this.volumeNamespace; - } - public A withVolumeNamespace(String volumeNamespace) { - this.volumeNamespace=volumeNamespace; return (A) this; - } - public Boolean hasVolumeNamespace() { - return this.volumeNamespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1StorageOSVolumeSourceFluentImpl that = (V1StorageOSVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(secretRef, that.secretRef)) return false; - - if (!java.util.Objects.equals(volumeName, that.volumeName)) return false; - - if (!java.util.Objects.equals(volumeNamespace, that.volumeNamespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, readOnly, secretRef, volumeName, volumeNamespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); } - if (volumeName != null) { sb.append("volumeName:"); sb.append(volumeName + ","); } - if (volumeNamespace != null) { sb.append("volumeNamespace:"); sb.append(volumeNamespace); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - class SecretRefNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1StorageOSVolumeSourceFluentImpl.SecretRefNested,Nested{ - SecretRefNestedImpl(V1LocalObjectReference item) { - this.builder = new V1LocalObjectReferenceBuilder(this, item); - } - SecretRefNestedImpl() { - this.builder = new V1LocalObjectReferenceBuilder(this); - } - V1LocalObjectReferenceBuilder builder; - public N and() { - return (N) V1StorageOSVolumeSourceFluentImpl.this.withSecretRef(builder.build()); - } - public N endSecretRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewBuilder.java index aed88d2be2..e707b2e8c7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SubjectAccessReviewBuilder extends V1SubjectAccessReviewFluentImpl implements VisitableBuilder{ +public class V1SubjectAccessReviewBuilder extends V1SubjectAccessReviewFluent implements VisitableBuilder{ public V1SubjectAccessReviewBuilder() { - this(false); - } - public V1SubjectAccessReviewBuilder(Boolean validationEnabled) { - this(new V1SubjectAccessReview(), validationEnabled); + this(new V1SubjectAccessReview()); } + public V1SubjectAccessReviewBuilder(V1SubjectAccessReviewFluent fluent) { - this(fluent, false); - } - public V1SubjectAccessReviewBuilder(V1SubjectAccessReviewFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SubjectAccessReview(), validationEnabled); + this(fluent, new V1SubjectAccessReview()); } + public V1SubjectAccessReviewBuilder(V1SubjectAccessReviewFluent fluent,V1SubjectAccessReview instance) { - this(fluent, instance, false); - } - public V1SubjectAccessReviewBuilder(V1SubjectAccessReviewFluent fluent,V1SubjectAccessReview instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SubjectAccessReviewBuilder(V1SubjectAccessReview instance) { - this(instance,false); - } - public V1SubjectAccessReviewBuilder(V1SubjectAccessReview instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SubjectAccessReviewFluent fluent; - Boolean validationEnabled; + public V1SubjectAccessReview build() { V1SubjectAccessReview buildable = new V1SubjectAccessReview(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewFluent.java index 2f636abc8d..6cb9c037e4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1SubjectAccessReviewFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1SubjectAccessReviewFluent.MetadataNested withNewMetadata(); - public V1SubjectAccessReviewFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1SubjectAccessReviewFluent.MetadataNested editMetadata(); - public V1SubjectAccessReviewFluent.MetadataNested editOrNewMetadata(); - public V1SubjectAccessReviewFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewSpec getSpec(); - public V1SubjectAccessReviewSpec buildSpec(); - public A withSpec(V1SubjectAccessReviewSpec spec); - public Boolean hasSpec(); - public V1SubjectAccessReviewFluent.SpecNested withNewSpec(); - public V1SubjectAccessReviewFluent.SpecNested withNewSpecLike(V1SubjectAccessReviewSpec item); - public V1SubjectAccessReviewFluent.SpecNested editSpec(); - public V1SubjectAccessReviewFluent.SpecNested editOrNewSpec(); - public V1SubjectAccessReviewFluent.SpecNested editOrNewSpecLike(V1SubjectAccessReviewSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewStatus getStatus(); - public V1SubjectAccessReviewStatus buildStatus(); - public A withStatus(V1SubjectAccessReviewStatus status); - public Boolean hasStatus(); - public V1SubjectAccessReviewFluent.StatusNested withNewStatus(); - public V1SubjectAccessReviewFluent.StatusNested withNewStatusLike(V1SubjectAccessReviewStatus item); - public V1SubjectAccessReviewFluent.StatusNested editStatus(); - public V1SubjectAccessReviewFluent.StatusNested editOrNewStatus(); - public V1SubjectAccessReviewFluent.StatusNested editOrNewStatusLike(V1SubjectAccessReviewStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SubjectAccessReviewFluent> extends BaseFluent{ + public V1SubjectAccessReviewFluent() { + } + + public V1SubjectAccessReviewFluent(V1SubjectAccessReview instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1SubjectAccessReviewSpecBuilder spec; + private V1SubjectAccessReviewStatusBuilder status; + + protected void copyInstance(V1SubjectAccessReview instance) { + instance = (instance != null ? instance : new V1SubjectAccessReview()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1SubjectAccessReviewSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1SubjectAccessReviewSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1SubjectAccessReviewSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1SubjectAccessReviewSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1SubjectAccessReviewSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1SubjectAccessReviewSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1SubjectAccessReviewSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1SubjectAccessReviewStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1SubjectAccessReviewStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1SubjectAccessReviewStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1SubjectAccessReviewStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1SubjectAccessReviewStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1SubjectAccessReviewStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SubjectAccessReviewFluent that = (V1SubjectAccessReviewFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1SubjectAccessReviewFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1SubjectAccessReviewStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1SubjectAccessReviewSpecFluent> implements Nested{ + SpecNested(V1SubjectAccessReviewSpec item) { + this.builder = new V1SubjectAccessReviewSpecBuilder(this, item); + } + V1SubjectAccessReviewSpecBuilder builder; + + public N and() { + return (N) V1SubjectAccessReviewFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1SubjectAccessReviewStatusFluent> implements Nested{ + StatusNested(V1SubjectAccessReviewStatus item) { + this.builder = new V1SubjectAccessReviewStatusBuilder(this, item); + } + V1SubjectAccessReviewStatusBuilder builder; + + public N and() { + return (N) V1SubjectAccessReviewFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewFluentImpl.java deleted file mode 100644 index ea232b9970..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SubjectAccessReviewFluentImpl> extends BaseFluent implements V1SubjectAccessReviewFluent{ - public V1SubjectAccessReviewFluentImpl() { - } - public V1SubjectAccessReviewFluentImpl(V1SubjectAccessReview instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1SubjectAccessReviewSpecBuilder spec; - private V1SubjectAccessReviewStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1SubjectAccessReviewFluentImpl.MetadataNested withNewMetadata() { - return new V1SubjectAccessReviewFluentImpl.MetadataNestedImpl(); - } - public V1SubjectAccessReviewFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1SubjectAccessReviewFluentImpl.MetadataNestedImpl(item); - } - public V1SubjectAccessReviewFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1SubjectAccessReviewFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1SubjectAccessReviewFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1SubjectAccessReviewSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1SubjectAccessReviewSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1SubjectAccessReviewSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1SubjectAccessReviewFluentImpl.SpecNested withNewSpec() { - return new V1SubjectAccessReviewFluentImpl.SpecNestedImpl(); - } - public V1SubjectAccessReviewFluentImpl.SpecNested withNewSpecLike(V1SubjectAccessReviewSpec item) { - return new V1SubjectAccessReviewFluentImpl.SpecNestedImpl(item); - } - public V1SubjectAccessReviewFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1SubjectAccessReviewFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1SubjectAccessReviewSpecBuilder().build()); - } - public V1SubjectAccessReviewFluentImpl.SpecNested editOrNewSpecLike(V1SubjectAccessReviewSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1SubjectAccessReviewStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1SubjectAccessReviewStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1SubjectAccessReviewStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1SubjectAccessReviewStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1SubjectAccessReviewFluentImpl.StatusNested withNewStatus() { - return new V1SubjectAccessReviewFluentImpl.StatusNestedImpl(); - } - public V1SubjectAccessReviewFluentImpl.StatusNested withNewStatusLike(V1SubjectAccessReviewStatus item) { - return new V1SubjectAccessReviewFluentImpl.StatusNestedImpl(item); - } - public V1SubjectAccessReviewFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1SubjectAccessReviewFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1SubjectAccessReviewStatusBuilder().build()); - } - public V1SubjectAccessReviewFluentImpl.StatusNested editOrNewStatusLike(V1SubjectAccessReviewStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SubjectAccessReviewFluentImpl that = (V1SubjectAccessReviewFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1SubjectAccessReviewFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1SubjectAccessReviewFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1SubjectAccessReviewSpecFluentImpl> implements V1SubjectAccessReviewFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1SubjectAccessReviewSpec item) { - this.builder = new V1SubjectAccessReviewSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1SubjectAccessReviewSpecBuilder(this); - } - V1SubjectAccessReviewSpecBuilder builder; - public N and() { - return (N) V1SubjectAccessReviewFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1SubjectAccessReviewStatusFluentImpl> implements V1SubjectAccessReviewFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1SubjectAccessReviewStatus item) { - this.builder = new V1SubjectAccessReviewStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1SubjectAccessReviewStatusBuilder(this); - } - V1SubjectAccessReviewStatusBuilder builder; - public N and() { - return (N) V1SubjectAccessReviewFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecBuilder.java index e9d35084ed..956ffdef64 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SubjectAccessReviewSpecBuilder extends V1SubjectAccessReviewSpecFluentImpl implements VisitableBuilder{ +public class V1SubjectAccessReviewSpecBuilder extends V1SubjectAccessReviewSpecFluent implements VisitableBuilder{ public V1SubjectAccessReviewSpecBuilder() { - this(false); - } - public V1SubjectAccessReviewSpecBuilder(Boolean validationEnabled) { - this(new V1SubjectAccessReviewSpec(), validationEnabled); + this(new V1SubjectAccessReviewSpec()); } + public V1SubjectAccessReviewSpecBuilder(V1SubjectAccessReviewSpecFluent fluent) { - this(fluent, false); - } - public V1SubjectAccessReviewSpecBuilder(V1SubjectAccessReviewSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SubjectAccessReviewSpec(), validationEnabled); + this(fluent, new V1SubjectAccessReviewSpec()); } + public V1SubjectAccessReviewSpecBuilder(V1SubjectAccessReviewSpecFluent fluent,V1SubjectAccessReviewSpec instance) { - this(fluent, instance, false); - } - public V1SubjectAccessReviewSpecBuilder(V1SubjectAccessReviewSpecFluent fluent,V1SubjectAccessReviewSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExtra(instance.getExtra()); - fluent.withGroups(instance.getGroups()); - fluent.withNonResourceAttributes(instance.getNonResourceAttributes()); - fluent.withResourceAttributes(instance.getResourceAttributes()); - fluent.withUid(instance.getUid()); - fluent.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SubjectAccessReviewSpecBuilder(V1SubjectAccessReviewSpec instance) { - this(instance,false); - } - public V1SubjectAccessReviewSpecBuilder(V1SubjectAccessReviewSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExtra(instance.getExtra()); - this.withGroups(instance.getGroups()); - this.withNonResourceAttributes(instance.getNonResourceAttributes()); - this.withResourceAttributes(instance.getResourceAttributes()); - this.withUid(instance.getUid()); - this.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SubjectAccessReviewSpecFluent fluent; - Boolean validationEnabled; + public V1SubjectAccessReviewSpec build() { V1SubjectAccessReviewSpec buildable = new V1SubjectAccessReviewSpec(); buildable.setExtra(fluent.getExtra()); buildable.setGroups(fluent.getGroups()); - buildable.setNonResourceAttributes(fluent.getNonResourceAttributes()); - buildable.setResourceAttributes(fluent.getResourceAttributes()); + buildable.setNonResourceAttributes(fluent.buildNonResourceAttributes()); + buildable.setResourceAttributes(fluent.buildResourceAttributes()); buildable.setUid(fluent.getUid()); buildable.setUser(fluent.getUser()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecFluent.java index c96cd1a0c4..85ae52f92f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecFluent.java @@ -1,89 +1,345 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.LinkedHashMap; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1SubjectAccessReviewSpecFluent> extends Fluent{ - public A addToExtra(String key,List value); - public A addToExtra(Map> map); - public A removeFromExtra(String key); - public A removeFromExtra(Map> map); - public Map> getExtra(); - public A withExtra(Map> extra); - public Boolean hasExtra(); - public A addToGroups(int index,String item); - public A setToGroups(int index,String item); - public A addToGroups(java.lang.String... items); - public A addAllToGroups(Collection items); - public A removeFromGroups(java.lang.String... items); - public A removeAllFromGroups(Collection items); - public List getGroups(); - public String getGroup(int index); - public String getFirstGroup(); - public String getLastGroup(); - public String getMatchingGroup(Predicate predicate); - public Boolean hasMatchingGroup(Predicate predicate); - public A withGroups(List groups); - public A withGroups(java.lang.String... groups); - public Boolean hasGroups(); - - /** - * This method has been deprecated, please use method buildNonResourceAttributes instead. - * @return The buildable object. - */ - @Deprecated - public V1NonResourceAttributes getNonResourceAttributes(); - public V1NonResourceAttributes buildNonResourceAttributes(); - public A withNonResourceAttributes(V1NonResourceAttributes nonResourceAttributes); - public Boolean hasNonResourceAttributes(); - public V1SubjectAccessReviewSpecFluent.NonResourceAttributesNested withNewNonResourceAttributes(); - public V1SubjectAccessReviewSpecFluent.NonResourceAttributesNested withNewNonResourceAttributesLike(V1NonResourceAttributes item); - public V1SubjectAccessReviewSpecFluent.NonResourceAttributesNested editNonResourceAttributes(); - public V1SubjectAccessReviewSpecFluent.NonResourceAttributesNested editOrNewNonResourceAttributes(); - public V1SubjectAccessReviewSpecFluent.NonResourceAttributesNested editOrNewNonResourceAttributesLike(V1NonResourceAttributes item); - - /** - * This method has been deprecated, please use method buildResourceAttributes instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceAttributes getResourceAttributes(); - public V1ResourceAttributes buildResourceAttributes(); - public A withResourceAttributes(V1ResourceAttributes resourceAttributes); - public Boolean hasResourceAttributes(); - public V1SubjectAccessReviewSpecFluent.ResourceAttributesNested withNewResourceAttributes(); - public V1SubjectAccessReviewSpecFluent.ResourceAttributesNested withNewResourceAttributesLike(V1ResourceAttributes item); - public V1SubjectAccessReviewSpecFluent.ResourceAttributesNested editResourceAttributes(); - public V1SubjectAccessReviewSpecFluent.ResourceAttributesNested editOrNewResourceAttributes(); - public V1SubjectAccessReviewSpecFluent.ResourceAttributesNested editOrNewResourceAttributesLike(V1ResourceAttributes item); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); - public String getUser(); - public A withUser(String user); - public Boolean hasUser(); - public interface NonResourceAttributesNested extends Nested,V1NonResourceAttributesFluent>{ - public N and(); - public N endNonResourceAttributes(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SubjectAccessReviewSpecFluent> extends BaseFluent{ + public V1SubjectAccessReviewSpecFluent() { + } + + public V1SubjectAccessReviewSpecFluent(V1SubjectAccessReviewSpec instance) { + this.copyInstance(instance); + } + private Map> extra; + private List groups; + private V1NonResourceAttributesBuilder nonResourceAttributes; + private V1ResourceAttributesBuilder resourceAttributes; + private String uid; + private String user; + + protected void copyInstance(V1SubjectAccessReviewSpec instance) { + instance = (instance != null ? instance : new V1SubjectAccessReviewSpec()); + if (instance != null) { + this.withExtra(instance.getExtra()); + this.withGroups(instance.getGroups()); + this.withNonResourceAttributes(instance.getNonResourceAttributes()); + this.withResourceAttributes(instance.getResourceAttributes()); + this.withUid(instance.getUid()); + this.withUser(instance.getUser()); + } + } + + public A addToExtra(String key,List value) { + if(this.extra == null && key != null && value != null) { this.extra = new LinkedHashMap(); } + if(key != null && value != null) {this.extra.put(key, value);} return (A)this; + } + + public A addToExtra(Map> map) { + if(this.extra == null && map != null) { this.extra = new LinkedHashMap(); } + if(map != null) { this.extra.putAll(map);} return (A)this; + } + + public A removeFromExtra(String key) { + if(this.extra == null) { return (A) this; } + if(key != null && this.extra != null) {this.extra.remove(key);} return (A)this; + } + + public A removeFromExtra(Map> map) { + if(this.extra == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.extra != null){this.extra.remove(key);}}} return (A)this; + } + + public Map> getExtra() { + return this.extra; + } + + public A withExtra(Map> extra) { + if (extra == null) { + this.extra = null; + } else { + this.extra = new LinkedHashMap(extra); + } + return (A) this; + } + + public boolean hasExtra() { + return this.extra != null; + } + + public A addToGroups(int index,String item) { + if (this.groups == null) {this.groups = new ArrayList();} + this.groups.add(index, item); + return (A)this; + } + + public A setToGroups(int index,String item) { + if (this.groups == null) {this.groups = new ArrayList();} + this.groups.set(index, item); return (A)this; + } + + public A addToGroups(java.lang.String... items) { + if (this.groups == null) {this.groups = new ArrayList();} + for (String item : items) {this.groups.add(item);} return (A)this; + } + + public A addAllToGroups(Collection items) { + if (this.groups == null) {this.groups = new ArrayList();} + for (String item : items) {this.groups.add(item);} return (A)this; } - public interface ResourceAttributesNested extends Nested,V1ResourceAttributesFluent>{ - public N and(); - public N endResourceAttributes(); + + public A removeFromGroups(java.lang.String... items) { + if (this.groups == null) return (A)this; + for (String item : items) { this.groups.remove(item);} return (A)this; + } + + public A removeAllFromGroups(Collection items) { + if (this.groups == null) return (A)this; + for (String item : items) { this.groups.remove(item);} return (A)this; + } + + public List getGroups() { + return this.groups; + } + + public String getGroup(int index) { + return this.groups.get(index); + } + + public String getFirstGroup() { + return this.groups.get(0); + } + + public String getLastGroup() { + return this.groups.get(groups.size() - 1); + } + + public String getMatchingGroup(Predicate predicate) { + for (String item : groups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingGroup(Predicate predicate) { + for (String item : groups) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withGroups(List groups) { + if (groups != null) { + this.groups = new ArrayList(); + for (String item : groups) { + this.addToGroups(item); + } + } else { + this.groups = null; + } + return (A) this; + } + + public A withGroups(java.lang.String... groups) { + if (this.groups != null) { + this.groups.clear(); + _visitables.remove("groups"); + } + if (groups != null) { + for (String item : groups) { + this.addToGroups(item); + } + } + return (A) this; + } + + public boolean hasGroups() { + return this.groups != null && !this.groups.isEmpty(); + } + + public V1NonResourceAttributes buildNonResourceAttributes() { + return this.nonResourceAttributes != null ? this.nonResourceAttributes.build() : null; + } + + public A withNonResourceAttributes(V1NonResourceAttributes nonResourceAttributes) { + this._visitables.remove("nonResourceAttributes"); + if (nonResourceAttributes != null) { + this.nonResourceAttributes = new V1NonResourceAttributesBuilder(nonResourceAttributes); + this._visitables.get("nonResourceAttributes").add(this.nonResourceAttributes); + } else { + this.nonResourceAttributes = null; + this._visitables.get("nonResourceAttributes").remove(this.nonResourceAttributes); + } + return (A) this; + } + + public boolean hasNonResourceAttributes() { + return this.nonResourceAttributes != null; + } + + public NonResourceAttributesNested withNewNonResourceAttributes() { + return new NonResourceAttributesNested(null); + } + + public NonResourceAttributesNested withNewNonResourceAttributesLike(V1NonResourceAttributes item) { + return new NonResourceAttributesNested(item); + } + + public NonResourceAttributesNested editNonResourceAttributes() { + return withNewNonResourceAttributesLike(java.util.Optional.ofNullable(buildNonResourceAttributes()).orElse(null)); + } + + public NonResourceAttributesNested editOrNewNonResourceAttributes() { + return withNewNonResourceAttributesLike(java.util.Optional.ofNullable(buildNonResourceAttributes()).orElse(new V1NonResourceAttributesBuilder().build())); + } + + public NonResourceAttributesNested editOrNewNonResourceAttributesLike(V1NonResourceAttributes item) { + return withNewNonResourceAttributesLike(java.util.Optional.ofNullable(buildNonResourceAttributes()).orElse(item)); + } + + public V1ResourceAttributes buildResourceAttributes() { + return this.resourceAttributes != null ? this.resourceAttributes.build() : null; + } + + public A withResourceAttributes(V1ResourceAttributes resourceAttributes) { + this._visitables.remove("resourceAttributes"); + if (resourceAttributes != null) { + this.resourceAttributes = new V1ResourceAttributesBuilder(resourceAttributes); + this._visitables.get("resourceAttributes").add(this.resourceAttributes); + } else { + this.resourceAttributes = null; + this._visitables.get("resourceAttributes").remove(this.resourceAttributes); + } + return (A) this; + } + + public boolean hasResourceAttributes() { + return this.resourceAttributes != null; + } + + public ResourceAttributesNested withNewResourceAttributes() { + return new ResourceAttributesNested(null); + } + + public ResourceAttributesNested withNewResourceAttributesLike(V1ResourceAttributes item) { + return new ResourceAttributesNested(item); + } + + public ResourceAttributesNested editResourceAttributes() { + return withNewResourceAttributesLike(java.util.Optional.ofNullable(buildResourceAttributes()).orElse(null)); + } + + public ResourceAttributesNested editOrNewResourceAttributes() { + return withNewResourceAttributesLike(java.util.Optional.ofNullable(buildResourceAttributes()).orElse(new V1ResourceAttributesBuilder().build())); + } + + public ResourceAttributesNested editOrNewResourceAttributesLike(V1ResourceAttributes item) { + return withNewResourceAttributesLike(java.util.Optional.ofNullable(buildResourceAttributes()).orElse(item)); + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public String getUser() { + return this.user; + } + + public A withUser(String user) { + this.user = user; + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SubjectAccessReviewSpecFluent that = (V1SubjectAccessReviewSpecFluent) o; + if (!java.util.Objects.equals(extra, that.extra)) return false; + if (!java.util.Objects.equals(groups, that.groups)) return false; + if (!java.util.Objects.equals(nonResourceAttributes, that.nonResourceAttributes)) return false; + if (!java.util.Objects.equals(resourceAttributes, that.resourceAttributes)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(extra, groups, nonResourceAttributes, resourceAttributes, uid, user, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (extra != null && !extra.isEmpty()) { sb.append("extra:"); sb.append(extra + ","); } + if (groups != null && !groups.isEmpty()) { sb.append("groups:"); sb.append(groups + ","); } + if (nonResourceAttributes != null) { sb.append("nonResourceAttributes:"); sb.append(nonResourceAttributes + ","); } + if (resourceAttributes != null) { sb.append("resourceAttributes:"); sb.append(resourceAttributes + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid + ","); } + if (user != null) { sb.append("user:"); sb.append(user); } + sb.append("}"); + return sb.toString(); + } + public class NonResourceAttributesNested extends V1NonResourceAttributesFluent> implements Nested{ + NonResourceAttributesNested(V1NonResourceAttributes item) { + this.builder = new V1NonResourceAttributesBuilder(this, item); + } + V1NonResourceAttributesBuilder builder; + + public N and() { + return (N) V1SubjectAccessReviewSpecFluent.this.withNonResourceAttributes(builder.build()); + } + + public N endNonResourceAttributes() { + return and(); + } + } + public class ResourceAttributesNested extends V1ResourceAttributesFluent> implements Nested{ + ResourceAttributesNested(V1ResourceAttributes item) { + this.builder = new V1ResourceAttributesBuilder(this, item); + } + V1ResourceAttributesBuilder builder; + + public N and() { + return (N) V1SubjectAccessReviewSpecFluent.this.withResourceAttributes(builder.build()); + } + + public N endResourceAttributes() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecFluentImpl.java deleted file mode 100644 index 45c3a0fcc9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewSpecFluentImpl.java +++ /dev/null @@ -1,269 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SubjectAccessReviewSpecFluentImpl> extends BaseFluent implements V1SubjectAccessReviewSpecFluent{ - public V1SubjectAccessReviewSpecFluentImpl() { - } - public V1SubjectAccessReviewSpecFluentImpl(V1SubjectAccessReviewSpec instance) { - if (instance != null) { - this.withExtra(instance.getExtra()); - this.withGroups(instance.getGroups()); - this.withNonResourceAttributes(instance.getNonResourceAttributes()); - this.withResourceAttributes(instance.getResourceAttributes()); - this.withUid(instance.getUid()); - this.withUser(instance.getUser()); - } - } - private Map> extra; - private List groups; - private V1NonResourceAttributesBuilder nonResourceAttributes; - private V1ResourceAttributesBuilder resourceAttributes; - private String uid; - private String user; - public A addToExtra(String key,List value) { - if(this.extra == null && key != null && value != null) { this.extra = new LinkedHashMap(); } - if(key != null && value != null) {this.extra.put(key, value);} return (A)this; - } - public A addToExtra(Map> map) { - if(this.extra == null && map != null) { this.extra = new LinkedHashMap(); } - if(map != null) { this.extra.putAll(map);} return (A)this; - } - public A removeFromExtra(String key) { - if(this.extra == null) { return (A) this; } - if(key != null && this.extra != null) {this.extra.remove(key);} return (A)this; - } - public A removeFromExtra(Map> map) { - if(this.extra == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.extra != null){this.extra.remove(key);}}} return (A)this; - } - public Map> getExtra() { - return this.extra; - } - public A withExtra(Map> extra) { - if (extra == null) { this.extra = null;} else {this.extra = new LinkedHashMap(extra);} return (A) this; - } - public Boolean hasExtra() { - return this.extra != null; - } - public A addToGroups(int index,String item) { - if (this.groups == null) {this.groups = new ArrayList();} - this.groups.add(index, item); - return (A)this; - } - public A setToGroups(int index,String item) { - if (this.groups == null) {this.groups = new ArrayList();} - this.groups.set(index, item); return (A)this; - } - public A addToGroups(java.lang.String... items) { - if (this.groups == null) {this.groups = new ArrayList();} - for (String item : items) {this.groups.add(item);} return (A)this; - } - public A addAllToGroups(Collection items) { - if (this.groups == null) {this.groups = new ArrayList();} - for (String item : items) {this.groups.add(item);} return (A)this; - } - public A removeFromGroups(java.lang.String... items) { - for (String item : items) {if (this.groups!= null){ this.groups.remove(item);}} return (A)this; - } - public A removeAllFromGroups(Collection items) { - for (String item : items) {if (this.groups!= null){ this.groups.remove(item);}} return (A)this; - } - public List getGroups() { - return this.groups; - } - public String getGroup(int index) { - return this.groups.get(index); - } - public String getFirstGroup() { - return this.groups.get(0); - } - public String getLastGroup() { - return this.groups.get(groups.size() - 1); - } - public String getMatchingGroup(Predicate predicate) { - for (String item: groups) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingGroup(Predicate predicate) { - for (String item: groups) { if(predicate.test(item)){ return true;} } return false; - } - public A withGroups(List groups) { - if (groups != null) {this.groups = new ArrayList(); for (String item : groups){this.addToGroups(item);}} else { this.groups = null;} return (A) this; - } - public A withGroups(java.lang.String... groups) { - if (this.groups != null) {this.groups.clear(); _visitables.remove("groups"); } - if (groups != null) {for (String item :groups){ this.addToGroups(item);}} return (A) this; - } - public Boolean hasGroups() { - return groups != null && !groups.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildNonResourceAttributes instead. - * @return The buildable object. - */ - @Deprecated - public V1NonResourceAttributes getNonResourceAttributes() { - return this.nonResourceAttributes!=null ?this.nonResourceAttributes.build():null; - } - public V1NonResourceAttributes buildNonResourceAttributes() { - return this.nonResourceAttributes!=null ?this.nonResourceAttributes.build():null; - } - public A withNonResourceAttributes(V1NonResourceAttributes nonResourceAttributes) { - _visitables.get("nonResourceAttributes").remove(this.nonResourceAttributes); - if (nonResourceAttributes!=null){ this.nonResourceAttributes= new V1NonResourceAttributesBuilder(nonResourceAttributes); _visitables.get("nonResourceAttributes").add(this.nonResourceAttributes);} else { this.nonResourceAttributes = null; _visitables.get("nonResourceAttributes").remove(this.nonResourceAttributes); } return (A) this; - } - public Boolean hasNonResourceAttributes() { - return this.nonResourceAttributes != null; - } - public V1SubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested withNewNonResourceAttributes() { - return new V1SubjectAccessReviewSpecFluentImpl.NonResourceAttributesNestedImpl(); - } - public V1SubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested withNewNonResourceAttributesLike(V1NonResourceAttributes item) { - return new V1SubjectAccessReviewSpecFluentImpl.NonResourceAttributesNestedImpl(item); - } - public V1SubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested editNonResourceAttributes() { - return withNewNonResourceAttributesLike(getNonResourceAttributes()); - } - public V1SubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested editOrNewNonResourceAttributes() { - return withNewNonResourceAttributesLike(getNonResourceAttributes() != null ? getNonResourceAttributes(): new V1NonResourceAttributesBuilder().build()); - } - public V1SubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested editOrNewNonResourceAttributesLike(V1NonResourceAttributes item) { - return withNewNonResourceAttributesLike(getNonResourceAttributes() != null ? getNonResourceAttributes(): item); - } - - /** - * This method has been deprecated, please use method buildResourceAttributes instead. - * @return The buildable object. - */ - @Deprecated - public V1ResourceAttributes getResourceAttributes() { - return this.resourceAttributes!=null ?this.resourceAttributes.build():null; - } - public V1ResourceAttributes buildResourceAttributes() { - return this.resourceAttributes!=null ?this.resourceAttributes.build():null; - } - public A withResourceAttributes(V1ResourceAttributes resourceAttributes) { - _visitables.get("resourceAttributes").remove(this.resourceAttributes); - if (resourceAttributes!=null){ this.resourceAttributes= new V1ResourceAttributesBuilder(resourceAttributes); _visitables.get("resourceAttributes").add(this.resourceAttributes);} else { this.resourceAttributes = null; _visitables.get("resourceAttributes").remove(this.resourceAttributes); } return (A) this; - } - public Boolean hasResourceAttributes() { - return this.resourceAttributes != null; - } - public V1SubjectAccessReviewSpecFluentImpl.ResourceAttributesNested withNewResourceAttributes() { - return new V1SubjectAccessReviewSpecFluentImpl.ResourceAttributesNestedImpl(); - } - public V1SubjectAccessReviewSpecFluentImpl.ResourceAttributesNested withNewResourceAttributesLike(V1ResourceAttributes item) { - return new V1SubjectAccessReviewSpecFluentImpl.ResourceAttributesNestedImpl(item); - } - public V1SubjectAccessReviewSpecFluentImpl.ResourceAttributesNested editResourceAttributes() { - return withNewResourceAttributesLike(getResourceAttributes()); - } - public V1SubjectAccessReviewSpecFluentImpl.ResourceAttributesNested editOrNewResourceAttributes() { - return withNewResourceAttributesLike(getResourceAttributes() != null ? getResourceAttributes(): new V1ResourceAttributesBuilder().build()); - } - public V1SubjectAccessReviewSpecFluentImpl.ResourceAttributesNested editOrNewResourceAttributesLike(V1ResourceAttributes item) { - return withNewResourceAttributesLike(getResourceAttributes() != null ? getResourceAttributes(): item); - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public String getUser() { - return this.user; - } - public A withUser(String user) { - this.user=user; return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SubjectAccessReviewSpecFluentImpl that = (V1SubjectAccessReviewSpecFluentImpl) o; - if (!java.util.Objects.equals(extra, that.extra)) return false; - - if (!java.util.Objects.equals(groups, that.groups)) return false; - - if (!java.util.Objects.equals(nonResourceAttributes, that.nonResourceAttributes)) return false; - - if (!java.util.Objects.equals(resourceAttributes, that.resourceAttributes)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(extra, groups, nonResourceAttributes, resourceAttributes, uid, user, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (extra != null && !extra.isEmpty()) { sb.append("extra:"); sb.append(extra + ","); } - if (groups != null && !groups.isEmpty()) { sb.append("groups:"); sb.append(groups + ","); } - if (nonResourceAttributes != null) { sb.append("nonResourceAttributes:"); sb.append(nonResourceAttributes + ","); } - if (resourceAttributes != null) { sb.append("resourceAttributes:"); sb.append(resourceAttributes + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid + ","); } - if (user != null) { sb.append("user:"); sb.append(user); } - sb.append("}"); - return sb.toString(); - } - class NonResourceAttributesNestedImpl extends V1NonResourceAttributesFluentImpl> implements V1SubjectAccessReviewSpecFluentImpl.NonResourceAttributesNested,Nested{ - NonResourceAttributesNestedImpl(V1NonResourceAttributes item) { - this.builder = new V1NonResourceAttributesBuilder(this, item); - } - NonResourceAttributesNestedImpl() { - this.builder = new V1NonResourceAttributesBuilder(this); - } - V1NonResourceAttributesBuilder builder; - public N and() { - return (N) V1SubjectAccessReviewSpecFluentImpl.this.withNonResourceAttributes(builder.build()); - } - public N endNonResourceAttributes() { - return and(); - } - - } - class ResourceAttributesNestedImpl extends V1ResourceAttributesFluentImpl> implements V1SubjectAccessReviewSpecFluentImpl.ResourceAttributesNested,Nested{ - ResourceAttributesNestedImpl(V1ResourceAttributes item) { - this.builder = new V1ResourceAttributesBuilder(this, item); - } - ResourceAttributesNestedImpl() { - this.builder = new V1ResourceAttributesBuilder(this); - } - V1ResourceAttributesBuilder builder; - public N and() { - return (N) V1SubjectAccessReviewSpecFluentImpl.this.withResourceAttributes(builder.build()); - } - public N endResourceAttributes() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusBuilder.java index 235063131a..8377ffb8fc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SubjectAccessReviewStatusBuilder extends V1SubjectAccessReviewStatusFluentImpl implements VisitableBuilder{ +public class V1SubjectAccessReviewStatusBuilder extends V1SubjectAccessReviewStatusFluent implements VisitableBuilder{ public V1SubjectAccessReviewStatusBuilder() { - this(false); - } - public V1SubjectAccessReviewStatusBuilder(Boolean validationEnabled) { - this(new V1SubjectAccessReviewStatus(), validationEnabled); + this(new V1SubjectAccessReviewStatus()); } + public V1SubjectAccessReviewStatusBuilder(V1SubjectAccessReviewStatusFluent fluent) { - this(fluent, false); - } - public V1SubjectAccessReviewStatusBuilder(V1SubjectAccessReviewStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SubjectAccessReviewStatus(), validationEnabled); + this(fluent, new V1SubjectAccessReviewStatus()); } + public V1SubjectAccessReviewStatusBuilder(V1SubjectAccessReviewStatusFluent fluent,V1SubjectAccessReviewStatus instance) { - this(fluent, instance, false); - } - public V1SubjectAccessReviewStatusBuilder(V1SubjectAccessReviewStatusFluent fluent,V1SubjectAccessReviewStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAllowed(instance.getAllowed()); - fluent.withDenied(instance.getDenied()); - fluent.withEvaluationError(instance.getEvaluationError()); - fluent.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SubjectAccessReviewStatusBuilder(V1SubjectAccessReviewStatus instance) { - this(instance,false); - } - public V1SubjectAccessReviewStatusBuilder(V1SubjectAccessReviewStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAllowed(instance.getAllowed()); - this.withDenied(instance.getDenied()); - this.withEvaluationError(instance.getEvaluationError()); - this.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SubjectAccessReviewStatusFluent fluent; - Boolean validationEnabled; + public V1SubjectAccessReviewStatus build() { V1SubjectAccessReviewStatus buildable = new V1SubjectAccessReviewStatus(); buildable.setAllowed(fluent.getAllowed()); @@ -52,4 +30,5 @@ public V1SubjectAccessReviewStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusFluent.java index 0a9611fc1f..68f98296e0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusFluent.java @@ -1,27 +1,123 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1SubjectAccessReviewStatusFluent> extends Fluent{ - public Boolean getAllowed(); - public A withAllowed(Boolean allowed); - public Boolean hasAllowed(); - public Boolean getDenied(); - public A withDenied(Boolean denied); - public Boolean hasDenied(); - public String getEvaluationError(); - public A withEvaluationError(String evaluationError); - public Boolean hasEvaluationError(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public A withAllowed(); - public A withDenied(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SubjectAccessReviewStatusFluent> extends BaseFluent{ + public V1SubjectAccessReviewStatusFluent() { + } + public V1SubjectAccessReviewStatusFluent(V1SubjectAccessReviewStatus instance) { + this.copyInstance(instance); + } + private Boolean allowed; + private Boolean denied; + private String evaluationError; + private String reason; + + protected void copyInstance(V1SubjectAccessReviewStatus instance) { + instance = (instance != null ? instance : new V1SubjectAccessReviewStatus()); + if (instance != null) { + this.withAllowed(instance.getAllowed()); + this.withDenied(instance.getDenied()); + this.withEvaluationError(instance.getEvaluationError()); + this.withReason(instance.getReason()); + } + } + + public Boolean getAllowed() { + return this.allowed; + } + + public A withAllowed(Boolean allowed) { + this.allowed = allowed; + return (A) this; + } + + public boolean hasAllowed() { + return this.allowed != null; + } + + public Boolean getDenied() { + return this.denied; + } + + public A withDenied(Boolean denied) { + this.denied = denied; + return (A) this; + } + + public boolean hasDenied() { + return this.denied != null; + } + + public String getEvaluationError() { + return this.evaluationError; + } + + public A withEvaluationError(String evaluationError) { + this.evaluationError = evaluationError; + return (A) this; + } + + public boolean hasEvaluationError() { + return this.evaluationError != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SubjectAccessReviewStatusFluent that = (V1SubjectAccessReviewStatusFluent) o; + if (!java.util.Objects.equals(allowed, that.allowed)) return false; + if (!java.util.Objects.equals(denied, that.denied)) return false; + if (!java.util.Objects.equals(evaluationError, that.evaluationError)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(allowed, denied, evaluationError, reason, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (allowed != null) { sb.append("allowed:"); sb.append(allowed + ","); } + if (denied != null) { sb.append("denied:"); sb.append(denied + ","); } + if (evaluationError != null) { sb.append("evaluationError:"); sb.append(evaluationError + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason); } + sb.append("}"); + return sb.toString(); + } + + public A withAllowed() { + return withAllowed(true); + } + + public A withDenied() { + return withDenied(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusFluentImpl.java deleted file mode 100644 index 5e233b77e4..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectAccessReviewStatusFluentImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SubjectAccessReviewStatusFluentImpl> extends BaseFluent implements V1SubjectAccessReviewStatusFluent{ - public V1SubjectAccessReviewStatusFluentImpl() { - } - public V1SubjectAccessReviewStatusFluentImpl(V1SubjectAccessReviewStatus instance) { - if (instance != null) { - this.withAllowed(instance.getAllowed()); - this.withDenied(instance.getDenied()); - this.withEvaluationError(instance.getEvaluationError()); - this.withReason(instance.getReason()); - } - } - private Boolean allowed; - private Boolean denied; - private String evaluationError; - private String reason; - public Boolean getAllowed() { - return this.allowed; - } - public A withAllowed(Boolean allowed) { - this.allowed=allowed; return (A) this; - } - public Boolean hasAllowed() { - return this.allowed != null; - } - public Boolean getDenied() { - return this.denied; - } - public A withDenied(Boolean denied) { - this.denied=denied; return (A) this; - } - public Boolean hasDenied() { - return this.denied != null; - } - public String getEvaluationError() { - return this.evaluationError; - } - public A withEvaluationError(String evaluationError) { - this.evaluationError=evaluationError; return (A) this; - } - public Boolean hasEvaluationError() { - return this.evaluationError != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SubjectAccessReviewStatusFluentImpl that = (V1SubjectAccessReviewStatusFluentImpl) o; - if (!java.util.Objects.equals(allowed, that.allowed)) return false; - - if (!java.util.Objects.equals(denied, that.denied)) return false; - - if (!java.util.Objects.equals(evaluationError, that.evaluationError)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(allowed, denied, evaluationError, reason, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (allowed != null) { sb.append("allowed:"); sb.append(allowed + ","); } - if (denied != null) { sb.append("denied:"); sb.append(denied + ","); } - if (evaluationError != null) { sb.append("evaluationError:"); sb.append(evaluationError + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason); } - sb.append("}"); - return sb.toString(); - } - public A withAllowed() { - return withAllowed(true); - } - public A withDenied() { - return withDenied(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectBuilder.java index bedbb3a664..38b5347ee2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SubjectBuilder extends V1SubjectFluentImpl implements VisitableBuilder{ +public class V1SubjectBuilder extends V1SubjectFluent implements VisitableBuilder{ public V1SubjectBuilder() { - this(false); - } - public V1SubjectBuilder(Boolean validationEnabled) { - this(new V1Subject(), validationEnabled); + this(new V1Subject()); } + public V1SubjectBuilder(V1SubjectFluent fluent) { - this(fluent, false); - } - public V1SubjectBuilder(V1SubjectFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Subject(), validationEnabled); + this(fluent, new V1Subject()); } + public V1SubjectBuilder(V1SubjectFluent fluent,V1Subject instance) { - this(fluent, instance, false); - } - public V1SubjectBuilder(V1SubjectFluent fluent,V1Subject instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroup(instance.getApiGroup()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SubjectBuilder(V1Subject instance) { - this(instance,false); - } - public V1SubjectBuilder(V1Subject instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SubjectFluent fluent; - Boolean validationEnabled; + public V1Subject build() { V1Subject buildable = new V1Subject(); buildable.setApiGroup(fluent.getApiGroup()); @@ -52,4 +30,5 @@ public V1Subject build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectFluent.java index fac5126088..93d0a2e885 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectFluent.java @@ -1,25 +1,114 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1SubjectFluent> extends Fluent{ - public String getApiGroup(); - public A withApiGroup(String apiGroup); - public Boolean hasApiGroup(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SubjectFluent> extends BaseFluent{ + public V1SubjectFluent() { + } + public V1SubjectFluent(V1Subject instance) { + this.copyInstance(instance); + } + private String apiGroup; + private String kind; + private String name; + private String namespace; + + protected void copyInstance(V1Subject instance) { + instance = (instance != null ? instance : new V1Subject()); + if (instance != null) { + this.withApiGroup(instance.getApiGroup()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + } + } + + public String getApiGroup() { + return this.apiGroup; + } + + public A withApiGroup(String apiGroup) { + this.apiGroup = apiGroup; + return (A) this; + } + + public boolean hasApiGroup() { + return this.apiGroup != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SubjectFluent that = (V1SubjectFluent) o; + if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroup, kind, name, namespace, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectFluentImpl.java deleted file mode 100644 index 206086ffc8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectFluentImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SubjectFluentImpl> extends BaseFluent implements V1SubjectFluent{ - public V1SubjectFluentImpl() { - } - public V1SubjectFluentImpl(V1Subject instance) { - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - } - private String apiGroup; - private String kind; - private String name; - private String namespace; - public String getApiGroup() { - return this.apiGroup; - } - public A withApiGroup(String apiGroup) { - this.apiGroup=apiGroup; return (A) this; - } - public Boolean hasApiGroup() { - return this.apiGroup != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SubjectFluentImpl that = (V1SubjectFluentImpl) o; - if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroup, kind, name, namespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusBuilder.java index 27181b90be..8e46ac5da5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SubjectRulesReviewStatusBuilder extends V1SubjectRulesReviewStatusFluentImpl implements VisitableBuilder{ +public class V1SubjectRulesReviewStatusBuilder extends V1SubjectRulesReviewStatusFluent implements VisitableBuilder{ public V1SubjectRulesReviewStatusBuilder() { - this(false); - } - public V1SubjectRulesReviewStatusBuilder(Boolean validationEnabled) { - this(new V1SubjectRulesReviewStatus(), validationEnabled); + this(new V1SubjectRulesReviewStatus()); } + public V1SubjectRulesReviewStatusBuilder(V1SubjectRulesReviewStatusFluent fluent) { - this(fluent, false); - } - public V1SubjectRulesReviewStatusBuilder(V1SubjectRulesReviewStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1SubjectRulesReviewStatus(), validationEnabled); + this(fluent, new V1SubjectRulesReviewStatus()); } + public V1SubjectRulesReviewStatusBuilder(V1SubjectRulesReviewStatusFluent fluent,V1SubjectRulesReviewStatus instance) { - this(fluent, instance, false); - } - public V1SubjectRulesReviewStatusBuilder(V1SubjectRulesReviewStatusFluent fluent,V1SubjectRulesReviewStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withEvaluationError(instance.getEvaluationError()); - fluent.withIncomplete(instance.getIncomplete()); - fluent.withNonResourceRules(instance.getNonResourceRules()); - fluent.withResourceRules(instance.getResourceRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SubjectRulesReviewStatusBuilder(V1SubjectRulesReviewStatus instance) { - this(instance,false); - } - public V1SubjectRulesReviewStatusBuilder(V1SubjectRulesReviewStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withEvaluationError(instance.getEvaluationError()); - this.withIncomplete(instance.getIncomplete()); - this.withNonResourceRules(instance.getNonResourceRules()); - this.withResourceRules(instance.getResourceRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SubjectRulesReviewStatusFluent fluent; - Boolean validationEnabled; + public V1SubjectRulesReviewStatus build() { V1SubjectRulesReviewStatus buildable = new V1SubjectRulesReviewStatus(); buildable.setEvaluationError(fluent.getEvaluationError()); buildable.setIncomplete(fluent.getIncomplete()); - buildable.setNonResourceRules(fluent.getNonResourceRules()); - buildable.setResourceRules(fluent.getResourceRules()); + buildable.setNonResourceRules(fluent.buildNonResourceRules()); + buildable.setResourceRules(fluent.buildResourceRules()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusFluent.java index 44b677c9d6..7e3630b183 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusFluent.java @@ -1,98 +1,437 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1SubjectRulesReviewStatusFluent> extends Fluent{ - public String getEvaluationError(); - public A withEvaluationError(String evaluationError); - public Boolean hasEvaluationError(); - public Boolean getIncomplete(); - public A withIncomplete(Boolean incomplete); - public Boolean hasIncomplete(); - public A addToNonResourceRules(int index,V1NonResourceRule item); - public A setToNonResourceRules(int index,V1NonResourceRule item); - public A addToNonResourceRules(io.kubernetes.client.openapi.models.V1NonResourceRule... items); - public A addAllToNonResourceRules(Collection items); - public A removeFromNonResourceRules(io.kubernetes.client.openapi.models.V1NonResourceRule... items); - public A removeAllFromNonResourceRules(Collection items); - public A removeMatchingFromNonResourceRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildNonResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getNonResourceRules(); - public List buildNonResourceRules(); - public V1NonResourceRule buildNonResourceRule(int index); - public V1NonResourceRule buildFirstNonResourceRule(); - public V1NonResourceRule buildLastNonResourceRule(); - public V1NonResourceRule buildMatchingNonResourceRule(Predicate predicate); - public Boolean hasMatchingNonResourceRule(Predicate predicate); - public A withNonResourceRules(List nonResourceRules); - public A withNonResourceRules(io.kubernetes.client.openapi.models.V1NonResourceRule... nonResourceRules); - public Boolean hasNonResourceRules(); - public V1SubjectRulesReviewStatusFluent.NonResourceRulesNested addNewNonResourceRule(); - public V1SubjectRulesReviewStatusFluent.NonResourceRulesNested addNewNonResourceRuleLike(V1NonResourceRule item); - public V1SubjectRulesReviewStatusFluent.NonResourceRulesNested setNewNonResourceRuleLike(int index,V1NonResourceRule item); - public V1SubjectRulesReviewStatusFluent.NonResourceRulesNested editNonResourceRule(int index); - public V1SubjectRulesReviewStatusFluent.NonResourceRulesNested editFirstNonResourceRule(); - public V1SubjectRulesReviewStatusFluent.NonResourceRulesNested editLastNonResourceRule(); - public V1SubjectRulesReviewStatusFluent.NonResourceRulesNested editMatchingNonResourceRule(Predicate predicate); - public A addToResourceRules(int index,V1ResourceRule item); - public A setToResourceRules(int index,V1ResourceRule item); - public A addToResourceRules(io.kubernetes.client.openapi.models.V1ResourceRule... items); - public A addAllToResourceRules(Collection items); - public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1ResourceRule... items); - public A removeAllFromResourceRules(Collection items); - public A removeMatchingFromResourceRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceRules(); - public List buildResourceRules(); - public V1ResourceRule buildResourceRule(int index); - public V1ResourceRule buildFirstResourceRule(); - public V1ResourceRule buildLastResourceRule(); - public V1ResourceRule buildMatchingResourceRule(Predicate predicate); - public Boolean hasMatchingResourceRule(Predicate predicate); - public A withResourceRules(List resourceRules); - public A withResourceRules(io.kubernetes.client.openapi.models.V1ResourceRule... resourceRules); - public Boolean hasResourceRules(); - public V1SubjectRulesReviewStatusFluent.ResourceRulesNested addNewResourceRule(); - public V1SubjectRulesReviewStatusFluent.ResourceRulesNested addNewResourceRuleLike(V1ResourceRule item); - public V1SubjectRulesReviewStatusFluent.ResourceRulesNested setNewResourceRuleLike(int index,V1ResourceRule item); - public V1SubjectRulesReviewStatusFluent.ResourceRulesNested editResourceRule(int index); - public V1SubjectRulesReviewStatusFluent.ResourceRulesNested editFirstResourceRule(); - public V1SubjectRulesReviewStatusFluent.ResourceRulesNested editLastResourceRule(); - public V1SubjectRulesReviewStatusFluent.ResourceRulesNested editMatchingResourceRule(Predicate predicate); - public A withIncomplete(); - public interface NonResourceRulesNested extends Nested,V1NonResourceRuleFluent>{ - public N and(); - public N endNonResourceRule(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SubjectRulesReviewStatusFluent> extends BaseFluent{ + public V1SubjectRulesReviewStatusFluent() { + } + + public V1SubjectRulesReviewStatusFluent(V1SubjectRulesReviewStatus instance) { + this.copyInstance(instance); + } + private String evaluationError; + private Boolean incomplete; + private ArrayList nonResourceRules; + private ArrayList resourceRules; + + protected void copyInstance(V1SubjectRulesReviewStatus instance) { + instance = (instance != null ? instance : new V1SubjectRulesReviewStatus()); + if (instance != null) { + this.withEvaluationError(instance.getEvaluationError()); + this.withIncomplete(instance.getIncomplete()); + this.withNonResourceRules(instance.getNonResourceRules()); + this.withResourceRules(instance.getResourceRules()); + } + } + + public String getEvaluationError() { + return this.evaluationError; + } + + public A withEvaluationError(String evaluationError) { + this.evaluationError = evaluationError; + return (A) this; + } + + public boolean hasEvaluationError() { + return this.evaluationError != null; + } + + public Boolean getIncomplete() { + return this.incomplete; + } + + public A withIncomplete(Boolean incomplete) { + this.incomplete = incomplete; + return (A) this; + } + + public boolean hasIncomplete() { + return this.incomplete != null; + } + + public A addToNonResourceRules(int index,V1NonResourceRule item) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item); + if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").add(index, builder); nonResourceRules.add(index, builder);} + return (A)this; + } + + public A setToNonResourceRules(int index,V1NonResourceRule item) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item); + if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").set(index, builder); nonResourceRules.set(index, builder);} + return (A)this; + } + + public A addToNonResourceRules(io.kubernetes.client.openapi.models.V1NonResourceRule... items) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + for (V1NonResourceRule item : items) {V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; + } + + public A addAllToNonResourceRules(Collection items) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + for (V1NonResourceRule item : items) {V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; + } + + public A removeFromNonResourceRules(io.kubernetes.client.openapi.models.V1NonResourceRule... items) { + if (this.nonResourceRules == null) return (A)this; + for (V1NonResourceRule item : items) {V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder); this.nonResourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromNonResourceRules(Collection items) { + if (this.nonResourceRules == null) return (A)this; + for (V1NonResourceRule item : items) {V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder); this.nonResourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromNonResourceRules(Predicate predicate) { + if (nonResourceRules == null) return (A) this; + final Iterator each = nonResourceRules.iterator(); + final List visitables = _visitables.get("nonResourceRules"); + while (each.hasNext()) { + V1NonResourceRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildNonResourceRules() { + return this.nonResourceRules != null ? build(nonResourceRules) : null; + } + + public V1NonResourceRule buildNonResourceRule(int index) { + return this.nonResourceRules.get(index).build(); + } + + public V1NonResourceRule buildFirstNonResourceRule() { + return this.nonResourceRules.get(0).build(); + } + + public V1NonResourceRule buildLastNonResourceRule() { + return this.nonResourceRules.get(nonResourceRules.size() - 1).build(); + } + + public V1NonResourceRule buildMatchingNonResourceRule(Predicate predicate) { + for (V1NonResourceRuleBuilder item : nonResourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingNonResourceRule(Predicate predicate) { + for (V1NonResourceRuleBuilder item : nonResourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNonResourceRules(List nonResourceRules) { + if (this.nonResourceRules != null) { + this._visitables.get("nonResourceRules").clear(); + } + if (nonResourceRules != null) { + this.nonResourceRules = new ArrayList(); + for (V1NonResourceRule item : nonResourceRules) { + this.addToNonResourceRules(item); + } + } else { + this.nonResourceRules = null; + } + return (A) this; + } + + public A withNonResourceRules(io.kubernetes.client.openapi.models.V1NonResourceRule... nonResourceRules) { + if (this.nonResourceRules != null) { + this.nonResourceRules.clear(); + _visitables.remove("nonResourceRules"); + } + if (nonResourceRules != null) { + for (V1NonResourceRule item : nonResourceRules) { + this.addToNonResourceRules(item); + } + } + return (A) this; + } + + public boolean hasNonResourceRules() { + return this.nonResourceRules != null && !this.nonResourceRules.isEmpty(); + } + + public NonResourceRulesNested addNewNonResourceRule() { + return new NonResourceRulesNested(-1, null); + } + + public NonResourceRulesNested addNewNonResourceRuleLike(V1NonResourceRule item) { + return new NonResourceRulesNested(-1, item); + } + + public NonResourceRulesNested setNewNonResourceRuleLike(int index,V1NonResourceRule item) { + return new NonResourceRulesNested(index, item); + } + + public NonResourceRulesNested editNonResourceRule(int index) { + if (nonResourceRules.size() <= index) throw new RuntimeException("Can't edit nonResourceRules. Index exceeds size."); + return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); + } + + public NonResourceRulesNested editFirstNonResourceRule() { + if (nonResourceRules.size() == 0) throw new RuntimeException("Can't edit first nonResourceRules. The list is empty."); + return setNewNonResourceRuleLike(0, buildNonResourceRule(0)); + } + + public NonResourceRulesNested editLastNonResourceRule() { + int index = nonResourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last nonResourceRules. The list is empty."); + return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); + } + + public NonResourceRulesNested editMatchingNonResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends Nested,V1ResourceRuleFluent>{ - public N and(); - public N endResourceRule(); + + public A addToResourceRules(int index,V1ResourceRule item) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").add(index, builder); resourceRules.add(index, builder);} + return (A)this; + } + + public A setToResourceRules(int index,V1ResourceRule item) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").set(index, builder); resourceRules.set(index, builder);} + return (A)this; + } + + public A addToResourceRules(io.kubernetes.client.openapi.models.V1ResourceRule... items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1ResourceRule item : items) {V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A addAllToResourceRules(Collection items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1ResourceRule item : items) {V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1ResourceRule... items) { + if (this.resourceRules == null) return (A)this; + for (V1ResourceRule item : items) {V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromResourceRules(Collection items) { + if (this.resourceRules == null) return (A)this; + for (V1ResourceRule item : items) {V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromResourceRules(Predicate predicate) { + if (resourceRules == null) return (A) this; + final Iterator each = resourceRules.iterator(); + final List visitables = _visitables.get("resourceRules"); + while (each.hasNext()) { + V1ResourceRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResourceRules() { + return this.resourceRules != null ? build(resourceRules) : null; + } + + public V1ResourceRule buildResourceRule(int index) { + return this.resourceRules.get(index).build(); + } + + public V1ResourceRule buildFirstResourceRule() { + return this.resourceRules.get(0).build(); + } + + public V1ResourceRule buildLastResourceRule() { + return this.resourceRules.get(resourceRules.size() - 1).build(); + } + + public V1ResourceRule buildMatchingResourceRule(Predicate predicate) { + for (V1ResourceRuleBuilder item : resourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResourceRule(Predicate predicate) { + for (V1ResourceRuleBuilder item : resourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceRules(List resourceRules) { + if (this.resourceRules != null) { + this._visitables.get("resourceRules").clear(); + } + if (resourceRules != null) { + this.resourceRules = new ArrayList(); + for (V1ResourceRule item : resourceRules) { + this.addToResourceRules(item); + } + } else { + this.resourceRules = null; + } + return (A) this; + } + + public A withResourceRules(io.kubernetes.client.openapi.models.V1ResourceRule... resourceRules) { + if (this.resourceRules != null) { + this.resourceRules.clear(); + _visitables.remove("resourceRules"); + } + if (resourceRules != null) { + for (V1ResourceRule item : resourceRules) { + this.addToResourceRules(item); + } + } + return (A) this; + } + + public boolean hasResourceRules() { + return this.resourceRules != null && !this.resourceRules.isEmpty(); + } + + public ResourceRulesNested addNewResourceRule() { + return new ResourceRulesNested(-1, null); + } + + public ResourceRulesNested addNewResourceRuleLike(V1ResourceRule item) { + return new ResourceRulesNested(-1, item); + } + + public ResourceRulesNested setNewResourceRuleLike(int index,V1ResourceRule item) { + return new ResourceRulesNested(index, item); + } + + public ResourceRulesNested editResourceRule(int index) { + if (resourceRules.size() <= index) throw new RuntimeException("Can't edit resourceRules. Index exceeds size."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editFirstResourceRule() { + if (resourceRules.size() == 0) throw new RuntimeException("Can't edit first resourceRules. The list is empty."); + return setNewResourceRuleLike(0, buildResourceRule(0)); + } + + public ResourceRulesNested editLastResourceRule() { + int index = resourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resourceRules. The list is empty."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editMatchingResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1NonResourceRuleFluent> implements Nested{ + NonResourceRulesNested(int index,V1NonResourceRule item) { + this.index = index; + this.builder = new V1NonResourceRuleBuilder(this, item); + } + V1NonResourceRuleBuilder builder; + int index; + + public N and() { + return (N) V1SubjectRulesReviewStatusFluent.this.setToNonResourceRules(index,builder.build()); + } + public N endNonResourceRule() { + return and(); + } + + } + public class ResourceRulesNested extends V1ResourceRuleFluent> implements Nested{ + ResourceRulesNested(int index,V1ResourceRule item) { + this.index = index; + this.builder = new V1ResourceRuleBuilder(this, item); + } + V1ResourceRuleBuilder builder; + int index; + + public N and() { + return (N) V1SubjectRulesReviewStatusFluent.this.setToResourceRules(index,builder.build()); + } + + public N endResourceRule() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusFluentImpl.java deleted file mode 100644 index e33ea09fbd..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SubjectRulesReviewStatusFluentImpl.java +++ /dev/null @@ -1,338 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SubjectRulesReviewStatusFluentImpl> extends BaseFluent implements V1SubjectRulesReviewStatusFluent{ - public V1SubjectRulesReviewStatusFluentImpl() { - } - public V1SubjectRulesReviewStatusFluentImpl(V1SubjectRulesReviewStatus instance) { - if (instance != null) { - this.withEvaluationError(instance.getEvaluationError()); - this.withIncomplete(instance.getIncomplete()); - this.withNonResourceRules(instance.getNonResourceRules()); - this.withResourceRules(instance.getResourceRules()); - } - } - private String evaluationError; - private Boolean incomplete; - private ArrayList nonResourceRules; - private ArrayList resourceRules; - public String getEvaluationError() { - return this.evaluationError; - } - public A withEvaluationError(String evaluationError) { - this.evaluationError=evaluationError; return (A) this; - } - public Boolean hasEvaluationError() { - return this.evaluationError != null; - } - public Boolean getIncomplete() { - return this.incomplete; - } - public A withIncomplete(Boolean incomplete) { - this.incomplete=incomplete; return (A) this; - } - public Boolean hasIncomplete() { - return this.incomplete != null; - } - public A addToNonResourceRules(int index,V1NonResourceRule item) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item); - if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").add(index, builder); nonResourceRules.add(index, builder);} - return (A)this; - } - public A setToNonResourceRules(int index,V1NonResourceRule item) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item); - if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").set(index, builder); nonResourceRules.set(index, builder);} - return (A)this; - } - public A addToNonResourceRules(io.kubernetes.client.openapi.models.V1NonResourceRule... items) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - for (V1NonResourceRule item : items) {V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; - } - public A addAllToNonResourceRules(Collection items) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - for (V1NonResourceRule item : items) {V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; - } - public A removeFromNonResourceRules(io.kubernetes.client.openapi.models.V1NonResourceRule... items) { - for (V1NonResourceRule item : items) {V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder);if (this.nonResourceRules != null) {this.nonResourceRules.remove(builder);}} return (A)this; - } - public A removeAllFromNonResourceRules(Collection items) { - for (V1NonResourceRule item : items) {V1NonResourceRuleBuilder builder = new V1NonResourceRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder);if (this.nonResourceRules != null) {this.nonResourceRules.remove(builder);}} return (A)this; - } - public A removeMatchingFromNonResourceRules(Predicate predicate) { - if (nonResourceRules == null) return (A) this; - final Iterator each = nonResourceRules.iterator(); - final List visitables = _visitables.get("nonResourceRules"); - while (each.hasNext()) { - V1NonResourceRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildNonResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getNonResourceRules() { - return nonResourceRules != null ? build(nonResourceRules) : null; - } - public List buildNonResourceRules() { - return nonResourceRules != null ? build(nonResourceRules) : null; - } - public V1NonResourceRule buildNonResourceRule(int index) { - return this.nonResourceRules.get(index).build(); - } - public V1NonResourceRule buildFirstNonResourceRule() { - return this.nonResourceRules.get(0).build(); - } - public V1NonResourceRule buildLastNonResourceRule() { - return this.nonResourceRules.get(nonResourceRules.size() - 1).build(); - } - public V1NonResourceRule buildMatchingNonResourceRule(Predicate predicate) { - for (V1NonResourceRuleBuilder item: nonResourceRules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingNonResourceRule(Predicate predicate) { - for (V1NonResourceRuleBuilder item: nonResourceRules) { if(predicate.test(item)){ return true;} } return false; - } - public A withNonResourceRules(List nonResourceRules) { - if (this.nonResourceRules != null) { _visitables.get("nonResourceRules").clear();} - if (nonResourceRules != null) {this.nonResourceRules = new ArrayList(); for (V1NonResourceRule item : nonResourceRules){this.addToNonResourceRules(item);}} else { this.nonResourceRules = null;} return (A) this; - } - public A withNonResourceRules(io.kubernetes.client.openapi.models.V1NonResourceRule... nonResourceRules) { - if (this.nonResourceRules != null) {this.nonResourceRules.clear(); _visitables.remove("nonResourceRules"); } - if (nonResourceRules != null) {for (V1NonResourceRule item :nonResourceRules){ this.addToNonResourceRules(item);}} return (A) this; - } - public Boolean hasNonResourceRules() { - return nonResourceRules != null && !nonResourceRules.isEmpty(); - } - public V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNested addNewNonResourceRule() { - return new V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNestedImpl(); - } - public V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNested addNewNonResourceRuleLike(V1NonResourceRule item) { - return new V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNestedImpl(-1, item); - } - public V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNested setNewNonResourceRuleLike(int index,V1NonResourceRule item) { - return new V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNestedImpl(index, item); - } - public V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNested editNonResourceRule(int index) { - if (nonResourceRules.size() <= index) throw new RuntimeException("Can't edit nonResourceRules. Index exceeds size."); - return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); - } - public V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNested editFirstNonResourceRule() { - if (nonResourceRules.size() == 0) throw new RuntimeException("Can't edit first nonResourceRules. The list is empty."); - return setNewNonResourceRuleLike(0, buildNonResourceRule(0)); - } - public V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNested editLastNonResourceRule() { - int index = nonResourceRules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last nonResourceRules. The list is empty."); - return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); - } - public V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNested editMatchingNonResourceRule(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item); - if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").add(index, builder); resourceRules.add(index, builder);} - return (A)this; - } - public A setToResourceRules(int index,V1ResourceRule item) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item); - if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").set(index, builder); resourceRules.set(index, builder);} - return (A)this; - } - public A addToResourceRules(io.kubernetes.client.openapi.models.V1ResourceRule... items) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - for (V1ResourceRule item : items) {V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; - } - public A addAllToResourceRules(Collection items) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - for (V1ResourceRule item : items) {V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; - } - public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1ResourceRule... items) { - for (V1ResourceRule item : items) {V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item);_visitables.get("resourceRules").remove(builder);if (this.resourceRules != null) {this.resourceRules.remove(builder);}} return (A)this; - } - public A removeAllFromResourceRules(Collection items) { - for (V1ResourceRule item : items) {V1ResourceRuleBuilder builder = new V1ResourceRuleBuilder(item);_visitables.get("resourceRules").remove(builder);if (this.resourceRules != null) {this.resourceRules.remove(builder);}} return (A)this; - } - public A removeMatchingFromResourceRules(Predicate predicate) { - if (resourceRules == null) return (A) this; - final Iterator each = resourceRules.iterator(); - final List visitables = _visitables.get("resourceRules"); - while (each.hasNext()) { - V1ResourceRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceRules() { - return resourceRules != null ? build(resourceRules) : null; - } - public List buildResourceRules() { - return resourceRules != null ? build(resourceRules) : null; - } - public V1ResourceRule buildResourceRule(int index) { - return this.resourceRules.get(index).build(); - } - public V1ResourceRule buildFirstResourceRule() { - return this.resourceRules.get(0).build(); - } - public V1ResourceRule buildLastResourceRule() { - return this.resourceRules.get(resourceRules.size() - 1).build(); - } - public V1ResourceRule buildMatchingResourceRule(Predicate predicate) { - for (V1ResourceRuleBuilder item: resourceRules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResourceRule(Predicate predicate) { - for (V1ResourceRuleBuilder item: resourceRules) { if(predicate.test(item)){ return true;} } return false; - } - public A withResourceRules(List resourceRules) { - if (this.resourceRules != null) { _visitables.get("resourceRules").clear();} - if (resourceRules != null) {this.resourceRules = new ArrayList(); for (V1ResourceRule item : resourceRules){this.addToResourceRules(item);}} else { this.resourceRules = null;} return (A) this; - } - public A withResourceRules(io.kubernetes.client.openapi.models.V1ResourceRule... resourceRules) { - if (this.resourceRules != null) {this.resourceRules.clear(); _visitables.remove("resourceRules"); } - if (resourceRules != null) {for (V1ResourceRule item :resourceRules){ this.addToResourceRules(item);}} return (A) this; - } - public Boolean hasResourceRules() { - return resourceRules != null && !resourceRules.isEmpty(); - } - public V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNested addNewResourceRule() { - return new V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNestedImpl(); - } - public V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNested addNewResourceRuleLike(V1ResourceRule item) { - return new V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNestedImpl(-1, item); - } - public V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNested setNewResourceRuleLike(int index,V1ResourceRule item) { - return new V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNestedImpl(index, item); - } - public V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNested editResourceRule(int index) { - if (resourceRules.size() <= index) throw new RuntimeException("Can't edit resourceRules. Index exceeds size."); - return setNewResourceRuleLike(index, buildResourceRule(index)); - } - public V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNested editFirstResourceRule() { - if (resourceRules.size() == 0) throw new RuntimeException("Can't edit first resourceRules. The list is empty."); - return setNewResourceRuleLike(0, buildResourceRule(0)); - } - public V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNested editLastResourceRule() { - int index = resourceRules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resourceRules. The list is empty."); - return setNewResourceRuleLike(index, buildResourceRule(index)); - } - public V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNested editMatchingResourceRule(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1NonResourceRuleFluentImpl> implements V1SubjectRulesReviewStatusFluentImpl.NonResourceRulesNested,Nested{ - NonResourceRulesNestedImpl(int index,V1NonResourceRule item) { - this.index = index; - this.builder = new V1NonResourceRuleBuilder(this, item); - } - NonResourceRulesNestedImpl() { - this.index = -1; - this.builder = new V1NonResourceRuleBuilder(this); - } - V1NonResourceRuleBuilder builder; - int index; - public N and() { - return (N) V1SubjectRulesReviewStatusFluentImpl.this.setToNonResourceRules(index,builder.build()); - } - public N endNonResourceRule() { - return and(); - } - - } - class ResourceRulesNestedImpl extends V1ResourceRuleFluentImpl> implements V1SubjectRulesReviewStatusFluentImpl.ResourceRulesNested,Nested{ - ResourceRulesNestedImpl(int index,V1ResourceRule item) { - this.index = index; - this.builder = new V1ResourceRuleBuilder(this, item); - } - ResourceRulesNestedImpl() { - this.index = -1; - this.builder = new V1ResourceRuleBuilder(this); - } - V1ResourceRuleBuilder builder; - int index; - public N and() { - return (N) V1SubjectRulesReviewStatusFluentImpl.this.setToResourceRules(index,builder.build()); - } - public N endResourceRule() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlBuilder.java index ae8cfb5fed..9bdff84ba8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1SysctlBuilder extends V1SysctlFluentImpl implements VisitableBuilder{ +public class V1SysctlBuilder extends V1SysctlFluent implements VisitableBuilder{ public V1SysctlBuilder() { - this(false); - } - public V1SysctlBuilder(Boolean validationEnabled) { - this(new V1Sysctl(), validationEnabled); + this(new V1Sysctl()); } + public V1SysctlBuilder(V1SysctlFluent fluent) { - this(fluent, false); - } - public V1SysctlBuilder(V1SysctlFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Sysctl(), validationEnabled); + this(fluent, new V1Sysctl()); } + public V1SysctlBuilder(V1SysctlFluent fluent,V1Sysctl instance) { - this(fluent, instance, false); - } - public V1SysctlBuilder(V1SysctlFluent fluent,V1Sysctl instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1SysctlBuilder(V1Sysctl instance) { - this(instance,false); - } - public V1SysctlBuilder(V1Sysctl instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1SysctlFluent fluent; - Boolean validationEnabled; + public V1Sysctl build() { V1Sysctl buildable = new V1Sysctl(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1Sysctl build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlFluent.java index 2767066d80..ce52229cce 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1SysctlFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getValue(); - public A withValue(String value); - public Boolean hasValue(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1SysctlFluent> extends BaseFluent{ + public V1SysctlFluent() { + } + public V1SysctlFluent(V1Sysctl instance) { + this.copyInstance(instance); + } + private String name; + private String value; + + protected void copyInstance(V1Sysctl instance) { + instance = (instance != null ? instance : new V1Sysctl()); + if (instance != null) { + this.withName(instance.getName()); + this.withValue(instance.getValue()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getValue() { + return this.value; + } + + public A withValue(String value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1SysctlFluent that = (V1SysctlFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, value, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (value != null) { sb.append("value:"); sb.append(value); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlFluentImpl.java deleted file mode 100644 index c3ce9d8ab1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1SysctlFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1SysctlFluentImpl> extends BaseFluent implements V1SysctlFluent{ - public V1SysctlFluentImpl() { - } - public V1SysctlFluentImpl(V1Sysctl instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withValue(instance.getValue()); - } - } - private String name; - private String value; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getValue() { - return this.value; - } - public A withValue(String value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1SysctlFluentImpl that = (V1SysctlFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, value, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (value != null) { sb.append("value:"); sb.append(value); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionBuilder.java index 0709a67f1b..3bf4414b2d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TCPSocketActionBuilder extends V1TCPSocketActionFluentImpl implements VisitableBuilder{ +public class V1TCPSocketActionBuilder extends V1TCPSocketActionFluent implements VisitableBuilder{ public V1TCPSocketActionBuilder() { - this(false); - } - public V1TCPSocketActionBuilder(Boolean validationEnabled) { - this(new V1TCPSocketAction(), validationEnabled); + this(new V1TCPSocketAction()); } + public V1TCPSocketActionBuilder(V1TCPSocketActionFluent fluent) { - this(fluent, false); - } - public V1TCPSocketActionBuilder(V1TCPSocketActionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TCPSocketAction(), validationEnabled); + this(fluent, new V1TCPSocketAction()); } + public V1TCPSocketActionBuilder(V1TCPSocketActionFluent fluent,V1TCPSocketAction instance) { - this(fluent, instance, false); - } - public V1TCPSocketActionBuilder(V1TCPSocketActionFluent fluent,V1TCPSocketAction instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHost(instance.getHost()); - fluent.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TCPSocketActionBuilder(V1TCPSocketAction instance) { - this(instance,false); - } - public V1TCPSocketActionBuilder(V1TCPSocketAction instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHost(instance.getHost()); - this.withPort(instance.getPort()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TCPSocketActionFluent fluent; - Boolean validationEnabled; + public V1TCPSocketAction build() { V1TCPSocketAction buildable = new V1TCPSocketAction(); buildable.setHost(fluent.getHost()); @@ -46,4 +28,5 @@ public V1TCPSocketAction build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionFluent.java index 67f44d0016..290933eecb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionFluent.java @@ -1,22 +1,89 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.custom.IntOrString; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1TCPSocketActionFluent> extends Fluent{ - public String getHost(); - public A withHost(String host); - public Boolean hasHost(); - public IntOrString getPort(); - public A withPort(IntOrString port); - public Boolean hasPort(); - public A withNewPort(int value); - public A withNewPort(String value); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TCPSocketActionFluent> extends BaseFluent{ + public V1TCPSocketActionFluent() { + } + public V1TCPSocketActionFluent(V1TCPSocketAction instance) { + this.copyInstance(instance); + } + private String host; + private IntOrString port; + + protected void copyInstance(V1TCPSocketAction instance) { + instance = (instance != null ? instance : new V1TCPSocketAction()); + if (instance != null) { + this.withHost(instance.getHost()); + this.withPort(instance.getPort()); + } + } + + public String getHost() { + return this.host; + } + + public A withHost(String host) { + this.host = host; + return (A) this; + } + + public boolean hasHost() { + return this.host != null; + } + + public IntOrString getPort() { + return this.port; + } + + public A withPort(IntOrString port) { + this.port = port; + return (A) this; + } + + public boolean hasPort() { + return this.port != null; + } + + public A withNewPort(int value) { + return (A)withPort(new IntOrString(value)); + } + + public A withNewPort(String value) { + return (A)withPort(new IntOrString(value)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TCPSocketActionFluent that = (V1TCPSocketActionFluent) o; + if (!java.util.Objects.equals(host, that.host)) return false; + if (!java.util.Objects.equals(port, that.port)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(host, port, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (host != null) { sb.append("host:"); sb.append(host + ","); } + if (port != null) { sb.append("port:"); sb.append(port); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionFluentImpl.java deleted file mode 100644 index 8bdbcb0101..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TCPSocketActionFluentImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.custom.IntOrString; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TCPSocketActionFluentImpl> extends BaseFluent implements V1TCPSocketActionFluent{ - public V1TCPSocketActionFluentImpl() { - } - public V1TCPSocketActionFluentImpl(V1TCPSocketAction instance) { - if (instance != null) { - this.withHost(instance.getHost()); - this.withPort(instance.getPort()); - } - } - private String host; - private IntOrString port; - public String getHost() { - return this.host; - } - public A withHost(String host) { - this.host=host; return (A) this; - } - public Boolean hasHost() { - return this.host != null; - } - public IntOrString getPort() { - return this.port; - } - public A withPort(IntOrString port) { - this.port=port; return (A) this; - } - public Boolean hasPort() { - return this.port != null; - } - public A withNewPort(int value) { - return (A)withPort(new IntOrString(value)); - } - public A withNewPort(String value) { - return (A)withPort(new IntOrString(value)); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TCPSocketActionFluentImpl that = (V1TCPSocketActionFluentImpl) o; - if (!java.util.Objects.equals(host, that.host)) return false; - - if (!java.util.Objects.equals(port, that.port)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(host, port, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (host != null) { sb.append("host:"); sb.append(host + ","); } - if (port != null) { sb.append("port:"); sb.append(port); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintBuilder.java index 1fda4adb0f..c6640dc364 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TaintBuilder extends V1TaintFluentImpl implements VisitableBuilder{ +public class V1TaintBuilder extends V1TaintFluent implements VisitableBuilder{ public V1TaintBuilder() { - this(false); - } - public V1TaintBuilder(Boolean validationEnabled) { - this(new V1Taint(), validationEnabled); + this(new V1Taint()); } + public V1TaintBuilder(V1TaintFluent fluent) { - this(fluent, false); - } - public V1TaintBuilder(V1TaintFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Taint(), validationEnabled); + this(fluent, new V1Taint()); } + public V1TaintBuilder(V1TaintFluent fluent,V1Taint instance) { - this(fluent, instance, false); - } - public V1TaintBuilder(V1TaintFluent fluent,V1Taint instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withEffect(instance.getEffect()); - fluent.withKey(instance.getKey()); - fluent.withTimeAdded(instance.getTimeAdded()); - fluent.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TaintBuilder(V1Taint instance) { - this(instance,false); - } - public V1TaintBuilder(V1Taint instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withEffect(instance.getEffect()); - this.withKey(instance.getKey()); - this.withTimeAdded(instance.getTimeAdded()); - this.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TaintFluent fluent; - Boolean validationEnabled; + public V1Taint build() { V1Taint buildable = new V1Taint(); buildable.setEffect(fluent.getEffect()); @@ -52,4 +30,5 @@ public V1Taint build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintFluent.java index 1e415e14a1..b843ffcfcc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintFluent.java @@ -1,26 +1,115 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1TaintFluent> extends Fluent{ - public String getEffect(); - public A withEffect(String effect); - public Boolean hasEffect(); - public String getKey(); - public A withKey(String key); - public Boolean hasKey(); - public OffsetDateTime getTimeAdded(); - public A withTimeAdded(OffsetDateTime timeAdded); - public Boolean hasTimeAdded(); - public String getValue(); - public A withValue(String value); - public Boolean hasValue(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TaintFluent> extends BaseFluent{ + public V1TaintFluent() { + } + public V1TaintFluent(V1Taint instance) { + this.copyInstance(instance); + } + private String effect; + private String key; + private OffsetDateTime timeAdded; + private String value; + + protected void copyInstance(V1Taint instance) { + instance = (instance != null ? instance : new V1Taint()); + if (instance != null) { + this.withEffect(instance.getEffect()); + this.withKey(instance.getKey()); + this.withTimeAdded(instance.getTimeAdded()); + this.withValue(instance.getValue()); + } + } + + public String getEffect() { + return this.effect; + } + + public A withEffect(String effect) { + this.effect = effect; + return (A) this; + } + + public boolean hasEffect() { + return this.effect != null; + } + + public String getKey() { + return this.key; + } + + public A withKey(String key) { + this.key = key; + return (A) this; + } + + public boolean hasKey() { + return this.key != null; + } + + public OffsetDateTime getTimeAdded() { + return this.timeAdded; + } + + public A withTimeAdded(OffsetDateTime timeAdded) { + this.timeAdded = timeAdded; + return (A) this; + } + + public boolean hasTimeAdded() { + return this.timeAdded != null; + } + + public String getValue() { + return this.value; + } + + public A withValue(String value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TaintFluent that = (V1TaintFluent) o; + if (!java.util.Objects.equals(effect, that.effect)) return false; + if (!java.util.Objects.equals(key, that.key)) return false; + if (!java.util.Objects.equals(timeAdded, that.timeAdded)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(effect, key, timeAdded, value, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (effect != null) { sb.append("effect:"); sb.append(effect + ","); } + if (key != null) { sb.append("key:"); sb.append(key + ","); } + if (timeAdded != null) { sb.append("timeAdded:"); sb.append(timeAdded + ","); } + if (value != null) { sb.append("value:"); sb.append(value); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintFluentImpl.java deleted file mode 100644 index 8fb43a02bb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TaintFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TaintFluentImpl> extends BaseFluent implements V1TaintFluent{ - public V1TaintFluentImpl() { - } - public V1TaintFluentImpl(V1Taint instance) { - if (instance != null) { - this.withEffect(instance.getEffect()); - this.withKey(instance.getKey()); - this.withTimeAdded(instance.getTimeAdded()); - this.withValue(instance.getValue()); - } - } - private String effect; - private String key; - private OffsetDateTime timeAdded; - private String value; - public String getEffect() { - return this.effect; - } - public A withEffect(String effect) { - this.effect=effect; return (A) this; - } - public Boolean hasEffect() { - return this.effect != null; - } - public String getKey() { - return this.key; - } - public A withKey(String key) { - this.key=key; return (A) this; - } - public Boolean hasKey() { - return this.key != null; - } - public OffsetDateTime getTimeAdded() { - return this.timeAdded; - } - public A withTimeAdded(OffsetDateTime timeAdded) { - this.timeAdded=timeAdded; return (A) this; - } - public Boolean hasTimeAdded() { - return this.timeAdded != null; - } - public String getValue() { - return this.value; - } - public A withValue(String value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TaintFluentImpl that = (V1TaintFluentImpl) o; - if (!java.util.Objects.equals(effect, that.effect)) return false; - - if (!java.util.Objects.equals(key, that.key)) return false; - - if (!java.util.Objects.equals(timeAdded, that.timeAdded)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(effect, key, timeAdded, value, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (effect != null) { sb.append("effect:"); sb.append(effect + ","); } - if (key != null) { sb.append("key:"); sb.append(key + ","); } - if (timeAdded != null) { sb.append("timeAdded:"); sb.append(timeAdded + ","); } - if (value != null) { sb.append("value:"); sb.append(value); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecBuilder.java index 4d00091e62..b304886ba6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TokenRequestSpecBuilder extends V1TokenRequestSpecFluentImpl implements VisitableBuilder{ +public class V1TokenRequestSpecBuilder extends V1TokenRequestSpecFluent implements VisitableBuilder{ public V1TokenRequestSpecBuilder() { - this(false); - } - public V1TokenRequestSpecBuilder(Boolean validationEnabled) { - this(new V1TokenRequestSpec(), validationEnabled); + this(new V1TokenRequestSpec()); } + public V1TokenRequestSpecBuilder(V1TokenRequestSpecFluent fluent) { - this(fluent, false); - } - public V1TokenRequestSpecBuilder(V1TokenRequestSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TokenRequestSpec(), validationEnabled); + this(fluent, new V1TokenRequestSpec()); } + public V1TokenRequestSpecBuilder(V1TokenRequestSpecFluent fluent,V1TokenRequestSpec instance) { - this(fluent, instance, false); - } - public V1TokenRequestSpecBuilder(V1TokenRequestSpecFluent fluent,V1TokenRequestSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAudiences(instance.getAudiences()); - fluent.withBoundObjectRef(instance.getBoundObjectRef()); - fluent.withExpirationSeconds(instance.getExpirationSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TokenRequestSpecBuilder(V1TokenRequestSpec instance) { - this(instance,false); - } - public V1TokenRequestSpecBuilder(V1TokenRequestSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAudiences(instance.getAudiences()); - this.withBoundObjectRef(instance.getBoundObjectRef()); - this.withExpirationSeconds(instance.getExpirationSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TokenRequestSpecFluent fluent; - Boolean validationEnabled; + public V1TokenRequestSpec build() { V1TokenRequestSpec buildable = new V1TokenRequestSpec(); buildable.setAudiences(fluent.getAudiences()); - buildable.setBoundObjectRef(fluent.getBoundObjectRef()); + buildable.setBoundObjectRef(fluent.buildBoundObjectRef()); buildable.setExpirationSeconds(fluent.getExpirationSeconds()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecFluent.java index 6da3c2ce5e..5b5615f25c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecFluent.java @@ -1,58 +1,226 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1TokenRequestSpecFluent> extends Fluent{ - public A addToAudiences(int index,String item); - public A setToAudiences(int index,String item); - public A addToAudiences(java.lang.String... items); - public A addAllToAudiences(Collection items); - public A removeFromAudiences(java.lang.String... items); - public A removeAllFromAudiences(Collection items); - public List getAudiences(); - public String getAudience(int index); - public String getFirstAudience(); - public String getLastAudience(); - public String getMatchingAudience(Predicate predicate); - public Boolean hasMatchingAudience(Predicate predicate); - public A withAudiences(List audiences); - public A withAudiences(java.lang.String... audiences); - public Boolean hasAudiences(); - - /** - * This method has been deprecated, please use method buildBoundObjectRef instead. - * @return The buildable object. - */ - @Deprecated - public V1BoundObjectReference getBoundObjectRef(); - public V1BoundObjectReference buildBoundObjectRef(); - public A withBoundObjectRef(V1BoundObjectReference boundObjectRef); - public Boolean hasBoundObjectRef(); - public V1TokenRequestSpecFluent.BoundObjectRefNested withNewBoundObjectRef(); - public V1TokenRequestSpecFluent.BoundObjectRefNested withNewBoundObjectRefLike(V1BoundObjectReference item); - public V1TokenRequestSpecFluent.BoundObjectRefNested editBoundObjectRef(); - public V1TokenRequestSpecFluent.BoundObjectRefNested editOrNewBoundObjectRef(); - public V1TokenRequestSpecFluent.BoundObjectRefNested editOrNewBoundObjectRefLike(V1BoundObjectReference item); - public Long getExpirationSeconds(); - public A withExpirationSeconds(Long expirationSeconds); - public Boolean hasExpirationSeconds(); - public interface BoundObjectRefNested extends Nested,V1BoundObjectReferenceFluent>{ - public N and(); - public N endBoundObjectRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TokenRequestSpecFluent> extends BaseFluent{ + public V1TokenRequestSpecFluent() { + } + + public V1TokenRequestSpecFluent(V1TokenRequestSpec instance) { + this.copyInstance(instance); + } + private List audiences; + private V1BoundObjectReferenceBuilder boundObjectRef; + private Long expirationSeconds; + + protected void copyInstance(V1TokenRequestSpec instance) { + instance = (instance != null ? instance : new V1TokenRequestSpec()); + if (instance != null) { + this.withAudiences(instance.getAudiences()); + this.withBoundObjectRef(instance.getBoundObjectRef()); + this.withExpirationSeconds(instance.getExpirationSeconds()); + } + } + + public A addToAudiences(int index,String item) { + if (this.audiences == null) {this.audiences = new ArrayList();} + this.audiences.add(index, item); + return (A)this; + } + + public A setToAudiences(int index,String item) { + if (this.audiences == null) {this.audiences = new ArrayList();} + this.audiences.set(index, item); return (A)this; + } + + public A addToAudiences(java.lang.String... items) { + if (this.audiences == null) {this.audiences = new ArrayList();} + for (String item : items) {this.audiences.add(item);} return (A)this; + } + + public A addAllToAudiences(Collection items) { + if (this.audiences == null) {this.audiences = new ArrayList();} + for (String item : items) {this.audiences.add(item);} return (A)this; + } + + public A removeFromAudiences(java.lang.String... items) { + if (this.audiences == null) return (A)this; + for (String item : items) { this.audiences.remove(item);} return (A)this; + } + + public A removeAllFromAudiences(Collection items) { + if (this.audiences == null) return (A)this; + for (String item : items) { this.audiences.remove(item);} return (A)this; + } + + public List getAudiences() { + return this.audiences; + } + + public String getAudience(int index) { + return this.audiences.get(index); + } + + public String getFirstAudience() { + return this.audiences.get(0); + } + + public String getLastAudience() { + return this.audiences.get(audiences.size() - 1); + } + + public String getMatchingAudience(Predicate predicate) { + for (String item : audiences) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAudience(Predicate predicate) { + for (String item : audiences) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAudiences(List audiences) { + if (audiences != null) { + this.audiences = new ArrayList(); + for (String item : audiences) { + this.addToAudiences(item); + } + } else { + this.audiences = null; + } + return (A) this; + } + + public A withAudiences(java.lang.String... audiences) { + if (this.audiences != null) { + this.audiences.clear(); + _visitables.remove("audiences"); + } + if (audiences != null) { + for (String item : audiences) { + this.addToAudiences(item); + } + } + return (A) this; + } + + public boolean hasAudiences() { + return this.audiences != null && !this.audiences.isEmpty(); + } + + public V1BoundObjectReference buildBoundObjectRef() { + return this.boundObjectRef != null ? this.boundObjectRef.build() : null; + } + + public A withBoundObjectRef(V1BoundObjectReference boundObjectRef) { + this._visitables.remove("boundObjectRef"); + if (boundObjectRef != null) { + this.boundObjectRef = new V1BoundObjectReferenceBuilder(boundObjectRef); + this._visitables.get("boundObjectRef").add(this.boundObjectRef); + } else { + this.boundObjectRef = null; + this._visitables.get("boundObjectRef").remove(this.boundObjectRef); + } + return (A) this; + } + + public boolean hasBoundObjectRef() { + return this.boundObjectRef != null; + } + + public BoundObjectRefNested withNewBoundObjectRef() { + return new BoundObjectRefNested(null); + } + + public BoundObjectRefNested withNewBoundObjectRefLike(V1BoundObjectReference item) { + return new BoundObjectRefNested(item); + } + + public BoundObjectRefNested editBoundObjectRef() { + return withNewBoundObjectRefLike(java.util.Optional.ofNullable(buildBoundObjectRef()).orElse(null)); + } + + public BoundObjectRefNested editOrNewBoundObjectRef() { + return withNewBoundObjectRefLike(java.util.Optional.ofNullable(buildBoundObjectRef()).orElse(new V1BoundObjectReferenceBuilder().build())); + } + + public BoundObjectRefNested editOrNewBoundObjectRefLike(V1BoundObjectReference item) { + return withNewBoundObjectRefLike(java.util.Optional.ofNullable(buildBoundObjectRef()).orElse(item)); } + public Long getExpirationSeconds() { + return this.expirationSeconds; + } + + public A withExpirationSeconds(Long expirationSeconds) { + this.expirationSeconds = expirationSeconds; + return (A) this; + } + + public boolean hasExpirationSeconds() { + return this.expirationSeconds != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TokenRequestSpecFluent that = (V1TokenRequestSpecFluent) o; + if (!java.util.Objects.equals(audiences, that.audiences)) return false; + if (!java.util.Objects.equals(boundObjectRef, that.boundObjectRef)) return false; + if (!java.util.Objects.equals(expirationSeconds, that.expirationSeconds)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(audiences, boundObjectRef, expirationSeconds, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (audiences != null && !audiences.isEmpty()) { sb.append("audiences:"); sb.append(audiences + ","); } + if (boundObjectRef != null) { sb.append("boundObjectRef:"); sb.append(boundObjectRef + ","); } + if (expirationSeconds != null) { sb.append("expirationSeconds:"); sb.append(expirationSeconds); } + sb.append("}"); + return sb.toString(); + } + public class BoundObjectRefNested extends V1BoundObjectReferenceFluent> implements Nested{ + BoundObjectRefNested(V1BoundObjectReference item) { + this.builder = new V1BoundObjectReferenceBuilder(this, item); + } + V1BoundObjectReferenceBuilder builder; + + public N and() { + return (N) V1TokenRequestSpecFluent.this.withBoundObjectRef(builder.build()); + } + + public N endBoundObjectRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecFluentImpl.java deleted file mode 100644 index daa44d7464..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestSpecFluentImpl.java +++ /dev/null @@ -1,169 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TokenRequestSpecFluentImpl> extends BaseFluent implements V1TokenRequestSpecFluent{ - public V1TokenRequestSpecFluentImpl() { - } - public V1TokenRequestSpecFluentImpl(V1TokenRequestSpec instance) { - if (instance != null) { - this.withAudiences(instance.getAudiences()); - this.withBoundObjectRef(instance.getBoundObjectRef()); - this.withExpirationSeconds(instance.getExpirationSeconds()); - } - } - private List audiences; - private V1BoundObjectReferenceBuilder boundObjectRef; - private Long expirationSeconds; - public A addToAudiences(int index,String item) { - if (this.audiences == null) {this.audiences = new ArrayList();} - this.audiences.add(index, item); - return (A)this; - } - public A setToAudiences(int index,String item) { - if (this.audiences == null) {this.audiences = new ArrayList();} - this.audiences.set(index, item); return (A)this; - } - public A addToAudiences(java.lang.String... items) { - if (this.audiences == null) {this.audiences = new ArrayList();} - for (String item : items) {this.audiences.add(item);} return (A)this; - } - public A addAllToAudiences(Collection items) { - if (this.audiences == null) {this.audiences = new ArrayList();} - for (String item : items) {this.audiences.add(item);} return (A)this; - } - public A removeFromAudiences(java.lang.String... items) { - for (String item : items) {if (this.audiences!= null){ this.audiences.remove(item);}} return (A)this; - } - public A removeAllFromAudiences(Collection items) { - for (String item : items) {if (this.audiences!= null){ this.audiences.remove(item);}} return (A)this; - } - public List getAudiences() { - return this.audiences; - } - public String getAudience(int index) { - return this.audiences.get(index); - } - public String getFirstAudience() { - return this.audiences.get(0); - } - public String getLastAudience() { - return this.audiences.get(audiences.size() - 1); - } - public String getMatchingAudience(Predicate predicate) { - for (String item: audiences) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAudience(Predicate predicate) { - for (String item: audiences) { if(predicate.test(item)){ return true;} } return false; - } - public A withAudiences(List audiences) { - if (audiences != null) {this.audiences = new ArrayList(); for (String item : audiences){this.addToAudiences(item);}} else { this.audiences = null;} return (A) this; - } - public A withAudiences(java.lang.String... audiences) { - if (this.audiences != null) {this.audiences.clear(); _visitables.remove("audiences"); } - if (audiences != null) {for (String item :audiences){ this.addToAudiences(item);}} return (A) this; - } - public Boolean hasAudiences() { - return audiences != null && !audiences.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildBoundObjectRef instead. - * @return The buildable object. - */ - @Deprecated - public V1BoundObjectReference getBoundObjectRef() { - return this.boundObjectRef!=null ?this.boundObjectRef.build():null; - } - public V1BoundObjectReference buildBoundObjectRef() { - return this.boundObjectRef!=null ?this.boundObjectRef.build():null; - } - public A withBoundObjectRef(V1BoundObjectReference boundObjectRef) { - _visitables.get("boundObjectRef").remove(this.boundObjectRef); - if (boundObjectRef!=null){ this.boundObjectRef= new V1BoundObjectReferenceBuilder(boundObjectRef); _visitables.get("boundObjectRef").add(this.boundObjectRef);} else { this.boundObjectRef = null; _visitables.get("boundObjectRef").remove(this.boundObjectRef); } return (A) this; - } - public Boolean hasBoundObjectRef() { - return this.boundObjectRef != null; - } - public V1TokenRequestSpecFluentImpl.BoundObjectRefNested withNewBoundObjectRef() { - return new V1TokenRequestSpecFluentImpl.BoundObjectRefNestedImpl(); - } - public V1TokenRequestSpecFluentImpl.BoundObjectRefNested withNewBoundObjectRefLike(V1BoundObjectReference item) { - return new V1TokenRequestSpecFluentImpl.BoundObjectRefNestedImpl(item); - } - public V1TokenRequestSpecFluentImpl.BoundObjectRefNested editBoundObjectRef() { - return withNewBoundObjectRefLike(getBoundObjectRef()); - } - public V1TokenRequestSpecFluentImpl.BoundObjectRefNested editOrNewBoundObjectRef() { - return withNewBoundObjectRefLike(getBoundObjectRef() != null ? getBoundObjectRef(): new V1BoundObjectReferenceBuilder().build()); - } - public V1TokenRequestSpecFluentImpl.BoundObjectRefNested editOrNewBoundObjectRefLike(V1BoundObjectReference item) { - return withNewBoundObjectRefLike(getBoundObjectRef() != null ? getBoundObjectRef(): item); - } - public Long getExpirationSeconds() { - return this.expirationSeconds; - } - public A withExpirationSeconds(Long expirationSeconds) { - this.expirationSeconds=expirationSeconds; return (A) this; - } - public Boolean hasExpirationSeconds() { - return this.expirationSeconds != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TokenRequestSpecFluentImpl that = (V1TokenRequestSpecFluentImpl) o; - if (!java.util.Objects.equals(audiences, that.audiences)) return false; - - if (!java.util.Objects.equals(boundObjectRef, that.boundObjectRef)) return false; - - if (!java.util.Objects.equals(expirationSeconds, that.expirationSeconds)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(audiences, boundObjectRef, expirationSeconds, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (audiences != null && !audiences.isEmpty()) { sb.append("audiences:"); sb.append(audiences + ","); } - if (boundObjectRef != null) { sb.append("boundObjectRef:"); sb.append(boundObjectRef + ","); } - if (expirationSeconds != null) { sb.append("expirationSeconds:"); sb.append(expirationSeconds); } - sb.append("}"); - return sb.toString(); - } - class BoundObjectRefNestedImpl extends V1BoundObjectReferenceFluentImpl> implements V1TokenRequestSpecFluentImpl.BoundObjectRefNested,Nested{ - BoundObjectRefNestedImpl(V1BoundObjectReference item) { - this.builder = new V1BoundObjectReferenceBuilder(this, item); - } - BoundObjectRefNestedImpl() { - this.builder = new V1BoundObjectReferenceBuilder(this); - } - V1BoundObjectReferenceBuilder builder; - public N and() { - return (N) V1TokenRequestSpecFluentImpl.this.withBoundObjectRef(builder.build()); - } - public N endBoundObjectRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusBuilder.java index a70d2bd4cb..9fd0524632 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TokenRequestStatusBuilder extends V1TokenRequestStatusFluentImpl implements VisitableBuilder{ +public class V1TokenRequestStatusBuilder extends V1TokenRequestStatusFluent implements VisitableBuilder{ public V1TokenRequestStatusBuilder() { - this(false); - } - public V1TokenRequestStatusBuilder(Boolean validationEnabled) { - this(new V1TokenRequestStatus(), validationEnabled); + this(new V1TokenRequestStatus()); } + public V1TokenRequestStatusBuilder(V1TokenRequestStatusFluent fluent) { - this(fluent, false); - } - public V1TokenRequestStatusBuilder(V1TokenRequestStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TokenRequestStatus(), validationEnabled); + this(fluent, new V1TokenRequestStatus()); } + public V1TokenRequestStatusBuilder(V1TokenRequestStatusFluent fluent,V1TokenRequestStatus instance) { - this(fluent, instance, false); - } - public V1TokenRequestStatusBuilder(V1TokenRequestStatusFluent fluent,V1TokenRequestStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExpirationTimestamp(instance.getExpirationTimestamp()); - fluent.withToken(instance.getToken()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TokenRequestStatusBuilder(V1TokenRequestStatus instance) { - this(instance,false); - } - public V1TokenRequestStatusBuilder(V1TokenRequestStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExpirationTimestamp(instance.getExpirationTimestamp()); - this.withToken(instance.getToken()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TokenRequestStatusFluent fluent; - Boolean validationEnabled; + public V1TokenRequestStatus build() { V1TokenRequestStatus buildable = new V1TokenRequestStatus(); buildable.setExpirationTimestamp(fluent.getExpirationTimestamp()); @@ -46,4 +28,5 @@ public V1TokenRequestStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusFluent.java index ef713b505c..635c05ff9f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusFluent.java @@ -1,20 +1,81 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1TokenRequestStatusFluent> extends Fluent{ - public OffsetDateTime getExpirationTimestamp(); - public A withExpirationTimestamp(OffsetDateTime expirationTimestamp); - public Boolean hasExpirationTimestamp(); - public String getToken(); - public A withToken(String token); - public Boolean hasToken(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TokenRequestStatusFluent> extends BaseFluent{ + public V1TokenRequestStatusFluent() { + } + public V1TokenRequestStatusFluent(V1TokenRequestStatus instance) { + this.copyInstance(instance); + } + private OffsetDateTime expirationTimestamp; + private String token; + + protected void copyInstance(V1TokenRequestStatus instance) { + instance = (instance != null ? instance : new V1TokenRequestStatus()); + if (instance != null) { + this.withExpirationTimestamp(instance.getExpirationTimestamp()); + this.withToken(instance.getToken()); + } + } + + public OffsetDateTime getExpirationTimestamp() { + return this.expirationTimestamp; + } + + public A withExpirationTimestamp(OffsetDateTime expirationTimestamp) { + this.expirationTimestamp = expirationTimestamp; + return (A) this; + } + + public boolean hasExpirationTimestamp() { + return this.expirationTimestamp != null; + } + + public String getToken() { + return this.token; + } + + public A withToken(String token) { + this.token = token; + return (A) this; + } + + public boolean hasToken() { + return this.token != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TokenRequestStatusFluent that = (V1TokenRequestStatusFluent) o; + if (!java.util.Objects.equals(expirationTimestamp, that.expirationTimestamp)) return false; + if (!java.util.Objects.equals(token, that.token)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(expirationTimestamp, token, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (expirationTimestamp != null) { sb.append("expirationTimestamp:"); sb.append(expirationTimestamp + ","); } + if (token != null) { sb.append("token:"); sb.append(token); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusFluentImpl.java deleted file mode 100644 index 63dd29d0b2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenRequestStatusFluentImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TokenRequestStatusFluentImpl> extends BaseFluent implements V1TokenRequestStatusFluent{ - public V1TokenRequestStatusFluentImpl() { - } - public V1TokenRequestStatusFluentImpl(V1TokenRequestStatus instance) { - if (instance != null) { - this.withExpirationTimestamp(instance.getExpirationTimestamp()); - this.withToken(instance.getToken()); - } - } - private OffsetDateTime expirationTimestamp; - private String token; - public OffsetDateTime getExpirationTimestamp() { - return this.expirationTimestamp; - } - public A withExpirationTimestamp(OffsetDateTime expirationTimestamp) { - this.expirationTimestamp=expirationTimestamp; return (A) this; - } - public Boolean hasExpirationTimestamp() { - return this.expirationTimestamp != null; - } - public String getToken() { - return this.token; - } - public A withToken(String token) { - this.token=token; return (A) this; - } - public Boolean hasToken() { - return this.token != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TokenRequestStatusFluentImpl that = (V1TokenRequestStatusFluentImpl) o; - if (!java.util.Objects.equals(expirationTimestamp, that.expirationTimestamp)) return false; - - if (!java.util.Objects.equals(token, that.token)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(expirationTimestamp, token, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (expirationTimestamp != null) { sb.append("expirationTimestamp:"); sb.append(expirationTimestamp + ","); } - if (token != null) { sb.append("token:"); sb.append(token); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewBuilder.java index 5d72e1d300..aa2af1ad55 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TokenReviewBuilder extends V1TokenReviewFluentImpl implements VisitableBuilder{ +public class V1TokenReviewBuilder extends V1TokenReviewFluent implements VisitableBuilder{ public V1TokenReviewBuilder() { - this(false); - } - public V1TokenReviewBuilder(Boolean validationEnabled) { - this(new V1TokenReview(), validationEnabled); + this(new V1TokenReview()); } + public V1TokenReviewBuilder(V1TokenReviewFluent fluent) { - this(fluent, false); - } - public V1TokenReviewBuilder(V1TokenReviewFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TokenReview(), validationEnabled); + this(fluent, new V1TokenReview()); } + public V1TokenReviewBuilder(V1TokenReviewFluent fluent,V1TokenReview instance) { - this(fluent, instance, false); - } - public V1TokenReviewBuilder(V1TokenReviewFluent fluent,V1TokenReview instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TokenReviewBuilder(V1TokenReview instance) { - this(instance,false); - } - public V1TokenReviewBuilder(V1TokenReview instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TokenReviewFluent fluent; - Boolean validationEnabled; + public V1TokenReview build() { V1TokenReview buildable = new V1TokenReview(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewFluent.java index d87fe3f8e4..be872aa41d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1TokenReviewFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1TokenReviewFluent.MetadataNested withNewMetadata(); - public V1TokenReviewFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1TokenReviewFluent.MetadataNested editMetadata(); - public V1TokenReviewFluent.MetadataNested editOrNewMetadata(); - public V1TokenReviewFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1TokenReviewSpec getSpec(); - public V1TokenReviewSpec buildSpec(); - public A withSpec(V1TokenReviewSpec spec); - public Boolean hasSpec(); - public V1TokenReviewFluent.SpecNested withNewSpec(); - public V1TokenReviewFluent.SpecNested withNewSpecLike(V1TokenReviewSpec item); - public V1TokenReviewFluent.SpecNested editSpec(); - public V1TokenReviewFluent.SpecNested editOrNewSpec(); - public V1TokenReviewFluent.SpecNested editOrNewSpecLike(V1TokenReviewSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1TokenReviewStatus getStatus(); - public V1TokenReviewStatus buildStatus(); - public A withStatus(V1TokenReviewStatus status); - public Boolean hasStatus(); - public V1TokenReviewFluent.StatusNested withNewStatus(); - public V1TokenReviewFluent.StatusNested withNewStatusLike(V1TokenReviewStatus item); - public V1TokenReviewFluent.StatusNested editStatus(); - public V1TokenReviewFluent.StatusNested editOrNewStatus(); - public V1TokenReviewFluent.StatusNested editOrNewStatusLike(V1TokenReviewStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TokenReviewFluent> extends BaseFluent{ + public V1TokenReviewFluent() { + } + + public V1TokenReviewFluent(V1TokenReview instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1TokenReviewSpecBuilder spec; + private V1TokenReviewStatusBuilder status; + + protected void copyInstance(V1TokenReview instance) { + instance = (instance != null ? instance : new V1TokenReview()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1TokenReviewSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1TokenReviewSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1TokenReviewSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1TokenReviewSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1TokenReviewSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1TokenReviewSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1TokenReviewSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1TokenReviewStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1TokenReviewStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1TokenReviewStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1TokenReviewStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1TokenReviewStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1TokenReviewStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TokenReviewFluent that = (V1TokenReviewFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1TokenReviewFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1TokenReviewStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1TokenReviewSpecFluent> implements Nested{ + SpecNested(V1TokenReviewSpec item) { + this.builder = new V1TokenReviewSpecBuilder(this, item); + } + V1TokenReviewSpecBuilder builder; + + public N and() { + return (N) V1TokenReviewFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1TokenReviewStatusFluent> implements Nested{ + StatusNested(V1TokenReviewStatus item) { + this.builder = new V1TokenReviewStatusBuilder(this, item); + } + V1TokenReviewStatusBuilder builder; + + public N and() { + return (N) V1TokenReviewFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewFluentImpl.java deleted file mode 100644 index 206a8e97dc..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TokenReviewFluentImpl> extends BaseFluent implements V1TokenReviewFluent{ - public V1TokenReviewFluentImpl() { - } - public V1TokenReviewFluentImpl(V1TokenReview instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1TokenReviewSpecBuilder spec; - private V1TokenReviewStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1TokenReviewFluentImpl.MetadataNested withNewMetadata() { - return new V1TokenReviewFluentImpl.MetadataNestedImpl(); - } - public V1TokenReviewFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1TokenReviewFluentImpl.MetadataNestedImpl(item); - } - public V1TokenReviewFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1TokenReviewFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1TokenReviewFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1TokenReviewSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1TokenReviewSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1TokenReviewSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1TokenReviewSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1TokenReviewFluentImpl.SpecNested withNewSpec() { - return new V1TokenReviewFluentImpl.SpecNestedImpl(); - } - public V1TokenReviewFluentImpl.SpecNested withNewSpecLike(V1TokenReviewSpec item) { - return new V1TokenReviewFluentImpl.SpecNestedImpl(item); - } - public V1TokenReviewFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1TokenReviewFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1TokenReviewSpecBuilder().build()); - } - public V1TokenReviewFluentImpl.SpecNested editOrNewSpecLike(V1TokenReviewSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1TokenReviewStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1TokenReviewStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1TokenReviewStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1TokenReviewStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1TokenReviewFluentImpl.StatusNested withNewStatus() { - return new V1TokenReviewFluentImpl.StatusNestedImpl(); - } - public V1TokenReviewFluentImpl.StatusNested withNewStatusLike(V1TokenReviewStatus item) { - return new V1TokenReviewFluentImpl.StatusNestedImpl(item); - } - public V1TokenReviewFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1TokenReviewFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1TokenReviewStatusBuilder().build()); - } - public V1TokenReviewFluentImpl.StatusNested editOrNewStatusLike(V1TokenReviewStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TokenReviewFluentImpl that = (V1TokenReviewFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1TokenReviewFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1TokenReviewFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1TokenReviewSpecFluentImpl> implements V1TokenReviewFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1TokenReviewSpec item) { - this.builder = new V1TokenReviewSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1TokenReviewSpecBuilder(this); - } - V1TokenReviewSpecBuilder builder; - public N and() { - return (N) V1TokenReviewFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1TokenReviewStatusFluentImpl> implements V1TokenReviewFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1TokenReviewStatus item) { - this.builder = new V1TokenReviewStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1TokenReviewStatusBuilder(this); - } - V1TokenReviewStatusBuilder builder; - public N and() { - return (N) V1TokenReviewFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecBuilder.java index 6974f857cd..f7e67fa129 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TokenReviewSpecBuilder extends V1TokenReviewSpecFluentImpl implements VisitableBuilder{ +public class V1TokenReviewSpecBuilder extends V1TokenReviewSpecFluent implements VisitableBuilder{ public V1TokenReviewSpecBuilder() { - this(false); - } - public V1TokenReviewSpecBuilder(Boolean validationEnabled) { - this(new V1TokenReviewSpec(), validationEnabled); + this(new V1TokenReviewSpec()); } + public V1TokenReviewSpecBuilder(V1TokenReviewSpecFluent fluent) { - this(fluent, false); - } - public V1TokenReviewSpecBuilder(V1TokenReviewSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TokenReviewSpec(), validationEnabled); + this(fluent, new V1TokenReviewSpec()); } + public V1TokenReviewSpecBuilder(V1TokenReviewSpecFluent fluent,V1TokenReviewSpec instance) { - this(fluent, instance, false); - } - public V1TokenReviewSpecBuilder(V1TokenReviewSpecFluent fluent,V1TokenReviewSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAudiences(instance.getAudiences()); - fluent.withToken(instance.getToken()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TokenReviewSpecBuilder(V1TokenReviewSpec instance) { - this(instance,false); - } - public V1TokenReviewSpecBuilder(V1TokenReviewSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAudiences(instance.getAudiences()); - this.withToken(instance.getToken()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TokenReviewSpecFluent fluent; - Boolean validationEnabled; + public V1TokenReviewSpec build() { V1TokenReviewSpec buildable = new V1TokenReviewSpec(); buildable.setAudiences(fluent.getAudiences()); @@ -46,4 +28,5 @@ public V1TokenReviewSpec build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecFluent.java index e81459cc39..faac9a0b8e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecFluent.java @@ -1,35 +1,165 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1TokenReviewSpecFluent> extends Fluent{ - public A addToAudiences(int index,String item); - public A setToAudiences(int index,String item); - public A addToAudiences(java.lang.String... items); - public A addAllToAudiences(Collection items); - public A removeFromAudiences(java.lang.String... items); - public A removeAllFromAudiences(Collection items); - public List getAudiences(); - public String getAudience(int index); - public String getFirstAudience(); - public String getLastAudience(); - public String getMatchingAudience(Predicate predicate); - public Boolean hasMatchingAudience(Predicate predicate); - public A withAudiences(List audiences); - public A withAudiences(java.lang.String... audiences); - public Boolean hasAudiences(); - public String getToken(); - public A withToken(String token); - public Boolean hasToken(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TokenReviewSpecFluent> extends BaseFluent{ + public V1TokenReviewSpecFluent() { + } + public V1TokenReviewSpecFluent(V1TokenReviewSpec instance) { + this.copyInstance(instance); + } + private List audiences; + private String token; + + protected void copyInstance(V1TokenReviewSpec instance) { + instance = (instance != null ? instance : new V1TokenReviewSpec()); + if (instance != null) { + this.withAudiences(instance.getAudiences()); + this.withToken(instance.getToken()); + } + } + + public A addToAudiences(int index,String item) { + if (this.audiences == null) {this.audiences = new ArrayList();} + this.audiences.add(index, item); + return (A)this; + } + + public A setToAudiences(int index,String item) { + if (this.audiences == null) {this.audiences = new ArrayList();} + this.audiences.set(index, item); return (A)this; + } + + public A addToAudiences(java.lang.String... items) { + if (this.audiences == null) {this.audiences = new ArrayList();} + for (String item : items) {this.audiences.add(item);} return (A)this; + } + + public A addAllToAudiences(Collection items) { + if (this.audiences == null) {this.audiences = new ArrayList();} + for (String item : items) {this.audiences.add(item);} return (A)this; + } + + public A removeFromAudiences(java.lang.String... items) { + if (this.audiences == null) return (A)this; + for (String item : items) { this.audiences.remove(item);} return (A)this; + } + + public A removeAllFromAudiences(Collection items) { + if (this.audiences == null) return (A)this; + for (String item : items) { this.audiences.remove(item);} return (A)this; + } + + public List getAudiences() { + return this.audiences; + } + + public String getAudience(int index) { + return this.audiences.get(index); + } + + public String getFirstAudience() { + return this.audiences.get(0); + } + + public String getLastAudience() { + return this.audiences.get(audiences.size() - 1); + } + + public String getMatchingAudience(Predicate predicate) { + for (String item : audiences) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAudience(Predicate predicate) { + for (String item : audiences) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAudiences(List audiences) { + if (audiences != null) { + this.audiences = new ArrayList(); + for (String item : audiences) { + this.addToAudiences(item); + } + } else { + this.audiences = null; + } + return (A) this; + } + + public A withAudiences(java.lang.String... audiences) { + if (this.audiences != null) { + this.audiences.clear(); + _visitables.remove("audiences"); + } + if (audiences != null) { + for (String item : audiences) { + this.addToAudiences(item); + } + } + return (A) this; + } + + public boolean hasAudiences() { + return this.audiences != null && !this.audiences.isEmpty(); + } + + public String getToken() { + return this.token; + } + + public A withToken(String token) { + this.token = token; + return (A) this; + } + + public boolean hasToken() { + return this.token != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TokenReviewSpecFluent that = (V1TokenReviewSpecFluent) o; + if (!java.util.Objects.equals(audiences, that.audiences)) return false; + if (!java.util.Objects.equals(token, that.token)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(audiences, token, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (audiences != null && !audiences.isEmpty()) { sb.append("audiences:"); sb.append(audiences + ","); } + if (token != null) { sb.append("token:"); sb.append(token); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecFluentImpl.java deleted file mode 100644 index cf860372eb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewSpecFluentImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TokenReviewSpecFluentImpl> extends BaseFluent implements V1TokenReviewSpecFluent{ - public V1TokenReviewSpecFluentImpl() { - } - public V1TokenReviewSpecFluentImpl(V1TokenReviewSpec instance) { - if (instance != null) { - this.withAudiences(instance.getAudiences()); - this.withToken(instance.getToken()); - } - } - private List audiences; - private String token; - public A addToAudiences(int index,String item) { - if (this.audiences == null) {this.audiences = new ArrayList();} - this.audiences.add(index, item); - return (A)this; - } - public A setToAudiences(int index,String item) { - if (this.audiences == null) {this.audiences = new ArrayList();} - this.audiences.set(index, item); return (A)this; - } - public A addToAudiences(java.lang.String... items) { - if (this.audiences == null) {this.audiences = new ArrayList();} - for (String item : items) {this.audiences.add(item);} return (A)this; - } - public A addAllToAudiences(Collection items) { - if (this.audiences == null) {this.audiences = new ArrayList();} - for (String item : items) {this.audiences.add(item);} return (A)this; - } - public A removeFromAudiences(java.lang.String... items) { - for (String item : items) {if (this.audiences!= null){ this.audiences.remove(item);}} return (A)this; - } - public A removeAllFromAudiences(Collection items) { - for (String item : items) {if (this.audiences!= null){ this.audiences.remove(item);}} return (A)this; - } - public List getAudiences() { - return this.audiences; - } - public String getAudience(int index) { - return this.audiences.get(index); - } - public String getFirstAudience() { - return this.audiences.get(0); - } - public String getLastAudience() { - return this.audiences.get(audiences.size() - 1); - } - public String getMatchingAudience(Predicate predicate) { - for (String item: audiences) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAudience(Predicate predicate) { - for (String item: audiences) { if(predicate.test(item)){ return true;} } return false; - } - public A withAudiences(List audiences) { - if (audiences != null) {this.audiences = new ArrayList(); for (String item : audiences){this.addToAudiences(item);}} else { this.audiences = null;} return (A) this; - } - public A withAudiences(java.lang.String... audiences) { - if (this.audiences != null) {this.audiences.clear(); _visitables.remove("audiences"); } - if (audiences != null) {for (String item :audiences){ this.addToAudiences(item);}} return (A) this; - } - public Boolean hasAudiences() { - return audiences != null && !audiences.isEmpty(); - } - public String getToken() { - return this.token; - } - public A withToken(String token) { - this.token=token; return (A) this; - } - public Boolean hasToken() { - return this.token != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TokenReviewSpecFluentImpl that = (V1TokenReviewSpecFluentImpl) o; - if (!java.util.Objects.equals(audiences, that.audiences)) return false; - - if (!java.util.Objects.equals(token, that.token)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(audiences, token, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (audiences != null && !audiences.isEmpty()) { sb.append("audiences:"); sb.append(audiences + ","); } - if (token != null) { sb.append("token:"); sb.append(token); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusBuilder.java index f103ff1188..f0349e294b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TokenReviewStatusBuilder extends V1TokenReviewStatusFluentImpl implements VisitableBuilder{ +public class V1TokenReviewStatusBuilder extends V1TokenReviewStatusFluent implements VisitableBuilder{ public V1TokenReviewStatusBuilder() { - this(false); - } - public V1TokenReviewStatusBuilder(Boolean validationEnabled) { - this(new V1TokenReviewStatus(), validationEnabled); + this(new V1TokenReviewStatus()); } + public V1TokenReviewStatusBuilder(V1TokenReviewStatusFluent fluent) { - this(fluent, false); - } - public V1TokenReviewStatusBuilder(V1TokenReviewStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TokenReviewStatus(), validationEnabled); + this(fluent, new V1TokenReviewStatus()); } + public V1TokenReviewStatusBuilder(V1TokenReviewStatusFluent fluent,V1TokenReviewStatus instance) { - this(fluent, instance, false); - } - public V1TokenReviewStatusBuilder(V1TokenReviewStatusFluent fluent,V1TokenReviewStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAudiences(instance.getAudiences()); - fluent.withAuthenticated(instance.getAuthenticated()); - fluent.withError(instance.getError()); - fluent.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TokenReviewStatusBuilder(V1TokenReviewStatus instance) { - this(instance,false); - } - public V1TokenReviewStatusBuilder(V1TokenReviewStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAudiences(instance.getAudiences()); - this.withAuthenticated(instance.getAuthenticated()); - this.withError(instance.getError()); - this.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TokenReviewStatusFluent fluent; - Boolean validationEnabled; + public V1TokenReviewStatus build() { V1TokenReviewStatus buildable = new V1TokenReviewStatus(); buildable.setAudiences(fluent.getAudiences()); buildable.setAuthenticated(fluent.getAuthenticated()); buildable.setError(fluent.getError()); - buildable.setUser(fluent.getUser()); + buildable.setUser(fluent.buildUser()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusFluent.java index 8dd46e2035..ad8a84da38 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusFluent.java @@ -1,61 +1,247 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1TokenReviewStatusFluent> extends Fluent{ - public A addToAudiences(int index,String item); - public A setToAudiences(int index,String item); - public A addToAudiences(java.lang.String... items); - public A addAllToAudiences(Collection items); - public A removeFromAudiences(java.lang.String... items); - public A removeAllFromAudiences(Collection items); - public List getAudiences(); - public String getAudience(int index); - public String getFirstAudience(); - public String getLastAudience(); - public String getMatchingAudience(Predicate predicate); - public Boolean hasMatchingAudience(Predicate predicate); - public A withAudiences(List audiences); - public A withAudiences(java.lang.String... audiences); - public Boolean hasAudiences(); - public Boolean getAuthenticated(); - public A withAuthenticated(Boolean authenticated); - public Boolean hasAuthenticated(); - public String getError(); - public A withError(String error); - public Boolean hasError(); - - /** - * This method has been deprecated, please use method buildUser instead. - * @return The buildable object. - */ - @Deprecated - public V1UserInfo getUser(); - public V1UserInfo buildUser(); - public A withUser(V1UserInfo user); - public Boolean hasUser(); - public V1TokenReviewStatusFluent.UserNested withNewUser(); - public V1TokenReviewStatusFluent.UserNested withNewUserLike(V1UserInfo item); - public V1TokenReviewStatusFluent.UserNested editUser(); - public V1TokenReviewStatusFluent.UserNested editOrNewUser(); - public V1TokenReviewStatusFluent.UserNested editOrNewUserLike(V1UserInfo item); - public A withAuthenticated(); - public interface UserNested extends Nested,V1UserInfoFluent>{ - public N and(); - public N endUser(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TokenReviewStatusFluent> extends BaseFluent{ + public V1TokenReviewStatusFluent() { + } + + public V1TokenReviewStatusFluent(V1TokenReviewStatus instance) { + this.copyInstance(instance); + } + private List audiences; + private Boolean authenticated; + private String error; + private V1UserInfoBuilder user; + + protected void copyInstance(V1TokenReviewStatus instance) { + instance = (instance != null ? instance : new V1TokenReviewStatus()); + if (instance != null) { + this.withAudiences(instance.getAudiences()); + this.withAuthenticated(instance.getAuthenticated()); + this.withError(instance.getError()); + this.withUser(instance.getUser()); + } + } + + public A addToAudiences(int index,String item) { + if (this.audiences == null) {this.audiences = new ArrayList();} + this.audiences.add(index, item); + return (A)this; + } + + public A setToAudiences(int index,String item) { + if (this.audiences == null) {this.audiences = new ArrayList();} + this.audiences.set(index, item); return (A)this; + } + + public A addToAudiences(java.lang.String... items) { + if (this.audiences == null) {this.audiences = new ArrayList();} + for (String item : items) {this.audiences.add(item);} return (A)this; + } + + public A addAllToAudiences(Collection items) { + if (this.audiences == null) {this.audiences = new ArrayList();} + for (String item : items) {this.audiences.add(item);} return (A)this; + } + + public A removeFromAudiences(java.lang.String... items) { + if (this.audiences == null) return (A)this; + for (String item : items) { this.audiences.remove(item);} return (A)this; + } + + public A removeAllFromAudiences(Collection items) { + if (this.audiences == null) return (A)this; + for (String item : items) { this.audiences.remove(item);} return (A)this; + } + + public List getAudiences() { + return this.audiences; + } + + public String getAudience(int index) { + return this.audiences.get(index); + } + + public String getFirstAudience() { + return this.audiences.get(0); + } + + public String getLastAudience() { + return this.audiences.get(audiences.size() - 1); + } + + public String getMatchingAudience(Predicate predicate) { + for (String item : audiences) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAudience(Predicate predicate) { + for (String item : audiences) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAudiences(List audiences) { + if (audiences != null) { + this.audiences = new ArrayList(); + for (String item : audiences) { + this.addToAudiences(item); + } + } else { + this.audiences = null; + } + return (A) this; + } + + public A withAudiences(java.lang.String... audiences) { + if (this.audiences != null) { + this.audiences.clear(); + _visitables.remove("audiences"); + } + if (audiences != null) { + for (String item : audiences) { + this.addToAudiences(item); + } + } + return (A) this; + } + + public boolean hasAudiences() { + return this.audiences != null && !this.audiences.isEmpty(); + } + + public Boolean getAuthenticated() { + return this.authenticated; + } + + public A withAuthenticated(Boolean authenticated) { + this.authenticated = authenticated; + return (A) this; + } + + public boolean hasAuthenticated() { + return this.authenticated != null; + } + + public String getError() { + return this.error; + } + + public A withError(String error) { + this.error = error; + return (A) this; + } + + public boolean hasError() { + return this.error != null; + } + + public V1UserInfo buildUser() { + return this.user != null ? this.user.build() : null; + } + + public A withUser(V1UserInfo user) { + this._visitables.remove("user"); + if (user != null) { + this.user = new V1UserInfoBuilder(user); + this._visitables.get("user").add(this.user); + } else { + this.user = null; + this._visitables.get("user").remove(this.user); + } + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public UserNested withNewUser() { + return new UserNested(null); + } + + public UserNested withNewUserLike(V1UserInfo item) { + return new UserNested(item); } + public UserNested editUser() { + return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(null)); + } + + public UserNested editOrNewUser() { + return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(new V1UserInfoBuilder().build())); + } + + public UserNested editOrNewUserLike(V1UserInfo item) { + return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TokenReviewStatusFluent that = (V1TokenReviewStatusFluent) o; + if (!java.util.Objects.equals(audiences, that.audiences)) return false; + if (!java.util.Objects.equals(authenticated, that.authenticated)) return false; + if (!java.util.Objects.equals(error, that.error)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(audiences, authenticated, error, user, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (audiences != null && !audiences.isEmpty()) { sb.append("audiences:"); sb.append(audiences + ","); } + if (authenticated != null) { sb.append("authenticated:"); sb.append(authenticated + ","); } + if (error != null) { sb.append("error:"); sb.append(error + ","); } + if (user != null) { sb.append("user:"); sb.append(user); } + sb.append("}"); + return sb.toString(); + } + + public A withAuthenticated() { + return withAuthenticated(true); + } + public class UserNested extends V1UserInfoFluent> implements Nested{ + UserNested(V1UserInfo item) { + this.builder = new V1UserInfoBuilder(this, item); + } + V1UserInfoBuilder builder; + + public N and() { + return (N) V1TokenReviewStatusFluent.this.withUser(builder.build()); + } + + public N endUser() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusFluentImpl.java deleted file mode 100644 index f00ed8f30d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TokenReviewStatusFluentImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TokenReviewStatusFluentImpl> extends BaseFluent implements V1TokenReviewStatusFluent{ - public V1TokenReviewStatusFluentImpl() { - } - public V1TokenReviewStatusFluentImpl(V1TokenReviewStatus instance) { - if (instance != null) { - this.withAudiences(instance.getAudiences()); - this.withAuthenticated(instance.getAuthenticated()); - this.withError(instance.getError()); - this.withUser(instance.getUser()); - } - } - private List audiences; - private Boolean authenticated; - private String error; - private V1UserInfoBuilder user; - public A addToAudiences(int index,String item) { - if (this.audiences == null) {this.audiences = new ArrayList();} - this.audiences.add(index, item); - return (A)this; - } - public A setToAudiences(int index,String item) { - if (this.audiences == null) {this.audiences = new ArrayList();} - this.audiences.set(index, item); return (A)this; - } - public A addToAudiences(java.lang.String... items) { - if (this.audiences == null) {this.audiences = new ArrayList();} - for (String item : items) {this.audiences.add(item);} return (A)this; - } - public A addAllToAudiences(Collection items) { - if (this.audiences == null) {this.audiences = new ArrayList();} - for (String item : items) {this.audiences.add(item);} return (A)this; - } - public A removeFromAudiences(java.lang.String... items) { - for (String item : items) {if (this.audiences!= null){ this.audiences.remove(item);}} return (A)this; - } - public A removeAllFromAudiences(Collection items) { - for (String item : items) {if (this.audiences!= null){ this.audiences.remove(item);}} return (A)this; - } - public List getAudiences() { - return this.audiences; - } - public String getAudience(int index) { - return this.audiences.get(index); - } - public String getFirstAudience() { - return this.audiences.get(0); - } - public String getLastAudience() { - return this.audiences.get(audiences.size() - 1); - } - public String getMatchingAudience(Predicate predicate) { - for (String item: audiences) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAudience(Predicate predicate) { - for (String item: audiences) { if(predicate.test(item)){ return true;} } return false; - } - public A withAudiences(List audiences) { - if (audiences != null) {this.audiences = new ArrayList(); for (String item : audiences){this.addToAudiences(item);}} else { this.audiences = null;} return (A) this; - } - public A withAudiences(java.lang.String... audiences) { - if (this.audiences != null) {this.audiences.clear(); _visitables.remove("audiences"); } - if (audiences != null) {for (String item :audiences){ this.addToAudiences(item);}} return (A) this; - } - public Boolean hasAudiences() { - return audiences != null && !audiences.isEmpty(); - } - public Boolean getAuthenticated() { - return this.authenticated; - } - public A withAuthenticated(Boolean authenticated) { - this.authenticated=authenticated; return (A) this; - } - public Boolean hasAuthenticated() { - return this.authenticated != null; - } - public String getError() { - return this.error; - } - public A withError(String error) { - this.error=error; return (A) this; - } - public Boolean hasError() { - return this.error != null; - } - - /** - * This method has been deprecated, please use method buildUser instead. - * @return The buildable object. - */ - @Deprecated - public V1UserInfo getUser() { - return this.user!=null ?this.user.build():null; - } - public V1UserInfo buildUser() { - return this.user!=null ?this.user.build():null; - } - public A withUser(V1UserInfo user) { - _visitables.get("user").remove(this.user); - if (user!=null){ this.user= new V1UserInfoBuilder(user); _visitables.get("user").add(this.user);} else { this.user = null; _visitables.get("user").remove(this.user); } return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public V1TokenReviewStatusFluentImpl.UserNested withNewUser() { - return new V1TokenReviewStatusFluentImpl.UserNestedImpl(); - } - public V1TokenReviewStatusFluentImpl.UserNested withNewUserLike(V1UserInfo item) { - return new V1TokenReviewStatusFluentImpl.UserNestedImpl(item); - } - public V1TokenReviewStatusFluentImpl.UserNested editUser() { - return withNewUserLike(getUser()); - } - public V1TokenReviewStatusFluentImpl.UserNested editOrNewUser() { - return withNewUserLike(getUser() != null ? getUser(): new V1UserInfoBuilder().build()); - } - public V1TokenReviewStatusFluentImpl.UserNested editOrNewUserLike(V1UserInfo item) { - return withNewUserLike(getUser() != null ? getUser(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TokenReviewStatusFluentImpl that = (V1TokenReviewStatusFluentImpl) o; - if (!java.util.Objects.equals(audiences, that.audiences)) return false; - - if (!java.util.Objects.equals(authenticated, that.authenticated)) return false; - - if (!java.util.Objects.equals(error, that.error)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(audiences, authenticated, error, user, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (audiences != null && !audiences.isEmpty()) { sb.append("audiences:"); sb.append(audiences + ","); } - if (authenticated != null) { sb.append("authenticated:"); sb.append(authenticated + ","); } - if (error != null) { sb.append("error:"); sb.append(error + ","); } - if (user != null) { sb.append("user:"); sb.append(user); } - sb.append("}"); - return sb.toString(); - } - public A withAuthenticated() { - return withAuthenticated(true); - } - class UserNestedImpl extends V1UserInfoFluentImpl> implements V1TokenReviewStatusFluentImpl.UserNested,Nested{ - UserNestedImpl(V1UserInfo item) { - this.builder = new V1UserInfoBuilder(this, item); - } - UserNestedImpl() { - this.builder = new V1UserInfoBuilder(this); - } - V1UserInfoBuilder builder; - public N and() { - return (N) V1TokenReviewStatusFluentImpl.this.withUser(builder.build()); - } - public N endUser() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationBuilder.java index 2a79fb9000..219de58bd3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TolerationBuilder extends V1TolerationFluentImpl implements VisitableBuilder{ +public class V1TolerationBuilder extends V1TolerationFluent implements VisitableBuilder{ public V1TolerationBuilder() { - this(false); - } - public V1TolerationBuilder(Boolean validationEnabled) { - this(new V1Toleration(), validationEnabled); + this(new V1Toleration()); } + public V1TolerationBuilder(V1TolerationFluent fluent) { - this(fluent, false); - } - public V1TolerationBuilder(V1TolerationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Toleration(), validationEnabled); + this(fluent, new V1Toleration()); } + public V1TolerationBuilder(V1TolerationFluent fluent,V1Toleration instance) { - this(fluent, instance, false); - } - public V1TolerationBuilder(V1TolerationFluent fluent,V1Toleration instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withEffect(instance.getEffect()); - fluent.withKey(instance.getKey()); - fluent.withOperator(instance.getOperator()); - fluent.withTolerationSeconds(instance.getTolerationSeconds()); - fluent.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TolerationBuilder(V1Toleration instance) { - this(instance,false); - } - public V1TolerationBuilder(V1Toleration instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withEffect(instance.getEffect()); - this.withKey(instance.getKey()); - this.withOperator(instance.getOperator()); - this.withTolerationSeconds(instance.getTolerationSeconds()); - this.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TolerationFluent fluent; - Boolean validationEnabled; + public V1Toleration build() { V1Toleration buildable = new V1Toleration(); buildable.setEffect(fluent.getEffect()); @@ -55,4 +31,5 @@ public V1Toleration build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationFluent.java index 3d75e08c15..4c78b949f2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1TolerationFluent> extends Fluent{ - public String getEffect(); - public A withEffect(String effect); - public Boolean hasEffect(); - public String getKey(); - public A withKey(String key); - public Boolean hasKey(); - public String getOperator(); - public A withOperator(String operator); - public Boolean hasOperator(); - public Long getTolerationSeconds(); - public A withTolerationSeconds(Long tolerationSeconds); - public Boolean hasTolerationSeconds(); - public String getValue(); - public A withValue(String value); - public Boolean hasValue(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TolerationFluent> extends BaseFluent{ + public V1TolerationFluent() { + } + public V1TolerationFluent(V1Toleration instance) { + this.copyInstance(instance); + } + private String effect; + private String key; + private String operator; + private Long tolerationSeconds; + private String value; + + protected void copyInstance(V1Toleration instance) { + instance = (instance != null ? instance : new V1Toleration()); + if (instance != null) { + this.withEffect(instance.getEffect()); + this.withKey(instance.getKey()); + this.withOperator(instance.getOperator()); + this.withTolerationSeconds(instance.getTolerationSeconds()); + this.withValue(instance.getValue()); + } + } + + public String getEffect() { + return this.effect; + } + + public A withEffect(String effect) { + this.effect = effect; + return (A) this; + } + + public boolean hasEffect() { + return this.effect != null; + } + + public String getKey() { + return this.key; + } + + public A withKey(String key) { + this.key = key; + return (A) this; + } + + public boolean hasKey() { + return this.key != null; + } + + public String getOperator() { + return this.operator; + } + + public A withOperator(String operator) { + this.operator = operator; + return (A) this; + } + + public boolean hasOperator() { + return this.operator != null; + } + + public Long getTolerationSeconds() { + return this.tolerationSeconds; + } + + public A withTolerationSeconds(Long tolerationSeconds) { + this.tolerationSeconds = tolerationSeconds; + return (A) this; + } + + public boolean hasTolerationSeconds() { + return this.tolerationSeconds != null; + } + + public String getValue() { + return this.value; + } + + public A withValue(String value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TolerationFluent that = (V1TolerationFluent) o; + if (!java.util.Objects.equals(effect, that.effect)) return false; + if (!java.util.Objects.equals(key, that.key)) return false; + if (!java.util.Objects.equals(operator, that.operator)) return false; + if (!java.util.Objects.equals(tolerationSeconds, that.tolerationSeconds)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(effect, key, operator, tolerationSeconds, value, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (effect != null) { sb.append("effect:"); sb.append(effect + ","); } + if (key != null) { sb.append("key:"); sb.append(key + ","); } + if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } + if (tolerationSeconds != null) { sb.append("tolerationSeconds:"); sb.append(tolerationSeconds + ","); } + if (value != null) { sb.append("value:"); sb.append(value); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationFluentImpl.java deleted file mode 100644 index f3e7b389d0..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TolerationFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TolerationFluentImpl> extends BaseFluent implements V1TolerationFluent{ - public V1TolerationFluentImpl() { - } - public V1TolerationFluentImpl(V1Toleration instance) { - if (instance != null) { - this.withEffect(instance.getEffect()); - this.withKey(instance.getKey()); - this.withOperator(instance.getOperator()); - this.withTolerationSeconds(instance.getTolerationSeconds()); - this.withValue(instance.getValue()); - } - } - private String effect; - private String key; - private String operator; - private Long tolerationSeconds; - private String value; - public String getEffect() { - return this.effect; - } - public A withEffect(String effect) { - this.effect=effect; return (A) this; - } - public Boolean hasEffect() { - return this.effect != null; - } - public String getKey() { - return this.key; - } - public A withKey(String key) { - this.key=key; return (A) this; - } - public Boolean hasKey() { - return this.key != null; - } - public String getOperator() { - return this.operator; - } - public A withOperator(String operator) { - this.operator=operator; return (A) this; - } - public Boolean hasOperator() { - return this.operator != null; - } - public Long getTolerationSeconds() { - return this.tolerationSeconds; - } - public A withTolerationSeconds(Long tolerationSeconds) { - this.tolerationSeconds=tolerationSeconds; return (A) this; - } - public Boolean hasTolerationSeconds() { - return this.tolerationSeconds != null; - } - public String getValue() { - return this.value; - } - public A withValue(String value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TolerationFluentImpl that = (V1TolerationFluentImpl) o; - if (!java.util.Objects.equals(effect, that.effect)) return false; - - if (!java.util.Objects.equals(key, that.key)) return false; - - if (!java.util.Objects.equals(operator, that.operator)) return false; - - if (!java.util.Objects.equals(tolerationSeconds, that.tolerationSeconds)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(effect, key, operator, tolerationSeconds, value, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (effect != null) { sb.append("effect:"); sb.append(effect + ","); } - if (key != null) { sb.append("key:"); sb.append(key + ","); } - if (operator != null) { sb.append("operator:"); sb.append(operator + ","); } - if (tolerationSeconds != null) { sb.append("tolerationSeconds:"); sb.append(tolerationSeconds + ","); } - if (value != null) { sb.append("value:"); sb.append(value); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementBuilder.java index 653cd63bc3..079e0f968c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TopologySelectorLabelRequirementBuilder extends V1TopologySelectorLabelRequirementFluentImpl implements VisitableBuilder{ +public class V1TopologySelectorLabelRequirementBuilder extends V1TopologySelectorLabelRequirementFluent implements VisitableBuilder{ public V1TopologySelectorLabelRequirementBuilder() { - this(false); - } - public V1TopologySelectorLabelRequirementBuilder(Boolean validationEnabled) { - this(new V1TopologySelectorLabelRequirement(), validationEnabled); + this(new V1TopologySelectorLabelRequirement()); } + public V1TopologySelectorLabelRequirementBuilder(V1TopologySelectorLabelRequirementFluent fluent) { - this(fluent, false); - } - public V1TopologySelectorLabelRequirementBuilder(V1TopologySelectorLabelRequirementFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TopologySelectorLabelRequirement(), validationEnabled); + this(fluent, new V1TopologySelectorLabelRequirement()); } + public V1TopologySelectorLabelRequirementBuilder(V1TopologySelectorLabelRequirementFluent fluent,V1TopologySelectorLabelRequirement instance) { - this(fluent, instance, false); - } - public V1TopologySelectorLabelRequirementBuilder(V1TopologySelectorLabelRequirementFluent fluent,V1TopologySelectorLabelRequirement instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withKey(instance.getKey()); - fluent.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TopologySelectorLabelRequirementBuilder(V1TopologySelectorLabelRequirement instance) { - this(instance,false); - } - public V1TopologySelectorLabelRequirementBuilder(V1TopologySelectorLabelRequirement instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withKey(instance.getKey()); - this.withValues(instance.getValues()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TopologySelectorLabelRequirementFluent fluent; - Boolean validationEnabled; + public V1TopologySelectorLabelRequirement build() { V1TopologySelectorLabelRequirement buildable = new V1TopologySelectorLabelRequirement(); buildable.setKey(fluent.getKey()); @@ -46,4 +28,5 @@ public V1TopologySelectorLabelRequirement build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementFluent.java index d2b355d85d..f10adb2e67 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementFluent.java @@ -1,35 +1,165 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1TopologySelectorLabelRequirementFluent> extends Fluent{ - public String getKey(); - public A withKey(String key); - public Boolean hasKey(); - public A addToValues(int index,String item); - public A setToValues(int index,String item); - public A addToValues(java.lang.String... items); - public A addAllToValues(Collection items); - public A removeFromValues(java.lang.String... items); - public A removeAllFromValues(Collection items); - public List getValues(); - public String getValue(int index); - public String getFirstValue(); - public String getLastValue(); - public String getMatchingValue(Predicate predicate); - public Boolean hasMatchingValue(Predicate predicate); - public A withValues(List values); - public A withValues(java.lang.String... values); - public Boolean hasValues(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TopologySelectorLabelRequirementFluent> extends BaseFluent{ + public V1TopologySelectorLabelRequirementFluent() { + } + public V1TopologySelectorLabelRequirementFluent(V1TopologySelectorLabelRequirement instance) { + this.copyInstance(instance); + } + private String key; + private List values; + + protected void copyInstance(V1TopologySelectorLabelRequirement instance) { + instance = (instance != null ? instance : new V1TopologySelectorLabelRequirement()); + if (instance != null) { + this.withKey(instance.getKey()); + this.withValues(instance.getValues()); + } + } + + public String getKey() { + return this.key; + } + + public A withKey(String key) { + this.key = key; + return (A) this; + } + + public boolean hasKey() { + return this.key != null; + } + + public A addToValues(int index,String item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.add(index, item); + return (A)this; + } + + public A setToValues(int index,String item) { + if (this.values == null) {this.values = new ArrayList();} + this.values.set(index, item); return (A)this; + } + + public A addToValues(java.lang.String... items) { + if (this.values == null) {this.values = new ArrayList();} + for (String item : items) {this.values.add(item);} return (A)this; + } + + public A addAllToValues(Collection items) { + if (this.values == null) {this.values = new ArrayList();} + for (String item : items) {this.values.add(item);} return (A)this; + } + + public A removeFromValues(java.lang.String... items) { + if (this.values == null) return (A)this; + for (String item : items) { this.values.remove(item);} return (A)this; + } + + public A removeAllFromValues(Collection items) { + if (this.values == null) return (A)this; + for (String item : items) { this.values.remove(item);} return (A)this; + } + + public List getValues() { + return this.values; + } + + public String getValue(int index) { + return this.values.get(index); + } + + public String getFirstValue() { + return this.values.get(0); + } + + public String getLastValue() { + return this.values.get(values.size() - 1); + } + + public String getMatchingValue(Predicate predicate) { + for (String item : values) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingValue(Predicate predicate) { + for (String item : values) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withValues(List values) { + if (values != null) { + this.values = new ArrayList(); + for (String item : values) { + this.addToValues(item); + } + } else { + this.values = null; + } + return (A) this; + } + + public A withValues(java.lang.String... values) { + if (this.values != null) { + this.values.clear(); + _visitables.remove("values"); + } + if (values != null) { + for (String item : values) { + this.addToValues(item); + } + } + return (A) this; + } + + public boolean hasValues() { + return this.values != null && !this.values.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TopologySelectorLabelRequirementFluent that = (V1TopologySelectorLabelRequirementFluent) o; + if (!java.util.Objects.equals(key, that.key)) return false; + if (!java.util.Objects.equals(values, that.values)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(key, values, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (key != null) { sb.append("key:"); sb.append(key + ","); } + if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementFluentImpl.java deleted file mode 100644 index 15c9b97015..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorLabelRequirementFluentImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TopologySelectorLabelRequirementFluentImpl> extends BaseFluent implements V1TopologySelectorLabelRequirementFluent{ - public V1TopologySelectorLabelRequirementFluentImpl() { - } - public V1TopologySelectorLabelRequirementFluentImpl(V1TopologySelectorLabelRequirement instance) { - if (instance != null) { - this.withKey(instance.getKey()); - this.withValues(instance.getValues()); - } - } - private String key; - private List values; - public String getKey() { - return this.key; - } - public A withKey(String key) { - this.key=key; return (A) this; - } - public Boolean hasKey() { - return this.key != null; - } - public A addToValues(int index,String item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.add(index, item); - return (A)this; - } - public A setToValues(int index,String item) { - if (this.values == null) {this.values = new ArrayList();} - this.values.set(index, item); return (A)this; - } - public A addToValues(java.lang.String... items) { - if (this.values == null) {this.values = new ArrayList();} - for (String item : items) {this.values.add(item);} return (A)this; - } - public A addAllToValues(Collection items) { - if (this.values == null) {this.values = new ArrayList();} - for (String item : items) {this.values.add(item);} return (A)this; - } - public A removeFromValues(java.lang.String... items) { - for (String item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public A removeAllFromValues(Collection items) { - for (String item : items) {if (this.values!= null){ this.values.remove(item);}} return (A)this; - } - public List getValues() { - return this.values; - } - public String getValue(int index) { - return this.values.get(index); - } - public String getFirstValue() { - return this.values.get(0); - } - public String getLastValue() { - return this.values.get(values.size() - 1); - } - public String getMatchingValue(Predicate predicate) { - for (String item: values) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingValue(Predicate predicate) { - for (String item: values) { if(predicate.test(item)){ return true;} } return false; - } - public A withValues(List values) { - if (values != null) {this.values = new ArrayList(); for (String item : values){this.addToValues(item);}} else { this.values = null;} return (A) this; - } - public A withValues(java.lang.String... values) { - if (this.values != null) {this.values.clear(); _visitables.remove("values"); } - if (values != null) {for (String item :values){ this.addToValues(item);}} return (A) this; - } - public Boolean hasValues() { - return values != null && !values.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TopologySelectorLabelRequirementFluentImpl that = (V1TopologySelectorLabelRequirementFluentImpl) o; - if (!java.util.Objects.equals(key, that.key)) return false; - - if (!java.util.Objects.equals(values, that.values)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(key, values, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (key != null) { sb.append("key:"); sb.append(key + ","); } - if (values != null && !values.isEmpty()) { sb.append("values:"); sb.append(values); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermBuilder.java index 44b133694e..7c9b05cf36 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TopologySelectorTermBuilder extends V1TopologySelectorTermFluentImpl implements VisitableBuilder{ +public class V1TopologySelectorTermBuilder extends V1TopologySelectorTermFluent implements VisitableBuilder{ public V1TopologySelectorTermBuilder() { - this(false); - } - public V1TopologySelectorTermBuilder(Boolean validationEnabled) { - this(new V1TopologySelectorTerm(), validationEnabled); + this(new V1TopologySelectorTerm()); } + public V1TopologySelectorTermBuilder(V1TopologySelectorTermFluent fluent) { - this(fluent, false); - } - public V1TopologySelectorTermBuilder(V1TopologySelectorTermFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TopologySelectorTerm(), validationEnabled); + this(fluent, new V1TopologySelectorTerm()); } + public V1TopologySelectorTermBuilder(V1TopologySelectorTermFluent fluent,V1TopologySelectorTerm instance) { - this(fluent, instance, false); - } - public V1TopologySelectorTermBuilder(V1TopologySelectorTermFluent fluent,V1TopologySelectorTerm instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMatchLabelExpressions(instance.getMatchLabelExpressions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TopologySelectorTermBuilder(V1TopologySelectorTerm instance) { - this(instance,false); - } - public V1TopologySelectorTermBuilder(V1TopologySelectorTerm instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMatchLabelExpressions(instance.getMatchLabelExpressions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TopologySelectorTermFluent fluent; - Boolean validationEnabled; + public V1TopologySelectorTerm build() { V1TopologySelectorTerm buildable = new V1TopologySelectorTerm(); - buildable.setMatchLabelExpressions(fluent.getMatchLabelExpressions()); + buildable.setMatchLabelExpressions(fluent.buildMatchLabelExpressions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermFluent.java index b8a517b311..7cbc4435fa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1TopologySelectorTermFluent> extends Fluent{ - public A addToMatchLabelExpressions(int index,V1TopologySelectorLabelRequirement item); - public A setToMatchLabelExpressions(int index,V1TopologySelectorLabelRequirement item); - public A addToMatchLabelExpressions(io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement... items); - public A addAllToMatchLabelExpressions(Collection items); - public A removeFromMatchLabelExpressions(io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement... items); - public A removeAllFromMatchLabelExpressions(Collection items); - public A removeMatchingFromMatchLabelExpressions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMatchLabelExpressions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchLabelExpressions(); - public List buildMatchLabelExpressions(); - public V1TopologySelectorLabelRequirement buildMatchLabelExpression(int index); - public V1TopologySelectorLabelRequirement buildFirstMatchLabelExpression(); - public V1TopologySelectorLabelRequirement buildLastMatchLabelExpression(); - public V1TopologySelectorLabelRequirement buildMatchingMatchLabelExpression(Predicate predicate); - public Boolean hasMatchingMatchLabelExpression(Predicate predicate); - public A withMatchLabelExpressions(List matchLabelExpressions); - public A withMatchLabelExpressions(io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement... matchLabelExpressions); - public Boolean hasMatchLabelExpressions(); - public V1TopologySelectorTermFluent.MatchLabelExpressionsNested addNewMatchLabelExpression(); - public V1TopologySelectorTermFluent.MatchLabelExpressionsNested addNewMatchLabelExpressionLike(V1TopologySelectorLabelRequirement item); - public V1TopologySelectorTermFluent.MatchLabelExpressionsNested setNewMatchLabelExpressionLike(int index,V1TopologySelectorLabelRequirement item); - public V1TopologySelectorTermFluent.MatchLabelExpressionsNested editMatchLabelExpression(int index); - public V1TopologySelectorTermFluent.MatchLabelExpressionsNested editFirstMatchLabelExpression(); - public V1TopologySelectorTermFluent.MatchLabelExpressionsNested editLastMatchLabelExpression(); - public V1TopologySelectorTermFluent.MatchLabelExpressionsNested editMatchingMatchLabelExpression(Predicate predicate); - public interface MatchLabelExpressionsNested extends Nested,V1TopologySelectorLabelRequirementFluent>{ - public N and(); - public N endMatchLabelExpression(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TopologySelectorTermFluent> extends BaseFluent{ + public V1TopologySelectorTermFluent() { + } + + public V1TopologySelectorTermFluent(V1TopologySelectorTerm instance) { + this.copyInstance(instance); + } + private ArrayList matchLabelExpressions; + + protected void copyInstance(V1TopologySelectorTerm instance) { + instance = (instance != null ? instance : new V1TopologySelectorTerm()); + if (instance != null) { + this.withMatchLabelExpressions(instance.getMatchLabelExpressions()); + } + } + + public A addToMatchLabelExpressions(int index,V1TopologySelectorLabelRequirement item) { + if (this.matchLabelExpressions == null) {this.matchLabelExpressions = new ArrayList();} + V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item); + if (index < 0 || index >= matchLabelExpressions.size()) { _visitables.get("matchLabelExpressions").add(builder); matchLabelExpressions.add(builder); } else { _visitables.get("matchLabelExpressions").add(index, builder); matchLabelExpressions.add(index, builder);} + return (A)this; + } + + public A setToMatchLabelExpressions(int index,V1TopologySelectorLabelRequirement item) { + if (this.matchLabelExpressions == null) {this.matchLabelExpressions = new ArrayList();} + V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item); + if (index < 0 || index >= matchLabelExpressions.size()) { _visitables.get("matchLabelExpressions").add(builder); matchLabelExpressions.add(builder); } else { _visitables.get("matchLabelExpressions").set(index, builder); matchLabelExpressions.set(index, builder);} + return (A)this; + } + + public A addToMatchLabelExpressions(io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement... items) { + if (this.matchLabelExpressions == null) {this.matchLabelExpressions = new ArrayList();} + for (V1TopologySelectorLabelRequirement item : items) {V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item);_visitables.get("matchLabelExpressions").add(builder);this.matchLabelExpressions.add(builder);} return (A)this; + } + + public A addAllToMatchLabelExpressions(Collection items) { + if (this.matchLabelExpressions == null) {this.matchLabelExpressions = new ArrayList();} + for (V1TopologySelectorLabelRequirement item : items) {V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item);_visitables.get("matchLabelExpressions").add(builder);this.matchLabelExpressions.add(builder);} return (A)this; + } + + public A removeFromMatchLabelExpressions(io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement... items) { + if (this.matchLabelExpressions == null) return (A)this; + for (V1TopologySelectorLabelRequirement item : items) {V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item);_visitables.get("matchLabelExpressions").remove(builder); this.matchLabelExpressions.remove(builder);} return (A)this; + } + + public A removeAllFromMatchLabelExpressions(Collection items) { + if (this.matchLabelExpressions == null) return (A)this; + for (V1TopologySelectorLabelRequirement item : items) {V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item);_visitables.get("matchLabelExpressions").remove(builder); this.matchLabelExpressions.remove(builder);} return (A)this; + } + + public A removeMatchingFromMatchLabelExpressions(Predicate predicate) { + if (matchLabelExpressions == null) return (A) this; + final Iterator each = matchLabelExpressions.iterator(); + final List visitables = _visitables.get("matchLabelExpressions"); + while (each.hasNext()) { + V1TopologySelectorLabelRequirementBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMatchLabelExpressions() { + return this.matchLabelExpressions != null ? build(matchLabelExpressions) : null; + } + + public V1TopologySelectorLabelRequirement buildMatchLabelExpression(int index) { + return this.matchLabelExpressions.get(index).build(); + } + + public V1TopologySelectorLabelRequirement buildFirstMatchLabelExpression() { + return this.matchLabelExpressions.get(0).build(); + } + + public V1TopologySelectorLabelRequirement buildLastMatchLabelExpression() { + return this.matchLabelExpressions.get(matchLabelExpressions.size() - 1).build(); + } + + public V1TopologySelectorLabelRequirement buildMatchingMatchLabelExpression(Predicate predicate) { + for (V1TopologySelectorLabelRequirementBuilder item : matchLabelExpressions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMatchLabelExpression(Predicate predicate) { + for (V1TopologySelectorLabelRequirementBuilder item : matchLabelExpressions) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withMatchLabelExpressions(List matchLabelExpressions) { + if (this.matchLabelExpressions != null) { + this._visitables.get("matchLabelExpressions").clear(); + } + if (matchLabelExpressions != null) { + this.matchLabelExpressions = new ArrayList(); + for (V1TopologySelectorLabelRequirement item : matchLabelExpressions) { + this.addToMatchLabelExpressions(item); + } + } else { + this.matchLabelExpressions = null; + } + return (A) this; + } + + public A withMatchLabelExpressions(io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement... matchLabelExpressions) { + if (this.matchLabelExpressions != null) { + this.matchLabelExpressions.clear(); + _visitables.remove("matchLabelExpressions"); + } + if (matchLabelExpressions != null) { + for (V1TopologySelectorLabelRequirement item : matchLabelExpressions) { + this.addToMatchLabelExpressions(item); + } + } + return (A) this; + } + + public boolean hasMatchLabelExpressions() { + return this.matchLabelExpressions != null && !this.matchLabelExpressions.isEmpty(); + } + + public MatchLabelExpressionsNested addNewMatchLabelExpression() { + return new MatchLabelExpressionsNested(-1, null); + } + + public MatchLabelExpressionsNested addNewMatchLabelExpressionLike(V1TopologySelectorLabelRequirement item) { + return new MatchLabelExpressionsNested(-1, item); + } + + public MatchLabelExpressionsNested setNewMatchLabelExpressionLike(int index,V1TopologySelectorLabelRequirement item) { + return new MatchLabelExpressionsNested(index, item); + } + + public MatchLabelExpressionsNested editMatchLabelExpression(int index) { + if (matchLabelExpressions.size() <= index) throw new RuntimeException("Can't edit matchLabelExpressions. Index exceeds size."); + return setNewMatchLabelExpressionLike(index, buildMatchLabelExpression(index)); + } + + public MatchLabelExpressionsNested editFirstMatchLabelExpression() { + if (matchLabelExpressions.size() == 0) throw new RuntimeException("Can't edit first matchLabelExpressions. The list is empty."); + return setNewMatchLabelExpressionLike(0, buildMatchLabelExpression(0)); + } + + public MatchLabelExpressionsNested editLastMatchLabelExpression() { + int index = matchLabelExpressions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last matchLabelExpressions. The list is empty."); + return setNewMatchLabelExpressionLike(index, buildMatchLabelExpression(index)); + } + + public MatchLabelExpressionsNested editMatchingMatchLabelExpression(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1TopologySelectorLabelRequirementFluent> implements Nested{ + MatchLabelExpressionsNested(int index,V1TopologySelectorLabelRequirement item) { + this.index = index; + this.builder = new V1TopologySelectorLabelRequirementBuilder(this, item); + } + V1TopologySelectorLabelRequirementBuilder builder; + int index; + + public N and() { + return (N) V1TopologySelectorTermFluent.this.setToMatchLabelExpressions(index,builder.build()); + } + + public N endMatchLabelExpression() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermFluentImpl.java deleted file mode 100644 index 387c49f936..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySelectorTermFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TopologySelectorTermFluentImpl> extends BaseFluent implements V1TopologySelectorTermFluent{ - public V1TopologySelectorTermFluentImpl() { - } - public V1TopologySelectorTermFluentImpl(V1TopologySelectorTerm instance) { - if (instance != null) { - this.withMatchLabelExpressions(instance.getMatchLabelExpressions()); - } - } - private ArrayList matchLabelExpressions; - public A addToMatchLabelExpressions(int index,V1TopologySelectorLabelRequirement item) { - if (this.matchLabelExpressions == null) {this.matchLabelExpressions = new ArrayList();} - V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item); - if (index < 0 || index >= matchLabelExpressions.size()) { _visitables.get("matchLabelExpressions").add(builder); matchLabelExpressions.add(builder); } else { _visitables.get("matchLabelExpressions").add(index, builder); matchLabelExpressions.add(index, builder);} - return (A)this; - } - public A setToMatchLabelExpressions(int index,V1TopologySelectorLabelRequirement item) { - if (this.matchLabelExpressions == null) {this.matchLabelExpressions = new ArrayList();} - V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item); - if (index < 0 || index >= matchLabelExpressions.size()) { _visitables.get("matchLabelExpressions").add(builder); matchLabelExpressions.add(builder); } else { _visitables.get("matchLabelExpressions").set(index, builder); matchLabelExpressions.set(index, builder);} - return (A)this; - } - public A addToMatchLabelExpressions(io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement... items) { - if (this.matchLabelExpressions == null) {this.matchLabelExpressions = new ArrayList();} - for (V1TopologySelectorLabelRequirement item : items) {V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item);_visitables.get("matchLabelExpressions").add(builder);this.matchLabelExpressions.add(builder);} return (A)this; - } - public A addAllToMatchLabelExpressions(Collection items) { - if (this.matchLabelExpressions == null) {this.matchLabelExpressions = new ArrayList();} - for (V1TopologySelectorLabelRequirement item : items) {V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item);_visitables.get("matchLabelExpressions").add(builder);this.matchLabelExpressions.add(builder);} return (A)this; - } - public A removeFromMatchLabelExpressions(io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement... items) { - for (V1TopologySelectorLabelRequirement item : items) {V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item);_visitables.get("matchLabelExpressions").remove(builder);if (this.matchLabelExpressions != null) {this.matchLabelExpressions.remove(builder);}} return (A)this; - } - public A removeAllFromMatchLabelExpressions(Collection items) { - for (V1TopologySelectorLabelRequirement item : items) {V1TopologySelectorLabelRequirementBuilder builder = new V1TopologySelectorLabelRequirementBuilder(item);_visitables.get("matchLabelExpressions").remove(builder);if (this.matchLabelExpressions != null) {this.matchLabelExpressions.remove(builder);}} return (A)this; - } - public A removeMatchingFromMatchLabelExpressions(Predicate predicate) { - if (matchLabelExpressions == null) return (A) this; - final Iterator each = matchLabelExpressions.iterator(); - final List visitables = _visitables.get("matchLabelExpressions"); - while (each.hasNext()) { - V1TopologySelectorLabelRequirementBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildMatchLabelExpressions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchLabelExpressions() { - return matchLabelExpressions != null ? build(matchLabelExpressions) : null; - } - public List buildMatchLabelExpressions() { - return matchLabelExpressions != null ? build(matchLabelExpressions) : null; - } - public V1TopologySelectorLabelRequirement buildMatchLabelExpression(int index) { - return this.matchLabelExpressions.get(index).build(); - } - public V1TopologySelectorLabelRequirement buildFirstMatchLabelExpression() { - return this.matchLabelExpressions.get(0).build(); - } - public V1TopologySelectorLabelRequirement buildLastMatchLabelExpression() { - return this.matchLabelExpressions.get(matchLabelExpressions.size() - 1).build(); - } - public V1TopologySelectorLabelRequirement buildMatchingMatchLabelExpression(Predicate predicate) { - for (V1TopologySelectorLabelRequirementBuilder item: matchLabelExpressions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingMatchLabelExpression(Predicate predicate) { - for (V1TopologySelectorLabelRequirementBuilder item: matchLabelExpressions) { if(predicate.test(item)){ return true;} } return false; - } - public A withMatchLabelExpressions(List matchLabelExpressions) { - if (this.matchLabelExpressions != null) { _visitables.get("matchLabelExpressions").clear();} - if (matchLabelExpressions != null) {this.matchLabelExpressions = new ArrayList(); for (V1TopologySelectorLabelRequirement item : matchLabelExpressions){this.addToMatchLabelExpressions(item);}} else { this.matchLabelExpressions = null;} return (A) this; - } - public A withMatchLabelExpressions(io.kubernetes.client.openapi.models.V1TopologySelectorLabelRequirement... matchLabelExpressions) { - if (this.matchLabelExpressions != null) {this.matchLabelExpressions.clear(); _visitables.remove("matchLabelExpressions"); } - if (matchLabelExpressions != null) {for (V1TopologySelectorLabelRequirement item :matchLabelExpressions){ this.addToMatchLabelExpressions(item);}} return (A) this; - } - public Boolean hasMatchLabelExpressions() { - return matchLabelExpressions != null && !matchLabelExpressions.isEmpty(); - } - public V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNested addNewMatchLabelExpression() { - return new V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNestedImpl(); - } - public V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNested addNewMatchLabelExpressionLike(V1TopologySelectorLabelRequirement item) { - return new V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNestedImpl(-1, item); - } - public V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNested setNewMatchLabelExpressionLike(int index,V1TopologySelectorLabelRequirement item) { - return new V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNestedImpl(index, item); - } - public V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNested editMatchLabelExpression(int index) { - if (matchLabelExpressions.size() <= index) throw new RuntimeException("Can't edit matchLabelExpressions. Index exceeds size."); - return setNewMatchLabelExpressionLike(index, buildMatchLabelExpression(index)); - } - public V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNested editFirstMatchLabelExpression() { - if (matchLabelExpressions.size() == 0) throw new RuntimeException("Can't edit first matchLabelExpressions. The list is empty."); - return setNewMatchLabelExpressionLike(0, buildMatchLabelExpression(0)); - } - public V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNested editLastMatchLabelExpression() { - int index = matchLabelExpressions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last matchLabelExpressions. The list is empty."); - return setNewMatchLabelExpressionLike(index, buildMatchLabelExpression(index)); - } - public V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNested editMatchingMatchLabelExpression(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1TopologySelectorLabelRequirementFluentImpl> implements V1TopologySelectorTermFluentImpl.MatchLabelExpressionsNested,Nested{ - MatchLabelExpressionsNestedImpl(int index,V1TopologySelectorLabelRequirement item) { - this.index = index; - this.builder = new V1TopologySelectorLabelRequirementBuilder(this, item); - } - MatchLabelExpressionsNestedImpl() { - this.index = -1; - this.builder = new V1TopologySelectorLabelRequirementBuilder(this); - } - V1TopologySelectorLabelRequirementBuilder builder; - int index; - public N and() { - return (N) V1TopologySelectorTermFluentImpl.this.setToMatchLabelExpressions(index,builder.build()); - } - public N endMatchLabelExpression() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintBuilder.java index 3a6c07292e..d58b80b11a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintBuilder.java @@ -1,59 +1,29 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TopologySpreadConstraintBuilder extends V1TopologySpreadConstraintFluentImpl implements VisitableBuilder{ +public class V1TopologySpreadConstraintBuilder extends V1TopologySpreadConstraintFluent implements VisitableBuilder{ public V1TopologySpreadConstraintBuilder() { - this(false); - } - public V1TopologySpreadConstraintBuilder(Boolean validationEnabled) { - this(new V1TopologySpreadConstraint(), validationEnabled); + this(new V1TopologySpreadConstraint()); } + public V1TopologySpreadConstraintBuilder(V1TopologySpreadConstraintFluent fluent) { - this(fluent, false); - } - public V1TopologySpreadConstraintBuilder(V1TopologySpreadConstraintFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TopologySpreadConstraint(), validationEnabled); + this(fluent, new V1TopologySpreadConstraint()); } + public V1TopologySpreadConstraintBuilder(V1TopologySpreadConstraintFluent fluent,V1TopologySpreadConstraint instance) { - this(fluent, instance, false); - } - public V1TopologySpreadConstraintBuilder(V1TopologySpreadConstraintFluent fluent,V1TopologySpreadConstraint instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLabelSelector(instance.getLabelSelector()); - fluent.withMatchLabelKeys(instance.getMatchLabelKeys()); - fluent.withMaxSkew(instance.getMaxSkew()); - fluent.withMinDomains(instance.getMinDomains()); - fluent.withNodeAffinityPolicy(instance.getNodeAffinityPolicy()); - fluent.withNodeTaintsPolicy(instance.getNodeTaintsPolicy()); - fluent.withTopologyKey(instance.getTopologyKey()); - fluent.withWhenUnsatisfiable(instance.getWhenUnsatisfiable()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TopologySpreadConstraintBuilder(V1TopologySpreadConstraint instance) { - this(instance,false); - } - public V1TopologySpreadConstraintBuilder(V1TopologySpreadConstraint instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLabelSelector(instance.getLabelSelector()); - this.withMatchLabelKeys(instance.getMatchLabelKeys()); - this.withMaxSkew(instance.getMaxSkew()); - this.withMinDomains(instance.getMinDomains()); - this.withNodeAffinityPolicy(instance.getNodeAffinityPolicy()); - this.withNodeTaintsPolicy(instance.getNodeTaintsPolicy()); - this.withTopologyKey(instance.getTopologyKey()); - this.withWhenUnsatisfiable(instance.getWhenUnsatisfiable()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TopologySpreadConstraintFluent fluent; - Boolean validationEnabled; + public V1TopologySpreadConstraint build() { V1TopologySpreadConstraint buildable = new V1TopologySpreadConstraint(); - buildable.setLabelSelector(fluent.getLabelSelector()); + buildable.setLabelSelector(fluent.buildLabelSelector()); buildable.setMatchLabelKeys(fluent.getMatchLabelKeys()); buildable.setMaxSkew(fluent.getMaxSkew()); buildable.setMinDomains(fluent.getMinDomains()); @@ -64,4 +34,5 @@ public V1TopologySpreadConstraint build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintFluent.java index 34d0d712f0..13d4ba6a82 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintFluent.java @@ -1,73 +1,311 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1TopologySpreadConstraintFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildLabelSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getLabelSelector(); - public V1LabelSelector buildLabelSelector(); - public A withLabelSelector(V1LabelSelector labelSelector); - public Boolean hasLabelSelector(); - public V1TopologySpreadConstraintFluent.LabelSelectorNested withNewLabelSelector(); - public V1TopologySpreadConstraintFluent.LabelSelectorNested withNewLabelSelectorLike(V1LabelSelector item); - public V1TopologySpreadConstraintFluent.LabelSelectorNested editLabelSelector(); - public V1TopologySpreadConstraintFluent.LabelSelectorNested editOrNewLabelSelector(); - public V1TopologySpreadConstraintFluent.LabelSelectorNested editOrNewLabelSelectorLike(V1LabelSelector item); - public A addToMatchLabelKeys(int index,String item); - public A setToMatchLabelKeys(int index,String item); - public A addToMatchLabelKeys(java.lang.String... items); - public A addAllToMatchLabelKeys(Collection items); - public A removeFromMatchLabelKeys(java.lang.String... items); - public A removeAllFromMatchLabelKeys(Collection items); - public List getMatchLabelKeys(); - public String getMatchLabelKey(int index); - public String getFirstMatchLabelKey(); - public String getLastMatchLabelKey(); - public String getMatchingMatchLabelKey(Predicate predicate); - public Boolean hasMatchingMatchLabelKey(Predicate predicate); - public A withMatchLabelKeys(List matchLabelKeys); - public A withMatchLabelKeys(java.lang.String... matchLabelKeys); - public Boolean hasMatchLabelKeys(); - public Integer getMaxSkew(); - public A withMaxSkew(Integer maxSkew); - public Boolean hasMaxSkew(); - public Integer getMinDomains(); - public A withMinDomains(Integer minDomains); - public Boolean hasMinDomains(); - public String getNodeAffinityPolicy(); - public A withNodeAffinityPolicy(String nodeAffinityPolicy); - public Boolean hasNodeAffinityPolicy(); - public String getNodeTaintsPolicy(); - public A withNodeTaintsPolicy(String nodeTaintsPolicy); - public Boolean hasNodeTaintsPolicy(); - public String getTopologyKey(); - public A withTopologyKey(String topologyKey); - public Boolean hasTopologyKey(); - public String getWhenUnsatisfiable(); - public A withWhenUnsatisfiable(String whenUnsatisfiable); - public Boolean hasWhenUnsatisfiable(); - public interface LabelSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endLabelSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TopologySpreadConstraintFluent> extends BaseFluent{ + public V1TopologySpreadConstraintFluent() { + } + + public V1TopologySpreadConstraintFluent(V1TopologySpreadConstraint instance) { + this.copyInstance(instance); + } + private V1LabelSelectorBuilder labelSelector; + private List matchLabelKeys; + private Integer maxSkew; + private Integer minDomains; + private String nodeAffinityPolicy; + private String nodeTaintsPolicy; + private String topologyKey; + private String whenUnsatisfiable; + + protected void copyInstance(V1TopologySpreadConstraint instance) { + instance = (instance != null ? instance : new V1TopologySpreadConstraint()); + if (instance != null) { + this.withLabelSelector(instance.getLabelSelector()); + this.withMatchLabelKeys(instance.getMatchLabelKeys()); + this.withMaxSkew(instance.getMaxSkew()); + this.withMinDomains(instance.getMinDomains()); + this.withNodeAffinityPolicy(instance.getNodeAffinityPolicy()); + this.withNodeTaintsPolicy(instance.getNodeTaintsPolicy()); + this.withTopologyKey(instance.getTopologyKey()); + this.withWhenUnsatisfiable(instance.getWhenUnsatisfiable()); + } + } + + public V1LabelSelector buildLabelSelector() { + return this.labelSelector != null ? this.labelSelector.build() : null; + } + + public A withLabelSelector(V1LabelSelector labelSelector) { + this._visitables.remove("labelSelector"); + if (labelSelector != null) { + this.labelSelector = new V1LabelSelectorBuilder(labelSelector); + this._visitables.get("labelSelector").add(this.labelSelector); + } else { + this.labelSelector = null; + this._visitables.get("labelSelector").remove(this.labelSelector); + } + return (A) this; + } + + public boolean hasLabelSelector() { + return this.labelSelector != null; + } + + public LabelSelectorNested withNewLabelSelector() { + return new LabelSelectorNested(null); + } + + public LabelSelectorNested withNewLabelSelectorLike(V1LabelSelector item) { + return new LabelSelectorNested(item); + } + + public LabelSelectorNested editLabelSelector() { + return withNewLabelSelectorLike(java.util.Optional.ofNullable(buildLabelSelector()).orElse(null)); + } + + public LabelSelectorNested editOrNewLabelSelector() { + return withNewLabelSelectorLike(java.util.Optional.ofNullable(buildLabelSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public LabelSelectorNested editOrNewLabelSelectorLike(V1LabelSelector item) { + return withNewLabelSelectorLike(java.util.Optional.ofNullable(buildLabelSelector()).orElse(item)); + } + + public A addToMatchLabelKeys(int index,String item) { + if (this.matchLabelKeys == null) {this.matchLabelKeys = new ArrayList();} + this.matchLabelKeys.add(index, item); + return (A)this; + } + + public A setToMatchLabelKeys(int index,String item) { + if (this.matchLabelKeys == null) {this.matchLabelKeys = new ArrayList();} + this.matchLabelKeys.set(index, item); return (A)this; + } + + public A addToMatchLabelKeys(java.lang.String... items) { + if (this.matchLabelKeys == null) {this.matchLabelKeys = new ArrayList();} + for (String item : items) {this.matchLabelKeys.add(item);} return (A)this; + } + + public A addAllToMatchLabelKeys(Collection items) { + if (this.matchLabelKeys == null) {this.matchLabelKeys = new ArrayList();} + for (String item : items) {this.matchLabelKeys.add(item);} return (A)this; + } + + public A removeFromMatchLabelKeys(java.lang.String... items) { + if (this.matchLabelKeys == null) return (A)this; + for (String item : items) { this.matchLabelKeys.remove(item);} return (A)this; + } + + public A removeAllFromMatchLabelKeys(Collection items) { + if (this.matchLabelKeys == null) return (A)this; + for (String item : items) { this.matchLabelKeys.remove(item);} return (A)this; + } + + public List getMatchLabelKeys() { + return this.matchLabelKeys; + } + + public String getMatchLabelKey(int index) { + return this.matchLabelKeys.get(index); + } + + public String getFirstMatchLabelKey() { + return this.matchLabelKeys.get(0); + } + + public String getLastMatchLabelKey() { + return this.matchLabelKeys.get(matchLabelKeys.size() - 1); + } + + public String getMatchingMatchLabelKey(Predicate predicate) { + for (String item : matchLabelKeys) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingMatchLabelKey(Predicate predicate) { + for (String item : matchLabelKeys) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMatchLabelKeys(List matchLabelKeys) { + if (matchLabelKeys != null) { + this.matchLabelKeys = new ArrayList(); + for (String item : matchLabelKeys) { + this.addToMatchLabelKeys(item); + } + } else { + this.matchLabelKeys = null; + } + return (A) this; + } + + public A withMatchLabelKeys(java.lang.String... matchLabelKeys) { + if (this.matchLabelKeys != null) { + this.matchLabelKeys.clear(); + _visitables.remove("matchLabelKeys"); + } + if (matchLabelKeys != null) { + for (String item : matchLabelKeys) { + this.addToMatchLabelKeys(item); + } + } + return (A) this; } + public boolean hasMatchLabelKeys() { + return this.matchLabelKeys != null && !this.matchLabelKeys.isEmpty(); + } + + public Integer getMaxSkew() { + return this.maxSkew; + } + + public A withMaxSkew(Integer maxSkew) { + this.maxSkew = maxSkew; + return (A) this; + } + + public boolean hasMaxSkew() { + return this.maxSkew != null; + } + + public Integer getMinDomains() { + return this.minDomains; + } + + public A withMinDomains(Integer minDomains) { + this.minDomains = minDomains; + return (A) this; + } + + public boolean hasMinDomains() { + return this.minDomains != null; + } + + public String getNodeAffinityPolicy() { + return this.nodeAffinityPolicy; + } + + public A withNodeAffinityPolicy(String nodeAffinityPolicy) { + this.nodeAffinityPolicy = nodeAffinityPolicy; + return (A) this; + } + + public boolean hasNodeAffinityPolicy() { + return this.nodeAffinityPolicy != null; + } + + public String getNodeTaintsPolicy() { + return this.nodeTaintsPolicy; + } + + public A withNodeTaintsPolicy(String nodeTaintsPolicy) { + this.nodeTaintsPolicy = nodeTaintsPolicy; + return (A) this; + } + + public boolean hasNodeTaintsPolicy() { + return this.nodeTaintsPolicy != null; + } + + public String getTopologyKey() { + return this.topologyKey; + } + + public A withTopologyKey(String topologyKey) { + this.topologyKey = topologyKey; + return (A) this; + } + + public boolean hasTopologyKey() { + return this.topologyKey != null; + } + + public String getWhenUnsatisfiable() { + return this.whenUnsatisfiable; + } + + public A withWhenUnsatisfiable(String whenUnsatisfiable) { + this.whenUnsatisfiable = whenUnsatisfiable; + return (A) this; + } + + public boolean hasWhenUnsatisfiable() { + return this.whenUnsatisfiable != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TopologySpreadConstraintFluent that = (V1TopologySpreadConstraintFluent) o; + if (!java.util.Objects.equals(labelSelector, that.labelSelector)) return false; + if (!java.util.Objects.equals(matchLabelKeys, that.matchLabelKeys)) return false; + if (!java.util.Objects.equals(maxSkew, that.maxSkew)) return false; + if (!java.util.Objects.equals(minDomains, that.minDomains)) return false; + if (!java.util.Objects.equals(nodeAffinityPolicy, that.nodeAffinityPolicy)) return false; + if (!java.util.Objects.equals(nodeTaintsPolicy, that.nodeTaintsPolicy)) return false; + if (!java.util.Objects.equals(topologyKey, that.topologyKey)) return false; + if (!java.util.Objects.equals(whenUnsatisfiable, that.whenUnsatisfiable)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(labelSelector, matchLabelKeys, maxSkew, minDomains, nodeAffinityPolicy, nodeTaintsPolicy, topologyKey, whenUnsatisfiable, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (labelSelector != null) { sb.append("labelSelector:"); sb.append(labelSelector + ","); } + if (matchLabelKeys != null && !matchLabelKeys.isEmpty()) { sb.append("matchLabelKeys:"); sb.append(matchLabelKeys + ","); } + if (maxSkew != null) { sb.append("maxSkew:"); sb.append(maxSkew + ","); } + if (minDomains != null) { sb.append("minDomains:"); sb.append(minDomains + ","); } + if (nodeAffinityPolicy != null) { sb.append("nodeAffinityPolicy:"); sb.append(nodeAffinityPolicy + ","); } + if (nodeTaintsPolicy != null) { sb.append("nodeTaintsPolicy:"); sb.append(nodeTaintsPolicy + ","); } + if (topologyKey != null) { sb.append("topologyKey:"); sb.append(topologyKey + ","); } + if (whenUnsatisfiable != null) { sb.append("whenUnsatisfiable:"); sb.append(whenUnsatisfiable); } + sb.append("}"); + return sb.toString(); + } + public class LabelSelectorNested extends V1LabelSelectorFluent> implements Nested{ + LabelSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1TopologySpreadConstraintFluent.this.withLabelSelector(builder.build()); + } + + public N endLabelSelector() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintFluentImpl.java deleted file mode 100644 index 0159f3122c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TopologySpreadConstraintFluentImpl.java +++ /dev/null @@ -1,239 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TopologySpreadConstraintFluentImpl> extends BaseFluent implements V1TopologySpreadConstraintFluent{ - public V1TopologySpreadConstraintFluentImpl() { - } - public V1TopologySpreadConstraintFluentImpl(V1TopologySpreadConstraint instance) { - if (instance != null) { - this.withLabelSelector(instance.getLabelSelector()); - this.withMatchLabelKeys(instance.getMatchLabelKeys()); - this.withMaxSkew(instance.getMaxSkew()); - this.withMinDomains(instance.getMinDomains()); - this.withNodeAffinityPolicy(instance.getNodeAffinityPolicy()); - this.withNodeTaintsPolicy(instance.getNodeTaintsPolicy()); - this.withTopologyKey(instance.getTopologyKey()); - this.withWhenUnsatisfiable(instance.getWhenUnsatisfiable()); - } - } - private V1LabelSelectorBuilder labelSelector; - private List matchLabelKeys; - private Integer maxSkew; - private Integer minDomains; - private String nodeAffinityPolicy; - private String nodeTaintsPolicy; - private String topologyKey; - private String whenUnsatisfiable; - - /** - * This method has been deprecated, please use method buildLabelSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getLabelSelector() { - return this.labelSelector!=null ?this.labelSelector.build():null; - } - public V1LabelSelector buildLabelSelector() { - return this.labelSelector!=null ?this.labelSelector.build():null; - } - public A withLabelSelector(V1LabelSelector labelSelector) { - _visitables.get("labelSelector").remove(this.labelSelector); - if (labelSelector!=null){ this.labelSelector= new V1LabelSelectorBuilder(labelSelector); _visitables.get("labelSelector").add(this.labelSelector);} else { this.labelSelector = null; _visitables.get("labelSelector").remove(this.labelSelector); } return (A) this; - } - public Boolean hasLabelSelector() { - return this.labelSelector != null; - } - public V1TopologySpreadConstraintFluentImpl.LabelSelectorNested withNewLabelSelector() { - return new V1TopologySpreadConstraintFluentImpl.LabelSelectorNestedImpl(); - } - public V1TopologySpreadConstraintFluentImpl.LabelSelectorNested withNewLabelSelectorLike(V1LabelSelector item) { - return new V1TopologySpreadConstraintFluentImpl.LabelSelectorNestedImpl(item); - } - public V1TopologySpreadConstraintFluentImpl.LabelSelectorNested editLabelSelector() { - return withNewLabelSelectorLike(getLabelSelector()); - } - public V1TopologySpreadConstraintFluentImpl.LabelSelectorNested editOrNewLabelSelector() { - return withNewLabelSelectorLike(getLabelSelector() != null ? getLabelSelector(): new V1LabelSelectorBuilder().build()); - } - public V1TopologySpreadConstraintFluentImpl.LabelSelectorNested editOrNewLabelSelectorLike(V1LabelSelector item) { - return withNewLabelSelectorLike(getLabelSelector() != null ? getLabelSelector(): item); - } - public A addToMatchLabelKeys(int index,String item) { - if (this.matchLabelKeys == null) {this.matchLabelKeys = new ArrayList();} - this.matchLabelKeys.add(index, item); - return (A)this; - } - public A setToMatchLabelKeys(int index,String item) { - if (this.matchLabelKeys == null) {this.matchLabelKeys = new ArrayList();} - this.matchLabelKeys.set(index, item); return (A)this; - } - public A addToMatchLabelKeys(java.lang.String... items) { - if (this.matchLabelKeys == null) {this.matchLabelKeys = new ArrayList();} - for (String item : items) {this.matchLabelKeys.add(item);} return (A)this; - } - public A addAllToMatchLabelKeys(Collection items) { - if (this.matchLabelKeys == null) {this.matchLabelKeys = new ArrayList();} - for (String item : items) {this.matchLabelKeys.add(item);} return (A)this; - } - public A removeFromMatchLabelKeys(java.lang.String... items) { - for (String item : items) {if (this.matchLabelKeys!= null){ this.matchLabelKeys.remove(item);}} return (A)this; - } - public A removeAllFromMatchLabelKeys(Collection items) { - for (String item : items) {if (this.matchLabelKeys!= null){ this.matchLabelKeys.remove(item);}} return (A)this; - } - public List getMatchLabelKeys() { - return this.matchLabelKeys; - } - public String getMatchLabelKey(int index) { - return this.matchLabelKeys.get(index); - } - public String getFirstMatchLabelKey() { - return this.matchLabelKeys.get(0); - } - public String getLastMatchLabelKey() { - return this.matchLabelKeys.get(matchLabelKeys.size() - 1); - } - public String getMatchingMatchLabelKey(Predicate predicate) { - for (String item: matchLabelKeys) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingMatchLabelKey(Predicate predicate) { - for (String item: matchLabelKeys) { if(predicate.test(item)){ return true;} } return false; - } - public A withMatchLabelKeys(List matchLabelKeys) { - if (matchLabelKeys != null) {this.matchLabelKeys = new ArrayList(); for (String item : matchLabelKeys){this.addToMatchLabelKeys(item);}} else { this.matchLabelKeys = null;} return (A) this; - } - public A withMatchLabelKeys(java.lang.String... matchLabelKeys) { - if (this.matchLabelKeys != null) {this.matchLabelKeys.clear(); _visitables.remove("matchLabelKeys"); } - if (matchLabelKeys != null) {for (String item :matchLabelKeys){ this.addToMatchLabelKeys(item);}} return (A) this; - } - public Boolean hasMatchLabelKeys() { - return matchLabelKeys != null && !matchLabelKeys.isEmpty(); - } - public Integer getMaxSkew() { - return this.maxSkew; - } - public A withMaxSkew(Integer maxSkew) { - this.maxSkew=maxSkew; return (A) this; - } - public Boolean hasMaxSkew() { - return this.maxSkew != null; - } - public Integer getMinDomains() { - return this.minDomains; - } - public A withMinDomains(Integer minDomains) { - this.minDomains=minDomains; return (A) this; - } - public Boolean hasMinDomains() { - return this.minDomains != null; - } - public String getNodeAffinityPolicy() { - return this.nodeAffinityPolicy; - } - public A withNodeAffinityPolicy(String nodeAffinityPolicy) { - this.nodeAffinityPolicy=nodeAffinityPolicy; return (A) this; - } - public Boolean hasNodeAffinityPolicy() { - return this.nodeAffinityPolicy != null; - } - public String getNodeTaintsPolicy() { - return this.nodeTaintsPolicy; - } - public A withNodeTaintsPolicy(String nodeTaintsPolicy) { - this.nodeTaintsPolicy=nodeTaintsPolicy; return (A) this; - } - public Boolean hasNodeTaintsPolicy() { - return this.nodeTaintsPolicy != null; - } - public String getTopologyKey() { - return this.topologyKey; - } - public A withTopologyKey(String topologyKey) { - this.topologyKey=topologyKey; return (A) this; - } - public Boolean hasTopologyKey() { - return this.topologyKey != null; - } - public String getWhenUnsatisfiable() { - return this.whenUnsatisfiable; - } - public A withWhenUnsatisfiable(String whenUnsatisfiable) { - this.whenUnsatisfiable=whenUnsatisfiable; return (A) this; - } - public Boolean hasWhenUnsatisfiable() { - return this.whenUnsatisfiable != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TopologySpreadConstraintFluentImpl that = (V1TopologySpreadConstraintFluentImpl) o; - if (!java.util.Objects.equals(labelSelector, that.labelSelector)) return false; - - if (!java.util.Objects.equals(matchLabelKeys, that.matchLabelKeys)) return false; - - if (!java.util.Objects.equals(maxSkew, that.maxSkew)) return false; - - if (!java.util.Objects.equals(minDomains, that.minDomains)) return false; - - if (!java.util.Objects.equals(nodeAffinityPolicy, that.nodeAffinityPolicy)) return false; - - if (!java.util.Objects.equals(nodeTaintsPolicy, that.nodeTaintsPolicy)) return false; - - if (!java.util.Objects.equals(topologyKey, that.topologyKey)) return false; - - if (!java.util.Objects.equals(whenUnsatisfiable, that.whenUnsatisfiable)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(labelSelector, matchLabelKeys, maxSkew, minDomains, nodeAffinityPolicy, nodeTaintsPolicy, topologyKey, whenUnsatisfiable, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (labelSelector != null) { sb.append("labelSelector:"); sb.append(labelSelector + ","); } - if (matchLabelKeys != null && !matchLabelKeys.isEmpty()) { sb.append("matchLabelKeys:"); sb.append(matchLabelKeys + ","); } - if (maxSkew != null) { sb.append("maxSkew:"); sb.append(maxSkew + ","); } - if (minDomains != null) { sb.append("minDomains:"); sb.append(minDomains + ","); } - if (nodeAffinityPolicy != null) { sb.append("nodeAffinityPolicy:"); sb.append(nodeAffinityPolicy + ","); } - if (nodeTaintsPolicy != null) { sb.append("nodeTaintsPolicy:"); sb.append(nodeTaintsPolicy + ","); } - if (topologyKey != null) { sb.append("topologyKey:"); sb.append(topologyKey + ","); } - if (whenUnsatisfiable != null) { sb.append("whenUnsatisfiable:"); sb.append(whenUnsatisfiable); } - sb.append("}"); - return sb.toString(); - } - class LabelSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1TopologySpreadConstraintFluentImpl.LabelSelectorNested,Nested{ - LabelSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - LabelSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1TopologySpreadConstraintFluentImpl.this.withLabelSelector(builder.build()); - } - public N endLabelSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceBuilder.java index 8c1b751c41..578b1e672e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TypedLocalObjectReferenceBuilder extends V1TypedLocalObjectReferenceFluentImpl implements VisitableBuilder{ +public class V1TypedLocalObjectReferenceBuilder extends V1TypedLocalObjectReferenceFluent implements VisitableBuilder{ public V1TypedLocalObjectReferenceBuilder() { - this(false); - } - public V1TypedLocalObjectReferenceBuilder(Boolean validationEnabled) { - this(new V1TypedLocalObjectReference(), validationEnabled); + this(new V1TypedLocalObjectReference()); } + public V1TypedLocalObjectReferenceBuilder(V1TypedLocalObjectReferenceFluent fluent) { - this(fluent, false); - } - public V1TypedLocalObjectReferenceBuilder(V1TypedLocalObjectReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TypedLocalObjectReference(), validationEnabled); + this(fluent, new V1TypedLocalObjectReference()); } + public V1TypedLocalObjectReferenceBuilder(V1TypedLocalObjectReferenceFluent fluent,V1TypedLocalObjectReference instance) { - this(fluent, instance, false); - } - public V1TypedLocalObjectReferenceBuilder(V1TypedLocalObjectReferenceFluent fluent,V1TypedLocalObjectReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroup(instance.getApiGroup()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TypedLocalObjectReferenceBuilder(V1TypedLocalObjectReference instance) { - this(instance,false); - } - public V1TypedLocalObjectReferenceBuilder(V1TypedLocalObjectReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TypedLocalObjectReferenceFluent fluent; - Boolean validationEnabled; + public V1TypedLocalObjectReference build() { V1TypedLocalObjectReference buildable = new V1TypedLocalObjectReference(); buildable.setApiGroup(fluent.getApiGroup()); @@ -49,4 +29,5 @@ public V1TypedLocalObjectReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceFluent.java index db87ccb477..8aec8486d7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceFluent.java @@ -1,22 +1,97 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1TypedLocalObjectReferenceFluent> extends Fluent{ - public String getApiGroup(); - public A withApiGroup(String apiGroup); - public Boolean hasApiGroup(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TypedLocalObjectReferenceFluent> extends BaseFluent{ + public V1TypedLocalObjectReferenceFluent() { + } + public V1TypedLocalObjectReferenceFluent(V1TypedLocalObjectReference instance) { + this.copyInstance(instance); + } + private String apiGroup; + private String kind; + private String name; + + protected void copyInstance(V1TypedLocalObjectReference instance) { + instance = (instance != null ? instance : new V1TypedLocalObjectReference()); + if (instance != null) { + this.withApiGroup(instance.getApiGroup()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + } + } + + public String getApiGroup() { + return this.apiGroup; + } + + public A withApiGroup(String apiGroup) { + this.apiGroup = apiGroup; + return (A) this; + } + + public boolean hasApiGroup() { + return this.apiGroup != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TypedLocalObjectReferenceFluent that = (V1TypedLocalObjectReferenceFluent) o; + if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroup, kind, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceFluentImpl.java deleted file mode 100644 index 45dfea5b07..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedLocalObjectReferenceFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TypedLocalObjectReferenceFluentImpl> extends BaseFluent implements V1TypedLocalObjectReferenceFluent{ - public V1TypedLocalObjectReferenceFluentImpl() { - } - public V1TypedLocalObjectReferenceFluentImpl(V1TypedLocalObjectReference instance) { - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - } - private String apiGroup; - private String kind; - private String name; - public String getApiGroup() { - return this.apiGroup; - } - public A withApiGroup(String apiGroup) { - this.apiGroup=apiGroup; return (A) this; - } - public Boolean hasApiGroup() { - return this.apiGroup != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TypedLocalObjectReferenceFluentImpl that = (V1TypedLocalObjectReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroup, kind, name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceBuilder.java index f4ca4277ec..8fd6b6f461 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1TypedObjectReferenceBuilder extends V1TypedObjectReferenceFluentImpl implements VisitableBuilder{ +public class V1TypedObjectReferenceBuilder extends V1TypedObjectReferenceFluent implements VisitableBuilder{ public V1TypedObjectReferenceBuilder() { - this(false); - } - public V1TypedObjectReferenceBuilder(Boolean validationEnabled) { - this(new V1TypedObjectReference(), validationEnabled); + this(new V1TypedObjectReference()); } + public V1TypedObjectReferenceBuilder(V1TypedObjectReferenceFluent fluent) { - this(fluent, false); - } - public V1TypedObjectReferenceBuilder(V1TypedObjectReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1TypedObjectReference(), validationEnabled); + this(fluent, new V1TypedObjectReference()); } + public V1TypedObjectReferenceBuilder(V1TypedObjectReferenceFluent fluent,V1TypedObjectReference instance) { - this(fluent, instance, false); - } - public V1TypedObjectReferenceBuilder(V1TypedObjectReferenceFluent fluent,V1TypedObjectReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroup(instance.getApiGroup()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1TypedObjectReferenceBuilder(V1TypedObjectReference instance) { - this(instance,false); - } - public V1TypedObjectReferenceBuilder(V1TypedObjectReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1TypedObjectReferenceFluent fluent; - Boolean validationEnabled; + public V1TypedObjectReference build() { V1TypedObjectReference buildable = new V1TypedObjectReference(); buildable.setApiGroup(fluent.getApiGroup()); @@ -52,4 +30,5 @@ public V1TypedObjectReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceFluent.java index 52e63bb044..eb29dda794 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceFluent.java @@ -1,25 +1,114 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1TypedObjectReferenceFluent> extends Fluent{ - public String getApiGroup(); - public A withApiGroup(String apiGroup); - public Boolean hasApiGroup(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1TypedObjectReferenceFluent> extends BaseFluent{ + public V1TypedObjectReferenceFluent() { + } + public V1TypedObjectReferenceFluent(V1TypedObjectReference instance) { + this.copyInstance(instance); + } + private String apiGroup; + private String kind; + private String name; + private String namespace; + + protected void copyInstance(V1TypedObjectReference instance) { + instance = (instance != null ? instance : new V1TypedObjectReference()); + if (instance != null) { + this.withApiGroup(instance.getApiGroup()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + } + } + + public String getApiGroup() { + return this.apiGroup; + } + + public A withApiGroup(String apiGroup) { + this.apiGroup = apiGroup; + return (A) this; + } + + public boolean hasApiGroup() { + return this.apiGroup != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1TypedObjectReferenceFluent that = (V1TypedObjectReferenceFluent) o; + if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroup, kind, name, namespace, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceFluentImpl.java deleted file mode 100644 index d7909136b5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1TypedObjectReferenceFluentImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1TypedObjectReferenceFluentImpl> extends BaseFluent implements V1TypedObjectReferenceFluent{ - public V1TypedObjectReferenceFluentImpl() { - } - public V1TypedObjectReferenceFluentImpl(V1TypedObjectReference instance) { - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - } - private String apiGroup; - private String kind; - private String name; - private String namespace; - public String getApiGroup() { - return this.apiGroup; - } - public A withApiGroup(String apiGroup) { - this.apiGroup=apiGroup; return (A) this; - } - public Boolean hasApiGroup() { - return this.apiGroup != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1TypedObjectReferenceFluentImpl that = (V1TypedObjectReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroup, kind, name, namespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsBuilder.java index 59e89eae8e..ebb6a39485 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1UncountedTerminatedPodsBuilder extends V1UncountedTerminatedPodsFluentImpl implements VisitableBuilder{ +public class V1UncountedTerminatedPodsBuilder extends V1UncountedTerminatedPodsFluent implements VisitableBuilder{ public V1UncountedTerminatedPodsBuilder() { - this(false); - } - public V1UncountedTerminatedPodsBuilder(Boolean validationEnabled) { - this(new V1UncountedTerminatedPods(), validationEnabled); + this(new V1UncountedTerminatedPods()); } + public V1UncountedTerminatedPodsBuilder(V1UncountedTerminatedPodsFluent fluent) { - this(fluent, false); - } - public V1UncountedTerminatedPodsBuilder(V1UncountedTerminatedPodsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1UncountedTerminatedPods(), validationEnabled); + this(fluent, new V1UncountedTerminatedPods()); } + public V1UncountedTerminatedPodsBuilder(V1UncountedTerminatedPodsFluent fluent,V1UncountedTerminatedPods instance) { - this(fluent, instance, false); - } - public V1UncountedTerminatedPodsBuilder(V1UncountedTerminatedPodsFluent fluent,V1UncountedTerminatedPods instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFailed(instance.getFailed()); - fluent.withSucceeded(instance.getSucceeded()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1UncountedTerminatedPodsBuilder(V1UncountedTerminatedPods instance) { - this(instance,false); - } - public V1UncountedTerminatedPodsBuilder(V1UncountedTerminatedPods instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFailed(instance.getFailed()); - this.withSucceeded(instance.getSucceeded()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1UncountedTerminatedPodsFluent fluent; - Boolean validationEnabled; + public V1UncountedTerminatedPods build() { V1UncountedTerminatedPods buildable = new V1UncountedTerminatedPods(); buildable.setFailed(fluent.getFailed()); @@ -46,4 +28,5 @@ public V1UncountedTerminatedPods build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsFluent.java index 2698947229..29b3bc6d9e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsFluent.java @@ -1,47 +1,246 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1UncountedTerminatedPodsFluent> extends Fluent{ - public A addToFailed(int index,String item); - public A setToFailed(int index,String item); - public A addToFailed(java.lang.String... items); - public A addAllToFailed(Collection items); - public A removeFromFailed(java.lang.String... items); - public A removeAllFromFailed(Collection items); - public List getFailed(); - public String getFailed(int index); - public String getFirstFailed(); - public String getLastFailed(); - public String getMatchingFailed(Predicate predicate); - public Boolean hasMatchingFailed(Predicate predicate); - public A withFailed(List failed); - public A withFailed(java.lang.String... failed); - public Boolean hasFailed(); - public A addToSucceeded(int index,String item); - public A setToSucceeded(int index,String item); - public A addToSucceeded(java.lang.String... items); - public A addAllToSucceeded(Collection items); - public A removeFromSucceeded(java.lang.String... items); - public A removeAllFromSucceeded(Collection items); - public List getSucceeded(); - public String getSucceeded(int index); - public String getFirstSucceeded(); - public String getLastSucceeded(); - public String getMatchingSucceeded(Predicate predicate); - public Boolean hasMatchingSucceeded(Predicate predicate); - public A withSucceeded(List succeeded); - public A withSucceeded(java.lang.String... succeeded); - public Boolean hasSucceeded(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1UncountedTerminatedPodsFluent> extends BaseFluent{ + public V1UncountedTerminatedPodsFluent() { + } + public V1UncountedTerminatedPodsFluent(V1UncountedTerminatedPods instance) { + this.copyInstance(instance); + } + private List failed; + private List succeeded; + + protected void copyInstance(V1UncountedTerminatedPods instance) { + instance = (instance != null ? instance : new V1UncountedTerminatedPods()); + if (instance != null) { + this.withFailed(instance.getFailed()); + this.withSucceeded(instance.getSucceeded()); + } + } + + public A addToFailed(int index,String item) { + if (this.failed == null) {this.failed = new ArrayList();} + this.failed.add(index, item); + return (A)this; + } + + public A setToFailed(int index,String item) { + if (this.failed == null) {this.failed = new ArrayList();} + this.failed.set(index, item); return (A)this; + } + + public A addToFailed(java.lang.String... items) { + if (this.failed == null) {this.failed = new ArrayList();} + for (String item : items) {this.failed.add(item);} return (A)this; + } + + public A addAllToFailed(Collection items) { + if (this.failed == null) {this.failed = new ArrayList();} + for (String item : items) {this.failed.add(item);} return (A)this; + } + + public A removeFromFailed(java.lang.String... items) { + if (this.failed == null) return (A)this; + for (String item : items) { this.failed.remove(item);} return (A)this; + } + + public A removeAllFromFailed(Collection items) { + if (this.failed == null) return (A)this; + for (String item : items) { this.failed.remove(item);} return (A)this; + } + + public List getFailed() { + return this.failed; + } + + public String getFailed(int index) { + return this.failed.get(index); + } + + public String getFirstFailed() { + return this.failed.get(0); + } + + public String getLastFailed() { + return this.failed.get(failed.size() - 1); + } + + public String getMatchingFailed(Predicate predicate) { + for (String item : failed) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingFailed(Predicate predicate) { + for (String item : failed) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withFailed(List failed) { + if (failed != null) { + this.failed = new ArrayList(); + for (String item : failed) { + this.addToFailed(item); + } + } else { + this.failed = null; + } + return (A) this; + } + + public A withFailed(java.lang.String... failed) { + if (this.failed != null) { + this.failed.clear(); + _visitables.remove("failed"); + } + if (failed != null) { + for (String item : failed) { + this.addToFailed(item); + } + } + return (A) this; + } + + public boolean hasFailed() { + return this.failed != null && !this.failed.isEmpty(); + } + + public A addToSucceeded(int index,String item) { + if (this.succeeded == null) {this.succeeded = new ArrayList();} + this.succeeded.add(index, item); + return (A)this; + } + + public A setToSucceeded(int index,String item) { + if (this.succeeded == null) {this.succeeded = new ArrayList();} + this.succeeded.set(index, item); return (A)this; + } + + public A addToSucceeded(java.lang.String... items) { + if (this.succeeded == null) {this.succeeded = new ArrayList();} + for (String item : items) {this.succeeded.add(item);} return (A)this; + } + + public A addAllToSucceeded(Collection items) { + if (this.succeeded == null) {this.succeeded = new ArrayList();} + for (String item : items) {this.succeeded.add(item);} return (A)this; + } + + public A removeFromSucceeded(java.lang.String... items) { + if (this.succeeded == null) return (A)this; + for (String item : items) { this.succeeded.remove(item);} return (A)this; + } + + public A removeAllFromSucceeded(Collection items) { + if (this.succeeded == null) return (A)this; + for (String item : items) { this.succeeded.remove(item);} return (A)this; + } + + public List getSucceeded() { + return this.succeeded; + } + + public String getSucceeded(int index) { + return this.succeeded.get(index); + } + + public String getFirstSucceeded() { + return this.succeeded.get(0); + } + + public String getLastSucceeded() { + return this.succeeded.get(succeeded.size() - 1); + } + + public String getMatchingSucceeded(Predicate predicate) { + for (String item : succeeded) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingSucceeded(Predicate predicate) { + for (String item : succeeded) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSucceeded(List succeeded) { + if (succeeded != null) { + this.succeeded = new ArrayList(); + for (String item : succeeded) { + this.addToSucceeded(item); + } + } else { + this.succeeded = null; + } + return (A) this; + } + + public A withSucceeded(java.lang.String... succeeded) { + if (this.succeeded != null) { + this.succeeded.clear(); + _visitables.remove("succeeded"); + } + if (succeeded != null) { + for (String item : succeeded) { + this.addToSucceeded(item); + } + } + return (A) this; + } + + public boolean hasSucceeded() { + return this.succeeded != null && !this.succeeded.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1UncountedTerminatedPodsFluent that = (V1UncountedTerminatedPodsFluent) o; + if (!java.util.Objects.equals(failed, that.failed)) return false; + if (!java.util.Objects.equals(succeeded, that.succeeded)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(failed, succeeded, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (failed != null && !failed.isEmpty()) { sb.append("failed:"); sb.append(failed + ","); } + if (succeeded != null && !succeeded.isEmpty()) { sb.append("succeeded:"); sb.append(succeeded); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsFluentImpl.java deleted file mode 100644 index 70a47d2a9f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UncountedTerminatedPodsFluentImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1UncountedTerminatedPodsFluentImpl> extends BaseFluent implements V1UncountedTerminatedPodsFluent{ - public V1UncountedTerminatedPodsFluentImpl() { - } - public V1UncountedTerminatedPodsFluentImpl(V1UncountedTerminatedPods instance) { - if (instance != null) { - this.withFailed(instance.getFailed()); - this.withSucceeded(instance.getSucceeded()); - } - } - private List failed; - private List succeeded; - public A addToFailed(int index,String item) { - if (this.failed == null) {this.failed = new ArrayList();} - this.failed.add(index, item); - return (A)this; - } - public A setToFailed(int index,String item) { - if (this.failed == null) {this.failed = new ArrayList();} - this.failed.set(index, item); return (A)this; - } - public A addToFailed(java.lang.String... items) { - if (this.failed == null) {this.failed = new ArrayList();} - for (String item : items) {this.failed.add(item);} return (A)this; - } - public A addAllToFailed(Collection items) { - if (this.failed == null) {this.failed = new ArrayList();} - for (String item : items) {this.failed.add(item);} return (A)this; - } - public A removeFromFailed(java.lang.String... items) { - for (String item : items) {if (this.failed!= null){ this.failed.remove(item);}} return (A)this; - } - public A removeAllFromFailed(Collection items) { - for (String item : items) {if (this.failed!= null){ this.failed.remove(item);}} return (A)this; - } - public List getFailed() { - return this.failed; - } - public String getFailed(int index) { - return this.failed.get(index); - } - public String getFirstFailed() { - return this.failed.get(0); - } - public String getLastFailed() { - return this.failed.get(failed.size() - 1); - } - public String getMatchingFailed(Predicate predicate) { - for (String item: failed) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingFailed(Predicate predicate) { - for (String item: failed) { if(predicate.test(item)){ return true;} } return false; - } - public A withFailed(List failed) { - if (failed != null) {this.failed = new ArrayList(); for (String item : failed){this.addToFailed(item);}} else { this.failed = null;} return (A) this; - } - public A withFailed(java.lang.String... failed) { - if (this.failed != null) {this.failed.clear(); _visitables.remove("failed"); } - if (failed != null) {for (String item :failed){ this.addToFailed(item);}} return (A) this; - } - public Boolean hasFailed() { - return failed != null && !failed.isEmpty(); - } - public A addToSucceeded(int index,String item) { - if (this.succeeded == null) {this.succeeded = new ArrayList();} - this.succeeded.add(index, item); - return (A)this; - } - public A setToSucceeded(int index,String item) { - if (this.succeeded == null) {this.succeeded = new ArrayList();} - this.succeeded.set(index, item); return (A)this; - } - public A addToSucceeded(java.lang.String... items) { - if (this.succeeded == null) {this.succeeded = new ArrayList();} - for (String item : items) {this.succeeded.add(item);} return (A)this; - } - public A addAllToSucceeded(Collection items) { - if (this.succeeded == null) {this.succeeded = new ArrayList();} - for (String item : items) {this.succeeded.add(item);} return (A)this; - } - public A removeFromSucceeded(java.lang.String... items) { - for (String item : items) {if (this.succeeded!= null){ this.succeeded.remove(item);}} return (A)this; - } - public A removeAllFromSucceeded(Collection items) { - for (String item : items) {if (this.succeeded!= null){ this.succeeded.remove(item);}} return (A)this; - } - public List getSucceeded() { - return this.succeeded; - } - public String getSucceeded(int index) { - return this.succeeded.get(index); - } - public String getFirstSucceeded() { - return this.succeeded.get(0); - } - public String getLastSucceeded() { - return this.succeeded.get(succeeded.size() - 1); - } - public String getMatchingSucceeded(Predicate predicate) { - for (String item: succeeded) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingSucceeded(Predicate predicate) { - for (String item: succeeded) { if(predicate.test(item)){ return true;} } return false; - } - public A withSucceeded(List succeeded) { - if (succeeded != null) {this.succeeded = new ArrayList(); for (String item : succeeded){this.addToSucceeded(item);}} else { this.succeeded = null;} return (A) this; - } - public A withSucceeded(java.lang.String... succeeded) { - if (this.succeeded != null) {this.succeeded.clear(); _visitables.remove("succeeded"); } - if (succeeded != null) {for (String item :succeeded){ this.addToSucceeded(item);}} return (A) this; - } - public Boolean hasSucceeded() { - return succeeded != null && !succeeded.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1UncountedTerminatedPodsFluentImpl that = (V1UncountedTerminatedPodsFluentImpl) o; - if (!java.util.Objects.equals(failed, that.failed)) return false; - - if (!java.util.Objects.equals(succeeded, that.succeeded)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(failed, succeeded, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (failed != null && !failed.isEmpty()) { sb.append("failed:"); sb.append(failed + ","); } - if (succeeded != null && !succeeded.isEmpty()) { sb.append("succeeded:"); sb.append(succeeded); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoBuilder.java index 9582c970ca..96c1cfb6c8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1UserInfoBuilder extends V1UserInfoFluentImpl implements VisitableBuilder{ +public class V1UserInfoBuilder extends V1UserInfoFluent implements VisitableBuilder{ public V1UserInfoBuilder() { - this(false); - } - public V1UserInfoBuilder(Boolean validationEnabled) { - this(new V1UserInfo(), validationEnabled); + this(new V1UserInfo()); } + public V1UserInfoBuilder(V1UserInfoFluent fluent) { - this(fluent, false); - } - public V1UserInfoBuilder(V1UserInfoFluent fluent,Boolean validationEnabled) { - this(fluent, new V1UserInfo(), validationEnabled); + this(fluent, new V1UserInfo()); } + public V1UserInfoBuilder(V1UserInfoFluent fluent,V1UserInfo instance) { - this(fluent, instance, false); - } - public V1UserInfoBuilder(V1UserInfoFluent fluent,V1UserInfo instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExtra(instance.getExtra()); - fluent.withGroups(instance.getGroups()); - fluent.withUid(instance.getUid()); - fluent.withUsername(instance.getUsername()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1UserInfoBuilder(V1UserInfo instance) { - this(instance,false); - } - public V1UserInfoBuilder(V1UserInfo instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExtra(instance.getExtra()); - this.withGroups(instance.getGroups()); - this.withUid(instance.getUid()); - this.withUsername(instance.getUsername()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1UserInfoFluent fluent; - Boolean validationEnabled; + public V1UserInfo build() { V1UserInfo buildable = new V1UserInfo(); buildable.setExtra(fluent.getExtra()); @@ -52,4 +30,5 @@ public V1UserInfo build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoFluent.java index 5538a10170..1809b435e2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoFluent.java @@ -1,47 +1,225 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.Map; import java.util.LinkedHashMap; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1UserInfoFluent> extends Fluent{ - public A addToExtra(String key,List value); - public A addToExtra(Map> map); - public A removeFromExtra(String key); - public A removeFromExtra(Map> map); - public Map> getExtra(); - public A withExtra(Map> extra); - public Boolean hasExtra(); - public A addToGroups(int index,String item); - public A setToGroups(int index,String item); - public A addToGroups(java.lang.String... items); - public A addAllToGroups(Collection items); - public A removeFromGroups(java.lang.String... items); - public A removeAllFromGroups(Collection items); - public List getGroups(); - public String getGroup(int index); - public String getFirstGroup(); - public String getLastGroup(); - public String getMatchingGroup(Predicate predicate); - public Boolean hasMatchingGroup(Predicate predicate); - public A withGroups(List groups); - public A withGroups(java.lang.String... groups); - public Boolean hasGroups(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); - public String getUsername(); - public A withUsername(String username); - public Boolean hasUsername(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1UserInfoFluent> extends BaseFluent{ + public V1UserInfoFluent() { + } + public V1UserInfoFluent(V1UserInfo instance) { + this.copyInstance(instance); + } + private Map> extra; + private List groups; + private String uid; + private String username; + + protected void copyInstance(V1UserInfo instance) { + instance = (instance != null ? instance : new V1UserInfo()); + if (instance != null) { + this.withExtra(instance.getExtra()); + this.withGroups(instance.getGroups()); + this.withUid(instance.getUid()); + this.withUsername(instance.getUsername()); + } + } + + public A addToExtra(String key,List value) { + if(this.extra == null && key != null && value != null) { this.extra = new LinkedHashMap(); } + if(key != null && value != null) {this.extra.put(key, value);} return (A)this; + } + + public A addToExtra(Map> map) { + if(this.extra == null && map != null) { this.extra = new LinkedHashMap(); } + if(map != null) { this.extra.putAll(map);} return (A)this; + } + + public A removeFromExtra(String key) { + if(this.extra == null) { return (A) this; } + if(key != null && this.extra != null) {this.extra.remove(key);} return (A)this; + } + + public A removeFromExtra(Map> map) { + if(this.extra == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.extra != null){this.extra.remove(key);}}} return (A)this; + } + + public Map> getExtra() { + return this.extra; + } + + public A withExtra(Map> extra) { + if (extra == null) { + this.extra = null; + } else { + this.extra = new LinkedHashMap(extra); + } + return (A) this; + } + + public boolean hasExtra() { + return this.extra != null; + } + + public A addToGroups(int index,String item) { + if (this.groups == null) {this.groups = new ArrayList();} + this.groups.add(index, item); + return (A)this; + } + + public A setToGroups(int index,String item) { + if (this.groups == null) {this.groups = new ArrayList();} + this.groups.set(index, item); return (A)this; + } + + public A addToGroups(java.lang.String... items) { + if (this.groups == null) {this.groups = new ArrayList();} + for (String item : items) {this.groups.add(item);} return (A)this; + } + + public A addAllToGroups(Collection items) { + if (this.groups == null) {this.groups = new ArrayList();} + for (String item : items) {this.groups.add(item);} return (A)this; + } + + public A removeFromGroups(java.lang.String... items) { + if (this.groups == null) return (A)this; + for (String item : items) { this.groups.remove(item);} return (A)this; + } + + public A removeAllFromGroups(Collection items) { + if (this.groups == null) return (A)this; + for (String item : items) { this.groups.remove(item);} return (A)this; + } + + public List getGroups() { + return this.groups; + } + + public String getGroup(int index) { + return this.groups.get(index); + } + + public String getFirstGroup() { + return this.groups.get(0); + } + + public String getLastGroup() { + return this.groups.get(groups.size() - 1); + } + + public String getMatchingGroup(Predicate predicate) { + for (String item : groups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingGroup(Predicate predicate) { + for (String item : groups) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withGroups(List groups) { + if (groups != null) { + this.groups = new ArrayList(); + for (String item : groups) { + this.addToGroups(item); + } + } else { + this.groups = null; + } + return (A) this; + } + + public A withGroups(java.lang.String... groups) { + if (this.groups != null) { + this.groups.clear(); + _visitables.remove("groups"); + } + if (groups != null) { + for (String item : groups) { + this.addToGroups(item); + } + } + return (A) this; + } + + public boolean hasGroups() { + return this.groups != null && !this.groups.isEmpty(); + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public String getUsername() { + return this.username; + } + + public A withUsername(String username) { + this.username = username; + return (A) this; + } + + public boolean hasUsername() { + return this.username != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1UserInfoFluent that = (V1UserInfoFluent) o; + if (!java.util.Objects.equals(extra, that.extra)) return false; + if (!java.util.Objects.equals(groups, that.groups)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + if (!java.util.Objects.equals(username, that.username)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(extra, groups, uid, username, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (extra != null && !extra.isEmpty()) { sb.append("extra:"); sb.append(extra + ","); } + if (groups != null && !groups.isEmpty()) { sb.append("groups:"); sb.append(groups + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid + ","); } + if (username != null) { sb.append("username:"); sb.append(username); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoFluentImpl.java deleted file mode 100644 index 7b4e06d40d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1UserInfoFluentImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import java.util.ArrayList; -import java.lang.String; -import java.util.LinkedHashMap; -import java.util.function.Predicate; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1UserInfoFluentImpl> extends BaseFluent implements V1UserInfoFluent{ - public V1UserInfoFluentImpl() { - } - public V1UserInfoFluentImpl(V1UserInfo instance) { - if (instance != null) { - this.withExtra(instance.getExtra()); - this.withGroups(instance.getGroups()); - this.withUid(instance.getUid()); - this.withUsername(instance.getUsername()); - } - } - private Map> extra; - private List groups; - private String uid; - private String username; - public A addToExtra(String key,List value) { - if(this.extra == null && key != null && value != null) { this.extra = new LinkedHashMap(); } - if(key != null && value != null) {this.extra.put(key, value);} return (A)this; - } - public A addToExtra(Map> map) { - if(this.extra == null && map != null) { this.extra = new LinkedHashMap(); } - if(map != null) { this.extra.putAll(map);} return (A)this; - } - public A removeFromExtra(String key) { - if(this.extra == null) { return (A) this; } - if(key != null && this.extra != null) {this.extra.remove(key);} return (A)this; - } - public A removeFromExtra(Map> map) { - if(this.extra == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.extra != null){this.extra.remove(key);}}} return (A)this; - } - public Map> getExtra() { - return this.extra; - } - public A withExtra(Map> extra) { - if (extra == null) { this.extra = null;} else {this.extra = new LinkedHashMap(extra);} return (A) this; - } - public Boolean hasExtra() { - return this.extra != null; - } - public A addToGroups(int index,String item) { - if (this.groups == null) {this.groups = new ArrayList();} - this.groups.add(index, item); - return (A)this; - } - public A setToGroups(int index,String item) { - if (this.groups == null) {this.groups = new ArrayList();} - this.groups.set(index, item); return (A)this; - } - public A addToGroups(java.lang.String... items) { - if (this.groups == null) {this.groups = new ArrayList();} - for (String item : items) {this.groups.add(item);} return (A)this; - } - public A addAllToGroups(Collection items) { - if (this.groups == null) {this.groups = new ArrayList();} - for (String item : items) {this.groups.add(item);} return (A)this; - } - public A removeFromGroups(java.lang.String... items) { - for (String item : items) {if (this.groups!= null){ this.groups.remove(item);}} return (A)this; - } - public A removeAllFromGroups(Collection items) { - for (String item : items) {if (this.groups!= null){ this.groups.remove(item);}} return (A)this; - } - public List getGroups() { - return this.groups; - } - public String getGroup(int index) { - return this.groups.get(index); - } - public String getFirstGroup() { - return this.groups.get(0); - } - public String getLastGroup() { - return this.groups.get(groups.size() - 1); - } - public String getMatchingGroup(Predicate predicate) { - for (String item: groups) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingGroup(Predicate predicate) { - for (String item: groups) { if(predicate.test(item)){ return true;} } return false; - } - public A withGroups(List groups) { - if (groups != null) {this.groups = new ArrayList(); for (String item : groups){this.addToGroups(item);}} else { this.groups = null;} return (A) this; - } - public A withGroups(java.lang.String... groups) { - if (this.groups != null) {this.groups.clear(); _visitables.remove("groups"); } - if (groups != null) {for (String item :groups){ this.addToGroups(item);}} return (A) this; - } - public Boolean hasGroups() { - return groups != null && !groups.isEmpty(); - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public String getUsername() { - return this.username; - } - public A withUsername(String username) { - this.username=username; return (A) this; - } - public Boolean hasUsername() { - return this.username != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1UserInfoFluentImpl that = (V1UserInfoFluentImpl) o; - if (!java.util.Objects.equals(extra, that.extra)) return false; - - if (!java.util.Objects.equals(groups, that.groups)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - if (!java.util.Objects.equals(username, that.username)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(extra, groups, uid, username, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (extra != null && !extra.isEmpty()) { sb.append("extra:"); sb.append(extra + ","); } - if (groups != null && !groups.isEmpty()) { sb.append("groups:"); sb.append(groups + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid + ","); } - if (username != null) { sb.append("username:"); sb.append(username); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookBuilder.java index 7beb529711..6ae4a12cf6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookBuilder.java @@ -1,76 +1,41 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ValidatingWebhookBuilder extends V1ValidatingWebhookFluentImpl implements VisitableBuilder{ +public class V1ValidatingWebhookBuilder extends V1ValidatingWebhookFluent implements VisitableBuilder{ public V1ValidatingWebhookBuilder() { - this(false); - } - public V1ValidatingWebhookBuilder(Boolean validationEnabled) { - this(new V1ValidatingWebhook(), validationEnabled); + this(new V1ValidatingWebhook()); } + public V1ValidatingWebhookBuilder(V1ValidatingWebhookFluent fluent) { - this(fluent, false); - } - public V1ValidatingWebhookBuilder(V1ValidatingWebhookFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ValidatingWebhook(), validationEnabled); + this(fluent, new V1ValidatingWebhook()); } + public V1ValidatingWebhookBuilder(V1ValidatingWebhookFluent fluent,V1ValidatingWebhook instance) { - this(fluent, instance, false); - } - public V1ValidatingWebhookBuilder(V1ValidatingWebhookFluent fluent,V1ValidatingWebhook instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAdmissionReviewVersions(instance.getAdmissionReviewVersions()); - fluent.withClientConfig(instance.getClientConfig()); - fluent.withFailurePolicy(instance.getFailurePolicy()); - fluent.withMatchConditions(instance.getMatchConditions()); - fluent.withMatchPolicy(instance.getMatchPolicy()); - fluent.withName(instance.getName()); - fluent.withNamespaceSelector(instance.getNamespaceSelector()); - fluent.withObjectSelector(instance.getObjectSelector()); - fluent.withRules(instance.getRules()); - fluent.withSideEffects(instance.getSideEffects()); - fluent.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ValidatingWebhookBuilder(V1ValidatingWebhook instance) { - this(instance,false); - } - public V1ValidatingWebhookBuilder(V1ValidatingWebhook instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAdmissionReviewVersions(instance.getAdmissionReviewVersions()); - this.withClientConfig(instance.getClientConfig()); - this.withFailurePolicy(instance.getFailurePolicy()); - this.withMatchConditions(instance.getMatchConditions()); - this.withMatchPolicy(instance.getMatchPolicy()); - this.withName(instance.getName()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withObjectSelector(instance.getObjectSelector()); - this.withRules(instance.getRules()); - this.withSideEffects(instance.getSideEffects()); - this.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ValidatingWebhookFluent fluent; - Boolean validationEnabled; + public V1ValidatingWebhook build() { V1ValidatingWebhook buildable = new V1ValidatingWebhook(); buildable.setAdmissionReviewVersions(fluent.getAdmissionReviewVersions()); - buildable.setClientConfig(fluent.getClientConfig()); + buildable.setClientConfig(fluent.buildClientConfig()); buildable.setFailurePolicy(fluent.getFailurePolicy()); - buildable.setMatchConditions(fluent.getMatchConditions()); + buildable.setMatchConditions(fluent.buildMatchConditions()); buildable.setMatchPolicy(fluent.getMatchPolicy()); buildable.setName(fluent.getName()); - buildable.setNamespaceSelector(fluent.getNamespaceSelector()); - buildable.setObjectSelector(fluent.getObjectSelector()); - buildable.setRules(fluent.getRules()); + buildable.setNamespaceSelector(fluent.buildNamespaceSelector()); + buildable.setObjectSelector(fluent.buildObjectSelector()); + buildable.setRules(fluent.buildRules()); buildable.setSideEffects(fluent.getSideEffects()); buildable.setTimeoutSeconds(fluent.getTimeoutSeconds()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationBuilder.java index 568b63cf73..7194cef94a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ValidatingWebhookConfigurationBuilder extends V1ValidatingWebhookConfigurationFluentImpl implements VisitableBuilder{ +public class V1ValidatingWebhookConfigurationBuilder extends V1ValidatingWebhookConfigurationFluent implements VisitableBuilder{ public V1ValidatingWebhookConfigurationBuilder() { - this(false); - } - public V1ValidatingWebhookConfigurationBuilder(Boolean validationEnabled) { - this(new V1ValidatingWebhookConfiguration(), validationEnabled); + this(new V1ValidatingWebhookConfiguration()); } + public V1ValidatingWebhookConfigurationBuilder(V1ValidatingWebhookConfigurationFluent fluent) { - this(fluent, false); - } - public V1ValidatingWebhookConfigurationBuilder(V1ValidatingWebhookConfigurationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ValidatingWebhookConfiguration(), validationEnabled); + this(fluent, new V1ValidatingWebhookConfiguration()); } + public V1ValidatingWebhookConfigurationBuilder(V1ValidatingWebhookConfigurationFluent fluent,V1ValidatingWebhookConfiguration instance) { - this(fluent, instance, false); - } - public V1ValidatingWebhookConfigurationBuilder(V1ValidatingWebhookConfigurationFluent fluent,V1ValidatingWebhookConfiguration instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withWebhooks(instance.getWebhooks()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ValidatingWebhookConfigurationBuilder(V1ValidatingWebhookConfiguration instance) { - this(instance,false); - } - public V1ValidatingWebhookConfigurationBuilder(V1ValidatingWebhookConfiguration instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withWebhooks(instance.getWebhooks()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ValidatingWebhookConfigurationFluent fluent; - Boolean validationEnabled; + public V1ValidatingWebhookConfiguration build() { V1ValidatingWebhookConfiguration buildable = new V1ValidatingWebhookConfiguration(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setWebhooks(fluent.getWebhooks()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setWebhooks(fluent.buildWebhooks()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationFluent.java index 8d4e59cb33..794c8bcd02 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ValidatingWebhookConfigurationFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1ValidatingWebhookConfigurationFluent.MetadataNested withNewMetadata(); - public V1ValidatingWebhookConfigurationFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1ValidatingWebhookConfigurationFluent.MetadataNested editMetadata(); - public V1ValidatingWebhookConfigurationFluent.MetadataNested editOrNewMetadata(); - public V1ValidatingWebhookConfigurationFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public A addToWebhooks(int index,V1ValidatingWebhook item); - public A setToWebhooks(int index,V1ValidatingWebhook item); - public A addToWebhooks(io.kubernetes.client.openapi.models.V1ValidatingWebhook... items); - public A addAllToWebhooks(Collection items); - public A removeFromWebhooks(io.kubernetes.client.openapi.models.V1ValidatingWebhook... items); - public A removeAllFromWebhooks(Collection items); - public A removeMatchingFromWebhooks(Predicate predicate); - - /** - * This method has been deprecated, please use method buildWebhooks instead. - * @return The buildable object. - */ - @Deprecated - public List getWebhooks(); - public List buildWebhooks(); - public V1ValidatingWebhook buildWebhook(int index); - public V1ValidatingWebhook buildFirstWebhook(); - public V1ValidatingWebhook buildLastWebhook(); - public V1ValidatingWebhook buildMatchingWebhook(Predicate predicate); - public Boolean hasMatchingWebhook(Predicate predicate); - public A withWebhooks(List webhooks); - public A withWebhooks(io.kubernetes.client.openapi.models.V1ValidatingWebhook... webhooks); - public Boolean hasWebhooks(); - public V1ValidatingWebhookConfigurationFluent.WebhooksNested addNewWebhook(); - public V1ValidatingWebhookConfigurationFluent.WebhooksNested addNewWebhookLike(V1ValidatingWebhook item); - public V1ValidatingWebhookConfigurationFluent.WebhooksNested setNewWebhookLike(int index,V1ValidatingWebhook item); - public V1ValidatingWebhookConfigurationFluent.WebhooksNested editWebhook(int index); - public V1ValidatingWebhookConfigurationFluent.WebhooksNested editFirstWebhook(); - public V1ValidatingWebhookConfigurationFluent.WebhooksNested editLastWebhook(); - public V1ValidatingWebhookConfigurationFluent.WebhooksNested editMatchingWebhook(Predicate predicate); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ValidatingWebhookConfigurationFluent> extends BaseFluent{ + public V1ValidatingWebhookConfigurationFluent() { + } + + public V1ValidatingWebhookConfigurationFluent(V1ValidatingWebhookConfiguration instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private ArrayList webhooks; + + protected void copyInstance(V1ValidatingWebhookConfiguration instance) { + instance = (instance != null ? instance : new V1ValidatingWebhookConfiguration()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withWebhooks(instance.getWebhooks()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public A addToWebhooks(int index,V1ValidatingWebhook item) { + if (this.webhooks == null) {this.webhooks = new ArrayList();} + V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item); + if (index < 0 || index >= webhooks.size()) { _visitables.get("webhooks").add(builder); webhooks.add(builder); } else { _visitables.get("webhooks").add(index, builder); webhooks.add(index, builder);} + return (A)this; + } + + public A setToWebhooks(int index,V1ValidatingWebhook item) { + if (this.webhooks == null) {this.webhooks = new ArrayList();} + V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item); + if (index < 0 || index >= webhooks.size()) { _visitables.get("webhooks").add(builder); webhooks.add(builder); } else { _visitables.get("webhooks").set(index, builder); webhooks.set(index, builder);} + return (A)this; + } + + public A addToWebhooks(io.kubernetes.client.openapi.models.V1ValidatingWebhook... items) { + if (this.webhooks == null) {this.webhooks = new ArrayList();} + for (V1ValidatingWebhook item : items) {V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item);_visitables.get("webhooks").add(builder);this.webhooks.add(builder);} return (A)this; + } + + public A addAllToWebhooks(Collection items) { + if (this.webhooks == null) {this.webhooks = new ArrayList();} + for (V1ValidatingWebhook item : items) {V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item);_visitables.get("webhooks").add(builder);this.webhooks.add(builder);} return (A)this; + } + + public A removeFromWebhooks(io.kubernetes.client.openapi.models.V1ValidatingWebhook... items) { + if (this.webhooks == null) return (A)this; + for (V1ValidatingWebhook item : items) {V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item);_visitables.get("webhooks").remove(builder); this.webhooks.remove(builder);} return (A)this; + } + + public A removeAllFromWebhooks(Collection items) { + if (this.webhooks == null) return (A)this; + for (V1ValidatingWebhook item : items) {V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item);_visitables.get("webhooks").remove(builder); this.webhooks.remove(builder);} return (A)this; + } + + public A removeMatchingFromWebhooks(Predicate predicate) { + if (webhooks == null) return (A) this; + final Iterator each = webhooks.iterator(); + final List visitables = _visitables.get("webhooks"); + while (each.hasNext()) { + V1ValidatingWebhookBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; } - public interface WebhooksNested extends Nested,V1ValidatingWebhookFluent>{ - public N and(); - public N endWebhook(); + + public List buildWebhooks() { + return this.webhooks != null ? build(webhooks) : null; + } + + public V1ValidatingWebhook buildWebhook(int index) { + return this.webhooks.get(index).build(); + } + + public V1ValidatingWebhook buildFirstWebhook() { + return this.webhooks.get(0).build(); + } + + public V1ValidatingWebhook buildLastWebhook() { + return this.webhooks.get(webhooks.size() - 1).build(); + } + + public V1ValidatingWebhook buildMatchingWebhook(Predicate predicate) { + for (V1ValidatingWebhookBuilder item : webhooks) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingWebhook(Predicate predicate) { + for (V1ValidatingWebhookBuilder item : webhooks) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withWebhooks(List webhooks) { + if (this.webhooks != null) { + this._visitables.get("webhooks").clear(); + } + if (webhooks != null) { + this.webhooks = new ArrayList(); + for (V1ValidatingWebhook item : webhooks) { + this.addToWebhooks(item); + } + } else { + this.webhooks = null; + } + return (A) this; + } + + public A withWebhooks(io.kubernetes.client.openapi.models.V1ValidatingWebhook... webhooks) { + if (this.webhooks != null) { + this.webhooks.clear(); + _visitables.remove("webhooks"); + } + if (webhooks != null) { + for (V1ValidatingWebhook item : webhooks) { + this.addToWebhooks(item); + } + } + return (A) this; + } + + public boolean hasWebhooks() { + return this.webhooks != null && !this.webhooks.isEmpty(); + } + + public WebhooksNested addNewWebhook() { + return new WebhooksNested(-1, null); + } + + public WebhooksNested addNewWebhookLike(V1ValidatingWebhook item) { + return new WebhooksNested(-1, item); + } + + public WebhooksNested setNewWebhookLike(int index,V1ValidatingWebhook item) { + return new WebhooksNested(index, item); + } + + public WebhooksNested editWebhook(int index) { + if (webhooks.size() <= index) throw new RuntimeException("Can't edit webhooks. Index exceeds size."); + return setNewWebhookLike(index, buildWebhook(index)); + } + + public WebhooksNested editFirstWebhook() { + if (webhooks.size() == 0) throw new RuntimeException("Can't edit first webhooks. The list is empty."); + return setNewWebhookLike(0, buildWebhook(0)); + } + + public WebhooksNested editLastWebhook() { + int index = webhooks.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last webhooks. The list is empty."); + return setNewWebhookLike(index, buildWebhook(index)); + } + + public WebhooksNested editMatchingWebhook(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + public N and() { + return (N) V1ValidatingWebhookConfigurationFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + public class WebhooksNested extends V1ValidatingWebhookFluent> implements Nested{ + WebhooksNested(int index,V1ValidatingWebhook item) { + this.index = index; + this.builder = new V1ValidatingWebhookBuilder(this, item); + } + V1ValidatingWebhookBuilder builder; + int index; + + public N and() { + return (N) V1ValidatingWebhookConfigurationFluent.this.setToWebhooks(index,builder.build()); + } + + public N endWebhook() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationFluentImpl.java deleted file mode 100644 index 15edd51ed9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ValidatingWebhookConfigurationFluentImpl> extends BaseFluent implements V1ValidatingWebhookConfigurationFluent{ - public V1ValidatingWebhookConfigurationFluentImpl() { - } - public V1ValidatingWebhookConfigurationFluentImpl(V1ValidatingWebhookConfiguration instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withWebhooks(instance.getWebhooks()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private ArrayList webhooks; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1ValidatingWebhookConfigurationFluentImpl.MetadataNested withNewMetadata() { - return new V1ValidatingWebhookConfigurationFluentImpl.MetadataNestedImpl(); - } - public V1ValidatingWebhookConfigurationFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1ValidatingWebhookConfigurationFluentImpl.MetadataNestedImpl(item); - } - public V1ValidatingWebhookConfigurationFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ValidatingWebhookConfigurationFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1ValidatingWebhookConfigurationFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public A addToWebhooks(int index,V1ValidatingWebhook item) { - if (this.webhooks == null) {this.webhooks = new ArrayList();} - V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item); - if (index < 0 || index >= webhooks.size()) { _visitables.get("webhooks").add(builder); webhooks.add(builder); } else { _visitables.get("webhooks").add(index, builder); webhooks.add(index, builder);} - return (A)this; - } - public A setToWebhooks(int index,V1ValidatingWebhook item) { - if (this.webhooks == null) {this.webhooks = new ArrayList();} - V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item); - if (index < 0 || index >= webhooks.size()) { _visitables.get("webhooks").add(builder); webhooks.add(builder); } else { _visitables.get("webhooks").set(index, builder); webhooks.set(index, builder);} - return (A)this; - } - public A addToWebhooks(io.kubernetes.client.openapi.models.V1ValidatingWebhook... items) { - if (this.webhooks == null) {this.webhooks = new ArrayList();} - for (V1ValidatingWebhook item : items) {V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item);_visitables.get("webhooks").add(builder);this.webhooks.add(builder);} return (A)this; - } - public A addAllToWebhooks(Collection items) { - if (this.webhooks == null) {this.webhooks = new ArrayList();} - for (V1ValidatingWebhook item : items) {V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item);_visitables.get("webhooks").add(builder);this.webhooks.add(builder);} return (A)this; - } - public A removeFromWebhooks(io.kubernetes.client.openapi.models.V1ValidatingWebhook... items) { - for (V1ValidatingWebhook item : items) {V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item);_visitables.get("webhooks").remove(builder);if (this.webhooks != null) {this.webhooks.remove(builder);}} return (A)this; - } - public A removeAllFromWebhooks(Collection items) { - for (V1ValidatingWebhook item : items) {V1ValidatingWebhookBuilder builder = new V1ValidatingWebhookBuilder(item);_visitables.get("webhooks").remove(builder);if (this.webhooks != null) {this.webhooks.remove(builder);}} return (A)this; - } - public A removeMatchingFromWebhooks(Predicate predicate) { - if (webhooks == null) return (A) this; - final Iterator each = webhooks.iterator(); - final List visitables = _visitables.get("webhooks"); - while (each.hasNext()) { - V1ValidatingWebhookBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildWebhooks instead. - * @return The buildable object. - */ - @Deprecated - public List getWebhooks() { - return webhooks != null ? build(webhooks) : null; - } - public List buildWebhooks() { - return webhooks != null ? build(webhooks) : null; - } - public V1ValidatingWebhook buildWebhook(int index) { - return this.webhooks.get(index).build(); - } - public V1ValidatingWebhook buildFirstWebhook() { - return this.webhooks.get(0).build(); - } - public V1ValidatingWebhook buildLastWebhook() { - return this.webhooks.get(webhooks.size() - 1).build(); - } - public V1ValidatingWebhook buildMatchingWebhook(Predicate predicate) { - for (V1ValidatingWebhookBuilder item: webhooks) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingWebhook(Predicate predicate) { - for (V1ValidatingWebhookBuilder item: webhooks) { if(predicate.test(item)){ return true;} } return false; - } - public A withWebhooks(List webhooks) { - if (this.webhooks != null) { _visitables.get("webhooks").clear();} - if (webhooks != null) {this.webhooks = new ArrayList(); for (V1ValidatingWebhook item : webhooks){this.addToWebhooks(item);}} else { this.webhooks = null;} return (A) this; - } - public A withWebhooks(io.kubernetes.client.openapi.models.V1ValidatingWebhook... webhooks) { - if (this.webhooks != null) {this.webhooks.clear(); _visitables.remove("webhooks"); } - if (webhooks != null) {for (V1ValidatingWebhook item :webhooks){ this.addToWebhooks(item);}} return (A) this; - } - public Boolean hasWebhooks() { - return webhooks != null && !webhooks.isEmpty(); - } - public V1ValidatingWebhookConfigurationFluentImpl.WebhooksNested addNewWebhook() { - return new V1ValidatingWebhookConfigurationFluentImpl.WebhooksNestedImpl(); - } - public V1ValidatingWebhookConfigurationFluentImpl.WebhooksNested addNewWebhookLike(V1ValidatingWebhook item) { - return new V1ValidatingWebhookConfigurationFluentImpl.WebhooksNestedImpl(-1, item); - } - public V1ValidatingWebhookConfigurationFluentImpl.WebhooksNested setNewWebhookLike(int index,V1ValidatingWebhook item) { - return new V1ValidatingWebhookConfigurationFluentImpl.WebhooksNestedImpl(index, item); - } - public V1ValidatingWebhookConfigurationFluentImpl.WebhooksNested editWebhook(int index) { - if (webhooks.size() <= index) throw new RuntimeException("Can't edit webhooks. Index exceeds size."); - return setNewWebhookLike(index, buildWebhook(index)); - } - public V1ValidatingWebhookConfigurationFluentImpl.WebhooksNested editFirstWebhook() { - if (webhooks.size() == 0) throw new RuntimeException("Can't edit first webhooks. The list is empty."); - return setNewWebhookLike(0, buildWebhook(0)); - } - public V1ValidatingWebhookConfigurationFluentImpl.WebhooksNested editLastWebhook() { - int index = webhooks.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last webhooks. The list is empty."); - return setNewWebhookLike(index, buildWebhook(index)); - } - public V1ValidatingWebhookConfigurationFluentImpl.WebhooksNested editMatchingWebhook(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1ObjectMetaFluentImpl> implements V1ValidatingWebhookConfigurationFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1ValidatingWebhookConfigurationFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class WebhooksNestedImpl extends V1ValidatingWebhookFluentImpl> implements V1ValidatingWebhookConfigurationFluentImpl.WebhooksNested,Nested{ - WebhooksNestedImpl(int index,V1ValidatingWebhook item) { - this.index = index; - this.builder = new V1ValidatingWebhookBuilder(this, item); - } - WebhooksNestedImpl() { - this.index = -1; - this.builder = new V1ValidatingWebhookBuilder(this); - } - V1ValidatingWebhookBuilder builder; - int index; - public N and() { - return (N) V1ValidatingWebhookConfigurationFluentImpl.this.setToWebhooks(index,builder.build()); - } - public N endWebhook() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListBuilder.java index a39ba779db..3761a6ce41 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ValidatingWebhookConfigurationListBuilder extends V1ValidatingWebhookConfigurationListFluentImpl implements VisitableBuilder{ +public class V1ValidatingWebhookConfigurationListBuilder extends V1ValidatingWebhookConfigurationListFluent implements VisitableBuilder{ public V1ValidatingWebhookConfigurationListBuilder() { - this(false); - } - public V1ValidatingWebhookConfigurationListBuilder(Boolean validationEnabled) { - this(new V1ValidatingWebhookConfigurationList(), validationEnabled); + this(new V1ValidatingWebhookConfigurationList()); } + public V1ValidatingWebhookConfigurationListBuilder(V1ValidatingWebhookConfigurationListFluent fluent) { - this(fluent, false); - } - public V1ValidatingWebhookConfigurationListBuilder(V1ValidatingWebhookConfigurationListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ValidatingWebhookConfigurationList(), validationEnabled); + this(fluent, new V1ValidatingWebhookConfigurationList()); } + public V1ValidatingWebhookConfigurationListBuilder(V1ValidatingWebhookConfigurationListFluent fluent,V1ValidatingWebhookConfigurationList instance) { - this(fluent, instance, false); - } - public V1ValidatingWebhookConfigurationListBuilder(V1ValidatingWebhookConfigurationListFluent fluent,V1ValidatingWebhookConfigurationList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ValidatingWebhookConfigurationListBuilder(V1ValidatingWebhookConfigurationList instance) { - this(instance,false); - } - public V1ValidatingWebhookConfigurationListBuilder(V1ValidatingWebhookConfigurationList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ValidatingWebhookConfigurationListFluent fluent; - Boolean validationEnabled; + public V1ValidatingWebhookConfigurationList build() { V1ValidatingWebhookConfigurationList buildable = new V1ValidatingWebhookConfigurationList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListFluent.java index 8e40c32424..8314396077 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ValidatingWebhookConfigurationListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1ValidatingWebhookConfiguration item); - public A setToItems(int index,V1ValidatingWebhookConfiguration item); - public A addToItems(io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1ValidatingWebhookConfiguration buildItem(int index); - public V1ValidatingWebhookConfiguration buildFirstItem(); - public V1ValidatingWebhookConfiguration buildLastItem(); - public V1ValidatingWebhookConfiguration buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration... items); - public Boolean hasItems(); - public V1ValidatingWebhookConfigurationListFluent.ItemsNested addNewItem(); - public V1ValidatingWebhookConfigurationListFluent.ItemsNested addNewItemLike(V1ValidatingWebhookConfiguration item); - public V1ValidatingWebhookConfigurationListFluent.ItemsNested setNewItemLike(int index,V1ValidatingWebhookConfiguration item); - public V1ValidatingWebhookConfigurationListFluent.ItemsNested editItem(int index); - public V1ValidatingWebhookConfigurationListFluent.ItemsNested editFirstItem(); - public V1ValidatingWebhookConfigurationListFluent.ItemsNested editLastItem(); - public V1ValidatingWebhookConfigurationListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1ValidatingWebhookConfigurationListFluent.MetadataNested withNewMetadata(); - public V1ValidatingWebhookConfigurationListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1ValidatingWebhookConfigurationListFluent.MetadataNested editMetadata(); - public V1ValidatingWebhookConfigurationListFluent.MetadataNested editOrNewMetadata(); - public V1ValidatingWebhookConfigurationListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1ValidatingWebhookConfigurationFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ValidatingWebhookConfigurationListFluent> extends BaseFluent{ + public V1ValidatingWebhookConfigurationListFluent() { + } + + public V1ValidatingWebhookConfigurationListFluent(V1ValidatingWebhookConfigurationList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1ValidatingWebhookConfigurationList instance) { + instance = (instance != null ? instance : new V1ValidatingWebhookConfigurationList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1ValidatingWebhookConfiguration item) { + if (this.items == null) {this.items = new ArrayList();} + V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1ValidatingWebhookConfiguration item) { + if (this.items == null) {this.items = new ArrayList();} + V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ValidatingWebhookConfiguration item : items) {V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1ValidatingWebhookConfiguration item : items) {V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration... items) { + if (this.items == null) return (A)this; + for (V1ValidatingWebhookConfiguration item : items) {V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1ValidatingWebhookConfiguration item : items) {V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1ValidatingWebhookConfigurationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1ValidatingWebhookConfiguration buildItem(int index) { + return this.items.get(index).build(); + } + + public V1ValidatingWebhookConfiguration buildFirstItem() { + return this.items.get(0).build(); + } + + public V1ValidatingWebhookConfiguration buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1ValidatingWebhookConfiguration buildMatchingItem(Predicate predicate) { + for (V1ValidatingWebhookConfigurationBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1ValidatingWebhookConfigurationBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1ValidatingWebhookConfiguration item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1ValidatingWebhookConfiguration item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1ValidatingWebhookConfiguration item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1ValidatingWebhookConfiguration item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ValidatingWebhookConfigurationListFluent that = (V1ValidatingWebhookConfigurationListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1ValidatingWebhookConfigurationFluent> implements Nested{ + ItemsNested(int index,V1ValidatingWebhookConfiguration item) { + this.index = index; + this.builder = new V1ValidatingWebhookConfigurationBuilder(this, item); + } + V1ValidatingWebhookConfigurationBuilder builder; + int index; + public N and() { + return (N) V1ValidatingWebhookConfigurationListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1ValidatingWebhookConfigurationListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListFluentImpl.java deleted file mode 100644 index 02648a4f4d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookConfigurationListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ValidatingWebhookConfigurationListFluentImpl> extends BaseFluent implements V1ValidatingWebhookConfigurationListFluent{ - public V1ValidatingWebhookConfigurationListFluentImpl() { - } - public V1ValidatingWebhookConfigurationListFluentImpl(V1ValidatingWebhookConfigurationList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1ValidatingWebhookConfiguration item) { - if (this.items == null) {this.items = new ArrayList();} - V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1ValidatingWebhookConfiguration item) { - if (this.items == null) {this.items = new ArrayList();} - V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ValidatingWebhookConfiguration item : items) {V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1ValidatingWebhookConfiguration item : items) {V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration... items) { - for (V1ValidatingWebhookConfiguration item : items) {V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1ValidatingWebhookConfiguration item : items) {V1ValidatingWebhookConfigurationBuilder builder = new V1ValidatingWebhookConfigurationBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1ValidatingWebhookConfigurationBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1ValidatingWebhookConfiguration buildItem(int index) { - return this.items.get(index).build(); - } - public V1ValidatingWebhookConfiguration buildFirstItem() { - return this.items.get(0).build(); - } - public V1ValidatingWebhookConfiguration buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1ValidatingWebhookConfiguration buildMatchingItem(Predicate predicate) { - for (V1ValidatingWebhookConfigurationBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1ValidatingWebhookConfigurationBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1ValidatingWebhookConfiguration item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1ValidatingWebhookConfiguration... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1ValidatingWebhookConfiguration item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1ValidatingWebhookConfigurationListFluentImpl.ItemsNested addNewItem() { - return new V1ValidatingWebhookConfigurationListFluentImpl.ItemsNestedImpl(); - } - public V1ValidatingWebhookConfigurationListFluentImpl.ItemsNested addNewItemLike(V1ValidatingWebhookConfiguration item) { - return new V1ValidatingWebhookConfigurationListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1ValidatingWebhookConfigurationListFluentImpl.ItemsNested setNewItemLike(int index,V1ValidatingWebhookConfiguration item) { - return new V1ValidatingWebhookConfigurationListFluentImpl.ItemsNestedImpl(index, item); - } - public V1ValidatingWebhookConfigurationListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1ValidatingWebhookConfigurationListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1ValidatingWebhookConfigurationListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1ValidatingWebhookConfigurationListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1ValidatingWebhookConfigurationListFluentImpl.MetadataNestedImpl(); - } - public V1ValidatingWebhookConfigurationListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1ValidatingWebhookConfigurationListFluentImpl.MetadataNestedImpl(item); - } - public V1ValidatingWebhookConfigurationListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1ValidatingWebhookConfigurationListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1ValidatingWebhookConfigurationListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ValidatingWebhookConfigurationListFluentImpl that = (V1ValidatingWebhookConfigurationListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1ValidatingWebhookConfigurationFluentImpl> implements V1ValidatingWebhookConfigurationListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1ValidatingWebhookConfiguration item) { - this.index = index; - this.builder = new V1ValidatingWebhookConfigurationBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1ValidatingWebhookConfigurationBuilder(this); - } - V1ValidatingWebhookConfigurationBuilder builder; - int index; - public N and() { - return (N) V1ValidatingWebhookConfigurationListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1ValidatingWebhookConfigurationListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1ValidatingWebhookConfigurationListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookFluent.java index 1d1a75a7a2..5c8e0d07a8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookFluent.java @@ -1,182 +1,762 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.List; -import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.lang.Integer; import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1ValidatingWebhookFluent> extends Fluent{ - public A addToAdmissionReviewVersions(int index,String item); - public A setToAdmissionReviewVersions(int index,String item); - public A addToAdmissionReviewVersions(java.lang.String... items); - public A addAllToAdmissionReviewVersions(Collection items); - public A removeFromAdmissionReviewVersions(java.lang.String... items); - public A removeAllFromAdmissionReviewVersions(Collection items); - public List getAdmissionReviewVersions(); - public String getAdmissionReviewVersion(int index); - public String getFirstAdmissionReviewVersion(); - public String getLastAdmissionReviewVersion(); - public String getMatchingAdmissionReviewVersion(Predicate predicate); - public Boolean hasMatchingAdmissionReviewVersion(Predicate predicate); - public A withAdmissionReviewVersions(List admissionReviewVersions); - public A withAdmissionReviewVersions(java.lang.String... admissionReviewVersions); - public Boolean hasAdmissionReviewVersions(); - - /** - * This method has been deprecated, please use method buildClientConfig instead. - * @return The buildable object. - */ - @Deprecated - public AdmissionregistrationV1WebhookClientConfig getClientConfig(); - public AdmissionregistrationV1WebhookClientConfig buildClientConfig(); - public A withClientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig); - public Boolean hasClientConfig(); - public V1ValidatingWebhookFluent.ClientConfigNested withNewClientConfig(); - public V1ValidatingWebhookFluent.ClientConfigNested withNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item); - public V1ValidatingWebhookFluent.ClientConfigNested editClientConfig(); - public V1ValidatingWebhookFluent.ClientConfigNested editOrNewClientConfig(); - public V1ValidatingWebhookFluent.ClientConfigNested editOrNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item); - public String getFailurePolicy(); - public A withFailurePolicy(String failurePolicy); - public Boolean hasFailurePolicy(); - public A addToMatchConditions(int index,V1MatchCondition item); - public A setToMatchConditions(int index,V1MatchCondition item); - public A addToMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items); - public A addAllToMatchConditions(Collection items); - public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items); - public A removeAllFromMatchConditions(Collection items); - public A removeMatchingFromMatchConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMatchConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchConditions(); - public List buildMatchConditions(); - public V1MatchCondition buildMatchCondition(int index); - public V1MatchCondition buildFirstMatchCondition(); - public V1MatchCondition buildLastMatchCondition(); - public V1MatchCondition buildMatchingMatchCondition(Predicate predicate); - public Boolean hasMatchingMatchCondition(Predicate predicate); - public A withMatchConditions(List matchConditions); - public A withMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... matchConditions); - public Boolean hasMatchConditions(); - public V1ValidatingWebhookFluent.MatchConditionsNested addNewMatchCondition(); - public V1ValidatingWebhookFluent.MatchConditionsNested addNewMatchConditionLike(V1MatchCondition item); - public V1ValidatingWebhookFluent.MatchConditionsNested setNewMatchConditionLike(int index,V1MatchCondition item); - public V1ValidatingWebhookFluent.MatchConditionsNested editMatchCondition(int index); - public V1ValidatingWebhookFluent.MatchConditionsNested editFirstMatchCondition(); - public V1ValidatingWebhookFluent.MatchConditionsNested editLastMatchCondition(); - public V1ValidatingWebhookFluent.MatchConditionsNested editMatchingMatchCondition(Predicate predicate); - public String getMatchPolicy(); - public A withMatchPolicy(String matchPolicy); - public Boolean hasMatchPolicy(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildNamespaceSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getNamespaceSelector(); - public V1LabelSelector buildNamespaceSelector(); - public A withNamespaceSelector(V1LabelSelector namespaceSelector); - public Boolean hasNamespaceSelector(); - public V1ValidatingWebhookFluent.NamespaceSelectorNested withNewNamespaceSelector(); - public V1ValidatingWebhookFluent.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item); - public V1ValidatingWebhookFluent.NamespaceSelectorNested editNamespaceSelector(); - public V1ValidatingWebhookFluent.NamespaceSelectorNested editOrNewNamespaceSelector(); - public V1ValidatingWebhookFluent.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item); - - /** - * This method has been deprecated, please use method buildObjectSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getObjectSelector(); - public V1LabelSelector buildObjectSelector(); - public A withObjectSelector(V1LabelSelector objectSelector); - public Boolean hasObjectSelector(); - public V1ValidatingWebhookFluent.ObjectSelectorNested withNewObjectSelector(); - public V1ValidatingWebhookFluent.ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item); - public V1ValidatingWebhookFluent.ObjectSelectorNested editObjectSelector(); - public V1ValidatingWebhookFluent.ObjectSelectorNested editOrNewObjectSelector(); - public V1ValidatingWebhookFluent.ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item); - public A addToRules(int index,V1RuleWithOperations item); - public A setToRules(int index,V1RuleWithOperations item); - public A addToRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items); - public A addAllToRules(Collection items); - public A removeFromRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items); - public A removeAllFromRules(Collection items); - public A removeMatchingFromRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules(); - public List buildRules(); - public V1RuleWithOperations buildRule(int index); - public V1RuleWithOperations buildFirstRule(); - public V1RuleWithOperations buildLastRule(); - public V1RuleWithOperations buildMatchingRule(Predicate predicate); - public Boolean hasMatchingRule(Predicate predicate); - public A withRules(List rules); - public A withRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... rules); - public Boolean hasRules(); - public V1ValidatingWebhookFluent.RulesNested addNewRule(); - public V1ValidatingWebhookFluent.RulesNested addNewRuleLike(V1RuleWithOperations item); - public V1ValidatingWebhookFluent.RulesNested setNewRuleLike(int index,V1RuleWithOperations item); - public V1ValidatingWebhookFluent.RulesNested editRule(int index); - public V1ValidatingWebhookFluent.RulesNested editFirstRule(); - public V1ValidatingWebhookFluent.RulesNested editLastRule(); - public V1ValidatingWebhookFluent.RulesNested editMatchingRule(Predicate predicate); - public String getSideEffects(); - public A withSideEffects(String sideEffects); - public Boolean hasSideEffects(); - public Integer getTimeoutSeconds(); - public A withTimeoutSeconds(Integer timeoutSeconds); - public Boolean hasTimeoutSeconds(); - public interface ClientConfigNested extends Nested,AdmissionregistrationV1WebhookClientConfigFluent>{ - public N and(); - public N endClientConfig(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ValidatingWebhookFluent> extends BaseFluent{ + public V1ValidatingWebhookFluent() { + } + + public V1ValidatingWebhookFluent(V1ValidatingWebhook instance) { + this.copyInstance(instance); + } + private List admissionReviewVersions; + private AdmissionregistrationV1WebhookClientConfigBuilder clientConfig; + private String failurePolicy; + private ArrayList matchConditions; + private String matchPolicy; + private String name; + private V1LabelSelectorBuilder namespaceSelector; + private V1LabelSelectorBuilder objectSelector; + private ArrayList rules; + private String sideEffects; + private Integer timeoutSeconds; + + protected void copyInstance(V1ValidatingWebhook instance) { + instance = (instance != null ? instance : new V1ValidatingWebhook()); + if (instance != null) { + this.withAdmissionReviewVersions(instance.getAdmissionReviewVersions()); + this.withClientConfig(instance.getClientConfig()); + this.withFailurePolicy(instance.getFailurePolicy()); + this.withMatchConditions(instance.getMatchConditions()); + this.withMatchPolicy(instance.getMatchPolicy()); + this.withName(instance.getName()); + this.withNamespaceSelector(instance.getNamespaceSelector()); + this.withObjectSelector(instance.getObjectSelector()); + this.withRules(instance.getRules()); + this.withSideEffects(instance.getSideEffects()); + this.withTimeoutSeconds(instance.getTimeoutSeconds()); + } + } + + public A addToAdmissionReviewVersions(int index,String item) { + if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} + this.admissionReviewVersions.add(index, item); + return (A)this; + } + + public A setToAdmissionReviewVersions(int index,String item) { + if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} + this.admissionReviewVersions.set(index, item); return (A)this; + } + + public A addToAdmissionReviewVersions(java.lang.String... items) { + if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} + for (String item : items) {this.admissionReviewVersions.add(item);} return (A)this; + } + + public A addAllToAdmissionReviewVersions(Collection items) { + if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} + for (String item : items) {this.admissionReviewVersions.add(item);} return (A)this; + } + + public A removeFromAdmissionReviewVersions(java.lang.String... items) { + if (this.admissionReviewVersions == null) return (A)this; + for (String item : items) { this.admissionReviewVersions.remove(item);} return (A)this; + } + + public A removeAllFromAdmissionReviewVersions(Collection items) { + if (this.admissionReviewVersions == null) return (A)this; + for (String item : items) { this.admissionReviewVersions.remove(item);} return (A)this; + } + + public List getAdmissionReviewVersions() { + return this.admissionReviewVersions; + } + + public String getAdmissionReviewVersion(int index) { + return this.admissionReviewVersions.get(index); + } + + public String getFirstAdmissionReviewVersion() { + return this.admissionReviewVersions.get(0); + } + + public String getLastAdmissionReviewVersion() { + return this.admissionReviewVersions.get(admissionReviewVersions.size() - 1); + } + + public String getMatchingAdmissionReviewVersion(Predicate predicate) { + for (String item : admissionReviewVersions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingAdmissionReviewVersion(Predicate predicate) { + for (String item : admissionReviewVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAdmissionReviewVersions(List admissionReviewVersions) { + if (admissionReviewVersions != null) { + this.admissionReviewVersions = new ArrayList(); + for (String item : admissionReviewVersions) { + this.addToAdmissionReviewVersions(item); + } + } else { + this.admissionReviewVersions = null; + } + return (A) this; + } + + public A withAdmissionReviewVersions(java.lang.String... admissionReviewVersions) { + if (this.admissionReviewVersions != null) { + this.admissionReviewVersions.clear(); + _visitables.remove("admissionReviewVersions"); + } + if (admissionReviewVersions != null) { + for (String item : admissionReviewVersions) { + this.addToAdmissionReviewVersions(item); + } + } + return (A) this; + } + + public boolean hasAdmissionReviewVersions() { + return this.admissionReviewVersions != null && !this.admissionReviewVersions.isEmpty(); + } + + public AdmissionregistrationV1WebhookClientConfig buildClientConfig() { + return this.clientConfig != null ? this.clientConfig.build() : null; + } + + public A withClientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig) { + this._visitables.remove("clientConfig"); + if (clientConfig != null) { + this.clientConfig = new AdmissionregistrationV1WebhookClientConfigBuilder(clientConfig); + this._visitables.get("clientConfig").add(this.clientConfig); + } else { + this.clientConfig = null; + this._visitables.get("clientConfig").remove(this.clientConfig); + } + return (A) this; + } + + public boolean hasClientConfig() { + return this.clientConfig != null; + } + + public ClientConfigNested withNewClientConfig() { + return new ClientConfigNested(null); + } + + public ClientConfigNested withNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item) { + return new ClientConfigNested(item); + } + + public ClientConfigNested editClientConfig() { + return withNewClientConfigLike(java.util.Optional.ofNullable(buildClientConfig()).orElse(null)); + } + + public ClientConfigNested editOrNewClientConfig() { + return withNewClientConfigLike(java.util.Optional.ofNullable(buildClientConfig()).orElse(new AdmissionregistrationV1WebhookClientConfigBuilder().build())); + } + + public ClientConfigNested editOrNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item) { + return withNewClientConfigLike(java.util.Optional.ofNullable(buildClientConfig()).orElse(item)); + } + + public String getFailurePolicy() { + return this.failurePolicy; + } + + public A withFailurePolicy(String failurePolicy) { + this.failurePolicy = failurePolicy; + return (A) this; + } + + public boolean hasFailurePolicy() { + return this.failurePolicy != null; + } + + public A addToMatchConditions(int index,V1MatchCondition item) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item); + if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").add(index, builder); matchConditions.add(index, builder);} + return (A)this; + } + + public A setToMatchConditions(int index,V1MatchCondition item) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item); + if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").set(index, builder); matchConditions.set(index, builder);} + return (A)this; + } + + public A addToMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; + } + + public A addAllToMatchConditions(Collection items) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; + } + + public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items) { + if (this.matchConditions == null) return (A)this; + for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder); this.matchConditions.remove(builder);} return (A)this; + } + + public A removeAllFromMatchConditions(Collection items) { + if (this.matchConditions == null) return (A)this; + for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder); this.matchConditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromMatchConditions(Predicate predicate) { + if (matchConditions == null) return (A) this; + final Iterator each = matchConditions.iterator(); + final List visitables = _visitables.get("matchConditions"); + while (each.hasNext()) { + V1MatchConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMatchConditions() { + return this.matchConditions != null ? build(matchConditions) : null; + } + + public V1MatchCondition buildMatchCondition(int index) { + return this.matchConditions.get(index).build(); + } + + public V1MatchCondition buildFirstMatchCondition() { + return this.matchConditions.get(0).build(); + } + + public V1MatchCondition buildLastMatchCondition() { + return this.matchConditions.get(matchConditions.size() - 1).build(); + } + + public V1MatchCondition buildMatchingMatchCondition(Predicate predicate) { + for (V1MatchConditionBuilder item : matchConditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMatchCondition(Predicate predicate) { + for (V1MatchConditionBuilder item : matchConditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMatchConditions(List matchConditions) { + if (this.matchConditions != null) { + this._visitables.get("matchConditions").clear(); + } + if (matchConditions != null) { + this.matchConditions = new ArrayList(); + for (V1MatchCondition item : matchConditions) { + this.addToMatchConditions(item); + } + } else { + this.matchConditions = null; + } + return (A) this; + } + + public A withMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... matchConditions) { + if (this.matchConditions != null) { + this.matchConditions.clear(); + _visitables.remove("matchConditions"); + } + if (matchConditions != null) { + for (V1MatchCondition item : matchConditions) { + this.addToMatchConditions(item); + } + } + return (A) this; + } + + public boolean hasMatchConditions() { + return this.matchConditions != null && !this.matchConditions.isEmpty(); + } + + public MatchConditionsNested addNewMatchCondition() { + return new MatchConditionsNested(-1, null); + } + + public MatchConditionsNested addNewMatchConditionLike(V1MatchCondition item) { + return new MatchConditionsNested(-1, item); + } + + public MatchConditionsNested setNewMatchConditionLike(int index,V1MatchCondition item) { + return new MatchConditionsNested(index, item); + } + + public MatchConditionsNested editMatchCondition(int index) { + if (matchConditions.size() <= index) throw new RuntimeException("Can't edit matchConditions. Index exceeds size."); + return setNewMatchConditionLike(index, buildMatchCondition(index)); + } + + public MatchConditionsNested editFirstMatchCondition() { + if (matchConditions.size() == 0) throw new RuntimeException("Can't edit first matchConditions. The list is empty."); + return setNewMatchConditionLike(0, buildMatchCondition(0)); + } + + public MatchConditionsNested editLastMatchCondition() { + int index = matchConditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last matchConditions. The list is empty."); + return setNewMatchConditionLike(index, buildMatchCondition(index)); + } + + public MatchConditionsNested editMatchingMatchCondition(Predicate predicate) { + int index = -1; + for (int i=0;i withNewNamespaceSelector() { + return new NamespaceSelectorNested(null); + } + + public NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { + return new NamespaceSelectorNested(item); + } + + public NamespaceSelectorNested editNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(null)); + } + + public NamespaceSelectorNested editOrNewNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(item)); + } + + public V1LabelSelector buildObjectSelector() { + return this.objectSelector != null ? this.objectSelector.build() : null; + } + + public A withObjectSelector(V1LabelSelector objectSelector) { + this._visitables.remove("objectSelector"); + if (objectSelector != null) { + this.objectSelector = new V1LabelSelectorBuilder(objectSelector); + this._visitables.get("objectSelector").add(this.objectSelector); + } else { + this.objectSelector = null; + this._visitables.get("objectSelector").remove(this.objectSelector); + } + return (A) this; + } + + public boolean hasObjectSelector() { + return this.objectSelector != null; + } + + public ObjectSelectorNested withNewObjectSelector() { + return new ObjectSelectorNested(null); + } + + public ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item) { + return new ObjectSelectorNested(item); + } + + public ObjectSelectorNested editObjectSelector() { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(null)); + } + + public ObjectSelectorNested editOrNewObjectSelector() { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item) { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(item)); + } + + public A addToRules(int index,V1RuleWithOperations item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} + return (A)this; + } + + public A setToRules(int index,V1RuleWithOperations item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} + return (A)this; + } + + public A addToRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A addAllToRules(Collection items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A removeFromRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items) { + if (this.rules == null) return (A)this; + for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeAllFromRules(Collection items) { + if (this.rules == null) return (A)this; + for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeMatchingFromRules(Predicate predicate) { + if (rules == null) return (A) this; + final Iterator each = rules.iterator(); + final List visitables = _visitables.get("rules"); + while (each.hasNext()) { + V1RuleWithOperationsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildRules() { + return this.rules != null ? build(rules) : null; + } + + public V1RuleWithOperations buildRule(int index) { + return this.rules.get(index).build(); + } + + public V1RuleWithOperations buildFirstRule() { + return this.rules.get(0).build(); + } + + public V1RuleWithOperations buildLastRule() { + return this.rules.get(rules.size() - 1).build(); + } + + public V1RuleWithOperations buildMatchingRule(Predicate predicate) { + for (V1RuleWithOperationsBuilder item : rules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; } - public interface MatchConditionsNested extends Nested,V1MatchConditionFluent>{ - public N and(); - public N endMatchCondition(); + + public boolean hasMatchingRule(Predicate predicate) { + for (V1RuleWithOperationsBuilder item : rules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRules(List rules) { + if (this.rules != null) { + this._visitables.get("rules").clear(); + } + if (rules != null) { + this.rules = new ArrayList(); + for (V1RuleWithOperations item : rules) { + this.addToRules(item); + } + } else { + this.rules = null; + } + return (A) this; + } + + public A withRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... rules) { + if (this.rules != null) { + this.rules.clear(); + _visitables.remove("rules"); + } + if (rules != null) { + for (V1RuleWithOperations item : rules) { + this.addToRules(item); + } + } + return (A) this; + } + + public boolean hasRules() { + return this.rules != null && !this.rules.isEmpty(); + } + + public RulesNested addNewRule() { + return new RulesNested(-1, null); + } + + public RulesNested addNewRuleLike(V1RuleWithOperations item) { + return new RulesNested(-1, item); + } + + public RulesNested setNewRuleLike(int index,V1RuleWithOperations item) { + return new RulesNested(index, item); + } + + public RulesNested editRule(int index) { + if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editFirstRule() { + if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); + return setNewRuleLike(0, buildRule(0)); + } + + public RulesNested editLastRule() { + int index = rules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editMatchingRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends AdmissionregistrationV1WebhookClientConfigFluent> implements Nested{ + ClientConfigNested(AdmissionregistrationV1WebhookClientConfig item) { + this.builder = new AdmissionregistrationV1WebhookClientConfigBuilder(this, item); + } + AdmissionregistrationV1WebhookClientConfigBuilder builder; + public N and() { + return (N) V1ValidatingWebhookFluent.this.withClientConfig(builder.build()); + } + + public N endClientConfig() { + return and(); + } + + } - public interface NamespaceSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endNamespaceSelector(); + public class MatchConditionsNested extends V1MatchConditionFluent> implements Nested{ + MatchConditionsNested(int index,V1MatchCondition item) { + this.index = index; + this.builder = new V1MatchConditionBuilder(this, item); + } + V1MatchConditionBuilder builder; + int index; + public N and() { + return (N) V1ValidatingWebhookFluent.this.setToMatchConditions(index,builder.build()); + } + + public N endMatchCondition() { + return and(); + } + + } - public interface ObjectSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endObjectSelector(); + public class NamespaceSelectorNested extends V1LabelSelectorFluent> implements Nested{ + NamespaceSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1ValidatingWebhookFluent.this.withNamespaceSelector(builder.build()); + } + public N endNamespaceSelector() { + return and(); + } + + } - public interface RulesNested extends Nested,V1RuleWithOperationsFluent>{ - public N and(); - public N endRule(); + public class ObjectSelectorNested extends V1LabelSelectorFluent> implements Nested{ + ObjectSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1ValidatingWebhookFluent.this.withObjectSelector(builder.build()); + } + public N endObjectSelector() { + return and(); + } + + } + public class RulesNested extends V1RuleWithOperationsFluent> implements Nested{ + RulesNested(int index,V1RuleWithOperations item) { + this.index = index; + this.builder = new V1RuleWithOperationsBuilder(this, item); + } + V1RuleWithOperationsBuilder builder; + int index; + + public N and() { + return (N) V1ValidatingWebhookFluent.this.setToRules(index,builder.build()); + } + + public N endRule() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookFluentImpl.java deleted file mode 100644 index 2dc61291d2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidatingWebhookFluentImpl.java +++ /dev/null @@ -1,599 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ValidatingWebhookFluentImpl> extends BaseFluent implements V1ValidatingWebhookFluent{ - public V1ValidatingWebhookFluentImpl() { - } - public V1ValidatingWebhookFluentImpl(V1ValidatingWebhook instance) { - if (instance != null) { - this.withAdmissionReviewVersions(instance.getAdmissionReviewVersions()); - this.withClientConfig(instance.getClientConfig()); - this.withFailurePolicy(instance.getFailurePolicy()); - this.withMatchConditions(instance.getMatchConditions()); - this.withMatchPolicy(instance.getMatchPolicy()); - this.withName(instance.getName()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withObjectSelector(instance.getObjectSelector()); - this.withRules(instance.getRules()); - this.withSideEffects(instance.getSideEffects()); - this.withTimeoutSeconds(instance.getTimeoutSeconds()); - } - } - private List admissionReviewVersions; - private AdmissionregistrationV1WebhookClientConfigBuilder clientConfig; - private String failurePolicy; - private ArrayList matchConditions; - private String matchPolicy; - private String name; - private V1LabelSelectorBuilder namespaceSelector; - private V1LabelSelectorBuilder objectSelector; - private ArrayList rules; - private String sideEffects; - private Integer timeoutSeconds; - public A addToAdmissionReviewVersions(int index,String item) { - if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} - this.admissionReviewVersions.add(index, item); - return (A)this; - } - public A setToAdmissionReviewVersions(int index,String item) { - if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} - this.admissionReviewVersions.set(index, item); return (A)this; - } - public A addToAdmissionReviewVersions(java.lang.String... items) { - if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} - for (String item : items) {this.admissionReviewVersions.add(item);} return (A)this; - } - public A addAllToAdmissionReviewVersions(Collection items) { - if (this.admissionReviewVersions == null) {this.admissionReviewVersions = new ArrayList();} - for (String item : items) {this.admissionReviewVersions.add(item);} return (A)this; - } - public A removeFromAdmissionReviewVersions(java.lang.String... items) { - for (String item : items) {if (this.admissionReviewVersions!= null){ this.admissionReviewVersions.remove(item);}} return (A)this; - } - public A removeAllFromAdmissionReviewVersions(Collection items) { - for (String item : items) {if (this.admissionReviewVersions!= null){ this.admissionReviewVersions.remove(item);}} return (A)this; - } - public List getAdmissionReviewVersions() { - return this.admissionReviewVersions; - } - public String getAdmissionReviewVersion(int index) { - return this.admissionReviewVersions.get(index); - } - public String getFirstAdmissionReviewVersion() { - return this.admissionReviewVersions.get(0); - } - public String getLastAdmissionReviewVersion() { - return this.admissionReviewVersions.get(admissionReviewVersions.size() - 1); - } - public String getMatchingAdmissionReviewVersion(Predicate predicate) { - for (String item: admissionReviewVersions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingAdmissionReviewVersion(Predicate predicate) { - for (String item: admissionReviewVersions) { if(predicate.test(item)){ return true;} } return false; - } - public A withAdmissionReviewVersions(List admissionReviewVersions) { - if (admissionReviewVersions != null) {this.admissionReviewVersions = new ArrayList(); for (String item : admissionReviewVersions){this.addToAdmissionReviewVersions(item);}} else { this.admissionReviewVersions = null;} return (A) this; - } - public A withAdmissionReviewVersions(java.lang.String... admissionReviewVersions) { - if (this.admissionReviewVersions != null) {this.admissionReviewVersions.clear(); _visitables.remove("admissionReviewVersions"); } - if (admissionReviewVersions != null) {for (String item :admissionReviewVersions){ this.addToAdmissionReviewVersions(item);}} return (A) this; - } - public Boolean hasAdmissionReviewVersions() { - return admissionReviewVersions != null && !admissionReviewVersions.isEmpty(); - } - - /** - * This method has been deprecated, please use method buildClientConfig instead. - * @return The buildable object. - */ - @Deprecated - public AdmissionregistrationV1WebhookClientConfig getClientConfig() { - return this.clientConfig!=null ?this.clientConfig.build():null; - } - public AdmissionregistrationV1WebhookClientConfig buildClientConfig() { - return this.clientConfig!=null ?this.clientConfig.build():null; - } - public A withClientConfig(AdmissionregistrationV1WebhookClientConfig clientConfig) { - _visitables.get("clientConfig").remove(this.clientConfig); - if (clientConfig!=null){ this.clientConfig= new AdmissionregistrationV1WebhookClientConfigBuilder(clientConfig); _visitables.get("clientConfig").add(this.clientConfig);} else { this.clientConfig = null; _visitables.get("clientConfig").remove(this.clientConfig); } return (A) this; - } - public Boolean hasClientConfig() { - return this.clientConfig != null; - } - public V1ValidatingWebhookFluentImpl.ClientConfigNested withNewClientConfig() { - return new V1ValidatingWebhookFluentImpl.ClientConfigNestedImpl(); - } - public V1ValidatingWebhookFluentImpl.ClientConfigNested withNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item) { - return new V1ValidatingWebhookFluentImpl.ClientConfigNestedImpl(item); - } - public V1ValidatingWebhookFluentImpl.ClientConfigNested editClientConfig() { - return withNewClientConfigLike(getClientConfig()); - } - public V1ValidatingWebhookFluentImpl.ClientConfigNested editOrNewClientConfig() { - return withNewClientConfigLike(getClientConfig() != null ? getClientConfig(): new AdmissionregistrationV1WebhookClientConfigBuilder().build()); - } - public V1ValidatingWebhookFluentImpl.ClientConfigNested editOrNewClientConfigLike(AdmissionregistrationV1WebhookClientConfig item) { - return withNewClientConfigLike(getClientConfig() != null ? getClientConfig(): item); - } - public String getFailurePolicy() { - return this.failurePolicy; - } - public A withFailurePolicy(String failurePolicy) { - this.failurePolicy=failurePolicy; return (A) this; - } - public Boolean hasFailurePolicy() { - return this.failurePolicy != null; - } - public A addToMatchConditions(int index,V1MatchCondition item) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item); - if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").add(index, builder); matchConditions.add(index, builder);} - return (A)this; - } - public A setToMatchConditions(int index,V1MatchCondition item) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item); - if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").set(index, builder); matchConditions.set(index, builder);} - return (A)this; - } - public A addToMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; - } - public A addAllToMatchConditions(Collection items) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; - } - public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... items) { - for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder);if (this.matchConditions != null) {this.matchConditions.remove(builder);}} return (A)this; - } - public A removeAllFromMatchConditions(Collection items) { - for (V1MatchCondition item : items) {V1MatchConditionBuilder builder = new V1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder);if (this.matchConditions != null) {this.matchConditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromMatchConditions(Predicate predicate) { - if (matchConditions == null) return (A) this; - final Iterator each = matchConditions.iterator(); - final List visitables = _visitables.get("matchConditions"); - while (each.hasNext()) { - V1MatchConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildMatchConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchConditions() { - return matchConditions != null ? build(matchConditions) : null; - } - public List buildMatchConditions() { - return matchConditions != null ? build(matchConditions) : null; - } - public V1MatchCondition buildMatchCondition(int index) { - return this.matchConditions.get(index).build(); - } - public V1MatchCondition buildFirstMatchCondition() { - return this.matchConditions.get(0).build(); - } - public V1MatchCondition buildLastMatchCondition() { - return this.matchConditions.get(matchConditions.size() - 1).build(); - } - public V1MatchCondition buildMatchingMatchCondition(Predicate predicate) { - for (V1MatchConditionBuilder item: matchConditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingMatchCondition(Predicate predicate) { - for (V1MatchConditionBuilder item: matchConditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withMatchConditions(List matchConditions) { - if (this.matchConditions != null) { _visitables.get("matchConditions").clear();} - if (matchConditions != null) {this.matchConditions = new ArrayList(); for (V1MatchCondition item : matchConditions){this.addToMatchConditions(item);}} else { this.matchConditions = null;} return (A) this; - } - public A withMatchConditions(io.kubernetes.client.openapi.models.V1MatchCondition... matchConditions) { - if (this.matchConditions != null) {this.matchConditions.clear(); _visitables.remove("matchConditions"); } - if (matchConditions != null) {for (V1MatchCondition item :matchConditions){ this.addToMatchConditions(item);}} return (A) this; - } - public Boolean hasMatchConditions() { - return matchConditions != null && !matchConditions.isEmpty(); - } - public V1ValidatingWebhookFluentImpl.MatchConditionsNested addNewMatchCondition() { - return new V1ValidatingWebhookFluentImpl.MatchConditionsNestedImpl(); - } - public V1ValidatingWebhookFluentImpl.MatchConditionsNested addNewMatchConditionLike(V1MatchCondition item) { - return new V1ValidatingWebhookFluentImpl.MatchConditionsNestedImpl(-1, item); - } - public V1ValidatingWebhookFluentImpl.MatchConditionsNested setNewMatchConditionLike(int index,V1MatchCondition item) { - return new V1ValidatingWebhookFluentImpl.MatchConditionsNestedImpl(index, item); - } - public V1ValidatingWebhookFluentImpl.MatchConditionsNested editMatchCondition(int index) { - if (matchConditions.size() <= index) throw new RuntimeException("Can't edit matchConditions. Index exceeds size."); - return setNewMatchConditionLike(index, buildMatchCondition(index)); - } - public V1ValidatingWebhookFluentImpl.MatchConditionsNested editFirstMatchCondition() { - if (matchConditions.size() == 0) throw new RuntimeException("Can't edit first matchConditions. The list is empty."); - return setNewMatchConditionLike(0, buildMatchCondition(0)); - } - public V1ValidatingWebhookFluentImpl.MatchConditionsNested editLastMatchCondition() { - int index = matchConditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last matchConditions. The list is empty."); - return setNewMatchConditionLike(index, buildMatchCondition(index)); - } - public V1ValidatingWebhookFluentImpl.MatchConditionsNested editMatchingMatchCondition(Predicate predicate) { - int index = -1; - for (int i=0;i withNewNamespaceSelector() { - return new V1ValidatingWebhookFluentImpl.NamespaceSelectorNestedImpl(); - } - public V1ValidatingWebhookFluentImpl.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { - return new V1ValidatingWebhookFluentImpl.NamespaceSelectorNestedImpl(item); - } - public V1ValidatingWebhookFluentImpl.NamespaceSelectorNested editNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector()); - } - public V1ValidatingWebhookFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): new V1LabelSelectorBuilder().build()); - } - public V1ValidatingWebhookFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): item); - } - - /** - * This method has been deprecated, please use method buildObjectSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getObjectSelector() { - return this.objectSelector!=null ?this.objectSelector.build():null; - } - public V1LabelSelector buildObjectSelector() { - return this.objectSelector!=null ?this.objectSelector.build():null; - } - public A withObjectSelector(V1LabelSelector objectSelector) { - _visitables.get("objectSelector").remove(this.objectSelector); - if (objectSelector!=null){ this.objectSelector= new V1LabelSelectorBuilder(objectSelector); _visitables.get("objectSelector").add(this.objectSelector);} else { this.objectSelector = null; _visitables.get("objectSelector").remove(this.objectSelector); } return (A) this; - } - public Boolean hasObjectSelector() { - return this.objectSelector != null; - } - public V1ValidatingWebhookFluentImpl.ObjectSelectorNested withNewObjectSelector() { - return new V1ValidatingWebhookFluentImpl.ObjectSelectorNestedImpl(); - } - public V1ValidatingWebhookFluentImpl.ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item) { - return new V1ValidatingWebhookFluentImpl.ObjectSelectorNestedImpl(item); - } - public V1ValidatingWebhookFluentImpl.ObjectSelectorNested editObjectSelector() { - return withNewObjectSelectorLike(getObjectSelector()); - } - public V1ValidatingWebhookFluentImpl.ObjectSelectorNested editOrNewObjectSelector() { - return withNewObjectSelectorLike(getObjectSelector() != null ? getObjectSelector(): new V1LabelSelectorBuilder().build()); - } - public V1ValidatingWebhookFluentImpl.ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item) { - return withNewObjectSelectorLike(getObjectSelector() != null ? getObjectSelector(): item); - } - public A addToRules(int index,V1RuleWithOperations item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} - return (A)this; - } - public A setToRules(int index,V1RuleWithOperations item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} - return (A)this; - } - public A addToRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A addAllToRules(Collection items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A removeFromRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... items) { - for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeAllFromRules(Collection items) { - for (V1RuleWithOperations item : items) {V1RuleWithOperationsBuilder builder = new V1RuleWithOperationsBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeMatchingFromRules(Predicate predicate) { - if (rules == null) return (A) this; - final Iterator each = rules.iterator(); - final List visitables = _visitables.get("rules"); - while (each.hasNext()) { - V1RuleWithOperationsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules() { - return rules != null ? build(rules) : null; - } - public List buildRules() { - return rules != null ? build(rules) : null; - } - public V1RuleWithOperations buildRule(int index) { - return this.rules.get(index).build(); - } - public V1RuleWithOperations buildFirstRule() { - return this.rules.get(0).build(); - } - public V1RuleWithOperations buildLastRule() { - return this.rules.get(rules.size() - 1).build(); - } - public V1RuleWithOperations buildMatchingRule(Predicate predicate) { - for (V1RuleWithOperationsBuilder item: rules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRule(Predicate predicate) { - for (V1RuleWithOperationsBuilder item: rules) { if(predicate.test(item)){ return true;} } return false; - } - public A withRules(List rules) { - if (this.rules != null) { _visitables.get("rules").clear();} - if (rules != null) {this.rules = new ArrayList(); for (V1RuleWithOperations item : rules){this.addToRules(item);}} else { this.rules = null;} return (A) this; - } - public A withRules(io.kubernetes.client.openapi.models.V1RuleWithOperations... rules) { - if (this.rules != null) {this.rules.clear(); _visitables.remove("rules"); } - if (rules != null) {for (V1RuleWithOperations item :rules){ this.addToRules(item);}} return (A) this; - } - public Boolean hasRules() { - return rules != null && !rules.isEmpty(); - } - public V1ValidatingWebhookFluentImpl.RulesNested addNewRule() { - return new V1ValidatingWebhookFluentImpl.RulesNestedImpl(); - } - public V1ValidatingWebhookFluentImpl.RulesNested addNewRuleLike(V1RuleWithOperations item) { - return new V1ValidatingWebhookFluentImpl.RulesNestedImpl(-1, item); - } - public V1ValidatingWebhookFluentImpl.RulesNested setNewRuleLike(int index,V1RuleWithOperations item) { - return new V1ValidatingWebhookFluentImpl.RulesNestedImpl(index, item); - } - public V1ValidatingWebhookFluentImpl.RulesNested editRule(int index) { - if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); - return setNewRuleLike(index, buildRule(index)); - } - public V1ValidatingWebhookFluentImpl.RulesNested editFirstRule() { - if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); - return setNewRuleLike(0, buildRule(0)); - } - public V1ValidatingWebhookFluentImpl.RulesNested editLastRule() { - int index = rules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); - return setNewRuleLike(index, buildRule(index)); - } - public V1ValidatingWebhookFluentImpl.RulesNested editMatchingRule(Predicate predicate) { - int index = -1; - for (int i=0;i extends AdmissionregistrationV1WebhookClientConfigFluentImpl> implements V1ValidatingWebhookFluentImpl.ClientConfigNested,Nested{ - ClientConfigNestedImpl(AdmissionregistrationV1WebhookClientConfig item) { - this.builder = new AdmissionregistrationV1WebhookClientConfigBuilder(this, item); - } - ClientConfigNestedImpl() { - this.builder = new AdmissionregistrationV1WebhookClientConfigBuilder(this); - } - AdmissionregistrationV1WebhookClientConfigBuilder builder; - public N and() { - return (N) V1ValidatingWebhookFluentImpl.this.withClientConfig(builder.build()); - } - public N endClientConfig() { - return and(); - } - - } - class MatchConditionsNestedImpl extends V1MatchConditionFluentImpl> implements V1ValidatingWebhookFluentImpl.MatchConditionsNested,Nested{ - MatchConditionsNestedImpl(int index,V1MatchCondition item) { - this.index = index; - this.builder = new V1MatchConditionBuilder(this, item); - } - MatchConditionsNestedImpl() { - this.index = -1; - this.builder = new V1MatchConditionBuilder(this); - } - V1MatchConditionBuilder builder; - int index; - public N and() { - return (N) V1ValidatingWebhookFluentImpl.this.setToMatchConditions(index,builder.build()); - } - public N endMatchCondition() { - return and(); - } - - } - class NamespaceSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1ValidatingWebhookFluentImpl.NamespaceSelectorNested,Nested{ - NamespaceSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - NamespaceSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1ValidatingWebhookFluentImpl.this.withNamespaceSelector(builder.build()); - } - public N endNamespaceSelector() { - return and(); - } - - } - class ObjectSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1ValidatingWebhookFluentImpl.ObjectSelectorNested,Nested{ - ObjectSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - ObjectSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1ValidatingWebhookFluentImpl.this.withObjectSelector(builder.build()); - } - public N endObjectSelector() { - return and(); - } - - } - class RulesNestedImpl extends V1RuleWithOperationsFluentImpl> implements V1ValidatingWebhookFluentImpl.RulesNested,Nested{ - RulesNestedImpl(int index,V1RuleWithOperations item) { - this.index = index; - this.builder = new V1RuleWithOperationsBuilder(this, item); - } - RulesNestedImpl() { - this.index = -1; - this.builder = new V1RuleWithOperationsBuilder(this); - } - V1RuleWithOperationsBuilder builder; - int index; - public N and() { - return (N) V1ValidatingWebhookFluentImpl.this.setToRules(index,builder.build()); - } - public N endRule() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleBuilder.java index 3091e84e8d..63e8e87715 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleBuilder.java @@ -1,52 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1ValidationRuleBuilder extends V1ValidationRuleFluentImpl implements VisitableBuilder{ +public class V1ValidationRuleBuilder extends V1ValidationRuleFluent implements VisitableBuilder{ public V1ValidationRuleBuilder() { - this(false); - } - public V1ValidationRuleBuilder(Boolean validationEnabled) { - this(new V1ValidationRule(), validationEnabled); + this(new V1ValidationRule()); } + public V1ValidationRuleBuilder(V1ValidationRuleFluent fluent) { - this(fluent, false); - } - public V1ValidationRuleBuilder(V1ValidationRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1ValidationRule(), validationEnabled); + this(fluent, new V1ValidationRule()); } + public V1ValidationRuleBuilder(V1ValidationRuleFluent fluent,V1ValidationRule instance) { - this(fluent, instance, false); - } - public V1ValidationRuleBuilder(V1ValidationRuleFluent fluent,V1ValidationRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMessage(instance.getMessage()); - fluent.withMessageExpression(instance.getMessageExpression()); - fluent.withRule(instance.getRule()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1ValidationRuleBuilder(V1ValidationRule instance) { - this(instance,false); - } - public V1ValidationRuleBuilder(V1ValidationRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMessage(instance.getMessage()); - this.withMessageExpression(instance.getMessageExpression()); - this.withRule(instance.getRule()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1ValidationRuleFluent fluent; - Boolean validationEnabled; + public V1ValidationRule build() { V1ValidationRule buildable = new V1ValidationRule(); + buildable.setFieldPath(fluent.getFieldPath()); buildable.setMessage(fluent.getMessage()); buildable.setMessageExpression(fluent.getMessageExpression()); + buildable.setReason(fluent.getReason()); buildable.setRule(fluent.getRule()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleFluent.java index db09e09fdd..f06ba5bbc5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleFluent.java @@ -1,22 +1,131 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1ValidationRuleFluent> extends Fluent{ - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getMessageExpression(); - public A withMessageExpression(String messageExpression); - public Boolean hasMessageExpression(); - public String getRule(); - public A withRule(String rule); - public Boolean hasRule(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1ValidationRuleFluent> extends BaseFluent{ + public V1ValidationRuleFluent() { + } + public V1ValidationRuleFluent(V1ValidationRule instance) { + this.copyInstance(instance); + } + private String fieldPath; + private String message; + private String messageExpression; + private String reason; + private String rule; + + protected void copyInstance(V1ValidationRule instance) { + instance = (instance != null ? instance : new V1ValidationRule()); + if (instance != null) { + this.withFieldPath(instance.getFieldPath()); + this.withMessage(instance.getMessage()); + this.withMessageExpression(instance.getMessageExpression()); + this.withReason(instance.getReason()); + this.withRule(instance.getRule()); + } + } + + public String getFieldPath() { + return this.fieldPath; + } + + public A withFieldPath(String fieldPath) { + this.fieldPath = fieldPath; + return (A) this; + } + + public boolean hasFieldPath() { + return this.fieldPath != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getMessageExpression() { + return this.messageExpression; + } + + public A withMessageExpression(String messageExpression) { + this.messageExpression = messageExpression; + return (A) this; + } + + public boolean hasMessageExpression() { + return this.messageExpression != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getRule() { + return this.rule; + } + + public A withRule(String rule) { + this.rule = rule; + return (A) this; + } + + public boolean hasRule() { + return this.rule != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1ValidationRuleFluent that = (V1ValidationRuleFluent) o; + if (!java.util.Objects.equals(fieldPath, that.fieldPath)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(messageExpression, that.messageExpression)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(rule, that.rule)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fieldPath, message, messageExpression, reason, rule, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fieldPath != null) { sb.append("fieldPath:"); sb.append(fieldPath + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (messageExpression != null) { sb.append("messageExpression:"); sb.append(messageExpression + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (rule != null) { sb.append("rule:"); sb.append(rule); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleFluentImpl.java deleted file mode 100644 index c1fa0ab4cb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1ValidationRuleFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1ValidationRuleFluentImpl> extends BaseFluent implements V1ValidationRuleFluent{ - public V1ValidationRuleFluentImpl() { - } - public V1ValidationRuleFluentImpl(V1ValidationRule instance) { - if (instance != null) { - this.withMessage(instance.getMessage()); - this.withMessageExpression(instance.getMessageExpression()); - this.withRule(instance.getRule()); - } - } - private String message; - private String messageExpression; - private String rule; - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getMessageExpression() { - return this.messageExpression; - } - public A withMessageExpression(String messageExpression) { - this.messageExpression=messageExpression; return (A) this; - } - public Boolean hasMessageExpression() { - return this.messageExpression != null; - } - public String getRule() { - return this.rule; - } - public A withRule(String rule) { - this.rule=rule; return (A) this; - } - public Boolean hasRule() { - return this.rule != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1ValidationRuleFluentImpl that = (V1ValidationRuleFluentImpl) o; - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(messageExpression, that.messageExpression)) return false; - - if (!java.util.Objects.equals(rule, that.rule)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(message, messageExpression, rule, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (messageExpression != null) { sb.append("messageExpression:"); sb.append(messageExpression + ","); } - if (rule != null) { sb.append("rule:"); sb.append(rule); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentBuilder.java index 9e5338dd26..35c970c661 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeAttachmentBuilder extends V1VolumeAttachmentFluentImpl implements VisitableBuilder{ +public class V1VolumeAttachmentBuilder extends V1VolumeAttachmentFluent implements VisitableBuilder{ public V1VolumeAttachmentBuilder() { - this(false); - } - public V1VolumeAttachmentBuilder(Boolean validationEnabled) { - this(new V1VolumeAttachment(), validationEnabled); + this(new V1VolumeAttachment()); } + public V1VolumeAttachmentBuilder(V1VolumeAttachmentFluent fluent) { - this(fluent, false); - } - public V1VolumeAttachmentBuilder(V1VolumeAttachmentFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeAttachment(), validationEnabled); + this(fluent, new V1VolumeAttachment()); } + public V1VolumeAttachmentBuilder(V1VolumeAttachmentFluent fluent,V1VolumeAttachment instance) { - this(fluent, instance, false); - } - public V1VolumeAttachmentBuilder(V1VolumeAttachmentFluent fluent,V1VolumeAttachment instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeAttachmentBuilder(V1VolumeAttachment instance) { - this(instance,false); - } - public V1VolumeAttachmentBuilder(V1VolumeAttachment instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeAttachmentFluent fluent; - Boolean validationEnabled; + public V1VolumeAttachment build() { V1VolumeAttachment buildable = new V1VolumeAttachment(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentFluent.java index 0f23db6982..20a0865a89 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1VolumeAttachmentFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1VolumeAttachmentFluent.MetadataNested withNewMetadata(); - public V1VolumeAttachmentFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1VolumeAttachmentFluent.MetadataNested editMetadata(); - public V1VolumeAttachmentFluent.MetadataNested editOrNewMetadata(); - public V1VolumeAttachmentFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeAttachmentSpec getSpec(); - public V1VolumeAttachmentSpec buildSpec(); - public A withSpec(V1VolumeAttachmentSpec spec); - public Boolean hasSpec(); - public V1VolumeAttachmentFluent.SpecNested withNewSpec(); - public V1VolumeAttachmentFluent.SpecNested withNewSpecLike(V1VolumeAttachmentSpec item); - public V1VolumeAttachmentFluent.SpecNested editSpec(); - public V1VolumeAttachmentFluent.SpecNested editOrNewSpec(); - public V1VolumeAttachmentFluent.SpecNested editOrNewSpecLike(V1VolumeAttachmentSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeAttachmentStatus getStatus(); - public V1VolumeAttachmentStatus buildStatus(); - public A withStatus(V1VolumeAttachmentStatus status); - public Boolean hasStatus(); - public V1VolumeAttachmentFluent.StatusNested withNewStatus(); - public V1VolumeAttachmentFluent.StatusNested withNewStatusLike(V1VolumeAttachmentStatus item); - public V1VolumeAttachmentFluent.StatusNested editStatus(); - public V1VolumeAttachmentFluent.StatusNested editOrNewStatus(); - public V1VolumeAttachmentFluent.StatusNested editOrNewStatusLike(V1VolumeAttachmentStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeAttachmentFluent> extends BaseFluent{ + public V1VolumeAttachmentFluent() { + } + + public V1VolumeAttachmentFluent(V1VolumeAttachment instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1VolumeAttachmentSpecBuilder spec; + private V1VolumeAttachmentStatusBuilder status; + + protected void copyInstance(V1VolumeAttachment instance) { + instance = (instance != null ? instance : new V1VolumeAttachment()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1VolumeAttachmentSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1VolumeAttachmentSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1VolumeAttachmentSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1VolumeAttachmentSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1VolumeAttachmentSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1VolumeAttachmentSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1VolumeAttachmentSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1VolumeAttachmentStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1VolumeAttachmentStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1VolumeAttachmentStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1VolumeAttachmentStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1VolumeAttachmentStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1VolumeAttachmentStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeAttachmentFluent that = (V1VolumeAttachmentFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1VolumeAttachmentFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1VolumeAttachmentStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1VolumeAttachmentSpecFluent> implements Nested{ + SpecNested(V1VolumeAttachmentSpec item) { + this.builder = new V1VolumeAttachmentSpecBuilder(this, item); + } + V1VolumeAttachmentSpecBuilder builder; + + public N and() { + return (N) V1VolumeAttachmentFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1VolumeAttachmentStatusFluent> implements Nested{ + StatusNested(V1VolumeAttachmentStatus item) { + this.builder = new V1VolumeAttachmentStatusBuilder(this, item); + } + V1VolumeAttachmentStatusBuilder builder; + + public N and() { + return (N) V1VolumeAttachmentFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentFluentImpl.java deleted file mode 100644 index e37095863e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeAttachmentFluentImpl> extends BaseFluent implements V1VolumeAttachmentFluent{ - public V1VolumeAttachmentFluentImpl() { - } - public V1VolumeAttachmentFluentImpl(V1VolumeAttachment instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1VolumeAttachmentSpecBuilder spec; - private V1VolumeAttachmentStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1VolumeAttachmentFluentImpl.MetadataNested withNewMetadata() { - return new V1VolumeAttachmentFluentImpl.MetadataNestedImpl(); - } - public V1VolumeAttachmentFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1VolumeAttachmentFluentImpl.MetadataNestedImpl(item); - } - public V1VolumeAttachmentFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1VolumeAttachmentFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1VolumeAttachmentFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeAttachmentSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1VolumeAttachmentSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1VolumeAttachmentSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1VolumeAttachmentSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1VolumeAttachmentFluentImpl.SpecNested withNewSpec() { - return new V1VolumeAttachmentFluentImpl.SpecNestedImpl(); - } - public V1VolumeAttachmentFluentImpl.SpecNested withNewSpecLike(V1VolumeAttachmentSpec item) { - return new V1VolumeAttachmentFluentImpl.SpecNestedImpl(item); - } - public V1VolumeAttachmentFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1VolumeAttachmentFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1VolumeAttachmentSpecBuilder().build()); - } - public V1VolumeAttachmentFluentImpl.SpecNested editOrNewSpecLike(V1VolumeAttachmentSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeAttachmentStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1VolumeAttachmentStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1VolumeAttachmentStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1VolumeAttachmentStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1VolumeAttachmentFluentImpl.StatusNested withNewStatus() { - return new V1VolumeAttachmentFluentImpl.StatusNestedImpl(); - } - public V1VolumeAttachmentFluentImpl.StatusNested withNewStatusLike(V1VolumeAttachmentStatus item) { - return new V1VolumeAttachmentFluentImpl.StatusNestedImpl(item); - } - public V1VolumeAttachmentFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1VolumeAttachmentFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1VolumeAttachmentStatusBuilder().build()); - } - public V1VolumeAttachmentFluentImpl.StatusNested editOrNewStatusLike(V1VolumeAttachmentStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeAttachmentFluentImpl that = (V1VolumeAttachmentFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1VolumeAttachmentFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1VolumeAttachmentFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1VolumeAttachmentSpecFluentImpl> implements V1VolumeAttachmentFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1VolumeAttachmentSpec item) { - this.builder = new V1VolumeAttachmentSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1VolumeAttachmentSpecBuilder(this); - } - V1VolumeAttachmentSpecBuilder builder; - public N and() { - return (N) V1VolumeAttachmentFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1VolumeAttachmentStatusFluentImpl> implements V1VolumeAttachmentFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1VolumeAttachmentStatus item) { - this.builder = new V1VolumeAttachmentStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1VolumeAttachmentStatusBuilder(this); - } - V1VolumeAttachmentStatusBuilder builder; - public N and() { - return (N) V1VolumeAttachmentFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListBuilder.java index 05fd9ef057..b7b2ba6861 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeAttachmentListBuilder extends V1VolumeAttachmentListFluentImpl implements VisitableBuilder{ +public class V1VolumeAttachmentListBuilder extends V1VolumeAttachmentListFluent implements VisitableBuilder{ public V1VolumeAttachmentListBuilder() { - this(false); - } - public V1VolumeAttachmentListBuilder(Boolean validationEnabled) { - this(new V1VolumeAttachmentList(), validationEnabled); + this(new V1VolumeAttachmentList()); } + public V1VolumeAttachmentListBuilder(V1VolumeAttachmentListFluent fluent) { - this(fluent, false); - } - public V1VolumeAttachmentListBuilder(V1VolumeAttachmentListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeAttachmentList(), validationEnabled); + this(fluent, new V1VolumeAttachmentList()); } + public V1VolumeAttachmentListBuilder(V1VolumeAttachmentListFluent fluent,V1VolumeAttachmentList instance) { - this(fluent, instance, false); - } - public V1VolumeAttachmentListBuilder(V1VolumeAttachmentListFluent fluent,V1VolumeAttachmentList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeAttachmentListBuilder(V1VolumeAttachmentList instance) { - this(instance,false); - } - public V1VolumeAttachmentListBuilder(V1VolumeAttachmentList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeAttachmentListFluent fluent; - Boolean validationEnabled; + public V1VolumeAttachmentList build() { V1VolumeAttachmentList buildable = new V1VolumeAttachmentList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListFluent.java index 77db7db7ee..d79ccb92fa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1VolumeAttachmentListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1VolumeAttachment item); - public A setToItems(int index,V1VolumeAttachment item); - public A addToItems(io.kubernetes.client.openapi.models.V1VolumeAttachment... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1VolumeAttachment... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1VolumeAttachment buildItem(int index); - public V1VolumeAttachment buildFirstItem(); - public V1VolumeAttachment buildLastItem(); - public V1VolumeAttachment buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1VolumeAttachment... items); - public Boolean hasItems(); - public V1VolumeAttachmentListFluent.ItemsNested addNewItem(); - public V1VolumeAttachmentListFluent.ItemsNested addNewItemLike(V1VolumeAttachment item); - public V1VolumeAttachmentListFluent.ItemsNested setNewItemLike(int index,V1VolumeAttachment item); - public V1VolumeAttachmentListFluent.ItemsNested editItem(int index); - public V1VolumeAttachmentListFluent.ItemsNested editFirstItem(); - public V1VolumeAttachmentListFluent.ItemsNested editLastItem(); - public V1VolumeAttachmentListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1VolumeAttachmentListFluent.MetadataNested withNewMetadata(); - public V1VolumeAttachmentListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1VolumeAttachmentListFluent.MetadataNested editMetadata(); - public V1VolumeAttachmentListFluent.MetadataNested editOrNewMetadata(); - public V1VolumeAttachmentListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1VolumeAttachmentFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeAttachmentListFluent> extends BaseFluent{ + public V1VolumeAttachmentListFluent() { + } + + public V1VolumeAttachmentListFluent(V1VolumeAttachmentList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1VolumeAttachmentList instance) { + instance = (instance != null ? instance : new V1VolumeAttachmentList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1VolumeAttachment item) { + if (this.items == null) {this.items = new ArrayList();} + V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1VolumeAttachment item) { + if (this.items == null) {this.items = new ArrayList();} + V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1VolumeAttachment... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1VolumeAttachment item : items) {V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1VolumeAttachment item : items) {V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1VolumeAttachment... items) { + if (this.items == null) return (A)this; + for (V1VolumeAttachment item : items) {V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1VolumeAttachment item : items) {V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1VolumeAttachmentBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1VolumeAttachment buildItem(int index) { + return this.items.get(index).build(); + } + + public V1VolumeAttachment buildFirstItem() { + return this.items.get(0).build(); + } + + public V1VolumeAttachment buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1VolumeAttachment buildMatchingItem(Predicate predicate) { + for (V1VolumeAttachmentBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1VolumeAttachmentBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1VolumeAttachment item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1VolumeAttachment... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1VolumeAttachment item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1VolumeAttachment item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1VolumeAttachment item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeAttachmentListFluent that = (V1VolumeAttachmentListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1VolumeAttachmentFluent> implements Nested{ + ItemsNested(int index,V1VolumeAttachment item) { + this.index = index; + this.builder = new V1VolumeAttachmentBuilder(this, item); + } + V1VolumeAttachmentBuilder builder; + int index; + public N and() { + return (N) V1VolumeAttachmentListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1VolumeAttachmentListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListFluentImpl.java deleted file mode 100644 index deb51616e3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeAttachmentListFluentImpl> extends BaseFluent implements V1VolumeAttachmentListFluent{ - public V1VolumeAttachmentListFluentImpl() { - } - public V1VolumeAttachmentListFluentImpl(V1VolumeAttachmentList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1VolumeAttachment item) { - if (this.items == null) {this.items = new ArrayList();} - V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1VolumeAttachment item) { - if (this.items == null) {this.items = new ArrayList();} - V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1VolumeAttachment... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1VolumeAttachment item : items) {V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1VolumeAttachment item : items) {V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1VolumeAttachment... items) { - for (V1VolumeAttachment item : items) {V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1VolumeAttachment item : items) {V1VolumeAttachmentBuilder builder = new V1VolumeAttachmentBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1VolumeAttachmentBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1VolumeAttachment buildItem(int index) { - return this.items.get(index).build(); - } - public V1VolumeAttachment buildFirstItem() { - return this.items.get(0).build(); - } - public V1VolumeAttachment buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1VolumeAttachment buildMatchingItem(Predicate predicate) { - for (V1VolumeAttachmentBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1VolumeAttachmentBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1VolumeAttachment item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1VolumeAttachment... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1VolumeAttachment item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1VolumeAttachmentListFluentImpl.ItemsNested addNewItem() { - return new V1VolumeAttachmentListFluentImpl.ItemsNestedImpl(); - } - public V1VolumeAttachmentListFluentImpl.ItemsNested addNewItemLike(V1VolumeAttachment item) { - return new V1VolumeAttachmentListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1VolumeAttachmentListFluentImpl.ItemsNested setNewItemLike(int index,V1VolumeAttachment item) { - return new V1VolumeAttachmentListFluentImpl.ItemsNestedImpl(index, item); - } - public V1VolumeAttachmentListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1VolumeAttachmentListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1VolumeAttachmentListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1VolumeAttachmentListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1VolumeAttachmentListFluentImpl.MetadataNestedImpl(); - } - public V1VolumeAttachmentListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1VolumeAttachmentListFluentImpl.MetadataNestedImpl(item); - } - public V1VolumeAttachmentListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1VolumeAttachmentListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1VolumeAttachmentListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeAttachmentListFluentImpl that = (V1VolumeAttachmentListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1VolumeAttachmentFluentImpl> implements V1VolumeAttachmentListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1VolumeAttachment item) { - this.index = index; - this.builder = new V1VolumeAttachmentBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1VolumeAttachmentBuilder(this); - } - V1VolumeAttachmentBuilder builder; - int index; - public N and() { - return (N) V1VolumeAttachmentListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1VolumeAttachmentListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1VolumeAttachmentListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceBuilder.java index 1a994aaa3c..12d76d24d5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeAttachmentSourceBuilder extends V1VolumeAttachmentSourceFluentImpl implements VisitableBuilder{ +public class V1VolumeAttachmentSourceBuilder extends V1VolumeAttachmentSourceFluent implements VisitableBuilder{ public V1VolumeAttachmentSourceBuilder() { - this(false); - } - public V1VolumeAttachmentSourceBuilder(Boolean validationEnabled) { - this(new V1VolumeAttachmentSource(), validationEnabled); + this(new V1VolumeAttachmentSource()); } + public V1VolumeAttachmentSourceBuilder(V1VolumeAttachmentSourceFluent fluent) { - this(fluent, false); - } - public V1VolumeAttachmentSourceBuilder(V1VolumeAttachmentSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeAttachmentSource(), validationEnabled); + this(fluent, new V1VolumeAttachmentSource()); } + public V1VolumeAttachmentSourceBuilder(V1VolumeAttachmentSourceFluent fluent,V1VolumeAttachmentSource instance) { - this(fluent, instance, false); - } - public V1VolumeAttachmentSourceBuilder(V1VolumeAttachmentSourceFluent fluent,V1VolumeAttachmentSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withInlineVolumeSpec(instance.getInlineVolumeSpec()); - fluent.withPersistentVolumeName(instance.getPersistentVolumeName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeAttachmentSourceBuilder(V1VolumeAttachmentSource instance) { - this(instance,false); - } - public V1VolumeAttachmentSourceBuilder(V1VolumeAttachmentSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withInlineVolumeSpec(instance.getInlineVolumeSpec()); - this.withPersistentVolumeName(instance.getPersistentVolumeName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeAttachmentSourceFluent fluent; - Boolean validationEnabled; + public V1VolumeAttachmentSource build() { V1VolumeAttachmentSource buildable = new V1VolumeAttachmentSource(); - buildable.setInlineVolumeSpec(fluent.getInlineVolumeSpec()); + buildable.setInlineVolumeSpec(fluent.buildInlineVolumeSpec()); buildable.setPersistentVolumeName(fluent.getPersistentVolumeName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceFluent.java index 229cab23f5..d67efbaa57 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1VolumeAttachmentSourceFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildInlineVolumeSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeSpec getInlineVolumeSpec(); - public V1PersistentVolumeSpec buildInlineVolumeSpec(); - public A withInlineVolumeSpec(V1PersistentVolumeSpec inlineVolumeSpec); - public Boolean hasInlineVolumeSpec(); - public V1VolumeAttachmentSourceFluent.InlineVolumeSpecNested withNewInlineVolumeSpec(); - public V1VolumeAttachmentSourceFluent.InlineVolumeSpecNested withNewInlineVolumeSpecLike(V1PersistentVolumeSpec item); - public V1VolumeAttachmentSourceFluent.InlineVolumeSpecNested editInlineVolumeSpec(); - public V1VolumeAttachmentSourceFluent.InlineVolumeSpecNested editOrNewInlineVolumeSpec(); - public V1VolumeAttachmentSourceFluent.InlineVolumeSpecNested editOrNewInlineVolumeSpecLike(V1PersistentVolumeSpec item); - public String getPersistentVolumeName(); - public A withPersistentVolumeName(String persistentVolumeName); - public Boolean hasPersistentVolumeName(); - public interface InlineVolumeSpecNested extends Nested,V1PersistentVolumeSpecFluent>{ - public N and(); - public N endInlineVolumeSpec(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeAttachmentSourceFluent> extends BaseFluent{ + public V1VolumeAttachmentSourceFluent() { + } + + public V1VolumeAttachmentSourceFluent(V1VolumeAttachmentSource instance) { + this.copyInstance(instance); + } + private V1PersistentVolumeSpecBuilder inlineVolumeSpec; + private String persistentVolumeName; + + protected void copyInstance(V1VolumeAttachmentSource instance) { + instance = (instance != null ? instance : new V1VolumeAttachmentSource()); + if (instance != null) { + this.withInlineVolumeSpec(instance.getInlineVolumeSpec()); + this.withPersistentVolumeName(instance.getPersistentVolumeName()); + } + } + + public V1PersistentVolumeSpec buildInlineVolumeSpec() { + return this.inlineVolumeSpec != null ? this.inlineVolumeSpec.build() : null; + } + + public A withInlineVolumeSpec(V1PersistentVolumeSpec inlineVolumeSpec) { + this._visitables.remove("inlineVolumeSpec"); + if (inlineVolumeSpec != null) { + this.inlineVolumeSpec = new V1PersistentVolumeSpecBuilder(inlineVolumeSpec); + this._visitables.get("inlineVolumeSpec").add(this.inlineVolumeSpec); + } else { + this.inlineVolumeSpec = null; + this._visitables.get("inlineVolumeSpec").remove(this.inlineVolumeSpec); + } + return (A) this; + } + + public boolean hasInlineVolumeSpec() { + return this.inlineVolumeSpec != null; + } + + public InlineVolumeSpecNested withNewInlineVolumeSpec() { + return new InlineVolumeSpecNested(null); + } + + public InlineVolumeSpecNested withNewInlineVolumeSpecLike(V1PersistentVolumeSpec item) { + return new InlineVolumeSpecNested(item); + } + + public InlineVolumeSpecNested editInlineVolumeSpec() { + return withNewInlineVolumeSpecLike(java.util.Optional.ofNullable(buildInlineVolumeSpec()).orElse(null)); + } + + public InlineVolumeSpecNested editOrNewInlineVolumeSpec() { + return withNewInlineVolumeSpecLike(java.util.Optional.ofNullable(buildInlineVolumeSpec()).orElse(new V1PersistentVolumeSpecBuilder().build())); } + public InlineVolumeSpecNested editOrNewInlineVolumeSpecLike(V1PersistentVolumeSpec item) { + return withNewInlineVolumeSpecLike(java.util.Optional.ofNullable(buildInlineVolumeSpec()).orElse(item)); + } + + public String getPersistentVolumeName() { + return this.persistentVolumeName; + } + + public A withPersistentVolumeName(String persistentVolumeName) { + this.persistentVolumeName = persistentVolumeName; + return (A) this; + } + + public boolean hasPersistentVolumeName() { + return this.persistentVolumeName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeAttachmentSourceFluent that = (V1VolumeAttachmentSourceFluent) o; + if (!java.util.Objects.equals(inlineVolumeSpec, that.inlineVolumeSpec)) return false; + if (!java.util.Objects.equals(persistentVolumeName, that.persistentVolumeName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(inlineVolumeSpec, persistentVolumeName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (inlineVolumeSpec != null) { sb.append("inlineVolumeSpec:"); sb.append(inlineVolumeSpec + ","); } + if (persistentVolumeName != null) { sb.append("persistentVolumeName:"); sb.append(persistentVolumeName); } + sb.append("}"); + return sb.toString(); + } + public class InlineVolumeSpecNested extends V1PersistentVolumeSpecFluent> implements Nested{ + InlineVolumeSpecNested(V1PersistentVolumeSpec item) { + this.builder = new V1PersistentVolumeSpecBuilder(this, item); + } + V1PersistentVolumeSpecBuilder builder; + + public N and() { + return (N) V1VolumeAttachmentSourceFluent.this.withInlineVolumeSpec(builder.build()); + } + + public N endInlineVolumeSpec() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceFluentImpl.java deleted file mode 100644 index ae0ca88c81..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSourceFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeAttachmentSourceFluentImpl> extends BaseFluent implements V1VolumeAttachmentSourceFluent{ - public V1VolumeAttachmentSourceFluentImpl() { - } - public V1VolumeAttachmentSourceFluentImpl(V1VolumeAttachmentSource instance) { - if (instance != null) { - this.withInlineVolumeSpec(instance.getInlineVolumeSpec()); - this.withPersistentVolumeName(instance.getPersistentVolumeName()); - } - } - private V1PersistentVolumeSpecBuilder inlineVolumeSpec; - private String persistentVolumeName; - - /** - * This method has been deprecated, please use method buildInlineVolumeSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeSpec getInlineVolumeSpec() { - return this.inlineVolumeSpec!=null ?this.inlineVolumeSpec.build():null; - } - public V1PersistentVolumeSpec buildInlineVolumeSpec() { - return this.inlineVolumeSpec!=null ?this.inlineVolumeSpec.build():null; - } - public A withInlineVolumeSpec(V1PersistentVolumeSpec inlineVolumeSpec) { - _visitables.get("inlineVolumeSpec").remove(this.inlineVolumeSpec); - if (inlineVolumeSpec!=null){ this.inlineVolumeSpec= new V1PersistentVolumeSpecBuilder(inlineVolumeSpec); _visitables.get("inlineVolumeSpec").add(this.inlineVolumeSpec);} else { this.inlineVolumeSpec = null; _visitables.get("inlineVolumeSpec").remove(this.inlineVolumeSpec); } return (A) this; - } - public Boolean hasInlineVolumeSpec() { - return this.inlineVolumeSpec != null; - } - public V1VolumeAttachmentSourceFluentImpl.InlineVolumeSpecNested withNewInlineVolumeSpec() { - return new V1VolumeAttachmentSourceFluentImpl.InlineVolumeSpecNestedImpl(); - } - public V1VolumeAttachmentSourceFluentImpl.InlineVolumeSpecNested withNewInlineVolumeSpecLike(V1PersistentVolumeSpec item) { - return new V1VolumeAttachmentSourceFluentImpl.InlineVolumeSpecNestedImpl(item); - } - public V1VolumeAttachmentSourceFluentImpl.InlineVolumeSpecNested editInlineVolumeSpec() { - return withNewInlineVolumeSpecLike(getInlineVolumeSpec()); - } - public V1VolumeAttachmentSourceFluentImpl.InlineVolumeSpecNested editOrNewInlineVolumeSpec() { - return withNewInlineVolumeSpecLike(getInlineVolumeSpec() != null ? getInlineVolumeSpec(): new V1PersistentVolumeSpecBuilder().build()); - } - public V1VolumeAttachmentSourceFluentImpl.InlineVolumeSpecNested editOrNewInlineVolumeSpecLike(V1PersistentVolumeSpec item) { - return withNewInlineVolumeSpecLike(getInlineVolumeSpec() != null ? getInlineVolumeSpec(): item); - } - public String getPersistentVolumeName() { - return this.persistentVolumeName; - } - public A withPersistentVolumeName(String persistentVolumeName) { - this.persistentVolumeName=persistentVolumeName; return (A) this; - } - public Boolean hasPersistentVolumeName() { - return this.persistentVolumeName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeAttachmentSourceFluentImpl that = (V1VolumeAttachmentSourceFluentImpl) o; - if (!java.util.Objects.equals(inlineVolumeSpec, that.inlineVolumeSpec)) return false; - - if (!java.util.Objects.equals(persistentVolumeName, that.persistentVolumeName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(inlineVolumeSpec, persistentVolumeName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (inlineVolumeSpec != null) { sb.append("inlineVolumeSpec:"); sb.append(inlineVolumeSpec + ","); } - if (persistentVolumeName != null) { sb.append("persistentVolumeName:"); sb.append(persistentVolumeName); } - sb.append("}"); - return sb.toString(); - } - class InlineVolumeSpecNestedImpl extends V1PersistentVolumeSpecFluentImpl> implements V1VolumeAttachmentSourceFluentImpl.InlineVolumeSpecNested,Nested{ - InlineVolumeSpecNestedImpl(V1PersistentVolumeSpec item) { - this.builder = new V1PersistentVolumeSpecBuilder(this, item); - } - InlineVolumeSpecNestedImpl() { - this.builder = new V1PersistentVolumeSpecBuilder(this); - } - V1PersistentVolumeSpecBuilder builder; - public N and() { - return (N) V1VolumeAttachmentSourceFluentImpl.this.withInlineVolumeSpec(builder.build()); - } - public N endInlineVolumeSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecBuilder.java index d8f05f956e..7197b4c7be 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeAttachmentSpecBuilder extends V1VolumeAttachmentSpecFluentImpl implements VisitableBuilder{ +public class V1VolumeAttachmentSpecBuilder extends V1VolumeAttachmentSpecFluent implements VisitableBuilder{ public V1VolumeAttachmentSpecBuilder() { - this(false); - } - public V1VolumeAttachmentSpecBuilder(Boolean validationEnabled) { - this(new V1VolumeAttachmentSpec(), validationEnabled); + this(new V1VolumeAttachmentSpec()); } + public V1VolumeAttachmentSpecBuilder(V1VolumeAttachmentSpecFluent fluent) { - this(fluent, false); - } - public V1VolumeAttachmentSpecBuilder(V1VolumeAttachmentSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeAttachmentSpec(), validationEnabled); + this(fluent, new V1VolumeAttachmentSpec()); } + public V1VolumeAttachmentSpecBuilder(V1VolumeAttachmentSpecFluent fluent,V1VolumeAttachmentSpec instance) { - this(fluent, instance, false); - } - public V1VolumeAttachmentSpecBuilder(V1VolumeAttachmentSpecFluent fluent,V1VolumeAttachmentSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAttacher(instance.getAttacher()); - fluent.withNodeName(instance.getNodeName()); - fluent.withSource(instance.getSource()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeAttachmentSpecBuilder(V1VolumeAttachmentSpec instance) { - this(instance,false); - } - public V1VolumeAttachmentSpecBuilder(V1VolumeAttachmentSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAttacher(instance.getAttacher()); - this.withNodeName(instance.getNodeName()); - this.withSource(instance.getSource()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeAttachmentSpecFluent fluent; - Boolean validationEnabled; + public V1VolumeAttachmentSpec build() { V1VolumeAttachmentSpec buildable = new V1VolumeAttachmentSpec(); buildable.setAttacher(fluent.getAttacher()); buildable.setNodeName(fluent.getNodeName()); - buildable.setSource(fluent.getSource()); + buildable.setSource(fluent.buildSource()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecFluent.java index 11b4a30bf9..d8da50566d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecFluent.java @@ -1,41 +1,140 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1VolumeAttachmentSpecFluent> extends Fluent{ - public String getAttacher(); - public A withAttacher(String attacher); - public Boolean hasAttacher(); - public String getNodeName(); - public A withNodeName(String nodeName); - public Boolean hasNodeName(); - - /** - * This method has been deprecated, please use method buildSource instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeAttachmentSource getSource(); - public V1VolumeAttachmentSource buildSource(); - public A withSource(V1VolumeAttachmentSource source); - public Boolean hasSource(); - public V1VolumeAttachmentSpecFluent.SourceNested withNewSource(); - public V1VolumeAttachmentSpecFluent.SourceNested withNewSourceLike(V1VolumeAttachmentSource item); - public V1VolumeAttachmentSpecFluent.SourceNested editSource(); - public V1VolumeAttachmentSpecFluent.SourceNested editOrNewSource(); - public V1VolumeAttachmentSpecFluent.SourceNested editOrNewSourceLike(V1VolumeAttachmentSource item); - public interface SourceNested extends Nested,V1VolumeAttachmentSourceFluent>{ - public N and(); - public N endSource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeAttachmentSpecFluent> extends BaseFluent{ + public V1VolumeAttachmentSpecFluent() { + } + + public V1VolumeAttachmentSpecFluent(V1VolumeAttachmentSpec instance) { + this.copyInstance(instance); + } + private String attacher; + private String nodeName; + private V1VolumeAttachmentSourceBuilder source; + + protected void copyInstance(V1VolumeAttachmentSpec instance) { + instance = (instance != null ? instance : new V1VolumeAttachmentSpec()); + if (instance != null) { + this.withAttacher(instance.getAttacher()); + this.withNodeName(instance.getNodeName()); + this.withSource(instance.getSource()); + } + } + + public String getAttacher() { + return this.attacher; + } + + public A withAttacher(String attacher) { + this.attacher = attacher; + return (A) this; + } + + public boolean hasAttacher() { + return this.attacher != null; + } + + public String getNodeName() { + return this.nodeName; + } + + public A withNodeName(String nodeName) { + this.nodeName = nodeName; + return (A) this; + } + + public boolean hasNodeName() { + return this.nodeName != null; + } + + public V1VolumeAttachmentSource buildSource() { + return this.source != null ? this.source.build() : null; + } + + public A withSource(V1VolumeAttachmentSource source) { + this._visitables.remove("source"); + if (source != null) { + this.source = new V1VolumeAttachmentSourceBuilder(source); + this._visitables.get("source").add(this.source); + } else { + this.source = null; + this._visitables.get("source").remove(this.source); + } + return (A) this; + } + + public boolean hasSource() { + return this.source != null; + } + + public SourceNested withNewSource() { + return new SourceNested(null); + } + + public SourceNested withNewSourceLike(V1VolumeAttachmentSource item) { + return new SourceNested(item); + } + + public SourceNested editSource() { + return withNewSourceLike(java.util.Optional.ofNullable(buildSource()).orElse(null)); + } + + public SourceNested editOrNewSource() { + return withNewSourceLike(java.util.Optional.ofNullable(buildSource()).orElse(new V1VolumeAttachmentSourceBuilder().build())); + } + + public SourceNested editOrNewSourceLike(V1VolumeAttachmentSource item) { + return withNewSourceLike(java.util.Optional.ofNullable(buildSource()).orElse(item)); } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeAttachmentSpecFluent that = (V1VolumeAttachmentSpecFluent) o; + if (!java.util.Objects.equals(attacher, that.attacher)) return false; + if (!java.util.Objects.equals(nodeName, that.nodeName)) return false; + if (!java.util.Objects.equals(source, that.source)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(attacher, nodeName, source, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (attacher != null) { sb.append("attacher:"); sb.append(attacher + ","); } + if (nodeName != null) { sb.append("nodeName:"); sb.append(nodeName + ","); } + if (source != null) { sb.append("source:"); sb.append(source); } + sb.append("}"); + return sb.toString(); + } + public class SourceNested extends V1VolumeAttachmentSourceFluent> implements Nested{ + SourceNested(V1VolumeAttachmentSource item) { + this.builder = new V1VolumeAttachmentSourceBuilder(this, item); + } + V1VolumeAttachmentSourceBuilder builder; + + public N and() { + return (N) V1VolumeAttachmentSpecFluent.this.withSource(builder.build()); + } + + public N endSource() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecFluentImpl.java deleted file mode 100644 index cef584df76..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentSpecFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeAttachmentSpecFluentImpl> extends BaseFluent implements V1VolumeAttachmentSpecFluent{ - public V1VolumeAttachmentSpecFluentImpl() { - } - public V1VolumeAttachmentSpecFluentImpl(V1VolumeAttachmentSpec instance) { - if (instance != null) { - this.withAttacher(instance.getAttacher()); - this.withNodeName(instance.getNodeName()); - this.withSource(instance.getSource()); - } - } - private String attacher; - private String nodeName; - private V1VolumeAttachmentSourceBuilder source; - public String getAttacher() { - return this.attacher; - } - public A withAttacher(String attacher) { - this.attacher=attacher; return (A) this; - } - public Boolean hasAttacher() { - return this.attacher != null; - } - public String getNodeName() { - return this.nodeName; - } - public A withNodeName(String nodeName) { - this.nodeName=nodeName; return (A) this; - } - public Boolean hasNodeName() { - return this.nodeName != null; - } - - /** - * This method has been deprecated, please use method buildSource instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeAttachmentSource getSource() { - return this.source!=null ?this.source.build():null; - } - public V1VolumeAttachmentSource buildSource() { - return this.source!=null ?this.source.build():null; - } - public A withSource(V1VolumeAttachmentSource source) { - _visitables.get("source").remove(this.source); - if (source!=null){ this.source= new V1VolumeAttachmentSourceBuilder(source); _visitables.get("source").add(this.source);} else { this.source = null; _visitables.get("source").remove(this.source); } return (A) this; - } - public Boolean hasSource() { - return this.source != null; - } - public V1VolumeAttachmentSpecFluentImpl.SourceNested withNewSource() { - return new V1VolumeAttachmentSpecFluentImpl.SourceNestedImpl(); - } - public V1VolumeAttachmentSpecFluentImpl.SourceNested withNewSourceLike(V1VolumeAttachmentSource item) { - return new V1VolumeAttachmentSpecFluentImpl.SourceNestedImpl(item); - } - public V1VolumeAttachmentSpecFluentImpl.SourceNested editSource() { - return withNewSourceLike(getSource()); - } - public V1VolumeAttachmentSpecFluentImpl.SourceNested editOrNewSource() { - return withNewSourceLike(getSource() != null ? getSource(): new V1VolumeAttachmentSourceBuilder().build()); - } - public V1VolumeAttachmentSpecFluentImpl.SourceNested editOrNewSourceLike(V1VolumeAttachmentSource item) { - return withNewSourceLike(getSource() != null ? getSource(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeAttachmentSpecFluentImpl that = (V1VolumeAttachmentSpecFluentImpl) o; - if (!java.util.Objects.equals(attacher, that.attacher)) return false; - - if (!java.util.Objects.equals(nodeName, that.nodeName)) return false; - - if (!java.util.Objects.equals(source, that.source)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(attacher, nodeName, source, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (attacher != null) { sb.append("attacher:"); sb.append(attacher + ","); } - if (nodeName != null) { sb.append("nodeName:"); sb.append(nodeName + ","); } - if (source != null) { sb.append("source:"); sb.append(source); } - sb.append("}"); - return sb.toString(); - } - class SourceNestedImpl extends V1VolumeAttachmentSourceFluentImpl> implements V1VolumeAttachmentSpecFluentImpl.SourceNested,Nested{ - SourceNestedImpl(V1VolumeAttachmentSource item) { - this.builder = new V1VolumeAttachmentSourceBuilder(this, item); - } - SourceNestedImpl() { - this.builder = new V1VolumeAttachmentSourceBuilder(this); - } - V1VolumeAttachmentSourceBuilder builder; - public N and() { - return (N) V1VolumeAttachmentSpecFluentImpl.this.withSource(builder.build()); - } - public N endSource() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusBuilder.java index 1ed6c43904..726e0dd25b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeAttachmentStatusBuilder extends V1VolumeAttachmentStatusFluentImpl implements VisitableBuilder{ +public class V1VolumeAttachmentStatusBuilder extends V1VolumeAttachmentStatusFluent implements VisitableBuilder{ public V1VolumeAttachmentStatusBuilder() { - this(false); - } - public V1VolumeAttachmentStatusBuilder(Boolean validationEnabled) { - this(new V1VolumeAttachmentStatus(), validationEnabled); + this(new V1VolumeAttachmentStatus()); } + public V1VolumeAttachmentStatusBuilder(V1VolumeAttachmentStatusFluent fluent) { - this(fluent, false); - } - public V1VolumeAttachmentStatusBuilder(V1VolumeAttachmentStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeAttachmentStatus(), validationEnabled); + this(fluent, new V1VolumeAttachmentStatus()); } + public V1VolumeAttachmentStatusBuilder(V1VolumeAttachmentStatusFluent fluent,V1VolumeAttachmentStatus instance) { - this(fluent, instance, false); - } - public V1VolumeAttachmentStatusBuilder(V1VolumeAttachmentStatusFluent fluent,V1VolumeAttachmentStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAttachError(instance.getAttachError()); - fluent.withAttached(instance.getAttached()); - fluent.withAttachmentMetadata(instance.getAttachmentMetadata()); - fluent.withDetachError(instance.getDetachError()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeAttachmentStatusBuilder(V1VolumeAttachmentStatus instance) { - this(instance,false); - } - public V1VolumeAttachmentStatusBuilder(V1VolumeAttachmentStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAttachError(instance.getAttachError()); - this.withAttached(instance.getAttached()); - this.withAttachmentMetadata(instance.getAttachmentMetadata()); - this.withDetachError(instance.getDetachError()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeAttachmentStatusFluent fluent; - Boolean validationEnabled; + public V1VolumeAttachmentStatus build() { V1VolumeAttachmentStatus buildable = new V1VolumeAttachmentStatus(); - buildable.setAttachError(fluent.getAttachError()); + buildable.setAttachError(fluent.buildAttachError()); buildable.setAttached(fluent.getAttached()); buildable.setAttachmentMetadata(fluent.getAttachmentMetadata()); - buildable.setDetachError(fluent.getDetachError()); + buildable.setDetachError(fluent.buildDetachError()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusFluent.java index 6465a121b5..f769096049 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusFluent.java @@ -1,68 +1,231 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; import java.util.LinkedHashMap; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.Boolean; import java.util.Map; - /** - * Generated - */ -public interface V1VolumeAttachmentStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildAttachError instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeError getAttachError(); - public V1VolumeError buildAttachError(); - public A withAttachError(V1VolumeError attachError); - public Boolean hasAttachError(); - public V1VolumeAttachmentStatusFluent.AttachErrorNested withNewAttachError(); - public V1VolumeAttachmentStatusFluent.AttachErrorNested withNewAttachErrorLike(V1VolumeError item); - public V1VolumeAttachmentStatusFluent.AttachErrorNested editAttachError(); - public V1VolumeAttachmentStatusFluent.AttachErrorNested editOrNewAttachError(); - public V1VolumeAttachmentStatusFluent.AttachErrorNested editOrNewAttachErrorLike(V1VolumeError item); - public Boolean getAttached(); - public A withAttached(Boolean attached); - public Boolean hasAttached(); - public A addToAttachmentMetadata(String key,String value); - public A addToAttachmentMetadata(Map map); - public A removeFromAttachmentMetadata(String key); - public A removeFromAttachmentMetadata(Map map); - public Map getAttachmentMetadata(); - public A withAttachmentMetadata(Map attachmentMetadata); - public Boolean hasAttachmentMetadata(); - - /** - * This method has been deprecated, please use method buildDetachError instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeError getDetachError(); - public V1VolumeError buildDetachError(); - public A withDetachError(V1VolumeError detachError); - public Boolean hasDetachError(); - public V1VolumeAttachmentStatusFluent.DetachErrorNested withNewDetachError(); - public V1VolumeAttachmentStatusFluent.DetachErrorNested withNewDetachErrorLike(V1VolumeError item); - public V1VolumeAttachmentStatusFluent.DetachErrorNested editDetachError(); - public V1VolumeAttachmentStatusFluent.DetachErrorNested editOrNewDetachError(); - public V1VolumeAttachmentStatusFluent.DetachErrorNested editOrNewDetachErrorLike(V1VolumeError item); - public A withAttached(); - public interface AttachErrorNested extends Nested,V1VolumeErrorFluent>{ - public N and(); - public N endAttachError(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeAttachmentStatusFluent> extends BaseFluent{ + public V1VolumeAttachmentStatusFluent() { + } + + public V1VolumeAttachmentStatusFluent(V1VolumeAttachmentStatus instance) { + this.copyInstance(instance); + } + private V1VolumeErrorBuilder attachError; + private Boolean attached; + private Map attachmentMetadata; + private V1VolumeErrorBuilder detachError; + + protected void copyInstance(V1VolumeAttachmentStatus instance) { + instance = (instance != null ? instance : new V1VolumeAttachmentStatus()); + if (instance != null) { + this.withAttachError(instance.getAttachError()); + this.withAttached(instance.getAttached()); + this.withAttachmentMetadata(instance.getAttachmentMetadata()); + this.withDetachError(instance.getDetachError()); + } + } + + public V1VolumeError buildAttachError() { + return this.attachError != null ? this.attachError.build() : null; + } + + public A withAttachError(V1VolumeError attachError) { + this._visitables.remove("attachError"); + if (attachError != null) { + this.attachError = new V1VolumeErrorBuilder(attachError); + this._visitables.get("attachError").add(this.attachError); + } else { + this.attachError = null; + this._visitables.get("attachError").remove(this.attachError); + } + return (A) this; + } + + public boolean hasAttachError() { + return this.attachError != null; + } + + public AttachErrorNested withNewAttachError() { + return new AttachErrorNested(null); + } + + public AttachErrorNested withNewAttachErrorLike(V1VolumeError item) { + return new AttachErrorNested(item); + } + + public AttachErrorNested editAttachError() { + return withNewAttachErrorLike(java.util.Optional.ofNullable(buildAttachError()).orElse(null)); + } + + public AttachErrorNested editOrNewAttachError() { + return withNewAttachErrorLike(java.util.Optional.ofNullable(buildAttachError()).orElse(new V1VolumeErrorBuilder().build())); + } + + public AttachErrorNested editOrNewAttachErrorLike(V1VolumeError item) { + return withNewAttachErrorLike(java.util.Optional.ofNullable(buildAttachError()).orElse(item)); + } + + public Boolean getAttached() { + return this.attached; + } + + public A withAttached(Boolean attached) { + this.attached = attached; + return (A) this; + } + + public boolean hasAttached() { + return this.attached != null; + } + + public A addToAttachmentMetadata(String key,String value) { + if(this.attachmentMetadata == null && key != null && value != null) { this.attachmentMetadata = new LinkedHashMap(); } + if(key != null && value != null) {this.attachmentMetadata.put(key, value);} return (A)this; + } + + public A addToAttachmentMetadata(Map map) { + if(this.attachmentMetadata == null && map != null) { this.attachmentMetadata = new LinkedHashMap(); } + if(map != null) { this.attachmentMetadata.putAll(map);} return (A)this; + } + + public A removeFromAttachmentMetadata(String key) { + if(this.attachmentMetadata == null) { return (A) this; } + if(key != null && this.attachmentMetadata != null) {this.attachmentMetadata.remove(key);} return (A)this; + } + + public A removeFromAttachmentMetadata(Map map) { + if(this.attachmentMetadata == null) { return (A) this; } + if(map != null) { for(Object key : map.keySet()) {if (this.attachmentMetadata != null){this.attachmentMetadata.remove(key);}}} return (A)this; + } + + public Map getAttachmentMetadata() { + return this.attachmentMetadata; } - public interface DetachErrorNested extends Nested,V1VolumeErrorFluent>{ - public N and(); - public N endDetachError(); + + public A withAttachmentMetadata(Map attachmentMetadata) { + if (attachmentMetadata == null) { + this.attachmentMetadata = null; + } else { + this.attachmentMetadata = new LinkedHashMap(attachmentMetadata); + } + return (A) this; + } + + public boolean hasAttachmentMetadata() { + return this.attachmentMetadata != null; + } + + public V1VolumeError buildDetachError() { + return this.detachError != null ? this.detachError.build() : null; + } + + public A withDetachError(V1VolumeError detachError) { + this._visitables.remove("detachError"); + if (detachError != null) { + this.detachError = new V1VolumeErrorBuilder(detachError); + this._visitables.get("detachError").add(this.detachError); + } else { + this.detachError = null; + this._visitables.get("detachError").remove(this.detachError); + } + return (A) this; + } + + public boolean hasDetachError() { + return this.detachError != null; + } + + public DetachErrorNested withNewDetachError() { + return new DetachErrorNested(null); + } + + public DetachErrorNested withNewDetachErrorLike(V1VolumeError item) { + return new DetachErrorNested(item); + } + + public DetachErrorNested editDetachError() { + return withNewDetachErrorLike(java.util.Optional.ofNullable(buildDetachError()).orElse(null)); + } + + public DetachErrorNested editOrNewDetachError() { + return withNewDetachErrorLike(java.util.Optional.ofNullable(buildDetachError()).orElse(new V1VolumeErrorBuilder().build())); + } + + public DetachErrorNested editOrNewDetachErrorLike(V1VolumeError item) { + return withNewDetachErrorLike(java.util.Optional.ofNullable(buildDetachError()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeAttachmentStatusFluent that = (V1VolumeAttachmentStatusFluent) o; + if (!java.util.Objects.equals(attachError, that.attachError)) return false; + if (!java.util.Objects.equals(attached, that.attached)) return false; + if (!java.util.Objects.equals(attachmentMetadata, that.attachmentMetadata)) return false; + if (!java.util.Objects.equals(detachError, that.detachError)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(attachError, attached, attachmentMetadata, detachError, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (attachError != null) { sb.append("attachError:"); sb.append(attachError + ","); } + if (attached != null) { sb.append("attached:"); sb.append(attached + ","); } + if (attachmentMetadata != null && !attachmentMetadata.isEmpty()) { sb.append("attachmentMetadata:"); sb.append(attachmentMetadata + ","); } + if (detachError != null) { sb.append("detachError:"); sb.append(detachError); } + sb.append("}"); + return sb.toString(); + } + + public A withAttached() { + return withAttached(true); + } + public class AttachErrorNested extends V1VolumeErrorFluent> implements Nested{ + AttachErrorNested(V1VolumeError item) { + this.builder = new V1VolumeErrorBuilder(this, item); + } + V1VolumeErrorBuilder builder; + + public N and() { + return (N) V1VolumeAttachmentStatusFluent.this.withAttachError(builder.build()); + } + + public N endAttachError() { + return and(); + } + } + public class DetachErrorNested extends V1VolumeErrorFluent> implements Nested{ + DetachErrorNested(V1VolumeError item) { + this.builder = new V1VolumeErrorBuilder(this, item); + } + V1VolumeErrorBuilder builder; + + public N and() { + return (N) V1VolumeAttachmentStatusFluent.this.withDetachError(builder.build()); + } + + public N endDetachError() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusFluentImpl.java deleted file mode 100644 index b383d7eb2e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeAttachmentStatusFluentImpl.java +++ /dev/null @@ -1,198 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.util.LinkedHashMap; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; -import java.util.Map; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeAttachmentStatusFluentImpl> extends BaseFluent implements V1VolumeAttachmentStatusFluent{ - public V1VolumeAttachmentStatusFluentImpl() { - } - public V1VolumeAttachmentStatusFluentImpl(V1VolumeAttachmentStatus instance) { - if (instance != null) { - this.withAttachError(instance.getAttachError()); - this.withAttached(instance.getAttached()); - this.withAttachmentMetadata(instance.getAttachmentMetadata()); - this.withDetachError(instance.getDetachError()); - } - } - private V1VolumeErrorBuilder attachError; - private Boolean attached; - private Map attachmentMetadata; - private V1VolumeErrorBuilder detachError; - - /** - * This method has been deprecated, please use method buildAttachError instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeError getAttachError() { - return this.attachError!=null ?this.attachError.build():null; - } - public V1VolumeError buildAttachError() { - return this.attachError!=null ?this.attachError.build():null; - } - public A withAttachError(V1VolumeError attachError) { - _visitables.get("attachError").remove(this.attachError); - if (attachError!=null){ this.attachError= new V1VolumeErrorBuilder(attachError); _visitables.get("attachError").add(this.attachError);} else { this.attachError = null; _visitables.get("attachError").remove(this.attachError); } return (A) this; - } - public Boolean hasAttachError() { - return this.attachError != null; - } - public V1VolumeAttachmentStatusFluentImpl.AttachErrorNested withNewAttachError() { - return new V1VolumeAttachmentStatusFluentImpl.AttachErrorNestedImpl(); - } - public V1VolumeAttachmentStatusFluentImpl.AttachErrorNested withNewAttachErrorLike(V1VolumeError item) { - return new V1VolumeAttachmentStatusFluentImpl.AttachErrorNestedImpl(item); - } - public V1VolumeAttachmentStatusFluentImpl.AttachErrorNested editAttachError() { - return withNewAttachErrorLike(getAttachError()); - } - public V1VolumeAttachmentStatusFluentImpl.AttachErrorNested editOrNewAttachError() { - return withNewAttachErrorLike(getAttachError() != null ? getAttachError(): new V1VolumeErrorBuilder().build()); - } - public V1VolumeAttachmentStatusFluentImpl.AttachErrorNested editOrNewAttachErrorLike(V1VolumeError item) { - return withNewAttachErrorLike(getAttachError() != null ? getAttachError(): item); - } - public Boolean getAttached() { - return this.attached; - } - public A withAttached(Boolean attached) { - this.attached=attached; return (A) this; - } - public Boolean hasAttached() { - return this.attached != null; - } - public A addToAttachmentMetadata(String key,String value) { - if(this.attachmentMetadata == null && key != null && value != null) { this.attachmentMetadata = new LinkedHashMap(); } - if(key != null && value != null) {this.attachmentMetadata.put(key, value);} return (A)this; - } - public A addToAttachmentMetadata(Map map) { - if(this.attachmentMetadata == null && map != null) { this.attachmentMetadata = new LinkedHashMap(); } - if(map != null) { this.attachmentMetadata.putAll(map);} return (A)this; - } - public A removeFromAttachmentMetadata(String key) { - if(this.attachmentMetadata == null) { return (A) this; } - if(key != null && this.attachmentMetadata != null) {this.attachmentMetadata.remove(key);} return (A)this; - } - public A removeFromAttachmentMetadata(Map map) { - if(this.attachmentMetadata == null) { return (A) this; } - if(map != null) { for(Object key : map.keySet()) {if (this.attachmentMetadata != null){this.attachmentMetadata.remove(key);}}} return (A)this; - } - public Map getAttachmentMetadata() { - return this.attachmentMetadata; - } - public A withAttachmentMetadata(Map attachmentMetadata) { - if (attachmentMetadata == null) { this.attachmentMetadata = null;} else {this.attachmentMetadata = new LinkedHashMap(attachmentMetadata);} return (A) this; - } - public Boolean hasAttachmentMetadata() { - return this.attachmentMetadata != null; - } - - /** - * This method has been deprecated, please use method buildDetachError instead. - * @return The buildable object. - */ - @Deprecated - public V1VolumeError getDetachError() { - return this.detachError!=null ?this.detachError.build():null; - } - public V1VolumeError buildDetachError() { - return this.detachError!=null ?this.detachError.build():null; - } - public A withDetachError(V1VolumeError detachError) { - _visitables.get("detachError").remove(this.detachError); - if (detachError!=null){ this.detachError= new V1VolumeErrorBuilder(detachError); _visitables.get("detachError").add(this.detachError);} else { this.detachError = null; _visitables.get("detachError").remove(this.detachError); } return (A) this; - } - public Boolean hasDetachError() { - return this.detachError != null; - } - public V1VolumeAttachmentStatusFluentImpl.DetachErrorNested withNewDetachError() { - return new V1VolumeAttachmentStatusFluentImpl.DetachErrorNestedImpl(); - } - public V1VolumeAttachmentStatusFluentImpl.DetachErrorNested withNewDetachErrorLike(V1VolumeError item) { - return new V1VolumeAttachmentStatusFluentImpl.DetachErrorNestedImpl(item); - } - public V1VolumeAttachmentStatusFluentImpl.DetachErrorNested editDetachError() { - return withNewDetachErrorLike(getDetachError()); - } - public V1VolumeAttachmentStatusFluentImpl.DetachErrorNested editOrNewDetachError() { - return withNewDetachErrorLike(getDetachError() != null ? getDetachError(): new V1VolumeErrorBuilder().build()); - } - public V1VolumeAttachmentStatusFluentImpl.DetachErrorNested editOrNewDetachErrorLike(V1VolumeError item) { - return withNewDetachErrorLike(getDetachError() != null ? getDetachError(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeAttachmentStatusFluentImpl that = (V1VolumeAttachmentStatusFluentImpl) o; - if (!java.util.Objects.equals(attachError, that.attachError)) return false; - - if (!java.util.Objects.equals(attached, that.attached)) return false; - - if (!java.util.Objects.equals(attachmentMetadata, that.attachmentMetadata)) return false; - - if (!java.util.Objects.equals(detachError, that.detachError)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(attachError, attached, attachmentMetadata, detachError, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (attachError != null) { sb.append("attachError:"); sb.append(attachError + ","); } - if (attached != null) { sb.append("attached:"); sb.append(attached + ","); } - if (attachmentMetadata != null && !attachmentMetadata.isEmpty()) { sb.append("attachmentMetadata:"); sb.append(attachmentMetadata + ","); } - if (detachError != null) { sb.append("detachError:"); sb.append(detachError); } - sb.append("}"); - return sb.toString(); - } - public A withAttached() { - return withAttached(true); - } - class AttachErrorNestedImpl extends V1VolumeErrorFluentImpl> implements V1VolumeAttachmentStatusFluentImpl.AttachErrorNested,Nested{ - AttachErrorNestedImpl(V1VolumeError item) { - this.builder = new V1VolumeErrorBuilder(this, item); - } - AttachErrorNestedImpl() { - this.builder = new V1VolumeErrorBuilder(this); - } - V1VolumeErrorBuilder builder; - public N and() { - return (N) V1VolumeAttachmentStatusFluentImpl.this.withAttachError(builder.build()); - } - public N endAttachError() { - return and(); - } - - } - class DetachErrorNestedImpl extends V1VolumeErrorFluentImpl> implements V1VolumeAttachmentStatusFluentImpl.DetachErrorNested,Nested{ - DetachErrorNestedImpl(V1VolumeError item) { - this.builder = new V1VolumeErrorBuilder(this, item); - } - DetachErrorNestedImpl() { - this.builder = new V1VolumeErrorBuilder(this); - } - V1VolumeErrorBuilder builder; - public N and() { - return (N) V1VolumeAttachmentStatusFluentImpl.this.withDetachError(builder.build()); - } - public N endDetachError() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeBuilder.java index 1702d9d01f..7a35e97fdc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeBuilder.java @@ -1,133 +1,60 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeBuilder extends V1VolumeFluentImpl implements VisitableBuilder{ +public class V1VolumeBuilder extends V1VolumeFluent implements VisitableBuilder{ public V1VolumeBuilder() { - this(false); - } - public V1VolumeBuilder(Boolean validationEnabled) { - this(new V1Volume(), validationEnabled); + this(new V1Volume()); } + public V1VolumeBuilder(V1VolumeFluent fluent) { - this(fluent, false); - } - public V1VolumeBuilder(V1VolumeFluent fluent,Boolean validationEnabled) { - this(fluent, new V1Volume(), validationEnabled); + this(fluent, new V1Volume()); } + public V1VolumeBuilder(V1VolumeFluent fluent,V1Volume instance) { - this(fluent, instance, false); - } - public V1VolumeBuilder(V1VolumeFluent fluent,V1Volume instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAwsElasticBlockStore(instance.getAwsElasticBlockStore()); - fluent.withAzureDisk(instance.getAzureDisk()); - fluent.withAzureFile(instance.getAzureFile()); - fluent.withCephfs(instance.getCephfs()); - fluent.withCinder(instance.getCinder()); - fluent.withConfigMap(instance.getConfigMap()); - fluent.withCsi(instance.getCsi()); - fluent.withDownwardAPI(instance.getDownwardAPI()); - fluent.withEmptyDir(instance.getEmptyDir()); - fluent.withEphemeral(instance.getEphemeral()); - fluent.withFc(instance.getFc()); - fluent.withFlexVolume(instance.getFlexVolume()); - fluent.withFlocker(instance.getFlocker()); - fluent.withGcePersistentDisk(instance.getGcePersistentDisk()); - fluent.withGitRepo(instance.getGitRepo()); - fluent.withGlusterfs(instance.getGlusterfs()); - fluent.withHostPath(instance.getHostPath()); - fluent.withIscsi(instance.getIscsi()); - fluent.withName(instance.getName()); - fluent.withNfs(instance.getNfs()); - fluent.withPersistentVolumeClaim(instance.getPersistentVolumeClaim()); - fluent.withPhotonPersistentDisk(instance.getPhotonPersistentDisk()); - fluent.withPortworxVolume(instance.getPortworxVolume()); - fluent.withProjected(instance.getProjected()); - fluent.withQuobyte(instance.getQuobyte()); - fluent.withRbd(instance.getRbd()); - fluent.withScaleIO(instance.getScaleIO()); - fluent.withSecret(instance.getSecret()); - fluent.withStorageos(instance.getStorageos()); - fluent.withVsphereVolume(instance.getVsphereVolume()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeBuilder(V1Volume instance) { - this(instance,false); - } - public V1VolumeBuilder(V1Volume instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAwsElasticBlockStore(instance.getAwsElasticBlockStore()); - this.withAzureDisk(instance.getAzureDisk()); - this.withAzureFile(instance.getAzureFile()); - this.withCephfs(instance.getCephfs()); - this.withCinder(instance.getCinder()); - this.withConfigMap(instance.getConfigMap()); - this.withCsi(instance.getCsi()); - this.withDownwardAPI(instance.getDownwardAPI()); - this.withEmptyDir(instance.getEmptyDir()); - this.withEphemeral(instance.getEphemeral()); - this.withFc(instance.getFc()); - this.withFlexVolume(instance.getFlexVolume()); - this.withFlocker(instance.getFlocker()); - this.withGcePersistentDisk(instance.getGcePersistentDisk()); - this.withGitRepo(instance.getGitRepo()); - this.withGlusterfs(instance.getGlusterfs()); - this.withHostPath(instance.getHostPath()); - this.withIscsi(instance.getIscsi()); - this.withName(instance.getName()); - this.withNfs(instance.getNfs()); - this.withPersistentVolumeClaim(instance.getPersistentVolumeClaim()); - this.withPhotonPersistentDisk(instance.getPhotonPersistentDisk()); - this.withPortworxVolume(instance.getPortworxVolume()); - this.withProjected(instance.getProjected()); - this.withQuobyte(instance.getQuobyte()); - this.withRbd(instance.getRbd()); - this.withScaleIO(instance.getScaleIO()); - this.withSecret(instance.getSecret()); - this.withStorageos(instance.getStorageos()); - this.withVsphereVolume(instance.getVsphereVolume()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeFluent fluent; - Boolean validationEnabled; + public V1Volume build() { V1Volume buildable = new V1Volume(); - buildable.setAwsElasticBlockStore(fluent.getAwsElasticBlockStore()); - buildable.setAzureDisk(fluent.getAzureDisk()); - buildable.setAzureFile(fluent.getAzureFile()); - buildable.setCephfs(fluent.getCephfs()); - buildable.setCinder(fluent.getCinder()); - buildable.setConfigMap(fluent.getConfigMap()); - buildable.setCsi(fluent.getCsi()); - buildable.setDownwardAPI(fluent.getDownwardAPI()); - buildable.setEmptyDir(fluent.getEmptyDir()); - buildable.setEphemeral(fluent.getEphemeral()); - buildable.setFc(fluent.getFc()); - buildable.setFlexVolume(fluent.getFlexVolume()); - buildable.setFlocker(fluent.getFlocker()); - buildable.setGcePersistentDisk(fluent.getGcePersistentDisk()); - buildable.setGitRepo(fluent.getGitRepo()); - buildable.setGlusterfs(fluent.getGlusterfs()); - buildable.setHostPath(fluent.getHostPath()); - buildable.setIscsi(fluent.getIscsi()); + buildable.setAwsElasticBlockStore(fluent.buildAwsElasticBlockStore()); + buildable.setAzureDisk(fluent.buildAzureDisk()); + buildable.setAzureFile(fluent.buildAzureFile()); + buildable.setCephfs(fluent.buildCephfs()); + buildable.setCinder(fluent.buildCinder()); + buildable.setConfigMap(fluent.buildConfigMap()); + buildable.setCsi(fluent.buildCsi()); + buildable.setDownwardAPI(fluent.buildDownwardAPI()); + buildable.setEmptyDir(fluent.buildEmptyDir()); + buildable.setEphemeral(fluent.buildEphemeral()); + buildable.setFc(fluent.buildFc()); + buildable.setFlexVolume(fluent.buildFlexVolume()); + buildable.setFlocker(fluent.buildFlocker()); + buildable.setGcePersistentDisk(fluent.buildGcePersistentDisk()); + buildable.setGitRepo(fluent.buildGitRepo()); + buildable.setGlusterfs(fluent.buildGlusterfs()); + buildable.setHostPath(fluent.buildHostPath()); + buildable.setIscsi(fluent.buildIscsi()); buildable.setName(fluent.getName()); - buildable.setNfs(fluent.getNfs()); - buildable.setPersistentVolumeClaim(fluent.getPersistentVolumeClaim()); - buildable.setPhotonPersistentDisk(fluent.getPhotonPersistentDisk()); - buildable.setPortworxVolume(fluent.getPortworxVolume()); - buildable.setProjected(fluent.getProjected()); - buildable.setQuobyte(fluent.getQuobyte()); - buildable.setRbd(fluent.getRbd()); - buildable.setScaleIO(fluent.getScaleIO()); - buildable.setSecret(fluent.getSecret()); - buildable.setStorageos(fluent.getStorageos()); - buildable.setVsphereVolume(fluent.getVsphereVolume()); + buildable.setNfs(fluent.buildNfs()); + buildable.setPersistentVolumeClaim(fluent.buildPersistentVolumeClaim()); + buildable.setPhotonPersistentDisk(fluent.buildPhotonPersistentDisk()); + buildable.setPortworxVolume(fluent.buildPortworxVolume()); + buildable.setProjected(fluent.buildProjected()); + buildable.setQuobyte(fluent.buildQuobyte()); + buildable.setRbd(fluent.buildRbd()); + buildable.setScaleIO(fluent.buildScaleIO()); + buildable.setSecret(fluent.buildSecret()); + buildable.setStorageos(fluent.buildStorageos()); + buildable.setVsphereVolume(fluent.buildVsphereVolume()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceBuilder.java index f1adfa5760..63e6a29ada 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeDeviceBuilder extends V1VolumeDeviceFluentImpl implements VisitableBuilder{ +public class V1VolumeDeviceBuilder extends V1VolumeDeviceFluent implements VisitableBuilder{ public V1VolumeDeviceBuilder() { - this(false); - } - public V1VolumeDeviceBuilder(Boolean validationEnabled) { - this(new V1VolumeDevice(), validationEnabled); + this(new V1VolumeDevice()); } + public V1VolumeDeviceBuilder(V1VolumeDeviceFluent fluent) { - this(fluent, false); - } - public V1VolumeDeviceBuilder(V1VolumeDeviceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeDevice(), validationEnabled); + this(fluent, new V1VolumeDevice()); } + public V1VolumeDeviceBuilder(V1VolumeDeviceFluent fluent,V1VolumeDevice instance) { - this(fluent, instance, false); - } - public V1VolumeDeviceBuilder(V1VolumeDeviceFluent fluent,V1VolumeDevice instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDevicePath(instance.getDevicePath()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeDeviceBuilder(V1VolumeDevice instance) { - this(instance,false); - } - public V1VolumeDeviceBuilder(V1VolumeDevice instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDevicePath(instance.getDevicePath()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeDeviceFluent fluent; - Boolean validationEnabled; + public V1VolumeDevice build() { V1VolumeDevice buildable = new V1VolumeDevice(); buildable.setDevicePath(fluent.getDevicePath()); @@ -46,4 +28,5 @@ public V1VolumeDevice build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceFluent.java index 4318d19dc0..497ca8ff08 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1VolumeDeviceFluent> extends Fluent{ - public String getDevicePath(); - public A withDevicePath(String devicePath); - public Boolean hasDevicePath(); - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeDeviceFluent> extends BaseFluent{ + public V1VolumeDeviceFluent() { + } + public V1VolumeDeviceFluent(V1VolumeDevice instance) { + this.copyInstance(instance); + } + private String devicePath; + private String name; + + protected void copyInstance(V1VolumeDevice instance) { + instance = (instance != null ? instance : new V1VolumeDevice()); + if (instance != null) { + this.withDevicePath(instance.getDevicePath()); + this.withName(instance.getName()); + } + } + + public String getDevicePath() { + return this.devicePath; + } + + public A withDevicePath(String devicePath) { + this.devicePath = devicePath; + return (A) this; + } + + public boolean hasDevicePath() { + return this.devicePath != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeDeviceFluent that = (V1VolumeDeviceFluent) o; + if (!java.util.Objects.equals(devicePath, that.devicePath)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(devicePath, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (devicePath != null) { sb.append("devicePath:"); sb.append(devicePath + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceFluentImpl.java deleted file mode 100644 index f5932b4285..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeDeviceFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeDeviceFluentImpl> extends BaseFluent implements V1VolumeDeviceFluent{ - public V1VolumeDeviceFluentImpl() { - } - public V1VolumeDeviceFluentImpl(V1VolumeDevice instance) { - if (instance != null) { - this.withDevicePath(instance.getDevicePath()); - this.withName(instance.getName()); - } - } - private String devicePath; - private String name; - public String getDevicePath() { - return this.devicePath; - } - public A withDevicePath(String devicePath) { - this.devicePath=devicePath; return (A) this; - } - public Boolean hasDevicePath() { - return this.devicePath != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeDeviceFluentImpl that = (V1VolumeDeviceFluentImpl) o; - if (!java.util.Objects.equals(devicePath, that.devicePath)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(devicePath, name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (devicePath != null) { sb.append("devicePath:"); sb.append(devicePath + ","); } - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorBuilder.java index 590f7fdc13..4e36c9f18b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeErrorBuilder extends V1VolumeErrorFluentImpl implements VisitableBuilder{ +public class V1VolumeErrorBuilder extends V1VolumeErrorFluent implements VisitableBuilder{ public V1VolumeErrorBuilder() { - this(false); - } - public V1VolumeErrorBuilder(Boolean validationEnabled) { - this(new V1VolumeError(), validationEnabled); + this(new V1VolumeError()); } + public V1VolumeErrorBuilder(V1VolumeErrorFluent fluent) { - this(fluent, false); - } - public V1VolumeErrorBuilder(V1VolumeErrorFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeError(), validationEnabled); + this(fluent, new V1VolumeError()); } + public V1VolumeErrorBuilder(V1VolumeErrorFluent fluent,V1VolumeError instance) { - this(fluent, instance, false); - } - public V1VolumeErrorBuilder(V1VolumeErrorFluent fluent,V1VolumeError instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMessage(instance.getMessage()); - fluent.withTime(instance.getTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeErrorBuilder(V1VolumeError instance) { - this(instance,false); - } - public V1VolumeErrorBuilder(V1VolumeError instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMessage(instance.getMessage()); - this.withTime(instance.getTime()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeErrorFluent fluent; - Boolean validationEnabled; + public V1VolumeError build() { V1VolumeError buildable = new V1VolumeError(); buildable.setMessage(fluent.getMessage()); @@ -46,4 +28,5 @@ public V1VolumeError build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorFluent.java index 877790ac1d..1b2e8a9881 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorFluent.java @@ -1,20 +1,81 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1VolumeErrorFluent> extends Fluent{ - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public OffsetDateTime getTime(); - public A withTime(OffsetDateTime time); - public Boolean hasTime(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeErrorFluent> extends BaseFluent{ + public V1VolumeErrorFluent() { + } + public V1VolumeErrorFluent(V1VolumeError instance) { + this.copyInstance(instance); + } + private String message; + private OffsetDateTime time; + + protected void copyInstance(V1VolumeError instance) { + instance = (instance != null ? instance : new V1VolumeError()); + if (instance != null) { + this.withMessage(instance.getMessage()); + this.withTime(instance.getTime()); + } + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public OffsetDateTime getTime() { + return this.time; + } + + public A withTime(OffsetDateTime time) { + this.time = time; + return (A) this; + } + + public boolean hasTime() { + return this.time != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeErrorFluent that = (V1VolumeErrorFluent) o; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(time, that.time)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(message, time, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (time != null) { sb.append("time:"); sb.append(time); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorFluentImpl.java deleted file mode 100644 index ef9e941ddf..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeErrorFluentImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeErrorFluentImpl> extends BaseFluent implements V1VolumeErrorFluent{ - public V1VolumeErrorFluentImpl() { - } - public V1VolumeErrorFluentImpl(V1VolumeError instance) { - if (instance != null) { - this.withMessage(instance.getMessage()); - this.withTime(instance.getTime()); - } - } - private String message; - private OffsetDateTime time; - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public OffsetDateTime getTime() { - return this.time; - } - public A withTime(OffsetDateTime time) { - this.time=time; return (A) this; - } - public Boolean hasTime() { - return this.time != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeErrorFluentImpl that = (V1VolumeErrorFluentImpl) o; - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(time, that.time)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(message, time, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (time != null) { sb.append("time:"); sb.append(time); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeFluent.java index 69c017cd0b..af779e85d6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeFluent.java @@ -1,598 +1,1803 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; import java.lang.String; -import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; - /** - * Generated - */ -public interface V1VolumeFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildAwsElasticBlockStore instead. - * @return The buildable object. - */ - @Deprecated - public V1AWSElasticBlockStoreVolumeSource getAwsElasticBlockStore(); - public V1AWSElasticBlockStoreVolumeSource buildAwsElasticBlockStore(); - public A withAwsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore); - public Boolean hasAwsElasticBlockStore(); - public V1VolumeFluent.AwsElasticBlockStoreNested withNewAwsElasticBlockStore(); - public V1VolumeFluent.AwsElasticBlockStoreNested withNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item); - public V1VolumeFluent.AwsElasticBlockStoreNested editAwsElasticBlockStore(); - public V1VolumeFluent.AwsElasticBlockStoreNested editOrNewAwsElasticBlockStore(); - public V1VolumeFluent.AwsElasticBlockStoreNested editOrNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item); - - /** - * This method has been deprecated, please use method buildAzureDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1AzureDiskVolumeSource getAzureDisk(); - public V1AzureDiskVolumeSource buildAzureDisk(); - public A withAzureDisk(V1AzureDiskVolumeSource azureDisk); - public Boolean hasAzureDisk(); - public V1VolumeFluent.AzureDiskNested withNewAzureDisk(); - public V1VolumeFluent.AzureDiskNested withNewAzureDiskLike(V1AzureDiskVolumeSource item); - public V1VolumeFluent.AzureDiskNested editAzureDisk(); - public V1VolumeFluent.AzureDiskNested editOrNewAzureDisk(); - public V1VolumeFluent.AzureDiskNested editOrNewAzureDiskLike(V1AzureDiskVolumeSource item); - - /** - * This method has been deprecated, please use method buildAzureFile instead. - * @return The buildable object. - */ - @Deprecated - public V1AzureFileVolumeSource getAzureFile(); - public V1AzureFileVolumeSource buildAzureFile(); - public A withAzureFile(V1AzureFileVolumeSource azureFile); - public Boolean hasAzureFile(); - public V1VolumeFluent.AzureFileNested withNewAzureFile(); - public V1VolumeFluent.AzureFileNested withNewAzureFileLike(V1AzureFileVolumeSource item); - public V1VolumeFluent.AzureFileNested editAzureFile(); - public V1VolumeFluent.AzureFileNested editOrNewAzureFile(); - public V1VolumeFluent.AzureFileNested editOrNewAzureFileLike(V1AzureFileVolumeSource item); - - /** - * This method has been deprecated, please use method buildCephfs instead. - * @return The buildable object. - */ - @Deprecated - public V1CephFSVolumeSource getCephfs(); - public V1CephFSVolumeSource buildCephfs(); - public A withCephfs(V1CephFSVolumeSource cephfs); - public Boolean hasCephfs(); - public V1VolumeFluent.CephfsNested withNewCephfs(); - public V1VolumeFluent.CephfsNested withNewCephfsLike(V1CephFSVolumeSource item); - public V1VolumeFluent.CephfsNested editCephfs(); - public V1VolumeFluent.CephfsNested editOrNewCephfs(); - public V1VolumeFluent.CephfsNested editOrNewCephfsLike(V1CephFSVolumeSource item); - - /** - * This method has been deprecated, please use method buildCinder instead. - * @return The buildable object. - */ - @Deprecated - public V1CinderVolumeSource getCinder(); - public V1CinderVolumeSource buildCinder(); - public A withCinder(V1CinderVolumeSource cinder); - public Boolean hasCinder(); - public V1VolumeFluent.CinderNested withNewCinder(); - public V1VolumeFluent.CinderNested withNewCinderLike(V1CinderVolumeSource item); - public V1VolumeFluent.CinderNested editCinder(); - public V1VolumeFluent.CinderNested editOrNewCinder(); - public V1VolumeFluent.CinderNested editOrNewCinderLike(V1CinderVolumeSource item); - - /** - * This method has been deprecated, please use method buildConfigMap instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapVolumeSource getConfigMap(); - public V1ConfigMapVolumeSource buildConfigMap(); - public A withConfigMap(V1ConfigMapVolumeSource configMap); - public Boolean hasConfigMap(); - public V1VolumeFluent.ConfigMapNested withNewConfigMap(); - public V1VolumeFluent.ConfigMapNested withNewConfigMapLike(V1ConfigMapVolumeSource item); - public V1VolumeFluent.ConfigMapNested editConfigMap(); - public V1VolumeFluent.ConfigMapNested editOrNewConfigMap(); - public V1VolumeFluent.ConfigMapNested editOrNewConfigMapLike(V1ConfigMapVolumeSource item); - - /** - * This method has been deprecated, please use method buildCsi instead. - * @return The buildable object. - */ - @Deprecated - public V1CSIVolumeSource getCsi(); - public V1CSIVolumeSource buildCsi(); - public A withCsi(V1CSIVolumeSource csi); - public Boolean hasCsi(); - public V1VolumeFluent.CsiNested withNewCsi(); - public V1VolumeFluent.CsiNested withNewCsiLike(V1CSIVolumeSource item); - public V1VolumeFluent.CsiNested editCsi(); - public V1VolumeFluent.CsiNested editOrNewCsi(); - public V1VolumeFluent.CsiNested editOrNewCsiLike(V1CSIVolumeSource item); - - /** - * This method has been deprecated, please use method buildDownwardAPI instead. - * @return The buildable object. - */ - @Deprecated - public V1DownwardAPIVolumeSource getDownwardAPI(); - public V1DownwardAPIVolumeSource buildDownwardAPI(); - public A withDownwardAPI(V1DownwardAPIVolumeSource downwardAPI); - public Boolean hasDownwardAPI(); - public V1VolumeFluent.DownwardAPINested withNewDownwardAPI(); - public V1VolumeFluent.DownwardAPINested withNewDownwardAPILike(V1DownwardAPIVolumeSource item); - public V1VolumeFluent.DownwardAPINested editDownwardAPI(); - public V1VolumeFluent.DownwardAPINested editOrNewDownwardAPI(); - public V1VolumeFluent.DownwardAPINested editOrNewDownwardAPILike(V1DownwardAPIVolumeSource item); - - /** - * This method has been deprecated, please use method buildEmptyDir instead. - * @return The buildable object. - */ - @Deprecated - public V1EmptyDirVolumeSource getEmptyDir(); - public V1EmptyDirVolumeSource buildEmptyDir(); - public A withEmptyDir(V1EmptyDirVolumeSource emptyDir); - public Boolean hasEmptyDir(); - public V1VolumeFluent.EmptyDirNested withNewEmptyDir(); - public V1VolumeFluent.EmptyDirNested withNewEmptyDirLike(V1EmptyDirVolumeSource item); - public V1VolumeFluent.EmptyDirNested editEmptyDir(); - public V1VolumeFluent.EmptyDirNested editOrNewEmptyDir(); - public V1VolumeFluent.EmptyDirNested editOrNewEmptyDirLike(V1EmptyDirVolumeSource item); - - /** - * This method has been deprecated, please use method buildEphemeral instead. - * @return The buildable object. - */ - @Deprecated - public V1EphemeralVolumeSource getEphemeral(); - public V1EphemeralVolumeSource buildEphemeral(); - public A withEphemeral(V1EphemeralVolumeSource ephemeral); - public Boolean hasEphemeral(); - public V1VolumeFluent.EphemeralNested withNewEphemeral(); - public V1VolumeFluent.EphemeralNested withNewEphemeralLike(V1EphemeralVolumeSource item); - public V1VolumeFluent.EphemeralNested editEphemeral(); - public V1VolumeFluent.EphemeralNested editOrNewEphemeral(); - public V1VolumeFluent.EphemeralNested editOrNewEphemeralLike(V1EphemeralVolumeSource item); - - /** - * This method has been deprecated, please use method buildFc instead. - * @return The buildable object. - */ - @Deprecated - public V1FCVolumeSource getFc(); - public V1FCVolumeSource buildFc(); - public A withFc(V1FCVolumeSource fc); - public Boolean hasFc(); - public V1VolumeFluent.FcNested withNewFc(); - public V1VolumeFluent.FcNested withNewFcLike(V1FCVolumeSource item); - public V1VolumeFluent.FcNested editFc(); - public V1VolumeFluent.FcNested editOrNewFc(); - public V1VolumeFluent.FcNested editOrNewFcLike(V1FCVolumeSource item); - - /** - * This method has been deprecated, please use method buildFlexVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1FlexVolumeSource getFlexVolume(); - public V1FlexVolumeSource buildFlexVolume(); - public A withFlexVolume(V1FlexVolumeSource flexVolume); - public Boolean hasFlexVolume(); - public V1VolumeFluent.FlexVolumeNested withNewFlexVolume(); - public V1VolumeFluent.FlexVolumeNested withNewFlexVolumeLike(V1FlexVolumeSource item); - public V1VolumeFluent.FlexVolumeNested editFlexVolume(); - public V1VolumeFluent.FlexVolumeNested editOrNewFlexVolume(); - public V1VolumeFluent.FlexVolumeNested editOrNewFlexVolumeLike(V1FlexVolumeSource item); - - /** - * This method has been deprecated, please use method buildFlocker instead. - * @return The buildable object. - */ - @Deprecated - public V1FlockerVolumeSource getFlocker(); - public V1FlockerVolumeSource buildFlocker(); - public A withFlocker(V1FlockerVolumeSource flocker); - public Boolean hasFlocker(); - public V1VolumeFluent.FlockerNested withNewFlocker(); - public V1VolumeFluent.FlockerNested withNewFlockerLike(V1FlockerVolumeSource item); - public V1VolumeFluent.FlockerNested editFlocker(); - public V1VolumeFluent.FlockerNested editOrNewFlocker(); - public V1VolumeFluent.FlockerNested editOrNewFlockerLike(V1FlockerVolumeSource item); - - /** - * This method has been deprecated, please use method buildGcePersistentDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1GCEPersistentDiskVolumeSource getGcePersistentDisk(); - public V1GCEPersistentDiskVolumeSource buildGcePersistentDisk(); - public A withGcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk); - public Boolean hasGcePersistentDisk(); - public V1VolumeFluent.GcePersistentDiskNested withNewGcePersistentDisk(); - public V1VolumeFluent.GcePersistentDiskNested withNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item); - public V1VolumeFluent.GcePersistentDiskNested editGcePersistentDisk(); - public V1VolumeFluent.GcePersistentDiskNested editOrNewGcePersistentDisk(); - public V1VolumeFluent.GcePersistentDiskNested editOrNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item); - - /** - * This method has been deprecated, please use method buildGitRepo instead. - * @return The buildable object. - */ - @Deprecated - public V1GitRepoVolumeSource getGitRepo(); - public V1GitRepoVolumeSource buildGitRepo(); - public A withGitRepo(V1GitRepoVolumeSource gitRepo); - public Boolean hasGitRepo(); - public V1VolumeFluent.GitRepoNested withNewGitRepo(); - public V1VolumeFluent.GitRepoNested withNewGitRepoLike(V1GitRepoVolumeSource item); - public V1VolumeFluent.GitRepoNested editGitRepo(); - public V1VolumeFluent.GitRepoNested editOrNewGitRepo(); - public V1VolumeFluent.GitRepoNested editOrNewGitRepoLike(V1GitRepoVolumeSource item); - - /** - * This method has been deprecated, please use method buildGlusterfs instead. - * @return The buildable object. - */ - @Deprecated - public V1GlusterfsVolumeSource getGlusterfs(); - public V1GlusterfsVolumeSource buildGlusterfs(); - public A withGlusterfs(V1GlusterfsVolumeSource glusterfs); - public Boolean hasGlusterfs(); - public V1VolumeFluent.GlusterfsNested withNewGlusterfs(); - public V1VolumeFluent.GlusterfsNested withNewGlusterfsLike(V1GlusterfsVolumeSource item); - public V1VolumeFluent.GlusterfsNested editGlusterfs(); - public V1VolumeFluent.GlusterfsNested editOrNewGlusterfs(); - public V1VolumeFluent.GlusterfsNested editOrNewGlusterfsLike(V1GlusterfsVolumeSource item); - - /** - * This method has been deprecated, please use method buildHostPath instead. - * @return The buildable object. - */ - @Deprecated - public V1HostPathVolumeSource getHostPath(); - public V1HostPathVolumeSource buildHostPath(); - public A withHostPath(V1HostPathVolumeSource hostPath); - public Boolean hasHostPath(); - public V1VolumeFluent.HostPathNested withNewHostPath(); - public V1VolumeFluent.HostPathNested withNewHostPathLike(V1HostPathVolumeSource item); - public V1VolumeFluent.HostPathNested editHostPath(); - public V1VolumeFluent.HostPathNested editOrNewHostPath(); - public V1VolumeFluent.HostPathNested editOrNewHostPathLike(V1HostPathVolumeSource item); - - /** - * This method has been deprecated, please use method buildIscsi instead. - * @return The buildable object. - */ - @Deprecated - public V1ISCSIVolumeSource getIscsi(); - public V1ISCSIVolumeSource buildIscsi(); - public A withIscsi(V1ISCSIVolumeSource iscsi); - public Boolean hasIscsi(); - public V1VolumeFluent.IscsiNested withNewIscsi(); - public V1VolumeFluent.IscsiNested withNewIscsiLike(V1ISCSIVolumeSource item); - public V1VolumeFluent.IscsiNested editIscsi(); - public V1VolumeFluent.IscsiNested editOrNewIscsi(); - public V1VolumeFluent.IscsiNested editOrNewIscsiLike(V1ISCSIVolumeSource item); - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildNfs instead. - * @return The buildable object. - */ - @Deprecated - public V1NFSVolumeSource getNfs(); - public V1NFSVolumeSource buildNfs(); - public A withNfs(V1NFSVolumeSource nfs); - public Boolean hasNfs(); - public V1VolumeFluent.NfsNested withNewNfs(); - public V1VolumeFluent.NfsNested withNewNfsLike(V1NFSVolumeSource item); - public V1VolumeFluent.NfsNested editNfs(); - public V1VolumeFluent.NfsNested editOrNewNfs(); - public V1VolumeFluent.NfsNested editOrNewNfsLike(V1NFSVolumeSource item); - - /** - * This method has been deprecated, please use method buildPersistentVolumeClaim instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimVolumeSource getPersistentVolumeClaim(); - public V1PersistentVolumeClaimVolumeSource buildPersistentVolumeClaim(); - public A withPersistentVolumeClaim(V1PersistentVolumeClaimVolumeSource persistentVolumeClaim); - public Boolean hasPersistentVolumeClaim(); - public V1VolumeFluent.PersistentVolumeClaimNested withNewPersistentVolumeClaim(); - public V1VolumeFluent.PersistentVolumeClaimNested withNewPersistentVolumeClaimLike(V1PersistentVolumeClaimVolumeSource item); - public V1VolumeFluent.PersistentVolumeClaimNested editPersistentVolumeClaim(); - public V1VolumeFluent.PersistentVolumeClaimNested editOrNewPersistentVolumeClaim(); - public V1VolumeFluent.PersistentVolumeClaimNested editOrNewPersistentVolumeClaimLike(V1PersistentVolumeClaimVolumeSource item); - - /** - * This method has been deprecated, please use method buildPhotonPersistentDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1PhotonPersistentDiskVolumeSource getPhotonPersistentDisk(); - public V1PhotonPersistentDiskVolumeSource buildPhotonPersistentDisk(); - public A withPhotonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk); - public Boolean hasPhotonPersistentDisk(); - public V1VolumeFluent.PhotonPersistentDiskNested withNewPhotonPersistentDisk(); - public V1VolumeFluent.PhotonPersistentDiskNested withNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item); - public V1VolumeFluent.PhotonPersistentDiskNested editPhotonPersistentDisk(); - public V1VolumeFluent.PhotonPersistentDiskNested editOrNewPhotonPersistentDisk(); - public V1VolumeFluent.PhotonPersistentDiskNested editOrNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item); - - /** - * This method has been deprecated, please use method buildPortworxVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1PortworxVolumeSource getPortworxVolume(); - public V1PortworxVolumeSource buildPortworxVolume(); - public A withPortworxVolume(V1PortworxVolumeSource portworxVolume); - public Boolean hasPortworxVolume(); - public V1VolumeFluent.PortworxVolumeNested withNewPortworxVolume(); - public V1VolumeFluent.PortworxVolumeNested withNewPortworxVolumeLike(V1PortworxVolumeSource item); - public V1VolumeFluent.PortworxVolumeNested editPortworxVolume(); - public V1VolumeFluent.PortworxVolumeNested editOrNewPortworxVolume(); - public V1VolumeFluent.PortworxVolumeNested editOrNewPortworxVolumeLike(V1PortworxVolumeSource item); - - /** - * This method has been deprecated, please use method buildProjected instead. - * @return The buildable object. - */ - @Deprecated - public V1ProjectedVolumeSource getProjected(); - public V1ProjectedVolumeSource buildProjected(); - public A withProjected(V1ProjectedVolumeSource projected); - public Boolean hasProjected(); - public V1VolumeFluent.ProjectedNested withNewProjected(); - public V1VolumeFluent.ProjectedNested withNewProjectedLike(V1ProjectedVolumeSource item); - public V1VolumeFluent.ProjectedNested editProjected(); - public V1VolumeFluent.ProjectedNested editOrNewProjected(); - public V1VolumeFluent.ProjectedNested editOrNewProjectedLike(V1ProjectedVolumeSource item); - - /** - * This method has been deprecated, please use method buildQuobyte instead. - * @return The buildable object. - */ - @Deprecated - public V1QuobyteVolumeSource getQuobyte(); - public V1QuobyteVolumeSource buildQuobyte(); - public A withQuobyte(V1QuobyteVolumeSource quobyte); - public Boolean hasQuobyte(); - public V1VolumeFluent.QuobyteNested withNewQuobyte(); - public V1VolumeFluent.QuobyteNested withNewQuobyteLike(V1QuobyteVolumeSource item); - public V1VolumeFluent.QuobyteNested editQuobyte(); - public V1VolumeFluent.QuobyteNested editOrNewQuobyte(); - public V1VolumeFluent.QuobyteNested editOrNewQuobyteLike(V1QuobyteVolumeSource item); - - /** - * This method has been deprecated, please use method buildRbd instead. - * @return The buildable object. - */ - @Deprecated - public V1RBDVolumeSource getRbd(); - public V1RBDVolumeSource buildRbd(); - public A withRbd(V1RBDVolumeSource rbd); - public Boolean hasRbd(); - public V1VolumeFluent.RbdNested withNewRbd(); - public V1VolumeFluent.RbdNested withNewRbdLike(V1RBDVolumeSource item); - public V1VolumeFluent.RbdNested editRbd(); - public V1VolumeFluent.RbdNested editOrNewRbd(); - public V1VolumeFluent.RbdNested editOrNewRbdLike(V1RBDVolumeSource item); - - /** - * This method has been deprecated, please use method buildScaleIO instead. - * @return The buildable object. - */ - @Deprecated - public V1ScaleIOVolumeSource getScaleIO(); - public V1ScaleIOVolumeSource buildScaleIO(); - public A withScaleIO(V1ScaleIOVolumeSource scaleIO); - public Boolean hasScaleIO(); - public V1VolumeFluent.ScaleIONested withNewScaleIO(); - public V1VolumeFluent.ScaleIONested withNewScaleIOLike(V1ScaleIOVolumeSource item); - public V1VolumeFluent.ScaleIONested editScaleIO(); - public V1VolumeFluent.ScaleIONested editOrNewScaleIO(); - public V1VolumeFluent.ScaleIONested editOrNewScaleIOLike(V1ScaleIOVolumeSource item); - - /** - * This method has been deprecated, please use method buildSecret instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretVolumeSource getSecret(); - public V1SecretVolumeSource buildSecret(); - public A withSecret(V1SecretVolumeSource secret); - public Boolean hasSecret(); - public V1VolumeFluent.SecretNested withNewSecret(); - public V1VolumeFluent.SecretNested withNewSecretLike(V1SecretVolumeSource item); - public V1VolumeFluent.SecretNested editSecret(); - public V1VolumeFluent.SecretNested editOrNewSecret(); - public V1VolumeFluent.SecretNested editOrNewSecretLike(V1SecretVolumeSource item); - - /** - * This method has been deprecated, please use method buildStorageos instead. - * @return The buildable object. - */ - @Deprecated - public V1StorageOSVolumeSource getStorageos(); - public V1StorageOSVolumeSource buildStorageos(); - public A withStorageos(V1StorageOSVolumeSource storageos); - public Boolean hasStorageos(); - public V1VolumeFluent.StorageosNested withNewStorageos(); - public V1VolumeFluent.StorageosNested withNewStorageosLike(V1StorageOSVolumeSource item); - public V1VolumeFluent.StorageosNested editStorageos(); - public V1VolumeFluent.StorageosNested editOrNewStorageos(); - public V1VolumeFluent.StorageosNested editOrNewStorageosLike(V1StorageOSVolumeSource item); - - /** - * This method has been deprecated, please use method buildVsphereVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1VsphereVirtualDiskVolumeSource getVsphereVolume(); - public V1VsphereVirtualDiskVolumeSource buildVsphereVolume(); - public A withVsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume); - public Boolean hasVsphereVolume(); - public V1VolumeFluent.VsphereVolumeNested withNewVsphereVolume(); - public V1VolumeFluent.VsphereVolumeNested withNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item); - public V1VolumeFluent.VsphereVolumeNested editVsphereVolume(); - public V1VolumeFluent.VsphereVolumeNested editOrNewVsphereVolume(); - public V1VolumeFluent.VsphereVolumeNested editOrNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item); - public interface AwsElasticBlockStoreNested extends Nested,V1AWSElasticBlockStoreVolumeSourceFluent>{ - public N and(); - public N endAwsElasticBlockStore(); - - } - public interface AzureDiskNested extends Nested,V1AzureDiskVolumeSourceFluent>{ - public N and(); - public N endAzureDisk(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeFluent> extends BaseFluent{ + public V1VolumeFluent() { } - public interface AzureFileNested extends Nested,V1AzureFileVolumeSourceFluent>{ - public N and(); - public N endAzureFile(); + + public V1VolumeFluent(V1Volume instance) { + this.copyInstance(instance); + } + private V1AWSElasticBlockStoreVolumeSourceBuilder awsElasticBlockStore; + private V1AzureDiskVolumeSourceBuilder azureDisk; + private V1AzureFileVolumeSourceBuilder azureFile; + private V1CephFSVolumeSourceBuilder cephfs; + private V1CinderVolumeSourceBuilder cinder; + private V1ConfigMapVolumeSourceBuilder configMap; + private V1CSIVolumeSourceBuilder csi; + private V1DownwardAPIVolumeSourceBuilder downwardAPI; + private V1EmptyDirVolumeSourceBuilder emptyDir; + private V1EphemeralVolumeSourceBuilder ephemeral; + private V1FCVolumeSourceBuilder fc; + private V1FlexVolumeSourceBuilder flexVolume; + private V1FlockerVolumeSourceBuilder flocker; + private V1GCEPersistentDiskVolumeSourceBuilder gcePersistentDisk; + private V1GitRepoVolumeSourceBuilder gitRepo; + private V1GlusterfsVolumeSourceBuilder glusterfs; + private V1HostPathVolumeSourceBuilder hostPath; + private V1ISCSIVolumeSourceBuilder iscsi; + private String name; + private V1NFSVolumeSourceBuilder nfs; + private V1PersistentVolumeClaimVolumeSourceBuilder persistentVolumeClaim; + private V1PhotonPersistentDiskVolumeSourceBuilder photonPersistentDisk; + private V1PortworxVolumeSourceBuilder portworxVolume; + private V1ProjectedVolumeSourceBuilder projected; + private V1QuobyteVolumeSourceBuilder quobyte; + private V1RBDVolumeSourceBuilder rbd; + private V1ScaleIOVolumeSourceBuilder scaleIO; + private V1SecretVolumeSourceBuilder secret; + private V1StorageOSVolumeSourceBuilder storageos; + private V1VsphereVirtualDiskVolumeSourceBuilder vsphereVolume; + + protected void copyInstance(V1Volume instance) { + instance = (instance != null ? instance : new V1Volume()); + if (instance != null) { + this.withAwsElasticBlockStore(instance.getAwsElasticBlockStore()); + this.withAzureDisk(instance.getAzureDisk()); + this.withAzureFile(instance.getAzureFile()); + this.withCephfs(instance.getCephfs()); + this.withCinder(instance.getCinder()); + this.withConfigMap(instance.getConfigMap()); + this.withCsi(instance.getCsi()); + this.withDownwardAPI(instance.getDownwardAPI()); + this.withEmptyDir(instance.getEmptyDir()); + this.withEphemeral(instance.getEphemeral()); + this.withFc(instance.getFc()); + this.withFlexVolume(instance.getFlexVolume()); + this.withFlocker(instance.getFlocker()); + this.withGcePersistentDisk(instance.getGcePersistentDisk()); + this.withGitRepo(instance.getGitRepo()); + this.withGlusterfs(instance.getGlusterfs()); + this.withHostPath(instance.getHostPath()); + this.withIscsi(instance.getIscsi()); + this.withName(instance.getName()); + this.withNfs(instance.getNfs()); + this.withPersistentVolumeClaim(instance.getPersistentVolumeClaim()); + this.withPhotonPersistentDisk(instance.getPhotonPersistentDisk()); + this.withPortworxVolume(instance.getPortworxVolume()); + this.withProjected(instance.getProjected()); + this.withQuobyte(instance.getQuobyte()); + this.withRbd(instance.getRbd()); + this.withScaleIO(instance.getScaleIO()); + this.withSecret(instance.getSecret()); + this.withStorageos(instance.getStorageos()); + this.withVsphereVolume(instance.getVsphereVolume()); + } + } + + public V1AWSElasticBlockStoreVolumeSource buildAwsElasticBlockStore() { + return this.awsElasticBlockStore != null ? this.awsElasticBlockStore.build() : null; + } + + public A withAwsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore) { + this._visitables.remove("awsElasticBlockStore"); + if (awsElasticBlockStore != null) { + this.awsElasticBlockStore = new V1AWSElasticBlockStoreVolumeSourceBuilder(awsElasticBlockStore); + this._visitables.get("awsElasticBlockStore").add(this.awsElasticBlockStore); + } else { + this.awsElasticBlockStore = null; + this._visitables.get("awsElasticBlockStore").remove(this.awsElasticBlockStore); + } + return (A) this; + } + + public boolean hasAwsElasticBlockStore() { + return this.awsElasticBlockStore != null; + } + + public AwsElasticBlockStoreNested withNewAwsElasticBlockStore() { + return new AwsElasticBlockStoreNested(null); + } + + public AwsElasticBlockStoreNested withNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item) { + return new AwsElasticBlockStoreNested(item); + } + + public AwsElasticBlockStoreNested editAwsElasticBlockStore() { + return withNewAwsElasticBlockStoreLike(java.util.Optional.ofNullable(buildAwsElasticBlockStore()).orElse(null)); + } + + public AwsElasticBlockStoreNested editOrNewAwsElasticBlockStore() { + return withNewAwsElasticBlockStoreLike(java.util.Optional.ofNullable(buildAwsElasticBlockStore()).orElse(new V1AWSElasticBlockStoreVolumeSourceBuilder().build())); + } + + public AwsElasticBlockStoreNested editOrNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item) { + return withNewAwsElasticBlockStoreLike(java.util.Optional.ofNullable(buildAwsElasticBlockStore()).orElse(item)); + } + + public V1AzureDiskVolumeSource buildAzureDisk() { + return this.azureDisk != null ? this.azureDisk.build() : null; + } + + public A withAzureDisk(V1AzureDiskVolumeSource azureDisk) { + this._visitables.remove("azureDisk"); + if (azureDisk != null) { + this.azureDisk = new V1AzureDiskVolumeSourceBuilder(azureDisk); + this._visitables.get("azureDisk").add(this.azureDisk); + } else { + this.azureDisk = null; + this._visitables.get("azureDisk").remove(this.azureDisk); + } + return (A) this; + } + + public boolean hasAzureDisk() { + return this.azureDisk != null; + } + + public AzureDiskNested withNewAzureDisk() { + return new AzureDiskNested(null); + } + + public AzureDiskNested withNewAzureDiskLike(V1AzureDiskVolumeSource item) { + return new AzureDiskNested(item); + } + + public AzureDiskNested editAzureDisk() { + return withNewAzureDiskLike(java.util.Optional.ofNullable(buildAzureDisk()).orElse(null)); + } + + public AzureDiskNested editOrNewAzureDisk() { + return withNewAzureDiskLike(java.util.Optional.ofNullable(buildAzureDisk()).orElse(new V1AzureDiskVolumeSourceBuilder().build())); + } + + public AzureDiskNested editOrNewAzureDiskLike(V1AzureDiskVolumeSource item) { + return withNewAzureDiskLike(java.util.Optional.ofNullable(buildAzureDisk()).orElse(item)); + } + + public V1AzureFileVolumeSource buildAzureFile() { + return this.azureFile != null ? this.azureFile.build() : null; + } + + public A withAzureFile(V1AzureFileVolumeSource azureFile) { + this._visitables.remove("azureFile"); + if (azureFile != null) { + this.azureFile = new V1AzureFileVolumeSourceBuilder(azureFile); + this._visitables.get("azureFile").add(this.azureFile); + } else { + this.azureFile = null; + this._visitables.get("azureFile").remove(this.azureFile); + } + return (A) this; + } + + public boolean hasAzureFile() { + return this.azureFile != null; + } + + public AzureFileNested withNewAzureFile() { + return new AzureFileNested(null); + } + + public AzureFileNested withNewAzureFileLike(V1AzureFileVolumeSource item) { + return new AzureFileNested(item); + } + + public AzureFileNested editAzureFile() { + return withNewAzureFileLike(java.util.Optional.ofNullable(buildAzureFile()).orElse(null)); + } + + public AzureFileNested editOrNewAzureFile() { + return withNewAzureFileLike(java.util.Optional.ofNullable(buildAzureFile()).orElse(new V1AzureFileVolumeSourceBuilder().build())); + } + + public AzureFileNested editOrNewAzureFileLike(V1AzureFileVolumeSource item) { + return withNewAzureFileLike(java.util.Optional.ofNullable(buildAzureFile()).orElse(item)); + } + + public V1CephFSVolumeSource buildCephfs() { + return this.cephfs != null ? this.cephfs.build() : null; + } + + public A withCephfs(V1CephFSVolumeSource cephfs) { + this._visitables.remove("cephfs"); + if (cephfs != null) { + this.cephfs = new V1CephFSVolumeSourceBuilder(cephfs); + this._visitables.get("cephfs").add(this.cephfs); + } else { + this.cephfs = null; + this._visitables.get("cephfs").remove(this.cephfs); + } + return (A) this; + } + + public boolean hasCephfs() { + return this.cephfs != null; + } + + public CephfsNested withNewCephfs() { + return new CephfsNested(null); + } + + public CephfsNested withNewCephfsLike(V1CephFSVolumeSource item) { + return new CephfsNested(item); + } + + public CephfsNested editCephfs() { + return withNewCephfsLike(java.util.Optional.ofNullable(buildCephfs()).orElse(null)); + } + + public CephfsNested editOrNewCephfs() { + return withNewCephfsLike(java.util.Optional.ofNullable(buildCephfs()).orElse(new V1CephFSVolumeSourceBuilder().build())); + } + + public CephfsNested editOrNewCephfsLike(V1CephFSVolumeSource item) { + return withNewCephfsLike(java.util.Optional.ofNullable(buildCephfs()).orElse(item)); + } + + public V1CinderVolumeSource buildCinder() { + return this.cinder != null ? this.cinder.build() : null; + } + + public A withCinder(V1CinderVolumeSource cinder) { + this._visitables.remove("cinder"); + if (cinder != null) { + this.cinder = new V1CinderVolumeSourceBuilder(cinder); + this._visitables.get("cinder").add(this.cinder); + } else { + this.cinder = null; + this._visitables.get("cinder").remove(this.cinder); + } + return (A) this; + } + + public boolean hasCinder() { + return this.cinder != null; + } + + public CinderNested withNewCinder() { + return new CinderNested(null); + } + + public CinderNested withNewCinderLike(V1CinderVolumeSource item) { + return new CinderNested(item); + } + + public CinderNested editCinder() { + return withNewCinderLike(java.util.Optional.ofNullable(buildCinder()).orElse(null)); + } + + public CinderNested editOrNewCinder() { + return withNewCinderLike(java.util.Optional.ofNullable(buildCinder()).orElse(new V1CinderVolumeSourceBuilder().build())); + } + + public CinderNested editOrNewCinderLike(V1CinderVolumeSource item) { + return withNewCinderLike(java.util.Optional.ofNullable(buildCinder()).orElse(item)); + } + + public V1ConfigMapVolumeSource buildConfigMap() { + return this.configMap != null ? this.configMap.build() : null; + } + + public A withConfigMap(V1ConfigMapVolumeSource configMap) { + this._visitables.remove("configMap"); + if (configMap != null) { + this.configMap = new V1ConfigMapVolumeSourceBuilder(configMap); + this._visitables.get("configMap").add(this.configMap); + } else { + this.configMap = null; + this._visitables.get("configMap").remove(this.configMap); + } + return (A) this; + } + + public boolean hasConfigMap() { + return this.configMap != null; + } + + public ConfigMapNested withNewConfigMap() { + return new ConfigMapNested(null); + } + + public ConfigMapNested withNewConfigMapLike(V1ConfigMapVolumeSource item) { + return new ConfigMapNested(item); + } + + public ConfigMapNested editConfigMap() { + return withNewConfigMapLike(java.util.Optional.ofNullable(buildConfigMap()).orElse(null)); + } + + public ConfigMapNested editOrNewConfigMap() { + return withNewConfigMapLike(java.util.Optional.ofNullable(buildConfigMap()).orElse(new V1ConfigMapVolumeSourceBuilder().build())); + } + + public ConfigMapNested editOrNewConfigMapLike(V1ConfigMapVolumeSource item) { + return withNewConfigMapLike(java.util.Optional.ofNullable(buildConfigMap()).orElse(item)); + } + + public V1CSIVolumeSource buildCsi() { + return this.csi != null ? this.csi.build() : null; + } + + public A withCsi(V1CSIVolumeSource csi) { + this._visitables.remove("csi"); + if (csi != null) { + this.csi = new V1CSIVolumeSourceBuilder(csi); + this._visitables.get("csi").add(this.csi); + } else { + this.csi = null; + this._visitables.get("csi").remove(this.csi); + } + return (A) this; + } + + public boolean hasCsi() { + return this.csi != null; + } + + public CsiNested withNewCsi() { + return new CsiNested(null); + } + + public CsiNested withNewCsiLike(V1CSIVolumeSource item) { + return new CsiNested(item); + } + + public CsiNested editCsi() { + return withNewCsiLike(java.util.Optional.ofNullable(buildCsi()).orElse(null)); + } + + public CsiNested editOrNewCsi() { + return withNewCsiLike(java.util.Optional.ofNullable(buildCsi()).orElse(new V1CSIVolumeSourceBuilder().build())); + } + + public CsiNested editOrNewCsiLike(V1CSIVolumeSource item) { + return withNewCsiLike(java.util.Optional.ofNullable(buildCsi()).orElse(item)); + } + + public V1DownwardAPIVolumeSource buildDownwardAPI() { + return this.downwardAPI != null ? this.downwardAPI.build() : null; + } + + public A withDownwardAPI(V1DownwardAPIVolumeSource downwardAPI) { + this._visitables.remove("downwardAPI"); + if (downwardAPI != null) { + this.downwardAPI = new V1DownwardAPIVolumeSourceBuilder(downwardAPI); + this._visitables.get("downwardAPI").add(this.downwardAPI); + } else { + this.downwardAPI = null; + this._visitables.get("downwardAPI").remove(this.downwardAPI); + } + return (A) this; + } + + public boolean hasDownwardAPI() { + return this.downwardAPI != null; + } + + public DownwardAPINested withNewDownwardAPI() { + return new DownwardAPINested(null); + } + + public DownwardAPINested withNewDownwardAPILike(V1DownwardAPIVolumeSource item) { + return new DownwardAPINested(item); + } + + public DownwardAPINested editDownwardAPI() { + return withNewDownwardAPILike(java.util.Optional.ofNullable(buildDownwardAPI()).orElse(null)); + } + + public DownwardAPINested editOrNewDownwardAPI() { + return withNewDownwardAPILike(java.util.Optional.ofNullable(buildDownwardAPI()).orElse(new V1DownwardAPIVolumeSourceBuilder().build())); + } + + public DownwardAPINested editOrNewDownwardAPILike(V1DownwardAPIVolumeSource item) { + return withNewDownwardAPILike(java.util.Optional.ofNullable(buildDownwardAPI()).orElse(item)); + } + + public V1EmptyDirVolumeSource buildEmptyDir() { + return this.emptyDir != null ? this.emptyDir.build() : null; + } + + public A withEmptyDir(V1EmptyDirVolumeSource emptyDir) { + this._visitables.remove("emptyDir"); + if (emptyDir != null) { + this.emptyDir = new V1EmptyDirVolumeSourceBuilder(emptyDir); + this._visitables.get("emptyDir").add(this.emptyDir); + } else { + this.emptyDir = null; + this._visitables.get("emptyDir").remove(this.emptyDir); + } + return (A) this; + } + + public boolean hasEmptyDir() { + return this.emptyDir != null; + } + + public EmptyDirNested withNewEmptyDir() { + return new EmptyDirNested(null); + } + + public EmptyDirNested withNewEmptyDirLike(V1EmptyDirVolumeSource item) { + return new EmptyDirNested(item); + } + + public EmptyDirNested editEmptyDir() { + return withNewEmptyDirLike(java.util.Optional.ofNullable(buildEmptyDir()).orElse(null)); + } + + public EmptyDirNested editOrNewEmptyDir() { + return withNewEmptyDirLike(java.util.Optional.ofNullable(buildEmptyDir()).orElse(new V1EmptyDirVolumeSourceBuilder().build())); + } + + public EmptyDirNested editOrNewEmptyDirLike(V1EmptyDirVolumeSource item) { + return withNewEmptyDirLike(java.util.Optional.ofNullable(buildEmptyDir()).orElse(item)); + } + + public V1EphemeralVolumeSource buildEphemeral() { + return this.ephemeral != null ? this.ephemeral.build() : null; + } + + public A withEphemeral(V1EphemeralVolumeSource ephemeral) { + this._visitables.remove("ephemeral"); + if (ephemeral != null) { + this.ephemeral = new V1EphemeralVolumeSourceBuilder(ephemeral); + this._visitables.get("ephemeral").add(this.ephemeral); + } else { + this.ephemeral = null; + this._visitables.get("ephemeral").remove(this.ephemeral); + } + return (A) this; + } + + public boolean hasEphemeral() { + return this.ephemeral != null; + } + + public EphemeralNested withNewEphemeral() { + return new EphemeralNested(null); + } + + public EphemeralNested withNewEphemeralLike(V1EphemeralVolumeSource item) { + return new EphemeralNested(item); + } + + public EphemeralNested editEphemeral() { + return withNewEphemeralLike(java.util.Optional.ofNullable(buildEphemeral()).orElse(null)); + } + + public EphemeralNested editOrNewEphemeral() { + return withNewEphemeralLike(java.util.Optional.ofNullable(buildEphemeral()).orElse(new V1EphemeralVolumeSourceBuilder().build())); + } + + public EphemeralNested editOrNewEphemeralLike(V1EphemeralVolumeSource item) { + return withNewEphemeralLike(java.util.Optional.ofNullable(buildEphemeral()).orElse(item)); + } + + public V1FCVolumeSource buildFc() { + return this.fc != null ? this.fc.build() : null; + } + + public A withFc(V1FCVolumeSource fc) { + this._visitables.remove("fc"); + if (fc != null) { + this.fc = new V1FCVolumeSourceBuilder(fc); + this._visitables.get("fc").add(this.fc); + } else { + this.fc = null; + this._visitables.get("fc").remove(this.fc); + } + return (A) this; + } + + public boolean hasFc() { + return this.fc != null; + } + + public FcNested withNewFc() { + return new FcNested(null); + } + + public FcNested withNewFcLike(V1FCVolumeSource item) { + return new FcNested(item); + } + + public FcNested editFc() { + return withNewFcLike(java.util.Optional.ofNullable(buildFc()).orElse(null)); + } + + public FcNested editOrNewFc() { + return withNewFcLike(java.util.Optional.ofNullable(buildFc()).orElse(new V1FCVolumeSourceBuilder().build())); + } + + public FcNested editOrNewFcLike(V1FCVolumeSource item) { + return withNewFcLike(java.util.Optional.ofNullable(buildFc()).orElse(item)); + } + + public V1FlexVolumeSource buildFlexVolume() { + return this.flexVolume != null ? this.flexVolume.build() : null; + } + + public A withFlexVolume(V1FlexVolumeSource flexVolume) { + this._visitables.remove("flexVolume"); + if (flexVolume != null) { + this.flexVolume = new V1FlexVolumeSourceBuilder(flexVolume); + this._visitables.get("flexVolume").add(this.flexVolume); + } else { + this.flexVolume = null; + this._visitables.get("flexVolume").remove(this.flexVolume); + } + return (A) this; + } + + public boolean hasFlexVolume() { + return this.flexVolume != null; + } + + public FlexVolumeNested withNewFlexVolume() { + return new FlexVolumeNested(null); + } + + public FlexVolumeNested withNewFlexVolumeLike(V1FlexVolumeSource item) { + return new FlexVolumeNested(item); + } + + public FlexVolumeNested editFlexVolume() { + return withNewFlexVolumeLike(java.util.Optional.ofNullable(buildFlexVolume()).orElse(null)); + } + + public FlexVolumeNested editOrNewFlexVolume() { + return withNewFlexVolumeLike(java.util.Optional.ofNullable(buildFlexVolume()).orElse(new V1FlexVolumeSourceBuilder().build())); + } + + public FlexVolumeNested editOrNewFlexVolumeLike(V1FlexVolumeSource item) { + return withNewFlexVolumeLike(java.util.Optional.ofNullable(buildFlexVolume()).orElse(item)); + } + + public V1FlockerVolumeSource buildFlocker() { + return this.flocker != null ? this.flocker.build() : null; + } + + public A withFlocker(V1FlockerVolumeSource flocker) { + this._visitables.remove("flocker"); + if (flocker != null) { + this.flocker = new V1FlockerVolumeSourceBuilder(flocker); + this._visitables.get("flocker").add(this.flocker); + } else { + this.flocker = null; + this._visitables.get("flocker").remove(this.flocker); + } + return (A) this; + } + + public boolean hasFlocker() { + return this.flocker != null; + } + + public FlockerNested withNewFlocker() { + return new FlockerNested(null); + } + + public FlockerNested withNewFlockerLike(V1FlockerVolumeSource item) { + return new FlockerNested(item); + } + + public FlockerNested editFlocker() { + return withNewFlockerLike(java.util.Optional.ofNullable(buildFlocker()).orElse(null)); + } + + public FlockerNested editOrNewFlocker() { + return withNewFlockerLike(java.util.Optional.ofNullable(buildFlocker()).orElse(new V1FlockerVolumeSourceBuilder().build())); + } + + public FlockerNested editOrNewFlockerLike(V1FlockerVolumeSource item) { + return withNewFlockerLike(java.util.Optional.ofNullable(buildFlocker()).orElse(item)); + } + + public V1GCEPersistentDiskVolumeSource buildGcePersistentDisk() { + return this.gcePersistentDisk != null ? this.gcePersistentDisk.build() : null; + } + + public A withGcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk) { + this._visitables.remove("gcePersistentDisk"); + if (gcePersistentDisk != null) { + this.gcePersistentDisk = new V1GCEPersistentDiskVolumeSourceBuilder(gcePersistentDisk); + this._visitables.get("gcePersistentDisk").add(this.gcePersistentDisk); + } else { + this.gcePersistentDisk = null; + this._visitables.get("gcePersistentDisk").remove(this.gcePersistentDisk); + } + return (A) this; + } + + public boolean hasGcePersistentDisk() { + return this.gcePersistentDisk != null; + } + + public GcePersistentDiskNested withNewGcePersistentDisk() { + return new GcePersistentDiskNested(null); + } + + public GcePersistentDiskNested withNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item) { + return new GcePersistentDiskNested(item); + } + + public GcePersistentDiskNested editGcePersistentDisk() { + return withNewGcePersistentDiskLike(java.util.Optional.ofNullable(buildGcePersistentDisk()).orElse(null)); + } + + public GcePersistentDiskNested editOrNewGcePersistentDisk() { + return withNewGcePersistentDiskLike(java.util.Optional.ofNullable(buildGcePersistentDisk()).orElse(new V1GCEPersistentDiskVolumeSourceBuilder().build())); + } + + public GcePersistentDiskNested editOrNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item) { + return withNewGcePersistentDiskLike(java.util.Optional.ofNullable(buildGcePersistentDisk()).orElse(item)); + } + + public V1GitRepoVolumeSource buildGitRepo() { + return this.gitRepo != null ? this.gitRepo.build() : null; + } + + public A withGitRepo(V1GitRepoVolumeSource gitRepo) { + this._visitables.remove("gitRepo"); + if (gitRepo != null) { + this.gitRepo = new V1GitRepoVolumeSourceBuilder(gitRepo); + this._visitables.get("gitRepo").add(this.gitRepo); + } else { + this.gitRepo = null; + this._visitables.get("gitRepo").remove(this.gitRepo); + } + return (A) this; + } + + public boolean hasGitRepo() { + return this.gitRepo != null; + } + + public GitRepoNested withNewGitRepo() { + return new GitRepoNested(null); + } + + public GitRepoNested withNewGitRepoLike(V1GitRepoVolumeSource item) { + return new GitRepoNested(item); + } + + public GitRepoNested editGitRepo() { + return withNewGitRepoLike(java.util.Optional.ofNullable(buildGitRepo()).orElse(null)); + } + + public GitRepoNested editOrNewGitRepo() { + return withNewGitRepoLike(java.util.Optional.ofNullable(buildGitRepo()).orElse(new V1GitRepoVolumeSourceBuilder().build())); + } + + public GitRepoNested editOrNewGitRepoLike(V1GitRepoVolumeSource item) { + return withNewGitRepoLike(java.util.Optional.ofNullable(buildGitRepo()).orElse(item)); + } + + public V1GlusterfsVolumeSource buildGlusterfs() { + return this.glusterfs != null ? this.glusterfs.build() : null; + } + + public A withGlusterfs(V1GlusterfsVolumeSource glusterfs) { + this._visitables.remove("glusterfs"); + if (glusterfs != null) { + this.glusterfs = new V1GlusterfsVolumeSourceBuilder(glusterfs); + this._visitables.get("glusterfs").add(this.glusterfs); + } else { + this.glusterfs = null; + this._visitables.get("glusterfs").remove(this.glusterfs); + } + return (A) this; + } + + public boolean hasGlusterfs() { + return this.glusterfs != null; + } + + public GlusterfsNested withNewGlusterfs() { + return new GlusterfsNested(null); + } + + public GlusterfsNested withNewGlusterfsLike(V1GlusterfsVolumeSource item) { + return new GlusterfsNested(item); + } + + public GlusterfsNested editGlusterfs() { + return withNewGlusterfsLike(java.util.Optional.ofNullable(buildGlusterfs()).orElse(null)); + } + + public GlusterfsNested editOrNewGlusterfs() { + return withNewGlusterfsLike(java.util.Optional.ofNullable(buildGlusterfs()).orElse(new V1GlusterfsVolumeSourceBuilder().build())); + } + + public GlusterfsNested editOrNewGlusterfsLike(V1GlusterfsVolumeSource item) { + return withNewGlusterfsLike(java.util.Optional.ofNullable(buildGlusterfs()).orElse(item)); + } + + public V1HostPathVolumeSource buildHostPath() { + return this.hostPath != null ? this.hostPath.build() : null; + } + + public A withHostPath(V1HostPathVolumeSource hostPath) { + this._visitables.remove("hostPath"); + if (hostPath != null) { + this.hostPath = new V1HostPathVolumeSourceBuilder(hostPath); + this._visitables.get("hostPath").add(this.hostPath); + } else { + this.hostPath = null; + this._visitables.get("hostPath").remove(this.hostPath); + } + return (A) this; + } + + public boolean hasHostPath() { + return this.hostPath != null; + } + + public HostPathNested withNewHostPath() { + return new HostPathNested(null); + } + + public HostPathNested withNewHostPathLike(V1HostPathVolumeSource item) { + return new HostPathNested(item); + } + + public HostPathNested editHostPath() { + return withNewHostPathLike(java.util.Optional.ofNullable(buildHostPath()).orElse(null)); + } + + public HostPathNested editOrNewHostPath() { + return withNewHostPathLike(java.util.Optional.ofNullable(buildHostPath()).orElse(new V1HostPathVolumeSourceBuilder().build())); + } + + public HostPathNested editOrNewHostPathLike(V1HostPathVolumeSource item) { + return withNewHostPathLike(java.util.Optional.ofNullable(buildHostPath()).orElse(item)); + } + + public V1ISCSIVolumeSource buildIscsi() { + return this.iscsi != null ? this.iscsi.build() : null; + } + + public A withIscsi(V1ISCSIVolumeSource iscsi) { + this._visitables.remove("iscsi"); + if (iscsi != null) { + this.iscsi = new V1ISCSIVolumeSourceBuilder(iscsi); + this._visitables.get("iscsi").add(this.iscsi); + } else { + this.iscsi = null; + this._visitables.get("iscsi").remove(this.iscsi); + } + return (A) this; + } + + public boolean hasIscsi() { + return this.iscsi != null; + } + + public IscsiNested withNewIscsi() { + return new IscsiNested(null); + } + + public IscsiNested withNewIscsiLike(V1ISCSIVolumeSource item) { + return new IscsiNested(item); + } + + public IscsiNested editIscsi() { + return withNewIscsiLike(java.util.Optional.ofNullable(buildIscsi()).orElse(null)); + } + + public IscsiNested editOrNewIscsi() { + return withNewIscsiLike(java.util.Optional.ofNullable(buildIscsi()).orElse(new V1ISCSIVolumeSourceBuilder().build())); + } + + public IscsiNested editOrNewIscsiLike(V1ISCSIVolumeSource item) { + return withNewIscsiLike(java.util.Optional.ofNullable(buildIscsi()).orElse(item)); + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public V1NFSVolumeSource buildNfs() { + return this.nfs != null ? this.nfs.build() : null; + } + + public A withNfs(V1NFSVolumeSource nfs) { + this._visitables.remove("nfs"); + if (nfs != null) { + this.nfs = new V1NFSVolumeSourceBuilder(nfs); + this._visitables.get("nfs").add(this.nfs); + } else { + this.nfs = null; + this._visitables.get("nfs").remove(this.nfs); + } + return (A) this; + } + + public boolean hasNfs() { + return this.nfs != null; + } + + public NfsNested withNewNfs() { + return new NfsNested(null); + } + + public NfsNested withNewNfsLike(V1NFSVolumeSource item) { + return new NfsNested(item); + } + + public NfsNested editNfs() { + return withNewNfsLike(java.util.Optional.ofNullable(buildNfs()).orElse(null)); + } + + public NfsNested editOrNewNfs() { + return withNewNfsLike(java.util.Optional.ofNullable(buildNfs()).orElse(new V1NFSVolumeSourceBuilder().build())); + } + + public NfsNested editOrNewNfsLike(V1NFSVolumeSource item) { + return withNewNfsLike(java.util.Optional.ofNullable(buildNfs()).orElse(item)); + } + + public V1PersistentVolumeClaimVolumeSource buildPersistentVolumeClaim() { + return this.persistentVolumeClaim != null ? this.persistentVolumeClaim.build() : null; + } + + public A withPersistentVolumeClaim(V1PersistentVolumeClaimVolumeSource persistentVolumeClaim) { + this._visitables.remove("persistentVolumeClaim"); + if (persistentVolumeClaim != null) { + this.persistentVolumeClaim = new V1PersistentVolumeClaimVolumeSourceBuilder(persistentVolumeClaim); + this._visitables.get("persistentVolumeClaim").add(this.persistentVolumeClaim); + } else { + this.persistentVolumeClaim = null; + this._visitables.get("persistentVolumeClaim").remove(this.persistentVolumeClaim); + } + return (A) this; + } + + public boolean hasPersistentVolumeClaim() { + return this.persistentVolumeClaim != null; + } + + public PersistentVolumeClaimNested withNewPersistentVolumeClaim() { + return new PersistentVolumeClaimNested(null); + } + + public PersistentVolumeClaimNested withNewPersistentVolumeClaimLike(V1PersistentVolumeClaimVolumeSource item) { + return new PersistentVolumeClaimNested(item); + } + + public PersistentVolumeClaimNested editPersistentVolumeClaim() { + return withNewPersistentVolumeClaimLike(java.util.Optional.ofNullable(buildPersistentVolumeClaim()).orElse(null)); + } + + public PersistentVolumeClaimNested editOrNewPersistentVolumeClaim() { + return withNewPersistentVolumeClaimLike(java.util.Optional.ofNullable(buildPersistentVolumeClaim()).orElse(new V1PersistentVolumeClaimVolumeSourceBuilder().build())); + } + + public PersistentVolumeClaimNested editOrNewPersistentVolumeClaimLike(V1PersistentVolumeClaimVolumeSource item) { + return withNewPersistentVolumeClaimLike(java.util.Optional.ofNullable(buildPersistentVolumeClaim()).orElse(item)); + } + + public V1PhotonPersistentDiskVolumeSource buildPhotonPersistentDisk() { + return this.photonPersistentDisk != null ? this.photonPersistentDisk.build() : null; + } + + public A withPhotonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk) { + this._visitables.remove("photonPersistentDisk"); + if (photonPersistentDisk != null) { + this.photonPersistentDisk = new V1PhotonPersistentDiskVolumeSourceBuilder(photonPersistentDisk); + this._visitables.get("photonPersistentDisk").add(this.photonPersistentDisk); + } else { + this.photonPersistentDisk = null; + this._visitables.get("photonPersistentDisk").remove(this.photonPersistentDisk); + } + return (A) this; + } + + public boolean hasPhotonPersistentDisk() { + return this.photonPersistentDisk != null; + } + + public PhotonPersistentDiskNested withNewPhotonPersistentDisk() { + return new PhotonPersistentDiskNested(null); + } + + public PhotonPersistentDiskNested withNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item) { + return new PhotonPersistentDiskNested(item); + } + + public PhotonPersistentDiskNested editPhotonPersistentDisk() { + return withNewPhotonPersistentDiskLike(java.util.Optional.ofNullable(buildPhotonPersistentDisk()).orElse(null)); + } + + public PhotonPersistentDiskNested editOrNewPhotonPersistentDisk() { + return withNewPhotonPersistentDiskLike(java.util.Optional.ofNullable(buildPhotonPersistentDisk()).orElse(new V1PhotonPersistentDiskVolumeSourceBuilder().build())); + } + + public PhotonPersistentDiskNested editOrNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item) { + return withNewPhotonPersistentDiskLike(java.util.Optional.ofNullable(buildPhotonPersistentDisk()).orElse(item)); + } + + public V1PortworxVolumeSource buildPortworxVolume() { + return this.portworxVolume != null ? this.portworxVolume.build() : null; + } + + public A withPortworxVolume(V1PortworxVolumeSource portworxVolume) { + this._visitables.remove("portworxVolume"); + if (portworxVolume != null) { + this.portworxVolume = new V1PortworxVolumeSourceBuilder(portworxVolume); + this._visitables.get("portworxVolume").add(this.portworxVolume); + } else { + this.portworxVolume = null; + this._visitables.get("portworxVolume").remove(this.portworxVolume); + } + return (A) this; + } + + public boolean hasPortworxVolume() { + return this.portworxVolume != null; + } + + public PortworxVolumeNested withNewPortworxVolume() { + return new PortworxVolumeNested(null); + } + + public PortworxVolumeNested withNewPortworxVolumeLike(V1PortworxVolumeSource item) { + return new PortworxVolumeNested(item); + } + + public PortworxVolumeNested editPortworxVolume() { + return withNewPortworxVolumeLike(java.util.Optional.ofNullable(buildPortworxVolume()).orElse(null)); + } + + public PortworxVolumeNested editOrNewPortworxVolume() { + return withNewPortworxVolumeLike(java.util.Optional.ofNullable(buildPortworxVolume()).orElse(new V1PortworxVolumeSourceBuilder().build())); + } + + public PortworxVolumeNested editOrNewPortworxVolumeLike(V1PortworxVolumeSource item) { + return withNewPortworxVolumeLike(java.util.Optional.ofNullable(buildPortworxVolume()).orElse(item)); + } + + public V1ProjectedVolumeSource buildProjected() { + return this.projected != null ? this.projected.build() : null; + } + + public A withProjected(V1ProjectedVolumeSource projected) { + this._visitables.remove("projected"); + if (projected != null) { + this.projected = new V1ProjectedVolumeSourceBuilder(projected); + this._visitables.get("projected").add(this.projected); + } else { + this.projected = null; + this._visitables.get("projected").remove(this.projected); + } + return (A) this; + } + + public boolean hasProjected() { + return this.projected != null; + } + + public ProjectedNested withNewProjected() { + return new ProjectedNested(null); + } + + public ProjectedNested withNewProjectedLike(V1ProjectedVolumeSource item) { + return new ProjectedNested(item); + } + + public ProjectedNested editProjected() { + return withNewProjectedLike(java.util.Optional.ofNullable(buildProjected()).orElse(null)); + } + + public ProjectedNested editOrNewProjected() { + return withNewProjectedLike(java.util.Optional.ofNullable(buildProjected()).orElse(new V1ProjectedVolumeSourceBuilder().build())); + } + + public ProjectedNested editOrNewProjectedLike(V1ProjectedVolumeSource item) { + return withNewProjectedLike(java.util.Optional.ofNullable(buildProjected()).orElse(item)); + } + + public V1QuobyteVolumeSource buildQuobyte() { + return this.quobyte != null ? this.quobyte.build() : null; + } + + public A withQuobyte(V1QuobyteVolumeSource quobyte) { + this._visitables.remove("quobyte"); + if (quobyte != null) { + this.quobyte = new V1QuobyteVolumeSourceBuilder(quobyte); + this._visitables.get("quobyte").add(this.quobyte); + } else { + this.quobyte = null; + this._visitables.get("quobyte").remove(this.quobyte); + } + return (A) this; + } + + public boolean hasQuobyte() { + return this.quobyte != null; + } + + public QuobyteNested withNewQuobyte() { + return new QuobyteNested(null); + } + + public QuobyteNested withNewQuobyteLike(V1QuobyteVolumeSource item) { + return new QuobyteNested(item); + } + + public QuobyteNested editQuobyte() { + return withNewQuobyteLike(java.util.Optional.ofNullable(buildQuobyte()).orElse(null)); + } + + public QuobyteNested editOrNewQuobyte() { + return withNewQuobyteLike(java.util.Optional.ofNullable(buildQuobyte()).orElse(new V1QuobyteVolumeSourceBuilder().build())); + } + + public QuobyteNested editOrNewQuobyteLike(V1QuobyteVolumeSource item) { + return withNewQuobyteLike(java.util.Optional.ofNullable(buildQuobyte()).orElse(item)); + } + + public V1RBDVolumeSource buildRbd() { + return this.rbd != null ? this.rbd.build() : null; + } + + public A withRbd(V1RBDVolumeSource rbd) { + this._visitables.remove("rbd"); + if (rbd != null) { + this.rbd = new V1RBDVolumeSourceBuilder(rbd); + this._visitables.get("rbd").add(this.rbd); + } else { + this.rbd = null; + this._visitables.get("rbd").remove(this.rbd); + } + return (A) this; + } + + public boolean hasRbd() { + return this.rbd != null; + } + + public RbdNested withNewRbd() { + return new RbdNested(null); + } + + public RbdNested withNewRbdLike(V1RBDVolumeSource item) { + return new RbdNested(item); + } + + public RbdNested editRbd() { + return withNewRbdLike(java.util.Optional.ofNullable(buildRbd()).orElse(null)); + } + + public RbdNested editOrNewRbd() { + return withNewRbdLike(java.util.Optional.ofNullable(buildRbd()).orElse(new V1RBDVolumeSourceBuilder().build())); + } + + public RbdNested editOrNewRbdLike(V1RBDVolumeSource item) { + return withNewRbdLike(java.util.Optional.ofNullable(buildRbd()).orElse(item)); + } + + public V1ScaleIOVolumeSource buildScaleIO() { + return this.scaleIO != null ? this.scaleIO.build() : null; + } + + public A withScaleIO(V1ScaleIOVolumeSource scaleIO) { + this._visitables.remove("scaleIO"); + if (scaleIO != null) { + this.scaleIO = new V1ScaleIOVolumeSourceBuilder(scaleIO); + this._visitables.get("scaleIO").add(this.scaleIO); + } else { + this.scaleIO = null; + this._visitables.get("scaleIO").remove(this.scaleIO); + } + return (A) this; + } + + public boolean hasScaleIO() { + return this.scaleIO != null; + } + + public ScaleIONested withNewScaleIO() { + return new ScaleIONested(null); + } + + public ScaleIONested withNewScaleIOLike(V1ScaleIOVolumeSource item) { + return new ScaleIONested(item); + } + + public ScaleIONested editScaleIO() { + return withNewScaleIOLike(java.util.Optional.ofNullable(buildScaleIO()).orElse(null)); + } + + public ScaleIONested editOrNewScaleIO() { + return withNewScaleIOLike(java.util.Optional.ofNullable(buildScaleIO()).orElse(new V1ScaleIOVolumeSourceBuilder().build())); + } + + public ScaleIONested editOrNewScaleIOLike(V1ScaleIOVolumeSource item) { + return withNewScaleIOLike(java.util.Optional.ofNullable(buildScaleIO()).orElse(item)); + } + + public V1SecretVolumeSource buildSecret() { + return this.secret != null ? this.secret.build() : null; + } + + public A withSecret(V1SecretVolumeSource secret) { + this._visitables.remove("secret"); + if (secret != null) { + this.secret = new V1SecretVolumeSourceBuilder(secret); + this._visitables.get("secret").add(this.secret); + } else { + this.secret = null; + this._visitables.get("secret").remove(this.secret); + } + return (A) this; + } + + public boolean hasSecret() { + return this.secret != null; + } + + public SecretNested withNewSecret() { + return new SecretNested(null); + } + + public SecretNested withNewSecretLike(V1SecretVolumeSource item) { + return new SecretNested(item); + } + + public SecretNested editSecret() { + return withNewSecretLike(java.util.Optional.ofNullable(buildSecret()).orElse(null)); + } + + public SecretNested editOrNewSecret() { + return withNewSecretLike(java.util.Optional.ofNullable(buildSecret()).orElse(new V1SecretVolumeSourceBuilder().build())); + } + + public SecretNested editOrNewSecretLike(V1SecretVolumeSource item) { + return withNewSecretLike(java.util.Optional.ofNullable(buildSecret()).orElse(item)); + } + + public V1StorageOSVolumeSource buildStorageos() { + return this.storageos != null ? this.storageos.build() : null; + } + + public A withStorageos(V1StorageOSVolumeSource storageos) { + this._visitables.remove("storageos"); + if (storageos != null) { + this.storageos = new V1StorageOSVolumeSourceBuilder(storageos); + this._visitables.get("storageos").add(this.storageos); + } else { + this.storageos = null; + this._visitables.get("storageos").remove(this.storageos); + } + return (A) this; + } + + public boolean hasStorageos() { + return this.storageos != null; + } + + public StorageosNested withNewStorageos() { + return new StorageosNested(null); + } + + public StorageosNested withNewStorageosLike(V1StorageOSVolumeSource item) { + return new StorageosNested(item); + } + + public StorageosNested editStorageos() { + return withNewStorageosLike(java.util.Optional.ofNullable(buildStorageos()).orElse(null)); + } + + public StorageosNested editOrNewStorageos() { + return withNewStorageosLike(java.util.Optional.ofNullable(buildStorageos()).orElse(new V1StorageOSVolumeSourceBuilder().build())); + } + + public StorageosNested editOrNewStorageosLike(V1StorageOSVolumeSource item) { + return withNewStorageosLike(java.util.Optional.ofNullable(buildStorageos()).orElse(item)); + } + + public V1VsphereVirtualDiskVolumeSource buildVsphereVolume() { + return this.vsphereVolume != null ? this.vsphereVolume.build() : null; + } + + public A withVsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume) { + this._visitables.remove("vsphereVolume"); + if (vsphereVolume != null) { + this.vsphereVolume = new V1VsphereVirtualDiskVolumeSourceBuilder(vsphereVolume); + this._visitables.get("vsphereVolume").add(this.vsphereVolume); + } else { + this.vsphereVolume = null; + this._visitables.get("vsphereVolume").remove(this.vsphereVolume); + } + return (A) this; + } + + public boolean hasVsphereVolume() { + return this.vsphereVolume != null; + } + + public VsphereVolumeNested withNewVsphereVolume() { + return new VsphereVolumeNested(null); + } + + public VsphereVolumeNested withNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item) { + return new VsphereVolumeNested(item); + } + + public VsphereVolumeNested editVsphereVolume() { + return withNewVsphereVolumeLike(java.util.Optional.ofNullable(buildVsphereVolume()).orElse(null)); + } + + public VsphereVolumeNested editOrNewVsphereVolume() { + return withNewVsphereVolumeLike(java.util.Optional.ofNullable(buildVsphereVolume()).orElse(new V1VsphereVirtualDiskVolumeSourceBuilder().build())); + } + + public VsphereVolumeNested editOrNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item) { + return withNewVsphereVolumeLike(java.util.Optional.ofNullable(buildVsphereVolume()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeFluent that = (V1VolumeFluent) o; + if (!java.util.Objects.equals(awsElasticBlockStore, that.awsElasticBlockStore)) return false; + if (!java.util.Objects.equals(azureDisk, that.azureDisk)) return false; + if (!java.util.Objects.equals(azureFile, that.azureFile)) return false; + if (!java.util.Objects.equals(cephfs, that.cephfs)) return false; + if (!java.util.Objects.equals(cinder, that.cinder)) return false; + if (!java.util.Objects.equals(configMap, that.configMap)) return false; + if (!java.util.Objects.equals(csi, that.csi)) return false; + if (!java.util.Objects.equals(downwardAPI, that.downwardAPI)) return false; + if (!java.util.Objects.equals(emptyDir, that.emptyDir)) return false; + if (!java.util.Objects.equals(ephemeral, that.ephemeral)) return false; + if (!java.util.Objects.equals(fc, that.fc)) return false; + if (!java.util.Objects.equals(flexVolume, that.flexVolume)) return false; + if (!java.util.Objects.equals(flocker, that.flocker)) return false; + if (!java.util.Objects.equals(gcePersistentDisk, that.gcePersistentDisk)) return false; + if (!java.util.Objects.equals(gitRepo, that.gitRepo)) return false; + if (!java.util.Objects.equals(glusterfs, that.glusterfs)) return false; + if (!java.util.Objects.equals(hostPath, that.hostPath)) return false; + if (!java.util.Objects.equals(iscsi, that.iscsi)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(nfs, that.nfs)) return false; + if (!java.util.Objects.equals(persistentVolumeClaim, that.persistentVolumeClaim)) return false; + if (!java.util.Objects.equals(photonPersistentDisk, that.photonPersistentDisk)) return false; + if (!java.util.Objects.equals(portworxVolume, that.portworxVolume)) return false; + if (!java.util.Objects.equals(projected, that.projected)) return false; + if (!java.util.Objects.equals(quobyte, that.quobyte)) return false; + if (!java.util.Objects.equals(rbd, that.rbd)) return false; + if (!java.util.Objects.equals(scaleIO, that.scaleIO)) return false; + if (!java.util.Objects.equals(secret, that.secret)) return false; + if (!java.util.Objects.equals(storageos, that.storageos)) return false; + if (!java.util.Objects.equals(vsphereVolume, that.vsphereVolume)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(awsElasticBlockStore, azureDisk, azureFile, cephfs, cinder, configMap, csi, downwardAPI, emptyDir, ephemeral, fc, flexVolume, flocker, gcePersistentDisk, gitRepo, glusterfs, hostPath, iscsi, name, nfs, persistentVolumeClaim, photonPersistentDisk, portworxVolume, projected, quobyte, rbd, scaleIO, secret, storageos, vsphereVolume, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (awsElasticBlockStore != null) { sb.append("awsElasticBlockStore:"); sb.append(awsElasticBlockStore + ","); } + if (azureDisk != null) { sb.append("azureDisk:"); sb.append(azureDisk + ","); } + if (azureFile != null) { sb.append("azureFile:"); sb.append(azureFile + ","); } + if (cephfs != null) { sb.append("cephfs:"); sb.append(cephfs + ","); } + if (cinder != null) { sb.append("cinder:"); sb.append(cinder + ","); } + if (configMap != null) { sb.append("configMap:"); sb.append(configMap + ","); } + if (csi != null) { sb.append("csi:"); sb.append(csi + ","); } + if (downwardAPI != null) { sb.append("downwardAPI:"); sb.append(downwardAPI + ","); } + if (emptyDir != null) { sb.append("emptyDir:"); sb.append(emptyDir + ","); } + if (ephemeral != null) { sb.append("ephemeral:"); sb.append(ephemeral + ","); } + if (fc != null) { sb.append("fc:"); sb.append(fc + ","); } + if (flexVolume != null) { sb.append("flexVolume:"); sb.append(flexVolume + ","); } + if (flocker != null) { sb.append("flocker:"); sb.append(flocker + ","); } + if (gcePersistentDisk != null) { sb.append("gcePersistentDisk:"); sb.append(gcePersistentDisk + ","); } + if (gitRepo != null) { sb.append("gitRepo:"); sb.append(gitRepo + ","); } + if (glusterfs != null) { sb.append("glusterfs:"); sb.append(glusterfs + ","); } + if (hostPath != null) { sb.append("hostPath:"); sb.append(hostPath + ","); } + if (iscsi != null) { sb.append("iscsi:"); sb.append(iscsi + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (nfs != null) { sb.append("nfs:"); sb.append(nfs + ","); } + if (persistentVolumeClaim != null) { sb.append("persistentVolumeClaim:"); sb.append(persistentVolumeClaim + ","); } + if (photonPersistentDisk != null) { sb.append("photonPersistentDisk:"); sb.append(photonPersistentDisk + ","); } + if (portworxVolume != null) { sb.append("portworxVolume:"); sb.append(portworxVolume + ","); } + if (projected != null) { sb.append("projected:"); sb.append(projected + ","); } + if (quobyte != null) { sb.append("quobyte:"); sb.append(quobyte + ","); } + if (rbd != null) { sb.append("rbd:"); sb.append(rbd + ","); } + if (scaleIO != null) { sb.append("scaleIO:"); sb.append(scaleIO + ","); } + if (secret != null) { sb.append("secret:"); sb.append(secret + ","); } + if (storageos != null) { sb.append("storageos:"); sb.append(storageos + ","); } + if (vsphereVolume != null) { sb.append("vsphereVolume:"); sb.append(vsphereVolume); } + sb.append("}"); + return sb.toString(); + } + public class AwsElasticBlockStoreNested extends V1AWSElasticBlockStoreVolumeSourceFluent> implements Nested{ + AwsElasticBlockStoreNested(V1AWSElasticBlockStoreVolumeSource item) { + this.builder = new V1AWSElasticBlockStoreVolumeSourceBuilder(this, item); + } + V1AWSElasticBlockStoreVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withAwsElasticBlockStore(builder.build()); + } + + public N endAwsElasticBlockStore() { + return and(); + } + + + } + public class AzureDiskNested extends V1AzureDiskVolumeSourceFluent> implements Nested{ + AzureDiskNested(V1AzureDiskVolumeSource item) { + this.builder = new V1AzureDiskVolumeSourceBuilder(this, item); + } + V1AzureDiskVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withAzureDisk(builder.build()); + } + + public N endAzureDisk() { + return and(); + } + } - public interface CephfsNested extends Nested,V1CephFSVolumeSourceFluent>{ - public N and(); - public N endCephfs(); + public class AzureFileNested extends V1AzureFileVolumeSourceFluent> implements Nested{ + AzureFileNested(V1AzureFileVolumeSource item) { + this.builder = new V1AzureFileVolumeSourceBuilder(this, item); + } + V1AzureFileVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withAzureFile(builder.build()); + } + public N endAzureFile() { + return and(); + } + + } - public interface CinderNested extends Nested,V1CinderVolumeSourceFluent>{ - public N and(); - public N endCinder(); + public class CephfsNested extends V1CephFSVolumeSourceFluent> implements Nested{ + CephfsNested(V1CephFSVolumeSource item) { + this.builder = new V1CephFSVolumeSourceBuilder(this, item); + } + V1CephFSVolumeSourceBuilder builder; + public N and() { + return (N) V1VolumeFluent.this.withCephfs(builder.build()); + } + + public N endCephfs() { + return and(); + } + + } - public interface ConfigMapNested extends Nested,V1ConfigMapVolumeSourceFluent>{ - public N and(); - public N endConfigMap(); + public class CinderNested extends V1CinderVolumeSourceFluent> implements Nested{ + CinderNested(V1CinderVolumeSource item) { + this.builder = new V1CinderVolumeSourceBuilder(this, item); + } + V1CinderVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withCinder(builder.build()); + } + public N endCinder() { + return and(); + } + + } - public interface CsiNested extends Nested,V1CSIVolumeSourceFluent>{ - public N and(); - public N endCsi(); + public class ConfigMapNested extends V1ConfigMapVolumeSourceFluent> implements Nested{ + ConfigMapNested(V1ConfigMapVolumeSource item) { + this.builder = new V1ConfigMapVolumeSourceBuilder(this, item); + } + V1ConfigMapVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withConfigMap(builder.build()); + } + + public N endConfigMap() { + return and(); + } + } - public interface DownwardAPINested extends Nested,V1DownwardAPIVolumeSourceFluent>{ - public N and(); - public N endDownwardAPI(); + public class CsiNested extends V1CSIVolumeSourceFluent> implements Nested{ + CsiNested(V1CSIVolumeSource item) { + this.builder = new V1CSIVolumeSourceBuilder(this, item); + } + V1CSIVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withCsi(builder.build()); + } + public N endCsi() { + return and(); + } + + } - public interface EmptyDirNested extends Nested,V1EmptyDirVolumeSourceFluent>{ - public N and(); - public N endEmptyDir(); + public class DownwardAPINested extends V1DownwardAPIVolumeSourceFluent> implements Nested{ + DownwardAPINested(V1DownwardAPIVolumeSource item) { + this.builder = new V1DownwardAPIVolumeSourceBuilder(this, item); + } + V1DownwardAPIVolumeSourceBuilder builder; + public N and() { + return (N) V1VolumeFluent.this.withDownwardAPI(builder.build()); + } + + public N endDownwardAPI() { + return and(); + } + + } - public interface EphemeralNested extends Nested,V1EphemeralVolumeSourceFluent>{ - public N and(); - public N endEphemeral(); + public class EmptyDirNested extends V1EmptyDirVolumeSourceFluent> implements Nested{ + EmptyDirNested(V1EmptyDirVolumeSource item) { + this.builder = new V1EmptyDirVolumeSourceBuilder(this, item); + } + V1EmptyDirVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withEmptyDir(builder.build()); + } + public N endEmptyDir() { + return and(); + } + + } - public interface FcNested extends Nested,V1FCVolumeSourceFluent>{ - public N and(); - public N endFc(); + public class EphemeralNested extends V1EphemeralVolumeSourceFluent> implements Nested{ + EphemeralNested(V1EphemeralVolumeSource item) { + this.builder = new V1EphemeralVolumeSourceBuilder(this, item); + } + V1EphemeralVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withEphemeral(builder.build()); + } + + public N endEphemeral() { + return and(); + } + } - public interface FlexVolumeNested extends Nested,V1FlexVolumeSourceFluent>{ - public N and(); - public N endFlexVolume(); + public class FcNested extends V1FCVolumeSourceFluent> implements Nested{ + FcNested(V1FCVolumeSource item) { + this.builder = new V1FCVolumeSourceBuilder(this, item); + } + V1FCVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withFc(builder.build()); + } + public N endFc() { + return and(); + } + + } - public interface FlockerNested extends Nested,V1FlockerVolumeSourceFluent>{ - public N and(); - public N endFlocker(); + public class FlexVolumeNested extends V1FlexVolumeSourceFluent> implements Nested{ + FlexVolumeNested(V1FlexVolumeSource item) { + this.builder = new V1FlexVolumeSourceBuilder(this, item); + } + V1FlexVolumeSourceBuilder builder; + public N and() { + return (N) V1VolumeFluent.this.withFlexVolume(builder.build()); + } + + public N endFlexVolume() { + return and(); + } + + } - public interface GcePersistentDiskNested extends Nested,V1GCEPersistentDiskVolumeSourceFluent>{ - public N and(); - public N endGcePersistentDisk(); + public class FlockerNested extends V1FlockerVolumeSourceFluent> implements Nested{ + FlockerNested(V1FlockerVolumeSource item) { + this.builder = new V1FlockerVolumeSourceBuilder(this, item); + } + V1FlockerVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withFlocker(builder.build()); + } + public N endFlocker() { + return and(); + } + + } - public interface GitRepoNested extends Nested,V1GitRepoVolumeSourceFluent>{ - public N and(); - public N endGitRepo(); + public class GcePersistentDiskNested extends V1GCEPersistentDiskVolumeSourceFluent> implements Nested{ + GcePersistentDiskNested(V1GCEPersistentDiskVolumeSource item) { + this.builder = new V1GCEPersistentDiskVolumeSourceBuilder(this, item); + } + V1GCEPersistentDiskVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withGcePersistentDisk(builder.build()); + } + + public N endGcePersistentDisk() { + return and(); + } + } - public interface GlusterfsNested extends Nested,V1GlusterfsVolumeSourceFluent>{ - public N and(); - public N endGlusterfs(); + public class GitRepoNested extends V1GitRepoVolumeSourceFluent> implements Nested{ + GitRepoNested(V1GitRepoVolumeSource item) { + this.builder = new V1GitRepoVolumeSourceBuilder(this, item); + } + V1GitRepoVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withGitRepo(builder.build()); + } + public N endGitRepo() { + return and(); + } + + } - public interface HostPathNested extends Nested,V1HostPathVolumeSourceFluent>{ - public N and(); - public N endHostPath(); + public class GlusterfsNested extends V1GlusterfsVolumeSourceFluent> implements Nested{ + GlusterfsNested(V1GlusterfsVolumeSource item) { + this.builder = new V1GlusterfsVolumeSourceBuilder(this, item); + } + V1GlusterfsVolumeSourceBuilder builder; + public N and() { + return (N) V1VolumeFluent.this.withGlusterfs(builder.build()); + } + + public N endGlusterfs() { + return and(); + } + + } - public interface IscsiNested extends Nested,V1ISCSIVolumeSourceFluent>{ - public N and(); - public N endIscsi(); + public class HostPathNested extends V1HostPathVolumeSourceFluent> implements Nested{ + HostPathNested(V1HostPathVolumeSource item) { + this.builder = new V1HostPathVolumeSourceBuilder(this, item); + } + V1HostPathVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withHostPath(builder.build()); + } + public N endHostPath() { + return and(); + } + + } - public interface NfsNested extends Nested,V1NFSVolumeSourceFluent>{ - public N and(); - public N endNfs(); + public class IscsiNested extends V1ISCSIVolumeSourceFluent> implements Nested{ + IscsiNested(V1ISCSIVolumeSource item) { + this.builder = new V1ISCSIVolumeSourceBuilder(this, item); + } + V1ISCSIVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withIscsi(builder.build()); + } + + public N endIscsi() { + return and(); + } + } - public interface PersistentVolumeClaimNested extends Nested,V1PersistentVolumeClaimVolumeSourceFluent>{ - public N and(); - public N endPersistentVolumeClaim(); + public class NfsNested extends V1NFSVolumeSourceFluent> implements Nested{ + NfsNested(V1NFSVolumeSource item) { + this.builder = new V1NFSVolumeSourceBuilder(this, item); + } + V1NFSVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withNfs(builder.build()); + } + public N endNfs() { + return and(); + } + + } - public interface PhotonPersistentDiskNested extends Nested,V1PhotonPersistentDiskVolumeSourceFluent>{ - public N and(); - public N endPhotonPersistentDisk(); + public class PersistentVolumeClaimNested extends V1PersistentVolumeClaimVolumeSourceFluent> implements Nested{ + PersistentVolumeClaimNested(V1PersistentVolumeClaimVolumeSource item) { + this.builder = new V1PersistentVolumeClaimVolumeSourceBuilder(this, item); + } + V1PersistentVolumeClaimVolumeSourceBuilder builder; + public N and() { + return (N) V1VolumeFluent.this.withPersistentVolumeClaim(builder.build()); + } + + public N endPersistentVolumeClaim() { + return and(); + } + + } - public interface PortworxVolumeNested extends Nested,V1PortworxVolumeSourceFluent>{ - public N and(); - public N endPortworxVolume(); + public class PhotonPersistentDiskNested extends V1PhotonPersistentDiskVolumeSourceFluent> implements Nested{ + PhotonPersistentDiskNested(V1PhotonPersistentDiskVolumeSource item) { + this.builder = new V1PhotonPersistentDiskVolumeSourceBuilder(this, item); + } + V1PhotonPersistentDiskVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withPhotonPersistentDisk(builder.build()); + } + public N endPhotonPersistentDisk() { + return and(); + } + + } - public interface ProjectedNested extends Nested,V1ProjectedVolumeSourceFluent>{ - public N and(); - public N endProjected(); + public class PortworxVolumeNested extends V1PortworxVolumeSourceFluent> implements Nested{ + PortworxVolumeNested(V1PortworxVolumeSource item) { + this.builder = new V1PortworxVolumeSourceBuilder(this, item); + } + V1PortworxVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withPortworxVolume(builder.build()); + } + + public N endPortworxVolume() { + return and(); + } + } - public interface QuobyteNested extends Nested,V1QuobyteVolumeSourceFluent>{ - public N and(); - public N endQuobyte(); + public class ProjectedNested extends V1ProjectedVolumeSourceFluent> implements Nested{ + ProjectedNested(V1ProjectedVolumeSource item) { + this.builder = new V1ProjectedVolumeSourceBuilder(this, item); + } + V1ProjectedVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withProjected(builder.build()); + } + public N endProjected() { + return and(); + } + + } - public interface RbdNested extends Nested,V1RBDVolumeSourceFluent>{ - public N and(); - public N endRbd(); + public class QuobyteNested extends V1QuobyteVolumeSourceFluent> implements Nested{ + QuobyteNested(V1QuobyteVolumeSource item) { + this.builder = new V1QuobyteVolumeSourceBuilder(this, item); + } + V1QuobyteVolumeSourceBuilder builder; + public N and() { + return (N) V1VolumeFluent.this.withQuobyte(builder.build()); + } + + public N endQuobyte() { + return and(); + } + + } - public interface ScaleIONested extends Nested,V1ScaleIOVolumeSourceFluent>{ - public N and(); - public N endScaleIO(); + public class RbdNested extends V1RBDVolumeSourceFluent> implements Nested{ + RbdNested(V1RBDVolumeSource item) { + this.builder = new V1RBDVolumeSourceBuilder(this, item); + } + V1RBDVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withRbd(builder.build()); + } + public N endRbd() { + return and(); + } + + } - public interface SecretNested extends Nested,V1SecretVolumeSourceFluent>{ - public N and(); - public N endSecret(); + public class ScaleIONested extends V1ScaleIOVolumeSourceFluent> implements Nested{ + ScaleIONested(V1ScaleIOVolumeSource item) { + this.builder = new V1ScaleIOVolumeSourceBuilder(this, item); + } + V1ScaleIOVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withScaleIO(builder.build()); + } + + public N endScaleIO() { + return and(); + } + } - public interface StorageosNested extends Nested,V1StorageOSVolumeSourceFluent>{ - public N and(); - public N endStorageos(); + public class SecretNested extends V1SecretVolumeSourceFluent> implements Nested{ + SecretNested(V1SecretVolumeSource item) { + this.builder = new V1SecretVolumeSourceBuilder(this, item); + } + V1SecretVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withSecret(builder.build()); + } + public N endSecret() { + return and(); + } + + } - public interface VsphereVolumeNested extends Nested,V1VsphereVirtualDiskVolumeSourceFluent>{ - public N and(); - public N endVsphereVolume(); + public class StorageosNested extends V1StorageOSVolumeSourceFluent> implements Nested{ + StorageosNested(V1StorageOSVolumeSource item) { + this.builder = new V1StorageOSVolumeSourceBuilder(this, item); + } + V1StorageOSVolumeSourceBuilder builder; + public N and() { + return (N) V1VolumeFluent.this.withStorageos(builder.build()); + } + + public N endStorageos() { + return and(); + } + + } + public class VsphereVolumeNested extends V1VsphereVirtualDiskVolumeSourceFluent> implements Nested{ + VsphereVolumeNested(V1VsphereVirtualDiskVolumeSource item) { + this.builder = new V1VsphereVirtualDiskVolumeSourceBuilder(this, item); + } + V1VsphereVirtualDiskVolumeSourceBuilder builder; + + public N and() { + return (N) V1VolumeFluent.this.withVsphereVolume(builder.build()); + } + + public N endVsphereVolume() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeFluentImpl.java deleted file mode 100644 index 362d9b7e9e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeFluentImpl.java +++ /dev/null @@ -1,1648 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.String; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; -import java.lang.Deprecated; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeFluentImpl> extends BaseFluent implements V1VolumeFluent{ - public V1VolumeFluentImpl() { - } - public V1VolumeFluentImpl(V1Volume instance) { - if (instance != null) { - this.withAwsElasticBlockStore(instance.getAwsElasticBlockStore()); - this.withAzureDisk(instance.getAzureDisk()); - this.withAzureFile(instance.getAzureFile()); - this.withCephfs(instance.getCephfs()); - this.withCinder(instance.getCinder()); - this.withConfigMap(instance.getConfigMap()); - this.withCsi(instance.getCsi()); - this.withDownwardAPI(instance.getDownwardAPI()); - this.withEmptyDir(instance.getEmptyDir()); - this.withEphemeral(instance.getEphemeral()); - this.withFc(instance.getFc()); - this.withFlexVolume(instance.getFlexVolume()); - this.withFlocker(instance.getFlocker()); - this.withGcePersistentDisk(instance.getGcePersistentDisk()); - this.withGitRepo(instance.getGitRepo()); - this.withGlusterfs(instance.getGlusterfs()); - this.withHostPath(instance.getHostPath()); - this.withIscsi(instance.getIscsi()); - this.withName(instance.getName()); - this.withNfs(instance.getNfs()); - this.withPersistentVolumeClaim(instance.getPersistentVolumeClaim()); - this.withPhotonPersistentDisk(instance.getPhotonPersistentDisk()); - this.withPortworxVolume(instance.getPortworxVolume()); - this.withProjected(instance.getProjected()); - this.withQuobyte(instance.getQuobyte()); - this.withRbd(instance.getRbd()); - this.withScaleIO(instance.getScaleIO()); - this.withSecret(instance.getSecret()); - this.withStorageos(instance.getStorageos()); - this.withVsphereVolume(instance.getVsphereVolume()); - } - } - private V1AWSElasticBlockStoreVolumeSourceBuilder awsElasticBlockStore; - private V1AzureDiskVolumeSourceBuilder azureDisk; - private V1AzureFileVolumeSourceBuilder azureFile; - private V1CephFSVolumeSourceBuilder cephfs; - private V1CinderVolumeSourceBuilder cinder; - private V1ConfigMapVolumeSourceBuilder configMap; - private V1CSIVolumeSourceBuilder csi; - private V1DownwardAPIVolumeSourceBuilder downwardAPI; - private V1EmptyDirVolumeSourceBuilder emptyDir; - private V1EphemeralVolumeSourceBuilder ephemeral; - private V1FCVolumeSourceBuilder fc; - private V1FlexVolumeSourceBuilder flexVolume; - private V1FlockerVolumeSourceBuilder flocker; - private V1GCEPersistentDiskVolumeSourceBuilder gcePersistentDisk; - private V1GitRepoVolumeSourceBuilder gitRepo; - private V1GlusterfsVolumeSourceBuilder glusterfs; - private V1HostPathVolumeSourceBuilder hostPath; - private V1ISCSIVolumeSourceBuilder iscsi; - private String name; - private V1NFSVolumeSourceBuilder nfs; - private V1PersistentVolumeClaimVolumeSourceBuilder persistentVolumeClaim; - private V1PhotonPersistentDiskVolumeSourceBuilder photonPersistentDisk; - private V1PortworxVolumeSourceBuilder portworxVolume; - private V1ProjectedVolumeSourceBuilder projected; - private V1QuobyteVolumeSourceBuilder quobyte; - private V1RBDVolumeSourceBuilder rbd; - private V1ScaleIOVolumeSourceBuilder scaleIO; - private V1SecretVolumeSourceBuilder secret; - private V1StorageOSVolumeSourceBuilder storageos; - private V1VsphereVirtualDiskVolumeSourceBuilder vsphereVolume; - - /** - * This method has been deprecated, please use method buildAwsElasticBlockStore instead. - * @return The buildable object. - */ - @Deprecated - public V1AWSElasticBlockStoreVolumeSource getAwsElasticBlockStore() { - return this.awsElasticBlockStore!=null ?this.awsElasticBlockStore.build():null; - } - public V1AWSElasticBlockStoreVolumeSource buildAwsElasticBlockStore() { - return this.awsElasticBlockStore!=null ?this.awsElasticBlockStore.build():null; - } - public A withAwsElasticBlockStore(V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore) { - _visitables.get("awsElasticBlockStore").remove(this.awsElasticBlockStore); - if (awsElasticBlockStore!=null){ this.awsElasticBlockStore= new V1AWSElasticBlockStoreVolumeSourceBuilder(awsElasticBlockStore); _visitables.get("awsElasticBlockStore").add(this.awsElasticBlockStore);} else { this.awsElasticBlockStore = null; _visitables.get("awsElasticBlockStore").remove(this.awsElasticBlockStore); } return (A) this; - } - public Boolean hasAwsElasticBlockStore() { - return this.awsElasticBlockStore != null; - } - public V1VolumeFluentImpl.AwsElasticBlockStoreNested withNewAwsElasticBlockStore() { - return new V1VolumeFluentImpl.AwsElasticBlockStoreNestedImpl(); - } - public V1VolumeFluentImpl.AwsElasticBlockStoreNested withNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item) { - return new V1VolumeFluentImpl.AwsElasticBlockStoreNestedImpl(item); - } - public V1VolumeFluentImpl.AwsElasticBlockStoreNested editAwsElasticBlockStore() { - return withNewAwsElasticBlockStoreLike(getAwsElasticBlockStore()); - } - public V1VolumeFluentImpl.AwsElasticBlockStoreNested editOrNewAwsElasticBlockStore() { - return withNewAwsElasticBlockStoreLike(getAwsElasticBlockStore() != null ? getAwsElasticBlockStore(): new V1AWSElasticBlockStoreVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.AwsElasticBlockStoreNested editOrNewAwsElasticBlockStoreLike(V1AWSElasticBlockStoreVolumeSource item) { - return withNewAwsElasticBlockStoreLike(getAwsElasticBlockStore() != null ? getAwsElasticBlockStore(): item); - } - - /** - * This method has been deprecated, please use method buildAzureDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1AzureDiskVolumeSource getAzureDisk() { - return this.azureDisk!=null ?this.azureDisk.build():null; - } - public V1AzureDiskVolumeSource buildAzureDisk() { - return this.azureDisk!=null ?this.azureDisk.build():null; - } - public A withAzureDisk(V1AzureDiskVolumeSource azureDisk) { - _visitables.get("azureDisk").remove(this.azureDisk); - if (azureDisk!=null){ this.azureDisk= new V1AzureDiskVolumeSourceBuilder(azureDisk); _visitables.get("azureDisk").add(this.azureDisk);} else { this.azureDisk = null; _visitables.get("azureDisk").remove(this.azureDisk); } return (A) this; - } - public Boolean hasAzureDisk() { - return this.azureDisk != null; - } - public V1VolumeFluentImpl.AzureDiskNested withNewAzureDisk() { - return new V1VolumeFluentImpl.AzureDiskNestedImpl(); - } - public V1VolumeFluentImpl.AzureDiskNested withNewAzureDiskLike(V1AzureDiskVolumeSource item) { - return new V1VolumeFluentImpl.AzureDiskNestedImpl(item); - } - public V1VolumeFluentImpl.AzureDiskNested editAzureDisk() { - return withNewAzureDiskLike(getAzureDisk()); - } - public V1VolumeFluentImpl.AzureDiskNested editOrNewAzureDisk() { - return withNewAzureDiskLike(getAzureDisk() != null ? getAzureDisk(): new V1AzureDiskVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.AzureDiskNested editOrNewAzureDiskLike(V1AzureDiskVolumeSource item) { - return withNewAzureDiskLike(getAzureDisk() != null ? getAzureDisk(): item); - } - - /** - * This method has been deprecated, please use method buildAzureFile instead. - * @return The buildable object. - */ - @Deprecated - public V1AzureFileVolumeSource getAzureFile() { - return this.azureFile!=null ?this.azureFile.build():null; - } - public V1AzureFileVolumeSource buildAzureFile() { - return this.azureFile!=null ?this.azureFile.build():null; - } - public A withAzureFile(V1AzureFileVolumeSource azureFile) { - _visitables.get("azureFile").remove(this.azureFile); - if (azureFile!=null){ this.azureFile= new V1AzureFileVolumeSourceBuilder(azureFile); _visitables.get("azureFile").add(this.azureFile);} else { this.azureFile = null; _visitables.get("azureFile").remove(this.azureFile); } return (A) this; - } - public Boolean hasAzureFile() { - return this.azureFile != null; - } - public V1VolumeFluentImpl.AzureFileNested withNewAzureFile() { - return new V1VolumeFluentImpl.AzureFileNestedImpl(); - } - public V1VolumeFluentImpl.AzureFileNested withNewAzureFileLike(V1AzureFileVolumeSource item) { - return new V1VolumeFluentImpl.AzureFileNestedImpl(item); - } - public V1VolumeFluentImpl.AzureFileNested editAzureFile() { - return withNewAzureFileLike(getAzureFile()); - } - public V1VolumeFluentImpl.AzureFileNested editOrNewAzureFile() { - return withNewAzureFileLike(getAzureFile() != null ? getAzureFile(): new V1AzureFileVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.AzureFileNested editOrNewAzureFileLike(V1AzureFileVolumeSource item) { - return withNewAzureFileLike(getAzureFile() != null ? getAzureFile(): item); - } - - /** - * This method has been deprecated, please use method buildCephfs instead. - * @return The buildable object. - */ - @Deprecated - public V1CephFSVolumeSource getCephfs() { - return this.cephfs!=null ?this.cephfs.build():null; - } - public V1CephFSVolumeSource buildCephfs() { - return this.cephfs!=null ?this.cephfs.build():null; - } - public A withCephfs(V1CephFSVolumeSource cephfs) { - _visitables.get("cephfs").remove(this.cephfs); - if (cephfs!=null){ this.cephfs= new V1CephFSVolumeSourceBuilder(cephfs); _visitables.get("cephfs").add(this.cephfs);} else { this.cephfs = null; _visitables.get("cephfs").remove(this.cephfs); } return (A) this; - } - public Boolean hasCephfs() { - return this.cephfs != null; - } - public V1VolumeFluentImpl.CephfsNested withNewCephfs() { - return new V1VolumeFluentImpl.CephfsNestedImpl(); - } - public V1VolumeFluentImpl.CephfsNested withNewCephfsLike(V1CephFSVolumeSource item) { - return new V1VolumeFluentImpl.CephfsNestedImpl(item); - } - public V1VolumeFluentImpl.CephfsNested editCephfs() { - return withNewCephfsLike(getCephfs()); - } - public V1VolumeFluentImpl.CephfsNested editOrNewCephfs() { - return withNewCephfsLike(getCephfs() != null ? getCephfs(): new V1CephFSVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.CephfsNested editOrNewCephfsLike(V1CephFSVolumeSource item) { - return withNewCephfsLike(getCephfs() != null ? getCephfs(): item); - } - - /** - * This method has been deprecated, please use method buildCinder instead. - * @return The buildable object. - */ - @Deprecated - public V1CinderVolumeSource getCinder() { - return this.cinder!=null ?this.cinder.build():null; - } - public V1CinderVolumeSource buildCinder() { - return this.cinder!=null ?this.cinder.build():null; - } - public A withCinder(V1CinderVolumeSource cinder) { - _visitables.get("cinder").remove(this.cinder); - if (cinder!=null){ this.cinder= new V1CinderVolumeSourceBuilder(cinder); _visitables.get("cinder").add(this.cinder);} else { this.cinder = null; _visitables.get("cinder").remove(this.cinder); } return (A) this; - } - public Boolean hasCinder() { - return this.cinder != null; - } - public V1VolumeFluentImpl.CinderNested withNewCinder() { - return new V1VolumeFluentImpl.CinderNestedImpl(); - } - public V1VolumeFluentImpl.CinderNested withNewCinderLike(V1CinderVolumeSource item) { - return new V1VolumeFluentImpl.CinderNestedImpl(item); - } - public V1VolumeFluentImpl.CinderNested editCinder() { - return withNewCinderLike(getCinder()); - } - public V1VolumeFluentImpl.CinderNested editOrNewCinder() { - return withNewCinderLike(getCinder() != null ? getCinder(): new V1CinderVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.CinderNested editOrNewCinderLike(V1CinderVolumeSource item) { - return withNewCinderLike(getCinder() != null ? getCinder(): item); - } - - /** - * This method has been deprecated, please use method buildConfigMap instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapVolumeSource getConfigMap() { - return this.configMap!=null ?this.configMap.build():null; - } - public V1ConfigMapVolumeSource buildConfigMap() { - return this.configMap!=null ?this.configMap.build():null; - } - public A withConfigMap(V1ConfigMapVolumeSource configMap) { - _visitables.get("configMap").remove(this.configMap); - if (configMap!=null){ this.configMap= new V1ConfigMapVolumeSourceBuilder(configMap); _visitables.get("configMap").add(this.configMap);} else { this.configMap = null; _visitables.get("configMap").remove(this.configMap); } return (A) this; - } - public Boolean hasConfigMap() { - return this.configMap != null; - } - public V1VolumeFluentImpl.ConfigMapNested withNewConfigMap() { - return new V1VolumeFluentImpl.ConfigMapNestedImpl(); - } - public V1VolumeFluentImpl.ConfigMapNested withNewConfigMapLike(V1ConfigMapVolumeSource item) { - return new V1VolumeFluentImpl.ConfigMapNestedImpl(item); - } - public V1VolumeFluentImpl.ConfigMapNested editConfigMap() { - return withNewConfigMapLike(getConfigMap()); - } - public V1VolumeFluentImpl.ConfigMapNested editOrNewConfigMap() { - return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): new V1ConfigMapVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.ConfigMapNested editOrNewConfigMapLike(V1ConfigMapVolumeSource item) { - return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): item); - } - - /** - * This method has been deprecated, please use method buildCsi instead. - * @return The buildable object. - */ - @Deprecated - public V1CSIVolumeSource getCsi() { - return this.csi!=null ?this.csi.build():null; - } - public V1CSIVolumeSource buildCsi() { - return this.csi!=null ?this.csi.build():null; - } - public A withCsi(V1CSIVolumeSource csi) { - _visitables.get("csi").remove(this.csi); - if (csi!=null){ this.csi= new V1CSIVolumeSourceBuilder(csi); _visitables.get("csi").add(this.csi);} else { this.csi = null; _visitables.get("csi").remove(this.csi); } return (A) this; - } - public Boolean hasCsi() { - return this.csi != null; - } - public V1VolumeFluentImpl.CsiNested withNewCsi() { - return new V1VolumeFluentImpl.CsiNestedImpl(); - } - public V1VolumeFluentImpl.CsiNested withNewCsiLike(V1CSIVolumeSource item) { - return new V1VolumeFluentImpl.CsiNestedImpl(item); - } - public V1VolumeFluentImpl.CsiNested editCsi() { - return withNewCsiLike(getCsi()); - } - public V1VolumeFluentImpl.CsiNested editOrNewCsi() { - return withNewCsiLike(getCsi() != null ? getCsi(): new V1CSIVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.CsiNested editOrNewCsiLike(V1CSIVolumeSource item) { - return withNewCsiLike(getCsi() != null ? getCsi(): item); - } - - /** - * This method has been deprecated, please use method buildDownwardAPI instead. - * @return The buildable object. - */ - @Deprecated - public V1DownwardAPIVolumeSource getDownwardAPI() { - return this.downwardAPI!=null ?this.downwardAPI.build():null; - } - public V1DownwardAPIVolumeSource buildDownwardAPI() { - return this.downwardAPI!=null ?this.downwardAPI.build():null; - } - public A withDownwardAPI(V1DownwardAPIVolumeSource downwardAPI) { - _visitables.get("downwardAPI").remove(this.downwardAPI); - if (downwardAPI!=null){ this.downwardAPI= new V1DownwardAPIVolumeSourceBuilder(downwardAPI); _visitables.get("downwardAPI").add(this.downwardAPI);} else { this.downwardAPI = null; _visitables.get("downwardAPI").remove(this.downwardAPI); } return (A) this; - } - public Boolean hasDownwardAPI() { - return this.downwardAPI != null; - } - public V1VolumeFluentImpl.DownwardAPINested withNewDownwardAPI() { - return new V1VolumeFluentImpl.DownwardAPINestedImpl(); - } - public V1VolumeFluentImpl.DownwardAPINested withNewDownwardAPILike(V1DownwardAPIVolumeSource item) { - return new V1VolumeFluentImpl.DownwardAPINestedImpl(item); - } - public V1VolumeFluentImpl.DownwardAPINested editDownwardAPI() { - return withNewDownwardAPILike(getDownwardAPI()); - } - public V1VolumeFluentImpl.DownwardAPINested editOrNewDownwardAPI() { - return withNewDownwardAPILike(getDownwardAPI() != null ? getDownwardAPI(): new V1DownwardAPIVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.DownwardAPINested editOrNewDownwardAPILike(V1DownwardAPIVolumeSource item) { - return withNewDownwardAPILike(getDownwardAPI() != null ? getDownwardAPI(): item); - } - - /** - * This method has been deprecated, please use method buildEmptyDir instead. - * @return The buildable object. - */ - @Deprecated - public V1EmptyDirVolumeSource getEmptyDir() { - return this.emptyDir!=null ?this.emptyDir.build():null; - } - public V1EmptyDirVolumeSource buildEmptyDir() { - return this.emptyDir!=null ?this.emptyDir.build():null; - } - public A withEmptyDir(V1EmptyDirVolumeSource emptyDir) { - _visitables.get("emptyDir").remove(this.emptyDir); - if (emptyDir!=null){ this.emptyDir= new V1EmptyDirVolumeSourceBuilder(emptyDir); _visitables.get("emptyDir").add(this.emptyDir);} else { this.emptyDir = null; _visitables.get("emptyDir").remove(this.emptyDir); } return (A) this; - } - public Boolean hasEmptyDir() { - return this.emptyDir != null; - } - public V1VolumeFluentImpl.EmptyDirNested withNewEmptyDir() { - return new V1VolumeFluentImpl.EmptyDirNestedImpl(); - } - public V1VolumeFluentImpl.EmptyDirNested withNewEmptyDirLike(V1EmptyDirVolumeSource item) { - return new V1VolumeFluentImpl.EmptyDirNestedImpl(item); - } - public V1VolumeFluentImpl.EmptyDirNested editEmptyDir() { - return withNewEmptyDirLike(getEmptyDir()); - } - public V1VolumeFluentImpl.EmptyDirNested editOrNewEmptyDir() { - return withNewEmptyDirLike(getEmptyDir() != null ? getEmptyDir(): new V1EmptyDirVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.EmptyDirNested editOrNewEmptyDirLike(V1EmptyDirVolumeSource item) { - return withNewEmptyDirLike(getEmptyDir() != null ? getEmptyDir(): item); - } - - /** - * This method has been deprecated, please use method buildEphemeral instead. - * @return The buildable object. - */ - @Deprecated - public V1EphemeralVolumeSource getEphemeral() { - return this.ephemeral!=null ?this.ephemeral.build():null; - } - public V1EphemeralVolumeSource buildEphemeral() { - return this.ephemeral!=null ?this.ephemeral.build():null; - } - public A withEphemeral(V1EphemeralVolumeSource ephemeral) { - _visitables.get("ephemeral").remove(this.ephemeral); - if (ephemeral!=null){ this.ephemeral= new V1EphemeralVolumeSourceBuilder(ephemeral); _visitables.get("ephemeral").add(this.ephemeral);} else { this.ephemeral = null; _visitables.get("ephemeral").remove(this.ephemeral); } return (A) this; - } - public Boolean hasEphemeral() { - return this.ephemeral != null; - } - public V1VolumeFluentImpl.EphemeralNested withNewEphemeral() { - return new V1VolumeFluentImpl.EphemeralNestedImpl(); - } - public V1VolumeFluentImpl.EphemeralNested withNewEphemeralLike(V1EphemeralVolumeSource item) { - return new V1VolumeFluentImpl.EphemeralNestedImpl(item); - } - public V1VolumeFluentImpl.EphemeralNested editEphemeral() { - return withNewEphemeralLike(getEphemeral()); - } - public V1VolumeFluentImpl.EphemeralNested editOrNewEphemeral() { - return withNewEphemeralLike(getEphemeral() != null ? getEphemeral(): new V1EphemeralVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.EphemeralNested editOrNewEphemeralLike(V1EphemeralVolumeSource item) { - return withNewEphemeralLike(getEphemeral() != null ? getEphemeral(): item); - } - - /** - * This method has been deprecated, please use method buildFc instead. - * @return The buildable object. - */ - @Deprecated - public V1FCVolumeSource getFc() { - return this.fc!=null ?this.fc.build():null; - } - public V1FCVolumeSource buildFc() { - return this.fc!=null ?this.fc.build():null; - } - public A withFc(V1FCVolumeSource fc) { - _visitables.get("fc").remove(this.fc); - if (fc!=null){ this.fc= new V1FCVolumeSourceBuilder(fc); _visitables.get("fc").add(this.fc);} else { this.fc = null; _visitables.get("fc").remove(this.fc); } return (A) this; - } - public Boolean hasFc() { - return this.fc != null; - } - public V1VolumeFluentImpl.FcNested withNewFc() { - return new V1VolumeFluentImpl.FcNestedImpl(); - } - public V1VolumeFluentImpl.FcNested withNewFcLike(V1FCVolumeSource item) { - return new V1VolumeFluentImpl.FcNestedImpl(item); - } - public V1VolumeFluentImpl.FcNested editFc() { - return withNewFcLike(getFc()); - } - public V1VolumeFluentImpl.FcNested editOrNewFc() { - return withNewFcLike(getFc() != null ? getFc(): new V1FCVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.FcNested editOrNewFcLike(V1FCVolumeSource item) { - return withNewFcLike(getFc() != null ? getFc(): item); - } - - /** - * This method has been deprecated, please use method buildFlexVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1FlexVolumeSource getFlexVolume() { - return this.flexVolume!=null ?this.flexVolume.build():null; - } - public V1FlexVolumeSource buildFlexVolume() { - return this.flexVolume!=null ?this.flexVolume.build():null; - } - public A withFlexVolume(V1FlexVolumeSource flexVolume) { - _visitables.get("flexVolume").remove(this.flexVolume); - if (flexVolume!=null){ this.flexVolume= new V1FlexVolumeSourceBuilder(flexVolume); _visitables.get("flexVolume").add(this.flexVolume);} else { this.flexVolume = null; _visitables.get("flexVolume").remove(this.flexVolume); } return (A) this; - } - public Boolean hasFlexVolume() { - return this.flexVolume != null; - } - public V1VolumeFluentImpl.FlexVolumeNested withNewFlexVolume() { - return new V1VolumeFluentImpl.FlexVolumeNestedImpl(); - } - public V1VolumeFluentImpl.FlexVolumeNested withNewFlexVolumeLike(V1FlexVolumeSource item) { - return new V1VolumeFluentImpl.FlexVolumeNestedImpl(item); - } - public V1VolumeFluentImpl.FlexVolumeNested editFlexVolume() { - return withNewFlexVolumeLike(getFlexVolume()); - } - public V1VolumeFluentImpl.FlexVolumeNested editOrNewFlexVolume() { - return withNewFlexVolumeLike(getFlexVolume() != null ? getFlexVolume(): new V1FlexVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.FlexVolumeNested editOrNewFlexVolumeLike(V1FlexVolumeSource item) { - return withNewFlexVolumeLike(getFlexVolume() != null ? getFlexVolume(): item); - } - - /** - * This method has been deprecated, please use method buildFlocker instead. - * @return The buildable object. - */ - @Deprecated - public V1FlockerVolumeSource getFlocker() { - return this.flocker!=null ?this.flocker.build():null; - } - public V1FlockerVolumeSource buildFlocker() { - return this.flocker!=null ?this.flocker.build():null; - } - public A withFlocker(V1FlockerVolumeSource flocker) { - _visitables.get("flocker").remove(this.flocker); - if (flocker!=null){ this.flocker= new V1FlockerVolumeSourceBuilder(flocker); _visitables.get("flocker").add(this.flocker);} else { this.flocker = null; _visitables.get("flocker").remove(this.flocker); } return (A) this; - } - public Boolean hasFlocker() { - return this.flocker != null; - } - public V1VolumeFluentImpl.FlockerNested withNewFlocker() { - return new V1VolumeFluentImpl.FlockerNestedImpl(); - } - public V1VolumeFluentImpl.FlockerNested withNewFlockerLike(V1FlockerVolumeSource item) { - return new V1VolumeFluentImpl.FlockerNestedImpl(item); - } - public V1VolumeFluentImpl.FlockerNested editFlocker() { - return withNewFlockerLike(getFlocker()); - } - public V1VolumeFluentImpl.FlockerNested editOrNewFlocker() { - return withNewFlockerLike(getFlocker() != null ? getFlocker(): new V1FlockerVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.FlockerNested editOrNewFlockerLike(V1FlockerVolumeSource item) { - return withNewFlockerLike(getFlocker() != null ? getFlocker(): item); - } - - /** - * This method has been deprecated, please use method buildGcePersistentDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1GCEPersistentDiskVolumeSource getGcePersistentDisk() { - return this.gcePersistentDisk!=null ?this.gcePersistentDisk.build():null; - } - public V1GCEPersistentDiskVolumeSource buildGcePersistentDisk() { - return this.gcePersistentDisk!=null ?this.gcePersistentDisk.build():null; - } - public A withGcePersistentDisk(V1GCEPersistentDiskVolumeSource gcePersistentDisk) { - _visitables.get("gcePersistentDisk").remove(this.gcePersistentDisk); - if (gcePersistentDisk!=null){ this.gcePersistentDisk= new V1GCEPersistentDiskVolumeSourceBuilder(gcePersistentDisk); _visitables.get("gcePersistentDisk").add(this.gcePersistentDisk);} else { this.gcePersistentDisk = null; _visitables.get("gcePersistentDisk").remove(this.gcePersistentDisk); } return (A) this; - } - public Boolean hasGcePersistentDisk() { - return this.gcePersistentDisk != null; - } - public V1VolumeFluentImpl.GcePersistentDiskNested withNewGcePersistentDisk() { - return new V1VolumeFluentImpl.GcePersistentDiskNestedImpl(); - } - public V1VolumeFluentImpl.GcePersistentDiskNested withNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item) { - return new V1VolumeFluentImpl.GcePersistentDiskNestedImpl(item); - } - public V1VolumeFluentImpl.GcePersistentDiskNested editGcePersistentDisk() { - return withNewGcePersistentDiskLike(getGcePersistentDisk()); - } - public V1VolumeFluentImpl.GcePersistentDiskNested editOrNewGcePersistentDisk() { - return withNewGcePersistentDiskLike(getGcePersistentDisk() != null ? getGcePersistentDisk(): new V1GCEPersistentDiskVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.GcePersistentDiskNested editOrNewGcePersistentDiskLike(V1GCEPersistentDiskVolumeSource item) { - return withNewGcePersistentDiskLike(getGcePersistentDisk() != null ? getGcePersistentDisk(): item); - } - - /** - * This method has been deprecated, please use method buildGitRepo instead. - * @return The buildable object. - */ - @Deprecated - public V1GitRepoVolumeSource getGitRepo() { - return this.gitRepo!=null ?this.gitRepo.build():null; - } - public V1GitRepoVolumeSource buildGitRepo() { - return this.gitRepo!=null ?this.gitRepo.build():null; - } - public A withGitRepo(V1GitRepoVolumeSource gitRepo) { - _visitables.get("gitRepo").remove(this.gitRepo); - if (gitRepo!=null){ this.gitRepo= new V1GitRepoVolumeSourceBuilder(gitRepo); _visitables.get("gitRepo").add(this.gitRepo);} else { this.gitRepo = null; _visitables.get("gitRepo").remove(this.gitRepo); } return (A) this; - } - public Boolean hasGitRepo() { - return this.gitRepo != null; - } - public V1VolumeFluentImpl.GitRepoNested withNewGitRepo() { - return new V1VolumeFluentImpl.GitRepoNestedImpl(); - } - public V1VolumeFluentImpl.GitRepoNested withNewGitRepoLike(V1GitRepoVolumeSource item) { - return new V1VolumeFluentImpl.GitRepoNestedImpl(item); - } - public V1VolumeFluentImpl.GitRepoNested editGitRepo() { - return withNewGitRepoLike(getGitRepo()); - } - public V1VolumeFluentImpl.GitRepoNested editOrNewGitRepo() { - return withNewGitRepoLike(getGitRepo() != null ? getGitRepo(): new V1GitRepoVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.GitRepoNested editOrNewGitRepoLike(V1GitRepoVolumeSource item) { - return withNewGitRepoLike(getGitRepo() != null ? getGitRepo(): item); - } - - /** - * This method has been deprecated, please use method buildGlusterfs instead. - * @return The buildable object. - */ - @Deprecated - public V1GlusterfsVolumeSource getGlusterfs() { - return this.glusterfs!=null ?this.glusterfs.build():null; - } - public V1GlusterfsVolumeSource buildGlusterfs() { - return this.glusterfs!=null ?this.glusterfs.build():null; - } - public A withGlusterfs(V1GlusterfsVolumeSource glusterfs) { - _visitables.get("glusterfs").remove(this.glusterfs); - if (glusterfs!=null){ this.glusterfs= new V1GlusterfsVolumeSourceBuilder(glusterfs); _visitables.get("glusterfs").add(this.glusterfs);} else { this.glusterfs = null; _visitables.get("glusterfs").remove(this.glusterfs); } return (A) this; - } - public Boolean hasGlusterfs() { - return this.glusterfs != null; - } - public V1VolumeFluentImpl.GlusterfsNested withNewGlusterfs() { - return new V1VolumeFluentImpl.GlusterfsNestedImpl(); - } - public V1VolumeFluentImpl.GlusterfsNested withNewGlusterfsLike(V1GlusterfsVolumeSource item) { - return new V1VolumeFluentImpl.GlusterfsNestedImpl(item); - } - public V1VolumeFluentImpl.GlusterfsNested editGlusterfs() { - return withNewGlusterfsLike(getGlusterfs()); - } - public V1VolumeFluentImpl.GlusterfsNested editOrNewGlusterfs() { - return withNewGlusterfsLike(getGlusterfs() != null ? getGlusterfs(): new V1GlusterfsVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.GlusterfsNested editOrNewGlusterfsLike(V1GlusterfsVolumeSource item) { - return withNewGlusterfsLike(getGlusterfs() != null ? getGlusterfs(): item); - } - - /** - * This method has been deprecated, please use method buildHostPath instead. - * @return The buildable object. - */ - @Deprecated - public V1HostPathVolumeSource getHostPath() { - return this.hostPath!=null ?this.hostPath.build():null; - } - public V1HostPathVolumeSource buildHostPath() { - return this.hostPath!=null ?this.hostPath.build():null; - } - public A withHostPath(V1HostPathVolumeSource hostPath) { - _visitables.get("hostPath").remove(this.hostPath); - if (hostPath!=null){ this.hostPath= new V1HostPathVolumeSourceBuilder(hostPath); _visitables.get("hostPath").add(this.hostPath);} else { this.hostPath = null; _visitables.get("hostPath").remove(this.hostPath); } return (A) this; - } - public Boolean hasHostPath() { - return this.hostPath != null; - } - public V1VolumeFluentImpl.HostPathNested withNewHostPath() { - return new V1VolumeFluentImpl.HostPathNestedImpl(); - } - public V1VolumeFluentImpl.HostPathNested withNewHostPathLike(V1HostPathVolumeSource item) { - return new V1VolumeFluentImpl.HostPathNestedImpl(item); - } - public V1VolumeFluentImpl.HostPathNested editHostPath() { - return withNewHostPathLike(getHostPath()); - } - public V1VolumeFluentImpl.HostPathNested editOrNewHostPath() { - return withNewHostPathLike(getHostPath() != null ? getHostPath(): new V1HostPathVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.HostPathNested editOrNewHostPathLike(V1HostPathVolumeSource item) { - return withNewHostPathLike(getHostPath() != null ? getHostPath(): item); - } - - /** - * This method has been deprecated, please use method buildIscsi instead. - * @return The buildable object. - */ - @Deprecated - public V1ISCSIVolumeSource getIscsi() { - return this.iscsi!=null ?this.iscsi.build():null; - } - public V1ISCSIVolumeSource buildIscsi() { - return this.iscsi!=null ?this.iscsi.build():null; - } - public A withIscsi(V1ISCSIVolumeSource iscsi) { - _visitables.get("iscsi").remove(this.iscsi); - if (iscsi!=null){ this.iscsi= new V1ISCSIVolumeSourceBuilder(iscsi); _visitables.get("iscsi").add(this.iscsi);} else { this.iscsi = null; _visitables.get("iscsi").remove(this.iscsi); } return (A) this; - } - public Boolean hasIscsi() { - return this.iscsi != null; - } - public V1VolumeFluentImpl.IscsiNested withNewIscsi() { - return new V1VolumeFluentImpl.IscsiNestedImpl(); - } - public V1VolumeFluentImpl.IscsiNested withNewIscsiLike(V1ISCSIVolumeSource item) { - return new V1VolumeFluentImpl.IscsiNestedImpl(item); - } - public V1VolumeFluentImpl.IscsiNested editIscsi() { - return withNewIscsiLike(getIscsi()); - } - public V1VolumeFluentImpl.IscsiNested editOrNewIscsi() { - return withNewIscsiLike(getIscsi() != null ? getIscsi(): new V1ISCSIVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.IscsiNested editOrNewIscsiLike(V1ISCSIVolumeSource item) { - return withNewIscsiLike(getIscsi() != null ? getIscsi(): item); - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - - /** - * This method has been deprecated, please use method buildNfs instead. - * @return The buildable object. - */ - @Deprecated - public V1NFSVolumeSource getNfs() { - return this.nfs!=null ?this.nfs.build():null; - } - public V1NFSVolumeSource buildNfs() { - return this.nfs!=null ?this.nfs.build():null; - } - public A withNfs(V1NFSVolumeSource nfs) { - _visitables.get("nfs").remove(this.nfs); - if (nfs!=null){ this.nfs= new V1NFSVolumeSourceBuilder(nfs); _visitables.get("nfs").add(this.nfs);} else { this.nfs = null; _visitables.get("nfs").remove(this.nfs); } return (A) this; - } - public Boolean hasNfs() { - return this.nfs != null; - } - public V1VolumeFluentImpl.NfsNested withNewNfs() { - return new V1VolumeFluentImpl.NfsNestedImpl(); - } - public V1VolumeFluentImpl.NfsNested withNewNfsLike(V1NFSVolumeSource item) { - return new V1VolumeFluentImpl.NfsNestedImpl(item); - } - public V1VolumeFluentImpl.NfsNested editNfs() { - return withNewNfsLike(getNfs()); - } - public V1VolumeFluentImpl.NfsNested editOrNewNfs() { - return withNewNfsLike(getNfs() != null ? getNfs(): new V1NFSVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.NfsNested editOrNewNfsLike(V1NFSVolumeSource item) { - return withNewNfsLike(getNfs() != null ? getNfs(): item); - } - - /** - * This method has been deprecated, please use method buildPersistentVolumeClaim instead. - * @return The buildable object. - */ - @Deprecated - public V1PersistentVolumeClaimVolumeSource getPersistentVolumeClaim() { - return this.persistentVolumeClaim!=null ?this.persistentVolumeClaim.build():null; - } - public V1PersistentVolumeClaimVolumeSource buildPersistentVolumeClaim() { - return this.persistentVolumeClaim!=null ?this.persistentVolumeClaim.build():null; - } - public A withPersistentVolumeClaim(V1PersistentVolumeClaimVolumeSource persistentVolumeClaim) { - _visitables.get("persistentVolumeClaim").remove(this.persistentVolumeClaim); - if (persistentVolumeClaim!=null){ this.persistentVolumeClaim= new V1PersistentVolumeClaimVolumeSourceBuilder(persistentVolumeClaim); _visitables.get("persistentVolumeClaim").add(this.persistentVolumeClaim);} else { this.persistentVolumeClaim = null; _visitables.get("persistentVolumeClaim").remove(this.persistentVolumeClaim); } return (A) this; - } - public Boolean hasPersistentVolumeClaim() { - return this.persistentVolumeClaim != null; - } - public V1VolumeFluentImpl.PersistentVolumeClaimNested withNewPersistentVolumeClaim() { - return new V1VolumeFluentImpl.PersistentVolumeClaimNestedImpl(); - } - public V1VolumeFluentImpl.PersistentVolumeClaimNested withNewPersistentVolumeClaimLike(V1PersistentVolumeClaimVolumeSource item) { - return new V1VolumeFluentImpl.PersistentVolumeClaimNestedImpl(item); - } - public V1VolumeFluentImpl.PersistentVolumeClaimNested editPersistentVolumeClaim() { - return withNewPersistentVolumeClaimLike(getPersistentVolumeClaim()); - } - public V1VolumeFluentImpl.PersistentVolumeClaimNested editOrNewPersistentVolumeClaim() { - return withNewPersistentVolumeClaimLike(getPersistentVolumeClaim() != null ? getPersistentVolumeClaim(): new V1PersistentVolumeClaimVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.PersistentVolumeClaimNested editOrNewPersistentVolumeClaimLike(V1PersistentVolumeClaimVolumeSource item) { - return withNewPersistentVolumeClaimLike(getPersistentVolumeClaim() != null ? getPersistentVolumeClaim(): item); - } - - /** - * This method has been deprecated, please use method buildPhotonPersistentDisk instead. - * @return The buildable object. - */ - @Deprecated - public V1PhotonPersistentDiskVolumeSource getPhotonPersistentDisk() { - return this.photonPersistentDisk!=null ?this.photonPersistentDisk.build():null; - } - public V1PhotonPersistentDiskVolumeSource buildPhotonPersistentDisk() { - return this.photonPersistentDisk!=null ?this.photonPersistentDisk.build():null; - } - public A withPhotonPersistentDisk(V1PhotonPersistentDiskVolumeSource photonPersistentDisk) { - _visitables.get("photonPersistentDisk").remove(this.photonPersistentDisk); - if (photonPersistentDisk!=null){ this.photonPersistentDisk= new V1PhotonPersistentDiskVolumeSourceBuilder(photonPersistentDisk); _visitables.get("photonPersistentDisk").add(this.photonPersistentDisk);} else { this.photonPersistentDisk = null; _visitables.get("photonPersistentDisk").remove(this.photonPersistentDisk); } return (A) this; - } - public Boolean hasPhotonPersistentDisk() { - return this.photonPersistentDisk != null; - } - public V1VolumeFluentImpl.PhotonPersistentDiskNested withNewPhotonPersistentDisk() { - return new V1VolumeFluentImpl.PhotonPersistentDiskNestedImpl(); - } - public V1VolumeFluentImpl.PhotonPersistentDiskNested withNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item) { - return new V1VolumeFluentImpl.PhotonPersistentDiskNestedImpl(item); - } - public V1VolumeFluentImpl.PhotonPersistentDiskNested editPhotonPersistentDisk() { - return withNewPhotonPersistentDiskLike(getPhotonPersistentDisk()); - } - public V1VolumeFluentImpl.PhotonPersistentDiskNested editOrNewPhotonPersistentDisk() { - return withNewPhotonPersistentDiskLike(getPhotonPersistentDisk() != null ? getPhotonPersistentDisk(): new V1PhotonPersistentDiskVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.PhotonPersistentDiskNested editOrNewPhotonPersistentDiskLike(V1PhotonPersistentDiskVolumeSource item) { - return withNewPhotonPersistentDiskLike(getPhotonPersistentDisk() != null ? getPhotonPersistentDisk(): item); - } - - /** - * This method has been deprecated, please use method buildPortworxVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1PortworxVolumeSource getPortworxVolume() { - return this.portworxVolume!=null ?this.portworxVolume.build():null; - } - public V1PortworxVolumeSource buildPortworxVolume() { - return this.portworxVolume!=null ?this.portworxVolume.build():null; - } - public A withPortworxVolume(V1PortworxVolumeSource portworxVolume) { - _visitables.get("portworxVolume").remove(this.portworxVolume); - if (portworxVolume!=null){ this.portworxVolume= new V1PortworxVolumeSourceBuilder(portworxVolume); _visitables.get("portworxVolume").add(this.portworxVolume);} else { this.portworxVolume = null; _visitables.get("portworxVolume").remove(this.portworxVolume); } return (A) this; - } - public Boolean hasPortworxVolume() { - return this.portworxVolume != null; - } - public V1VolumeFluentImpl.PortworxVolumeNested withNewPortworxVolume() { - return new V1VolumeFluentImpl.PortworxVolumeNestedImpl(); - } - public V1VolumeFluentImpl.PortworxVolumeNested withNewPortworxVolumeLike(V1PortworxVolumeSource item) { - return new V1VolumeFluentImpl.PortworxVolumeNestedImpl(item); - } - public V1VolumeFluentImpl.PortworxVolumeNested editPortworxVolume() { - return withNewPortworxVolumeLike(getPortworxVolume()); - } - public V1VolumeFluentImpl.PortworxVolumeNested editOrNewPortworxVolume() { - return withNewPortworxVolumeLike(getPortworxVolume() != null ? getPortworxVolume(): new V1PortworxVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.PortworxVolumeNested editOrNewPortworxVolumeLike(V1PortworxVolumeSource item) { - return withNewPortworxVolumeLike(getPortworxVolume() != null ? getPortworxVolume(): item); - } - - /** - * This method has been deprecated, please use method buildProjected instead. - * @return The buildable object. - */ - @Deprecated - public V1ProjectedVolumeSource getProjected() { - return this.projected!=null ?this.projected.build():null; - } - public V1ProjectedVolumeSource buildProjected() { - return this.projected!=null ?this.projected.build():null; - } - public A withProjected(V1ProjectedVolumeSource projected) { - _visitables.get("projected").remove(this.projected); - if (projected!=null){ this.projected= new V1ProjectedVolumeSourceBuilder(projected); _visitables.get("projected").add(this.projected);} else { this.projected = null; _visitables.get("projected").remove(this.projected); } return (A) this; - } - public Boolean hasProjected() { - return this.projected != null; - } - public V1VolumeFluentImpl.ProjectedNested withNewProjected() { - return new V1VolumeFluentImpl.ProjectedNestedImpl(); - } - public V1VolumeFluentImpl.ProjectedNested withNewProjectedLike(V1ProjectedVolumeSource item) { - return new V1VolumeFluentImpl.ProjectedNestedImpl(item); - } - public V1VolumeFluentImpl.ProjectedNested editProjected() { - return withNewProjectedLike(getProjected()); - } - public V1VolumeFluentImpl.ProjectedNested editOrNewProjected() { - return withNewProjectedLike(getProjected() != null ? getProjected(): new V1ProjectedVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.ProjectedNested editOrNewProjectedLike(V1ProjectedVolumeSource item) { - return withNewProjectedLike(getProjected() != null ? getProjected(): item); - } - - /** - * This method has been deprecated, please use method buildQuobyte instead. - * @return The buildable object. - */ - @Deprecated - public V1QuobyteVolumeSource getQuobyte() { - return this.quobyte!=null ?this.quobyte.build():null; - } - public V1QuobyteVolumeSource buildQuobyte() { - return this.quobyte!=null ?this.quobyte.build():null; - } - public A withQuobyte(V1QuobyteVolumeSource quobyte) { - _visitables.get("quobyte").remove(this.quobyte); - if (quobyte!=null){ this.quobyte= new V1QuobyteVolumeSourceBuilder(quobyte); _visitables.get("quobyte").add(this.quobyte);} else { this.quobyte = null; _visitables.get("quobyte").remove(this.quobyte); } return (A) this; - } - public Boolean hasQuobyte() { - return this.quobyte != null; - } - public V1VolumeFluentImpl.QuobyteNested withNewQuobyte() { - return new V1VolumeFluentImpl.QuobyteNestedImpl(); - } - public V1VolumeFluentImpl.QuobyteNested withNewQuobyteLike(V1QuobyteVolumeSource item) { - return new V1VolumeFluentImpl.QuobyteNestedImpl(item); - } - public V1VolumeFluentImpl.QuobyteNested editQuobyte() { - return withNewQuobyteLike(getQuobyte()); - } - public V1VolumeFluentImpl.QuobyteNested editOrNewQuobyte() { - return withNewQuobyteLike(getQuobyte() != null ? getQuobyte(): new V1QuobyteVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.QuobyteNested editOrNewQuobyteLike(V1QuobyteVolumeSource item) { - return withNewQuobyteLike(getQuobyte() != null ? getQuobyte(): item); - } - - /** - * This method has been deprecated, please use method buildRbd instead. - * @return The buildable object. - */ - @Deprecated - public V1RBDVolumeSource getRbd() { - return this.rbd!=null ?this.rbd.build():null; - } - public V1RBDVolumeSource buildRbd() { - return this.rbd!=null ?this.rbd.build():null; - } - public A withRbd(V1RBDVolumeSource rbd) { - _visitables.get("rbd").remove(this.rbd); - if (rbd!=null){ this.rbd= new V1RBDVolumeSourceBuilder(rbd); _visitables.get("rbd").add(this.rbd);} else { this.rbd = null; _visitables.get("rbd").remove(this.rbd); } return (A) this; - } - public Boolean hasRbd() { - return this.rbd != null; - } - public V1VolumeFluentImpl.RbdNested withNewRbd() { - return new V1VolumeFluentImpl.RbdNestedImpl(); - } - public V1VolumeFluentImpl.RbdNested withNewRbdLike(V1RBDVolumeSource item) { - return new V1VolumeFluentImpl.RbdNestedImpl(item); - } - public V1VolumeFluentImpl.RbdNested editRbd() { - return withNewRbdLike(getRbd()); - } - public V1VolumeFluentImpl.RbdNested editOrNewRbd() { - return withNewRbdLike(getRbd() != null ? getRbd(): new V1RBDVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.RbdNested editOrNewRbdLike(V1RBDVolumeSource item) { - return withNewRbdLike(getRbd() != null ? getRbd(): item); - } - - /** - * This method has been deprecated, please use method buildScaleIO instead. - * @return The buildable object. - */ - @Deprecated - public V1ScaleIOVolumeSource getScaleIO() { - return this.scaleIO!=null ?this.scaleIO.build():null; - } - public V1ScaleIOVolumeSource buildScaleIO() { - return this.scaleIO!=null ?this.scaleIO.build():null; - } - public A withScaleIO(V1ScaleIOVolumeSource scaleIO) { - _visitables.get("scaleIO").remove(this.scaleIO); - if (scaleIO!=null){ this.scaleIO= new V1ScaleIOVolumeSourceBuilder(scaleIO); _visitables.get("scaleIO").add(this.scaleIO);} else { this.scaleIO = null; _visitables.get("scaleIO").remove(this.scaleIO); } return (A) this; - } - public Boolean hasScaleIO() { - return this.scaleIO != null; - } - public V1VolumeFluentImpl.ScaleIONested withNewScaleIO() { - return new V1VolumeFluentImpl.ScaleIONestedImpl(); - } - public V1VolumeFluentImpl.ScaleIONested withNewScaleIOLike(V1ScaleIOVolumeSource item) { - return new V1VolumeFluentImpl.ScaleIONestedImpl(item); - } - public V1VolumeFluentImpl.ScaleIONested editScaleIO() { - return withNewScaleIOLike(getScaleIO()); - } - public V1VolumeFluentImpl.ScaleIONested editOrNewScaleIO() { - return withNewScaleIOLike(getScaleIO() != null ? getScaleIO(): new V1ScaleIOVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.ScaleIONested editOrNewScaleIOLike(V1ScaleIOVolumeSource item) { - return withNewScaleIOLike(getScaleIO() != null ? getScaleIO(): item); - } - - /** - * This method has been deprecated, please use method buildSecret instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretVolumeSource getSecret() { - return this.secret!=null ?this.secret.build():null; - } - public V1SecretVolumeSource buildSecret() { - return this.secret!=null ?this.secret.build():null; - } - public A withSecret(V1SecretVolumeSource secret) { - _visitables.get("secret").remove(this.secret); - if (secret!=null){ this.secret= new V1SecretVolumeSourceBuilder(secret); _visitables.get("secret").add(this.secret);} else { this.secret = null; _visitables.get("secret").remove(this.secret); } return (A) this; - } - public Boolean hasSecret() { - return this.secret != null; - } - public V1VolumeFluentImpl.SecretNested withNewSecret() { - return new V1VolumeFluentImpl.SecretNestedImpl(); - } - public V1VolumeFluentImpl.SecretNested withNewSecretLike(V1SecretVolumeSource item) { - return new V1VolumeFluentImpl.SecretNestedImpl(item); - } - public V1VolumeFluentImpl.SecretNested editSecret() { - return withNewSecretLike(getSecret()); - } - public V1VolumeFluentImpl.SecretNested editOrNewSecret() { - return withNewSecretLike(getSecret() != null ? getSecret(): new V1SecretVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.SecretNested editOrNewSecretLike(V1SecretVolumeSource item) { - return withNewSecretLike(getSecret() != null ? getSecret(): item); - } - - /** - * This method has been deprecated, please use method buildStorageos instead. - * @return The buildable object. - */ - @Deprecated - public V1StorageOSVolumeSource getStorageos() { - return this.storageos!=null ?this.storageos.build():null; - } - public V1StorageOSVolumeSource buildStorageos() { - return this.storageos!=null ?this.storageos.build():null; - } - public A withStorageos(V1StorageOSVolumeSource storageos) { - _visitables.get("storageos").remove(this.storageos); - if (storageos!=null){ this.storageos= new V1StorageOSVolumeSourceBuilder(storageos); _visitables.get("storageos").add(this.storageos);} else { this.storageos = null; _visitables.get("storageos").remove(this.storageos); } return (A) this; - } - public Boolean hasStorageos() { - return this.storageos != null; - } - public V1VolumeFluentImpl.StorageosNested withNewStorageos() { - return new V1VolumeFluentImpl.StorageosNestedImpl(); - } - public V1VolumeFluentImpl.StorageosNested withNewStorageosLike(V1StorageOSVolumeSource item) { - return new V1VolumeFluentImpl.StorageosNestedImpl(item); - } - public V1VolumeFluentImpl.StorageosNested editStorageos() { - return withNewStorageosLike(getStorageos()); - } - public V1VolumeFluentImpl.StorageosNested editOrNewStorageos() { - return withNewStorageosLike(getStorageos() != null ? getStorageos(): new V1StorageOSVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.StorageosNested editOrNewStorageosLike(V1StorageOSVolumeSource item) { - return withNewStorageosLike(getStorageos() != null ? getStorageos(): item); - } - - /** - * This method has been deprecated, please use method buildVsphereVolume instead. - * @return The buildable object. - */ - @Deprecated - public V1VsphereVirtualDiskVolumeSource getVsphereVolume() { - return this.vsphereVolume!=null ?this.vsphereVolume.build():null; - } - public V1VsphereVirtualDiskVolumeSource buildVsphereVolume() { - return this.vsphereVolume!=null ?this.vsphereVolume.build():null; - } - public A withVsphereVolume(V1VsphereVirtualDiskVolumeSource vsphereVolume) { - _visitables.get("vsphereVolume").remove(this.vsphereVolume); - if (vsphereVolume!=null){ this.vsphereVolume= new V1VsphereVirtualDiskVolumeSourceBuilder(vsphereVolume); _visitables.get("vsphereVolume").add(this.vsphereVolume);} else { this.vsphereVolume = null; _visitables.get("vsphereVolume").remove(this.vsphereVolume); } return (A) this; - } - public Boolean hasVsphereVolume() { - return this.vsphereVolume != null; - } - public V1VolumeFluentImpl.VsphereVolumeNested withNewVsphereVolume() { - return new V1VolumeFluentImpl.VsphereVolumeNestedImpl(); - } - public V1VolumeFluentImpl.VsphereVolumeNested withNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item) { - return new V1VolumeFluentImpl.VsphereVolumeNestedImpl(item); - } - public V1VolumeFluentImpl.VsphereVolumeNested editVsphereVolume() { - return withNewVsphereVolumeLike(getVsphereVolume()); - } - public V1VolumeFluentImpl.VsphereVolumeNested editOrNewVsphereVolume() { - return withNewVsphereVolumeLike(getVsphereVolume() != null ? getVsphereVolume(): new V1VsphereVirtualDiskVolumeSourceBuilder().build()); - } - public V1VolumeFluentImpl.VsphereVolumeNested editOrNewVsphereVolumeLike(V1VsphereVirtualDiskVolumeSource item) { - return withNewVsphereVolumeLike(getVsphereVolume() != null ? getVsphereVolume(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeFluentImpl that = (V1VolumeFluentImpl) o; - if (!java.util.Objects.equals(awsElasticBlockStore, that.awsElasticBlockStore)) return false; - - if (!java.util.Objects.equals(azureDisk, that.azureDisk)) return false; - - if (!java.util.Objects.equals(azureFile, that.azureFile)) return false; - - if (!java.util.Objects.equals(cephfs, that.cephfs)) return false; - - if (!java.util.Objects.equals(cinder, that.cinder)) return false; - - if (!java.util.Objects.equals(configMap, that.configMap)) return false; - - if (!java.util.Objects.equals(csi, that.csi)) return false; - - if (!java.util.Objects.equals(downwardAPI, that.downwardAPI)) return false; - - if (!java.util.Objects.equals(emptyDir, that.emptyDir)) return false; - - if (!java.util.Objects.equals(ephemeral, that.ephemeral)) return false; - - if (!java.util.Objects.equals(fc, that.fc)) return false; - - if (!java.util.Objects.equals(flexVolume, that.flexVolume)) return false; - - if (!java.util.Objects.equals(flocker, that.flocker)) return false; - - if (!java.util.Objects.equals(gcePersistentDisk, that.gcePersistentDisk)) return false; - - if (!java.util.Objects.equals(gitRepo, that.gitRepo)) return false; - - if (!java.util.Objects.equals(glusterfs, that.glusterfs)) return false; - - if (!java.util.Objects.equals(hostPath, that.hostPath)) return false; - - if (!java.util.Objects.equals(iscsi, that.iscsi)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(nfs, that.nfs)) return false; - - if (!java.util.Objects.equals(persistentVolumeClaim, that.persistentVolumeClaim)) return false; - - if (!java.util.Objects.equals(photonPersistentDisk, that.photonPersistentDisk)) return false; - - if (!java.util.Objects.equals(portworxVolume, that.portworxVolume)) return false; - - if (!java.util.Objects.equals(projected, that.projected)) return false; - - if (!java.util.Objects.equals(quobyte, that.quobyte)) return false; - - if (!java.util.Objects.equals(rbd, that.rbd)) return false; - - if (!java.util.Objects.equals(scaleIO, that.scaleIO)) return false; - - if (!java.util.Objects.equals(secret, that.secret)) return false; - - if (!java.util.Objects.equals(storageos, that.storageos)) return false; - - if (!java.util.Objects.equals(vsphereVolume, that.vsphereVolume)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(awsElasticBlockStore, azureDisk, azureFile, cephfs, cinder, configMap, csi, downwardAPI, emptyDir, ephemeral, fc, flexVolume, flocker, gcePersistentDisk, gitRepo, glusterfs, hostPath, iscsi, name, nfs, persistentVolumeClaim, photonPersistentDisk, portworxVolume, projected, quobyte, rbd, scaleIO, secret, storageos, vsphereVolume, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (awsElasticBlockStore != null) { sb.append("awsElasticBlockStore:"); sb.append(awsElasticBlockStore + ","); } - if (azureDisk != null) { sb.append("azureDisk:"); sb.append(azureDisk + ","); } - if (azureFile != null) { sb.append("azureFile:"); sb.append(azureFile + ","); } - if (cephfs != null) { sb.append("cephfs:"); sb.append(cephfs + ","); } - if (cinder != null) { sb.append("cinder:"); sb.append(cinder + ","); } - if (configMap != null) { sb.append("configMap:"); sb.append(configMap + ","); } - if (csi != null) { sb.append("csi:"); sb.append(csi + ","); } - if (downwardAPI != null) { sb.append("downwardAPI:"); sb.append(downwardAPI + ","); } - if (emptyDir != null) { sb.append("emptyDir:"); sb.append(emptyDir + ","); } - if (ephemeral != null) { sb.append("ephemeral:"); sb.append(ephemeral + ","); } - if (fc != null) { sb.append("fc:"); sb.append(fc + ","); } - if (flexVolume != null) { sb.append("flexVolume:"); sb.append(flexVolume + ","); } - if (flocker != null) { sb.append("flocker:"); sb.append(flocker + ","); } - if (gcePersistentDisk != null) { sb.append("gcePersistentDisk:"); sb.append(gcePersistentDisk + ","); } - if (gitRepo != null) { sb.append("gitRepo:"); sb.append(gitRepo + ","); } - if (glusterfs != null) { sb.append("glusterfs:"); sb.append(glusterfs + ","); } - if (hostPath != null) { sb.append("hostPath:"); sb.append(hostPath + ","); } - if (iscsi != null) { sb.append("iscsi:"); sb.append(iscsi + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (nfs != null) { sb.append("nfs:"); sb.append(nfs + ","); } - if (persistentVolumeClaim != null) { sb.append("persistentVolumeClaim:"); sb.append(persistentVolumeClaim + ","); } - if (photonPersistentDisk != null) { sb.append("photonPersistentDisk:"); sb.append(photonPersistentDisk + ","); } - if (portworxVolume != null) { sb.append("portworxVolume:"); sb.append(portworxVolume + ","); } - if (projected != null) { sb.append("projected:"); sb.append(projected + ","); } - if (quobyte != null) { sb.append("quobyte:"); sb.append(quobyte + ","); } - if (rbd != null) { sb.append("rbd:"); sb.append(rbd + ","); } - if (scaleIO != null) { sb.append("scaleIO:"); sb.append(scaleIO + ","); } - if (secret != null) { sb.append("secret:"); sb.append(secret + ","); } - if (storageos != null) { sb.append("storageos:"); sb.append(storageos + ","); } - if (vsphereVolume != null) { sb.append("vsphereVolume:"); sb.append(vsphereVolume); } - sb.append("}"); - return sb.toString(); - } - class AwsElasticBlockStoreNestedImpl extends V1AWSElasticBlockStoreVolumeSourceFluentImpl> implements V1VolumeFluentImpl.AwsElasticBlockStoreNested,Nested{ - AwsElasticBlockStoreNestedImpl(V1AWSElasticBlockStoreVolumeSource item) { - this.builder = new V1AWSElasticBlockStoreVolumeSourceBuilder(this, item); - } - AwsElasticBlockStoreNestedImpl() { - this.builder = new V1AWSElasticBlockStoreVolumeSourceBuilder(this); - } - V1AWSElasticBlockStoreVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withAwsElasticBlockStore(builder.build()); - } - public N endAwsElasticBlockStore() { - return and(); - } - - } - class AzureDiskNestedImpl extends V1AzureDiskVolumeSourceFluentImpl> implements V1VolumeFluentImpl.AzureDiskNested,Nested{ - AzureDiskNestedImpl(V1AzureDiskVolumeSource item) { - this.builder = new V1AzureDiskVolumeSourceBuilder(this, item); - } - AzureDiskNestedImpl() { - this.builder = new V1AzureDiskVolumeSourceBuilder(this); - } - V1AzureDiskVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withAzureDisk(builder.build()); - } - public N endAzureDisk() { - return and(); - } - - } - class AzureFileNestedImpl extends V1AzureFileVolumeSourceFluentImpl> implements V1VolumeFluentImpl.AzureFileNested,Nested{ - AzureFileNestedImpl(V1AzureFileVolumeSource item) { - this.builder = new V1AzureFileVolumeSourceBuilder(this, item); - } - AzureFileNestedImpl() { - this.builder = new V1AzureFileVolumeSourceBuilder(this); - } - V1AzureFileVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withAzureFile(builder.build()); - } - public N endAzureFile() { - return and(); - } - - } - class CephfsNestedImpl extends V1CephFSVolumeSourceFluentImpl> implements V1VolumeFluentImpl.CephfsNested,Nested{ - CephfsNestedImpl(V1CephFSVolumeSource item) { - this.builder = new V1CephFSVolumeSourceBuilder(this, item); - } - CephfsNestedImpl() { - this.builder = new V1CephFSVolumeSourceBuilder(this); - } - V1CephFSVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withCephfs(builder.build()); - } - public N endCephfs() { - return and(); - } - - } - class CinderNestedImpl extends V1CinderVolumeSourceFluentImpl> implements V1VolumeFluentImpl.CinderNested,Nested{ - CinderNestedImpl(V1CinderVolumeSource item) { - this.builder = new V1CinderVolumeSourceBuilder(this, item); - } - CinderNestedImpl() { - this.builder = new V1CinderVolumeSourceBuilder(this); - } - V1CinderVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withCinder(builder.build()); - } - public N endCinder() { - return and(); - } - - } - class ConfigMapNestedImpl extends V1ConfigMapVolumeSourceFluentImpl> implements V1VolumeFluentImpl.ConfigMapNested,Nested{ - ConfigMapNestedImpl(V1ConfigMapVolumeSource item) { - this.builder = new V1ConfigMapVolumeSourceBuilder(this, item); - } - ConfigMapNestedImpl() { - this.builder = new V1ConfigMapVolumeSourceBuilder(this); - } - V1ConfigMapVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withConfigMap(builder.build()); - } - public N endConfigMap() { - return and(); - } - - } - class CsiNestedImpl extends V1CSIVolumeSourceFluentImpl> implements V1VolumeFluentImpl.CsiNested,Nested{ - CsiNestedImpl(V1CSIVolumeSource item) { - this.builder = new V1CSIVolumeSourceBuilder(this, item); - } - CsiNestedImpl() { - this.builder = new V1CSIVolumeSourceBuilder(this); - } - V1CSIVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withCsi(builder.build()); - } - public N endCsi() { - return and(); - } - - } - class DownwardAPINestedImpl extends V1DownwardAPIVolumeSourceFluentImpl> implements V1VolumeFluentImpl.DownwardAPINested,Nested{ - DownwardAPINestedImpl(V1DownwardAPIVolumeSource item) { - this.builder = new V1DownwardAPIVolumeSourceBuilder(this, item); - } - DownwardAPINestedImpl() { - this.builder = new V1DownwardAPIVolumeSourceBuilder(this); - } - V1DownwardAPIVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withDownwardAPI(builder.build()); - } - public N endDownwardAPI() { - return and(); - } - - } - class EmptyDirNestedImpl extends V1EmptyDirVolumeSourceFluentImpl> implements V1VolumeFluentImpl.EmptyDirNested,Nested{ - EmptyDirNestedImpl(V1EmptyDirVolumeSource item) { - this.builder = new V1EmptyDirVolumeSourceBuilder(this, item); - } - EmptyDirNestedImpl() { - this.builder = new V1EmptyDirVolumeSourceBuilder(this); - } - V1EmptyDirVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withEmptyDir(builder.build()); - } - public N endEmptyDir() { - return and(); - } - - } - class EphemeralNestedImpl extends V1EphemeralVolumeSourceFluentImpl> implements V1VolumeFluentImpl.EphemeralNested,Nested{ - EphemeralNestedImpl(V1EphemeralVolumeSource item) { - this.builder = new V1EphemeralVolumeSourceBuilder(this, item); - } - EphemeralNestedImpl() { - this.builder = new V1EphemeralVolumeSourceBuilder(this); - } - V1EphemeralVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withEphemeral(builder.build()); - } - public N endEphemeral() { - return and(); - } - - } - class FcNestedImpl extends V1FCVolumeSourceFluentImpl> implements V1VolumeFluentImpl.FcNested,Nested{ - FcNestedImpl(V1FCVolumeSource item) { - this.builder = new V1FCVolumeSourceBuilder(this, item); - } - FcNestedImpl() { - this.builder = new V1FCVolumeSourceBuilder(this); - } - V1FCVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withFc(builder.build()); - } - public N endFc() { - return and(); - } - - } - class FlexVolumeNestedImpl extends V1FlexVolumeSourceFluentImpl> implements V1VolumeFluentImpl.FlexVolumeNested,Nested{ - FlexVolumeNestedImpl(V1FlexVolumeSource item) { - this.builder = new V1FlexVolumeSourceBuilder(this, item); - } - FlexVolumeNestedImpl() { - this.builder = new V1FlexVolumeSourceBuilder(this); - } - V1FlexVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withFlexVolume(builder.build()); - } - public N endFlexVolume() { - return and(); - } - - } - class FlockerNestedImpl extends V1FlockerVolumeSourceFluentImpl> implements V1VolumeFluentImpl.FlockerNested,Nested{ - FlockerNestedImpl(V1FlockerVolumeSource item) { - this.builder = new V1FlockerVolumeSourceBuilder(this, item); - } - FlockerNestedImpl() { - this.builder = new V1FlockerVolumeSourceBuilder(this); - } - V1FlockerVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withFlocker(builder.build()); - } - public N endFlocker() { - return and(); - } - - } - class GcePersistentDiskNestedImpl extends V1GCEPersistentDiskVolumeSourceFluentImpl> implements V1VolumeFluentImpl.GcePersistentDiskNested,Nested{ - GcePersistentDiskNestedImpl(V1GCEPersistentDiskVolumeSource item) { - this.builder = new V1GCEPersistentDiskVolumeSourceBuilder(this, item); - } - GcePersistentDiskNestedImpl() { - this.builder = new V1GCEPersistentDiskVolumeSourceBuilder(this); - } - V1GCEPersistentDiskVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withGcePersistentDisk(builder.build()); - } - public N endGcePersistentDisk() { - return and(); - } - - } - class GitRepoNestedImpl extends V1GitRepoVolumeSourceFluentImpl> implements V1VolumeFluentImpl.GitRepoNested,Nested{ - GitRepoNestedImpl(V1GitRepoVolumeSource item) { - this.builder = new V1GitRepoVolumeSourceBuilder(this, item); - } - GitRepoNestedImpl() { - this.builder = new V1GitRepoVolumeSourceBuilder(this); - } - V1GitRepoVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withGitRepo(builder.build()); - } - public N endGitRepo() { - return and(); - } - - } - class GlusterfsNestedImpl extends V1GlusterfsVolumeSourceFluentImpl> implements V1VolumeFluentImpl.GlusterfsNested,Nested{ - GlusterfsNestedImpl(V1GlusterfsVolumeSource item) { - this.builder = new V1GlusterfsVolumeSourceBuilder(this, item); - } - GlusterfsNestedImpl() { - this.builder = new V1GlusterfsVolumeSourceBuilder(this); - } - V1GlusterfsVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withGlusterfs(builder.build()); - } - public N endGlusterfs() { - return and(); - } - - } - class HostPathNestedImpl extends V1HostPathVolumeSourceFluentImpl> implements V1VolumeFluentImpl.HostPathNested,Nested{ - HostPathNestedImpl(V1HostPathVolumeSource item) { - this.builder = new V1HostPathVolumeSourceBuilder(this, item); - } - HostPathNestedImpl() { - this.builder = new V1HostPathVolumeSourceBuilder(this); - } - V1HostPathVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withHostPath(builder.build()); - } - public N endHostPath() { - return and(); - } - - } - class IscsiNestedImpl extends V1ISCSIVolumeSourceFluentImpl> implements V1VolumeFluentImpl.IscsiNested,Nested{ - IscsiNestedImpl(V1ISCSIVolumeSource item) { - this.builder = new V1ISCSIVolumeSourceBuilder(this, item); - } - IscsiNestedImpl() { - this.builder = new V1ISCSIVolumeSourceBuilder(this); - } - V1ISCSIVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withIscsi(builder.build()); - } - public N endIscsi() { - return and(); - } - - } - class NfsNestedImpl extends V1NFSVolumeSourceFluentImpl> implements V1VolumeFluentImpl.NfsNested,Nested{ - NfsNestedImpl(V1NFSVolumeSource item) { - this.builder = new V1NFSVolumeSourceBuilder(this, item); - } - NfsNestedImpl() { - this.builder = new V1NFSVolumeSourceBuilder(this); - } - V1NFSVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withNfs(builder.build()); - } - public N endNfs() { - return and(); - } - - } - class PersistentVolumeClaimNestedImpl extends V1PersistentVolumeClaimVolumeSourceFluentImpl> implements V1VolumeFluentImpl.PersistentVolumeClaimNested,Nested{ - PersistentVolumeClaimNestedImpl(V1PersistentVolumeClaimVolumeSource item) { - this.builder = new V1PersistentVolumeClaimVolumeSourceBuilder(this, item); - } - PersistentVolumeClaimNestedImpl() { - this.builder = new V1PersistentVolumeClaimVolumeSourceBuilder(this); - } - V1PersistentVolumeClaimVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withPersistentVolumeClaim(builder.build()); - } - public N endPersistentVolumeClaim() { - return and(); - } - - } - class PhotonPersistentDiskNestedImpl extends V1PhotonPersistentDiskVolumeSourceFluentImpl> implements V1VolumeFluentImpl.PhotonPersistentDiskNested,Nested{ - PhotonPersistentDiskNestedImpl(V1PhotonPersistentDiskVolumeSource item) { - this.builder = new V1PhotonPersistentDiskVolumeSourceBuilder(this, item); - } - PhotonPersistentDiskNestedImpl() { - this.builder = new V1PhotonPersistentDiskVolumeSourceBuilder(this); - } - V1PhotonPersistentDiskVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withPhotonPersistentDisk(builder.build()); - } - public N endPhotonPersistentDisk() { - return and(); - } - - } - class PortworxVolumeNestedImpl extends V1PortworxVolumeSourceFluentImpl> implements V1VolumeFluentImpl.PortworxVolumeNested,Nested{ - PortworxVolumeNestedImpl(V1PortworxVolumeSource item) { - this.builder = new V1PortworxVolumeSourceBuilder(this, item); - } - PortworxVolumeNestedImpl() { - this.builder = new V1PortworxVolumeSourceBuilder(this); - } - V1PortworxVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withPortworxVolume(builder.build()); - } - public N endPortworxVolume() { - return and(); - } - - } - class ProjectedNestedImpl extends V1ProjectedVolumeSourceFluentImpl> implements V1VolumeFluentImpl.ProjectedNested,Nested{ - ProjectedNestedImpl(V1ProjectedVolumeSource item) { - this.builder = new V1ProjectedVolumeSourceBuilder(this, item); - } - ProjectedNestedImpl() { - this.builder = new V1ProjectedVolumeSourceBuilder(this); - } - V1ProjectedVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withProjected(builder.build()); - } - public N endProjected() { - return and(); - } - - } - class QuobyteNestedImpl extends V1QuobyteVolumeSourceFluentImpl> implements V1VolumeFluentImpl.QuobyteNested,Nested{ - QuobyteNestedImpl(V1QuobyteVolumeSource item) { - this.builder = new V1QuobyteVolumeSourceBuilder(this, item); - } - QuobyteNestedImpl() { - this.builder = new V1QuobyteVolumeSourceBuilder(this); - } - V1QuobyteVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withQuobyte(builder.build()); - } - public N endQuobyte() { - return and(); - } - - } - class RbdNestedImpl extends V1RBDVolumeSourceFluentImpl> implements V1VolumeFluentImpl.RbdNested,Nested{ - RbdNestedImpl(V1RBDVolumeSource item) { - this.builder = new V1RBDVolumeSourceBuilder(this, item); - } - RbdNestedImpl() { - this.builder = new V1RBDVolumeSourceBuilder(this); - } - V1RBDVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withRbd(builder.build()); - } - public N endRbd() { - return and(); - } - - } - class ScaleIONestedImpl extends V1ScaleIOVolumeSourceFluentImpl> implements V1VolumeFluentImpl.ScaleIONested,Nested{ - ScaleIONestedImpl(V1ScaleIOVolumeSource item) { - this.builder = new V1ScaleIOVolumeSourceBuilder(this, item); - } - ScaleIONestedImpl() { - this.builder = new V1ScaleIOVolumeSourceBuilder(this); - } - V1ScaleIOVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withScaleIO(builder.build()); - } - public N endScaleIO() { - return and(); - } - - } - class SecretNestedImpl extends V1SecretVolumeSourceFluentImpl> implements V1VolumeFluentImpl.SecretNested,Nested{ - SecretNestedImpl(V1SecretVolumeSource item) { - this.builder = new V1SecretVolumeSourceBuilder(this, item); - } - SecretNestedImpl() { - this.builder = new V1SecretVolumeSourceBuilder(this); - } - V1SecretVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withSecret(builder.build()); - } - public N endSecret() { - return and(); - } - - } - class StorageosNestedImpl extends V1StorageOSVolumeSourceFluentImpl> implements V1VolumeFluentImpl.StorageosNested,Nested{ - StorageosNestedImpl(V1StorageOSVolumeSource item) { - this.builder = new V1StorageOSVolumeSourceBuilder(this, item); - } - StorageosNestedImpl() { - this.builder = new V1StorageOSVolumeSourceBuilder(this); - } - V1StorageOSVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withStorageos(builder.build()); - } - public N endStorageos() { - return and(); - } - - } - class VsphereVolumeNestedImpl extends V1VsphereVirtualDiskVolumeSourceFluentImpl> implements V1VolumeFluentImpl.VsphereVolumeNested,Nested{ - VsphereVolumeNestedImpl(V1VsphereVirtualDiskVolumeSource item) { - this.builder = new V1VsphereVirtualDiskVolumeSourceBuilder(this, item); - } - VsphereVolumeNestedImpl() { - this.builder = new V1VsphereVirtualDiskVolumeSourceBuilder(this); - } - V1VsphereVirtualDiskVolumeSourceBuilder builder; - public N and() { - return (N) V1VolumeFluentImpl.this.withVsphereVolume(builder.build()); - } - public N endVsphereVolume() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountBuilder.java index 546294e35b..612ab6a833 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeMountBuilder extends V1VolumeMountFluentImpl implements VisitableBuilder{ +public class V1VolumeMountBuilder extends V1VolumeMountFluent implements VisitableBuilder{ public V1VolumeMountBuilder() { - this(false); - } - public V1VolumeMountBuilder(Boolean validationEnabled) { - this(new V1VolumeMount(), validationEnabled); + this(new V1VolumeMount()); } + public V1VolumeMountBuilder(V1VolumeMountFluent fluent) { - this(fluent, false); - } - public V1VolumeMountBuilder(V1VolumeMountFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeMount(), validationEnabled); + this(fluent, new V1VolumeMount()); } + public V1VolumeMountBuilder(V1VolumeMountFluent fluent,V1VolumeMount instance) { - this(fluent, instance, false); - } - public V1VolumeMountBuilder(V1VolumeMountFluent fluent,V1VolumeMount instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMountPath(instance.getMountPath()); - fluent.withMountPropagation(instance.getMountPropagation()); - fluent.withName(instance.getName()); - fluent.withReadOnly(instance.getReadOnly()); - fluent.withSubPath(instance.getSubPath()); - fluent.withSubPathExpr(instance.getSubPathExpr()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeMountBuilder(V1VolumeMount instance) { - this(instance,false); - } - public V1VolumeMountBuilder(V1VolumeMount instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMountPath(instance.getMountPath()); - this.withMountPropagation(instance.getMountPropagation()); - this.withName(instance.getName()); - this.withReadOnly(instance.getReadOnly()); - this.withSubPath(instance.getSubPath()); - this.withSubPathExpr(instance.getSubPathExpr()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeMountFluent fluent; - Boolean validationEnabled; + public V1VolumeMount build() { V1VolumeMount buildable = new V1VolumeMount(); buildable.setMountPath(fluent.getMountPath()); @@ -58,4 +32,5 @@ public V1VolumeMount build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountFluent.java index 40860401ac..f9d3a2ff99 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountFluent.java @@ -1,32 +1,153 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1VolumeMountFluent> extends Fluent{ - public String getMountPath(); - public A withMountPath(String mountPath); - public Boolean hasMountPath(); - public String getMountPropagation(); - public A withMountPropagation(String mountPropagation); - public Boolean hasMountPropagation(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public Boolean getReadOnly(); - public A withReadOnly(Boolean readOnly); - public Boolean hasReadOnly(); - public String getSubPath(); - public A withSubPath(String subPath); - public Boolean hasSubPath(); - public String getSubPathExpr(); - public A withSubPathExpr(String subPathExpr); - public Boolean hasSubPathExpr(); - public A withReadOnly(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeMountFluent> extends BaseFluent{ + public V1VolumeMountFluent() { + } + public V1VolumeMountFluent(V1VolumeMount instance) { + this.copyInstance(instance); + } + private String mountPath; + private String mountPropagation; + private String name; + private Boolean readOnly; + private String subPath; + private String subPathExpr; + + protected void copyInstance(V1VolumeMount instance) { + instance = (instance != null ? instance : new V1VolumeMount()); + if (instance != null) { + this.withMountPath(instance.getMountPath()); + this.withMountPropagation(instance.getMountPropagation()); + this.withName(instance.getName()); + this.withReadOnly(instance.getReadOnly()); + this.withSubPath(instance.getSubPath()); + this.withSubPathExpr(instance.getSubPathExpr()); + } + } + + public String getMountPath() { + return this.mountPath; + } + + public A withMountPath(String mountPath) { + this.mountPath = mountPath; + return (A) this; + } + + public boolean hasMountPath() { + return this.mountPath != null; + } + + public String getMountPropagation() { + return this.mountPropagation; + } + + public A withMountPropagation(String mountPropagation) { + this.mountPropagation = mountPropagation; + return (A) this; + } + + public boolean hasMountPropagation() { + return this.mountPropagation != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public Boolean getReadOnly() { + return this.readOnly; + } + + public A withReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return (A) this; + } + + public boolean hasReadOnly() { + return this.readOnly != null; + } + + public String getSubPath() { + return this.subPath; + } + + public A withSubPath(String subPath) { + this.subPath = subPath; + return (A) this; + } + + public boolean hasSubPath() { + return this.subPath != null; + } + + public String getSubPathExpr() { + return this.subPathExpr; + } + + public A withSubPathExpr(String subPathExpr) { + this.subPathExpr = subPathExpr; + return (A) this; + } + + public boolean hasSubPathExpr() { + return this.subPathExpr != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeMountFluent that = (V1VolumeMountFluent) o; + if (!java.util.Objects.equals(mountPath, that.mountPath)) return false; + if (!java.util.Objects.equals(mountPropagation, that.mountPropagation)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; + if (!java.util.Objects.equals(subPath, that.subPath)) return false; + if (!java.util.Objects.equals(subPathExpr, that.subPathExpr)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(mountPath, mountPropagation, name, readOnly, subPath, subPathExpr, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (mountPath != null) { sb.append("mountPath:"); sb.append(mountPath + ","); } + if (mountPropagation != null) { sb.append("mountPropagation:"); sb.append(mountPropagation + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } + if (subPath != null) { sb.append("subPath:"); sb.append(subPath + ","); } + if (subPathExpr != null) { sb.append("subPathExpr:"); sb.append(subPathExpr); } + sb.append("}"); + return sb.toString(); + } + + public A withReadOnly() { + return withReadOnly(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountFluentImpl.java deleted file mode 100644 index 9a586174aa..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeMountFluentImpl.java +++ /dev/null @@ -1,124 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeMountFluentImpl> extends BaseFluent implements V1VolumeMountFluent{ - public V1VolumeMountFluentImpl() { - } - public V1VolumeMountFluentImpl(V1VolumeMount instance) { - if (instance != null) { - this.withMountPath(instance.getMountPath()); - this.withMountPropagation(instance.getMountPropagation()); - this.withName(instance.getName()); - this.withReadOnly(instance.getReadOnly()); - this.withSubPath(instance.getSubPath()); - this.withSubPathExpr(instance.getSubPathExpr()); - } - } - private String mountPath; - private String mountPropagation; - private String name; - private Boolean readOnly; - private String subPath; - private String subPathExpr; - public String getMountPath() { - return this.mountPath; - } - public A withMountPath(String mountPath) { - this.mountPath=mountPath; return (A) this; - } - public Boolean hasMountPath() { - return this.mountPath != null; - } - public String getMountPropagation() { - return this.mountPropagation; - } - public A withMountPropagation(String mountPropagation) { - this.mountPropagation=mountPropagation; return (A) this; - } - public Boolean hasMountPropagation() { - return this.mountPropagation != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public Boolean getReadOnly() { - return this.readOnly; - } - public A withReadOnly(Boolean readOnly) { - this.readOnly=readOnly; return (A) this; - } - public Boolean hasReadOnly() { - return this.readOnly != null; - } - public String getSubPath() { - return this.subPath; - } - public A withSubPath(String subPath) { - this.subPath=subPath; return (A) this; - } - public Boolean hasSubPath() { - return this.subPath != null; - } - public String getSubPathExpr() { - return this.subPathExpr; - } - public A withSubPathExpr(String subPathExpr) { - this.subPathExpr=subPathExpr; return (A) this; - } - public Boolean hasSubPathExpr() { - return this.subPathExpr != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeMountFluentImpl that = (V1VolumeMountFluentImpl) o; - if (!java.util.Objects.equals(mountPath, that.mountPath)) return false; - - if (!java.util.Objects.equals(mountPropagation, that.mountPropagation)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(readOnly, that.readOnly)) return false; - - if (!java.util.Objects.equals(subPath, that.subPath)) return false; - - if (!java.util.Objects.equals(subPathExpr, that.subPathExpr)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(mountPath, mountPropagation, name, readOnly, subPath, subPathExpr, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (mountPath != null) { sb.append("mountPath:"); sb.append(mountPath + ","); } - if (mountPropagation != null) { sb.append("mountPropagation:"); sb.append(mountPropagation + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (readOnly != null) { sb.append("readOnly:"); sb.append(readOnly + ","); } - if (subPath != null) { sb.append("subPath:"); sb.append(subPath + ","); } - if (subPathExpr != null) { sb.append("subPathExpr:"); sb.append(subPathExpr); } - sb.append("}"); - return sb.toString(); - } - public A withReadOnly() { - return withReadOnly(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityBuilder.java index 882d562872..5098c6ee40 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeNodeAffinityBuilder extends V1VolumeNodeAffinityFluentImpl implements VisitableBuilder{ +public class V1VolumeNodeAffinityBuilder extends V1VolumeNodeAffinityFluent implements VisitableBuilder{ public V1VolumeNodeAffinityBuilder() { - this(false); - } - public V1VolumeNodeAffinityBuilder(Boolean validationEnabled) { - this(new V1VolumeNodeAffinity(), validationEnabled); + this(new V1VolumeNodeAffinity()); } + public V1VolumeNodeAffinityBuilder(V1VolumeNodeAffinityFluent fluent) { - this(fluent, false); - } - public V1VolumeNodeAffinityBuilder(V1VolumeNodeAffinityFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeNodeAffinity(), validationEnabled); + this(fluent, new V1VolumeNodeAffinity()); } + public V1VolumeNodeAffinityBuilder(V1VolumeNodeAffinityFluent fluent,V1VolumeNodeAffinity instance) { - this(fluent, instance, false); - } - public V1VolumeNodeAffinityBuilder(V1VolumeNodeAffinityFluent fluent,V1VolumeNodeAffinity instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withRequired(instance.getRequired()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeNodeAffinityBuilder(V1VolumeNodeAffinity instance) { - this(instance,false); - } - public V1VolumeNodeAffinityBuilder(V1VolumeNodeAffinity instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withRequired(instance.getRequired()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeNodeAffinityFluent fluent; - Boolean validationEnabled; + public V1VolumeNodeAffinity build() { V1VolumeNodeAffinity buildable = new V1VolumeNodeAffinity(); - buildable.setRequired(fluent.getRequired()); + buildable.setRequired(fluent.buildRequired()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityFluent.java index 264f9b22c7..3613194eea 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1VolumeNodeAffinityFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildRequired instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelector getRequired(); - public V1NodeSelector buildRequired(); - public A withRequired(V1NodeSelector required); - public Boolean hasRequired(); - public V1VolumeNodeAffinityFluent.RequiredNested withNewRequired(); - public V1VolumeNodeAffinityFluent.RequiredNested withNewRequiredLike(V1NodeSelector item); - public V1VolumeNodeAffinityFluent.RequiredNested editRequired(); - public V1VolumeNodeAffinityFluent.RequiredNested editOrNewRequired(); - public V1VolumeNodeAffinityFluent.RequiredNested editOrNewRequiredLike(V1NodeSelector item); - public interface RequiredNested extends Nested,V1NodeSelectorFluent>{ - public N and(); - public N endRequired(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeNodeAffinityFluent> extends BaseFluent{ + public V1VolumeNodeAffinityFluent() { + } + + public V1VolumeNodeAffinityFluent(V1VolumeNodeAffinity instance) { + this.copyInstance(instance); + } + private V1NodeSelectorBuilder required; + + protected void copyInstance(V1VolumeNodeAffinity instance) { + instance = (instance != null ? instance : new V1VolumeNodeAffinity()); + if (instance != null) { + this.withRequired(instance.getRequired()); + } + } + + public V1NodeSelector buildRequired() { + return this.required != null ? this.required.build() : null; + } + + public A withRequired(V1NodeSelector required) { + this._visitables.remove("required"); + if (required != null) { + this.required = new V1NodeSelectorBuilder(required); + this._visitables.get("required").add(this.required); + } else { + this.required = null; + this._visitables.get("required").remove(this.required); + } + return (A) this; + } + + public boolean hasRequired() { + return this.required != null; + } + + public RequiredNested withNewRequired() { + return new RequiredNested(null); + } + + public RequiredNested withNewRequiredLike(V1NodeSelector item) { + return new RequiredNested(item); + } + + public RequiredNested editRequired() { + return withNewRequiredLike(java.util.Optional.ofNullable(buildRequired()).orElse(null)); + } + + public RequiredNested editOrNewRequired() { + return withNewRequiredLike(java.util.Optional.ofNullable(buildRequired()).orElse(new V1NodeSelectorBuilder().build())); + } + + public RequiredNested editOrNewRequiredLike(V1NodeSelector item) { + return withNewRequiredLike(java.util.Optional.ofNullable(buildRequired()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeNodeAffinityFluent that = (V1VolumeNodeAffinityFluent) o; + if (!java.util.Objects.equals(required, that.required)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(required, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (required != null) { sb.append("required:"); sb.append(required); } + sb.append("}"); + return sb.toString(); } + public class RequiredNested extends V1NodeSelectorFluent> implements Nested{ + RequiredNested(V1NodeSelector item) { + this.builder = new V1NodeSelectorBuilder(this, item); + } + V1NodeSelectorBuilder builder; + + public N and() { + return (N) V1VolumeNodeAffinityFluent.this.withRequired(builder.build()); + } + + public N endRequired() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityFluentImpl.java deleted file mode 100644 index 992cca9e07..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeAffinityFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeNodeAffinityFluentImpl> extends BaseFluent implements V1VolumeNodeAffinityFluent{ - public V1VolumeNodeAffinityFluentImpl() { - } - public V1VolumeNodeAffinityFluentImpl(V1VolumeNodeAffinity instance) { - if (instance != null) { - this.withRequired(instance.getRequired()); - } - } - private V1NodeSelectorBuilder required; - - /** - * This method has been deprecated, please use method buildRequired instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelector getRequired() { - return this.required!=null ?this.required.build():null; - } - public V1NodeSelector buildRequired() { - return this.required!=null ?this.required.build():null; - } - public A withRequired(V1NodeSelector required) { - _visitables.get("required").remove(this.required); - if (required!=null){ this.required= new V1NodeSelectorBuilder(required); _visitables.get("required").add(this.required);} else { this.required = null; _visitables.get("required").remove(this.required); } return (A) this; - } - public Boolean hasRequired() { - return this.required != null; - } - public V1VolumeNodeAffinityFluentImpl.RequiredNested withNewRequired() { - return new V1VolumeNodeAffinityFluentImpl.RequiredNestedImpl(); - } - public V1VolumeNodeAffinityFluentImpl.RequiredNested withNewRequiredLike(V1NodeSelector item) { - return new V1VolumeNodeAffinityFluentImpl.RequiredNestedImpl(item); - } - public V1VolumeNodeAffinityFluentImpl.RequiredNested editRequired() { - return withNewRequiredLike(getRequired()); - } - public V1VolumeNodeAffinityFluentImpl.RequiredNested editOrNewRequired() { - return withNewRequiredLike(getRequired() != null ? getRequired(): new V1NodeSelectorBuilder().build()); - } - public V1VolumeNodeAffinityFluentImpl.RequiredNested editOrNewRequiredLike(V1NodeSelector item) { - return withNewRequiredLike(getRequired() != null ? getRequired(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeNodeAffinityFluentImpl that = (V1VolumeNodeAffinityFluentImpl) o; - if (!java.util.Objects.equals(required, that.required)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(required, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (required != null) { sb.append("required:"); sb.append(required); } - sb.append("}"); - return sb.toString(); - } - class RequiredNestedImpl extends V1NodeSelectorFluentImpl> implements V1VolumeNodeAffinityFluentImpl.RequiredNested,Nested{ - RequiredNestedImpl(V1NodeSelector item) { - this.builder = new V1NodeSelectorBuilder(this, item); - } - RequiredNestedImpl() { - this.builder = new V1NodeSelectorBuilder(this); - } - V1NodeSelectorBuilder builder; - public N and() { - return (N) V1VolumeNodeAffinityFluentImpl.this.withRequired(builder.build()); - } - public N endRequired() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesBuilder.java index 2ec8ee4609..cb6b598ff9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeNodeResourcesBuilder extends V1VolumeNodeResourcesFluentImpl implements VisitableBuilder{ +public class V1VolumeNodeResourcesBuilder extends V1VolumeNodeResourcesFluent implements VisitableBuilder{ public V1VolumeNodeResourcesBuilder() { - this(false); - } - public V1VolumeNodeResourcesBuilder(Boolean validationEnabled) { - this(new V1VolumeNodeResources(), validationEnabled); + this(new V1VolumeNodeResources()); } + public V1VolumeNodeResourcesBuilder(V1VolumeNodeResourcesFluent fluent) { - this(fluent, false); - } - public V1VolumeNodeResourcesBuilder(V1VolumeNodeResourcesFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeNodeResources(), validationEnabled); + this(fluent, new V1VolumeNodeResources()); } + public V1VolumeNodeResourcesBuilder(V1VolumeNodeResourcesFluent fluent,V1VolumeNodeResources instance) { - this(fluent, instance, false); - } - public V1VolumeNodeResourcesBuilder(V1VolumeNodeResourcesFluent fluent,V1VolumeNodeResources instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCount(instance.getCount()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeNodeResourcesBuilder(V1VolumeNodeResources instance) { - this(instance,false); - } - public V1VolumeNodeResourcesBuilder(V1VolumeNodeResources instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCount(instance.getCount()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeNodeResourcesFluent fluent; - Boolean validationEnabled; + public V1VolumeNodeResources build() { V1VolumeNodeResources buildable = new V1VolumeNodeResources(); buildable.setCount(fluent.getCount()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesFluent.java index 8ab23ee2b4..bade872fcf 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesFluent.java @@ -1,16 +1,64 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1VolumeNodeResourcesFluent> extends Fluent{ - public Integer getCount(); - public A withCount(Integer count); - public Boolean hasCount(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeNodeResourcesFluent> extends BaseFluent{ + public V1VolumeNodeResourcesFluent() { + } + public V1VolumeNodeResourcesFluent(V1VolumeNodeResources instance) { + this.copyInstance(instance); + } + private Integer count; + + protected void copyInstance(V1VolumeNodeResources instance) { + instance = (instance != null ? instance : new V1VolumeNodeResources()); + if (instance != null) { + this.withCount(instance.getCount()); + } + } + + public Integer getCount() { + return this.count; + } + + public A withCount(Integer count) { + this.count = count; + return (A) this; + } + + public boolean hasCount() { + return this.count != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeNodeResourcesFluent that = (V1VolumeNodeResourcesFluent) o; + if (!java.util.Objects.equals(count, that.count)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(count, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (count != null) { sb.append("count:"); sb.append(count); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesFluentImpl.java deleted file mode 100644 index 5e5eb4d446..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeNodeResourcesFluentImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeNodeResourcesFluentImpl> extends BaseFluent implements V1VolumeNodeResourcesFluent{ - public V1VolumeNodeResourcesFluentImpl() { - } - public V1VolumeNodeResourcesFluentImpl(V1VolumeNodeResources instance) { - if (instance != null) { - this.withCount(instance.getCount()); - } - } - private Integer count; - public Integer getCount() { - return this.count; - } - public A withCount(Integer count) { - this.count=count; return (A) this; - } - public Boolean hasCount() { - return this.count != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeNodeResourcesFluentImpl that = (V1VolumeNodeResourcesFluentImpl) o; - if (!java.util.Objects.equals(count, that.count)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(count, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (count != null) { sb.append("count:"); sb.append(count); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionBuilder.java index ecc685bfa2..566e8930a3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VolumeProjectionBuilder extends V1VolumeProjectionFluentImpl implements VisitableBuilder{ +public class V1VolumeProjectionBuilder extends V1VolumeProjectionFluent implements VisitableBuilder{ public V1VolumeProjectionBuilder() { - this(false); - } - public V1VolumeProjectionBuilder(Boolean validationEnabled) { - this(new V1VolumeProjection(), validationEnabled); + this(new V1VolumeProjection()); } + public V1VolumeProjectionBuilder(V1VolumeProjectionFluent fluent) { - this(fluent, false); - } - public V1VolumeProjectionBuilder(V1VolumeProjectionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VolumeProjection(), validationEnabled); + this(fluent, new V1VolumeProjection()); } + public V1VolumeProjectionBuilder(V1VolumeProjectionFluent fluent,V1VolumeProjection instance) { - this(fluent, instance, false); - } - public V1VolumeProjectionBuilder(V1VolumeProjectionFluent fluent,V1VolumeProjection instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConfigMap(instance.getConfigMap()); - fluent.withDownwardAPI(instance.getDownwardAPI()); - fluent.withSecret(instance.getSecret()); - fluent.withServiceAccountToken(instance.getServiceAccountToken()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VolumeProjectionBuilder(V1VolumeProjection instance) { - this(instance,false); - } - public V1VolumeProjectionBuilder(V1VolumeProjection instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConfigMap(instance.getConfigMap()); - this.withDownwardAPI(instance.getDownwardAPI()); - this.withSecret(instance.getSecret()); - this.withServiceAccountToken(instance.getServiceAccountToken()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VolumeProjectionFluent fluent; - Boolean validationEnabled; + public V1VolumeProjection build() { V1VolumeProjection buildable = new V1VolumeProjection(); - buildable.setConfigMap(fluent.getConfigMap()); - buildable.setDownwardAPI(fluent.getDownwardAPI()); - buildable.setSecret(fluent.getSecret()); - buildable.setServiceAccountToken(fluent.getServiceAccountToken()); + buildable.setConfigMap(fluent.buildConfigMap()); + buildable.setDownwardAPI(fluent.buildDownwardAPI()); + buildable.setSecret(fluent.buildSecret()); + buildable.setServiceAccountToken(fluent.buildServiceAccountToken()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionFluent.java index 4b3e56ca89..306c0ab19d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionFluent.java @@ -1,94 +1,286 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1VolumeProjectionFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildConfigMap instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapProjection getConfigMap(); - public V1ConfigMapProjection buildConfigMap(); - public A withConfigMap(V1ConfigMapProjection configMap); - public Boolean hasConfigMap(); - public V1VolumeProjectionFluent.ConfigMapNested withNewConfigMap(); - public V1VolumeProjectionFluent.ConfigMapNested withNewConfigMapLike(V1ConfigMapProjection item); - public V1VolumeProjectionFluent.ConfigMapNested editConfigMap(); - public V1VolumeProjectionFluent.ConfigMapNested editOrNewConfigMap(); - public V1VolumeProjectionFluent.ConfigMapNested editOrNewConfigMapLike(V1ConfigMapProjection item); - - /** - * This method has been deprecated, please use method buildDownwardAPI instead. - * @return The buildable object. - */ - @Deprecated - public V1DownwardAPIProjection getDownwardAPI(); - public V1DownwardAPIProjection buildDownwardAPI(); - public A withDownwardAPI(V1DownwardAPIProjection downwardAPI); - public Boolean hasDownwardAPI(); - public V1VolumeProjectionFluent.DownwardAPINested withNewDownwardAPI(); - public V1VolumeProjectionFluent.DownwardAPINested withNewDownwardAPILike(V1DownwardAPIProjection item); - public V1VolumeProjectionFluent.DownwardAPINested editDownwardAPI(); - public V1VolumeProjectionFluent.DownwardAPINested editOrNewDownwardAPI(); - public V1VolumeProjectionFluent.DownwardAPINested editOrNewDownwardAPILike(V1DownwardAPIProjection item); - - /** - * This method has been deprecated, please use method buildSecret instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretProjection getSecret(); - public V1SecretProjection buildSecret(); - public A withSecret(V1SecretProjection secret); - public Boolean hasSecret(); - public V1VolumeProjectionFluent.SecretNested withNewSecret(); - public V1VolumeProjectionFluent.SecretNested withNewSecretLike(V1SecretProjection item); - public V1VolumeProjectionFluent.SecretNested editSecret(); - public V1VolumeProjectionFluent.SecretNested editOrNewSecret(); - public V1VolumeProjectionFluent.SecretNested editOrNewSecretLike(V1SecretProjection item); - - /** - * This method has been deprecated, please use method buildServiceAccountToken instead. - * @return The buildable object. - */ - @Deprecated - public V1ServiceAccountTokenProjection getServiceAccountToken(); - public V1ServiceAccountTokenProjection buildServiceAccountToken(); - public A withServiceAccountToken(V1ServiceAccountTokenProjection serviceAccountToken); - public Boolean hasServiceAccountToken(); - public V1VolumeProjectionFluent.ServiceAccountTokenNested withNewServiceAccountToken(); - public V1VolumeProjectionFluent.ServiceAccountTokenNested withNewServiceAccountTokenLike(V1ServiceAccountTokenProjection item); - public V1VolumeProjectionFluent.ServiceAccountTokenNested editServiceAccountToken(); - public V1VolumeProjectionFluent.ServiceAccountTokenNested editOrNewServiceAccountToken(); - public V1VolumeProjectionFluent.ServiceAccountTokenNested editOrNewServiceAccountTokenLike(V1ServiceAccountTokenProjection item); - public interface ConfigMapNested extends Nested,V1ConfigMapProjectionFluent>{ - public N and(); - public N endConfigMap(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VolumeProjectionFluent> extends BaseFluent{ + public V1VolumeProjectionFluent() { + } + + public V1VolumeProjectionFluent(V1VolumeProjection instance) { + this.copyInstance(instance); + } + private V1ConfigMapProjectionBuilder configMap; + private V1DownwardAPIProjectionBuilder downwardAPI; + private V1SecretProjectionBuilder secret; + private V1ServiceAccountTokenProjectionBuilder serviceAccountToken; + + protected void copyInstance(V1VolumeProjection instance) { + instance = (instance != null ? instance : new V1VolumeProjection()); + if (instance != null) { + this.withConfigMap(instance.getConfigMap()); + this.withDownwardAPI(instance.getDownwardAPI()); + this.withSecret(instance.getSecret()); + this.withServiceAccountToken(instance.getServiceAccountToken()); + } + } + + public V1ConfigMapProjection buildConfigMap() { + return this.configMap != null ? this.configMap.build() : null; + } + + public A withConfigMap(V1ConfigMapProjection configMap) { + this._visitables.remove("configMap"); + if (configMap != null) { + this.configMap = new V1ConfigMapProjectionBuilder(configMap); + this._visitables.get("configMap").add(this.configMap); + } else { + this.configMap = null; + this._visitables.get("configMap").remove(this.configMap); + } + return (A) this; + } + + public boolean hasConfigMap() { + return this.configMap != null; + } + + public ConfigMapNested withNewConfigMap() { + return new ConfigMapNested(null); + } + + public ConfigMapNested withNewConfigMapLike(V1ConfigMapProjection item) { + return new ConfigMapNested(item); + } + + public ConfigMapNested editConfigMap() { + return withNewConfigMapLike(java.util.Optional.ofNullable(buildConfigMap()).orElse(null)); + } + + public ConfigMapNested editOrNewConfigMap() { + return withNewConfigMapLike(java.util.Optional.ofNullable(buildConfigMap()).orElse(new V1ConfigMapProjectionBuilder().build())); + } + + public ConfigMapNested editOrNewConfigMapLike(V1ConfigMapProjection item) { + return withNewConfigMapLike(java.util.Optional.ofNullable(buildConfigMap()).orElse(item)); + } + + public V1DownwardAPIProjection buildDownwardAPI() { + return this.downwardAPI != null ? this.downwardAPI.build() : null; + } + + public A withDownwardAPI(V1DownwardAPIProjection downwardAPI) { + this._visitables.remove("downwardAPI"); + if (downwardAPI != null) { + this.downwardAPI = new V1DownwardAPIProjectionBuilder(downwardAPI); + this._visitables.get("downwardAPI").add(this.downwardAPI); + } else { + this.downwardAPI = null; + this._visitables.get("downwardAPI").remove(this.downwardAPI); + } + return (A) this; + } + + public boolean hasDownwardAPI() { + return this.downwardAPI != null; + } + + public DownwardAPINested withNewDownwardAPI() { + return new DownwardAPINested(null); + } + + public DownwardAPINested withNewDownwardAPILike(V1DownwardAPIProjection item) { + return new DownwardAPINested(item); + } + + public DownwardAPINested editDownwardAPI() { + return withNewDownwardAPILike(java.util.Optional.ofNullable(buildDownwardAPI()).orElse(null)); + } + + public DownwardAPINested editOrNewDownwardAPI() { + return withNewDownwardAPILike(java.util.Optional.ofNullable(buildDownwardAPI()).orElse(new V1DownwardAPIProjectionBuilder().build())); + } + + public DownwardAPINested editOrNewDownwardAPILike(V1DownwardAPIProjection item) { + return withNewDownwardAPILike(java.util.Optional.ofNullable(buildDownwardAPI()).orElse(item)); + } + + public V1SecretProjection buildSecret() { + return this.secret != null ? this.secret.build() : null; + } + + public A withSecret(V1SecretProjection secret) { + this._visitables.remove("secret"); + if (secret != null) { + this.secret = new V1SecretProjectionBuilder(secret); + this._visitables.get("secret").add(this.secret); + } else { + this.secret = null; + this._visitables.get("secret").remove(this.secret); + } + return (A) this; + } + + public boolean hasSecret() { + return this.secret != null; + } + + public SecretNested withNewSecret() { + return new SecretNested(null); } - public interface DownwardAPINested extends Nested,V1DownwardAPIProjectionFluent>{ - public N and(); - public N endDownwardAPI(); + + public SecretNested withNewSecretLike(V1SecretProjection item) { + return new SecretNested(item); + } + + public SecretNested editSecret() { + return withNewSecretLike(java.util.Optional.ofNullable(buildSecret()).orElse(null)); + } + + public SecretNested editOrNewSecret() { + return withNewSecretLike(java.util.Optional.ofNullable(buildSecret()).orElse(new V1SecretProjectionBuilder().build())); + } + + public SecretNested editOrNewSecretLike(V1SecretProjection item) { + return withNewSecretLike(java.util.Optional.ofNullable(buildSecret()).orElse(item)); + } + + public V1ServiceAccountTokenProjection buildServiceAccountToken() { + return this.serviceAccountToken != null ? this.serviceAccountToken.build() : null; + } + + public A withServiceAccountToken(V1ServiceAccountTokenProjection serviceAccountToken) { + this._visitables.remove("serviceAccountToken"); + if (serviceAccountToken != null) { + this.serviceAccountToken = new V1ServiceAccountTokenProjectionBuilder(serviceAccountToken); + this._visitables.get("serviceAccountToken").add(this.serviceAccountToken); + } else { + this.serviceAccountToken = null; + this._visitables.get("serviceAccountToken").remove(this.serviceAccountToken); + } + return (A) this; + } + + public boolean hasServiceAccountToken() { + return this.serviceAccountToken != null; + } + + public ServiceAccountTokenNested withNewServiceAccountToken() { + return new ServiceAccountTokenNested(null); + } + + public ServiceAccountTokenNested withNewServiceAccountTokenLike(V1ServiceAccountTokenProjection item) { + return new ServiceAccountTokenNested(item); + } + + public ServiceAccountTokenNested editServiceAccountToken() { + return withNewServiceAccountTokenLike(java.util.Optional.ofNullable(buildServiceAccountToken()).orElse(null)); + } + + public ServiceAccountTokenNested editOrNewServiceAccountToken() { + return withNewServiceAccountTokenLike(java.util.Optional.ofNullable(buildServiceAccountToken()).orElse(new V1ServiceAccountTokenProjectionBuilder().build())); + } + + public ServiceAccountTokenNested editOrNewServiceAccountTokenLike(V1ServiceAccountTokenProjection item) { + return withNewServiceAccountTokenLike(java.util.Optional.ofNullable(buildServiceAccountToken()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VolumeProjectionFluent that = (V1VolumeProjectionFluent) o; + if (!java.util.Objects.equals(configMap, that.configMap)) return false; + if (!java.util.Objects.equals(downwardAPI, that.downwardAPI)) return false; + if (!java.util.Objects.equals(secret, that.secret)) return false; + if (!java.util.Objects.equals(serviceAccountToken, that.serviceAccountToken)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(configMap, downwardAPI, secret, serviceAccountToken, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (configMap != null) { sb.append("configMap:"); sb.append(configMap + ","); } + if (downwardAPI != null) { sb.append("downwardAPI:"); sb.append(downwardAPI + ","); } + if (secret != null) { sb.append("secret:"); sb.append(secret + ","); } + if (serviceAccountToken != null) { sb.append("serviceAccountToken:"); sb.append(serviceAccountToken); } + sb.append("}"); + return sb.toString(); + } + public class ConfigMapNested extends V1ConfigMapProjectionFluent> implements Nested{ + ConfigMapNested(V1ConfigMapProjection item) { + this.builder = new V1ConfigMapProjectionBuilder(this, item); + } + V1ConfigMapProjectionBuilder builder; + + public N and() { + return (N) V1VolumeProjectionFluent.this.withConfigMap(builder.build()); + } + public N endConfigMap() { + return and(); + } + + } - public interface SecretNested extends Nested,V1SecretProjectionFluent>{ - public N and(); - public N endSecret(); + public class DownwardAPINested extends V1DownwardAPIProjectionFluent> implements Nested{ + DownwardAPINested(V1DownwardAPIProjection item) { + this.builder = new V1DownwardAPIProjectionBuilder(this, item); + } + V1DownwardAPIProjectionBuilder builder; + public N and() { + return (N) V1VolumeProjectionFluent.this.withDownwardAPI(builder.build()); + } + + public N endDownwardAPI() { + return and(); + } + + } - public interface ServiceAccountTokenNested extends Nested,V1ServiceAccountTokenProjectionFluent>{ - public N and(); - public N endServiceAccountToken(); + public class SecretNested extends V1SecretProjectionFluent> implements Nested{ + SecretNested(V1SecretProjection item) { + this.builder = new V1SecretProjectionBuilder(this, item); + } + V1SecretProjectionBuilder builder; + public N and() { + return (N) V1VolumeProjectionFluent.this.withSecret(builder.build()); + } + + public N endSecret() { + return and(); + } + + } + public class ServiceAccountTokenNested extends V1ServiceAccountTokenProjectionFluent> implements Nested{ + ServiceAccountTokenNested(V1ServiceAccountTokenProjection item) { + this.builder = new V1ServiceAccountTokenProjectionBuilder(this, item); + } + V1ServiceAccountTokenProjectionBuilder builder; + + public N and() { + return (N) V1VolumeProjectionFluent.this.withServiceAccountToken(builder.build()); + } + + public N endServiceAccountToken() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionFluentImpl.java deleted file mode 100644 index 85ece07a17..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VolumeProjectionFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VolumeProjectionFluentImpl> extends BaseFluent implements V1VolumeProjectionFluent{ - public V1VolumeProjectionFluentImpl() { - } - public V1VolumeProjectionFluentImpl(V1VolumeProjection instance) { - if (instance != null) { - this.withConfigMap(instance.getConfigMap()); - this.withDownwardAPI(instance.getDownwardAPI()); - this.withSecret(instance.getSecret()); - this.withServiceAccountToken(instance.getServiceAccountToken()); - } - } - private V1ConfigMapProjectionBuilder configMap; - private V1DownwardAPIProjectionBuilder downwardAPI; - private V1SecretProjectionBuilder secret; - private V1ServiceAccountTokenProjectionBuilder serviceAccountToken; - - /** - * This method has been deprecated, please use method buildConfigMap instead. - * @return The buildable object. - */ - @Deprecated - public V1ConfigMapProjection getConfigMap() { - return this.configMap!=null ?this.configMap.build():null; - } - public V1ConfigMapProjection buildConfigMap() { - return this.configMap!=null ?this.configMap.build():null; - } - public A withConfigMap(V1ConfigMapProjection configMap) { - _visitables.get("configMap").remove(this.configMap); - if (configMap!=null){ this.configMap= new V1ConfigMapProjectionBuilder(configMap); _visitables.get("configMap").add(this.configMap);} else { this.configMap = null; _visitables.get("configMap").remove(this.configMap); } return (A) this; - } - public Boolean hasConfigMap() { - return this.configMap != null; - } - public V1VolumeProjectionFluentImpl.ConfigMapNested withNewConfigMap() { - return new V1VolumeProjectionFluentImpl.ConfigMapNestedImpl(); - } - public V1VolumeProjectionFluentImpl.ConfigMapNested withNewConfigMapLike(V1ConfigMapProjection item) { - return new V1VolumeProjectionFluentImpl.ConfigMapNestedImpl(item); - } - public V1VolumeProjectionFluentImpl.ConfigMapNested editConfigMap() { - return withNewConfigMapLike(getConfigMap()); - } - public V1VolumeProjectionFluentImpl.ConfigMapNested editOrNewConfigMap() { - return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): new V1ConfigMapProjectionBuilder().build()); - } - public V1VolumeProjectionFluentImpl.ConfigMapNested editOrNewConfigMapLike(V1ConfigMapProjection item) { - return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): item); - } - - /** - * This method has been deprecated, please use method buildDownwardAPI instead. - * @return The buildable object. - */ - @Deprecated - public V1DownwardAPIProjection getDownwardAPI() { - return this.downwardAPI!=null ?this.downwardAPI.build():null; - } - public V1DownwardAPIProjection buildDownwardAPI() { - return this.downwardAPI!=null ?this.downwardAPI.build():null; - } - public A withDownwardAPI(V1DownwardAPIProjection downwardAPI) { - _visitables.get("downwardAPI").remove(this.downwardAPI); - if (downwardAPI!=null){ this.downwardAPI= new V1DownwardAPIProjectionBuilder(downwardAPI); _visitables.get("downwardAPI").add(this.downwardAPI);} else { this.downwardAPI = null; _visitables.get("downwardAPI").remove(this.downwardAPI); } return (A) this; - } - public Boolean hasDownwardAPI() { - return this.downwardAPI != null; - } - public V1VolumeProjectionFluentImpl.DownwardAPINested withNewDownwardAPI() { - return new V1VolumeProjectionFluentImpl.DownwardAPINestedImpl(); - } - public V1VolumeProjectionFluentImpl.DownwardAPINested withNewDownwardAPILike(V1DownwardAPIProjection item) { - return new V1VolumeProjectionFluentImpl.DownwardAPINestedImpl(item); - } - public V1VolumeProjectionFluentImpl.DownwardAPINested editDownwardAPI() { - return withNewDownwardAPILike(getDownwardAPI()); - } - public V1VolumeProjectionFluentImpl.DownwardAPINested editOrNewDownwardAPI() { - return withNewDownwardAPILike(getDownwardAPI() != null ? getDownwardAPI(): new V1DownwardAPIProjectionBuilder().build()); - } - public V1VolumeProjectionFluentImpl.DownwardAPINested editOrNewDownwardAPILike(V1DownwardAPIProjection item) { - return withNewDownwardAPILike(getDownwardAPI() != null ? getDownwardAPI(): item); - } - - /** - * This method has been deprecated, please use method buildSecret instead. - * @return The buildable object. - */ - @Deprecated - public V1SecretProjection getSecret() { - return this.secret!=null ?this.secret.build():null; - } - public V1SecretProjection buildSecret() { - return this.secret!=null ?this.secret.build():null; - } - public A withSecret(V1SecretProjection secret) { - _visitables.get("secret").remove(this.secret); - if (secret!=null){ this.secret= new V1SecretProjectionBuilder(secret); _visitables.get("secret").add(this.secret);} else { this.secret = null; _visitables.get("secret").remove(this.secret); } return (A) this; - } - public Boolean hasSecret() { - return this.secret != null; - } - public V1VolumeProjectionFluentImpl.SecretNested withNewSecret() { - return new V1VolumeProjectionFluentImpl.SecretNestedImpl(); - } - public V1VolumeProjectionFluentImpl.SecretNested withNewSecretLike(V1SecretProjection item) { - return new V1VolumeProjectionFluentImpl.SecretNestedImpl(item); - } - public V1VolumeProjectionFluentImpl.SecretNested editSecret() { - return withNewSecretLike(getSecret()); - } - public V1VolumeProjectionFluentImpl.SecretNested editOrNewSecret() { - return withNewSecretLike(getSecret() != null ? getSecret(): new V1SecretProjectionBuilder().build()); - } - public V1VolumeProjectionFluentImpl.SecretNested editOrNewSecretLike(V1SecretProjection item) { - return withNewSecretLike(getSecret() != null ? getSecret(): item); - } - - /** - * This method has been deprecated, please use method buildServiceAccountToken instead. - * @return The buildable object. - */ - @Deprecated - public V1ServiceAccountTokenProjection getServiceAccountToken() { - return this.serviceAccountToken!=null ?this.serviceAccountToken.build():null; - } - public V1ServiceAccountTokenProjection buildServiceAccountToken() { - return this.serviceAccountToken!=null ?this.serviceAccountToken.build():null; - } - public A withServiceAccountToken(V1ServiceAccountTokenProjection serviceAccountToken) { - _visitables.get("serviceAccountToken").remove(this.serviceAccountToken); - if (serviceAccountToken!=null){ this.serviceAccountToken= new V1ServiceAccountTokenProjectionBuilder(serviceAccountToken); _visitables.get("serviceAccountToken").add(this.serviceAccountToken);} else { this.serviceAccountToken = null; _visitables.get("serviceAccountToken").remove(this.serviceAccountToken); } return (A) this; - } - public Boolean hasServiceAccountToken() { - return this.serviceAccountToken != null; - } - public V1VolumeProjectionFluentImpl.ServiceAccountTokenNested withNewServiceAccountToken() { - return new V1VolumeProjectionFluentImpl.ServiceAccountTokenNestedImpl(); - } - public V1VolumeProjectionFluentImpl.ServiceAccountTokenNested withNewServiceAccountTokenLike(V1ServiceAccountTokenProjection item) { - return new V1VolumeProjectionFluentImpl.ServiceAccountTokenNestedImpl(item); - } - public V1VolumeProjectionFluentImpl.ServiceAccountTokenNested editServiceAccountToken() { - return withNewServiceAccountTokenLike(getServiceAccountToken()); - } - public V1VolumeProjectionFluentImpl.ServiceAccountTokenNested editOrNewServiceAccountToken() { - return withNewServiceAccountTokenLike(getServiceAccountToken() != null ? getServiceAccountToken(): new V1ServiceAccountTokenProjectionBuilder().build()); - } - public V1VolumeProjectionFluentImpl.ServiceAccountTokenNested editOrNewServiceAccountTokenLike(V1ServiceAccountTokenProjection item) { - return withNewServiceAccountTokenLike(getServiceAccountToken() != null ? getServiceAccountToken(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VolumeProjectionFluentImpl that = (V1VolumeProjectionFluentImpl) o; - if (!java.util.Objects.equals(configMap, that.configMap)) return false; - - if (!java.util.Objects.equals(downwardAPI, that.downwardAPI)) return false; - - if (!java.util.Objects.equals(secret, that.secret)) return false; - - if (!java.util.Objects.equals(serviceAccountToken, that.serviceAccountToken)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(configMap, downwardAPI, secret, serviceAccountToken, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (configMap != null) { sb.append("configMap:"); sb.append(configMap + ","); } - if (downwardAPI != null) { sb.append("downwardAPI:"); sb.append(downwardAPI + ","); } - if (secret != null) { sb.append("secret:"); sb.append(secret + ","); } - if (serviceAccountToken != null) { sb.append("serviceAccountToken:"); sb.append(serviceAccountToken); } - sb.append("}"); - return sb.toString(); - } - class ConfigMapNestedImpl extends V1ConfigMapProjectionFluentImpl> implements V1VolumeProjectionFluentImpl.ConfigMapNested,Nested{ - ConfigMapNestedImpl(V1ConfigMapProjection item) { - this.builder = new V1ConfigMapProjectionBuilder(this, item); - } - ConfigMapNestedImpl() { - this.builder = new V1ConfigMapProjectionBuilder(this); - } - V1ConfigMapProjectionBuilder builder; - public N and() { - return (N) V1VolumeProjectionFluentImpl.this.withConfigMap(builder.build()); - } - public N endConfigMap() { - return and(); - } - - } - class DownwardAPINestedImpl extends V1DownwardAPIProjectionFluentImpl> implements V1VolumeProjectionFluentImpl.DownwardAPINested,Nested{ - DownwardAPINestedImpl(V1DownwardAPIProjection item) { - this.builder = new V1DownwardAPIProjectionBuilder(this, item); - } - DownwardAPINestedImpl() { - this.builder = new V1DownwardAPIProjectionBuilder(this); - } - V1DownwardAPIProjectionBuilder builder; - public N and() { - return (N) V1VolumeProjectionFluentImpl.this.withDownwardAPI(builder.build()); - } - public N endDownwardAPI() { - return and(); - } - - } - class SecretNestedImpl extends V1SecretProjectionFluentImpl> implements V1VolumeProjectionFluentImpl.SecretNested,Nested{ - SecretNestedImpl(V1SecretProjection item) { - this.builder = new V1SecretProjectionBuilder(this, item); - } - SecretNestedImpl() { - this.builder = new V1SecretProjectionBuilder(this); - } - V1SecretProjectionBuilder builder; - public N and() { - return (N) V1VolumeProjectionFluentImpl.this.withSecret(builder.build()); - } - public N endSecret() { - return and(); - } - - } - class ServiceAccountTokenNestedImpl extends V1ServiceAccountTokenProjectionFluentImpl> implements V1VolumeProjectionFluentImpl.ServiceAccountTokenNested,Nested{ - ServiceAccountTokenNestedImpl(V1ServiceAccountTokenProjection item) { - this.builder = new V1ServiceAccountTokenProjectionBuilder(this, item); - } - ServiceAccountTokenNestedImpl() { - this.builder = new V1ServiceAccountTokenProjectionBuilder(this); - } - V1ServiceAccountTokenProjectionBuilder builder; - public N and() { - return (N) V1VolumeProjectionFluentImpl.this.withServiceAccountToken(builder.build()); - } - public N endServiceAccountToken() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceBuilder.java index 74c9e98c35..946ed5ef6d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1VsphereVirtualDiskVolumeSourceBuilder extends V1VsphereVirtualDiskVolumeSourceFluentImpl implements VisitableBuilder{ +public class V1VsphereVirtualDiskVolumeSourceBuilder extends V1VsphereVirtualDiskVolumeSourceFluent implements VisitableBuilder{ public V1VsphereVirtualDiskVolumeSourceBuilder() { - this(false); - } - public V1VsphereVirtualDiskVolumeSourceBuilder(Boolean validationEnabled) { - this(new V1VsphereVirtualDiskVolumeSource(), validationEnabled); + this(new V1VsphereVirtualDiskVolumeSource()); } + public V1VsphereVirtualDiskVolumeSourceBuilder(V1VsphereVirtualDiskVolumeSourceFluent fluent) { - this(fluent, false); - } - public V1VsphereVirtualDiskVolumeSourceBuilder(V1VsphereVirtualDiskVolumeSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1VsphereVirtualDiskVolumeSource(), validationEnabled); + this(fluent, new V1VsphereVirtualDiskVolumeSource()); } + public V1VsphereVirtualDiskVolumeSourceBuilder(V1VsphereVirtualDiskVolumeSourceFluent fluent,V1VsphereVirtualDiskVolumeSource instance) { - this(fluent, instance, false); - } - public V1VsphereVirtualDiskVolumeSourceBuilder(V1VsphereVirtualDiskVolumeSourceFluent fluent,V1VsphereVirtualDiskVolumeSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFsType(instance.getFsType()); - fluent.withStoragePolicyID(instance.getStoragePolicyID()); - fluent.withStoragePolicyName(instance.getStoragePolicyName()); - fluent.withVolumePath(instance.getVolumePath()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1VsphereVirtualDiskVolumeSourceBuilder(V1VsphereVirtualDiskVolumeSource instance) { - this(instance,false); - } - public V1VsphereVirtualDiskVolumeSourceBuilder(V1VsphereVirtualDiskVolumeSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withStoragePolicyID(instance.getStoragePolicyID()); - this.withStoragePolicyName(instance.getStoragePolicyName()); - this.withVolumePath(instance.getVolumePath()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1VsphereVirtualDiskVolumeSourceFluent fluent; - Boolean validationEnabled; + public V1VsphereVirtualDiskVolumeSource build() { V1VsphereVirtualDiskVolumeSource buildable = new V1VsphereVirtualDiskVolumeSource(); buildable.setFsType(fluent.getFsType()); @@ -52,4 +30,5 @@ public V1VsphereVirtualDiskVolumeSource build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceFluent.java index 255937382d..29b1915140 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceFluent.java @@ -1,25 +1,114 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1VsphereVirtualDiskVolumeSourceFluent> extends Fluent{ - public String getFsType(); - public A withFsType(String fsType); - public Boolean hasFsType(); - public String getStoragePolicyID(); - public A withStoragePolicyID(String storagePolicyID); - public Boolean hasStoragePolicyID(); - public String getStoragePolicyName(); - public A withStoragePolicyName(String storagePolicyName); - public Boolean hasStoragePolicyName(); - public String getVolumePath(); - public A withVolumePath(String volumePath); - public Boolean hasVolumePath(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1VsphereVirtualDiskVolumeSourceFluent> extends BaseFluent{ + public V1VsphereVirtualDiskVolumeSourceFluent() { + } + public V1VsphereVirtualDiskVolumeSourceFluent(V1VsphereVirtualDiskVolumeSource instance) { + this.copyInstance(instance); + } + private String fsType; + private String storagePolicyID; + private String storagePolicyName; + private String volumePath; + + protected void copyInstance(V1VsphereVirtualDiskVolumeSource instance) { + instance = (instance != null ? instance : new V1VsphereVirtualDiskVolumeSource()); + if (instance != null) { + this.withFsType(instance.getFsType()); + this.withStoragePolicyID(instance.getStoragePolicyID()); + this.withStoragePolicyName(instance.getStoragePolicyName()); + this.withVolumePath(instance.getVolumePath()); + } + } + + public String getFsType() { + return this.fsType; + } + + public A withFsType(String fsType) { + this.fsType = fsType; + return (A) this; + } + + public boolean hasFsType() { + return this.fsType != null; + } + + public String getStoragePolicyID() { + return this.storagePolicyID; + } + + public A withStoragePolicyID(String storagePolicyID) { + this.storagePolicyID = storagePolicyID; + return (A) this; + } + + public boolean hasStoragePolicyID() { + return this.storagePolicyID != null; + } + + public String getStoragePolicyName() { + return this.storagePolicyName; + } + + public A withStoragePolicyName(String storagePolicyName) { + this.storagePolicyName = storagePolicyName; + return (A) this; + } + + public boolean hasStoragePolicyName() { + return this.storagePolicyName != null; + } + + public String getVolumePath() { + return this.volumePath; + } + + public A withVolumePath(String volumePath) { + this.volumePath = volumePath; + return (A) this; + } + + public boolean hasVolumePath() { + return this.volumePath != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1VsphereVirtualDiskVolumeSourceFluent that = (V1VsphereVirtualDiskVolumeSourceFluent) o; + if (!java.util.Objects.equals(fsType, that.fsType)) return false; + if (!java.util.Objects.equals(storagePolicyID, that.storagePolicyID)) return false; + if (!java.util.Objects.equals(storagePolicyName, that.storagePolicyName)) return false; + if (!java.util.Objects.equals(volumePath, that.volumePath)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fsType, storagePolicyID, storagePolicyName, volumePath, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } + if (storagePolicyID != null) { sb.append("storagePolicyID:"); sb.append(storagePolicyID + ","); } + if (storagePolicyName != null) { sb.append("storagePolicyName:"); sb.append(storagePolicyName + ","); } + if (volumePath != null) { sb.append("volumePath:"); sb.append(volumePath); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceFluentImpl.java deleted file mode 100644 index 2d3b2d912b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1VsphereVirtualDiskVolumeSourceFluentImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1VsphereVirtualDiskVolumeSourceFluentImpl> extends BaseFluent implements V1VsphereVirtualDiskVolumeSourceFluent{ - public V1VsphereVirtualDiskVolumeSourceFluentImpl() { - } - public V1VsphereVirtualDiskVolumeSourceFluentImpl(V1VsphereVirtualDiskVolumeSource instance) { - if (instance != null) { - this.withFsType(instance.getFsType()); - this.withStoragePolicyID(instance.getStoragePolicyID()); - this.withStoragePolicyName(instance.getStoragePolicyName()); - this.withVolumePath(instance.getVolumePath()); - } - } - private String fsType; - private String storagePolicyID; - private String storagePolicyName; - private String volumePath; - public String getFsType() { - return this.fsType; - } - public A withFsType(String fsType) { - this.fsType=fsType; return (A) this; - } - public Boolean hasFsType() { - return this.fsType != null; - } - public String getStoragePolicyID() { - return this.storagePolicyID; - } - public A withStoragePolicyID(String storagePolicyID) { - this.storagePolicyID=storagePolicyID; return (A) this; - } - public Boolean hasStoragePolicyID() { - return this.storagePolicyID != null; - } - public String getStoragePolicyName() { - return this.storagePolicyName; - } - public A withStoragePolicyName(String storagePolicyName) { - this.storagePolicyName=storagePolicyName; return (A) this; - } - public Boolean hasStoragePolicyName() { - return this.storagePolicyName != null; - } - public String getVolumePath() { - return this.volumePath; - } - public A withVolumePath(String volumePath) { - this.volumePath=volumePath; return (A) this; - } - public Boolean hasVolumePath() { - return this.volumePath != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1VsphereVirtualDiskVolumeSourceFluentImpl that = (V1VsphereVirtualDiskVolumeSourceFluentImpl) o; - if (!java.util.Objects.equals(fsType, that.fsType)) return false; - - if (!java.util.Objects.equals(storagePolicyID, that.storagePolicyID)) return false; - - if (!java.util.Objects.equals(storagePolicyName, that.storagePolicyName)) return false; - - if (!java.util.Objects.equals(volumePath, that.volumePath)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(fsType, storagePolicyID, storagePolicyName, volumePath, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (fsType != null) { sb.append("fsType:"); sb.append(fsType + ","); } - if (storagePolicyID != null) { sb.append("storagePolicyID:"); sb.append(storagePolicyID + ","); } - if (storagePolicyName != null) { sb.append("storagePolicyName:"); sb.append(storagePolicyName + ","); } - if (volumePath != null) { sb.append("volumePath:"); sb.append(volumePath); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventBuilder.java index 6e334511ae..efdc4056e4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1WatchEventBuilder extends V1WatchEventFluentImpl implements VisitableBuilder{ +public class V1WatchEventBuilder extends V1WatchEventFluent implements VisitableBuilder{ public V1WatchEventBuilder() { - this(false); - } - public V1WatchEventBuilder(Boolean validationEnabled) { - this(new V1WatchEvent(), validationEnabled); + this(new V1WatchEvent()); } + public V1WatchEventBuilder(V1WatchEventFluent fluent) { - this(fluent, false); - } - public V1WatchEventBuilder(V1WatchEventFluent fluent,Boolean validationEnabled) { - this(fluent, new V1WatchEvent(), validationEnabled); + this(fluent, new V1WatchEvent()); } + public V1WatchEventBuilder(V1WatchEventFluent fluent,V1WatchEvent instance) { - this(fluent, instance, false); - } - public V1WatchEventBuilder(V1WatchEventFluent fluent,V1WatchEvent instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withObject(instance.getObject()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1WatchEventBuilder(V1WatchEvent instance) { - this(instance,false); - } - public V1WatchEventBuilder(V1WatchEvent instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withObject(instance.getObject()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1WatchEventFluent fluent; - Boolean validationEnabled; + public V1WatchEvent build() { V1WatchEvent buildable = new V1WatchEvent(); buildable.setObject(fluent.getObject()); @@ -46,4 +28,5 @@ public V1WatchEvent build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventFluent.java index a963e25e65..c25ce17a29 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventFluent.java @@ -1,20 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1WatchEventFluent> extends Fluent{ - public Object getObject(); - public A withObject(Object _object); - public Boolean hasObject(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1WatchEventFluent> extends BaseFluent{ + public V1WatchEventFluent() { + } + public V1WatchEventFluent(V1WatchEvent instance) { + this.copyInstance(instance); + } + private Object _object; + private String type; + + protected void copyInstance(V1WatchEvent instance) { + instance = (instance != null ? instance : new V1WatchEvent()); + if (instance != null) { + this.withObject(instance.getObject()); + this.withType(instance.getType()); + } + } + + public Object getObject() { + return this._object; + } + + public A withObject(Object _object) { + this._object = _object; + return (A) this; + } + + public boolean hasObject() { + return this._object != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1WatchEventFluent that = (V1WatchEventFluent) o; + if (!java.util.Objects.equals(_object, that._object)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(_object, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (_object != null) { sb.append("_object:"); sb.append(_object + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventFluentImpl.java deleted file mode 100644 index 7589f92f07..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WatchEventFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1WatchEventFluentImpl> extends BaseFluent implements V1WatchEventFluent{ - public V1WatchEventFluentImpl() { - } - public V1WatchEventFluentImpl(V1WatchEvent instance) { - if (instance != null) { - this.withObject(instance.getObject()); - this.withType(instance.getType()); - } - } - private Object _object; - private String type; - public Object getObject() { - return this._object; - } - public A withObject(Object _object) { - this._object=_object; return (A) this; - } - public Boolean hasObject() { - return this._object != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1WatchEventFluentImpl that = (V1WatchEventFluentImpl) o; - if (!java.util.Objects.equals(_object, that._object)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(_object, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (_object != null) { sb.append("_object:"); sb.append(_object + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionBuilder.java index 151d601074..6638d1360e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1WebhookConversionBuilder extends V1WebhookConversionFluentImpl implements VisitableBuilder{ +public class V1WebhookConversionBuilder extends V1WebhookConversionFluent implements VisitableBuilder{ public V1WebhookConversionBuilder() { - this(false); - } - public V1WebhookConversionBuilder(Boolean validationEnabled) { - this(new V1WebhookConversion(), validationEnabled); + this(new V1WebhookConversion()); } + public V1WebhookConversionBuilder(V1WebhookConversionFluent fluent) { - this(fluent, false); - } - public V1WebhookConversionBuilder(V1WebhookConversionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1WebhookConversion(), validationEnabled); + this(fluent, new V1WebhookConversion()); } + public V1WebhookConversionBuilder(V1WebhookConversionFluent fluent,V1WebhookConversion instance) { - this(fluent, instance, false); - } - public V1WebhookConversionBuilder(V1WebhookConversionFluent fluent,V1WebhookConversion instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withClientConfig(instance.getClientConfig()); - fluent.withConversionReviewVersions(instance.getConversionReviewVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1WebhookConversionBuilder(V1WebhookConversion instance) { - this(instance,false); - } - public V1WebhookConversionBuilder(V1WebhookConversion instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withClientConfig(instance.getClientConfig()); - this.withConversionReviewVersions(instance.getConversionReviewVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1WebhookConversionFluent fluent; - Boolean validationEnabled; + public V1WebhookConversion build() { V1WebhookConversion buildable = new V1WebhookConversion(); - buildable.setClientConfig(fluent.getClientConfig()); + buildable.setClientConfig(fluent.buildClientConfig()); buildable.setConversionReviewVersions(fluent.getConversionReviewVersions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionFluent.java index 3dd7cb4ce4..3734a0eef9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionFluent.java @@ -1,54 +1,208 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1WebhookConversionFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildClientConfig instead. - * @return The buildable object. - */ - @Deprecated - public ApiextensionsV1WebhookClientConfig getClientConfig(); - public ApiextensionsV1WebhookClientConfig buildClientConfig(); - public A withClientConfig(ApiextensionsV1WebhookClientConfig clientConfig); - public Boolean hasClientConfig(); - public V1WebhookConversionFluent.ClientConfigNested withNewClientConfig(); - public V1WebhookConversionFluent.ClientConfigNested withNewClientConfigLike(ApiextensionsV1WebhookClientConfig item); - public V1WebhookConversionFluent.ClientConfigNested editClientConfig(); - public V1WebhookConversionFluent.ClientConfigNested editOrNewClientConfig(); - public V1WebhookConversionFluent.ClientConfigNested editOrNewClientConfigLike(ApiextensionsV1WebhookClientConfig item); - public A addToConversionReviewVersions(int index,String item); - public A setToConversionReviewVersions(int index,String item); - public A addToConversionReviewVersions(java.lang.String... items); - public A addAllToConversionReviewVersions(Collection items); - public A removeFromConversionReviewVersions(java.lang.String... items); - public A removeAllFromConversionReviewVersions(Collection items); - public List getConversionReviewVersions(); - public String getConversionReviewVersion(int index); - public String getFirstConversionReviewVersion(); - public String getLastConversionReviewVersion(); - public String getMatchingConversionReviewVersion(Predicate predicate); - public Boolean hasMatchingConversionReviewVersion(Predicate predicate); - public A withConversionReviewVersions(List conversionReviewVersions); - public A withConversionReviewVersions(java.lang.String... conversionReviewVersions); - public Boolean hasConversionReviewVersions(); - public interface ClientConfigNested extends Nested,ApiextensionsV1WebhookClientConfigFluent>{ - public N and(); - public N endClientConfig(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1WebhookConversionFluent> extends BaseFluent{ + public V1WebhookConversionFluent() { + } + + public V1WebhookConversionFluent(V1WebhookConversion instance) { + this.copyInstance(instance); + } + private ApiextensionsV1WebhookClientConfigBuilder clientConfig; + private List conversionReviewVersions; + + protected void copyInstance(V1WebhookConversion instance) { + instance = (instance != null ? instance : new V1WebhookConversion()); + if (instance != null) { + this.withClientConfig(instance.getClientConfig()); + this.withConversionReviewVersions(instance.getConversionReviewVersions()); + } + } + + public ApiextensionsV1WebhookClientConfig buildClientConfig() { + return this.clientConfig != null ? this.clientConfig.build() : null; + } + + public A withClientConfig(ApiextensionsV1WebhookClientConfig clientConfig) { + this._visitables.remove("clientConfig"); + if (clientConfig != null) { + this.clientConfig = new ApiextensionsV1WebhookClientConfigBuilder(clientConfig); + this._visitables.get("clientConfig").add(this.clientConfig); + } else { + this.clientConfig = null; + this._visitables.get("clientConfig").remove(this.clientConfig); + } + return (A) this; + } + + public boolean hasClientConfig() { + return this.clientConfig != null; + } + + public ClientConfigNested withNewClientConfig() { + return new ClientConfigNested(null); + } + + public ClientConfigNested withNewClientConfigLike(ApiextensionsV1WebhookClientConfig item) { + return new ClientConfigNested(item); + } + + public ClientConfigNested editClientConfig() { + return withNewClientConfigLike(java.util.Optional.ofNullable(buildClientConfig()).orElse(null)); + } + + public ClientConfigNested editOrNewClientConfig() { + return withNewClientConfigLike(java.util.Optional.ofNullable(buildClientConfig()).orElse(new ApiextensionsV1WebhookClientConfigBuilder().build())); + } + + public ClientConfigNested editOrNewClientConfigLike(ApiextensionsV1WebhookClientConfig item) { + return withNewClientConfigLike(java.util.Optional.ofNullable(buildClientConfig()).orElse(item)); + } + + public A addToConversionReviewVersions(int index,String item) { + if (this.conversionReviewVersions == null) {this.conversionReviewVersions = new ArrayList();} + this.conversionReviewVersions.add(index, item); + return (A)this; + } + + public A setToConversionReviewVersions(int index,String item) { + if (this.conversionReviewVersions == null) {this.conversionReviewVersions = new ArrayList();} + this.conversionReviewVersions.set(index, item); return (A)this; + } + + public A addToConversionReviewVersions(java.lang.String... items) { + if (this.conversionReviewVersions == null) {this.conversionReviewVersions = new ArrayList();} + for (String item : items) {this.conversionReviewVersions.add(item);} return (A)this; + } + + public A addAllToConversionReviewVersions(Collection items) { + if (this.conversionReviewVersions == null) {this.conversionReviewVersions = new ArrayList();} + for (String item : items) {this.conversionReviewVersions.add(item);} return (A)this; + } + + public A removeFromConversionReviewVersions(java.lang.String... items) { + if (this.conversionReviewVersions == null) return (A)this; + for (String item : items) { this.conversionReviewVersions.remove(item);} return (A)this; } + public A removeAllFromConversionReviewVersions(Collection items) { + if (this.conversionReviewVersions == null) return (A)this; + for (String item : items) { this.conversionReviewVersions.remove(item);} return (A)this; + } + + public List getConversionReviewVersions() { + return this.conversionReviewVersions; + } + + public String getConversionReviewVersion(int index) { + return this.conversionReviewVersions.get(index); + } + + public String getFirstConversionReviewVersion() { + return this.conversionReviewVersions.get(0); + } + + public String getLastConversionReviewVersion() { + return this.conversionReviewVersions.get(conversionReviewVersions.size() - 1); + } + + public String getMatchingConversionReviewVersion(Predicate predicate) { + for (String item : conversionReviewVersions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingConversionReviewVersion(Predicate predicate) { + for (String item : conversionReviewVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConversionReviewVersions(List conversionReviewVersions) { + if (conversionReviewVersions != null) { + this.conversionReviewVersions = new ArrayList(); + for (String item : conversionReviewVersions) { + this.addToConversionReviewVersions(item); + } + } else { + this.conversionReviewVersions = null; + } + return (A) this; + } + + public A withConversionReviewVersions(java.lang.String... conversionReviewVersions) { + if (this.conversionReviewVersions != null) { + this.conversionReviewVersions.clear(); + _visitables.remove("conversionReviewVersions"); + } + if (conversionReviewVersions != null) { + for (String item : conversionReviewVersions) { + this.addToConversionReviewVersions(item); + } + } + return (A) this; + } + + public boolean hasConversionReviewVersions() { + return this.conversionReviewVersions != null && !this.conversionReviewVersions.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1WebhookConversionFluent that = (V1WebhookConversionFluent) o; + if (!java.util.Objects.equals(clientConfig, that.clientConfig)) return false; + if (!java.util.Objects.equals(conversionReviewVersions, that.conversionReviewVersions)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(clientConfig, conversionReviewVersions, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (clientConfig != null) { sb.append("clientConfig:"); sb.append(clientConfig + ","); } + if (conversionReviewVersions != null && !conversionReviewVersions.isEmpty()) { sb.append("conversionReviewVersions:"); sb.append(conversionReviewVersions); } + sb.append("}"); + return sb.toString(); + } + public class ClientConfigNested extends ApiextensionsV1WebhookClientConfigFluent> implements Nested{ + ClientConfigNested(ApiextensionsV1WebhookClientConfig item) { + this.builder = new ApiextensionsV1WebhookClientConfigBuilder(this, item); + } + ApiextensionsV1WebhookClientConfigBuilder builder; + + public N and() { + return (N) V1WebhookConversionFluent.this.withClientConfig(builder.build()); + } + + public N endClientConfig() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionFluentImpl.java deleted file mode 100644 index d22a39c051..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WebhookConversionFluentImpl.java +++ /dev/null @@ -1,154 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1WebhookConversionFluentImpl> extends BaseFluent implements V1WebhookConversionFluent{ - public V1WebhookConversionFluentImpl() { - } - public V1WebhookConversionFluentImpl(V1WebhookConversion instance) { - if (instance != null) { - this.withClientConfig(instance.getClientConfig()); - this.withConversionReviewVersions(instance.getConversionReviewVersions()); - } - } - private ApiextensionsV1WebhookClientConfigBuilder clientConfig; - private List conversionReviewVersions; - - /** - * This method has been deprecated, please use method buildClientConfig instead. - * @return The buildable object. - */ - @Deprecated - public ApiextensionsV1WebhookClientConfig getClientConfig() { - return this.clientConfig!=null ?this.clientConfig.build():null; - } - public ApiextensionsV1WebhookClientConfig buildClientConfig() { - return this.clientConfig!=null ?this.clientConfig.build():null; - } - public A withClientConfig(ApiextensionsV1WebhookClientConfig clientConfig) { - _visitables.get("clientConfig").remove(this.clientConfig); - if (clientConfig!=null){ this.clientConfig= new ApiextensionsV1WebhookClientConfigBuilder(clientConfig); _visitables.get("clientConfig").add(this.clientConfig);} else { this.clientConfig = null; _visitables.get("clientConfig").remove(this.clientConfig); } return (A) this; - } - public Boolean hasClientConfig() { - return this.clientConfig != null; - } - public V1WebhookConversionFluentImpl.ClientConfigNested withNewClientConfig() { - return new V1WebhookConversionFluentImpl.ClientConfigNestedImpl(); - } - public V1WebhookConversionFluentImpl.ClientConfigNested withNewClientConfigLike(ApiextensionsV1WebhookClientConfig item) { - return new V1WebhookConversionFluentImpl.ClientConfigNestedImpl(item); - } - public V1WebhookConversionFluentImpl.ClientConfigNested editClientConfig() { - return withNewClientConfigLike(getClientConfig()); - } - public V1WebhookConversionFluentImpl.ClientConfigNested editOrNewClientConfig() { - return withNewClientConfigLike(getClientConfig() != null ? getClientConfig(): new ApiextensionsV1WebhookClientConfigBuilder().build()); - } - public V1WebhookConversionFluentImpl.ClientConfigNested editOrNewClientConfigLike(ApiextensionsV1WebhookClientConfig item) { - return withNewClientConfigLike(getClientConfig() != null ? getClientConfig(): item); - } - public A addToConversionReviewVersions(int index,String item) { - if (this.conversionReviewVersions == null) {this.conversionReviewVersions = new ArrayList();} - this.conversionReviewVersions.add(index, item); - return (A)this; - } - public A setToConversionReviewVersions(int index,String item) { - if (this.conversionReviewVersions == null) {this.conversionReviewVersions = new ArrayList();} - this.conversionReviewVersions.set(index, item); return (A)this; - } - public A addToConversionReviewVersions(java.lang.String... items) { - if (this.conversionReviewVersions == null) {this.conversionReviewVersions = new ArrayList();} - for (String item : items) {this.conversionReviewVersions.add(item);} return (A)this; - } - public A addAllToConversionReviewVersions(Collection items) { - if (this.conversionReviewVersions == null) {this.conversionReviewVersions = new ArrayList();} - for (String item : items) {this.conversionReviewVersions.add(item);} return (A)this; - } - public A removeFromConversionReviewVersions(java.lang.String... items) { - for (String item : items) {if (this.conversionReviewVersions!= null){ this.conversionReviewVersions.remove(item);}} return (A)this; - } - public A removeAllFromConversionReviewVersions(Collection items) { - for (String item : items) {if (this.conversionReviewVersions!= null){ this.conversionReviewVersions.remove(item);}} return (A)this; - } - public List getConversionReviewVersions() { - return this.conversionReviewVersions; - } - public String getConversionReviewVersion(int index) { - return this.conversionReviewVersions.get(index); - } - public String getFirstConversionReviewVersion() { - return this.conversionReviewVersions.get(0); - } - public String getLastConversionReviewVersion() { - return this.conversionReviewVersions.get(conversionReviewVersions.size() - 1); - } - public String getMatchingConversionReviewVersion(Predicate predicate) { - for (String item: conversionReviewVersions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingConversionReviewVersion(Predicate predicate) { - for (String item: conversionReviewVersions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConversionReviewVersions(List conversionReviewVersions) { - if (conversionReviewVersions != null) {this.conversionReviewVersions = new ArrayList(); for (String item : conversionReviewVersions){this.addToConversionReviewVersions(item);}} else { this.conversionReviewVersions = null;} return (A) this; - } - public A withConversionReviewVersions(java.lang.String... conversionReviewVersions) { - if (this.conversionReviewVersions != null) {this.conversionReviewVersions.clear(); _visitables.remove("conversionReviewVersions"); } - if (conversionReviewVersions != null) {for (String item :conversionReviewVersions){ this.addToConversionReviewVersions(item);}} return (A) this; - } - public Boolean hasConversionReviewVersions() { - return conversionReviewVersions != null && !conversionReviewVersions.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1WebhookConversionFluentImpl that = (V1WebhookConversionFluentImpl) o; - if (!java.util.Objects.equals(clientConfig, that.clientConfig)) return false; - - if (!java.util.Objects.equals(conversionReviewVersions, that.conversionReviewVersions)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(clientConfig, conversionReviewVersions, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (clientConfig != null) { sb.append("clientConfig:"); sb.append(clientConfig + ","); } - if (conversionReviewVersions != null && !conversionReviewVersions.isEmpty()) { sb.append("conversionReviewVersions:"); sb.append(conversionReviewVersions); } - sb.append("}"); - return sb.toString(); - } - class ClientConfigNestedImpl extends ApiextensionsV1WebhookClientConfigFluentImpl> implements V1WebhookConversionFluentImpl.ClientConfigNested,Nested{ - ClientConfigNestedImpl(ApiextensionsV1WebhookClientConfig item) { - this.builder = new ApiextensionsV1WebhookClientConfigBuilder(this, item); - } - ClientConfigNestedImpl() { - this.builder = new ApiextensionsV1WebhookClientConfigBuilder(this); - } - ApiextensionsV1WebhookClientConfigBuilder builder; - public N and() { - return (N) V1WebhookConversionFluentImpl.this.withClientConfig(builder.build()); - } - public N endClientConfig() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermBuilder.java index f9a1b22a6b..9eb52fd0f2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1WeightedPodAffinityTermBuilder extends V1WeightedPodAffinityTermFluentImpl implements VisitableBuilder{ +public class V1WeightedPodAffinityTermBuilder extends V1WeightedPodAffinityTermFluent implements VisitableBuilder{ public V1WeightedPodAffinityTermBuilder() { - this(false); - } - public V1WeightedPodAffinityTermBuilder(Boolean validationEnabled) { - this(new V1WeightedPodAffinityTerm(), validationEnabled); + this(new V1WeightedPodAffinityTerm()); } + public V1WeightedPodAffinityTermBuilder(V1WeightedPodAffinityTermFluent fluent) { - this(fluent, false); - } - public V1WeightedPodAffinityTermBuilder(V1WeightedPodAffinityTermFluent fluent,Boolean validationEnabled) { - this(fluent, new V1WeightedPodAffinityTerm(), validationEnabled); + this(fluent, new V1WeightedPodAffinityTerm()); } + public V1WeightedPodAffinityTermBuilder(V1WeightedPodAffinityTermFluent fluent,V1WeightedPodAffinityTerm instance) { - this(fluent, instance, false); - } - public V1WeightedPodAffinityTermBuilder(V1WeightedPodAffinityTermFluent fluent,V1WeightedPodAffinityTerm instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPodAffinityTerm(instance.getPodAffinityTerm()); - fluent.withWeight(instance.getWeight()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1WeightedPodAffinityTermBuilder(V1WeightedPodAffinityTerm instance) { - this(instance,false); - } - public V1WeightedPodAffinityTermBuilder(V1WeightedPodAffinityTerm instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPodAffinityTerm(instance.getPodAffinityTerm()); - this.withWeight(instance.getWeight()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1WeightedPodAffinityTermFluent fluent; - Boolean validationEnabled; + public V1WeightedPodAffinityTerm build() { V1WeightedPodAffinityTerm buildable = new V1WeightedPodAffinityTerm(); - buildable.setPodAffinityTerm(fluent.getPodAffinityTerm()); + buildable.setPodAffinityTerm(fluent.buildPodAffinityTerm()); buildable.setWeight(fluent.getWeight()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermFluent.java index bb31fdce4d..706e21287b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermFluent.java @@ -1,38 +1,124 @@ package io.kubernetes.client.openapi.models; -import java.lang.Integer; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import java.lang.Integer; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1WeightedPodAffinityTermFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildPodAffinityTerm instead. - * @return The buildable object. - */ - @Deprecated - public V1PodAffinityTerm getPodAffinityTerm(); - public V1PodAffinityTerm buildPodAffinityTerm(); - public A withPodAffinityTerm(V1PodAffinityTerm podAffinityTerm); - public Boolean hasPodAffinityTerm(); - public V1WeightedPodAffinityTermFluent.PodAffinityTermNested withNewPodAffinityTerm(); - public V1WeightedPodAffinityTermFluent.PodAffinityTermNested withNewPodAffinityTermLike(V1PodAffinityTerm item); - public V1WeightedPodAffinityTermFluent.PodAffinityTermNested editPodAffinityTerm(); - public V1WeightedPodAffinityTermFluent.PodAffinityTermNested editOrNewPodAffinityTerm(); - public V1WeightedPodAffinityTermFluent.PodAffinityTermNested editOrNewPodAffinityTermLike(V1PodAffinityTerm item); - public Integer getWeight(); - public A withWeight(Integer weight); - public Boolean hasWeight(); - public interface PodAffinityTermNested extends Nested,V1PodAffinityTermFluent>{ - public N and(); - public N endPodAffinityTerm(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1WeightedPodAffinityTermFluent> extends BaseFluent{ + public V1WeightedPodAffinityTermFluent() { + } + + public V1WeightedPodAffinityTermFluent(V1WeightedPodAffinityTerm instance) { + this.copyInstance(instance); + } + private V1PodAffinityTermBuilder podAffinityTerm; + private Integer weight; + + protected void copyInstance(V1WeightedPodAffinityTerm instance) { + instance = (instance != null ? instance : new V1WeightedPodAffinityTerm()); + if (instance != null) { + this.withPodAffinityTerm(instance.getPodAffinityTerm()); + this.withWeight(instance.getWeight()); + } + } + + public V1PodAffinityTerm buildPodAffinityTerm() { + return this.podAffinityTerm != null ? this.podAffinityTerm.build() : null; + } + + public A withPodAffinityTerm(V1PodAffinityTerm podAffinityTerm) { + this._visitables.remove("podAffinityTerm"); + if (podAffinityTerm != null) { + this.podAffinityTerm = new V1PodAffinityTermBuilder(podAffinityTerm); + this._visitables.get("podAffinityTerm").add(this.podAffinityTerm); + } else { + this.podAffinityTerm = null; + this._visitables.get("podAffinityTerm").remove(this.podAffinityTerm); + } + return (A) this; + } + + public boolean hasPodAffinityTerm() { + return this.podAffinityTerm != null; + } + + public PodAffinityTermNested withNewPodAffinityTerm() { + return new PodAffinityTermNested(null); + } + + public PodAffinityTermNested withNewPodAffinityTermLike(V1PodAffinityTerm item) { + return new PodAffinityTermNested(item); + } + + public PodAffinityTermNested editPodAffinityTerm() { + return withNewPodAffinityTermLike(java.util.Optional.ofNullable(buildPodAffinityTerm()).orElse(null)); + } + + public PodAffinityTermNested editOrNewPodAffinityTerm() { + return withNewPodAffinityTermLike(java.util.Optional.ofNullable(buildPodAffinityTerm()).orElse(new V1PodAffinityTermBuilder().build())); + } + + public PodAffinityTermNested editOrNewPodAffinityTermLike(V1PodAffinityTerm item) { + return withNewPodAffinityTermLike(java.util.Optional.ofNullable(buildPodAffinityTerm()).orElse(item)); + } + + public Integer getWeight() { + return this.weight; + } + + public A withWeight(Integer weight) { + this.weight = weight; + return (A) this; + } + + public boolean hasWeight() { + return this.weight != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1WeightedPodAffinityTermFluent that = (V1WeightedPodAffinityTermFluent) o; + if (!java.util.Objects.equals(podAffinityTerm, that.podAffinityTerm)) return false; + if (!java.util.Objects.equals(weight, that.weight)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(podAffinityTerm, weight, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (podAffinityTerm != null) { sb.append("podAffinityTerm:"); sb.append(podAffinityTerm + ","); } + if (weight != null) { sb.append("weight:"); sb.append(weight); } + sb.append("}"); + return sb.toString(); } + public class PodAffinityTermNested extends V1PodAffinityTermFluent> implements Nested{ + PodAffinityTermNested(V1PodAffinityTerm item) { + this.builder = new V1PodAffinityTermBuilder(this, item); + } + V1PodAffinityTermBuilder builder; + + public N and() { + return (N) V1WeightedPodAffinityTermFluent.this.withPodAffinityTerm(builder.build()); + } + + public N endPodAffinityTerm() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermFluentImpl.java deleted file mode 100644 index 3c3125730c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WeightedPodAffinityTermFluentImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1WeightedPodAffinityTermFluentImpl> extends BaseFluent implements V1WeightedPodAffinityTermFluent{ - public V1WeightedPodAffinityTermFluentImpl() { - } - public V1WeightedPodAffinityTermFluentImpl(V1WeightedPodAffinityTerm instance) { - if (instance != null) { - this.withPodAffinityTerm(instance.getPodAffinityTerm()); - this.withWeight(instance.getWeight()); - } - } - private V1PodAffinityTermBuilder podAffinityTerm; - private Integer weight; - - /** - * This method has been deprecated, please use method buildPodAffinityTerm instead. - * @return The buildable object. - */ - @Deprecated - public V1PodAffinityTerm getPodAffinityTerm() { - return this.podAffinityTerm!=null ?this.podAffinityTerm.build():null; - } - public V1PodAffinityTerm buildPodAffinityTerm() { - return this.podAffinityTerm!=null ?this.podAffinityTerm.build():null; - } - public A withPodAffinityTerm(V1PodAffinityTerm podAffinityTerm) { - _visitables.get("podAffinityTerm").remove(this.podAffinityTerm); - if (podAffinityTerm!=null){ this.podAffinityTerm= new V1PodAffinityTermBuilder(podAffinityTerm); _visitables.get("podAffinityTerm").add(this.podAffinityTerm);} else { this.podAffinityTerm = null; _visitables.get("podAffinityTerm").remove(this.podAffinityTerm); } return (A) this; - } - public Boolean hasPodAffinityTerm() { - return this.podAffinityTerm != null; - } - public V1WeightedPodAffinityTermFluentImpl.PodAffinityTermNested withNewPodAffinityTerm() { - return new V1WeightedPodAffinityTermFluentImpl.PodAffinityTermNestedImpl(); - } - public V1WeightedPodAffinityTermFluentImpl.PodAffinityTermNested withNewPodAffinityTermLike(V1PodAffinityTerm item) { - return new V1WeightedPodAffinityTermFluentImpl.PodAffinityTermNestedImpl(item); - } - public V1WeightedPodAffinityTermFluentImpl.PodAffinityTermNested editPodAffinityTerm() { - return withNewPodAffinityTermLike(getPodAffinityTerm()); - } - public V1WeightedPodAffinityTermFluentImpl.PodAffinityTermNested editOrNewPodAffinityTerm() { - return withNewPodAffinityTermLike(getPodAffinityTerm() != null ? getPodAffinityTerm(): new V1PodAffinityTermBuilder().build()); - } - public V1WeightedPodAffinityTermFluentImpl.PodAffinityTermNested editOrNewPodAffinityTermLike(V1PodAffinityTerm item) { - return withNewPodAffinityTermLike(getPodAffinityTerm() != null ? getPodAffinityTerm(): item); - } - public Integer getWeight() { - return this.weight; - } - public A withWeight(Integer weight) { - this.weight=weight; return (A) this; - } - public Boolean hasWeight() { - return this.weight != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1WeightedPodAffinityTermFluentImpl that = (V1WeightedPodAffinityTermFluentImpl) o; - if (!java.util.Objects.equals(podAffinityTerm, that.podAffinityTerm)) return false; - - if (!java.util.Objects.equals(weight, that.weight)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(podAffinityTerm, weight, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (podAffinityTerm != null) { sb.append("podAffinityTerm:"); sb.append(podAffinityTerm + ","); } - if (weight != null) { sb.append("weight:"); sb.append(weight); } - sb.append("}"); - return sb.toString(); - } - class PodAffinityTermNestedImpl extends V1PodAffinityTermFluentImpl> implements V1WeightedPodAffinityTermFluentImpl.PodAffinityTermNested,Nested{ - PodAffinityTermNestedImpl(V1PodAffinityTerm item) { - this.builder = new V1PodAffinityTermBuilder(this, item); - } - PodAffinityTermNestedImpl() { - this.builder = new V1PodAffinityTermBuilder(this); - } - V1PodAffinityTermBuilder builder; - public N and() { - return (N) V1WeightedPodAffinityTermFluentImpl.this.withPodAffinityTerm(builder.build()); - } - public N endPodAffinityTerm() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsBuilder.java index 94a4c7de61..003e7430ba 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1WindowsSecurityContextOptionsBuilder extends V1WindowsSecurityContextOptionsFluentImpl implements VisitableBuilder{ +public class V1WindowsSecurityContextOptionsBuilder extends V1WindowsSecurityContextOptionsFluent implements VisitableBuilder{ public V1WindowsSecurityContextOptionsBuilder() { - this(false); - } - public V1WindowsSecurityContextOptionsBuilder(Boolean validationEnabled) { - this(new V1WindowsSecurityContextOptions(), validationEnabled); + this(new V1WindowsSecurityContextOptions()); } + public V1WindowsSecurityContextOptionsBuilder(V1WindowsSecurityContextOptionsFluent fluent) { - this(fluent, false); - } - public V1WindowsSecurityContextOptionsBuilder(V1WindowsSecurityContextOptionsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1WindowsSecurityContextOptions(), validationEnabled); + this(fluent, new V1WindowsSecurityContextOptions()); } + public V1WindowsSecurityContextOptionsBuilder(V1WindowsSecurityContextOptionsFluent fluent,V1WindowsSecurityContextOptions instance) { - this(fluent, instance, false); - } - public V1WindowsSecurityContextOptionsBuilder(V1WindowsSecurityContextOptionsFluent fluent,V1WindowsSecurityContextOptions instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withGmsaCredentialSpec(instance.getGmsaCredentialSpec()); - fluent.withGmsaCredentialSpecName(instance.getGmsaCredentialSpecName()); - fluent.withHostProcess(instance.getHostProcess()); - fluent.withRunAsUserName(instance.getRunAsUserName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1WindowsSecurityContextOptionsBuilder(V1WindowsSecurityContextOptions instance) { - this(instance,false); - } - public V1WindowsSecurityContextOptionsBuilder(V1WindowsSecurityContextOptions instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withGmsaCredentialSpec(instance.getGmsaCredentialSpec()); - this.withGmsaCredentialSpecName(instance.getGmsaCredentialSpecName()); - this.withHostProcess(instance.getHostProcess()); - this.withRunAsUserName(instance.getRunAsUserName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1WindowsSecurityContextOptionsFluent fluent; - Boolean validationEnabled; + public V1WindowsSecurityContextOptions build() { V1WindowsSecurityContextOptions buildable = new V1WindowsSecurityContextOptions(); buildable.setGmsaCredentialSpec(fluent.getGmsaCredentialSpec()); @@ -52,4 +30,5 @@ public V1WindowsSecurityContextOptions build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsFluent.java index 3e96ca9a4f..6828106fe7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsFluent.java @@ -1,26 +1,119 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; import java.lang.Boolean; - /** - * Generated - */ -public interface V1WindowsSecurityContextOptionsFluent> extends Fluent{ - public String getGmsaCredentialSpec(); - public A withGmsaCredentialSpec(String gmsaCredentialSpec); - public Boolean hasGmsaCredentialSpec(); - public String getGmsaCredentialSpecName(); - public A withGmsaCredentialSpecName(String gmsaCredentialSpecName); - public Boolean hasGmsaCredentialSpecName(); - public Boolean getHostProcess(); - public A withHostProcess(Boolean hostProcess); - public Boolean hasHostProcess(); - public String getRunAsUserName(); - public A withRunAsUserName(String runAsUserName); - public Boolean hasRunAsUserName(); - public A withHostProcess(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1WindowsSecurityContextOptionsFluent> extends BaseFluent{ + public V1WindowsSecurityContextOptionsFluent() { + } + public V1WindowsSecurityContextOptionsFluent(V1WindowsSecurityContextOptions instance) { + this.copyInstance(instance); + } + private String gmsaCredentialSpec; + private String gmsaCredentialSpecName; + private Boolean hostProcess; + private String runAsUserName; + + protected void copyInstance(V1WindowsSecurityContextOptions instance) { + instance = (instance != null ? instance : new V1WindowsSecurityContextOptions()); + if (instance != null) { + this.withGmsaCredentialSpec(instance.getGmsaCredentialSpec()); + this.withGmsaCredentialSpecName(instance.getGmsaCredentialSpecName()); + this.withHostProcess(instance.getHostProcess()); + this.withRunAsUserName(instance.getRunAsUserName()); + } + } + + public String getGmsaCredentialSpec() { + return this.gmsaCredentialSpec; + } + + public A withGmsaCredentialSpec(String gmsaCredentialSpec) { + this.gmsaCredentialSpec = gmsaCredentialSpec; + return (A) this; + } + + public boolean hasGmsaCredentialSpec() { + return this.gmsaCredentialSpec != null; + } + + public String getGmsaCredentialSpecName() { + return this.gmsaCredentialSpecName; + } + + public A withGmsaCredentialSpecName(String gmsaCredentialSpecName) { + this.gmsaCredentialSpecName = gmsaCredentialSpecName; + return (A) this; + } + + public boolean hasGmsaCredentialSpecName() { + return this.gmsaCredentialSpecName != null; + } + + public Boolean getHostProcess() { + return this.hostProcess; + } + + public A withHostProcess(Boolean hostProcess) { + this.hostProcess = hostProcess; + return (A) this; + } + + public boolean hasHostProcess() { + return this.hostProcess != null; + } + + public String getRunAsUserName() { + return this.runAsUserName; + } + + public A withRunAsUserName(String runAsUserName) { + this.runAsUserName = runAsUserName; + return (A) this; + } + + public boolean hasRunAsUserName() { + return this.runAsUserName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1WindowsSecurityContextOptionsFluent that = (V1WindowsSecurityContextOptionsFluent) o; + if (!java.util.Objects.equals(gmsaCredentialSpec, that.gmsaCredentialSpec)) return false; + if (!java.util.Objects.equals(gmsaCredentialSpecName, that.gmsaCredentialSpecName)) return false; + if (!java.util.Objects.equals(hostProcess, that.hostProcess)) return false; + if (!java.util.Objects.equals(runAsUserName, that.runAsUserName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(gmsaCredentialSpec, gmsaCredentialSpecName, hostProcess, runAsUserName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (gmsaCredentialSpec != null) { sb.append("gmsaCredentialSpec:"); sb.append(gmsaCredentialSpec + ","); } + if (gmsaCredentialSpecName != null) { sb.append("gmsaCredentialSpecName:"); sb.append(gmsaCredentialSpecName + ","); } + if (hostProcess != null) { sb.append("hostProcess:"); sb.append(hostProcess + ","); } + if (runAsUserName != null) { sb.append("runAsUserName:"); sb.append(runAsUserName); } + sb.append("}"); + return sb.toString(); + } + + public A withHostProcess() { + return withHostProcess(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsFluentImpl.java deleted file mode 100644 index 92b15f5c63..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1WindowsSecurityContextOptionsFluentImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1WindowsSecurityContextOptionsFluentImpl> extends BaseFluent implements V1WindowsSecurityContextOptionsFluent{ - public V1WindowsSecurityContextOptionsFluentImpl() { - } - public V1WindowsSecurityContextOptionsFluentImpl(V1WindowsSecurityContextOptions instance) { - if (instance != null) { - this.withGmsaCredentialSpec(instance.getGmsaCredentialSpec()); - this.withGmsaCredentialSpecName(instance.getGmsaCredentialSpecName()); - this.withHostProcess(instance.getHostProcess()); - this.withRunAsUserName(instance.getRunAsUserName()); - } - } - private String gmsaCredentialSpec; - private String gmsaCredentialSpecName; - private Boolean hostProcess; - private String runAsUserName; - public String getGmsaCredentialSpec() { - return this.gmsaCredentialSpec; - } - public A withGmsaCredentialSpec(String gmsaCredentialSpec) { - this.gmsaCredentialSpec=gmsaCredentialSpec; return (A) this; - } - public Boolean hasGmsaCredentialSpec() { - return this.gmsaCredentialSpec != null; - } - public String getGmsaCredentialSpecName() { - return this.gmsaCredentialSpecName; - } - public A withGmsaCredentialSpecName(String gmsaCredentialSpecName) { - this.gmsaCredentialSpecName=gmsaCredentialSpecName; return (A) this; - } - public Boolean hasGmsaCredentialSpecName() { - return this.gmsaCredentialSpecName != null; - } - public Boolean getHostProcess() { - return this.hostProcess; - } - public A withHostProcess(Boolean hostProcess) { - this.hostProcess=hostProcess; return (A) this; - } - public Boolean hasHostProcess() { - return this.hostProcess != null; - } - public String getRunAsUserName() { - return this.runAsUserName; - } - public A withRunAsUserName(String runAsUserName) { - this.runAsUserName=runAsUserName; return (A) this; - } - public Boolean hasRunAsUserName() { - return this.runAsUserName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1WindowsSecurityContextOptionsFluentImpl that = (V1WindowsSecurityContextOptionsFluentImpl) o; - if (!java.util.Objects.equals(gmsaCredentialSpec, that.gmsaCredentialSpec)) return false; - - if (!java.util.Objects.equals(gmsaCredentialSpecName, that.gmsaCredentialSpecName)) return false; - - if (!java.util.Objects.equals(hostProcess, that.hostProcess)) return false; - - if (!java.util.Objects.equals(runAsUserName, that.runAsUserName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(gmsaCredentialSpec, gmsaCredentialSpecName, hostProcess, runAsUserName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (gmsaCredentialSpec != null) { sb.append("gmsaCredentialSpec:"); sb.append(gmsaCredentialSpec + ","); } - if (gmsaCredentialSpecName != null) { sb.append("gmsaCredentialSpecName:"); sb.append(gmsaCredentialSpecName + ","); } - if (hostProcess != null) { sb.append("hostProcess:"); sb.append(hostProcess + ","); } - if (runAsUserName != null) { sb.append("runAsUserName:"); sb.append(runAsUserName); } - sb.append("}"); - return sb.toString(); - } - public A withHostProcess() { - return withHostProcess(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationBuilder.java index 2599323eb7..a074d44f71 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1AuditAnnotationBuilder extends V1alpha1AuditAnnotationFluentImpl implements VisitableBuilder{ +public class V1alpha1AuditAnnotationBuilder extends V1alpha1AuditAnnotationFluent implements VisitableBuilder{ public V1alpha1AuditAnnotationBuilder() { - this(false); - } - public V1alpha1AuditAnnotationBuilder(Boolean validationEnabled) { - this(new V1alpha1AuditAnnotation(), validationEnabled); + this(new V1alpha1AuditAnnotation()); } + public V1alpha1AuditAnnotationBuilder(V1alpha1AuditAnnotationFluent fluent) { - this(fluent, false); - } - public V1alpha1AuditAnnotationBuilder(V1alpha1AuditAnnotationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1AuditAnnotation(), validationEnabled); + this(fluent, new V1alpha1AuditAnnotation()); } + public V1alpha1AuditAnnotationBuilder(V1alpha1AuditAnnotationFluent fluent,V1alpha1AuditAnnotation instance) { - this(fluent, instance, false); - } - public V1alpha1AuditAnnotationBuilder(V1alpha1AuditAnnotationFluent fluent,V1alpha1AuditAnnotation instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withKey(instance.getKey()); - fluent.withValueExpression(instance.getValueExpression()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1AuditAnnotationBuilder(V1alpha1AuditAnnotation instance) { - this(instance,false); - } - public V1alpha1AuditAnnotationBuilder(V1alpha1AuditAnnotation instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withKey(instance.getKey()); - this.withValueExpression(instance.getValueExpression()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1AuditAnnotationFluent fluent; - Boolean validationEnabled; + public V1alpha1AuditAnnotation build() { V1alpha1AuditAnnotation buildable = new V1alpha1AuditAnnotation(); buildable.setKey(fluent.getKey()); @@ -46,4 +28,5 @@ public V1alpha1AuditAnnotation build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationFluent.java index e1d051643c..7ecf95c4c2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1AuditAnnotationFluent> extends Fluent{ - public String getKey(); - public A withKey(String key); - public Boolean hasKey(); - public String getValueExpression(); - public A withValueExpression(String valueExpression); - public Boolean hasValueExpression(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1AuditAnnotationFluent> extends BaseFluent{ + public V1alpha1AuditAnnotationFluent() { + } + public V1alpha1AuditAnnotationFluent(V1alpha1AuditAnnotation instance) { + this.copyInstance(instance); + } + private String key; + private String valueExpression; + + protected void copyInstance(V1alpha1AuditAnnotation instance) { + instance = (instance != null ? instance : new V1alpha1AuditAnnotation()); + if (instance != null) { + this.withKey(instance.getKey()); + this.withValueExpression(instance.getValueExpression()); + } + } + + public String getKey() { + return this.key; + } + + public A withKey(String key) { + this.key = key; + return (A) this; + } + + public boolean hasKey() { + return this.key != null; + } + + public String getValueExpression() { + return this.valueExpression; + } + + public A withValueExpression(String valueExpression) { + this.valueExpression = valueExpression; + return (A) this; + } + + public boolean hasValueExpression() { + return this.valueExpression != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1AuditAnnotationFluent that = (V1alpha1AuditAnnotationFluent) o; + if (!java.util.Objects.equals(key, that.key)) return false; + if (!java.util.Objects.equals(valueExpression, that.valueExpression)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(key, valueExpression, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (key != null) { sb.append("key:"); sb.append(key + ","); } + if (valueExpression != null) { sb.append("valueExpression:"); sb.append(valueExpression); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRBuilder.java index 63ab2e787b..61e3932839 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ClusterCIDRBuilder extends V1alpha1ClusterCIDRFluentImpl implements VisitableBuilder{ +public class V1alpha1ClusterCIDRBuilder extends V1alpha1ClusterCIDRFluent implements VisitableBuilder{ public V1alpha1ClusterCIDRBuilder() { - this(false); - } - public V1alpha1ClusterCIDRBuilder(Boolean validationEnabled) { - this(new V1alpha1ClusterCIDR(), validationEnabled); + this(new V1alpha1ClusterCIDR()); } + public V1alpha1ClusterCIDRBuilder(V1alpha1ClusterCIDRFluent fluent) { - this(fluent, false); - } - public V1alpha1ClusterCIDRBuilder(V1alpha1ClusterCIDRFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ClusterCIDR(), validationEnabled); + this(fluent, new V1alpha1ClusterCIDR()); } + public V1alpha1ClusterCIDRBuilder(V1alpha1ClusterCIDRFluent fluent,V1alpha1ClusterCIDR instance) { - this(fluent, instance, false); - } - public V1alpha1ClusterCIDRBuilder(V1alpha1ClusterCIDRFluent fluent,V1alpha1ClusterCIDR instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ClusterCIDRBuilder(V1alpha1ClusterCIDR instance) { - this(instance,false); - } - public V1alpha1ClusterCIDRBuilder(V1alpha1ClusterCIDR instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ClusterCIDRFluent fluent; - Boolean validationEnabled; + public V1alpha1ClusterCIDR build() { V1alpha1ClusterCIDR buildable = new V1alpha1ClusterCIDR(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRFluent.java index 022ef1205f..d27b2de536 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha1ClusterCIDRFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha1ClusterCIDRFluent.MetadataNested withNewMetadata(); - public V1alpha1ClusterCIDRFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha1ClusterCIDRFluent.MetadataNested editMetadata(); - public V1alpha1ClusterCIDRFluent.MetadataNested editOrNewMetadata(); - public V1alpha1ClusterCIDRFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ClusterCIDRSpec getSpec(); - public V1alpha1ClusterCIDRSpec buildSpec(); - public A withSpec(V1alpha1ClusterCIDRSpec spec); - public Boolean hasSpec(); - public V1alpha1ClusterCIDRFluent.SpecNested withNewSpec(); - public V1alpha1ClusterCIDRFluent.SpecNested withNewSpecLike(V1alpha1ClusterCIDRSpec item); - public V1alpha1ClusterCIDRFluent.SpecNested editSpec(); - public V1alpha1ClusterCIDRFluent.SpecNested editOrNewSpec(); - public V1alpha1ClusterCIDRFluent.SpecNested editOrNewSpecLike(V1alpha1ClusterCIDRSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ClusterCIDRFluent> extends BaseFluent{ + public V1alpha1ClusterCIDRFluent() { + } + + public V1alpha1ClusterCIDRFluent(V1alpha1ClusterCIDR instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha1ClusterCIDRSpecBuilder spec; + + protected void copyInstance(V1alpha1ClusterCIDR instance) { + instance = (instance != null ? instance : new V1alpha1ClusterCIDR()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1alpha1ClusterCIDRSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha1ClusterCIDRSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1alpha1ClusterCIDRSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1alpha1ClusterCIDRSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1alpha1ClusterCIDRSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1alpha1ClusterCIDRSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1alpha1ClusterCIDRSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ClusterCIDRFluent that = (V1alpha1ClusterCIDRFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha1ClusterCIDRFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1alpha1ClusterCIDRSpecFluent> implements Nested{ + SpecNested(V1alpha1ClusterCIDRSpec item) { + this.builder = new V1alpha1ClusterCIDRSpecBuilder(this, item); + } + V1alpha1ClusterCIDRSpecBuilder builder; + + public N and() { + return (N) V1alpha1ClusterCIDRFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRFluentImpl.java deleted file mode 100644 index 072fdbccb5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ClusterCIDRFluentImpl> extends BaseFluent implements V1alpha1ClusterCIDRFluent{ - public V1alpha1ClusterCIDRFluentImpl() { - } - public V1alpha1ClusterCIDRFluentImpl(V1alpha1ClusterCIDR instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha1ClusterCIDRSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha1ClusterCIDRFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha1ClusterCIDRFluentImpl.MetadataNestedImpl(); - } - public V1alpha1ClusterCIDRFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha1ClusterCIDRFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1ClusterCIDRFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1ClusterCIDRFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha1ClusterCIDRFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ClusterCIDRSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1alpha1ClusterCIDRSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1alpha1ClusterCIDRSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1alpha1ClusterCIDRSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1alpha1ClusterCIDRFluentImpl.SpecNested withNewSpec() { - return new V1alpha1ClusterCIDRFluentImpl.SpecNestedImpl(); - } - public V1alpha1ClusterCIDRFluentImpl.SpecNested withNewSpecLike(V1alpha1ClusterCIDRSpec item) { - return new V1alpha1ClusterCIDRFluentImpl.SpecNestedImpl(item); - } - public V1alpha1ClusterCIDRFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1alpha1ClusterCIDRFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1alpha1ClusterCIDRSpecBuilder().build()); - } - public V1alpha1ClusterCIDRFluentImpl.SpecNested editOrNewSpecLike(V1alpha1ClusterCIDRSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ClusterCIDRFluentImpl that = (V1alpha1ClusterCIDRFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha1ClusterCIDRFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha1ClusterCIDRFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1alpha1ClusterCIDRSpecFluentImpl> implements V1alpha1ClusterCIDRFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1alpha1ClusterCIDRSpec item) { - this.builder = new V1alpha1ClusterCIDRSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1alpha1ClusterCIDRSpecBuilder(this); - } - V1alpha1ClusterCIDRSpecBuilder builder; - public N and() { - return (N) V1alpha1ClusterCIDRFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListBuilder.java index d2920e73da..f6f414e21f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ClusterCIDRListBuilder extends V1alpha1ClusterCIDRListFluentImpl implements VisitableBuilder{ +public class V1alpha1ClusterCIDRListBuilder extends V1alpha1ClusterCIDRListFluent implements VisitableBuilder{ public V1alpha1ClusterCIDRListBuilder() { - this(false); - } - public V1alpha1ClusterCIDRListBuilder(Boolean validationEnabled) { - this(new V1alpha1ClusterCIDRList(), validationEnabled); + this(new V1alpha1ClusterCIDRList()); } + public V1alpha1ClusterCIDRListBuilder(V1alpha1ClusterCIDRListFluent fluent) { - this(fluent, false); - } - public V1alpha1ClusterCIDRListBuilder(V1alpha1ClusterCIDRListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ClusterCIDRList(), validationEnabled); + this(fluent, new V1alpha1ClusterCIDRList()); } + public V1alpha1ClusterCIDRListBuilder(V1alpha1ClusterCIDRListFluent fluent,V1alpha1ClusterCIDRList instance) { - this(fluent, instance, false); - } - public V1alpha1ClusterCIDRListBuilder(V1alpha1ClusterCIDRListFluent fluent,V1alpha1ClusterCIDRList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ClusterCIDRListBuilder(V1alpha1ClusterCIDRList instance) { - this(instance,false); - } - public V1alpha1ClusterCIDRListBuilder(V1alpha1ClusterCIDRList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ClusterCIDRListFluent fluent; - Boolean validationEnabled; + public V1alpha1ClusterCIDRList build() { V1alpha1ClusterCIDRList buildable = new V1alpha1ClusterCIDRList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListFluent.java index da46c5e12d..fd7822f6b6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ClusterCIDRListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha1ClusterCIDR item); - public A setToItems(int index,V1alpha1ClusterCIDR item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ClusterCIDR... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ClusterCIDR... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha1ClusterCIDR buildItem(int index); - public V1alpha1ClusterCIDR buildFirstItem(); - public V1alpha1ClusterCIDR buildLastItem(); - public V1alpha1ClusterCIDR buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha1ClusterCIDR... items); - public Boolean hasItems(); - public V1alpha1ClusterCIDRListFluent.ItemsNested addNewItem(); - public V1alpha1ClusterCIDRListFluent.ItemsNested addNewItemLike(V1alpha1ClusterCIDR item); - public V1alpha1ClusterCIDRListFluent.ItemsNested setNewItemLike(int index,V1alpha1ClusterCIDR item); - public V1alpha1ClusterCIDRListFluent.ItemsNested editItem(int index); - public V1alpha1ClusterCIDRListFluent.ItemsNested editFirstItem(); - public V1alpha1ClusterCIDRListFluent.ItemsNested editLastItem(); - public V1alpha1ClusterCIDRListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha1ClusterCIDRListFluent.MetadataNested withNewMetadata(); - public V1alpha1ClusterCIDRListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha1ClusterCIDRListFluent.MetadataNested editMetadata(); - public V1alpha1ClusterCIDRListFluent.MetadataNested editOrNewMetadata(); - public V1alpha1ClusterCIDRListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha1ClusterCIDRFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ClusterCIDRListFluent> extends BaseFluent{ + public V1alpha1ClusterCIDRListFluent() { + } + + public V1alpha1ClusterCIDRListFluent(V1alpha1ClusterCIDRList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha1ClusterCIDRList instance) { + instance = (instance != null ? instance : new V1alpha1ClusterCIDRList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha1ClusterCIDR item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha1ClusterCIDR item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ClusterCIDR... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1ClusterCIDR item : items) {V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1ClusterCIDR item : items) {V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ClusterCIDR... items) { + if (this.items == null) return (A)this; + for (V1alpha1ClusterCIDR item : items) {V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha1ClusterCIDR item : items) {V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha1ClusterCIDRBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha1ClusterCIDR buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha1ClusterCIDR buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha1ClusterCIDR buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha1ClusterCIDR buildMatchingItem(Predicate predicate) { + for (V1alpha1ClusterCIDRBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha1ClusterCIDRBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha1ClusterCIDR item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha1ClusterCIDR... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha1ClusterCIDR item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha1ClusterCIDR item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha1ClusterCIDR item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ClusterCIDRListFluent that = (V1alpha1ClusterCIDRListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha1ClusterCIDRFluent> implements Nested{ + ItemsNested(int index,V1alpha1ClusterCIDR item) { + this.index = index; + this.builder = new V1alpha1ClusterCIDRBuilder(this, item); + } + V1alpha1ClusterCIDRBuilder builder; + int index; + public N and() { + return (N) V1alpha1ClusterCIDRListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha1ClusterCIDRListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListFluentImpl.java deleted file mode 100644 index ad30966a40..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ClusterCIDRListFluentImpl> extends BaseFluent implements V1alpha1ClusterCIDRListFluent{ - public V1alpha1ClusterCIDRListFluentImpl() { - } - public V1alpha1ClusterCIDRListFluentImpl(V1alpha1ClusterCIDRList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha1ClusterCIDR item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha1ClusterCIDR item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ClusterCIDR... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1ClusterCIDR item : items) {V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1ClusterCIDR item : items) {V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ClusterCIDR... items) { - for (V1alpha1ClusterCIDR item : items) {V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha1ClusterCIDR item : items) {V1alpha1ClusterCIDRBuilder builder = new V1alpha1ClusterCIDRBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha1ClusterCIDRBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha1ClusterCIDR buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha1ClusterCIDR buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha1ClusterCIDR buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha1ClusterCIDR buildMatchingItem(Predicate predicate) { - for (V1alpha1ClusterCIDRBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha1ClusterCIDRBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha1ClusterCIDR item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha1ClusterCIDR... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha1ClusterCIDR item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha1ClusterCIDRListFluentImpl.ItemsNested addNewItem() { - return new V1alpha1ClusterCIDRListFluentImpl.ItemsNestedImpl(); - } - public V1alpha1ClusterCIDRListFluentImpl.ItemsNested addNewItemLike(V1alpha1ClusterCIDR item) { - return new V1alpha1ClusterCIDRListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha1ClusterCIDRListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha1ClusterCIDR item) { - return new V1alpha1ClusterCIDRListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha1ClusterCIDRListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1ClusterCIDRListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha1ClusterCIDRListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1ClusterCIDRListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha1ClusterCIDRListFluentImpl.MetadataNestedImpl(); - } - public V1alpha1ClusterCIDRListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha1ClusterCIDRListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1ClusterCIDRListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1ClusterCIDRListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha1ClusterCIDRListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ClusterCIDRListFluentImpl that = (V1alpha1ClusterCIDRListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha1ClusterCIDRFluentImpl> implements V1alpha1ClusterCIDRListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha1ClusterCIDR item) { - this.index = index; - this.builder = new V1alpha1ClusterCIDRBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1ClusterCIDRBuilder(this); - } - V1alpha1ClusterCIDRBuilder builder; - int index; - public N and() { - return (N) V1alpha1ClusterCIDRListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha1ClusterCIDRListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha1ClusterCIDRListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecBuilder.java index 144bf6001d..282c6d7986 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ClusterCIDRSpecBuilder extends V1alpha1ClusterCIDRSpecFluentImpl implements VisitableBuilder{ +public class V1alpha1ClusterCIDRSpecBuilder extends V1alpha1ClusterCIDRSpecFluent implements VisitableBuilder{ public V1alpha1ClusterCIDRSpecBuilder() { - this(false); - } - public V1alpha1ClusterCIDRSpecBuilder(Boolean validationEnabled) { - this(new V1alpha1ClusterCIDRSpec(), validationEnabled); + this(new V1alpha1ClusterCIDRSpec()); } + public V1alpha1ClusterCIDRSpecBuilder(V1alpha1ClusterCIDRSpecFluent fluent) { - this(fluent, false); - } - public V1alpha1ClusterCIDRSpecBuilder(V1alpha1ClusterCIDRSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ClusterCIDRSpec(), validationEnabled); + this(fluent, new V1alpha1ClusterCIDRSpec()); } + public V1alpha1ClusterCIDRSpecBuilder(V1alpha1ClusterCIDRSpecFluent fluent,V1alpha1ClusterCIDRSpec instance) { - this(fluent, instance, false); - } - public V1alpha1ClusterCIDRSpecBuilder(V1alpha1ClusterCIDRSpecFluent fluent,V1alpha1ClusterCIDRSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withIpv4(instance.getIpv4()); - fluent.withIpv6(instance.getIpv6()); - fluent.withNodeSelector(instance.getNodeSelector()); - fluent.withPerNodeHostBits(instance.getPerNodeHostBits()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ClusterCIDRSpecBuilder(V1alpha1ClusterCIDRSpec instance) { - this(instance,false); - } - public V1alpha1ClusterCIDRSpecBuilder(V1alpha1ClusterCIDRSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withIpv4(instance.getIpv4()); - this.withIpv6(instance.getIpv6()); - this.withNodeSelector(instance.getNodeSelector()); - this.withPerNodeHostBits(instance.getPerNodeHostBits()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ClusterCIDRSpecFluent fluent; - Boolean validationEnabled; + public V1alpha1ClusterCIDRSpec build() { V1alpha1ClusterCIDRSpec buildable = new V1alpha1ClusterCIDRSpec(); buildable.setIpv4(fluent.getIpv4()); buildable.setIpv6(fluent.getIpv6()); - buildable.setNodeSelector(fluent.getNodeSelector()); + buildable.setNodeSelector(fluent.buildNodeSelector()); buildable.setPerNodeHostBits(fluent.getPerNodeHostBits()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecFluent.java index a432bd35c9..1f271246b8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecFluent.java @@ -1,45 +1,158 @@ package io.kubernetes.client.openapi.models; -import java.lang.Integer; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Boolean; +import java.lang.Integer; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha1ClusterCIDRSpecFluent> extends Fluent{ - public String getIpv4(); - public A withIpv4(String ipv4); - public Boolean hasIpv4(); - public String getIpv6(); - public A withIpv6(String ipv6); - public Boolean hasIpv6(); - - /** - * This method has been deprecated, please use method buildNodeSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelector getNodeSelector(); - public V1NodeSelector buildNodeSelector(); - public A withNodeSelector(V1NodeSelector nodeSelector); - public Boolean hasNodeSelector(); - public V1alpha1ClusterCIDRSpecFluent.NodeSelectorNested withNewNodeSelector(); - public V1alpha1ClusterCIDRSpecFluent.NodeSelectorNested withNewNodeSelectorLike(V1NodeSelector item); - public V1alpha1ClusterCIDRSpecFluent.NodeSelectorNested editNodeSelector(); - public V1alpha1ClusterCIDRSpecFluent.NodeSelectorNested editOrNewNodeSelector(); - public V1alpha1ClusterCIDRSpecFluent.NodeSelectorNested editOrNewNodeSelectorLike(V1NodeSelector item); - public Integer getPerNodeHostBits(); - public A withPerNodeHostBits(Integer perNodeHostBits); - public Boolean hasPerNodeHostBits(); - public interface NodeSelectorNested extends Nested,V1NodeSelectorFluent>{ - public N and(); - public N endNodeSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ClusterCIDRSpecFluent> extends BaseFluent{ + public V1alpha1ClusterCIDRSpecFluent() { + } + + public V1alpha1ClusterCIDRSpecFluent(V1alpha1ClusterCIDRSpec instance) { + this.copyInstance(instance); + } + private String ipv4; + private String ipv6; + private V1NodeSelectorBuilder nodeSelector; + private Integer perNodeHostBits; + + protected void copyInstance(V1alpha1ClusterCIDRSpec instance) { + instance = (instance != null ? instance : new V1alpha1ClusterCIDRSpec()); + if (instance != null) { + this.withIpv4(instance.getIpv4()); + this.withIpv6(instance.getIpv6()); + this.withNodeSelector(instance.getNodeSelector()); + this.withPerNodeHostBits(instance.getPerNodeHostBits()); + } + } + + public String getIpv4() { + return this.ipv4; + } + + public A withIpv4(String ipv4) { + this.ipv4 = ipv4; + return (A) this; + } + + public boolean hasIpv4() { + return this.ipv4 != null; + } + + public String getIpv6() { + return this.ipv6; + } + + public A withIpv6(String ipv6) { + this.ipv6 = ipv6; + return (A) this; + } + + public boolean hasIpv6() { + return this.ipv6 != null; + } + + public V1NodeSelector buildNodeSelector() { + return this.nodeSelector != null ? this.nodeSelector.build() : null; + } + + public A withNodeSelector(V1NodeSelector nodeSelector) { + this._visitables.remove("nodeSelector"); + if (nodeSelector != null) { + this.nodeSelector = new V1NodeSelectorBuilder(nodeSelector); + this._visitables.get("nodeSelector").add(this.nodeSelector); + } else { + this.nodeSelector = null; + this._visitables.get("nodeSelector").remove(this.nodeSelector); + } + return (A) this; + } + + public boolean hasNodeSelector() { + return this.nodeSelector != null; + } + + public NodeSelectorNested withNewNodeSelector() { + return new NodeSelectorNested(null); + } + + public NodeSelectorNested withNewNodeSelectorLike(V1NodeSelector item) { + return new NodeSelectorNested(item); + } + + public NodeSelectorNested editNodeSelector() { + return withNewNodeSelectorLike(java.util.Optional.ofNullable(buildNodeSelector()).orElse(null)); + } + + public NodeSelectorNested editOrNewNodeSelector() { + return withNewNodeSelectorLike(java.util.Optional.ofNullable(buildNodeSelector()).orElse(new V1NodeSelectorBuilder().build())); + } + + public NodeSelectorNested editOrNewNodeSelectorLike(V1NodeSelector item) { + return withNewNodeSelectorLike(java.util.Optional.ofNullable(buildNodeSelector()).orElse(item)); + } + + public Integer getPerNodeHostBits() { + return this.perNodeHostBits; + } + + public A withPerNodeHostBits(Integer perNodeHostBits) { + this.perNodeHostBits = perNodeHostBits; + return (A) this; } + public boolean hasPerNodeHostBits() { + return this.perNodeHostBits != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ClusterCIDRSpecFluent that = (V1alpha1ClusterCIDRSpecFluent) o; + if (!java.util.Objects.equals(ipv4, that.ipv4)) return false; + if (!java.util.Objects.equals(ipv6, that.ipv6)) return false; + if (!java.util.Objects.equals(nodeSelector, that.nodeSelector)) return false; + if (!java.util.Objects.equals(perNodeHostBits, that.perNodeHostBits)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(ipv4, ipv6, nodeSelector, perNodeHostBits, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (ipv4 != null) { sb.append("ipv4:"); sb.append(ipv4 + ","); } + if (ipv6 != null) { sb.append("ipv6:"); sb.append(ipv6 + ","); } + if (nodeSelector != null) { sb.append("nodeSelector:"); sb.append(nodeSelector + ","); } + if (perNodeHostBits != null) { sb.append("perNodeHostBits:"); sb.append(perNodeHostBits); } + sb.append("}"); + return sb.toString(); + } + public class NodeSelectorNested extends V1NodeSelectorFluent> implements Nested{ + NodeSelectorNested(V1NodeSelector item) { + this.builder = new V1NodeSelectorBuilder(this, item); + } + V1NodeSelectorBuilder builder; + + public N and() { + return (N) V1alpha1ClusterCIDRSpecFluent.this.withNodeSelector(builder.build()); + } + + public N endNodeSelector() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecFluentImpl.java deleted file mode 100644 index 72ceb04373..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpecFluentImpl.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ClusterCIDRSpecFluentImpl> extends BaseFluent implements V1alpha1ClusterCIDRSpecFluent{ - public V1alpha1ClusterCIDRSpecFluentImpl() { - } - public V1alpha1ClusterCIDRSpecFluentImpl(V1alpha1ClusterCIDRSpec instance) { - if (instance != null) { - this.withIpv4(instance.getIpv4()); - this.withIpv6(instance.getIpv6()); - this.withNodeSelector(instance.getNodeSelector()); - this.withPerNodeHostBits(instance.getPerNodeHostBits()); - } - } - private String ipv4; - private String ipv6; - private V1NodeSelectorBuilder nodeSelector; - private Integer perNodeHostBits; - public String getIpv4() { - return this.ipv4; - } - public A withIpv4(String ipv4) { - this.ipv4=ipv4; return (A) this; - } - public Boolean hasIpv4() { - return this.ipv4 != null; - } - public String getIpv6() { - return this.ipv6; - } - public A withIpv6(String ipv6) { - this.ipv6=ipv6; return (A) this; - } - public Boolean hasIpv6() { - return this.ipv6 != null; - } - - /** - * This method has been deprecated, please use method buildNodeSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelector getNodeSelector() { - return this.nodeSelector!=null ?this.nodeSelector.build():null; - } - public V1NodeSelector buildNodeSelector() { - return this.nodeSelector!=null ?this.nodeSelector.build():null; - } - public A withNodeSelector(V1NodeSelector nodeSelector) { - _visitables.get("nodeSelector").remove(this.nodeSelector); - if (nodeSelector!=null){ this.nodeSelector= new V1NodeSelectorBuilder(nodeSelector); _visitables.get("nodeSelector").add(this.nodeSelector);} else { this.nodeSelector = null; _visitables.get("nodeSelector").remove(this.nodeSelector); } return (A) this; - } - public Boolean hasNodeSelector() { - return this.nodeSelector != null; - } - public V1alpha1ClusterCIDRSpecFluentImpl.NodeSelectorNested withNewNodeSelector() { - return new V1alpha1ClusterCIDRSpecFluentImpl.NodeSelectorNestedImpl(); - } - public V1alpha1ClusterCIDRSpecFluentImpl.NodeSelectorNested withNewNodeSelectorLike(V1NodeSelector item) { - return new V1alpha1ClusterCIDRSpecFluentImpl.NodeSelectorNestedImpl(item); - } - public V1alpha1ClusterCIDRSpecFluentImpl.NodeSelectorNested editNodeSelector() { - return withNewNodeSelectorLike(getNodeSelector()); - } - public V1alpha1ClusterCIDRSpecFluentImpl.NodeSelectorNested editOrNewNodeSelector() { - return withNewNodeSelectorLike(getNodeSelector() != null ? getNodeSelector(): new V1NodeSelectorBuilder().build()); - } - public V1alpha1ClusterCIDRSpecFluentImpl.NodeSelectorNested editOrNewNodeSelectorLike(V1NodeSelector item) { - return withNewNodeSelectorLike(getNodeSelector() != null ? getNodeSelector(): item); - } - public Integer getPerNodeHostBits() { - return this.perNodeHostBits; - } - public A withPerNodeHostBits(Integer perNodeHostBits) { - this.perNodeHostBits=perNodeHostBits; return (A) this; - } - public Boolean hasPerNodeHostBits() { - return this.perNodeHostBits != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ClusterCIDRSpecFluentImpl that = (V1alpha1ClusterCIDRSpecFluentImpl) o; - if (!java.util.Objects.equals(ipv4, that.ipv4)) return false; - - if (!java.util.Objects.equals(ipv6, that.ipv6)) return false; - - if (!java.util.Objects.equals(nodeSelector, that.nodeSelector)) return false; - - if (!java.util.Objects.equals(perNodeHostBits, that.perNodeHostBits)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(ipv4, ipv6, nodeSelector, perNodeHostBits, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (ipv4 != null) { sb.append("ipv4:"); sb.append(ipv4 + ","); } - if (ipv6 != null) { sb.append("ipv6:"); sb.append(ipv6 + ","); } - if (nodeSelector != null) { sb.append("nodeSelector:"); sb.append(nodeSelector + ","); } - if (perNodeHostBits != null) { sb.append("perNodeHostBits:"); sb.append(perNodeHostBits); } - sb.append("}"); - return sb.toString(); - } - class NodeSelectorNestedImpl extends V1NodeSelectorFluentImpl> implements V1alpha1ClusterCIDRSpecFluentImpl.NodeSelectorNested,Nested{ - NodeSelectorNestedImpl(V1NodeSelector item) { - this.builder = new V1NodeSelectorBuilder(this, item); - } - NodeSelectorNestedImpl() { - this.builder = new V1NodeSelectorBuilder(this); - } - V1NodeSelectorBuilder builder; - public N and() { - return (N) V1alpha1ClusterCIDRSpecFluentImpl.this.withNodeSelector(builder.build()); - } - public N endNodeSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleBuilder.java index a97707f656..fb59a9957f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ClusterTrustBundleBuilder extends V1alpha1ClusterTrustBundleFluentImpl implements VisitableBuilder{ +public class V1alpha1ClusterTrustBundleBuilder extends V1alpha1ClusterTrustBundleFluent implements VisitableBuilder{ public V1alpha1ClusterTrustBundleBuilder() { - this(false); - } - public V1alpha1ClusterTrustBundleBuilder(Boolean validationEnabled) { - this(new V1alpha1ClusterTrustBundle(), validationEnabled); + this(new V1alpha1ClusterTrustBundle()); } + public V1alpha1ClusterTrustBundleBuilder(V1alpha1ClusterTrustBundleFluent fluent) { - this(fluent, false); - } - public V1alpha1ClusterTrustBundleBuilder(V1alpha1ClusterTrustBundleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ClusterTrustBundle(), validationEnabled); + this(fluent, new V1alpha1ClusterTrustBundle()); } + public V1alpha1ClusterTrustBundleBuilder(V1alpha1ClusterTrustBundleFluent fluent,V1alpha1ClusterTrustBundle instance) { - this(fluent, instance, false); - } - public V1alpha1ClusterTrustBundleBuilder(V1alpha1ClusterTrustBundleFluent fluent,V1alpha1ClusterTrustBundle instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ClusterTrustBundleBuilder(V1alpha1ClusterTrustBundle instance) { - this(instance,false); - } - public V1alpha1ClusterTrustBundleBuilder(V1alpha1ClusterTrustBundle instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ClusterTrustBundleFluent fluent; - Boolean validationEnabled; + public V1alpha1ClusterTrustBundle build() { V1alpha1ClusterTrustBundle buildable = new V1alpha1ClusterTrustBundle(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleFluent.java index b8556c6eaf..6f1db345a4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha1ClusterTrustBundleFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha1ClusterTrustBundleFluent.MetadataNested withNewMetadata(); - public V1alpha1ClusterTrustBundleFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha1ClusterTrustBundleFluent.MetadataNested editMetadata(); - public V1alpha1ClusterTrustBundleFluent.MetadataNested editOrNewMetadata(); - public V1alpha1ClusterTrustBundleFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ClusterTrustBundleSpec getSpec(); - public V1alpha1ClusterTrustBundleSpec buildSpec(); - public A withSpec(V1alpha1ClusterTrustBundleSpec spec); - public Boolean hasSpec(); - public V1alpha1ClusterTrustBundleFluent.SpecNested withNewSpec(); - public V1alpha1ClusterTrustBundleFluent.SpecNested withNewSpecLike(V1alpha1ClusterTrustBundleSpec item); - public V1alpha1ClusterTrustBundleFluent.SpecNested editSpec(); - public V1alpha1ClusterTrustBundleFluent.SpecNested editOrNewSpec(); - public V1alpha1ClusterTrustBundleFluent.SpecNested editOrNewSpecLike(V1alpha1ClusterTrustBundleSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ClusterTrustBundleFluent> extends BaseFluent{ + public V1alpha1ClusterTrustBundleFluent() { + } + + public V1alpha1ClusterTrustBundleFluent(V1alpha1ClusterTrustBundle instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha1ClusterTrustBundleSpecBuilder spec; + + protected void copyInstance(V1alpha1ClusterTrustBundle instance) { + instance = (instance != null ? instance : new V1alpha1ClusterTrustBundle()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1alpha1ClusterTrustBundleSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha1ClusterTrustBundleSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1alpha1ClusterTrustBundleSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1alpha1ClusterTrustBundleSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1alpha1ClusterTrustBundleSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1alpha1ClusterTrustBundleSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1alpha1ClusterTrustBundleSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ClusterTrustBundleFluent that = (V1alpha1ClusterTrustBundleFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha1ClusterTrustBundleFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1alpha1ClusterTrustBundleSpecFluent> implements Nested{ + SpecNested(V1alpha1ClusterTrustBundleSpec item) { + this.builder = new V1alpha1ClusterTrustBundleSpecBuilder(this, item); + } + V1alpha1ClusterTrustBundleSpecBuilder builder; + + public N and() { + return (N) V1alpha1ClusterTrustBundleFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleFluentImpl.java deleted file mode 100644 index 51b2c37300..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ClusterTrustBundleFluentImpl> extends BaseFluent implements V1alpha1ClusterTrustBundleFluent{ - public V1alpha1ClusterTrustBundleFluentImpl() { - } - public V1alpha1ClusterTrustBundleFluentImpl(V1alpha1ClusterTrustBundle instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha1ClusterTrustBundleSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha1ClusterTrustBundleFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha1ClusterTrustBundleFluentImpl.MetadataNestedImpl(); - } - public V1alpha1ClusterTrustBundleFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha1ClusterTrustBundleFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1ClusterTrustBundleFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1ClusterTrustBundleFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha1ClusterTrustBundleFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ClusterTrustBundleSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1alpha1ClusterTrustBundleSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1alpha1ClusterTrustBundleSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1alpha1ClusterTrustBundleSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1alpha1ClusterTrustBundleFluentImpl.SpecNested withNewSpec() { - return new V1alpha1ClusterTrustBundleFluentImpl.SpecNestedImpl(); - } - public V1alpha1ClusterTrustBundleFluentImpl.SpecNested withNewSpecLike(V1alpha1ClusterTrustBundleSpec item) { - return new V1alpha1ClusterTrustBundleFluentImpl.SpecNestedImpl(item); - } - public V1alpha1ClusterTrustBundleFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1alpha1ClusterTrustBundleFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1alpha1ClusterTrustBundleSpecBuilder().build()); - } - public V1alpha1ClusterTrustBundleFluentImpl.SpecNested editOrNewSpecLike(V1alpha1ClusterTrustBundleSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ClusterTrustBundleFluentImpl that = (V1alpha1ClusterTrustBundleFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha1ClusterTrustBundleFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha1ClusterTrustBundleFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1alpha1ClusterTrustBundleSpecFluentImpl> implements V1alpha1ClusterTrustBundleFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1alpha1ClusterTrustBundleSpec item) { - this.builder = new V1alpha1ClusterTrustBundleSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1alpha1ClusterTrustBundleSpecBuilder(this); - } - V1alpha1ClusterTrustBundleSpecBuilder builder; - public N and() { - return (N) V1alpha1ClusterTrustBundleFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListBuilder.java index 073bb72522..f9c8e08d34 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ClusterTrustBundleListBuilder extends V1alpha1ClusterTrustBundleListFluentImpl implements VisitableBuilder{ +public class V1alpha1ClusterTrustBundleListBuilder extends V1alpha1ClusterTrustBundleListFluent implements VisitableBuilder{ public V1alpha1ClusterTrustBundleListBuilder() { - this(false); - } - public V1alpha1ClusterTrustBundleListBuilder(Boolean validationEnabled) { - this(new V1alpha1ClusterTrustBundleList(), validationEnabled); + this(new V1alpha1ClusterTrustBundleList()); } + public V1alpha1ClusterTrustBundleListBuilder(V1alpha1ClusterTrustBundleListFluent fluent) { - this(fluent, false); - } - public V1alpha1ClusterTrustBundleListBuilder(V1alpha1ClusterTrustBundleListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ClusterTrustBundleList(), validationEnabled); + this(fluent, new V1alpha1ClusterTrustBundleList()); } + public V1alpha1ClusterTrustBundleListBuilder(V1alpha1ClusterTrustBundleListFluent fluent,V1alpha1ClusterTrustBundleList instance) { - this(fluent, instance, false); - } - public V1alpha1ClusterTrustBundleListBuilder(V1alpha1ClusterTrustBundleListFluent fluent,V1alpha1ClusterTrustBundleList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ClusterTrustBundleListBuilder(V1alpha1ClusterTrustBundleList instance) { - this(instance,false); - } - public V1alpha1ClusterTrustBundleListBuilder(V1alpha1ClusterTrustBundleList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ClusterTrustBundleListFluent fluent; - Boolean validationEnabled; + public V1alpha1ClusterTrustBundleList build() { V1alpha1ClusterTrustBundleList buildable = new V1alpha1ClusterTrustBundleList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListFluent.java index 465f976da2..b0c02ee941 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ClusterTrustBundleListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha1ClusterTrustBundle item); - public A setToItems(int index,V1alpha1ClusterTrustBundle item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha1ClusterTrustBundle buildItem(int index); - public V1alpha1ClusterTrustBundle buildFirstItem(); - public V1alpha1ClusterTrustBundle buildLastItem(); - public V1alpha1ClusterTrustBundle buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle... items); - public Boolean hasItems(); - public V1alpha1ClusterTrustBundleListFluent.ItemsNested addNewItem(); - public V1alpha1ClusterTrustBundleListFluent.ItemsNested addNewItemLike(V1alpha1ClusterTrustBundle item); - public V1alpha1ClusterTrustBundleListFluent.ItemsNested setNewItemLike(int index,V1alpha1ClusterTrustBundle item); - public V1alpha1ClusterTrustBundleListFluent.ItemsNested editItem(int index); - public V1alpha1ClusterTrustBundleListFluent.ItemsNested editFirstItem(); - public V1alpha1ClusterTrustBundleListFluent.ItemsNested editLastItem(); - public V1alpha1ClusterTrustBundleListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha1ClusterTrustBundleListFluent.MetadataNested withNewMetadata(); - public V1alpha1ClusterTrustBundleListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha1ClusterTrustBundleListFluent.MetadataNested editMetadata(); - public V1alpha1ClusterTrustBundleListFluent.MetadataNested editOrNewMetadata(); - public V1alpha1ClusterTrustBundleListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha1ClusterTrustBundleFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ClusterTrustBundleListFluent> extends BaseFluent{ + public V1alpha1ClusterTrustBundleListFluent() { + } + + public V1alpha1ClusterTrustBundleListFluent(V1alpha1ClusterTrustBundleList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha1ClusterTrustBundleList instance) { + instance = (instance != null ? instance : new V1alpha1ClusterTrustBundleList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha1ClusterTrustBundle item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha1ClusterTrustBundle item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1ClusterTrustBundle item : items) {V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1ClusterTrustBundle item : items) {V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle... items) { + if (this.items == null) return (A)this; + for (V1alpha1ClusterTrustBundle item : items) {V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha1ClusterTrustBundle item : items) {V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha1ClusterTrustBundleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha1ClusterTrustBundle buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha1ClusterTrustBundle buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha1ClusterTrustBundle buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha1ClusterTrustBundle buildMatchingItem(Predicate predicate) { + for (V1alpha1ClusterTrustBundleBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha1ClusterTrustBundleBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha1ClusterTrustBundle item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha1ClusterTrustBundle item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha1ClusterTrustBundle item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha1ClusterTrustBundle item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ClusterTrustBundleListFluent that = (V1alpha1ClusterTrustBundleListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha1ClusterTrustBundleFluent> implements Nested{ + ItemsNested(int index,V1alpha1ClusterTrustBundle item) { + this.index = index; + this.builder = new V1alpha1ClusterTrustBundleBuilder(this, item); + } + V1alpha1ClusterTrustBundleBuilder builder; + int index; + public N and() { + return (N) V1alpha1ClusterTrustBundleListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha1ClusterTrustBundleListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListFluentImpl.java deleted file mode 100644 index f112db4a76..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ClusterTrustBundleListFluentImpl> extends BaseFluent implements V1alpha1ClusterTrustBundleListFluent{ - public V1alpha1ClusterTrustBundleListFluentImpl() { - } - public V1alpha1ClusterTrustBundleListFluentImpl(V1alpha1ClusterTrustBundleList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha1ClusterTrustBundle item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha1ClusterTrustBundle item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1ClusterTrustBundle item : items) {V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1ClusterTrustBundle item : items) {V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle... items) { - for (V1alpha1ClusterTrustBundle item : items) {V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha1ClusterTrustBundle item : items) {V1alpha1ClusterTrustBundleBuilder builder = new V1alpha1ClusterTrustBundleBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha1ClusterTrustBundleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha1ClusterTrustBundle buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha1ClusterTrustBundle buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha1ClusterTrustBundle buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha1ClusterTrustBundle buildMatchingItem(Predicate predicate) { - for (V1alpha1ClusterTrustBundleBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha1ClusterTrustBundleBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha1ClusterTrustBundle item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha1ClusterTrustBundle... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha1ClusterTrustBundle item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha1ClusterTrustBundleListFluentImpl.ItemsNested addNewItem() { - return new V1alpha1ClusterTrustBundleListFluentImpl.ItemsNestedImpl(); - } - public V1alpha1ClusterTrustBundleListFluentImpl.ItemsNested addNewItemLike(V1alpha1ClusterTrustBundle item) { - return new V1alpha1ClusterTrustBundleListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha1ClusterTrustBundleListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha1ClusterTrustBundle item) { - return new V1alpha1ClusterTrustBundleListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha1ClusterTrustBundleListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1ClusterTrustBundleListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha1ClusterTrustBundleListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1ClusterTrustBundleListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha1ClusterTrustBundleListFluentImpl.MetadataNestedImpl(); - } - public V1alpha1ClusterTrustBundleListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha1ClusterTrustBundleListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1ClusterTrustBundleListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1ClusterTrustBundleListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha1ClusterTrustBundleListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ClusterTrustBundleListFluentImpl that = (V1alpha1ClusterTrustBundleListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha1ClusterTrustBundleFluentImpl> implements V1alpha1ClusterTrustBundleListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha1ClusterTrustBundle item) { - this.index = index; - this.builder = new V1alpha1ClusterTrustBundleBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1ClusterTrustBundleBuilder(this); - } - V1alpha1ClusterTrustBundleBuilder builder; - int index; - public N and() { - return (N) V1alpha1ClusterTrustBundleListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha1ClusterTrustBundleListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha1ClusterTrustBundleListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecBuilder.java index 25a80a64c6..e76f3642c9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ClusterTrustBundleSpecBuilder extends V1alpha1ClusterTrustBundleSpecFluentImpl implements VisitableBuilder{ +public class V1alpha1ClusterTrustBundleSpecBuilder extends V1alpha1ClusterTrustBundleSpecFluent implements VisitableBuilder{ public V1alpha1ClusterTrustBundleSpecBuilder() { - this(false); - } - public V1alpha1ClusterTrustBundleSpecBuilder(Boolean validationEnabled) { - this(new V1alpha1ClusterTrustBundleSpec(), validationEnabled); + this(new V1alpha1ClusterTrustBundleSpec()); } + public V1alpha1ClusterTrustBundleSpecBuilder(V1alpha1ClusterTrustBundleSpecFluent fluent) { - this(fluent, false); - } - public V1alpha1ClusterTrustBundleSpecBuilder(V1alpha1ClusterTrustBundleSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ClusterTrustBundleSpec(), validationEnabled); + this(fluent, new V1alpha1ClusterTrustBundleSpec()); } + public V1alpha1ClusterTrustBundleSpecBuilder(V1alpha1ClusterTrustBundleSpecFluent fluent,V1alpha1ClusterTrustBundleSpec instance) { - this(fluent, instance, false); - } - public V1alpha1ClusterTrustBundleSpecBuilder(V1alpha1ClusterTrustBundleSpecFluent fluent,V1alpha1ClusterTrustBundleSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withSignerName(instance.getSignerName()); - fluent.withTrustBundle(instance.getTrustBundle()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ClusterTrustBundleSpecBuilder(V1alpha1ClusterTrustBundleSpec instance) { - this(instance,false); - } - public V1alpha1ClusterTrustBundleSpecBuilder(V1alpha1ClusterTrustBundleSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withSignerName(instance.getSignerName()); - this.withTrustBundle(instance.getTrustBundle()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ClusterTrustBundleSpecFluent fluent; - Boolean validationEnabled; + public V1alpha1ClusterTrustBundleSpec build() { V1alpha1ClusterTrustBundleSpec buildable = new V1alpha1ClusterTrustBundleSpec(); buildable.setSignerName(fluent.getSignerName()); @@ -46,4 +28,5 @@ public V1alpha1ClusterTrustBundleSpec build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecFluent.java index 9dae896c4f..82ad5ac4fd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ClusterTrustBundleSpecFluent> extends Fluent{ - public String getSignerName(); - public A withSignerName(String signerName); - public Boolean hasSignerName(); - public String getTrustBundle(); - public A withTrustBundle(String trustBundle); - public Boolean hasTrustBundle(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ClusterTrustBundleSpecFluent> extends BaseFluent{ + public V1alpha1ClusterTrustBundleSpecFluent() { + } + public V1alpha1ClusterTrustBundleSpecFluent(V1alpha1ClusterTrustBundleSpec instance) { + this.copyInstance(instance); + } + private String signerName; + private String trustBundle; + + protected void copyInstance(V1alpha1ClusterTrustBundleSpec instance) { + instance = (instance != null ? instance : new V1alpha1ClusterTrustBundleSpec()); + if (instance != null) { + this.withSignerName(instance.getSignerName()); + this.withTrustBundle(instance.getTrustBundle()); + } + } + + public String getSignerName() { + return this.signerName; + } + + public A withSignerName(String signerName) { + this.signerName = signerName; + return (A) this; + } + + public boolean hasSignerName() { + return this.signerName != null; + } + + public String getTrustBundle() { + return this.trustBundle; + } + + public A withTrustBundle(String trustBundle) { + this.trustBundle = trustBundle; + return (A) this; + } + + public boolean hasTrustBundle() { + return this.trustBundle != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ClusterTrustBundleSpecFluent that = (V1alpha1ClusterTrustBundleSpecFluent) o; + if (!java.util.Objects.equals(signerName, that.signerName)) return false; + if (!java.util.Objects.equals(trustBundle, that.trustBundle)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(signerName, trustBundle, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (signerName != null) { sb.append("signerName:"); sb.append(signerName + ","); } + if (trustBundle != null) { sb.append("trustBundle:"); sb.append(trustBundle); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecFluentImpl.java deleted file mode 100644 index d95911a1eb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterTrustBundleSpecFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ClusterTrustBundleSpecFluentImpl> extends BaseFluent implements V1alpha1ClusterTrustBundleSpecFluent{ - public V1alpha1ClusterTrustBundleSpecFluentImpl() { - } - public V1alpha1ClusterTrustBundleSpecFluentImpl(V1alpha1ClusterTrustBundleSpec instance) { - if (instance != null) { - this.withSignerName(instance.getSignerName()); - this.withTrustBundle(instance.getTrustBundle()); - } - } - private String signerName; - private String trustBundle; - public String getSignerName() { - return this.signerName; - } - public A withSignerName(String signerName) { - this.signerName=signerName; return (A) this; - } - public Boolean hasSignerName() { - return this.signerName != null; - } - public String getTrustBundle() { - return this.trustBundle; - } - public A withTrustBundle(String trustBundle) { - this.trustBundle=trustBundle; return (A) this; - } - public Boolean hasTrustBundle() { - return this.trustBundle != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ClusterTrustBundleSpecFluentImpl that = (V1alpha1ClusterTrustBundleSpecFluentImpl) o; - if (!java.util.Objects.equals(signerName, that.signerName)) return false; - - if (!java.util.Objects.equals(trustBundle, that.trustBundle)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(signerName, trustBundle, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (signerName != null) { sb.append("signerName:"); sb.append(signerName + ","); } - if (trustBundle != null) { sb.append("trustBundle:"); sb.append(trustBundle); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningBuilder.java index b46ee04841..a1bfaa9ca7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ExpressionWarningBuilder extends V1alpha1ExpressionWarningFluentImpl implements VisitableBuilder{ +public class V1alpha1ExpressionWarningBuilder extends V1alpha1ExpressionWarningFluent implements VisitableBuilder{ public V1alpha1ExpressionWarningBuilder() { - this(false); - } - public V1alpha1ExpressionWarningBuilder(Boolean validationEnabled) { - this(new V1alpha1ExpressionWarning(), validationEnabled); + this(new V1alpha1ExpressionWarning()); } + public V1alpha1ExpressionWarningBuilder(V1alpha1ExpressionWarningFluent fluent) { - this(fluent, false); - } - public V1alpha1ExpressionWarningBuilder(V1alpha1ExpressionWarningFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ExpressionWarning(), validationEnabled); + this(fluent, new V1alpha1ExpressionWarning()); } + public V1alpha1ExpressionWarningBuilder(V1alpha1ExpressionWarningFluent fluent,V1alpha1ExpressionWarning instance) { - this(fluent, instance, false); - } - public V1alpha1ExpressionWarningBuilder(V1alpha1ExpressionWarningFluent fluent,V1alpha1ExpressionWarning instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withFieldRef(instance.getFieldRef()); - fluent.withWarning(instance.getWarning()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ExpressionWarningBuilder(V1alpha1ExpressionWarning instance) { - this(instance,false); - } - public V1alpha1ExpressionWarningBuilder(V1alpha1ExpressionWarning instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withFieldRef(instance.getFieldRef()); - this.withWarning(instance.getWarning()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ExpressionWarningFluent fluent; - Boolean validationEnabled; + public V1alpha1ExpressionWarning build() { V1alpha1ExpressionWarning buildable = new V1alpha1ExpressionWarning(); buildable.setFieldRef(fluent.getFieldRef()); @@ -46,4 +28,5 @@ public V1alpha1ExpressionWarning build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningFluent.java index c5f2d89046..e06b5edc6f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ExpressionWarningFluent> extends Fluent{ - public String getFieldRef(); - public A withFieldRef(String fieldRef); - public Boolean hasFieldRef(); - public String getWarning(); - public A withWarning(String warning); - public Boolean hasWarning(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ExpressionWarningFluent> extends BaseFluent{ + public V1alpha1ExpressionWarningFluent() { + } + public V1alpha1ExpressionWarningFluent(V1alpha1ExpressionWarning instance) { + this.copyInstance(instance); + } + private String fieldRef; + private String warning; + + protected void copyInstance(V1alpha1ExpressionWarning instance) { + instance = (instance != null ? instance : new V1alpha1ExpressionWarning()); + if (instance != null) { + this.withFieldRef(instance.getFieldRef()); + this.withWarning(instance.getWarning()); + } + } + + public String getFieldRef() { + return this.fieldRef; + } + + public A withFieldRef(String fieldRef) { + this.fieldRef = fieldRef; + return (A) this; + } + + public boolean hasFieldRef() { + return this.fieldRef != null; + } + + public String getWarning() { + return this.warning; + } + + public A withWarning(String warning) { + this.warning = warning; + return (A) this; + } + + public boolean hasWarning() { + return this.warning != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ExpressionWarningFluent that = (V1alpha1ExpressionWarningFluent) o; + if (!java.util.Objects.equals(fieldRef, that.fieldRef)) return false; + if (!java.util.Objects.equals(warning, that.warning)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(fieldRef, warning, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (fieldRef != null) { sb.append("fieldRef:"); sb.append(fieldRef + ","); } + if (warning != null) { sb.append("warning:"); sb.append(warning); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressBuilder.java index 5fbbf17c29..98fc8275ab 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1IPAddressBuilder extends V1alpha1IPAddressFluentImpl implements VisitableBuilder{ +public class V1alpha1IPAddressBuilder extends V1alpha1IPAddressFluent implements VisitableBuilder{ public V1alpha1IPAddressBuilder() { - this(false); - } - public V1alpha1IPAddressBuilder(Boolean validationEnabled) { - this(new V1alpha1IPAddress(), validationEnabled); + this(new V1alpha1IPAddress()); } + public V1alpha1IPAddressBuilder(V1alpha1IPAddressFluent fluent) { - this(fluent, false); - } - public V1alpha1IPAddressBuilder(V1alpha1IPAddressFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1IPAddress(), validationEnabled); + this(fluent, new V1alpha1IPAddress()); } + public V1alpha1IPAddressBuilder(V1alpha1IPAddressFluent fluent,V1alpha1IPAddress instance) { - this(fluent, instance, false); - } - public V1alpha1IPAddressBuilder(V1alpha1IPAddressFluent fluent,V1alpha1IPAddress instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1IPAddressBuilder(V1alpha1IPAddress instance) { - this(instance,false); - } - public V1alpha1IPAddressBuilder(V1alpha1IPAddress instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1IPAddressFluent fluent; - Boolean validationEnabled; + public V1alpha1IPAddress build() { V1alpha1IPAddress buildable = new V1alpha1IPAddress(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressFluent.java index 35e253f9c3..8112f4e5f4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha1IPAddressFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha1IPAddressFluent.MetadataNested withNewMetadata(); - public V1alpha1IPAddressFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha1IPAddressFluent.MetadataNested editMetadata(); - public V1alpha1IPAddressFluent.MetadataNested editOrNewMetadata(); - public V1alpha1IPAddressFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1IPAddressSpec getSpec(); - public V1alpha1IPAddressSpec buildSpec(); - public A withSpec(V1alpha1IPAddressSpec spec); - public Boolean hasSpec(); - public V1alpha1IPAddressFluent.SpecNested withNewSpec(); - public V1alpha1IPAddressFluent.SpecNested withNewSpecLike(V1alpha1IPAddressSpec item); - public V1alpha1IPAddressFluent.SpecNested editSpec(); - public V1alpha1IPAddressFluent.SpecNested editOrNewSpec(); - public V1alpha1IPAddressFluent.SpecNested editOrNewSpecLike(V1alpha1IPAddressSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1IPAddressFluent> extends BaseFluent{ + public V1alpha1IPAddressFluent() { + } + + public V1alpha1IPAddressFluent(V1alpha1IPAddress instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha1IPAddressSpecBuilder spec; + + protected void copyInstance(V1alpha1IPAddress instance) { + instance = (instance != null ? instance : new V1alpha1IPAddress()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1alpha1IPAddressSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha1IPAddressSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1alpha1IPAddressSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1alpha1IPAddressSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1alpha1IPAddressSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1alpha1IPAddressSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1alpha1IPAddressSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1IPAddressFluent that = (V1alpha1IPAddressFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha1IPAddressFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1alpha1IPAddressSpecFluent> implements Nested{ + SpecNested(V1alpha1IPAddressSpec item) { + this.builder = new V1alpha1IPAddressSpecBuilder(this, item); + } + V1alpha1IPAddressSpecBuilder builder; + + public N and() { + return (N) V1alpha1IPAddressFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressFluentImpl.java deleted file mode 100644 index 188c6466d6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1IPAddressFluentImpl> extends BaseFluent implements V1alpha1IPAddressFluent{ - public V1alpha1IPAddressFluentImpl() { - } - public V1alpha1IPAddressFluentImpl(V1alpha1IPAddress instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha1IPAddressSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha1IPAddressFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha1IPAddressFluentImpl.MetadataNestedImpl(); - } - public V1alpha1IPAddressFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha1IPAddressFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1IPAddressFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1IPAddressFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha1IPAddressFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1IPAddressSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1alpha1IPAddressSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1alpha1IPAddressSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1alpha1IPAddressSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1alpha1IPAddressFluentImpl.SpecNested withNewSpec() { - return new V1alpha1IPAddressFluentImpl.SpecNestedImpl(); - } - public V1alpha1IPAddressFluentImpl.SpecNested withNewSpecLike(V1alpha1IPAddressSpec item) { - return new V1alpha1IPAddressFluentImpl.SpecNestedImpl(item); - } - public V1alpha1IPAddressFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1alpha1IPAddressFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1alpha1IPAddressSpecBuilder().build()); - } - public V1alpha1IPAddressFluentImpl.SpecNested editOrNewSpecLike(V1alpha1IPAddressSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1IPAddressFluentImpl that = (V1alpha1IPAddressFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha1IPAddressFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha1IPAddressFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1alpha1IPAddressSpecFluentImpl> implements V1alpha1IPAddressFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1alpha1IPAddressSpec item) { - this.builder = new V1alpha1IPAddressSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1alpha1IPAddressSpecBuilder(this); - } - V1alpha1IPAddressSpecBuilder builder; - public N and() { - return (N) V1alpha1IPAddressFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListBuilder.java index 36d021d932..c8805d6822 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1IPAddressListBuilder extends V1alpha1IPAddressListFluentImpl implements VisitableBuilder{ +public class V1alpha1IPAddressListBuilder extends V1alpha1IPAddressListFluent implements VisitableBuilder{ public V1alpha1IPAddressListBuilder() { - this(false); - } - public V1alpha1IPAddressListBuilder(Boolean validationEnabled) { - this(new V1alpha1IPAddressList(), validationEnabled); + this(new V1alpha1IPAddressList()); } + public V1alpha1IPAddressListBuilder(V1alpha1IPAddressListFluent fluent) { - this(fluent, false); - } - public V1alpha1IPAddressListBuilder(V1alpha1IPAddressListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1IPAddressList(), validationEnabled); + this(fluent, new V1alpha1IPAddressList()); } + public V1alpha1IPAddressListBuilder(V1alpha1IPAddressListFluent fluent,V1alpha1IPAddressList instance) { - this(fluent, instance, false); - } - public V1alpha1IPAddressListBuilder(V1alpha1IPAddressListFluent fluent,V1alpha1IPAddressList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1IPAddressListBuilder(V1alpha1IPAddressList instance) { - this(instance,false); - } - public V1alpha1IPAddressListBuilder(V1alpha1IPAddressList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1IPAddressListFluent fluent; - Boolean validationEnabled; + public V1alpha1IPAddressList build() { V1alpha1IPAddressList buildable = new V1alpha1IPAddressList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListFluent.java index 3db53e8877..27af33cc17 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1IPAddressListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha1IPAddress item); - public A setToItems(int index,V1alpha1IPAddress item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1IPAddress... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1IPAddress... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha1IPAddress buildItem(int index); - public V1alpha1IPAddress buildFirstItem(); - public V1alpha1IPAddress buildLastItem(); - public V1alpha1IPAddress buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha1IPAddress... items); - public Boolean hasItems(); - public V1alpha1IPAddressListFluent.ItemsNested addNewItem(); - public V1alpha1IPAddressListFluent.ItemsNested addNewItemLike(V1alpha1IPAddress item); - public V1alpha1IPAddressListFluent.ItemsNested setNewItemLike(int index,V1alpha1IPAddress item); - public V1alpha1IPAddressListFluent.ItemsNested editItem(int index); - public V1alpha1IPAddressListFluent.ItemsNested editFirstItem(); - public V1alpha1IPAddressListFluent.ItemsNested editLastItem(); - public V1alpha1IPAddressListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha1IPAddressListFluent.MetadataNested withNewMetadata(); - public V1alpha1IPAddressListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha1IPAddressListFluent.MetadataNested editMetadata(); - public V1alpha1IPAddressListFluent.MetadataNested editOrNewMetadata(); - public V1alpha1IPAddressListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha1IPAddressFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1IPAddressListFluent> extends BaseFluent{ + public V1alpha1IPAddressListFluent() { + } + + public V1alpha1IPAddressListFluent(V1alpha1IPAddressList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha1IPAddressList instance) { + instance = (instance != null ? instance : new V1alpha1IPAddressList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha1IPAddress item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha1IPAddress item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha1IPAddress... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1IPAddress item : items) {V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1IPAddress item : items) {V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1IPAddress... items) { + if (this.items == null) return (A)this; + for (V1alpha1IPAddress item : items) {V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha1IPAddress item : items) {V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha1IPAddressBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha1IPAddress buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha1IPAddress buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha1IPAddress buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha1IPAddress buildMatchingItem(Predicate predicate) { + for (V1alpha1IPAddressBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha1IPAddressBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha1IPAddress item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha1IPAddress... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha1IPAddress item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha1IPAddress item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha1IPAddress item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1IPAddressListFluent that = (V1alpha1IPAddressListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha1IPAddressFluent> implements Nested{ + ItemsNested(int index,V1alpha1IPAddress item) { + this.index = index; + this.builder = new V1alpha1IPAddressBuilder(this, item); + } + V1alpha1IPAddressBuilder builder; + int index; + public N and() { + return (N) V1alpha1IPAddressListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha1IPAddressListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListFluentImpl.java deleted file mode 100644 index 202db9033a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1IPAddressListFluentImpl> extends BaseFluent implements V1alpha1IPAddressListFluent{ - public V1alpha1IPAddressListFluentImpl() { - } - public V1alpha1IPAddressListFluentImpl(V1alpha1IPAddressList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha1IPAddress item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha1IPAddress item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1IPAddress... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1IPAddress item : items) {V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1IPAddress item : items) {V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1IPAddress... items) { - for (V1alpha1IPAddress item : items) {V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha1IPAddress item : items) {V1alpha1IPAddressBuilder builder = new V1alpha1IPAddressBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha1IPAddressBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha1IPAddress buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha1IPAddress buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha1IPAddress buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha1IPAddress buildMatchingItem(Predicate predicate) { - for (V1alpha1IPAddressBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha1IPAddressBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha1IPAddress item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha1IPAddress... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha1IPAddress item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha1IPAddressListFluentImpl.ItemsNested addNewItem() { - return new V1alpha1IPAddressListFluentImpl.ItemsNestedImpl(); - } - public V1alpha1IPAddressListFluentImpl.ItemsNested addNewItemLike(V1alpha1IPAddress item) { - return new V1alpha1IPAddressListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha1IPAddressListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha1IPAddress item) { - return new V1alpha1IPAddressListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha1IPAddressListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1IPAddressListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha1IPAddressListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1IPAddressListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha1IPAddressListFluentImpl.MetadataNestedImpl(); - } - public V1alpha1IPAddressListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha1IPAddressListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1IPAddressListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1IPAddressListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha1IPAddressListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1IPAddressListFluentImpl that = (V1alpha1IPAddressListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha1IPAddressFluentImpl> implements V1alpha1IPAddressListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha1IPAddress item) { - this.index = index; - this.builder = new V1alpha1IPAddressBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1IPAddressBuilder(this); - } - V1alpha1IPAddressBuilder builder; - int index; - public N and() { - return (N) V1alpha1IPAddressListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha1IPAddressListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha1IPAddressListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecBuilder.java index 03dfb7536e..623e17da6f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1IPAddressSpecBuilder extends V1alpha1IPAddressSpecFluentImpl implements VisitableBuilder{ +public class V1alpha1IPAddressSpecBuilder extends V1alpha1IPAddressSpecFluent implements VisitableBuilder{ public V1alpha1IPAddressSpecBuilder() { - this(false); - } - public V1alpha1IPAddressSpecBuilder(Boolean validationEnabled) { - this(new V1alpha1IPAddressSpec(), validationEnabled); + this(new V1alpha1IPAddressSpec()); } + public V1alpha1IPAddressSpecBuilder(V1alpha1IPAddressSpecFluent fluent) { - this(fluent, false); - } - public V1alpha1IPAddressSpecBuilder(V1alpha1IPAddressSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1IPAddressSpec(), validationEnabled); + this(fluent, new V1alpha1IPAddressSpec()); } + public V1alpha1IPAddressSpecBuilder(V1alpha1IPAddressSpecFluent fluent,V1alpha1IPAddressSpec instance) { - this(fluent, instance, false); - } - public V1alpha1IPAddressSpecBuilder(V1alpha1IPAddressSpecFluent fluent,V1alpha1IPAddressSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withParentRef(instance.getParentRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1IPAddressSpecBuilder(V1alpha1IPAddressSpec instance) { - this(instance,false); - } - public V1alpha1IPAddressSpecBuilder(V1alpha1IPAddressSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withParentRef(instance.getParentRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1IPAddressSpecFluent fluent; - Boolean validationEnabled; + public V1alpha1IPAddressSpec build() { V1alpha1IPAddressSpec buildable = new V1alpha1IPAddressSpec(); - buildable.setParentRef(fluent.getParentRef()); + buildable.setParentRef(fluent.buildParentRef()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecFluent.java index 126a08d880..99225ec1d6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1alpha1IPAddressSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildParentRef instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ParentReference getParentRef(); - public V1alpha1ParentReference buildParentRef(); - public A withParentRef(V1alpha1ParentReference parentRef); - public Boolean hasParentRef(); - public V1alpha1IPAddressSpecFluent.ParentRefNested withNewParentRef(); - public V1alpha1IPAddressSpecFluent.ParentRefNested withNewParentRefLike(V1alpha1ParentReference item); - public V1alpha1IPAddressSpecFluent.ParentRefNested editParentRef(); - public V1alpha1IPAddressSpecFluent.ParentRefNested editOrNewParentRef(); - public V1alpha1IPAddressSpecFluent.ParentRefNested editOrNewParentRefLike(V1alpha1ParentReference item); - public interface ParentRefNested extends Nested,V1alpha1ParentReferenceFluent>{ - public N and(); - public N endParentRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1IPAddressSpecFluent> extends BaseFluent{ + public V1alpha1IPAddressSpecFluent() { + } + + public V1alpha1IPAddressSpecFluent(V1alpha1IPAddressSpec instance) { + this.copyInstance(instance); + } + private V1alpha1ParentReferenceBuilder parentRef; + + protected void copyInstance(V1alpha1IPAddressSpec instance) { + instance = (instance != null ? instance : new V1alpha1IPAddressSpec()); + if (instance != null) { + this.withParentRef(instance.getParentRef()); + } + } + + public V1alpha1ParentReference buildParentRef() { + return this.parentRef != null ? this.parentRef.build() : null; + } + + public A withParentRef(V1alpha1ParentReference parentRef) { + this._visitables.remove("parentRef"); + if (parentRef != null) { + this.parentRef = new V1alpha1ParentReferenceBuilder(parentRef); + this._visitables.get("parentRef").add(this.parentRef); + } else { + this.parentRef = null; + this._visitables.get("parentRef").remove(this.parentRef); + } + return (A) this; + } + + public boolean hasParentRef() { + return this.parentRef != null; + } + + public ParentRefNested withNewParentRef() { + return new ParentRefNested(null); + } + + public ParentRefNested withNewParentRefLike(V1alpha1ParentReference item) { + return new ParentRefNested(item); + } + + public ParentRefNested editParentRef() { + return withNewParentRefLike(java.util.Optional.ofNullable(buildParentRef()).orElse(null)); + } + + public ParentRefNested editOrNewParentRef() { + return withNewParentRefLike(java.util.Optional.ofNullable(buildParentRef()).orElse(new V1alpha1ParentReferenceBuilder().build())); + } + + public ParentRefNested editOrNewParentRefLike(V1alpha1ParentReference item) { + return withNewParentRefLike(java.util.Optional.ofNullable(buildParentRef()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1IPAddressSpecFluent that = (V1alpha1IPAddressSpecFluent) o; + if (!java.util.Objects.equals(parentRef, that.parentRef)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(parentRef, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (parentRef != null) { sb.append("parentRef:"); sb.append(parentRef); } + sb.append("}"); + return sb.toString(); } + public class ParentRefNested extends V1alpha1ParentReferenceFluent> implements Nested{ + ParentRefNested(V1alpha1ParentReference item) { + this.builder = new V1alpha1ParentReferenceBuilder(this, item); + } + V1alpha1ParentReferenceBuilder builder; + + public N and() { + return (N) V1alpha1IPAddressSpecFluent.this.withParentRef(builder.build()); + } + + public N endParentRef() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecFluentImpl.java deleted file mode 100644 index 84a3060a9d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1IPAddressSpecFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1IPAddressSpecFluentImpl> extends BaseFluent implements V1alpha1IPAddressSpecFluent{ - public V1alpha1IPAddressSpecFluentImpl() { - } - public V1alpha1IPAddressSpecFluentImpl(V1alpha1IPAddressSpec instance) { - if (instance != null) { - this.withParentRef(instance.getParentRef()); - } - } - private V1alpha1ParentReferenceBuilder parentRef; - - /** - * This method has been deprecated, please use method buildParentRef instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ParentReference getParentRef() { - return this.parentRef!=null ?this.parentRef.build():null; - } - public V1alpha1ParentReference buildParentRef() { - return this.parentRef!=null ?this.parentRef.build():null; - } - public A withParentRef(V1alpha1ParentReference parentRef) { - _visitables.get("parentRef").remove(this.parentRef); - if (parentRef!=null){ this.parentRef= new V1alpha1ParentReferenceBuilder(parentRef); _visitables.get("parentRef").add(this.parentRef);} else { this.parentRef = null; _visitables.get("parentRef").remove(this.parentRef); } return (A) this; - } - public Boolean hasParentRef() { - return this.parentRef != null; - } - public V1alpha1IPAddressSpecFluentImpl.ParentRefNested withNewParentRef() { - return new V1alpha1IPAddressSpecFluentImpl.ParentRefNestedImpl(); - } - public V1alpha1IPAddressSpecFluentImpl.ParentRefNested withNewParentRefLike(V1alpha1ParentReference item) { - return new V1alpha1IPAddressSpecFluentImpl.ParentRefNestedImpl(item); - } - public V1alpha1IPAddressSpecFluentImpl.ParentRefNested editParentRef() { - return withNewParentRefLike(getParentRef()); - } - public V1alpha1IPAddressSpecFluentImpl.ParentRefNested editOrNewParentRef() { - return withNewParentRefLike(getParentRef() != null ? getParentRef(): new V1alpha1ParentReferenceBuilder().build()); - } - public V1alpha1IPAddressSpecFluentImpl.ParentRefNested editOrNewParentRefLike(V1alpha1ParentReference item) { - return withNewParentRefLike(getParentRef() != null ? getParentRef(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1IPAddressSpecFluentImpl that = (V1alpha1IPAddressSpecFluentImpl) o; - if (!java.util.Objects.equals(parentRef, that.parentRef)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(parentRef, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (parentRef != null) { sb.append("parentRef:"); sb.append(parentRef); } - sb.append("}"); - return sb.toString(); - } - class ParentRefNestedImpl extends V1alpha1ParentReferenceFluentImpl> implements V1alpha1IPAddressSpecFluentImpl.ParentRefNested,Nested{ - ParentRefNestedImpl(V1alpha1ParentReference item) { - this.builder = new V1alpha1ParentReferenceBuilder(this, item); - } - ParentRefNestedImpl() { - this.builder = new V1alpha1ParentReferenceBuilder(this); - } - V1alpha1ParentReferenceBuilder builder; - public N and() { - return (N) V1alpha1IPAddressSpecFluentImpl.this.withParentRef(builder.build()); - } - public N endParentRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionBuilder.java index bb141033a5..77a5b39c19 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1MatchConditionBuilder extends V1alpha1MatchConditionFluentImpl implements VisitableBuilder{ +public class V1alpha1MatchConditionBuilder extends V1alpha1MatchConditionFluent implements VisitableBuilder{ public V1alpha1MatchConditionBuilder() { - this(false); - } - public V1alpha1MatchConditionBuilder(Boolean validationEnabled) { - this(new V1alpha1MatchCondition(), validationEnabled); + this(new V1alpha1MatchCondition()); } + public V1alpha1MatchConditionBuilder(V1alpha1MatchConditionFluent fluent) { - this(fluent, false); - } - public V1alpha1MatchConditionBuilder(V1alpha1MatchConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1MatchCondition(), validationEnabled); + this(fluent, new V1alpha1MatchCondition()); } + public V1alpha1MatchConditionBuilder(V1alpha1MatchConditionFluent fluent,V1alpha1MatchCondition instance) { - this(fluent, instance, false); - } - public V1alpha1MatchConditionBuilder(V1alpha1MatchConditionFluent fluent,V1alpha1MatchCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExpression(instance.getExpression()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1MatchConditionBuilder(V1alpha1MatchCondition instance) { - this(instance,false); - } - public V1alpha1MatchConditionBuilder(V1alpha1MatchCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExpression(instance.getExpression()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1MatchConditionFluent fluent; - Boolean validationEnabled; + public V1alpha1MatchCondition build() { V1alpha1MatchCondition buildable = new V1alpha1MatchCondition(); buildable.setExpression(fluent.getExpression()); @@ -46,4 +28,5 @@ public V1alpha1MatchCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionFluent.java index ddd2e93bbe..c04b3816cc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1MatchConditionFluent> extends Fluent{ - public String getExpression(); - public A withExpression(String expression); - public Boolean hasExpression(); - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1MatchConditionFluent> extends BaseFluent{ + public V1alpha1MatchConditionFluent() { + } + public V1alpha1MatchConditionFluent(V1alpha1MatchCondition instance) { + this.copyInstance(instance); + } + private String expression; + private String name; + + protected void copyInstance(V1alpha1MatchCondition instance) { + instance = (instance != null ? instance : new V1alpha1MatchCondition()); + if (instance != null) { + this.withExpression(instance.getExpression()); + this.withName(instance.getName()); + } + } + + public String getExpression() { + return this.expression; + } + + public A withExpression(String expression) { + this.expression = expression; + return (A) this; + } + + public boolean hasExpression() { + return this.expression != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1MatchConditionFluent that = (V1alpha1MatchConditionFluent) o; + if (!java.util.Objects.equals(expression, that.expression)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(expression, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (expression != null) { sb.append("expression:"); sb.append(expression + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesBuilder.java index d41ccce9ef..05139e28e2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1MatchResourcesBuilder extends V1alpha1MatchResourcesFluentImpl implements VisitableBuilder{ +public class V1alpha1MatchResourcesBuilder extends V1alpha1MatchResourcesFluent implements VisitableBuilder{ public V1alpha1MatchResourcesBuilder() { - this(false); - } - public V1alpha1MatchResourcesBuilder(Boolean validationEnabled) { - this(new V1alpha1MatchResources(), validationEnabled); + this(new V1alpha1MatchResources()); } + public V1alpha1MatchResourcesBuilder(V1alpha1MatchResourcesFluent fluent) { - this(fluent, false); - } - public V1alpha1MatchResourcesBuilder(V1alpha1MatchResourcesFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1MatchResources(), validationEnabled); + this(fluent, new V1alpha1MatchResources()); } + public V1alpha1MatchResourcesBuilder(V1alpha1MatchResourcesFluent fluent,V1alpha1MatchResources instance) { - this(fluent, instance, false); - } - public V1alpha1MatchResourcesBuilder(V1alpha1MatchResourcesFluent fluent,V1alpha1MatchResources instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExcludeResourceRules(instance.getExcludeResourceRules()); - fluent.withMatchPolicy(instance.getMatchPolicy()); - fluent.withNamespaceSelector(instance.getNamespaceSelector()); - fluent.withObjectSelector(instance.getObjectSelector()); - fluent.withResourceRules(instance.getResourceRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1MatchResourcesBuilder(V1alpha1MatchResources instance) { - this(instance,false); - } - public V1alpha1MatchResourcesBuilder(V1alpha1MatchResources instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExcludeResourceRules(instance.getExcludeResourceRules()); - this.withMatchPolicy(instance.getMatchPolicy()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withObjectSelector(instance.getObjectSelector()); - this.withResourceRules(instance.getResourceRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1MatchResourcesFluent fluent; - Boolean validationEnabled; + public V1alpha1MatchResources build() { V1alpha1MatchResources buildable = new V1alpha1MatchResources(); - buildable.setExcludeResourceRules(fluent.getExcludeResourceRules()); + buildable.setExcludeResourceRules(fluent.buildExcludeResourceRules()); buildable.setMatchPolicy(fluent.getMatchPolicy()); - buildable.setNamespaceSelector(fluent.getNamespaceSelector()); - buildable.setObjectSelector(fluent.getObjectSelector()); - buildable.setResourceRules(fluent.getResourceRules()); + buildable.setNamespaceSelector(fluent.buildNamespaceSelector()); + buildable.setObjectSelector(fluent.buildObjectSelector()); + buildable.setResourceRules(fluent.buildResourceRules()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesFluent.java index 492799f860..af7578ec26 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesFluent.java @@ -1,134 +1,535 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha1MatchResourcesFluent> extends Fluent{ - public A addToExcludeResourceRules(int index,V1alpha1NamedRuleWithOperations item); - public A setToExcludeResourceRules(int index,V1alpha1NamedRuleWithOperations item); - public A addToExcludeResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items); - public A addAllToExcludeResourceRules(Collection items); - public A removeFromExcludeResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items); - public A removeAllFromExcludeResourceRules(Collection items); - public A removeMatchingFromExcludeResourceRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildExcludeResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getExcludeResourceRules(); - public List buildExcludeResourceRules(); - public V1alpha1NamedRuleWithOperations buildExcludeResourceRule(int index); - public V1alpha1NamedRuleWithOperations buildFirstExcludeResourceRule(); - public V1alpha1NamedRuleWithOperations buildLastExcludeResourceRule(); - public V1alpha1NamedRuleWithOperations buildMatchingExcludeResourceRule(Predicate predicate); - public Boolean hasMatchingExcludeResourceRule(Predicate predicate); - public A withExcludeResourceRules(List excludeResourceRules); - public A withExcludeResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... excludeResourceRules); - public Boolean hasExcludeResourceRules(); - public V1alpha1MatchResourcesFluent.ExcludeResourceRulesNested addNewExcludeResourceRule(); - public V1alpha1MatchResourcesFluent.ExcludeResourceRulesNested addNewExcludeResourceRuleLike(V1alpha1NamedRuleWithOperations item); - public V1alpha1MatchResourcesFluent.ExcludeResourceRulesNested setNewExcludeResourceRuleLike(int index,V1alpha1NamedRuleWithOperations item); - public V1alpha1MatchResourcesFluent.ExcludeResourceRulesNested editExcludeResourceRule(int index); - public V1alpha1MatchResourcesFluent.ExcludeResourceRulesNested editFirstExcludeResourceRule(); - public V1alpha1MatchResourcesFluent.ExcludeResourceRulesNested editLastExcludeResourceRule(); - public V1alpha1MatchResourcesFluent.ExcludeResourceRulesNested editMatchingExcludeResourceRule(Predicate predicate); - public String getMatchPolicy(); - public A withMatchPolicy(String matchPolicy); - public Boolean hasMatchPolicy(); - - /** - * This method has been deprecated, please use method buildNamespaceSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getNamespaceSelector(); - public V1LabelSelector buildNamespaceSelector(); - public A withNamespaceSelector(V1LabelSelector namespaceSelector); - public Boolean hasNamespaceSelector(); - public V1alpha1MatchResourcesFluent.NamespaceSelectorNested withNewNamespaceSelector(); - public V1alpha1MatchResourcesFluent.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item); - public V1alpha1MatchResourcesFluent.NamespaceSelectorNested editNamespaceSelector(); - public V1alpha1MatchResourcesFluent.NamespaceSelectorNested editOrNewNamespaceSelector(); - public V1alpha1MatchResourcesFluent.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item); - - /** - * This method has been deprecated, please use method buildObjectSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getObjectSelector(); - public V1LabelSelector buildObjectSelector(); - public A withObjectSelector(V1LabelSelector objectSelector); - public Boolean hasObjectSelector(); - public V1alpha1MatchResourcesFluent.ObjectSelectorNested withNewObjectSelector(); - public V1alpha1MatchResourcesFluent.ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item); - public V1alpha1MatchResourcesFluent.ObjectSelectorNested editObjectSelector(); - public V1alpha1MatchResourcesFluent.ObjectSelectorNested editOrNewObjectSelector(); - public V1alpha1MatchResourcesFluent.ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item); - public A addToResourceRules(int index,V1alpha1NamedRuleWithOperations item); - public A setToResourceRules(int index,V1alpha1NamedRuleWithOperations item); - public A addToResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items); - public A addAllToResourceRules(Collection items); - public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items); - public A removeAllFromResourceRules(Collection items); - public A removeMatchingFromResourceRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceRules(); - public List buildResourceRules(); - public V1alpha1NamedRuleWithOperations buildResourceRule(int index); - public V1alpha1NamedRuleWithOperations buildFirstResourceRule(); - public V1alpha1NamedRuleWithOperations buildLastResourceRule(); - public V1alpha1NamedRuleWithOperations buildMatchingResourceRule(Predicate predicate); - public Boolean hasMatchingResourceRule(Predicate predicate); - public A withResourceRules(List resourceRules); - public A withResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... resourceRules); - public Boolean hasResourceRules(); - public V1alpha1MatchResourcesFluent.ResourceRulesNested addNewResourceRule(); - public V1alpha1MatchResourcesFluent.ResourceRulesNested addNewResourceRuleLike(V1alpha1NamedRuleWithOperations item); - public V1alpha1MatchResourcesFluent.ResourceRulesNested setNewResourceRuleLike(int index,V1alpha1NamedRuleWithOperations item); - public V1alpha1MatchResourcesFluent.ResourceRulesNested editResourceRule(int index); - public V1alpha1MatchResourcesFluent.ResourceRulesNested editFirstResourceRule(); - public V1alpha1MatchResourcesFluent.ResourceRulesNested editLastResourceRule(); - public V1alpha1MatchResourcesFluent.ResourceRulesNested editMatchingResourceRule(Predicate predicate); - public interface ExcludeResourceRulesNested extends Nested,V1alpha1NamedRuleWithOperationsFluent>{ - public N and(); - public N endExcludeResourceRule(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1MatchResourcesFluent> extends BaseFluent{ + public V1alpha1MatchResourcesFluent() { + } + + public V1alpha1MatchResourcesFluent(V1alpha1MatchResources instance) { + this.copyInstance(instance); + } + private ArrayList excludeResourceRules; + private String matchPolicy; + private V1LabelSelectorBuilder namespaceSelector; + private V1LabelSelectorBuilder objectSelector; + private ArrayList resourceRules; + + protected void copyInstance(V1alpha1MatchResources instance) { + instance = (instance != null ? instance : new V1alpha1MatchResources()); + if (instance != null) { + this.withExcludeResourceRules(instance.getExcludeResourceRules()); + this.withMatchPolicy(instance.getMatchPolicy()); + this.withNamespaceSelector(instance.getNamespaceSelector()); + this.withObjectSelector(instance.getObjectSelector()); + this.withResourceRules(instance.getResourceRules()); + } + } + + public A addToExcludeResourceRules(int index,V1alpha1NamedRuleWithOperations item) { + if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} + V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item); + if (index < 0 || index >= excludeResourceRules.size()) { _visitables.get("excludeResourceRules").add(builder); excludeResourceRules.add(builder); } else { _visitables.get("excludeResourceRules").add(index, builder); excludeResourceRules.add(index, builder);} + return (A)this; + } + + public A setToExcludeResourceRules(int index,V1alpha1NamedRuleWithOperations item) { + if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} + V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item); + if (index < 0 || index >= excludeResourceRules.size()) { _visitables.get("excludeResourceRules").add(builder); excludeResourceRules.add(builder); } else { _visitables.get("excludeResourceRules").set(index, builder); excludeResourceRules.set(index, builder);} + return (A)this; + } + + public A addToExcludeResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items) { + if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} + for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").add(builder);this.excludeResourceRules.add(builder);} return (A)this; + } + + public A addAllToExcludeResourceRules(Collection items) { + if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} + for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").add(builder);this.excludeResourceRules.add(builder);} return (A)this; + } + + public A removeFromExcludeResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items) { + if (this.excludeResourceRules == null) return (A)this; + for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").remove(builder); this.excludeResourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromExcludeResourceRules(Collection items) { + if (this.excludeResourceRules == null) return (A)this; + for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").remove(builder); this.excludeResourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromExcludeResourceRules(Predicate predicate) { + if (excludeResourceRules == null) return (A) this; + final Iterator each = excludeResourceRules.iterator(); + final List visitables = _visitables.get("excludeResourceRules"); + while (each.hasNext()) { + V1alpha1NamedRuleWithOperationsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildExcludeResourceRules() { + return this.excludeResourceRules != null ? build(excludeResourceRules) : null; + } + + public V1alpha1NamedRuleWithOperations buildExcludeResourceRule(int index) { + return this.excludeResourceRules.get(index).build(); + } + + public V1alpha1NamedRuleWithOperations buildFirstExcludeResourceRule() { + return this.excludeResourceRules.get(0).build(); + } + + public V1alpha1NamedRuleWithOperations buildLastExcludeResourceRule() { + return this.excludeResourceRules.get(excludeResourceRules.size() - 1).build(); + } + + public V1alpha1NamedRuleWithOperations buildMatchingExcludeResourceRule(Predicate predicate) { + for (V1alpha1NamedRuleWithOperationsBuilder item : excludeResourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingExcludeResourceRule(Predicate predicate) { + for (V1alpha1NamedRuleWithOperationsBuilder item : excludeResourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withExcludeResourceRules(List excludeResourceRules) { + if (this.excludeResourceRules != null) { + this._visitables.get("excludeResourceRules").clear(); + } + if (excludeResourceRules != null) { + this.excludeResourceRules = new ArrayList(); + for (V1alpha1NamedRuleWithOperations item : excludeResourceRules) { + this.addToExcludeResourceRules(item); + } + } else { + this.excludeResourceRules = null; + } + return (A) this; + } + + public A withExcludeResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... excludeResourceRules) { + if (this.excludeResourceRules != null) { + this.excludeResourceRules.clear(); + _visitables.remove("excludeResourceRules"); + } + if (excludeResourceRules != null) { + for (V1alpha1NamedRuleWithOperations item : excludeResourceRules) { + this.addToExcludeResourceRules(item); + } + } + return (A) this; + } + + public boolean hasExcludeResourceRules() { + return this.excludeResourceRules != null && !this.excludeResourceRules.isEmpty(); + } + + public ExcludeResourceRulesNested addNewExcludeResourceRule() { + return new ExcludeResourceRulesNested(-1, null); + } + + public ExcludeResourceRulesNested addNewExcludeResourceRuleLike(V1alpha1NamedRuleWithOperations item) { + return new ExcludeResourceRulesNested(-1, item); + } + + public ExcludeResourceRulesNested setNewExcludeResourceRuleLike(int index,V1alpha1NamedRuleWithOperations item) { + return new ExcludeResourceRulesNested(index, item); + } + + public ExcludeResourceRulesNested editExcludeResourceRule(int index) { + if (excludeResourceRules.size() <= index) throw new RuntimeException("Can't edit excludeResourceRules. Index exceeds size."); + return setNewExcludeResourceRuleLike(index, buildExcludeResourceRule(index)); + } + + public ExcludeResourceRulesNested editFirstExcludeResourceRule() { + if (excludeResourceRules.size() == 0) throw new RuntimeException("Can't edit first excludeResourceRules. The list is empty."); + return setNewExcludeResourceRuleLike(0, buildExcludeResourceRule(0)); + } + + public ExcludeResourceRulesNested editLastExcludeResourceRule() { + int index = excludeResourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last excludeResourceRules. The list is empty."); + return setNewExcludeResourceRuleLike(index, buildExcludeResourceRule(index)); + } + + public ExcludeResourceRulesNested editMatchingExcludeResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i withNewNamespaceSelector() { + return new NamespaceSelectorNested(null); + } + + public NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { + return new NamespaceSelectorNested(item); + } + + public NamespaceSelectorNested editNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(null)); + } + + public NamespaceSelectorNested editOrNewNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(item)); + } + + public V1LabelSelector buildObjectSelector() { + return this.objectSelector != null ? this.objectSelector.build() : null; + } + + public A withObjectSelector(V1LabelSelector objectSelector) { + this._visitables.remove("objectSelector"); + if (objectSelector != null) { + this.objectSelector = new V1LabelSelectorBuilder(objectSelector); + this._visitables.get("objectSelector").add(this.objectSelector); + } else { + this.objectSelector = null; + this._visitables.get("objectSelector").remove(this.objectSelector); + } + return (A) this; } - public interface NamespaceSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endNamespaceSelector(); + + public boolean hasObjectSelector() { + return this.objectSelector != null; + } + + public ObjectSelectorNested withNewObjectSelector() { + return new ObjectSelectorNested(null); + } + + public ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item) { + return new ObjectSelectorNested(item); + } + + public ObjectSelectorNested editObjectSelector() { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(null)); + } + + public ObjectSelectorNested editOrNewObjectSelector() { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item) { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(item)); + } + + public A addToResourceRules(int index,V1alpha1NamedRuleWithOperations item) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").add(index, builder); resourceRules.add(index, builder);} + return (A)this; + } + + public A setToResourceRules(int index,V1alpha1NamedRuleWithOperations item) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").set(index, builder); resourceRules.set(index, builder);} + return (A)this; + } + + public A addToResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A addAllToResourceRules(Collection items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items) { + if (this.resourceRules == null) return (A)this; + for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromResourceRules(Collection items) { + if (this.resourceRules == null) return (A)this; + for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromResourceRules(Predicate predicate) { + if (resourceRules == null) return (A) this; + final Iterator each = resourceRules.iterator(); + final List visitables = _visitables.get("resourceRules"); + while (each.hasNext()) { + V1alpha1NamedRuleWithOperationsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResourceRules() { + return this.resourceRules != null ? build(resourceRules) : null; + } + + public V1alpha1NamedRuleWithOperations buildResourceRule(int index) { + return this.resourceRules.get(index).build(); + } + + public V1alpha1NamedRuleWithOperations buildFirstResourceRule() { + return this.resourceRules.get(0).build(); + } + + public V1alpha1NamedRuleWithOperations buildLastResourceRule() { + return this.resourceRules.get(resourceRules.size() - 1).build(); + } + + public V1alpha1NamedRuleWithOperations buildMatchingResourceRule(Predicate predicate) { + for (V1alpha1NamedRuleWithOperationsBuilder item : resourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResourceRule(Predicate predicate) { + for (V1alpha1NamedRuleWithOperationsBuilder item : resourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceRules(List resourceRules) { + if (this.resourceRules != null) { + this._visitables.get("resourceRules").clear(); + } + if (resourceRules != null) { + this.resourceRules = new ArrayList(); + for (V1alpha1NamedRuleWithOperations item : resourceRules) { + this.addToResourceRules(item); + } + } else { + this.resourceRules = null; + } + return (A) this; + } + + public A withResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... resourceRules) { + if (this.resourceRules != null) { + this.resourceRules.clear(); + _visitables.remove("resourceRules"); + } + if (resourceRules != null) { + for (V1alpha1NamedRuleWithOperations item : resourceRules) { + this.addToResourceRules(item); + } + } + return (A) this; + } + + public boolean hasResourceRules() { + return this.resourceRules != null && !this.resourceRules.isEmpty(); + } + + public ResourceRulesNested addNewResourceRule() { + return new ResourceRulesNested(-1, null); + } + + public ResourceRulesNested addNewResourceRuleLike(V1alpha1NamedRuleWithOperations item) { + return new ResourceRulesNested(-1, item); + } + + public ResourceRulesNested setNewResourceRuleLike(int index,V1alpha1NamedRuleWithOperations item) { + return new ResourceRulesNested(index, item); + } + + public ResourceRulesNested editResourceRule(int index) { + if (resourceRules.size() <= index) throw new RuntimeException("Can't edit resourceRules. Index exceeds size."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editFirstResourceRule() { + if (resourceRules.size() == 0) throw new RuntimeException("Can't edit first resourceRules. The list is empty."); + return setNewResourceRuleLike(0, buildResourceRule(0)); + } + + public ResourceRulesNested editLastResourceRule() { + int index = resourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resourceRules. The list is empty."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editMatchingResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1alpha1NamedRuleWithOperationsFluent> implements Nested{ + ExcludeResourceRulesNested(int index,V1alpha1NamedRuleWithOperations item) { + this.index = index; + this.builder = new V1alpha1NamedRuleWithOperationsBuilder(this, item); + } + V1alpha1NamedRuleWithOperationsBuilder builder; + int index; + public N and() { + return (N) V1alpha1MatchResourcesFluent.this.setToExcludeResourceRules(index,builder.build()); + } + + public N endExcludeResourceRule() { + return and(); + } + + } - public interface ObjectSelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endObjectSelector(); + public class NamespaceSelectorNested extends V1LabelSelectorFluent> implements Nested{ + NamespaceSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1alpha1MatchResourcesFluent.this.withNamespaceSelector(builder.build()); + } + + public N endNamespaceSelector() { + return and(); + } + } - public interface ResourceRulesNested extends Nested,V1alpha1NamedRuleWithOperationsFluent>{ - public N and(); - public N endResourceRule(); + public class ObjectSelectorNested extends V1LabelSelectorFluent> implements Nested{ + ObjectSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1alpha1MatchResourcesFluent.this.withObjectSelector(builder.build()); + } + + public N endObjectSelector() { + return and(); + } + } + public class ResourceRulesNested extends V1alpha1NamedRuleWithOperationsFluent> implements Nested{ + ResourceRulesNested(int index,V1alpha1NamedRuleWithOperations item) { + this.index = index; + this.builder = new V1alpha1NamedRuleWithOperationsBuilder(this, item); + } + V1alpha1NamedRuleWithOperationsBuilder builder; + int index; + + public N and() { + return (N) V1alpha1MatchResourcesFluent.this.setToResourceRules(index,builder.build()); + } + + public N endResourceRule() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesFluentImpl.java deleted file mode 100644 index e7ea183aa8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchResourcesFluentImpl.java +++ /dev/null @@ -1,431 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1MatchResourcesFluentImpl> extends BaseFluent implements V1alpha1MatchResourcesFluent{ - public V1alpha1MatchResourcesFluentImpl() { - } - public V1alpha1MatchResourcesFluentImpl(V1alpha1MatchResources instance) { - if (instance != null) { - this.withExcludeResourceRules(instance.getExcludeResourceRules()); - this.withMatchPolicy(instance.getMatchPolicy()); - this.withNamespaceSelector(instance.getNamespaceSelector()); - this.withObjectSelector(instance.getObjectSelector()); - this.withResourceRules(instance.getResourceRules()); - } - } - private ArrayList excludeResourceRules; - private String matchPolicy; - private V1LabelSelectorBuilder namespaceSelector; - private V1LabelSelectorBuilder objectSelector; - private ArrayList resourceRules; - public A addToExcludeResourceRules(int index,V1alpha1NamedRuleWithOperations item) { - if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} - V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item); - if (index < 0 || index >= excludeResourceRules.size()) { _visitables.get("excludeResourceRules").add(builder); excludeResourceRules.add(builder); } else { _visitables.get("excludeResourceRules").add(index, builder); excludeResourceRules.add(index, builder);} - return (A)this; - } - public A setToExcludeResourceRules(int index,V1alpha1NamedRuleWithOperations item) { - if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} - V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item); - if (index < 0 || index >= excludeResourceRules.size()) { _visitables.get("excludeResourceRules").add(builder); excludeResourceRules.add(builder); } else { _visitables.get("excludeResourceRules").set(index, builder); excludeResourceRules.set(index, builder);} - return (A)this; - } - public A addToExcludeResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items) { - if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} - for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").add(builder);this.excludeResourceRules.add(builder);} return (A)this; - } - public A addAllToExcludeResourceRules(Collection items) { - if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} - for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").add(builder);this.excludeResourceRules.add(builder);} return (A)this; - } - public A removeFromExcludeResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items) { - for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").remove(builder);if (this.excludeResourceRules != null) {this.excludeResourceRules.remove(builder);}} return (A)this; - } - public A removeAllFromExcludeResourceRules(Collection items) { - for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").remove(builder);if (this.excludeResourceRules != null) {this.excludeResourceRules.remove(builder);}} return (A)this; - } - public A removeMatchingFromExcludeResourceRules(Predicate predicate) { - if (excludeResourceRules == null) return (A) this; - final Iterator each = excludeResourceRules.iterator(); - final List visitables = _visitables.get("excludeResourceRules"); - while (each.hasNext()) { - V1alpha1NamedRuleWithOperationsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildExcludeResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getExcludeResourceRules() { - return excludeResourceRules != null ? build(excludeResourceRules) : null; - } - public List buildExcludeResourceRules() { - return excludeResourceRules != null ? build(excludeResourceRules) : null; - } - public V1alpha1NamedRuleWithOperations buildExcludeResourceRule(int index) { - return this.excludeResourceRules.get(index).build(); - } - public V1alpha1NamedRuleWithOperations buildFirstExcludeResourceRule() { - return this.excludeResourceRules.get(0).build(); - } - public V1alpha1NamedRuleWithOperations buildLastExcludeResourceRule() { - return this.excludeResourceRules.get(excludeResourceRules.size() - 1).build(); - } - public V1alpha1NamedRuleWithOperations buildMatchingExcludeResourceRule(Predicate predicate) { - for (V1alpha1NamedRuleWithOperationsBuilder item: excludeResourceRules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingExcludeResourceRule(Predicate predicate) { - for (V1alpha1NamedRuleWithOperationsBuilder item: excludeResourceRules) { if(predicate.test(item)){ return true;} } return false; - } - public A withExcludeResourceRules(List excludeResourceRules) { - if (this.excludeResourceRules != null) { _visitables.get("excludeResourceRules").clear();} - if (excludeResourceRules != null) {this.excludeResourceRules = new ArrayList(); for (V1alpha1NamedRuleWithOperations item : excludeResourceRules){this.addToExcludeResourceRules(item);}} else { this.excludeResourceRules = null;} return (A) this; - } - public A withExcludeResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... excludeResourceRules) { - if (this.excludeResourceRules != null) {this.excludeResourceRules.clear(); _visitables.remove("excludeResourceRules"); } - if (excludeResourceRules != null) {for (V1alpha1NamedRuleWithOperations item :excludeResourceRules){ this.addToExcludeResourceRules(item);}} return (A) this; - } - public Boolean hasExcludeResourceRules() { - return excludeResourceRules != null && !excludeResourceRules.isEmpty(); - } - public V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNested addNewExcludeResourceRule() { - return new V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNestedImpl(); - } - public V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNested addNewExcludeResourceRuleLike(V1alpha1NamedRuleWithOperations item) { - return new V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNestedImpl(-1, item); - } - public V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNested setNewExcludeResourceRuleLike(int index,V1alpha1NamedRuleWithOperations item) { - return new V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNestedImpl(index, item); - } - public V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNested editExcludeResourceRule(int index) { - if (excludeResourceRules.size() <= index) throw new RuntimeException("Can't edit excludeResourceRules. Index exceeds size."); - return setNewExcludeResourceRuleLike(index, buildExcludeResourceRule(index)); - } - public V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNested editFirstExcludeResourceRule() { - if (excludeResourceRules.size() == 0) throw new RuntimeException("Can't edit first excludeResourceRules. The list is empty."); - return setNewExcludeResourceRuleLike(0, buildExcludeResourceRule(0)); - } - public V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNested editLastExcludeResourceRule() { - int index = excludeResourceRules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last excludeResourceRules. The list is empty."); - return setNewExcludeResourceRuleLike(index, buildExcludeResourceRule(index)); - } - public V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNested editMatchingExcludeResourceRule(Predicate predicate) { - int index = -1; - for (int i=0;i withNewNamespaceSelector() { - return new V1alpha1MatchResourcesFluentImpl.NamespaceSelectorNestedImpl(); - } - public V1alpha1MatchResourcesFluentImpl.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { - return new V1alpha1MatchResourcesFluentImpl.NamespaceSelectorNestedImpl(item); - } - public V1alpha1MatchResourcesFluentImpl.NamespaceSelectorNested editNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector()); - } - public V1alpha1MatchResourcesFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelector() { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): new V1LabelSelectorBuilder().build()); - } - public V1alpha1MatchResourcesFluentImpl.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { - return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): item); - } - - /** - * This method has been deprecated, please use method buildObjectSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getObjectSelector() { - return this.objectSelector!=null ?this.objectSelector.build():null; - } - public V1LabelSelector buildObjectSelector() { - return this.objectSelector!=null ?this.objectSelector.build():null; - } - public A withObjectSelector(V1LabelSelector objectSelector) { - _visitables.get("objectSelector").remove(this.objectSelector); - if (objectSelector!=null){ this.objectSelector= new V1LabelSelectorBuilder(objectSelector); _visitables.get("objectSelector").add(this.objectSelector);} else { this.objectSelector = null; _visitables.get("objectSelector").remove(this.objectSelector); } return (A) this; - } - public Boolean hasObjectSelector() { - return this.objectSelector != null; - } - public V1alpha1MatchResourcesFluentImpl.ObjectSelectorNested withNewObjectSelector() { - return new V1alpha1MatchResourcesFluentImpl.ObjectSelectorNestedImpl(); - } - public V1alpha1MatchResourcesFluentImpl.ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item) { - return new V1alpha1MatchResourcesFluentImpl.ObjectSelectorNestedImpl(item); - } - public V1alpha1MatchResourcesFluentImpl.ObjectSelectorNested editObjectSelector() { - return withNewObjectSelectorLike(getObjectSelector()); - } - public V1alpha1MatchResourcesFluentImpl.ObjectSelectorNested editOrNewObjectSelector() { - return withNewObjectSelectorLike(getObjectSelector() != null ? getObjectSelector(): new V1LabelSelectorBuilder().build()); - } - public V1alpha1MatchResourcesFluentImpl.ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item) { - return withNewObjectSelectorLike(getObjectSelector() != null ? getObjectSelector(): item); - } - public A addToResourceRules(int index,V1alpha1NamedRuleWithOperations item) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item); - if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").add(index, builder); resourceRules.add(index, builder);} - return (A)this; - } - public A setToResourceRules(int index,V1alpha1NamedRuleWithOperations item) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item); - if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").set(index, builder); resourceRules.set(index, builder);} - return (A)this; - } - public A addToResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; - } - public A addAllToResourceRules(Collection items) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; - } - public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... items) { - for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").remove(builder);if (this.resourceRules != null) {this.resourceRules.remove(builder);}} return (A)this; - } - public A removeAllFromResourceRules(Collection items) { - for (V1alpha1NamedRuleWithOperations item : items) {V1alpha1NamedRuleWithOperationsBuilder builder = new V1alpha1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").remove(builder);if (this.resourceRules != null) {this.resourceRules.remove(builder);}} return (A)this; - } - public A removeMatchingFromResourceRules(Predicate predicate) { - if (resourceRules == null) return (A) this; - final Iterator each = resourceRules.iterator(); - final List visitables = _visitables.get("resourceRules"); - while (each.hasNext()) { - V1alpha1NamedRuleWithOperationsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceRules() { - return resourceRules != null ? build(resourceRules) : null; - } - public List buildResourceRules() { - return resourceRules != null ? build(resourceRules) : null; - } - public V1alpha1NamedRuleWithOperations buildResourceRule(int index) { - return this.resourceRules.get(index).build(); - } - public V1alpha1NamedRuleWithOperations buildFirstResourceRule() { - return this.resourceRules.get(0).build(); - } - public V1alpha1NamedRuleWithOperations buildLastResourceRule() { - return this.resourceRules.get(resourceRules.size() - 1).build(); - } - public V1alpha1NamedRuleWithOperations buildMatchingResourceRule(Predicate predicate) { - for (V1alpha1NamedRuleWithOperationsBuilder item: resourceRules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResourceRule(Predicate predicate) { - for (V1alpha1NamedRuleWithOperationsBuilder item: resourceRules) { if(predicate.test(item)){ return true;} } return false; - } - public A withResourceRules(List resourceRules) { - if (this.resourceRules != null) { _visitables.get("resourceRules").clear();} - if (resourceRules != null) {this.resourceRules = new ArrayList(); for (V1alpha1NamedRuleWithOperations item : resourceRules){this.addToResourceRules(item);}} else { this.resourceRules = null;} return (A) this; - } - public A withResourceRules(io.kubernetes.client.openapi.models.V1alpha1NamedRuleWithOperations... resourceRules) { - if (this.resourceRules != null) {this.resourceRules.clear(); _visitables.remove("resourceRules"); } - if (resourceRules != null) {for (V1alpha1NamedRuleWithOperations item :resourceRules){ this.addToResourceRules(item);}} return (A) this; - } - public Boolean hasResourceRules() { - return resourceRules != null && !resourceRules.isEmpty(); - } - public V1alpha1MatchResourcesFluentImpl.ResourceRulesNested addNewResourceRule() { - return new V1alpha1MatchResourcesFluentImpl.ResourceRulesNestedImpl(); - } - public V1alpha1MatchResourcesFluentImpl.ResourceRulesNested addNewResourceRuleLike(V1alpha1NamedRuleWithOperations item) { - return new V1alpha1MatchResourcesFluentImpl.ResourceRulesNestedImpl(-1, item); - } - public V1alpha1MatchResourcesFluentImpl.ResourceRulesNested setNewResourceRuleLike(int index,V1alpha1NamedRuleWithOperations item) { - return new V1alpha1MatchResourcesFluentImpl.ResourceRulesNestedImpl(index, item); - } - public V1alpha1MatchResourcesFluentImpl.ResourceRulesNested editResourceRule(int index) { - if (resourceRules.size() <= index) throw new RuntimeException("Can't edit resourceRules. Index exceeds size."); - return setNewResourceRuleLike(index, buildResourceRule(index)); - } - public V1alpha1MatchResourcesFluentImpl.ResourceRulesNested editFirstResourceRule() { - if (resourceRules.size() == 0) throw new RuntimeException("Can't edit first resourceRules. The list is empty."); - return setNewResourceRuleLike(0, buildResourceRule(0)); - } - public V1alpha1MatchResourcesFluentImpl.ResourceRulesNested editLastResourceRule() { - int index = resourceRules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resourceRules. The list is empty."); - return setNewResourceRuleLike(index, buildResourceRule(index)); - } - public V1alpha1MatchResourcesFluentImpl.ResourceRulesNested editMatchingResourceRule(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1alpha1NamedRuleWithOperationsFluentImpl> implements V1alpha1MatchResourcesFluentImpl.ExcludeResourceRulesNested,Nested{ - ExcludeResourceRulesNestedImpl(int index,V1alpha1NamedRuleWithOperations item) { - this.index = index; - this.builder = new V1alpha1NamedRuleWithOperationsBuilder(this, item); - } - ExcludeResourceRulesNestedImpl() { - this.index = -1; - this.builder = new V1alpha1NamedRuleWithOperationsBuilder(this); - } - V1alpha1NamedRuleWithOperationsBuilder builder; - int index; - public N and() { - return (N) V1alpha1MatchResourcesFluentImpl.this.setToExcludeResourceRules(index,builder.build()); - } - public N endExcludeResourceRule() { - return and(); - } - - } - class NamespaceSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1alpha1MatchResourcesFluentImpl.NamespaceSelectorNested,Nested{ - NamespaceSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - NamespaceSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1alpha1MatchResourcesFluentImpl.this.withNamespaceSelector(builder.build()); - } - public N endNamespaceSelector() { - return and(); - } - - } - class ObjectSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1alpha1MatchResourcesFluentImpl.ObjectSelectorNested,Nested{ - ObjectSelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - ObjectSelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V1alpha1MatchResourcesFluentImpl.this.withObjectSelector(builder.build()); - } - public N endObjectSelector() { - return and(); - } - - } - class ResourceRulesNestedImpl extends V1alpha1NamedRuleWithOperationsFluentImpl> implements V1alpha1MatchResourcesFluentImpl.ResourceRulesNested,Nested{ - ResourceRulesNestedImpl(int index,V1alpha1NamedRuleWithOperations item) { - this.index = index; - this.builder = new V1alpha1NamedRuleWithOperationsBuilder(this, item); - } - ResourceRulesNestedImpl() { - this.index = -1; - this.builder = new V1alpha1NamedRuleWithOperationsBuilder(this); - } - V1alpha1NamedRuleWithOperationsBuilder builder; - int index; - public N and() { - return (N) V1alpha1MatchResourcesFluentImpl.this.setToResourceRules(index,builder.build()); - } - public N endResourceRule() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsBuilder.java index e996a3b335..4fb7e907de 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1NamedRuleWithOperationsBuilder extends V1alpha1NamedRuleWithOperationsFluentImpl implements VisitableBuilder{ +public class V1alpha1NamedRuleWithOperationsBuilder extends V1alpha1NamedRuleWithOperationsFluent implements VisitableBuilder{ public V1alpha1NamedRuleWithOperationsBuilder() { - this(false); - } - public V1alpha1NamedRuleWithOperationsBuilder(Boolean validationEnabled) { - this(new V1alpha1NamedRuleWithOperations(), validationEnabled); + this(new V1alpha1NamedRuleWithOperations()); } + public V1alpha1NamedRuleWithOperationsBuilder(V1alpha1NamedRuleWithOperationsFluent fluent) { - this(fluent, false); - } - public V1alpha1NamedRuleWithOperationsBuilder(V1alpha1NamedRuleWithOperationsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1NamedRuleWithOperations(), validationEnabled); + this(fluent, new V1alpha1NamedRuleWithOperations()); } + public V1alpha1NamedRuleWithOperationsBuilder(V1alpha1NamedRuleWithOperationsFluent fluent,V1alpha1NamedRuleWithOperations instance) { - this(fluent, instance, false); - } - public V1alpha1NamedRuleWithOperationsBuilder(V1alpha1NamedRuleWithOperationsFluent fluent,V1alpha1NamedRuleWithOperations instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroups(instance.getApiGroups()); - fluent.withApiVersions(instance.getApiVersions()); - fluent.withOperations(instance.getOperations()); - fluent.withResourceNames(instance.getResourceNames()); - fluent.withResources(instance.getResources()); - fluent.withScope(instance.getScope()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1NamedRuleWithOperationsBuilder(V1alpha1NamedRuleWithOperations instance) { - this(instance,false); - } - public V1alpha1NamedRuleWithOperationsBuilder(V1alpha1NamedRuleWithOperations instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withApiVersions(instance.getApiVersions()); - this.withOperations(instance.getOperations()); - this.withResourceNames(instance.getResourceNames()); - this.withResources(instance.getResources()); - this.withScope(instance.getScope()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1NamedRuleWithOperationsFluent fluent; - Boolean validationEnabled; + public V1alpha1NamedRuleWithOperations build() { V1alpha1NamedRuleWithOperations buildable = new V1alpha1NamedRuleWithOperations(); buildable.setApiGroups(fluent.getApiGroups()); @@ -58,4 +32,5 @@ public V1alpha1NamedRuleWithOperations build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsFluent.java index bc254e6fb5..7e8fe0fd1d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsFluent.java @@ -1,95 +1,557 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1alpha1NamedRuleWithOperationsFluent> extends Fluent{ - public A addToApiGroups(int index,String item); - public A setToApiGroups(int index,String item); - public A addToApiGroups(java.lang.String... items); - public A addAllToApiGroups(Collection items); - public A removeFromApiGroups(java.lang.String... items); - public A removeAllFromApiGroups(Collection items); - public List getApiGroups(); - public String getApiGroup(int index); - public String getFirstApiGroup(); - public String getLastApiGroup(); - public String getMatchingApiGroup(Predicate predicate); - public Boolean hasMatchingApiGroup(Predicate predicate); - public A withApiGroups(List apiGroups); - public A withApiGroups(java.lang.String... apiGroups); - public Boolean hasApiGroups(); - public A addToApiVersions(int index,String item); - public A setToApiVersions(int index,String item); - public A addToApiVersions(java.lang.String... items); - public A addAllToApiVersions(Collection items); - public A removeFromApiVersions(java.lang.String... items); - public A removeAllFromApiVersions(Collection items); - public List getApiVersions(); - public String getApiVersion(int index); - public String getFirstApiVersion(); - public String getLastApiVersion(); - public String getMatchingApiVersion(Predicate predicate); - public Boolean hasMatchingApiVersion(Predicate predicate); - public A withApiVersions(List apiVersions); - public A withApiVersions(java.lang.String... apiVersions); - public Boolean hasApiVersions(); - public A addToOperations(int index,String item); - public A setToOperations(int index,String item); - public A addToOperations(java.lang.String... items); - public A addAllToOperations(Collection items); - public A removeFromOperations(java.lang.String... items); - public A removeAllFromOperations(Collection items); - public List getOperations(); - public String getOperation(int index); - public String getFirstOperation(); - public String getLastOperation(); - public String getMatchingOperation(Predicate predicate); - public Boolean hasMatchingOperation(Predicate predicate); - public A withOperations(List operations); - public A withOperations(java.lang.String... operations); - public Boolean hasOperations(); - public A addToResourceNames(int index,String item); - public A setToResourceNames(int index,String item); - public A addToResourceNames(java.lang.String... items); - public A addAllToResourceNames(Collection items); - public A removeFromResourceNames(java.lang.String... items); - public A removeAllFromResourceNames(Collection items); - public List getResourceNames(); - public String getResourceName(int index); - public String getFirstResourceName(); - public String getLastResourceName(); - public String getMatchingResourceName(Predicate predicate); - public Boolean hasMatchingResourceName(Predicate predicate); - public A withResourceNames(List resourceNames); - public A withResourceNames(java.lang.String... resourceNames); - public Boolean hasResourceNames(); - public A addToResources(int index,String item); - public A setToResources(int index,String item); - public A addToResources(java.lang.String... items); - public A addAllToResources(Collection items); - public A removeFromResources(java.lang.String... items); - public A removeAllFromResources(Collection items); - public List getResources(); - public String getResource(int index); - public String getFirstResource(); - public String getLastResource(); - public String getMatchingResource(Predicate predicate); - public Boolean hasMatchingResource(Predicate predicate); - public A withResources(List resources); - public A withResources(java.lang.String... resources); - public Boolean hasResources(); - public String getScope(); - public A withScope(String scope); - public Boolean hasScope(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1NamedRuleWithOperationsFluent> extends BaseFluent{ + public V1alpha1NamedRuleWithOperationsFluent() { + } + public V1alpha1NamedRuleWithOperationsFluent(V1alpha1NamedRuleWithOperations instance) { + this.copyInstance(instance); + } + private List apiGroups; + private List apiVersions; + private List operations; + private List resourceNames; + private List resources; + private String scope; + + protected void copyInstance(V1alpha1NamedRuleWithOperations instance) { + instance = (instance != null ? instance : new V1alpha1NamedRuleWithOperations()); + if (instance != null) { + this.withApiGroups(instance.getApiGroups()); + this.withApiVersions(instance.getApiVersions()); + this.withOperations(instance.getOperations()); + this.withResourceNames(instance.getResourceNames()); + this.withResources(instance.getResources()); + this.withScope(instance.getScope()); + } + } + + public A addToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.add(index, item); + return (A)this; + } + + public A setToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.set(index, item); return (A)this; + } + + public A addToApiGroups(java.lang.String... items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A addAllToApiGroups(Collection items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A removeFromApiGroups(java.lang.String... items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public A removeAllFromApiGroups(Collection items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public List getApiGroups() { + return this.apiGroups; + } + + public String getApiGroup(int index) { + return this.apiGroups.get(index); + } + + public String getFirstApiGroup() { + return this.apiGroups.get(0); + } + + public String getLastApiGroup() { + return this.apiGroups.get(apiGroups.size() - 1); + } + + public String getMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withApiGroups(List apiGroups) { + if (apiGroups != null) { + this.apiGroups = new ArrayList(); + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } else { + this.apiGroups = null; + } + return (A) this; + } + + public A withApiGroups(java.lang.String... apiGroups) { + if (this.apiGroups != null) { + this.apiGroups.clear(); + _visitables.remove("apiGroups"); + } + if (apiGroups != null) { + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } + return (A) this; + } + + public boolean hasApiGroups() { + return this.apiGroups != null && !this.apiGroups.isEmpty(); + } + + public A addToApiVersions(int index,String item) { + if (this.apiVersions == null) {this.apiVersions = new ArrayList();} + this.apiVersions.add(index, item); + return (A)this; + } + + public A setToApiVersions(int index,String item) { + if (this.apiVersions == null) {this.apiVersions = new ArrayList();} + this.apiVersions.set(index, item); return (A)this; + } + + public A addToApiVersions(java.lang.String... items) { + if (this.apiVersions == null) {this.apiVersions = new ArrayList();} + for (String item : items) {this.apiVersions.add(item);} return (A)this; + } + + public A addAllToApiVersions(Collection items) { + if (this.apiVersions == null) {this.apiVersions = new ArrayList();} + for (String item : items) {this.apiVersions.add(item);} return (A)this; + } + + public A removeFromApiVersions(java.lang.String... items) { + if (this.apiVersions == null) return (A)this; + for (String item : items) { this.apiVersions.remove(item);} return (A)this; + } + + public A removeAllFromApiVersions(Collection items) { + if (this.apiVersions == null) return (A)this; + for (String item : items) { this.apiVersions.remove(item);} return (A)this; + } + + public List getApiVersions() { + return this.apiVersions; + } + + public String getApiVersion(int index) { + return this.apiVersions.get(index); + } + + public String getFirstApiVersion() { + return this.apiVersions.get(0); + } + + public String getLastApiVersion() { + return this.apiVersions.get(apiVersions.size() - 1); + } + + public String getMatchingApiVersion(Predicate predicate) { + for (String item : apiVersions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingApiVersion(Predicate predicate) { + for (String item : apiVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withApiVersions(List apiVersions) { + if (apiVersions != null) { + this.apiVersions = new ArrayList(); + for (String item : apiVersions) { + this.addToApiVersions(item); + } + } else { + this.apiVersions = null; + } + return (A) this; + } + + public A withApiVersions(java.lang.String... apiVersions) { + if (this.apiVersions != null) { + this.apiVersions.clear(); + _visitables.remove("apiVersions"); + } + if (apiVersions != null) { + for (String item : apiVersions) { + this.addToApiVersions(item); + } + } + return (A) this; + } + + public boolean hasApiVersions() { + return this.apiVersions != null && !this.apiVersions.isEmpty(); + } + + public A addToOperations(int index,String item) { + if (this.operations == null) {this.operations = new ArrayList();} + this.operations.add(index, item); + return (A)this; + } + + public A setToOperations(int index,String item) { + if (this.operations == null) {this.operations = new ArrayList();} + this.operations.set(index, item); return (A)this; + } + + public A addToOperations(java.lang.String... items) { + if (this.operations == null) {this.operations = new ArrayList();} + for (String item : items) {this.operations.add(item);} return (A)this; + } + + public A addAllToOperations(Collection items) { + if (this.operations == null) {this.operations = new ArrayList();} + for (String item : items) {this.operations.add(item);} return (A)this; + } + + public A removeFromOperations(java.lang.String... items) { + if (this.operations == null) return (A)this; + for (String item : items) { this.operations.remove(item);} return (A)this; + } + + public A removeAllFromOperations(Collection items) { + if (this.operations == null) return (A)this; + for (String item : items) { this.operations.remove(item);} return (A)this; + } + + public List getOperations() { + return this.operations; + } + + public String getOperation(int index) { + return this.operations.get(index); + } + + public String getFirstOperation() { + return this.operations.get(0); + } + + public String getLastOperation() { + return this.operations.get(operations.size() - 1); + } + + public String getMatchingOperation(Predicate predicate) { + for (String item : operations) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingOperation(Predicate predicate) { + for (String item : operations) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withOperations(List operations) { + if (operations != null) { + this.operations = new ArrayList(); + for (String item : operations) { + this.addToOperations(item); + } + } else { + this.operations = null; + } + return (A) this; + } + + public A withOperations(java.lang.String... operations) { + if (this.operations != null) { + this.operations.clear(); + _visitables.remove("operations"); + } + if (operations != null) { + for (String item : operations) { + this.addToOperations(item); + } + } + return (A) this; + } + + public boolean hasOperations() { + return this.operations != null && !this.operations.isEmpty(); + } + + public A addToResourceNames(int index,String item) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + this.resourceNames.add(index, item); + return (A)this; + } + + public A setToResourceNames(int index,String item) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + this.resourceNames.set(index, item); return (A)this; + } + + public A addToResourceNames(java.lang.String... items) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + for (String item : items) {this.resourceNames.add(item);} return (A)this; + } + + public A addAllToResourceNames(Collection items) { + if (this.resourceNames == null) {this.resourceNames = new ArrayList();} + for (String item : items) {this.resourceNames.add(item);} return (A)this; + } + + public A removeFromResourceNames(java.lang.String... items) { + if (this.resourceNames == null) return (A)this; + for (String item : items) { this.resourceNames.remove(item);} return (A)this; + } + + public A removeAllFromResourceNames(Collection items) { + if (this.resourceNames == null) return (A)this; + for (String item : items) { this.resourceNames.remove(item);} return (A)this; + } + + public List getResourceNames() { + return this.resourceNames; + } + + public String getResourceName(int index) { + return this.resourceNames.get(index); + } + + public String getFirstResourceName() { + return this.resourceNames.get(0); + } + + public String getLastResourceName() { + return this.resourceNames.get(resourceNames.size() - 1); + } + + public String getMatchingResourceName(Predicate predicate) { + for (String item : resourceNames) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingResourceName(Predicate predicate) { + for (String item : resourceNames) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceNames(List resourceNames) { + if (resourceNames != null) { + this.resourceNames = new ArrayList(); + for (String item : resourceNames) { + this.addToResourceNames(item); + } + } else { + this.resourceNames = null; + } + return (A) this; + } + + public A withResourceNames(java.lang.String... resourceNames) { + if (this.resourceNames != null) { + this.resourceNames.clear(); + _visitables.remove("resourceNames"); + } + if (resourceNames != null) { + for (String item : resourceNames) { + this.addToResourceNames(item); + } + } + return (A) this; + } + + public boolean hasResourceNames() { + return this.resourceNames != null && !this.resourceNames.isEmpty(); + } + + public A addToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.add(index, item); + return (A)this; + } + + public A setToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.set(index, item); return (A)this; + } + + public A addToResources(java.lang.String... items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A addAllToResources(Collection items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A removeFromResources(java.lang.String... items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public A removeAllFromResources(Collection items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public List getResources() { + return this.resources; + } + + public String getResource(int index) { + return this.resources.get(index); + } + + public String getFirstResource() { + return this.resources.get(0); + } + + public String getLastResource() { + return this.resources.get(resources.size() - 1); + } + + public String getMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResources(List resources) { + if (resources != null) { + this.resources = new ArrayList(); + for (String item : resources) { + this.addToResources(item); + } + } else { + this.resources = null; + } + return (A) this; + } + + public A withResources(java.lang.String... resources) { + if (this.resources != null) { + this.resources.clear(); + _visitables.remove("resources"); + } + if (resources != null) { + for (String item : resources) { + this.addToResources(item); + } + } + return (A) this; + } + + public boolean hasResources() { + return this.resources != null && !this.resources.isEmpty(); + } + + public String getScope() { + return this.scope; + } + + public A withScope(String scope) { + this.scope = scope; + return (A) this; + } + + public boolean hasScope() { + return this.scope != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1NamedRuleWithOperationsFluent that = (V1alpha1NamedRuleWithOperationsFluent) o; + if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; + if (!java.util.Objects.equals(apiVersions, that.apiVersions)) return false; + if (!java.util.Objects.equals(operations, that.operations)) return false; + if (!java.util.Objects.equals(resourceNames, that.resourceNames)) return false; + if (!java.util.Objects.equals(resources, that.resources)) return false; + if (!java.util.Objects.equals(scope, that.scope)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroups, apiVersions, operations, resourceNames, resources, scope, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } + if (apiVersions != null && !apiVersions.isEmpty()) { sb.append("apiVersions:"); sb.append(apiVersions + ","); } + if (operations != null && !operations.isEmpty()) { sb.append("operations:"); sb.append(operations + ","); } + if (resourceNames != null && !resourceNames.isEmpty()) { sb.append("resourceNames:"); sb.append(resourceNames + ","); } + if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } + if (scope != null) { sb.append("scope:"); sb.append(scope); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindBuilder.java index 0104eca6f1..9afbf58e4e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ParamKindBuilder extends V1alpha1ParamKindFluentImpl implements VisitableBuilder{ +public class V1alpha1ParamKindBuilder extends V1alpha1ParamKindFluent implements VisitableBuilder{ public V1alpha1ParamKindBuilder() { - this(false); - } - public V1alpha1ParamKindBuilder(Boolean validationEnabled) { - this(new V1alpha1ParamKind(), validationEnabled); + this(new V1alpha1ParamKind()); } + public V1alpha1ParamKindBuilder(V1alpha1ParamKindFluent fluent) { - this(fluent, false); - } - public V1alpha1ParamKindBuilder(V1alpha1ParamKindFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ParamKind(), validationEnabled); + this(fluent, new V1alpha1ParamKind()); } + public V1alpha1ParamKindBuilder(V1alpha1ParamKindFluent fluent,V1alpha1ParamKind instance) { - this(fluent, instance, false); - } - public V1alpha1ParamKindBuilder(V1alpha1ParamKindFluent fluent,V1alpha1ParamKind instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ParamKindBuilder(V1alpha1ParamKind instance) { - this(instance,false); - } - public V1alpha1ParamKindBuilder(V1alpha1ParamKind instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ParamKindFluent fluent; - Boolean validationEnabled; + public V1alpha1ParamKind build() { V1alpha1ParamKind buildable = new V1alpha1ParamKind(); buildable.setApiVersion(fluent.getApiVersion()); @@ -46,4 +28,5 @@ public V1alpha1ParamKind build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindFluent.java index 6fa1e4ccfb..cbc9a83cde 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ParamKindFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ParamKindFluent> extends BaseFluent{ + public V1alpha1ParamKindFluent() { + } + public V1alpha1ParamKindFluent(V1alpha1ParamKind instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + + protected void copyInstance(V1alpha1ParamKind instance) { + instance = (instance != null ? instance : new V1alpha1ParamKind()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ParamKindFluent that = (V1alpha1ParamKindFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefBuilder.java index dc012ae2e6..6b2e4b3df5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefBuilder.java @@ -1,49 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ParamRefBuilder extends V1alpha1ParamRefFluentImpl implements VisitableBuilder{ +public class V1alpha1ParamRefBuilder extends V1alpha1ParamRefFluent implements VisitableBuilder{ public V1alpha1ParamRefBuilder() { - this(false); - } - public V1alpha1ParamRefBuilder(Boolean validationEnabled) { - this(new V1alpha1ParamRef(), validationEnabled); + this(new V1alpha1ParamRef()); } + public V1alpha1ParamRefBuilder(V1alpha1ParamRefFluent fluent) { - this(fluent, false); - } - public V1alpha1ParamRefBuilder(V1alpha1ParamRefFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ParamRef(), validationEnabled); + this(fluent, new V1alpha1ParamRef()); } + public V1alpha1ParamRefBuilder(V1alpha1ParamRefFluent fluent,V1alpha1ParamRef instance) { - this(fluent, instance, false); - } - public V1alpha1ParamRefBuilder(V1alpha1ParamRefFluent fluent,V1alpha1ParamRef instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ParamRefBuilder(V1alpha1ParamRef instance) { - this(instance,false); - } - public V1alpha1ParamRefBuilder(V1alpha1ParamRef instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ParamRefFluent fluent; - Boolean validationEnabled; + public V1alpha1ParamRef build() { V1alpha1ParamRef buildable = new V1alpha1ParamRef(); buildable.setName(fluent.getName()); buildable.setNamespace(fluent.getNamespace()); + buildable.setParameterNotFoundAction(fluent.getParameterNotFoundAction()); + buildable.setSelector(fluent.buildSelector()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefFluent.java index 0ffa29fe8b..682ef2e813 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefFluent.java @@ -1,19 +1,157 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ParamRefFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ParamRefFluent> extends BaseFluent{ + public V1alpha1ParamRefFluent() { + } + public V1alpha1ParamRefFluent(V1alpha1ParamRef instance) { + this.copyInstance(instance); + } + private String name; + private String namespace; + private String parameterNotFoundAction; + private V1LabelSelectorBuilder selector; + + protected void copyInstance(V1alpha1ParamRef instance) { + instance = (instance != null ? instance : new V1alpha1ParamRef()); + if (instance != null) { + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withParameterNotFoundAction(instance.getParameterNotFoundAction()); + this.withSelector(instance.getSelector()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public String getParameterNotFoundAction() { + return this.parameterNotFoundAction; + } + + public A withParameterNotFoundAction(String parameterNotFoundAction) { + this.parameterNotFoundAction = parameterNotFoundAction; + return (A) this; + } + + public boolean hasParameterNotFoundAction() { + return this.parameterNotFoundAction != null; + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); + } + + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ParamRefFluent that = (V1alpha1ParamRefFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(parameterNotFoundAction, that.parameterNotFoundAction)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, namespace, parameterNotFoundAction, selector, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (parameterNotFoundAction != null) { sb.append("parameterNotFoundAction:"); sb.append(parameterNotFoundAction + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector); } + sb.append("}"); + return sb.toString(); + } + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1alpha1ParamRefFluent.this.withSelector(builder.build()); + } + + public N endSelector() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefFluentImpl.java deleted file mode 100644 index 826dbf3ae3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamRefFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ParamRefFluentImpl> extends BaseFluent implements V1alpha1ParamRefFluent{ - public V1alpha1ParamRefFluentImpl() { - } - public V1alpha1ParamRefFluentImpl(V1alpha1ParamRef instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - } - private String name; - private String namespace; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ParamRefFluentImpl that = (V1alpha1ParamRefFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, namespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceBuilder.java index b84be44e11..8b2b920d22 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ParentReferenceBuilder extends V1alpha1ParentReferenceFluentImpl implements VisitableBuilder{ +public class V1alpha1ParentReferenceBuilder extends V1alpha1ParentReferenceFluent implements VisitableBuilder{ public V1alpha1ParentReferenceBuilder() { - this(false); - } - public V1alpha1ParentReferenceBuilder(Boolean validationEnabled) { - this(new V1alpha1ParentReference(), validationEnabled); + this(new V1alpha1ParentReference()); } + public V1alpha1ParentReferenceBuilder(V1alpha1ParentReferenceFluent fluent) { - this(fluent, false); - } - public V1alpha1ParentReferenceBuilder(V1alpha1ParentReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ParentReference(), validationEnabled); + this(fluent, new V1alpha1ParentReference()); } + public V1alpha1ParentReferenceBuilder(V1alpha1ParentReferenceFluent fluent,V1alpha1ParentReference instance) { - this(fluent, instance, false); - } - public V1alpha1ParentReferenceBuilder(V1alpha1ParentReferenceFluent fluent,V1alpha1ParentReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withGroup(instance.getGroup()); - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - fluent.withResource(instance.getResource()); - fluent.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ParentReferenceBuilder(V1alpha1ParentReference instance) { - this(instance,false); - } - public V1alpha1ParentReferenceBuilder(V1alpha1ParentReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withResource(instance.getResource()); - this.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ParentReferenceFluent fluent; - Boolean validationEnabled; + public V1alpha1ParentReference build() { V1alpha1ParentReference buildable = new V1alpha1ParentReference(); buildable.setGroup(fluent.getGroup()); @@ -55,4 +31,5 @@ public V1alpha1ParentReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceFluent.java index 2abc066a3c..cae3d5bc0e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceFluent.java @@ -1,28 +1,131 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ParentReferenceFluent> extends Fluent{ - public String getGroup(); - public A withGroup(String group); - public Boolean hasGroup(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); - public String getResource(); - public A withResource(String resource); - public Boolean hasResource(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ParentReferenceFluent> extends BaseFluent{ + public V1alpha1ParentReferenceFluent() { + } + public V1alpha1ParentReferenceFluent(V1alpha1ParentReference instance) { + this.copyInstance(instance); + } + private String group; + private String name; + private String namespace; + private String resource; + private String uid; + + protected void copyInstance(V1alpha1ParentReference instance) { + instance = (instance != null ? instance : new V1alpha1ParentReference()); + if (instance != null) { + this.withGroup(instance.getGroup()); + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withResource(instance.getResource()); + this.withUid(instance.getUid()); + } + } + + public String getGroup() { + return this.group; + } + + public A withGroup(String group) { + this.group = group; + return (A) this; + } + + public boolean hasGroup() { + return this.group != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public String getResource() { + return this.resource; + } + + public A withResource(String resource) { + this.resource = resource; + return (A) this; + } + + public boolean hasResource() { + return this.resource != null; + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ParentReferenceFluent that = (V1alpha1ParentReferenceFluent) o; + if (!java.util.Objects.equals(group, that.group)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(resource, that.resource)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(group, name, namespace, resource, uid, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (group != null) { sb.append("group:"); sb.append(group + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceFluentImpl.java deleted file mode 100644 index 50a607a1c2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParentReferenceFluentImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ParentReferenceFluentImpl> extends BaseFluent implements V1alpha1ParentReferenceFluent{ - public V1alpha1ParentReferenceFluentImpl() { - } - public V1alpha1ParentReferenceFluentImpl(V1alpha1ParentReference instance) { - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - this.withResource(instance.getResource()); - this.withUid(instance.getUid()); - } - } - private String group; - private String name; - private String namespace; - private String resource; - private String uid; - public String getGroup() { - return this.group; - } - public A withGroup(String group) { - this.group=group; return (A) this; - } - public Boolean hasGroup() { - return this.group != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public String getResource() { - return this.resource; - } - public A withResource(String resource) { - this.resource=resource; return (A) this; - } - public Boolean hasResource() { - return this.resource != null; - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ParentReferenceFluentImpl that = (V1alpha1ParentReferenceFluentImpl) o; - if (!java.util.Objects.equals(group, that.group)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - if (!java.util.Objects.equals(resource, that.resource)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(group, name, namespace, resource, uid, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (group != null) { sb.append("group:"); sb.append(group + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } - if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewBuilder.java index e5c4b2f821..d3c46e4405 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1SelfSubjectReviewBuilder extends V1alpha1SelfSubjectReviewFluentImpl implements VisitableBuilder{ +public class V1alpha1SelfSubjectReviewBuilder extends V1alpha1SelfSubjectReviewFluent implements VisitableBuilder{ public V1alpha1SelfSubjectReviewBuilder() { - this(false); - } - public V1alpha1SelfSubjectReviewBuilder(Boolean validationEnabled) { - this(new V1alpha1SelfSubjectReview(), validationEnabled); + this(new V1alpha1SelfSubjectReview()); } + public V1alpha1SelfSubjectReviewBuilder(V1alpha1SelfSubjectReviewFluent fluent) { - this(fluent, false); - } - public V1alpha1SelfSubjectReviewBuilder(V1alpha1SelfSubjectReviewFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1SelfSubjectReview(), validationEnabled); + this(fluent, new V1alpha1SelfSubjectReview()); } + public V1alpha1SelfSubjectReviewBuilder(V1alpha1SelfSubjectReviewFluent fluent,V1alpha1SelfSubjectReview instance) { - this(fluent, instance, false); - } - public V1alpha1SelfSubjectReviewBuilder(V1alpha1SelfSubjectReviewFluent fluent,V1alpha1SelfSubjectReview instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1SelfSubjectReviewBuilder(V1alpha1SelfSubjectReview instance) { - this(instance,false); - } - public V1alpha1SelfSubjectReviewBuilder(V1alpha1SelfSubjectReview instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1SelfSubjectReviewFluent fluent; - Boolean validationEnabled; + public V1alpha1SelfSubjectReview build() { V1alpha1SelfSubjectReview buildable = new V1alpha1SelfSubjectReview(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewFluent.java index f1d5330b90..708648ecdb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha1SelfSubjectReviewFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha1SelfSubjectReviewFluent.MetadataNested withNewMetadata(); - public V1alpha1SelfSubjectReviewFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha1SelfSubjectReviewFluent.MetadataNested editMetadata(); - public V1alpha1SelfSubjectReviewFluent.MetadataNested editOrNewMetadata(); - public V1alpha1SelfSubjectReviewFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1SelfSubjectReviewStatus getStatus(); - public V1alpha1SelfSubjectReviewStatus buildStatus(); - public A withStatus(V1alpha1SelfSubjectReviewStatus status); - public Boolean hasStatus(); - public V1alpha1SelfSubjectReviewFluent.StatusNested withNewStatus(); - public V1alpha1SelfSubjectReviewFluent.StatusNested withNewStatusLike(V1alpha1SelfSubjectReviewStatus item); - public V1alpha1SelfSubjectReviewFluent.StatusNested editStatus(); - public V1alpha1SelfSubjectReviewFluent.StatusNested editOrNewStatus(); - public V1alpha1SelfSubjectReviewFluent.StatusNested editOrNewStatusLike(V1alpha1SelfSubjectReviewStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1SelfSubjectReviewFluent> extends BaseFluent{ + public V1alpha1SelfSubjectReviewFluent() { + } + + public V1alpha1SelfSubjectReviewFluent(V1alpha1SelfSubjectReview instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha1SelfSubjectReviewStatusBuilder status; + + protected void copyInstance(V1alpha1SelfSubjectReview instance) { + instance = (instance != null ? instance : new V1alpha1SelfSubjectReview()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface StatusNested extends Nested,V1alpha1SelfSubjectReviewStatusFluent>{ - public N and(); - public N endStatus(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha1SelfSubjectReviewStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1alpha1SelfSubjectReviewStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1alpha1SelfSubjectReviewStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1alpha1SelfSubjectReviewStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1alpha1SelfSubjectReviewStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1alpha1SelfSubjectReviewStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1SelfSubjectReviewFluent that = (V1alpha1SelfSubjectReviewFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha1SelfSubjectReviewFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class StatusNested extends V1alpha1SelfSubjectReviewStatusFluent> implements Nested{ + StatusNested(V1alpha1SelfSubjectReviewStatus item) { + this.builder = new V1alpha1SelfSubjectReviewStatusBuilder(this, item); + } + V1alpha1SelfSubjectReviewStatusBuilder builder; + + public N and() { + return (N) V1alpha1SelfSubjectReviewFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewFluentImpl.java deleted file mode 100644 index 8336b6beb8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1SelfSubjectReviewFluentImpl> extends BaseFluent implements V1alpha1SelfSubjectReviewFluent{ - public V1alpha1SelfSubjectReviewFluentImpl() { - } - public V1alpha1SelfSubjectReviewFluentImpl(V1alpha1SelfSubjectReview instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha1SelfSubjectReviewStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha1SelfSubjectReviewFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha1SelfSubjectReviewFluentImpl.MetadataNestedImpl(); - } - public V1alpha1SelfSubjectReviewFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha1SelfSubjectReviewFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1SelfSubjectReviewFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1SelfSubjectReviewFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha1SelfSubjectReviewFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1SelfSubjectReviewStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1alpha1SelfSubjectReviewStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1alpha1SelfSubjectReviewStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1alpha1SelfSubjectReviewStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1alpha1SelfSubjectReviewFluentImpl.StatusNested withNewStatus() { - return new V1alpha1SelfSubjectReviewFluentImpl.StatusNestedImpl(); - } - public V1alpha1SelfSubjectReviewFluentImpl.StatusNested withNewStatusLike(V1alpha1SelfSubjectReviewStatus item) { - return new V1alpha1SelfSubjectReviewFluentImpl.StatusNestedImpl(item); - } - public V1alpha1SelfSubjectReviewFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1alpha1SelfSubjectReviewFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1alpha1SelfSubjectReviewStatusBuilder().build()); - } - public V1alpha1SelfSubjectReviewFluentImpl.StatusNested editOrNewStatusLike(V1alpha1SelfSubjectReviewStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1SelfSubjectReviewFluentImpl that = (V1alpha1SelfSubjectReviewFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha1SelfSubjectReviewFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha1SelfSubjectReviewFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class StatusNestedImpl extends V1alpha1SelfSubjectReviewStatusFluentImpl> implements V1alpha1SelfSubjectReviewFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1alpha1SelfSubjectReviewStatus item) { - this.builder = new V1alpha1SelfSubjectReviewStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1alpha1SelfSubjectReviewStatusBuilder(this); - } - V1alpha1SelfSubjectReviewStatusBuilder builder; - public N and() { - return (N) V1alpha1SelfSubjectReviewFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusBuilder.java index 9a9a92ef93..3f0f22a8ee 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1SelfSubjectReviewStatusBuilder extends V1alpha1SelfSubjectReviewStatusFluentImpl implements VisitableBuilder{ +public class V1alpha1SelfSubjectReviewStatusBuilder extends V1alpha1SelfSubjectReviewStatusFluent implements VisitableBuilder{ public V1alpha1SelfSubjectReviewStatusBuilder() { - this(false); - } - public V1alpha1SelfSubjectReviewStatusBuilder(Boolean validationEnabled) { - this(new V1alpha1SelfSubjectReviewStatus(), validationEnabled); + this(new V1alpha1SelfSubjectReviewStatus()); } + public V1alpha1SelfSubjectReviewStatusBuilder(V1alpha1SelfSubjectReviewStatusFluent fluent) { - this(fluent, false); - } - public V1alpha1SelfSubjectReviewStatusBuilder(V1alpha1SelfSubjectReviewStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1SelfSubjectReviewStatus(), validationEnabled); + this(fluent, new V1alpha1SelfSubjectReviewStatus()); } + public V1alpha1SelfSubjectReviewStatusBuilder(V1alpha1SelfSubjectReviewStatusFluent fluent,V1alpha1SelfSubjectReviewStatus instance) { - this(fluent, instance, false); - } - public V1alpha1SelfSubjectReviewStatusBuilder(V1alpha1SelfSubjectReviewStatusFluent fluent,V1alpha1SelfSubjectReviewStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withUserInfo(instance.getUserInfo()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1SelfSubjectReviewStatusBuilder(V1alpha1SelfSubjectReviewStatus instance) { - this(instance,false); - } - public V1alpha1SelfSubjectReviewStatusBuilder(V1alpha1SelfSubjectReviewStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withUserInfo(instance.getUserInfo()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1SelfSubjectReviewStatusFluent fluent; - Boolean validationEnabled; + public V1alpha1SelfSubjectReviewStatus build() { V1alpha1SelfSubjectReviewStatus buildable = new V1alpha1SelfSubjectReviewStatus(); - buildable.setUserInfo(fluent.getUserInfo()); + buildable.setUserInfo(fluent.buildUserInfo()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusFluent.java index 9023c5ac5e..769322bb03 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1alpha1SelfSubjectReviewStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildUserInfo instead. - * @return The buildable object. - */ - @Deprecated - public V1UserInfo getUserInfo(); - public V1UserInfo buildUserInfo(); - public A withUserInfo(V1UserInfo userInfo); - public Boolean hasUserInfo(); - public V1alpha1SelfSubjectReviewStatusFluent.UserInfoNested withNewUserInfo(); - public V1alpha1SelfSubjectReviewStatusFluent.UserInfoNested withNewUserInfoLike(V1UserInfo item); - public V1alpha1SelfSubjectReviewStatusFluent.UserInfoNested editUserInfo(); - public V1alpha1SelfSubjectReviewStatusFluent.UserInfoNested editOrNewUserInfo(); - public V1alpha1SelfSubjectReviewStatusFluent.UserInfoNested editOrNewUserInfoLike(V1UserInfo item); - public interface UserInfoNested extends Nested,V1UserInfoFluent>{ - public N and(); - public N endUserInfo(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1SelfSubjectReviewStatusFluent> extends BaseFluent{ + public V1alpha1SelfSubjectReviewStatusFluent() { + } + + public V1alpha1SelfSubjectReviewStatusFluent(V1alpha1SelfSubjectReviewStatus instance) { + this.copyInstance(instance); + } + private V1UserInfoBuilder userInfo; + + protected void copyInstance(V1alpha1SelfSubjectReviewStatus instance) { + instance = (instance != null ? instance : new V1alpha1SelfSubjectReviewStatus()); + if (instance != null) { + this.withUserInfo(instance.getUserInfo()); + } + } + + public V1UserInfo buildUserInfo() { + return this.userInfo != null ? this.userInfo.build() : null; + } + + public A withUserInfo(V1UserInfo userInfo) { + this._visitables.remove("userInfo"); + if (userInfo != null) { + this.userInfo = new V1UserInfoBuilder(userInfo); + this._visitables.get("userInfo").add(this.userInfo); + } else { + this.userInfo = null; + this._visitables.get("userInfo").remove(this.userInfo); + } + return (A) this; + } + + public boolean hasUserInfo() { + return this.userInfo != null; + } + + public UserInfoNested withNewUserInfo() { + return new UserInfoNested(null); + } + + public UserInfoNested withNewUserInfoLike(V1UserInfo item) { + return new UserInfoNested(item); + } + + public UserInfoNested editUserInfo() { + return withNewUserInfoLike(java.util.Optional.ofNullable(buildUserInfo()).orElse(null)); + } + + public UserInfoNested editOrNewUserInfo() { + return withNewUserInfoLike(java.util.Optional.ofNullable(buildUserInfo()).orElse(new V1UserInfoBuilder().build())); + } + + public UserInfoNested editOrNewUserInfoLike(V1UserInfo item) { + return withNewUserInfoLike(java.util.Optional.ofNullable(buildUserInfo()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1SelfSubjectReviewStatusFluent that = (V1alpha1SelfSubjectReviewStatusFluent) o; + if (!java.util.Objects.equals(userInfo, that.userInfo)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(userInfo, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (userInfo != null) { sb.append("userInfo:"); sb.append(userInfo); } + sb.append("}"); + return sb.toString(); } + public class UserInfoNested extends V1UserInfoFluent> implements Nested{ + UserInfoNested(V1UserInfo item) { + this.builder = new V1UserInfoBuilder(this, item); + } + V1UserInfoBuilder builder; + + public N and() { + return (N) V1alpha1SelfSubjectReviewStatusFluent.this.withUserInfo(builder.build()); + } + + public N endUserInfo() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusFluentImpl.java deleted file mode 100644 index 6a23620c37..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1SelfSubjectReviewStatusFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1SelfSubjectReviewStatusFluentImpl> extends BaseFluent implements V1alpha1SelfSubjectReviewStatusFluent{ - public V1alpha1SelfSubjectReviewStatusFluentImpl() { - } - public V1alpha1SelfSubjectReviewStatusFluentImpl(V1alpha1SelfSubjectReviewStatus instance) { - if (instance != null) { - this.withUserInfo(instance.getUserInfo()); - } - } - private V1UserInfoBuilder userInfo; - - /** - * This method has been deprecated, please use method buildUserInfo instead. - * @return The buildable object. - */ - @Deprecated - public V1UserInfo getUserInfo() { - return this.userInfo!=null ?this.userInfo.build():null; - } - public V1UserInfo buildUserInfo() { - return this.userInfo!=null ?this.userInfo.build():null; - } - public A withUserInfo(V1UserInfo userInfo) { - _visitables.get("userInfo").remove(this.userInfo); - if (userInfo!=null){ this.userInfo= new V1UserInfoBuilder(userInfo); _visitables.get("userInfo").add(this.userInfo);} else { this.userInfo = null; _visitables.get("userInfo").remove(this.userInfo); } return (A) this; - } - public Boolean hasUserInfo() { - return this.userInfo != null; - } - public V1alpha1SelfSubjectReviewStatusFluentImpl.UserInfoNested withNewUserInfo() { - return new V1alpha1SelfSubjectReviewStatusFluentImpl.UserInfoNestedImpl(); - } - public V1alpha1SelfSubjectReviewStatusFluentImpl.UserInfoNested withNewUserInfoLike(V1UserInfo item) { - return new V1alpha1SelfSubjectReviewStatusFluentImpl.UserInfoNestedImpl(item); - } - public V1alpha1SelfSubjectReviewStatusFluentImpl.UserInfoNested editUserInfo() { - return withNewUserInfoLike(getUserInfo()); - } - public V1alpha1SelfSubjectReviewStatusFluentImpl.UserInfoNested editOrNewUserInfo() { - return withNewUserInfoLike(getUserInfo() != null ? getUserInfo(): new V1UserInfoBuilder().build()); - } - public V1alpha1SelfSubjectReviewStatusFluentImpl.UserInfoNested editOrNewUserInfoLike(V1UserInfo item) { - return withNewUserInfoLike(getUserInfo() != null ? getUserInfo(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1SelfSubjectReviewStatusFluentImpl that = (V1alpha1SelfSubjectReviewStatusFluentImpl) o; - if (!java.util.Objects.equals(userInfo, that.userInfo)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(userInfo, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (userInfo != null) { sb.append("userInfo:"); sb.append(userInfo); } - sb.append("}"); - return sb.toString(); - } - class UserInfoNestedImpl extends V1UserInfoFluentImpl> implements V1alpha1SelfSubjectReviewStatusFluentImpl.UserInfoNested,Nested{ - UserInfoNestedImpl(V1UserInfo item) { - this.builder = new V1UserInfoBuilder(this, item); - } - UserInfoNestedImpl() { - this.builder = new V1UserInfoBuilder(this); - } - V1UserInfoBuilder builder; - public N and() { - return (N) V1alpha1SelfSubjectReviewStatusFluentImpl.this.withUserInfo(builder.build()); - } - public N endUserInfo() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionBuilder.java index 1e878c741b..5bf9747028 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionBuilder.java @@ -1,52 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ServerStorageVersionBuilder extends V1alpha1ServerStorageVersionFluentImpl implements VisitableBuilder{ +public class V1alpha1ServerStorageVersionBuilder extends V1alpha1ServerStorageVersionFluent implements VisitableBuilder{ public V1alpha1ServerStorageVersionBuilder() { - this(false); - } - public V1alpha1ServerStorageVersionBuilder(Boolean validationEnabled) { - this(new V1alpha1ServerStorageVersion(), validationEnabled); + this(new V1alpha1ServerStorageVersion()); } + public V1alpha1ServerStorageVersionBuilder(V1alpha1ServerStorageVersionFluent fluent) { - this(fluent, false); - } - public V1alpha1ServerStorageVersionBuilder(V1alpha1ServerStorageVersionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ServerStorageVersion(), validationEnabled); + this(fluent, new V1alpha1ServerStorageVersion()); } + public V1alpha1ServerStorageVersionBuilder(V1alpha1ServerStorageVersionFluent fluent,V1alpha1ServerStorageVersion instance) { - this(fluent, instance, false); - } - public V1alpha1ServerStorageVersionBuilder(V1alpha1ServerStorageVersionFluent fluent,V1alpha1ServerStorageVersion instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiServerID(instance.getApiServerID()); - fluent.withDecodableVersions(instance.getDecodableVersions()); - fluent.withEncodingVersion(instance.getEncodingVersion()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ServerStorageVersionBuilder(V1alpha1ServerStorageVersion instance) { - this(instance,false); - } - public V1alpha1ServerStorageVersionBuilder(V1alpha1ServerStorageVersion instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiServerID(instance.getApiServerID()); - this.withDecodableVersions(instance.getDecodableVersions()); - this.withEncodingVersion(instance.getEncodingVersion()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ServerStorageVersionFluent fluent; - Boolean validationEnabled; + public V1alpha1ServerStorageVersion build() { V1alpha1ServerStorageVersion buildable = new V1alpha1ServerStorageVersion(); buildable.setApiServerID(fluent.getApiServerID()); buildable.setDecodableVersions(fluent.getDecodableVersions()); buildable.setEncodingVersion(fluent.getEncodingVersion()); + buildable.setServedVersions(fluent.getServedVersions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionFluent.java index 0228a75162..73fcec1729 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionFluent.java @@ -1,38 +1,280 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1alpha1ServerStorageVersionFluent> extends Fluent{ - public String getApiServerID(); - public A withApiServerID(String apiServerID); - public Boolean hasApiServerID(); - public A addToDecodableVersions(int index,String item); - public A setToDecodableVersions(int index,String item); - public A addToDecodableVersions(java.lang.String... items); - public A addAllToDecodableVersions(Collection items); - public A removeFromDecodableVersions(java.lang.String... items); - public A removeAllFromDecodableVersions(Collection items); - public List getDecodableVersions(); - public String getDecodableVersion(int index); - public String getFirstDecodableVersion(); - public String getLastDecodableVersion(); - public String getMatchingDecodableVersion(Predicate predicate); - public Boolean hasMatchingDecodableVersion(Predicate predicate); - public A withDecodableVersions(List decodableVersions); - public A withDecodableVersions(java.lang.String... decodableVersions); - public Boolean hasDecodableVersions(); - public String getEncodingVersion(); - public A withEncodingVersion(String encodingVersion); - public Boolean hasEncodingVersion(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ServerStorageVersionFluent> extends BaseFluent{ + public V1alpha1ServerStorageVersionFluent() { + } + public V1alpha1ServerStorageVersionFluent(V1alpha1ServerStorageVersion instance) { + this.copyInstance(instance); + } + private String apiServerID; + private List decodableVersions; + private String encodingVersion; + private List servedVersions; + + protected void copyInstance(V1alpha1ServerStorageVersion instance) { + instance = (instance != null ? instance : new V1alpha1ServerStorageVersion()); + if (instance != null) { + this.withApiServerID(instance.getApiServerID()); + this.withDecodableVersions(instance.getDecodableVersions()); + this.withEncodingVersion(instance.getEncodingVersion()); + this.withServedVersions(instance.getServedVersions()); + } + } + + public String getApiServerID() { + return this.apiServerID; + } + + public A withApiServerID(String apiServerID) { + this.apiServerID = apiServerID; + return (A) this; + } + + public boolean hasApiServerID() { + return this.apiServerID != null; + } + + public A addToDecodableVersions(int index,String item) { + if (this.decodableVersions == null) {this.decodableVersions = new ArrayList();} + this.decodableVersions.add(index, item); + return (A)this; + } + + public A setToDecodableVersions(int index,String item) { + if (this.decodableVersions == null) {this.decodableVersions = new ArrayList();} + this.decodableVersions.set(index, item); return (A)this; + } + + public A addToDecodableVersions(java.lang.String... items) { + if (this.decodableVersions == null) {this.decodableVersions = new ArrayList();} + for (String item : items) {this.decodableVersions.add(item);} return (A)this; + } + + public A addAllToDecodableVersions(Collection items) { + if (this.decodableVersions == null) {this.decodableVersions = new ArrayList();} + for (String item : items) {this.decodableVersions.add(item);} return (A)this; + } + + public A removeFromDecodableVersions(java.lang.String... items) { + if (this.decodableVersions == null) return (A)this; + for (String item : items) { this.decodableVersions.remove(item);} return (A)this; + } + + public A removeAllFromDecodableVersions(Collection items) { + if (this.decodableVersions == null) return (A)this; + for (String item : items) { this.decodableVersions.remove(item);} return (A)this; + } + + public List getDecodableVersions() { + return this.decodableVersions; + } + + public String getDecodableVersion(int index) { + return this.decodableVersions.get(index); + } + + public String getFirstDecodableVersion() { + return this.decodableVersions.get(0); + } + + public String getLastDecodableVersion() { + return this.decodableVersions.get(decodableVersions.size() - 1); + } + + public String getMatchingDecodableVersion(Predicate predicate) { + for (String item : decodableVersions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingDecodableVersion(Predicate predicate) { + for (String item : decodableVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withDecodableVersions(List decodableVersions) { + if (decodableVersions != null) { + this.decodableVersions = new ArrayList(); + for (String item : decodableVersions) { + this.addToDecodableVersions(item); + } + } else { + this.decodableVersions = null; + } + return (A) this; + } + + public A withDecodableVersions(java.lang.String... decodableVersions) { + if (this.decodableVersions != null) { + this.decodableVersions.clear(); + _visitables.remove("decodableVersions"); + } + if (decodableVersions != null) { + for (String item : decodableVersions) { + this.addToDecodableVersions(item); + } + } + return (A) this; + } + + public boolean hasDecodableVersions() { + return this.decodableVersions != null && !this.decodableVersions.isEmpty(); + } + + public String getEncodingVersion() { + return this.encodingVersion; + } + + public A withEncodingVersion(String encodingVersion) { + this.encodingVersion = encodingVersion; + return (A) this; + } + + public boolean hasEncodingVersion() { + return this.encodingVersion != null; + } + + public A addToServedVersions(int index,String item) { + if (this.servedVersions == null) {this.servedVersions = new ArrayList();} + this.servedVersions.add(index, item); + return (A)this; + } + + public A setToServedVersions(int index,String item) { + if (this.servedVersions == null) {this.servedVersions = new ArrayList();} + this.servedVersions.set(index, item); return (A)this; + } + + public A addToServedVersions(java.lang.String... items) { + if (this.servedVersions == null) {this.servedVersions = new ArrayList();} + for (String item : items) {this.servedVersions.add(item);} return (A)this; + } + + public A addAllToServedVersions(Collection items) { + if (this.servedVersions == null) {this.servedVersions = new ArrayList();} + for (String item : items) {this.servedVersions.add(item);} return (A)this; + } + + public A removeFromServedVersions(java.lang.String... items) { + if (this.servedVersions == null) return (A)this; + for (String item : items) { this.servedVersions.remove(item);} return (A)this; + } + + public A removeAllFromServedVersions(Collection items) { + if (this.servedVersions == null) return (A)this; + for (String item : items) { this.servedVersions.remove(item);} return (A)this; + } + + public List getServedVersions() { + return this.servedVersions; + } + + public String getServedVersion(int index) { + return this.servedVersions.get(index); + } + + public String getFirstServedVersion() { + return this.servedVersions.get(0); + } + + public String getLastServedVersion() { + return this.servedVersions.get(servedVersions.size() - 1); + } + + public String getMatchingServedVersion(Predicate predicate) { + for (String item : servedVersions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingServedVersion(Predicate predicate) { + for (String item : servedVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withServedVersions(List servedVersions) { + if (servedVersions != null) { + this.servedVersions = new ArrayList(); + for (String item : servedVersions) { + this.addToServedVersions(item); + } + } else { + this.servedVersions = null; + } + return (A) this; + } + + public A withServedVersions(java.lang.String... servedVersions) { + if (this.servedVersions != null) { + this.servedVersions.clear(); + _visitables.remove("servedVersions"); + } + if (servedVersions != null) { + for (String item : servedVersions) { + this.addToServedVersions(item); + } + } + return (A) this; + } + + public boolean hasServedVersions() { + return this.servedVersions != null && !this.servedVersions.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ServerStorageVersionFluent that = (V1alpha1ServerStorageVersionFluent) o; + if (!java.util.Objects.equals(apiServerID, that.apiServerID)) return false; + if (!java.util.Objects.equals(decodableVersions, that.decodableVersions)) return false; + if (!java.util.Objects.equals(encodingVersion, that.encodingVersion)) return false; + if (!java.util.Objects.equals(servedVersions, that.servedVersions)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiServerID, decodableVersions, encodingVersion, servedVersions, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiServerID != null) { sb.append("apiServerID:"); sb.append(apiServerID + ","); } + if (decodableVersions != null && !decodableVersions.isEmpty()) { sb.append("decodableVersions:"); sb.append(decodableVersions + ","); } + if (encodingVersion != null) { sb.append("encodingVersion:"); sb.append(encodingVersion + ","); } + if (servedVersions != null && !servedVersions.isEmpty()) { sb.append("servedVersions:"); sb.append(servedVersions); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionFluentImpl.java deleted file mode 100644 index 4988840aeb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ServerStorageVersionFluentImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ServerStorageVersionFluentImpl> extends BaseFluent implements V1alpha1ServerStorageVersionFluent{ - public V1alpha1ServerStorageVersionFluentImpl() { - } - public V1alpha1ServerStorageVersionFluentImpl(V1alpha1ServerStorageVersion instance) { - if (instance != null) { - this.withApiServerID(instance.getApiServerID()); - this.withDecodableVersions(instance.getDecodableVersions()); - this.withEncodingVersion(instance.getEncodingVersion()); - } - } - private String apiServerID; - private List decodableVersions; - private String encodingVersion; - public String getApiServerID() { - return this.apiServerID; - } - public A withApiServerID(String apiServerID) { - this.apiServerID=apiServerID; return (A) this; - } - public Boolean hasApiServerID() { - return this.apiServerID != null; - } - public A addToDecodableVersions(int index,String item) { - if (this.decodableVersions == null) {this.decodableVersions = new ArrayList();} - this.decodableVersions.add(index, item); - return (A)this; - } - public A setToDecodableVersions(int index,String item) { - if (this.decodableVersions == null) {this.decodableVersions = new ArrayList();} - this.decodableVersions.set(index, item); return (A)this; - } - public A addToDecodableVersions(java.lang.String... items) { - if (this.decodableVersions == null) {this.decodableVersions = new ArrayList();} - for (String item : items) {this.decodableVersions.add(item);} return (A)this; - } - public A addAllToDecodableVersions(Collection items) { - if (this.decodableVersions == null) {this.decodableVersions = new ArrayList();} - for (String item : items) {this.decodableVersions.add(item);} return (A)this; - } - public A removeFromDecodableVersions(java.lang.String... items) { - for (String item : items) {if (this.decodableVersions!= null){ this.decodableVersions.remove(item);}} return (A)this; - } - public A removeAllFromDecodableVersions(Collection items) { - for (String item : items) {if (this.decodableVersions!= null){ this.decodableVersions.remove(item);}} return (A)this; - } - public List getDecodableVersions() { - return this.decodableVersions; - } - public String getDecodableVersion(int index) { - return this.decodableVersions.get(index); - } - public String getFirstDecodableVersion() { - return this.decodableVersions.get(0); - } - public String getLastDecodableVersion() { - return this.decodableVersions.get(decodableVersions.size() - 1); - } - public String getMatchingDecodableVersion(Predicate predicate) { - for (String item: decodableVersions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingDecodableVersion(Predicate predicate) { - for (String item: decodableVersions) { if(predicate.test(item)){ return true;} } return false; - } - public A withDecodableVersions(List decodableVersions) { - if (decodableVersions != null) {this.decodableVersions = new ArrayList(); for (String item : decodableVersions){this.addToDecodableVersions(item);}} else { this.decodableVersions = null;} return (A) this; - } - public A withDecodableVersions(java.lang.String... decodableVersions) { - if (this.decodableVersions != null) {this.decodableVersions.clear(); _visitables.remove("decodableVersions"); } - if (decodableVersions != null) {for (String item :decodableVersions){ this.addToDecodableVersions(item);}} return (A) this; - } - public Boolean hasDecodableVersions() { - return decodableVersions != null && !decodableVersions.isEmpty(); - } - public String getEncodingVersion() { - return this.encodingVersion; - } - public A withEncodingVersion(String encodingVersion) { - this.encodingVersion=encodingVersion; return (A) this; - } - public Boolean hasEncodingVersion() { - return this.encodingVersion != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ServerStorageVersionFluentImpl that = (V1alpha1ServerStorageVersionFluentImpl) o; - if (!java.util.Objects.equals(apiServerID, that.apiServerID)) return false; - - if (!java.util.Objects.equals(decodableVersions, that.decodableVersions)) return false; - - if (!java.util.Objects.equals(encodingVersion, that.encodingVersion)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiServerID, decodableVersions, encodingVersion, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiServerID != null) { sb.append("apiServerID:"); sb.append(apiServerID + ","); } - if (decodableVersions != null && !decodableVersions.isEmpty()) { sb.append("decodableVersions:"); sb.append(decodableVersions + ","); } - if (encodingVersion != null) { sb.append("encodingVersion:"); sb.append(encodingVersion); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionBuilder.java index d4c9fbe0d3..6eab0ecbec 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1StorageVersionBuilder extends V1alpha1StorageVersionFluentImpl implements VisitableBuilder{ +public class V1alpha1StorageVersionBuilder extends V1alpha1StorageVersionFluent implements VisitableBuilder{ public V1alpha1StorageVersionBuilder() { - this(false); - } - public V1alpha1StorageVersionBuilder(Boolean validationEnabled) { - this(new V1alpha1StorageVersion(), validationEnabled); + this(new V1alpha1StorageVersion()); } + public V1alpha1StorageVersionBuilder(V1alpha1StorageVersionFluent fluent) { - this(fluent, false); - } - public V1alpha1StorageVersionBuilder(V1alpha1StorageVersionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1StorageVersion(), validationEnabled); + this(fluent, new V1alpha1StorageVersion()); } + public V1alpha1StorageVersionBuilder(V1alpha1StorageVersionFluent fluent,V1alpha1StorageVersion instance) { - this(fluent, instance, false); - } - public V1alpha1StorageVersionBuilder(V1alpha1StorageVersionFluent fluent,V1alpha1StorageVersion instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1StorageVersionBuilder(V1alpha1StorageVersion instance) { - this(instance,false); - } - public V1alpha1StorageVersionBuilder(V1alpha1StorageVersion instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1StorageVersionFluent fluent; - Boolean validationEnabled; + public V1alpha1StorageVersion build() { V1alpha1StorageVersion buildable = new V1alpha1StorageVersion(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionBuilder.java index bff9e8cb54..0cfa69d91e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionBuilder.java @@ -1,52 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1StorageVersionConditionBuilder extends V1alpha1StorageVersionConditionFluentImpl implements VisitableBuilder{ +public class V1alpha1StorageVersionConditionBuilder extends V1alpha1StorageVersionConditionFluent implements VisitableBuilder{ public V1alpha1StorageVersionConditionBuilder() { - this(false); - } - public V1alpha1StorageVersionConditionBuilder(Boolean validationEnabled) { - this(new V1alpha1StorageVersionCondition(), validationEnabled); + this(new V1alpha1StorageVersionCondition()); } + public V1alpha1StorageVersionConditionBuilder(V1alpha1StorageVersionConditionFluent fluent) { - this(fluent, false); - } - public V1alpha1StorageVersionConditionBuilder(V1alpha1StorageVersionConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1StorageVersionCondition(), validationEnabled); + this(fluent, new V1alpha1StorageVersionCondition()); } + public V1alpha1StorageVersionConditionBuilder(V1alpha1StorageVersionConditionFluent fluent,V1alpha1StorageVersionCondition instance) { - this(fluent, instance, false); - } - public V1alpha1StorageVersionConditionBuilder(V1alpha1StorageVersionConditionFluent fluent,V1alpha1StorageVersionCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1StorageVersionConditionBuilder(V1alpha1StorageVersionCondition instance) { - this(instance,false); - } - public V1alpha1StorageVersionConditionBuilder(V1alpha1StorageVersionCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1StorageVersionConditionFluent fluent; - Boolean validationEnabled; + public V1alpha1StorageVersionCondition build() { V1alpha1StorageVersionCondition buildable = new V1alpha1StorageVersionCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -58,4 +32,5 @@ public V1alpha1StorageVersionCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionFluent.java index ef8dfeabfb..bb0e3c2880 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionFluent.java @@ -1,33 +1,150 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1StorageVersionConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1StorageVersionConditionFluent> extends BaseFluent{ + public V1alpha1StorageVersionConditionFluent() { + } + public V1alpha1StorageVersionConditionFluent(V1alpha1StorageVersionCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private Long observedGeneration; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1alpha1StorageVersionCondition instance) { + instance = (instance != null ? instance : new V1alpha1StorageVersionCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withObservedGeneration(instance.getObservedGeneration()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public Long getObservedGeneration() { + return this.observedGeneration; + } + + public A withObservedGeneration(Long observedGeneration) { + this.observedGeneration = observedGeneration; + return (A) this; + } + + public boolean hasObservedGeneration() { + return this.observedGeneration != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1StorageVersionConditionFluent that = (V1alpha1StorageVersionConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, observedGeneration, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionFluentImpl.java deleted file mode 100644 index 7d2af8ccdd..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionConditionFluentImpl.java +++ /dev/null @@ -1,123 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Long; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1StorageVersionConditionFluentImpl> extends BaseFluent implements V1alpha1StorageVersionConditionFluent{ - public V1alpha1StorageVersionConditionFluentImpl() { - } - public V1alpha1StorageVersionConditionFluentImpl(V1alpha1StorageVersionCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private Long observedGeneration; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public Long getObservedGeneration() { - return this.observedGeneration; - } - public A withObservedGeneration(Long observedGeneration) { - this.observedGeneration=observedGeneration; return (A) this; - } - public Boolean hasObservedGeneration() { - return this.observedGeneration != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1StorageVersionConditionFluentImpl that = (V1alpha1StorageVersionConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, observedGeneration, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionFluent.java index 51f18b0f8a..1a1ec6f5ea 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionFluent.java @@ -1,65 +1,217 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1StorageVersionFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha1StorageVersionFluent.MetadataNested withNewMetadata(); - public V1alpha1StorageVersionFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha1StorageVersionFluent.MetadataNested editMetadata(); - public V1alpha1StorageVersionFluent.MetadataNested editOrNewMetadata(); - public V1alpha1StorageVersionFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - public Object getSpec(); - public A withSpec(Object spec); - public Boolean hasSpec(); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1StorageVersionStatus getStatus(); - public V1alpha1StorageVersionStatus buildStatus(); - public A withStatus(V1alpha1StorageVersionStatus status); - public Boolean hasStatus(); - public V1alpha1StorageVersionFluent.StatusNested withNewStatus(); - public V1alpha1StorageVersionFluent.StatusNested withNewStatusLike(V1alpha1StorageVersionStatus item); - public V1alpha1StorageVersionFluent.StatusNested editStatus(); - public V1alpha1StorageVersionFluent.StatusNested editOrNewStatus(); - public V1alpha1StorageVersionFluent.StatusNested editOrNewStatusLike(V1alpha1StorageVersionStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1StorageVersionFluent> extends BaseFluent{ + public V1alpha1StorageVersionFluent() { + } + + public V1alpha1StorageVersionFluent(V1alpha1StorageVersion instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private Object spec; + private V1alpha1StorageVersionStatusBuilder status; + + protected void copyInstance(V1alpha1StorageVersion instance) { + instance = (instance != null ? instance : new V1alpha1StorageVersion()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public Object getSpec() { + return this.spec; } - public interface StatusNested extends Nested,V1alpha1StorageVersionStatusFluent>{ - public N and(); - public N endStatus(); + + public A withSpec(Object spec) { + this.spec = spec; + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public V1alpha1StorageVersionStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1alpha1StorageVersionStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1alpha1StorageVersionStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1alpha1StorageVersionStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1alpha1StorageVersionStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1alpha1StorageVersionStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1StorageVersionFluent that = (V1alpha1StorageVersionFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + public N and() { + return (N) V1alpha1StorageVersionFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + public class StatusNested extends V1alpha1StorageVersionStatusFluent> implements Nested{ + StatusNested(V1alpha1StorageVersionStatus item) { + this.builder = new V1alpha1StorageVersionStatusBuilder(this, item); + } + V1alpha1StorageVersionStatusBuilder builder; + + public N and() { + return (N) V1alpha1StorageVersionFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionFluentImpl.java deleted file mode 100644 index 01bdf54b2c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionFluentImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1StorageVersionFluentImpl> extends BaseFluent implements V1alpha1StorageVersionFluent{ - public V1alpha1StorageVersionFluentImpl() { - } - public V1alpha1StorageVersionFluentImpl(V1alpha1StorageVersion instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private Object spec; - private V1alpha1StorageVersionStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha1StorageVersionFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha1StorageVersionFluentImpl.MetadataNestedImpl(); - } - public V1alpha1StorageVersionFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha1StorageVersionFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1StorageVersionFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1StorageVersionFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha1StorageVersionFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public Object getSpec() { - return this.spec; - } - public A withSpec(Object spec) { - this.spec=spec; return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1StorageVersionStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1alpha1StorageVersionStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1alpha1StorageVersionStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1alpha1StorageVersionStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1alpha1StorageVersionFluentImpl.StatusNested withNewStatus() { - return new V1alpha1StorageVersionFluentImpl.StatusNestedImpl(); - } - public V1alpha1StorageVersionFluentImpl.StatusNested withNewStatusLike(V1alpha1StorageVersionStatus item) { - return new V1alpha1StorageVersionFluentImpl.StatusNestedImpl(item); - } - public V1alpha1StorageVersionFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1alpha1StorageVersionFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1alpha1StorageVersionStatusBuilder().build()); - } - public V1alpha1StorageVersionFluentImpl.StatusNested editOrNewStatusLike(V1alpha1StorageVersionStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1StorageVersionFluentImpl that = (V1alpha1StorageVersionFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha1StorageVersionFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha1StorageVersionFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class StatusNestedImpl extends V1alpha1StorageVersionStatusFluentImpl> implements V1alpha1StorageVersionFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1alpha1StorageVersionStatus item) { - this.builder = new V1alpha1StorageVersionStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1alpha1StorageVersionStatusBuilder(this); - } - V1alpha1StorageVersionStatusBuilder builder; - public N and() { - return (N) V1alpha1StorageVersionFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListBuilder.java index ae16591d86..cb22fcb241 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1StorageVersionListBuilder extends V1alpha1StorageVersionListFluentImpl implements VisitableBuilder{ +public class V1alpha1StorageVersionListBuilder extends V1alpha1StorageVersionListFluent implements VisitableBuilder{ public V1alpha1StorageVersionListBuilder() { - this(false); - } - public V1alpha1StorageVersionListBuilder(Boolean validationEnabled) { - this(new V1alpha1StorageVersionList(), validationEnabled); + this(new V1alpha1StorageVersionList()); } + public V1alpha1StorageVersionListBuilder(V1alpha1StorageVersionListFluent fluent) { - this(fluent, false); - } - public V1alpha1StorageVersionListBuilder(V1alpha1StorageVersionListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1StorageVersionList(), validationEnabled); + this(fluent, new V1alpha1StorageVersionList()); } + public V1alpha1StorageVersionListBuilder(V1alpha1StorageVersionListFluent fluent,V1alpha1StorageVersionList instance) { - this(fluent, instance, false); - } - public V1alpha1StorageVersionListBuilder(V1alpha1StorageVersionListFluent fluent,V1alpha1StorageVersionList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1StorageVersionListBuilder(V1alpha1StorageVersionList instance) { - this(instance,false); - } - public V1alpha1StorageVersionListBuilder(V1alpha1StorageVersionList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1StorageVersionListFluent fluent; - Boolean validationEnabled; + public V1alpha1StorageVersionList build() { V1alpha1StorageVersionList buildable = new V1alpha1StorageVersionList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListFluent.java index 772be72222..510dbfeb0a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1StorageVersionListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha1StorageVersion item); - public A setToItems(int index,V1alpha1StorageVersion item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1StorageVersion... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1StorageVersion... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha1StorageVersion buildItem(int index); - public V1alpha1StorageVersion buildFirstItem(); - public V1alpha1StorageVersion buildLastItem(); - public V1alpha1StorageVersion buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha1StorageVersion... items); - public Boolean hasItems(); - public V1alpha1StorageVersionListFluent.ItemsNested addNewItem(); - public V1alpha1StorageVersionListFluent.ItemsNested addNewItemLike(V1alpha1StorageVersion item); - public V1alpha1StorageVersionListFluent.ItemsNested setNewItemLike(int index,V1alpha1StorageVersion item); - public V1alpha1StorageVersionListFluent.ItemsNested editItem(int index); - public V1alpha1StorageVersionListFluent.ItemsNested editFirstItem(); - public V1alpha1StorageVersionListFluent.ItemsNested editLastItem(); - public V1alpha1StorageVersionListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha1StorageVersionListFluent.MetadataNested withNewMetadata(); - public V1alpha1StorageVersionListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha1StorageVersionListFluent.MetadataNested editMetadata(); - public V1alpha1StorageVersionListFluent.MetadataNested editOrNewMetadata(); - public V1alpha1StorageVersionListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha1StorageVersionFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1StorageVersionListFluent> extends BaseFluent{ + public V1alpha1StorageVersionListFluent() { + } + + public V1alpha1StorageVersionListFluent(V1alpha1StorageVersionList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha1StorageVersionList instance) { + instance = (instance != null ? instance : new V1alpha1StorageVersionList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha1StorageVersion item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha1StorageVersion item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha1StorageVersion... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1StorageVersion item : items) {V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1StorageVersion item : items) {V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1StorageVersion... items) { + if (this.items == null) return (A)this; + for (V1alpha1StorageVersion item : items) {V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha1StorageVersion item : items) {V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha1StorageVersionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha1StorageVersion buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha1StorageVersion buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha1StorageVersion buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha1StorageVersion buildMatchingItem(Predicate predicate) { + for (V1alpha1StorageVersionBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha1StorageVersionBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha1StorageVersion item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha1StorageVersion... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha1StorageVersion item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha1StorageVersion item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha1StorageVersion item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1StorageVersionListFluent that = (V1alpha1StorageVersionListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha1StorageVersionFluent> implements Nested{ + ItemsNested(int index,V1alpha1StorageVersion item) { + this.index = index; + this.builder = new V1alpha1StorageVersionBuilder(this, item); + } + V1alpha1StorageVersionBuilder builder; + int index; + public N and() { + return (N) V1alpha1StorageVersionListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha1StorageVersionListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListFluentImpl.java deleted file mode 100644 index b638e28a76..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1StorageVersionListFluentImpl> extends BaseFluent implements V1alpha1StorageVersionListFluent{ - public V1alpha1StorageVersionListFluentImpl() { - } - public V1alpha1StorageVersionListFluentImpl(V1alpha1StorageVersionList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha1StorageVersion item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha1StorageVersion item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1StorageVersion... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1StorageVersion item : items) {V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1StorageVersion item : items) {V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1StorageVersion... items) { - for (V1alpha1StorageVersion item : items) {V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha1StorageVersion item : items) {V1alpha1StorageVersionBuilder builder = new V1alpha1StorageVersionBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha1StorageVersionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha1StorageVersion buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha1StorageVersion buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha1StorageVersion buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha1StorageVersion buildMatchingItem(Predicate predicate) { - for (V1alpha1StorageVersionBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha1StorageVersionBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha1StorageVersion item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha1StorageVersion... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha1StorageVersion item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha1StorageVersionListFluentImpl.ItemsNested addNewItem() { - return new V1alpha1StorageVersionListFluentImpl.ItemsNestedImpl(); - } - public V1alpha1StorageVersionListFluentImpl.ItemsNested addNewItemLike(V1alpha1StorageVersion item) { - return new V1alpha1StorageVersionListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha1StorageVersionListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha1StorageVersion item) { - return new V1alpha1StorageVersionListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha1StorageVersionListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1StorageVersionListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha1StorageVersionListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1StorageVersionListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha1StorageVersionListFluentImpl.MetadataNestedImpl(); - } - public V1alpha1StorageVersionListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha1StorageVersionListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1StorageVersionListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1StorageVersionListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha1StorageVersionListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1StorageVersionListFluentImpl that = (V1alpha1StorageVersionListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha1StorageVersionFluentImpl> implements V1alpha1StorageVersionListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha1StorageVersion item) { - this.index = index; - this.builder = new V1alpha1StorageVersionBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1StorageVersionBuilder(this); - } - V1alpha1StorageVersionBuilder builder; - int index; - public N and() { - return (N) V1alpha1StorageVersionListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha1StorageVersionListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha1StorageVersionListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusBuilder.java index 7a44d2646f..46985e5646 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1StorageVersionStatusBuilder extends V1alpha1StorageVersionStatusFluentImpl implements VisitableBuilder{ +public class V1alpha1StorageVersionStatusBuilder extends V1alpha1StorageVersionStatusFluent implements VisitableBuilder{ public V1alpha1StorageVersionStatusBuilder() { - this(false); - } - public V1alpha1StorageVersionStatusBuilder(Boolean validationEnabled) { - this(new V1alpha1StorageVersionStatus(), validationEnabled); + this(new V1alpha1StorageVersionStatus()); } + public V1alpha1StorageVersionStatusBuilder(V1alpha1StorageVersionStatusFluent fluent) { - this(fluent, false); - } - public V1alpha1StorageVersionStatusBuilder(V1alpha1StorageVersionStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1StorageVersionStatus(), validationEnabled); + this(fluent, new V1alpha1StorageVersionStatus()); } + public V1alpha1StorageVersionStatusBuilder(V1alpha1StorageVersionStatusFluent fluent,V1alpha1StorageVersionStatus instance) { - this(fluent, instance, false); - } - public V1alpha1StorageVersionStatusBuilder(V1alpha1StorageVersionStatusFluent fluent,V1alpha1StorageVersionStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCommonEncodingVersion(instance.getCommonEncodingVersion()); - fluent.withConditions(instance.getConditions()); - fluent.withStorageVersions(instance.getStorageVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1StorageVersionStatusBuilder(V1alpha1StorageVersionStatus instance) { - this(instance,false); - } - public V1alpha1StorageVersionStatusBuilder(V1alpha1StorageVersionStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCommonEncodingVersion(instance.getCommonEncodingVersion()); - this.withConditions(instance.getConditions()); - this.withStorageVersions(instance.getStorageVersions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1StorageVersionStatusFluent fluent; - Boolean validationEnabled; + public V1alpha1StorageVersionStatus build() { V1alpha1StorageVersionStatus buildable = new V1alpha1StorageVersionStatus(); buildable.setCommonEncodingVersion(fluent.getCommonEncodingVersion()); - buildable.setConditions(fluent.getConditions()); - buildable.setStorageVersions(fluent.getStorageVersions()); + buildable.setConditions(fluent.buildConditions()); + buildable.setStorageVersions(fluent.buildStorageVersions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusFluent.java index 8d9e711b92..b3fcca6409 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusFluent.java @@ -1,94 +1,415 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1StorageVersionStatusFluent> extends Fluent{ - public String getCommonEncodingVersion(); - public A withCommonEncodingVersion(String commonEncodingVersion); - public Boolean hasCommonEncodingVersion(); - public A addToConditions(int index,V1alpha1StorageVersionCondition item); - public A setToConditions(int index,V1alpha1StorageVersionCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1alpha1StorageVersionCondition buildCondition(int index); - public V1alpha1StorageVersionCondition buildFirstCondition(); - public V1alpha1StorageVersionCondition buildLastCondition(); - public V1alpha1StorageVersionCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition... conditions); - public Boolean hasConditions(); - public V1alpha1StorageVersionStatusFluent.ConditionsNested addNewCondition(); - public V1alpha1StorageVersionStatusFluent.ConditionsNested addNewConditionLike(V1alpha1StorageVersionCondition item); - public V1alpha1StorageVersionStatusFluent.ConditionsNested setNewConditionLike(int index,V1alpha1StorageVersionCondition item); - public V1alpha1StorageVersionStatusFluent.ConditionsNested editCondition(int index); - public V1alpha1StorageVersionStatusFluent.ConditionsNested editFirstCondition(); - public V1alpha1StorageVersionStatusFluent.ConditionsNested editLastCondition(); - public V1alpha1StorageVersionStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public A addToStorageVersions(int index,V1alpha1ServerStorageVersion item); - public A setToStorageVersions(int index,V1alpha1ServerStorageVersion item); - public A addToStorageVersions(io.kubernetes.client.openapi.models.V1alpha1ServerStorageVersion... items); - public A addAllToStorageVersions(Collection items); - public A removeFromStorageVersions(io.kubernetes.client.openapi.models.V1alpha1ServerStorageVersion... items); - public A removeAllFromStorageVersions(Collection items); - public A removeMatchingFromStorageVersions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildStorageVersions instead. - * @return The buildable object. - */ - @Deprecated - public List getStorageVersions(); - public List buildStorageVersions(); - public V1alpha1ServerStorageVersion buildStorageVersion(int index); - public V1alpha1ServerStorageVersion buildFirstStorageVersion(); - public V1alpha1ServerStorageVersion buildLastStorageVersion(); - public V1alpha1ServerStorageVersion buildMatchingStorageVersion(Predicate predicate); - public Boolean hasMatchingStorageVersion(Predicate predicate); - public A withStorageVersions(List storageVersions); - public A withStorageVersions(io.kubernetes.client.openapi.models.V1alpha1ServerStorageVersion... storageVersions); - public Boolean hasStorageVersions(); - public V1alpha1StorageVersionStatusFluent.StorageVersionsNested addNewStorageVersion(); - public V1alpha1StorageVersionStatusFluent.StorageVersionsNested addNewStorageVersionLike(V1alpha1ServerStorageVersion item); - public V1alpha1StorageVersionStatusFluent.StorageVersionsNested setNewStorageVersionLike(int index,V1alpha1ServerStorageVersion item); - public V1alpha1StorageVersionStatusFluent.StorageVersionsNested editStorageVersion(int index); - public V1alpha1StorageVersionStatusFluent.StorageVersionsNested editFirstStorageVersion(); - public V1alpha1StorageVersionStatusFluent.StorageVersionsNested editLastStorageVersion(); - public V1alpha1StorageVersionStatusFluent.StorageVersionsNested editMatchingStorageVersion(Predicate predicate); - public interface ConditionsNested extends Nested,V1alpha1StorageVersionConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1StorageVersionStatusFluent> extends BaseFluent{ + public V1alpha1StorageVersionStatusFluent() { + } + + public V1alpha1StorageVersionStatusFluent(V1alpha1StorageVersionStatus instance) { + this.copyInstance(instance); + } + private String commonEncodingVersion; + private ArrayList conditions; + private ArrayList storageVersions; + + protected void copyInstance(V1alpha1StorageVersionStatus instance) { + instance = (instance != null ? instance : new V1alpha1StorageVersionStatus()); + if (instance != null) { + this.withCommonEncodingVersion(instance.getCommonEncodingVersion()); + this.withConditions(instance.getConditions()); + this.withStorageVersions(instance.getStorageVersions()); + } + } + + public String getCommonEncodingVersion() { + return this.commonEncodingVersion; + } + + public A withCommonEncodingVersion(String commonEncodingVersion) { + this.commonEncodingVersion = commonEncodingVersion; + return (A) this; + } + + public boolean hasCommonEncodingVersion() { + return this.commonEncodingVersion != null; + } + + public A addToConditions(int index,V1alpha1StorageVersionCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1alpha1StorageVersionCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1alpha1StorageVersionCondition item : items) {V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1alpha1StorageVersionCondition item : items) {V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition... items) { + if (this.conditions == null) return (A)this; + for (V1alpha1StorageVersionCondition item : items) {V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1alpha1StorageVersionCondition item : items) {V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1alpha1StorageVersionConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1alpha1StorageVersionCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1alpha1StorageVersionCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1alpha1StorageVersionCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1alpha1StorageVersionCondition buildMatchingCondition(Predicate predicate) { + for (V1alpha1StorageVersionConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1alpha1StorageVersionConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1alpha1StorageVersionCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1alpha1StorageVersionCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1alpha1StorageVersionCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1alpha1StorageVersionCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item); + if (index < 0 || index >= storageVersions.size()) { _visitables.get("storageVersions").add(builder); storageVersions.add(builder); } else { _visitables.get("storageVersions").add(index, builder); storageVersions.add(index, builder);} + return (A)this; } - public interface StorageVersionsNested extends Nested,V1alpha1ServerStorageVersionFluent>{ - public N and(); - public N endStorageVersion(); + + public A setToStorageVersions(int index,V1alpha1ServerStorageVersion item) { + if (this.storageVersions == null) {this.storageVersions = new ArrayList();} + V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item); + if (index < 0 || index >= storageVersions.size()) { _visitables.get("storageVersions").add(builder); storageVersions.add(builder); } else { _visitables.get("storageVersions").set(index, builder); storageVersions.set(index, builder);} + return (A)this; + } + + public A addToStorageVersions(io.kubernetes.client.openapi.models.V1alpha1ServerStorageVersion... items) { + if (this.storageVersions == null) {this.storageVersions = new ArrayList();} + for (V1alpha1ServerStorageVersion item : items) {V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item);_visitables.get("storageVersions").add(builder);this.storageVersions.add(builder);} return (A)this; + } + + public A addAllToStorageVersions(Collection items) { + if (this.storageVersions == null) {this.storageVersions = new ArrayList();} + for (V1alpha1ServerStorageVersion item : items) {V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item);_visitables.get("storageVersions").add(builder);this.storageVersions.add(builder);} return (A)this; + } + + public A removeFromStorageVersions(io.kubernetes.client.openapi.models.V1alpha1ServerStorageVersion... items) { + if (this.storageVersions == null) return (A)this; + for (V1alpha1ServerStorageVersion item : items) {V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item);_visitables.get("storageVersions").remove(builder); this.storageVersions.remove(builder);} return (A)this; + } + + public A removeAllFromStorageVersions(Collection items) { + if (this.storageVersions == null) return (A)this; + for (V1alpha1ServerStorageVersion item : items) {V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item);_visitables.get("storageVersions").remove(builder); this.storageVersions.remove(builder);} return (A)this; + } + + public A removeMatchingFromStorageVersions(Predicate predicate) { + if (storageVersions == null) return (A) this; + final Iterator each = storageVersions.iterator(); + final List visitables = _visitables.get("storageVersions"); + while (each.hasNext()) { + V1alpha1ServerStorageVersionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildStorageVersions() { + return this.storageVersions != null ? build(storageVersions) : null; + } + + public V1alpha1ServerStorageVersion buildStorageVersion(int index) { + return this.storageVersions.get(index).build(); + } + + public V1alpha1ServerStorageVersion buildFirstStorageVersion() { + return this.storageVersions.get(0).build(); + } + + public V1alpha1ServerStorageVersion buildLastStorageVersion() { + return this.storageVersions.get(storageVersions.size() - 1).build(); + } + + public V1alpha1ServerStorageVersion buildMatchingStorageVersion(Predicate predicate) { + for (V1alpha1ServerStorageVersionBuilder item : storageVersions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingStorageVersion(Predicate predicate) { + for (V1alpha1ServerStorageVersionBuilder item : storageVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withStorageVersions(List storageVersions) { + if (this.storageVersions != null) { + this._visitables.get("storageVersions").clear(); + } + if (storageVersions != null) { + this.storageVersions = new ArrayList(); + for (V1alpha1ServerStorageVersion item : storageVersions) { + this.addToStorageVersions(item); + } + } else { + this.storageVersions = null; + } + return (A) this; + } + + public A withStorageVersions(io.kubernetes.client.openapi.models.V1alpha1ServerStorageVersion... storageVersions) { + if (this.storageVersions != null) { + this.storageVersions.clear(); + _visitables.remove("storageVersions"); + } + if (storageVersions != null) { + for (V1alpha1ServerStorageVersion item : storageVersions) { + this.addToStorageVersions(item); + } + } + return (A) this; + } + + public boolean hasStorageVersions() { + return this.storageVersions != null && !this.storageVersions.isEmpty(); + } + + public StorageVersionsNested addNewStorageVersion() { + return new StorageVersionsNested(-1, null); + } + + public StorageVersionsNested addNewStorageVersionLike(V1alpha1ServerStorageVersion item) { + return new StorageVersionsNested(-1, item); + } + + public StorageVersionsNested setNewStorageVersionLike(int index,V1alpha1ServerStorageVersion item) { + return new StorageVersionsNested(index, item); + } + + public StorageVersionsNested editStorageVersion(int index) { + if (storageVersions.size() <= index) throw new RuntimeException("Can't edit storageVersions. Index exceeds size."); + return setNewStorageVersionLike(index, buildStorageVersion(index)); + } + + public StorageVersionsNested editFirstStorageVersion() { + if (storageVersions.size() == 0) throw new RuntimeException("Can't edit first storageVersions. The list is empty."); + return setNewStorageVersionLike(0, buildStorageVersion(0)); + } + + public StorageVersionsNested editLastStorageVersion() { + int index = storageVersions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last storageVersions. The list is empty."); + return setNewStorageVersionLike(index, buildStorageVersion(index)); + } + + public StorageVersionsNested editMatchingStorageVersion(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1alpha1StorageVersionConditionFluent> implements Nested{ + ConditionsNested(int index,V1alpha1StorageVersionCondition item) { + this.index = index; + this.builder = new V1alpha1StorageVersionConditionBuilder(this, item); + } + V1alpha1StorageVersionConditionBuilder builder; + int index; + + public N and() { + return (N) V1alpha1StorageVersionStatusFluent.this.setToConditions(index,builder.build()); + } + public N endCondition() { + return and(); + } + + } + public class StorageVersionsNested extends V1alpha1ServerStorageVersionFluent> implements Nested{ + StorageVersionsNested(int index,V1alpha1ServerStorageVersion item) { + this.index = index; + this.builder = new V1alpha1ServerStorageVersionBuilder(this, item); + } + V1alpha1ServerStorageVersionBuilder builder; + int index; + + public N and() { + return (N) V1alpha1StorageVersionStatusFluent.this.setToStorageVersions(index,builder.build()); + } + + public N endStorageVersion() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusFluentImpl.java deleted file mode 100644 index 8b42d20f07..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1StorageVersionStatusFluentImpl.java +++ /dev/null @@ -1,321 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1StorageVersionStatusFluentImpl> extends BaseFluent implements V1alpha1StorageVersionStatusFluent{ - public V1alpha1StorageVersionStatusFluentImpl() { - } - public V1alpha1StorageVersionStatusFluentImpl(V1alpha1StorageVersionStatus instance) { - if (instance != null) { - this.withCommonEncodingVersion(instance.getCommonEncodingVersion()); - this.withConditions(instance.getConditions()); - this.withStorageVersions(instance.getStorageVersions()); - } - } - private String commonEncodingVersion; - private ArrayList conditions; - private ArrayList storageVersions; - public String getCommonEncodingVersion() { - return this.commonEncodingVersion; - } - public A withCommonEncodingVersion(String commonEncodingVersion) { - this.commonEncodingVersion=commonEncodingVersion; return (A) this; - } - public Boolean hasCommonEncodingVersion() { - return this.commonEncodingVersion != null; - } - public A addToConditions(int index,V1alpha1StorageVersionCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1alpha1StorageVersionCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1alpha1StorageVersionCondition item : items) {V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1alpha1StorageVersionCondition item : items) {V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition... items) { - for (V1alpha1StorageVersionCondition item : items) {V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1alpha1StorageVersionCondition item : items) {V1alpha1StorageVersionConditionBuilder builder = new V1alpha1StorageVersionConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1alpha1StorageVersionConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1alpha1StorageVersionCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1alpha1StorageVersionCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1alpha1StorageVersionCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1alpha1StorageVersionCondition buildMatchingCondition(Predicate predicate) { - for (V1alpha1StorageVersionConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1alpha1StorageVersionConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1alpha1StorageVersionCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1alpha1StorageVersionCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1alpha1StorageVersionCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1alpha1StorageVersionStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1alpha1StorageVersionStatusFluentImpl.ConditionsNestedImpl(); - } - public V1alpha1StorageVersionStatusFluentImpl.ConditionsNested addNewConditionLike(V1alpha1StorageVersionCondition item) { - return new V1alpha1StorageVersionStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1alpha1StorageVersionStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1alpha1StorageVersionCondition item) { - return new V1alpha1StorageVersionStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1alpha1StorageVersionStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1alpha1StorageVersionStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1alpha1StorageVersionStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1alpha1StorageVersionStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item); - if (index < 0 || index >= storageVersions.size()) { _visitables.get("storageVersions").add(builder); storageVersions.add(builder); } else { _visitables.get("storageVersions").add(index, builder); storageVersions.add(index, builder);} - return (A)this; - } - public A setToStorageVersions(int index,V1alpha1ServerStorageVersion item) { - if (this.storageVersions == null) {this.storageVersions = new ArrayList();} - V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item); - if (index < 0 || index >= storageVersions.size()) { _visitables.get("storageVersions").add(builder); storageVersions.add(builder); } else { _visitables.get("storageVersions").set(index, builder); storageVersions.set(index, builder);} - return (A)this; - } - public A addToStorageVersions(io.kubernetes.client.openapi.models.V1alpha1ServerStorageVersion... items) { - if (this.storageVersions == null) {this.storageVersions = new ArrayList();} - for (V1alpha1ServerStorageVersion item : items) {V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item);_visitables.get("storageVersions").add(builder);this.storageVersions.add(builder);} return (A)this; - } - public A addAllToStorageVersions(Collection items) { - if (this.storageVersions == null) {this.storageVersions = new ArrayList();} - for (V1alpha1ServerStorageVersion item : items) {V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item);_visitables.get("storageVersions").add(builder);this.storageVersions.add(builder);} return (A)this; - } - public A removeFromStorageVersions(io.kubernetes.client.openapi.models.V1alpha1ServerStorageVersion... items) { - for (V1alpha1ServerStorageVersion item : items) {V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item);_visitables.get("storageVersions").remove(builder);if (this.storageVersions != null) {this.storageVersions.remove(builder);}} return (A)this; - } - public A removeAllFromStorageVersions(Collection items) { - for (V1alpha1ServerStorageVersion item : items) {V1alpha1ServerStorageVersionBuilder builder = new V1alpha1ServerStorageVersionBuilder(item);_visitables.get("storageVersions").remove(builder);if (this.storageVersions != null) {this.storageVersions.remove(builder);}} return (A)this; - } - public A removeMatchingFromStorageVersions(Predicate predicate) { - if (storageVersions == null) return (A) this; - final Iterator each = storageVersions.iterator(); - final List visitables = _visitables.get("storageVersions"); - while (each.hasNext()) { - V1alpha1ServerStorageVersionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildStorageVersions instead. - * @return The buildable object. - */ - @Deprecated - public List getStorageVersions() { - return storageVersions != null ? build(storageVersions) : null; - } - public List buildStorageVersions() { - return storageVersions != null ? build(storageVersions) : null; - } - public V1alpha1ServerStorageVersion buildStorageVersion(int index) { - return this.storageVersions.get(index).build(); - } - public V1alpha1ServerStorageVersion buildFirstStorageVersion() { - return this.storageVersions.get(0).build(); - } - public V1alpha1ServerStorageVersion buildLastStorageVersion() { - return this.storageVersions.get(storageVersions.size() - 1).build(); - } - public V1alpha1ServerStorageVersion buildMatchingStorageVersion(Predicate predicate) { - for (V1alpha1ServerStorageVersionBuilder item: storageVersions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingStorageVersion(Predicate predicate) { - for (V1alpha1ServerStorageVersionBuilder item: storageVersions) { if(predicate.test(item)){ return true;} } return false; - } - public A withStorageVersions(List storageVersions) { - if (this.storageVersions != null) { _visitables.get("storageVersions").clear();} - if (storageVersions != null) {this.storageVersions = new ArrayList(); for (V1alpha1ServerStorageVersion item : storageVersions){this.addToStorageVersions(item);}} else { this.storageVersions = null;} return (A) this; - } - public A withStorageVersions(io.kubernetes.client.openapi.models.V1alpha1ServerStorageVersion... storageVersions) { - if (this.storageVersions != null) {this.storageVersions.clear(); _visitables.remove("storageVersions"); } - if (storageVersions != null) {for (V1alpha1ServerStorageVersion item :storageVersions){ this.addToStorageVersions(item);}} return (A) this; - } - public Boolean hasStorageVersions() { - return storageVersions != null && !storageVersions.isEmpty(); - } - public V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNested addNewStorageVersion() { - return new V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNestedImpl(); - } - public V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNested addNewStorageVersionLike(V1alpha1ServerStorageVersion item) { - return new V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNestedImpl(-1, item); - } - public V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNested setNewStorageVersionLike(int index,V1alpha1ServerStorageVersion item) { - return new V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNestedImpl(index, item); - } - public V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNested editStorageVersion(int index) { - if (storageVersions.size() <= index) throw new RuntimeException("Can't edit storageVersions. Index exceeds size."); - return setNewStorageVersionLike(index, buildStorageVersion(index)); - } - public V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNested editFirstStorageVersion() { - if (storageVersions.size() == 0) throw new RuntimeException("Can't edit first storageVersions. The list is empty."); - return setNewStorageVersionLike(0, buildStorageVersion(0)); - } - public V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNested editLastStorageVersion() { - int index = storageVersions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last storageVersions. The list is empty."); - return setNewStorageVersionLike(index, buildStorageVersion(index)); - } - public V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNested editMatchingStorageVersion(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1alpha1StorageVersionConditionFluentImpl> implements V1alpha1StorageVersionStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1alpha1StorageVersionCondition item) { - this.index = index; - this.builder = new V1alpha1StorageVersionConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1StorageVersionConditionBuilder(this); - } - V1alpha1StorageVersionConditionBuilder builder; - int index; - public N and() { - return (N) V1alpha1StorageVersionStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - class StorageVersionsNestedImpl extends V1alpha1ServerStorageVersionFluentImpl> implements V1alpha1StorageVersionStatusFluentImpl.StorageVersionsNested,Nested{ - StorageVersionsNestedImpl(int index,V1alpha1ServerStorageVersion item) { - this.index = index; - this.builder = new V1alpha1ServerStorageVersionBuilder(this, item); - } - StorageVersionsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1ServerStorageVersionBuilder(this); - } - V1alpha1ServerStorageVersionBuilder builder; - int index; - public N and() { - return (N) V1alpha1StorageVersionStatusFluentImpl.this.setToStorageVersions(index,builder.build()); - } - public N endStorageVersion() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingBuilder.java index 34b4e74413..27cb0c206f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1TypeCheckingBuilder extends V1alpha1TypeCheckingFluentImpl implements VisitableBuilder{ +public class V1alpha1TypeCheckingBuilder extends V1alpha1TypeCheckingFluent implements VisitableBuilder{ public V1alpha1TypeCheckingBuilder() { - this(false); - } - public V1alpha1TypeCheckingBuilder(Boolean validationEnabled) { - this(new V1alpha1TypeChecking(), validationEnabled); + this(new V1alpha1TypeChecking()); } + public V1alpha1TypeCheckingBuilder(V1alpha1TypeCheckingFluent fluent) { - this(fluent, false); - } - public V1alpha1TypeCheckingBuilder(V1alpha1TypeCheckingFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1TypeChecking(), validationEnabled); + this(fluent, new V1alpha1TypeChecking()); } + public V1alpha1TypeCheckingBuilder(V1alpha1TypeCheckingFluent fluent,V1alpha1TypeChecking instance) { - this(fluent, instance, false); - } - public V1alpha1TypeCheckingBuilder(V1alpha1TypeCheckingFluent fluent,V1alpha1TypeChecking instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExpressionWarnings(instance.getExpressionWarnings()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1TypeCheckingBuilder(V1alpha1TypeChecking instance) { - this(instance,false); - } - public V1alpha1TypeCheckingBuilder(V1alpha1TypeChecking instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExpressionWarnings(instance.getExpressionWarnings()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1TypeCheckingFluent fluent; - Boolean validationEnabled; + public V1alpha1TypeChecking build() { V1alpha1TypeChecking buildable = new V1alpha1TypeChecking(); - buildable.setExpressionWarnings(fluent.getExpressionWarnings()); + buildable.setExpressionWarnings(fluent.buildExpressionWarnings()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingFluent.java index 4769666aa9..2b970f5a22 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1TypeCheckingFluent> extends Fluent{ - public A addToExpressionWarnings(int index,V1alpha1ExpressionWarning item); - public A setToExpressionWarnings(int index,V1alpha1ExpressionWarning item); - public A addToExpressionWarnings(io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning... items); - public A addAllToExpressionWarnings(Collection items); - public A removeFromExpressionWarnings(io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning... items); - public A removeAllFromExpressionWarnings(Collection items); - public A removeMatchingFromExpressionWarnings(Predicate predicate); - - /** - * This method has been deprecated, please use method buildExpressionWarnings instead. - * @return The buildable object. - */ - @Deprecated - public List getExpressionWarnings(); - public List buildExpressionWarnings(); - public V1alpha1ExpressionWarning buildExpressionWarning(int index); - public V1alpha1ExpressionWarning buildFirstExpressionWarning(); - public V1alpha1ExpressionWarning buildLastExpressionWarning(); - public V1alpha1ExpressionWarning buildMatchingExpressionWarning(Predicate predicate); - public Boolean hasMatchingExpressionWarning(Predicate predicate); - public A withExpressionWarnings(List expressionWarnings); - public A withExpressionWarnings(io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning... expressionWarnings); - public Boolean hasExpressionWarnings(); - public V1alpha1TypeCheckingFluent.ExpressionWarningsNested addNewExpressionWarning(); - public V1alpha1TypeCheckingFluent.ExpressionWarningsNested addNewExpressionWarningLike(V1alpha1ExpressionWarning item); - public V1alpha1TypeCheckingFluent.ExpressionWarningsNested setNewExpressionWarningLike(int index,V1alpha1ExpressionWarning item); - public V1alpha1TypeCheckingFluent.ExpressionWarningsNested editExpressionWarning(int index); - public V1alpha1TypeCheckingFluent.ExpressionWarningsNested editFirstExpressionWarning(); - public V1alpha1TypeCheckingFluent.ExpressionWarningsNested editLastExpressionWarning(); - public V1alpha1TypeCheckingFluent.ExpressionWarningsNested editMatchingExpressionWarning(Predicate predicate); - public interface ExpressionWarningsNested extends Nested,V1alpha1ExpressionWarningFluent>{ - public N and(); - public N endExpressionWarning(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1TypeCheckingFluent> extends BaseFluent{ + public V1alpha1TypeCheckingFluent() { + } + + public V1alpha1TypeCheckingFluent(V1alpha1TypeChecking instance) { + this.copyInstance(instance); + } + private ArrayList expressionWarnings; + + protected void copyInstance(V1alpha1TypeChecking instance) { + instance = (instance != null ? instance : new V1alpha1TypeChecking()); + if (instance != null) { + this.withExpressionWarnings(instance.getExpressionWarnings()); + } + } + + public A addToExpressionWarnings(int index,V1alpha1ExpressionWarning item) { + if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} + V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item); + if (index < 0 || index >= expressionWarnings.size()) { _visitables.get("expressionWarnings").add(builder); expressionWarnings.add(builder); } else { _visitables.get("expressionWarnings").add(index, builder); expressionWarnings.add(index, builder);} + return (A)this; + } + + public A setToExpressionWarnings(int index,V1alpha1ExpressionWarning item) { + if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} + V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item); + if (index < 0 || index >= expressionWarnings.size()) { _visitables.get("expressionWarnings").add(builder); expressionWarnings.add(builder); } else { _visitables.get("expressionWarnings").set(index, builder); expressionWarnings.set(index, builder);} + return (A)this; + } + + public A addToExpressionWarnings(io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning... items) { + if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} + for (V1alpha1ExpressionWarning item : items) {V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").add(builder);this.expressionWarnings.add(builder);} return (A)this; + } + + public A addAllToExpressionWarnings(Collection items) { + if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} + for (V1alpha1ExpressionWarning item : items) {V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").add(builder);this.expressionWarnings.add(builder);} return (A)this; + } + + public A removeFromExpressionWarnings(io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning... items) { + if (this.expressionWarnings == null) return (A)this; + for (V1alpha1ExpressionWarning item : items) {V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").remove(builder); this.expressionWarnings.remove(builder);} return (A)this; + } + + public A removeAllFromExpressionWarnings(Collection items) { + if (this.expressionWarnings == null) return (A)this; + for (V1alpha1ExpressionWarning item : items) {V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").remove(builder); this.expressionWarnings.remove(builder);} return (A)this; + } + + public A removeMatchingFromExpressionWarnings(Predicate predicate) { + if (expressionWarnings == null) return (A) this; + final Iterator each = expressionWarnings.iterator(); + final List visitables = _visitables.get("expressionWarnings"); + while (each.hasNext()) { + V1alpha1ExpressionWarningBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildExpressionWarnings() { + return this.expressionWarnings != null ? build(expressionWarnings) : null; + } + + public V1alpha1ExpressionWarning buildExpressionWarning(int index) { + return this.expressionWarnings.get(index).build(); + } + + public V1alpha1ExpressionWarning buildFirstExpressionWarning() { + return this.expressionWarnings.get(0).build(); + } + + public V1alpha1ExpressionWarning buildLastExpressionWarning() { + return this.expressionWarnings.get(expressionWarnings.size() - 1).build(); + } + + public V1alpha1ExpressionWarning buildMatchingExpressionWarning(Predicate predicate) { + for (V1alpha1ExpressionWarningBuilder item : expressionWarnings) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingExpressionWarning(Predicate predicate) { + for (V1alpha1ExpressionWarningBuilder item : expressionWarnings) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withExpressionWarnings(List expressionWarnings) { + if (this.expressionWarnings != null) { + this._visitables.get("expressionWarnings").clear(); + } + if (expressionWarnings != null) { + this.expressionWarnings = new ArrayList(); + for (V1alpha1ExpressionWarning item : expressionWarnings) { + this.addToExpressionWarnings(item); + } + } else { + this.expressionWarnings = null; + } + return (A) this; + } + + public A withExpressionWarnings(io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning... expressionWarnings) { + if (this.expressionWarnings != null) { + this.expressionWarnings.clear(); + _visitables.remove("expressionWarnings"); + } + if (expressionWarnings != null) { + for (V1alpha1ExpressionWarning item : expressionWarnings) { + this.addToExpressionWarnings(item); + } + } + return (A) this; + } + + public boolean hasExpressionWarnings() { + return this.expressionWarnings != null && !this.expressionWarnings.isEmpty(); + } + + public ExpressionWarningsNested addNewExpressionWarning() { + return new ExpressionWarningsNested(-1, null); + } + + public ExpressionWarningsNested addNewExpressionWarningLike(V1alpha1ExpressionWarning item) { + return new ExpressionWarningsNested(-1, item); + } + + public ExpressionWarningsNested setNewExpressionWarningLike(int index,V1alpha1ExpressionWarning item) { + return new ExpressionWarningsNested(index, item); + } + + public ExpressionWarningsNested editExpressionWarning(int index) { + if (expressionWarnings.size() <= index) throw new RuntimeException("Can't edit expressionWarnings. Index exceeds size."); + return setNewExpressionWarningLike(index, buildExpressionWarning(index)); + } + + public ExpressionWarningsNested editFirstExpressionWarning() { + if (expressionWarnings.size() == 0) throw new RuntimeException("Can't edit first expressionWarnings. The list is empty."); + return setNewExpressionWarningLike(0, buildExpressionWarning(0)); + } + + public ExpressionWarningsNested editLastExpressionWarning() { + int index = expressionWarnings.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last expressionWarnings. The list is empty."); + return setNewExpressionWarningLike(index, buildExpressionWarning(index)); + } + + public ExpressionWarningsNested editMatchingExpressionWarning(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1alpha1ExpressionWarningFluent> implements Nested{ + ExpressionWarningsNested(int index,V1alpha1ExpressionWarning item) { + this.index = index; + this.builder = new V1alpha1ExpressionWarningBuilder(this, item); + } + V1alpha1ExpressionWarningBuilder builder; + int index; + + public N and() { + return (N) V1alpha1TypeCheckingFluent.this.setToExpressionWarnings(index,builder.build()); + } + + public N endExpressionWarning() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingFluentImpl.java deleted file mode 100644 index d4d7a81b80..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1TypeCheckingFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1TypeCheckingFluentImpl> extends BaseFluent implements V1alpha1TypeCheckingFluent{ - public V1alpha1TypeCheckingFluentImpl() { - } - public V1alpha1TypeCheckingFluentImpl(V1alpha1TypeChecking instance) { - if (instance != null) { - this.withExpressionWarnings(instance.getExpressionWarnings()); - } - } - private ArrayList expressionWarnings; - public A addToExpressionWarnings(int index,V1alpha1ExpressionWarning item) { - if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} - V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item); - if (index < 0 || index >= expressionWarnings.size()) { _visitables.get("expressionWarnings").add(builder); expressionWarnings.add(builder); } else { _visitables.get("expressionWarnings").add(index, builder); expressionWarnings.add(index, builder);} - return (A)this; - } - public A setToExpressionWarnings(int index,V1alpha1ExpressionWarning item) { - if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} - V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item); - if (index < 0 || index >= expressionWarnings.size()) { _visitables.get("expressionWarnings").add(builder); expressionWarnings.add(builder); } else { _visitables.get("expressionWarnings").set(index, builder); expressionWarnings.set(index, builder);} - return (A)this; - } - public A addToExpressionWarnings(io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning... items) { - if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} - for (V1alpha1ExpressionWarning item : items) {V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").add(builder);this.expressionWarnings.add(builder);} return (A)this; - } - public A addAllToExpressionWarnings(Collection items) { - if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} - for (V1alpha1ExpressionWarning item : items) {V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").add(builder);this.expressionWarnings.add(builder);} return (A)this; - } - public A removeFromExpressionWarnings(io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning... items) { - for (V1alpha1ExpressionWarning item : items) {V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").remove(builder);if (this.expressionWarnings != null) {this.expressionWarnings.remove(builder);}} return (A)this; - } - public A removeAllFromExpressionWarnings(Collection items) { - for (V1alpha1ExpressionWarning item : items) {V1alpha1ExpressionWarningBuilder builder = new V1alpha1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").remove(builder);if (this.expressionWarnings != null) {this.expressionWarnings.remove(builder);}} return (A)this; - } - public A removeMatchingFromExpressionWarnings(Predicate predicate) { - if (expressionWarnings == null) return (A) this; - final Iterator each = expressionWarnings.iterator(); - final List visitables = _visitables.get("expressionWarnings"); - while (each.hasNext()) { - V1alpha1ExpressionWarningBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildExpressionWarnings instead. - * @return The buildable object. - */ - @Deprecated - public List getExpressionWarnings() { - return expressionWarnings != null ? build(expressionWarnings) : null; - } - public List buildExpressionWarnings() { - return expressionWarnings != null ? build(expressionWarnings) : null; - } - public V1alpha1ExpressionWarning buildExpressionWarning(int index) { - return this.expressionWarnings.get(index).build(); - } - public V1alpha1ExpressionWarning buildFirstExpressionWarning() { - return this.expressionWarnings.get(0).build(); - } - public V1alpha1ExpressionWarning buildLastExpressionWarning() { - return this.expressionWarnings.get(expressionWarnings.size() - 1).build(); - } - public V1alpha1ExpressionWarning buildMatchingExpressionWarning(Predicate predicate) { - for (V1alpha1ExpressionWarningBuilder item: expressionWarnings) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingExpressionWarning(Predicate predicate) { - for (V1alpha1ExpressionWarningBuilder item: expressionWarnings) { if(predicate.test(item)){ return true;} } return false; - } - public A withExpressionWarnings(List expressionWarnings) { - if (this.expressionWarnings != null) { _visitables.get("expressionWarnings").clear();} - if (expressionWarnings != null) {this.expressionWarnings = new ArrayList(); for (V1alpha1ExpressionWarning item : expressionWarnings){this.addToExpressionWarnings(item);}} else { this.expressionWarnings = null;} return (A) this; - } - public A withExpressionWarnings(io.kubernetes.client.openapi.models.V1alpha1ExpressionWarning... expressionWarnings) { - if (this.expressionWarnings != null) {this.expressionWarnings.clear(); _visitables.remove("expressionWarnings"); } - if (expressionWarnings != null) {for (V1alpha1ExpressionWarning item :expressionWarnings){ this.addToExpressionWarnings(item);}} return (A) this; - } - public Boolean hasExpressionWarnings() { - return expressionWarnings != null && !expressionWarnings.isEmpty(); - } - public V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNested addNewExpressionWarning() { - return new V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNestedImpl(); - } - public V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNested addNewExpressionWarningLike(V1alpha1ExpressionWarning item) { - return new V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNestedImpl(-1, item); - } - public V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNested setNewExpressionWarningLike(int index,V1alpha1ExpressionWarning item) { - return new V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNestedImpl(index, item); - } - public V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNested editExpressionWarning(int index) { - if (expressionWarnings.size() <= index) throw new RuntimeException("Can't edit expressionWarnings. Index exceeds size."); - return setNewExpressionWarningLike(index, buildExpressionWarning(index)); - } - public V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNested editFirstExpressionWarning() { - if (expressionWarnings.size() == 0) throw new RuntimeException("Can't edit first expressionWarnings. The list is empty."); - return setNewExpressionWarningLike(0, buildExpressionWarning(0)); - } - public V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNested editLastExpressionWarning() { - int index = expressionWarnings.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last expressionWarnings. The list is empty."); - return setNewExpressionWarningLike(index, buildExpressionWarning(index)); - } - public V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNested editMatchingExpressionWarning(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1alpha1ExpressionWarningFluentImpl> implements V1alpha1TypeCheckingFluentImpl.ExpressionWarningsNested,Nested{ - ExpressionWarningsNestedImpl(int index,V1alpha1ExpressionWarning item) { - this.index = index; - this.builder = new V1alpha1ExpressionWarningBuilder(this, item); - } - ExpressionWarningsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1ExpressionWarningBuilder(this); - } - V1alpha1ExpressionWarningBuilder builder; - int index; - public N and() { - return (N) V1alpha1TypeCheckingFluentImpl.this.setToExpressionWarnings(index,builder.build()); - } - public N endExpressionWarning() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingBuilder.java index b092cc6c36..af05a742d0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ValidatingAdmissionPolicyBindingBuilder extends V1alpha1ValidatingAdmissionPolicyBindingFluentImpl implements VisitableBuilder{ +public class V1alpha1ValidatingAdmissionPolicyBindingBuilder extends V1alpha1ValidatingAdmissionPolicyBindingFluent implements VisitableBuilder{ public V1alpha1ValidatingAdmissionPolicyBindingBuilder() { - this(false); - } - public V1alpha1ValidatingAdmissionPolicyBindingBuilder(Boolean validationEnabled) { - this(new V1alpha1ValidatingAdmissionPolicyBinding(), validationEnabled); + this(new V1alpha1ValidatingAdmissionPolicyBinding()); } + public V1alpha1ValidatingAdmissionPolicyBindingBuilder(V1alpha1ValidatingAdmissionPolicyBindingFluent fluent) { - this(fluent, false); - } - public V1alpha1ValidatingAdmissionPolicyBindingBuilder(V1alpha1ValidatingAdmissionPolicyBindingFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ValidatingAdmissionPolicyBinding(), validationEnabled); + this(fluent, new V1alpha1ValidatingAdmissionPolicyBinding()); } + public V1alpha1ValidatingAdmissionPolicyBindingBuilder(V1alpha1ValidatingAdmissionPolicyBindingFluent fluent,V1alpha1ValidatingAdmissionPolicyBinding instance) { - this(fluent, instance, false); - } - public V1alpha1ValidatingAdmissionPolicyBindingBuilder(V1alpha1ValidatingAdmissionPolicyBindingFluent fluent,V1alpha1ValidatingAdmissionPolicyBinding instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ValidatingAdmissionPolicyBindingBuilder(V1alpha1ValidatingAdmissionPolicyBinding instance) { - this(instance,false); - } - public V1alpha1ValidatingAdmissionPolicyBindingBuilder(V1alpha1ValidatingAdmissionPolicyBinding instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ValidatingAdmissionPolicyBindingFluent fluent; - Boolean validationEnabled; + public V1alpha1ValidatingAdmissionPolicyBinding build() { V1alpha1ValidatingAdmissionPolicyBinding buildable = new V1alpha1ValidatingAdmissionPolicyBinding(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingFluent.java index bb4e1f4596..42f5e48448 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha1ValidatingAdmissionPolicyBindingFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.MetadataNested withNewMetadata(); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.MetadataNested editMetadata(); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.MetadataNested editOrNewMetadata(); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ValidatingAdmissionPolicyBindingSpec getSpec(); - public V1alpha1ValidatingAdmissionPolicyBindingSpec buildSpec(); - public A withSpec(V1alpha1ValidatingAdmissionPolicyBindingSpec spec); - public Boolean hasSpec(); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.SpecNested withNewSpec(); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.SpecNested withNewSpecLike(V1alpha1ValidatingAdmissionPolicyBindingSpec item); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.SpecNested editSpec(); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.SpecNested editOrNewSpec(); - public V1alpha1ValidatingAdmissionPolicyBindingFluent.SpecNested editOrNewSpecLike(V1alpha1ValidatingAdmissionPolicyBindingSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ValidatingAdmissionPolicyBindingFluent> extends BaseFluent{ + public V1alpha1ValidatingAdmissionPolicyBindingFluent() { + } + + public V1alpha1ValidatingAdmissionPolicyBindingFluent(V1alpha1ValidatingAdmissionPolicyBinding instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder spec; + + protected void copyInstance(V1alpha1ValidatingAdmissionPolicyBinding instance) { + instance = (instance != null ? instance : new V1alpha1ValidatingAdmissionPolicyBinding()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1alpha1ValidatingAdmissionPolicyBindingSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha1ValidatingAdmissionPolicyBindingSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1alpha1ValidatingAdmissionPolicyBindingSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1alpha1ValidatingAdmissionPolicyBindingSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1alpha1ValidatingAdmissionPolicyBindingSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ValidatingAdmissionPolicyBindingFluent that = (V1alpha1ValidatingAdmissionPolicyBindingFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyBindingFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1alpha1ValidatingAdmissionPolicyBindingSpecFluent> implements Nested{ + SpecNested(V1alpha1ValidatingAdmissionPolicyBindingSpec item) { + this.builder = new V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(this, item); + } + V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyBindingFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.java deleted file mode 100644 index 17ccc5b92a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ValidatingAdmissionPolicyBindingFluentImpl> extends BaseFluent implements V1alpha1ValidatingAdmissionPolicyBindingFluent{ - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl() { - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl(V1alpha1ValidatingAdmissionPolicyBinding instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.MetadataNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ValidatingAdmissionPolicyBindingSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1alpha1ValidatingAdmissionPolicyBindingSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1alpha1ValidatingAdmissionPolicyBindingSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.SpecNested withNewSpec() { - return new V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.SpecNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.SpecNested withNewSpecLike(V1alpha1ValidatingAdmissionPolicyBindingSpec item) { - return new V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.SpecNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.SpecNested editOrNewSpecLike(V1alpha1ValidatingAdmissionPolicyBindingSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ValidatingAdmissionPolicyBindingFluentImpl that = (V1alpha1ValidatingAdmissionPolicyBindingFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl> implements V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1alpha1ValidatingAdmissionPolicyBindingSpec item) { - this.builder = new V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(this); - } - V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyBindingFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListBuilder.java index f14d16b652..b370f5499c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ValidatingAdmissionPolicyBindingListBuilder extends V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl implements VisitableBuilder{ +public class V1alpha1ValidatingAdmissionPolicyBindingListBuilder extends V1alpha1ValidatingAdmissionPolicyBindingListFluent implements VisitableBuilder{ public V1alpha1ValidatingAdmissionPolicyBindingListBuilder() { - this(false); - } - public V1alpha1ValidatingAdmissionPolicyBindingListBuilder(Boolean validationEnabled) { - this(new V1alpha1ValidatingAdmissionPolicyBindingList(), validationEnabled); + this(new V1alpha1ValidatingAdmissionPolicyBindingList()); } + public V1alpha1ValidatingAdmissionPolicyBindingListBuilder(V1alpha1ValidatingAdmissionPolicyBindingListFluent fluent) { - this(fluent, false); - } - public V1alpha1ValidatingAdmissionPolicyBindingListBuilder(V1alpha1ValidatingAdmissionPolicyBindingListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ValidatingAdmissionPolicyBindingList(), validationEnabled); + this(fluent, new V1alpha1ValidatingAdmissionPolicyBindingList()); } + public V1alpha1ValidatingAdmissionPolicyBindingListBuilder(V1alpha1ValidatingAdmissionPolicyBindingListFluent fluent,V1alpha1ValidatingAdmissionPolicyBindingList instance) { - this(fluent, instance, false); - } - public V1alpha1ValidatingAdmissionPolicyBindingListBuilder(V1alpha1ValidatingAdmissionPolicyBindingListFluent fluent,V1alpha1ValidatingAdmissionPolicyBindingList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ValidatingAdmissionPolicyBindingListBuilder(V1alpha1ValidatingAdmissionPolicyBindingList instance) { - this(instance,false); - } - public V1alpha1ValidatingAdmissionPolicyBindingListBuilder(V1alpha1ValidatingAdmissionPolicyBindingList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ValidatingAdmissionPolicyBindingListFluent fluent; - Boolean validationEnabled; + public V1alpha1ValidatingAdmissionPolicyBindingList build() { V1alpha1ValidatingAdmissionPolicyBindingList buildable = new V1alpha1ValidatingAdmissionPolicyBindingList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListFluent.java index 722eae4973..995480d316 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ValidatingAdmissionPolicyBindingListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha1ValidatingAdmissionPolicyBinding item); - public A setToItems(int index,V1alpha1ValidatingAdmissionPolicyBinding item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha1ValidatingAdmissionPolicyBinding buildItem(int index); - public V1alpha1ValidatingAdmissionPolicyBinding buildFirstItem(); - public V1alpha1ValidatingAdmissionPolicyBinding buildLastItem(); - public V1alpha1ValidatingAdmissionPolicyBinding buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding... items); - public Boolean hasItems(); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.ItemsNested addNewItem(); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.ItemsNested addNewItemLike(V1alpha1ValidatingAdmissionPolicyBinding item); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.ItemsNested setNewItemLike(int index,V1alpha1ValidatingAdmissionPolicyBinding item); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.ItemsNested editItem(int index); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.ItemsNested editFirstItem(); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.ItemsNested editLastItem(); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.MetadataNested withNewMetadata(); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.MetadataNested editMetadata(); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.MetadataNested editOrNewMetadata(); - public V1alpha1ValidatingAdmissionPolicyBindingListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha1ValidatingAdmissionPolicyBindingFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ValidatingAdmissionPolicyBindingListFluent> extends BaseFluent{ + public V1alpha1ValidatingAdmissionPolicyBindingListFluent() { + } + + public V1alpha1ValidatingAdmissionPolicyBindingListFluent(V1alpha1ValidatingAdmissionPolicyBindingList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha1ValidatingAdmissionPolicyBindingList instance) { + instance = (instance != null ? instance : new V1alpha1ValidatingAdmissionPolicyBindingList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha1ValidatingAdmissionPolicyBinding item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha1ValidatingAdmissionPolicyBinding item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1ValidatingAdmissionPolicyBinding item : items) {V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1ValidatingAdmissionPolicyBinding item : items) {V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding... items) { + if (this.items == null) return (A)this; + for (V1alpha1ValidatingAdmissionPolicyBinding item : items) {V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha1ValidatingAdmissionPolicyBinding item : items) {V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha1ValidatingAdmissionPolicyBinding buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha1ValidatingAdmissionPolicyBinding buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha1ValidatingAdmissionPolicyBinding buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha1ValidatingAdmissionPolicyBinding buildMatchingItem(Predicate predicate) { + for (V1alpha1ValidatingAdmissionPolicyBindingBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha1ValidatingAdmissionPolicyBindingBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha1ValidatingAdmissionPolicyBinding item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha1ValidatingAdmissionPolicyBinding item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha1ValidatingAdmissionPolicyBinding item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha1ValidatingAdmissionPolicyBinding item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ValidatingAdmissionPolicyBindingListFluent that = (V1alpha1ValidatingAdmissionPolicyBindingListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha1ValidatingAdmissionPolicyBindingFluent> implements Nested{ + ItemsNested(int index,V1alpha1ValidatingAdmissionPolicyBinding item) { + this.index = index; + this.builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(this, item); + } + V1alpha1ValidatingAdmissionPolicyBindingBuilder builder; + int index; + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyBindingListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyBindingListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.java deleted file mode 100644 index cb367a7eec..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl> extends BaseFluent implements V1alpha1ValidatingAdmissionPolicyBindingListFluent{ - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl() { - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl(V1alpha1ValidatingAdmissionPolicyBindingList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha1ValidatingAdmissionPolicyBinding item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha1ValidatingAdmissionPolicyBinding item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1ValidatingAdmissionPolicyBinding item : items) {V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1ValidatingAdmissionPolicyBinding item : items) {V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding... items) { - for (V1alpha1ValidatingAdmissionPolicyBinding item : items) {V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha1ValidatingAdmissionPolicyBinding item : items) {V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha1ValidatingAdmissionPolicyBindingBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha1ValidatingAdmissionPolicyBinding buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha1ValidatingAdmissionPolicyBinding buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha1ValidatingAdmissionPolicyBinding buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha1ValidatingAdmissionPolicyBinding buildMatchingItem(Predicate predicate) { - for (V1alpha1ValidatingAdmissionPolicyBindingBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha1ValidatingAdmissionPolicyBindingBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha1ValidatingAdmissionPolicyBinding item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicyBinding... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha1ValidatingAdmissionPolicyBinding item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNested addNewItem() { - return new V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNested addNewItemLike(V1alpha1ValidatingAdmissionPolicyBinding item) { - return new V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha1ValidatingAdmissionPolicyBinding item) { - return new V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.MetadataNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl that = (V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha1ValidatingAdmissionPolicyBindingFluentImpl> implements V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha1ValidatingAdmissionPolicyBinding item) { - this.index = index; - this.builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1ValidatingAdmissionPolicyBindingBuilder(this); - } - V1alpha1ValidatingAdmissionPolicyBindingBuilder builder; - int index; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyBindingListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder.java index 8f2732d4b2..f62dc42347 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder extends V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl implements VisitableBuilder{ +public class V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder extends V1alpha1ValidatingAdmissionPolicyBindingSpecFluent implements VisitableBuilder{ public V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder() { - this(false); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(Boolean validationEnabled) { - this(new V1alpha1ValidatingAdmissionPolicyBindingSpec(), validationEnabled); + this(new V1alpha1ValidatingAdmissionPolicyBindingSpec()); } + public V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(V1alpha1ValidatingAdmissionPolicyBindingSpecFluent fluent) { - this(fluent, false); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(V1alpha1ValidatingAdmissionPolicyBindingSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ValidatingAdmissionPolicyBindingSpec(), validationEnabled); + this(fluent, new V1alpha1ValidatingAdmissionPolicyBindingSpec()); } + public V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(V1alpha1ValidatingAdmissionPolicyBindingSpecFluent fluent,V1alpha1ValidatingAdmissionPolicyBindingSpec instance) { - this(fluent, instance, false); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(V1alpha1ValidatingAdmissionPolicyBindingSpecFluent fluent,V1alpha1ValidatingAdmissionPolicyBindingSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMatchResources(instance.getMatchResources()); - fluent.withParamRef(instance.getParamRef()); - fluent.withPolicyName(instance.getPolicyName()); - fluent.withValidationActions(instance.getValidationActions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(V1alpha1ValidatingAdmissionPolicyBindingSpec instance) { - this(instance,false); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecBuilder(V1alpha1ValidatingAdmissionPolicyBindingSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMatchResources(instance.getMatchResources()); - this.withParamRef(instance.getParamRef()); - this.withPolicyName(instance.getPolicyName()); - this.withValidationActions(instance.getValidationActions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ValidatingAdmissionPolicyBindingSpecFluent fluent; - Boolean validationEnabled; + public V1alpha1ValidatingAdmissionPolicyBindingSpec build() { V1alpha1ValidatingAdmissionPolicyBindingSpec buildable = new V1alpha1ValidatingAdmissionPolicyBindingSpec(); - buildable.setMatchResources(fluent.getMatchResources()); - buildable.setParamRef(fluent.getParamRef()); + buildable.setMatchResources(fluent.buildMatchResources()); + buildable.setParamRef(fluent.buildParamRef()); buildable.setPolicyName(fluent.getPolicyName()); buildable.setValidationActions(fluent.getValidationActions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.java index c77b4f4555..b17520031f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.java @@ -1,77 +1,285 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ValidatingAdmissionPolicyBindingSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildMatchResources instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1MatchResources getMatchResources(); - public V1alpha1MatchResources buildMatchResources(); - public A withMatchResources(V1alpha1MatchResources matchResources); - public Boolean hasMatchResources(); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.MatchResourcesNested withNewMatchResources(); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.MatchResourcesNested withNewMatchResourcesLike(V1alpha1MatchResources item); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.MatchResourcesNested editMatchResources(); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.MatchResourcesNested editOrNewMatchResources(); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.MatchResourcesNested editOrNewMatchResourcesLike(V1alpha1MatchResources item); - - /** - * This method has been deprecated, please use method buildParamRef instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ParamRef getParamRef(); - public V1alpha1ParamRef buildParamRef(); - public A withParamRef(V1alpha1ParamRef paramRef); - public Boolean hasParamRef(); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.ParamRefNested withNewParamRef(); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.ParamRefNested withNewParamRefLike(V1alpha1ParamRef item); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.ParamRefNested editParamRef(); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.ParamRefNested editOrNewParamRef(); - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.ParamRefNested editOrNewParamRefLike(V1alpha1ParamRef item); - public String getPolicyName(); - public A withPolicyName(String policyName); - public Boolean hasPolicyName(); - public A addToValidationActions(int index,String item); - public A setToValidationActions(int index,String item); - public A addToValidationActions(java.lang.String... items); - public A addAllToValidationActions(Collection items); - public A removeFromValidationActions(java.lang.String... items); - public A removeAllFromValidationActions(Collection items); - public List getValidationActions(); - public String getValidationAction(int index); - public String getFirstValidationAction(); - public String getLastValidationAction(); - public String getMatchingValidationAction(Predicate predicate); - public Boolean hasMatchingValidationAction(Predicate predicate); - public A withValidationActions(List validationActions); - public A withValidationActions(java.lang.String... validationActions); - public Boolean hasValidationActions(); - public interface MatchResourcesNested extends Nested,V1alpha1MatchResourcesFluent>{ - public N and(); - public N endMatchResources(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ValidatingAdmissionPolicyBindingSpecFluent> extends BaseFluent{ + public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent() { + } + + public V1alpha1ValidatingAdmissionPolicyBindingSpecFluent(V1alpha1ValidatingAdmissionPolicyBindingSpec instance) { + this.copyInstance(instance); + } + private V1alpha1MatchResourcesBuilder matchResources; + private V1alpha1ParamRefBuilder paramRef; + private String policyName; + private List validationActions; + + protected void copyInstance(V1alpha1ValidatingAdmissionPolicyBindingSpec instance) { + instance = (instance != null ? instance : new V1alpha1ValidatingAdmissionPolicyBindingSpec()); + if (instance != null) { + this.withMatchResources(instance.getMatchResources()); + this.withParamRef(instance.getParamRef()); + this.withPolicyName(instance.getPolicyName()); + this.withValidationActions(instance.getValidationActions()); + } + } + + public V1alpha1MatchResources buildMatchResources() { + return this.matchResources != null ? this.matchResources.build() : null; + } + + public A withMatchResources(V1alpha1MatchResources matchResources) { + this._visitables.remove("matchResources"); + if (matchResources != null) { + this.matchResources = new V1alpha1MatchResourcesBuilder(matchResources); + this._visitables.get("matchResources").add(this.matchResources); + } else { + this.matchResources = null; + this._visitables.get("matchResources").remove(this.matchResources); + } + return (A) this; + } + + public boolean hasMatchResources() { + return this.matchResources != null; + } + + public MatchResourcesNested withNewMatchResources() { + return new MatchResourcesNested(null); + } + + public MatchResourcesNested withNewMatchResourcesLike(V1alpha1MatchResources item) { + return new MatchResourcesNested(item); + } + + public MatchResourcesNested editMatchResources() { + return withNewMatchResourcesLike(java.util.Optional.ofNullable(buildMatchResources()).orElse(null)); + } + + public MatchResourcesNested editOrNewMatchResources() { + return withNewMatchResourcesLike(java.util.Optional.ofNullable(buildMatchResources()).orElse(new V1alpha1MatchResourcesBuilder().build())); + } + + public MatchResourcesNested editOrNewMatchResourcesLike(V1alpha1MatchResources item) { + return withNewMatchResourcesLike(java.util.Optional.ofNullable(buildMatchResources()).orElse(item)); + } + + public V1alpha1ParamRef buildParamRef() { + return this.paramRef != null ? this.paramRef.build() : null; + } + + public A withParamRef(V1alpha1ParamRef paramRef) { + this._visitables.remove("paramRef"); + if (paramRef != null) { + this.paramRef = new V1alpha1ParamRefBuilder(paramRef); + this._visitables.get("paramRef").add(this.paramRef); + } else { + this.paramRef = null; + this._visitables.get("paramRef").remove(this.paramRef); + } + return (A) this; + } + + public boolean hasParamRef() { + return this.paramRef != null; + } + + public ParamRefNested withNewParamRef() { + return new ParamRefNested(null); + } + + public ParamRefNested withNewParamRefLike(V1alpha1ParamRef item) { + return new ParamRefNested(item); + } + + public ParamRefNested editParamRef() { + return withNewParamRefLike(java.util.Optional.ofNullable(buildParamRef()).orElse(null)); } - public interface ParamRefNested extends Nested,V1alpha1ParamRefFluent>{ - public N and(); - public N endParamRef(); + + public ParamRefNested editOrNewParamRef() { + return withNewParamRefLike(java.util.Optional.ofNullable(buildParamRef()).orElse(new V1alpha1ParamRefBuilder().build())); + } + + public ParamRefNested editOrNewParamRefLike(V1alpha1ParamRef item) { + return withNewParamRefLike(java.util.Optional.ofNullable(buildParamRef()).orElse(item)); + } + + public String getPolicyName() { + return this.policyName; + } + + public A withPolicyName(String policyName) { + this.policyName = policyName; + return (A) this; + } + + public boolean hasPolicyName() { + return this.policyName != null; + } + + public A addToValidationActions(int index,String item) { + if (this.validationActions == null) {this.validationActions = new ArrayList();} + this.validationActions.add(index, item); + return (A)this; + } + + public A setToValidationActions(int index,String item) { + if (this.validationActions == null) {this.validationActions = new ArrayList();} + this.validationActions.set(index, item); return (A)this; + } + + public A addToValidationActions(java.lang.String... items) { + if (this.validationActions == null) {this.validationActions = new ArrayList();} + for (String item : items) {this.validationActions.add(item);} return (A)this; + } + + public A addAllToValidationActions(Collection items) { + if (this.validationActions == null) {this.validationActions = new ArrayList();} + for (String item : items) {this.validationActions.add(item);} return (A)this; + } + + public A removeFromValidationActions(java.lang.String... items) { + if (this.validationActions == null) return (A)this; + for (String item : items) { this.validationActions.remove(item);} return (A)this; + } + + public A removeAllFromValidationActions(Collection items) { + if (this.validationActions == null) return (A)this; + for (String item : items) { this.validationActions.remove(item);} return (A)this; + } + + public List getValidationActions() { + return this.validationActions; + } + + public String getValidationAction(int index) { + return this.validationActions.get(index); + } + + public String getFirstValidationAction() { + return this.validationActions.get(0); + } + + public String getLastValidationAction() { + return this.validationActions.get(validationActions.size() - 1); + } + + public String getMatchingValidationAction(Predicate predicate) { + for (String item : validationActions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingValidationAction(Predicate predicate) { + for (String item : validationActions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withValidationActions(List validationActions) { + if (validationActions != null) { + this.validationActions = new ArrayList(); + for (String item : validationActions) { + this.addToValidationActions(item); + } + } else { + this.validationActions = null; + } + return (A) this; + } + + public A withValidationActions(java.lang.String... validationActions) { + if (this.validationActions != null) { + this.validationActions.clear(); + _visitables.remove("validationActions"); + } + if (validationActions != null) { + for (String item : validationActions) { + this.addToValidationActions(item); + } + } + return (A) this; + } + + public boolean hasValidationActions() { + return this.validationActions != null && !this.validationActions.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ValidatingAdmissionPolicyBindingSpecFluent that = (V1alpha1ValidatingAdmissionPolicyBindingSpecFluent) o; + if (!java.util.Objects.equals(matchResources, that.matchResources)) return false; + if (!java.util.Objects.equals(paramRef, that.paramRef)) return false; + if (!java.util.Objects.equals(policyName, that.policyName)) return false; + if (!java.util.Objects.equals(validationActions, that.validationActions)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(matchResources, paramRef, policyName, validationActions, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (matchResources != null) { sb.append("matchResources:"); sb.append(matchResources + ","); } + if (paramRef != null) { sb.append("paramRef:"); sb.append(paramRef + ","); } + if (policyName != null) { sb.append("policyName:"); sb.append(policyName + ","); } + if (validationActions != null && !validationActions.isEmpty()) { sb.append("validationActions:"); sb.append(validationActions); } + sb.append("}"); + return sb.toString(); + } + public class MatchResourcesNested extends V1alpha1MatchResourcesFluent> implements Nested{ + MatchResourcesNested(V1alpha1MatchResources item) { + this.builder = new V1alpha1MatchResourcesBuilder(this, item); + } + V1alpha1MatchResourcesBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.this.withMatchResources(builder.build()); + } + public N endMatchResources() { + return and(); + } + + } + public class ParamRefNested extends V1alpha1ParamRefFluent> implements Nested{ + ParamRefNested(V1alpha1ParamRef item) { + this.builder = new V1alpha1ParamRefBuilder(this, item); + } + V1alpha1ParamRefBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyBindingSpecFluent.this.withParamRef(builder.build()); + } + + public N endParamRef() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.java deleted file mode 100644 index 66f48da0fb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl> extends BaseFluent implements V1alpha1ValidatingAdmissionPolicyBindingSpecFluent{ - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl() { - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl(V1alpha1ValidatingAdmissionPolicyBindingSpec instance) { - if (instance != null) { - this.withMatchResources(instance.getMatchResources()); - this.withParamRef(instance.getParamRef()); - this.withPolicyName(instance.getPolicyName()); - this.withValidationActions(instance.getValidationActions()); - } - } - private V1alpha1MatchResourcesBuilder matchResources; - private V1alpha1ParamRefBuilder paramRef; - private String policyName; - private List validationActions; - - /** - * This method has been deprecated, please use method buildMatchResources instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1MatchResources getMatchResources() { - return this.matchResources!=null ?this.matchResources.build():null; - } - public V1alpha1MatchResources buildMatchResources() { - return this.matchResources!=null ?this.matchResources.build():null; - } - public A withMatchResources(V1alpha1MatchResources matchResources) { - _visitables.get("matchResources").remove(this.matchResources); - if (matchResources!=null){ this.matchResources= new V1alpha1MatchResourcesBuilder(matchResources); _visitables.get("matchResources").add(this.matchResources);} else { this.matchResources = null; _visitables.get("matchResources").remove(this.matchResources); } return (A) this; - } - public Boolean hasMatchResources() { - return this.matchResources != null; - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.MatchResourcesNested withNewMatchResources() { - return new V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.MatchResourcesNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.MatchResourcesNested withNewMatchResourcesLike(V1alpha1MatchResources item) { - return new V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.MatchResourcesNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.MatchResourcesNested editMatchResources() { - return withNewMatchResourcesLike(getMatchResources()); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.MatchResourcesNested editOrNewMatchResources() { - return withNewMatchResourcesLike(getMatchResources() != null ? getMatchResources(): new V1alpha1MatchResourcesBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.MatchResourcesNested editOrNewMatchResourcesLike(V1alpha1MatchResources item) { - return withNewMatchResourcesLike(getMatchResources() != null ? getMatchResources(): item); - } - - /** - * This method has been deprecated, please use method buildParamRef instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ParamRef getParamRef() { - return this.paramRef!=null ?this.paramRef.build():null; - } - public V1alpha1ParamRef buildParamRef() { - return this.paramRef!=null ?this.paramRef.build():null; - } - public A withParamRef(V1alpha1ParamRef paramRef) { - _visitables.get("paramRef").remove(this.paramRef); - if (paramRef!=null){ this.paramRef= new V1alpha1ParamRefBuilder(paramRef); _visitables.get("paramRef").add(this.paramRef);} else { this.paramRef = null; _visitables.get("paramRef").remove(this.paramRef); } return (A) this; - } - public Boolean hasParamRef() { - return this.paramRef != null; - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.ParamRefNested withNewParamRef() { - return new V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.ParamRefNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.ParamRefNested withNewParamRefLike(V1alpha1ParamRef item) { - return new V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.ParamRefNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.ParamRefNested editParamRef() { - return withNewParamRefLike(getParamRef()); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.ParamRefNested editOrNewParamRef() { - return withNewParamRefLike(getParamRef() != null ? getParamRef(): new V1alpha1ParamRefBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.ParamRefNested editOrNewParamRefLike(V1alpha1ParamRef item) { - return withNewParamRefLike(getParamRef() != null ? getParamRef(): item); - } - public String getPolicyName() { - return this.policyName; - } - public A withPolicyName(String policyName) { - this.policyName=policyName; return (A) this; - } - public Boolean hasPolicyName() { - return this.policyName != null; - } - public A addToValidationActions(int index,String item) { - if (this.validationActions == null) {this.validationActions = new ArrayList();} - this.validationActions.add(index, item); - return (A)this; - } - public A setToValidationActions(int index,String item) { - if (this.validationActions == null) {this.validationActions = new ArrayList();} - this.validationActions.set(index, item); return (A)this; - } - public A addToValidationActions(java.lang.String... items) { - if (this.validationActions == null) {this.validationActions = new ArrayList();} - for (String item : items) {this.validationActions.add(item);} return (A)this; - } - public A addAllToValidationActions(Collection items) { - if (this.validationActions == null) {this.validationActions = new ArrayList();} - for (String item : items) {this.validationActions.add(item);} return (A)this; - } - public A removeFromValidationActions(java.lang.String... items) { - for (String item : items) {if (this.validationActions!= null){ this.validationActions.remove(item);}} return (A)this; - } - public A removeAllFromValidationActions(Collection items) { - for (String item : items) {if (this.validationActions!= null){ this.validationActions.remove(item);}} return (A)this; - } - public List getValidationActions() { - return this.validationActions; - } - public String getValidationAction(int index) { - return this.validationActions.get(index); - } - public String getFirstValidationAction() { - return this.validationActions.get(0); - } - public String getLastValidationAction() { - return this.validationActions.get(validationActions.size() - 1); - } - public String getMatchingValidationAction(Predicate predicate) { - for (String item: validationActions) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingValidationAction(Predicate predicate) { - for (String item: validationActions) { if(predicate.test(item)){ return true;} } return false; - } - public A withValidationActions(List validationActions) { - if (validationActions != null) {this.validationActions = new ArrayList(); for (String item : validationActions){this.addToValidationActions(item);}} else { this.validationActions = null;} return (A) this; - } - public A withValidationActions(java.lang.String... validationActions) { - if (this.validationActions != null) {this.validationActions.clear(); _visitables.remove("validationActions"); } - if (validationActions != null) {for (String item :validationActions){ this.addToValidationActions(item);}} return (A) this; - } - public Boolean hasValidationActions() { - return validationActions != null && !validationActions.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl that = (V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl) o; - if (!java.util.Objects.equals(matchResources, that.matchResources)) return false; - - if (!java.util.Objects.equals(paramRef, that.paramRef)) return false; - - if (!java.util.Objects.equals(policyName, that.policyName)) return false; - - if (!java.util.Objects.equals(validationActions, that.validationActions)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(matchResources, paramRef, policyName, validationActions, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (matchResources != null) { sb.append("matchResources:"); sb.append(matchResources + ","); } - if (paramRef != null) { sb.append("paramRef:"); sb.append(paramRef + ","); } - if (policyName != null) { sb.append("policyName:"); sb.append(policyName + ","); } - if (validationActions != null && !validationActions.isEmpty()) { sb.append("validationActions:"); sb.append(validationActions); } - sb.append("}"); - return sb.toString(); - } - class MatchResourcesNestedImpl extends V1alpha1MatchResourcesFluentImpl> implements V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.MatchResourcesNested,Nested{ - MatchResourcesNestedImpl(V1alpha1MatchResources item) { - this.builder = new V1alpha1MatchResourcesBuilder(this, item); - } - MatchResourcesNestedImpl() { - this.builder = new V1alpha1MatchResourcesBuilder(this); - } - V1alpha1MatchResourcesBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.this.withMatchResources(builder.build()); - } - public N endMatchResources() { - return and(); - } - - } - class ParamRefNestedImpl extends V1alpha1ParamRefFluentImpl> implements V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.ParamRefNested,Nested{ - ParamRefNestedImpl(V1alpha1ParamRef item) { - this.builder = new V1alpha1ParamRefBuilder(this, item); - } - ParamRefNestedImpl() { - this.builder = new V1alpha1ParamRefBuilder(this); - } - V1alpha1ParamRefBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyBindingSpecFluentImpl.this.withParamRef(builder.build()); - } - public N endParamRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBuilder.java index 551fa6e41e..8e6c1d8c9e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ValidatingAdmissionPolicyBuilder extends V1alpha1ValidatingAdmissionPolicyFluentImpl implements VisitableBuilder{ +public class V1alpha1ValidatingAdmissionPolicyBuilder extends V1alpha1ValidatingAdmissionPolicyFluent implements VisitableBuilder{ public V1alpha1ValidatingAdmissionPolicyBuilder() { - this(false); - } - public V1alpha1ValidatingAdmissionPolicyBuilder(Boolean validationEnabled) { - this(new V1alpha1ValidatingAdmissionPolicy(), validationEnabled); + this(new V1alpha1ValidatingAdmissionPolicy()); } + public V1alpha1ValidatingAdmissionPolicyBuilder(V1alpha1ValidatingAdmissionPolicyFluent fluent) { - this(fluent, false); - } - public V1alpha1ValidatingAdmissionPolicyBuilder(V1alpha1ValidatingAdmissionPolicyFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ValidatingAdmissionPolicy(), validationEnabled); + this(fluent, new V1alpha1ValidatingAdmissionPolicy()); } + public V1alpha1ValidatingAdmissionPolicyBuilder(V1alpha1ValidatingAdmissionPolicyFluent fluent,V1alpha1ValidatingAdmissionPolicy instance) { - this(fluent, instance, false); - } - public V1alpha1ValidatingAdmissionPolicyBuilder(V1alpha1ValidatingAdmissionPolicyFluent fluent,V1alpha1ValidatingAdmissionPolicy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ValidatingAdmissionPolicyBuilder(V1alpha1ValidatingAdmissionPolicy instance) { - this(instance,false); - } - public V1alpha1ValidatingAdmissionPolicyBuilder(V1alpha1ValidatingAdmissionPolicy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ValidatingAdmissionPolicyFluent fluent; - Boolean validationEnabled; + public V1alpha1ValidatingAdmissionPolicy build() { V1alpha1ValidatingAdmissionPolicy buildable = new V1alpha1ValidatingAdmissionPolicy(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyFluent.java index 1ae232adf0..427937b479 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha1ValidatingAdmissionPolicyFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha1ValidatingAdmissionPolicyFluent.MetadataNested withNewMetadata(); - public V1alpha1ValidatingAdmissionPolicyFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha1ValidatingAdmissionPolicyFluent.MetadataNested editMetadata(); - public V1alpha1ValidatingAdmissionPolicyFluent.MetadataNested editOrNewMetadata(); - public V1alpha1ValidatingAdmissionPolicyFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ValidatingAdmissionPolicySpec getSpec(); - public V1alpha1ValidatingAdmissionPolicySpec buildSpec(); - public A withSpec(V1alpha1ValidatingAdmissionPolicySpec spec); - public Boolean hasSpec(); - public V1alpha1ValidatingAdmissionPolicyFluent.SpecNested withNewSpec(); - public V1alpha1ValidatingAdmissionPolicyFluent.SpecNested withNewSpecLike(V1alpha1ValidatingAdmissionPolicySpec item); - public V1alpha1ValidatingAdmissionPolicyFluent.SpecNested editSpec(); - public V1alpha1ValidatingAdmissionPolicyFluent.SpecNested editOrNewSpec(); - public V1alpha1ValidatingAdmissionPolicyFluent.SpecNested editOrNewSpecLike(V1alpha1ValidatingAdmissionPolicySpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ValidatingAdmissionPolicyStatus getStatus(); - public V1alpha1ValidatingAdmissionPolicyStatus buildStatus(); - public A withStatus(V1alpha1ValidatingAdmissionPolicyStatus status); - public Boolean hasStatus(); - public V1alpha1ValidatingAdmissionPolicyFluent.StatusNested withNewStatus(); - public V1alpha1ValidatingAdmissionPolicyFluent.StatusNested withNewStatusLike(V1alpha1ValidatingAdmissionPolicyStatus item); - public V1alpha1ValidatingAdmissionPolicyFluent.StatusNested editStatus(); - public V1alpha1ValidatingAdmissionPolicyFluent.StatusNested editOrNewStatus(); - public V1alpha1ValidatingAdmissionPolicyFluent.StatusNested editOrNewStatusLike(V1alpha1ValidatingAdmissionPolicyStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ValidatingAdmissionPolicyFluent> extends BaseFluent{ + public V1alpha1ValidatingAdmissionPolicyFluent() { + } + + public V1alpha1ValidatingAdmissionPolicyFluent(V1alpha1ValidatingAdmissionPolicy instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha1ValidatingAdmissionPolicySpecBuilder spec; + private V1alpha1ValidatingAdmissionPolicyStatusBuilder status; + + protected void copyInstance(V1alpha1ValidatingAdmissionPolicy instance) { + instance = (instance != null ? instance : new V1alpha1ValidatingAdmissionPolicy()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha1ValidatingAdmissionPolicySpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1alpha1ValidatingAdmissionPolicySpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1alpha1ValidatingAdmissionPolicySpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1alpha1ValidatingAdmissionPolicySpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1alpha1ValidatingAdmissionPolicySpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1alpha1ValidatingAdmissionPolicySpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1alpha1ValidatingAdmissionPolicySpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1alpha1ValidatingAdmissionPolicyStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1alpha1ValidatingAdmissionPolicyStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1alpha1ValidatingAdmissionPolicyStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1alpha1ValidatingAdmissionPolicyStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1alpha1ValidatingAdmissionPolicyStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1alpha1ValidatingAdmissionPolicyStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ValidatingAdmissionPolicyFluent that = (V1alpha1ValidatingAdmissionPolicyFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1alpha1ValidatingAdmissionPolicyStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1alpha1ValidatingAdmissionPolicySpecFluent> implements Nested{ + SpecNested(V1alpha1ValidatingAdmissionPolicySpec item) { + this.builder = new V1alpha1ValidatingAdmissionPolicySpecBuilder(this, item); + } + V1alpha1ValidatingAdmissionPolicySpecBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1alpha1ValidatingAdmissionPolicyStatusFluent> implements Nested{ + StatusNested(V1alpha1ValidatingAdmissionPolicyStatus item) { + this.builder = new V1alpha1ValidatingAdmissionPolicyStatusBuilder(this, item); + } + V1alpha1ValidatingAdmissionPolicyStatusBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyFluentImpl.java deleted file mode 100644 index e1dc0544d7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ValidatingAdmissionPolicyFluentImpl> extends BaseFluent implements V1alpha1ValidatingAdmissionPolicyFluent{ - public V1alpha1ValidatingAdmissionPolicyFluentImpl() { - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl(V1alpha1ValidatingAdmissionPolicy instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha1ValidatingAdmissionPolicySpecBuilder spec; - private V1alpha1ValidatingAdmissionPolicyStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha1ValidatingAdmissionPolicyFluentImpl.MetadataNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha1ValidatingAdmissionPolicyFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ValidatingAdmissionPolicySpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1alpha1ValidatingAdmissionPolicySpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1alpha1ValidatingAdmissionPolicySpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1alpha1ValidatingAdmissionPolicySpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.SpecNested withNewSpec() { - return new V1alpha1ValidatingAdmissionPolicyFluentImpl.SpecNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.SpecNested withNewSpecLike(V1alpha1ValidatingAdmissionPolicySpec item) { - return new V1alpha1ValidatingAdmissionPolicyFluentImpl.SpecNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1alpha1ValidatingAdmissionPolicySpecBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.SpecNested editOrNewSpecLike(V1alpha1ValidatingAdmissionPolicySpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ValidatingAdmissionPolicyStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1alpha1ValidatingAdmissionPolicyStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1alpha1ValidatingAdmissionPolicyStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1alpha1ValidatingAdmissionPolicyStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.StatusNested withNewStatus() { - return new V1alpha1ValidatingAdmissionPolicyFluentImpl.StatusNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.StatusNested withNewStatusLike(V1alpha1ValidatingAdmissionPolicyStatus item) { - return new V1alpha1ValidatingAdmissionPolicyFluentImpl.StatusNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1alpha1ValidatingAdmissionPolicyStatusBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyFluentImpl.StatusNested editOrNewStatusLike(V1alpha1ValidatingAdmissionPolicyStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ValidatingAdmissionPolicyFluentImpl that = (V1alpha1ValidatingAdmissionPolicyFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha1ValidatingAdmissionPolicyFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1alpha1ValidatingAdmissionPolicySpecFluentImpl> implements V1alpha1ValidatingAdmissionPolicyFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1alpha1ValidatingAdmissionPolicySpec item) { - this.builder = new V1alpha1ValidatingAdmissionPolicySpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1alpha1ValidatingAdmissionPolicySpecBuilder(this); - } - V1alpha1ValidatingAdmissionPolicySpecBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1alpha1ValidatingAdmissionPolicyStatusFluentImpl> implements V1alpha1ValidatingAdmissionPolicyFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1alpha1ValidatingAdmissionPolicyStatus item) { - this.builder = new V1alpha1ValidatingAdmissionPolicyStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1alpha1ValidatingAdmissionPolicyStatusBuilder(this); - } - V1alpha1ValidatingAdmissionPolicyStatusBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListBuilder.java index 77b9d98b1c..948170ced1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ValidatingAdmissionPolicyListBuilder extends V1alpha1ValidatingAdmissionPolicyListFluentImpl implements VisitableBuilder{ +public class V1alpha1ValidatingAdmissionPolicyListBuilder extends V1alpha1ValidatingAdmissionPolicyListFluent implements VisitableBuilder{ public V1alpha1ValidatingAdmissionPolicyListBuilder() { - this(false); - } - public V1alpha1ValidatingAdmissionPolicyListBuilder(Boolean validationEnabled) { - this(new V1alpha1ValidatingAdmissionPolicyList(), validationEnabled); + this(new V1alpha1ValidatingAdmissionPolicyList()); } + public V1alpha1ValidatingAdmissionPolicyListBuilder(V1alpha1ValidatingAdmissionPolicyListFluent fluent) { - this(fluent, false); - } - public V1alpha1ValidatingAdmissionPolicyListBuilder(V1alpha1ValidatingAdmissionPolicyListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ValidatingAdmissionPolicyList(), validationEnabled); + this(fluent, new V1alpha1ValidatingAdmissionPolicyList()); } + public V1alpha1ValidatingAdmissionPolicyListBuilder(V1alpha1ValidatingAdmissionPolicyListFluent fluent,V1alpha1ValidatingAdmissionPolicyList instance) { - this(fluent, instance, false); - } - public V1alpha1ValidatingAdmissionPolicyListBuilder(V1alpha1ValidatingAdmissionPolicyListFluent fluent,V1alpha1ValidatingAdmissionPolicyList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ValidatingAdmissionPolicyListBuilder(V1alpha1ValidatingAdmissionPolicyList instance) { - this(instance,false); - } - public V1alpha1ValidatingAdmissionPolicyListBuilder(V1alpha1ValidatingAdmissionPolicyList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ValidatingAdmissionPolicyListFluent fluent; - Boolean validationEnabled; + public V1alpha1ValidatingAdmissionPolicyList build() { V1alpha1ValidatingAdmissionPolicyList buildable = new V1alpha1ValidatingAdmissionPolicyList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListFluent.java index d86c2604a5..10650dcf47 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ValidatingAdmissionPolicyListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha1ValidatingAdmissionPolicy item); - public A setToItems(int index,V1alpha1ValidatingAdmissionPolicy item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha1ValidatingAdmissionPolicy buildItem(int index); - public V1alpha1ValidatingAdmissionPolicy buildFirstItem(); - public V1alpha1ValidatingAdmissionPolicy buildLastItem(); - public V1alpha1ValidatingAdmissionPolicy buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy... items); - public Boolean hasItems(); - public V1alpha1ValidatingAdmissionPolicyListFluent.ItemsNested addNewItem(); - public V1alpha1ValidatingAdmissionPolicyListFluent.ItemsNested addNewItemLike(V1alpha1ValidatingAdmissionPolicy item); - public V1alpha1ValidatingAdmissionPolicyListFluent.ItemsNested setNewItemLike(int index,V1alpha1ValidatingAdmissionPolicy item); - public V1alpha1ValidatingAdmissionPolicyListFluent.ItemsNested editItem(int index); - public V1alpha1ValidatingAdmissionPolicyListFluent.ItemsNested editFirstItem(); - public V1alpha1ValidatingAdmissionPolicyListFluent.ItemsNested editLastItem(); - public V1alpha1ValidatingAdmissionPolicyListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha1ValidatingAdmissionPolicyListFluent.MetadataNested withNewMetadata(); - public V1alpha1ValidatingAdmissionPolicyListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha1ValidatingAdmissionPolicyListFluent.MetadataNested editMetadata(); - public V1alpha1ValidatingAdmissionPolicyListFluent.MetadataNested editOrNewMetadata(); - public V1alpha1ValidatingAdmissionPolicyListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha1ValidatingAdmissionPolicyFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ValidatingAdmissionPolicyListFluent> extends BaseFluent{ + public V1alpha1ValidatingAdmissionPolicyListFluent() { + } + + public V1alpha1ValidatingAdmissionPolicyListFluent(V1alpha1ValidatingAdmissionPolicyList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha1ValidatingAdmissionPolicyList instance) { + instance = (instance != null ? instance : new V1alpha1ValidatingAdmissionPolicyList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha1ValidatingAdmissionPolicy item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha1ValidatingAdmissionPolicy item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1ValidatingAdmissionPolicy item : items) {V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha1ValidatingAdmissionPolicy item : items) {V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy... items) { + if (this.items == null) return (A)this; + for (V1alpha1ValidatingAdmissionPolicy item : items) {V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha1ValidatingAdmissionPolicy item : items) {V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha1ValidatingAdmissionPolicyBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha1ValidatingAdmissionPolicy buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha1ValidatingAdmissionPolicy buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha1ValidatingAdmissionPolicy buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha1ValidatingAdmissionPolicy buildMatchingItem(Predicate predicate) { + for (V1alpha1ValidatingAdmissionPolicyBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha1ValidatingAdmissionPolicyBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha1ValidatingAdmissionPolicy item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha1ValidatingAdmissionPolicy item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha1ValidatingAdmissionPolicy item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha1ValidatingAdmissionPolicy item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ValidatingAdmissionPolicyListFluent that = (V1alpha1ValidatingAdmissionPolicyListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha1ValidatingAdmissionPolicyFluent> implements Nested{ + ItemsNested(int index,V1alpha1ValidatingAdmissionPolicy item) { + this.index = index; + this.builder = new V1alpha1ValidatingAdmissionPolicyBuilder(this, item); + } + V1alpha1ValidatingAdmissionPolicyBuilder builder; + int index; + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListFluentImpl.java deleted file mode 100644 index 20fc279e6b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ValidatingAdmissionPolicyListFluentImpl> extends BaseFluent implements V1alpha1ValidatingAdmissionPolicyListFluent{ - public V1alpha1ValidatingAdmissionPolicyListFluentImpl() { - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl(V1alpha1ValidatingAdmissionPolicyList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha1ValidatingAdmissionPolicy item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha1ValidatingAdmissionPolicy item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1ValidatingAdmissionPolicy item : items) {V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha1ValidatingAdmissionPolicy item : items) {V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy... items) { - for (V1alpha1ValidatingAdmissionPolicy item : items) {V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha1ValidatingAdmissionPolicy item : items) {V1alpha1ValidatingAdmissionPolicyBuilder builder = new V1alpha1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha1ValidatingAdmissionPolicyBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha1ValidatingAdmissionPolicy buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha1ValidatingAdmissionPolicy buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha1ValidatingAdmissionPolicy buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha1ValidatingAdmissionPolicy buildMatchingItem(Predicate predicate) { - for (V1alpha1ValidatingAdmissionPolicyBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha1ValidatingAdmissionPolicyBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha1ValidatingAdmissionPolicy item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha1ValidatingAdmissionPolicy... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha1ValidatingAdmissionPolicy item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNested addNewItem() { - return new V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNested addNewItemLike(V1alpha1ValidatingAdmissionPolicy item) { - return new V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha1ValidatingAdmissionPolicy item) { - return new V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha1ValidatingAdmissionPolicyListFluentImpl.MetadataNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha1ValidatingAdmissionPolicyListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ValidatingAdmissionPolicyListFluentImpl that = (V1alpha1ValidatingAdmissionPolicyListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha1ValidatingAdmissionPolicyFluentImpl> implements V1alpha1ValidatingAdmissionPolicyListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha1ValidatingAdmissionPolicy item) { - this.index = index; - this.builder = new V1alpha1ValidatingAdmissionPolicyBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1ValidatingAdmissionPolicyBuilder(this); - } - V1alpha1ValidatingAdmissionPolicyBuilder builder; - int index; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha1ValidatingAdmissionPolicyListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecBuilder.java index 8a97cb7877..4bf141f651 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecBuilder.java @@ -1,61 +1,37 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ValidatingAdmissionPolicySpecBuilder extends V1alpha1ValidatingAdmissionPolicySpecFluentImpl implements VisitableBuilder{ +public class V1alpha1ValidatingAdmissionPolicySpecBuilder extends V1alpha1ValidatingAdmissionPolicySpecFluent implements VisitableBuilder{ public V1alpha1ValidatingAdmissionPolicySpecBuilder() { - this(false); - } - public V1alpha1ValidatingAdmissionPolicySpecBuilder(Boolean validationEnabled) { - this(new V1alpha1ValidatingAdmissionPolicySpec(), validationEnabled); + this(new V1alpha1ValidatingAdmissionPolicySpec()); } + public V1alpha1ValidatingAdmissionPolicySpecBuilder(V1alpha1ValidatingAdmissionPolicySpecFluent fluent) { - this(fluent, false); - } - public V1alpha1ValidatingAdmissionPolicySpecBuilder(V1alpha1ValidatingAdmissionPolicySpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ValidatingAdmissionPolicySpec(), validationEnabled); + this(fluent, new V1alpha1ValidatingAdmissionPolicySpec()); } + public V1alpha1ValidatingAdmissionPolicySpecBuilder(V1alpha1ValidatingAdmissionPolicySpecFluent fluent,V1alpha1ValidatingAdmissionPolicySpec instance) { - this(fluent, instance, false); - } - public V1alpha1ValidatingAdmissionPolicySpecBuilder(V1alpha1ValidatingAdmissionPolicySpecFluent fluent,V1alpha1ValidatingAdmissionPolicySpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAuditAnnotations(instance.getAuditAnnotations()); - fluent.withFailurePolicy(instance.getFailurePolicy()); - fluent.withMatchConditions(instance.getMatchConditions()); - fluent.withMatchConstraints(instance.getMatchConstraints()); - fluent.withParamKind(instance.getParamKind()); - fluent.withValidations(instance.getValidations()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ValidatingAdmissionPolicySpecBuilder(V1alpha1ValidatingAdmissionPolicySpec instance) { - this(instance,false); - } - public V1alpha1ValidatingAdmissionPolicySpecBuilder(V1alpha1ValidatingAdmissionPolicySpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAuditAnnotations(instance.getAuditAnnotations()); - this.withFailurePolicy(instance.getFailurePolicy()); - this.withMatchConditions(instance.getMatchConditions()); - this.withMatchConstraints(instance.getMatchConstraints()); - this.withParamKind(instance.getParamKind()); - this.withValidations(instance.getValidations()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ValidatingAdmissionPolicySpecFluent fluent; - Boolean validationEnabled; + public V1alpha1ValidatingAdmissionPolicySpec build() { V1alpha1ValidatingAdmissionPolicySpec buildable = new V1alpha1ValidatingAdmissionPolicySpec(); - buildable.setAuditAnnotations(fluent.getAuditAnnotations()); + buildable.setAuditAnnotations(fluent.buildAuditAnnotations()); buildable.setFailurePolicy(fluent.getFailurePolicy()); - buildable.setMatchConditions(fluent.getMatchConditions()); - buildable.setMatchConstraints(fluent.getMatchConstraints()); - buildable.setParamKind(fluent.getParamKind()); - buildable.setValidations(fluent.getValidations()); + buildable.setMatchConditions(fluent.buildMatchConditions()); + buildable.setMatchConstraints(fluent.buildMatchConstraints()); + buildable.setParamKind(fluent.buildParamKind()); + buildable.setValidations(fluent.buildValidations()); + buildable.setVariables(fluent.buildVariables()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecFluent.java index 65dce7ab93..52391fbea4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecFluent.java @@ -1,169 +1,881 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.List; -import java.lang.Boolean; -import io.kubernetes.client.fluent.Fluent; import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha1ValidatingAdmissionPolicySpecFluent> extends Fluent{ - public A addToAuditAnnotations(int index,V1alpha1AuditAnnotation item); - public A setToAuditAnnotations(int index,V1alpha1AuditAnnotation item); - public A addToAuditAnnotations(io.kubernetes.client.openapi.models.V1alpha1AuditAnnotation... items); - public A addAllToAuditAnnotations(Collection items); - public A removeFromAuditAnnotations(io.kubernetes.client.openapi.models.V1alpha1AuditAnnotation... items); - public A removeAllFromAuditAnnotations(Collection items); - public A removeMatchingFromAuditAnnotations(Predicate predicate); - - /** - * This method has been deprecated, please use method buildAuditAnnotations instead. - * @return The buildable object. - */ - @Deprecated - public List getAuditAnnotations(); - public List buildAuditAnnotations(); - public V1alpha1AuditAnnotation buildAuditAnnotation(int index); - public V1alpha1AuditAnnotation buildFirstAuditAnnotation(); - public V1alpha1AuditAnnotation buildLastAuditAnnotation(); - public V1alpha1AuditAnnotation buildMatchingAuditAnnotation(Predicate predicate); - public Boolean hasMatchingAuditAnnotation(Predicate predicate); - public A withAuditAnnotations(List auditAnnotations); - public A withAuditAnnotations(io.kubernetes.client.openapi.models.V1alpha1AuditAnnotation... auditAnnotations); - public Boolean hasAuditAnnotations(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.AuditAnnotationsNested addNewAuditAnnotation(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.AuditAnnotationsNested addNewAuditAnnotationLike(V1alpha1AuditAnnotation item); - public V1alpha1ValidatingAdmissionPolicySpecFluent.AuditAnnotationsNested setNewAuditAnnotationLike(int index,V1alpha1AuditAnnotation item); - public V1alpha1ValidatingAdmissionPolicySpecFluent.AuditAnnotationsNested editAuditAnnotation(int index); - public V1alpha1ValidatingAdmissionPolicySpecFluent.AuditAnnotationsNested editFirstAuditAnnotation(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.AuditAnnotationsNested editLastAuditAnnotation(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.AuditAnnotationsNested editMatchingAuditAnnotation(Predicate predicate); - public String getFailurePolicy(); - public A withFailurePolicy(String failurePolicy); - public Boolean hasFailurePolicy(); - public A addToMatchConditions(int index,V1alpha1MatchCondition item); - public A setToMatchConditions(int index,V1alpha1MatchCondition item); - public A addToMatchConditions(io.kubernetes.client.openapi.models.V1alpha1MatchCondition... items); - public A addAllToMatchConditions(Collection items); - public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1alpha1MatchCondition... items); - public A removeAllFromMatchConditions(Collection items); - public A removeMatchingFromMatchConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMatchConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchConditions(); - public List buildMatchConditions(); - public V1alpha1MatchCondition buildMatchCondition(int index); - public V1alpha1MatchCondition buildFirstMatchCondition(); - public V1alpha1MatchCondition buildLastMatchCondition(); - public V1alpha1MatchCondition buildMatchingMatchCondition(Predicate predicate); - public Boolean hasMatchingMatchCondition(Predicate predicate); - public A withMatchConditions(List matchConditions); - public A withMatchConditions(io.kubernetes.client.openapi.models.V1alpha1MatchCondition... matchConditions); - public Boolean hasMatchConditions(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConditionsNested addNewMatchCondition(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConditionsNested addNewMatchConditionLike(V1alpha1MatchCondition item); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConditionsNested setNewMatchConditionLike(int index,V1alpha1MatchCondition item); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConditionsNested editMatchCondition(int index); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConditionsNested editFirstMatchCondition(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConditionsNested editLastMatchCondition(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConditionsNested editMatchingMatchCondition(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMatchConstraints instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1MatchResources getMatchConstraints(); - public V1alpha1MatchResources buildMatchConstraints(); - public A withMatchConstraints(V1alpha1MatchResources matchConstraints); - public Boolean hasMatchConstraints(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConstraintsNested withNewMatchConstraints(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConstraintsNested withNewMatchConstraintsLike(V1alpha1MatchResources item); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConstraintsNested editMatchConstraints(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConstraintsNested editOrNewMatchConstraints(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.MatchConstraintsNested editOrNewMatchConstraintsLike(V1alpha1MatchResources item); - - /** - * This method has been deprecated, please use method buildParamKind instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ParamKind getParamKind(); - public V1alpha1ParamKind buildParamKind(); - public A withParamKind(V1alpha1ParamKind paramKind); - public Boolean hasParamKind(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ParamKindNested withNewParamKind(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ParamKindNested withNewParamKindLike(V1alpha1ParamKind item); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ParamKindNested editParamKind(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ParamKindNested editOrNewParamKind(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ParamKindNested editOrNewParamKindLike(V1alpha1ParamKind item); - public A addToValidations(int index,V1alpha1Validation item); - public A setToValidations(int index,V1alpha1Validation item); - public A addToValidations(io.kubernetes.client.openapi.models.V1alpha1Validation... items); - public A addAllToValidations(Collection items); - public A removeFromValidations(io.kubernetes.client.openapi.models.V1alpha1Validation... items); - public A removeAllFromValidations(Collection items); - public A removeMatchingFromValidations(Predicate predicate); - - /** - * This method has been deprecated, please use method buildValidations instead. - * @return The buildable object. - */ - @Deprecated - public List getValidations(); - public List buildValidations(); - public V1alpha1Validation buildValidation(int index); - public V1alpha1Validation buildFirstValidation(); - public V1alpha1Validation buildLastValidation(); - public V1alpha1Validation buildMatchingValidation(Predicate predicate); - public Boolean hasMatchingValidation(Predicate predicate); - public A withValidations(List validations); - public A withValidations(io.kubernetes.client.openapi.models.V1alpha1Validation... validations); - public Boolean hasValidations(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ValidationsNested addNewValidation(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ValidationsNested addNewValidationLike(V1alpha1Validation item); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ValidationsNested setNewValidationLike(int index,V1alpha1Validation item); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ValidationsNested editValidation(int index); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ValidationsNested editFirstValidation(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ValidationsNested editLastValidation(); - public V1alpha1ValidatingAdmissionPolicySpecFluent.ValidationsNested editMatchingValidation(Predicate predicate); - public interface AuditAnnotationsNested extends Nested,V1alpha1AuditAnnotationFluent>{ - public N and(); - public N endAuditAnnotation(); - - } - public interface MatchConditionsNested extends Nested,V1alpha1MatchConditionFluent>{ - public N and(); - public N endMatchCondition(); - - } - public interface MatchConstraintsNested extends Nested,V1alpha1MatchResourcesFluent>{ - public N and(); - public N endMatchConstraints(); - - } - public interface ParamKindNested extends Nested,V1alpha1ParamKindFluent>{ - public N and(); - public N endParamKind(); - - } - public interface ValidationsNested extends Nested,V1alpha1ValidationFluent>{ - public N and(); - public N endValidation(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ValidatingAdmissionPolicySpecFluent> extends BaseFluent{ + public V1alpha1ValidatingAdmissionPolicySpecFluent() { + } + + public V1alpha1ValidatingAdmissionPolicySpecFluent(V1alpha1ValidatingAdmissionPolicySpec instance) { + this.copyInstance(instance); + } + private ArrayList auditAnnotations; + private String failurePolicy; + private ArrayList matchConditions; + private V1alpha1MatchResourcesBuilder matchConstraints; + private V1alpha1ParamKindBuilder paramKind; + private ArrayList validations; + private ArrayList variables; + + protected void copyInstance(V1alpha1ValidatingAdmissionPolicySpec instance) { + instance = (instance != null ? instance : new V1alpha1ValidatingAdmissionPolicySpec()); + if (instance != null) { + this.withAuditAnnotations(instance.getAuditAnnotations()); + this.withFailurePolicy(instance.getFailurePolicy()); + this.withMatchConditions(instance.getMatchConditions()); + this.withMatchConstraints(instance.getMatchConstraints()); + this.withParamKind(instance.getParamKind()); + this.withValidations(instance.getValidations()); + this.withVariables(instance.getVariables()); + } + } + + public A addToAuditAnnotations(int index,V1alpha1AuditAnnotation item) { + if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} + V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item); + if (index < 0 || index >= auditAnnotations.size()) { _visitables.get("auditAnnotations").add(builder); auditAnnotations.add(builder); } else { _visitables.get("auditAnnotations").add(index, builder); auditAnnotations.add(index, builder);} + return (A)this; + } + + public A setToAuditAnnotations(int index,V1alpha1AuditAnnotation item) { + if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} + V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item); + if (index < 0 || index >= auditAnnotations.size()) { _visitables.get("auditAnnotations").add(builder); auditAnnotations.add(builder); } else { _visitables.get("auditAnnotations").set(index, builder); auditAnnotations.set(index, builder);} + return (A)this; + } + + public A addToAuditAnnotations(io.kubernetes.client.openapi.models.V1alpha1AuditAnnotation... items) { + if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} + for (V1alpha1AuditAnnotation item : items) {V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").add(builder);this.auditAnnotations.add(builder);} return (A)this; + } + + public A addAllToAuditAnnotations(Collection items) { + if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} + for (V1alpha1AuditAnnotation item : items) {V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").add(builder);this.auditAnnotations.add(builder);} return (A)this; + } + + public A removeFromAuditAnnotations(io.kubernetes.client.openapi.models.V1alpha1AuditAnnotation... items) { + if (this.auditAnnotations == null) return (A)this; + for (V1alpha1AuditAnnotation item : items) {V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").remove(builder); this.auditAnnotations.remove(builder);} return (A)this; + } + + public A removeAllFromAuditAnnotations(Collection items) { + if (this.auditAnnotations == null) return (A)this; + for (V1alpha1AuditAnnotation item : items) {V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").remove(builder); this.auditAnnotations.remove(builder);} return (A)this; + } + + public A removeMatchingFromAuditAnnotations(Predicate predicate) { + if (auditAnnotations == null) return (A) this; + final Iterator each = auditAnnotations.iterator(); + final List visitables = _visitables.get("auditAnnotations"); + while (each.hasNext()) { + V1alpha1AuditAnnotationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildAuditAnnotations() { + return this.auditAnnotations != null ? build(auditAnnotations) : null; + } + + public V1alpha1AuditAnnotation buildAuditAnnotation(int index) { + return this.auditAnnotations.get(index).build(); + } + + public V1alpha1AuditAnnotation buildFirstAuditAnnotation() { + return this.auditAnnotations.get(0).build(); + } + + public V1alpha1AuditAnnotation buildLastAuditAnnotation() { + return this.auditAnnotations.get(auditAnnotations.size() - 1).build(); + } + + public V1alpha1AuditAnnotation buildMatchingAuditAnnotation(Predicate predicate) { + for (V1alpha1AuditAnnotationBuilder item : auditAnnotations) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingAuditAnnotation(Predicate predicate) { + for (V1alpha1AuditAnnotationBuilder item : auditAnnotations) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAuditAnnotations(List auditAnnotations) { + if (this.auditAnnotations != null) { + this._visitables.get("auditAnnotations").clear(); + } + if (auditAnnotations != null) { + this.auditAnnotations = new ArrayList(); + for (V1alpha1AuditAnnotation item : auditAnnotations) { + this.addToAuditAnnotations(item); + } + } else { + this.auditAnnotations = null; + } + return (A) this; + } + + public A withAuditAnnotations(io.kubernetes.client.openapi.models.V1alpha1AuditAnnotation... auditAnnotations) { + if (this.auditAnnotations != null) { + this.auditAnnotations.clear(); + _visitables.remove("auditAnnotations"); + } + if (auditAnnotations != null) { + for (V1alpha1AuditAnnotation item : auditAnnotations) { + this.addToAuditAnnotations(item); + } + } + return (A) this; + } + + public boolean hasAuditAnnotations() { + return this.auditAnnotations != null && !this.auditAnnotations.isEmpty(); + } + + public AuditAnnotationsNested addNewAuditAnnotation() { + return new AuditAnnotationsNested(-1, null); + } + + public AuditAnnotationsNested addNewAuditAnnotationLike(V1alpha1AuditAnnotation item) { + return new AuditAnnotationsNested(-1, item); + } + + public AuditAnnotationsNested setNewAuditAnnotationLike(int index,V1alpha1AuditAnnotation item) { + return new AuditAnnotationsNested(index, item); + } + + public AuditAnnotationsNested editAuditAnnotation(int index) { + if (auditAnnotations.size() <= index) throw new RuntimeException("Can't edit auditAnnotations. Index exceeds size."); + return setNewAuditAnnotationLike(index, buildAuditAnnotation(index)); + } + + public AuditAnnotationsNested editFirstAuditAnnotation() { + if (auditAnnotations.size() == 0) throw new RuntimeException("Can't edit first auditAnnotations. The list is empty."); + return setNewAuditAnnotationLike(0, buildAuditAnnotation(0)); + } + + public AuditAnnotationsNested editLastAuditAnnotation() { + int index = auditAnnotations.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last auditAnnotations. The list is empty."); + return setNewAuditAnnotationLike(index, buildAuditAnnotation(index)); + } + + public AuditAnnotationsNested editMatchingAuditAnnotation(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item); + if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").add(index, builder); matchConditions.add(index, builder);} + return (A)this; + } + + public A setToMatchConditions(int index,V1alpha1MatchCondition item) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item); + if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").set(index, builder); matchConditions.set(index, builder);} + return (A)this; + } + + public A addToMatchConditions(io.kubernetes.client.openapi.models.V1alpha1MatchCondition... items) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + for (V1alpha1MatchCondition item : items) {V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; + } + + public A addAllToMatchConditions(Collection items) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + for (V1alpha1MatchCondition item : items) {V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; + } + + public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1alpha1MatchCondition... items) { + if (this.matchConditions == null) return (A)this; + for (V1alpha1MatchCondition item : items) {V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder); this.matchConditions.remove(builder);} return (A)this; + } + + public A removeAllFromMatchConditions(Collection items) { + if (this.matchConditions == null) return (A)this; + for (V1alpha1MatchCondition item : items) {V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder); this.matchConditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromMatchConditions(Predicate predicate) { + if (matchConditions == null) return (A) this; + final Iterator each = matchConditions.iterator(); + final List visitables = _visitables.get("matchConditions"); + while (each.hasNext()) { + V1alpha1MatchConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMatchConditions() { + return this.matchConditions != null ? build(matchConditions) : null; + } + + public V1alpha1MatchCondition buildMatchCondition(int index) { + return this.matchConditions.get(index).build(); + } + + public V1alpha1MatchCondition buildFirstMatchCondition() { + return this.matchConditions.get(0).build(); + } + + public V1alpha1MatchCondition buildLastMatchCondition() { + return this.matchConditions.get(matchConditions.size() - 1).build(); + } + + public V1alpha1MatchCondition buildMatchingMatchCondition(Predicate predicate) { + for (V1alpha1MatchConditionBuilder item : matchConditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMatchCondition(Predicate predicate) { + for (V1alpha1MatchConditionBuilder item : matchConditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMatchConditions(List matchConditions) { + if (this.matchConditions != null) { + this._visitables.get("matchConditions").clear(); + } + if (matchConditions != null) { + this.matchConditions = new ArrayList(); + for (V1alpha1MatchCondition item : matchConditions) { + this.addToMatchConditions(item); + } + } else { + this.matchConditions = null; + } + return (A) this; + } + + public A withMatchConditions(io.kubernetes.client.openapi.models.V1alpha1MatchCondition... matchConditions) { + if (this.matchConditions != null) { + this.matchConditions.clear(); + _visitables.remove("matchConditions"); + } + if (matchConditions != null) { + for (V1alpha1MatchCondition item : matchConditions) { + this.addToMatchConditions(item); + } + } + return (A) this; + } + + public boolean hasMatchConditions() { + return this.matchConditions != null && !this.matchConditions.isEmpty(); + } + + public MatchConditionsNested addNewMatchCondition() { + return new MatchConditionsNested(-1, null); + } + + public MatchConditionsNested addNewMatchConditionLike(V1alpha1MatchCondition item) { + return new MatchConditionsNested(-1, item); + } + + public MatchConditionsNested setNewMatchConditionLike(int index,V1alpha1MatchCondition item) { + return new MatchConditionsNested(index, item); + } + + public MatchConditionsNested editMatchCondition(int index) { + if (matchConditions.size() <= index) throw new RuntimeException("Can't edit matchConditions. Index exceeds size."); + return setNewMatchConditionLike(index, buildMatchCondition(index)); + } + + public MatchConditionsNested editFirstMatchCondition() { + if (matchConditions.size() == 0) throw new RuntimeException("Can't edit first matchConditions. The list is empty."); + return setNewMatchConditionLike(0, buildMatchCondition(0)); + } + + public MatchConditionsNested editLastMatchCondition() { + int index = matchConditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last matchConditions. The list is empty."); + return setNewMatchConditionLike(index, buildMatchCondition(index)); + } + + public MatchConditionsNested editMatchingMatchCondition(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMatchConstraints() { + return new MatchConstraintsNested(null); + } + + public MatchConstraintsNested withNewMatchConstraintsLike(V1alpha1MatchResources item) { + return new MatchConstraintsNested(item); + } + + public MatchConstraintsNested editMatchConstraints() { + return withNewMatchConstraintsLike(java.util.Optional.ofNullable(buildMatchConstraints()).orElse(null)); + } + + public MatchConstraintsNested editOrNewMatchConstraints() { + return withNewMatchConstraintsLike(java.util.Optional.ofNullable(buildMatchConstraints()).orElse(new V1alpha1MatchResourcesBuilder().build())); + } + + public MatchConstraintsNested editOrNewMatchConstraintsLike(V1alpha1MatchResources item) { + return withNewMatchConstraintsLike(java.util.Optional.ofNullable(buildMatchConstraints()).orElse(item)); + } + + public V1alpha1ParamKind buildParamKind() { + return this.paramKind != null ? this.paramKind.build() : null; + } + + public A withParamKind(V1alpha1ParamKind paramKind) { + this._visitables.remove("paramKind"); + if (paramKind != null) { + this.paramKind = new V1alpha1ParamKindBuilder(paramKind); + this._visitables.get("paramKind").add(this.paramKind); + } else { + this.paramKind = null; + this._visitables.get("paramKind").remove(this.paramKind); + } + return (A) this; + } + + public boolean hasParamKind() { + return this.paramKind != null; + } + + public ParamKindNested withNewParamKind() { + return new ParamKindNested(null); + } + + public ParamKindNested withNewParamKindLike(V1alpha1ParamKind item) { + return new ParamKindNested(item); + } + + public ParamKindNested editParamKind() { + return withNewParamKindLike(java.util.Optional.ofNullable(buildParamKind()).orElse(null)); + } + + public ParamKindNested editOrNewParamKind() { + return withNewParamKindLike(java.util.Optional.ofNullable(buildParamKind()).orElse(new V1alpha1ParamKindBuilder().build())); + } + + public ParamKindNested editOrNewParamKindLike(V1alpha1ParamKind item) { + return withNewParamKindLike(java.util.Optional.ofNullable(buildParamKind()).orElse(item)); + } + + public A addToValidations(int index,V1alpha1Validation item) { + if (this.validations == null) {this.validations = new ArrayList();} + V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item); + if (index < 0 || index >= validations.size()) { _visitables.get("validations").add(builder); validations.add(builder); } else { _visitables.get("validations").add(index, builder); validations.add(index, builder);} + return (A)this; + } + + public A setToValidations(int index,V1alpha1Validation item) { + if (this.validations == null) {this.validations = new ArrayList();} + V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item); + if (index < 0 || index >= validations.size()) { _visitables.get("validations").add(builder); validations.add(builder); } else { _visitables.get("validations").set(index, builder); validations.set(index, builder);} + return (A)this; + } + + public A addToValidations(io.kubernetes.client.openapi.models.V1alpha1Validation... items) { + if (this.validations == null) {this.validations = new ArrayList();} + for (V1alpha1Validation item : items) {V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item);_visitables.get("validations").add(builder);this.validations.add(builder);} return (A)this; + } + + public A addAllToValidations(Collection items) { + if (this.validations == null) {this.validations = new ArrayList();} + for (V1alpha1Validation item : items) {V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item);_visitables.get("validations").add(builder);this.validations.add(builder);} return (A)this; + } + + public A removeFromValidations(io.kubernetes.client.openapi.models.V1alpha1Validation... items) { + if (this.validations == null) return (A)this; + for (V1alpha1Validation item : items) {V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item);_visitables.get("validations").remove(builder); this.validations.remove(builder);} return (A)this; + } + + public A removeAllFromValidations(Collection items) { + if (this.validations == null) return (A)this; + for (V1alpha1Validation item : items) {V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item);_visitables.get("validations").remove(builder); this.validations.remove(builder);} return (A)this; + } + + public A removeMatchingFromValidations(Predicate predicate) { + if (validations == null) return (A) this; + final Iterator each = validations.iterator(); + final List visitables = _visitables.get("validations"); + while (each.hasNext()) { + V1alpha1ValidationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildValidations() { + return this.validations != null ? build(validations) : null; + } + + public V1alpha1Validation buildValidation(int index) { + return this.validations.get(index).build(); + } + + public V1alpha1Validation buildFirstValidation() { + return this.validations.get(0).build(); + } + + public V1alpha1Validation buildLastValidation() { + return this.validations.get(validations.size() - 1).build(); + } + + public V1alpha1Validation buildMatchingValidation(Predicate predicate) { + for (V1alpha1ValidationBuilder item : validations) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingValidation(Predicate predicate) { + for (V1alpha1ValidationBuilder item : validations) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withValidations(List validations) { + if (this.validations != null) { + this._visitables.get("validations").clear(); + } + if (validations != null) { + this.validations = new ArrayList(); + for (V1alpha1Validation item : validations) { + this.addToValidations(item); + } + } else { + this.validations = null; + } + return (A) this; + } + + public A withValidations(io.kubernetes.client.openapi.models.V1alpha1Validation... validations) { + if (this.validations != null) { + this.validations.clear(); + _visitables.remove("validations"); + } + if (validations != null) { + for (V1alpha1Validation item : validations) { + this.addToValidations(item); + } + } + return (A) this; + } + + public boolean hasValidations() { + return this.validations != null && !this.validations.isEmpty(); + } + + public ValidationsNested addNewValidation() { + return new ValidationsNested(-1, null); + } + + public ValidationsNested addNewValidationLike(V1alpha1Validation item) { + return new ValidationsNested(-1, item); + } + + public ValidationsNested setNewValidationLike(int index,V1alpha1Validation item) { + return new ValidationsNested(index, item); + } + + public ValidationsNested editValidation(int index) { + if (validations.size() <= index) throw new RuntimeException("Can't edit validations. Index exceeds size."); + return setNewValidationLike(index, buildValidation(index)); + } + + public ValidationsNested editFirstValidation() { + if (validations.size() == 0) throw new RuntimeException("Can't edit first validations. The list is empty."); + return setNewValidationLike(0, buildValidation(0)); + } + + public ValidationsNested editLastValidation() { + int index = validations.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last validations. The list is empty."); + return setNewValidationLike(index, buildValidation(index)); + } + + public ValidationsNested editMatchingValidation(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1alpha1VariableBuilder builder = new V1alpha1VariableBuilder(item); + if (index < 0 || index >= variables.size()) { _visitables.get("variables").add(builder); variables.add(builder); } else { _visitables.get("variables").add(index, builder); variables.add(index, builder);} + return (A)this; + } + + public A setToVariables(int index,V1alpha1Variable item) { + if (this.variables == null) {this.variables = new ArrayList();} + V1alpha1VariableBuilder builder = new V1alpha1VariableBuilder(item); + if (index < 0 || index >= variables.size()) { _visitables.get("variables").add(builder); variables.add(builder); } else { _visitables.get("variables").set(index, builder); variables.set(index, builder);} + return (A)this; + } + + public A addToVariables(io.kubernetes.client.openapi.models.V1alpha1Variable... items) { + if (this.variables == null) {this.variables = new ArrayList();} + for (V1alpha1Variable item : items) {V1alpha1VariableBuilder builder = new V1alpha1VariableBuilder(item);_visitables.get("variables").add(builder);this.variables.add(builder);} return (A)this; + } + + public A addAllToVariables(Collection items) { + if (this.variables == null) {this.variables = new ArrayList();} + for (V1alpha1Variable item : items) {V1alpha1VariableBuilder builder = new V1alpha1VariableBuilder(item);_visitables.get("variables").add(builder);this.variables.add(builder);} return (A)this; + } + + public A removeFromVariables(io.kubernetes.client.openapi.models.V1alpha1Variable... items) { + if (this.variables == null) return (A)this; + for (V1alpha1Variable item : items) {V1alpha1VariableBuilder builder = new V1alpha1VariableBuilder(item);_visitables.get("variables").remove(builder); this.variables.remove(builder);} return (A)this; + } + + public A removeAllFromVariables(Collection items) { + if (this.variables == null) return (A)this; + for (V1alpha1Variable item : items) {V1alpha1VariableBuilder builder = new V1alpha1VariableBuilder(item);_visitables.get("variables").remove(builder); this.variables.remove(builder);} return (A)this; + } + + public A removeMatchingFromVariables(Predicate predicate) { + if (variables == null) return (A) this; + final Iterator each = variables.iterator(); + final List visitables = _visitables.get("variables"); + while (each.hasNext()) { + V1alpha1VariableBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVariables() { + return this.variables != null ? build(variables) : null; + } + + public V1alpha1Variable buildVariable(int index) { + return this.variables.get(index).build(); + } + + public V1alpha1Variable buildFirstVariable() { + return this.variables.get(0).build(); + } + + public V1alpha1Variable buildLastVariable() { + return this.variables.get(variables.size() - 1).build(); + } + + public V1alpha1Variable buildMatchingVariable(Predicate predicate) { + for (V1alpha1VariableBuilder item : variables) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVariable(Predicate predicate) { + for (V1alpha1VariableBuilder item : variables) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVariables(List variables) { + if (this.variables != null) { + this._visitables.get("variables").clear(); + } + if (variables != null) { + this.variables = new ArrayList(); + for (V1alpha1Variable item : variables) { + this.addToVariables(item); + } + } else { + this.variables = null; + } + return (A) this; + } + + public A withVariables(io.kubernetes.client.openapi.models.V1alpha1Variable... variables) { + if (this.variables != null) { + this.variables.clear(); + _visitables.remove("variables"); + } + if (variables != null) { + for (V1alpha1Variable item : variables) { + this.addToVariables(item); + } + } + return (A) this; + } + + public boolean hasVariables() { + return this.variables != null && !this.variables.isEmpty(); + } + + public VariablesNested addNewVariable() { + return new VariablesNested(-1, null); + } + + public VariablesNested addNewVariableLike(V1alpha1Variable item) { + return new VariablesNested(-1, item); + } + + public VariablesNested setNewVariableLike(int index,V1alpha1Variable item) { + return new VariablesNested(index, item); + } + + public VariablesNested editVariable(int index) { + if (variables.size() <= index) throw new RuntimeException("Can't edit variables. Index exceeds size."); + return setNewVariableLike(index, buildVariable(index)); + } + + public VariablesNested editFirstVariable() { + if (variables.size() == 0) throw new RuntimeException("Can't edit first variables. The list is empty."); + return setNewVariableLike(0, buildVariable(0)); + } + + public VariablesNested editLastVariable() { + int index = variables.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last variables. The list is empty."); + return setNewVariableLike(index, buildVariable(index)); + } + + public VariablesNested editMatchingVariable(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1alpha1AuditAnnotationFluent> implements Nested{ + AuditAnnotationsNested(int index,V1alpha1AuditAnnotation item) { + this.index = index; + this.builder = new V1alpha1AuditAnnotationBuilder(this, item); + } + V1alpha1AuditAnnotationBuilder builder; + int index; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicySpecFluent.this.setToAuditAnnotations(index,builder.build()); + } + + public N endAuditAnnotation() { + return and(); + } + + + } + public class MatchConditionsNested extends V1alpha1MatchConditionFluent> implements Nested{ + MatchConditionsNested(int index,V1alpha1MatchCondition item) { + this.index = index; + this.builder = new V1alpha1MatchConditionBuilder(this, item); + } + V1alpha1MatchConditionBuilder builder; + int index; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicySpecFluent.this.setToMatchConditions(index,builder.build()); + } + + public N endMatchCondition() { + return and(); + } + + + } + public class MatchConstraintsNested extends V1alpha1MatchResourcesFluent> implements Nested{ + MatchConstraintsNested(V1alpha1MatchResources item) { + this.builder = new V1alpha1MatchResourcesBuilder(this, item); + } + V1alpha1MatchResourcesBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicySpecFluent.this.withMatchConstraints(builder.build()); + } + + public N endMatchConstraints() { + return and(); + } + + } + public class ParamKindNested extends V1alpha1ParamKindFluent> implements Nested{ + ParamKindNested(V1alpha1ParamKind item) { + this.builder = new V1alpha1ParamKindBuilder(this, item); + } + V1alpha1ParamKindBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicySpecFluent.this.withParamKind(builder.build()); + } + + public N endParamKind() { + return and(); + } + + + } + public class ValidationsNested extends V1alpha1ValidationFluent> implements Nested{ + ValidationsNested(int index,V1alpha1Validation item) { + this.index = index; + this.builder = new V1alpha1ValidationBuilder(this, item); + } + V1alpha1ValidationBuilder builder; + int index; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicySpecFluent.this.setToValidations(index,builder.build()); + } + + public N endValidation() { + return and(); + } + + } + public class VariablesNested extends V1alpha1VariableFluent> implements Nested{ + VariablesNested(int index,V1alpha1Variable item) { + this.index = index; + this.builder = new V1alpha1VariableBuilder(this, item); + } + V1alpha1VariableBuilder builder; + int index; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicySpecFluent.this.setToVariables(index,builder.build()); + } + + public N endVariable() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecFluentImpl.java deleted file mode 100644 index 6221bf23f5..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicySpecFluentImpl.java +++ /dev/null @@ -1,562 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ValidatingAdmissionPolicySpecFluentImpl> extends BaseFluent implements V1alpha1ValidatingAdmissionPolicySpecFluent{ - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl() { - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl(V1alpha1ValidatingAdmissionPolicySpec instance) { - if (instance != null) { - this.withAuditAnnotations(instance.getAuditAnnotations()); - this.withFailurePolicy(instance.getFailurePolicy()); - this.withMatchConditions(instance.getMatchConditions()); - this.withMatchConstraints(instance.getMatchConstraints()); - this.withParamKind(instance.getParamKind()); - this.withValidations(instance.getValidations()); - } - } - private ArrayList auditAnnotations; - private String failurePolicy; - private ArrayList matchConditions; - private V1alpha1MatchResourcesBuilder matchConstraints; - private V1alpha1ParamKindBuilder paramKind; - private ArrayList validations; - public A addToAuditAnnotations(int index,V1alpha1AuditAnnotation item) { - if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} - V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item); - if (index < 0 || index >= auditAnnotations.size()) { _visitables.get("auditAnnotations").add(builder); auditAnnotations.add(builder); } else { _visitables.get("auditAnnotations").add(index, builder); auditAnnotations.add(index, builder);} - return (A)this; - } - public A setToAuditAnnotations(int index,V1alpha1AuditAnnotation item) { - if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} - V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item); - if (index < 0 || index >= auditAnnotations.size()) { _visitables.get("auditAnnotations").add(builder); auditAnnotations.add(builder); } else { _visitables.get("auditAnnotations").set(index, builder); auditAnnotations.set(index, builder);} - return (A)this; - } - public A addToAuditAnnotations(io.kubernetes.client.openapi.models.V1alpha1AuditAnnotation... items) { - if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} - for (V1alpha1AuditAnnotation item : items) {V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").add(builder);this.auditAnnotations.add(builder);} return (A)this; - } - public A addAllToAuditAnnotations(Collection items) { - if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} - for (V1alpha1AuditAnnotation item : items) {V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").add(builder);this.auditAnnotations.add(builder);} return (A)this; - } - public A removeFromAuditAnnotations(io.kubernetes.client.openapi.models.V1alpha1AuditAnnotation... items) { - for (V1alpha1AuditAnnotation item : items) {V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").remove(builder);if (this.auditAnnotations != null) {this.auditAnnotations.remove(builder);}} return (A)this; - } - public A removeAllFromAuditAnnotations(Collection items) { - for (V1alpha1AuditAnnotation item : items) {V1alpha1AuditAnnotationBuilder builder = new V1alpha1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").remove(builder);if (this.auditAnnotations != null) {this.auditAnnotations.remove(builder);}} return (A)this; - } - public A removeMatchingFromAuditAnnotations(Predicate predicate) { - if (auditAnnotations == null) return (A) this; - final Iterator each = auditAnnotations.iterator(); - final List visitables = _visitables.get("auditAnnotations"); - while (each.hasNext()) { - V1alpha1AuditAnnotationBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildAuditAnnotations instead. - * @return The buildable object. - */ - @Deprecated - public List getAuditAnnotations() { - return auditAnnotations != null ? build(auditAnnotations) : null; - } - public List buildAuditAnnotations() { - return auditAnnotations != null ? build(auditAnnotations) : null; - } - public V1alpha1AuditAnnotation buildAuditAnnotation(int index) { - return this.auditAnnotations.get(index).build(); - } - public V1alpha1AuditAnnotation buildFirstAuditAnnotation() { - return this.auditAnnotations.get(0).build(); - } - public V1alpha1AuditAnnotation buildLastAuditAnnotation() { - return this.auditAnnotations.get(auditAnnotations.size() - 1).build(); - } - public V1alpha1AuditAnnotation buildMatchingAuditAnnotation(Predicate predicate) { - for (V1alpha1AuditAnnotationBuilder item: auditAnnotations) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingAuditAnnotation(Predicate predicate) { - for (V1alpha1AuditAnnotationBuilder item: auditAnnotations) { if(predicate.test(item)){ return true;} } return false; - } - public A withAuditAnnotations(List auditAnnotations) { - if (this.auditAnnotations != null) { _visitables.get("auditAnnotations").clear();} - if (auditAnnotations != null) {this.auditAnnotations = new ArrayList(); for (V1alpha1AuditAnnotation item : auditAnnotations){this.addToAuditAnnotations(item);}} else { this.auditAnnotations = null;} return (A) this; - } - public A withAuditAnnotations(io.kubernetes.client.openapi.models.V1alpha1AuditAnnotation... auditAnnotations) { - if (this.auditAnnotations != null) {this.auditAnnotations.clear(); _visitables.remove("auditAnnotations"); } - if (auditAnnotations != null) {for (V1alpha1AuditAnnotation item :auditAnnotations){ this.addToAuditAnnotations(item);}} return (A) this; - } - public Boolean hasAuditAnnotations() { - return auditAnnotations != null && !auditAnnotations.isEmpty(); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNested addNewAuditAnnotation() { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNested addNewAuditAnnotationLike(V1alpha1AuditAnnotation item) { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNestedImpl(-1, item); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNested setNewAuditAnnotationLike(int index,V1alpha1AuditAnnotation item) { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNestedImpl(index, item); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNested editAuditAnnotation(int index) { - if (auditAnnotations.size() <= index) throw new RuntimeException("Can't edit auditAnnotations. Index exceeds size."); - return setNewAuditAnnotationLike(index, buildAuditAnnotation(index)); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNested editFirstAuditAnnotation() { - if (auditAnnotations.size() == 0) throw new RuntimeException("Can't edit first auditAnnotations. The list is empty."); - return setNewAuditAnnotationLike(0, buildAuditAnnotation(0)); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNested editLastAuditAnnotation() { - int index = auditAnnotations.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last auditAnnotations. The list is empty."); - return setNewAuditAnnotationLike(index, buildAuditAnnotation(index)); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNested editMatchingAuditAnnotation(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item); - if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").add(index, builder); matchConditions.add(index, builder);} - return (A)this; - } - public A setToMatchConditions(int index,V1alpha1MatchCondition item) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item); - if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").set(index, builder); matchConditions.set(index, builder);} - return (A)this; - } - public A addToMatchConditions(io.kubernetes.client.openapi.models.V1alpha1MatchCondition... items) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - for (V1alpha1MatchCondition item : items) {V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; - } - public A addAllToMatchConditions(Collection items) { - if (this.matchConditions == null) {this.matchConditions = new ArrayList();} - for (V1alpha1MatchCondition item : items) {V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; - } - public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1alpha1MatchCondition... items) { - for (V1alpha1MatchCondition item : items) {V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder);if (this.matchConditions != null) {this.matchConditions.remove(builder);}} return (A)this; - } - public A removeAllFromMatchConditions(Collection items) { - for (V1alpha1MatchCondition item : items) {V1alpha1MatchConditionBuilder builder = new V1alpha1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder);if (this.matchConditions != null) {this.matchConditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromMatchConditions(Predicate predicate) { - if (matchConditions == null) return (A) this; - final Iterator each = matchConditions.iterator(); - final List visitables = _visitables.get("matchConditions"); - while (each.hasNext()) { - V1alpha1MatchConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildMatchConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getMatchConditions() { - return matchConditions != null ? build(matchConditions) : null; - } - public List buildMatchConditions() { - return matchConditions != null ? build(matchConditions) : null; - } - public V1alpha1MatchCondition buildMatchCondition(int index) { - return this.matchConditions.get(index).build(); - } - public V1alpha1MatchCondition buildFirstMatchCondition() { - return this.matchConditions.get(0).build(); - } - public V1alpha1MatchCondition buildLastMatchCondition() { - return this.matchConditions.get(matchConditions.size() - 1).build(); - } - public V1alpha1MatchCondition buildMatchingMatchCondition(Predicate predicate) { - for (V1alpha1MatchConditionBuilder item: matchConditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingMatchCondition(Predicate predicate) { - for (V1alpha1MatchConditionBuilder item: matchConditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withMatchConditions(List matchConditions) { - if (this.matchConditions != null) { _visitables.get("matchConditions").clear();} - if (matchConditions != null) {this.matchConditions = new ArrayList(); for (V1alpha1MatchCondition item : matchConditions){this.addToMatchConditions(item);}} else { this.matchConditions = null;} return (A) this; - } - public A withMatchConditions(io.kubernetes.client.openapi.models.V1alpha1MatchCondition... matchConditions) { - if (this.matchConditions != null) {this.matchConditions.clear(); _visitables.remove("matchConditions"); } - if (matchConditions != null) {for (V1alpha1MatchCondition item :matchConditions){ this.addToMatchConditions(item);}} return (A) this; - } - public Boolean hasMatchConditions() { - return matchConditions != null && !matchConditions.isEmpty(); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNested addNewMatchCondition() { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNested addNewMatchConditionLike(V1alpha1MatchCondition item) { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNestedImpl(-1, item); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNested setNewMatchConditionLike(int index,V1alpha1MatchCondition item) { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNestedImpl(index, item); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNested editMatchCondition(int index) { - if (matchConditions.size() <= index) throw new RuntimeException("Can't edit matchConditions. Index exceeds size."); - return setNewMatchConditionLike(index, buildMatchCondition(index)); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNested editFirstMatchCondition() { - if (matchConditions.size() == 0) throw new RuntimeException("Can't edit first matchConditions. The list is empty."); - return setNewMatchConditionLike(0, buildMatchCondition(0)); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNested editLastMatchCondition() { - int index = matchConditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last matchConditions. The list is empty."); - return setNewMatchConditionLike(index, buildMatchCondition(index)); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNested editMatchingMatchCondition(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMatchConstraints() { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConstraintsNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConstraintsNested withNewMatchConstraintsLike(V1alpha1MatchResources item) { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConstraintsNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConstraintsNested editMatchConstraints() { - return withNewMatchConstraintsLike(getMatchConstraints()); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConstraintsNested editOrNewMatchConstraints() { - return withNewMatchConstraintsLike(getMatchConstraints() != null ? getMatchConstraints(): new V1alpha1MatchResourcesBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConstraintsNested editOrNewMatchConstraintsLike(V1alpha1MatchResources item) { - return withNewMatchConstraintsLike(getMatchConstraints() != null ? getMatchConstraints(): item); - } - - /** - * This method has been deprecated, please use method buildParamKind instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1ParamKind getParamKind() { - return this.paramKind!=null ?this.paramKind.build():null; - } - public V1alpha1ParamKind buildParamKind() { - return this.paramKind!=null ?this.paramKind.build():null; - } - public A withParamKind(V1alpha1ParamKind paramKind) { - _visitables.get("paramKind").remove(this.paramKind); - if (paramKind!=null){ this.paramKind= new V1alpha1ParamKindBuilder(paramKind); _visitables.get("paramKind").add(this.paramKind);} else { this.paramKind = null; _visitables.get("paramKind").remove(this.paramKind); } return (A) this; - } - public Boolean hasParamKind() { - return this.paramKind != null; - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ParamKindNested withNewParamKind() { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ParamKindNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ParamKindNested withNewParamKindLike(V1alpha1ParamKind item) { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ParamKindNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ParamKindNested editParamKind() { - return withNewParamKindLike(getParamKind()); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ParamKindNested editOrNewParamKind() { - return withNewParamKindLike(getParamKind() != null ? getParamKind(): new V1alpha1ParamKindBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ParamKindNested editOrNewParamKindLike(V1alpha1ParamKind item) { - return withNewParamKindLike(getParamKind() != null ? getParamKind(): item); - } - public A addToValidations(int index,V1alpha1Validation item) { - if (this.validations == null) {this.validations = new ArrayList();} - V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item); - if (index < 0 || index >= validations.size()) { _visitables.get("validations").add(builder); validations.add(builder); } else { _visitables.get("validations").add(index, builder); validations.add(index, builder);} - return (A)this; - } - public A setToValidations(int index,V1alpha1Validation item) { - if (this.validations == null) {this.validations = new ArrayList();} - V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item); - if (index < 0 || index >= validations.size()) { _visitables.get("validations").add(builder); validations.add(builder); } else { _visitables.get("validations").set(index, builder); validations.set(index, builder);} - return (A)this; - } - public A addToValidations(io.kubernetes.client.openapi.models.V1alpha1Validation... items) { - if (this.validations == null) {this.validations = new ArrayList();} - for (V1alpha1Validation item : items) {V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item);_visitables.get("validations").add(builder);this.validations.add(builder);} return (A)this; - } - public A addAllToValidations(Collection items) { - if (this.validations == null) {this.validations = new ArrayList();} - for (V1alpha1Validation item : items) {V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item);_visitables.get("validations").add(builder);this.validations.add(builder);} return (A)this; - } - public A removeFromValidations(io.kubernetes.client.openapi.models.V1alpha1Validation... items) { - for (V1alpha1Validation item : items) {V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item);_visitables.get("validations").remove(builder);if (this.validations != null) {this.validations.remove(builder);}} return (A)this; - } - public A removeAllFromValidations(Collection items) { - for (V1alpha1Validation item : items) {V1alpha1ValidationBuilder builder = new V1alpha1ValidationBuilder(item);_visitables.get("validations").remove(builder);if (this.validations != null) {this.validations.remove(builder);}} return (A)this; - } - public A removeMatchingFromValidations(Predicate predicate) { - if (validations == null) return (A) this; - final Iterator each = validations.iterator(); - final List visitables = _visitables.get("validations"); - while (each.hasNext()) { - V1alpha1ValidationBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildValidations instead. - * @return The buildable object. - */ - @Deprecated - public List getValidations() { - return validations != null ? build(validations) : null; - } - public List buildValidations() { - return validations != null ? build(validations) : null; - } - public V1alpha1Validation buildValidation(int index) { - return this.validations.get(index).build(); - } - public V1alpha1Validation buildFirstValidation() { - return this.validations.get(0).build(); - } - public V1alpha1Validation buildLastValidation() { - return this.validations.get(validations.size() - 1).build(); - } - public V1alpha1Validation buildMatchingValidation(Predicate predicate) { - for (V1alpha1ValidationBuilder item: validations) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingValidation(Predicate predicate) { - for (V1alpha1ValidationBuilder item: validations) { if(predicate.test(item)){ return true;} } return false; - } - public A withValidations(List validations) { - if (this.validations != null) { _visitables.get("validations").clear();} - if (validations != null) {this.validations = new ArrayList(); for (V1alpha1Validation item : validations){this.addToValidations(item);}} else { this.validations = null;} return (A) this; - } - public A withValidations(io.kubernetes.client.openapi.models.V1alpha1Validation... validations) { - if (this.validations != null) {this.validations.clear(); _visitables.remove("validations"); } - if (validations != null) {for (V1alpha1Validation item :validations){ this.addToValidations(item);}} return (A) this; - } - public Boolean hasValidations() { - return validations != null && !validations.isEmpty(); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNested addNewValidation() { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNested addNewValidationLike(V1alpha1Validation item) { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNestedImpl(-1, item); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNested setNewValidationLike(int index,V1alpha1Validation item) { - return new V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNestedImpl(index, item); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNested editValidation(int index) { - if (validations.size() <= index) throw new RuntimeException("Can't edit validations. Index exceeds size."); - return setNewValidationLike(index, buildValidation(index)); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNested editFirstValidation() { - if (validations.size() == 0) throw new RuntimeException("Can't edit first validations. The list is empty."); - return setNewValidationLike(0, buildValidation(0)); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNested editLastValidation() { - int index = validations.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last validations. The list is empty."); - return setNewValidationLike(index, buildValidation(index)); - } - public V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNested editMatchingValidation(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1alpha1AuditAnnotationFluentImpl> implements V1alpha1ValidatingAdmissionPolicySpecFluentImpl.AuditAnnotationsNested,Nested{ - AuditAnnotationsNestedImpl(int index,V1alpha1AuditAnnotation item) { - this.index = index; - this.builder = new V1alpha1AuditAnnotationBuilder(this, item); - } - AuditAnnotationsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1AuditAnnotationBuilder(this); - } - V1alpha1AuditAnnotationBuilder builder; - int index; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicySpecFluentImpl.this.setToAuditAnnotations(index,builder.build()); - } - public N endAuditAnnotation() { - return and(); - } - - } - class MatchConditionsNestedImpl extends V1alpha1MatchConditionFluentImpl> implements V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConditionsNested,Nested{ - MatchConditionsNestedImpl(int index,V1alpha1MatchCondition item) { - this.index = index; - this.builder = new V1alpha1MatchConditionBuilder(this, item); - } - MatchConditionsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1MatchConditionBuilder(this); - } - V1alpha1MatchConditionBuilder builder; - int index; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicySpecFluentImpl.this.setToMatchConditions(index,builder.build()); - } - public N endMatchCondition() { - return and(); - } - - } - class MatchConstraintsNestedImpl extends V1alpha1MatchResourcesFluentImpl> implements V1alpha1ValidatingAdmissionPolicySpecFluentImpl.MatchConstraintsNested,Nested{ - MatchConstraintsNestedImpl(V1alpha1MatchResources item) { - this.builder = new V1alpha1MatchResourcesBuilder(this, item); - } - MatchConstraintsNestedImpl() { - this.builder = new V1alpha1MatchResourcesBuilder(this); - } - V1alpha1MatchResourcesBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicySpecFluentImpl.this.withMatchConstraints(builder.build()); - } - public N endMatchConstraints() { - return and(); - } - - } - class ParamKindNestedImpl extends V1alpha1ParamKindFluentImpl> implements V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ParamKindNested,Nested{ - ParamKindNestedImpl(V1alpha1ParamKind item) { - this.builder = new V1alpha1ParamKindBuilder(this, item); - } - ParamKindNestedImpl() { - this.builder = new V1alpha1ParamKindBuilder(this); - } - V1alpha1ParamKindBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicySpecFluentImpl.this.withParamKind(builder.build()); - } - public N endParamKind() { - return and(); - } - - } - class ValidationsNestedImpl extends V1alpha1ValidationFluentImpl> implements V1alpha1ValidatingAdmissionPolicySpecFluentImpl.ValidationsNested,Nested{ - ValidationsNestedImpl(int index,V1alpha1Validation item) { - this.index = index; - this.builder = new V1alpha1ValidationBuilder(this, item); - } - ValidationsNestedImpl() { - this.index = -1; - this.builder = new V1alpha1ValidationBuilder(this); - } - V1alpha1ValidationBuilder builder; - int index; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicySpecFluentImpl.this.setToValidations(index,builder.build()); - } - public N endValidation() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusBuilder.java index 6a1026ddf0..c6de63fda3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ValidatingAdmissionPolicyStatusBuilder extends V1alpha1ValidatingAdmissionPolicyStatusFluentImpl implements VisitableBuilder{ +public class V1alpha1ValidatingAdmissionPolicyStatusBuilder extends V1alpha1ValidatingAdmissionPolicyStatusFluent implements VisitableBuilder{ public V1alpha1ValidatingAdmissionPolicyStatusBuilder() { - this(false); - } - public V1alpha1ValidatingAdmissionPolicyStatusBuilder(Boolean validationEnabled) { - this(new V1alpha1ValidatingAdmissionPolicyStatus(), validationEnabled); + this(new V1alpha1ValidatingAdmissionPolicyStatus()); } + public V1alpha1ValidatingAdmissionPolicyStatusBuilder(V1alpha1ValidatingAdmissionPolicyStatusFluent fluent) { - this(fluent, false); - } - public V1alpha1ValidatingAdmissionPolicyStatusBuilder(V1alpha1ValidatingAdmissionPolicyStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1ValidatingAdmissionPolicyStatus(), validationEnabled); + this(fluent, new V1alpha1ValidatingAdmissionPolicyStatus()); } + public V1alpha1ValidatingAdmissionPolicyStatusBuilder(V1alpha1ValidatingAdmissionPolicyStatusFluent fluent,V1alpha1ValidatingAdmissionPolicyStatus instance) { - this(fluent, instance, false); - } - public V1alpha1ValidatingAdmissionPolicyStatusBuilder(V1alpha1ValidatingAdmissionPolicyStatusFluent fluent,V1alpha1ValidatingAdmissionPolicyStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - fluent.withTypeChecking(instance.getTypeChecking()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ValidatingAdmissionPolicyStatusBuilder(V1alpha1ValidatingAdmissionPolicyStatus instance) { - this(instance,false); - } - public V1alpha1ValidatingAdmissionPolicyStatusBuilder(V1alpha1ValidatingAdmissionPolicyStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withTypeChecking(instance.getTypeChecking()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ValidatingAdmissionPolicyStatusFluent fluent; - Boolean validationEnabled; + public V1alpha1ValidatingAdmissionPolicyStatus build() { V1alpha1ValidatingAdmissionPolicyStatus buildable = new V1alpha1ValidatingAdmissionPolicyStatus(); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); buildable.setObservedGeneration(fluent.getObservedGeneration()); - buildable.setTypeChecking(fluent.getTypeChecking()); + buildable.setTypeChecking(fluent.buildTypeChecking()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusFluent.java index 2c0b879983..1d15db0aec 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusFluent.java @@ -1,79 +1,303 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.lang.Long; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ValidatingAdmissionPolicyStatusFluent> extends Fluent{ - public A addToConditions(int index,V1Condition item); - public A setToConditions(int index,V1Condition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1Condition buildCondition(int index); - public V1Condition buildFirstCondition(); - public V1Condition buildLastCondition(); - public V1Condition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions); - public Boolean hasConditions(); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.ConditionsNested addNewCondition(); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.ConditionsNested addNewConditionLike(V1Condition item); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.ConditionsNested setNewConditionLike(int index,V1Condition item); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.ConditionsNested editCondition(int index); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.ConditionsNested editFirstCondition(); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.ConditionsNested editLastCondition(); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - - /** - * This method has been deprecated, please use method buildTypeChecking instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha1TypeChecking getTypeChecking(); - public V1alpha1TypeChecking buildTypeChecking(); - public A withTypeChecking(V1alpha1TypeChecking typeChecking); - public Boolean hasTypeChecking(); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.TypeCheckingNested withNewTypeChecking(); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.TypeCheckingNested withNewTypeCheckingLike(V1alpha1TypeChecking item); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.TypeCheckingNested editTypeChecking(); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.TypeCheckingNested editOrNewTypeChecking(); - public V1alpha1ValidatingAdmissionPolicyStatusFluent.TypeCheckingNested editOrNewTypeCheckingLike(V1alpha1TypeChecking item); - public interface ConditionsNested extends Nested,V1ConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ValidatingAdmissionPolicyStatusFluent> extends BaseFluent{ + public V1alpha1ValidatingAdmissionPolicyStatusFluent() { + } + + public V1alpha1ValidatingAdmissionPolicyStatusFluent(V1alpha1ValidatingAdmissionPolicyStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + private Long observedGeneration; + private V1alpha1TypeCheckingBuilder typeChecking; + + protected void copyInstance(V1alpha1ValidatingAdmissionPolicyStatus instance) { + instance = (instance != null ? instance : new V1alpha1ValidatingAdmissionPolicyStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + this.withObservedGeneration(instance.getObservedGeneration()); + this.withTypeChecking(instance.getTypeChecking()); + } + } + + public A addToConditions(int index,V1Condition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ConditionBuilder builder = new V1ConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1Condition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ConditionBuilder builder = new V1ConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items) { + if (this.conditions == null) return (A)this; + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1ConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1Condition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1Condition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1Condition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1Condition buildMatchingCondition(Predicate predicate) { + for (V1ConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1ConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1Condition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; } - public interface TypeCheckingNested extends Nested,V1alpha1TypeCheckingFluent>{ - public N and(); - public N endTypeChecking(); + + public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1Condition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1Condition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1Condition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i withNewTypeChecking() { + return new TypeCheckingNested(null); + } + + public TypeCheckingNested withNewTypeCheckingLike(V1alpha1TypeChecking item) { + return new TypeCheckingNested(item); + } + + public TypeCheckingNested editTypeChecking() { + return withNewTypeCheckingLike(java.util.Optional.ofNullable(buildTypeChecking()).orElse(null)); + } + + public TypeCheckingNested editOrNewTypeChecking() { + return withNewTypeCheckingLike(java.util.Optional.ofNullable(buildTypeChecking()).orElse(new V1alpha1TypeCheckingBuilder().build())); + } + + public TypeCheckingNested editOrNewTypeCheckingLike(V1alpha1TypeChecking item) { + return withNewTypeCheckingLike(java.util.Optional.ofNullable(buildTypeChecking()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ValidatingAdmissionPolicyStatusFluent that = (V1alpha1ValidatingAdmissionPolicyStatusFluent) o; + if (!java.util.Objects.equals(conditions, that.conditions)) return false; + if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; + if (!java.util.Objects.equals(typeChecking, that.typeChecking)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(conditions, observedGeneration, typeChecking, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (conditions != null && !conditions.isEmpty()) { sb.append("conditions:"); sb.append(conditions + ","); } + if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration + ","); } + if (typeChecking != null) { sb.append("typeChecking:"); sb.append(typeChecking); } + sb.append("}"); + return sb.toString(); + } + public class ConditionsNested extends V1ConditionFluent> implements Nested{ + ConditionsNested(int index,V1Condition item) { + this.index = index; + this.builder = new V1ConditionBuilder(this, item); + } + V1ConditionBuilder builder; + int index; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyStatusFluent.this.setToConditions(index,builder.build()); + } + public N endCondition() { + return and(); + } + + } + public class TypeCheckingNested extends V1alpha1TypeCheckingFluent> implements Nested{ + TypeCheckingNested(V1alpha1TypeChecking item) { + this.builder = new V1alpha1TypeCheckingBuilder(this, item); + } + V1alpha1TypeCheckingBuilder builder; + + public N and() { + return (N) V1alpha1ValidatingAdmissionPolicyStatusFluent.this.withTypeChecking(builder.build()); + } + + public N endTypeChecking() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.java deleted file mode 100644 index 66f4cdeb74..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.java +++ /dev/null @@ -1,246 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ValidatingAdmissionPolicyStatusFluentImpl> extends BaseFluent implements V1alpha1ValidatingAdmissionPolicyStatusFluent{ - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl() { - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl(V1alpha1ValidatingAdmissionPolicyStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withObservedGeneration(instance.getObservedGeneration()); - this.withTypeChecking(instance.getTypeChecking()); - } - } - private ArrayList conditions; - private Long observedGeneration; - private V1alpha1TypeCheckingBuilder typeChecking; - public A addToConditions(int index,V1Condition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ConditionBuilder builder = new V1ConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1Condition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1ConditionBuilder builder = new V1ConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items) { - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1ConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1Condition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1Condition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1Condition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1Condition buildMatchingCondition(Predicate predicate) { - for (V1ConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1ConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1Condition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1Condition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNested addNewConditionLike(V1Condition item) { - return new V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1Condition item) { - return new V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i withNewTypeChecking() { - return new V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.TypeCheckingNestedImpl(); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.TypeCheckingNested withNewTypeCheckingLike(V1alpha1TypeChecking item) { - return new V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.TypeCheckingNestedImpl(item); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.TypeCheckingNested editTypeChecking() { - return withNewTypeCheckingLike(getTypeChecking()); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.TypeCheckingNested editOrNewTypeChecking() { - return withNewTypeCheckingLike(getTypeChecking() != null ? getTypeChecking(): new V1alpha1TypeCheckingBuilder().build()); - } - public V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.TypeCheckingNested editOrNewTypeCheckingLike(V1alpha1TypeChecking item) { - return withNewTypeCheckingLike(getTypeChecking() != null ? getTypeChecking(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha1ValidatingAdmissionPolicyStatusFluentImpl that = (V1alpha1ValidatingAdmissionPolicyStatusFluentImpl) o; - if (!java.util.Objects.equals(conditions, that.conditions)) return false; - - if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; - - if (!java.util.Objects.equals(typeChecking, that.typeChecking)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(conditions, observedGeneration, typeChecking, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (conditions != null) { sb.append("conditions:"); sb.append(conditions + ","); } - if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration + ","); } - if (typeChecking != null) { sb.append("typeChecking:"); sb.append(typeChecking); } - sb.append("}"); - return sb.toString(); - } - class ConditionsNestedImpl extends V1ConditionFluentImpl> implements V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1Condition item) { - this.index = index; - this.builder = new V1ConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1ConditionBuilder(this); - } - V1ConditionBuilder builder; - int index; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - class TypeCheckingNestedImpl extends V1alpha1TypeCheckingFluentImpl> implements V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.TypeCheckingNested,Nested{ - TypeCheckingNestedImpl(V1alpha1TypeChecking item) { - this.builder = new V1alpha1TypeCheckingBuilder(this, item); - } - TypeCheckingNestedImpl() { - this.builder = new V1alpha1TypeCheckingBuilder(this); - } - V1alpha1TypeCheckingBuilder builder; - public N and() { - return (N) V1alpha1ValidatingAdmissionPolicyStatusFluentImpl.this.withTypeChecking(builder.build()); - } - public N endTypeChecking() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationBuilder.java index 45a05e08a4..3c35faf4f2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha1ValidationBuilder extends V1alpha1ValidationFluentImpl implements VisitableBuilder{ +public class V1alpha1ValidationBuilder extends V1alpha1ValidationFluent implements VisitableBuilder{ public V1alpha1ValidationBuilder() { - this(false); - } - public V1alpha1ValidationBuilder(Boolean validationEnabled) { - this(new V1alpha1Validation(), validationEnabled); + this(new V1alpha1Validation()); } + public V1alpha1ValidationBuilder(V1alpha1ValidationFluent fluent) { - this(fluent, false); - } - public V1alpha1ValidationBuilder(V1alpha1ValidationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha1Validation(), validationEnabled); + this(fluent, new V1alpha1Validation()); } + public V1alpha1ValidationBuilder(V1alpha1ValidationFluent fluent,V1alpha1Validation instance) { - this(fluent, instance, false); - } - public V1alpha1ValidationBuilder(V1alpha1ValidationFluent fluent,V1alpha1Validation instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withExpression(instance.getExpression()); - fluent.withMessage(instance.getMessage()); - fluent.withMessageExpression(instance.getMessageExpression()); - fluent.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha1ValidationBuilder(V1alpha1Validation instance) { - this(instance,false); - } - public V1alpha1ValidationBuilder(V1alpha1Validation instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withExpression(instance.getExpression()); - this.withMessage(instance.getMessage()); - this.withMessageExpression(instance.getMessageExpression()); - this.withReason(instance.getReason()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha1ValidationFluent fluent; - Boolean validationEnabled; + public V1alpha1Validation build() { V1alpha1Validation buildable = new V1alpha1Validation(); buildable.setExpression(fluent.getExpression()); @@ -52,4 +30,5 @@ public V1alpha1Validation build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationFluent.java index 28c6aaca8b..5261bdb1fc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationFluent.java @@ -1,25 +1,114 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha1ValidationFluent> extends Fluent{ - public String getExpression(); - public A withExpression(String expression); - public Boolean hasExpression(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getMessageExpression(); - public A withMessageExpression(String messageExpression); - public Boolean hasMessageExpression(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1ValidationFluent> extends BaseFluent{ + public V1alpha1ValidationFluent() { + } + public V1alpha1ValidationFluent(V1alpha1Validation instance) { + this.copyInstance(instance); + } + private String expression; + private String message; + private String messageExpression; + private String reason; + + protected void copyInstance(V1alpha1Validation instance) { + instance = (instance != null ? instance : new V1alpha1Validation()); + if (instance != null) { + this.withExpression(instance.getExpression()); + this.withMessage(instance.getMessage()); + this.withMessageExpression(instance.getMessageExpression()); + this.withReason(instance.getReason()); + } + } + + public String getExpression() { + return this.expression; + } + + public A withExpression(String expression) { + this.expression = expression; + return (A) this; + } + + public boolean hasExpression() { + return this.expression != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getMessageExpression() { + return this.messageExpression; + } + + public A withMessageExpression(String messageExpression) { + this.messageExpression = messageExpression; + return (A) this; + } + + public boolean hasMessageExpression() { + return this.messageExpression != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha1ValidationFluent that = (V1alpha1ValidationFluent) o; + if (!java.util.Objects.equals(expression, that.expression)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(messageExpression, that.messageExpression)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(expression, message, messageExpression, reason, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (expression != null) { sb.append("expression:"); sb.append(expression + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (messageExpression != null) { sb.append("messageExpression:"); sb.append(messageExpression + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VariableBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VariableBuilder.java new file mode 100644 index 0000000000..1b7adc925d --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VariableBuilder.java @@ -0,0 +1,32 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1alpha1VariableBuilder extends V1alpha1VariableFluent implements VisitableBuilder{ + public V1alpha1VariableBuilder() { + this(new V1alpha1Variable()); + } + + public V1alpha1VariableBuilder(V1alpha1VariableFluent fluent) { + this(fluent, new V1alpha1Variable()); + } + + public V1alpha1VariableBuilder(V1alpha1VariableFluent fluent,V1alpha1Variable instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1alpha1VariableBuilder(V1alpha1Variable instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1alpha1VariableFluent fluent; + + public V1alpha1Variable build() { + V1alpha1Variable buildable = new V1alpha1Variable(); + buildable.setExpression(fluent.getExpression()); + buildable.setName(fluent.getName()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VariableFluent.java similarity index 62% rename from fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionFluentImpl.java rename to fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VariableFluent.java index 5511b6446f..b869589a3f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1MatchConditionFluentImpl.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1VariableFluent.java @@ -4,55 +4,69 @@ import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1MatchConditionFluentImpl> extends BaseFluent implements V1alpha1MatchConditionFluent{ - public V1alpha1MatchConditionFluentImpl() { +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha1VariableFluent> extends BaseFluent{ + public V1alpha1VariableFluent() { } - public V1alpha1MatchConditionFluentImpl(V1alpha1MatchCondition instance) { - if (instance != null) { - this.withExpression(instance.getExpression()); - this.withName(instance.getName()); - } + + public V1alpha1VariableFluent(V1alpha1Variable instance) { + this.copyInstance(instance); } private String expression; private String name; + + protected void copyInstance(V1alpha1Variable instance) { + instance = (instance != null ? instance : new V1alpha1Variable()); + if (instance != null) { + this.withExpression(instance.getExpression()); + this.withName(instance.getName()); + } + } + public String getExpression() { return this.expression; } + public A withExpression(String expression) { - this.expression=expression; return (A) this; + this.expression = expression; + return (A) this; } - public Boolean hasExpression() { + + public boolean hasExpression() { return this.expression != null; } + public String getName() { return this.name; } + public A withName(String name) { - this.name=name; return (A) this; + this.name = name; + return (A) this; } - public Boolean hasName() { + + public boolean hasName() { return this.name != null; } + public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; - V1alpha1MatchConditionFluentImpl that = (V1alpha1MatchConditionFluentImpl) o; + V1alpha1VariableFluent that = (V1alpha1VariableFluent) o; if (!java.util.Objects.equals(expression, that.expression)) return false; - if (!java.util.Objects.equals(name, that.name)) return false; - return true; } + public int hashCode() { return java.util.Objects.hash(expression, name, super.hashCode()); } + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); @@ -62,4 +76,5 @@ public String toString() { return sb.toString(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultBuilder.java index bf8e11cba5..906d336e02 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2AllocationResultBuilder extends V1alpha2AllocationResultFluentImpl implements VisitableBuilder{ +public class V1alpha2AllocationResultBuilder extends V1alpha2AllocationResultFluent implements VisitableBuilder{ public V1alpha2AllocationResultBuilder() { - this(false); - } - public V1alpha2AllocationResultBuilder(Boolean validationEnabled) { - this(new V1alpha2AllocationResult(), validationEnabled); + this(new V1alpha2AllocationResult()); } + public V1alpha2AllocationResultBuilder(V1alpha2AllocationResultFluent fluent) { - this(fluent, false); - } - public V1alpha2AllocationResultBuilder(V1alpha2AllocationResultFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2AllocationResult(), validationEnabled); + this(fluent, new V1alpha2AllocationResult()); } + public V1alpha2AllocationResultBuilder(V1alpha2AllocationResultFluent fluent,V1alpha2AllocationResult instance) { - this(fluent, instance, false); - } - public V1alpha2AllocationResultBuilder(V1alpha2AllocationResultFluent fluent,V1alpha2AllocationResult instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAvailableOnNodes(instance.getAvailableOnNodes()); - fluent.withResourceHandles(instance.getResourceHandles()); - fluent.withShareable(instance.getShareable()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2AllocationResultBuilder(V1alpha2AllocationResult instance) { - this(instance,false); - } - public V1alpha2AllocationResultBuilder(V1alpha2AllocationResult instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAvailableOnNodes(instance.getAvailableOnNodes()); - this.withResourceHandles(instance.getResourceHandles()); - this.withShareable(instance.getShareable()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2AllocationResultFluent fluent; - Boolean validationEnabled; + public V1alpha2AllocationResult build() { V1alpha2AllocationResult buildable = new V1alpha2AllocationResult(); - buildable.setAvailableOnNodes(fluent.getAvailableOnNodes()); - buildable.setResourceHandles(fluent.getResourceHandles()); + buildable.setAvailableOnNodes(fluent.buildAvailableOnNodes()); + buildable.setResourceHandles(fluent.buildResourceHandles()); buildable.setShareable(fluent.getShareable()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultFluent.java index 173ebb6653..3977322699 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultFluent.java @@ -1,79 +1,307 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2AllocationResultFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildAvailableOnNodes instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelector getAvailableOnNodes(); - public V1NodeSelector buildAvailableOnNodes(); - public A withAvailableOnNodes(V1NodeSelector availableOnNodes); - public Boolean hasAvailableOnNodes(); - public V1alpha2AllocationResultFluent.AvailableOnNodesNested withNewAvailableOnNodes(); - public V1alpha2AllocationResultFluent.AvailableOnNodesNested withNewAvailableOnNodesLike(V1NodeSelector item); - public V1alpha2AllocationResultFluent.AvailableOnNodesNested editAvailableOnNodes(); - public V1alpha2AllocationResultFluent.AvailableOnNodesNested editOrNewAvailableOnNodes(); - public V1alpha2AllocationResultFluent.AvailableOnNodesNested editOrNewAvailableOnNodesLike(V1NodeSelector item); - public A addToResourceHandles(int index,V1alpha2ResourceHandle item); - public A setToResourceHandles(int index,V1alpha2ResourceHandle item); - public A addToResourceHandles(io.kubernetes.client.openapi.models.V1alpha2ResourceHandle... items); - public A addAllToResourceHandles(Collection items); - public A removeFromResourceHandles(io.kubernetes.client.openapi.models.V1alpha2ResourceHandle... items); - public A removeAllFromResourceHandles(Collection items); - public A removeMatchingFromResourceHandles(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResourceHandles instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceHandles(); - public List buildResourceHandles(); - public V1alpha2ResourceHandle buildResourceHandle(int index); - public V1alpha2ResourceHandle buildFirstResourceHandle(); - public V1alpha2ResourceHandle buildLastResourceHandle(); - public V1alpha2ResourceHandle buildMatchingResourceHandle(Predicate predicate); - public Boolean hasMatchingResourceHandle(Predicate predicate); - public A withResourceHandles(List resourceHandles); - public A withResourceHandles(io.kubernetes.client.openapi.models.V1alpha2ResourceHandle... resourceHandles); - public Boolean hasResourceHandles(); - public V1alpha2AllocationResultFluent.ResourceHandlesNested addNewResourceHandle(); - public V1alpha2AllocationResultFluent.ResourceHandlesNested addNewResourceHandleLike(V1alpha2ResourceHandle item); - public V1alpha2AllocationResultFluent.ResourceHandlesNested setNewResourceHandleLike(int index,V1alpha2ResourceHandle item); - public V1alpha2AllocationResultFluent.ResourceHandlesNested editResourceHandle(int index); - public V1alpha2AllocationResultFluent.ResourceHandlesNested editFirstResourceHandle(); - public V1alpha2AllocationResultFluent.ResourceHandlesNested editLastResourceHandle(); - public V1alpha2AllocationResultFluent.ResourceHandlesNested editMatchingResourceHandle(Predicate predicate); - public Boolean getShareable(); - public A withShareable(Boolean shareable); - public Boolean hasShareable(); - public A withShareable(); - public interface AvailableOnNodesNested extends Nested,V1NodeSelectorFluent>{ - public N and(); - public N endAvailableOnNodes(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2AllocationResultFluent> extends BaseFluent{ + public V1alpha2AllocationResultFluent() { + } + + public V1alpha2AllocationResultFluent(V1alpha2AllocationResult instance) { + this.copyInstance(instance); + } + private V1NodeSelectorBuilder availableOnNodes; + private ArrayList resourceHandles; + private Boolean shareable; + + protected void copyInstance(V1alpha2AllocationResult instance) { + instance = (instance != null ? instance : new V1alpha2AllocationResult()); + if (instance != null) { + this.withAvailableOnNodes(instance.getAvailableOnNodes()); + this.withResourceHandles(instance.getResourceHandles()); + this.withShareable(instance.getShareable()); + } + } + + public V1NodeSelector buildAvailableOnNodes() { + return this.availableOnNodes != null ? this.availableOnNodes.build() : null; + } + + public A withAvailableOnNodes(V1NodeSelector availableOnNodes) { + this._visitables.remove("availableOnNodes"); + if (availableOnNodes != null) { + this.availableOnNodes = new V1NodeSelectorBuilder(availableOnNodes); + this._visitables.get("availableOnNodes").add(this.availableOnNodes); + } else { + this.availableOnNodes = null; + this._visitables.get("availableOnNodes").remove(this.availableOnNodes); + } + return (A) this; + } + + public boolean hasAvailableOnNodes() { + return this.availableOnNodes != null; + } + + public AvailableOnNodesNested withNewAvailableOnNodes() { + return new AvailableOnNodesNested(null); + } + + public AvailableOnNodesNested withNewAvailableOnNodesLike(V1NodeSelector item) { + return new AvailableOnNodesNested(item); + } + + public AvailableOnNodesNested editAvailableOnNodes() { + return withNewAvailableOnNodesLike(java.util.Optional.ofNullable(buildAvailableOnNodes()).orElse(null)); + } + + public AvailableOnNodesNested editOrNewAvailableOnNodes() { + return withNewAvailableOnNodesLike(java.util.Optional.ofNullable(buildAvailableOnNodes()).orElse(new V1NodeSelectorBuilder().build())); + } + + public AvailableOnNodesNested editOrNewAvailableOnNodesLike(V1NodeSelector item) { + return withNewAvailableOnNodesLike(java.util.Optional.ofNullable(buildAvailableOnNodes()).orElse(item)); + } + + public A addToResourceHandles(int index,V1alpha2ResourceHandle item) { + if (this.resourceHandles == null) {this.resourceHandles = new ArrayList();} + V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item); + if (index < 0 || index >= resourceHandles.size()) { _visitables.get("resourceHandles").add(builder); resourceHandles.add(builder); } else { _visitables.get("resourceHandles").add(index, builder); resourceHandles.add(index, builder);} + return (A)this; + } + + public A setToResourceHandles(int index,V1alpha2ResourceHandle item) { + if (this.resourceHandles == null) {this.resourceHandles = new ArrayList();} + V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item); + if (index < 0 || index >= resourceHandles.size()) { _visitables.get("resourceHandles").add(builder); resourceHandles.add(builder); } else { _visitables.get("resourceHandles").set(index, builder); resourceHandles.set(index, builder);} + return (A)this; + } + + public A addToResourceHandles(io.kubernetes.client.openapi.models.V1alpha2ResourceHandle... items) { + if (this.resourceHandles == null) {this.resourceHandles = new ArrayList();} + for (V1alpha2ResourceHandle item : items) {V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item);_visitables.get("resourceHandles").add(builder);this.resourceHandles.add(builder);} return (A)this; + } + + public A addAllToResourceHandles(Collection items) { + if (this.resourceHandles == null) {this.resourceHandles = new ArrayList();} + for (V1alpha2ResourceHandle item : items) {V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item);_visitables.get("resourceHandles").add(builder);this.resourceHandles.add(builder);} return (A)this; + } + + public A removeFromResourceHandles(io.kubernetes.client.openapi.models.V1alpha2ResourceHandle... items) { + if (this.resourceHandles == null) return (A)this; + for (V1alpha2ResourceHandle item : items) {V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item);_visitables.get("resourceHandles").remove(builder); this.resourceHandles.remove(builder);} return (A)this; + } + + public A removeAllFromResourceHandles(Collection items) { + if (this.resourceHandles == null) return (A)this; + for (V1alpha2ResourceHandle item : items) {V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item);_visitables.get("resourceHandles").remove(builder); this.resourceHandles.remove(builder);} return (A)this; + } + + public A removeMatchingFromResourceHandles(Predicate predicate) { + if (resourceHandles == null) return (A) this; + final Iterator each = resourceHandles.iterator(); + final List visitables = _visitables.get("resourceHandles"); + while (each.hasNext()) { + V1alpha2ResourceHandleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResourceHandles() { + return this.resourceHandles != null ? build(resourceHandles) : null; + } + + public V1alpha2ResourceHandle buildResourceHandle(int index) { + return this.resourceHandles.get(index).build(); + } + + public V1alpha2ResourceHandle buildFirstResourceHandle() { + return this.resourceHandles.get(0).build(); + } + + public V1alpha2ResourceHandle buildLastResourceHandle() { + return this.resourceHandles.get(resourceHandles.size() - 1).build(); + } + + public V1alpha2ResourceHandle buildMatchingResourceHandle(Predicate predicate) { + for (V1alpha2ResourceHandleBuilder item : resourceHandles) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; } - public interface ResourceHandlesNested extends Nested,V1alpha2ResourceHandleFluent>{ - public N and(); - public N endResourceHandle(); + + public boolean hasMatchingResourceHandle(Predicate predicate) { + for (V1alpha2ResourceHandleBuilder item : resourceHandles) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceHandles(List resourceHandles) { + if (this.resourceHandles != null) { + this._visitables.get("resourceHandles").clear(); + } + if (resourceHandles != null) { + this.resourceHandles = new ArrayList(); + for (V1alpha2ResourceHandle item : resourceHandles) { + this.addToResourceHandles(item); + } + } else { + this.resourceHandles = null; + } + return (A) this; + } + + public A withResourceHandles(io.kubernetes.client.openapi.models.V1alpha2ResourceHandle... resourceHandles) { + if (this.resourceHandles != null) { + this.resourceHandles.clear(); + _visitables.remove("resourceHandles"); + } + if (resourceHandles != null) { + for (V1alpha2ResourceHandle item : resourceHandles) { + this.addToResourceHandles(item); + } + } + return (A) this; + } + + public boolean hasResourceHandles() { + return this.resourceHandles != null && !this.resourceHandles.isEmpty(); + } + + public ResourceHandlesNested addNewResourceHandle() { + return new ResourceHandlesNested(-1, null); + } + + public ResourceHandlesNested addNewResourceHandleLike(V1alpha2ResourceHandle item) { + return new ResourceHandlesNested(-1, item); + } + + public ResourceHandlesNested setNewResourceHandleLike(int index,V1alpha2ResourceHandle item) { + return new ResourceHandlesNested(index, item); + } + + public ResourceHandlesNested editResourceHandle(int index) { + if (resourceHandles.size() <= index) throw new RuntimeException("Can't edit resourceHandles. Index exceeds size."); + return setNewResourceHandleLike(index, buildResourceHandle(index)); + } + + public ResourceHandlesNested editFirstResourceHandle() { + if (resourceHandles.size() == 0) throw new RuntimeException("Can't edit first resourceHandles. The list is empty."); + return setNewResourceHandleLike(0, buildResourceHandle(0)); + } + + public ResourceHandlesNested editLastResourceHandle() { + int index = resourceHandles.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resourceHandles. The list is empty."); + return setNewResourceHandleLike(index, buildResourceHandle(index)); + } + + public ResourceHandlesNested editMatchingResourceHandle(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1NodeSelectorFluent> implements Nested{ + AvailableOnNodesNested(V1NodeSelector item) { + this.builder = new V1NodeSelectorBuilder(this, item); + } + V1NodeSelectorBuilder builder; + public N and() { + return (N) V1alpha2AllocationResultFluent.this.withAvailableOnNodes(builder.build()); + } + + public N endAvailableOnNodes() { + return and(); + } + + } + public class ResourceHandlesNested extends V1alpha2ResourceHandleFluent> implements Nested{ + ResourceHandlesNested(int index,V1alpha2ResourceHandle item) { + this.index = index; + this.builder = new V1alpha2ResourceHandleBuilder(this, item); + } + V1alpha2ResourceHandleBuilder builder; + int index; + + public N and() { + return (N) V1alpha2AllocationResultFluent.this.setToResourceHandles(index,builder.build()); + } + + public N endResourceHandle() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultFluentImpl.java deleted file mode 100644 index 498321fb95..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2AllocationResultFluentImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2AllocationResultFluentImpl> extends BaseFluent implements V1alpha2AllocationResultFluent{ - public V1alpha2AllocationResultFluentImpl() { - } - public V1alpha2AllocationResultFluentImpl(V1alpha2AllocationResult instance) { - if (instance != null) { - this.withAvailableOnNodes(instance.getAvailableOnNodes()); - this.withResourceHandles(instance.getResourceHandles()); - this.withShareable(instance.getShareable()); - } - } - private V1NodeSelectorBuilder availableOnNodes; - private ArrayList resourceHandles; - private Boolean shareable; - - /** - * This method has been deprecated, please use method buildAvailableOnNodes instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelector getAvailableOnNodes() { - return this.availableOnNodes!=null ?this.availableOnNodes.build():null; - } - public V1NodeSelector buildAvailableOnNodes() { - return this.availableOnNodes!=null ?this.availableOnNodes.build():null; - } - public A withAvailableOnNodes(V1NodeSelector availableOnNodes) { - _visitables.get("availableOnNodes").remove(this.availableOnNodes); - if (availableOnNodes!=null){ this.availableOnNodes= new V1NodeSelectorBuilder(availableOnNodes); _visitables.get("availableOnNodes").add(this.availableOnNodes);} else { this.availableOnNodes = null; _visitables.get("availableOnNodes").remove(this.availableOnNodes); } return (A) this; - } - public Boolean hasAvailableOnNodes() { - return this.availableOnNodes != null; - } - public V1alpha2AllocationResultFluentImpl.AvailableOnNodesNested withNewAvailableOnNodes() { - return new V1alpha2AllocationResultFluentImpl.AvailableOnNodesNestedImpl(); - } - public V1alpha2AllocationResultFluentImpl.AvailableOnNodesNested withNewAvailableOnNodesLike(V1NodeSelector item) { - return new V1alpha2AllocationResultFluentImpl.AvailableOnNodesNestedImpl(item); - } - public V1alpha2AllocationResultFluentImpl.AvailableOnNodesNested editAvailableOnNodes() { - return withNewAvailableOnNodesLike(getAvailableOnNodes()); - } - public V1alpha2AllocationResultFluentImpl.AvailableOnNodesNested editOrNewAvailableOnNodes() { - return withNewAvailableOnNodesLike(getAvailableOnNodes() != null ? getAvailableOnNodes(): new V1NodeSelectorBuilder().build()); - } - public V1alpha2AllocationResultFluentImpl.AvailableOnNodesNested editOrNewAvailableOnNodesLike(V1NodeSelector item) { - return withNewAvailableOnNodesLike(getAvailableOnNodes() != null ? getAvailableOnNodes(): item); - } - public A addToResourceHandles(int index,V1alpha2ResourceHandle item) { - if (this.resourceHandles == null) {this.resourceHandles = new ArrayList();} - V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item); - if (index < 0 || index >= resourceHandles.size()) { _visitables.get("resourceHandles").add(builder); resourceHandles.add(builder); } else { _visitables.get("resourceHandles").add(index, builder); resourceHandles.add(index, builder);} - return (A)this; - } - public A setToResourceHandles(int index,V1alpha2ResourceHandle item) { - if (this.resourceHandles == null) {this.resourceHandles = new ArrayList();} - V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item); - if (index < 0 || index >= resourceHandles.size()) { _visitables.get("resourceHandles").add(builder); resourceHandles.add(builder); } else { _visitables.get("resourceHandles").set(index, builder); resourceHandles.set(index, builder);} - return (A)this; - } - public A addToResourceHandles(io.kubernetes.client.openapi.models.V1alpha2ResourceHandle... items) { - if (this.resourceHandles == null) {this.resourceHandles = new ArrayList();} - for (V1alpha2ResourceHandle item : items) {V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item);_visitables.get("resourceHandles").add(builder);this.resourceHandles.add(builder);} return (A)this; - } - public A addAllToResourceHandles(Collection items) { - if (this.resourceHandles == null) {this.resourceHandles = new ArrayList();} - for (V1alpha2ResourceHandle item : items) {V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item);_visitables.get("resourceHandles").add(builder);this.resourceHandles.add(builder);} return (A)this; - } - public A removeFromResourceHandles(io.kubernetes.client.openapi.models.V1alpha2ResourceHandle... items) { - for (V1alpha2ResourceHandle item : items) {V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item);_visitables.get("resourceHandles").remove(builder);if (this.resourceHandles != null) {this.resourceHandles.remove(builder);}} return (A)this; - } - public A removeAllFromResourceHandles(Collection items) { - for (V1alpha2ResourceHandle item : items) {V1alpha2ResourceHandleBuilder builder = new V1alpha2ResourceHandleBuilder(item);_visitables.get("resourceHandles").remove(builder);if (this.resourceHandles != null) {this.resourceHandles.remove(builder);}} return (A)this; - } - public A removeMatchingFromResourceHandles(Predicate predicate) { - if (resourceHandles == null) return (A) this; - final Iterator each = resourceHandles.iterator(); - final List visitables = _visitables.get("resourceHandles"); - while (each.hasNext()) { - V1alpha2ResourceHandleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResourceHandles instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceHandles() { - return resourceHandles != null ? build(resourceHandles) : null; - } - public List buildResourceHandles() { - return resourceHandles != null ? build(resourceHandles) : null; - } - public V1alpha2ResourceHandle buildResourceHandle(int index) { - return this.resourceHandles.get(index).build(); - } - public V1alpha2ResourceHandle buildFirstResourceHandle() { - return this.resourceHandles.get(0).build(); - } - public V1alpha2ResourceHandle buildLastResourceHandle() { - return this.resourceHandles.get(resourceHandles.size() - 1).build(); - } - public V1alpha2ResourceHandle buildMatchingResourceHandle(Predicate predicate) { - for (V1alpha2ResourceHandleBuilder item: resourceHandles) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResourceHandle(Predicate predicate) { - for (V1alpha2ResourceHandleBuilder item: resourceHandles) { if(predicate.test(item)){ return true;} } return false; - } - public A withResourceHandles(List resourceHandles) { - if (this.resourceHandles != null) { _visitables.get("resourceHandles").clear();} - if (resourceHandles != null) {this.resourceHandles = new ArrayList(); for (V1alpha2ResourceHandle item : resourceHandles){this.addToResourceHandles(item);}} else { this.resourceHandles = null;} return (A) this; - } - public A withResourceHandles(io.kubernetes.client.openapi.models.V1alpha2ResourceHandle... resourceHandles) { - if (this.resourceHandles != null) {this.resourceHandles.clear(); _visitables.remove("resourceHandles"); } - if (resourceHandles != null) {for (V1alpha2ResourceHandle item :resourceHandles){ this.addToResourceHandles(item);}} return (A) this; - } - public Boolean hasResourceHandles() { - return resourceHandles != null && !resourceHandles.isEmpty(); - } - public V1alpha2AllocationResultFluentImpl.ResourceHandlesNested addNewResourceHandle() { - return new V1alpha2AllocationResultFluentImpl.ResourceHandlesNestedImpl(); - } - public V1alpha2AllocationResultFluentImpl.ResourceHandlesNested addNewResourceHandleLike(V1alpha2ResourceHandle item) { - return new V1alpha2AllocationResultFluentImpl.ResourceHandlesNestedImpl(-1, item); - } - public V1alpha2AllocationResultFluentImpl.ResourceHandlesNested setNewResourceHandleLike(int index,V1alpha2ResourceHandle item) { - return new V1alpha2AllocationResultFluentImpl.ResourceHandlesNestedImpl(index, item); - } - public V1alpha2AllocationResultFluentImpl.ResourceHandlesNested editResourceHandle(int index) { - if (resourceHandles.size() <= index) throw new RuntimeException("Can't edit resourceHandles. Index exceeds size."); - return setNewResourceHandleLike(index, buildResourceHandle(index)); - } - public V1alpha2AllocationResultFluentImpl.ResourceHandlesNested editFirstResourceHandle() { - if (resourceHandles.size() == 0) throw new RuntimeException("Can't edit first resourceHandles. The list is empty."); - return setNewResourceHandleLike(0, buildResourceHandle(0)); - } - public V1alpha2AllocationResultFluentImpl.ResourceHandlesNested editLastResourceHandle() { - int index = resourceHandles.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resourceHandles. The list is empty."); - return setNewResourceHandleLike(index, buildResourceHandle(index)); - } - public V1alpha2AllocationResultFluentImpl.ResourceHandlesNested editMatchingResourceHandle(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1NodeSelectorFluentImpl> implements V1alpha2AllocationResultFluentImpl.AvailableOnNodesNested,Nested{ - AvailableOnNodesNestedImpl(V1NodeSelector item) { - this.builder = new V1NodeSelectorBuilder(this, item); - } - AvailableOnNodesNestedImpl() { - this.builder = new V1NodeSelectorBuilder(this); - } - V1NodeSelectorBuilder builder; - public N and() { - return (N) V1alpha2AllocationResultFluentImpl.this.withAvailableOnNodes(builder.build()); - } - public N endAvailableOnNodes() { - return and(); - } - - } - class ResourceHandlesNestedImpl extends V1alpha2ResourceHandleFluentImpl> implements V1alpha2AllocationResultFluentImpl.ResourceHandlesNested,Nested{ - ResourceHandlesNestedImpl(int index,V1alpha2ResourceHandle item) { - this.index = index; - this.builder = new V1alpha2ResourceHandleBuilder(this, item); - } - ResourceHandlesNestedImpl() { - this.index = -1; - this.builder = new V1alpha2ResourceHandleBuilder(this); - } - V1alpha2ResourceHandleBuilder builder; - int index; - public N and() { - return (N) V1alpha2AllocationResultFluentImpl.this.setToResourceHandles(index,builder.build()); - } - public N endResourceHandle() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextBuilder.java index 85dba8cab2..deb7dc270d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2PodSchedulingContextBuilder extends V1alpha2PodSchedulingContextFluentImpl implements VisitableBuilder{ +public class V1alpha2PodSchedulingContextBuilder extends V1alpha2PodSchedulingContextFluent implements VisitableBuilder{ public V1alpha2PodSchedulingContextBuilder() { - this(false); - } - public V1alpha2PodSchedulingContextBuilder(Boolean validationEnabled) { - this(new V1alpha2PodSchedulingContext(), validationEnabled); + this(new V1alpha2PodSchedulingContext()); } + public V1alpha2PodSchedulingContextBuilder(V1alpha2PodSchedulingContextFluent fluent) { - this(fluent, false); - } - public V1alpha2PodSchedulingContextBuilder(V1alpha2PodSchedulingContextFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2PodSchedulingContext(), validationEnabled); + this(fluent, new V1alpha2PodSchedulingContext()); } + public V1alpha2PodSchedulingContextBuilder(V1alpha2PodSchedulingContextFluent fluent,V1alpha2PodSchedulingContext instance) { - this(fluent, instance, false); - } - public V1alpha2PodSchedulingContextBuilder(V1alpha2PodSchedulingContextFluent fluent,V1alpha2PodSchedulingContext instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2PodSchedulingContextBuilder(V1alpha2PodSchedulingContext instance) { - this(instance,false); - } - public V1alpha2PodSchedulingContextBuilder(V1alpha2PodSchedulingContext instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2PodSchedulingContextFluent fluent; - Boolean validationEnabled; + public V1alpha2PodSchedulingContext build() { V1alpha2PodSchedulingContext buildable = new V1alpha2PodSchedulingContext(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextFluent.java index 8ecede5d98..f298a47f98 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha2PodSchedulingContextFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha2PodSchedulingContextFluent.MetadataNested withNewMetadata(); - public V1alpha2PodSchedulingContextFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha2PodSchedulingContextFluent.MetadataNested editMetadata(); - public V1alpha2PodSchedulingContextFluent.MetadataNested editOrNewMetadata(); - public V1alpha2PodSchedulingContextFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2PodSchedulingContextSpec getSpec(); - public V1alpha2PodSchedulingContextSpec buildSpec(); - public A withSpec(V1alpha2PodSchedulingContextSpec spec); - public Boolean hasSpec(); - public V1alpha2PodSchedulingContextFluent.SpecNested withNewSpec(); - public V1alpha2PodSchedulingContextFluent.SpecNested withNewSpecLike(V1alpha2PodSchedulingContextSpec item); - public V1alpha2PodSchedulingContextFluent.SpecNested editSpec(); - public V1alpha2PodSchedulingContextFluent.SpecNested editOrNewSpec(); - public V1alpha2PodSchedulingContextFluent.SpecNested editOrNewSpecLike(V1alpha2PodSchedulingContextSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2PodSchedulingContextStatus getStatus(); - public V1alpha2PodSchedulingContextStatus buildStatus(); - public A withStatus(V1alpha2PodSchedulingContextStatus status); - public Boolean hasStatus(); - public V1alpha2PodSchedulingContextFluent.StatusNested withNewStatus(); - public V1alpha2PodSchedulingContextFluent.StatusNested withNewStatusLike(V1alpha2PodSchedulingContextStatus item); - public V1alpha2PodSchedulingContextFluent.StatusNested editStatus(); - public V1alpha2PodSchedulingContextFluent.StatusNested editOrNewStatus(); - public V1alpha2PodSchedulingContextFluent.StatusNested editOrNewStatusLike(V1alpha2PodSchedulingContextStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2PodSchedulingContextFluent> extends BaseFluent{ + public V1alpha2PodSchedulingContextFluent() { + } + + public V1alpha2PodSchedulingContextFluent(V1alpha2PodSchedulingContext instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha2PodSchedulingContextSpecBuilder spec; + private V1alpha2PodSchedulingContextStatusBuilder status; + + protected void copyInstance(V1alpha2PodSchedulingContext instance) { + instance = (instance != null ? instance : new V1alpha2PodSchedulingContext()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha2PodSchedulingContextSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1alpha2PodSchedulingContextSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1alpha2PodSchedulingContextSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1alpha2PodSchedulingContextSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1alpha2PodSchedulingContextSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1alpha2PodSchedulingContextSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1alpha2PodSchedulingContextSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1alpha2PodSchedulingContextStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1alpha2PodSchedulingContextStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1alpha2PodSchedulingContextStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1alpha2PodSchedulingContextStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1alpha2PodSchedulingContextStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1alpha2PodSchedulingContextStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2PodSchedulingContextFluent that = (V1alpha2PodSchedulingContextFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha2PodSchedulingContextFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1alpha2PodSchedulingContextStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1alpha2PodSchedulingContextSpecFluent> implements Nested{ + SpecNested(V1alpha2PodSchedulingContextSpec item) { + this.builder = new V1alpha2PodSchedulingContextSpecBuilder(this, item); + } + V1alpha2PodSchedulingContextSpecBuilder builder; + + public N and() { + return (N) V1alpha2PodSchedulingContextFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1alpha2PodSchedulingContextStatusFluent> implements Nested{ + StatusNested(V1alpha2PodSchedulingContextStatus item) { + this.builder = new V1alpha2PodSchedulingContextStatusBuilder(this, item); + } + V1alpha2PodSchedulingContextStatusBuilder builder; + + public N and() { + return (N) V1alpha2PodSchedulingContextFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextFluentImpl.java deleted file mode 100644 index 6e099ac827..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2PodSchedulingContextFluentImpl> extends BaseFluent implements V1alpha2PodSchedulingContextFluent{ - public V1alpha2PodSchedulingContextFluentImpl() { - } - public V1alpha2PodSchedulingContextFluentImpl(V1alpha2PodSchedulingContext instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha2PodSchedulingContextSpecBuilder spec; - private V1alpha2PodSchedulingContextStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha2PodSchedulingContextFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha2PodSchedulingContextFluentImpl.MetadataNestedImpl(); - } - public V1alpha2PodSchedulingContextFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha2PodSchedulingContextFluentImpl.MetadataNestedImpl(item); - } - public V1alpha2PodSchedulingContextFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha2PodSchedulingContextFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha2PodSchedulingContextFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2PodSchedulingContextSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1alpha2PodSchedulingContextSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1alpha2PodSchedulingContextSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1alpha2PodSchedulingContextSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1alpha2PodSchedulingContextFluentImpl.SpecNested withNewSpec() { - return new V1alpha2PodSchedulingContextFluentImpl.SpecNestedImpl(); - } - public V1alpha2PodSchedulingContextFluentImpl.SpecNested withNewSpecLike(V1alpha2PodSchedulingContextSpec item) { - return new V1alpha2PodSchedulingContextFluentImpl.SpecNestedImpl(item); - } - public V1alpha2PodSchedulingContextFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1alpha2PodSchedulingContextFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1alpha2PodSchedulingContextSpecBuilder().build()); - } - public V1alpha2PodSchedulingContextFluentImpl.SpecNested editOrNewSpecLike(V1alpha2PodSchedulingContextSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2PodSchedulingContextStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1alpha2PodSchedulingContextStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1alpha2PodSchedulingContextStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1alpha2PodSchedulingContextStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1alpha2PodSchedulingContextFluentImpl.StatusNested withNewStatus() { - return new V1alpha2PodSchedulingContextFluentImpl.StatusNestedImpl(); - } - public V1alpha2PodSchedulingContextFluentImpl.StatusNested withNewStatusLike(V1alpha2PodSchedulingContextStatus item) { - return new V1alpha2PodSchedulingContextFluentImpl.StatusNestedImpl(item); - } - public V1alpha2PodSchedulingContextFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1alpha2PodSchedulingContextFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1alpha2PodSchedulingContextStatusBuilder().build()); - } - public V1alpha2PodSchedulingContextFluentImpl.StatusNested editOrNewStatusLike(V1alpha2PodSchedulingContextStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2PodSchedulingContextFluentImpl that = (V1alpha2PodSchedulingContextFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha2PodSchedulingContextFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha2PodSchedulingContextFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1alpha2PodSchedulingContextSpecFluentImpl> implements V1alpha2PodSchedulingContextFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1alpha2PodSchedulingContextSpec item) { - this.builder = new V1alpha2PodSchedulingContextSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1alpha2PodSchedulingContextSpecBuilder(this); - } - V1alpha2PodSchedulingContextSpecBuilder builder; - public N and() { - return (N) V1alpha2PodSchedulingContextFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1alpha2PodSchedulingContextStatusFluentImpl> implements V1alpha2PodSchedulingContextFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1alpha2PodSchedulingContextStatus item) { - this.builder = new V1alpha2PodSchedulingContextStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1alpha2PodSchedulingContextStatusBuilder(this); - } - V1alpha2PodSchedulingContextStatusBuilder builder; - public N and() { - return (N) V1alpha2PodSchedulingContextFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListBuilder.java index 3111123f6b..952a6586bf 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2PodSchedulingContextListBuilder extends V1alpha2PodSchedulingContextListFluentImpl implements VisitableBuilder{ +public class V1alpha2PodSchedulingContextListBuilder extends V1alpha2PodSchedulingContextListFluent implements VisitableBuilder{ public V1alpha2PodSchedulingContextListBuilder() { - this(false); - } - public V1alpha2PodSchedulingContextListBuilder(Boolean validationEnabled) { - this(new V1alpha2PodSchedulingContextList(), validationEnabled); + this(new V1alpha2PodSchedulingContextList()); } + public V1alpha2PodSchedulingContextListBuilder(V1alpha2PodSchedulingContextListFluent fluent) { - this(fluent, false); - } - public V1alpha2PodSchedulingContextListBuilder(V1alpha2PodSchedulingContextListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2PodSchedulingContextList(), validationEnabled); + this(fluent, new V1alpha2PodSchedulingContextList()); } + public V1alpha2PodSchedulingContextListBuilder(V1alpha2PodSchedulingContextListFluent fluent,V1alpha2PodSchedulingContextList instance) { - this(fluent, instance, false); - } - public V1alpha2PodSchedulingContextListBuilder(V1alpha2PodSchedulingContextListFluent fluent,V1alpha2PodSchedulingContextList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2PodSchedulingContextListBuilder(V1alpha2PodSchedulingContextList instance) { - this(instance,false); - } - public V1alpha2PodSchedulingContextListBuilder(V1alpha2PodSchedulingContextList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2PodSchedulingContextListFluent fluent; - Boolean validationEnabled; + public V1alpha2PodSchedulingContextList build() { V1alpha2PodSchedulingContextList buildable = new V1alpha2PodSchedulingContextList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListFluent.java index 01cfedba81..01cf27b82f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2PodSchedulingContextListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha2PodSchedulingContext item); - public A setToItems(int index,V1alpha2PodSchedulingContext item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha2PodSchedulingContext buildItem(int index); - public V1alpha2PodSchedulingContext buildFirstItem(); - public V1alpha2PodSchedulingContext buildLastItem(); - public V1alpha2PodSchedulingContext buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext... items); - public Boolean hasItems(); - public V1alpha2PodSchedulingContextListFluent.ItemsNested addNewItem(); - public V1alpha2PodSchedulingContextListFluent.ItemsNested addNewItemLike(V1alpha2PodSchedulingContext item); - public V1alpha2PodSchedulingContextListFluent.ItemsNested setNewItemLike(int index,V1alpha2PodSchedulingContext item); - public V1alpha2PodSchedulingContextListFluent.ItemsNested editItem(int index); - public V1alpha2PodSchedulingContextListFluent.ItemsNested editFirstItem(); - public V1alpha2PodSchedulingContextListFluent.ItemsNested editLastItem(); - public V1alpha2PodSchedulingContextListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha2PodSchedulingContextListFluent.MetadataNested withNewMetadata(); - public V1alpha2PodSchedulingContextListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha2PodSchedulingContextListFluent.MetadataNested editMetadata(); - public V1alpha2PodSchedulingContextListFluent.MetadataNested editOrNewMetadata(); - public V1alpha2PodSchedulingContextListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha2PodSchedulingContextFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2PodSchedulingContextListFluent> extends BaseFluent{ + public V1alpha2PodSchedulingContextListFluent() { + } + + public V1alpha2PodSchedulingContextListFluent(V1alpha2PodSchedulingContextList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha2PodSchedulingContextList instance) { + instance = (instance != null ? instance : new V1alpha2PodSchedulingContextList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha2PodSchedulingContext item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha2PodSchedulingContext item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha2PodSchedulingContext item : items) {V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha2PodSchedulingContext item : items) {V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext... items) { + if (this.items == null) return (A)this; + for (V1alpha2PodSchedulingContext item : items) {V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha2PodSchedulingContext item : items) {V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha2PodSchedulingContextBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha2PodSchedulingContext buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha2PodSchedulingContext buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha2PodSchedulingContext buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha2PodSchedulingContext buildMatchingItem(Predicate predicate) { + for (V1alpha2PodSchedulingContextBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha2PodSchedulingContextBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha2PodSchedulingContext item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha2PodSchedulingContext item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha2PodSchedulingContext item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha2PodSchedulingContext item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2PodSchedulingContextListFluent that = (V1alpha2PodSchedulingContextListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha2PodSchedulingContextFluent> implements Nested{ + ItemsNested(int index,V1alpha2PodSchedulingContext item) { + this.index = index; + this.builder = new V1alpha2PodSchedulingContextBuilder(this, item); + } + V1alpha2PodSchedulingContextBuilder builder; + int index; + public N and() { + return (N) V1alpha2PodSchedulingContextListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha2PodSchedulingContextListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListFluentImpl.java deleted file mode 100644 index 65e6a2c2d0..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2PodSchedulingContextListFluentImpl> extends BaseFluent implements V1alpha2PodSchedulingContextListFluent{ - public V1alpha2PodSchedulingContextListFluentImpl() { - } - public V1alpha2PodSchedulingContextListFluentImpl(V1alpha2PodSchedulingContextList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha2PodSchedulingContext item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha2PodSchedulingContext item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha2PodSchedulingContext item : items) {V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha2PodSchedulingContext item : items) {V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext... items) { - for (V1alpha2PodSchedulingContext item : items) {V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha2PodSchedulingContext item : items) {V1alpha2PodSchedulingContextBuilder builder = new V1alpha2PodSchedulingContextBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha2PodSchedulingContextBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha2PodSchedulingContext buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha2PodSchedulingContext buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha2PodSchedulingContext buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha2PodSchedulingContext buildMatchingItem(Predicate predicate) { - for (V1alpha2PodSchedulingContextBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha2PodSchedulingContextBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha2PodSchedulingContext item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha2PodSchedulingContext... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha2PodSchedulingContext item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha2PodSchedulingContextListFluentImpl.ItemsNested addNewItem() { - return new V1alpha2PodSchedulingContextListFluentImpl.ItemsNestedImpl(); - } - public V1alpha2PodSchedulingContextListFluentImpl.ItemsNested addNewItemLike(V1alpha2PodSchedulingContext item) { - return new V1alpha2PodSchedulingContextListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha2PodSchedulingContextListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha2PodSchedulingContext item) { - return new V1alpha2PodSchedulingContextListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha2PodSchedulingContextListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha2PodSchedulingContextListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha2PodSchedulingContextListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha2PodSchedulingContextListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha2PodSchedulingContextListFluentImpl.MetadataNestedImpl(); - } - public V1alpha2PodSchedulingContextListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha2PodSchedulingContextListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha2PodSchedulingContextListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha2PodSchedulingContextListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha2PodSchedulingContextListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2PodSchedulingContextListFluentImpl that = (V1alpha2PodSchedulingContextListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha2PodSchedulingContextFluentImpl> implements V1alpha2PodSchedulingContextListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha2PodSchedulingContext item) { - this.index = index; - this.builder = new V1alpha2PodSchedulingContextBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha2PodSchedulingContextBuilder(this); - } - V1alpha2PodSchedulingContextBuilder builder; - int index; - public N and() { - return (N) V1alpha2PodSchedulingContextListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha2PodSchedulingContextListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha2PodSchedulingContextListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecBuilder.java index dc0b06b1dd..550783476b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2PodSchedulingContextSpecBuilder extends V1alpha2PodSchedulingContextSpecFluentImpl implements VisitableBuilder{ +public class V1alpha2PodSchedulingContextSpecBuilder extends V1alpha2PodSchedulingContextSpecFluent implements VisitableBuilder{ public V1alpha2PodSchedulingContextSpecBuilder() { - this(false); - } - public V1alpha2PodSchedulingContextSpecBuilder(Boolean validationEnabled) { - this(new V1alpha2PodSchedulingContextSpec(), validationEnabled); + this(new V1alpha2PodSchedulingContextSpec()); } + public V1alpha2PodSchedulingContextSpecBuilder(V1alpha2PodSchedulingContextSpecFluent fluent) { - this(fluent, false); - } - public V1alpha2PodSchedulingContextSpecBuilder(V1alpha2PodSchedulingContextSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2PodSchedulingContextSpec(), validationEnabled); + this(fluent, new V1alpha2PodSchedulingContextSpec()); } + public V1alpha2PodSchedulingContextSpecBuilder(V1alpha2PodSchedulingContextSpecFluent fluent,V1alpha2PodSchedulingContextSpec instance) { - this(fluent, instance, false); - } - public V1alpha2PodSchedulingContextSpecBuilder(V1alpha2PodSchedulingContextSpecFluent fluent,V1alpha2PodSchedulingContextSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPotentialNodes(instance.getPotentialNodes()); - fluent.withSelectedNode(instance.getSelectedNode()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2PodSchedulingContextSpecBuilder(V1alpha2PodSchedulingContextSpec instance) { - this(instance,false); - } - public V1alpha2PodSchedulingContextSpecBuilder(V1alpha2PodSchedulingContextSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPotentialNodes(instance.getPotentialNodes()); - this.withSelectedNode(instance.getSelectedNode()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2PodSchedulingContextSpecFluent fluent; - Boolean validationEnabled; + public V1alpha2PodSchedulingContextSpec build() { V1alpha2PodSchedulingContextSpec buildable = new V1alpha2PodSchedulingContextSpec(); buildable.setPotentialNodes(fluent.getPotentialNodes()); @@ -46,4 +28,5 @@ public V1alpha2PodSchedulingContextSpec build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecFluent.java index ffacdf5ac6..97c3043246 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecFluent.java @@ -1,35 +1,165 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1alpha2PodSchedulingContextSpecFluent> extends Fluent{ - public A addToPotentialNodes(int index,String item); - public A setToPotentialNodes(int index,String item); - public A addToPotentialNodes(java.lang.String... items); - public A addAllToPotentialNodes(Collection items); - public A removeFromPotentialNodes(java.lang.String... items); - public A removeAllFromPotentialNodes(Collection items); - public List getPotentialNodes(); - public String getPotentialNode(int index); - public String getFirstPotentialNode(); - public String getLastPotentialNode(); - public String getMatchingPotentialNode(Predicate predicate); - public Boolean hasMatchingPotentialNode(Predicate predicate); - public A withPotentialNodes(List potentialNodes); - public A withPotentialNodes(java.lang.String... potentialNodes); - public Boolean hasPotentialNodes(); - public String getSelectedNode(); - public A withSelectedNode(String selectedNode); - public Boolean hasSelectedNode(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2PodSchedulingContextSpecFluent> extends BaseFluent{ + public V1alpha2PodSchedulingContextSpecFluent() { + } + public V1alpha2PodSchedulingContextSpecFluent(V1alpha2PodSchedulingContextSpec instance) { + this.copyInstance(instance); + } + private List potentialNodes; + private String selectedNode; + + protected void copyInstance(V1alpha2PodSchedulingContextSpec instance) { + instance = (instance != null ? instance : new V1alpha2PodSchedulingContextSpec()); + if (instance != null) { + this.withPotentialNodes(instance.getPotentialNodes()); + this.withSelectedNode(instance.getSelectedNode()); + } + } + + public A addToPotentialNodes(int index,String item) { + if (this.potentialNodes == null) {this.potentialNodes = new ArrayList();} + this.potentialNodes.add(index, item); + return (A)this; + } + + public A setToPotentialNodes(int index,String item) { + if (this.potentialNodes == null) {this.potentialNodes = new ArrayList();} + this.potentialNodes.set(index, item); return (A)this; + } + + public A addToPotentialNodes(java.lang.String... items) { + if (this.potentialNodes == null) {this.potentialNodes = new ArrayList();} + for (String item : items) {this.potentialNodes.add(item);} return (A)this; + } + + public A addAllToPotentialNodes(Collection items) { + if (this.potentialNodes == null) {this.potentialNodes = new ArrayList();} + for (String item : items) {this.potentialNodes.add(item);} return (A)this; + } + + public A removeFromPotentialNodes(java.lang.String... items) { + if (this.potentialNodes == null) return (A)this; + for (String item : items) { this.potentialNodes.remove(item);} return (A)this; + } + + public A removeAllFromPotentialNodes(Collection items) { + if (this.potentialNodes == null) return (A)this; + for (String item : items) { this.potentialNodes.remove(item);} return (A)this; + } + + public List getPotentialNodes() { + return this.potentialNodes; + } + + public String getPotentialNode(int index) { + return this.potentialNodes.get(index); + } + + public String getFirstPotentialNode() { + return this.potentialNodes.get(0); + } + + public String getLastPotentialNode() { + return this.potentialNodes.get(potentialNodes.size() - 1); + } + + public String getMatchingPotentialNode(Predicate predicate) { + for (String item : potentialNodes) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingPotentialNode(Predicate predicate) { + for (String item : potentialNodes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPotentialNodes(List potentialNodes) { + if (potentialNodes != null) { + this.potentialNodes = new ArrayList(); + for (String item : potentialNodes) { + this.addToPotentialNodes(item); + } + } else { + this.potentialNodes = null; + } + return (A) this; + } + + public A withPotentialNodes(java.lang.String... potentialNodes) { + if (this.potentialNodes != null) { + this.potentialNodes.clear(); + _visitables.remove("potentialNodes"); + } + if (potentialNodes != null) { + for (String item : potentialNodes) { + this.addToPotentialNodes(item); + } + } + return (A) this; + } + + public boolean hasPotentialNodes() { + return this.potentialNodes != null && !this.potentialNodes.isEmpty(); + } + + public String getSelectedNode() { + return this.selectedNode; + } + + public A withSelectedNode(String selectedNode) { + this.selectedNode = selectedNode; + return (A) this; + } + + public boolean hasSelectedNode() { + return this.selectedNode != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2PodSchedulingContextSpecFluent that = (V1alpha2PodSchedulingContextSpecFluent) o; + if (!java.util.Objects.equals(potentialNodes, that.potentialNodes)) return false; + if (!java.util.Objects.equals(selectedNode, that.selectedNode)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(potentialNodes, selectedNode, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (potentialNodes != null && !potentialNodes.isEmpty()) { sb.append("potentialNodes:"); sb.append(potentialNodes + ","); } + if (selectedNode != null) { sb.append("selectedNode:"); sb.append(selectedNode); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecFluentImpl.java deleted file mode 100644 index 894831da8f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextSpecFluentImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2PodSchedulingContextSpecFluentImpl> extends BaseFluent implements V1alpha2PodSchedulingContextSpecFluent{ - public V1alpha2PodSchedulingContextSpecFluentImpl() { - } - public V1alpha2PodSchedulingContextSpecFluentImpl(V1alpha2PodSchedulingContextSpec instance) { - if (instance != null) { - this.withPotentialNodes(instance.getPotentialNodes()); - this.withSelectedNode(instance.getSelectedNode()); - } - } - private List potentialNodes; - private String selectedNode; - public A addToPotentialNodes(int index,String item) { - if (this.potentialNodes == null) {this.potentialNodes = new ArrayList();} - this.potentialNodes.add(index, item); - return (A)this; - } - public A setToPotentialNodes(int index,String item) { - if (this.potentialNodes == null) {this.potentialNodes = new ArrayList();} - this.potentialNodes.set(index, item); return (A)this; - } - public A addToPotentialNodes(java.lang.String... items) { - if (this.potentialNodes == null) {this.potentialNodes = new ArrayList();} - for (String item : items) {this.potentialNodes.add(item);} return (A)this; - } - public A addAllToPotentialNodes(Collection items) { - if (this.potentialNodes == null) {this.potentialNodes = new ArrayList();} - for (String item : items) {this.potentialNodes.add(item);} return (A)this; - } - public A removeFromPotentialNodes(java.lang.String... items) { - for (String item : items) {if (this.potentialNodes!= null){ this.potentialNodes.remove(item);}} return (A)this; - } - public A removeAllFromPotentialNodes(Collection items) { - for (String item : items) {if (this.potentialNodes!= null){ this.potentialNodes.remove(item);}} return (A)this; - } - public List getPotentialNodes() { - return this.potentialNodes; - } - public String getPotentialNode(int index) { - return this.potentialNodes.get(index); - } - public String getFirstPotentialNode() { - return this.potentialNodes.get(0); - } - public String getLastPotentialNode() { - return this.potentialNodes.get(potentialNodes.size() - 1); - } - public String getMatchingPotentialNode(Predicate predicate) { - for (String item: potentialNodes) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingPotentialNode(Predicate predicate) { - for (String item: potentialNodes) { if(predicate.test(item)){ return true;} } return false; - } - public A withPotentialNodes(List potentialNodes) { - if (potentialNodes != null) {this.potentialNodes = new ArrayList(); for (String item : potentialNodes){this.addToPotentialNodes(item);}} else { this.potentialNodes = null;} return (A) this; - } - public A withPotentialNodes(java.lang.String... potentialNodes) { - if (this.potentialNodes != null) {this.potentialNodes.clear(); _visitables.remove("potentialNodes"); } - if (potentialNodes != null) {for (String item :potentialNodes){ this.addToPotentialNodes(item);}} return (A) this; - } - public Boolean hasPotentialNodes() { - return potentialNodes != null && !potentialNodes.isEmpty(); - } - public String getSelectedNode() { - return this.selectedNode; - } - public A withSelectedNode(String selectedNode) { - this.selectedNode=selectedNode; return (A) this; - } - public Boolean hasSelectedNode() { - return this.selectedNode != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2PodSchedulingContextSpecFluentImpl that = (V1alpha2PodSchedulingContextSpecFluentImpl) o; - if (!java.util.Objects.equals(potentialNodes, that.potentialNodes)) return false; - - if (!java.util.Objects.equals(selectedNode, that.selectedNode)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(potentialNodes, selectedNode, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (potentialNodes != null && !potentialNodes.isEmpty()) { sb.append("potentialNodes:"); sb.append(potentialNodes + ","); } - if (selectedNode != null) { sb.append("selectedNode:"); sb.append(selectedNode); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusBuilder.java index f0ac054674..18df36f95e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2PodSchedulingContextStatusBuilder extends V1alpha2PodSchedulingContextStatusFluentImpl implements VisitableBuilder{ +public class V1alpha2PodSchedulingContextStatusBuilder extends V1alpha2PodSchedulingContextStatusFluent implements VisitableBuilder{ public V1alpha2PodSchedulingContextStatusBuilder() { - this(false); - } - public V1alpha2PodSchedulingContextStatusBuilder(Boolean validationEnabled) { - this(new V1alpha2PodSchedulingContextStatus(), validationEnabled); + this(new V1alpha2PodSchedulingContextStatus()); } + public V1alpha2PodSchedulingContextStatusBuilder(V1alpha2PodSchedulingContextStatusFluent fluent) { - this(fluent, false); - } - public V1alpha2PodSchedulingContextStatusBuilder(V1alpha2PodSchedulingContextStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2PodSchedulingContextStatus(), validationEnabled); + this(fluent, new V1alpha2PodSchedulingContextStatus()); } + public V1alpha2PodSchedulingContextStatusBuilder(V1alpha2PodSchedulingContextStatusFluent fluent,V1alpha2PodSchedulingContextStatus instance) { - this(fluent, instance, false); - } - public V1alpha2PodSchedulingContextStatusBuilder(V1alpha2PodSchedulingContextStatusFluent fluent,V1alpha2PodSchedulingContextStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withResourceClaims(instance.getResourceClaims()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2PodSchedulingContextStatusBuilder(V1alpha2PodSchedulingContextStatus instance) { - this(instance,false); - } - public V1alpha2PodSchedulingContextStatusBuilder(V1alpha2PodSchedulingContextStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withResourceClaims(instance.getResourceClaims()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2PodSchedulingContextStatusFluent fluent; - Boolean validationEnabled; + public V1alpha2PodSchedulingContextStatus build() { V1alpha2PodSchedulingContextStatus buildable = new V1alpha2PodSchedulingContextStatus(); - buildable.setResourceClaims(fluent.getResourceClaims()); + buildable.setResourceClaims(fluent.buildResourceClaims()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusFluent.java index e067e511ed..6747818364 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2PodSchedulingContextStatusFluent> extends Fluent{ - public A addToResourceClaims(int index,V1alpha2ResourceClaimSchedulingStatus item); - public A setToResourceClaims(int index,V1alpha2ResourceClaimSchedulingStatus item); - public A addToResourceClaims(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus... items); - public A addAllToResourceClaims(Collection items); - public A removeFromResourceClaims(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus... items); - public A removeAllFromResourceClaims(Collection items); - public A removeMatchingFromResourceClaims(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResourceClaims instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceClaims(); - public List buildResourceClaims(); - public V1alpha2ResourceClaimSchedulingStatus buildResourceClaim(int index); - public V1alpha2ResourceClaimSchedulingStatus buildFirstResourceClaim(); - public V1alpha2ResourceClaimSchedulingStatus buildLastResourceClaim(); - public V1alpha2ResourceClaimSchedulingStatus buildMatchingResourceClaim(Predicate predicate); - public Boolean hasMatchingResourceClaim(Predicate predicate); - public A withResourceClaims(List resourceClaims); - public A withResourceClaims(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus... resourceClaims); - public Boolean hasResourceClaims(); - public V1alpha2PodSchedulingContextStatusFluent.ResourceClaimsNested addNewResourceClaim(); - public V1alpha2PodSchedulingContextStatusFluent.ResourceClaimsNested addNewResourceClaimLike(V1alpha2ResourceClaimSchedulingStatus item); - public V1alpha2PodSchedulingContextStatusFluent.ResourceClaimsNested setNewResourceClaimLike(int index,V1alpha2ResourceClaimSchedulingStatus item); - public V1alpha2PodSchedulingContextStatusFluent.ResourceClaimsNested editResourceClaim(int index); - public V1alpha2PodSchedulingContextStatusFluent.ResourceClaimsNested editFirstResourceClaim(); - public V1alpha2PodSchedulingContextStatusFluent.ResourceClaimsNested editLastResourceClaim(); - public V1alpha2PodSchedulingContextStatusFluent.ResourceClaimsNested editMatchingResourceClaim(Predicate predicate); - public interface ResourceClaimsNested extends Nested,V1alpha2ResourceClaimSchedulingStatusFluent>{ - public N and(); - public N endResourceClaim(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2PodSchedulingContextStatusFluent> extends BaseFluent{ + public V1alpha2PodSchedulingContextStatusFluent() { + } + + public V1alpha2PodSchedulingContextStatusFluent(V1alpha2PodSchedulingContextStatus instance) { + this.copyInstance(instance); + } + private ArrayList resourceClaims; + + protected void copyInstance(V1alpha2PodSchedulingContextStatus instance) { + instance = (instance != null ? instance : new V1alpha2PodSchedulingContextStatus()); + if (instance != null) { + this.withResourceClaims(instance.getResourceClaims()); + } + } + + public A addToResourceClaims(int index,V1alpha2ResourceClaimSchedulingStatus item) { + if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} + V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item); + if (index < 0 || index >= resourceClaims.size()) { _visitables.get("resourceClaims").add(builder); resourceClaims.add(builder); } else { _visitables.get("resourceClaims").add(index, builder); resourceClaims.add(index, builder);} + return (A)this; + } + + public A setToResourceClaims(int index,V1alpha2ResourceClaimSchedulingStatus item) { + if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} + V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item); + if (index < 0 || index >= resourceClaims.size()) { _visitables.get("resourceClaims").add(builder); resourceClaims.add(builder); } else { _visitables.get("resourceClaims").set(index, builder); resourceClaims.set(index, builder);} + return (A)this; + } + + public A addToResourceClaims(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus... items) { + if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} + for (V1alpha2ResourceClaimSchedulingStatus item : items) {V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item);_visitables.get("resourceClaims").add(builder);this.resourceClaims.add(builder);} return (A)this; + } + + public A addAllToResourceClaims(Collection items) { + if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} + for (V1alpha2ResourceClaimSchedulingStatus item : items) {V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item);_visitables.get("resourceClaims").add(builder);this.resourceClaims.add(builder);} return (A)this; + } + + public A removeFromResourceClaims(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus... items) { + if (this.resourceClaims == null) return (A)this; + for (V1alpha2ResourceClaimSchedulingStatus item : items) {V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item);_visitables.get("resourceClaims").remove(builder); this.resourceClaims.remove(builder);} return (A)this; + } + + public A removeAllFromResourceClaims(Collection items) { + if (this.resourceClaims == null) return (A)this; + for (V1alpha2ResourceClaimSchedulingStatus item : items) {V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item);_visitables.get("resourceClaims").remove(builder); this.resourceClaims.remove(builder);} return (A)this; + } + + public A removeMatchingFromResourceClaims(Predicate predicate) { + if (resourceClaims == null) return (A) this; + final Iterator each = resourceClaims.iterator(); + final List visitables = _visitables.get("resourceClaims"); + while (each.hasNext()) { + V1alpha2ResourceClaimSchedulingStatusBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResourceClaims() { + return this.resourceClaims != null ? build(resourceClaims) : null; + } + + public V1alpha2ResourceClaimSchedulingStatus buildResourceClaim(int index) { + return this.resourceClaims.get(index).build(); + } + + public V1alpha2ResourceClaimSchedulingStatus buildFirstResourceClaim() { + return this.resourceClaims.get(0).build(); + } + + public V1alpha2ResourceClaimSchedulingStatus buildLastResourceClaim() { + return this.resourceClaims.get(resourceClaims.size() - 1).build(); + } + + public V1alpha2ResourceClaimSchedulingStatus buildMatchingResourceClaim(Predicate predicate) { + for (V1alpha2ResourceClaimSchedulingStatusBuilder item : resourceClaims) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResourceClaim(Predicate predicate) { + for (V1alpha2ResourceClaimSchedulingStatusBuilder item : resourceClaims) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withResourceClaims(List resourceClaims) { + if (this.resourceClaims != null) { + this._visitables.get("resourceClaims").clear(); + } + if (resourceClaims != null) { + this.resourceClaims = new ArrayList(); + for (V1alpha2ResourceClaimSchedulingStatus item : resourceClaims) { + this.addToResourceClaims(item); + } + } else { + this.resourceClaims = null; + } + return (A) this; + } + + public A withResourceClaims(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus... resourceClaims) { + if (this.resourceClaims != null) { + this.resourceClaims.clear(); + _visitables.remove("resourceClaims"); + } + if (resourceClaims != null) { + for (V1alpha2ResourceClaimSchedulingStatus item : resourceClaims) { + this.addToResourceClaims(item); + } + } + return (A) this; + } + + public boolean hasResourceClaims() { + return this.resourceClaims != null && !this.resourceClaims.isEmpty(); + } + + public ResourceClaimsNested addNewResourceClaim() { + return new ResourceClaimsNested(-1, null); + } + + public ResourceClaimsNested addNewResourceClaimLike(V1alpha2ResourceClaimSchedulingStatus item) { + return new ResourceClaimsNested(-1, item); + } + + public ResourceClaimsNested setNewResourceClaimLike(int index,V1alpha2ResourceClaimSchedulingStatus item) { + return new ResourceClaimsNested(index, item); + } + + public ResourceClaimsNested editResourceClaim(int index) { + if (resourceClaims.size() <= index) throw new RuntimeException("Can't edit resourceClaims. Index exceeds size."); + return setNewResourceClaimLike(index, buildResourceClaim(index)); + } + + public ResourceClaimsNested editFirstResourceClaim() { + if (resourceClaims.size() == 0) throw new RuntimeException("Can't edit first resourceClaims. The list is empty."); + return setNewResourceClaimLike(0, buildResourceClaim(0)); + } + + public ResourceClaimsNested editLastResourceClaim() { + int index = resourceClaims.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resourceClaims. The list is empty."); + return setNewResourceClaimLike(index, buildResourceClaim(index)); + } + + public ResourceClaimsNested editMatchingResourceClaim(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1alpha2ResourceClaimSchedulingStatusFluent> implements Nested{ + ResourceClaimsNested(int index,V1alpha2ResourceClaimSchedulingStatus item) { + this.index = index; + this.builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(this, item); + } + V1alpha2ResourceClaimSchedulingStatusBuilder builder; + int index; + + public N and() { + return (N) V1alpha2PodSchedulingContextStatusFluent.this.setToResourceClaims(index,builder.build()); + } + + public N endResourceClaim() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusFluentImpl.java deleted file mode 100644 index 17313834e6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2PodSchedulingContextStatusFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2PodSchedulingContextStatusFluentImpl> extends BaseFluent implements V1alpha2PodSchedulingContextStatusFluent{ - public V1alpha2PodSchedulingContextStatusFluentImpl() { - } - public V1alpha2PodSchedulingContextStatusFluentImpl(V1alpha2PodSchedulingContextStatus instance) { - if (instance != null) { - this.withResourceClaims(instance.getResourceClaims()); - } - } - private ArrayList resourceClaims; - public A addToResourceClaims(int index,V1alpha2ResourceClaimSchedulingStatus item) { - if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} - V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item); - if (index < 0 || index >= resourceClaims.size()) { _visitables.get("resourceClaims").add(builder); resourceClaims.add(builder); } else { _visitables.get("resourceClaims").add(index, builder); resourceClaims.add(index, builder);} - return (A)this; - } - public A setToResourceClaims(int index,V1alpha2ResourceClaimSchedulingStatus item) { - if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} - V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item); - if (index < 0 || index >= resourceClaims.size()) { _visitables.get("resourceClaims").add(builder); resourceClaims.add(builder); } else { _visitables.get("resourceClaims").set(index, builder); resourceClaims.set(index, builder);} - return (A)this; - } - public A addToResourceClaims(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus... items) { - if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} - for (V1alpha2ResourceClaimSchedulingStatus item : items) {V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item);_visitables.get("resourceClaims").add(builder);this.resourceClaims.add(builder);} return (A)this; - } - public A addAllToResourceClaims(Collection items) { - if (this.resourceClaims == null) {this.resourceClaims = new ArrayList();} - for (V1alpha2ResourceClaimSchedulingStatus item : items) {V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item);_visitables.get("resourceClaims").add(builder);this.resourceClaims.add(builder);} return (A)this; - } - public A removeFromResourceClaims(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus... items) { - for (V1alpha2ResourceClaimSchedulingStatus item : items) {V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item);_visitables.get("resourceClaims").remove(builder);if (this.resourceClaims != null) {this.resourceClaims.remove(builder);}} return (A)this; - } - public A removeAllFromResourceClaims(Collection items) { - for (V1alpha2ResourceClaimSchedulingStatus item : items) {V1alpha2ResourceClaimSchedulingStatusBuilder builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(item);_visitables.get("resourceClaims").remove(builder);if (this.resourceClaims != null) {this.resourceClaims.remove(builder);}} return (A)this; - } - public A removeMatchingFromResourceClaims(Predicate predicate) { - if (resourceClaims == null) return (A) this; - final Iterator each = resourceClaims.iterator(); - final List visitables = _visitables.get("resourceClaims"); - while (each.hasNext()) { - V1alpha2ResourceClaimSchedulingStatusBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResourceClaims instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceClaims() { - return resourceClaims != null ? build(resourceClaims) : null; - } - public List buildResourceClaims() { - return resourceClaims != null ? build(resourceClaims) : null; - } - public V1alpha2ResourceClaimSchedulingStatus buildResourceClaim(int index) { - return this.resourceClaims.get(index).build(); - } - public V1alpha2ResourceClaimSchedulingStatus buildFirstResourceClaim() { - return this.resourceClaims.get(0).build(); - } - public V1alpha2ResourceClaimSchedulingStatus buildLastResourceClaim() { - return this.resourceClaims.get(resourceClaims.size() - 1).build(); - } - public V1alpha2ResourceClaimSchedulingStatus buildMatchingResourceClaim(Predicate predicate) { - for (V1alpha2ResourceClaimSchedulingStatusBuilder item: resourceClaims) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResourceClaim(Predicate predicate) { - for (V1alpha2ResourceClaimSchedulingStatusBuilder item: resourceClaims) { if(predicate.test(item)){ return true;} } return false; - } - public A withResourceClaims(List resourceClaims) { - if (this.resourceClaims != null) { _visitables.get("resourceClaims").clear();} - if (resourceClaims != null) {this.resourceClaims = new ArrayList(); for (V1alpha2ResourceClaimSchedulingStatus item : resourceClaims){this.addToResourceClaims(item);}} else { this.resourceClaims = null;} return (A) this; - } - public A withResourceClaims(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimSchedulingStatus... resourceClaims) { - if (this.resourceClaims != null) {this.resourceClaims.clear(); _visitables.remove("resourceClaims"); } - if (resourceClaims != null) {for (V1alpha2ResourceClaimSchedulingStatus item :resourceClaims){ this.addToResourceClaims(item);}} return (A) this; - } - public Boolean hasResourceClaims() { - return resourceClaims != null && !resourceClaims.isEmpty(); - } - public V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNested addNewResourceClaim() { - return new V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNestedImpl(); - } - public V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNested addNewResourceClaimLike(V1alpha2ResourceClaimSchedulingStatus item) { - return new V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNestedImpl(-1, item); - } - public V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNested setNewResourceClaimLike(int index,V1alpha2ResourceClaimSchedulingStatus item) { - return new V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNestedImpl(index, item); - } - public V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNested editResourceClaim(int index) { - if (resourceClaims.size() <= index) throw new RuntimeException("Can't edit resourceClaims. Index exceeds size."); - return setNewResourceClaimLike(index, buildResourceClaim(index)); - } - public V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNested editFirstResourceClaim() { - if (resourceClaims.size() == 0) throw new RuntimeException("Can't edit first resourceClaims. The list is empty."); - return setNewResourceClaimLike(0, buildResourceClaim(0)); - } - public V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNested editLastResourceClaim() { - int index = resourceClaims.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resourceClaims. The list is empty."); - return setNewResourceClaimLike(index, buildResourceClaim(index)); - } - public V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNested editMatchingResourceClaim(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1alpha2ResourceClaimSchedulingStatusFluentImpl> implements V1alpha2PodSchedulingContextStatusFluentImpl.ResourceClaimsNested,Nested{ - ResourceClaimsNestedImpl(int index,V1alpha2ResourceClaimSchedulingStatus item) { - this.index = index; - this.builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(this, item); - } - ResourceClaimsNestedImpl() { - this.index = -1; - this.builder = new V1alpha2ResourceClaimSchedulingStatusBuilder(this); - } - V1alpha2ResourceClaimSchedulingStatusBuilder builder; - int index; - public N and() { - return (N) V1alpha2PodSchedulingContextStatusFluentImpl.this.setToResourceClaims(index,builder.build()); - } - public N endResourceClaim() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimBuilder.java index c95b42b6a9..ba1af0bb87 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimBuilder extends V1alpha2ResourceClaimFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimBuilder extends V1alpha2ResourceClaimFluent implements VisitableBuilder{ public V1alpha2ResourceClaimBuilder() { - this(false); - } - public V1alpha2ResourceClaimBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaim(), validationEnabled); + this(new V1alpha2ResourceClaim()); } + public V1alpha2ResourceClaimBuilder(V1alpha2ResourceClaimFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimBuilder(V1alpha2ResourceClaimFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaim(), validationEnabled); + this(fluent, new V1alpha2ResourceClaim()); } + public V1alpha2ResourceClaimBuilder(V1alpha2ResourceClaimFluent fluent,V1alpha2ResourceClaim instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimBuilder(V1alpha2ResourceClaimFluent fluent,V1alpha2ResourceClaim instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimBuilder(V1alpha2ResourceClaim instance) { - this(instance,false); - } - public V1alpha2ResourceClaimBuilder(V1alpha2ResourceClaim instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaim build() { V1alpha2ResourceClaim buildable = new V1alpha2ResourceClaim(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceBuilder.java index b1e53820c6..4b9ebf32d9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimConsumerReferenceBuilder extends V1alpha2ResourceClaimConsumerReferenceFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimConsumerReferenceBuilder extends V1alpha2ResourceClaimConsumerReferenceFluent implements VisitableBuilder{ public V1alpha2ResourceClaimConsumerReferenceBuilder() { - this(false); - } - public V1alpha2ResourceClaimConsumerReferenceBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaimConsumerReference(), validationEnabled); + this(new V1alpha2ResourceClaimConsumerReference()); } + public V1alpha2ResourceClaimConsumerReferenceBuilder(V1alpha2ResourceClaimConsumerReferenceFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimConsumerReferenceBuilder(V1alpha2ResourceClaimConsumerReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaimConsumerReference(), validationEnabled); + this(fluent, new V1alpha2ResourceClaimConsumerReference()); } + public V1alpha2ResourceClaimConsumerReferenceBuilder(V1alpha2ResourceClaimConsumerReferenceFluent fluent,V1alpha2ResourceClaimConsumerReference instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimConsumerReferenceBuilder(V1alpha2ResourceClaimConsumerReferenceFluent fluent,V1alpha2ResourceClaimConsumerReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroup(instance.getApiGroup()); - fluent.withName(instance.getName()); - fluent.withResource(instance.getResource()); - fluent.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimConsumerReferenceBuilder(V1alpha2ResourceClaimConsumerReference instance) { - this(instance,false); - } - public V1alpha2ResourceClaimConsumerReferenceBuilder(V1alpha2ResourceClaimConsumerReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withName(instance.getName()); - this.withResource(instance.getResource()); - this.withUid(instance.getUid()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimConsumerReferenceFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaimConsumerReference build() { V1alpha2ResourceClaimConsumerReference buildable = new V1alpha2ResourceClaimConsumerReference(); buildable.setApiGroup(fluent.getApiGroup()); @@ -52,4 +30,5 @@ public V1alpha2ResourceClaimConsumerReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceFluent.java index 4357758d99..f61eae3e11 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceFluent.java @@ -1,25 +1,114 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2ResourceClaimConsumerReferenceFluent> extends Fluent{ - public String getApiGroup(); - public A withApiGroup(String apiGroup); - public Boolean hasApiGroup(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getResource(); - public A withResource(String resource); - public Boolean hasResource(); - public String getUid(); - public A withUid(String uid); - public Boolean hasUid(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimConsumerReferenceFluent> extends BaseFluent{ + public V1alpha2ResourceClaimConsumerReferenceFluent() { + } + public V1alpha2ResourceClaimConsumerReferenceFluent(V1alpha2ResourceClaimConsumerReference instance) { + this.copyInstance(instance); + } + private String apiGroup; + private String name; + private String resource; + private String uid; + + protected void copyInstance(V1alpha2ResourceClaimConsumerReference instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaimConsumerReference()); + if (instance != null) { + this.withApiGroup(instance.getApiGroup()); + this.withName(instance.getName()); + this.withResource(instance.getResource()); + this.withUid(instance.getUid()); + } + } + + public String getApiGroup() { + return this.apiGroup; + } + + public A withApiGroup(String apiGroup) { + this.apiGroup = apiGroup; + return (A) this; + } + + public boolean hasApiGroup() { + return this.apiGroup != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getResource() { + return this.resource; + } + + public A withResource(String resource) { + this.resource = resource; + return (A) this; + } + + public boolean hasResource() { + return this.resource != null; + } + + public String getUid() { + return this.uid; + } + + public A withUid(String uid) { + this.uid = uid; + return (A) this; + } + + public boolean hasUid() { + return this.uid != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClaimConsumerReferenceFluent that = (V1alpha2ResourceClaimConsumerReferenceFluent) o; + if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(resource, that.resource)) return false; + if (!java.util.Objects.equals(uid, that.uid)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroup, name, resource, uid, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } + if (uid != null) { sb.append("uid:"); sb.append(uid); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceFluentImpl.java deleted file mode 100644 index 9830b1fc6a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimConsumerReferenceFluentImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimConsumerReferenceFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimConsumerReferenceFluent{ - public V1alpha2ResourceClaimConsumerReferenceFluentImpl() { - } - public V1alpha2ResourceClaimConsumerReferenceFluentImpl(V1alpha2ResourceClaimConsumerReference instance) { - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withName(instance.getName()); - this.withResource(instance.getResource()); - this.withUid(instance.getUid()); - } - } - private String apiGroup; - private String name; - private String resource; - private String uid; - public String getApiGroup() { - return this.apiGroup; - } - public A withApiGroup(String apiGroup) { - this.apiGroup=apiGroup; return (A) this; - } - public Boolean hasApiGroup() { - return this.apiGroup != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getResource() { - return this.resource; - } - public A withResource(String resource) { - this.resource=resource; return (A) this; - } - public Boolean hasResource() { - return this.resource != null; - } - public String getUid() { - return this.uid; - } - public A withUid(String uid) { - this.uid=uid; return (A) this; - } - public Boolean hasUid() { - return this.uid != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClaimConsumerReferenceFluentImpl that = (V1alpha2ResourceClaimConsumerReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(resource, that.resource)) return false; - - if (!java.util.Objects.equals(uid, that.uid)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroup, name, resource, uid, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } - if (uid != null) { sb.append("uid:"); sb.append(uid); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimFluent.java index 4bb10185a0..a6f6cb7ec3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha2ResourceClaimFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha2ResourceClaimFluent.MetadataNested withNewMetadata(); - public V1alpha2ResourceClaimFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha2ResourceClaimFluent.MetadataNested editMetadata(); - public V1alpha2ResourceClaimFluent.MetadataNested editOrNewMetadata(); - public V1alpha2ResourceClaimFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimSpec getSpec(); - public V1alpha2ResourceClaimSpec buildSpec(); - public A withSpec(V1alpha2ResourceClaimSpec spec); - public Boolean hasSpec(); - public V1alpha2ResourceClaimFluent.SpecNested withNewSpec(); - public V1alpha2ResourceClaimFluent.SpecNested withNewSpecLike(V1alpha2ResourceClaimSpec item); - public V1alpha2ResourceClaimFluent.SpecNested editSpec(); - public V1alpha2ResourceClaimFluent.SpecNested editOrNewSpec(); - public V1alpha2ResourceClaimFluent.SpecNested editOrNewSpecLike(V1alpha2ResourceClaimSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimStatus getStatus(); - public V1alpha2ResourceClaimStatus buildStatus(); - public A withStatus(V1alpha2ResourceClaimStatus status); - public Boolean hasStatus(); - public V1alpha2ResourceClaimFluent.StatusNested withNewStatus(); - public V1alpha2ResourceClaimFluent.StatusNested withNewStatusLike(V1alpha2ResourceClaimStatus item); - public V1alpha2ResourceClaimFluent.StatusNested editStatus(); - public V1alpha2ResourceClaimFluent.StatusNested editOrNewStatus(); - public V1alpha2ResourceClaimFluent.StatusNested editOrNewStatusLike(V1alpha2ResourceClaimStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimFluent> extends BaseFluent{ + public V1alpha2ResourceClaimFluent() { + } + + public V1alpha2ResourceClaimFluent(V1alpha2ResourceClaim instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha2ResourceClaimSpecBuilder spec; + private V1alpha2ResourceClaimStatusBuilder status; + + protected void copyInstance(V1alpha2ResourceClaim instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaim()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha2ResourceClaimSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1alpha2ResourceClaimSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1alpha2ResourceClaimSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1alpha2ResourceClaimSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1alpha2ResourceClaimSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1alpha2ResourceClaimSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1alpha2ResourceClaimSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1alpha2ResourceClaimStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1alpha2ResourceClaimStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1alpha2ResourceClaimStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1alpha2ResourceClaimStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1alpha2ResourceClaimStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1alpha2ResourceClaimStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClaimFluent that = (V1alpha2ResourceClaimFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1alpha2ResourceClaimStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1alpha2ResourceClaimSpecFluent> implements Nested{ + SpecNested(V1alpha2ResourceClaimSpec item) { + this.builder = new V1alpha2ResourceClaimSpecBuilder(this, item); + } + V1alpha2ResourceClaimSpecBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1alpha2ResourceClaimStatusFluent> implements Nested{ + StatusNested(V1alpha2ResourceClaimStatus item) { + this.builder = new V1alpha2ResourceClaimStatusBuilder(this, item); + } + V1alpha2ResourceClaimStatusBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimFluentImpl.java deleted file mode 100644 index 870d014376..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimFluent{ - public V1alpha2ResourceClaimFluentImpl() { - } - public V1alpha2ResourceClaimFluentImpl(V1alpha2ResourceClaim instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha2ResourceClaimSpecBuilder spec; - private V1alpha2ResourceClaimStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha2ResourceClaimFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha2ResourceClaimFluentImpl.MetadataNestedImpl(); - } - public V1alpha2ResourceClaimFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha2ResourceClaimFluentImpl.MetadataNestedImpl(item); - } - public V1alpha2ResourceClaimFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha2ResourceClaimFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha2ResourceClaimFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1alpha2ResourceClaimSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1alpha2ResourceClaimSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1alpha2ResourceClaimSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1alpha2ResourceClaimFluentImpl.SpecNested withNewSpec() { - return new V1alpha2ResourceClaimFluentImpl.SpecNestedImpl(); - } - public V1alpha2ResourceClaimFluentImpl.SpecNested withNewSpecLike(V1alpha2ResourceClaimSpec item) { - return new V1alpha2ResourceClaimFluentImpl.SpecNestedImpl(item); - } - public V1alpha2ResourceClaimFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1alpha2ResourceClaimFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1alpha2ResourceClaimSpecBuilder().build()); - } - public V1alpha2ResourceClaimFluentImpl.SpecNested editOrNewSpecLike(V1alpha2ResourceClaimSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1alpha2ResourceClaimStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1alpha2ResourceClaimStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1alpha2ResourceClaimStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1alpha2ResourceClaimFluentImpl.StatusNested withNewStatus() { - return new V1alpha2ResourceClaimFluentImpl.StatusNestedImpl(); - } - public V1alpha2ResourceClaimFluentImpl.StatusNested withNewStatusLike(V1alpha2ResourceClaimStatus item) { - return new V1alpha2ResourceClaimFluentImpl.StatusNestedImpl(item); - } - public V1alpha2ResourceClaimFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1alpha2ResourceClaimFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1alpha2ResourceClaimStatusBuilder().build()); - } - public V1alpha2ResourceClaimFluentImpl.StatusNested editOrNewStatusLike(V1alpha2ResourceClaimStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClaimFluentImpl that = (V1alpha2ResourceClaimFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha2ResourceClaimFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1alpha2ResourceClaimSpecFluentImpl> implements V1alpha2ResourceClaimFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1alpha2ResourceClaimSpec item) { - this.builder = new V1alpha2ResourceClaimSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1alpha2ResourceClaimSpecBuilder(this); - } - V1alpha2ResourceClaimSpecBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1alpha2ResourceClaimStatusFluentImpl> implements V1alpha2ResourceClaimFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1alpha2ResourceClaimStatus item) { - this.builder = new V1alpha2ResourceClaimStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1alpha2ResourceClaimStatusBuilder(this); - } - V1alpha2ResourceClaimStatusBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListBuilder.java index 794b4793e6..2ed3fe5e46 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimListBuilder extends V1alpha2ResourceClaimListFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimListBuilder extends V1alpha2ResourceClaimListFluent implements VisitableBuilder{ public V1alpha2ResourceClaimListBuilder() { - this(false); - } - public V1alpha2ResourceClaimListBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaimList(), validationEnabled); + this(new V1alpha2ResourceClaimList()); } + public V1alpha2ResourceClaimListBuilder(V1alpha2ResourceClaimListFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimListBuilder(V1alpha2ResourceClaimListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaimList(), validationEnabled); + this(fluent, new V1alpha2ResourceClaimList()); } + public V1alpha2ResourceClaimListBuilder(V1alpha2ResourceClaimListFluent fluent,V1alpha2ResourceClaimList instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimListBuilder(V1alpha2ResourceClaimListFluent fluent,V1alpha2ResourceClaimList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimListBuilder(V1alpha2ResourceClaimList instance) { - this(instance,false); - } - public V1alpha2ResourceClaimListBuilder(V1alpha2ResourceClaimList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimListFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaimList build() { V1alpha2ResourceClaimList buildable = new V1alpha2ResourceClaimList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListFluent.java index 40f5c28e7a..3147daa476 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2ResourceClaimListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha2ResourceClaim item); - public A setToItems(int index,V1alpha2ResourceClaim item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaim... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaim... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha2ResourceClaim buildItem(int index); - public V1alpha2ResourceClaim buildFirstItem(); - public V1alpha2ResourceClaim buildLastItem(); - public V1alpha2ResourceClaim buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaim... items); - public Boolean hasItems(); - public V1alpha2ResourceClaimListFluent.ItemsNested addNewItem(); - public V1alpha2ResourceClaimListFluent.ItemsNested addNewItemLike(V1alpha2ResourceClaim item); - public V1alpha2ResourceClaimListFluent.ItemsNested setNewItemLike(int index,V1alpha2ResourceClaim item); - public V1alpha2ResourceClaimListFluent.ItemsNested editItem(int index); - public V1alpha2ResourceClaimListFluent.ItemsNested editFirstItem(); - public V1alpha2ResourceClaimListFluent.ItemsNested editLastItem(); - public V1alpha2ResourceClaimListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha2ResourceClaimListFluent.MetadataNested withNewMetadata(); - public V1alpha2ResourceClaimListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha2ResourceClaimListFluent.MetadataNested editMetadata(); - public V1alpha2ResourceClaimListFluent.MetadataNested editOrNewMetadata(); - public V1alpha2ResourceClaimListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha2ResourceClaimFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimListFluent> extends BaseFluent{ + public V1alpha2ResourceClaimListFluent() { + } + + public V1alpha2ResourceClaimListFluent(V1alpha2ResourceClaimList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha2ResourceClaimList instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaimList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha2ResourceClaim item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha2ResourceClaim item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaim... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha2ResourceClaim item : items) {V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha2ResourceClaim item : items) {V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaim... items) { + if (this.items == null) return (A)this; + for (V1alpha2ResourceClaim item : items) {V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha2ResourceClaim item : items) {V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha2ResourceClaimBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha2ResourceClaim buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha2ResourceClaim buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha2ResourceClaim buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha2ResourceClaim buildMatchingItem(Predicate predicate) { + for (V1alpha2ResourceClaimBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha2ResourceClaimBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha2ResourceClaim item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaim... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha2ResourceClaim item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha2ResourceClaim item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha2ResourceClaim item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClaimListFluent that = (V1alpha2ResourceClaimListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha2ResourceClaimFluent> implements Nested{ + ItemsNested(int index,V1alpha2ResourceClaim item) { + this.index = index; + this.builder = new V1alpha2ResourceClaimBuilder(this, item); + } + V1alpha2ResourceClaimBuilder builder; + int index; + public N and() { + return (N) V1alpha2ResourceClaimListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListFluentImpl.java deleted file mode 100644 index 81857c836d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimListFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimListFluent{ - public V1alpha2ResourceClaimListFluentImpl() { - } - public V1alpha2ResourceClaimListFluentImpl(V1alpha2ResourceClaimList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha2ResourceClaim item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha2ResourceClaim item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaim... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha2ResourceClaim item : items) {V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha2ResourceClaim item : items) {V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaim... items) { - for (V1alpha2ResourceClaim item : items) {V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha2ResourceClaim item : items) {V1alpha2ResourceClaimBuilder builder = new V1alpha2ResourceClaimBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha2ResourceClaimBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha2ResourceClaim buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha2ResourceClaim buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha2ResourceClaim buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha2ResourceClaim buildMatchingItem(Predicate predicate) { - for (V1alpha2ResourceClaimBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha2ResourceClaimBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha2ResourceClaim item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaim... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha2ResourceClaim item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha2ResourceClaimListFluentImpl.ItemsNested addNewItem() { - return new V1alpha2ResourceClaimListFluentImpl.ItemsNestedImpl(); - } - public V1alpha2ResourceClaimListFluentImpl.ItemsNested addNewItemLike(V1alpha2ResourceClaim item) { - return new V1alpha2ResourceClaimListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha2ResourceClaimListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha2ResourceClaim item) { - return new V1alpha2ResourceClaimListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha2ResourceClaimListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha2ResourceClaimListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha2ResourceClaimListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha2ResourceClaimListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha2ResourceClaimListFluentImpl.MetadataNestedImpl(); - } - public V1alpha2ResourceClaimListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha2ResourceClaimListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha2ResourceClaimListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha2ResourceClaimListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha2ResourceClaimListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClaimListFluentImpl that = (V1alpha2ResourceClaimListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha2ResourceClaimFluentImpl> implements V1alpha2ResourceClaimListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha2ResourceClaim item) { - this.index = index; - this.builder = new V1alpha2ResourceClaimBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha2ResourceClaimBuilder(this); - } - V1alpha2ResourceClaimBuilder builder; - int index; - public N and() { - return (N) V1alpha2ResourceClaimListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha2ResourceClaimListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceBuilder.java index da660dedd1..d8657bdf18 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimParametersReferenceBuilder extends V1alpha2ResourceClaimParametersReferenceFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimParametersReferenceBuilder extends V1alpha2ResourceClaimParametersReferenceFluent implements VisitableBuilder{ public V1alpha2ResourceClaimParametersReferenceBuilder() { - this(false); - } - public V1alpha2ResourceClaimParametersReferenceBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaimParametersReference(), validationEnabled); + this(new V1alpha2ResourceClaimParametersReference()); } + public V1alpha2ResourceClaimParametersReferenceBuilder(V1alpha2ResourceClaimParametersReferenceFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimParametersReferenceBuilder(V1alpha2ResourceClaimParametersReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaimParametersReference(), validationEnabled); + this(fluent, new V1alpha2ResourceClaimParametersReference()); } + public V1alpha2ResourceClaimParametersReferenceBuilder(V1alpha2ResourceClaimParametersReferenceFluent fluent,V1alpha2ResourceClaimParametersReference instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimParametersReferenceBuilder(V1alpha2ResourceClaimParametersReferenceFluent fluent,V1alpha2ResourceClaimParametersReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroup(instance.getApiGroup()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimParametersReferenceBuilder(V1alpha2ResourceClaimParametersReference instance) { - this(instance,false); - } - public V1alpha2ResourceClaimParametersReferenceBuilder(V1alpha2ResourceClaimParametersReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimParametersReferenceFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaimParametersReference build() { V1alpha2ResourceClaimParametersReference buildable = new V1alpha2ResourceClaimParametersReference(); buildable.setApiGroup(fluent.getApiGroup()); @@ -49,4 +29,5 @@ public V1alpha2ResourceClaimParametersReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceFluent.java index b2688665f7..b3c59c47c5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceFluent.java @@ -1,22 +1,97 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2ResourceClaimParametersReferenceFluent> extends Fluent{ - public String getApiGroup(); - public A withApiGroup(String apiGroup); - public Boolean hasApiGroup(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimParametersReferenceFluent> extends BaseFluent{ + public V1alpha2ResourceClaimParametersReferenceFluent() { + } + public V1alpha2ResourceClaimParametersReferenceFluent(V1alpha2ResourceClaimParametersReference instance) { + this.copyInstance(instance); + } + private String apiGroup; + private String kind; + private String name; + + protected void copyInstance(V1alpha2ResourceClaimParametersReference instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaimParametersReference()); + if (instance != null) { + this.withApiGroup(instance.getApiGroup()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + } + } + + public String getApiGroup() { + return this.apiGroup; + } + + public A withApiGroup(String apiGroup) { + this.apiGroup = apiGroup; + return (A) this; + } + + public boolean hasApiGroup() { + return this.apiGroup != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClaimParametersReferenceFluent that = (V1alpha2ResourceClaimParametersReferenceFluent) o; + if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroup, kind, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceFluentImpl.java deleted file mode 100644 index babe223e5a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimParametersReferenceFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimParametersReferenceFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimParametersReferenceFluent{ - public V1alpha2ResourceClaimParametersReferenceFluentImpl() { - } - public V1alpha2ResourceClaimParametersReferenceFluentImpl(V1alpha2ResourceClaimParametersReference instance) { - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - } - private String apiGroup; - private String kind; - private String name; - public String getApiGroup() { - return this.apiGroup; - } - public A withApiGroup(String apiGroup) { - this.apiGroup=apiGroup; return (A) this; - } - public Boolean hasApiGroup() { - return this.apiGroup != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClaimParametersReferenceFluentImpl that = (V1alpha2ResourceClaimParametersReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroup, kind, name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusBuilder.java index c19088cf4d..ce51e9ced7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimSchedulingStatusBuilder extends V1alpha2ResourceClaimSchedulingStatusFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimSchedulingStatusBuilder extends V1alpha2ResourceClaimSchedulingStatusFluent implements VisitableBuilder{ public V1alpha2ResourceClaimSchedulingStatusBuilder() { - this(false); - } - public V1alpha2ResourceClaimSchedulingStatusBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaimSchedulingStatus(), validationEnabled); + this(new V1alpha2ResourceClaimSchedulingStatus()); } + public V1alpha2ResourceClaimSchedulingStatusBuilder(V1alpha2ResourceClaimSchedulingStatusFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimSchedulingStatusBuilder(V1alpha2ResourceClaimSchedulingStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaimSchedulingStatus(), validationEnabled); + this(fluent, new V1alpha2ResourceClaimSchedulingStatus()); } + public V1alpha2ResourceClaimSchedulingStatusBuilder(V1alpha2ResourceClaimSchedulingStatusFluent fluent,V1alpha2ResourceClaimSchedulingStatus instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimSchedulingStatusBuilder(V1alpha2ResourceClaimSchedulingStatusFluent fluent,V1alpha2ResourceClaimSchedulingStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withUnsuitableNodes(instance.getUnsuitableNodes()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimSchedulingStatusBuilder(V1alpha2ResourceClaimSchedulingStatus instance) { - this(instance,false); - } - public V1alpha2ResourceClaimSchedulingStatusBuilder(V1alpha2ResourceClaimSchedulingStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withUnsuitableNodes(instance.getUnsuitableNodes()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimSchedulingStatusFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaimSchedulingStatus build() { V1alpha2ResourceClaimSchedulingStatus buildable = new V1alpha2ResourceClaimSchedulingStatus(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1alpha2ResourceClaimSchedulingStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusFluent.java index ca4e01c51b..f77117ad1e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusFluent.java @@ -1,35 +1,165 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1alpha2ResourceClaimSchedulingStatusFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public A addToUnsuitableNodes(int index,String item); - public A setToUnsuitableNodes(int index,String item); - public A addToUnsuitableNodes(java.lang.String... items); - public A addAllToUnsuitableNodes(Collection items); - public A removeFromUnsuitableNodes(java.lang.String... items); - public A removeAllFromUnsuitableNodes(Collection items); - public List getUnsuitableNodes(); - public String getUnsuitableNode(int index); - public String getFirstUnsuitableNode(); - public String getLastUnsuitableNode(); - public String getMatchingUnsuitableNode(Predicate predicate); - public Boolean hasMatchingUnsuitableNode(Predicate predicate); - public A withUnsuitableNodes(List unsuitableNodes); - public A withUnsuitableNodes(java.lang.String... unsuitableNodes); - public Boolean hasUnsuitableNodes(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimSchedulingStatusFluent> extends BaseFluent{ + public V1alpha2ResourceClaimSchedulingStatusFluent() { + } + public V1alpha2ResourceClaimSchedulingStatusFluent(V1alpha2ResourceClaimSchedulingStatus instance) { + this.copyInstance(instance); + } + private String name; + private List unsuitableNodes; + + protected void copyInstance(V1alpha2ResourceClaimSchedulingStatus instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaimSchedulingStatus()); + if (instance != null) { + this.withName(instance.getName()); + this.withUnsuitableNodes(instance.getUnsuitableNodes()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public A addToUnsuitableNodes(int index,String item) { + if (this.unsuitableNodes == null) {this.unsuitableNodes = new ArrayList();} + this.unsuitableNodes.add(index, item); + return (A)this; + } + + public A setToUnsuitableNodes(int index,String item) { + if (this.unsuitableNodes == null) {this.unsuitableNodes = new ArrayList();} + this.unsuitableNodes.set(index, item); return (A)this; + } + + public A addToUnsuitableNodes(java.lang.String... items) { + if (this.unsuitableNodes == null) {this.unsuitableNodes = new ArrayList();} + for (String item : items) {this.unsuitableNodes.add(item);} return (A)this; + } + + public A addAllToUnsuitableNodes(Collection items) { + if (this.unsuitableNodes == null) {this.unsuitableNodes = new ArrayList();} + for (String item : items) {this.unsuitableNodes.add(item);} return (A)this; + } + + public A removeFromUnsuitableNodes(java.lang.String... items) { + if (this.unsuitableNodes == null) return (A)this; + for (String item : items) { this.unsuitableNodes.remove(item);} return (A)this; + } + + public A removeAllFromUnsuitableNodes(Collection items) { + if (this.unsuitableNodes == null) return (A)this; + for (String item : items) { this.unsuitableNodes.remove(item);} return (A)this; + } + + public List getUnsuitableNodes() { + return this.unsuitableNodes; + } + + public String getUnsuitableNode(int index) { + return this.unsuitableNodes.get(index); + } + + public String getFirstUnsuitableNode() { + return this.unsuitableNodes.get(0); + } + + public String getLastUnsuitableNode() { + return this.unsuitableNodes.get(unsuitableNodes.size() - 1); + } + + public String getMatchingUnsuitableNode(Predicate predicate) { + for (String item : unsuitableNodes) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingUnsuitableNode(Predicate predicate) { + for (String item : unsuitableNodes) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withUnsuitableNodes(List unsuitableNodes) { + if (unsuitableNodes != null) { + this.unsuitableNodes = new ArrayList(); + for (String item : unsuitableNodes) { + this.addToUnsuitableNodes(item); + } + } else { + this.unsuitableNodes = null; + } + return (A) this; + } + + public A withUnsuitableNodes(java.lang.String... unsuitableNodes) { + if (this.unsuitableNodes != null) { + this.unsuitableNodes.clear(); + _visitables.remove("unsuitableNodes"); + } + if (unsuitableNodes != null) { + for (String item : unsuitableNodes) { + this.addToUnsuitableNodes(item); + } + } + return (A) this; + } + + public boolean hasUnsuitableNodes() { + return this.unsuitableNodes != null && !this.unsuitableNodes.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClaimSchedulingStatusFluent that = (V1alpha2ResourceClaimSchedulingStatusFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(unsuitableNodes, that.unsuitableNodes)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, unsuitableNodes, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (unsuitableNodes != null && !unsuitableNodes.isEmpty()) { sb.append("unsuitableNodes:"); sb.append(unsuitableNodes); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusFluentImpl.java deleted file mode 100644 index 883fe53161..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSchedulingStatusFluentImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimSchedulingStatusFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimSchedulingStatusFluent{ - public V1alpha2ResourceClaimSchedulingStatusFluentImpl() { - } - public V1alpha2ResourceClaimSchedulingStatusFluentImpl(V1alpha2ResourceClaimSchedulingStatus instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withUnsuitableNodes(instance.getUnsuitableNodes()); - } - } - private String name; - private List unsuitableNodes; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public A addToUnsuitableNodes(int index,String item) { - if (this.unsuitableNodes == null) {this.unsuitableNodes = new ArrayList();} - this.unsuitableNodes.add(index, item); - return (A)this; - } - public A setToUnsuitableNodes(int index,String item) { - if (this.unsuitableNodes == null) {this.unsuitableNodes = new ArrayList();} - this.unsuitableNodes.set(index, item); return (A)this; - } - public A addToUnsuitableNodes(java.lang.String... items) { - if (this.unsuitableNodes == null) {this.unsuitableNodes = new ArrayList();} - for (String item : items) {this.unsuitableNodes.add(item);} return (A)this; - } - public A addAllToUnsuitableNodes(Collection items) { - if (this.unsuitableNodes == null) {this.unsuitableNodes = new ArrayList();} - for (String item : items) {this.unsuitableNodes.add(item);} return (A)this; - } - public A removeFromUnsuitableNodes(java.lang.String... items) { - for (String item : items) {if (this.unsuitableNodes!= null){ this.unsuitableNodes.remove(item);}} return (A)this; - } - public A removeAllFromUnsuitableNodes(Collection items) { - for (String item : items) {if (this.unsuitableNodes!= null){ this.unsuitableNodes.remove(item);}} return (A)this; - } - public List getUnsuitableNodes() { - return this.unsuitableNodes; - } - public String getUnsuitableNode(int index) { - return this.unsuitableNodes.get(index); - } - public String getFirstUnsuitableNode() { - return this.unsuitableNodes.get(0); - } - public String getLastUnsuitableNode() { - return this.unsuitableNodes.get(unsuitableNodes.size() - 1); - } - public String getMatchingUnsuitableNode(Predicate predicate) { - for (String item: unsuitableNodes) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingUnsuitableNode(Predicate predicate) { - for (String item: unsuitableNodes) { if(predicate.test(item)){ return true;} } return false; - } - public A withUnsuitableNodes(List unsuitableNodes) { - if (unsuitableNodes != null) {this.unsuitableNodes = new ArrayList(); for (String item : unsuitableNodes){this.addToUnsuitableNodes(item);}} else { this.unsuitableNodes = null;} return (A) this; - } - public A withUnsuitableNodes(java.lang.String... unsuitableNodes) { - if (this.unsuitableNodes != null) {this.unsuitableNodes.clear(); _visitables.remove("unsuitableNodes"); } - if (unsuitableNodes != null) {for (String item :unsuitableNodes){ this.addToUnsuitableNodes(item);}} return (A) this; - } - public Boolean hasUnsuitableNodes() { - return unsuitableNodes != null && !unsuitableNodes.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClaimSchedulingStatusFluentImpl that = (V1alpha2ResourceClaimSchedulingStatusFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(unsuitableNodes, that.unsuitableNodes)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, unsuitableNodes, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (unsuitableNodes != null && !unsuitableNodes.isEmpty()) { sb.append("unsuitableNodes:"); sb.append(unsuitableNodes); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecBuilder.java index 78d8bed714..869f3c9ac4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimSpecBuilder extends V1alpha2ResourceClaimSpecFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimSpecBuilder extends V1alpha2ResourceClaimSpecFluent implements VisitableBuilder{ public V1alpha2ResourceClaimSpecBuilder() { - this(false); - } - public V1alpha2ResourceClaimSpecBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaimSpec(), validationEnabled); + this(new V1alpha2ResourceClaimSpec()); } + public V1alpha2ResourceClaimSpecBuilder(V1alpha2ResourceClaimSpecFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimSpecBuilder(V1alpha2ResourceClaimSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaimSpec(), validationEnabled); + this(fluent, new V1alpha2ResourceClaimSpec()); } + public V1alpha2ResourceClaimSpecBuilder(V1alpha2ResourceClaimSpecFluent fluent,V1alpha2ResourceClaimSpec instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimSpecBuilder(V1alpha2ResourceClaimSpecFluent fluent,V1alpha2ResourceClaimSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAllocationMode(instance.getAllocationMode()); - fluent.withParametersRef(instance.getParametersRef()); - fluent.withResourceClassName(instance.getResourceClassName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimSpecBuilder(V1alpha2ResourceClaimSpec instance) { - this(instance,false); - } - public V1alpha2ResourceClaimSpecBuilder(V1alpha2ResourceClaimSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAllocationMode(instance.getAllocationMode()); - this.withParametersRef(instance.getParametersRef()); - this.withResourceClassName(instance.getResourceClassName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimSpecFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaimSpec build() { V1alpha2ResourceClaimSpec buildable = new V1alpha2ResourceClaimSpec(); buildable.setAllocationMode(fluent.getAllocationMode()); - buildable.setParametersRef(fluent.getParametersRef()); + buildable.setParametersRef(fluent.buildParametersRef()); buildable.setResourceClassName(fluent.getResourceClassName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecFluent.java index 8008070c6e..a9de468c08 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecFluent.java @@ -1,41 +1,140 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2ResourceClaimSpecFluent> extends Fluent{ - public String getAllocationMode(); - public A withAllocationMode(String allocationMode); - public Boolean hasAllocationMode(); - - /** - * This method has been deprecated, please use method buildParametersRef instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimParametersReference getParametersRef(); - public V1alpha2ResourceClaimParametersReference buildParametersRef(); - public A withParametersRef(V1alpha2ResourceClaimParametersReference parametersRef); - public Boolean hasParametersRef(); - public V1alpha2ResourceClaimSpecFluent.ParametersRefNested withNewParametersRef(); - public V1alpha2ResourceClaimSpecFluent.ParametersRefNested withNewParametersRefLike(V1alpha2ResourceClaimParametersReference item); - public V1alpha2ResourceClaimSpecFluent.ParametersRefNested editParametersRef(); - public V1alpha2ResourceClaimSpecFluent.ParametersRefNested editOrNewParametersRef(); - public V1alpha2ResourceClaimSpecFluent.ParametersRefNested editOrNewParametersRefLike(V1alpha2ResourceClaimParametersReference item); - public String getResourceClassName(); - public A withResourceClassName(String resourceClassName); - public Boolean hasResourceClassName(); - public interface ParametersRefNested extends Nested,V1alpha2ResourceClaimParametersReferenceFluent>{ - public N and(); - public N endParametersRef(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimSpecFluent> extends BaseFluent{ + public V1alpha2ResourceClaimSpecFluent() { + } + + public V1alpha2ResourceClaimSpecFluent(V1alpha2ResourceClaimSpec instance) { + this.copyInstance(instance); + } + private String allocationMode; + private V1alpha2ResourceClaimParametersReferenceBuilder parametersRef; + private String resourceClassName; + + protected void copyInstance(V1alpha2ResourceClaimSpec instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaimSpec()); + if (instance != null) { + this.withAllocationMode(instance.getAllocationMode()); + this.withParametersRef(instance.getParametersRef()); + this.withResourceClassName(instance.getResourceClassName()); + } + } + + public String getAllocationMode() { + return this.allocationMode; + } + + public A withAllocationMode(String allocationMode) { + this.allocationMode = allocationMode; + return (A) this; + } + + public boolean hasAllocationMode() { + return this.allocationMode != null; + } + + public V1alpha2ResourceClaimParametersReference buildParametersRef() { + return this.parametersRef != null ? this.parametersRef.build() : null; + } + + public A withParametersRef(V1alpha2ResourceClaimParametersReference parametersRef) { + this._visitables.remove("parametersRef"); + if (parametersRef != null) { + this.parametersRef = new V1alpha2ResourceClaimParametersReferenceBuilder(parametersRef); + this._visitables.get("parametersRef").add(this.parametersRef); + } else { + this.parametersRef = null; + this._visitables.get("parametersRef").remove(this.parametersRef); + } + return (A) this; + } + + public boolean hasParametersRef() { + return this.parametersRef != null; + } + + public ParametersRefNested withNewParametersRef() { + return new ParametersRefNested(null); + } + + public ParametersRefNested withNewParametersRefLike(V1alpha2ResourceClaimParametersReference item) { + return new ParametersRefNested(item); + } + + public ParametersRefNested editParametersRef() { + return withNewParametersRefLike(java.util.Optional.ofNullable(buildParametersRef()).orElse(null)); + } + + public ParametersRefNested editOrNewParametersRef() { + return withNewParametersRefLike(java.util.Optional.ofNullable(buildParametersRef()).orElse(new V1alpha2ResourceClaimParametersReferenceBuilder().build())); + } + + public ParametersRefNested editOrNewParametersRefLike(V1alpha2ResourceClaimParametersReference item) { + return withNewParametersRefLike(java.util.Optional.ofNullable(buildParametersRef()).orElse(item)); + } + + public String getResourceClassName() { + return this.resourceClassName; + } + + public A withResourceClassName(String resourceClassName) { + this.resourceClassName = resourceClassName; + return (A) this; + } + + public boolean hasResourceClassName() { + return this.resourceClassName != null; } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClaimSpecFluent that = (V1alpha2ResourceClaimSpecFluent) o; + if (!java.util.Objects.equals(allocationMode, that.allocationMode)) return false; + if (!java.util.Objects.equals(parametersRef, that.parametersRef)) return false; + if (!java.util.Objects.equals(resourceClassName, that.resourceClassName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(allocationMode, parametersRef, resourceClassName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (allocationMode != null) { sb.append("allocationMode:"); sb.append(allocationMode + ","); } + if (parametersRef != null) { sb.append("parametersRef:"); sb.append(parametersRef + ","); } + if (resourceClassName != null) { sb.append("resourceClassName:"); sb.append(resourceClassName); } + sb.append("}"); + return sb.toString(); + } + public class ParametersRefNested extends V1alpha2ResourceClaimParametersReferenceFluent> implements Nested{ + ParametersRefNested(V1alpha2ResourceClaimParametersReference item) { + this.builder = new V1alpha2ResourceClaimParametersReferenceBuilder(this, item); + } + V1alpha2ResourceClaimParametersReferenceBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimSpecFluent.this.withParametersRef(builder.build()); + } + + public N endParametersRef() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecFluentImpl.java deleted file mode 100644 index 0f07ecf020..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimSpecFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimSpecFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimSpecFluent{ - public V1alpha2ResourceClaimSpecFluentImpl() { - } - public V1alpha2ResourceClaimSpecFluentImpl(V1alpha2ResourceClaimSpec instance) { - if (instance != null) { - this.withAllocationMode(instance.getAllocationMode()); - this.withParametersRef(instance.getParametersRef()); - this.withResourceClassName(instance.getResourceClassName()); - } - } - private String allocationMode; - private V1alpha2ResourceClaimParametersReferenceBuilder parametersRef; - private String resourceClassName; - public String getAllocationMode() { - return this.allocationMode; - } - public A withAllocationMode(String allocationMode) { - this.allocationMode=allocationMode; return (A) this; - } - public Boolean hasAllocationMode() { - return this.allocationMode != null; - } - - /** - * This method has been deprecated, please use method buildParametersRef instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimParametersReference getParametersRef() { - return this.parametersRef!=null ?this.parametersRef.build():null; - } - public V1alpha2ResourceClaimParametersReference buildParametersRef() { - return this.parametersRef!=null ?this.parametersRef.build():null; - } - public A withParametersRef(V1alpha2ResourceClaimParametersReference parametersRef) { - _visitables.get("parametersRef").remove(this.parametersRef); - if (parametersRef!=null){ this.parametersRef= new V1alpha2ResourceClaimParametersReferenceBuilder(parametersRef); _visitables.get("parametersRef").add(this.parametersRef);} else { this.parametersRef = null; _visitables.get("parametersRef").remove(this.parametersRef); } return (A) this; - } - public Boolean hasParametersRef() { - return this.parametersRef != null; - } - public V1alpha2ResourceClaimSpecFluentImpl.ParametersRefNested withNewParametersRef() { - return new V1alpha2ResourceClaimSpecFluentImpl.ParametersRefNestedImpl(); - } - public V1alpha2ResourceClaimSpecFluentImpl.ParametersRefNested withNewParametersRefLike(V1alpha2ResourceClaimParametersReference item) { - return new V1alpha2ResourceClaimSpecFluentImpl.ParametersRefNestedImpl(item); - } - public V1alpha2ResourceClaimSpecFluentImpl.ParametersRefNested editParametersRef() { - return withNewParametersRefLike(getParametersRef()); - } - public V1alpha2ResourceClaimSpecFluentImpl.ParametersRefNested editOrNewParametersRef() { - return withNewParametersRefLike(getParametersRef() != null ? getParametersRef(): new V1alpha2ResourceClaimParametersReferenceBuilder().build()); - } - public V1alpha2ResourceClaimSpecFluentImpl.ParametersRefNested editOrNewParametersRefLike(V1alpha2ResourceClaimParametersReference item) { - return withNewParametersRefLike(getParametersRef() != null ? getParametersRef(): item); - } - public String getResourceClassName() { - return this.resourceClassName; - } - public A withResourceClassName(String resourceClassName) { - this.resourceClassName=resourceClassName; return (A) this; - } - public Boolean hasResourceClassName() { - return this.resourceClassName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClaimSpecFluentImpl that = (V1alpha2ResourceClaimSpecFluentImpl) o; - if (!java.util.Objects.equals(allocationMode, that.allocationMode)) return false; - - if (!java.util.Objects.equals(parametersRef, that.parametersRef)) return false; - - if (!java.util.Objects.equals(resourceClassName, that.resourceClassName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(allocationMode, parametersRef, resourceClassName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (allocationMode != null) { sb.append("allocationMode:"); sb.append(allocationMode + ","); } - if (parametersRef != null) { sb.append("parametersRef:"); sb.append(parametersRef + ","); } - if (resourceClassName != null) { sb.append("resourceClassName:"); sb.append(resourceClassName); } - sb.append("}"); - return sb.toString(); - } - class ParametersRefNestedImpl extends V1alpha2ResourceClaimParametersReferenceFluentImpl> implements V1alpha2ResourceClaimSpecFluentImpl.ParametersRefNested,Nested{ - ParametersRefNestedImpl(V1alpha2ResourceClaimParametersReference item) { - this.builder = new V1alpha2ResourceClaimParametersReferenceBuilder(this, item); - } - ParametersRefNestedImpl() { - this.builder = new V1alpha2ResourceClaimParametersReferenceBuilder(this); - } - V1alpha2ResourceClaimParametersReferenceBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimSpecFluentImpl.this.withParametersRef(builder.build()); - } - public N endParametersRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusBuilder.java index 544d2611de..7cb3c0b64e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimStatusBuilder extends V1alpha2ResourceClaimStatusFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimStatusBuilder extends V1alpha2ResourceClaimStatusFluent implements VisitableBuilder{ public V1alpha2ResourceClaimStatusBuilder() { - this(false); - } - public V1alpha2ResourceClaimStatusBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaimStatus(), validationEnabled); + this(new V1alpha2ResourceClaimStatus()); } + public V1alpha2ResourceClaimStatusBuilder(V1alpha2ResourceClaimStatusFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimStatusBuilder(V1alpha2ResourceClaimStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaimStatus(), validationEnabled); + this(fluent, new V1alpha2ResourceClaimStatus()); } + public V1alpha2ResourceClaimStatusBuilder(V1alpha2ResourceClaimStatusFluent fluent,V1alpha2ResourceClaimStatus instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimStatusBuilder(V1alpha2ResourceClaimStatusFluent fluent,V1alpha2ResourceClaimStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAllocation(instance.getAllocation()); - fluent.withDeallocationRequested(instance.getDeallocationRequested()); - fluent.withDriverName(instance.getDriverName()); - fluent.withReservedFor(instance.getReservedFor()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimStatusBuilder(V1alpha2ResourceClaimStatus instance) { - this(instance,false); - } - public V1alpha2ResourceClaimStatusBuilder(V1alpha2ResourceClaimStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAllocation(instance.getAllocation()); - this.withDeallocationRequested(instance.getDeallocationRequested()); - this.withDriverName(instance.getDriverName()); - this.withReservedFor(instance.getReservedFor()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimStatusFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaimStatus build() { V1alpha2ResourceClaimStatus buildable = new V1alpha2ResourceClaimStatus(); - buildable.setAllocation(fluent.getAllocation()); + buildable.setAllocation(fluent.buildAllocation()); buildable.setDeallocationRequested(fluent.getDeallocationRequested()); buildable.setDriverName(fluent.getDriverName()); - buildable.setReservedFor(fluent.getReservedFor()); + buildable.setReservedFor(fluent.buildReservedFor()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusFluent.java index 4a36a118a9..cd8ce58d52 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusFluent.java @@ -1,83 +1,324 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2ResourceClaimStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildAllocation instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2AllocationResult getAllocation(); - public V1alpha2AllocationResult buildAllocation(); - public A withAllocation(V1alpha2AllocationResult allocation); - public Boolean hasAllocation(); - public V1alpha2ResourceClaimStatusFluent.AllocationNested withNewAllocation(); - public V1alpha2ResourceClaimStatusFluent.AllocationNested withNewAllocationLike(V1alpha2AllocationResult item); - public V1alpha2ResourceClaimStatusFluent.AllocationNested editAllocation(); - public V1alpha2ResourceClaimStatusFluent.AllocationNested editOrNewAllocation(); - public V1alpha2ResourceClaimStatusFluent.AllocationNested editOrNewAllocationLike(V1alpha2AllocationResult item); - public Boolean getDeallocationRequested(); - public A withDeallocationRequested(Boolean deallocationRequested); - public Boolean hasDeallocationRequested(); - public String getDriverName(); - public A withDriverName(String driverName); - public Boolean hasDriverName(); - public A addToReservedFor(int index,V1alpha2ResourceClaimConsumerReference item); - public A setToReservedFor(int index,V1alpha2ResourceClaimConsumerReference item); - public A addToReservedFor(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference... items); - public A addAllToReservedFor(Collection items); - public A removeFromReservedFor(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference... items); - public A removeAllFromReservedFor(Collection items); - public A removeMatchingFromReservedFor(Predicate predicate); - - /** - * This method has been deprecated, please use method buildReservedFor instead. - * @return The buildable object. - */ - @Deprecated - public List getReservedFor(); - public List buildReservedFor(); - public V1alpha2ResourceClaimConsumerReference buildReservedFor(int index); - public V1alpha2ResourceClaimConsumerReference buildFirstReservedFor(); - public V1alpha2ResourceClaimConsumerReference buildLastReservedFor(); - public V1alpha2ResourceClaimConsumerReference buildMatchingReservedFor(Predicate predicate); - public Boolean hasMatchingReservedFor(Predicate predicate); - public A withReservedFor(List reservedFor); - public A withReservedFor(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference... reservedFor); - public Boolean hasReservedFor(); - public V1alpha2ResourceClaimStatusFluent.ReservedForNested addNewReservedFor(); - public V1alpha2ResourceClaimStatusFluent.ReservedForNested addNewReservedForLike(V1alpha2ResourceClaimConsumerReference item); - public V1alpha2ResourceClaimStatusFluent.ReservedForNested setNewReservedForLike(int index,V1alpha2ResourceClaimConsumerReference item); - public V1alpha2ResourceClaimStatusFluent.ReservedForNested editReservedFor(int index); - public V1alpha2ResourceClaimStatusFluent.ReservedForNested editFirstReservedFor(); - public V1alpha2ResourceClaimStatusFluent.ReservedForNested editLastReservedFor(); - public V1alpha2ResourceClaimStatusFluent.ReservedForNested editMatchingReservedFor(Predicate predicate); - public A withDeallocationRequested(); - public interface AllocationNested extends Nested,V1alpha2AllocationResultFluent>{ - public N and(); - public N endAllocation(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimStatusFluent> extends BaseFluent{ + public V1alpha2ResourceClaimStatusFluent() { + } + + public V1alpha2ResourceClaimStatusFluent(V1alpha2ResourceClaimStatus instance) { + this.copyInstance(instance); + } + private V1alpha2AllocationResultBuilder allocation; + private Boolean deallocationRequested; + private String driverName; + private ArrayList reservedFor; + + protected void copyInstance(V1alpha2ResourceClaimStatus instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaimStatus()); + if (instance != null) { + this.withAllocation(instance.getAllocation()); + this.withDeallocationRequested(instance.getDeallocationRequested()); + this.withDriverName(instance.getDriverName()); + this.withReservedFor(instance.getReservedFor()); + } + } + + public V1alpha2AllocationResult buildAllocation() { + return this.allocation != null ? this.allocation.build() : null; + } + + public A withAllocation(V1alpha2AllocationResult allocation) { + this._visitables.remove("allocation"); + if (allocation != null) { + this.allocation = new V1alpha2AllocationResultBuilder(allocation); + this._visitables.get("allocation").add(this.allocation); + } else { + this.allocation = null; + this._visitables.get("allocation").remove(this.allocation); + } + return (A) this; + } + + public boolean hasAllocation() { + return this.allocation != null; + } + + public AllocationNested withNewAllocation() { + return new AllocationNested(null); + } + + public AllocationNested withNewAllocationLike(V1alpha2AllocationResult item) { + return new AllocationNested(item); + } + + public AllocationNested editAllocation() { + return withNewAllocationLike(java.util.Optional.ofNullable(buildAllocation()).orElse(null)); + } + + public AllocationNested editOrNewAllocation() { + return withNewAllocationLike(java.util.Optional.ofNullable(buildAllocation()).orElse(new V1alpha2AllocationResultBuilder().build())); + } + + public AllocationNested editOrNewAllocationLike(V1alpha2AllocationResult item) { + return withNewAllocationLike(java.util.Optional.ofNullable(buildAllocation()).orElse(item)); + } + + public Boolean getDeallocationRequested() { + return this.deallocationRequested; + } + + public A withDeallocationRequested(Boolean deallocationRequested) { + this.deallocationRequested = deallocationRequested; + return (A) this; + } + + public boolean hasDeallocationRequested() { + return this.deallocationRequested != null; + } + + public String getDriverName() { + return this.driverName; + } + + public A withDriverName(String driverName) { + this.driverName = driverName; + return (A) this; + } + + public boolean hasDriverName() { + return this.driverName != null; + } + + public A addToReservedFor(int index,V1alpha2ResourceClaimConsumerReference item) { + if (this.reservedFor == null) {this.reservedFor = new ArrayList();} + V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item); + if (index < 0 || index >= reservedFor.size()) { _visitables.get("reservedFor").add(builder); reservedFor.add(builder); } else { _visitables.get("reservedFor").add(index, builder); reservedFor.add(index, builder);} + return (A)this; + } + + public A setToReservedFor(int index,V1alpha2ResourceClaimConsumerReference item) { + if (this.reservedFor == null) {this.reservedFor = new ArrayList();} + V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item); + if (index < 0 || index >= reservedFor.size()) { _visitables.get("reservedFor").add(builder); reservedFor.add(builder); } else { _visitables.get("reservedFor").set(index, builder); reservedFor.set(index, builder);} + return (A)this; + } + + public A addToReservedFor(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference... items) { + if (this.reservedFor == null) {this.reservedFor = new ArrayList();} + for (V1alpha2ResourceClaimConsumerReference item : items) {V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item);_visitables.get("reservedFor").add(builder);this.reservedFor.add(builder);} return (A)this; + } + + public A addAllToReservedFor(Collection items) { + if (this.reservedFor == null) {this.reservedFor = new ArrayList();} + for (V1alpha2ResourceClaimConsumerReference item : items) {V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item);_visitables.get("reservedFor").add(builder);this.reservedFor.add(builder);} return (A)this; + } + + public A removeFromReservedFor(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference... items) { + if (this.reservedFor == null) return (A)this; + for (V1alpha2ResourceClaimConsumerReference item : items) {V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item);_visitables.get("reservedFor").remove(builder); this.reservedFor.remove(builder);} return (A)this; + } + + public A removeAllFromReservedFor(Collection items) { + if (this.reservedFor == null) return (A)this; + for (V1alpha2ResourceClaimConsumerReference item : items) {V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item);_visitables.get("reservedFor").remove(builder); this.reservedFor.remove(builder);} return (A)this; } - public interface ReservedForNested extends Nested,V1alpha2ResourceClaimConsumerReferenceFluent>{ - public N and(); - public N endReservedFor(); + + public A removeMatchingFromReservedFor(Predicate predicate) { + if (reservedFor == null) return (A) this; + final Iterator each = reservedFor.iterator(); + final List visitables = _visitables.get("reservedFor"); + while (each.hasNext()) { + V1alpha2ResourceClaimConsumerReferenceBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildReservedFor() { + return this.reservedFor != null ? build(reservedFor) : null; + } + + public V1alpha2ResourceClaimConsumerReference buildReservedFor(int index) { + return this.reservedFor.get(index).build(); + } + + public V1alpha2ResourceClaimConsumerReference buildFirstReservedFor() { + return this.reservedFor.get(0).build(); + } + + public V1alpha2ResourceClaimConsumerReference buildLastReservedFor() { + return this.reservedFor.get(reservedFor.size() - 1).build(); + } + + public V1alpha2ResourceClaimConsumerReference buildMatchingReservedFor(Predicate predicate) { + for (V1alpha2ResourceClaimConsumerReferenceBuilder item : reservedFor) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingReservedFor(Predicate predicate) { + for (V1alpha2ResourceClaimConsumerReferenceBuilder item : reservedFor) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withReservedFor(List reservedFor) { + if (this.reservedFor != null) { + this._visitables.get("reservedFor").clear(); + } + if (reservedFor != null) { + this.reservedFor = new ArrayList(); + for (V1alpha2ResourceClaimConsumerReference item : reservedFor) { + this.addToReservedFor(item); + } + } else { + this.reservedFor = null; + } + return (A) this; + } + + public A withReservedFor(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference... reservedFor) { + if (this.reservedFor != null) { + this.reservedFor.clear(); + _visitables.remove("reservedFor"); + } + if (reservedFor != null) { + for (V1alpha2ResourceClaimConsumerReference item : reservedFor) { + this.addToReservedFor(item); + } + } + return (A) this; + } + + public boolean hasReservedFor() { + return this.reservedFor != null && !this.reservedFor.isEmpty(); + } + + public ReservedForNested addNewReservedFor() { + return new ReservedForNested(-1, null); + } + + public ReservedForNested addNewReservedForLike(V1alpha2ResourceClaimConsumerReference item) { + return new ReservedForNested(-1, item); + } + + public ReservedForNested setNewReservedForLike(int index,V1alpha2ResourceClaimConsumerReference item) { + return new ReservedForNested(index, item); + } + + public ReservedForNested editReservedFor(int index) { + if (reservedFor.size() <= index) throw new RuntimeException("Can't edit reservedFor. Index exceeds size."); + return setNewReservedForLike(index, buildReservedFor(index)); + } + + public ReservedForNested editFirstReservedFor() { + if (reservedFor.size() == 0) throw new RuntimeException("Can't edit first reservedFor. The list is empty."); + return setNewReservedForLike(0, buildReservedFor(0)); + } + + public ReservedForNested editLastReservedFor() { + int index = reservedFor.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last reservedFor. The list is empty."); + return setNewReservedForLike(index, buildReservedFor(index)); + } + + public ReservedForNested editMatchingReservedFor(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1alpha2AllocationResultFluent> implements Nested{ + AllocationNested(V1alpha2AllocationResult item) { + this.builder = new V1alpha2AllocationResultBuilder(this, item); + } + V1alpha2AllocationResultBuilder builder; + public N and() { + return (N) V1alpha2ResourceClaimStatusFluent.this.withAllocation(builder.build()); + } + + public N endAllocation() { + return and(); + } + + } + public class ReservedForNested extends V1alpha2ResourceClaimConsumerReferenceFluent> implements Nested{ + ReservedForNested(int index,V1alpha2ResourceClaimConsumerReference item) { + this.index = index; + this.builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(this, item); + } + V1alpha2ResourceClaimConsumerReferenceBuilder builder; + int index; + + public N and() { + return (N) V1alpha2ResourceClaimStatusFluent.this.setToReservedFor(index,builder.build()); + } + + public N endReservedFor() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusFluentImpl.java deleted file mode 100644 index dd512b4b07..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimStatusFluentImpl.java +++ /dev/null @@ -1,262 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimStatusFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimStatusFluent{ - public V1alpha2ResourceClaimStatusFluentImpl() { - } - public V1alpha2ResourceClaimStatusFluentImpl(V1alpha2ResourceClaimStatus instance) { - if (instance != null) { - this.withAllocation(instance.getAllocation()); - this.withDeallocationRequested(instance.getDeallocationRequested()); - this.withDriverName(instance.getDriverName()); - this.withReservedFor(instance.getReservedFor()); - } - } - private V1alpha2AllocationResultBuilder allocation; - private Boolean deallocationRequested; - private String driverName; - private ArrayList reservedFor; - - /** - * This method has been deprecated, please use method buildAllocation instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2AllocationResult getAllocation() { - return this.allocation!=null ?this.allocation.build():null; - } - public V1alpha2AllocationResult buildAllocation() { - return this.allocation!=null ?this.allocation.build():null; - } - public A withAllocation(V1alpha2AllocationResult allocation) { - _visitables.get("allocation").remove(this.allocation); - if (allocation!=null){ this.allocation= new V1alpha2AllocationResultBuilder(allocation); _visitables.get("allocation").add(this.allocation);} else { this.allocation = null; _visitables.get("allocation").remove(this.allocation); } return (A) this; - } - public Boolean hasAllocation() { - return this.allocation != null; - } - public V1alpha2ResourceClaimStatusFluentImpl.AllocationNested withNewAllocation() { - return new V1alpha2ResourceClaimStatusFluentImpl.AllocationNestedImpl(); - } - public V1alpha2ResourceClaimStatusFluentImpl.AllocationNested withNewAllocationLike(V1alpha2AllocationResult item) { - return new V1alpha2ResourceClaimStatusFluentImpl.AllocationNestedImpl(item); - } - public V1alpha2ResourceClaimStatusFluentImpl.AllocationNested editAllocation() { - return withNewAllocationLike(getAllocation()); - } - public V1alpha2ResourceClaimStatusFluentImpl.AllocationNested editOrNewAllocation() { - return withNewAllocationLike(getAllocation() != null ? getAllocation(): new V1alpha2AllocationResultBuilder().build()); - } - public V1alpha2ResourceClaimStatusFluentImpl.AllocationNested editOrNewAllocationLike(V1alpha2AllocationResult item) { - return withNewAllocationLike(getAllocation() != null ? getAllocation(): item); - } - public Boolean getDeallocationRequested() { - return this.deallocationRequested; - } - public A withDeallocationRequested(Boolean deallocationRequested) { - this.deallocationRequested=deallocationRequested; return (A) this; - } - public Boolean hasDeallocationRequested() { - return this.deallocationRequested != null; - } - public String getDriverName() { - return this.driverName; - } - public A withDriverName(String driverName) { - this.driverName=driverName; return (A) this; - } - public Boolean hasDriverName() { - return this.driverName != null; - } - public A addToReservedFor(int index,V1alpha2ResourceClaimConsumerReference item) { - if (this.reservedFor == null) {this.reservedFor = new ArrayList();} - V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item); - if (index < 0 || index >= reservedFor.size()) { _visitables.get("reservedFor").add(builder); reservedFor.add(builder); } else { _visitables.get("reservedFor").add(index, builder); reservedFor.add(index, builder);} - return (A)this; - } - public A setToReservedFor(int index,V1alpha2ResourceClaimConsumerReference item) { - if (this.reservedFor == null) {this.reservedFor = new ArrayList();} - V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item); - if (index < 0 || index >= reservedFor.size()) { _visitables.get("reservedFor").add(builder); reservedFor.add(builder); } else { _visitables.get("reservedFor").set(index, builder); reservedFor.set(index, builder);} - return (A)this; - } - public A addToReservedFor(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference... items) { - if (this.reservedFor == null) {this.reservedFor = new ArrayList();} - for (V1alpha2ResourceClaimConsumerReference item : items) {V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item);_visitables.get("reservedFor").add(builder);this.reservedFor.add(builder);} return (A)this; - } - public A addAllToReservedFor(Collection items) { - if (this.reservedFor == null) {this.reservedFor = new ArrayList();} - for (V1alpha2ResourceClaimConsumerReference item : items) {V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item);_visitables.get("reservedFor").add(builder);this.reservedFor.add(builder);} return (A)this; - } - public A removeFromReservedFor(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference... items) { - for (V1alpha2ResourceClaimConsumerReference item : items) {V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item);_visitables.get("reservedFor").remove(builder);if (this.reservedFor != null) {this.reservedFor.remove(builder);}} return (A)this; - } - public A removeAllFromReservedFor(Collection items) { - for (V1alpha2ResourceClaimConsumerReference item : items) {V1alpha2ResourceClaimConsumerReferenceBuilder builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(item);_visitables.get("reservedFor").remove(builder);if (this.reservedFor != null) {this.reservedFor.remove(builder);}} return (A)this; - } - public A removeMatchingFromReservedFor(Predicate predicate) { - if (reservedFor == null) return (A) this; - final Iterator each = reservedFor.iterator(); - final List visitables = _visitables.get("reservedFor"); - while (each.hasNext()) { - V1alpha2ResourceClaimConsumerReferenceBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildReservedFor instead. - * @return The buildable object. - */ - @Deprecated - public List getReservedFor() { - return reservedFor != null ? build(reservedFor) : null; - } - public List buildReservedFor() { - return reservedFor != null ? build(reservedFor) : null; - } - public V1alpha2ResourceClaimConsumerReference buildReservedFor(int index) { - return this.reservedFor.get(index).build(); - } - public V1alpha2ResourceClaimConsumerReference buildFirstReservedFor() { - return this.reservedFor.get(0).build(); - } - public V1alpha2ResourceClaimConsumerReference buildLastReservedFor() { - return this.reservedFor.get(reservedFor.size() - 1).build(); - } - public V1alpha2ResourceClaimConsumerReference buildMatchingReservedFor(Predicate predicate) { - for (V1alpha2ResourceClaimConsumerReferenceBuilder item: reservedFor) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingReservedFor(Predicate predicate) { - for (V1alpha2ResourceClaimConsumerReferenceBuilder item: reservedFor) { if(predicate.test(item)){ return true;} } return false; - } - public A withReservedFor(List reservedFor) { - if (this.reservedFor != null) { _visitables.get("reservedFor").clear();} - if (reservedFor != null) {this.reservedFor = new ArrayList(); for (V1alpha2ResourceClaimConsumerReference item : reservedFor){this.addToReservedFor(item);}} else { this.reservedFor = null;} return (A) this; - } - public A withReservedFor(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimConsumerReference... reservedFor) { - if (this.reservedFor != null) {this.reservedFor.clear(); _visitables.remove("reservedFor"); } - if (reservedFor != null) {for (V1alpha2ResourceClaimConsumerReference item :reservedFor){ this.addToReservedFor(item);}} return (A) this; - } - public Boolean hasReservedFor() { - return reservedFor != null && !reservedFor.isEmpty(); - } - public V1alpha2ResourceClaimStatusFluentImpl.ReservedForNested addNewReservedFor() { - return new V1alpha2ResourceClaimStatusFluentImpl.ReservedForNestedImpl(); - } - public V1alpha2ResourceClaimStatusFluentImpl.ReservedForNested addNewReservedForLike(V1alpha2ResourceClaimConsumerReference item) { - return new V1alpha2ResourceClaimStatusFluentImpl.ReservedForNestedImpl(-1, item); - } - public V1alpha2ResourceClaimStatusFluentImpl.ReservedForNested setNewReservedForLike(int index,V1alpha2ResourceClaimConsumerReference item) { - return new V1alpha2ResourceClaimStatusFluentImpl.ReservedForNestedImpl(index, item); - } - public V1alpha2ResourceClaimStatusFluentImpl.ReservedForNested editReservedFor(int index) { - if (reservedFor.size() <= index) throw new RuntimeException("Can't edit reservedFor. Index exceeds size."); - return setNewReservedForLike(index, buildReservedFor(index)); - } - public V1alpha2ResourceClaimStatusFluentImpl.ReservedForNested editFirstReservedFor() { - if (reservedFor.size() == 0) throw new RuntimeException("Can't edit first reservedFor. The list is empty."); - return setNewReservedForLike(0, buildReservedFor(0)); - } - public V1alpha2ResourceClaimStatusFluentImpl.ReservedForNested editLastReservedFor() { - int index = reservedFor.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last reservedFor. The list is empty."); - return setNewReservedForLike(index, buildReservedFor(index)); - } - public V1alpha2ResourceClaimStatusFluentImpl.ReservedForNested editMatchingReservedFor(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1alpha2AllocationResultFluentImpl> implements V1alpha2ResourceClaimStatusFluentImpl.AllocationNested,Nested{ - AllocationNestedImpl(V1alpha2AllocationResult item) { - this.builder = new V1alpha2AllocationResultBuilder(this, item); - } - AllocationNestedImpl() { - this.builder = new V1alpha2AllocationResultBuilder(this); - } - V1alpha2AllocationResultBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimStatusFluentImpl.this.withAllocation(builder.build()); - } - public N endAllocation() { - return and(); - } - - } - class ReservedForNestedImpl extends V1alpha2ResourceClaimConsumerReferenceFluentImpl> implements V1alpha2ResourceClaimStatusFluentImpl.ReservedForNested,Nested{ - ReservedForNestedImpl(int index,V1alpha2ResourceClaimConsumerReference item) { - this.index = index; - this.builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(this, item); - } - ReservedForNestedImpl() { - this.index = -1; - this.builder = new V1alpha2ResourceClaimConsumerReferenceBuilder(this); - } - V1alpha2ResourceClaimConsumerReferenceBuilder builder; - int index; - public N and() { - return (N) V1alpha2ResourceClaimStatusFluentImpl.this.setToReservedFor(index,builder.build()); - } - public N endReservedFor() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateBuilder.java index 76a33bcb92..99642fbb0a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimTemplateBuilder extends V1alpha2ResourceClaimTemplateFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimTemplateBuilder extends V1alpha2ResourceClaimTemplateFluent implements VisitableBuilder{ public V1alpha2ResourceClaimTemplateBuilder() { - this(false); - } - public V1alpha2ResourceClaimTemplateBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaimTemplate(), validationEnabled); + this(new V1alpha2ResourceClaimTemplate()); } + public V1alpha2ResourceClaimTemplateBuilder(V1alpha2ResourceClaimTemplateFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimTemplateBuilder(V1alpha2ResourceClaimTemplateFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaimTemplate(), validationEnabled); + this(fluent, new V1alpha2ResourceClaimTemplate()); } + public V1alpha2ResourceClaimTemplateBuilder(V1alpha2ResourceClaimTemplateFluent fluent,V1alpha2ResourceClaimTemplate instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimTemplateBuilder(V1alpha2ResourceClaimTemplateFluent fluent,V1alpha2ResourceClaimTemplate instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimTemplateBuilder(V1alpha2ResourceClaimTemplate instance) { - this(instance,false); - } - public V1alpha2ResourceClaimTemplateBuilder(V1alpha2ResourceClaimTemplate instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimTemplateFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaimTemplate build() { V1alpha2ResourceClaimTemplate buildable = new V1alpha2ResourceClaimTemplate(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateFluent.java index 6b478c4bc0..2ac07d2276 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha2ResourceClaimTemplateFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha2ResourceClaimTemplateFluent.MetadataNested withNewMetadata(); - public V1alpha2ResourceClaimTemplateFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha2ResourceClaimTemplateFluent.MetadataNested editMetadata(); - public V1alpha2ResourceClaimTemplateFluent.MetadataNested editOrNewMetadata(); - public V1alpha2ResourceClaimTemplateFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimTemplateSpec getSpec(); - public V1alpha2ResourceClaimTemplateSpec buildSpec(); - public A withSpec(V1alpha2ResourceClaimTemplateSpec spec); - public Boolean hasSpec(); - public V1alpha2ResourceClaimTemplateFluent.SpecNested withNewSpec(); - public V1alpha2ResourceClaimTemplateFluent.SpecNested withNewSpecLike(V1alpha2ResourceClaimTemplateSpec item); - public V1alpha2ResourceClaimTemplateFluent.SpecNested editSpec(); - public V1alpha2ResourceClaimTemplateFluent.SpecNested editOrNewSpec(); - public V1alpha2ResourceClaimTemplateFluent.SpecNested editOrNewSpecLike(V1alpha2ResourceClaimTemplateSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimTemplateFluent> extends BaseFluent{ + public V1alpha2ResourceClaimTemplateFluent() { + } + + public V1alpha2ResourceClaimTemplateFluent(V1alpha2ResourceClaimTemplate instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha2ResourceClaimTemplateSpecBuilder spec; + + protected void copyInstance(V1alpha2ResourceClaimTemplate instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaimTemplate()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface SpecNested extends Nested,V1alpha2ResourceClaimTemplateSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha2ResourceClaimTemplateSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1alpha2ResourceClaimTemplateSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1alpha2ResourceClaimTemplateSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1alpha2ResourceClaimTemplateSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1alpha2ResourceClaimTemplateSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1alpha2ResourceClaimTemplateSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClaimTemplateFluent that = (V1alpha2ResourceClaimTemplateFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimTemplateFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class SpecNested extends V1alpha2ResourceClaimTemplateSpecFluent> implements Nested{ + SpecNested(V1alpha2ResourceClaimTemplateSpec item) { + this.builder = new V1alpha2ResourceClaimTemplateSpecBuilder(this, item); + } + V1alpha2ResourceClaimTemplateSpecBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimTemplateFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateFluentImpl.java deleted file mode 100644 index 6a16454ef1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimTemplateFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimTemplateFluent{ - public V1alpha2ResourceClaimTemplateFluentImpl() { - } - public V1alpha2ResourceClaimTemplateFluentImpl(V1alpha2ResourceClaimTemplate instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha2ResourceClaimTemplateSpecBuilder spec; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha2ResourceClaimTemplateFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha2ResourceClaimTemplateFluentImpl.MetadataNestedImpl(); - } - public V1alpha2ResourceClaimTemplateFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha2ResourceClaimTemplateFluentImpl.MetadataNestedImpl(item); - } - public V1alpha2ResourceClaimTemplateFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha2ResourceClaimTemplateFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha2ResourceClaimTemplateFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimTemplateSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1alpha2ResourceClaimTemplateSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1alpha2ResourceClaimTemplateSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1alpha2ResourceClaimTemplateSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1alpha2ResourceClaimTemplateFluentImpl.SpecNested withNewSpec() { - return new V1alpha2ResourceClaimTemplateFluentImpl.SpecNestedImpl(); - } - public V1alpha2ResourceClaimTemplateFluentImpl.SpecNested withNewSpecLike(V1alpha2ResourceClaimTemplateSpec item) { - return new V1alpha2ResourceClaimTemplateFluentImpl.SpecNestedImpl(item); - } - public V1alpha2ResourceClaimTemplateFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1alpha2ResourceClaimTemplateFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1alpha2ResourceClaimTemplateSpecBuilder().build()); - } - public V1alpha2ResourceClaimTemplateFluentImpl.SpecNested editOrNewSpecLike(V1alpha2ResourceClaimTemplateSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClaimTemplateFluentImpl that = (V1alpha2ResourceClaimTemplateFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha2ResourceClaimTemplateFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimTemplateFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1alpha2ResourceClaimTemplateSpecFluentImpl> implements V1alpha2ResourceClaimTemplateFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1alpha2ResourceClaimTemplateSpec item) { - this.builder = new V1alpha2ResourceClaimTemplateSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1alpha2ResourceClaimTemplateSpecBuilder(this); - } - V1alpha2ResourceClaimTemplateSpecBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimTemplateFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListBuilder.java index 0f5c8cadc3..64f8c0abe1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimTemplateListBuilder extends V1alpha2ResourceClaimTemplateListFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimTemplateListBuilder extends V1alpha2ResourceClaimTemplateListFluent implements VisitableBuilder{ public V1alpha2ResourceClaimTemplateListBuilder() { - this(false); - } - public V1alpha2ResourceClaimTemplateListBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaimTemplateList(), validationEnabled); + this(new V1alpha2ResourceClaimTemplateList()); } + public V1alpha2ResourceClaimTemplateListBuilder(V1alpha2ResourceClaimTemplateListFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimTemplateListBuilder(V1alpha2ResourceClaimTemplateListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaimTemplateList(), validationEnabled); + this(fluent, new V1alpha2ResourceClaimTemplateList()); } + public V1alpha2ResourceClaimTemplateListBuilder(V1alpha2ResourceClaimTemplateListFluent fluent,V1alpha2ResourceClaimTemplateList instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimTemplateListBuilder(V1alpha2ResourceClaimTemplateListFluent fluent,V1alpha2ResourceClaimTemplateList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimTemplateListBuilder(V1alpha2ResourceClaimTemplateList instance) { - this(instance,false); - } - public V1alpha2ResourceClaimTemplateListBuilder(V1alpha2ResourceClaimTemplateList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimTemplateListFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaimTemplateList build() { V1alpha2ResourceClaimTemplateList buildable = new V1alpha2ResourceClaimTemplateList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListFluent.java index 1236214032..e7ce3585ff 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2ResourceClaimTemplateListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha2ResourceClaimTemplate item); - public A setToItems(int index,V1alpha2ResourceClaimTemplate item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha2ResourceClaimTemplate buildItem(int index); - public V1alpha2ResourceClaimTemplate buildFirstItem(); - public V1alpha2ResourceClaimTemplate buildLastItem(); - public V1alpha2ResourceClaimTemplate buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate... items); - public Boolean hasItems(); - public V1alpha2ResourceClaimTemplateListFluent.ItemsNested addNewItem(); - public V1alpha2ResourceClaimTemplateListFluent.ItemsNested addNewItemLike(V1alpha2ResourceClaimTemplate item); - public V1alpha2ResourceClaimTemplateListFluent.ItemsNested setNewItemLike(int index,V1alpha2ResourceClaimTemplate item); - public V1alpha2ResourceClaimTemplateListFluent.ItemsNested editItem(int index); - public V1alpha2ResourceClaimTemplateListFluent.ItemsNested editFirstItem(); - public V1alpha2ResourceClaimTemplateListFluent.ItemsNested editLastItem(); - public V1alpha2ResourceClaimTemplateListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha2ResourceClaimTemplateListFluent.MetadataNested withNewMetadata(); - public V1alpha2ResourceClaimTemplateListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha2ResourceClaimTemplateListFluent.MetadataNested editMetadata(); - public V1alpha2ResourceClaimTemplateListFluent.MetadataNested editOrNewMetadata(); - public V1alpha2ResourceClaimTemplateListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha2ResourceClaimTemplateFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimTemplateListFluent> extends BaseFluent{ + public V1alpha2ResourceClaimTemplateListFluent() { + } + + public V1alpha2ResourceClaimTemplateListFluent(V1alpha2ResourceClaimTemplateList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha2ResourceClaimTemplateList instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaimTemplateList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha2ResourceClaimTemplate item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha2ResourceClaimTemplate item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha2ResourceClaimTemplate item : items) {V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha2ResourceClaimTemplate item : items) {V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate... items) { + if (this.items == null) return (A)this; + for (V1alpha2ResourceClaimTemplate item : items) {V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha2ResourceClaimTemplate item : items) {V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha2ResourceClaimTemplateBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha2ResourceClaimTemplate buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha2ResourceClaimTemplate buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha2ResourceClaimTemplate buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha2ResourceClaimTemplate buildMatchingItem(Predicate predicate) { + for (V1alpha2ResourceClaimTemplateBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha2ResourceClaimTemplateBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha2ResourceClaimTemplate item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha2ResourceClaimTemplate item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha2ResourceClaimTemplate item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha2ResourceClaimTemplate item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClaimTemplateListFluent that = (V1alpha2ResourceClaimTemplateListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha2ResourceClaimTemplateFluent> implements Nested{ + ItemsNested(int index,V1alpha2ResourceClaimTemplate item) { + this.index = index; + this.builder = new V1alpha2ResourceClaimTemplateBuilder(this, item); + } + V1alpha2ResourceClaimTemplateBuilder builder; + int index; + public N and() { + return (N) V1alpha2ResourceClaimTemplateListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimTemplateListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListFluentImpl.java deleted file mode 100644 index 6059c537e9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimTemplateListFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimTemplateListFluent{ - public V1alpha2ResourceClaimTemplateListFluentImpl() { - } - public V1alpha2ResourceClaimTemplateListFluentImpl(V1alpha2ResourceClaimTemplateList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha2ResourceClaimTemplate item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha2ResourceClaimTemplate item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha2ResourceClaimTemplate item : items) {V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha2ResourceClaimTemplate item : items) {V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate... items) { - for (V1alpha2ResourceClaimTemplate item : items) {V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha2ResourceClaimTemplate item : items) {V1alpha2ResourceClaimTemplateBuilder builder = new V1alpha2ResourceClaimTemplateBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha2ResourceClaimTemplateBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha2ResourceClaimTemplate buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha2ResourceClaimTemplate buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha2ResourceClaimTemplate buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha2ResourceClaimTemplate buildMatchingItem(Predicate predicate) { - for (V1alpha2ResourceClaimTemplateBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha2ResourceClaimTemplateBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha2ResourceClaimTemplate item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClaimTemplate... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha2ResourceClaimTemplate item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNested addNewItem() { - return new V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNestedImpl(); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNested addNewItemLike(V1alpha2ResourceClaimTemplate item) { - return new V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha2ResourceClaimTemplate item) { - return new V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha2ResourceClaimTemplateListFluentImpl.MetadataNestedImpl(); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha2ResourceClaimTemplateListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha2ResourceClaimTemplateListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClaimTemplateListFluentImpl that = (V1alpha2ResourceClaimTemplateListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha2ResourceClaimTemplateFluentImpl> implements V1alpha2ResourceClaimTemplateListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha2ResourceClaimTemplate item) { - this.index = index; - this.builder = new V1alpha2ResourceClaimTemplateBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha2ResourceClaimTemplateBuilder(this); - } - V1alpha2ResourceClaimTemplateBuilder builder; - int index; - public N and() { - return (N) V1alpha2ResourceClaimTemplateListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha2ResourceClaimTemplateListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimTemplateListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecBuilder.java index d358184a16..1108f64cee 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClaimTemplateSpecBuilder extends V1alpha2ResourceClaimTemplateSpecFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClaimTemplateSpecBuilder extends V1alpha2ResourceClaimTemplateSpecFluent implements VisitableBuilder{ public V1alpha2ResourceClaimTemplateSpecBuilder() { - this(false); - } - public V1alpha2ResourceClaimTemplateSpecBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClaimTemplateSpec(), validationEnabled); + this(new V1alpha2ResourceClaimTemplateSpec()); } + public V1alpha2ResourceClaimTemplateSpecBuilder(V1alpha2ResourceClaimTemplateSpecFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClaimTemplateSpecBuilder(V1alpha2ResourceClaimTemplateSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClaimTemplateSpec(), validationEnabled); + this(fluent, new V1alpha2ResourceClaimTemplateSpec()); } + public V1alpha2ResourceClaimTemplateSpecBuilder(V1alpha2ResourceClaimTemplateSpecFluent fluent,V1alpha2ResourceClaimTemplateSpec instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClaimTemplateSpecBuilder(V1alpha2ResourceClaimTemplateSpecFluent fluent,V1alpha2ResourceClaimTemplateSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClaimTemplateSpecBuilder(V1alpha2ResourceClaimTemplateSpec instance) { - this(instance,false); - } - public V1alpha2ResourceClaimTemplateSpecBuilder(V1alpha2ResourceClaimTemplateSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClaimTemplateSpecFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClaimTemplateSpec build() { V1alpha2ResourceClaimTemplateSpec buildable = new V1alpha2ResourceClaimTemplateSpec(); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecFluent.java index 7305619be5..5cfdd72508 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha2ResourceClaimTemplateSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha2ResourceClaimTemplateSpecFluent.MetadataNested withNewMetadata(); - public V1alpha2ResourceClaimTemplateSpecFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha2ResourceClaimTemplateSpecFluent.MetadataNested editMetadata(); - public V1alpha2ResourceClaimTemplateSpecFluent.MetadataNested editOrNewMetadata(); - public V1alpha2ResourceClaimTemplateSpecFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimSpec getSpec(); - public V1alpha2ResourceClaimSpec buildSpec(); - public A withSpec(V1alpha2ResourceClaimSpec spec); - public Boolean hasSpec(); - public V1alpha2ResourceClaimTemplateSpecFluent.SpecNested withNewSpec(); - public V1alpha2ResourceClaimTemplateSpecFluent.SpecNested withNewSpecLike(V1alpha2ResourceClaimSpec item); - public V1alpha2ResourceClaimTemplateSpecFluent.SpecNested editSpec(); - public V1alpha2ResourceClaimTemplateSpecFluent.SpecNested editOrNewSpec(); - public V1alpha2ResourceClaimTemplateSpecFluent.SpecNested editOrNewSpecLike(V1alpha2ResourceClaimSpec item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClaimTemplateSpecFluent> extends BaseFluent{ + public V1alpha2ResourceClaimTemplateSpecFluent() { + } + + public V1alpha2ResourceClaimTemplateSpecFluent(V1alpha2ResourceClaimTemplateSpec instance) { + this.copyInstance(instance); + } + private V1ObjectMetaBuilder metadata; + private V1alpha2ResourceClaimSpecBuilder spec; + + protected void copyInstance(V1alpha2ResourceClaimTemplateSpec instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClaimTemplateSpec()); + if (instance != null) { + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); } - public interface SpecNested extends Nested,V1alpha2ResourceClaimSpecFluent>{ - public N and(); - public N endSpec(); + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha2ResourceClaimSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1alpha2ResourceClaimSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1alpha2ResourceClaimSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1alpha2ResourceClaimSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1alpha2ResourceClaimSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1alpha2ResourceClaimSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClaimTemplateSpecFluent that = (V1alpha2ResourceClaimTemplateSpecFluent) o; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimTemplateSpecFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + } + public class SpecNested extends V1alpha2ResourceClaimSpecFluent> implements Nested{ + SpecNested(V1alpha2ResourceClaimSpec item) { + this.builder = new V1alpha2ResourceClaimSpecBuilder(this, item); + } + V1alpha2ResourceClaimSpecBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClaimTemplateSpecFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecFluentImpl.java deleted file mode 100644 index e3185724bf..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClaimTemplateSpecFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClaimTemplateSpecFluentImpl> extends BaseFluent implements V1alpha2ResourceClaimTemplateSpecFluent{ - public V1alpha2ResourceClaimTemplateSpecFluentImpl() { - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl(V1alpha2ResourceClaimTemplateSpec instance) { - if (instance != null) { - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - } - } - private V1ObjectMetaBuilder metadata; - private V1alpha2ResourceClaimSpecBuilder spec; - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha2ResourceClaimTemplateSpecFluentImpl.MetadataNestedImpl(); - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha2ResourceClaimTemplateSpecFluentImpl.MetadataNestedImpl(item); - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClaimSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1alpha2ResourceClaimSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1alpha2ResourceClaimSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1alpha2ResourceClaimSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.SpecNested withNewSpec() { - return new V1alpha2ResourceClaimTemplateSpecFluentImpl.SpecNestedImpl(); - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.SpecNested withNewSpecLike(V1alpha2ResourceClaimSpec item) { - return new V1alpha2ResourceClaimTemplateSpecFluentImpl.SpecNestedImpl(item); - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1alpha2ResourceClaimSpecBuilder().build()); - } - public V1alpha2ResourceClaimTemplateSpecFluentImpl.SpecNested editOrNewSpecLike(V1alpha2ResourceClaimSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClaimTemplateSpecFluentImpl that = (V1alpha2ResourceClaimTemplateSpecFluentImpl) o; - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(metadata, spec, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha2ResourceClaimTemplateSpecFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimTemplateSpecFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1alpha2ResourceClaimSpecFluentImpl> implements V1alpha2ResourceClaimTemplateSpecFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1alpha2ResourceClaimSpec item) { - this.builder = new V1alpha2ResourceClaimSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1alpha2ResourceClaimSpecBuilder(this); - } - V1alpha2ResourceClaimSpecBuilder builder; - public N and() { - return (N) V1alpha2ResourceClaimTemplateSpecFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassBuilder.java index ab44ce3fcc..fd038ec274 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClassBuilder extends V1alpha2ResourceClassFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClassBuilder extends V1alpha2ResourceClassFluent implements VisitableBuilder{ public V1alpha2ResourceClassBuilder() { - this(false); - } - public V1alpha2ResourceClassBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClass(), validationEnabled); + this(new V1alpha2ResourceClass()); } + public V1alpha2ResourceClassBuilder(V1alpha2ResourceClassFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClassBuilder(V1alpha2ResourceClassFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClass(), validationEnabled); + this(fluent, new V1alpha2ResourceClass()); } + public V1alpha2ResourceClassBuilder(V1alpha2ResourceClassFluent fluent,V1alpha2ResourceClass instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClassBuilder(V1alpha2ResourceClassFluent fluent,V1alpha2ResourceClass instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withDriverName(instance.getDriverName()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withParametersRef(instance.getParametersRef()); - fluent.withSuitableNodes(instance.getSuitableNodes()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClassBuilder(V1alpha2ResourceClass instance) { - this(instance,false); - } - public V1alpha2ResourceClassBuilder(V1alpha2ResourceClass instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withDriverName(instance.getDriverName()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withParametersRef(instance.getParametersRef()); - this.withSuitableNodes(instance.getSuitableNodes()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClassFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClass build() { V1alpha2ResourceClass buildable = new V1alpha2ResourceClass(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setDriverName(fluent.getDriverName()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setParametersRef(fluent.getParametersRef()); - buildable.setSuitableNodes(fluent.getSuitableNodes()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setParametersRef(fluent.buildParametersRef()); + buildable.setSuitableNodes(fluent.buildSuitableNodes()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassFluent.java index 201d5f86b0..e7267e6461 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassFluent.java @@ -1,84 +1,277 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1alpha2ResourceClassFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getDriverName(); - public A withDriverName(String driverName); - public Boolean hasDriverName(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1alpha2ResourceClassFluent.MetadataNested withNewMetadata(); - public V1alpha2ResourceClassFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1alpha2ResourceClassFluent.MetadataNested editMetadata(); - public V1alpha2ResourceClassFluent.MetadataNested editOrNewMetadata(); - public V1alpha2ResourceClassFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildParametersRef instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClassParametersReference getParametersRef(); - public V1alpha2ResourceClassParametersReference buildParametersRef(); - public A withParametersRef(V1alpha2ResourceClassParametersReference parametersRef); - public Boolean hasParametersRef(); - public V1alpha2ResourceClassFluent.ParametersRefNested withNewParametersRef(); - public V1alpha2ResourceClassFluent.ParametersRefNested withNewParametersRefLike(V1alpha2ResourceClassParametersReference item); - public V1alpha2ResourceClassFluent.ParametersRefNested editParametersRef(); - public V1alpha2ResourceClassFluent.ParametersRefNested editOrNewParametersRef(); - public V1alpha2ResourceClassFluent.ParametersRefNested editOrNewParametersRefLike(V1alpha2ResourceClassParametersReference item); - - /** - * This method has been deprecated, please use method buildSuitableNodes instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelector getSuitableNodes(); - public V1NodeSelector buildSuitableNodes(); - public A withSuitableNodes(V1NodeSelector suitableNodes); - public Boolean hasSuitableNodes(); - public V1alpha2ResourceClassFluent.SuitableNodesNested withNewSuitableNodes(); - public V1alpha2ResourceClassFluent.SuitableNodesNested withNewSuitableNodesLike(V1NodeSelector item); - public V1alpha2ResourceClassFluent.SuitableNodesNested editSuitableNodes(); - public V1alpha2ResourceClassFluent.SuitableNodesNested editOrNewSuitableNodes(); - public V1alpha2ResourceClassFluent.SuitableNodesNested editOrNewSuitableNodesLike(V1NodeSelector item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClassFluent> extends BaseFluent{ + public V1alpha2ResourceClassFluent() { + } + + public V1alpha2ResourceClassFluent(V1alpha2ResourceClass instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String driverName; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1alpha2ResourceClassParametersReferenceBuilder parametersRef; + private V1NodeSelectorBuilder suitableNodes; + + protected void copyInstance(V1alpha2ResourceClass instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClass()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withDriverName(instance.getDriverName()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withParametersRef(instance.getParametersRef()); + this.withSuitableNodes(instance.getSuitableNodes()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getDriverName() { + return this.driverName; + } + + public A withDriverName(String driverName) { + this.driverName = driverName; + return (A) this; + } + + public boolean hasDriverName() { + return this.driverName != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1alpha2ResourceClassParametersReference buildParametersRef() { + return this.parametersRef != null ? this.parametersRef.build() : null; + } + + public A withParametersRef(V1alpha2ResourceClassParametersReference parametersRef) { + this._visitables.remove("parametersRef"); + if (parametersRef != null) { + this.parametersRef = new V1alpha2ResourceClassParametersReferenceBuilder(parametersRef); + this._visitables.get("parametersRef").add(this.parametersRef); + } else { + this.parametersRef = null; + this._visitables.get("parametersRef").remove(this.parametersRef); + } + return (A) this; + } + + public boolean hasParametersRef() { + return this.parametersRef != null; + } + + public ParametersRefNested withNewParametersRef() { + return new ParametersRefNested(null); + } + + public ParametersRefNested withNewParametersRefLike(V1alpha2ResourceClassParametersReference item) { + return new ParametersRefNested(item); + } + + public ParametersRefNested editParametersRef() { + return withNewParametersRefLike(java.util.Optional.ofNullable(buildParametersRef()).orElse(null)); + } + + public ParametersRefNested editOrNewParametersRef() { + return withNewParametersRefLike(java.util.Optional.ofNullable(buildParametersRef()).orElse(new V1alpha2ResourceClassParametersReferenceBuilder().build())); + } + + public ParametersRefNested editOrNewParametersRefLike(V1alpha2ResourceClassParametersReference item) { + return withNewParametersRefLike(java.util.Optional.ofNullable(buildParametersRef()).orElse(item)); + } + + public V1NodeSelector buildSuitableNodes() { + return this.suitableNodes != null ? this.suitableNodes.build() : null; + } + + public A withSuitableNodes(V1NodeSelector suitableNodes) { + this._visitables.remove("suitableNodes"); + if (suitableNodes != null) { + this.suitableNodes = new V1NodeSelectorBuilder(suitableNodes); + this._visitables.get("suitableNodes").add(this.suitableNodes); + } else { + this.suitableNodes = null; + this._visitables.get("suitableNodes").remove(this.suitableNodes); + } + return (A) this; + } + + public boolean hasSuitableNodes() { + return this.suitableNodes != null; + } + + public SuitableNodesNested withNewSuitableNodes() { + return new SuitableNodesNested(null); + } + + public SuitableNodesNested withNewSuitableNodesLike(V1NodeSelector item) { + return new SuitableNodesNested(item); + } + + public SuitableNodesNested editSuitableNodes() { + return withNewSuitableNodesLike(java.util.Optional.ofNullable(buildSuitableNodes()).orElse(null)); + } + + public SuitableNodesNested editOrNewSuitableNodes() { + return withNewSuitableNodesLike(java.util.Optional.ofNullable(buildSuitableNodes()).orElse(new V1NodeSelectorBuilder().build())); + } + + public SuitableNodesNested editOrNewSuitableNodesLike(V1NodeSelector item) { + return withNewSuitableNodesLike(java.util.Optional.ofNullable(buildSuitableNodes()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClassFluent that = (V1alpha2ResourceClassFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(driverName, that.driverName)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(parametersRef, that.parametersRef)) return false; + if (!java.util.Objects.equals(suitableNodes, that.suitableNodes)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, driverName, kind, metadata, parametersRef, suitableNodes, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (driverName != null) { sb.append("driverName:"); sb.append(driverName + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (parametersRef != null) { sb.append("parametersRef:"); sb.append(parametersRef + ","); } + if (suitableNodes != null) { sb.append("suitableNodes:"); sb.append(suitableNodes); } + sb.append("}"); + return sb.toString(); } - public interface ParametersRefNested extends Nested,V1alpha2ResourceClassParametersReferenceFluent>{ - public N and(); - public N endParametersRef(); + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + public N and() { + return (N) V1alpha2ResourceClassFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } - public interface SuitableNodesNested extends Nested,V1NodeSelectorFluent>{ - public N and(); - public N endSuitableNodes(); + public class ParametersRefNested extends V1alpha2ResourceClassParametersReferenceFluent> implements Nested{ + ParametersRefNested(V1alpha2ResourceClassParametersReference item) { + this.builder = new V1alpha2ResourceClassParametersReferenceBuilder(this, item); + } + V1alpha2ResourceClassParametersReferenceBuilder builder; + public N and() { + return (N) V1alpha2ResourceClassFluent.this.withParametersRef(builder.build()); + } + + public N endParametersRef() { + return and(); + } + + } + public class SuitableNodesNested extends V1NodeSelectorFluent> implements Nested{ + SuitableNodesNested(V1NodeSelector item) { + this.builder = new V1NodeSelectorBuilder(this, item); + } + V1NodeSelectorBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClassFluent.this.withSuitableNodes(builder.build()); + } + + public N endSuitableNodes() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassFluentImpl.java deleted file mode 100644 index 07b444b267..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassFluentImpl.java +++ /dev/null @@ -1,246 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClassFluentImpl> extends BaseFluent implements V1alpha2ResourceClassFluent{ - public V1alpha2ResourceClassFluentImpl() { - } - public V1alpha2ResourceClassFluentImpl(V1alpha2ResourceClass instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withDriverName(instance.getDriverName()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withParametersRef(instance.getParametersRef()); - this.withSuitableNodes(instance.getSuitableNodes()); - } - } - private String apiVersion; - private String driverName; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1alpha2ResourceClassParametersReferenceBuilder parametersRef; - private V1NodeSelectorBuilder suitableNodes; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getDriverName() { - return this.driverName; - } - public A withDriverName(String driverName) { - this.driverName=driverName; return (A) this; - } - public Boolean hasDriverName() { - return this.driverName != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1alpha2ResourceClassFluentImpl.MetadataNested withNewMetadata() { - return new V1alpha2ResourceClassFluentImpl.MetadataNestedImpl(); - } - public V1alpha2ResourceClassFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1alpha2ResourceClassFluentImpl.MetadataNestedImpl(item); - } - public V1alpha2ResourceClassFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha2ResourceClassFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1alpha2ResourceClassFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildParametersRef instead. - * @return The buildable object. - */ - @Deprecated - public V1alpha2ResourceClassParametersReference getParametersRef() { - return this.parametersRef!=null ?this.parametersRef.build():null; - } - public V1alpha2ResourceClassParametersReference buildParametersRef() { - return this.parametersRef!=null ?this.parametersRef.build():null; - } - public A withParametersRef(V1alpha2ResourceClassParametersReference parametersRef) { - _visitables.get("parametersRef").remove(this.parametersRef); - if (parametersRef!=null){ this.parametersRef= new V1alpha2ResourceClassParametersReferenceBuilder(parametersRef); _visitables.get("parametersRef").add(this.parametersRef);} else { this.parametersRef = null; _visitables.get("parametersRef").remove(this.parametersRef); } return (A) this; - } - public Boolean hasParametersRef() { - return this.parametersRef != null; - } - public V1alpha2ResourceClassFluentImpl.ParametersRefNested withNewParametersRef() { - return new V1alpha2ResourceClassFluentImpl.ParametersRefNestedImpl(); - } - public V1alpha2ResourceClassFluentImpl.ParametersRefNested withNewParametersRefLike(V1alpha2ResourceClassParametersReference item) { - return new V1alpha2ResourceClassFluentImpl.ParametersRefNestedImpl(item); - } - public V1alpha2ResourceClassFluentImpl.ParametersRefNested editParametersRef() { - return withNewParametersRefLike(getParametersRef()); - } - public V1alpha2ResourceClassFluentImpl.ParametersRefNested editOrNewParametersRef() { - return withNewParametersRefLike(getParametersRef() != null ? getParametersRef(): new V1alpha2ResourceClassParametersReferenceBuilder().build()); - } - public V1alpha2ResourceClassFluentImpl.ParametersRefNested editOrNewParametersRefLike(V1alpha2ResourceClassParametersReference item) { - return withNewParametersRefLike(getParametersRef() != null ? getParametersRef(): item); - } - - /** - * This method has been deprecated, please use method buildSuitableNodes instead. - * @return The buildable object. - */ - @Deprecated - public V1NodeSelector getSuitableNodes() { - return this.suitableNodes!=null ?this.suitableNodes.build():null; - } - public V1NodeSelector buildSuitableNodes() { - return this.suitableNodes!=null ?this.suitableNodes.build():null; - } - public A withSuitableNodes(V1NodeSelector suitableNodes) { - _visitables.get("suitableNodes").remove(this.suitableNodes); - if (suitableNodes!=null){ this.suitableNodes= new V1NodeSelectorBuilder(suitableNodes); _visitables.get("suitableNodes").add(this.suitableNodes);} else { this.suitableNodes = null; _visitables.get("suitableNodes").remove(this.suitableNodes); } return (A) this; - } - public Boolean hasSuitableNodes() { - return this.suitableNodes != null; - } - public V1alpha2ResourceClassFluentImpl.SuitableNodesNested withNewSuitableNodes() { - return new V1alpha2ResourceClassFluentImpl.SuitableNodesNestedImpl(); - } - public V1alpha2ResourceClassFluentImpl.SuitableNodesNested withNewSuitableNodesLike(V1NodeSelector item) { - return new V1alpha2ResourceClassFluentImpl.SuitableNodesNestedImpl(item); - } - public V1alpha2ResourceClassFluentImpl.SuitableNodesNested editSuitableNodes() { - return withNewSuitableNodesLike(getSuitableNodes()); - } - public V1alpha2ResourceClassFluentImpl.SuitableNodesNested editOrNewSuitableNodes() { - return withNewSuitableNodesLike(getSuitableNodes() != null ? getSuitableNodes(): new V1NodeSelectorBuilder().build()); - } - public V1alpha2ResourceClassFluentImpl.SuitableNodesNested editOrNewSuitableNodesLike(V1NodeSelector item) { - return withNewSuitableNodesLike(getSuitableNodes() != null ? getSuitableNodes(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClassFluentImpl that = (V1alpha2ResourceClassFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(driverName, that.driverName)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(parametersRef, that.parametersRef)) return false; - - if (!java.util.Objects.equals(suitableNodes, that.suitableNodes)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, driverName, kind, metadata, parametersRef, suitableNodes, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (driverName != null) { sb.append("driverName:"); sb.append(driverName + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (parametersRef != null) { sb.append("parametersRef:"); sb.append(parametersRef + ","); } - if (suitableNodes != null) { sb.append("suitableNodes:"); sb.append(suitableNodes); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1alpha2ResourceClassFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1alpha2ResourceClassFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class ParametersRefNestedImpl extends V1alpha2ResourceClassParametersReferenceFluentImpl> implements V1alpha2ResourceClassFluentImpl.ParametersRefNested,Nested{ - ParametersRefNestedImpl(V1alpha2ResourceClassParametersReference item) { - this.builder = new V1alpha2ResourceClassParametersReferenceBuilder(this, item); - } - ParametersRefNestedImpl() { - this.builder = new V1alpha2ResourceClassParametersReferenceBuilder(this); - } - V1alpha2ResourceClassParametersReferenceBuilder builder; - public N and() { - return (N) V1alpha2ResourceClassFluentImpl.this.withParametersRef(builder.build()); - } - public N endParametersRef() { - return and(); - } - - } - class SuitableNodesNestedImpl extends V1NodeSelectorFluentImpl> implements V1alpha2ResourceClassFluentImpl.SuitableNodesNested,Nested{ - SuitableNodesNestedImpl(V1NodeSelector item) { - this.builder = new V1NodeSelectorBuilder(this, item); - } - SuitableNodesNestedImpl() { - this.builder = new V1NodeSelectorBuilder(this); - } - V1NodeSelectorBuilder builder; - public N and() { - return (N) V1alpha2ResourceClassFluentImpl.this.withSuitableNodes(builder.build()); - } - public N endSuitableNodes() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListBuilder.java index 93e6bc4685..b0ce0b08c2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClassListBuilder extends V1alpha2ResourceClassListFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClassListBuilder extends V1alpha2ResourceClassListFluent implements VisitableBuilder{ public V1alpha2ResourceClassListBuilder() { - this(false); - } - public V1alpha2ResourceClassListBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClassList(), validationEnabled); + this(new V1alpha2ResourceClassList()); } + public V1alpha2ResourceClassListBuilder(V1alpha2ResourceClassListFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClassListBuilder(V1alpha2ResourceClassListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClassList(), validationEnabled); + this(fluent, new V1alpha2ResourceClassList()); } + public V1alpha2ResourceClassListBuilder(V1alpha2ResourceClassListFluent fluent,V1alpha2ResourceClassList instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClassListBuilder(V1alpha2ResourceClassListFluent fluent,V1alpha2ResourceClassList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClassListBuilder(V1alpha2ResourceClassList instance) { - this(instance,false); - } - public V1alpha2ResourceClassListBuilder(V1alpha2ResourceClassList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClassListFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClassList build() { V1alpha2ResourceClassList buildable = new V1alpha2ResourceClassList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListFluent.java index 926d863ffa..e085f41d6e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2ResourceClassListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1alpha2ResourceClass item); - public A setToItems(int index,V1alpha2ResourceClass item); - public A addToItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClass... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClass... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1alpha2ResourceClass buildItem(int index); - public V1alpha2ResourceClass buildFirstItem(); - public V1alpha2ResourceClass buildLastItem(); - public V1alpha2ResourceClass buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClass... items); - public Boolean hasItems(); - public V1alpha2ResourceClassListFluent.ItemsNested addNewItem(); - public V1alpha2ResourceClassListFluent.ItemsNested addNewItemLike(V1alpha2ResourceClass item); - public V1alpha2ResourceClassListFluent.ItemsNested setNewItemLike(int index,V1alpha2ResourceClass item); - public V1alpha2ResourceClassListFluent.ItemsNested editItem(int index); - public V1alpha2ResourceClassListFluent.ItemsNested editFirstItem(); - public V1alpha2ResourceClassListFluent.ItemsNested editLastItem(); - public V1alpha2ResourceClassListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1alpha2ResourceClassListFluent.MetadataNested withNewMetadata(); - public V1alpha2ResourceClassListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1alpha2ResourceClassListFluent.MetadataNested editMetadata(); - public V1alpha2ResourceClassListFluent.MetadataNested editOrNewMetadata(); - public V1alpha2ResourceClassListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1alpha2ResourceClassFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClassListFluent> extends BaseFluent{ + public V1alpha2ResourceClassListFluent() { + } + + public V1alpha2ResourceClassListFluent(V1alpha2ResourceClassList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1alpha2ResourceClassList instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClassList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1alpha2ResourceClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1alpha2ResourceClass item) { + if (this.items == null) {this.items = new ArrayList();} + V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClass... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha2ResourceClass item : items) {V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1alpha2ResourceClass item : items) {V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClass... items) { + if (this.items == null) return (A)this; + for (V1alpha2ResourceClass item : items) {V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1alpha2ResourceClass item : items) {V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1alpha2ResourceClassBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1alpha2ResourceClass buildItem(int index) { + return this.items.get(index).build(); + } + + public V1alpha2ResourceClass buildFirstItem() { + return this.items.get(0).build(); + } + + public V1alpha2ResourceClass buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1alpha2ResourceClass buildMatchingItem(Predicate predicate) { + for (V1alpha2ResourceClassBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1alpha2ResourceClassBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1alpha2ResourceClass item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClass... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1alpha2ResourceClass item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1alpha2ResourceClass item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1alpha2ResourceClass item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClassListFluent that = (V1alpha2ResourceClassListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1alpha2ResourceClassFluent> implements Nested{ + ItemsNested(int index,V1alpha2ResourceClass item) { + this.index = index; + this.builder = new V1alpha2ResourceClassBuilder(this, item); + } + V1alpha2ResourceClassBuilder builder; + int index; + public N and() { + return (N) V1alpha2ResourceClassListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1alpha2ResourceClassListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListFluentImpl.java deleted file mode 100644 index becd949970..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClassListFluentImpl> extends BaseFluent implements V1alpha2ResourceClassListFluent{ - public V1alpha2ResourceClassListFluentImpl() { - } - public V1alpha2ResourceClassListFluentImpl(V1alpha2ResourceClassList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1alpha2ResourceClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1alpha2ResourceClass item) { - if (this.items == null) {this.items = new ArrayList();} - V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClass... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha2ResourceClass item : items) {V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1alpha2ResourceClass item : items) {V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClass... items) { - for (V1alpha2ResourceClass item : items) {V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1alpha2ResourceClass item : items) {V1alpha2ResourceClassBuilder builder = new V1alpha2ResourceClassBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1alpha2ResourceClassBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1alpha2ResourceClass buildItem(int index) { - return this.items.get(index).build(); - } - public V1alpha2ResourceClass buildFirstItem() { - return this.items.get(0).build(); - } - public V1alpha2ResourceClass buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1alpha2ResourceClass buildMatchingItem(Predicate predicate) { - for (V1alpha2ResourceClassBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1alpha2ResourceClassBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1alpha2ResourceClass item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1alpha2ResourceClass... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1alpha2ResourceClass item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1alpha2ResourceClassListFluentImpl.ItemsNested addNewItem() { - return new V1alpha2ResourceClassListFluentImpl.ItemsNestedImpl(); - } - public V1alpha2ResourceClassListFluentImpl.ItemsNested addNewItemLike(V1alpha2ResourceClass item) { - return new V1alpha2ResourceClassListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1alpha2ResourceClassListFluentImpl.ItemsNested setNewItemLike(int index,V1alpha2ResourceClass item) { - return new V1alpha2ResourceClassListFluentImpl.ItemsNestedImpl(index, item); - } - public V1alpha2ResourceClassListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha2ResourceClassListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1alpha2ResourceClassListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1alpha2ResourceClassListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1alpha2ResourceClassListFluentImpl.MetadataNestedImpl(); - } - public V1alpha2ResourceClassListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1alpha2ResourceClassListFluentImpl.MetadataNestedImpl(item); - } - public V1alpha2ResourceClassListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1alpha2ResourceClassListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1alpha2ResourceClassListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClassListFluentImpl that = (V1alpha2ResourceClassListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1alpha2ResourceClassFluentImpl> implements V1alpha2ResourceClassListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1alpha2ResourceClass item) { - this.index = index; - this.builder = new V1alpha2ResourceClassBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1alpha2ResourceClassBuilder(this); - } - V1alpha2ResourceClassBuilder builder; - int index; - public N and() { - return (N) V1alpha2ResourceClassListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1alpha2ResourceClassListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1alpha2ResourceClassListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceBuilder.java index 0afe2516a5..d8548759c0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceClassParametersReferenceBuilder extends V1alpha2ResourceClassParametersReferenceFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceClassParametersReferenceBuilder extends V1alpha2ResourceClassParametersReferenceFluent implements VisitableBuilder{ public V1alpha2ResourceClassParametersReferenceBuilder() { - this(false); - } - public V1alpha2ResourceClassParametersReferenceBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceClassParametersReference(), validationEnabled); + this(new V1alpha2ResourceClassParametersReference()); } + public V1alpha2ResourceClassParametersReferenceBuilder(V1alpha2ResourceClassParametersReferenceFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceClassParametersReferenceBuilder(V1alpha2ResourceClassParametersReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceClassParametersReference(), validationEnabled); + this(fluent, new V1alpha2ResourceClassParametersReference()); } + public V1alpha2ResourceClassParametersReferenceBuilder(V1alpha2ResourceClassParametersReferenceFluent fluent,V1alpha2ResourceClassParametersReference instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceClassParametersReferenceBuilder(V1alpha2ResourceClassParametersReferenceFluent fluent,V1alpha2ResourceClassParametersReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroup(instance.getApiGroup()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceClassParametersReferenceBuilder(V1alpha2ResourceClassParametersReference instance) { - this(instance,false); - } - public V1alpha2ResourceClassParametersReferenceBuilder(V1alpha2ResourceClassParametersReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceClassParametersReferenceFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceClassParametersReference build() { V1alpha2ResourceClassParametersReference buildable = new V1alpha2ResourceClassParametersReference(); buildable.setApiGroup(fluent.getApiGroup()); @@ -52,4 +30,5 @@ public V1alpha2ResourceClassParametersReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceFluent.java index ce659800ea..a8a59a32b6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceFluent.java @@ -1,25 +1,114 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2ResourceClassParametersReferenceFluent> extends Fluent{ - public String getApiGroup(); - public A withApiGroup(String apiGroup); - public Boolean hasApiGroup(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceClassParametersReferenceFluent> extends BaseFluent{ + public V1alpha2ResourceClassParametersReferenceFluent() { + } + public V1alpha2ResourceClassParametersReferenceFluent(V1alpha2ResourceClassParametersReference instance) { + this.copyInstance(instance); + } + private String apiGroup; + private String kind; + private String name; + private String namespace; + + protected void copyInstance(V1alpha2ResourceClassParametersReference instance) { + instance = (instance != null ? instance : new V1alpha2ResourceClassParametersReference()); + if (instance != null) { + this.withApiGroup(instance.getApiGroup()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + } + } + + public String getApiGroup() { + return this.apiGroup; + } + + public A withApiGroup(String apiGroup) { + this.apiGroup = apiGroup; + return (A) this; + } + + public boolean hasApiGroup() { + return this.apiGroup != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceClassParametersReferenceFluent that = (V1alpha2ResourceClassParametersReferenceFluent) o; + if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroup, kind, name, namespace, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceFluentImpl.java deleted file mode 100644 index 2aa74ebd90..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceClassParametersReferenceFluentImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceClassParametersReferenceFluentImpl> extends BaseFluent implements V1alpha2ResourceClassParametersReferenceFluent{ - public V1alpha2ResourceClassParametersReferenceFluentImpl() { - } - public V1alpha2ResourceClassParametersReferenceFluentImpl(V1alpha2ResourceClassParametersReference instance) { - if (instance != null) { - this.withApiGroup(instance.getApiGroup()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - } - private String apiGroup; - private String kind; - private String name; - private String namespace; - public String getApiGroup() { - return this.apiGroup; - } - public A withApiGroup(String apiGroup) { - this.apiGroup=apiGroup; return (A) this; - } - public Boolean hasApiGroup() { - return this.apiGroup != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceClassParametersReferenceFluentImpl that = (V1alpha2ResourceClassParametersReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiGroup, that.apiGroup)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroup, kind, name, namespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroup != null) { sb.append("apiGroup:"); sb.append(apiGroup + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleBuilder.java index 37703bfa20..3a2ecad212 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1alpha2ResourceHandleBuilder extends V1alpha2ResourceHandleFluentImpl implements VisitableBuilder{ +public class V1alpha2ResourceHandleBuilder extends V1alpha2ResourceHandleFluent implements VisitableBuilder{ public V1alpha2ResourceHandleBuilder() { - this(false); - } - public V1alpha2ResourceHandleBuilder(Boolean validationEnabled) { - this(new V1alpha2ResourceHandle(), validationEnabled); + this(new V1alpha2ResourceHandle()); } + public V1alpha2ResourceHandleBuilder(V1alpha2ResourceHandleFluent fluent) { - this(fluent, false); - } - public V1alpha2ResourceHandleBuilder(V1alpha2ResourceHandleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1alpha2ResourceHandle(), validationEnabled); + this(fluent, new V1alpha2ResourceHandle()); } + public V1alpha2ResourceHandleBuilder(V1alpha2ResourceHandleFluent fluent,V1alpha2ResourceHandle instance) { - this(fluent, instance, false); - } - public V1alpha2ResourceHandleBuilder(V1alpha2ResourceHandleFluent fluent,V1alpha2ResourceHandle instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withData(instance.getData()); - fluent.withDriverName(instance.getDriverName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1alpha2ResourceHandleBuilder(V1alpha2ResourceHandle instance) { - this(instance,false); - } - public V1alpha2ResourceHandleBuilder(V1alpha2ResourceHandle instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withData(instance.getData()); - this.withDriverName(instance.getDriverName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1alpha2ResourceHandleFluent fluent; - Boolean validationEnabled; + public V1alpha2ResourceHandle build() { V1alpha2ResourceHandle buildable = new V1alpha2ResourceHandle(); buildable.setData(fluent.getData()); @@ -46,4 +28,5 @@ public V1alpha2ResourceHandle build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleFluent.java index 45fb307245..9cafedb6ed 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1alpha2ResourceHandleFluent> extends Fluent{ - public String getData(); - public A withData(String data); - public Boolean hasData(); - public String getDriverName(); - public A withDriverName(String driverName); - public Boolean hasDriverName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1alpha2ResourceHandleFluent> extends BaseFluent{ + public V1alpha2ResourceHandleFluent() { + } + public V1alpha2ResourceHandleFluent(V1alpha2ResourceHandle instance) { + this.copyInstance(instance); + } + private String data; + private String driverName; + + protected void copyInstance(V1alpha2ResourceHandle instance) { + instance = (instance != null ? instance : new V1alpha2ResourceHandle()); + if (instance != null) { + this.withData(instance.getData()); + this.withDriverName(instance.getDriverName()); + } + } + + public String getData() { + return this.data; + } + + public A withData(String data) { + this.data = data; + return (A) this; + } + + public boolean hasData() { + return this.data != null; + } + + public String getDriverName() { + return this.driverName; + } + + public A withDriverName(String driverName) { + this.driverName = driverName; + return (A) this; + } + + public boolean hasDriverName() { + return this.driverName != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1alpha2ResourceHandleFluent that = (V1alpha2ResourceHandleFluent) o; + if (!java.util.Objects.equals(data, that.data)) return false; + if (!java.util.Objects.equals(driverName, that.driverName)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(data, driverName, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (data != null) { sb.append("data:"); sb.append(data + ","); } + if (driverName != null) { sb.append("driverName:"); sb.append(driverName); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleFluentImpl.java deleted file mode 100644 index dc7ae8c801..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha2ResourceHandleFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha2ResourceHandleFluentImpl> extends BaseFluent implements V1alpha2ResourceHandleFluent{ - public V1alpha2ResourceHandleFluentImpl() { - } - public V1alpha2ResourceHandleFluentImpl(V1alpha2ResourceHandle instance) { - if (instance != null) { - this.withData(instance.getData()); - this.withDriverName(instance.getDriverName()); - } - } - private String data; - private String driverName; - public String getData() { - return this.data; - } - public A withData(String data) { - this.data=data; return (A) this; - } - public Boolean hasData() { - return this.data != null; - } - public String getDriverName() { - return this.driverName; - } - public A withDriverName(String driverName) { - this.driverName=driverName; return (A) this; - } - public Boolean hasDriverName() { - return this.driverName != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1alpha2ResourceHandleFluentImpl that = (V1alpha2ResourceHandleFluentImpl) o; - if (!java.util.Objects.equals(data, that.data)) return false; - - if (!java.util.Objects.equals(driverName, that.driverName)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(data, driverName, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (data != null) { sb.append("data:"); sb.append(data + ","); } - if (driverName != null) { sb.append("driverName:"); sb.append(driverName); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotationBuilder.java new file mode 100644 index 0000000000..163138b010 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotationBuilder.java @@ -0,0 +1,32 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1AuditAnnotationBuilder extends V1beta1AuditAnnotationFluent implements VisitableBuilder{ + public V1beta1AuditAnnotationBuilder() { + this(new V1beta1AuditAnnotation()); + } + + public V1beta1AuditAnnotationBuilder(V1beta1AuditAnnotationFluent fluent) { + this(fluent, new V1beta1AuditAnnotation()); + } + + public V1beta1AuditAnnotationBuilder(V1beta1AuditAnnotationFluent fluent,V1beta1AuditAnnotation instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1AuditAnnotationBuilder(V1beta1AuditAnnotation instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1AuditAnnotationFluent fluent; + + public V1beta1AuditAnnotation build() { + V1beta1AuditAnnotation buildable = new V1beta1AuditAnnotation(); + buildable.setKey(fluent.getKey()); + buildable.setValueExpression(fluent.getValueExpression()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotationFluent.java similarity index 61% rename from fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationFluentImpl.java rename to fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotationFluent.java index ec4517b3f6..9753edff26 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1AuditAnnotationFluentImpl.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotationFluent.java @@ -4,55 +4,69 @@ import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1AuditAnnotationFluentImpl> extends BaseFluent implements V1alpha1AuditAnnotationFluent{ - public V1alpha1AuditAnnotationFluentImpl() { +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1AuditAnnotationFluent> extends BaseFluent{ + public V1beta1AuditAnnotationFluent() { } - public V1alpha1AuditAnnotationFluentImpl(V1alpha1AuditAnnotation instance) { - if (instance != null) { - this.withKey(instance.getKey()); - this.withValueExpression(instance.getValueExpression()); - } + + public V1beta1AuditAnnotationFluent(V1beta1AuditAnnotation instance) { + this.copyInstance(instance); } private String key; private String valueExpression; + + protected void copyInstance(V1beta1AuditAnnotation instance) { + instance = (instance != null ? instance : new V1beta1AuditAnnotation()); + if (instance != null) { + this.withKey(instance.getKey()); + this.withValueExpression(instance.getValueExpression()); + } + } + public String getKey() { return this.key; } + public A withKey(String key) { - this.key=key; return (A) this; + this.key = key; + return (A) this; } - public Boolean hasKey() { + + public boolean hasKey() { return this.key != null; } + public String getValueExpression() { return this.valueExpression; } + public A withValueExpression(String valueExpression) { - this.valueExpression=valueExpression; return (A) this; + this.valueExpression = valueExpression; + return (A) this; } - public Boolean hasValueExpression() { + + public boolean hasValueExpression() { return this.valueExpression != null; } + public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; - V1alpha1AuditAnnotationFluentImpl that = (V1alpha1AuditAnnotationFluentImpl) o; + V1beta1AuditAnnotationFluent that = (V1beta1AuditAnnotationFluent) o; if (!java.util.Objects.equals(key, that.key)) return false; - if (!java.util.Objects.equals(valueExpression, that.valueExpression)) return false; - return true; } + public int hashCode() { return java.util.Objects.hash(key, valueExpression, super.hashCode()); } + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); @@ -62,4 +76,5 @@ public String toString() { return sb.toString(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarningBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarningBuilder.java new file mode 100644 index 0000000000..19778b58eb --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarningBuilder.java @@ -0,0 +1,32 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ExpressionWarningBuilder extends V1beta1ExpressionWarningFluent implements VisitableBuilder{ + public V1beta1ExpressionWarningBuilder() { + this(new V1beta1ExpressionWarning()); + } + + public V1beta1ExpressionWarningBuilder(V1beta1ExpressionWarningFluent fluent) { + this(fluent, new V1beta1ExpressionWarning()); + } + + public V1beta1ExpressionWarningBuilder(V1beta1ExpressionWarningFluent fluent,V1beta1ExpressionWarning instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ExpressionWarningBuilder(V1beta1ExpressionWarning instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ExpressionWarningFluent fluent; + + public V1beta1ExpressionWarning build() { + V1beta1ExpressionWarning buildable = new V1beta1ExpressionWarning(); + buildable.setFieldRef(fluent.getFieldRef()); + buildable.setWarning(fluent.getWarning()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarningFluent.java similarity index 60% rename from fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningFluentImpl.java rename to fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarningFluent.java index cdbeccc9b9..8343d88e29 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ExpressionWarningFluentImpl.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarningFluent.java @@ -4,55 +4,69 @@ import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ExpressionWarningFluentImpl> extends BaseFluent implements V1alpha1ExpressionWarningFluent{ - public V1alpha1ExpressionWarningFluentImpl() { +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ExpressionWarningFluent> extends BaseFluent{ + public V1beta1ExpressionWarningFluent() { } - public V1alpha1ExpressionWarningFluentImpl(V1alpha1ExpressionWarning instance) { - if (instance != null) { - this.withFieldRef(instance.getFieldRef()); - this.withWarning(instance.getWarning()); - } + + public V1beta1ExpressionWarningFluent(V1beta1ExpressionWarning instance) { + this.copyInstance(instance); } private String fieldRef; private String warning; + + protected void copyInstance(V1beta1ExpressionWarning instance) { + instance = (instance != null ? instance : new V1beta1ExpressionWarning()); + if (instance != null) { + this.withFieldRef(instance.getFieldRef()); + this.withWarning(instance.getWarning()); + } + } + public String getFieldRef() { return this.fieldRef; } + public A withFieldRef(String fieldRef) { - this.fieldRef=fieldRef; return (A) this; + this.fieldRef = fieldRef; + return (A) this; } - public Boolean hasFieldRef() { + + public boolean hasFieldRef() { return this.fieldRef != null; } + public String getWarning() { return this.warning; } + public A withWarning(String warning) { - this.warning=warning; return (A) this; + this.warning = warning; + return (A) this; } - public Boolean hasWarning() { + + public boolean hasWarning() { return this.warning != null; } + public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; - V1alpha1ExpressionWarningFluentImpl that = (V1alpha1ExpressionWarningFluentImpl) o; + V1beta1ExpressionWarningFluent that = (V1beta1ExpressionWarningFluent) o; if (!java.util.Objects.equals(fieldRef, that.fieldRef)) return false; - if (!java.util.Objects.equals(warning, that.warning)) return false; - return true; } + public int hashCode() { return java.util.Objects.hash(fieldRef, warning, super.hashCode()); } + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); @@ -62,4 +76,5 @@ public String toString() { return sb.toString(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchConditionBuilder.java new file mode 100644 index 0000000000..60d6b67652 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchConditionBuilder.java @@ -0,0 +1,32 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1MatchConditionBuilder extends V1beta1MatchConditionFluent implements VisitableBuilder{ + public V1beta1MatchConditionBuilder() { + this(new V1beta1MatchCondition()); + } + + public V1beta1MatchConditionBuilder(V1beta1MatchConditionFluent fluent) { + this(fluent, new V1beta1MatchCondition()); + } + + public V1beta1MatchConditionBuilder(V1beta1MatchConditionFluent fluent,V1beta1MatchCondition instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1MatchConditionBuilder(V1beta1MatchCondition instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1MatchConditionFluent fluent; + + public V1beta1MatchCondition build() { + V1beta1MatchCondition buildable = new V1beta1MatchCondition(); + buildable.setExpression(fluent.getExpression()); + buildable.setName(fluent.getName()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchConditionFluent.java new file mode 100644 index 0000000000..314a60cb9c --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchConditionFluent.java @@ -0,0 +1,80 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1MatchConditionFluent> extends BaseFluent{ + public V1beta1MatchConditionFluent() { + } + + public V1beta1MatchConditionFluent(V1beta1MatchCondition instance) { + this.copyInstance(instance); + } + private String expression; + private String name; + + protected void copyInstance(V1beta1MatchCondition instance) { + instance = (instance != null ? instance : new V1beta1MatchCondition()); + if (instance != null) { + this.withExpression(instance.getExpression()); + this.withName(instance.getName()); + } + } + + public String getExpression() { + return this.expression; + } + + public A withExpression(String expression) { + this.expression = expression; + return (A) this; + } + + public boolean hasExpression() { + return this.expression != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1MatchConditionFluent that = (V1beta1MatchConditionFluent) o; + if (!java.util.Objects.equals(expression, that.expression)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(expression, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (expression != null) { sb.append("expression:"); sb.append(expression + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResourcesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResourcesBuilder.java new file mode 100644 index 0000000000..15a160c6b2 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResourcesBuilder.java @@ -0,0 +1,35 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1MatchResourcesBuilder extends V1beta1MatchResourcesFluent implements VisitableBuilder{ + public V1beta1MatchResourcesBuilder() { + this(new V1beta1MatchResources()); + } + + public V1beta1MatchResourcesBuilder(V1beta1MatchResourcesFluent fluent) { + this(fluent, new V1beta1MatchResources()); + } + + public V1beta1MatchResourcesBuilder(V1beta1MatchResourcesFluent fluent,V1beta1MatchResources instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1MatchResourcesBuilder(V1beta1MatchResources instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1MatchResourcesFluent fluent; + + public V1beta1MatchResources build() { + V1beta1MatchResources buildable = new V1beta1MatchResources(); + buildable.setExcludeResourceRules(fluent.buildExcludeResourceRules()); + buildable.setMatchPolicy(fluent.getMatchPolicy()); + buildable.setNamespaceSelector(fluent.buildNamespaceSelector()); + buildable.setObjectSelector(fluent.buildObjectSelector()); + buildable.setResourceRules(fluent.buildResourceRules()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResourcesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResourcesFluent.java new file mode 100644 index 0000000000..c0bcb8925f --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResourcesFluent.java @@ -0,0 +1,535 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.util.ArrayList; +import java.lang.String; +import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; +import java.util.Iterator; +import java.util.List; +import java.util.Collection; +import java.lang.Object; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1MatchResourcesFluent> extends BaseFluent{ + public V1beta1MatchResourcesFluent() { + } + + public V1beta1MatchResourcesFluent(V1beta1MatchResources instance) { + this.copyInstance(instance); + } + private ArrayList excludeResourceRules; + private String matchPolicy; + private V1LabelSelectorBuilder namespaceSelector; + private V1LabelSelectorBuilder objectSelector; + private ArrayList resourceRules; + + protected void copyInstance(V1beta1MatchResources instance) { + instance = (instance != null ? instance : new V1beta1MatchResources()); + if (instance != null) { + this.withExcludeResourceRules(instance.getExcludeResourceRules()); + this.withMatchPolicy(instance.getMatchPolicy()); + this.withNamespaceSelector(instance.getNamespaceSelector()); + this.withObjectSelector(instance.getObjectSelector()); + this.withResourceRules(instance.getResourceRules()); + } + } + + public A addToExcludeResourceRules(int index,V1beta1NamedRuleWithOperations item) { + if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} + V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item); + if (index < 0 || index >= excludeResourceRules.size()) { _visitables.get("excludeResourceRules").add(builder); excludeResourceRules.add(builder); } else { _visitables.get("excludeResourceRules").add(index, builder); excludeResourceRules.add(index, builder);} + return (A)this; + } + + public A setToExcludeResourceRules(int index,V1beta1NamedRuleWithOperations item) { + if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} + V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item); + if (index < 0 || index >= excludeResourceRules.size()) { _visitables.get("excludeResourceRules").add(builder); excludeResourceRules.add(builder); } else { _visitables.get("excludeResourceRules").set(index, builder); excludeResourceRules.set(index, builder);} + return (A)this; + } + + public A addToExcludeResourceRules(io.kubernetes.client.openapi.models.V1beta1NamedRuleWithOperations... items) { + if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} + for (V1beta1NamedRuleWithOperations item : items) {V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").add(builder);this.excludeResourceRules.add(builder);} return (A)this; + } + + public A addAllToExcludeResourceRules(Collection items) { + if (this.excludeResourceRules == null) {this.excludeResourceRules = new ArrayList();} + for (V1beta1NamedRuleWithOperations item : items) {V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").add(builder);this.excludeResourceRules.add(builder);} return (A)this; + } + + public A removeFromExcludeResourceRules(io.kubernetes.client.openapi.models.V1beta1NamedRuleWithOperations... items) { + if (this.excludeResourceRules == null) return (A)this; + for (V1beta1NamedRuleWithOperations item : items) {V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").remove(builder); this.excludeResourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromExcludeResourceRules(Collection items) { + if (this.excludeResourceRules == null) return (A)this; + for (V1beta1NamedRuleWithOperations item : items) {V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item);_visitables.get("excludeResourceRules").remove(builder); this.excludeResourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromExcludeResourceRules(Predicate predicate) { + if (excludeResourceRules == null) return (A) this; + final Iterator each = excludeResourceRules.iterator(); + final List visitables = _visitables.get("excludeResourceRules"); + while (each.hasNext()) { + V1beta1NamedRuleWithOperationsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildExcludeResourceRules() { + return this.excludeResourceRules != null ? build(excludeResourceRules) : null; + } + + public V1beta1NamedRuleWithOperations buildExcludeResourceRule(int index) { + return this.excludeResourceRules.get(index).build(); + } + + public V1beta1NamedRuleWithOperations buildFirstExcludeResourceRule() { + return this.excludeResourceRules.get(0).build(); + } + + public V1beta1NamedRuleWithOperations buildLastExcludeResourceRule() { + return this.excludeResourceRules.get(excludeResourceRules.size() - 1).build(); + } + + public V1beta1NamedRuleWithOperations buildMatchingExcludeResourceRule(Predicate predicate) { + for (V1beta1NamedRuleWithOperationsBuilder item : excludeResourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingExcludeResourceRule(Predicate predicate) { + for (V1beta1NamedRuleWithOperationsBuilder item : excludeResourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withExcludeResourceRules(List excludeResourceRules) { + if (this.excludeResourceRules != null) { + this._visitables.get("excludeResourceRules").clear(); + } + if (excludeResourceRules != null) { + this.excludeResourceRules = new ArrayList(); + for (V1beta1NamedRuleWithOperations item : excludeResourceRules) { + this.addToExcludeResourceRules(item); + } + } else { + this.excludeResourceRules = null; + } + return (A) this; + } + + public A withExcludeResourceRules(io.kubernetes.client.openapi.models.V1beta1NamedRuleWithOperations... excludeResourceRules) { + if (this.excludeResourceRules != null) { + this.excludeResourceRules.clear(); + _visitables.remove("excludeResourceRules"); + } + if (excludeResourceRules != null) { + for (V1beta1NamedRuleWithOperations item : excludeResourceRules) { + this.addToExcludeResourceRules(item); + } + } + return (A) this; + } + + public boolean hasExcludeResourceRules() { + return this.excludeResourceRules != null && !this.excludeResourceRules.isEmpty(); + } + + public ExcludeResourceRulesNested addNewExcludeResourceRule() { + return new ExcludeResourceRulesNested(-1, null); + } + + public ExcludeResourceRulesNested addNewExcludeResourceRuleLike(V1beta1NamedRuleWithOperations item) { + return new ExcludeResourceRulesNested(-1, item); + } + + public ExcludeResourceRulesNested setNewExcludeResourceRuleLike(int index,V1beta1NamedRuleWithOperations item) { + return new ExcludeResourceRulesNested(index, item); + } + + public ExcludeResourceRulesNested editExcludeResourceRule(int index) { + if (excludeResourceRules.size() <= index) throw new RuntimeException("Can't edit excludeResourceRules. Index exceeds size."); + return setNewExcludeResourceRuleLike(index, buildExcludeResourceRule(index)); + } + + public ExcludeResourceRulesNested editFirstExcludeResourceRule() { + if (excludeResourceRules.size() == 0) throw new RuntimeException("Can't edit first excludeResourceRules. The list is empty."); + return setNewExcludeResourceRuleLike(0, buildExcludeResourceRule(0)); + } + + public ExcludeResourceRulesNested editLastExcludeResourceRule() { + int index = excludeResourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last excludeResourceRules. The list is empty."); + return setNewExcludeResourceRuleLike(index, buildExcludeResourceRule(index)); + } + + public ExcludeResourceRulesNested editMatchingExcludeResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i withNewNamespaceSelector() { + return new NamespaceSelectorNested(null); + } + + public NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item) { + return new NamespaceSelectorNested(item); + } + + public NamespaceSelectorNested editNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(null)); + } + + public NamespaceSelectorNested editOrNewNamespaceSelector() { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item) { + return withNewNamespaceSelectorLike(java.util.Optional.ofNullable(buildNamespaceSelector()).orElse(item)); + } + + public V1LabelSelector buildObjectSelector() { + return this.objectSelector != null ? this.objectSelector.build() : null; + } + + public A withObjectSelector(V1LabelSelector objectSelector) { + this._visitables.remove("objectSelector"); + if (objectSelector != null) { + this.objectSelector = new V1LabelSelectorBuilder(objectSelector); + this._visitables.get("objectSelector").add(this.objectSelector); + } else { + this.objectSelector = null; + this._visitables.get("objectSelector").remove(this.objectSelector); + } + return (A) this; + } + + public boolean hasObjectSelector() { + return this.objectSelector != null; + } + + public ObjectSelectorNested withNewObjectSelector() { + return new ObjectSelectorNested(null); + } + + public ObjectSelectorNested withNewObjectSelectorLike(V1LabelSelector item) { + return new ObjectSelectorNested(item); + } + + public ObjectSelectorNested editObjectSelector() { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(null)); + } + + public ObjectSelectorNested editOrNewObjectSelector() { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public ObjectSelectorNested editOrNewObjectSelectorLike(V1LabelSelector item) { + return withNewObjectSelectorLike(java.util.Optional.ofNullable(buildObjectSelector()).orElse(item)); + } + + public A addToResourceRules(int index,V1beta1NamedRuleWithOperations item) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").add(index, builder); resourceRules.add(index, builder);} + return (A)this; + } + + public A setToResourceRules(int index,V1beta1NamedRuleWithOperations item) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").set(index, builder); resourceRules.set(index, builder);} + return (A)this; + } + + public A addToResourceRules(io.kubernetes.client.openapi.models.V1beta1NamedRuleWithOperations... items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1beta1NamedRuleWithOperations item : items) {V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A addAllToResourceRules(Collection items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1beta1NamedRuleWithOperations item : items) {V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1beta1NamedRuleWithOperations... items) { + if (this.resourceRules == null) return (A)this; + for (V1beta1NamedRuleWithOperations item : items) {V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromResourceRules(Collection items) { + if (this.resourceRules == null) return (A)this; + for (V1beta1NamedRuleWithOperations item : items) {V1beta1NamedRuleWithOperationsBuilder builder = new V1beta1NamedRuleWithOperationsBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromResourceRules(Predicate predicate) { + if (resourceRules == null) return (A) this; + final Iterator each = resourceRules.iterator(); + final List visitables = _visitables.get("resourceRules"); + while (each.hasNext()) { + V1beta1NamedRuleWithOperationsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResourceRules() { + return this.resourceRules != null ? build(resourceRules) : null; + } + + public V1beta1NamedRuleWithOperations buildResourceRule(int index) { + return this.resourceRules.get(index).build(); + } + + public V1beta1NamedRuleWithOperations buildFirstResourceRule() { + return this.resourceRules.get(0).build(); + } + + public V1beta1NamedRuleWithOperations buildLastResourceRule() { + return this.resourceRules.get(resourceRules.size() - 1).build(); + } + + public V1beta1NamedRuleWithOperations buildMatchingResourceRule(Predicate predicate) { + for (V1beta1NamedRuleWithOperationsBuilder item : resourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResourceRule(Predicate predicate) { + for (V1beta1NamedRuleWithOperationsBuilder item : resourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceRules(List resourceRules) { + if (this.resourceRules != null) { + this._visitables.get("resourceRules").clear(); + } + if (resourceRules != null) { + this.resourceRules = new ArrayList(); + for (V1beta1NamedRuleWithOperations item : resourceRules) { + this.addToResourceRules(item); + } + } else { + this.resourceRules = null; + } + return (A) this; + } + + public A withResourceRules(io.kubernetes.client.openapi.models.V1beta1NamedRuleWithOperations... resourceRules) { + if (this.resourceRules != null) { + this.resourceRules.clear(); + _visitables.remove("resourceRules"); + } + if (resourceRules != null) { + for (V1beta1NamedRuleWithOperations item : resourceRules) { + this.addToResourceRules(item); + } + } + return (A) this; + } + + public boolean hasResourceRules() { + return this.resourceRules != null && !this.resourceRules.isEmpty(); + } + + public ResourceRulesNested addNewResourceRule() { + return new ResourceRulesNested(-1, null); + } + + public ResourceRulesNested addNewResourceRuleLike(V1beta1NamedRuleWithOperations item) { + return new ResourceRulesNested(-1, item); + } + + public ResourceRulesNested setNewResourceRuleLike(int index,V1beta1NamedRuleWithOperations item) { + return new ResourceRulesNested(index, item); + } + + public ResourceRulesNested editResourceRule(int index) { + if (resourceRules.size() <= index) throw new RuntimeException("Can't edit resourceRules. Index exceeds size."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editFirstResourceRule() { + if (resourceRules.size() == 0) throw new RuntimeException("Can't edit first resourceRules. The list is empty."); + return setNewResourceRuleLike(0, buildResourceRule(0)); + } + + public ResourceRulesNested editLastResourceRule() { + int index = resourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resourceRules. The list is empty."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editMatchingResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta1NamedRuleWithOperationsFluent> implements Nested{ + ExcludeResourceRulesNested(int index,V1beta1NamedRuleWithOperations item) { + this.index = index; + this.builder = new V1beta1NamedRuleWithOperationsBuilder(this, item); + } + V1beta1NamedRuleWithOperationsBuilder builder; + int index; + + public N and() { + return (N) V1beta1MatchResourcesFluent.this.setToExcludeResourceRules(index,builder.build()); + } + + public N endExcludeResourceRule() { + return and(); + } + + + } + public class NamespaceSelectorNested extends V1LabelSelectorFluent> implements Nested{ + NamespaceSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1beta1MatchResourcesFluent.this.withNamespaceSelector(builder.build()); + } + + public N endNamespaceSelector() { + return and(); + } + + + } + public class ObjectSelectorNested extends V1LabelSelectorFluent> implements Nested{ + ObjectSelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1beta1MatchResourcesFluent.this.withObjectSelector(builder.build()); + } + + public N endObjectSelector() { + return and(); + } + + + } + public class ResourceRulesNested extends V1beta1NamedRuleWithOperationsFluent> implements Nested{ + ResourceRulesNested(int index,V1beta1NamedRuleWithOperations item) { + this.index = index; + this.builder = new V1beta1NamedRuleWithOperationsBuilder(this, item); + } + V1beta1NamedRuleWithOperationsBuilder builder; + int index; + + public N and() { + return (N) V1beta1MatchResourcesFluent.this.setToResourceRules(index,builder.build()); + } + + public N endResourceRule() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperationsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperationsBuilder.java new file mode 100644 index 0000000000..55248dd26c --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperationsBuilder.java @@ -0,0 +1,36 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1NamedRuleWithOperationsBuilder extends V1beta1NamedRuleWithOperationsFluent implements VisitableBuilder{ + public V1beta1NamedRuleWithOperationsBuilder() { + this(new V1beta1NamedRuleWithOperations()); + } + + public V1beta1NamedRuleWithOperationsBuilder(V1beta1NamedRuleWithOperationsFluent fluent) { + this(fluent, new V1beta1NamedRuleWithOperations()); + } + + public V1beta1NamedRuleWithOperationsBuilder(V1beta1NamedRuleWithOperationsFluent fluent,V1beta1NamedRuleWithOperations instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1NamedRuleWithOperationsBuilder(V1beta1NamedRuleWithOperations instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1NamedRuleWithOperationsFluent fluent; + + public V1beta1NamedRuleWithOperations build() { + V1beta1NamedRuleWithOperations buildable = new V1beta1NamedRuleWithOperations(); + buildable.setApiGroups(fluent.getApiGroups()); + buildable.setApiVersions(fluent.getApiVersions()); + buildable.setOperations(fluent.getOperations()); + buildable.setResourceNames(fluent.getResourceNames()); + buildable.setResources(fluent.getResources()); + buildable.setScope(fluent.getScope()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperationsFluent.java similarity index 57% rename from fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsFluentImpl.java rename to fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperationsFluent.java index 74e9fd67dd..0a6c0dda6e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1NamedRuleWithOperationsFluentImpl.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperationsFluent.java @@ -7,25 +7,18 @@ import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1NamedRuleWithOperationsFluentImpl> extends BaseFluent implements V1alpha1NamedRuleWithOperationsFluent{ - public V1alpha1NamedRuleWithOperationsFluentImpl() { - } - public V1alpha1NamedRuleWithOperationsFluentImpl(V1alpha1NamedRuleWithOperations instance) { - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withApiVersions(instance.getApiVersions()); - this.withOperations(instance.getOperations()); - this.withResourceNames(instance.getResourceNames()); - this.withResources(instance.getResources()); - this.withScope(instance.getScope()); - } +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1NamedRuleWithOperationsFluent> extends BaseFluent{ + public V1beta1NamedRuleWithOperationsFluent() { + } + + public V1beta1NamedRuleWithOperationsFluent(V1beta1NamedRuleWithOperations instance) { + this.copyInstance(instance); } private List apiGroups; private List apiVersions; @@ -33,292 +26,520 @@ public V1alpha1NamedRuleWithOperationsFluentImpl(V1alpha1NamedRuleWithOperations private List resourceNames; private List resources; private String scope; + + protected void copyInstance(V1beta1NamedRuleWithOperations instance) { + instance = (instance != null ? instance : new V1beta1NamedRuleWithOperations()); + if (instance != null) { + this.withApiGroups(instance.getApiGroups()); + this.withApiVersions(instance.getApiVersions()); + this.withOperations(instance.getOperations()); + this.withResourceNames(instance.getResourceNames()); + this.withResources(instance.getResources()); + this.withScope(instance.getScope()); + } + } + public A addToApiGroups(int index,String item) { if (this.apiGroups == null) {this.apiGroups = new ArrayList();} this.apiGroups.add(index, item); return (A)this; } + public A setToApiGroups(int index,String item) { if (this.apiGroups == null) {this.apiGroups = new ArrayList();} this.apiGroups.set(index, item); return (A)this; } + public A addToApiGroups(java.lang.String... items) { if (this.apiGroups == null) {this.apiGroups = new ArrayList();} for (String item : items) {this.apiGroups.add(item);} return (A)this; } + public A addAllToApiGroups(Collection items) { if (this.apiGroups == null) {this.apiGroups = new ArrayList();} for (String item : items) {this.apiGroups.add(item);} return (A)this; } + public A removeFromApiGroups(java.lang.String... items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; } + public A removeAllFromApiGroups(Collection items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; } + public List getApiGroups() { return this.apiGroups; } + public String getApiGroup(int index) { return this.apiGroups.get(index); } + public String getFirstApiGroup() { return this.apiGroups.get(0); } + public String getLastApiGroup() { return this.apiGroups.get(apiGroups.size() - 1); } + public String getMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return item;} } return null; + for (String item : apiGroups) { + if (predicate.test(item)) { + return item; + } + } + return null; } - public Boolean hasMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return true;} } return false; + + public boolean hasMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withApiGroups(List apiGroups) { - if (apiGroups != null) {this.apiGroups = new ArrayList(); for (String item : apiGroups){this.addToApiGroups(item);}} else { this.apiGroups = null;} return (A) this; + if (apiGroups != null) { + this.apiGroups = new ArrayList(); + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } else { + this.apiGroups = null; + } + return (A) this; } + public A withApiGroups(java.lang.String... apiGroups) { - if (this.apiGroups != null) {this.apiGroups.clear(); _visitables.remove("apiGroups"); } - if (apiGroups != null) {for (String item :apiGroups){ this.addToApiGroups(item);}} return (A) this; + if (this.apiGroups != null) { + this.apiGroups.clear(); + _visitables.remove("apiGroups"); + } + if (apiGroups != null) { + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } + return (A) this; } - public Boolean hasApiGroups() { - return apiGroups != null && !apiGroups.isEmpty(); + + public boolean hasApiGroups() { + return this.apiGroups != null && !this.apiGroups.isEmpty(); } + public A addToApiVersions(int index,String item) { if (this.apiVersions == null) {this.apiVersions = new ArrayList();} this.apiVersions.add(index, item); return (A)this; } + public A setToApiVersions(int index,String item) { if (this.apiVersions == null) {this.apiVersions = new ArrayList();} this.apiVersions.set(index, item); return (A)this; } + public A addToApiVersions(java.lang.String... items) { if (this.apiVersions == null) {this.apiVersions = new ArrayList();} for (String item : items) {this.apiVersions.add(item);} return (A)this; } + public A addAllToApiVersions(Collection items) { if (this.apiVersions == null) {this.apiVersions = new ArrayList();} for (String item : items) {this.apiVersions.add(item);} return (A)this; } + public A removeFromApiVersions(java.lang.String... items) { - for (String item : items) {if (this.apiVersions!= null){ this.apiVersions.remove(item);}} return (A)this; + if (this.apiVersions == null) return (A)this; + for (String item : items) { this.apiVersions.remove(item);} return (A)this; } + public A removeAllFromApiVersions(Collection items) { - for (String item : items) {if (this.apiVersions!= null){ this.apiVersions.remove(item);}} return (A)this; + if (this.apiVersions == null) return (A)this; + for (String item : items) { this.apiVersions.remove(item);} return (A)this; } + public List getApiVersions() { return this.apiVersions; } + public String getApiVersion(int index) { return this.apiVersions.get(index); } + public String getFirstApiVersion() { return this.apiVersions.get(0); } + public String getLastApiVersion() { return this.apiVersions.get(apiVersions.size() - 1); } + public String getMatchingApiVersion(Predicate predicate) { - for (String item: apiVersions) { if(predicate.test(item)){ return item;} } return null; + for (String item : apiVersions) { + if (predicate.test(item)) { + return item; + } + } + return null; } - public Boolean hasMatchingApiVersion(Predicate predicate) { - for (String item: apiVersions) { if(predicate.test(item)){ return true;} } return false; + + public boolean hasMatchingApiVersion(Predicate predicate) { + for (String item : apiVersions) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withApiVersions(List apiVersions) { - if (apiVersions != null) {this.apiVersions = new ArrayList(); for (String item : apiVersions){this.addToApiVersions(item);}} else { this.apiVersions = null;} return (A) this; + if (apiVersions != null) { + this.apiVersions = new ArrayList(); + for (String item : apiVersions) { + this.addToApiVersions(item); + } + } else { + this.apiVersions = null; + } + return (A) this; } + public A withApiVersions(java.lang.String... apiVersions) { - if (this.apiVersions != null) {this.apiVersions.clear(); _visitables.remove("apiVersions"); } - if (apiVersions != null) {for (String item :apiVersions){ this.addToApiVersions(item);}} return (A) this; + if (this.apiVersions != null) { + this.apiVersions.clear(); + _visitables.remove("apiVersions"); + } + if (apiVersions != null) { + for (String item : apiVersions) { + this.addToApiVersions(item); + } + } + return (A) this; } - public Boolean hasApiVersions() { - return apiVersions != null && !apiVersions.isEmpty(); + + public boolean hasApiVersions() { + return this.apiVersions != null && !this.apiVersions.isEmpty(); } + public A addToOperations(int index,String item) { if (this.operations == null) {this.operations = new ArrayList();} this.operations.add(index, item); return (A)this; } + public A setToOperations(int index,String item) { if (this.operations == null) {this.operations = new ArrayList();} this.operations.set(index, item); return (A)this; } + public A addToOperations(java.lang.String... items) { if (this.operations == null) {this.operations = new ArrayList();} for (String item : items) {this.operations.add(item);} return (A)this; } + public A addAllToOperations(Collection items) { if (this.operations == null) {this.operations = new ArrayList();} for (String item : items) {this.operations.add(item);} return (A)this; } + public A removeFromOperations(java.lang.String... items) { - for (String item : items) {if (this.operations!= null){ this.operations.remove(item);}} return (A)this; + if (this.operations == null) return (A)this; + for (String item : items) { this.operations.remove(item);} return (A)this; } + public A removeAllFromOperations(Collection items) { - for (String item : items) {if (this.operations!= null){ this.operations.remove(item);}} return (A)this; + if (this.operations == null) return (A)this; + for (String item : items) { this.operations.remove(item);} return (A)this; } + public List getOperations() { return this.operations; } + public String getOperation(int index) { return this.operations.get(index); } + public String getFirstOperation() { return this.operations.get(0); } + public String getLastOperation() { return this.operations.get(operations.size() - 1); } + public String getMatchingOperation(Predicate predicate) { - for (String item: operations) { if(predicate.test(item)){ return item;} } return null; + for (String item : operations) { + if (predicate.test(item)) { + return item; + } + } + return null; } - public Boolean hasMatchingOperation(Predicate predicate) { - for (String item: operations) { if(predicate.test(item)){ return true;} } return false; + + public boolean hasMatchingOperation(Predicate predicate) { + for (String item : operations) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withOperations(List operations) { - if (operations != null) {this.operations = new ArrayList(); for (String item : operations){this.addToOperations(item);}} else { this.operations = null;} return (A) this; + if (operations != null) { + this.operations = new ArrayList(); + for (String item : operations) { + this.addToOperations(item); + } + } else { + this.operations = null; + } + return (A) this; } + public A withOperations(java.lang.String... operations) { - if (this.operations != null) {this.operations.clear(); _visitables.remove("operations"); } - if (operations != null) {for (String item :operations){ this.addToOperations(item);}} return (A) this; + if (this.operations != null) { + this.operations.clear(); + _visitables.remove("operations"); + } + if (operations != null) { + for (String item : operations) { + this.addToOperations(item); + } + } + return (A) this; } - public Boolean hasOperations() { - return operations != null && !operations.isEmpty(); + + public boolean hasOperations() { + return this.operations != null && !this.operations.isEmpty(); } + public A addToResourceNames(int index,String item) { if (this.resourceNames == null) {this.resourceNames = new ArrayList();} this.resourceNames.add(index, item); return (A)this; } + public A setToResourceNames(int index,String item) { if (this.resourceNames == null) {this.resourceNames = new ArrayList();} this.resourceNames.set(index, item); return (A)this; } + public A addToResourceNames(java.lang.String... items) { if (this.resourceNames == null) {this.resourceNames = new ArrayList();} for (String item : items) {this.resourceNames.add(item);} return (A)this; } + public A addAllToResourceNames(Collection items) { if (this.resourceNames == null) {this.resourceNames = new ArrayList();} for (String item : items) {this.resourceNames.add(item);} return (A)this; } + public A removeFromResourceNames(java.lang.String... items) { - for (String item : items) {if (this.resourceNames!= null){ this.resourceNames.remove(item);}} return (A)this; + if (this.resourceNames == null) return (A)this; + for (String item : items) { this.resourceNames.remove(item);} return (A)this; } + public A removeAllFromResourceNames(Collection items) { - for (String item : items) {if (this.resourceNames!= null){ this.resourceNames.remove(item);}} return (A)this; + if (this.resourceNames == null) return (A)this; + for (String item : items) { this.resourceNames.remove(item);} return (A)this; } + public List getResourceNames() { return this.resourceNames; } + public String getResourceName(int index) { return this.resourceNames.get(index); } + public String getFirstResourceName() { return this.resourceNames.get(0); } + public String getLastResourceName() { return this.resourceNames.get(resourceNames.size() - 1); } + public String getMatchingResourceName(Predicate predicate) { - for (String item: resourceNames) { if(predicate.test(item)){ return item;} } return null; + for (String item : resourceNames) { + if (predicate.test(item)) { + return item; + } + } + return null; } - public Boolean hasMatchingResourceName(Predicate predicate) { - for (String item: resourceNames) { if(predicate.test(item)){ return true;} } return false; + + public boolean hasMatchingResourceName(Predicate predicate) { + for (String item : resourceNames) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withResourceNames(List resourceNames) { - if (resourceNames != null) {this.resourceNames = new ArrayList(); for (String item : resourceNames){this.addToResourceNames(item);}} else { this.resourceNames = null;} return (A) this; + if (resourceNames != null) { + this.resourceNames = new ArrayList(); + for (String item : resourceNames) { + this.addToResourceNames(item); + } + } else { + this.resourceNames = null; + } + return (A) this; } + public A withResourceNames(java.lang.String... resourceNames) { - if (this.resourceNames != null) {this.resourceNames.clear(); _visitables.remove("resourceNames"); } - if (resourceNames != null) {for (String item :resourceNames){ this.addToResourceNames(item);}} return (A) this; + if (this.resourceNames != null) { + this.resourceNames.clear(); + _visitables.remove("resourceNames"); + } + if (resourceNames != null) { + for (String item : resourceNames) { + this.addToResourceNames(item); + } + } + return (A) this; } - public Boolean hasResourceNames() { - return resourceNames != null && !resourceNames.isEmpty(); + + public boolean hasResourceNames() { + return this.resourceNames != null && !this.resourceNames.isEmpty(); } + public A addToResources(int index,String item) { if (this.resources == null) {this.resources = new ArrayList();} this.resources.add(index, item); return (A)this; } + public A setToResources(int index,String item) { if (this.resources == null) {this.resources = new ArrayList();} this.resources.set(index, item); return (A)this; } + public A addToResources(java.lang.String... items) { if (this.resources == null) {this.resources = new ArrayList();} for (String item : items) {this.resources.add(item);} return (A)this; } + public A addAllToResources(Collection items) { if (this.resources == null) {this.resources = new ArrayList();} for (String item : items) {this.resources.add(item);} return (A)this; } + public A removeFromResources(java.lang.String... items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; } + public A removeAllFromResources(Collection items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; } + public List getResources() { return this.resources; } + public String getResource(int index) { return this.resources.get(index); } + public String getFirstResource() { return this.resources.get(0); } + public String getLastResource() { return this.resources.get(resources.size() - 1); } + public String getMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return item;} } return null; + for (String item : resources) { + if (predicate.test(item)) { + return item; + } + } + return null; } - public Boolean hasMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return true;} } return false; + + public boolean hasMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withResources(List resources) { - if (resources != null) {this.resources = new ArrayList(); for (String item : resources){this.addToResources(item);}} else { this.resources = null;} return (A) this; + if (resources != null) { + this.resources = new ArrayList(); + for (String item : resources) { + this.addToResources(item); + } + } else { + this.resources = null; + } + return (A) this; } + public A withResources(java.lang.String... resources) { - if (this.resources != null) {this.resources.clear(); _visitables.remove("resources"); } - if (resources != null) {for (String item :resources){ this.addToResources(item);}} return (A) this; + if (this.resources != null) { + this.resources.clear(); + _visitables.remove("resources"); + } + if (resources != null) { + for (String item : resources) { + this.addToResources(item); + } + } + return (A) this; } - public Boolean hasResources() { - return resources != null && !resources.isEmpty(); + + public boolean hasResources() { + return this.resources != null && !this.resources.isEmpty(); } + public String getScope() { return this.scope; } + public A withScope(String scope) { - this.scope=scope; return (A) this; + this.scope = scope; + return (A) this; } - public Boolean hasScope() { + + public boolean hasScope() { return this.scope != null; } + public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; - V1alpha1NamedRuleWithOperationsFluentImpl that = (V1alpha1NamedRuleWithOperationsFluentImpl) o; + V1beta1NamedRuleWithOperationsFluent that = (V1beta1NamedRuleWithOperationsFluent) o; if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; - if (!java.util.Objects.equals(apiVersions, that.apiVersions)) return false; - if (!java.util.Objects.equals(operations, that.operations)) return false; - if (!java.util.Objects.equals(resourceNames, that.resourceNames)) return false; - if (!java.util.Objects.equals(resources, that.resources)) return false; - if (!java.util.Objects.equals(scope, that.scope)) return false; - return true; } + public int hashCode() { return java.util.Objects.hash(apiGroups, apiVersions, operations, resourceNames, resources, scope, super.hashCode()); } + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); @@ -332,4 +553,5 @@ public String toString() { return sb.toString(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKindBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKindBuilder.java new file mode 100644 index 0000000000..b064e68bad --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKindBuilder.java @@ -0,0 +1,32 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ParamKindBuilder extends V1beta1ParamKindFluent implements VisitableBuilder{ + public V1beta1ParamKindBuilder() { + this(new V1beta1ParamKind()); + } + + public V1beta1ParamKindBuilder(V1beta1ParamKindFluent fluent) { + this(fluent, new V1beta1ParamKind()); + } + + public V1beta1ParamKindBuilder(V1beta1ParamKindFluent fluent,V1beta1ParamKind instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ParamKindBuilder(V1beta1ParamKind instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ParamKindFluent fluent; + + public V1beta1ParamKind build() { + V1beta1ParamKind buildable = new V1beta1ParamKind(); + buildable.setApiVersion(fluent.getApiVersion()); + buildable.setKind(fluent.getKind()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKindFluent.java similarity index 62% rename from fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindFluentImpl.java rename to fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKindFluent.java index c74ad6c753..4e503b27bd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ParamKindFluentImpl.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKindFluent.java @@ -4,55 +4,69 @@ import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ParamKindFluentImpl> extends BaseFluent implements V1alpha1ParamKindFluent{ - public V1alpha1ParamKindFluentImpl() { +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ParamKindFluent> extends BaseFluent{ + public V1beta1ParamKindFluent() { } - public V1alpha1ParamKindFluentImpl(V1alpha1ParamKind instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - } + + public V1beta1ParamKindFluent(V1beta1ParamKind instance) { + this.copyInstance(instance); } private String apiVersion; private String kind; + + protected void copyInstance(V1beta1ParamKind instance) { + instance = (instance != null ? instance : new V1beta1ParamKind()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + } + } + public String getApiVersion() { return this.apiVersion; } + public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; + this.apiVersion = apiVersion; + return (A) this; } - public Boolean hasApiVersion() { + + public boolean hasApiVersion() { return this.apiVersion != null; } + public String getKind() { return this.kind; } + public A withKind(String kind) { - this.kind=kind; return (A) this; + this.kind = kind; + return (A) this; } - public Boolean hasKind() { + + public boolean hasKind() { return this.kind != null; } + public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; - V1alpha1ParamKindFluentImpl that = (V1alpha1ParamKindFluentImpl) o; + V1beta1ParamKindFluent that = (V1beta1ParamKindFluent) o; if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - if (!java.util.Objects.equals(kind, that.kind)) return false; - return true; } + public int hashCode() { return java.util.Objects.hash(apiVersion, kind, super.hashCode()); } + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); @@ -62,4 +76,5 @@ public String toString() { return sb.toString(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRefBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRefBuilder.java new file mode 100644 index 0000000000..0d6fa5b388 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRefBuilder.java @@ -0,0 +1,34 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ParamRefBuilder extends V1beta1ParamRefFluent implements VisitableBuilder{ + public V1beta1ParamRefBuilder() { + this(new V1beta1ParamRef()); + } + + public V1beta1ParamRefBuilder(V1beta1ParamRefFluent fluent) { + this(fluent, new V1beta1ParamRef()); + } + + public V1beta1ParamRefBuilder(V1beta1ParamRefFluent fluent,V1beta1ParamRef instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ParamRefBuilder(V1beta1ParamRef instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ParamRefFluent fluent; + + public V1beta1ParamRef build() { + V1beta1ParamRef buildable = new V1beta1ParamRef(); + buildable.setName(fluent.getName()); + buildable.setNamespace(fluent.getNamespace()); + buildable.setParameterNotFoundAction(fluent.getParameterNotFoundAction()); + buildable.setSelector(fluent.buildSelector()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRefFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRefFluent.java new file mode 100644 index 0000000000..ba61ba39bb --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRefFluent.java @@ -0,0 +1,157 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import io.kubernetes.client.fluent.Nested; +import java.lang.Object; +import java.lang.String; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ParamRefFluent> extends BaseFluent{ + public V1beta1ParamRefFluent() { + } + + public V1beta1ParamRefFluent(V1beta1ParamRef instance) { + this.copyInstance(instance); + } + private String name; + private String namespace; + private String parameterNotFoundAction; + private V1LabelSelectorBuilder selector; + + protected void copyInstance(V1beta1ParamRef instance) { + instance = (instance != null ? instance : new V1beta1ParamRef()); + if (instance != null) { + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + this.withParameterNotFoundAction(instance.getParameterNotFoundAction()); + this.withSelector(instance.getSelector()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public String getParameterNotFoundAction() { + return this.parameterNotFoundAction; + } + + public A withParameterNotFoundAction(String parameterNotFoundAction) { + this.parameterNotFoundAction = parameterNotFoundAction; + return (A) this; + } + + public boolean hasParameterNotFoundAction() { + return this.parameterNotFoundAction != null; + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); + } + + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1ParamRefFluent that = (V1beta1ParamRefFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + if (!java.util.Objects.equals(parameterNotFoundAction, that.parameterNotFoundAction)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, namespace, parameterNotFoundAction, selector, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); } + if (parameterNotFoundAction != null) { sb.append("parameterNotFoundAction:"); sb.append(parameterNotFoundAction + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector); } + sb.append("}"); + return sb.toString(); + } + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V1beta1ParamRefFluent.this.withSelector(builder.build()); + } + + public N endSelector() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewBuilder.java index 2ccd9cbf18..71a4fe4577 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta1SelfSubjectReviewBuilder extends V1beta1SelfSubjectReviewFluentImpl implements VisitableBuilder{ +public class V1beta1SelfSubjectReviewBuilder extends V1beta1SelfSubjectReviewFluent implements VisitableBuilder{ public V1beta1SelfSubjectReviewBuilder() { - this(false); - } - public V1beta1SelfSubjectReviewBuilder(Boolean validationEnabled) { - this(new V1beta1SelfSubjectReview(), validationEnabled); + this(new V1beta1SelfSubjectReview()); } + public V1beta1SelfSubjectReviewBuilder(V1beta1SelfSubjectReviewFluent fluent) { - this(fluent, false); - } - public V1beta1SelfSubjectReviewBuilder(V1beta1SelfSubjectReviewFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta1SelfSubjectReview(), validationEnabled); + this(fluent, new V1beta1SelfSubjectReview()); } + public V1beta1SelfSubjectReviewBuilder(V1beta1SelfSubjectReviewFluent fluent,V1beta1SelfSubjectReview instance) { - this(fluent, instance, false); - } - public V1beta1SelfSubjectReviewBuilder(V1beta1SelfSubjectReviewFluent fluent,V1beta1SelfSubjectReview instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta1SelfSubjectReviewBuilder(V1beta1SelfSubjectReview instance) { - this(instance,false); - } - public V1beta1SelfSubjectReviewBuilder(V1beta1SelfSubjectReview instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta1SelfSubjectReviewFluent fluent; - Boolean validationEnabled; + public V1beta1SelfSubjectReview build() { V1beta1SelfSubjectReview buildable = new V1beta1SelfSubjectReview(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewFluent.java index 0d44269849..64230a8b07 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewFluent.java @@ -1,61 +1,200 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta1SelfSubjectReviewFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1beta1SelfSubjectReviewFluent.MetadataNested withNewMetadata(); - public V1beta1SelfSubjectReviewFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1beta1SelfSubjectReviewFluent.MetadataNested editMetadata(); - public V1beta1SelfSubjectReviewFluent.MetadataNested editOrNewMetadata(); - public V1beta1SelfSubjectReviewFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta1SelfSubjectReviewStatus getStatus(); - public V1beta1SelfSubjectReviewStatus buildStatus(); - public A withStatus(V1beta1SelfSubjectReviewStatus status); - public Boolean hasStatus(); - public V1beta1SelfSubjectReviewFluent.StatusNested withNewStatus(); - public V1beta1SelfSubjectReviewFluent.StatusNested withNewStatusLike(V1beta1SelfSubjectReviewStatus item); - public V1beta1SelfSubjectReviewFluent.StatusNested editStatus(); - public V1beta1SelfSubjectReviewFluent.StatusNested editOrNewStatus(); - public V1beta1SelfSubjectReviewFluent.StatusNested editOrNewStatusLike(V1beta1SelfSubjectReviewStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1SelfSubjectReviewFluent> extends BaseFluent{ + public V1beta1SelfSubjectReviewFluent() { + } + + public V1beta1SelfSubjectReviewFluent(V1beta1SelfSubjectReview instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1beta1SelfSubjectReviewStatusBuilder status; + + protected void copyInstance(V1beta1SelfSubjectReview instance) { + instance = (instance != null ? instance : new V1beta1SelfSubjectReview()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); } - public interface StatusNested extends Nested,V1beta1SelfSubjectReviewStatusFluent>{ - public N and(); - public N endStatus(); + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1beta1SelfSubjectReviewStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1beta1SelfSubjectReviewStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1beta1SelfSubjectReviewStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1beta1SelfSubjectReviewStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1beta1SelfSubjectReviewStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1beta1SelfSubjectReviewStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1SelfSubjectReviewFluent that = (V1beta1SelfSubjectReviewFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1beta1SelfSubjectReviewFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } + public class StatusNested extends V1beta1SelfSubjectReviewStatusFluent> implements Nested{ + StatusNested(V1beta1SelfSubjectReviewStatus item) { + this.builder = new V1beta1SelfSubjectReviewStatusBuilder(this, item); + } + V1beta1SelfSubjectReviewStatusBuilder builder; + + public N and() { + return (N) V1beta1SelfSubjectReviewFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewFluentImpl.java deleted file mode 100644 index 702a95df62..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewFluentImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta1SelfSubjectReviewFluentImpl> extends BaseFluent implements V1beta1SelfSubjectReviewFluent{ - public V1beta1SelfSubjectReviewFluentImpl() { - } - public V1beta1SelfSubjectReviewFluentImpl(V1beta1SelfSubjectReview instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1beta1SelfSubjectReviewStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1beta1SelfSubjectReviewFluentImpl.MetadataNested withNewMetadata() { - return new V1beta1SelfSubjectReviewFluentImpl.MetadataNestedImpl(); - } - public V1beta1SelfSubjectReviewFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1beta1SelfSubjectReviewFluentImpl.MetadataNestedImpl(item); - } - public V1beta1SelfSubjectReviewFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1beta1SelfSubjectReviewFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1beta1SelfSubjectReviewFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta1SelfSubjectReviewStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1beta1SelfSubjectReviewStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1beta1SelfSubjectReviewStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1beta1SelfSubjectReviewStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1beta1SelfSubjectReviewFluentImpl.StatusNested withNewStatus() { - return new V1beta1SelfSubjectReviewFluentImpl.StatusNestedImpl(); - } - public V1beta1SelfSubjectReviewFluentImpl.StatusNested withNewStatusLike(V1beta1SelfSubjectReviewStatus item) { - return new V1beta1SelfSubjectReviewFluentImpl.StatusNestedImpl(item); - } - public V1beta1SelfSubjectReviewFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1beta1SelfSubjectReviewFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1beta1SelfSubjectReviewStatusBuilder().build()); - } - public V1beta1SelfSubjectReviewFluentImpl.StatusNested editOrNewStatusLike(V1beta1SelfSubjectReviewStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta1SelfSubjectReviewFluentImpl that = (V1beta1SelfSubjectReviewFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1beta1SelfSubjectReviewFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1beta1SelfSubjectReviewFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class StatusNestedImpl extends V1beta1SelfSubjectReviewStatusFluentImpl> implements V1beta1SelfSubjectReviewFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1beta1SelfSubjectReviewStatus item) { - this.builder = new V1beta1SelfSubjectReviewStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1beta1SelfSubjectReviewStatusBuilder(this); - } - V1beta1SelfSubjectReviewStatusBuilder builder; - public N and() { - return (N) V1beta1SelfSubjectReviewFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusBuilder.java index f2c5d1d9ae..79875333b0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta1SelfSubjectReviewStatusBuilder extends V1beta1SelfSubjectReviewStatusFluentImpl implements VisitableBuilder{ +public class V1beta1SelfSubjectReviewStatusBuilder extends V1beta1SelfSubjectReviewStatusFluent implements VisitableBuilder{ public V1beta1SelfSubjectReviewStatusBuilder() { - this(false); - } - public V1beta1SelfSubjectReviewStatusBuilder(Boolean validationEnabled) { - this(new V1beta1SelfSubjectReviewStatus(), validationEnabled); + this(new V1beta1SelfSubjectReviewStatus()); } + public V1beta1SelfSubjectReviewStatusBuilder(V1beta1SelfSubjectReviewStatusFluent fluent) { - this(fluent, false); - } - public V1beta1SelfSubjectReviewStatusBuilder(V1beta1SelfSubjectReviewStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta1SelfSubjectReviewStatus(), validationEnabled); + this(fluent, new V1beta1SelfSubjectReviewStatus()); } + public V1beta1SelfSubjectReviewStatusBuilder(V1beta1SelfSubjectReviewStatusFluent fluent,V1beta1SelfSubjectReviewStatus instance) { - this(fluent, instance, false); - } - public V1beta1SelfSubjectReviewStatusBuilder(V1beta1SelfSubjectReviewStatusFluent fluent,V1beta1SelfSubjectReviewStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withUserInfo(instance.getUserInfo()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta1SelfSubjectReviewStatusBuilder(V1beta1SelfSubjectReviewStatus instance) { - this(instance,false); - } - public V1beta1SelfSubjectReviewStatusBuilder(V1beta1SelfSubjectReviewStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withUserInfo(instance.getUserInfo()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta1SelfSubjectReviewStatusFluent fluent; - Boolean validationEnabled; + public V1beta1SelfSubjectReviewStatus build() { V1beta1SelfSubjectReviewStatus buildable = new V1beta1SelfSubjectReviewStatus(); - buildable.setUserInfo(fluent.getUserInfo()); + buildable.setUserInfo(fluent.buildUserInfo()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusFluent.java index 4d94364c2b..a608f18e16 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusFluent.java @@ -1,34 +1,106 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1beta1SelfSubjectReviewStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildUserInfo instead. - * @return The buildable object. - */ - @Deprecated - public V1UserInfo getUserInfo(); - public V1UserInfo buildUserInfo(); - public A withUserInfo(V1UserInfo userInfo); - public Boolean hasUserInfo(); - public V1beta1SelfSubjectReviewStatusFluent.UserInfoNested withNewUserInfo(); - public V1beta1SelfSubjectReviewStatusFluent.UserInfoNested withNewUserInfoLike(V1UserInfo item); - public V1beta1SelfSubjectReviewStatusFluent.UserInfoNested editUserInfo(); - public V1beta1SelfSubjectReviewStatusFluent.UserInfoNested editOrNewUserInfo(); - public V1beta1SelfSubjectReviewStatusFluent.UserInfoNested editOrNewUserInfoLike(V1UserInfo item); - public interface UserInfoNested extends Nested,V1UserInfoFluent>{ - public N and(); - public N endUserInfo(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1SelfSubjectReviewStatusFluent> extends BaseFluent{ + public V1beta1SelfSubjectReviewStatusFluent() { + } + + public V1beta1SelfSubjectReviewStatusFluent(V1beta1SelfSubjectReviewStatus instance) { + this.copyInstance(instance); + } + private V1UserInfoBuilder userInfo; + + protected void copyInstance(V1beta1SelfSubjectReviewStatus instance) { + instance = (instance != null ? instance : new V1beta1SelfSubjectReviewStatus()); + if (instance != null) { + this.withUserInfo(instance.getUserInfo()); + } + } + + public V1UserInfo buildUserInfo() { + return this.userInfo != null ? this.userInfo.build() : null; + } + + public A withUserInfo(V1UserInfo userInfo) { + this._visitables.remove("userInfo"); + if (userInfo != null) { + this.userInfo = new V1UserInfoBuilder(userInfo); + this._visitables.get("userInfo").add(this.userInfo); + } else { + this.userInfo = null; + this._visitables.get("userInfo").remove(this.userInfo); + } + return (A) this; + } + + public boolean hasUserInfo() { + return this.userInfo != null; + } + + public UserInfoNested withNewUserInfo() { + return new UserInfoNested(null); + } + + public UserInfoNested withNewUserInfoLike(V1UserInfo item) { + return new UserInfoNested(item); + } + + public UserInfoNested editUserInfo() { + return withNewUserInfoLike(java.util.Optional.ofNullable(buildUserInfo()).orElse(null)); + } + + public UserInfoNested editOrNewUserInfo() { + return withNewUserInfoLike(java.util.Optional.ofNullable(buildUserInfo()).orElse(new V1UserInfoBuilder().build())); + } + + public UserInfoNested editOrNewUserInfoLike(V1UserInfo item) { + return withNewUserInfoLike(java.util.Optional.ofNullable(buildUserInfo()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1SelfSubjectReviewStatusFluent that = (V1beta1SelfSubjectReviewStatusFluent) o; + if (!java.util.Objects.equals(userInfo, that.userInfo)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(userInfo, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (userInfo != null) { sb.append("userInfo:"); sb.append(userInfo); } + sb.append("}"); + return sb.toString(); } + public class UserInfoNested extends V1UserInfoFluent> implements Nested{ + UserInfoNested(V1UserInfo item) { + this.builder = new V1UserInfoBuilder(this, item); + } + V1UserInfoBuilder builder; + + public N and() { + return (N) V1beta1SelfSubjectReviewStatusFluent.this.withUserInfo(builder.build()); + } + + public N endUserInfo() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusFluentImpl.java deleted file mode 100644 index 37cc648898..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1SelfSubjectReviewStatusFluentImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta1SelfSubjectReviewStatusFluentImpl> extends BaseFluent implements V1beta1SelfSubjectReviewStatusFluent{ - public V1beta1SelfSubjectReviewStatusFluentImpl() { - } - public V1beta1SelfSubjectReviewStatusFluentImpl(V1beta1SelfSubjectReviewStatus instance) { - if (instance != null) { - this.withUserInfo(instance.getUserInfo()); - } - } - private V1UserInfoBuilder userInfo; - - /** - * This method has been deprecated, please use method buildUserInfo instead. - * @return The buildable object. - */ - @Deprecated - public V1UserInfo getUserInfo() { - return this.userInfo!=null ?this.userInfo.build():null; - } - public V1UserInfo buildUserInfo() { - return this.userInfo!=null ?this.userInfo.build():null; - } - public A withUserInfo(V1UserInfo userInfo) { - _visitables.get("userInfo").remove(this.userInfo); - if (userInfo!=null){ this.userInfo= new V1UserInfoBuilder(userInfo); _visitables.get("userInfo").add(this.userInfo);} else { this.userInfo = null; _visitables.get("userInfo").remove(this.userInfo); } return (A) this; - } - public Boolean hasUserInfo() { - return this.userInfo != null; - } - public V1beta1SelfSubjectReviewStatusFluentImpl.UserInfoNested withNewUserInfo() { - return new V1beta1SelfSubjectReviewStatusFluentImpl.UserInfoNestedImpl(); - } - public V1beta1SelfSubjectReviewStatusFluentImpl.UserInfoNested withNewUserInfoLike(V1UserInfo item) { - return new V1beta1SelfSubjectReviewStatusFluentImpl.UserInfoNestedImpl(item); - } - public V1beta1SelfSubjectReviewStatusFluentImpl.UserInfoNested editUserInfo() { - return withNewUserInfoLike(getUserInfo()); - } - public V1beta1SelfSubjectReviewStatusFluentImpl.UserInfoNested editOrNewUserInfo() { - return withNewUserInfoLike(getUserInfo() != null ? getUserInfo(): new V1UserInfoBuilder().build()); - } - public V1beta1SelfSubjectReviewStatusFluentImpl.UserInfoNested editOrNewUserInfoLike(V1UserInfo item) { - return withNewUserInfoLike(getUserInfo() != null ? getUserInfo(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta1SelfSubjectReviewStatusFluentImpl that = (V1beta1SelfSubjectReviewStatusFluentImpl) o; - if (!java.util.Objects.equals(userInfo, that.userInfo)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(userInfo, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (userInfo != null) { sb.append("userInfo:"); sb.append(userInfo); } - sb.append("}"); - return sb.toString(); - } - class UserInfoNestedImpl extends V1UserInfoFluentImpl> implements V1beta1SelfSubjectReviewStatusFluentImpl.UserInfoNested,Nested{ - UserInfoNestedImpl(V1UserInfo item) { - this.builder = new V1UserInfoBuilder(this, item); - } - UserInfoNestedImpl() { - this.builder = new V1UserInfoBuilder(this); - } - V1UserInfoBuilder builder; - public N and() { - return (N) V1beta1SelfSubjectReviewStatusFluentImpl.this.withUserInfo(builder.build()); - } - public N endUserInfo() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeCheckingBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeCheckingBuilder.java new file mode 100644 index 0000000000..b146a4ff47 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeCheckingBuilder.java @@ -0,0 +1,31 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1TypeCheckingBuilder extends V1beta1TypeCheckingFluent implements VisitableBuilder{ + public V1beta1TypeCheckingBuilder() { + this(new V1beta1TypeChecking()); + } + + public V1beta1TypeCheckingBuilder(V1beta1TypeCheckingFluent fluent) { + this(fluent, new V1beta1TypeChecking()); + } + + public V1beta1TypeCheckingBuilder(V1beta1TypeCheckingFluent fluent,V1beta1TypeChecking instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1TypeCheckingBuilder(V1beta1TypeChecking instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1TypeCheckingFluent fluent; + + public V1beta1TypeChecking build() { + V1beta1TypeChecking buildable = new V1beta1TypeChecking(); + buildable.setExpressionWarnings(fluent.buildExpressionWarnings()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeCheckingFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeCheckingFluent.java new file mode 100644 index 0000000000..e7ab629351 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeCheckingFluent.java @@ -0,0 +1,225 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.util.ArrayList; +import java.lang.String; +import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; +import java.util.Iterator; +import java.util.Collection; +import java.lang.Object; +import java.util.List; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1TypeCheckingFluent> extends BaseFluent{ + public V1beta1TypeCheckingFluent() { + } + + public V1beta1TypeCheckingFluent(V1beta1TypeChecking instance) { + this.copyInstance(instance); + } + private ArrayList expressionWarnings; + + protected void copyInstance(V1beta1TypeChecking instance) { + instance = (instance != null ? instance : new V1beta1TypeChecking()); + if (instance != null) { + this.withExpressionWarnings(instance.getExpressionWarnings()); + } + } + + public A addToExpressionWarnings(int index,V1beta1ExpressionWarning item) { + if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} + V1beta1ExpressionWarningBuilder builder = new V1beta1ExpressionWarningBuilder(item); + if (index < 0 || index >= expressionWarnings.size()) { _visitables.get("expressionWarnings").add(builder); expressionWarnings.add(builder); } else { _visitables.get("expressionWarnings").add(index, builder); expressionWarnings.add(index, builder);} + return (A)this; + } + + public A setToExpressionWarnings(int index,V1beta1ExpressionWarning item) { + if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} + V1beta1ExpressionWarningBuilder builder = new V1beta1ExpressionWarningBuilder(item); + if (index < 0 || index >= expressionWarnings.size()) { _visitables.get("expressionWarnings").add(builder); expressionWarnings.add(builder); } else { _visitables.get("expressionWarnings").set(index, builder); expressionWarnings.set(index, builder);} + return (A)this; + } + + public A addToExpressionWarnings(io.kubernetes.client.openapi.models.V1beta1ExpressionWarning... items) { + if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} + for (V1beta1ExpressionWarning item : items) {V1beta1ExpressionWarningBuilder builder = new V1beta1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").add(builder);this.expressionWarnings.add(builder);} return (A)this; + } + + public A addAllToExpressionWarnings(Collection items) { + if (this.expressionWarnings == null) {this.expressionWarnings = new ArrayList();} + for (V1beta1ExpressionWarning item : items) {V1beta1ExpressionWarningBuilder builder = new V1beta1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").add(builder);this.expressionWarnings.add(builder);} return (A)this; + } + + public A removeFromExpressionWarnings(io.kubernetes.client.openapi.models.V1beta1ExpressionWarning... items) { + if (this.expressionWarnings == null) return (A)this; + for (V1beta1ExpressionWarning item : items) {V1beta1ExpressionWarningBuilder builder = new V1beta1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").remove(builder); this.expressionWarnings.remove(builder);} return (A)this; + } + + public A removeAllFromExpressionWarnings(Collection items) { + if (this.expressionWarnings == null) return (A)this; + for (V1beta1ExpressionWarning item : items) {V1beta1ExpressionWarningBuilder builder = new V1beta1ExpressionWarningBuilder(item);_visitables.get("expressionWarnings").remove(builder); this.expressionWarnings.remove(builder);} return (A)this; + } + + public A removeMatchingFromExpressionWarnings(Predicate predicate) { + if (expressionWarnings == null) return (A) this; + final Iterator each = expressionWarnings.iterator(); + final List visitables = _visitables.get("expressionWarnings"); + while (each.hasNext()) { + V1beta1ExpressionWarningBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildExpressionWarnings() { + return this.expressionWarnings != null ? build(expressionWarnings) : null; + } + + public V1beta1ExpressionWarning buildExpressionWarning(int index) { + return this.expressionWarnings.get(index).build(); + } + + public V1beta1ExpressionWarning buildFirstExpressionWarning() { + return this.expressionWarnings.get(0).build(); + } + + public V1beta1ExpressionWarning buildLastExpressionWarning() { + return this.expressionWarnings.get(expressionWarnings.size() - 1).build(); + } + + public V1beta1ExpressionWarning buildMatchingExpressionWarning(Predicate predicate) { + for (V1beta1ExpressionWarningBuilder item : expressionWarnings) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingExpressionWarning(Predicate predicate) { + for (V1beta1ExpressionWarningBuilder item : expressionWarnings) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withExpressionWarnings(List expressionWarnings) { + if (this.expressionWarnings != null) { + this._visitables.get("expressionWarnings").clear(); + } + if (expressionWarnings != null) { + this.expressionWarnings = new ArrayList(); + for (V1beta1ExpressionWarning item : expressionWarnings) { + this.addToExpressionWarnings(item); + } + } else { + this.expressionWarnings = null; + } + return (A) this; + } + + public A withExpressionWarnings(io.kubernetes.client.openapi.models.V1beta1ExpressionWarning... expressionWarnings) { + if (this.expressionWarnings != null) { + this.expressionWarnings.clear(); + _visitables.remove("expressionWarnings"); + } + if (expressionWarnings != null) { + for (V1beta1ExpressionWarning item : expressionWarnings) { + this.addToExpressionWarnings(item); + } + } + return (A) this; + } + + public boolean hasExpressionWarnings() { + return this.expressionWarnings != null && !this.expressionWarnings.isEmpty(); + } + + public ExpressionWarningsNested addNewExpressionWarning() { + return new ExpressionWarningsNested(-1, null); + } + + public ExpressionWarningsNested addNewExpressionWarningLike(V1beta1ExpressionWarning item) { + return new ExpressionWarningsNested(-1, item); + } + + public ExpressionWarningsNested setNewExpressionWarningLike(int index,V1beta1ExpressionWarning item) { + return new ExpressionWarningsNested(index, item); + } + + public ExpressionWarningsNested editExpressionWarning(int index) { + if (expressionWarnings.size() <= index) throw new RuntimeException("Can't edit expressionWarnings. Index exceeds size."); + return setNewExpressionWarningLike(index, buildExpressionWarning(index)); + } + + public ExpressionWarningsNested editFirstExpressionWarning() { + if (expressionWarnings.size() == 0) throw new RuntimeException("Can't edit first expressionWarnings. The list is empty."); + return setNewExpressionWarningLike(0, buildExpressionWarning(0)); + } + + public ExpressionWarningsNested editLastExpressionWarning() { + int index = expressionWarnings.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last expressionWarnings. The list is empty."); + return setNewExpressionWarningLike(index, buildExpressionWarning(index)); + } + + public ExpressionWarningsNested editMatchingExpressionWarning(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta1ExpressionWarningFluent> implements Nested{ + ExpressionWarningsNested(int index,V1beta1ExpressionWarning item) { + this.index = index; + this.builder = new V1beta1ExpressionWarningBuilder(this, item); + } + V1beta1ExpressionWarningBuilder builder; + int index; + + public N and() { + return (N) V1beta1TypeCheckingFluent.this.setToExpressionWarnings(index,builder.build()); + } + + public N endExpressionWarning() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingBuilder.java new file mode 100644 index 0000000000..0025d41770 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingBuilder.java @@ -0,0 +1,34 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ValidatingAdmissionPolicyBindingBuilder extends V1beta1ValidatingAdmissionPolicyBindingFluent implements VisitableBuilder{ + public V1beta1ValidatingAdmissionPolicyBindingBuilder() { + this(new V1beta1ValidatingAdmissionPolicyBinding()); + } + + public V1beta1ValidatingAdmissionPolicyBindingBuilder(V1beta1ValidatingAdmissionPolicyBindingFluent fluent) { + this(fluent, new V1beta1ValidatingAdmissionPolicyBinding()); + } + + public V1beta1ValidatingAdmissionPolicyBindingBuilder(V1beta1ValidatingAdmissionPolicyBindingFluent fluent,V1beta1ValidatingAdmissionPolicyBinding instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ValidatingAdmissionPolicyBindingBuilder(V1beta1ValidatingAdmissionPolicyBinding instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ValidatingAdmissionPolicyBindingFluent fluent; + + public V1beta1ValidatingAdmissionPolicyBinding build() { + V1beta1ValidatingAdmissionPolicyBinding buildable = new V1beta1ValidatingAdmissionPolicyBinding(); + buildable.setApiVersion(fluent.getApiVersion()); + buildable.setKind(fluent.getKind()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingFluent.java new file mode 100644 index 0000000000..0f0ba17faa --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingFluent.java @@ -0,0 +1,200 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ValidatingAdmissionPolicyBindingFluent> extends BaseFluent{ + public V1beta1ValidatingAdmissionPolicyBindingFluent() { + } + + public V1beta1ValidatingAdmissionPolicyBindingFluent(V1beta1ValidatingAdmissionPolicyBinding instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1beta1ValidatingAdmissionPolicyBindingSpecBuilder spec; + + protected void copyInstance(V1beta1ValidatingAdmissionPolicyBinding instance) { + instance = (instance != null ? instance : new V1beta1ValidatingAdmissionPolicyBinding()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1beta1ValidatingAdmissionPolicyBindingSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1beta1ValidatingAdmissionPolicyBindingSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1beta1ValidatingAdmissionPolicyBindingSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1beta1ValidatingAdmissionPolicyBindingSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1beta1ValidatingAdmissionPolicyBindingSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1beta1ValidatingAdmissionPolicyBindingSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1ValidatingAdmissionPolicyBindingFluent that = (V1beta1ValidatingAdmissionPolicyBindingFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyBindingFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + + } + public class SpecNested extends V1beta1ValidatingAdmissionPolicyBindingSpecFluent> implements Nested{ + SpecNested(V1beta1ValidatingAdmissionPolicyBindingSpec item) { + this.builder = new V1beta1ValidatingAdmissionPolicyBindingSpecBuilder(this, item); + } + V1beta1ValidatingAdmissionPolicyBindingSpecBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyBindingFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingListBuilder.java new file mode 100644 index 0000000000..da4dbc7721 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingListBuilder.java @@ -0,0 +1,34 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ValidatingAdmissionPolicyBindingListBuilder extends V1beta1ValidatingAdmissionPolicyBindingListFluent implements VisitableBuilder{ + public V1beta1ValidatingAdmissionPolicyBindingListBuilder() { + this(new V1beta1ValidatingAdmissionPolicyBindingList()); + } + + public V1beta1ValidatingAdmissionPolicyBindingListBuilder(V1beta1ValidatingAdmissionPolicyBindingListFluent fluent) { + this(fluent, new V1beta1ValidatingAdmissionPolicyBindingList()); + } + + public V1beta1ValidatingAdmissionPolicyBindingListBuilder(V1beta1ValidatingAdmissionPolicyBindingListFluent fluent,V1beta1ValidatingAdmissionPolicyBindingList instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ValidatingAdmissionPolicyBindingListBuilder(V1beta1ValidatingAdmissionPolicyBindingList instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ValidatingAdmissionPolicyBindingListFluent fluent; + + public V1beta1ValidatingAdmissionPolicyBindingList build() { + V1beta1ValidatingAdmissionPolicyBindingList buildable = new V1beta1ValidatingAdmissionPolicyBindingList(); + buildable.setApiVersion(fluent.getApiVersion()); + buildable.setItems(fluent.buildItems()); + buildable.setKind(fluent.getKind()); + buildable.setMetadata(fluent.buildMetadata()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingListFluent.java new file mode 100644 index 0000000000..d4fffbf36e --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingListFluent.java @@ -0,0 +1,319 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.util.ArrayList; +import java.lang.String; +import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; +import java.util.Iterator; +import java.util.Collection; +import java.lang.Object; +import java.util.List; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ValidatingAdmissionPolicyBindingListFluent> extends BaseFluent{ + public V1beta1ValidatingAdmissionPolicyBindingListFluent() { + } + + public V1beta1ValidatingAdmissionPolicyBindingListFluent(V1beta1ValidatingAdmissionPolicyBindingList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1beta1ValidatingAdmissionPolicyBindingList instance) { + instance = (instance != null ? instance : new V1beta1ValidatingAdmissionPolicyBindingList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1beta1ValidatingAdmissionPolicyBinding item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta1ValidatingAdmissionPolicyBindingBuilder builder = new V1beta1ValidatingAdmissionPolicyBindingBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1beta1ValidatingAdmissionPolicyBinding item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta1ValidatingAdmissionPolicyBindingBuilder builder = new V1beta1ValidatingAdmissionPolicyBindingBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyBinding... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta1ValidatingAdmissionPolicyBinding item : items) {V1beta1ValidatingAdmissionPolicyBindingBuilder builder = new V1beta1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta1ValidatingAdmissionPolicyBinding item : items) {V1beta1ValidatingAdmissionPolicyBindingBuilder builder = new V1beta1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyBinding... items) { + if (this.items == null) return (A)this; + for (V1beta1ValidatingAdmissionPolicyBinding item : items) {V1beta1ValidatingAdmissionPolicyBindingBuilder builder = new V1beta1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1beta1ValidatingAdmissionPolicyBinding item : items) {V1beta1ValidatingAdmissionPolicyBindingBuilder builder = new V1beta1ValidatingAdmissionPolicyBindingBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1beta1ValidatingAdmissionPolicyBindingBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1beta1ValidatingAdmissionPolicyBinding buildItem(int index) { + return this.items.get(index).build(); + } + + public V1beta1ValidatingAdmissionPolicyBinding buildFirstItem() { + return this.items.get(0).build(); + } + + public V1beta1ValidatingAdmissionPolicyBinding buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1beta1ValidatingAdmissionPolicyBinding buildMatchingItem(Predicate predicate) { + for (V1beta1ValidatingAdmissionPolicyBindingBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1beta1ValidatingAdmissionPolicyBindingBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1beta1ValidatingAdmissionPolicyBinding item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyBinding... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1beta1ValidatingAdmissionPolicyBinding item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1beta1ValidatingAdmissionPolicyBinding item) { + return new ItemsNested(-1, item); + } + + public ItemsNested setNewItemLike(int index,V1beta1ValidatingAdmissionPolicyBinding item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1ValidatingAdmissionPolicyBindingListFluent that = (V1beta1ValidatingAdmissionPolicyBindingListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1beta1ValidatingAdmissionPolicyBindingFluent> implements Nested{ + ItemsNested(int index,V1beta1ValidatingAdmissionPolicyBinding item) { + this.index = index; + this.builder = new V1beta1ValidatingAdmissionPolicyBindingBuilder(this, item); + } + V1beta1ValidatingAdmissionPolicyBindingBuilder builder; + int index; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyBindingListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyBindingListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpecBuilder.java new file mode 100644 index 0000000000..c4cfe3f665 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpecBuilder.java @@ -0,0 +1,34 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ValidatingAdmissionPolicyBindingSpecBuilder extends V1beta1ValidatingAdmissionPolicyBindingSpecFluent implements VisitableBuilder{ + public V1beta1ValidatingAdmissionPolicyBindingSpecBuilder() { + this(new V1beta1ValidatingAdmissionPolicyBindingSpec()); + } + + public V1beta1ValidatingAdmissionPolicyBindingSpecBuilder(V1beta1ValidatingAdmissionPolicyBindingSpecFluent fluent) { + this(fluent, new V1beta1ValidatingAdmissionPolicyBindingSpec()); + } + + public V1beta1ValidatingAdmissionPolicyBindingSpecBuilder(V1beta1ValidatingAdmissionPolicyBindingSpecFluent fluent,V1beta1ValidatingAdmissionPolicyBindingSpec instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ValidatingAdmissionPolicyBindingSpecBuilder(V1beta1ValidatingAdmissionPolicyBindingSpec instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ValidatingAdmissionPolicyBindingSpecFluent fluent; + + public V1beta1ValidatingAdmissionPolicyBindingSpec build() { + V1beta1ValidatingAdmissionPolicyBindingSpec buildable = new V1beta1ValidatingAdmissionPolicyBindingSpec(); + buildable.setMatchResources(fluent.buildMatchResources()); + buildable.setParamRef(fluent.buildParamRef()); + buildable.setPolicyName(fluent.getPolicyName()); + buildable.setValidationActions(fluent.getValidationActions()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpecFluent.java new file mode 100644 index 0000000000..3e131d4d9e --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpecFluent.java @@ -0,0 +1,285 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.util.ArrayList; +import java.lang.String; +import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; +import java.util.Collection; +import java.lang.Object; +import java.util.List; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ValidatingAdmissionPolicyBindingSpecFluent> extends BaseFluent{ + public V1beta1ValidatingAdmissionPolicyBindingSpecFluent() { + } + + public V1beta1ValidatingAdmissionPolicyBindingSpecFluent(V1beta1ValidatingAdmissionPolicyBindingSpec instance) { + this.copyInstance(instance); + } + private V1beta1MatchResourcesBuilder matchResources; + private V1beta1ParamRefBuilder paramRef; + private String policyName; + private List validationActions; + + protected void copyInstance(V1beta1ValidatingAdmissionPolicyBindingSpec instance) { + instance = (instance != null ? instance : new V1beta1ValidatingAdmissionPolicyBindingSpec()); + if (instance != null) { + this.withMatchResources(instance.getMatchResources()); + this.withParamRef(instance.getParamRef()); + this.withPolicyName(instance.getPolicyName()); + this.withValidationActions(instance.getValidationActions()); + } + } + + public V1beta1MatchResources buildMatchResources() { + return this.matchResources != null ? this.matchResources.build() : null; + } + + public A withMatchResources(V1beta1MatchResources matchResources) { + this._visitables.remove("matchResources"); + if (matchResources != null) { + this.matchResources = new V1beta1MatchResourcesBuilder(matchResources); + this._visitables.get("matchResources").add(this.matchResources); + } else { + this.matchResources = null; + this._visitables.get("matchResources").remove(this.matchResources); + } + return (A) this; + } + + public boolean hasMatchResources() { + return this.matchResources != null; + } + + public MatchResourcesNested withNewMatchResources() { + return new MatchResourcesNested(null); + } + + public MatchResourcesNested withNewMatchResourcesLike(V1beta1MatchResources item) { + return new MatchResourcesNested(item); + } + + public MatchResourcesNested editMatchResources() { + return withNewMatchResourcesLike(java.util.Optional.ofNullable(buildMatchResources()).orElse(null)); + } + + public MatchResourcesNested editOrNewMatchResources() { + return withNewMatchResourcesLike(java.util.Optional.ofNullable(buildMatchResources()).orElse(new V1beta1MatchResourcesBuilder().build())); + } + + public MatchResourcesNested editOrNewMatchResourcesLike(V1beta1MatchResources item) { + return withNewMatchResourcesLike(java.util.Optional.ofNullable(buildMatchResources()).orElse(item)); + } + + public V1beta1ParamRef buildParamRef() { + return this.paramRef != null ? this.paramRef.build() : null; + } + + public A withParamRef(V1beta1ParamRef paramRef) { + this._visitables.remove("paramRef"); + if (paramRef != null) { + this.paramRef = new V1beta1ParamRefBuilder(paramRef); + this._visitables.get("paramRef").add(this.paramRef); + } else { + this.paramRef = null; + this._visitables.get("paramRef").remove(this.paramRef); + } + return (A) this; + } + + public boolean hasParamRef() { + return this.paramRef != null; + } + + public ParamRefNested withNewParamRef() { + return new ParamRefNested(null); + } + + public ParamRefNested withNewParamRefLike(V1beta1ParamRef item) { + return new ParamRefNested(item); + } + + public ParamRefNested editParamRef() { + return withNewParamRefLike(java.util.Optional.ofNullable(buildParamRef()).orElse(null)); + } + + public ParamRefNested editOrNewParamRef() { + return withNewParamRefLike(java.util.Optional.ofNullable(buildParamRef()).orElse(new V1beta1ParamRefBuilder().build())); + } + + public ParamRefNested editOrNewParamRefLike(V1beta1ParamRef item) { + return withNewParamRefLike(java.util.Optional.ofNullable(buildParamRef()).orElse(item)); + } + + public String getPolicyName() { + return this.policyName; + } + + public A withPolicyName(String policyName) { + this.policyName = policyName; + return (A) this; + } + + public boolean hasPolicyName() { + return this.policyName != null; + } + + public A addToValidationActions(int index,String item) { + if (this.validationActions == null) {this.validationActions = new ArrayList();} + this.validationActions.add(index, item); + return (A)this; + } + + public A setToValidationActions(int index,String item) { + if (this.validationActions == null) {this.validationActions = new ArrayList();} + this.validationActions.set(index, item); return (A)this; + } + + public A addToValidationActions(java.lang.String... items) { + if (this.validationActions == null) {this.validationActions = new ArrayList();} + for (String item : items) {this.validationActions.add(item);} return (A)this; + } + + public A addAllToValidationActions(Collection items) { + if (this.validationActions == null) {this.validationActions = new ArrayList();} + for (String item : items) {this.validationActions.add(item);} return (A)this; + } + + public A removeFromValidationActions(java.lang.String... items) { + if (this.validationActions == null) return (A)this; + for (String item : items) { this.validationActions.remove(item);} return (A)this; + } + + public A removeAllFromValidationActions(Collection items) { + if (this.validationActions == null) return (A)this; + for (String item : items) { this.validationActions.remove(item);} return (A)this; + } + + public List getValidationActions() { + return this.validationActions; + } + + public String getValidationAction(int index) { + return this.validationActions.get(index); + } + + public String getFirstValidationAction() { + return this.validationActions.get(0); + } + + public String getLastValidationAction() { + return this.validationActions.get(validationActions.size() - 1); + } + + public String getMatchingValidationAction(Predicate predicate) { + for (String item : validationActions) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingValidationAction(Predicate predicate) { + for (String item : validationActions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withValidationActions(List validationActions) { + if (validationActions != null) { + this.validationActions = new ArrayList(); + for (String item : validationActions) { + this.addToValidationActions(item); + } + } else { + this.validationActions = null; + } + return (A) this; + } + + public A withValidationActions(java.lang.String... validationActions) { + if (this.validationActions != null) { + this.validationActions.clear(); + _visitables.remove("validationActions"); + } + if (validationActions != null) { + for (String item : validationActions) { + this.addToValidationActions(item); + } + } + return (A) this; + } + + public boolean hasValidationActions() { + return this.validationActions != null && !this.validationActions.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1ValidatingAdmissionPolicyBindingSpecFluent that = (V1beta1ValidatingAdmissionPolicyBindingSpecFluent) o; + if (!java.util.Objects.equals(matchResources, that.matchResources)) return false; + if (!java.util.Objects.equals(paramRef, that.paramRef)) return false; + if (!java.util.Objects.equals(policyName, that.policyName)) return false; + if (!java.util.Objects.equals(validationActions, that.validationActions)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(matchResources, paramRef, policyName, validationActions, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (matchResources != null) { sb.append("matchResources:"); sb.append(matchResources + ","); } + if (paramRef != null) { sb.append("paramRef:"); sb.append(paramRef + ","); } + if (policyName != null) { sb.append("policyName:"); sb.append(policyName + ","); } + if (validationActions != null && !validationActions.isEmpty()) { sb.append("validationActions:"); sb.append(validationActions); } + sb.append("}"); + return sb.toString(); + } + public class MatchResourcesNested extends V1beta1MatchResourcesFluent> implements Nested{ + MatchResourcesNested(V1beta1MatchResources item) { + this.builder = new V1beta1MatchResourcesBuilder(this, item); + } + V1beta1MatchResourcesBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyBindingSpecFluent.this.withMatchResources(builder.build()); + } + + public N endMatchResources() { + return and(); + } + + + } + public class ParamRefNested extends V1beta1ParamRefFluent> implements Nested{ + ParamRefNested(V1beta1ParamRef item) { + this.builder = new V1beta1ParamRefBuilder(this, item); + } + V1beta1ParamRefBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyBindingSpecFluent.this.withParamRef(builder.build()); + } + + public N endParamRef() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBuilder.java new file mode 100644 index 0000000000..422df88d62 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBuilder.java @@ -0,0 +1,35 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ValidatingAdmissionPolicyBuilder extends V1beta1ValidatingAdmissionPolicyFluent implements VisitableBuilder{ + public V1beta1ValidatingAdmissionPolicyBuilder() { + this(new V1beta1ValidatingAdmissionPolicy()); + } + + public V1beta1ValidatingAdmissionPolicyBuilder(V1beta1ValidatingAdmissionPolicyFluent fluent) { + this(fluent, new V1beta1ValidatingAdmissionPolicy()); + } + + public V1beta1ValidatingAdmissionPolicyBuilder(V1beta1ValidatingAdmissionPolicyFluent fluent,V1beta1ValidatingAdmissionPolicy instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ValidatingAdmissionPolicyBuilder(V1beta1ValidatingAdmissionPolicy instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ValidatingAdmissionPolicyFluent fluent; + + public V1beta1ValidatingAdmissionPolicy build() { + V1beta1ValidatingAdmissionPolicy buildable = new V1beta1ValidatingAdmissionPolicy(); + buildable.setApiVersion(fluent.getApiVersion()); + buildable.setKind(fluent.getKind()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyFluent.java new file mode 100644 index 0000000000..fb026287d3 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyFluent.java @@ -0,0 +1,260 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ValidatingAdmissionPolicyFluent> extends BaseFluent{ + public V1beta1ValidatingAdmissionPolicyFluent() { + } + + public V1beta1ValidatingAdmissionPolicyFluent(V1beta1ValidatingAdmissionPolicy instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1beta1ValidatingAdmissionPolicySpecBuilder spec; + private V1beta1ValidatingAdmissionPolicyStatusBuilder status; + + protected void copyInstance(V1beta1ValidatingAdmissionPolicy instance) { + instance = (instance != null ? instance : new V1beta1ValidatingAdmissionPolicy()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1beta1ValidatingAdmissionPolicySpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1beta1ValidatingAdmissionPolicySpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1beta1ValidatingAdmissionPolicySpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); + } + + public SpecNested withNewSpecLike(V1beta1ValidatingAdmissionPolicySpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1beta1ValidatingAdmissionPolicySpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1beta1ValidatingAdmissionPolicySpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1beta1ValidatingAdmissionPolicyStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1beta1ValidatingAdmissionPolicyStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1beta1ValidatingAdmissionPolicyStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1beta1ValidatingAdmissionPolicyStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1beta1ValidatingAdmissionPolicyStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1beta1ValidatingAdmissionPolicyStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1ValidatingAdmissionPolicyFluent that = (V1beta1ValidatingAdmissionPolicyFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + + } + public class SpecNested extends V1beta1ValidatingAdmissionPolicySpecFluent> implements Nested{ + SpecNested(V1beta1ValidatingAdmissionPolicySpec item) { + this.builder = new V1beta1ValidatingAdmissionPolicySpecBuilder(this, item); + } + V1beta1ValidatingAdmissionPolicySpecBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyFluent.this.withSpec(builder.build()); + } + + public N endSpec() { + return and(); + } + + + } + public class StatusNested extends V1beta1ValidatingAdmissionPolicyStatusFluent> implements Nested{ + StatusNested(V1beta1ValidatingAdmissionPolicyStatus item) { + this.builder = new V1beta1ValidatingAdmissionPolicyStatusBuilder(this, item); + } + V1beta1ValidatingAdmissionPolicyStatusBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyListBuilder.java new file mode 100644 index 0000000000..bc311bf4f3 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyListBuilder.java @@ -0,0 +1,34 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ValidatingAdmissionPolicyListBuilder extends V1beta1ValidatingAdmissionPolicyListFluent implements VisitableBuilder{ + public V1beta1ValidatingAdmissionPolicyListBuilder() { + this(new V1beta1ValidatingAdmissionPolicyList()); + } + + public V1beta1ValidatingAdmissionPolicyListBuilder(V1beta1ValidatingAdmissionPolicyListFluent fluent) { + this(fluent, new V1beta1ValidatingAdmissionPolicyList()); + } + + public V1beta1ValidatingAdmissionPolicyListBuilder(V1beta1ValidatingAdmissionPolicyListFluent fluent,V1beta1ValidatingAdmissionPolicyList instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ValidatingAdmissionPolicyListBuilder(V1beta1ValidatingAdmissionPolicyList instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ValidatingAdmissionPolicyListFluent fluent; + + public V1beta1ValidatingAdmissionPolicyList build() { + V1beta1ValidatingAdmissionPolicyList buildable = new V1beta1ValidatingAdmissionPolicyList(); + buildable.setApiVersion(fluent.getApiVersion()); + buildable.setItems(fluent.buildItems()); + buildable.setKind(fluent.getKind()); + buildable.setMetadata(fluent.buildMetadata()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyListFluent.java new file mode 100644 index 0000000000..7353e234bc --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyListFluent.java @@ -0,0 +1,319 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.util.ArrayList; +import java.lang.String; +import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; +import java.util.Iterator; +import java.util.Collection; +import java.lang.Object; +import java.util.List; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ValidatingAdmissionPolicyListFluent> extends BaseFluent{ + public V1beta1ValidatingAdmissionPolicyListFluent() { + } + + public V1beta1ValidatingAdmissionPolicyListFluent(V1beta1ValidatingAdmissionPolicyList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1beta1ValidatingAdmissionPolicyList instance) { + instance = (instance != null ? instance : new V1beta1ValidatingAdmissionPolicyList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1beta1ValidatingAdmissionPolicy item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta1ValidatingAdmissionPolicyBuilder builder = new V1beta1ValidatingAdmissionPolicyBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1beta1ValidatingAdmissionPolicy item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta1ValidatingAdmissionPolicyBuilder builder = new V1beta1ValidatingAdmissionPolicyBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicy... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta1ValidatingAdmissionPolicy item : items) {V1beta1ValidatingAdmissionPolicyBuilder builder = new V1beta1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta1ValidatingAdmissionPolicy item : items) {V1beta1ValidatingAdmissionPolicyBuilder builder = new V1beta1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicy... items) { + if (this.items == null) return (A)this; + for (V1beta1ValidatingAdmissionPolicy item : items) {V1beta1ValidatingAdmissionPolicyBuilder builder = new V1beta1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1beta1ValidatingAdmissionPolicy item : items) {V1beta1ValidatingAdmissionPolicyBuilder builder = new V1beta1ValidatingAdmissionPolicyBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1beta1ValidatingAdmissionPolicyBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1beta1ValidatingAdmissionPolicy buildItem(int index) { + return this.items.get(index).build(); + } + + public V1beta1ValidatingAdmissionPolicy buildFirstItem() { + return this.items.get(0).build(); + } + + public V1beta1ValidatingAdmissionPolicy buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1beta1ValidatingAdmissionPolicy buildMatchingItem(Predicate predicate) { + for (V1beta1ValidatingAdmissionPolicyBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1beta1ValidatingAdmissionPolicyBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1beta1ValidatingAdmissionPolicy item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicy... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1beta1ValidatingAdmissionPolicy item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1beta1ValidatingAdmissionPolicy item) { + return new ItemsNested(-1, item); + } + + public ItemsNested setNewItemLike(int index,V1beta1ValidatingAdmissionPolicy item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1ValidatingAdmissionPolicyListFluent that = (V1beta1ValidatingAdmissionPolicyListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1beta1ValidatingAdmissionPolicyFluent> implements Nested{ + ItemsNested(int index,V1beta1ValidatingAdmissionPolicy item) { + this.index = index; + this.builder = new V1beta1ValidatingAdmissionPolicyBuilder(this, item); + } + V1beta1ValidatingAdmissionPolicyBuilder builder; + int index; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpecBuilder.java new file mode 100644 index 0000000000..06379dfea9 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpecBuilder.java @@ -0,0 +1,37 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ValidatingAdmissionPolicySpecBuilder extends V1beta1ValidatingAdmissionPolicySpecFluent implements VisitableBuilder{ + public V1beta1ValidatingAdmissionPolicySpecBuilder() { + this(new V1beta1ValidatingAdmissionPolicySpec()); + } + + public V1beta1ValidatingAdmissionPolicySpecBuilder(V1beta1ValidatingAdmissionPolicySpecFluent fluent) { + this(fluent, new V1beta1ValidatingAdmissionPolicySpec()); + } + + public V1beta1ValidatingAdmissionPolicySpecBuilder(V1beta1ValidatingAdmissionPolicySpecFluent fluent,V1beta1ValidatingAdmissionPolicySpec instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ValidatingAdmissionPolicySpecBuilder(V1beta1ValidatingAdmissionPolicySpec instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ValidatingAdmissionPolicySpecFluent fluent; + + public V1beta1ValidatingAdmissionPolicySpec build() { + V1beta1ValidatingAdmissionPolicySpec buildable = new V1beta1ValidatingAdmissionPolicySpec(); + buildable.setAuditAnnotations(fluent.buildAuditAnnotations()); + buildable.setFailurePolicy(fluent.getFailurePolicy()); + buildable.setMatchConditions(fluent.buildMatchConditions()); + buildable.setMatchConstraints(fluent.buildMatchConstraints()); + buildable.setParamKind(fluent.buildParamKind()); + buildable.setValidations(fluent.buildValidations()); + buildable.setVariables(fluent.buildVariables()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpecFluent.java new file mode 100644 index 0000000000..7e37dfeeb2 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpecFluent.java @@ -0,0 +1,881 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.util.ArrayList; +import java.lang.String; +import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; +import java.util.Iterator; +import java.util.List; +import java.util.Collection; +import java.lang.Object; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ValidatingAdmissionPolicySpecFluent> extends BaseFluent{ + public V1beta1ValidatingAdmissionPolicySpecFluent() { + } + + public V1beta1ValidatingAdmissionPolicySpecFluent(V1beta1ValidatingAdmissionPolicySpec instance) { + this.copyInstance(instance); + } + private ArrayList auditAnnotations; + private String failurePolicy; + private ArrayList matchConditions; + private V1beta1MatchResourcesBuilder matchConstraints; + private V1beta1ParamKindBuilder paramKind; + private ArrayList validations; + private ArrayList variables; + + protected void copyInstance(V1beta1ValidatingAdmissionPolicySpec instance) { + instance = (instance != null ? instance : new V1beta1ValidatingAdmissionPolicySpec()); + if (instance != null) { + this.withAuditAnnotations(instance.getAuditAnnotations()); + this.withFailurePolicy(instance.getFailurePolicy()); + this.withMatchConditions(instance.getMatchConditions()); + this.withMatchConstraints(instance.getMatchConstraints()); + this.withParamKind(instance.getParamKind()); + this.withValidations(instance.getValidations()); + this.withVariables(instance.getVariables()); + } + } + + public A addToAuditAnnotations(int index,V1beta1AuditAnnotation item) { + if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} + V1beta1AuditAnnotationBuilder builder = new V1beta1AuditAnnotationBuilder(item); + if (index < 0 || index >= auditAnnotations.size()) { _visitables.get("auditAnnotations").add(builder); auditAnnotations.add(builder); } else { _visitables.get("auditAnnotations").add(index, builder); auditAnnotations.add(index, builder);} + return (A)this; + } + + public A setToAuditAnnotations(int index,V1beta1AuditAnnotation item) { + if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} + V1beta1AuditAnnotationBuilder builder = new V1beta1AuditAnnotationBuilder(item); + if (index < 0 || index >= auditAnnotations.size()) { _visitables.get("auditAnnotations").add(builder); auditAnnotations.add(builder); } else { _visitables.get("auditAnnotations").set(index, builder); auditAnnotations.set(index, builder);} + return (A)this; + } + + public A addToAuditAnnotations(io.kubernetes.client.openapi.models.V1beta1AuditAnnotation... items) { + if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} + for (V1beta1AuditAnnotation item : items) {V1beta1AuditAnnotationBuilder builder = new V1beta1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").add(builder);this.auditAnnotations.add(builder);} return (A)this; + } + + public A addAllToAuditAnnotations(Collection items) { + if (this.auditAnnotations == null) {this.auditAnnotations = new ArrayList();} + for (V1beta1AuditAnnotation item : items) {V1beta1AuditAnnotationBuilder builder = new V1beta1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").add(builder);this.auditAnnotations.add(builder);} return (A)this; + } + + public A removeFromAuditAnnotations(io.kubernetes.client.openapi.models.V1beta1AuditAnnotation... items) { + if (this.auditAnnotations == null) return (A)this; + for (V1beta1AuditAnnotation item : items) {V1beta1AuditAnnotationBuilder builder = new V1beta1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").remove(builder); this.auditAnnotations.remove(builder);} return (A)this; + } + + public A removeAllFromAuditAnnotations(Collection items) { + if (this.auditAnnotations == null) return (A)this; + for (V1beta1AuditAnnotation item : items) {V1beta1AuditAnnotationBuilder builder = new V1beta1AuditAnnotationBuilder(item);_visitables.get("auditAnnotations").remove(builder); this.auditAnnotations.remove(builder);} return (A)this; + } + + public A removeMatchingFromAuditAnnotations(Predicate predicate) { + if (auditAnnotations == null) return (A) this; + final Iterator each = auditAnnotations.iterator(); + final List visitables = _visitables.get("auditAnnotations"); + while (each.hasNext()) { + V1beta1AuditAnnotationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildAuditAnnotations() { + return this.auditAnnotations != null ? build(auditAnnotations) : null; + } + + public V1beta1AuditAnnotation buildAuditAnnotation(int index) { + return this.auditAnnotations.get(index).build(); + } + + public V1beta1AuditAnnotation buildFirstAuditAnnotation() { + return this.auditAnnotations.get(0).build(); + } + + public V1beta1AuditAnnotation buildLastAuditAnnotation() { + return this.auditAnnotations.get(auditAnnotations.size() - 1).build(); + } + + public V1beta1AuditAnnotation buildMatchingAuditAnnotation(Predicate predicate) { + for (V1beta1AuditAnnotationBuilder item : auditAnnotations) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingAuditAnnotation(Predicate predicate) { + for (V1beta1AuditAnnotationBuilder item : auditAnnotations) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withAuditAnnotations(List auditAnnotations) { + if (this.auditAnnotations != null) { + this._visitables.get("auditAnnotations").clear(); + } + if (auditAnnotations != null) { + this.auditAnnotations = new ArrayList(); + for (V1beta1AuditAnnotation item : auditAnnotations) { + this.addToAuditAnnotations(item); + } + } else { + this.auditAnnotations = null; + } + return (A) this; + } + + public A withAuditAnnotations(io.kubernetes.client.openapi.models.V1beta1AuditAnnotation... auditAnnotations) { + if (this.auditAnnotations != null) { + this.auditAnnotations.clear(); + _visitables.remove("auditAnnotations"); + } + if (auditAnnotations != null) { + for (V1beta1AuditAnnotation item : auditAnnotations) { + this.addToAuditAnnotations(item); + } + } + return (A) this; + } + + public boolean hasAuditAnnotations() { + return this.auditAnnotations != null && !this.auditAnnotations.isEmpty(); + } + + public AuditAnnotationsNested addNewAuditAnnotation() { + return new AuditAnnotationsNested(-1, null); + } + + public AuditAnnotationsNested addNewAuditAnnotationLike(V1beta1AuditAnnotation item) { + return new AuditAnnotationsNested(-1, item); + } + + public AuditAnnotationsNested setNewAuditAnnotationLike(int index,V1beta1AuditAnnotation item) { + return new AuditAnnotationsNested(index, item); + } + + public AuditAnnotationsNested editAuditAnnotation(int index) { + if (auditAnnotations.size() <= index) throw new RuntimeException("Can't edit auditAnnotations. Index exceeds size."); + return setNewAuditAnnotationLike(index, buildAuditAnnotation(index)); + } + + public AuditAnnotationsNested editFirstAuditAnnotation() { + if (auditAnnotations.size() == 0) throw new RuntimeException("Can't edit first auditAnnotations. The list is empty."); + return setNewAuditAnnotationLike(0, buildAuditAnnotation(0)); + } + + public AuditAnnotationsNested editLastAuditAnnotation() { + int index = auditAnnotations.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last auditAnnotations. The list is empty."); + return setNewAuditAnnotationLike(index, buildAuditAnnotation(index)); + } + + public AuditAnnotationsNested editMatchingAuditAnnotation(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1beta1MatchConditionBuilder builder = new V1beta1MatchConditionBuilder(item); + if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").add(index, builder); matchConditions.add(index, builder);} + return (A)this; + } + + public A setToMatchConditions(int index,V1beta1MatchCondition item) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + V1beta1MatchConditionBuilder builder = new V1beta1MatchConditionBuilder(item); + if (index < 0 || index >= matchConditions.size()) { _visitables.get("matchConditions").add(builder); matchConditions.add(builder); } else { _visitables.get("matchConditions").set(index, builder); matchConditions.set(index, builder);} + return (A)this; + } + + public A addToMatchConditions(io.kubernetes.client.openapi.models.V1beta1MatchCondition... items) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + for (V1beta1MatchCondition item : items) {V1beta1MatchConditionBuilder builder = new V1beta1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; + } + + public A addAllToMatchConditions(Collection items) { + if (this.matchConditions == null) {this.matchConditions = new ArrayList();} + for (V1beta1MatchCondition item : items) {V1beta1MatchConditionBuilder builder = new V1beta1MatchConditionBuilder(item);_visitables.get("matchConditions").add(builder);this.matchConditions.add(builder);} return (A)this; + } + + public A removeFromMatchConditions(io.kubernetes.client.openapi.models.V1beta1MatchCondition... items) { + if (this.matchConditions == null) return (A)this; + for (V1beta1MatchCondition item : items) {V1beta1MatchConditionBuilder builder = new V1beta1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder); this.matchConditions.remove(builder);} return (A)this; + } + + public A removeAllFromMatchConditions(Collection items) { + if (this.matchConditions == null) return (A)this; + for (V1beta1MatchCondition item : items) {V1beta1MatchConditionBuilder builder = new V1beta1MatchConditionBuilder(item);_visitables.get("matchConditions").remove(builder); this.matchConditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromMatchConditions(Predicate predicate) { + if (matchConditions == null) return (A) this; + final Iterator each = matchConditions.iterator(); + final List visitables = _visitables.get("matchConditions"); + while (each.hasNext()) { + V1beta1MatchConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMatchConditions() { + return this.matchConditions != null ? build(matchConditions) : null; + } + + public V1beta1MatchCondition buildMatchCondition(int index) { + return this.matchConditions.get(index).build(); + } + + public V1beta1MatchCondition buildFirstMatchCondition() { + return this.matchConditions.get(0).build(); + } + + public V1beta1MatchCondition buildLastMatchCondition() { + return this.matchConditions.get(matchConditions.size() - 1).build(); + } + + public V1beta1MatchCondition buildMatchingMatchCondition(Predicate predicate) { + for (V1beta1MatchConditionBuilder item : matchConditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMatchCondition(Predicate predicate) { + for (V1beta1MatchConditionBuilder item : matchConditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMatchConditions(List matchConditions) { + if (this.matchConditions != null) { + this._visitables.get("matchConditions").clear(); + } + if (matchConditions != null) { + this.matchConditions = new ArrayList(); + for (V1beta1MatchCondition item : matchConditions) { + this.addToMatchConditions(item); + } + } else { + this.matchConditions = null; + } + return (A) this; + } + + public A withMatchConditions(io.kubernetes.client.openapi.models.V1beta1MatchCondition... matchConditions) { + if (this.matchConditions != null) { + this.matchConditions.clear(); + _visitables.remove("matchConditions"); + } + if (matchConditions != null) { + for (V1beta1MatchCondition item : matchConditions) { + this.addToMatchConditions(item); + } + } + return (A) this; + } + + public boolean hasMatchConditions() { + return this.matchConditions != null && !this.matchConditions.isEmpty(); + } + + public MatchConditionsNested addNewMatchCondition() { + return new MatchConditionsNested(-1, null); + } + + public MatchConditionsNested addNewMatchConditionLike(V1beta1MatchCondition item) { + return new MatchConditionsNested(-1, item); + } + + public MatchConditionsNested setNewMatchConditionLike(int index,V1beta1MatchCondition item) { + return new MatchConditionsNested(index, item); + } + + public MatchConditionsNested editMatchCondition(int index) { + if (matchConditions.size() <= index) throw new RuntimeException("Can't edit matchConditions. Index exceeds size."); + return setNewMatchConditionLike(index, buildMatchCondition(index)); + } + + public MatchConditionsNested editFirstMatchCondition() { + if (matchConditions.size() == 0) throw new RuntimeException("Can't edit first matchConditions. The list is empty."); + return setNewMatchConditionLike(0, buildMatchCondition(0)); + } + + public MatchConditionsNested editLastMatchCondition() { + int index = matchConditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last matchConditions. The list is empty."); + return setNewMatchConditionLike(index, buildMatchCondition(index)); + } + + public MatchConditionsNested editMatchingMatchCondition(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMatchConstraints() { + return new MatchConstraintsNested(null); + } + + public MatchConstraintsNested withNewMatchConstraintsLike(V1beta1MatchResources item) { + return new MatchConstraintsNested(item); + } + + public MatchConstraintsNested editMatchConstraints() { + return withNewMatchConstraintsLike(java.util.Optional.ofNullable(buildMatchConstraints()).orElse(null)); + } + + public MatchConstraintsNested editOrNewMatchConstraints() { + return withNewMatchConstraintsLike(java.util.Optional.ofNullable(buildMatchConstraints()).orElse(new V1beta1MatchResourcesBuilder().build())); + } + + public MatchConstraintsNested editOrNewMatchConstraintsLike(V1beta1MatchResources item) { + return withNewMatchConstraintsLike(java.util.Optional.ofNullable(buildMatchConstraints()).orElse(item)); + } + + public V1beta1ParamKind buildParamKind() { + return this.paramKind != null ? this.paramKind.build() : null; + } + + public A withParamKind(V1beta1ParamKind paramKind) { + this._visitables.remove("paramKind"); + if (paramKind != null) { + this.paramKind = new V1beta1ParamKindBuilder(paramKind); + this._visitables.get("paramKind").add(this.paramKind); + } else { + this.paramKind = null; + this._visitables.get("paramKind").remove(this.paramKind); + } + return (A) this; + } + + public boolean hasParamKind() { + return this.paramKind != null; + } + + public ParamKindNested withNewParamKind() { + return new ParamKindNested(null); + } + + public ParamKindNested withNewParamKindLike(V1beta1ParamKind item) { + return new ParamKindNested(item); + } + + public ParamKindNested editParamKind() { + return withNewParamKindLike(java.util.Optional.ofNullable(buildParamKind()).orElse(null)); + } + + public ParamKindNested editOrNewParamKind() { + return withNewParamKindLike(java.util.Optional.ofNullable(buildParamKind()).orElse(new V1beta1ParamKindBuilder().build())); + } + + public ParamKindNested editOrNewParamKindLike(V1beta1ParamKind item) { + return withNewParamKindLike(java.util.Optional.ofNullable(buildParamKind()).orElse(item)); + } + + public A addToValidations(int index,V1beta1Validation item) { + if (this.validations == null) {this.validations = new ArrayList();} + V1beta1ValidationBuilder builder = new V1beta1ValidationBuilder(item); + if (index < 0 || index >= validations.size()) { _visitables.get("validations").add(builder); validations.add(builder); } else { _visitables.get("validations").add(index, builder); validations.add(index, builder);} + return (A)this; + } + + public A setToValidations(int index,V1beta1Validation item) { + if (this.validations == null) {this.validations = new ArrayList();} + V1beta1ValidationBuilder builder = new V1beta1ValidationBuilder(item); + if (index < 0 || index >= validations.size()) { _visitables.get("validations").add(builder); validations.add(builder); } else { _visitables.get("validations").set(index, builder); validations.set(index, builder);} + return (A)this; + } + + public A addToValidations(io.kubernetes.client.openapi.models.V1beta1Validation... items) { + if (this.validations == null) {this.validations = new ArrayList();} + for (V1beta1Validation item : items) {V1beta1ValidationBuilder builder = new V1beta1ValidationBuilder(item);_visitables.get("validations").add(builder);this.validations.add(builder);} return (A)this; + } + + public A addAllToValidations(Collection items) { + if (this.validations == null) {this.validations = new ArrayList();} + for (V1beta1Validation item : items) {V1beta1ValidationBuilder builder = new V1beta1ValidationBuilder(item);_visitables.get("validations").add(builder);this.validations.add(builder);} return (A)this; + } + + public A removeFromValidations(io.kubernetes.client.openapi.models.V1beta1Validation... items) { + if (this.validations == null) return (A)this; + for (V1beta1Validation item : items) {V1beta1ValidationBuilder builder = new V1beta1ValidationBuilder(item);_visitables.get("validations").remove(builder); this.validations.remove(builder);} return (A)this; + } + + public A removeAllFromValidations(Collection items) { + if (this.validations == null) return (A)this; + for (V1beta1Validation item : items) {V1beta1ValidationBuilder builder = new V1beta1ValidationBuilder(item);_visitables.get("validations").remove(builder); this.validations.remove(builder);} return (A)this; + } + + public A removeMatchingFromValidations(Predicate predicate) { + if (validations == null) return (A) this; + final Iterator each = validations.iterator(); + final List visitables = _visitables.get("validations"); + while (each.hasNext()) { + V1beta1ValidationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildValidations() { + return this.validations != null ? build(validations) : null; + } + + public V1beta1Validation buildValidation(int index) { + return this.validations.get(index).build(); + } + + public V1beta1Validation buildFirstValidation() { + return this.validations.get(0).build(); + } + + public V1beta1Validation buildLastValidation() { + return this.validations.get(validations.size() - 1).build(); + } + + public V1beta1Validation buildMatchingValidation(Predicate predicate) { + for (V1beta1ValidationBuilder item : validations) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingValidation(Predicate predicate) { + for (V1beta1ValidationBuilder item : validations) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withValidations(List validations) { + if (this.validations != null) { + this._visitables.get("validations").clear(); + } + if (validations != null) { + this.validations = new ArrayList(); + for (V1beta1Validation item : validations) { + this.addToValidations(item); + } + } else { + this.validations = null; + } + return (A) this; + } + + public A withValidations(io.kubernetes.client.openapi.models.V1beta1Validation... validations) { + if (this.validations != null) { + this.validations.clear(); + _visitables.remove("validations"); + } + if (validations != null) { + for (V1beta1Validation item : validations) { + this.addToValidations(item); + } + } + return (A) this; + } + + public boolean hasValidations() { + return this.validations != null && !this.validations.isEmpty(); + } + + public ValidationsNested addNewValidation() { + return new ValidationsNested(-1, null); + } + + public ValidationsNested addNewValidationLike(V1beta1Validation item) { + return new ValidationsNested(-1, item); + } + + public ValidationsNested setNewValidationLike(int index,V1beta1Validation item) { + return new ValidationsNested(index, item); + } + + public ValidationsNested editValidation(int index) { + if (validations.size() <= index) throw new RuntimeException("Can't edit validations. Index exceeds size."); + return setNewValidationLike(index, buildValidation(index)); + } + + public ValidationsNested editFirstValidation() { + if (validations.size() == 0) throw new RuntimeException("Can't edit first validations. The list is empty."); + return setNewValidationLike(0, buildValidation(0)); + } + + public ValidationsNested editLastValidation() { + int index = validations.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last validations. The list is empty."); + return setNewValidationLike(index, buildValidation(index)); + } + + public ValidationsNested editMatchingValidation(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1beta1VariableBuilder builder = new V1beta1VariableBuilder(item); + if (index < 0 || index >= variables.size()) { _visitables.get("variables").add(builder); variables.add(builder); } else { _visitables.get("variables").add(index, builder); variables.add(index, builder);} + return (A)this; + } + + public A setToVariables(int index,V1beta1Variable item) { + if (this.variables == null) {this.variables = new ArrayList();} + V1beta1VariableBuilder builder = new V1beta1VariableBuilder(item); + if (index < 0 || index >= variables.size()) { _visitables.get("variables").add(builder); variables.add(builder); } else { _visitables.get("variables").set(index, builder); variables.set(index, builder);} + return (A)this; + } + + public A addToVariables(io.kubernetes.client.openapi.models.V1beta1Variable... items) { + if (this.variables == null) {this.variables = new ArrayList();} + for (V1beta1Variable item : items) {V1beta1VariableBuilder builder = new V1beta1VariableBuilder(item);_visitables.get("variables").add(builder);this.variables.add(builder);} return (A)this; + } + + public A addAllToVariables(Collection items) { + if (this.variables == null) {this.variables = new ArrayList();} + for (V1beta1Variable item : items) {V1beta1VariableBuilder builder = new V1beta1VariableBuilder(item);_visitables.get("variables").add(builder);this.variables.add(builder);} return (A)this; + } + + public A removeFromVariables(io.kubernetes.client.openapi.models.V1beta1Variable... items) { + if (this.variables == null) return (A)this; + for (V1beta1Variable item : items) {V1beta1VariableBuilder builder = new V1beta1VariableBuilder(item);_visitables.get("variables").remove(builder); this.variables.remove(builder);} return (A)this; + } + + public A removeAllFromVariables(Collection items) { + if (this.variables == null) return (A)this; + for (V1beta1Variable item : items) {V1beta1VariableBuilder builder = new V1beta1VariableBuilder(item);_visitables.get("variables").remove(builder); this.variables.remove(builder);} return (A)this; + } + + public A removeMatchingFromVariables(Predicate predicate) { + if (variables == null) return (A) this; + final Iterator each = variables.iterator(); + final List visitables = _visitables.get("variables"); + while (each.hasNext()) { + V1beta1VariableBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildVariables() { + return this.variables != null ? build(variables) : null; + } + + public V1beta1Variable buildVariable(int index) { + return this.variables.get(index).build(); + } + + public V1beta1Variable buildFirstVariable() { + return this.variables.get(0).build(); + } + + public V1beta1Variable buildLastVariable() { + return this.variables.get(variables.size() - 1).build(); + } + + public V1beta1Variable buildMatchingVariable(Predicate predicate) { + for (V1beta1VariableBuilder item : variables) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingVariable(Predicate predicate) { + for (V1beta1VariableBuilder item : variables) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVariables(List variables) { + if (this.variables != null) { + this._visitables.get("variables").clear(); + } + if (variables != null) { + this.variables = new ArrayList(); + for (V1beta1Variable item : variables) { + this.addToVariables(item); + } + } else { + this.variables = null; + } + return (A) this; + } + + public A withVariables(io.kubernetes.client.openapi.models.V1beta1Variable... variables) { + if (this.variables != null) { + this.variables.clear(); + _visitables.remove("variables"); + } + if (variables != null) { + for (V1beta1Variable item : variables) { + this.addToVariables(item); + } + } + return (A) this; + } + + public boolean hasVariables() { + return this.variables != null && !this.variables.isEmpty(); + } + + public VariablesNested addNewVariable() { + return new VariablesNested(-1, null); + } + + public VariablesNested addNewVariableLike(V1beta1Variable item) { + return new VariablesNested(-1, item); + } + + public VariablesNested setNewVariableLike(int index,V1beta1Variable item) { + return new VariablesNested(index, item); + } + + public VariablesNested editVariable(int index) { + if (variables.size() <= index) throw new RuntimeException("Can't edit variables. Index exceeds size."); + return setNewVariableLike(index, buildVariable(index)); + } + + public VariablesNested editFirstVariable() { + if (variables.size() == 0) throw new RuntimeException("Can't edit first variables. The list is empty."); + return setNewVariableLike(0, buildVariable(0)); + } + + public VariablesNested editLastVariable() { + int index = variables.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last variables. The list is empty."); + return setNewVariableLike(index, buildVariable(index)); + } + + public VariablesNested editMatchingVariable(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta1AuditAnnotationFluent> implements Nested{ + AuditAnnotationsNested(int index,V1beta1AuditAnnotation item) { + this.index = index; + this.builder = new V1beta1AuditAnnotationBuilder(this, item); + } + V1beta1AuditAnnotationBuilder builder; + int index; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicySpecFluent.this.setToAuditAnnotations(index,builder.build()); + } + + public N endAuditAnnotation() { + return and(); + } + + + } + public class MatchConditionsNested extends V1beta1MatchConditionFluent> implements Nested{ + MatchConditionsNested(int index,V1beta1MatchCondition item) { + this.index = index; + this.builder = new V1beta1MatchConditionBuilder(this, item); + } + V1beta1MatchConditionBuilder builder; + int index; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicySpecFluent.this.setToMatchConditions(index,builder.build()); + } + + public N endMatchCondition() { + return and(); + } + + + } + public class MatchConstraintsNested extends V1beta1MatchResourcesFluent> implements Nested{ + MatchConstraintsNested(V1beta1MatchResources item) { + this.builder = new V1beta1MatchResourcesBuilder(this, item); + } + V1beta1MatchResourcesBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicySpecFluent.this.withMatchConstraints(builder.build()); + } + + public N endMatchConstraints() { + return and(); + } + + + } + public class ParamKindNested extends V1beta1ParamKindFluent> implements Nested{ + ParamKindNested(V1beta1ParamKind item) { + this.builder = new V1beta1ParamKindBuilder(this, item); + } + V1beta1ParamKindBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicySpecFluent.this.withParamKind(builder.build()); + } + + public N endParamKind() { + return and(); + } + + + } + public class ValidationsNested extends V1beta1ValidationFluent> implements Nested{ + ValidationsNested(int index,V1beta1Validation item) { + this.index = index; + this.builder = new V1beta1ValidationBuilder(this, item); + } + V1beta1ValidationBuilder builder; + int index; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicySpecFluent.this.setToValidations(index,builder.build()); + } + + public N endValidation() { + return and(); + } + + + } + public class VariablesNested extends V1beta1VariableFluent> implements Nested{ + VariablesNested(int index,V1beta1Variable item) { + this.index = index; + this.builder = new V1beta1VariableBuilder(this, item); + } + V1beta1VariableBuilder builder; + int index; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicySpecFluent.this.setToVariables(index,builder.build()); + } + + public N endVariable() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatusBuilder.java new file mode 100644 index 0000000000..09b6037cf2 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatusBuilder.java @@ -0,0 +1,33 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ValidatingAdmissionPolicyStatusBuilder extends V1beta1ValidatingAdmissionPolicyStatusFluent implements VisitableBuilder{ + public V1beta1ValidatingAdmissionPolicyStatusBuilder() { + this(new V1beta1ValidatingAdmissionPolicyStatus()); + } + + public V1beta1ValidatingAdmissionPolicyStatusBuilder(V1beta1ValidatingAdmissionPolicyStatusFluent fluent) { + this(fluent, new V1beta1ValidatingAdmissionPolicyStatus()); + } + + public V1beta1ValidatingAdmissionPolicyStatusBuilder(V1beta1ValidatingAdmissionPolicyStatusFluent fluent,V1beta1ValidatingAdmissionPolicyStatus instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ValidatingAdmissionPolicyStatusBuilder(V1beta1ValidatingAdmissionPolicyStatus instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ValidatingAdmissionPolicyStatusFluent fluent; + + public V1beta1ValidatingAdmissionPolicyStatus build() { + V1beta1ValidatingAdmissionPolicyStatus buildable = new V1beta1ValidatingAdmissionPolicyStatus(); + buildable.setConditions(fluent.buildConditions()); + buildable.setObservedGeneration(fluent.getObservedGeneration()); + buildable.setTypeChecking(fluent.buildTypeChecking()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatusFluent.java new file mode 100644 index 0000000000..9ffa73097e --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatusFluent.java @@ -0,0 +1,303 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.Nested; +import java.util.ArrayList; +import java.lang.String; +import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Long; +import java.util.Iterator; +import java.util.Collection; +import java.lang.Object; +import java.util.List; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ValidatingAdmissionPolicyStatusFluent> extends BaseFluent{ + public V1beta1ValidatingAdmissionPolicyStatusFluent() { + } + + public V1beta1ValidatingAdmissionPolicyStatusFluent(V1beta1ValidatingAdmissionPolicyStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + private Long observedGeneration; + private V1beta1TypeCheckingBuilder typeChecking; + + protected void copyInstance(V1beta1ValidatingAdmissionPolicyStatus instance) { + instance = (instance != null ? instance : new V1beta1ValidatingAdmissionPolicyStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + this.withObservedGeneration(instance.getObservedGeneration()); + this.withTypeChecking(instance.getTypeChecking()); + } + } + + public A addToConditions(int index,V1Condition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ConditionBuilder builder = new V1ConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1Condition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1ConditionBuilder builder = new V1ConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1Condition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1Condition... items) { + if (this.conditions == null) return (A)this; + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1Condition item : items) {V1ConditionBuilder builder = new V1ConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1ConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1Condition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1Condition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1Condition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1Condition buildMatchingCondition(Predicate predicate) { + for (V1ConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1ConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1Condition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1Condition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1Condition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1Condition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1Condition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i withNewTypeChecking() { + return new TypeCheckingNested(null); + } + + public TypeCheckingNested withNewTypeCheckingLike(V1beta1TypeChecking item) { + return new TypeCheckingNested(item); + } + + public TypeCheckingNested editTypeChecking() { + return withNewTypeCheckingLike(java.util.Optional.ofNullable(buildTypeChecking()).orElse(null)); + } + + public TypeCheckingNested editOrNewTypeChecking() { + return withNewTypeCheckingLike(java.util.Optional.ofNullable(buildTypeChecking()).orElse(new V1beta1TypeCheckingBuilder().build())); + } + + public TypeCheckingNested editOrNewTypeCheckingLike(V1beta1TypeChecking item) { + return withNewTypeCheckingLike(java.util.Optional.ofNullable(buildTypeChecking()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta1ValidatingAdmissionPolicyStatusFluent that = (V1beta1ValidatingAdmissionPolicyStatusFluent) o; + if (!java.util.Objects.equals(conditions, that.conditions)) return false; + if (!java.util.Objects.equals(observedGeneration, that.observedGeneration)) return false; + if (!java.util.Objects.equals(typeChecking, that.typeChecking)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(conditions, observedGeneration, typeChecking, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (conditions != null && !conditions.isEmpty()) { sb.append("conditions:"); sb.append(conditions + ","); } + if (observedGeneration != null) { sb.append("observedGeneration:"); sb.append(observedGeneration + ","); } + if (typeChecking != null) { sb.append("typeChecking:"); sb.append(typeChecking); } + sb.append("}"); + return sb.toString(); + } + public class ConditionsNested extends V1ConditionFluent> implements Nested{ + ConditionsNested(int index,V1Condition item) { + this.index = index; + this.builder = new V1ConditionBuilder(this, item); + } + V1ConditionBuilder builder; + int index; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + public class TypeCheckingNested extends V1beta1TypeCheckingFluent> implements Nested{ + TypeCheckingNested(V1beta1TypeChecking item) { + this.builder = new V1beta1TypeCheckingBuilder(this, item); + } + V1beta1TypeCheckingBuilder builder; + + public N and() { + return (N) V1beta1ValidatingAdmissionPolicyStatusFluent.this.withTypeChecking(builder.build()); + } + + public N endTypeChecking() { + return and(); + } + + + } + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidationBuilder.java new file mode 100644 index 0000000000..3eca24a127 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidationBuilder.java @@ -0,0 +1,34 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1ValidationBuilder extends V1beta1ValidationFluent implements VisitableBuilder{ + public V1beta1ValidationBuilder() { + this(new V1beta1Validation()); + } + + public V1beta1ValidationBuilder(V1beta1ValidationFluent fluent) { + this(fluent, new V1beta1Validation()); + } + + public V1beta1ValidationBuilder(V1beta1ValidationFluent fluent,V1beta1Validation instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1ValidationBuilder(V1beta1Validation instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1ValidationFluent fluent; + + public V1beta1Validation build() { + V1beta1Validation buildable = new V1beta1Validation(); + buildable.setExpression(fluent.getExpression()); + buildable.setMessage(fluent.getMessage()); + buildable.setMessageExpression(fluent.getMessageExpression()); + buildable.setReason(fluent.getReason()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidationFluent.java similarity index 64% rename from fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationFluentImpl.java rename to fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidationFluent.java index a3654e576a..7599756be0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ValidationFluentImpl.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidationFluent.java @@ -4,81 +4,101 @@ import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1alpha1ValidationFluentImpl> extends BaseFluent implements V1alpha1ValidationFluent{ - public V1alpha1ValidationFluentImpl() { - } - public V1alpha1ValidationFluentImpl(V1alpha1Validation instance) { - if (instance != null) { - this.withExpression(instance.getExpression()); - this.withMessage(instance.getMessage()); - this.withMessageExpression(instance.getMessageExpression()); - this.withReason(instance.getReason()); - } +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1ValidationFluent> extends BaseFluent{ + public V1beta1ValidationFluent() { + } + + public V1beta1ValidationFluent(V1beta1Validation instance) { + this.copyInstance(instance); } private String expression; private String message; private String messageExpression; private String reason; + + protected void copyInstance(V1beta1Validation instance) { + instance = (instance != null ? instance : new V1beta1Validation()); + if (instance != null) { + this.withExpression(instance.getExpression()); + this.withMessage(instance.getMessage()); + this.withMessageExpression(instance.getMessageExpression()); + this.withReason(instance.getReason()); + } + } + public String getExpression() { return this.expression; } + public A withExpression(String expression) { - this.expression=expression; return (A) this; + this.expression = expression; + return (A) this; } - public Boolean hasExpression() { + + public boolean hasExpression() { return this.expression != null; } + public String getMessage() { return this.message; } + public A withMessage(String message) { - this.message=message; return (A) this; + this.message = message; + return (A) this; } - public Boolean hasMessage() { + + public boolean hasMessage() { return this.message != null; } + public String getMessageExpression() { return this.messageExpression; } + public A withMessageExpression(String messageExpression) { - this.messageExpression=messageExpression; return (A) this; + this.messageExpression = messageExpression; + return (A) this; } - public Boolean hasMessageExpression() { + + public boolean hasMessageExpression() { return this.messageExpression != null; } + public String getReason() { return this.reason; } + public A withReason(String reason) { - this.reason=reason; return (A) this; + this.reason = reason; + return (A) this; } - public Boolean hasReason() { + + public boolean hasReason() { return this.reason != null; } + public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; - V1alpha1ValidationFluentImpl that = (V1alpha1ValidationFluentImpl) o; + V1beta1ValidationFluent that = (V1beta1ValidationFluent) o; if (!java.util.Objects.equals(expression, that.expression)) return false; - if (!java.util.Objects.equals(message, that.message)) return false; - if (!java.util.Objects.equals(messageExpression, that.messageExpression)) return false; - if (!java.util.Objects.equals(reason, that.reason)) return false; - return true; } + public int hashCode() { return java.util.Objects.hash(expression, message, messageExpression, reason, super.hashCode()); } + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); @@ -90,4 +110,5 @@ public String toString() { return sb.toString(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1VariableBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1VariableBuilder.java new file mode 100644 index 0000000000..02c0dad473 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1VariableBuilder.java @@ -0,0 +1,32 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta1VariableBuilder extends V1beta1VariableFluent implements VisitableBuilder{ + public V1beta1VariableBuilder() { + this(new V1beta1Variable()); + } + + public V1beta1VariableBuilder(V1beta1VariableFluent fluent) { + this(fluent, new V1beta1Variable()); + } + + public V1beta1VariableBuilder(V1beta1VariableFluent fluent,V1beta1Variable instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta1VariableBuilder(V1beta1Variable instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta1VariableFluent fluent; + + public V1beta1Variable build() { + V1beta1Variable buildable = new V1beta1Variable(); + buildable.setExpression(fluent.getExpression()); + buildable.setName(fluent.getName()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1VariableFluent.java similarity index 62% rename from fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionFluentImpl.java rename to fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1VariableFluent.java index 4092de3cb5..f8ff4bcefe 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1MatchConditionFluentImpl.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta1VariableFluent.java @@ -4,55 +4,69 @@ import io.kubernetes.client.fluent.BaseFluent; import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1MatchConditionFluentImpl> extends BaseFluent implements V1MatchConditionFluent{ - public V1MatchConditionFluentImpl() { +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta1VariableFluent> extends BaseFluent{ + public V1beta1VariableFluent() { } - public V1MatchConditionFluentImpl(V1MatchCondition instance) { - if (instance != null) { - this.withExpression(instance.getExpression()); - this.withName(instance.getName()); - } + + public V1beta1VariableFluent(V1beta1Variable instance) { + this.copyInstance(instance); } private String expression; private String name; + + protected void copyInstance(V1beta1Variable instance) { + instance = (instance != null ? instance : new V1beta1Variable()); + if (instance != null) { + this.withExpression(instance.getExpression()); + this.withName(instance.getName()); + } + } + public String getExpression() { return this.expression; } + public A withExpression(String expression) { - this.expression=expression; return (A) this; + this.expression = expression; + return (A) this; } - public Boolean hasExpression() { + + public boolean hasExpression() { return this.expression != null; } + public String getName() { return this.name; } + public A withName(String name) { - this.name=name; return (A) this; + this.name = name; + return (A) this; } - public Boolean hasName() { + + public boolean hasName() { return this.name != null; } + public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; - V1MatchConditionFluentImpl that = (V1MatchConditionFluentImpl) o; + V1beta1VariableFluent that = (V1beta1VariableFluent) o; if (!java.util.Objects.equals(expression, that.expression)) return false; - if (!java.util.Objects.equals(name, that.name)) return false; - return true; } + public int hashCode() { return java.util.Objects.hash(expression, name, super.hashCode()); } + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); @@ -62,4 +76,5 @@ public String toString() { return sb.toString(); } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfigurationBuilder.java new file mode 100644 index 0000000000..277949766a --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfigurationBuilder.java @@ -0,0 +1,32 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta2ExemptPriorityLevelConfigurationBuilder extends V1beta2ExemptPriorityLevelConfigurationFluent implements VisitableBuilder{ + public V1beta2ExemptPriorityLevelConfigurationBuilder() { + this(new V1beta2ExemptPriorityLevelConfiguration()); + } + + public V1beta2ExemptPriorityLevelConfigurationBuilder(V1beta2ExemptPriorityLevelConfigurationFluent fluent) { + this(fluent, new V1beta2ExemptPriorityLevelConfiguration()); + } + + public V1beta2ExemptPriorityLevelConfigurationBuilder(V1beta2ExemptPriorityLevelConfigurationFluent fluent,V1beta2ExemptPriorityLevelConfiguration instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta2ExemptPriorityLevelConfigurationBuilder(V1beta2ExemptPriorityLevelConfiguration instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta2ExemptPriorityLevelConfigurationFluent fluent; + + public V1beta2ExemptPriorityLevelConfiguration build() { + V1beta2ExemptPriorityLevelConfiguration buildable = new V1beta2ExemptPriorityLevelConfiguration(); + buildable.setLendablePercent(fluent.getLendablePercent()); + buildable.setNominalConcurrencyShares(fluent.getNominalConcurrencyShares()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfigurationFluent.java new file mode 100644 index 0000000000..5822c4110d --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfigurationFluent.java @@ -0,0 +1,81 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.Integer; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2ExemptPriorityLevelConfigurationFluent> extends BaseFluent{ + public V1beta2ExemptPriorityLevelConfigurationFluent() { + } + + public V1beta2ExemptPriorityLevelConfigurationFluent(V1beta2ExemptPriorityLevelConfiguration instance) { + this.copyInstance(instance); + } + private Integer lendablePercent; + private Integer nominalConcurrencyShares; + + protected void copyInstance(V1beta2ExemptPriorityLevelConfiguration instance) { + instance = (instance != null ? instance : new V1beta2ExemptPriorityLevelConfiguration()); + if (instance != null) { + this.withLendablePercent(instance.getLendablePercent()); + this.withNominalConcurrencyShares(instance.getNominalConcurrencyShares()); + } + } + + public Integer getLendablePercent() { + return this.lendablePercent; + } + + public A withLendablePercent(Integer lendablePercent) { + this.lendablePercent = lendablePercent; + return (A) this; + } + + public boolean hasLendablePercent() { + return this.lendablePercent != null; + } + + public Integer getNominalConcurrencyShares() { + return this.nominalConcurrencyShares; + } + + public A withNominalConcurrencyShares(Integer nominalConcurrencyShares) { + this.nominalConcurrencyShares = nominalConcurrencyShares; + return (A) this; + } + + public boolean hasNominalConcurrencyShares() { + return this.nominalConcurrencyShares != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2ExemptPriorityLevelConfigurationFluent that = (V1beta2ExemptPriorityLevelConfigurationFluent) o; + if (!java.util.Objects.equals(lendablePercent, that.lendablePercent)) return false; + if (!java.util.Objects.equals(nominalConcurrencyShares, that.nominalConcurrencyShares)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lendablePercent, nominalConcurrencyShares, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lendablePercent != null) { sb.append("lendablePercent:"); sb.append(lendablePercent + ","); } + if (nominalConcurrencyShares != null) { sb.append("nominalConcurrencyShares:"); sb.append(nominalConcurrencyShares); } + sb.append("}"); + return sb.toString(); + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodBuilder.java index 1623208f28..59647c0de4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2FlowDistinguisherMethodBuilder extends V1beta2FlowDistinguisherMethodFluentImpl implements VisitableBuilder{ +public class V1beta2FlowDistinguisherMethodBuilder extends V1beta2FlowDistinguisherMethodFluent implements VisitableBuilder{ public V1beta2FlowDistinguisherMethodBuilder() { - this(false); - } - public V1beta2FlowDistinguisherMethodBuilder(Boolean validationEnabled) { - this(new V1beta2FlowDistinguisherMethod(), validationEnabled); + this(new V1beta2FlowDistinguisherMethod()); } + public V1beta2FlowDistinguisherMethodBuilder(V1beta2FlowDistinguisherMethodFluent fluent) { - this(fluent, false); - } - public V1beta2FlowDistinguisherMethodBuilder(V1beta2FlowDistinguisherMethodFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2FlowDistinguisherMethod(), validationEnabled); + this(fluent, new V1beta2FlowDistinguisherMethod()); } + public V1beta2FlowDistinguisherMethodBuilder(V1beta2FlowDistinguisherMethodFluent fluent,V1beta2FlowDistinguisherMethod instance) { - this(fluent, instance, false); - } - public V1beta2FlowDistinguisherMethodBuilder(V1beta2FlowDistinguisherMethodFluent fluent,V1beta2FlowDistinguisherMethod instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2FlowDistinguisherMethodBuilder(V1beta2FlowDistinguisherMethod instance) { - this(instance,false); - } - public V1beta2FlowDistinguisherMethodBuilder(V1beta2FlowDistinguisherMethod instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2FlowDistinguisherMethodFluent fluent; - Boolean validationEnabled; + public V1beta2FlowDistinguisherMethod build() { V1beta2FlowDistinguisherMethod buildable = new V1beta2FlowDistinguisherMethod(); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodFluent.java index 35349526d1..dfe954b01d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2FlowDistinguisherMethodFluent> extends Fluent{ - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2FlowDistinguisherMethodFluent> extends BaseFluent{ + public V1beta2FlowDistinguisherMethodFluent() { + } + public V1beta2FlowDistinguisherMethodFluent(V1beta2FlowDistinguisherMethod instance) { + this.copyInstance(instance); + } + private String type; + + protected void copyInstance(V1beta2FlowDistinguisherMethod instance) { + instance = (instance != null ? instance : new V1beta2FlowDistinguisherMethod()); + if (instance != null) { + this.withType(instance.getType()); + } + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2FlowDistinguisherMethodFluent that = (V1beta2FlowDistinguisherMethodFluent) o; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodFluentImpl.java deleted file mode 100644 index 69cfcf4da6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethodFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2FlowDistinguisherMethodFluentImpl> extends BaseFluent implements V1beta2FlowDistinguisherMethodFluent{ - public V1beta2FlowDistinguisherMethodFluentImpl() { - } - public V1beta2FlowDistinguisherMethodFluentImpl(V1beta2FlowDistinguisherMethod instance) { - if (instance != null) { - this.withType(instance.getType()); - } - } - private String type; - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2FlowDistinguisherMethodFluentImpl that = (V1beta2FlowDistinguisherMethodFluentImpl) o; - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaBuilder.java index 4b830bf98c..24a8d1ec97 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2FlowSchemaBuilder extends V1beta2FlowSchemaFluentImpl implements VisitableBuilder{ +public class V1beta2FlowSchemaBuilder extends V1beta2FlowSchemaFluent implements VisitableBuilder{ public V1beta2FlowSchemaBuilder() { - this(false); - } - public V1beta2FlowSchemaBuilder(Boolean validationEnabled) { - this(new V1beta2FlowSchema(), validationEnabled); + this(new V1beta2FlowSchema()); } + public V1beta2FlowSchemaBuilder(V1beta2FlowSchemaFluent fluent) { - this(fluent, false); - } - public V1beta2FlowSchemaBuilder(V1beta2FlowSchemaFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2FlowSchema(), validationEnabled); + this(fluent, new V1beta2FlowSchema()); } + public V1beta2FlowSchemaBuilder(V1beta2FlowSchemaFluent fluent,V1beta2FlowSchema instance) { - this(fluent, instance, false); - } - public V1beta2FlowSchemaBuilder(V1beta2FlowSchemaFluent fluent,V1beta2FlowSchema instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2FlowSchemaBuilder(V1beta2FlowSchema instance) { - this(instance,false); - } - public V1beta2FlowSchemaBuilder(V1beta2FlowSchema instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2FlowSchemaFluent fluent; - Boolean validationEnabled; + public V1beta2FlowSchema build() { V1beta2FlowSchema buildable = new V1beta2FlowSchema(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionBuilder.java index 19a36c018d..6e8a3fe531 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2FlowSchemaConditionBuilder extends V1beta2FlowSchemaConditionFluentImpl implements VisitableBuilder{ +public class V1beta2FlowSchemaConditionBuilder extends V1beta2FlowSchemaConditionFluent implements VisitableBuilder{ public V1beta2FlowSchemaConditionBuilder() { - this(false); - } - public V1beta2FlowSchemaConditionBuilder(Boolean validationEnabled) { - this(new V1beta2FlowSchemaCondition(), validationEnabled); + this(new V1beta2FlowSchemaCondition()); } + public V1beta2FlowSchemaConditionBuilder(V1beta2FlowSchemaConditionFluent fluent) { - this(fluent, false); - } - public V1beta2FlowSchemaConditionBuilder(V1beta2FlowSchemaConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2FlowSchemaCondition(), validationEnabled); + this(fluent, new V1beta2FlowSchemaCondition()); } + public V1beta2FlowSchemaConditionBuilder(V1beta2FlowSchemaConditionFluent fluent,V1beta2FlowSchemaCondition instance) { - this(fluent, instance, false); - } - public V1beta2FlowSchemaConditionBuilder(V1beta2FlowSchemaConditionFluent fluent,V1beta2FlowSchemaCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2FlowSchemaConditionBuilder(V1beta2FlowSchemaCondition instance) { - this(instance,false); - } - public V1beta2FlowSchemaConditionBuilder(V1beta2FlowSchemaCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2FlowSchemaConditionFluent fluent; - Boolean validationEnabled; + public V1beta2FlowSchemaCondition build() { V1beta2FlowSchemaCondition buildable = new V1beta2FlowSchemaCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1beta2FlowSchemaCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionFluent.java index 1a91d80d80..af4f90e86a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2FlowSchemaConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2FlowSchemaConditionFluent> extends BaseFluent{ + public V1beta2FlowSchemaConditionFluent() { + } + public V1beta2FlowSchemaConditionFluent(V1beta2FlowSchemaCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1beta2FlowSchemaCondition instance) { + instance = (instance != null ? instance : new V1beta2FlowSchemaCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2FlowSchemaConditionFluent that = (V1beta2FlowSchemaConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionFluentImpl.java deleted file mode 100644 index db8b44f66a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2FlowSchemaConditionFluentImpl> extends BaseFluent implements V1beta2FlowSchemaConditionFluent{ - public V1beta2FlowSchemaConditionFluentImpl() { - } - public V1beta2FlowSchemaConditionFluentImpl(V1beta2FlowSchemaCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2FlowSchemaConditionFluentImpl that = (V1beta2FlowSchemaConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaFluent.java index cd720c1fcb..295a4f23b4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta2FlowSchemaFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1beta2FlowSchemaFluent.MetadataNested withNewMetadata(); - public V1beta2FlowSchemaFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1beta2FlowSchemaFluent.MetadataNested editMetadata(); - public V1beta2FlowSchemaFluent.MetadataNested editOrNewMetadata(); - public V1beta2FlowSchemaFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2FlowSchemaSpec getSpec(); - public V1beta2FlowSchemaSpec buildSpec(); - public A withSpec(V1beta2FlowSchemaSpec spec); - public Boolean hasSpec(); - public V1beta2FlowSchemaFluent.SpecNested withNewSpec(); - public V1beta2FlowSchemaFluent.SpecNested withNewSpecLike(V1beta2FlowSchemaSpec item); - public V1beta2FlowSchemaFluent.SpecNested editSpec(); - public V1beta2FlowSchemaFluent.SpecNested editOrNewSpec(); - public V1beta2FlowSchemaFluent.SpecNested editOrNewSpecLike(V1beta2FlowSchemaSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2FlowSchemaStatus getStatus(); - public V1beta2FlowSchemaStatus buildStatus(); - public A withStatus(V1beta2FlowSchemaStatus status); - public Boolean hasStatus(); - public V1beta2FlowSchemaFluent.StatusNested withNewStatus(); - public V1beta2FlowSchemaFluent.StatusNested withNewStatusLike(V1beta2FlowSchemaStatus item); - public V1beta2FlowSchemaFluent.StatusNested editStatus(); - public V1beta2FlowSchemaFluent.StatusNested editOrNewStatus(); - public V1beta2FlowSchemaFluent.StatusNested editOrNewStatusLike(V1beta2FlowSchemaStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2FlowSchemaFluent> extends BaseFluent{ + public V1beta2FlowSchemaFluent() { + } + + public V1beta2FlowSchemaFluent(V1beta2FlowSchema instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1beta2FlowSchemaSpecBuilder spec; + private V1beta2FlowSchemaStatusBuilder status; + + protected void copyInstance(V1beta2FlowSchema instance) { + instance = (instance != null ? instance : new V1beta2FlowSchema()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1beta2FlowSchemaSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1beta2FlowSchemaSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1beta2FlowSchemaSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1beta2FlowSchemaSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1beta2FlowSchemaSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1beta2FlowSchemaSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1beta2FlowSchemaSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1beta2FlowSchemaStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1beta2FlowSchemaStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1beta2FlowSchemaStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1beta2FlowSchemaStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1beta2FlowSchemaStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1beta2FlowSchemaStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2FlowSchemaFluent that = (V1beta2FlowSchemaFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1beta2FlowSchemaFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1beta2FlowSchemaStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1beta2FlowSchemaSpecFluent> implements Nested{ + SpecNested(V1beta2FlowSchemaSpec item) { + this.builder = new V1beta2FlowSchemaSpecBuilder(this, item); + } + V1beta2FlowSchemaSpecBuilder builder; + + public N and() { + return (N) V1beta2FlowSchemaFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1beta2FlowSchemaStatusFluent> implements Nested{ + StatusNested(V1beta2FlowSchemaStatus item) { + this.builder = new V1beta2FlowSchemaStatusBuilder(this, item); + } + V1beta2FlowSchemaStatusBuilder builder; + + public N and() { + return (N) V1beta2FlowSchemaFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaFluentImpl.java deleted file mode 100644 index 66c0a57ab4..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2FlowSchemaFluentImpl> extends BaseFluent implements V1beta2FlowSchemaFluent{ - public V1beta2FlowSchemaFluentImpl() { - } - public V1beta2FlowSchemaFluentImpl(V1beta2FlowSchema instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1beta2FlowSchemaSpecBuilder spec; - private V1beta2FlowSchemaStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1beta2FlowSchemaFluentImpl.MetadataNested withNewMetadata() { - return new V1beta2FlowSchemaFluentImpl.MetadataNestedImpl(); - } - public V1beta2FlowSchemaFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1beta2FlowSchemaFluentImpl.MetadataNestedImpl(item); - } - public V1beta2FlowSchemaFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1beta2FlowSchemaFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1beta2FlowSchemaFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2FlowSchemaSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1beta2FlowSchemaSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1beta2FlowSchemaSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1beta2FlowSchemaSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1beta2FlowSchemaFluentImpl.SpecNested withNewSpec() { - return new V1beta2FlowSchemaFluentImpl.SpecNestedImpl(); - } - public V1beta2FlowSchemaFluentImpl.SpecNested withNewSpecLike(V1beta2FlowSchemaSpec item) { - return new V1beta2FlowSchemaFluentImpl.SpecNestedImpl(item); - } - public V1beta2FlowSchemaFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1beta2FlowSchemaFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1beta2FlowSchemaSpecBuilder().build()); - } - public V1beta2FlowSchemaFluentImpl.SpecNested editOrNewSpecLike(V1beta2FlowSchemaSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2FlowSchemaStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1beta2FlowSchemaStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1beta2FlowSchemaStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1beta2FlowSchemaStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1beta2FlowSchemaFluentImpl.StatusNested withNewStatus() { - return new V1beta2FlowSchemaFluentImpl.StatusNestedImpl(); - } - public V1beta2FlowSchemaFluentImpl.StatusNested withNewStatusLike(V1beta2FlowSchemaStatus item) { - return new V1beta2FlowSchemaFluentImpl.StatusNestedImpl(item); - } - public V1beta2FlowSchemaFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1beta2FlowSchemaFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1beta2FlowSchemaStatusBuilder().build()); - } - public V1beta2FlowSchemaFluentImpl.StatusNested editOrNewStatusLike(V1beta2FlowSchemaStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2FlowSchemaFluentImpl that = (V1beta2FlowSchemaFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1beta2FlowSchemaFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1beta2FlowSchemaFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1beta2FlowSchemaSpecFluentImpl> implements V1beta2FlowSchemaFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1beta2FlowSchemaSpec item) { - this.builder = new V1beta2FlowSchemaSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1beta2FlowSchemaSpecBuilder(this); - } - V1beta2FlowSchemaSpecBuilder builder; - public N and() { - return (N) V1beta2FlowSchemaFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1beta2FlowSchemaStatusFluentImpl> implements V1beta2FlowSchemaFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1beta2FlowSchemaStatus item) { - this.builder = new V1beta2FlowSchemaStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1beta2FlowSchemaStatusBuilder(this); - } - V1beta2FlowSchemaStatusBuilder builder; - public N and() { - return (N) V1beta2FlowSchemaFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListBuilder.java index 2f32875860..7b4944c7d3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2FlowSchemaListBuilder extends V1beta2FlowSchemaListFluentImpl implements VisitableBuilder{ +public class V1beta2FlowSchemaListBuilder extends V1beta2FlowSchemaListFluent implements VisitableBuilder{ public V1beta2FlowSchemaListBuilder() { - this(false); - } - public V1beta2FlowSchemaListBuilder(Boolean validationEnabled) { - this(new V1beta2FlowSchemaList(), validationEnabled); + this(new V1beta2FlowSchemaList()); } + public V1beta2FlowSchemaListBuilder(V1beta2FlowSchemaListFluent fluent) { - this(fluent, false); - } - public V1beta2FlowSchemaListBuilder(V1beta2FlowSchemaListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2FlowSchemaList(), validationEnabled); + this(fluent, new V1beta2FlowSchemaList()); } + public V1beta2FlowSchemaListBuilder(V1beta2FlowSchemaListFluent fluent,V1beta2FlowSchemaList instance) { - this(fluent, instance, false); - } - public V1beta2FlowSchemaListBuilder(V1beta2FlowSchemaListFluent fluent,V1beta2FlowSchemaList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2FlowSchemaListBuilder(V1beta2FlowSchemaList instance) { - this(instance,false); - } - public V1beta2FlowSchemaListBuilder(V1beta2FlowSchemaList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2FlowSchemaListFluent fluent; - Boolean validationEnabled; + public V1beta2FlowSchemaList build() { V1beta2FlowSchemaList buildable = new V1beta2FlowSchemaList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListFluent.java index 5a2ae76d15..9e543183d8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2FlowSchemaListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1beta2FlowSchema item); - public A setToItems(int index,V1beta2FlowSchema item); - public A addToItems(io.kubernetes.client.openapi.models.V1beta2FlowSchema... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1beta2FlowSchema... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1beta2FlowSchema buildItem(int index); - public V1beta2FlowSchema buildFirstItem(); - public V1beta2FlowSchema buildLastItem(); - public V1beta2FlowSchema buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1beta2FlowSchema... items); - public Boolean hasItems(); - public V1beta2FlowSchemaListFluent.ItemsNested addNewItem(); - public V1beta2FlowSchemaListFluent.ItemsNested addNewItemLike(V1beta2FlowSchema item); - public V1beta2FlowSchemaListFluent.ItemsNested setNewItemLike(int index,V1beta2FlowSchema item); - public V1beta2FlowSchemaListFluent.ItemsNested editItem(int index); - public V1beta2FlowSchemaListFluent.ItemsNested editFirstItem(); - public V1beta2FlowSchemaListFluent.ItemsNested editLastItem(); - public V1beta2FlowSchemaListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1beta2FlowSchemaListFluent.MetadataNested withNewMetadata(); - public V1beta2FlowSchemaListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1beta2FlowSchemaListFluent.MetadataNested editMetadata(); - public V1beta2FlowSchemaListFluent.MetadataNested editOrNewMetadata(); - public V1beta2FlowSchemaListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1beta2FlowSchemaFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2FlowSchemaListFluent> extends BaseFluent{ + public V1beta2FlowSchemaListFluent() { + } + + public V1beta2FlowSchemaListFluent(V1beta2FlowSchemaList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1beta2FlowSchemaList instance) { + instance = (instance != null ? instance : new V1beta2FlowSchemaList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1beta2FlowSchema item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1beta2FlowSchema item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1beta2FlowSchema... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta2FlowSchema item : items) {V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta2FlowSchema item : items) {V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1beta2FlowSchema... items) { + if (this.items == null) return (A)this; + for (V1beta2FlowSchema item : items) {V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1beta2FlowSchema item : items) {V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1beta2FlowSchemaBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1beta2FlowSchema buildItem(int index) { + return this.items.get(index).build(); + } + + public V1beta2FlowSchema buildFirstItem() { + return this.items.get(0).build(); + } + + public V1beta2FlowSchema buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1beta2FlowSchema buildMatchingItem(Predicate predicate) { + for (V1beta2FlowSchemaBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1beta2FlowSchemaBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1beta2FlowSchema item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1beta2FlowSchema... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1beta2FlowSchema item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1beta2FlowSchema item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1beta2FlowSchema item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2FlowSchemaListFluent that = (V1beta2FlowSchemaListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1beta2FlowSchemaFluent> implements Nested{ + ItemsNested(int index,V1beta2FlowSchema item) { + this.index = index; + this.builder = new V1beta2FlowSchemaBuilder(this, item); + } + V1beta2FlowSchemaBuilder builder; + int index; + public N and() { + return (N) V1beta2FlowSchemaListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1beta2FlowSchemaListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListFluentImpl.java deleted file mode 100644 index 6c6754831f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2FlowSchemaListFluentImpl> extends BaseFluent implements V1beta2FlowSchemaListFluent{ - public V1beta2FlowSchemaListFluentImpl() { - } - public V1beta2FlowSchemaListFluentImpl(V1beta2FlowSchemaList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1beta2FlowSchema item) { - if (this.items == null) {this.items = new ArrayList();} - V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1beta2FlowSchema item) { - if (this.items == null) {this.items = new ArrayList();} - V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1beta2FlowSchema... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1beta2FlowSchema item : items) {V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1beta2FlowSchema item : items) {V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1beta2FlowSchema... items) { - for (V1beta2FlowSchema item : items) {V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1beta2FlowSchema item : items) {V1beta2FlowSchemaBuilder builder = new V1beta2FlowSchemaBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1beta2FlowSchemaBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1beta2FlowSchema buildItem(int index) { - return this.items.get(index).build(); - } - public V1beta2FlowSchema buildFirstItem() { - return this.items.get(0).build(); - } - public V1beta2FlowSchema buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1beta2FlowSchema buildMatchingItem(Predicate predicate) { - for (V1beta2FlowSchemaBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1beta2FlowSchemaBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1beta2FlowSchema item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1beta2FlowSchema... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1beta2FlowSchema item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1beta2FlowSchemaListFluentImpl.ItemsNested addNewItem() { - return new V1beta2FlowSchemaListFluentImpl.ItemsNestedImpl(); - } - public V1beta2FlowSchemaListFluentImpl.ItemsNested addNewItemLike(V1beta2FlowSchema item) { - return new V1beta2FlowSchemaListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1beta2FlowSchemaListFluentImpl.ItemsNested setNewItemLike(int index,V1beta2FlowSchema item) { - return new V1beta2FlowSchemaListFluentImpl.ItemsNestedImpl(index, item); - } - public V1beta2FlowSchemaListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1beta2FlowSchemaListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1beta2FlowSchemaListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1beta2FlowSchemaListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1beta2FlowSchemaListFluentImpl.MetadataNestedImpl(); - } - public V1beta2FlowSchemaListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1beta2FlowSchemaListFluentImpl.MetadataNestedImpl(item); - } - public V1beta2FlowSchemaListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1beta2FlowSchemaListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1beta2FlowSchemaListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2FlowSchemaListFluentImpl that = (V1beta2FlowSchemaListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1beta2FlowSchemaFluentImpl> implements V1beta2FlowSchemaListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1beta2FlowSchema item) { - this.index = index; - this.builder = new V1beta2FlowSchemaBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1beta2FlowSchemaBuilder(this); - } - V1beta2FlowSchemaBuilder builder; - int index; - public N and() { - return (N) V1beta2FlowSchemaListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1beta2FlowSchemaListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1beta2FlowSchemaListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecBuilder.java index 147dacdd1e..8bb8057c7e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2FlowSchemaSpecBuilder extends V1beta2FlowSchemaSpecFluentImpl implements VisitableBuilder{ +public class V1beta2FlowSchemaSpecBuilder extends V1beta2FlowSchemaSpecFluent implements VisitableBuilder{ public V1beta2FlowSchemaSpecBuilder() { - this(false); - } - public V1beta2FlowSchemaSpecBuilder(Boolean validationEnabled) { - this(new V1beta2FlowSchemaSpec(), validationEnabled); + this(new V1beta2FlowSchemaSpec()); } + public V1beta2FlowSchemaSpecBuilder(V1beta2FlowSchemaSpecFluent fluent) { - this(fluent, false); - } - public V1beta2FlowSchemaSpecBuilder(V1beta2FlowSchemaSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2FlowSchemaSpec(), validationEnabled); + this(fluent, new V1beta2FlowSchemaSpec()); } + public V1beta2FlowSchemaSpecBuilder(V1beta2FlowSchemaSpecFluent fluent,V1beta2FlowSchemaSpec instance) { - this(fluent, instance, false); - } - public V1beta2FlowSchemaSpecBuilder(V1beta2FlowSchemaSpecFluent fluent,V1beta2FlowSchemaSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDistinguisherMethod(instance.getDistinguisherMethod()); - fluent.withMatchingPrecedence(instance.getMatchingPrecedence()); - fluent.withPriorityLevelConfiguration(instance.getPriorityLevelConfiguration()); - fluent.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2FlowSchemaSpecBuilder(V1beta2FlowSchemaSpec instance) { - this(instance,false); - } - public V1beta2FlowSchemaSpecBuilder(V1beta2FlowSchemaSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDistinguisherMethod(instance.getDistinguisherMethod()); - this.withMatchingPrecedence(instance.getMatchingPrecedence()); - this.withPriorityLevelConfiguration(instance.getPriorityLevelConfiguration()); - this.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2FlowSchemaSpecFluent fluent; - Boolean validationEnabled; + public V1beta2FlowSchemaSpec build() { V1beta2FlowSchemaSpec buildable = new V1beta2FlowSchemaSpec(); - buildable.setDistinguisherMethod(fluent.getDistinguisherMethod()); + buildable.setDistinguisherMethod(fluent.buildDistinguisherMethod()); buildable.setMatchingPrecedence(fluent.getMatchingPrecedence()); - buildable.setPriorityLevelConfiguration(fluent.getPriorityLevelConfiguration()); - buildable.setRules(fluent.getRules()); + buildable.setPriorityLevelConfiguration(fluent.buildPriorityLevelConfiguration()); + buildable.setRules(fluent.buildRules()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecFluent.java index 521138725c..82fc2acceb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecFluent.java @@ -1,99 +1,363 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.lang.Integer; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta2FlowSchemaSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildDistinguisherMethod instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2FlowDistinguisherMethod getDistinguisherMethod(); - public V1beta2FlowDistinguisherMethod buildDistinguisherMethod(); - public A withDistinguisherMethod(V1beta2FlowDistinguisherMethod distinguisherMethod); - public Boolean hasDistinguisherMethod(); - public V1beta2FlowSchemaSpecFluent.DistinguisherMethodNested withNewDistinguisherMethod(); - public V1beta2FlowSchemaSpecFluent.DistinguisherMethodNested withNewDistinguisherMethodLike(V1beta2FlowDistinguisherMethod item); - public V1beta2FlowSchemaSpecFluent.DistinguisherMethodNested editDistinguisherMethod(); - public V1beta2FlowSchemaSpecFluent.DistinguisherMethodNested editOrNewDistinguisherMethod(); - public V1beta2FlowSchemaSpecFluent.DistinguisherMethodNested editOrNewDistinguisherMethodLike(V1beta2FlowDistinguisherMethod item); - public Integer getMatchingPrecedence(); - public A withMatchingPrecedence(Integer matchingPrecedence); - public Boolean hasMatchingPrecedence(); - - /** - * This method has been deprecated, please use method buildPriorityLevelConfiguration instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2PriorityLevelConfigurationReference getPriorityLevelConfiguration(); - public V1beta2PriorityLevelConfigurationReference buildPriorityLevelConfiguration(); - public A withPriorityLevelConfiguration(V1beta2PriorityLevelConfigurationReference priorityLevelConfiguration); - public Boolean hasPriorityLevelConfiguration(); - public V1beta2FlowSchemaSpecFluent.PriorityLevelConfigurationNested withNewPriorityLevelConfiguration(); - public V1beta2FlowSchemaSpecFluent.PriorityLevelConfigurationNested withNewPriorityLevelConfigurationLike(V1beta2PriorityLevelConfigurationReference item); - public V1beta2FlowSchemaSpecFluent.PriorityLevelConfigurationNested editPriorityLevelConfiguration(); - public V1beta2FlowSchemaSpecFluent.PriorityLevelConfigurationNested editOrNewPriorityLevelConfiguration(); - public V1beta2FlowSchemaSpecFluent.PriorityLevelConfigurationNested editOrNewPriorityLevelConfigurationLike(V1beta2PriorityLevelConfigurationReference item); - public A addToRules(int index,V1beta2PolicyRulesWithSubjects item); - public A setToRules(int index,V1beta2PolicyRulesWithSubjects item); - public A addToRules(io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects... items); - public A addAllToRules(Collection items); - public A removeFromRules(io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects... items); - public A removeAllFromRules(Collection items); - public A removeMatchingFromRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules(); - public List buildRules(); - public V1beta2PolicyRulesWithSubjects buildRule(int index); - public V1beta2PolicyRulesWithSubjects buildFirstRule(); - public V1beta2PolicyRulesWithSubjects buildLastRule(); - public V1beta2PolicyRulesWithSubjects buildMatchingRule(Predicate predicate); - public Boolean hasMatchingRule(Predicate predicate); - public A withRules(List rules); - public A withRules(io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects... rules); - public Boolean hasRules(); - public V1beta2FlowSchemaSpecFluent.RulesNested addNewRule(); - public V1beta2FlowSchemaSpecFluent.RulesNested addNewRuleLike(V1beta2PolicyRulesWithSubjects item); - public V1beta2FlowSchemaSpecFluent.RulesNested setNewRuleLike(int index,V1beta2PolicyRulesWithSubjects item); - public V1beta2FlowSchemaSpecFluent.RulesNested editRule(int index); - public V1beta2FlowSchemaSpecFluent.RulesNested editFirstRule(); - public V1beta2FlowSchemaSpecFluent.RulesNested editLastRule(); - public V1beta2FlowSchemaSpecFluent.RulesNested editMatchingRule(Predicate predicate); - public interface DistinguisherMethodNested extends Nested,V1beta2FlowDistinguisherMethodFluent>{ - public N and(); - public N endDistinguisherMethod(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2FlowSchemaSpecFluent> extends BaseFluent{ + public V1beta2FlowSchemaSpecFluent() { + } + + public V1beta2FlowSchemaSpecFluent(V1beta2FlowSchemaSpec instance) { + this.copyInstance(instance); + } + private V1beta2FlowDistinguisherMethodBuilder distinguisherMethod; + private Integer matchingPrecedence; + private V1beta2PriorityLevelConfigurationReferenceBuilder priorityLevelConfiguration; + private ArrayList rules; + + protected void copyInstance(V1beta2FlowSchemaSpec instance) { + instance = (instance != null ? instance : new V1beta2FlowSchemaSpec()); + if (instance != null) { + this.withDistinguisherMethod(instance.getDistinguisherMethod()); + this.withMatchingPrecedence(instance.getMatchingPrecedence()); + this.withPriorityLevelConfiguration(instance.getPriorityLevelConfiguration()); + this.withRules(instance.getRules()); + } + } + + public V1beta2FlowDistinguisherMethod buildDistinguisherMethod() { + return this.distinguisherMethod != null ? this.distinguisherMethod.build() : null; + } + + public A withDistinguisherMethod(V1beta2FlowDistinguisherMethod distinguisherMethod) { + this._visitables.remove("distinguisherMethod"); + if (distinguisherMethod != null) { + this.distinguisherMethod = new V1beta2FlowDistinguisherMethodBuilder(distinguisherMethod); + this._visitables.get("distinguisherMethod").add(this.distinguisherMethod); + } else { + this.distinguisherMethod = null; + this._visitables.get("distinguisherMethod").remove(this.distinguisherMethod); + } + return (A) this; + } + + public boolean hasDistinguisherMethod() { + return this.distinguisherMethod != null; + } + + public DistinguisherMethodNested withNewDistinguisherMethod() { + return new DistinguisherMethodNested(null); + } + + public DistinguisherMethodNested withNewDistinguisherMethodLike(V1beta2FlowDistinguisherMethod item) { + return new DistinguisherMethodNested(item); + } + + public DistinguisherMethodNested editDistinguisherMethod() { + return withNewDistinguisherMethodLike(java.util.Optional.ofNullable(buildDistinguisherMethod()).orElse(null)); + } + + public DistinguisherMethodNested editOrNewDistinguisherMethod() { + return withNewDistinguisherMethodLike(java.util.Optional.ofNullable(buildDistinguisherMethod()).orElse(new V1beta2FlowDistinguisherMethodBuilder().build())); + } + + public DistinguisherMethodNested editOrNewDistinguisherMethodLike(V1beta2FlowDistinguisherMethod item) { + return withNewDistinguisherMethodLike(java.util.Optional.ofNullable(buildDistinguisherMethod()).orElse(item)); + } + + public Integer getMatchingPrecedence() { + return this.matchingPrecedence; + } + + public A withMatchingPrecedence(Integer matchingPrecedence) { + this.matchingPrecedence = matchingPrecedence; + return (A) this; + } + + public boolean hasMatchingPrecedence() { + return this.matchingPrecedence != null; + } + + public V1beta2PriorityLevelConfigurationReference buildPriorityLevelConfiguration() { + return this.priorityLevelConfiguration != null ? this.priorityLevelConfiguration.build() : null; + } + + public A withPriorityLevelConfiguration(V1beta2PriorityLevelConfigurationReference priorityLevelConfiguration) { + this._visitables.remove("priorityLevelConfiguration"); + if (priorityLevelConfiguration != null) { + this.priorityLevelConfiguration = new V1beta2PriorityLevelConfigurationReferenceBuilder(priorityLevelConfiguration); + this._visitables.get("priorityLevelConfiguration").add(this.priorityLevelConfiguration); + } else { + this.priorityLevelConfiguration = null; + this._visitables.get("priorityLevelConfiguration").remove(this.priorityLevelConfiguration); + } + return (A) this; + } + + public boolean hasPriorityLevelConfiguration() { + return this.priorityLevelConfiguration != null; + } + + public PriorityLevelConfigurationNested withNewPriorityLevelConfiguration() { + return new PriorityLevelConfigurationNested(null); + } + + public PriorityLevelConfigurationNested withNewPriorityLevelConfigurationLike(V1beta2PriorityLevelConfigurationReference item) { + return new PriorityLevelConfigurationNested(item); + } + + public PriorityLevelConfigurationNested editPriorityLevelConfiguration() { + return withNewPriorityLevelConfigurationLike(java.util.Optional.ofNullable(buildPriorityLevelConfiguration()).orElse(null)); + } + + public PriorityLevelConfigurationNested editOrNewPriorityLevelConfiguration() { + return withNewPriorityLevelConfigurationLike(java.util.Optional.ofNullable(buildPriorityLevelConfiguration()).orElse(new V1beta2PriorityLevelConfigurationReferenceBuilder().build())); + } + + public PriorityLevelConfigurationNested editOrNewPriorityLevelConfigurationLike(V1beta2PriorityLevelConfigurationReference item) { + return withNewPriorityLevelConfigurationLike(java.util.Optional.ofNullable(buildPriorityLevelConfiguration()).orElse(item)); + } + + public A addToRules(int index,V1beta2PolicyRulesWithSubjects item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} + return (A)this; + } + + public A setToRules(int index,V1beta2PolicyRulesWithSubjects item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} + return (A)this; + } + + public A addToRules(io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects... items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1beta2PolicyRulesWithSubjects item : items) {V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A addAllToRules(Collection items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1beta2PolicyRulesWithSubjects item : items) {V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; } - public interface PriorityLevelConfigurationNested extends Nested,V1beta2PriorityLevelConfigurationReferenceFluent>{ - public N and(); - public N endPriorityLevelConfiguration(); + + public A removeFromRules(io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects... items) { + if (this.rules == null) return (A)this; + for (V1beta2PolicyRulesWithSubjects item : items) {V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeAllFromRules(Collection items) { + if (this.rules == null) return (A)this; + for (V1beta2PolicyRulesWithSubjects item : items) {V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeMatchingFromRules(Predicate predicate) { + if (rules == null) return (A) this; + final Iterator each = rules.iterator(); + final List visitables = _visitables.get("rules"); + while (each.hasNext()) { + V1beta2PolicyRulesWithSubjectsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildRules() { + return this.rules != null ? build(rules) : null; + } + + public V1beta2PolicyRulesWithSubjects buildRule(int index) { + return this.rules.get(index).build(); + } + + public V1beta2PolicyRulesWithSubjects buildFirstRule() { + return this.rules.get(0).build(); + } + + public V1beta2PolicyRulesWithSubjects buildLastRule() { + return this.rules.get(rules.size() - 1).build(); + } + + public V1beta2PolicyRulesWithSubjects buildMatchingRule(Predicate predicate) { + for (V1beta2PolicyRulesWithSubjectsBuilder item : rules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingRule(Predicate predicate) { + for (V1beta2PolicyRulesWithSubjectsBuilder item : rules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRules(List rules) { + if (this.rules != null) { + this._visitables.get("rules").clear(); + } + if (rules != null) { + this.rules = new ArrayList(); + for (V1beta2PolicyRulesWithSubjects item : rules) { + this.addToRules(item); + } + } else { + this.rules = null; + } + return (A) this; + } + + public A withRules(io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects... rules) { + if (this.rules != null) { + this.rules.clear(); + _visitables.remove("rules"); + } + if (rules != null) { + for (V1beta2PolicyRulesWithSubjects item : rules) { + this.addToRules(item); + } + } + return (A) this; + } + + public boolean hasRules() { + return this.rules != null && !this.rules.isEmpty(); + } + + public RulesNested addNewRule() { + return new RulesNested(-1, null); + } + + public RulesNested addNewRuleLike(V1beta2PolicyRulesWithSubjects item) { + return new RulesNested(-1, item); + } + + public RulesNested setNewRuleLike(int index,V1beta2PolicyRulesWithSubjects item) { + return new RulesNested(index, item); + } + + public RulesNested editRule(int index) { + if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editFirstRule() { + if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); + return setNewRuleLike(0, buildRule(0)); + } + + public RulesNested editLastRule() { + int index = rules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editMatchingRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta2FlowDistinguisherMethodFluent> implements Nested{ + DistinguisherMethodNested(V1beta2FlowDistinguisherMethod item) { + this.builder = new V1beta2FlowDistinguisherMethodBuilder(this, item); + } + V1beta2FlowDistinguisherMethodBuilder builder; + + public N and() { + return (N) V1beta2FlowSchemaSpecFluent.this.withDistinguisherMethod(builder.build()); + } + + public N endDistinguisherMethod() { + return and(); + } + } - public interface RulesNested extends Nested,V1beta2PolicyRulesWithSubjectsFluent>{ - public N and(); - public N endRule(); + public class PriorityLevelConfigurationNested extends V1beta2PriorityLevelConfigurationReferenceFluent> implements Nested{ + PriorityLevelConfigurationNested(V1beta2PriorityLevelConfigurationReference item) { + this.builder = new V1beta2PriorityLevelConfigurationReferenceBuilder(this, item); + } + V1beta2PriorityLevelConfigurationReferenceBuilder builder; + + public N and() { + return (N) V1beta2FlowSchemaSpecFluent.this.withPriorityLevelConfiguration(builder.build()); + } + + public N endPriorityLevelConfiguration() { + return and(); + } + } + public class RulesNested extends V1beta2PolicyRulesWithSubjectsFluent> implements Nested{ + RulesNested(int index,V1beta2PolicyRulesWithSubjects item) { + this.index = index; + this.builder = new V1beta2PolicyRulesWithSubjectsBuilder(this, item); + } + V1beta2PolicyRulesWithSubjectsBuilder builder; + int index; + + public N and() { + return (N) V1beta2FlowSchemaSpecFluent.this.setToRules(index,builder.build()); + } + + public N endRule() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecFluentImpl.java deleted file mode 100644 index 746278876e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpecFluentImpl.java +++ /dev/null @@ -1,301 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2FlowSchemaSpecFluentImpl> extends BaseFluent implements V1beta2FlowSchemaSpecFluent{ - public V1beta2FlowSchemaSpecFluentImpl() { - } - public V1beta2FlowSchemaSpecFluentImpl(V1beta2FlowSchemaSpec instance) { - if (instance != null) { - this.withDistinguisherMethod(instance.getDistinguisherMethod()); - this.withMatchingPrecedence(instance.getMatchingPrecedence()); - this.withPriorityLevelConfiguration(instance.getPriorityLevelConfiguration()); - this.withRules(instance.getRules()); - } - } - private V1beta2FlowDistinguisherMethodBuilder distinguisherMethod; - private Integer matchingPrecedence; - private V1beta2PriorityLevelConfigurationReferenceBuilder priorityLevelConfiguration; - private ArrayList rules; - - /** - * This method has been deprecated, please use method buildDistinguisherMethod instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2FlowDistinguisherMethod getDistinguisherMethod() { - return this.distinguisherMethod!=null ?this.distinguisherMethod.build():null; - } - public V1beta2FlowDistinguisherMethod buildDistinguisherMethod() { - return this.distinguisherMethod!=null ?this.distinguisherMethod.build():null; - } - public A withDistinguisherMethod(V1beta2FlowDistinguisherMethod distinguisherMethod) { - _visitables.get("distinguisherMethod").remove(this.distinguisherMethod); - if (distinguisherMethod!=null){ this.distinguisherMethod= new V1beta2FlowDistinguisherMethodBuilder(distinguisherMethod); _visitables.get("distinguisherMethod").add(this.distinguisherMethod);} else { this.distinguisherMethod = null; _visitables.get("distinguisherMethod").remove(this.distinguisherMethod); } return (A) this; - } - public Boolean hasDistinguisherMethod() { - return this.distinguisherMethod != null; - } - public V1beta2FlowSchemaSpecFluentImpl.DistinguisherMethodNested withNewDistinguisherMethod() { - return new V1beta2FlowSchemaSpecFluentImpl.DistinguisherMethodNestedImpl(); - } - public V1beta2FlowSchemaSpecFluentImpl.DistinguisherMethodNested withNewDistinguisherMethodLike(V1beta2FlowDistinguisherMethod item) { - return new V1beta2FlowSchemaSpecFluentImpl.DistinguisherMethodNestedImpl(item); - } - public V1beta2FlowSchemaSpecFluentImpl.DistinguisherMethodNested editDistinguisherMethod() { - return withNewDistinguisherMethodLike(getDistinguisherMethod()); - } - public V1beta2FlowSchemaSpecFluentImpl.DistinguisherMethodNested editOrNewDistinguisherMethod() { - return withNewDistinguisherMethodLike(getDistinguisherMethod() != null ? getDistinguisherMethod(): new V1beta2FlowDistinguisherMethodBuilder().build()); - } - public V1beta2FlowSchemaSpecFluentImpl.DistinguisherMethodNested editOrNewDistinguisherMethodLike(V1beta2FlowDistinguisherMethod item) { - return withNewDistinguisherMethodLike(getDistinguisherMethod() != null ? getDistinguisherMethod(): item); - } - public Integer getMatchingPrecedence() { - return this.matchingPrecedence; - } - public A withMatchingPrecedence(Integer matchingPrecedence) { - this.matchingPrecedence=matchingPrecedence; return (A) this; - } - public Boolean hasMatchingPrecedence() { - return this.matchingPrecedence != null; - } - - /** - * This method has been deprecated, please use method buildPriorityLevelConfiguration instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2PriorityLevelConfigurationReference getPriorityLevelConfiguration() { - return this.priorityLevelConfiguration!=null ?this.priorityLevelConfiguration.build():null; - } - public V1beta2PriorityLevelConfigurationReference buildPriorityLevelConfiguration() { - return this.priorityLevelConfiguration!=null ?this.priorityLevelConfiguration.build():null; - } - public A withPriorityLevelConfiguration(V1beta2PriorityLevelConfigurationReference priorityLevelConfiguration) { - _visitables.get("priorityLevelConfiguration").remove(this.priorityLevelConfiguration); - if (priorityLevelConfiguration!=null){ this.priorityLevelConfiguration= new V1beta2PriorityLevelConfigurationReferenceBuilder(priorityLevelConfiguration); _visitables.get("priorityLevelConfiguration").add(this.priorityLevelConfiguration);} else { this.priorityLevelConfiguration = null; _visitables.get("priorityLevelConfiguration").remove(this.priorityLevelConfiguration); } return (A) this; - } - public Boolean hasPriorityLevelConfiguration() { - return this.priorityLevelConfiguration != null; - } - public V1beta2FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested withNewPriorityLevelConfiguration() { - return new V1beta2FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNestedImpl(); - } - public V1beta2FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested withNewPriorityLevelConfigurationLike(V1beta2PriorityLevelConfigurationReference item) { - return new V1beta2FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNestedImpl(item); - } - public V1beta2FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested editPriorityLevelConfiguration() { - return withNewPriorityLevelConfigurationLike(getPriorityLevelConfiguration()); - } - public V1beta2FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested editOrNewPriorityLevelConfiguration() { - return withNewPriorityLevelConfigurationLike(getPriorityLevelConfiguration() != null ? getPriorityLevelConfiguration(): new V1beta2PriorityLevelConfigurationReferenceBuilder().build()); - } - public V1beta2FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested editOrNewPriorityLevelConfigurationLike(V1beta2PriorityLevelConfigurationReference item) { - return withNewPriorityLevelConfigurationLike(getPriorityLevelConfiguration() != null ? getPriorityLevelConfiguration(): item); - } - public A addToRules(int index,V1beta2PolicyRulesWithSubjects item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} - return (A)this; - } - public A setToRules(int index,V1beta2PolicyRulesWithSubjects item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} - return (A)this; - } - public A addToRules(io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects... items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1beta2PolicyRulesWithSubjects item : items) {V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A addAllToRules(Collection items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1beta2PolicyRulesWithSubjects item : items) {V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A removeFromRules(io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects... items) { - for (V1beta2PolicyRulesWithSubjects item : items) {V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeAllFromRules(Collection items) { - for (V1beta2PolicyRulesWithSubjects item : items) {V1beta2PolicyRulesWithSubjectsBuilder builder = new V1beta2PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeMatchingFromRules(Predicate predicate) { - if (rules == null) return (A) this; - final Iterator each = rules.iterator(); - final List visitables = _visitables.get("rules"); - while (each.hasNext()) { - V1beta2PolicyRulesWithSubjectsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules() { - return rules != null ? build(rules) : null; - } - public List buildRules() { - return rules != null ? build(rules) : null; - } - public V1beta2PolicyRulesWithSubjects buildRule(int index) { - return this.rules.get(index).build(); - } - public V1beta2PolicyRulesWithSubjects buildFirstRule() { - return this.rules.get(0).build(); - } - public V1beta2PolicyRulesWithSubjects buildLastRule() { - return this.rules.get(rules.size() - 1).build(); - } - public V1beta2PolicyRulesWithSubjects buildMatchingRule(Predicate predicate) { - for (V1beta2PolicyRulesWithSubjectsBuilder item: rules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRule(Predicate predicate) { - for (V1beta2PolicyRulesWithSubjectsBuilder item: rules) { if(predicate.test(item)){ return true;} } return false; - } - public A withRules(List rules) { - if (this.rules != null) { _visitables.get("rules").clear();} - if (rules != null) {this.rules = new ArrayList(); for (V1beta2PolicyRulesWithSubjects item : rules){this.addToRules(item);}} else { this.rules = null;} return (A) this; - } - public A withRules(io.kubernetes.client.openapi.models.V1beta2PolicyRulesWithSubjects... rules) { - if (this.rules != null) {this.rules.clear(); _visitables.remove("rules"); } - if (rules != null) {for (V1beta2PolicyRulesWithSubjects item :rules){ this.addToRules(item);}} return (A) this; - } - public Boolean hasRules() { - return rules != null && !rules.isEmpty(); - } - public V1beta2FlowSchemaSpecFluentImpl.RulesNested addNewRule() { - return new V1beta2FlowSchemaSpecFluentImpl.RulesNestedImpl(); - } - public V1beta2FlowSchemaSpecFluentImpl.RulesNested addNewRuleLike(V1beta2PolicyRulesWithSubjects item) { - return new V1beta2FlowSchemaSpecFluentImpl.RulesNestedImpl(-1, item); - } - public V1beta2FlowSchemaSpecFluentImpl.RulesNested setNewRuleLike(int index,V1beta2PolicyRulesWithSubjects item) { - return new V1beta2FlowSchemaSpecFluentImpl.RulesNestedImpl(index, item); - } - public V1beta2FlowSchemaSpecFluentImpl.RulesNested editRule(int index) { - if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); - return setNewRuleLike(index, buildRule(index)); - } - public V1beta2FlowSchemaSpecFluentImpl.RulesNested editFirstRule() { - if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); - return setNewRuleLike(0, buildRule(0)); - } - public V1beta2FlowSchemaSpecFluentImpl.RulesNested editLastRule() { - int index = rules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); - return setNewRuleLike(index, buildRule(index)); - } - public V1beta2FlowSchemaSpecFluentImpl.RulesNested editMatchingRule(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1beta2FlowDistinguisherMethodFluentImpl> implements V1beta2FlowSchemaSpecFluentImpl.DistinguisherMethodNested,Nested{ - DistinguisherMethodNestedImpl(V1beta2FlowDistinguisherMethod item) { - this.builder = new V1beta2FlowDistinguisherMethodBuilder(this, item); - } - DistinguisherMethodNestedImpl() { - this.builder = new V1beta2FlowDistinguisherMethodBuilder(this); - } - V1beta2FlowDistinguisherMethodBuilder builder; - public N and() { - return (N) V1beta2FlowSchemaSpecFluentImpl.this.withDistinguisherMethod(builder.build()); - } - public N endDistinguisherMethod() { - return and(); - } - - } - class PriorityLevelConfigurationNestedImpl extends V1beta2PriorityLevelConfigurationReferenceFluentImpl> implements V1beta2FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested,Nested{ - PriorityLevelConfigurationNestedImpl(V1beta2PriorityLevelConfigurationReference item) { - this.builder = new V1beta2PriorityLevelConfigurationReferenceBuilder(this, item); - } - PriorityLevelConfigurationNestedImpl() { - this.builder = new V1beta2PriorityLevelConfigurationReferenceBuilder(this); - } - V1beta2PriorityLevelConfigurationReferenceBuilder builder; - public N and() { - return (N) V1beta2FlowSchemaSpecFluentImpl.this.withPriorityLevelConfiguration(builder.build()); - } - public N endPriorityLevelConfiguration() { - return and(); - } - - } - class RulesNestedImpl extends V1beta2PolicyRulesWithSubjectsFluentImpl> implements V1beta2FlowSchemaSpecFluentImpl.RulesNested,Nested{ - RulesNestedImpl(int index,V1beta2PolicyRulesWithSubjects item) { - this.index = index; - this.builder = new V1beta2PolicyRulesWithSubjectsBuilder(this, item); - } - RulesNestedImpl() { - this.index = -1; - this.builder = new V1beta2PolicyRulesWithSubjectsBuilder(this); - } - V1beta2PolicyRulesWithSubjectsBuilder builder; - int index; - public N and() { - return (N) V1beta2FlowSchemaSpecFluentImpl.this.setToRules(index,builder.build()); - } - public N endRule() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusBuilder.java index 4d90d22606..feb3d7ecbf 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2FlowSchemaStatusBuilder extends V1beta2FlowSchemaStatusFluentImpl implements VisitableBuilder{ +public class V1beta2FlowSchemaStatusBuilder extends V1beta2FlowSchemaStatusFluent implements VisitableBuilder{ public V1beta2FlowSchemaStatusBuilder() { - this(false); - } - public V1beta2FlowSchemaStatusBuilder(Boolean validationEnabled) { - this(new V1beta2FlowSchemaStatus(), validationEnabled); + this(new V1beta2FlowSchemaStatus()); } + public V1beta2FlowSchemaStatusBuilder(V1beta2FlowSchemaStatusFluent fluent) { - this(fluent, false); - } - public V1beta2FlowSchemaStatusBuilder(V1beta2FlowSchemaStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2FlowSchemaStatus(), validationEnabled); + this(fluent, new V1beta2FlowSchemaStatus()); } + public V1beta2FlowSchemaStatusBuilder(V1beta2FlowSchemaStatusFluent fluent,V1beta2FlowSchemaStatus instance) { - this(fluent, instance, false); - } - public V1beta2FlowSchemaStatusBuilder(V1beta2FlowSchemaStatusFluent fluent,V1beta2FlowSchemaStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2FlowSchemaStatusBuilder(V1beta2FlowSchemaStatus instance) { - this(instance,false); - } - public V1beta2FlowSchemaStatusBuilder(V1beta2FlowSchemaStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2FlowSchemaStatusFluent fluent; - Boolean validationEnabled; + public V1beta2FlowSchemaStatus build() { V1beta2FlowSchemaStatus buildable = new V1beta2FlowSchemaStatus(); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusFluent.java index 219acc2f1f..8cdfda370b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2FlowSchemaStatusFluent> extends Fluent{ - public A addToConditions(int index,V1beta2FlowSchemaCondition item); - public A setToConditions(int index,V1beta2FlowSchemaCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1beta2FlowSchemaCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta2FlowSchemaCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1beta2FlowSchemaCondition buildCondition(int index); - public V1beta2FlowSchemaCondition buildFirstCondition(); - public V1beta2FlowSchemaCondition buildLastCondition(); - public V1beta2FlowSchemaCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1beta2FlowSchemaCondition... conditions); - public Boolean hasConditions(); - public V1beta2FlowSchemaStatusFluent.ConditionsNested addNewCondition(); - public V1beta2FlowSchemaStatusFluent.ConditionsNested addNewConditionLike(V1beta2FlowSchemaCondition item); - public V1beta2FlowSchemaStatusFluent.ConditionsNested setNewConditionLike(int index,V1beta2FlowSchemaCondition item); - public V1beta2FlowSchemaStatusFluent.ConditionsNested editCondition(int index); - public V1beta2FlowSchemaStatusFluent.ConditionsNested editFirstCondition(); - public V1beta2FlowSchemaStatusFluent.ConditionsNested editLastCondition(); - public V1beta2FlowSchemaStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public interface ConditionsNested extends Nested,V1beta2FlowSchemaConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2FlowSchemaStatusFluent> extends BaseFluent{ + public V1beta2FlowSchemaStatusFluent() { + } + + public V1beta2FlowSchemaStatusFluent(V1beta2FlowSchemaStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + + protected void copyInstance(V1beta2FlowSchemaStatus instance) { + instance = (instance != null ? instance : new V1beta2FlowSchemaStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + } + } + + public A addToConditions(int index,V1beta2FlowSchemaCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1beta2FlowSchemaCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1beta2FlowSchemaCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1beta2FlowSchemaCondition item : items) {V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1beta2FlowSchemaCondition item : items) {V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta2FlowSchemaCondition... items) { + if (this.conditions == null) return (A)this; + for (V1beta2FlowSchemaCondition item : items) {V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1beta2FlowSchemaCondition item : items) {V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1beta2FlowSchemaConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1beta2FlowSchemaCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1beta2FlowSchemaCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1beta2FlowSchemaCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1beta2FlowSchemaCondition buildMatchingCondition(Predicate predicate) { + for (V1beta2FlowSchemaConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1beta2FlowSchemaConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1beta2FlowSchemaCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1beta2FlowSchemaCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1beta2FlowSchemaCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1beta2FlowSchemaCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1beta2FlowSchemaCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta2FlowSchemaConditionFluent> implements Nested{ + ConditionsNested(int index,V1beta2FlowSchemaCondition item) { + this.index = index; + this.builder = new V1beta2FlowSchemaConditionBuilder(this, item); + } + V1beta2FlowSchemaConditionBuilder builder; + int index; + + public N and() { + return (N) V1beta2FlowSchemaStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusFluentImpl.java deleted file mode 100644 index d54022467d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatusFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2FlowSchemaStatusFluentImpl> extends BaseFluent implements V1beta2FlowSchemaStatusFluent{ - public V1beta2FlowSchemaStatusFluentImpl() { - } - public V1beta2FlowSchemaStatusFluentImpl(V1beta2FlowSchemaStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - } - } - private ArrayList conditions; - public A addToConditions(int index,V1beta2FlowSchemaCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1beta2FlowSchemaCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1beta2FlowSchemaCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1beta2FlowSchemaCondition item : items) {V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1beta2FlowSchemaCondition item : items) {V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta2FlowSchemaCondition... items) { - for (V1beta2FlowSchemaCondition item : items) {V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1beta2FlowSchemaCondition item : items) {V1beta2FlowSchemaConditionBuilder builder = new V1beta2FlowSchemaConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1beta2FlowSchemaConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1beta2FlowSchemaCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1beta2FlowSchemaCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1beta2FlowSchemaCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1beta2FlowSchemaCondition buildMatchingCondition(Predicate predicate) { - for (V1beta2FlowSchemaConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1beta2FlowSchemaConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1beta2FlowSchemaCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1beta2FlowSchemaCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1beta2FlowSchemaCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1beta2FlowSchemaStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1beta2FlowSchemaStatusFluentImpl.ConditionsNestedImpl(); - } - public V1beta2FlowSchemaStatusFluentImpl.ConditionsNested addNewConditionLike(V1beta2FlowSchemaCondition item) { - return new V1beta2FlowSchemaStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1beta2FlowSchemaStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1beta2FlowSchemaCondition item) { - return new V1beta2FlowSchemaStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1beta2FlowSchemaStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1beta2FlowSchemaStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1beta2FlowSchemaStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1beta2FlowSchemaStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1beta2FlowSchemaConditionFluentImpl> implements V1beta2FlowSchemaStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1beta2FlowSchemaCondition item) { - this.index = index; - this.builder = new V1beta2FlowSchemaConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1beta2FlowSchemaConditionBuilder(this); - } - V1beta2FlowSchemaConditionBuilder builder; - int index; - public N and() { - return (N) V1beta2FlowSchemaStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectBuilder.java index 46caebd364..a21c311833 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2GroupSubjectBuilder extends V1beta2GroupSubjectFluentImpl implements VisitableBuilder{ +public class V1beta2GroupSubjectBuilder extends V1beta2GroupSubjectFluent implements VisitableBuilder{ public V1beta2GroupSubjectBuilder() { - this(false); - } - public V1beta2GroupSubjectBuilder(Boolean validationEnabled) { - this(new V1beta2GroupSubject(), validationEnabled); + this(new V1beta2GroupSubject()); } + public V1beta2GroupSubjectBuilder(V1beta2GroupSubjectFluent fluent) { - this(fluent, false); - } - public V1beta2GroupSubjectBuilder(V1beta2GroupSubjectFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2GroupSubject(), validationEnabled); + this(fluent, new V1beta2GroupSubject()); } + public V1beta2GroupSubjectBuilder(V1beta2GroupSubjectFluent fluent,V1beta2GroupSubject instance) { - this(fluent, instance, false); - } - public V1beta2GroupSubjectBuilder(V1beta2GroupSubjectFluent fluent,V1beta2GroupSubject instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2GroupSubjectBuilder(V1beta2GroupSubject instance) { - this(instance,false); - } - public V1beta2GroupSubjectBuilder(V1beta2GroupSubject instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2GroupSubjectFluent fluent; - Boolean validationEnabled; + public V1beta2GroupSubject build() { V1beta2GroupSubject buildable = new V1beta2GroupSubject(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectFluent.java index 3995ef81fd..388d1d45c6 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2GroupSubjectFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2GroupSubjectFluent> extends BaseFluent{ + public V1beta2GroupSubjectFluent() { + } + public V1beta2GroupSubjectFluent(V1beta2GroupSubject instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1beta2GroupSubject instance) { + instance = (instance != null ? instance : new V1beta2GroupSubject()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2GroupSubjectFluent that = (V1beta2GroupSubjectFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectFluentImpl.java deleted file mode 100644 index 1e73df2c7b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubjectFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2GroupSubjectFluentImpl> extends BaseFluent implements V1beta2GroupSubjectFluent{ - public V1beta2GroupSubjectFluentImpl() { - } - public V1beta2GroupSubjectFluentImpl(V1beta2GroupSubject instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2GroupSubjectFluentImpl that = (V1beta2GroupSubjectFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseBuilder.java index af8a866d48..109658ab52 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2LimitResponseBuilder extends V1beta2LimitResponseFluentImpl implements VisitableBuilder{ +public class V1beta2LimitResponseBuilder extends V1beta2LimitResponseFluent implements VisitableBuilder{ public V1beta2LimitResponseBuilder() { - this(false); - } - public V1beta2LimitResponseBuilder(Boolean validationEnabled) { - this(new V1beta2LimitResponse(), validationEnabled); + this(new V1beta2LimitResponse()); } + public V1beta2LimitResponseBuilder(V1beta2LimitResponseFluent fluent) { - this(fluent, false); - } - public V1beta2LimitResponseBuilder(V1beta2LimitResponseFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2LimitResponse(), validationEnabled); + this(fluent, new V1beta2LimitResponse()); } + public V1beta2LimitResponseBuilder(V1beta2LimitResponseFluent fluent,V1beta2LimitResponse instance) { - this(fluent, instance, false); - } - public V1beta2LimitResponseBuilder(V1beta2LimitResponseFluent fluent,V1beta2LimitResponse instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withQueuing(instance.getQueuing()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2LimitResponseBuilder(V1beta2LimitResponse instance) { - this(instance,false); - } - public V1beta2LimitResponseBuilder(V1beta2LimitResponse instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withQueuing(instance.getQueuing()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2LimitResponseFluent fluent; - Boolean validationEnabled; + public V1beta2LimitResponse build() { V1beta2LimitResponse buildable = new V1beta2LimitResponse(); - buildable.setQueuing(fluent.getQueuing()); + buildable.setQueuing(fluent.buildQueuing()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseFluent.java index 1cdf07c8f6..a4b24239c9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2LimitResponseFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildQueuing instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2QueuingConfiguration getQueuing(); - public V1beta2QueuingConfiguration buildQueuing(); - public A withQueuing(V1beta2QueuingConfiguration queuing); - public Boolean hasQueuing(); - public V1beta2LimitResponseFluent.QueuingNested withNewQueuing(); - public V1beta2LimitResponseFluent.QueuingNested withNewQueuingLike(V1beta2QueuingConfiguration item); - public V1beta2LimitResponseFluent.QueuingNested editQueuing(); - public V1beta2LimitResponseFluent.QueuingNested editOrNewQueuing(); - public V1beta2LimitResponseFluent.QueuingNested editOrNewQueuingLike(V1beta2QueuingConfiguration item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface QueuingNested extends Nested,V1beta2QueuingConfigurationFluent>{ - public N and(); - public N endQueuing(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2LimitResponseFluent> extends BaseFluent{ + public V1beta2LimitResponseFluent() { + } + + public V1beta2LimitResponseFluent(V1beta2LimitResponse instance) { + this.copyInstance(instance); + } + private V1beta2QueuingConfigurationBuilder queuing; + private String type; + + protected void copyInstance(V1beta2LimitResponse instance) { + instance = (instance != null ? instance : new V1beta2LimitResponse()); + if (instance != null) { + this.withQueuing(instance.getQueuing()); + this.withType(instance.getType()); + } + } + + public V1beta2QueuingConfiguration buildQueuing() { + return this.queuing != null ? this.queuing.build() : null; + } + + public A withQueuing(V1beta2QueuingConfiguration queuing) { + this._visitables.remove("queuing"); + if (queuing != null) { + this.queuing = new V1beta2QueuingConfigurationBuilder(queuing); + this._visitables.get("queuing").add(this.queuing); + } else { + this.queuing = null; + this._visitables.get("queuing").remove(this.queuing); + } + return (A) this; + } + + public boolean hasQueuing() { + return this.queuing != null; + } + + public QueuingNested withNewQueuing() { + return new QueuingNested(null); + } + + public QueuingNested withNewQueuingLike(V1beta2QueuingConfiguration item) { + return new QueuingNested(item); + } + + public QueuingNested editQueuing() { + return withNewQueuingLike(java.util.Optional.ofNullable(buildQueuing()).orElse(null)); + } + + public QueuingNested editOrNewQueuing() { + return withNewQueuingLike(java.util.Optional.ofNullable(buildQueuing()).orElse(new V1beta2QueuingConfigurationBuilder().build())); } + public QueuingNested editOrNewQueuingLike(V1beta2QueuingConfiguration item) { + return withNewQueuingLike(java.util.Optional.ofNullable(buildQueuing()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2LimitResponseFluent that = (V1beta2LimitResponseFluent) o; + if (!java.util.Objects.equals(queuing, that.queuing)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(queuing, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (queuing != null) { sb.append("queuing:"); sb.append(queuing + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class QueuingNested extends V1beta2QueuingConfigurationFluent> implements Nested{ + QueuingNested(V1beta2QueuingConfiguration item) { + this.builder = new V1beta2QueuingConfigurationBuilder(this, item); + } + V1beta2QueuingConfigurationBuilder builder; + + public N and() { + return (N) V1beta2LimitResponseFluent.this.withQueuing(builder.build()); + } + + public N endQueuing() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseFluentImpl.java deleted file mode 100644 index b7386019a9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponseFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2LimitResponseFluentImpl> extends BaseFluent implements V1beta2LimitResponseFluent{ - public V1beta2LimitResponseFluentImpl() { - } - public V1beta2LimitResponseFluentImpl(V1beta2LimitResponse instance) { - if (instance != null) { - this.withQueuing(instance.getQueuing()); - this.withType(instance.getType()); - } - } - private V1beta2QueuingConfigurationBuilder queuing; - private String type; - - /** - * This method has been deprecated, please use method buildQueuing instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2QueuingConfiguration getQueuing() { - return this.queuing!=null ?this.queuing.build():null; - } - public V1beta2QueuingConfiguration buildQueuing() { - return this.queuing!=null ?this.queuing.build():null; - } - public A withQueuing(V1beta2QueuingConfiguration queuing) { - _visitables.get("queuing").remove(this.queuing); - if (queuing!=null){ this.queuing= new V1beta2QueuingConfigurationBuilder(queuing); _visitables.get("queuing").add(this.queuing);} else { this.queuing = null; _visitables.get("queuing").remove(this.queuing); } return (A) this; - } - public Boolean hasQueuing() { - return this.queuing != null; - } - public V1beta2LimitResponseFluentImpl.QueuingNested withNewQueuing() { - return new V1beta2LimitResponseFluentImpl.QueuingNestedImpl(); - } - public V1beta2LimitResponseFluentImpl.QueuingNested withNewQueuingLike(V1beta2QueuingConfiguration item) { - return new V1beta2LimitResponseFluentImpl.QueuingNestedImpl(item); - } - public V1beta2LimitResponseFluentImpl.QueuingNested editQueuing() { - return withNewQueuingLike(getQueuing()); - } - public V1beta2LimitResponseFluentImpl.QueuingNested editOrNewQueuing() { - return withNewQueuingLike(getQueuing() != null ? getQueuing(): new V1beta2QueuingConfigurationBuilder().build()); - } - public V1beta2LimitResponseFluentImpl.QueuingNested editOrNewQueuingLike(V1beta2QueuingConfiguration item) { - return withNewQueuingLike(getQueuing() != null ? getQueuing(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2LimitResponseFluentImpl that = (V1beta2LimitResponseFluentImpl) o; - if (!java.util.Objects.equals(queuing, that.queuing)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(queuing, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (queuing != null) { sb.append("queuing:"); sb.append(queuing + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class QueuingNestedImpl extends V1beta2QueuingConfigurationFluentImpl> implements V1beta2LimitResponseFluentImpl.QueuingNested,Nested{ - QueuingNestedImpl(V1beta2QueuingConfiguration item) { - this.builder = new V1beta2QueuingConfigurationBuilder(this, item); - } - QueuingNestedImpl() { - this.builder = new V1beta2QueuingConfigurationBuilder(this); - } - V1beta2QueuingConfigurationBuilder builder; - public N and() { - return (N) V1beta2LimitResponseFluentImpl.this.withQueuing(builder.build()); - } - public N endQueuing() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationBuilder.java index 7fe250b1da..eb835b23b1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2LimitedPriorityLevelConfigurationBuilder extends V1beta2LimitedPriorityLevelConfigurationFluentImpl implements VisitableBuilder{ +public class V1beta2LimitedPriorityLevelConfigurationBuilder extends V1beta2LimitedPriorityLevelConfigurationFluent implements VisitableBuilder{ public V1beta2LimitedPriorityLevelConfigurationBuilder() { - this(false); - } - public V1beta2LimitedPriorityLevelConfigurationBuilder(Boolean validationEnabled) { - this(new V1beta2LimitedPriorityLevelConfiguration(), validationEnabled); + this(new V1beta2LimitedPriorityLevelConfiguration()); } + public V1beta2LimitedPriorityLevelConfigurationBuilder(V1beta2LimitedPriorityLevelConfigurationFluent fluent) { - this(fluent, false); - } - public V1beta2LimitedPriorityLevelConfigurationBuilder(V1beta2LimitedPriorityLevelConfigurationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2LimitedPriorityLevelConfiguration(), validationEnabled); + this(fluent, new V1beta2LimitedPriorityLevelConfiguration()); } + public V1beta2LimitedPriorityLevelConfigurationBuilder(V1beta2LimitedPriorityLevelConfigurationFluent fluent,V1beta2LimitedPriorityLevelConfiguration instance) { - this(fluent, instance, false); - } - public V1beta2LimitedPriorityLevelConfigurationBuilder(V1beta2LimitedPriorityLevelConfigurationFluent fluent,V1beta2LimitedPriorityLevelConfiguration instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAssuredConcurrencyShares(instance.getAssuredConcurrencyShares()); - fluent.withBorrowingLimitPercent(instance.getBorrowingLimitPercent()); - fluent.withLendablePercent(instance.getLendablePercent()); - fluent.withLimitResponse(instance.getLimitResponse()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2LimitedPriorityLevelConfigurationBuilder(V1beta2LimitedPriorityLevelConfiguration instance) { - this(instance,false); - } - public V1beta2LimitedPriorityLevelConfigurationBuilder(V1beta2LimitedPriorityLevelConfiguration instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAssuredConcurrencyShares(instance.getAssuredConcurrencyShares()); - this.withBorrowingLimitPercent(instance.getBorrowingLimitPercent()); - this.withLendablePercent(instance.getLendablePercent()); - this.withLimitResponse(instance.getLimitResponse()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2LimitedPriorityLevelConfigurationFluent fluent; - Boolean validationEnabled; + public V1beta2LimitedPriorityLevelConfiguration build() { V1beta2LimitedPriorityLevelConfiguration buildable = new V1beta2LimitedPriorityLevelConfiguration(); buildable.setAssuredConcurrencyShares(fluent.getAssuredConcurrencyShares()); buildable.setBorrowingLimitPercent(fluent.getBorrowingLimitPercent()); buildable.setLendablePercent(fluent.getLendablePercent()); - buildable.setLimitResponse(fluent.getLimitResponse()); + buildable.setLimitResponse(fluent.buildLimitResponse()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationFluent.java index 0b440b9533..5de7081d52 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationFluent.java @@ -1,44 +1,158 @@ package io.kubernetes.client.openapi.models; -import java.lang.Integer; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import java.lang.Integer; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta2LimitedPriorityLevelConfigurationFluent> extends Fluent{ - public Integer getAssuredConcurrencyShares(); - public A withAssuredConcurrencyShares(Integer assuredConcurrencyShares); - public Boolean hasAssuredConcurrencyShares(); - public Integer getBorrowingLimitPercent(); - public A withBorrowingLimitPercent(Integer borrowingLimitPercent); - public Boolean hasBorrowingLimitPercent(); - public Integer getLendablePercent(); - public A withLendablePercent(Integer lendablePercent); - public Boolean hasLendablePercent(); - - /** - * This method has been deprecated, please use method buildLimitResponse instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2LimitResponse getLimitResponse(); - public V1beta2LimitResponse buildLimitResponse(); - public A withLimitResponse(V1beta2LimitResponse limitResponse); - public Boolean hasLimitResponse(); - public V1beta2LimitedPriorityLevelConfigurationFluent.LimitResponseNested withNewLimitResponse(); - public V1beta2LimitedPriorityLevelConfigurationFluent.LimitResponseNested withNewLimitResponseLike(V1beta2LimitResponse item); - public V1beta2LimitedPriorityLevelConfigurationFluent.LimitResponseNested editLimitResponse(); - public V1beta2LimitedPriorityLevelConfigurationFluent.LimitResponseNested editOrNewLimitResponse(); - public V1beta2LimitedPriorityLevelConfigurationFluent.LimitResponseNested editOrNewLimitResponseLike(V1beta2LimitResponse item); - public interface LimitResponseNested extends Nested,V1beta2LimitResponseFluent>{ - public N and(); - public N endLimitResponse(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2LimitedPriorityLevelConfigurationFluent> extends BaseFluent{ + public V1beta2LimitedPriorityLevelConfigurationFluent() { + } + + public V1beta2LimitedPriorityLevelConfigurationFluent(V1beta2LimitedPriorityLevelConfiguration instance) { + this.copyInstance(instance); + } + private Integer assuredConcurrencyShares; + private Integer borrowingLimitPercent; + private Integer lendablePercent; + private V1beta2LimitResponseBuilder limitResponse; + + protected void copyInstance(V1beta2LimitedPriorityLevelConfiguration instance) { + instance = (instance != null ? instance : new V1beta2LimitedPriorityLevelConfiguration()); + if (instance != null) { + this.withAssuredConcurrencyShares(instance.getAssuredConcurrencyShares()); + this.withBorrowingLimitPercent(instance.getBorrowingLimitPercent()); + this.withLendablePercent(instance.getLendablePercent()); + this.withLimitResponse(instance.getLimitResponse()); + } + } + + public Integer getAssuredConcurrencyShares() { + return this.assuredConcurrencyShares; + } + + public A withAssuredConcurrencyShares(Integer assuredConcurrencyShares) { + this.assuredConcurrencyShares = assuredConcurrencyShares; + return (A) this; + } + + public boolean hasAssuredConcurrencyShares() { + return this.assuredConcurrencyShares != null; + } + + public Integer getBorrowingLimitPercent() { + return this.borrowingLimitPercent; + } + + public A withBorrowingLimitPercent(Integer borrowingLimitPercent) { + this.borrowingLimitPercent = borrowingLimitPercent; + return (A) this; + } + + public boolean hasBorrowingLimitPercent() { + return this.borrowingLimitPercent != null; + } + + public Integer getLendablePercent() { + return this.lendablePercent; + } + + public A withLendablePercent(Integer lendablePercent) { + this.lendablePercent = lendablePercent; + return (A) this; + } + + public boolean hasLendablePercent() { + return this.lendablePercent != null; + } + + public V1beta2LimitResponse buildLimitResponse() { + return this.limitResponse != null ? this.limitResponse.build() : null; + } + + public A withLimitResponse(V1beta2LimitResponse limitResponse) { + this._visitables.remove("limitResponse"); + if (limitResponse != null) { + this.limitResponse = new V1beta2LimitResponseBuilder(limitResponse); + this._visitables.get("limitResponse").add(this.limitResponse); + } else { + this.limitResponse = null; + this._visitables.get("limitResponse").remove(this.limitResponse); + } + return (A) this; + } + + public boolean hasLimitResponse() { + return this.limitResponse != null; + } + + public LimitResponseNested withNewLimitResponse() { + return new LimitResponseNested(null); + } + + public LimitResponseNested withNewLimitResponseLike(V1beta2LimitResponse item) { + return new LimitResponseNested(item); + } + + public LimitResponseNested editLimitResponse() { + return withNewLimitResponseLike(java.util.Optional.ofNullable(buildLimitResponse()).orElse(null)); + } + + public LimitResponseNested editOrNewLimitResponse() { + return withNewLimitResponseLike(java.util.Optional.ofNullable(buildLimitResponse()).orElse(new V1beta2LimitResponseBuilder().build())); } + public LimitResponseNested editOrNewLimitResponseLike(V1beta2LimitResponse item) { + return withNewLimitResponseLike(java.util.Optional.ofNullable(buildLimitResponse()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2LimitedPriorityLevelConfigurationFluent that = (V1beta2LimitedPriorityLevelConfigurationFluent) o; + if (!java.util.Objects.equals(assuredConcurrencyShares, that.assuredConcurrencyShares)) return false; + if (!java.util.Objects.equals(borrowingLimitPercent, that.borrowingLimitPercent)) return false; + if (!java.util.Objects.equals(lendablePercent, that.lendablePercent)) return false; + if (!java.util.Objects.equals(limitResponse, that.limitResponse)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(assuredConcurrencyShares, borrowingLimitPercent, lendablePercent, limitResponse, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (assuredConcurrencyShares != null) { sb.append("assuredConcurrencyShares:"); sb.append(assuredConcurrencyShares + ","); } + if (borrowingLimitPercent != null) { sb.append("borrowingLimitPercent:"); sb.append(borrowingLimitPercent + ","); } + if (lendablePercent != null) { sb.append("lendablePercent:"); sb.append(lendablePercent + ","); } + if (limitResponse != null) { sb.append("limitResponse:"); sb.append(limitResponse); } + sb.append("}"); + return sb.toString(); + } + public class LimitResponseNested extends V1beta2LimitResponseFluent> implements Nested{ + LimitResponseNested(V1beta2LimitResponse item) { + this.builder = new V1beta2LimitResponseBuilder(this, item); + } + V1beta2LimitResponseBuilder builder; + + public N and() { + return (N) V1beta2LimitedPriorityLevelConfigurationFluent.this.withLimitResponse(builder.build()); + } + + public N endLimitResponse() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationFluentImpl.java deleted file mode 100644 index 9f17518fd6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfigurationFluentImpl.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2LimitedPriorityLevelConfigurationFluentImpl> extends BaseFluent implements V1beta2LimitedPriorityLevelConfigurationFluent{ - public V1beta2LimitedPriorityLevelConfigurationFluentImpl() { - } - public V1beta2LimitedPriorityLevelConfigurationFluentImpl(V1beta2LimitedPriorityLevelConfiguration instance) { - if (instance != null) { - this.withAssuredConcurrencyShares(instance.getAssuredConcurrencyShares()); - this.withBorrowingLimitPercent(instance.getBorrowingLimitPercent()); - this.withLendablePercent(instance.getLendablePercent()); - this.withLimitResponse(instance.getLimitResponse()); - } - } - private Integer assuredConcurrencyShares; - private Integer borrowingLimitPercent; - private Integer lendablePercent; - private V1beta2LimitResponseBuilder limitResponse; - public Integer getAssuredConcurrencyShares() { - return this.assuredConcurrencyShares; - } - public A withAssuredConcurrencyShares(Integer assuredConcurrencyShares) { - this.assuredConcurrencyShares=assuredConcurrencyShares; return (A) this; - } - public Boolean hasAssuredConcurrencyShares() { - return this.assuredConcurrencyShares != null; - } - public Integer getBorrowingLimitPercent() { - return this.borrowingLimitPercent; - } - public A withBorrowingLimitPercent(Integer borrowingLimitPercent) { - this.borrowingLimitPercent=borrowingLimitPercent; return (A) this; - } - public Boolean hasBorrowingLimitPercent() { - return this.borrowingLimitPercent != null; - } - public Integer getLendablePercent() { - return this.lendablePercent; - } - public A withLendablePercent(Integer lendablePercent) { - this.lendablePercent=lendablePercent; return (A) this; - } - public Boolean hasLendablePercent() { - return this.lendablePercent != null; - } - - /** - * This method has been deprecated, please use method buildLimitResponse instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2LimitResponse getLimitResponse() { - return this.limitResponse!=null ?this.limitResponse.build():null; - } - public V1beta2LimitResponse buildLimitResponse() { - return this.limitResponse!=null ?this.limitResponse.build():null; - } - public A withLimitResponse(V1beta2LimitResponse limitResponse) { - _visitables.get("limitResponse").remove(this.limitResponse); - if (limitResponse!=null){ this.limitResponse= new V1beta2LimitResponseBuilder(limitResponse); _visitables.get("limitResponse").add(this.limitResponse);} else { this.limitResponse = null; _visitables.get("limitResponse").remove(this.limitResponse); } return (A) this; - } - public Boolean hasLimitResponse() { - return this.limitResponse != null; - } - public V1beta2LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested withNewLimitResponse() { - return new V1beta2LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNestedImpl(); - } - public V1beta2LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested withNewLimitResponseLike(V1beta2LimitResponse item) { - return new V1beta2LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNestedImpl(item); - } - public V1beta2LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested editLimitResponse() { - return withNewLimitResponseLike(getLimitResponse()); - } - public V1beta2LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested editOrNewLimitResponse() { - return withNewLimitResponseLike(getLimitResponse() != null ? getLimitResponse(): new V1beta2LimitResponseBuilder().build()); - } - public V1beta2LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested editOrNewLimitResponseLike(V1beta2LimitResponse item) { - return withNewLimitResponseLike(getLimitResponse() != null ? getLimitResponse(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2LimitedPriorityLevelConfigurationFluentImpl that = (V1beta2LimitedPriorityLevelConfigurationFluentImpl) o; - if (!java.util.Objects.equals(assuredConcurrencyShares, that.assuredConcurrencyShares)) return false; - - if (!java.util.Objects.equals(borrowingLimitPercent, that.borrowingLimitPercent)) return false; - - if (!java.util.Objects.equals(lendablePercent, that.lendablePercent)) return false; - - if (!java.util.Objects.equals(limitResponse, that.limitResponse)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(assuredConcurrencyShares, borrowingLimitPercent, lendablePercent, limitResponse, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (assuredConcurrencyShares != null) { sb.append("assuredConcurrencyShares:"); sb.append(assuredConcurrencyShares + ","); } - if (borrowingLimitPercent != null) { sb.append("borrowingLimitPercent:"); sb.append(borrowingLimitPercent + ","); } - if (lendablePercent != null) { sb.append("lendablePercent:"); sb.append(lendablePercent + ","); } - if (limitResponse != null) { sb.append("limitResponse:"); sb.append(limitResponse); } - sb.append("}"); - return sb.toString(); - } - class LimitResponseNestedImpl extends V1beta2LimitResponseFluentImpl> implements V1beta2LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested,Nested{ - LimitResponseNestedImpl(V1beta2LimitResponse item) { - this.builder = new V1beta2LimitResponseBuilder(this, item); - } - LimitResponseNestedImpl() { - this.builder = new V1beta2LimitResponseBuilder(this); - } - V1beta2LimitResponseBuilder builder; - public N and() { - return (N) V1beta2LimitedPriorityLevelConfigurationFluentImpl.this.withLimitResponse(builder.build()); - } - public N endLimitResponse() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleBuilder.java index fa22ab837f..0b33143935 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2NonResourcePolicyRuleBuilder extends V1beta2NonResourcePolicyRuleFluentImpl implements VisitableBuilder{ +public class V1beta2NonResourcePolicyRuleBuilder extends V1beta2NonResourcePolicyRuleFluent implements VisitableBuilder{ public V1beta2NonResourcePolicyRuleBuilder() { - this(false); - } - public V1beta2NonResourcePolicyRuleBuilder(Boolean validationEnabled) { - this(new V1beta2NonResourcePolicyRule(), validationEnabled); + this(new V1beta2NonResourcePolicyRule()); } + public V1beta2NonResourcePolicyRuleBuilder(V1beta2NonResourcePolicyRuleFluent fluent) { - this(fluent, false); - } - public V1beta2NonResourcePolicyRuleBuilder(V1beta2NonResourcePolicyRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2NonResourcePolicyRule(), validationEnabled); + this(fluent, new V1beta2NonResourcePolicyRule()); } + public V1beta2NonResourcePolicyRuleBuilder(V1beta2NonResourcePolicyRuleFluent fluent,V1beta2NonResourcePolicyRule instance) { - this(fluent, instance, false); - } - public V1beta2NonResourcePolicyRuleBuilder(V1beta2NonResourcePolicyRuleFluent fluent,V1beta2NonResourcePolicyRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNonResourceURLs(instance.getNonResourceURLs()); - fluent.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2NonResourcePolicyRuleBuilder(V1beta2NonResourcePolicyRule instance) { - this(instance,false); - } - public V1beta2NonResourcePolicyRuleBuilder(V1beta2NonResourcePolicyRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNonResourceURLs(instance.getNonResourceURLs()); - this.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2NonResourcePolicyRuleFluent fluent; - Boolean validationEnabled; + public V1beta2NonResourcePolicyRule build() { V1beta2NonResourcePolicyRule buildable = new V1beta2NonResourcePolicyRule(); buildable.setNonResourceURLs(fluent.getNonResourceURLs()); @@ -46,4 +28,5 @@ public V1beta2NonResourcePolicyRule build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleFluent.java index 6478df2654..1820172093 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleFluent.java @@ -1,47 +1,246 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1beta2NonResourcePolicyRuleFluent> extends Fluent{ - public A addToNonResourceURLs(int index,String item); - public A setToNonResourceURLs(int index,String item); - public A addToNonResourceURLs(java.lang.String... items); - public A addAllToNonResourceURLs(Collection items); - public A removeFromNonResourceURLs(java.lang.String... items); - public A removeAllFromNonResourceURLs(Collection items); - public List getNonResourceURLs(); - public String getNonResourceURL(int index); - public String getFirstNonResourceURL(); - public String getLastNonResourceURL(); - public String getMatchingNonResourceURL(Predicate predicate); - public Boolean hasMatchingNonResourceURL(Predicate predicate); - public A withNonResourceURLs(List nonResourceURLs); - public A withNonResourceURLs(java.lang.String... nonResourceURLs); - public Boolean hasNonResourceURLs(); - public A addToVerbs(int index,String item); - public A setToVerbs(int index,String item); - public A addToVerbs(java.lang.String... items); - public A addAllToVerbs(Collection items); - public A removeFromVerbs(java.lang.String... items); - public A removeAllFromVerbs(Collection items); - public List getVerbs(); - public String getVerb(int index); - public String getFirstVerb(); - public String getLastVerb(); - public String getMatchingVerb(Predicate predicate); - public Boolean hasMatchingVerb(Predicate predicate); - public A withVerbs(List verbs); - public A withVerbs(java.lang.String... verbs); - public Boolean hasVerbs(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2NonResourcePolicyRuleFluent> extends BaseFluent{ + public V1beta2NonResourcePolicyRuleFluent() { + } + public V1beta2NonResourcePolicyRuleFluent(V1beta2NonResourcePolicyRule instance) { + this.copyInstance(instance); + } + private List nonResourceURLs; + private List verbs; + + protected void copyInstance(V1beta2NonResourcePolicyRule instance) { + instance = (instance != null ? instance : new V1beta2NonResourcePolicyRule()); + if (instance != null) { + this.withNonResourceURLs(instance.getNonResourceURLs()); + this.withVerbs(instance.getVerbs()); + } + } + + public A addToNonResourceURLs(int index,String item) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + this.nonResourceURLs.add(index, item); + return (A)this; + } + + public A setToNonResourceURLs(int index,String item) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + this.nonResourceURLs.set(index, item); return (A)this; + } + + public A addToNonResourceURLs(java.lang.String... items) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; + } + + public A addAllToNonResourceURLs(Collection items) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; + } + + public A removeFromNonResourceURLs(java.lang.String... items) { + if (this.nonResourceURLs == null) return (A)this; + for (String item : items) { this.nonResourceURLs.remove(item);} return (A)this; + } + + public A removeAllFromNonResourceURLs(Collection items) { + if (this.nonResourceURLs == null) return (A)this; + for (String item : items) { this.nonResourceURLs.remove(item);} return (A)this; + } + + public List getNonResourceURLs() { + return this.nonResourceURLs; + } + + public String getNonResourceURL(int index) { + return this.nonResourceURLs.get(index); + } + + public String getFirstNonResourceURL() { + return this.nonResourceURLs.get(0); + } + + public String getLastNonResourceURL() { + return this.nonResourceURLs.get(nonResourceURLs.size() - 1); + } + + public String getMatchingNonResourceURL(Predicate predicate) { + for (String item : nonResourceURLs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingNonResourceURL(Predicate predicate) { + for (String item : nonResourceURLs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNonResourceURLs(List nonResourceURLs) { + if (nonResourceURLs != null) { + this.nonResourceURLs = new ArrayList(); + for (String item : nonResourceURLs) { + this.addToNonResourceURLs(item); + } + } else { + this.nonResourceURLs = null; + } + return (A) this; + } + + public A withNonResourceURLs(java.lang.String... nonResourceURLs) { + if (this.nonResourceURLs != null) { + this.nonResourceURLs.clear(); + _visitables.remove("nonResourceURLs"); + } + if (nonResourceURLs != null) { + for (String item : nonResourceURLs) { + this.addToNonResourceURLs(item); + } + } + return (A) this; + } + + public boolean hasNonResourceURLs() { + return this.nonResourceURLs != null && !this.nonResourceURLs.isEmpty(); + } + + public A addToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.add(index, item); + return (A)this; + } + + public A setToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.set(index, item); return (A)this; + } + + public A addToVerbs(java.lang.String... items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A addAllToVerbs(Collection items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A removeFromVerbs(java.lang.String... items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public A removeAllFromVerbs(Collection items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public List getVerbs() { + return this.verbs; + } + + public String getVerb(int index) { + return this.verbs.get(index); + } + + public String getFirstVerb() { + return this.verbs.get(0); + } + + public String getLastVerb() { + return this.verbs.get(verbs.size() - 1); + } + + public String getMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVerbs(List verbs) { + if (verbs != null) { + this.verbs = new ArrayList(); + for (String item : verbs) { + this.addToVerbs(item); + } + } else { + this.verbs = null; + } + return (A) this; + } + + public A withVerbs(java.lang.String... verbs) { + if (this.verbs != null) { + this.verbs.clear(); + _visitables.remove("verbs"); + } + if (verbs != null) { + for (String item : verbs) { + this.addToVerbs(item); + } + } + return (A) this; + } + + public boolean hasVerbs() { + return this.verbs != null && !this.verbs.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2NonResourcePolicyRuleFluent that = (V1beta2NonResourcePolicyRuleFluent) o; + if (!java.util.Objects.equals(nonResourceURLs, that.nonResourceURLs)) return false; + if (!java.util.Objects.equals(verbs, that.verbs)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(nonResourceURLs, verbs, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (nonResourceURLs != null && !nonResourceURLs.isEmpty()) { sb.append("nonResourceURLs:"); sb.append(nonResourceURLs + ","); } + if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleFluentImpl.java deleted file mode 100644 index 7b6a95a367..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRuleFluentImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2NonResourcePolicyRuleFluentImpl> extends BaseFluent implements V1beta2NonResourcePolicyRuleFluent{ - public V1beta2NonResourcePolicyRuleFluentImpl() { - } - public V1beta2NonResourcePolicyRuleFluentImpl(V1beta2NonResourcePolicyRule instance) { - if (instance != null) { - this.withNonResourceURLs(instance.getNonResourceURLs()); - this.withVerbs(instance.getVerbs()); - } - } - private List nonResourceURLs; - private List verbs; - public A addToNonResourceURLs(int index,String item) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - this.nonResourceURLs.add(index, item); - return (A)this; - } - public A setToNonResourceURLs(int index,String item) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - this.nonResourceURLs.set(index, item); return (A)this; - } - public A addToNonResourceURLs(java.lang.String... items) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; - } - public A addAllToNonResourceURLs(Collection items) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; - } - public A removeFromNonResourceURLs(java.lang.String... items) { - for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this; - } - public A removeAllFromNonResourceURLs(Collection items) { - for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this; - } - public List getNonResourceURLs() { - return this.nonResourceURLs; - } - public String getNonResourceURL(int index) { - return this.nonResourceURLs.get(index); - } - public String getFirstNonResourceURL() { - return this.nonResourceURLs.get(0); - } - public String getLastNonResourceURL() { - return this.nonResourceURLs.get(nonResourceURLs.size() - 1); - } - public String getMatchingNonResourceURL(Predicate predicate) { - for (String item: nonResourceURLs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingNonResourceURL(Predicate predicate) { - for (String item: nonResourceURLs) { if(predicate.test(item)){ return true;} } return false; - } - public A withNonResourceURLs(List nonResourceURLs) { - if (nonResourceURLs != null) {this.nonResourceURLs = new ArrayList(); for (String item : nonResourceURLs){this.addToNonResourceURLs(item);}} else { this.nonResourceURLs = null;} return (A) this; - } - public A withNonResourceURLs(java.lang.String... nonResourceURLs) { - if (this.nonResourceURLs != null) {this.nonResourceURLs.clear(); _visitables.remove("nonResourceURLs"); } - if (nonResourceURLs != null) {for (String item :nonResourceURLs){ this.addToNonResourceURLs(item);}} return (A) this; - } - public Boolean hasNonResourceURLs() { - return nonResourceURLs != null && !nonResourceURLs.isEmpty(); - } - public A addToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.add(index, item); - return (A)this; - } - public A setToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.set(index, item); return (A)this; - } - public A addToVerbs(java.lang.String... items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A addAllToVerbs(Collection items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A removeFromVerbs(java.lang.String... items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public A removeAllFromVerbs(Collection items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public List getVerbs() { - return this.verbs; - } - public String getVerb(int index) { - return this.verbs.get(index); - } - public String getFirstVerb() { - return this.verbs.get(0); - } - public String getLastVerb() { - return this.verbs.get(verbs.size() - 1); - } - public String getMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return true;} } return false; - } - public A withVerbs(List verbs) { - if (verbs != null) {this.verbs = new ArrayList(); for (String item : verbs){this.addToVerbs(item);}} else { this.verbs = null;} return (A) this; - } - public A withVerbs(java.lang.String... verbs) { - if (this.verbs != null) {this.verbs.clear(); _visitables.remove("verbs"); } - if (verbs != null) {for (String item :verbs){ this.addToVerbs(item);}} return (A) this; - } - public Boolean hasVerbs() { - return verbs != null && !verbs.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2NonResourcePolicyRuleFluentImpl that = (V1beta2NonResourcePolicyRuleFluentImpl) o; - if (!java.util.Objects.equals(nonResourceURLs, that.nonResourceURLs)) return false; - - if (!java.util.Objects.equals(verbs, that.verbs)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(nonResourceURLs, verbs, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (nonResourceURLs != null && !nonResourceURLs.isEmpty()) { sb.append("nonResourceURLs:"); sb.append(nonResourceURLs + ","); } - if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsBuilder.java index 43dd3dbf46..89bba45168 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2PolicyRulesWithSubjectsBuilder extends V1beta2PolicyRulesWithSubjectsFluentImpl implements VisitableBuilder{ +public class V1beta2PolicyRulesWithSubjectsBuilder extends V1beta2PolicyRulesWithSubjectsFluent implements VisitableBuilder{ public V1beta2PolicyRulesWithSubjectsBuilder() { - this(false); - } - public V1beta2PolicyRulesWithSubjectsBuilder(Boolean validationEnabled) { - this(new V1beta2PolicyRulesWithSubjects(), validationEnabled); + this(new V1beta2PolicyRulesWithSubjects()); } + public V1beta2PolicyRulesWithSubjectsBuilder(V1beta2PolicyRulesWithSubjectsFluent fluent) { - this(fluent, false); - } - public V1beta2PolicyRulesWithSubjectsBuilder(V1beta2PolicyRulesWithSubjectsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2PolicyRulesWithSubjects(), validationEnabled); + this(fluent, new V1beta2PolicyRulesWithSubjects()); } + public V1beta2PolicyRulesWithSubjectsBuilder(V1beta2PolicyRulesWithSubjectsFluent fluent,V1beta2PolicyRulesWithSubjects instance) { - this(fluent, instance, false); - } - public V1beta2PolicyRulesWithSubjectsBuilder(V1beta2PolicyRulesWithSubjectsFluent fluent,V1beta2PolicyRulesWithSubjects instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNonResourceRules(instance.getNonResourceRules()); - fluent.withResourceRules(instance.getResourceRules()); - fluent.withSubjects(instance.getSubjects()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2PolicyRulesWithSubjectsBuilder(V1beta2PolicyRulesWithSubjects instance) { - this(instance,false); - } - public V1beta2PolicyRulesWithSubjectsBuilder(V1beta2PolicyRulesWithSubjects instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNonResourceRules(instance.getNonResourceRules()); - this.withResourceRules(instance.getResourceRules()); - this.withSubjects(instance.getSubjects()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2PolicyRulesWithSubjectsFluent fluent; - Boolean validationEnabled; + public V1beta2PolicyRulesWithSubjects build() { V1beta2PolicyRulesWithSubjects buildable = new V1beta2PolicyRulesWithSubjects(); - buildable.setNonResourceRules(fluent.getNonResourceRules()); - buildable.setResourceRules(fluent.getResourceRules()); - buildable.setSubjects(fluent.getSubjects()); + buildable.setNonResourceRules(fluent.buildNonResourceRules()); + buildable.setResourceRules(fluent.buildResourceRules()); + buildable.setSubjects(fluent.buildSubjects()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsFluent.java index ddd3d8d980..c8b39de38c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsFluent.java @@ -1,125 +1,571 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta2PolicyRulesWithSubjectsFluent> extends Fluent{ - public A addToNonResourceRules(int index,V1beta2NonResourcePolicyRule item); - public A setToNonResourceRules(int index,V1beta2NonResourcePolicyRule item); - public A addToNonResourceRules(io.kubernetes.client.openapi.models.V1beta2NonResourcePolicyRule... items); - public A addAllToNonResourceRules(Collection items); - public A removeFromNonResourceRules(io.kubernetes.client.openapi.models.V1beta2NonResourcePolicyRule... items); - public A removeAllFromNonResourceRules(Collection items); - public A removeMatchingFromNonResourceRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildNonResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getNonResourceRules(); - public List buildNonResourceRules(); - public V1beta2NonResourcePolicyRule buildNonResourceRule(int index); - public V1beta2NonResourcePolicyRule buildFirstNonResourceRule(); - public V1beta2NonResourcePolicyRule buildLastNonResourceRule(); - public V1beta2NonResourcePolicyRule buildMatchingNonResourceRule(Predicate predicate); - public Boolean hasMatchingNonResourceRule(Predicate predicate); - public A withNonResourceRules(List nonResourceRules); - public A withNonResourceRules(io.kubernetes.client.openapi.models.V1beta2NonResourcePolicyRule... nonResourceRules); - public Boolean hasNonResourceRules(); - public V1beta2PolicyRulesWithSubjectsFluent.NonResourceRulesNested addNewNonResourceRule(); - public V1beta2PolicyRulesWithSubjectsFluent.NonResourceRulesNested addNewNonResourceRuleLike(V1beta2NonResourcePolicyRule item); - public V1beta2PolicyRulesWithSubjectsFluent.NonResourceRulesNested setNewNonResourceRuleLike(int index,V1beta2NonResourcePolicyRule item); - public V1beta2PolicyRulesWithSubjectsFluent.NonResourceRulesNested editNonResourceRule(int index); - public V1beta2PolicyRulesWithSubjectsFluent.NonResourceRulesNested editFirstNonResourceRule(); - public V1beta2PolicyRulesWithSubjectsFluent.NonResourceRulesNested editLastNonResourceRule(); - public V1beta2PolicyRulesWithSubjectsFluent.NonResourceRulesNested editMatchingNonResourceRule(Predicate predicate); - public A addToResourceRules(int index,V1beta2ResourcePolicyRule item); - public A setToResourceRules(int index,V1beta2ResourcePolicyRule item); - public A addToResourceRules(io.kubernetes.client.openapi.models.V1beta2ResourcePolicyRule... items); - public A addAllToResourceRules(Collection items); - public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1beta2ResourcePolicyRule... items); - public A removeAllFromResourceRules(Collection items); - public A removeMatchingFromResourceRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceRules(); - public List buildResourceRules(); - public V1beta2ResourcePolicyRule buildResourceRule(int index); - public V1beta2ResourcePolicyRule buildFirstResourceRule(); - public V1beta2ResourcePolicyRule buildLastResourceRule(); - public V1beta2ResourcePolicyRule buildMatchingResourceRule(Predicate predicate); - public Boolean hasMatchingResourceRule(Predicate predicate); - public A withResourceRules(List resourceRules); - public A withResourceRules(io.kubernetes.client.openapi.models.V1beta2ResourcePolicyRule... resourceRules); - public Boolean hasResourceRules(); - public V1beta2PolicyRulesWithSubjectsFluent.ResourceRulesNested addNewResourceRule(); - public V1beta2PolicyRulesWithSubjectsFluent.ResourceRulesNested addNewResourceRuleLike(V1beta2ResourcePolicyRule item); - public V1beta2PolicyRulesWithSubjectsFluent.ResourceRulesNested setNewResourceRuleLike(int index,V1beta2ResourcePolicyRule item); - public V1beta2PolicyRulesWithSubjectsFluent.ResourceRulesNested editResourceRule(int index); - public V1beta2PolicyRulesWithSubjectsFluent.ResourceRulesNested editFirstResourceRule(); - public V1beta2PolicyRulesWithSubjectsFluent.ResourceRulesNested editLastResourceRule(); - public V1beta2PolicyRulesWithSubjectsFluent.ResourceRulesNested editMatchingResourceRule(Predicate predicate); - public A addToSubjects(int index,V1beta2Subject item); - public A setToSubjects(int index,V1beta2Subject item); - public A addToSubjects(io.kubernetes.client.openapi.models.V1beta2Subject... items); - public A addAllToSubjects(Collection items); - public A removeFromSubjects(io.kubernetes.client.openapi.models.V1beta2Subject... items); - public A removeAllFromSubjects(Collection items); - public A removeMatchingFromSubjects(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSubjects instead. - * @return The buildable object. - */ - @Deprecated - public List getSubjects(); - public List buildSubjects(); - public V1beta2Subject buildSubject(int index); - public V1beta2Subject buildFirstSubject(); - public V1beta2Subject buildLastSubject(); - public V1beta2Subject buildMatchingSubject(Predicate predicate); - public Boolean hasMatchingSubject(Predicate predicate); - public A withSubjects(List subjects); - public A withSubjects(io.kubernetes.client.openapi.models.V1beta2Subject... subjects); - public Boolean hasSubjects(); - public V1beta2PolicyRulesWithSubjectsFluent.SubjectsNested addNewSubject(); - public V1beta2PolicyRulesWithSubjectsFluent.SubjectsNested addNewSubjectLike(V1beta2Subject item); - public V1beta2PolicyRulesWithSubjectsFluent.SubjectsNested setNewSubjectLike(int index,V1beta2Subject item); - public V1beta2PolicyRulesWithSubjectsFluent.SubjectsNested editSubject(int index); - public V1beta2PolicyRulesWithSubjectsFluent.SubjectsNested editFirstSubject(); - public V1beta2PolicyRulesWithSubjectsFluent.SubjectsNested editLastSubject(); - public V1beta2PolicyRulesWithSubjectsFluent.SubjectsNested editMatchingSubject(Predicate predicate); - public interface NonResourceRulesNested extends Nested,V1beta2NonResourcePolicyRuleFluent>{ - public N and(); - public N endNonResourceRule(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2PolicyRulesWithSubjectsFluent> extends BaseFluent{ + public V1beta2PolicyRulesWithSubjectsFluent() { + } + + public V1beta2PolicyRulesWithSubjectsFluent(V1beta2PolicyRulesWithSubjects instance) { + this.copyInstance(instance); + } + private ArrayList nonResourceRules; + private ArrayList resourceRules; + private ArrayList subjects; + + protected void copyInstance(V1beta2PolicyRulesWithSubjects instance) { + instance = (instance != null ? instance : new V1beta2PolicyRulesWithSubjects()); + if (instance != null) { + this.withNonResourceRules(instance.getNonResourceRules()); + this.withResourceRules(instance.getResourceRules()); + this.withSubjects(instance.getSubjects()); + } + } + + public A addToNonResourceRules(int index,V1beta2NonResourcePolicyRule item) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item); + if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").add(index, builder); nonResourceRules.add(index, builder);} + return (A)this; + } + + public A setToNonResourceRules(int index,V1beta2NonResourcePolicyRule item) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item); + if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").set(index, builder); nonResourceRules.set(index, builder);} + return (A)this; + } + + public A addToNonResourceRules(io.kubernetes.client.openapi.models.V1beta2NonResourcePolicyRule... items) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + for (V1beta2NonResourcePolicyRule item : items) {V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; + } + + public A addAllToNonResourceRules(Collection items) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + for (V1beta2NonResourcePolicyRule item : items) {V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; + } + + public A removeFromNonResourceRules(io.kubernetes.client.openapi.models.V1beta2NonResourcePolicyRule... items) { + if (this.nonResourceRules == null) return (A)this; + for (V1beta2NonResourcePolicyRule item : items) {V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder); this.nonResourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromNonResourceRules(Collection items) { + if (this.nonResourceRules == null) return (A)this; + for (V1beta2NonResourcePolicyRule item : items) {V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder); this.nonResourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromNonResourceRules(Predicate predicate) { + if (nonResourceRules == null) return (A) this; + final Iterator each = nonResourceRules.iterator(); + final List visitables = _visitables.get("nonResourceRules"); + while (each.hasNext()) { + V1beta2NonResourcePolicyRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildNonResourceRules() { + return this.nonResourceRules != null ? build(nonResourceRules) : null; + } + + public V1beta2NonResourcePolicyRule buildNonResourceRule(int index) { + return this.nonResourceRules.get(index).build(); + } + + public V1beta2NonResourcePolicyRule buildFirstNonResourceRule() { + return this.nonResourceRules.get(0).build(); + } + + public V1beta2NonResourcePolicyRule buildLastNonResourceRule() { + return this.nonResourceRules.get(nonResourceRules.size() - 1).build(); + } + + public V1beta2NonResourcePolicyRule buildMatchingNonResourceRule(Predicate predicate) { + for (V1beta2NonResourcePolicyRuleBuilder item : nonResourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingNonResourceRule(Predicate predicate) { + for (V1beta2NonResourcePolicyRuleBuilder item : nonResourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNonResourceRules(List nonResourceRules) { + if (this.nonResourceRules != null) { + this._visitables.get("nonResourceRules").clear(); + } + if (nonResourceRules != null) { + this.nonResourceRules = new ArrayList(); + for (V1beta2NonResourcePolicyRule item : nonResourceRules) { + this.addToNonResourceRules(item); + } + } else { + this.nonResourceRules = null; + } + return (A) this; + } + + public A withNonResourceRules(io.kubernetes.client.openapi.models.V1beta2NonResourcePolicyRule... nonResourceRules) { + if (this.nonResourceRules != null) { + this.nonResourceRules.clear(); + _visitables.remove("nonResourceRules"); + } + if (nonResourceRules != null) { + for (V1beta2NonResourcePolicyRule item : nonResourceRules) { + this.addToNonResourceRules(item); + } + } + return (A) this; + } + + public boolean hasNonResourceRules() { + return this.nonResourceRules != null && !this.nonResourceRules.isEmpty(); + } + + public NonResourceRulesNested addNewNonResourceRule() { + return new NonResourceRulesNested(-1, null); + } + + public NonResourceRulesNested addNewNonResourceRuleLike(V1beta2NonResourcePolicyRule item) { + return new NonResourceRulesNested(-1, item); + } + + public NonResourceRulesNested setNewNonResourceRuleLike(int index,V1beta2NonResourcePolicyRule item) { + return new NonResourceRulesNested(index, item); + } + + public NonResourceRulesNested editNonResourceRule(int index) { + if (nonResourceRules.size() <= index) throw new RuntimeException("Can't edit nonResourceRules. Index exceeds size."); + return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); + } + + public NonResourceRulesNested editFirstNonResourceRule() { + if (nonResourceRules.size() == 0) throw new RuntimeException("Can't edit first nonResourceRules. The list is empty."); + return setNewNonResourceRuleLike(0, buildNonResourceRule(0)); + } + + public NonResourceRulesNested editLastNonResourceRule() { + int index = nonResourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last nonResourceRules. The list is empty."); + return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); + } + + public NonResourceRulesNested editMatchingNonResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").add(index, builder); resourceRules.add(index, builder);} + return (A)this; + } + + public A setToResourceRules(int index,V1beta2ResourcePolicyRule item) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").set(index, builder); resourceRules.set(index, builder);} + return (A)this; + } + + public A addToResourceRules(io.kubernetes.client.openapi.models.V1beta2ResourcePolicyRule... items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1beta2ResourcePolicyRule item : items) {V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A addAllToResourceRules(Collection items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1beta2ResourcePolicyRule item : items) {V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1beta2ResourcePolicyRule... items) { + if (this.resourceRules == null) return (A)this; + for (V1beta2ResourcePolicyRule item : items) {V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromResourceRules(Collection items) { + if (this.resourceRules == null) return (A)this; + for (V1beta2ResourcePolicyRule item : items) {V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromResourceRules(Predicate predicate) { + if (resourceRules == null) return (A) this; + final Iterator each = resourceRules.iterator(); + final List visitables = _visitables.get("resourceRules"); + while (each.hasNext()) { + V1beta2ResourcePolicyRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResourceRules() { + return this.resourceRules != null ? build(resourceRules) : null; + } + + public V1beta2ResourcePolicyRule buildResourceRule(int index) { + return this.resourceRules.get(index).build(); + } + + public V1beta2ResourcePolicyRule buildFirstResourceRule() { + return this.resourceRules.get(0).build(); + } + + public V1beta2ResourcePolicyRule buildLastResourceRule() { + return this.resourceRules.get(resourceRules.size() - 1).build(); + } + + public V1beta2ResourcePolicyRule buildMatchingResourceRule(Predicate predicate) { + for (V1beta2ResourcePolicyRuleBuilder item : resourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResourceRule(Predicate predicate) { + for (V1beta2ResourcePolicyRuleBuilder item : resourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceRules(List resourceRules) { + if (this.resourceRules != null) { + this._visitables.get("resourceRules").clear(); + } + if (resourceRules != null) { + this.resourceRules = new ArrayList(); + for (V1beta2ResourcePolicyRule item : resourceRules) { + this.addToResourceRules(item); + } + } else { + this.resourceRules = null; + } + return (A) this; } - public interface ResourceRulesNested extends Nested,V1beta2ResourcePolicyRuleFluent>{ - public N and(); - public N endResourceRule(); + + public A withResourceRules(io.kubernetes.client.openapi.models.V1beta2ResourcePolicyRule... resourceRules) { + if (this.resourceRules != null) { + this.resourceRules.clear(); + _visitables.remove("resourceRules"); + } + if (resourceRules != null) { + for (V1beta2ResourcePolicyRule item : resourceRules) { + this.addToResourceRules(item); + } + } + return (A) this; + } + + public boolean hasResourceRules() { + return this.resourceRules != null && !this.resourceRules.isEmpty(); + } + + public ResourceRulesNested addNewResourceRule() { + return new ResourceRulesNested(-1, null); + } + + public ResourceRulesNested addNewResourceRuleLike(V1beta2ResourcePolicyRule item) { + return new ResourceRulesNested(-1, item); + } + + public ResourceRulesNested setNewResourceRuleLike(int index,V1beta2ResourcePolicyRule item) { + return new ResourceRulesNested(index, item); + } + + public ResourceRulesNested editResourceRule(int index) { + if (resourceRules.size() <= index) throw new RuntimeException("Can't edit resourceRules. Index exceeds size."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editFirstResourceRule() { + if (resourceRules.size() == 0) throw new RuntimeException("Can't edit first resourceRules. The list is empty."); + return setNewResourceRuleLike(0, buildResourceRule(0)); + } + + public ResourceRulesNested editLastResourceRule() { + int index = resourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resourceRules. The list is empty."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editMatchingResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item); + if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").add(index, builder); subjects.add(index, builder);} + return (A)this; + } + + public A setToSubjects(int index,V1beta2Subject item) { + if (this.subjects == null) {this.subjects = new ArrayList();} + V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item); + if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").set(index, builder); subjects.set(index, builder);} + return (A)this; + } + + public A addToSubjects(io.kubernetes.client.openapi.models.V1beta2Subject... items) { + if (this.subjects == null) {this.subjects = new ArrayList();} + for (V1beta2Subject item : items) {V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; + } + + public A addAllToSubjects(Collection items) { + if (this.subjects == null) {this.subjects = new ArrayList();} + for (V1beta2Subject item : items) {V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; + } + + public A removeFromSubjects(io.kubernetes.client.openapi.models.V1beta2Subject... items) { + if (this.subjects == null) return (A)this; + for (V1beta2Subject item : items) {V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item);_visitables.get("subjects").remove(builder); this.subjects.remove(builder);} return (A)this; + } + + public A removeAllFromSubjects(Collection items) { + if (this.subjects == null) return (A)this; + for (V1beta2Subject item : items) {V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item);_visitables.get("subjects").remove(builder); this.subjects.remove(builder);} return (A)this; + } + + public A removeMatchingFromSubjects(Predicate predicate) { + if (subjects == null) return (A) this; + final Iterator each = subjects.iterator(); + final List visitables = _visitables.get("subjects"); + while (each.hasNext()) { + V1beta2SubjectBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildSubjects() { + return this.subjects != null ? build(subjects) : null; + } + + public V1beta2Subject buildSubject(int index) { + return this.subjects.get(index).build(); + } + + public V1beta2Subject buildFirstSubject() { + return this.subjects.get(0).build(); + } + + public V1beta2Subject buildLastSubject() { + return this.subjects.get(subjects.size() - 1).build(); + } + + public V1beta2Subject buildMatchingSubject(Predicate predicate) { + for (V1beta2SubjectBuilder item : subjects) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingSubject(Predicate predicate) { + for (V1beta2SubjectBuilder item : subjects) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSubjects(List subjects) { + if (this.subjects != null) { + this._visitables.get("subjects").clear(); + } + if (subjects != null) { + this.subjects = new ArrayList(); + for (V1beta2Subject item : subjects) { + this.addToSubjects(item); + } + } else { + this.subjects = null; + } + return (A) this; + } + + public A withSubjects(io.kubernetes.client.openapi.models.V1beta2Subject... subjects) { + if (this.subjects != null) { + this.subjects.clear(); + _visitables.remove("subjects"); + } + if (subjects != null) { + for (V1beta2Subject item : subjects) { + this.addToSubjects(item); + } + } + return (A) this; + } + + public boolean hasSubjects() { + return this.subjects != null && !this.subjects.isEmpty(); + } + + public SubjectsNested addNewSubject() { + return new SubjectsNested(-1, null); + } + + public SubjectsNested addNewSubjectLike(V1beta2Subject item) { + return new SubjectsNested(-1, item); + } + + public SubjectsNested setNewSubjectLike(int index,V1beta2Subject item) { + return new SubjectsNested(index, item); + } + + public SubjectsNested editSubject(int index) { + if (subjects.size() <= index) throw new RuntimeException("Can't edit subjects. Index exceeds size."); + return setNewSubjectLike(index, buildSubject(index)); + } + + public SubjectsNested editFirstSubject() { + if (subjects.size() == 0) throw new RuntimeException("Can't edit first subjects. The list is empty."); + return setNewSubjectLike(0, buildSubject(0)); + } + + public SubjectsNested editLastSubject() { + int index = subjects.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last subjects. The list is empty."); + return setNewSubjectLike(index, buildSubject(index)); + } + + public SubjectsNested editMatchingSubject(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta2NonResourcePolicyRuleFluent> implements Nested{ + NonResourceRulesNested(int index,V1beta2NonResourcePolicyRule item) { + this.index = index; + this.builder = new V1beta2NonResourcePolicyRuleBuilder(this, item); + } + V1beta2NonResourcePolicyRuleBuilder builder; + int index; + + public N and() { + return (N) V1beta2PolicyRulesWithSubjectsFluent.this.setToNonResourceRules(index,builder.build()); + } + public N endNonResourceRule() { + return and(); + } + + } - public interface SubjectsNested extends Nested,V1beta2SubjectFluent>{ - public N and(); - public N endSubject(); + public class ResourceRulesNested extends V1beta2ResourcePolicyRuleFluent> implements Nested{ + ResourceRulesNested(int index,V1beta2ResourcePolicyRule item) { + this.index = index; + this.builder = new V1beta2ResourcePolicyRuleBuilder(this, item); + } + V1beta2ResourcePolicyRuleBuilder builder; + int index; + + public N and() { + return (N) V1beta2PolicyRulesWithSubjectsFluent.this.setToResourceRules(index,builder.build()); + } + public N endResourceRule() { + return and(); + } + + } + public class SubjectsNested extends V1beta2SubjectFluent> implements Nested{ + SubjectsNested(int index,V1beta2Subject item) { + this.index = index; + this.builder = new V1beta2SubjectBuilder(this, item); + } + V1beta2SubjectBuilder builder; + int index; + + public N and() { + return (N) V1beta2PolicyRulesWithSubjectsFluent.this.setToSubjects(index,builder.build()); + } + + public N endSubject() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsFluentImpl.java deleted file mode 100644 index ff54e57d8c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjectsFluentImpl.java +++ /dev/null @@ -1,438 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2PolicyRulesWithSubjectsFluentImpl> extends BaseFluent implements V1beta2PolicyRulesWithSubjectsFluent{ - public V1beta2PolicyRulesWithSubjectsFluentImpl() { - } - public V1beta2PolicyRulesWithSubjectsFluentImpl(V1beta2PolicyRulesWithSubjects instance) { - if (instance != null) { - this.withNonResourceRules(instance.getNonResourceRules()); - this.withResourceRules(instance.getResourceRules()); - this.withSubjects(instance.getSubjects()); - } - } - private ArrayList nonResourceRules; - private ArrayList resourceRules; - private ArrayList subjects; - public A addToNonResourceRules(int index,V1beta2NonResourcePolicyRule item) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item); - if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").add(index, builder); nonResourceRules.add(index, builder);} - return (A)this; - } - public A setToNonResourceRules(int index,V1beta2NonResourcePolicyRule item) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item); - if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").set(index, builder); nonResourceRules.set(index, builder);} - return (A)this; - } - public A addToNonResourceRules(io.kubernetes.client.openapi.models.V1beta2NonResourcePolicyRule... items) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - for (V1beta2NonResourcePolicyRule item : items) {V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; - } - public A addAllToNonResourceRules(Collection items) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - for (V1beta2NonResourcePolicyRule item : items) {V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; - } - public A removeFromNonResourceRules(io.kubernetes.client.openapi.models.V1beta2NonResourcePolicyRule... items) { - for (V1beta2NonResourcePolicyRule item : items) {V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder);if (this.nonResourceRules != null) {this.nonResourceRules.remove(builder);}} return (A)this; - } - public A removeAllFromNonResourceRules(Collection items) { - for (V1beta2NonResourcePolicyRule item : items) {V1beta2NonResourcePolicyRuleBuilder builder = new V1beta2NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder);if (this.nonResourceRules != null) {this.nonResourceRules.remove(builder);}} return (A)this; - } - public A removeMatchingFromNonResourceRules(Predicate predicate) { - if (nonResourceRules == null) return (A) this; - final Iterator each = nonResourceRules.iterator(); - final List visitables = _visitables.get("nonResourceRules"); - while (each.hasNext()) { - V1beta2NonResourcePolicyRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildNonResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getNonResourceRules() { - return nonResourceRules != null ? build(nonResourceRules) : null; - } - public List buildNonResourceRules() { - return nonResourceRules != null ? build(nonResourceRules) : null; - } - public V1beta2NonResourcePolicyRule buildNonResourceRule(int index) { - return this.nonResourceRules.get(index).build(); - } - public V1beta2NonResourcePolicyRule buildFirstNonResourceRule() { - return this.nonResourceRules.get(0).build(); - } - public V1beta2NonResourcePolicyRule buildLastNonResourceRule() { - return this.nonResourceRules.get(nonResourceRules.size() - 1).build(); - } - public V1beta2NonResourcePolicyRule buildMatchingNonResourceRule(Predicate predicate) { - for (V1beta2NonResourcePolicyRuleBuilder item: nonResourceRules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingNonResourceRule(Predicate predicate) { - for (V1beta2NonResourcePolicyRuleBuilder item: nonResourceRules) { if(predicate.test(item)){ return true;} } return false; - } - public A withNonResourceRules(List nonResourceRules) { - if (this.nonResourceRules != null) { _visitables.get("nonResourceRules").clear();} - if (nonResourceRules != null) {this.nonResourceRules = new ArrayList(); for (V1beta2NonResourcePolicyRule item : nonResourceRules){this.addToNonResourceRules(item);}} else { this.nonResourceRules = null;} return (A) this; - } - public A withNonResourceRules(io.kubernetes.client.openapi.models.V1beta2NonResourcePolicyRule... nonResourceRules) { - if (this.nonResourceRules != null) {this.nonResourceRules.clear(); _visitables.remove("nonResourceRules"); } - if (nonResourceRules != null) {for (V1beta2NonResourcePolicyRule item :nonResourceRules){ this.addToNonResourceRules(item);}} return (A) this; - } - public Boolean hasNonResourceRules() { - return nonResourceRules != null && !nonResourceRules.isEmpty(); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested addNewNonResourceRule() { - return new V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNestedImpl(); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested addNewNonResourceRuleLike(V1beta2NonResourcePolicyRule item) { - return new V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNestedImpl(-1, item); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested setNewNonResourceRuleLike(int index,V1beta2NonResourcePolicyRule item) { - return new V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNestedImpl(index, item); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested editNonResourceRule(int index) { - if (nonResourceRules.size() <= index) throw new RuntimeException("Can't edit nonResourceRules. Index exceeds size."); - return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested editFirstNonResourceRule() { - if (nonResourceRules.size() == 0) throw new RuntimeException("Can't edit first nonResourceRules. The list is empty."); - return setNewNonResourceRuleLike(0, buildNonResourceRule(0)); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested editLastNonResourceRule() { - int index = nonResourceRules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last nonResourceRules. The list is empty."); - return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested editMatchingNonResourceRule(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item); - if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").add(index, builder); resourceRules.add(index, builder);} - return (A)this; - } - public A setToResourceRules(int index,V1beta2ResourcePolicyRule item) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item); - if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").set(index, builder); resourceRules.set(index, builder);} - return (A)this; - } - public A addToResourceRules(io.kubernetes.client.openapi.models.V1beta2ResourcePolicyRule... items) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - for (V1beta2ResourcePolicyRule item : items) {V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; - } - public A addAllToResourceRules(Collection items) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - for (V1beta2ResourcePolicyRule item : items) {V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; - } - public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1beta2ResourcePolicyRule... items) { - for (V1beta2ResourcePolicyRule item : items) {V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").remove(builder);if (this.resourceRules != null) {this.resourceRules.remove(builder);}} return (A)this; - } - public A removeAllFromResourceRules(Collection items) { - for (V1beta2ResourcePolicyRule item : items) {V1beta2ResourcePolicyRuleBuilder builder = new V1beta2ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").remove(builder);if (this.resourceRules != null) {this.resourceRules.remove(builder);}} return (A)this; - } - public A removeMatchingFromResourceRules(Predicate predicate) { - if (resourceRules == null) return (A) this; - final Iterator each = resourceRules.iterator(); - final List visitables = _visitables.get("resourceRules"); - while (each.hasNext()) { - V1beta2ResourcePolicyRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceRules() { - return resourceRules != null ? build(resourceRules) : null; - } - public List buildResourceRules() { - return resourceRules != null ? build(resourceRules) : null; - } - public V1beta2ResourcePolicyRule buildResourceRule(int index) { - return this.resourceRules.get(index).build(); - } - public V1beta2ResourcePolicyRule buildFirstResourceRule() { - return this.resourceRules.get(0).build(); - } - public V1beta2ResourcePolicyRule buildLastResourceRule() { - return this.resourceRules.get(resourceRules.size() - 1).build(); - } - public V1beta2ResourcePolicyRule buildMatchingResourceRule(Predicate predicate) { - for (V1beta2ResourcePolicyRuleBuilder item: resourceRules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResourceRule(Predicate predicate) { - for (V1beta2ResourcePolicyRuleBuilder item: resourceRules) { if(predicate.test(item)){ return true;} } return false; - } - public A withResourceRules(List resourceRules) { - if (this.resourceRules != null) { _visitables.get("resourceRules").clear();} - if (resourceRules != null) {this.resourceRules = new ArrayList(); for (V1beta2ResourcePolicyRule item : resourceRules){this.addToResourceRules(item);}} else { this.resourceRules = null;} return (A) this; - } - public A withResourceRules(io.kubernetes.client.openapi.models.V1beta2ResourcePolicyRule... resourceRules) { - if (this.resourceRules != null) {this.resourceRules.clear(); _visitables.remove("resourceRules"); } - if (resourceRules != null) {for (V1beta2ResourcePolicyRule item :resourceRules){ this.addToResourceRules(item);}} return (A) this; - } - public Boolean hasResourceRules() { - return resourceRules != null && !resourceRules.isEmpty(); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested addNewResourceRule() { - return new V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNestedImpl(); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested addNewResourceRuleLike(V1beta2ResourcePolicyRule item) { - return new V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNestedImpl(-1, item); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested setNewResourceRuleLike(int index,V1beta2ResourcePolicyRule item) { - return new V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNestedImpl(index, item); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested editResourceRule(int index) { - if (resourceRules.size() <= index) throw new RuntimeException("Can't edit resourceRules. Index exceeds size."); - return setNewResourceRuleLike(index, buildResourceRule(index)); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested editFirstResourceRule() { - if (resourceRules.size() == 0) throw new RuntimeException("Can't edit first resourceRules. The list is empty."); - return setNewResourceRuleLike(0, buildResourceRule(0)); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested editLastResourceRule() { - int index = resourceRules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resourceRules. The list is empty."); - return setNewResourceRuleLike(index, buildResourceRule(index)); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested editMatchingResourceRule(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item); - if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").add(index, builder); subjects.add(index, builder);} - return (A)this; - } - public A setToSubjects(int index,V1beta2Subject item) { - if (this.subjects == null) {this.subjects = new ArrayList();} - V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item); - if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").set(index, builder); subjects.set(index, builder);} - return (A)this; - } - public A addToSubjects(io.kubernetes.client.openapi.models.V1beta2Subject... items) { - if (this.subjects == null) {this.subjects = new ArrayList();} - for (V1beta2Subject item : items) {V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; - } - public A addAllToSubjects(Collection items) { - if (this.subjects == null) {this.subjects = new ArrayList();} - for (V1beta2Subject item : items) {V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; - } - public A removeFromSubjects(io.kubernetes.client.openapi.models.V1beta2Subject... items) { - for (V1beta2Subject item : items) {V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item);_visitables.get("subjects").remove(builder);if (this.subjects != null) {this.subjects.remove(builder);}} return (A)this; - } - public A removeAllFromSubjects(Collection items) { - for (V1beta2Subject item : items) {V1beta2SubjectBuilder builder = new V1beta2SubjectBuilder(item);_visitables.get("subjects").remove(builder);if (this.subjects != null) {this.subjects.remove(builder);}} return (A)this; - } - public A removeMatchingFromSubjects(Predicate predicate) { - if (subjects == null) return (A) this; - final Iterator each = subjects.iterator(); - final List visitables = _visitables.get("subjects"); - while (each.hasNext()) { - V1beta2SubjectBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildSubjects instead. - * @return The buildable object. - */ - @Deprecated - public List getSubjects() { - return subjects != null ? build(subjects) : null; - } - public List buildSubjects() { - return subjects != null ? build(subjects) : null; - } - public V1beta2Subject buildSubject(int index) { - return this.subjects.get(index).build(); - } - public V1beta2Subject buildFirstSubject() { - return this.subjects.get(0).build(); - } - public V1beta2Subject buildLastSubject() { - return this.subjects.get(subjects.size() - 1).build(); - } - public V1beta2Subject buildMatchingSubject(Predicate predicate) { - for (V1beta2SubjectBuilder item: subjects) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingSubject(Predicate predicate) { - for (V1beta2SubjectBuilder item: subjects) { if(predicate.test(item)){ return true;} } return false; - } - public A withSubjects(List subjects) { - if (this.subjects != null) { _visitables.get("subjects").clear();} - if (subjects != null) {this.subjects = new ArrayList(); for (V1beta2Subject item : subjects){this.addToSubjects(item);}} else { this.subjects = null;} return (A) this; - } - public A withSubjects(io.kubernetes.client.openapi.models.V1beta2Subject... subjects) { - if (this.subjects != null) {this.subjects.clear(); _visitables.remove("subjects"); } - if (subjects != null) {for (V1beta2Subject item :subjects){ this.addToSubjects(item);}} return (A) this; - } - public Boolean hasSubjects() { - return subjects != null && !subjects.isEmpty(); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNested addNewSubject() { - return new V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNestedImpl(); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNested addNewSubjectLike(V1beta2Subject item) { - return new V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNestedImpl(-1, item); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNested setNewSubjectLike(int index,V1beta2Subject item) { - return new V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNestedImpl(index, item); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNested editSubject(int index) { - if (subjects.size() <= index) throw new RuntimeException("Can't edit subjects. Index exceeds size."); - return setNewSubjectLike(index, buildSubject(index)); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNested editFirstSubject() { - if (subjects.size() == 0) throw new RuntimeException("Can't edit first subjects. The list is empty."); - return setNewSubjectLike(0, buildSubject(0)); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNested editLastSubject() { - int index = subjects.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last subjects. The list is empty."); - return setNewSubjectLike(index, buildSubject(index)); - } - public V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNested editMatchingSubject(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1beta2NonResourcePolicyRuleFluentImpl> implements V1beta2PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested,Nested{ - NonResourceRulesNestedImpl(int index,V1beta2NonResourcePolicyRule item) { - this.index = index; - this.builder = new V1beta2NonResourcePolicyRuleBuilder(this, item); - } - NonResourceRulesNestedImpl() { - this.index = -1; - this.builder = new V1beta2NonResourcePolicyRuleBuilder(this); - } - V1beta2NonResourcePolicyRuleBuilder builder; - int index; - public N and() { - return (N) V1beta2PolicyRulesWithSubjectsFluentImpl.this.setToNonResourceRules(index,builder.build()); - } - public N endNonResourceRule() { - return and(); - } - - } - class ResourceRulesNestedImpl extends V1beta2ResourcePolicyRuleFluentImpl> implements V1beta2PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested,Nested{ - ResourceRulesNestedImpl(int index,V1beta2ResourcePolicyRule item) { - this.index = index; - this.builder = new V1beta2ResourcePolicyRuleBuilder(this, item); - } - ResourceRulesNestedImpl() { - this.index = -1; - this.builder = new V1beta2ResourcePolicyRuleBuilder(this); - } - V1beta2ResourcePolicyRuleBuilder builder; - int index; - public N and() { - return (N) V1beta2PolicyRulesWithSubjectsFluentImpl.this.setToResourceRules(index,builder.build()); - } - public N endResourceRule() { - return and(); - } - - } - class SubjectsNestedImpl extends V1beta2SubjectFluentImpl> implements V1beta2PolicyRulesWithSubjectsFluentImpl.SubjectsNested,Nested{ - SubjectsNestedImpl(int index,V1beta2Subject item) { - this.index = index; - this.builder = new V1beta2SubjectBuilder(this, item); - } - SubjectsNestedImpl() { - this.index = -1; - this.builder = new V1beta2SubjectBuilder(this); - } - V1beta2SubjectBuilder builder; - int index; - public N and() { - return (N) V1beta2PolicyRulesWithSubjectsFluentImpl.this.setToSubjects(index,builder.build()); - } - public N endSubject() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationBuilder.java index 3ef6220272..f93f77ec6a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2PriorityLevelConfigurationBuilder extends V1beta2PriorityLevelConfigurationFluentImpl implements VisitableBuilder{ +public class V1beta2PriorityLevelConfigurationBuilder extends V1beta2PriorityLevelConfigurationFluent implements VisitableBuilder{ public V1beta2PriorityLevelConfigurationBuilder() { - this(false); - } - public V1beta2PriorityLevelConfigurationBuilder(Boolean validationEnabled) { - this(new V1beta2PriorityLevelConfiguration(), validationEnabled); + this(new V1beta2PriorityLevelConfiguration()); } + public V1beta2PriorityLevelConfigurationBuilder(V1beta2PriorityLevelConfigurationFluent fluent) { - this(fluent, false); - } - public V1beta2PriorityLevelConfigurationBuilder(V1beta2PriorityLevelConfigurationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2PriorityLevelConfiguration(), validationEnabled); + this(fluent, new V1beta2PriorityLevelConfiguration()); } + public V1beta2PriorityLevelConfigurationBuilder(V1beta2PriorityLevelConfigurationFluent fluent,V1beta2PriorityLevelConfiguration instance) { - this(fluent, instance, false); - } - public V1beta2PriorityLevelConfigurationBuilder(V1beta2PriorityLevelConfigurationFluent fluent,V1beta2PriorityLevelConfiguration instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2PriorityLevelConfigurationBuilder(V1beta2PriorityLevelConfiguration instance) { - this(instance,false); - } - public V1beta2PriorityLevelConfigurationBuilder(V1beta2PriorityLevelConfiguration instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2PriorityLevelConfigurationFluent fluent; - Boolean validationEnabled; + public V1beta2PriorityLevelConfiguration build() { V1beta2PriorityLevelConfiguration buildable = new V1beta2PriorityLevelConfiguration(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionBuilder.java index d4d1999815..8c5ddc141d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2PriorityLevelConfigurationConditionBuilder extends V1beta2PriorityLevelConfigurationConditionFluentImpl implements VisitableBuilder{ +public class V1beta2PriorityLevelConfigurationConditionBuilder extends V1beta2PriorityLevelConfigurationConditionFluent implements VisitableBuilder{ public V1beta2PriorityLevelConfigurationConditionBuilder() { - this(false); - } - public V1beta2PriorityLevelConfigurationConditionBuilder(Boolean validationEnabled) { - this(new V1beta2PriorityLevelConfigurationCondition(), validationEnabled); + this(new V1beta2PriorityLevelConfigurationCondition()); } + public V1beta2PriorityLevelConfigurationConditionBuilder(V1beta2PriorityLevelConfigurationConditionFluent fluent) { - this(fluent, false); - } - public V1beta2PriorityLevelConfigurationConditionBuilder(V1beta2PriorityLevelConfigurationConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2PriorityLevelConfigurationCondition(), validationEnabled); + this(fluent, new V1beta2PriorityLevelConfigurationCondition()); } + public V1beta2PriorityLevelConfigurationConditionBuilder(V1beta2PriorityLevelConfigurationConditionFluent fluent,V1beta2PriorityLevelConfigurationCondition instance) { - this(fluent, instance, false); - } - public V1beta2PriorityLevelConfigurationConditionBuilder(V1beta2PriorityLevelConfigurationConditionFluent fluent,V1beta2PriorityLevelConfigurationCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2PriorityLevelConfigurationConditionBuilder(V1beta2PriorityLevelConfigurationCondition instance) { - this(instance,false); - } - public V1beta2PriorityLevelConfigurationConditionBuilder(V1beta2PriorityLevelConfigurationCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2PriorityLevelConfigurationConditionFluent fluent; - Boolean validationEnabled; + public V1beta2PriorityLevelConfigurationCondition build() { V1beta2PriorityLevelConfigurationCondition buildable = new V1beta2PriorityLevelConfigurationCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1beta2PriorityLevelConfigurationCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionFluent.java index 5bd60cf616..527c36c42a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2PriorityLevelConfigurationConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2PriorityLevelConfigurationConditionFluent> extends BaseFluent{ + public V1beta2PriorityLevelConfigurationConditionFluent() { + } + public V1beta2PriorityLevelConfigurationConditionFluent(V1beta2PriorityLevelConfigurationCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1beta2PriorityLevelConfigurationCondition instance) { + instance = (instance != null ? instance : new V1beta2PriorityLevelConfigurationCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2PriorityLevelConfigurationConditionFluent that = (V1beta2PriorityLevelConfigurationConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionFluentImpl.java deleted file mode 100644 index cc649e2586..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2PriorityLevelConfigurationConditionFluentImpl> extends BaseFluent implements V1beta2PriorityLevelConfigurationConditionFluent{ - public V1beta2PriorityLevelConfigurationConditionFluentImpl() { - } - public V1beta2PriorityLevelConfigurationConditionFluentImpl(V1beta2PriorityLevelConfigurationCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2PriorityLevelConfigurationConditionFluentImpl that = (V1beta2PriorityLevelConfigurationConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationFluent.java index 1a330e0228..a93233a77e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta2PriorityLevelConfigurationFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1beta2PriorityLevelConfigurationFluent.MetadataNested withNewMetadata(); - public V1beta2PriorityLevelConfigurationFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1beta2PriorityLevelConfigurationFluent.MetadataNested editMetadata(); - public V1beta2PriorityLevelConfigurationFluent.MetadataNested editOrNewMetadata(); - public V1beta2PriorityLevelConfigurationFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2PriorityLevelConfigurationSpec getSpec(); - public V1beta2PriorityLevelConfigurationSpec buildSpec(); - public A withSpec(V1beta2PriorityLevelConfigurationSpec spec); - public Boolean hasSpec(); - public V1beta2PriorityLevelConfigurationFluent.SpecNested withNewSpec(); - public V1beta2PriorityLevelConfigurationFluent.SpecNested withNewSpecLike(V1beta2PriorityLevelConfigurationSpec item); - public V1beta2PriorityLevelConfigurationFluent.SpecNested editSpec(); - public V1beta2PriorityLevelConfigurationFluent.SpecNested editOrNewSpec(); - public V1beta2PriorityLevelConfigurationFluent.SpecNested editOrNewSpecLike(V1beta2PriorityLevelConfigurationSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2PriorityLevelConfigurationStatus getStatus(); - public V1beta2PriorityLevelConfigurationStatus buildStatus(); - public A withStatus(V1beta2PriorityLevelConfigurationStatus status); - public Boolean hasStatus(); - public V1beta2PriorityLevelConfigurationFluent.StatusNested withNewStatus(); - public V1beta2PriorityLevelConfigurationFluent.StatusNested withNewStatusLike(V1beta2PriorityLevelConfigurationStatus item); - public V1beta2PriorityLevelConfigurationFluent.StatusNested editStatus(); - public V1beta2PriorityLevelConfigurationFluent.StatusNested editOrNewStatus(); - public V1beta2PriorityLevelConfigurationFluent.StatusNested editOrNewStatusLike(V1beta2PriorityLevelConfigurationStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2PriorityLevelConfigurationFluent> extends BaseFluent{ + public V1beta2PriorityLevelConfigurationFluent() { + } + + public V1beta2PriorityLevelConfigurationFluent(V1beta2PriorityLevelConfiguration instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1beta2PriorityLevelConfigurationSpecBuilder spec; + private V1beta2PriorityLevelConfigurationStatusBuilder status; + + protected void copyInstance(V1beta2PriorityLevelConfiguration instance) { + instance = (instance != null ? instance : new V1beta2PriorityLevelConfiguration()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1beta2PriorityLevelConfigurationSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1beta2PriorityLevelConfigurationSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1beta2PriorityLevelConfigurationSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1beta2PriorityLevelConfigurationSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1beta2PriorityLevelConfigurationSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1beta2PriorityLevelConfigurationSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1beta2PriorityLevelConfigurationSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1beta2PriorityLevelConfigurationStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1beta2PriorityLevelConfigurationStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1beta2PriorityLevelConfigurationStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1beta2PriorityLevelConfigurationStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1beta2PriorityLevelConfigurationStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1beta2PriorityLevelConfigurationStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2PriorityLevelConfigurationFluent that = (V1beta2PriorityLevelConfigurationFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1beta2PriorityLevelConfigurationFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1beta2PriorityLevelConfigurationStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1beta2PriorityLevelConfigurationSpecFluent> implements Nested{ + SpecNested(V1beta2PriorityLevelConfigurationSpec item) { + this.builder = new V1beta2PriorityLevelConfigurationSpecBuilder(this, item); + } + V1beta2PriorityLevelConfigurationSpecBuilder builder; + + public N and() { + return (N) V1beta2PriorityLevelConfigurationFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1beta2PriorityLevelConfigurationStatusFluent> implements Nested{ + StatusNested(V1beta2PriorityLevelConfigurationStatus item) { + this.builder = new V1beta2PriorityLevelConfigurationStatusBuilder(this, item); + } + V1beta2PriorityLevelConfigurationStatusBuilder builder; + + public N and() { + return (N) V1beta2PriorityLevelConfigurationFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationFluentImpl.java deleted file mode 100644 index 25e4c281f7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2PriorityLevelConfigurationFluentImpl> extends BaseFluent implements V1beta2PriorityLevelConfigurationFluent{ - public V1beta2PriorityLevelConfigurationFluentImpl() { - } - public V1beta2PriorityLevelConfigurationFluentImpl(V1beta2PriorityLevelConfiguration instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1beta2PriorityLevelConfigurationSpecBuilder spec; - private V1beta2PriorityLevelConfigurationStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1beta2PriorityLevelConfigurationFluentImpl.MetadataNested withNewMetadata() { - return new V1beta2PriorityLevelConfigurationFluentImpl.MetadataNestedImpl(); - } - public V1beta2PriorityLevelConfigurationFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1beta2PriorityLevelConfigurationFluentImpl.MetadataNestedImpl(item); - } - public V1beta2PriorityLevelConfigurationFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1beta2PriorityLevelConfigurationFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1beta2PriorityLevelConfigurationFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2PriorityLevelConfigurationSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1beta2PriorityLevelConfigurationSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1beta2PriorityLevelConfigurationSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1beta2PriorityLevelConfigurationSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1beta2PriorityLevelConfigurationFluentImpl.SpecNested withNewSpec() { - return new V1beta2PriorityLevelConfigurationFluentImpl.SpecNestedImpl(); - } - public V1beta2PriorityLevelConfigurationFluentImpl.SpecNested withNewSpecLike(V1beta2PriorityLevelConfigurationSpec item) { - return new V1beta2PriorityLevelConfigurationFluentImpl.SpecNestedImpl(item); - } - public V1beta2PriorityLevelConfigurationFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1beta2PriorityLevelConfigurationFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1beta2PriorityLevelConfigurationSpecBuilder().build()); - } - public V1beta2PriorityLevelConfigurationFluentImpl.SpecNested editOrNewSpecLike(V1beta2PriorityLevelConfigurationSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2PriorityLevelConfigurationStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1beta2PriorityLevelConfigurationStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1beta2PriorityLevelConfigurationStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1beta2PriorityLevelConfigurationStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1beta2PriorityLevelConfigurationFluentImpl.StatusNested withNewStatus() { - return new V1beta2PriorityLevelConfigurationFluentImpl.StatusNestedImpl(); - } - public V1beta2PriorityLevelConfigurationFluentImpl.StatusNested withNewStatusLike(V1beta2PriorityLevelConfigurationStatus item) { - return new V1beta2PriorityLevelConfigurationFluentImpl.StatusNestedImpl(item); - } - public V1beta2PriorityLevelConfigurationFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1beta2PriorityLevelConfigurationFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1beta2PriorityLevelConfigurationStatusBuilder().build()); - } - public V1beta2PriorityLevelConfigurationFluentImpl.StatusNested editOrNewStatusLike(V1beta2PriorityLevelConfigurationStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2PriorityLevelConfigurationFluentImpl that = (V1beta2PriorityLevelConfigurationFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1beta2PriorityLevelConfigurationFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1beta2PriorityLevelConfigurationFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1beta2PriorityLevelConfigurationSpecFluentImpl> implements V1beta2PriorityLevelConfigurationFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1beta2PriorityLevelConfigurationSpec item) { - this.builder = new V1beta2PriorityLevelConfigurationSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1beta2PriorityLevelConfigurationSpecBuilder(this); - } - V1beta2PriorityLevelConfigurationSpecBuilder builder; - public N and() { - return (N) V1beta2PriorityLevelConfigurationFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1beta2PriorityLevelConfigurationStatusFluentImpl> implements V1beta2PriorityLevelConfigurationFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1beta2PriorityLevelConfigurationStatus item) { - this.builder = new V1beta2PriorityLevelConfigurationStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1beta2PriorityLevelConfigurationStatusBuilder(this); - } - V1beta2PriorityLevelConfigurationStatusBuilder builder; - public N and() { - return (N) V1beta2PriorityLevelConfigurationFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListBuilder.java index f5d6b3dff7..0aed96c3c0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2PriorityLevelConfigurationListBuilder extends V1beta2PriorityLevelConfigurationListFluentImpl implements VisitableBuilder{ +public class V1beta2PriorityLevelConfigurationListBuilder extends V1beta2PriorityLevelConfigurationListFluent implements VisitableBuilder{ public V1beta2PriorityLevelConfigurationListBuilder() { - this(false); - } - public V1beta2PriorityLevelConfigurationListBuilder(Boolean validationEnabled) { - this(new V1beta2PriorityLevelConfigurationList(), validationEnabled); + this(new V1beta2PriorityLevelConfigurationList()); } + public V1beta2PriorityLevelConfigurationListBuilder(V1beta2PriorityLevelConfigurationListFluent fluent) { - this(fluent, false); - } - public V1beta2PriorityLevelConfigurationListBuilder(V1beta2PriorityLevelConfigurationListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2PriorityLevelConfigurationList(), validationEnabled); + this(fluent, new V1beta2PriorityLevelConfigurationList()); } + public V1beta2PriorityLevelConfigurationListBuilder(V1beta2PriorityLevelConfigurationListFluent fluent,V1beta2PriorityLevelConfigurationList instance) { - this(fluent, instance, false); - } - public V1beta2PriorityLevelConfigurationListBuilder(V1beta2PriorityLevelConfigurationListFluent fluent,V1beta2PriorityLevelConfigurationList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2PriorityLevelConfigurationListBuilder(V1beta2PriorityLevelConfigurationList instance) { - this(instance,false); - } - public V1beta2PriorityLevelConfigurationListBuilder(V1beta2PriorityLevelConfigurationList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2PriorityLevelConfigurationListFluent fluent; - Boolean validationEnabled; + public V1beta2PriorityLevelConfigurationList build() { V1beta2PriorityLevelConfigurationList buildable = new V1beta2PriorityLevelConfigurationList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListFluent.java index 98cabfe5df..271af8e51a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2PriorityLevelConfigurationListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1beta2PriorityLevelConfiguration item); - public A setToItems(int index,V1beta2PriorityLevelConfiguration item); - public A addToItems(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfiguration... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfiguration... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1beta2PriorityLevelConfiguration buildItem(int index); - public V1beta2PriorityLevelConfiguration buildFirstItem(); - public V1beta2PriorityLevelConfiguration buildLastItem(); - public V1beta2PriorityLevelConfiguration buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfiguration... items); - public Boolean hasItems(); - public V1beta2PriorityLevelConfigurationListFluent.ItemsNested addNewItem(); - public V1beta2PriorityLevelConfigurationListFluent.ItemsNested addNewItemLike(V1beta2PriorityLevelConfiguration item); - public V1beta2PriorityLevelConfigurationListFluent.ItemsNested setNewItemLike(int index,V1beta2PriorityLevelConfiguration item); - public V1beta2PriorityLevelConfigurationListFluent.ItemsNested editItem(int index); - public V1beta2PriorityLevelConfigurationListFluent.ItemsNested editFirstItem(); - public V1beta2PriorityLevelConfigurationListFluent.ItemsNested editLastItem(); - public V1beta2PriorityLevelConfigurationListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1beta2PriorityLevelConfigurationListFluent.MetadataNested withNewMetadata(); - public V1beta2PriorityLevelConfigurationListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1beta2PriorityLevelConfigurationListFluent.MetadataNested editMetadata(); - public V1beta2PriorityLevelConfigurationListFluent.MetadataNested editOrNewMetadata(); - public V1beta2PriorityLevelConfigurationListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1beta2PriorityLevelConfigurationFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2PriorityLevelConfigurationListFluent> extends BaseFluent{ + public V1beta2PriorityLevelConfigurationListFluent() { + } + + public V1beta2PriorityLevelConfigurationListFluent(V1beta2PriorityLevelConfigurationList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1beta2PriorityLevelConfigurationList instance) { + instance = (instance != null ? instance : new V1beta2PriorityLevelConfigurationList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1beta2PriorityLevelConfiguration item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1beta2PriorityLevelConfiguration item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfiguration... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta2PriorityLevelConfiguration item : items) {V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta2PriorityLevelConfiguration item : items) {V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfiguration... items) { + if (this.items == null) return (A)this; + for (V1beta2PriorityLevelConfiguration item : items) {V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1beta2PriorityLevelConfiguration item : items) {V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1beta2PriorityLevelConfigurationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1beta2PriorityLevelConfiguration buildItem(int index) { + return this.items.get(index).build(); + } + + public V1beta2PriorityLevelConfiguration buildFirstItem() { + return this.items.get(0).build(); + } + + public V1beta2PriorityLevelConfiguration buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1beta2PriorityLevelConfiguration buildMatchingItem(Predicate predicate) { + for (V1beta2PriorityLevelConfigurationBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1beta2PriorityLevelConfigurationBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1beta2PriorityLevelConfiguration item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfiguration... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1beta2PriorityLevelConfiguration item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1beta2PriorityLevelConfiguration item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1beta2PriorityLevelConfiguration item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2PriorityLevelConfigurationListFluent that = (V1beta2PriorityLevelConfigurationListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1beta2PriorityLevelConfigurationFluent> implements Nested{ + ItemsNested(int index,V1beta2PriorityLevelConfiguration item) { + this.index = index; + this.builder = new V1beta2PriorityLevelConfigurationBuilder(this, item); + } + V1beta2PriorityLevelConfigurationBuilder builder; + int index; + public N and() { + return (N) V1beta2PriorityLevelConfigurationListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1beta2PriorityLevelConfigurationListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListFluentImpl.java deleted file mode 100644 index 6476356610..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2PriorityLevelConfigurationListFluentImpl> extends BaseFluent implements V1beta2PriorityLevelConfigurationListFluent{ - public V1beta2PriorityLevelConfigurationListFluentImpl() { - } - public V1beta2PriorityLevelConfigurationListFluentImpl(V1beta2PriorityLevelConfigurationList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1beta2PriorityLevelConfiguration item) { - if (this.items == null) {this.items = new ArrayList();} - V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1beta2PriorityLevelConfiguration item) { - if (this.items == null) {this.items = new ArrayList();} - V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfiguration... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1beta2PriorityLevelConfiguration item : items) {V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1beta2PriorityLevelConfiguration item : items) {V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfiguration... items) { - for (V1beta2PriorityLevelConfiguration item : items) {V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1beta2PriorityLevelConfiguration item : items) {V1beta2PriorityLevelConfigurationBuilder builder = new V1beta2PriorityLevelConfigurationBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1beta2PriorityLevelConfigurationBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1beta2PriorityLevelConfiguration buildItem(int index) { - return this.items.get(index).build(); - } - public V1beta2PriorityLevelConfiguration buildFirstItem() { - return this.items.get(0).build(); - } - public V1beta2PriorityLevelConfiguration buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1beta2PriorityLevelConfiguration buildMatchingItem(Predicate predicate) { - for (V1beta2PriorityLevelConfigurationBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1beta2PriorityLevelConfigurationBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1beta2PriorityLevelConfiguration item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfiguration... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1beta2PriorityLevelConfiguration item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNested addNewItem() { - return new V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNestedImpl(); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNested addNewItemLike(V1beta2PriorityLevelConfiguration item) { - return new V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNested setNewItemLike(int index,V1beta2PriorityLevelConfiguration item) { - return new V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNestedImpl(index, item); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1beta2PriorityLevelConfigurationListFluentImpl.MetadataNestedImpl(); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1beta2PriorityLevelConfigurationListFluentImpl.MetadataNestedImpl(item); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1beta2PriorityLevelConfigurationListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2PriorityLevelConfigurationListFluentImpl that = (V1beta2PriorityLevelConfigurationListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1beta2PriorityLevelConfigurationFluentImpl> implements V1beta2PriorityLevelConfigurationListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1beta2PriorityLevelConfiguration item) { - this.index = index; - this.builder = new V1beta2PriorityLevelConfigurationBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1beta2PriorityLevelConfigurationBuilder(this); - } - V1beta2PriorityLevelConfigurationBuilder builder; - int index; - public N and() { - return (N) V1beta2PriorityLevelConfigurationListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1beta2PriorityLevelConfigurationListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1beta2PriorityLevelConfigurationListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceBuilder.java index d744179ad9..1560cb83b4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2PriorityLevelConfigurationReferenceBuilder extends V1beta2PriorityLevelConfigurationReferenceFluentImpl implements VisitableBuilder{ +public class V1beta2PriorityLevelConfigurationReferenceBuilder extends V1beta2PriorityLevelConfigurationReferenceFluent implements VisitableBuilder{ public V1beta2PriorityLevelConfigurationReferenceBuilder() { - this(false); - } - public V1beta2PriorityLevelConfigurationReferenceBuilder(Boolean validationEnabled) { - this(new V1beta2PriorityLevelConfigurationReference(), validationEnabled); + this(new V1beta2PriorityLevelConfigurationReference()); } + public V1beta2PriorityLevelConfigurationReferenceBuilder(V1beta2PriorityLevelConfigurationReferenceFluent fluent) { - this(fluent, false); - } - public V1beta2PriorityLevelConfigurationReferenceBuilder(V1beta2PriorityLevelConfigurationReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2PriorityLevelConfigurationReference(), validationEnabled); + this(fluent, new V1beta2PriorityLevelConfigurationReference()); } + public V1beta2PriorityLevelConfigurationReferenceBuilder(V1beta2PriorityLevelConfigurationReferenceFluent fluent,V1beta2PriorityLevelConfigurationReference instance) { - this(fluent, instance, false); - } - public V1beta2PriorityLevelConfigurationReferenceBuilder(V1beta2PriorityLevelConfigurationReferenceFluent fluent,V1beta2PriorityLevelConfigurationReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2PriorityLevelConfigurationReferenceBuilder(V1beta2PriorityLevelConfigurationReference instance) { - this(instance,false); - } - public V1beta2PriorityLevelConfigurationReferenceBuilder(V1beta2PriorityLevelConfigurationReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2PriorityLevelConfigurationReferenceFluent fluent; - Boolean validationEnabled; + public V1beta2PriorityLevelConfigurationReference build() { V1beta2PriorityLevelConfigurationReference buildable = new V1beta2PriorityLevelConfigurationReference(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceFluent.java index fe57f1556d..941fa233ef 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2PriorityLevelConfigurationReferenceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2PriorityLevelConfigurationReferenceFluent> extends BaseFluent{ + public V1beta2PriorityLevelConfigurationReferenceFluent() { + } + public V1beta2PriorityLevelConfigurationReferenceFluent(V1beta2PriorityLevelConfigurationReference instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1beta2PriorityLevelConfigurationReference instance) { + instance = (instance != null ? instance : new V1beta2PriorityLevelConfigurationReference()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2PriorityLevelConfigurationReferenceFluent that = (V1beta2PriorityLevelConfigurationReferenceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceFluentImpl.java deleted file mode 100644 index 6159800315..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReferenceFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2PriorityLevelConfigurationReferenceFluentImpl> extends BaseFluent implements V1beta2PriorityLevelConfigurationReferenceFluent{ - public V1beta2PriorityLevelConfigurationReferenceFluentImpl() { - } - public V1beta2PriorityLevelConfigurationReferenceFluentImpl(V1beta2PriorityLevelConfigurationReference instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2PriorityLevelConfigurationReferenceFluentImpl that = (V1beta2PriorityLevelConfigurationReferenceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecBuilder.java index 4c8ab69c50..0c0e8491fe 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecBuilder.java @@ -1,49 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2PriorityLevelConfigurationSpecBuilder extends V1beta2PriorityLevelConfigurationSpecFluentImpl implements VisitableBuilder{ +public class V1beta2PriorityLevelConfigurationSpecBuilder extends V1beta2PriorityLevelConfigurationSpecFluent implements VisitableBuilder{ public V1beta2PriorityLevelConfigurationSpecBuilder() { - this(false); - } - public V1beta2PriorityLevelConfigurationSpecBuilder(Boolean validationEnabled) { - this(new V1beta2PriorityLevelConfigurationSpec(), validationEnabled); + this(new V1beta2PriorityLevelConfigurationSpec()); } + public V1beta2PriorityLevelConfigurationSpecBuilder(V1beta2PriorityLevelConfigurationSpecFluent fluent) { - this(fluent, false); - } - public V1beta2PriorityLevelConfigurationSpecBuilder(V1beta2PriorityLevelConfigurationSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2PriorityLevelConfigurationSpec(), validationEnabled); + this(fluent, new V1beta2PriorityLevelConfigurationSpec()); } + public V1beta2PriorityLevelConfigurationSpecBuilder(V1beta2PriorityLevelConfigurationSpecFluent fluent,V1beta2PriorityLevelConfigurationSpec instance) { - this(fluent, instance, false); - } - public V1beta2PriorityLevelConfigurationSpecBuilder(V1beta2PriorityLevelConfigurationSpecFluent fluent,V1beta2PriorityLevelConfigurationSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLimited(instance.getLimited()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2PriorityLevelConfigurationSpecBuilder(V1beta2PriorityLevelConfigurationSpec instance) { - this(instance,false); - } - public V1beta2PriorityLevelConfigurationSpecBuilder(V1beta2PriorityLevelConfigurationSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLimited(instance.getLimited()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2PriorityLevelConfigurationSpecFluent fluent; - Boolean validationEnabled; + public V1beta2PriorityLevelConfigurationSpec build() { V1beta2PriorityLevelConfigurationSpec buildable = new V1beta2PriorityLevelConfigurationSpec(); - buildable.setLimited(fluent.getLimited()); + buildable.setExempt(fluent.buildExempt()); + buildable.setLimited(fluent.buildLimited()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecFluent.java index b69a4cb8d5..ffb4829dd8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecFluent.java @@ -1,38 +1,183 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta2PriorityLevelConfigurationSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildLimited instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2LimitedPriorityLevelConfiguration getLimited(); - public V1beta2LimitedPriorityLevelConfiguration buildLimited(); - public A withLimited(V1beta2LimitedPriorityLevelConfiguration limited); - public Boolean hasLimited(); - public V1beta2PriorityLevelConfigurationSpecFluent.LimitedNested withNewLimited(); - public V1beta2PriorityLevelConfigurationSpecFluent.LimitedNested withNewLimitedLike(V1beta2LimitedPriorityLevelConfiguration item); - public V1beta2PriorityLevelConfigurationSpecFluent.LimitedNested editLimited(); - public V1beta2PriorityLevelConfigurationSpecFluent.LimitedNested editOrNewLimited(); - public V1beta2PriorityLevelConfigurationSpecFluent.LimitedNested editOrNewLimitedLike(V1beta2LimitedPriorityLevelConfiguration item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface LimitedNested extends Nested,V1beta2LimitedPriorityLevelConfigurationFluent>{ - public N and(); - public N endLimited(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2PriorityLevelConfigurationSpecFluent> extends BaseFluent{ + public V1beta2PriorityLevelConfigurationSpecFluent() { + } + + public V1beta2PriorityLevelConfigurationSpecFluent(V1beta2PriorityLevelConfigurationSpec instance) { + this.copyInstance(instance); + } + private V1beta2ExemptPriorityLevelConfigurationBuilder exempt; + private V1beta2LimitedPriorityLevelConfigurationBuilder limited; + private String type; + + protected void copyInstance(V1beta2PriorityLevelConfigurationSpec instance) { + instance = (instance != null ? instance : new V1beta2PriorityLevelConfigurationSpec()); + if (instance != null) { + this.withExempt(instance.getExempt()); + this.withLimited(instance.getLimited()); + this.withType(instance.getType()); + } + } + + public V1beta2ExemptPriorityLevelConfiguration buildExempt() { + return this.exempt != null ? this.exempt.build() : null; + } + + public A withExempt(V1beta2ExemptPriorityLevelConfiguration exempt) { + this._visitables.remove("exempt"); + if (exempt != null) { + this.exempt = new V1beta2ExemptPriorityLevelConfigurationBuilder(exempt); + this._visitables.get("exempt").add(this.exempt); + } else { + this.exempt = null; + this._visitables.get("exempt").remove(this.exempt); + } + return (A) this; + } + + public boolean hasExempt() { + return this.exempt != null; + } + + public ExemptNested withNewExempt() { + return new ExemptNested(null); + } + + public ExemptNested withNewExemptLike(V1beta2ExemptPriorityLevelConfiguration item) { + return new ExemptNested(item); + } + + public ExemptNested editExempt() { + return withNewExemptLike(java.util.Optional.ofNullable(buildExempt()).orElse(null)); + } + + public ExemptNested editOrNewExempt() { + return withNewExemptLike(java.util.Optional.ofNullable(buildExempt()).orElse(new V1beta2ExemptPriorityLevelConfigurationBuilder().build())); + } + + public ExemptNested editOrNewExemptLike(V1beta2ExemptPriorityLevelConfiguration item) { + return withNewExemptLike(java.util.Optional.ofNullable(buildExempt()).orElse(item)); + } + + public V1beta2LimitedPriorityLevelConfiguration buildLimited() { + return this.limited != null ? this.limited.build() : null; + } + + public A withLimited(V1beta2LimitedPriorityLevelConfiguration limited) { + this._visitables.remove("limited"); + if (limited != null) { + this.limited = new V1beta2LimitedPriorityLevelConfigurationBuilder(limited); + this._visitables.get("limited").add(this.limited); + } else { + this.limited = null; + this._visitables.get("limited").remove(this.limited); + } + return (A) this; + } + + public boolean hasLimited() { + return this.limited != null; + } + + public LimitedNested withNewLimited() { + return new LimitedNested(null); + } + + public LimitedNested withNewLimitedLike(V1beta2LimitedPriorityLevelConfiguration item) { + return new LimitedNested(item); + } + + public LimitedNested editLimited() { + return withNewLimitedLike(java.util.Optional.ofNullable(buildLimited()).orElse(null)); + } + + public LimitedNested editOrNewLimited() { + return withNewLimitedLike(java.util.Optional.ofNullable(buildLimited()).orElse(new V1beta2LimitedPriorityLevelConfigurationBuilder().build())); + } + + public LimitedNested editOrNewLimitedLike(V1beta2LimitedPriorityLevelConfiguration item) { + return withNewLimitedLike(java.util.Optional.ofNullable(buildLimited()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2PriorityLevelConfigurationSpecFluent that = (V1beta2PriorityLevelConfigurationSpecFluent) o; + if (!java.util.Objects.equals(exempt, that.exempt)) return false; + if (!java.util.Objects.equals(limited, that.limited)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(exempt, limited, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (exempt != null) { sb.append("exempt:"); sb.append(exempt + ","); } + if (limited != null) { sb.append("limited:"); sb.append(limited + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class ExemptNested extends V1beta2ExemptPriorityLevelConfigurationFluent> implements Nested{ + ExemptNested(V1beta2ExemptPriorityLevelConfiguration item) { + this.builder = new V1beta2ExemptPriorityLevelConfigurationBuilder(this, item); + } + V1beta2ExemptPriorityLevelConfigurationBuilder builder; + + public N and() { + return (N) V1beta2PriorityLevelConfigurationSpecFluent.this.withExempt(builder.build()); + } + public N endExempt() { + return and(); + } + + } + public class LimitedNested extends V1beta2LimitedPriorityLevelConfigurationFluent> implements Nested{ + LimitedNested(V1beta2LimitedPriorityLevelConfiguration item) { + this.builder = new V1beta2LimitedPriorityLevelConfigurationBuilder(this, item); + } + V1beta2LimitedPriorityLevelConfigurationBuilder builder; + + public N and() { + return (N) V1beta2PriorityLevelConfigurationSpecFluent.this.withLimited(builder.build()); + } + + public N endLimited() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecFluentImpl.java deleted file mode 100644 index fc9de2fad3..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpecFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2PriorityLevelConfigurationSpecFluentImpl> extends BaseFluent implements V1beta2PriorityLevelConfigurationSpecFluent{ - public V1beta2PriorityLevelConfigurationSpecFluentImpl() { - } - public V1beta2PriorityLevelConfigurationSpecFluentImpl(V1beta2PriorityLevelConfigurationSpec instance) { - if (instance != null) { - this.withLimited(instance.getLimited()); - this.withType(instance.getType()); - } - } - private V1beta2LimitedPriorityLevelConfigurationBuilder limited; - private String type; - - /** - * This method has been deprecated, please use method buildLimited instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2LimitedPriorityLevelConfiguration getLimited() { - return this.limited!=null ?this.limited.build():null; - } - public V1beta2LimitedPriorityLevelConfiguration buildLimited() { - return this.limited!=null ?this.limited.build():null; - } - public A withLimited(V1beta2LimitedPriorityLevelConfiguration limited) { - _visitables.get("limited").remove(this.limited); - if (limited!=null){ this.limited= new V1beta2LimitedPriorityLevelConfigurationBuilder(limited); _visitables.get("limited").add(this.limited);} else { this.limited = null; _visitables.get("limited").remove(this.limited); } return (A) this; - } - public Boolean hasLimited() { - return this.limited != null; - } - public V1beta2PriorityLevelConfigurationSpecFluentImpl.LimitedNested withNewLimited() { - return new V1beta2PriorityLevelConfigurationSpecFluentImpl.LimitedNestedImpl(); - } - public V1beta2PriorityLevelConfigurationSpecFluentImpl.LimitedNested withNewLimitedLike(V1beta2LimitedPriorityLevelConfiguration item) { - return new V1beta2PriorityLevelConfigurationSpecFluentImpl.LimitedNestedImpl(item); - } - public V1beta2PriorityLevelConfigurationSpecFluentImpl.LimitedNested editLimited() { - return withNewLimitedLike(getLimited()); - } - public V1beta2PriorityLevelConfigurationSpecFluentImpl.LimitedNested editOrNewLimited() { - return withNewLimitedLike(getLimited() != null ? getLimited(): new V1beta2LimitedPriorityLevelConfigurationBuilder().build()); - } - public V1beta2PriorityLevelConfigurationSpecFluentImpl.LimitedNested editOrNewLimitedLike(V1beta2LimitedPriorityLevelConfiguration item) { - return withNewLimitedLike(getLimited() != null ? getLimited(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2PriorityLevelConfigurationSpecFluentImpl that = (V1beta2PriorityLevelConfigurationSpecFluentImpl) o; - if (!java.util.Objects.equals(limited, that.limited)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(limited, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (limited != null) { sb.append("limited:"); sb.append(limited + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class LimitedNestedImpl extends V1beta2LimitedPriorityLevelConfigurationFluentImpl> implements V1beta2PriorityLevelConfigurationSpecFluentImpl.LimitedNested,Nested{ - LimitedNestedImpl(V1beta2LimitedPriorityLevelConfiguration item) { - this.builder = new V1beta2LimitedPriorityLevelConfigurationBuilder(this, item); - } - LimitedNestedImpl() { - this.builder = new V1beta2LimitedPriorityLevelConfigurationBuilder(this); - } - V1beta2LimitedPriorityLevelConfigurationBuilder builder; - public N and() { - return (N) V1beta2PriorityLevelConfigurationSpecFluentImpl.this.withLimited(builder.build()); - } - public N endLimited() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusBuilder.java index 88d4280edc..cd4a2b36e4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2PriorityLevelConfigurationStatusBuilder extends V1beta2PriorityLevelConfigurationStatusFluentImpl implements VisitableBuilder{ +public class V1beta2PriorityLevelConfigurationStatusBuilder extends V1beta2PriorityLevelConfigurationStatusFluent implements VisitableBuilder{ public V1beta2PriorityLevelConfigurationStatusBuilder() { - this(false); - } - public V1beta2PriorityLevelConfigurationStatusBuilder(Boolean validationEnabled) { - this(new V1beta2PriorityLevelConfigurationStatus(), validationEnabled); + this(new V1beta2PriorityLevelConfigurationStatus()); } + public V1beta2PriorityLevelConfigurationStatusBuilder(V1beta2PriorityLevelConfigurationStatusFluent fluent) { - this(fluent, false); - } - public V1beta2PriorityLevelConfigurationStatusBuilder(V1beta2PriorityLevelConfigurationStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2PriorityLevelConfigurationStatus(), validationEnabled); + this(fluent, new V1beta2PriorityLevelConfigurationStatus()); } + public V1beta2PriorityLevelConfigurationStatusBuilder(V1beta2PriorityLevelConfigurationStatusFluent fluent,V1beta2PriorityLevelConfigurationStatus instance) { - this(fluent, instance, false); - } - public V1beta2PriorityLevelConfigurationStatusBuilder(V1beta2PriorityLevelConfigurationStatusFluent fluent,V1beta2PriorityLevelConfigurationStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2PriorityLevelConfigurationStatusBuilder(V1beta2PriorityLevelConfigurationStatus instance) { - this(instance,false); - } - public V1beta2PriorityLevelConfigurationStatusBuilder(V1beta2PriorityLevelConfigurationStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2PriorityLevelConfigurationStatusFluent fluent; - Boolean validationEnabled; + public V1beta2PriorityLevelConfigurationStatus build() { V1beta2PriorityLevelConfigurationStatus buildable = new V1beta2PriorityLevelConfigurationStatus(); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusFluent.java index f28644724f..48689b55c2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2PriorityLevelConfigurationStatusFluent> extends Fluent{ - public A addToConditions(int index,V1beta2PriorityLevelConfigurationCondition item); - public A setToConditions(int index,V1beta2PriorityLevelConfigurationCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfigurationCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfigurationCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1beta2PriorityLevelConfigurationCondition buildCondition(int index); - public V1beta2PriorityLevelConfigurationCondition buildFirstCondition(); - public V1beta2PriorityLevelConfigurationCondition buildLastCondition(); - public V1beta2PriorityLevelConfigurationCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfigurationCondition... conditions); - public Boolean hasConditions(); - public V1beta2PriorityLevelConfigurationStatusFluent.ConditionsNested addNewCondition(); - public V1beta2PriorityLevelConfigurationStatusFluent.ConditionsNested addNewConditionLike(V1beta2PriorityLevelConfigurationCondition item); - public V1beta2PriorityLevelConfigurationStatusFluent.ConditionsNested setNewConditionLike(int index,V1beta2PriorityLevelConfigurationCondition item); - public V1beta2PriorityLevelConfigurationStatusFluent.ConditionsNested editCondition(int index); - public V1beta2PriorityLevelConfigurationStatusFluent.ConditionsNested editFirstCondition(); - public V1beta2PriorityLevelConfigurationStatusFluent.ConditionsNested editLastCondition(); - public V1beta2PriorityLevelConfigurationStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public interface ConditionsNested extends Nested,V1beta2PriorityLevelConfigurationConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2PriorityLevelConfigurationStatusFluent> extends BaseFluent{ + public V1beta2PriorityLevelConfigurationStatusFluent() { + } + + public V1beta2PriorityLevelConfigurationStatusFluent(V1beta2PriorityLevelConfigurationStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + + protected void copyInstance(V1beta2PriorityLevelConfigurationStatus instance) { + instance = (instance != null ? instance : new V1beta2PriorityLevelConfigurationStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + } + } + + public A addToConditions(int index,V1beta2PriorityLevelConfigurationCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1beta2PriorityLevelConfigurationCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfigurationCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1beta2PriorityLevelConfigurationCondition item : items) {V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1beta2PriorityLevelConfigurationCondition item : items) {V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfigurationCondition... items) { + if (this.conditions == null) return (A)this; + for (V1beta2PriorityLevelConfigurationCondition item : items) {V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1beta2PriorityLevelConfigurationCondition item : items) {V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1beta2PriorityLevelConfigurationConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1beta2PriorityLevelConfigurationCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1beta2PriorityLevelConfigurationCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1beta2PriorityLevelConfigurationCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1beta2PriorityLevelConfigurationCondition buildMatchingCondition(Predicate predicate) { + for (V1beta2PriorityLevelConfigurationConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1beta2PriorityLevelConfigurationConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1beta2PriorityLevelConfigurationCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfigurationCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1beta2PriorityLevelConfigurationCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1beta2PriorityLevelConfigurationCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1beta2PriorityLevelConfigurationCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta2PriorityLevelConfigurationConditionFluent> implements Nested{ + ConditionsNested(int index,V1beta2PriorityLevelConfigurationCondition item) { + this.index = index; + this.builder = new V1beta2PriorityLevelConfigurationConditionBuilder(this, item); + } + V1beta2PriorityLevelConfigurationConditionBuilder builder; + int index; + + public N and() { + return (N) V1beta2PriorityLevelConfigurationStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusFluentImpl.java deleted file mode 100644 index 1e5f233222..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatusFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2PriorityLevelConfigurationStatusFluentImpl> extends BaseFluent implements V1beta2PriorityLevelConfigurationStatusFluent{ - public V1beta2PriorityLevelConfigurationStatusFluentImpl() { - } - public V1beta2PriorityLevelConfigurationStatusFluentImpl(V1beta2PriorityLevelConfigurationStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - } - } - private ArrayList conditions; - public A addToConditions(int index,V1beta2PriorityLevelConfigurationCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1beta2PriorityLevelConfigurationCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfigurationCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1beta2PriorityLevelConfigurationCondition item : items) {V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1beta2PriorityLevelConfigurationCondition item : items) {V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfigurationCondition... items) { - for (V1beta2PriorityLevelConfigurationCondition item : items) {V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1beta2PriorityLevelConfigurationCondition item : items) {V1beta2PriorityLevelConfigurationConditionBuilder builder = new V1beta2PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1beta2PriorityLevelConfigurationConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1beta2PriorityLevelConfigurationCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1beta2PriorityLevelConfigurationCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1beta2PriorityLevelConfigurationCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1beta2PriorityLevelConfigurationCondition buildMatchingCondition(Predicate predicate) { - for (V1beta2PriorityLevelConfigurationConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1beta2PriorityLevelConfigurationConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1beta2PriorityLevelConfigurationCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1beta2PriorityLevelConfigurationCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1beta2PriorityLevelConfigurationCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNestedImpl(); - } - public V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNested addNewConditionLike(V1beta2PriorityLevelConfigurationCondition item) { - return new V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1beta2PriorityLevelConfigurationCondition item) { - return new V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1beta2PriorityLevelConfigurationConditionFluentImpl> implements V1beta2PriorityLevelConfigurationStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1beta2PriorityLevelConfigurationCondition item) { - this.index = index; - this.builder = new V1beta2PriorityLevelConfigurationConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1beta2PriorityLevelConfigurationConditionBuilder(this); - } - V1beta2PriorityLevelConfigurationConditionBuilder builder; - int index; - public N and() { - return (N) V1beta2PriorityLevelConfigurationStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationBuilder.java index 6a155446d7..5161439d2a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2QueuingConfigurationBuilder extends V1beta2QueuingConfigurationFluentImpl implements VisitableBuilder{ +public class V1beta2QueuingConfigurationBuilder extends V1beta2QueuingConfigurationFluent implements VisitableBuilder{ public V1beta2QueuingConfigurationBuilder() { - this(false); - } - public V1beta2QueuingConfigurationBuilder(Boolean validationEnabled) { - this(new V1beta2QueuingConfiguration(), validationEnabled); + this(new V1beta2QueuingConfiguration()); } + public V1beta2QueuingConfigurationBuilder(V1beta2QueuingConfigurationFluent fluent) { - this(fluent, false); - } - public V1beta2QueuingConfigurationBuilder(V1beta2QueuingConfigurationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2QueuingConfiguration(), validationEnabled); + this(fluent, new V1beta2QueuingConfiguration()); } + public V1beta2QueuingConfigurationBuilder(V1beta2QueuingConfigurationFluent fluent,V1beta2QueuingConfiguration instance) { - this(fluent, instance, false); - } - public V1beta2QueuingConfigurationBuilder(V1beta2QueuingConfigurationFluent fluent,V1beta2QueuingConfiguration instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHandSize(instance.getHandSize()); - fluent.withQueueLengthLimit(instance.getQueueLengthLimit()); - fluent.withQueues(instance.getQueues()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2QueuingConfigurationBuilder(V1beta2QueuingConfiguration instance) { - this(instance,false); - } - public V1beta2QueuingConfigurationBuilder(V1beta2QueuingConfiguration instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHandSize(instance.getHandSize()); - this.withQueueLengthLimit(instance.getQueueLengthLimit()); - this.withQueues(instance.getQueues()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2QueuingConfigurationFluent fluent; - Boolean validationEnabled; + public V1beta2QueuingConfiguration build() { V1beta2QueuingConfiguration buildable = new V1beta2QueuingConfiguration(); buildable.setHandSize(fluent.getHandSize()); @@ -49,4 +29,5 @@ public V1beta2QueuingConfiguration build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationFluent.java index bbf2efb473..0155d30607 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationFluent.java @@ -1,22 +1,98 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1beta2QueuingConfigurationFluent> extends Fluent{ - public Integer getHandSize(); - public A withHandSize(Integer handSize); - public Boolean hasHandSize(); - public Integer getQueueLengthLimit(); - public A withQueueLengthLimit(Integer queueLengthLimit); - public Boolean hasQueueLengthLimit(); - public Integer getQueues(); - public A withQueues(Integer queues); - public Boolean hasQueues(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2QueuingConfigurationFluent> extends BaseFluent{ + public V1beta2QueuingConfigurationFluent() { + } + public V1beta2QueuingConfigurationFluent(V1beta2QueuingConfiguration instance) { + this.copyInstance(instance); + } + private Integer handSize; + private Integer queueLengthLimit; + private Integer queues; + + protected void copyInstance(V1beta2QueuingConfiguration instance) { + instance = (instance != null ? instance : new V1beta2QueuingConfiguration()); + if (instance != null) { + this.withHandSize(instance.getHandSize()); + this.withQueueLengthLimit(instance.getQueueLengthLimit()); + this.withQueues(instance.getQueues()); + } + } + + public Integer getHandSize() { + return this.handSize; + } + + public A withHandSize(Integer handSize) { + this.handSize = handSize; + return (A) this; + } + + public boolean hasHandSize() { + return this.handSize != null; + } + + public Integer getQueueLengthLimit() { + return this.queueLengthLimit; + } + + public A withQueueLengthLimit(Integer queueLengthLimit) { + this.queueLengthLimit = queueLengthLimit; + return (A) this; + } + + public boolean hasQueueLengthLimit() { + return this.queueLengthLimit != null; + } + + public Integer getQueues() { + return this.queues; + } + + public A withQueues(Integer queues) { + this.queues = queues; + return (A) this; + } + + public boolean hasQueues() { + return this.queues != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2QueuingConfigurationFluent that = (V1beta2QueuingConfigurationFluent) o; + if (!java.util.Objects.equals(handSize, that.handSize)) return false; + if (!java.util.Objects.equals(queueLengthLimit, that.queueLengthLimit)) return false; + if (!java.util.Objects.equals(queues, that.queues)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(handSize, queueLengthLimit, queues, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (handSize != null) { sb.append("handSize:"); sb.append(handSize + ","); } + if (queueLengthLimit != null) { sb.append("queueLengthLimit:"); sb.append(queueLengthLimit + ","); } + if (queues != null) { sb.append("queues:"); sb.append(queues); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationFluentImpl.java deleted file mode 100644 index 8923f7e02e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfigurationFluentImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2QueuingConfigurationFluentImpl> extends BaseFluent implements V1beta2QueuingConfigurationFluent{ - public V1beta2QueuingConfigurationFluentImpl() { - } - public V1beta2QueuingConfigurationFluentImpl(V1beta2QueuingConfiguration instance) { - if (instance != null) { - this.withHandSize(instance.getHandSize()); - this.withQueueLengthLimit(instance.getQueueLengthLimit()); - this.withQueues(instance.getQueues()); - } - } - private Integer handSize; - private Integer queueLengthLimit; - private Integer queues; - public Integer getHandSize() { - return this.handSize; - } - public A withHandSize(Integer handSize) { - this.handSize=handSize; return (A) this; - } - public Boolean hasHandSize() { - return this.handSize != null; - } - public Integer getQueueLengthLimit() { - return this.queueLengthLimit; - } - public A withQueueLengthLimit(Integer queueLengthLimit) { - this.queueLengthLimit=queueLengthLimit; return (A) this; - } - public Boolean hasQueueLengthLimit() { - return this.queueLengthLimit != null; - } - public Integer getQueues() { - return this.queues; - } - public A withQueues(Integer queues) { - this.queues=queues; return (A) this; - } - public Boolean hasQueues() { - return this.queues != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2QueuingConfigurationFluentImpl that = (V1beta2QueuingConfigurationFluentImpl) o; - if (!java.util.Objects.equals(handSize, that.handSize)) return false; - - if (!java.util.Objects.equals(queueLengthLimit, that.queueLengthLimit)) return false; - - if (!java.util.Objects.equals(queues, that.queues)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(handSize, queueLengthLimit, queues, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (handSize != null) { sb.append("handSize:"); sb.append(handSize + ","); } - if (queueLengthLimit != null) { sb.append("queueLengthLimit:"); sb.append(queueLengthLimit + ","); } - if (queues != null) { sb.append("queues:"); sb.append(queues); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleBuilder.java index 84e70cdded..d22a5fd551 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2ResourcePolicyRuleBuilder extends V1beta2ResourcePolicyRuleFluentImpl implements VisitableBuilder{ +public class V1beta2ResourcePolicyRuleBuilder extends V1beta2ResourcePolicyRuleFluent implements VisitableBuilder{ public V1beta2ResourcePolicyRuleBuilder() { - this(false); - } - public V1beta2ResourcePolicyRuleBuilder(Boolean validationEnabled) { - this(new V1beta2ResourcePolicyRule(), validationEnabled); + this(new V1beta2ResourcePolicyRule()); } + public V1beta2ResourcePolicyRuleBuilder(V1beta2ResourcePolicyRuleFluent fluent) { - this(fluent, false); - } - public V1beta2ResourcePolicyRuleBuilder(V1beta2ResourcePolicyRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2ResourcePolicyRule(), validationEnabled); + this(fluent, new V1beta2ResourcePolicyRule()); } + public V1beta2ResourcePolicyRuleBuilder(V1beta2ResourcePolicyRuleFluent fluent,V1beta2ResourcePolicyRule instance) { - this(fluent, instance, false); - } - public V1beta2ResourcePolicyRuleBuilder(V1beta2ResourcePolicyRuleFluent fluent,V1beta2ResourcePolicyRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroups(instance.getApiGroups()); - fluent.withClusterScope(instance.getClusterScope()); - fluent.withNamespaces(instance.getNamespaces()); - fluent.withResources(instance.getResources()); - fluent.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2ResourcePolicyRuleBuilder(V1beta2ResourcePolicyRule instance) { - this(instance,false); - } - public V1beta2ResourcePolicyRuleBuilder(V1beta2ResourcePolicyRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withClusterScope(instance.getClusterScope()); - this.withNamespaces(instance.getNamespaces()); - this.withResources(instance.getResources()); - this.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2ResourcePolicyRuleFluent fluent; - Boolean validationEnabled; + public V1beta2ResourcePolicyRule build() { V1beta2ResourcePolicyRule buildable = new V1beta2ResourcePolicyRule(); buildable.setApiGroups(fluent.getApiGroups()); @@ -55,4 +31,5 @@ public V1beta2ResourcePolicyRule build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleFluent.java index 95cc714e52..467dd01763 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleFluent.java @@ -1,81 +1,464 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1beta2ResourcePolicyRuleFluent> extends Fluent{ - public A addToApiGroups(int index,String item); - public A setToApiGroups(int index,String item); - public A addToApiGroups(java.lang.String... items); - public A addAllToApiGroups(Collection items); - public A removeFromApiGroups(java.lang.String... items); - public A removeAllFromApiGroups(Collection items); - public List getApiGroups(); - public String getApiGroup(int index); - public String getFirstApiGroup(); - public String getLastApiGroup(); - public String getMatchingApiGroup(Predicate predicate); - public Boolean hasMatchingApiGroup(Predicate predicate); - public A withApiGroups(List apiGroups); - public A withApiGroups(java.lang.String... apiGroups); - public Boolean hasApiGroups(); - public Boolean getClusterScope(); - public A withClusterScope(Boolean clusterScope); - public Boolean hasClusterScope(); - public A addToNamespaces(int index,String item); - public A setToNamespaces(int index,String item); - public A addToNamespaces(java.lang.String... items); - public A addAllToNamespaces(Collection items); - public A removeFromNamespaces(java.lang.String... items); - public A removeAllFromNamespaces(Collection items); - public List getNamespaces(); - public String getNamespace(int index); - public String getFirstNamespace(); - public String getLastNamespace(); - public String getMatchingNamespace(Predicate predicate); - public Boolean hasMatchingNamespace(Predicate predicate); - public A withNamespaces(List namespaces); - public A withNamespaces(java.lang.String... namespaces); - public Boolean hasNamespaces(); - public A addToResources(int index,String item); - public A setToResources(int index,String item); - public A addToResources(java.lang.String... items); - public A addAllToResources(Collection items); - public A removeFromResources(java.lang.String... items); - public A removeAllFromResources(Collection items); - public List getResources(); - public String getResource(int index); - public String getFirstResource(); - public String getLastResource(); - public String getMatchingResource(Predicate predicate); - public Boolean hasMatchingResource(Predicate predicate); - public A withResources(List resources); - public A withResources(java.lang.String... resources); - public Boolean hasResources(); - public A addToVerbs(int index,String item); - public A setToVerbs(int index,String item); - public A addToVerbs(java.lang.String... items); - public A addAllToVerbs(Collection items); - public A removeFromVerbs(java.lang.String... items); - public A removeAllFromVerbs(Collection items); - public List getVerbs(); - public String getVerb(int index); - public String getFirstVerb(); - public String getLastVerb(); - public String getMatchingVerb(Predicate predicate); - public Boolean hasMatchingVerb(Predicate predicate); - public A withVerbs(List verbs); - public A withVerbs(java.lang.String... verbs); - public Boolean hasVerbs(); - public A withClusterScope(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2ResourcePolicyRuleFluent> extends BaseFluent{ + public V1beta2ResourcePolicyRuleFluent() { + } + public V1beta2ResourcePolicyRuleFluent(V1beta2ResourcePolicyRule instance) { + this.copyInstance(instance); + } + private List apiGroups; + private Boolean clusterScope; + private List namespaces; + private List resources; + private List verbs; + + protected void copyInstance(V1beta2ResourcePolicyRule instance) { + instance = (instance != null ? instance : new V1beta2ResourcePolicyRule()); + if (instance != null) { + this.withApiGroups(instance.getApiGroups()); + this.withClusterScope(instance.getClusterScope()); + this.withNamespaces(instance.getNamespaces()); + this.withResources(instance.getResources()); + this.withVerbs(instance.getVerbs()); + } + } + + public A addToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.add(index, item); + return (A)this; + } + + public A setToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.set(index, item); return (A)this; + } + + public A addToApiGroups(java.lang.String... items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A addAllToApiGroups(Collection items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A removeFromApiGroups(java.lang.String... items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public A removeAllFromApiGroups(Collection items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public List getApiGroups() { + return this.apiGroups; + } + + public String getApiGroup(int index) { + return this.apiGroups.get(index); + } + + public String getFirstApiGroup() { + return this.apiGroups.get(0); + } + + public String getLastApiGroup() { + return this.apiGroups.get(apiGroups.size() - 1); + } + + public String getMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withApiGroups(List apiGroups) { + if (apiGroups != null) { + this.apiGroups = new ArrayList(); + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } else { + this.apiGroups = null; + } + return (A) this; + } + + public A withApiGroups(java.lang.String... apiGroups) { + if (this.apiGroups != null) { + this.apiGroups.clear(); + _visitables.remove("apiGroups"); + } + if (apiGroups != null) { + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } + return (A) this; + } + + public boolean hasApiGroups() { + return this.apiGroups != null && !this.apiGroups.isEmpty(); + } + + public Boolean getClusterScope() { + return this.clusterScope; + } + + public A withClusterScope(Boolean clusterScope) { + this.clusterScope = clusterScope; + return (A) this; + } + + public boolean hasClusterScope() { + return this.clusterScope != null; + } + + public A addToNamespaces(int index,String item) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + this.namespaces.add(index, item); + return (A)this; + } + + public A setToNamespaces(int index,String item) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + this.namespaces.set(index, item); return (A)this; + } + + public A addToNamespaces(java.lang.String... items) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + for (String item : items) {this.namespaces.add(item);} return (A)this; + } + + public A addAllToNamespaces(Collection items) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + for (String item : items) {this.namespaces.add(item);} return (A)this; + } + + public A removeFromNamespaces(java.lang.String... items) { + if (this.namespaces == null) return (A)this; + for (String item : items) { this.namespaces.remove(item);} return (A)this; + } + + public A removeAllFromNamespaces(Collection items) { + if (this.namespaces == null) return (A)this; + for (String item : items) { this.namespaces.remove(item);} return (A)this; + } + + public List getNamespaces() { + return this.namespaces; + } + + public String getNamespace(int index) { + return this.namespaces.get(index); + } + + public String getFirstNamespace() { + return this.namespaces.get(0); + } + + public String getLastNamespace() { + return this.namespaces.get(namespaces.size() - 1); + } + + public String getMatchingNamespace(Predicate predicate) { + for (String item : namespaces) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingNamespace(Predicate predicate) { + for (String item : namespaces) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNamespaces(List namespaces) { + if (namespaces != null) { + this.namespaces = new ArrayList(); + for (String item : namespaces) { + this.addToNamespaces(item); + } + } else { + this.namespaces = null; + } + return (A) this; + } + + public A withNamespaces(java.lang.String... namespaces) { + if (this.namespaces != null) { + this.namespaces.clear(); + _visitables.remove("namespaces"); + } + if (namespaces != null) { + for (String item : namespaces) { + this.addToNamespaces(item); + } + } + return (A) this; + } + + public boolean hasNamespaces() { + return this.namespaces != null && !this.namespaces.isEmpty(); + } + + public A addToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.add(index, item); + return (A)this; + } + + public A setToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.set(index, item); return (A)this; + } + + public A addToResources(java.lang.String... items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A addAllToResources(Collection items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A removeFromResources(java.lang.String... items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public A removeAllFromResources(Collection items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public List getResources() { + return this.resources; + } + + public String getResource(int index) { + return this.resources.get(index); + } + + public String getFirstResource() { + return this.resources.get(0); + } + + public String getLastResource() { + return this.resources.get(resources.size() - 1); + } + + public String getMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResources(List resources) { + if (resources != null) { + this.resources = new ArrayList(); + for (String item : resources) { + this.addToResources(item); + } + } else { + this.resources = null; + } + return (A) this; + } + + public A withResources(java.lang.String... resources) { + if (this.resources != null) { + this.resources.clear(); + _visitables.remove("resources"); + } + if (resources != null) { + for (String item : resources) { + this.addToResources(item); + } + } + return (A) this; + } + + public boolean hasResources() { + return this.resources != null && !this.resources.isEmpty(); + } + + public A addToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.add(index, item); + return (A)this; + } + + public A setToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.set(index, item); return (A)this; + } + + public A addToVerbs(java.lang.String... items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A addAllToVerbs(Collection items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A removeFromVerbs(java.lang.String... items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public A removeAllFromVerbs(Collection items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public List getVerbs() { + return this.verbs; + } + + public String getVerb(int index) { + return this.verbs.get(index); + } + + public String getFirstVerb() { + return this.verbs.get(0); + } + + public String getLastVerb() { + return this.verbs.get(verbs.size() - 1); + } + + public String getMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVerbs(List verbs) { + if (verbs != null) { + this.verbs = new ArrayList(); + for (String item : verbs) { + this.addToVerbs(item); + } + } else { + this.verbs = null; + } + return (A) this; + } + + public A withVerbs(java.lang.String... verbs) { + if (this.verbs != null) { + this.verbs.clear(); + _visitables.remove("verbs"); + } + if (verbs != null) { + for (String item : verbs) { + this.addToVerbs(item); + } + } + return (A) this; + } + + public boolean hasVerbs() { + return this.verbs != null && !this.verbs.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2ResourcePolicyRuleFluent that = (V1beta2ResourcePolicyRuleFluent) o; + if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; + if (!java.util.Objects.equals(clusterScope, that.clusterScope)) return false; + if (!java.util.Objects.equals(namespaces, that.namespaces)) return false; + if (!java.util.Objects.equals(resources, that.resources)) return false; + if (!java.util.Objects.equals(verbs, that.verbs)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroups, clusterScope, namespaces, resources, verbs, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } + if (clusterScope != null) { sb.append("clusterScope:"); sb.append(clusterScope + ","); } + if (namespaces != null && !namespaces.isEmpty()) { sb.append("namespaces:"); sb.append(namespaces + ","); } + if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } + if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } + sb.append("}"); + return sb.toString(); + } + + public A withClusterScope() { + return withClusterScope(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleFluentImpl.java deleted file mode 100644 index 909fb662aa..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRuleFluentImpl.java +++ /dev/null @@ -1,282 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2ResourcePolicyRuleFluentImpl> extends BaseFluent implements V1beta2ResourcePolicyRuleFluent{ - public V1beta2ResourcePolicyRuleFluentImpl() { - } - public V1beta2ResourcePolicyRuleFluentImpl(V1beta2ResourcePolicyRule instance) { - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withClusterScope(instance.getClusterScope()); - this.withNamespaces(instance.getNamespaces()); - this.withResources(instance.getResources()); - this.withVerbs(instance.getVerbs()); - } - } - private List apiGroups; - private Boolean clusterScope; - private List namespaces; - private List resources; - private List verbs; - public A addToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.add(index, item); - return (A)this; - } - public A setToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.set(index, item); return (A)this; - } - public A addToApiGroups(java.lang.String... items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A addAllToApiGroups(Collection items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A removeFromApiGroups(java.lang.String... items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public A removeAllFromApiGroups(Collection items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public List getApiGroups() { - return this.apiGroups; - } - public String getApiGroup(int index) { - return this.apiGroups.get(index); - } - public String getFirstApiGroup() { - return this.apiGroups.get(0); - } - public String getLastApiGroup() { - return this.apiGroups.get(apiGroups.size() - 1); - } - public String getMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return true;} } return false; - } - public A withApiGroups(List apiGroups) { - if (apiGroups != null) {this.apiGroups = new ArrayList(); for (String item : apiGroups){this.addToApiGroups(item);}} else { this.apiGroups = null;} return (A) this; - } - public A withApiGroups(java.lang.String... apiGroups) { - if (this.apiGroups != null) {this.apiGroups.clear(); _visitables.remove("apiGroups"); } - if (apiGroups != null) {for (String item :apiGroups){ this.addToApiGroups(item);}} return (A) this; - } - public Boolean hasApiGroups() { - return apiGroups != null && !apiGroups.isEmpty(); - } - public Boolean getClusterScope() { - return this.clusterScope; - } - public A withClusterScope(Boolean clusterScope) { - this.clusterScope=clusterScope; return (A) this; - } - public Boolean hasClusterScope() { - return this.clusterScope != null; - } - public A addToNamespaces(int index,String item) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - this.namespaces.add(index, item); - return (A)this; - } - public A setToNamespaces(int index,String item) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - this.namespaces.set(index, item); return (A)this; - } - public A addToNamespaces(java.lang.String... items) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - for (String item : items) {this.namespaces.add(item);} return (A)this; - } - public A addAllToNamespaces(Collection items) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - for (String item : items) {this.namespaces.add(item);} return (A)this; - } - public A removeFromNamespaces(java.lang.String... items) { - for (String item : items) {if (this.namespaces!= null){ this.namespaces.remove(item);}} return (A)this; - } - public A removeAllFromNamespaces(Collection items) { - for (String item : items) {if (this.namespaces!= null){ this.namespaces.remove(item);}} return (A)this; - } - public List getNamespaces() { - return this.namespaces; - } - public String getNamespace(int index) { - return this.namespaces.get(index); - } - public String getFirstNamespace() { - return this.namespaces.get(0); - } - public String getLastNamespace() { - return this.namespaces.get(namespaces.size() - 1); - } - public String getMatchingNamespace(Predicate predicate) { - for (String item: namespaces) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingNamespace(Predicate predicate) { - for (String item: namespaces) { if(predicate.test(item)){ return true;} } return false; - } - public A withNamespaces(List namespaces) { - if (namespaces != null) {this.namespaces = new ArrayList(); for (String item : namespaces){this.addToNamespaces(item);}} else { this.namespaces = null;} return (A) this; - } - public A withNamespaces(java.lang.String... namespaces) { - if (this.namespaces != null) {this.namespaces.clear(); _visitables.remove("namespaces"); } - if (namespaces != null) {for (String item :namespaces){ this.addToNamespaces(item);}} return (A) this; - } - public Boolean hasNamespaces() { - return namespaces != null && !namespaces.isEmpty(); - } - public A addToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.add(index, item); - return (A)this; - } - public A setToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.set(index, item); return (A)this; - } - public A addToResources(java.lang.String... items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A addAllToResources(Collection items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A removeFromResources(java.lang.String... items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public A removeAllFromResources(Collection items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public List getResources() { - return this.resources; - } - public String getResource(int index) { - return this.resources.get(index); - } - public String getFirstResource() { - return this.resources.get(0); - } - public String getLastResource() { - return this.resources.get(resources.size() - 1); - } - public String getMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return true;} } return false; - } - public A withResources(List resources) { - if (resources != null) {this.resources = new ArrayList(); for (String item : resources){this.addToResources(item);}} else { this.resources = null;} return (A) this; - } - public A withResources(java.lang.String... resources) { - if (this.resources != null) {this.resources.clear(); _visitables.remove("resources"); } - if (resources != null) {for (String item :resources){ this.addToResources(item);}} return (A) this; - } - public Boolean hasResources() { - return resources != null && !resources.isEmpty(); - } - public A addToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.add(index, item); - return (A)this; - } - public A setToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.set(index, item); return (A)this; - } - public A addToVerbs(java.lang.String... items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A addAllToVerbs(Collection items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A removeFromVerbs(java.lang.String... items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public A removeAllFromVerbs(Collection items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public List getVerbs() { - return this.verbs; - } - public String getVerb(int index) { - return this.verbs.get(index); - } - public String getFirstVerb() { - return this.verbs.get(0); - } - public String getLastVerb() { - return this.verbs.get(verbs.size() - 1); - } - public String getMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return true;} } return false; - } - public A withVerbs(List verbs) { - if (verbs != null) {this.verbs = new ArrayList(); for (String item : verbs){this.addToVerbs(item);}} else { this.verbs = null;} return (A) this; - } - public A withVerbs(java.lang.String... verbs) { - if (this.verbs != null) {this.verbs.clear(); _visitables.remove("verbs"); } - if (verbs != null) {for (String item :verbs){ this.addToVerbs(item);}} return (A) this; - } - public Boolean hasVerbs() { - return verbs != null && !verbs.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2ResourcePolicyRuleFluentImpl that = (V1beta2ResourcePolicyRuleFluentImpl) o; - if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; - - if (!java.util.Objects.equals(clusterScope, that.clusterScope)) return false; - - if (!java.util.Objects.equals(namespaces, that.namespaces)) return false; - - if (!java.util.Objects.equals(resources, that.resources)) return false; - - if (!java.util.Objects.equals(verbs, that.verbs)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroups, clusterScope, namespaces, resources, verbs, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } - if (clusterScope != null) { sb.append("clusterScope:"); sb.append(clusterScope + ","); } - if (namespaces != null && !namespaces.isEmpty()) { sb.append("namespaces:"); sb.append(namespaces + ","); } - if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } - if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } - sb.append("}"); - return sb.toString(); - } - public A withClusterScope() { - return withClusterScope(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectBuilder.java index 5bf72e7d0d..fa07284b78 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2ServiceAccountSubjectBuilder extends V1beta2ServiceAccountSubjectFluentImpl implements VisitableBuilder{ +public class V1beta2ServiceAccountSubjectBuilder extends V1beta2ServiceAccountSubjectFluent implements VisitableBuilder{ public V1beta2ServiceAccountSubjectBuilder() { - this(false); - } - public V1beta2ServiceAccountSubjectBuilder(Boolean validationEnabled) { - this(new V1beta2ServiceAccountSubject(), validationEnabled); + this(new V1beta2ServiceAccountSubject()); } + public V1beta2ServiceAccountSubjectBuilder(V1beta2ServiceAccountSubjectFluent fluent) { - this(fluent, false); - } - public V1beta2ServiceAccountSubjectBuilder(V1beta2ServiceAccountSubjectFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2ServiceAccountSubject(), validationEnabled); + this(fluent, new V1beta2ServiceAccountSubject()); } + public V1beta2ServiceAccountSubjectBuilder(V1beta2ServiceAccountSubjectFluent fluent,V1beta2ServiceAccountSubject instance) { - this(fluent, instance, false); - } - public V1beta2ServiceAccountSubjectBuilder(V1beta2ServiceAccountSubjectFluent fluent,V1beta2ServiceAccountSubject instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2ServiceAccountSubjectBuilder(V1beta2ServiceAccountSubject instance) { - this(instance,false); - } - public V1beta2ServiceAccountSubjectBuilder(V1beta2ServiceAccountSubject instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2ServiceAccountSubjectFluent fluent; - Boolean validationEnabled; + public V1beta2ServiceAccountSubject build() { V1beta2ServiceAccountSubject buildable = new V1beta2ServiceAccountSubject(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1beta2ServiceAccountSubject build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectFluent.java index 22e0312089..fe0159f850 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2ServiceAccountSubjectFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2ServiceAccountSubjectFluent> extends BaseFluent{ + public V1beta2ServiceAccountSubjectFluent() { + } + public V1beta2ServiceAccountSubjectFluent(V1beta2ServiceAccountSubject instance) { + this.copyInstance(instance); + } + private String name; + private String namespace; + + protected void copyInstance(V1beta2ServiceAccountSubject instance) { + instance = (instance != null ? instance : new V1beta2ServiceAccountSubject()); + if (instance != null) { + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2ServiceAccountSubjectFluent that = (V1beta2ServiceAccountSubjectFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, namespace, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectFluentImpl.java deleted file mode 100644 index 3c56d6c1e1..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubjectFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2ServiceAccountSubjectFluentImpl> extends BaseFluent implements V1beta2ServiceAccountSubjectFluent{ - public V1beta2ServiceAccountSubjectFluentImpl() { - } - public V1beta2ServiceAccountSubjectFluentImpl(V1beta2ServiceAccountSubject instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - } - private String name; - private String namespace; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2ServiceAccountSubjectFluentImpl that = (V1beta2ServiceAccountSubjectFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, namespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectBuilder.java index 856f5782ee..9687a28fd1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2SubjectBuilder extends V1beta2SubjectFluentImpl implements VisitableBuilder{ +public class V1beta2SubjectBuilder extends V1beta2SubjectFluent implements VisitableBuilder{ public V1beta2SubjectBuilder() { - this(false); - } - public V1beta2SubjectBuilder(Boolean validationEnabled) { - this(new V1beta2Subject(), validationEnabled); + this(new V1beta2Subject()); } + public V1beta2SubjectBuilder(V1beta2SubjectFluent fluent) { - this(fluent, false); - } - public V1beta2SubjectBuilder(V1beta2SubjectFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2Subject(), validationEnabled); + this(fluent, new V1beta2Subject()); } + public V1beta2SubjectBuilder(V1beta2SubjectFluent fluent,V1beta2Subject instance) { - this(fluent, instance, false); - } - public V1beta2SubjectBuilder(V1beta2SubjectFluent fluent,V1beta2Subject instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withGroup(instance.getGroup()); - fluent.withKind(instance.getKind()); - fluent.withServiceAccount(instance.getServiceAccount()); - fluent.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2SubjectBuilder(V1beta2Subject instance) { - this(instance,false); - } - public V1beta2SubjectBuilder(V1beta2Subject instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withKind(instance.getKind()); - this.withServiceAccount(instance.getServiceAccount()); - this.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2SubjectFluent fluent; - Boolean validationEnabled; + public V1beta2Subject build() { V1beta2Subject buildable = new V1beta2Subject(); - buildable.setGroup(fluent.getGroup()); + buildable.setGroup(fluent.buildGroup()); buildable.setKind(fluent.getKind()); - buildable.setServiceAccount(fluent.getServiceAccount()); - buildable.setUser(fluent.getUser()); + buildable.setServiceAccount(fluent.buildServiceAccount()); + buildable.setUser(fluent.buildUser()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectFluent.java index 539e6b620e..b986c9863a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectFluent.java @@ -1,78 +1,243 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta2SubjectFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildGroup instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2GroupSubject getGroup(); - public V1beta2GroupSubject buildGroup(); - public A withGroup(V1beta2GroupSubject group); - public Boolean hasGroup(); - public V1beta2SubjectFluent.GroupNested withNewGroup(); - public V1beta2SubjectFluent.GroupNested withNewGroupLike(V1beta2GroupSubject item); - public V1beta2SubjectFluent.GroupNested editGroup(); - public V1beta2SubjectFluent.GroupNested editOrNewGroup(); - public V1beta2SubjectFluent.GroupNested editOrNewGroupLike(V1beta2GroupSubject item); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildServiceAccount instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2ServiceAccountSubject getServiceAccount(); - public V1beta2ServiceAccountSubject buildServiceAccount(); - public A withServiceAccount(V1beta2ServiceAccountSubject serviceAccount); - public Boolean hasServiceAccount(); - public V1beta2SubjectFluent.ServiceAccountNested withNewServiceAccount(); - public V1beta2SubjectFluent.ServiceAccountNested withNewServiceAccountLike(V1beta2ServiceAccountSubject item); - public V1beta2SubjectFluent.ServiceAccountNested editServiceAccount(); - public V1beta2SubjectFluent.ServiceAccountNested editOrNewServiceAccount(); - public V1beta2SubjectFluent.ServiceAccountNested editOrNewServiceAccountLike(V1beta2ServiceAccountSubject item); - - /** - * This method has been deprecated, please use method buildUser instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2UserSubject getUser(); - public V1beta2UserSubject buildUser(); - public A withUser(V1beta2UserSubject user); - public Boolean hasUser(); - public V1beta2SubjectFluent.UserNested withNewUser(); - public V1beta2SubjectFluent.UserNested withNewUserLike(V1beta2UserSubject item); - public V1beta2SubjectFluent.UserNested editUser(); - public V1beta2SubjectFluent.UserNested editOrNewUser(); - public V1beta2SubjectFluent.UserNested editOrNewUserLike(V1beta2UserSubject item); - public interface GroupNested extends Nested,V1beta2GroupSubjectFluent>{ - public N and(); - public N endGroup(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2SubjectFluent> extends BaseFluent{ + public V1beta2SubjectFluent() { + } + + public V1beta2SubjectFluent(V1beta2Subject instance) { + this.copyInstance(instance); + } + private V1beta2GroupSubjectBuilder group; + private String kind; + private V1beta2ServiceAccountSubjectBuilder serviceAccount; + private V1beta2UserSubjectBuilder user; + + protected void copyInstance(V1beta2Subject instance) { + instance = (instance != null ? instance : new V1beta2Subject()); + if (instance != null) { + this.withGroup(instance.getGroup()); + this.withKind(instance.getKind()); + this.withServiceAccount(instance.getServiceAccount()); + this.withUser(instance.getUser()); + } + } + + public V1beta2GroupSubject buildGroup() { + return this.group != null ? this.group.build() : null; + } + + public A withGroup(V1beta2GroupSubject group) { + this._visitables.remove("group"); + if (group != null) { + this.group = new V1beta2GroupSubjectBuilder(group); + this._visitables.get("group").add(this.group); + } else { + this.group = null; + this._visitables.get("group").remove(this.group); + } + return (A) this; + } + + public boolean hasGroup() { + return this.group != null; + } + + public GroupNested withNewGroup() { + return new GroupNested(null); + } + + public GroupNested withNewGroupLike(V1beta2GroupSubject item) { + return new GroupNested(item); + } + + public GroupNested editGroup() { + return withNewGroupLike(java.util.Optional.ofNullable(buildGroup()).orElse(null)); + } + + public GroupNested editOrNewGroup() { + return withNewGroupLike(java.util.Optional.ofNullable(buildGroup()).orElse(new V1beta2GroupSubjectBuilder().build())); + } + + public GroupNested editOrNewGroupLike(V1beta2GroupSubject item) { + return withNewGroupLike(java.util.Optional.ofNullable(buildGroup()).orElse(item)); + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1beta2ServiceAccountSubject buildServiceAccount() { + return this.serviceAccount != null ? this.serviceAccount.build() : null; + } + + public A withServiceAccount(V1beta2ServiceAccountSubject serviceAccount) { + this._visitables.remove("serviceAccount"); + if (serviceAccount != null) { + this.serviceAccount = new V1beta2ServiceAccountSubjectBuilder(serviceAccount); + this._visitables.get("serviceAccount").add(this.serviceAccount); + } else { + this.serviceAccount = null; + this._visitables.get("serviceAccount").remove(this.serviceAccount); + } + return (A) this; + } + + public boolean hasServiceAccount() { + return this.serviceAccount != null; + } + + public ServiceAccountNested withNewServiceAccount() { + return new ServiceAccountNested(null); + } + + public ServiceAccountNested withNewServiceAccountLike(V1beta2ServiceAccountSubject item) { + return new ServiceAccountNested(item); + } + + public ServiceAccountNested editServiceAccount() { + return withNewServiceAccountLike(java.util.Optional.ofNullable(buildServiceAccount()).orElse(null)); + } + + public ServiceAccountNested editOrNewServiceAccount() { + return withNewServiceAccountLike(java.util.Optional.ofNullable(buildServiceAccount()).orElse(new V1beta2ServiceAccountSubjectBuilder().build())); + } + + public ServiceAccountNested editOrNewServiceAccountLike(V1beta2ServiceAccountSubject item) { + return withNewServiceAccountLike(java.util.Optional.ofNullable(buildServiceAccount()).orElse(item)); + } + + public V1beta2UserSubject buildUser() { + return this.user != null ? this.user.build() : null; + } + + public A withUser(V1beta2UserSubject user) { + this._visitables.remove("user"); + if (user != null) { + this.user = new V1beta2UserSubjectBuilder(user); + this._visitables.get("user").add(this.user); + } else { + this.user = null; + this._visitables.get("user").remove(this.user); + } + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public UserNested withNewUser() { + return new UserNested(null); + } + + public UserNested withNewUserLike(V1beta2UserSubject item) { + return new UserNested(item); + } + + public UserNested editUser() { + return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(null)); + } + + public UserNested editOrNewUser() { + return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(new V1beta2UserSubjectBuilder().build())); } - public interface ServiceAccountNested extends Nested,V1beta2ServiceAccountSubjectFluent>{ - public N and(); - public N endServiceAccount(); + + public UserNested editOrNewUserLike(V1beta2UserSubject item) { + return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2SubjectFluent that = (V1beta2SubjectFluent) o; + if (!java.util.Objects.equals(group, that.group)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(serviceAccount, that.serviceAccount)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(group, kind, serviceAccount, user, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (group != null) { sb.append("group:"); sb.append(group + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (serviceAccount != null) { sb.append("serviceAccount:"); sb.append(serviceAccount + ","); } + if (user != null) { sb.append("user:"); sb.append(user); } + sb.append("}"); + return sb.toString(); + } + public class GroupNested extends V1beta2GroupSubjectFluent> implements Nested{ + GroupNested(V1beta2GroupSubject item) { + this.builder = new V1beta2GroupSubjectBuilder(this, item); + } + V1beta2GroupSubjectBuilder builder; + + public N and() { + return (N) V1beta2SubjectFluent.this.withGroup(builder.build()); + } + + public N endGroup() { + return and(); + } + } - public interface UserNested extends Nested,V1beta2UserSubjectFluent>{ - public N and(); - public N endUser(); + public class ServiceAccountNested extends V1beta2ServiceAccountSubjectFluent> implements Nested{ + ServiceAccountNested(V1beta2ServiceAccountSubject item) { + this.builder = new V1beta2ServiceAccountSubjectBuilder(this, item); + } + V1beta2ServiceAccountSubjectBuilder builder; + + public N and() { + return (N) V1beta2SubjectFluent.this.withServiceAccount(builder.build()); + } + + public N endServiceAccount() { + return and(); + } + } + public class UserNested extends V1beta2UserSubjectFluent> implements Nested{ + UserNested(V1beta2UserSubject item) { + this.builder = new V1beta2UserSubjectBuilder(this, item); + } + V1beta2UserSubjectBuilder builder; + + public N and() { + return (N) V1beta2SubjectFluent.this.withUser(builder.build()); + } + + public N endUser() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectFluentImpl.java deleted file mode 100644 index 2c60f6e897..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2SubjectFluentImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2SubjectFluentImpl> extends BaseFluent implements V1beta2SubjectFluent{ - public V1beta2SubjectFluentImpl() { - } - public V1beta2SubjectFluentImpl(V1beta2Subject instance) { - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withKind(instance.getKind()); - this.withServiceAccount(instance.getServiceAccount()); - this.withUser(instance.getUser()); - } - } - private V1beta2GroupSubjectBuilder group; - private String kind; - private V1beta2ServiceAccountSubjectBuilder serviceAccount; - private V1beta2UserSubjectBuilder user; - - /** - * This method has been deprecated, please use method buildGroup instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2GroupSubject getGroup() { - return this.group!=null ?this.group.build():null; - } - public V1beta2GroupSubject buildGroup() { - return this.group!=null ?this.group.build():null; - } - public A withGroup(V1beta2GroupSubject group) { - _visitables.get("group").remove(this.group); - if (group!=null){ this.group= new V1beta2GroupSubjectBuilder(group); _visitables.get("group").add(this.group);} else { this.group = null; _visitables.get("group").remove(this.group); } return (A) this; - } - public Boolean hasGroup() { - return this.group != null; - } - public V1beta2SubjectFluentImpl.GroupNested withNewGroup() { - return new V1beta2SubjectFluentImpl.GroupNestedImpl(); - } - public V1beta2SubjectFluentImpl.GroupNested withNewGroupLike(V1beta2GroupSubject item) { - return new V1beta2SubjectFluentImpl.GroupNestedImpl(item); - } - public V1beta2SubjectFluentImpl.GroupNested editGroup() { - return withNewGroupLike(getGroup()); - } - public V1beta2SubjectFluentImpl.GroupNested editOrNewGroup() { - return withNewGroupLike(getGroup() != null ? getGroup(): new V1beta2GroupSubjectBuilder().build()); - } - public V1beta2SubjectFluentImpl.GroupNested editOrNewGroupLike(V1beta2GroupSubject item) { - return withNewGroupLike(getGroup() != null ? getGroup(): item); - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildServiceAccount instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2ServiceAccountSubject getServiceAccount() { - return this.serviceAccount!=null ?this.serviceAccount.build():null; - } - public V1beta2ServiceAccountSubject buildServiceAccount() { - return this.serviceAccount!=null ?this.serviceAccount.build():null; - } - public A withServiceAccount(V1beta2ServiceAccountSubject serviceAccount) { - _visitables.get("serviceAccount").remove(this.serviceAccount); - if (serviceAccount!=null){ this.serviceAccount= new V1beta2ServiceAccountSubjectBuilder(serviceAccount); _visitables.get("serviceAccount").add(this.serviceAccount);} else { this.serviceAccount = null; _visitables.get("serviceAccount").remove(this.serviceAccount); } return (A) this; - } - public Boolean hasServiceAccount() { - return this.serviceAccount != null; - } - public V1beta2SubjectFluentImpl.ServiceAccountNested withNewServiceAccount() { - return new V1beta2SubjectFluentImpl.ServiceAccountNestedImpl(); - } - public V1beta2SubjectFluentImpl.ServiceAccountNested withNewServiceAccountLike(V1beta2ServiceAccountSubject item) { - return new V1beta2SubjectFluentImpl.ServiceAccountNestedImpl(item); - } - public V1beta2SubjectFluentImpl.ServiceAccountNested editServiceAccount() { - return withNewServiceAccountLike(getServiceAccount()); - } - public V1beta2SubjectFluentImpl.ServiceAccountNested editOrNewServiceAccount() { - return withNewServiceAccountLike(getServiceAccount() != null ? getServiceAccount(): new V1beta2ServiceAccountSubjectBuilder().build()); - } - public V1beta2SubjectFluentImpl.ServiceAccountNested editOrNewServiceAccountLike(V1beta2ServiceAccountSubject item) { - return withNewServiceAccountLike(getServiceAccount() != null ? getServiceAccount(): item); - } - - /** - * This method has been deprecated, please use method buildUser instead. - * @return The buildable object. - */ - @Deprecated - public V1beta2UserSubject getUser() { - return this.user!=null ?this.user.build():null; - } - public V1beta2UserSubject buildUser() { - return this.user!=null ?this.user.build():null; - } - public A withUser(V1beta2UserSubject user) { - _visitables.get("user").remove(this.user); - if (user!=null){ this.user= new V1beta2UserSubjectBuilder(user); _visitables.get("user").add(this.user);} else { this.user = null; _visitables.get("user").remove(this.user); } return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public V1beta2SubjectFluentImpl.UserNested withNewUser() { - return new V1beta2SubjectFluentImpl.UserNestedImpl(); - } - public V1beta2SubjectFluentImpl.UserNested withNewUserLike(V1beta2UserSubject item) { - return new V1beta2SubjectFluentImpl.UserNestedImpl(item); - } - public V1beta2SubjectFluentImpl.UserNested editUser() { - return withNewUserLike(getUser()); - } - public V1beta2SubjectFluentImpl.UserNested editOrNewUser() { - return withNewUserLike(getUser() != null ? getUser(): new V1beta2UserSubjectBuilder().build()); - } - public V1beta2SubjectFluentImpl.UserNested editOrNewUserLike(V1beta2UserSubject item) { - return withNewUserLike(getUser() != null ? getUser(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2SubjectFluentImpl that = (V1beta2SubjectFluentImpl) o; - if (!java.util.Objects.equals(group, that.group)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(serviceAccount, that.serviceAccount)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(group, kind, serviceAccount, user, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (group != null) { sb.append("group:"); sb.append(group + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (serviceAccount != null) { sb.append("serviceAccount:"); sb.append(serviceAccount + ","); } - if (user != null) { sb.append("user:"); sb.append(user); } - sb.append("}"); - return sb.toString(); - } - class GroupNestedImpl extends V1beta2GroupSubjectFluentImpl> implements V1beta2SubjectFluentImpl.GroupNested,Nested{ - GroupNestedImpl(V1beta2GroupSubject item) { - this.builder = new V1beta2GroupSubjectBuilder(this, item); - } - GroupNestedImpl() { - this.builder = new V1beta2GroupSubjectBuilder(this); - } - V1beta2GroupSubjectBuilder builder; - public N and() { - return (N) V1beta2SubjectFluentImpl.this.withGroup(builder.build()); - } - public N endGroup() { - return and(); - } - - } - class ServiceAccountNestedImpl extends V1beta2ServiceAccountSubjectFluentImpl> implements V1beta2SubjectFluentImpl.ServiceAccountNested,Nested{ - ServiceAccountNestedImpl(V1beta2ServiceAccountSubject item) { - this.builder = new V1beta2ServiceAccountSubjectBuilder(this, item); - } - ServiceAccountNestedImpl() { - this.builder = new V1beta2ServiceAccountSubjectBuilder(this); - } - V1beta2ServiceAccountSubjectBuilder builder; - public N and() { - return (N) V1beta2SubjectFluentImpl.this.withServiceAccount(builder.build()); - } - public N endServiceAccount() { - return and(); - } - - } - class UserNestedImpl extends V1beta2UserSubjectFluentImpl> implements V1beta2SubjectFluentImpl.UserNested,Nested{ - UserNestedImpl(V1beta2UserSubject item) { - this.builder = new V1beta2UserSubjectBuilder(this, item); - } - UserNestedImpl() { - this.builder = new V1beta2UserSubjectBuilder(this); - } - V1beta2UserSubjectBuilder builder; - public N and() { - return (N) V1beta2SubjectFluentImpl.this.withUser(builder.build()); - } - public N endUser() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectBuilder.java index f87075158f..9da9ba9d5b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta2UserSubjectBuilder extends V1beta2UserSubjectFluentImpl implements VisitableBuilder{ +public class V1beta2UserSubjectBuilder extends V1beta2UserSubjectFluent implements VisitableBuilder{ public V1beta2UserSubjectBuilder() { - this(false); - } - public V1beta2UserSubjectBuilder(Boolean validationEnabled) { - this(new V1beta2UserSubject(), validationEnabled); + this(new V1beta2UserSubject()); } + public V1beta2UserSubjectBuilder(V1beta2UserSubjectFluent fluent) { - this(fluent, false); - } - public V1beta2UserSubjectBuilder(V1beta2UserSubjectFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta2UserSubject(), validationEnabled); + this(fluent, new V1beta2UserSubject()); } + public V1beta2UserSubjectBuilder(V1beta2UserSubjectFluent fluent,V1beta2UserSubject instance) { - this(fluent, instance, false); - } - public V1beta2UserSubjectBuilder(V1beta2UserSubjectFluent fluent,V1beta2UserSubject instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta2UserSubjectBuilder(V1beta2UserSubject instance) { - this(instance,false); - } - public V1beta2UserSubjectBuilder(V1beta2UserSubject instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta2UserSubjectFluent fluent; - Boolean validationEnabled; + public V1beta2UserSubject build() { V1beta2UserSubject buildable = new V1beta2UserSubject(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectFluent.java index bda009b62e..2ab287de8b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta2UserSubjectFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta2UserSubjectFluent> extends BaseFluent{ + public V1beta2UserSubjectFluent() { + } + public V1beta2UserSubjectFluent(V1beta2UserSubject instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1beta2UserSubject instance) { + instance = (instance != null ? instance : new V1beta2UserSubject()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta2UserSubjectFluent that = (V1beta2UserSubjectFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectFluentImpl.java deleted file mode 100644 index 5865d63ce2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubjectFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta2UserSubjectFluentImpl> extends BaseFluent implements V1beta2UserSubjectFluent{ - public V1beta2UserSubjectFluentImpl() { - } - public V1beta2UserSubjectFluentImpl(V1beta2UserSubject instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta2UserSubjectFluentImpl that = (V1beta2UserSubjectFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfigurationBuilder.java new file mode 100644 index 0000000000..16306658f3 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfigurationBuilder.java @@ -0,0 +1,32 @@ +package io.kubernetes.client.openapi.models; + +import io.kubernetes.client.fluent.VisitableBuilder; +public class V1beta3ExemptPriorityLevelConfigurationBuilder extends V1beta3ExemptPriorityLevelConfigurationFluent implements VisitableBuilder{ + public V1beta3ExemptPriorityLevelConfigurationBuilder() { + this(new V1beta3ExemptPriorityLevelConfiguration()); + } + + public V1beta3ExemptPriorityLevelConfigurationBuilder(V1beta3ExemptPriorityLevelConfigurationFluent fluent) { + this(fluent, new V1beta3ExemptPriorityLevelConfiguration()); + } + + public V1beta3ExemptPriorityLevelConfigurationBuilder(V1beta3ExemptPriorityLevelConfigurationFluent fluent,V1beta3ExemptPriorityLevelConfiguration instance) { + this.fluent = fluent; + fluent.copyInstance(instance); + } + + public V1beta3ExemptPriorityLevelConfigurationBuilder(V1beta3ExemptPriorityLevelConfiguration instance) { + this.fluent = this; + this.copyInstance(instance); + } + V1beta3ExemptPriorityLevelConfigurationFluent fluent; + + public V1beta3ExemptPriorityLevelConfiguration build() { + V1beta3ExemptPriorityLevelConfiguration buildable = new V1beta3ExemptPriorityLevelConfiguration(); + buildable.setLendablePercent(fluent.getLendablePercent()); + buildable.setNominalConcurrencyShares(fluent.getNominalConcurrencyShares()); + return buildable; + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfigurationFluent.java new file mode 100644 index 0000000000..235fc841f9 --- /dev/null +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfigurationFluent.java @@ -0,0 +1,81 @@ +package io.kubernetes.client.openapi.models; + +import java.lang.Integer; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; + +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3ExemptPriorityLevelConfigurationFluent> extends BaseFluent{ + public V1beta3ExemptPriorityLevelConfigurationFluent() { + } + + public V1beta3ExemptPriorityLevelConfigurationFluent(V1beta3ExemptPriorityLevelConfiguration instance) { + this.copyInstance(instance); + } + private Integer lendablePercent; + private Integer nominalConcurrencyShares; + + protected void copyInstance(V1beta3ExemptPriorityLevelConfiguration instance) { + instance = (instance != null ? instance : new V1beta3ExemptPriorityLevelConfiguration()); + if (instance != null) { + this.withLendablePercent(instance.getLendablePercent()); + this.withNominalConcurrencyShares(instance.getNominalConcurrencyShares()); + } + } + + public Integer getLendablePercent() { + return this.lendablePercent; + } + + public A withLendablePercent(Integer lendablePercent) { + this.lendablePercent = lendablePercent; + return (A) this; + } + + public boolean hasLendablePercent() { + return this.lendablePercent != null; + } + + public Integer getNominalConcurrencyShares() { + return this.nominalConcurrencyShares; + } + + public A withNominalConcurrencyShares(Integer nominalConcurrencyShares) { + this.nominalConcurrencyShares = nominalConcurrencyShares; + return (A) this; + } + + public boolean hasNominalConcurrencyShares() { + return this.nominalConcurrencyShares != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3ExemptPriorityLevelConfigurationFluent that = (V1beta3ExemptPriorityLevelConfigurationFluent) o; + if (!java.util.Objects.equals(lendablePercent, that.lendablePercent)) return false; + if (!java.util.Objects.equals(nominalConcurrencyShares, that.nominalConcurrencyShares)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lendablePercent, nominalConcurrencyShares, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lendablePercent != null) { sb.append("lendablePercent:"); sb.append(lendablePercent + ","); } + if (nominalConcurrencyShares != null) { sb.append("nominalConcurrencyShares:"); sb.append(nominalConcurrencyShares); } + sb.append("}"); + return sb.toString(); + } + + +} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodBuilder.java index 9f4e2fed1a..0630d96a84 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3FlowDistinguisherMethodBuilder extends V1beta3FlowDistinguisherMethodFluentImpl implements VisitableBuilder{ +public class V1beta3FlowDistinguisherMethodBuilder extends V1beta3FlowDistinguisherMethodFluent implements VisitableBuilder{ public V1beta3FlowDistinguisherMethodBuilder() { - this(false); - } - public V1beta3FlowDistinguisherMethodBuilder(Boolean validationEnabled) { - this(new V1beta3FlowDistinguisherMethod(), validationEnabled); + this(new V1beta3FlowDistinguisherMethod()); } + public V1beta3FlowDistinguisherMethodBuilder(V1beta3FlowDistinguisherMethodFluent fluent) { - this(fluent, false); - } - public V1beta3FlowDistinguisherMethodBuilder(V1beta3FlowDistinguisherMethodFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3FlowDistinguisherMethod(), validationEnabled); + this(fluent, new V1beta3FlowDistinguisherMethod()); } + public V1beta3FlowDistinguisherMethodBuilder(V1beta3FlowDistinguisherMethodFluent fluent,V1beta3FlowDistinguisherMethod instance) { - this(fluent, instance, false); - } - public V1beta3FlowDistinguisherMethodBuilder(V1beta3FlowDistinguisherMethodFluent fluent,V1beta3FlowDistinguisherMethod instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3FlowDistinguisherMethodBuilder(V1beta3FlowDistinguisherMethod instance) { - this(instance,false); - } - public V1beta3FlowDistinguisherMethodBuilder(V1beta3FlowDistinguisherMethod instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3FlowDistinguisherMethodFluent fluent; - Boolean validationEnabled; + public V1beta3FlowDistinguisherMethod build() { V1beta3FlowDistinguisherMethod buildable = new V1beta3FlowDistinguisherMethod(); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodFluent.java index f51d38515a..db4fdcb208 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3FlowDistinguisherMethodFluent> extends Fluent{ - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3FlowDistinguisherMethodFluent> extends BaseFluent{ + public V1beta3FlowDistinguisherMethodFluent() { + } + public V1beta3FlowDistinguisherMethodFluent(V1beta3FlowDistinguisherMethod instance) { + this.copyInstance(instance); + } + private String type; + + protected void copyInstance(V1beta3FlowDistinguisherMethod instance) { + instance = (instance != null ? instance : new V1beta3FlowDistinguisherMethod()); + if (instance != null) { + this.withType(instance.getType()); + } + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3FlowDistinguisherMethodFluent that = (V1beta3FlowDistinguisherMethodFluent) o; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodFluentImpl.java deleted file mode 100644 index d30c5e3a36..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowDistinguisherMethodFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3FlowDistinguisherMethodFluentImpl> extends BaseFluent implements V1beta3FlowDistinguisherMethodFluent{ - public V1beta3FlowDistinguisherMethodFluentImpl() { - } - public V1beta3FlowDistinguisherMethodFluentImpl(V1beta3FlowDistinguisherMethod instance) { - if (instance != null) { - this.withType(instance.getType()); - } - } - private String type; - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3FlowDistinguisherMethodFluentImpl that = (V1beta3FlowDistinguisherMethodFluentImpl) o; - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaBuilder.java index 0ca835adc0..6645a2ddaa 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3FlowSchemaBuilder extends V1beta3FlowSchemaFluentImpl implements VisitableBuilder{ +public class V1beta3FlowSchemaBuilder extends V1beta3FlowSchemaFluent implements VisitableBuilder{ public V1beta3FlowSchemaBuilder() { - this(false); - } - public V1beta3FlowSchemaBuilder(Boolean validationEnabled) { - this(new V1beta3FlowSchema(), validationEnabled); + this(new V1beta3FlowSchema()); } + public V1beta3FlowSchemaBuilder(V1beta3FlowSchemaFluent fluent) { - this(fluent, false); - } - public V1beta3FlowSchemaBuilder(V1beta3FlowSchemaFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3FlowSchema(), validationEnabled); + this(fluent, new V1beta3FlowSchema()); } + public V1beta3FlowSchemaBuilder(V1beta3FlowSchemaFluent fluent,V1beta3FlowSchema instance) { - this(fluent, instance, false); - } - public V1beta3FlowSchemaBuilder(V1beta3FlowSchemaFluent fluent,V1beta3FlowSchema instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3FlowSchemaBuilder(V1beta3FlowSchema instance) { - this(instance,false); - } - public V1beta3FlowSchemaBuilder(V1beta3FlowSchema instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3FlowSchemaFluent fluent; - Boolean validationEnabled; + public V1beta3FlowSchema build() { V1beta3FlowSchema buildable = new V1beta3FlowSchema(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionBuilder.java index 0648e78841..2a60a81812 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3FlowSchemaConditionBuilder extends V1beta3FlowSchemaConditionFluentImpl implements VisitableBuilder{ +public class V1beta3FlowSchemaConditionBuilder extends V1beta3FlowSchemaConditionFluent implements VisitableBuilder{ public V1beta3FlowSchemaConditionBuilder() { - this(false); - } - public V1beta3FlowSchemaConditionBuilder(Boolean validationEnabled) { - this(new V1beta3FlowSchemaCondition(), validationEnabled); + this(new V1beta3FlowSchemaCondition()); } + public V1beta3FlowSchemaConditionBuilder(V1beta3FlowSchemaConditionFluent fluent) { - this(fluent, false); - } - public V1beta3FlowSchemaConditionBuilder(V1beta3FlowSchemaConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3FlowSchemaCondition(), validationEnabled); + this(fluent, new V1beta3FlowSchemaCondition()); } + public V1beta3FlowSchemaConditionBuilder(V1beta3FlowSchemaConditionFluent fluent,V1beta3FlowSchemaCondition instance) { - this(fluent, instance, false); - } - public V1beta3FlowSchemaConditionBuilder(V1beta3FlowSchemaConditionFluent fluent,V1beta3FlowSchemaCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3FlowSchemaConditionBuilder(V1beta3FlowSchemaCondition instance) { - this(instance,false); - } - public V1beta3FlowSchemaConditionBuilder(V1beta3FlowSchemaCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3FlowSchemaConditionFluent fluent; - Boolean validationEnabled; + public V1beta3FlowSchemaCondition build() { V1beta3FlowSchemaCondition buildable = new V1beta3FlowSchemaCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1beta3FlowSchemaCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionFluent.java index b62aa597c8..76e9d95de7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3FlowSchemaConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3FlowSchemaConditionFluent> extends BaseFluent{ + public V1beta3FlowSchemaConditionFluent() { + } + public V1beta3FlowSchemaConditionFluent(V1beta3FlowSchemaCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1beta3FlowSchemaCondition instance) { + instance = (instance != null ? instance : new V1beta3FlowSchemaCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3FlowSchemaConditionFluent that = (V1beta3FlowSchemaConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionFluentImpl.java deleted file mode 100644 index 43bd61b607..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3FlowSchemaConditionFluentImpl> extends BaseFluent implements V1beta3FlowSchemaConditionFluent{ - public V1beta3FlowSchemaConditionFluentImpl() { - } - public V1beta3FlowSchemaConditionFluentImpl(V1beta3FlowSchemaCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3FlowSchemaConditionFluentImpl that = (V1beta3FlowSchemaConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaFluent.java index c8dfee9579..9f45033036 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta3FlowSchemaFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1beta3FlowSchemaFluent.MetadataNested withNewMetadata(); - public V1beta3FlowSchemaFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1beta3FlowSchemaFluent.MetadataNested editMetadata(); - public V1beta3FlowSchemaFluent.MetadataNested editOrNewMetadata(); - public V1beta3FlowSchemaFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3FlowSchemaSpec getSpec(); - public V1beta3FlowSchemaSpec buildSpec(); - public A withSpec(V1beta3FlowSchemaSpec spec); - public Boolean hasSpec(); - public V1beta3FlowSchemaFluent.SpecNested withNewSpec(); - public V1beta3FlowSchemaFluent.SpecNested withNewSpecLike(V1beta3FlowSchemaSpec item); - public V1beta3FlowSchemaFluent.SpecNested editSpec(); - public V1beta3FlowSchemaFluent.SpecNested editOrNewSpec(); - public V1beta3FlowSchemaFluent.SpecNested editOrNewSpecLike(V1beta3FlowSchemaSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3FlowSchemaStatus getStatus(); - public V1beta3FlowSchemaStatus buildStatus(); - public A withStatus(V1beta3FlowSchemaStatus status); - public Boolean hasStatus(); - public V1beta3FlowSchemaFluent.StatusNested withNewStatus(); - public V1beta3FlowSchemaFluent.StatusNested withNewStatusLike(V1beta3FlowSchemaStatus item); - public V1beta3FlowSchemaFluent.StatusNested editStatus(); - public V1beta3FlowSchemaFluent.StatusNested editOrNewStatus(); - public V1beta3FlowSchemaFluent.StatusNested editOrNewStatusLike(V1beta3FlowSchemaStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3FlowSchemaFluent> extends BaseFluent{ + public V1beta3FlowSchemaFluent() { + } + + public V1beta3FlowSchemaFluent(V1beta3FlowSchema instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1beta3FlowSchemaSpecBuilder spec; + private V1beta3FlowSchemaStatusBuilder status; + + protected void copyInstance(V1beta3FlowSchema instance) { + instance = (instance != null ? instance : new V1beta3FlowSchema()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1beta3FlowSchemaSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1beta3FlowSchemaSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1beta3FlowSchemaSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1beta3FlowSchemaSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1beta3FlowSchemaSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1beta3FlowSchemaSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1beta3FlowSchemaSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1beta3FlowSchemaStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1beta3FlowSchemaStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1beta3FlowSchemaStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1beta3FlowSchemaStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1beta3FlowSchemaStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1beta3FlowSchemaStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3FlowSchemaFluent that = (V1beta3FlowSchemaFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1beta3FlowSchemaFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1beta3FlowSchemaStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1beta3FlowSchemaSpecFluent> implements Nested{ + SpecNested(V1beta3FlowSchemaSpec item) { + this.builder = new V1beta3FlowSchemaSpecBuilder(this, item); + } + V1beta3FlowSchemaSpecBuilder builder; + + public N and() { + return (N) V1beta3FlowSchemaFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1beta3FlowSchemaStatusFluent> implements Nested{ + StatusNested(V1beta3FlowSchemaStatus item) { + this.builder = new V1beta3FlowSchemaStatusBuilder(this, item); + } + V1beta3FlowSchemaStatusBuilder builder; + + public N and() { + return (N) V1beta3FlowSchemaFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaFluentImpl.java deleted file mode 100644 index 2235b36eeb..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3FlowSchemaFluentImpl> extends BaseFluent implements V1beta3FlowSchemaFluent{ - public V1beta3FlowSchemaFluentImpl() { - } - public V1beta3FlowSchemaFluentImpl(V1beta3FlowSchema instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1beta3FlowSchemaSpecBuilder spec; - private V1beta3FlowSchemaStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1beta3FlowSchemaFluentImpl.MetadataNested withNewMetadata() { - return new V1beta3FlowSchemaFluentImpl.MetadataNestedImpl(); - } - public V1beta3FlowSchemaFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1beta3FlowSchemaFluentImpl.MetadataNestedImpl(item); - } - public V1beta3FlowSchemaFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1beta3FlowSchemaFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1beta3FlowSchemaFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3FlowSchemaSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1beta3FlowSchemaSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1beta3FlowSchemaSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1beta3FlowSchemaSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1beta3FlowSchemaFluentImpl.SpecNested withNewSpec() { - return new V1beta3FlowSchemaFluentImpl.SpecNestedImpl(); - } - public V1beta3FlowSchemaFluentImpl.SpecNested withNewSpecLike(V1beta3FlowSchemaSpec item) { - return new V1beta3FlowSchemaFluentImpl.SpecNestedImpl(item); - } - public V1beta3FlowSchemaFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1beta3FlowSchemaFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1beta3FlowSchemaSpecBuilder().build()); - } - public V1beta3FlowSchemaFluentImpl.SpecNested editOrNewSpecLike(V1beta3FlowSchemaSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3FlowSchemaStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1beta3FlowSchemaStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1beta3FlowSchemaStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1beta3FlowSchemaStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1beta3FlowSchemaFluentImpl.StatusNested withNewStatus() { - return new V1beta3FlowSchemaFluentImpl.StatusNestedImpl(); - } - public V1beta3FlowSchemaFluentImpl.StatusNested withNewStatusLike(V1beta3FlowSchemaStatus item) { - return new V1beta3FlowSchemaFluentImpl.StatusNestedImpl(item); - } - public V1beta3FlowSchemaFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1beta3FlowSchemaFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1beta3FlowSchemaStatusBuilder().build()); - } - public V1beta3FlowSchemaFluentImpl.StatusNested editOrNewStatusLike(V1beta3FlowSchemaStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3FlowSchemaFluentImpl that = (V1beta3FlowSchemaFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1beta3FlowSchemaFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1beta3FlowSchemaFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1beta3FlowSchemaSpecFluentImpl> implements V1beta3FlowSchemaFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1beta3FlowSchemaSpec item) { - this.builder = new V1beta3FlowSchemaSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1beta3FlowSchemaSpecBuilder(this); - } - V1beta3FlowSchemaSpecBuilder builder; - public N and() { - return (N) V1beta3FlowSchemaFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1beta3FlowSchemaStatusFluentImpl> implements V1beta3FlowSchemaFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1beta3FlowSchemaStatus item) { - this.builder = new V1beta3FlowSchemaStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1beta3FlowSchemaStatusBuilder(this); - } - V1beta3FlowSchemaStatusBuilder builder; - public N and() { - return (N) V1beta3FlowSchemaFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListBuilder.java index 4db43269fb..14a6672393 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3FlowSchemaListBuilder extends V1beta3FlowSchemaListFluentImpl implements VisitableBuilder{ +public class V1beta3FlowSchemaListBuilder extends V1beta3FlowSchemaListFluent implements VisitableBuilder{ public V1beta3FlowSchemaListBuilder() { - this(false); - } - public V1beta3FlowSchemaListBuilder(Boolean validationEnabled) { - this(new V1beta3FlowSchemaList(), validationEnabled); + this(new V1beta3FlowSchemaList()); } + public V1beta3FlowSchemaListBuilder(V1beta3FlowSchemaListFluent fluent) { - this(fluent, false); - } - public V1beta3FlowSchemaListBuilder(V1beta3FlowSchemaListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3FlowSchemaList(), validationEnabled); + this(fluent, new V1beta3FlowSchemaList()); } + public V1beta3FlowSchemaListBuilder(V1beta3FlowSchemaListFluent fluent,V1beta3FlowSchemaList instance) { - this(fluent, instance, false); - } - public V1beta3FlowSchemaListBuilder(V1beta3FlowSchemaListFluent fluent,V1beta3FlowSchemaList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3FlowSchemaListBuilder(V1beta3FlowSchemaList instance) { - this(instance,false); - } - public V1beta3FlowSchemaListBuilder(V1beta3FlowSchemaList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3FlowSchemaListFluent fluent; - Boolean validationEnabled; + public V1beta3FlowSchemaList build() { V1beta3FlowSchemaList buildable = new V1beta3FlowSchemaList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListFluent.java index 19d266fe85..9e61fd4f56 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3FlowSchemaListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1beta3FlowSchema item); - public A setToItems(int index,V1beta3FlowSchema item); - public A addToItems(io.kubernetes.client.openapi.models.V1beta3FlowSchema... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1beta3FlowSchema... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1beta3FlowSchema buildItem(int index); - public V1beta3FlowSchema buildFirstItem(); - public V1beta3FlowSchema buildLastItem(); - public V1beta3FlowSchema buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1beta3FlowSchema... items); - public Boolean hasItems(); - public V1beta3FlowSchemaListFluent.ItemsNested addNewItem(); - public V1beta3FlowSchemaListFluent.ItemsNested addNewItemLike(V1beta3FlowSchema item); - public V1beta3FlowSchemaListFluent.ItemsNested setNewItemLike(int index,V1beta3FlowSchema item); - public V1beta3FlowSchemaListFluent.ItemsNested editItem(int index); - public V1beta3FlowSchemaListFluent.ItemsNested editFirstItem(); - public V1beta3FlowSchemaListFluent.ItemsNested editLastItem(); - public V1beta3FlowSchemaListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1beta3FlowSchemaListFluent.MetadataNested withNewMetadata(); - public V1beta3FlowSchemaListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1beta3FlowSchemaListFluent.MetadataNested editMetadata(); - public V1beta3FlowSchemaListFluent.MetadataNested editOrNewMetadata(); - public V1beta3FlowSchemaListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1beta3FlowSchemaFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3FlowSchemaListFluent> extends BaseFluent{ + public V1beta3FlowSchemaListFluent() { + } + + public V1beta3FlowSchemaListFluent(V1beta3FlowSchemaList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1beta3FlowSchemaList instance) { + instance = (instance != null ? instance : new V1beta3FlowSchemaList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1beta3FlowSchema item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1beta3FlowSchema item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1beta3FlowSchema... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta3FlowSchema item : items) {V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta3FlowSchema item : items) {V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1beta3FlowSchema... items) { + if (this.items == null) return (A)this; + for (V1beta3FlowSchema item : items) {V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1beta3FlowSchema item : items) {V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1beta3FlowSchemaBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1beta3FlowSchema buildItem(int index) { + return this.items.get(index).build(); + } + + public V1beta3FlowSchema buildFirstItem() { + return this.items.get(0).build(); + } + + public V1beta3FlowSchema buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1beta3FlowSchema buildMatchingItem(Predicate predicate) { + for (V1beta3FlowSchemaBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1beta3FlowSchemaBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1beta3FlowSchema item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1beta3FlowSchema... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1beta3FlowSchema item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1beta3FlowSchema item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1beta3FlowSchema item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3FlowSchemaListFluent that = (V1beta3FlowSchemaListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1beta3FlowSchemaFluent> implements Nested{ + ItemsNested(int index,V1beta3FlowSchema item) { + this.index = index; + this.builder = new V1beta3FlowSchemaBuilder(this, item); + } + V1beta3FlowSchemaBuilder builder; + int index; + public N and() { + return (N) V1beta3FlowSchemaListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1beta3FlowSchemaListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListFluentImpl.java deleted file mode 100644 index 54f830e77f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3FlowSchemaListFluentImpl> extends BaseFluent implements V1beta3FlowSchemaListFluent{ - public V1beta3FlowSchemaListFluentImpl() { - } - public V1beta3FlowSchemaListFluentImpl(V1beta3FlowSchemaList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1beta3FlowSchema item) { - if (this.items == null) {this.items = new ArrayList();} - V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1beta3FlowSchema item) { - if (this.items == null) {this.items = new ArrayList();} - V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1beta3FlowSchema... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1beta3FlowSchema item : items) {V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1beta3FlowSchema item : items) {V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1beta3FlowSchema... items) { - for (V1beta3FlowSchema item : items) {V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1beta3FlowSchema item : items) {V1beta3FlowSchemaBuilder builder = new V1beta3FlowSchemaBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1beta3FlowSchemaBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1beta3FlowSchema buildItem(int index) { - return this.items.get(index).build(); - } - public V1beta3FlowSchema buildFirstItem() { - return this.items.get(0).build(); - } - public V1beta3FlowSchema buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1beta3FlowSchema buildMatchingItem(Predicate predicate) { - for (V1beta3FlowSchemaBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1beta3FlowSchemaBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1beta3FlowSchema item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1beta3FlowSchema... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1beta3FlowSchema item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1beta3FlowSchemaListFluentImpl.ItemsNested addNewItem() { - return new V1beta3FlowSchemaListFluentImpl.ItemsNestedImpl(); - } - public V1beta3FlowSchemaListFluentImpl.ItemsNested addNewItemLike(V1beta3FlowSchema item) { - return new V1beta3FlowSchemaListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1beta3FlowSchemaListFluentImpl.ItemsNested setNewItemLike(int index,V1beta3FlowSchema item) { - return new V1beta3FlowSchemaListFluentImpl.ItemsNestedImpl(index, item); - } - public V1beta3FlowSchemaListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1beta3FlowSchemaListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1beta3FlowSchemaListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1beta3FlowSchemaListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1beta3FlowSchemaListFluentImpl.MetadataNestedImpl(); - } - public V1beta3FlowSchemaListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1beta3FlowSchemaListFluentImpl.MetadataNestedImpl(item); - } - public V1beta3FlowSchemaListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1beta3FlowSchemaListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1beta3FlowSchemaListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3FlowSchemaListFluentImpl that = (V1beta3FlowSchemaListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1beta3FlowSchemaFluentImpl> implements V1beta3FlowSchemaListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1beta3FlowSchema item) { - this.index = index; - this.builder = new V1beta3FlowSchemaBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1beta3FlowSchemaBuilder(this); - } - V1beta3FlowSchemaBuilder builder; - int index; - public N and() { - return (N) V1beta3FlowSchemaListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1beta3FlowSchemaListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1beta3FlowSchemaListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecBuilder.java index ced1cf78ef..30e727cff1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3FlowSchemaSpecBuilder extends V1beta3FlowSchemaSpecFluentImpl implements VisitableBuilder{ +public class V1beta3FlowSchemaSpecBuilder extends V1beta3FlowSchemaSpecFluent implements VisitableBuilder{ public V1beta3FlowSchemaSpecBuilder() { - this(false); - } - public V1beta3FlowSchemaSpecBuilder(Boolean validationEnabled) { - this(new V1beta3FlowSchemaSpec(), validationEnabled); + this(new V1beta3FlowSchemaSpec()); } + public V1beta3FlowSchemaSpecBuilder(V1beta3FlowSchemaSpecFluent fluent) { - this(fluent, false); - } - public V1beta3FlowSchemaSpecBuilder(V1beta3FlowSchemaSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3FlowSchemaSpec(), validationEnabled); + this(fluent, new V1beta3FlowSchemaSpec()); } + public V1beta3FlowSchemaSpecBuilder(V1beta3FlowSchemaSpecFluent fluent,V1beta3FlowSchemaSpec instance) { - this(fluent, instance, false); - } - public V1beta3FlowSchemaSpecBuilder(V1beta3FlowSchemaSpecFluent fluent,V1beta3FlowSchemaSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDistinguisherMethod(instance.getDistinguisherMethod()); - fluent.withMatchingPrecedence(instance.getMatchingPrecedence()); - fluent.withPriorityLevelConfiguration(instance.getPriorityLevelConfiguration()); - fluent.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3FlowSchemaSpecBuilder(V1beta3FlowSchemaSpec instance) { - this(instance,false); - } - public V1beta3FlowSchemaSpecBuilder(V1beta3FlowSchemaSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDistinguisherMethod(instance.getDistinguisherMethod()); - this.withMatchingPrecedence(instance.getMatchingPrecedence()); - this.withPriorityLevelConfiguration(instance.getPriorityLevelConfiguration()); - this.withRules(instance.getRules()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3FlowSchemaSpecFluent fluent; - Boolean validationEnabled; + public V1beta3FlowSchemaSpec build() { V1beta3FlowSchemaSpec buildable = new V1beta3FlowSchemaSpec(); - buildable.setDistinguisherMethod(fluent.getDistinguisherMethod()); + buildable.setDistinguisherMethod(fluent.buildDistinguisherMethod()); buildable.setMatchingPrecedence(fluent.getMatchingPrecedence()); - buildable.setPriorityLevelConfiguration(fluent.getPriorityLevelConfiguration()); - buildable.setRules(fluent.getRules()); + buildable.setPriorityLevelConfiguration(fluent.buildPriorityLevelConfiguration()); + buildable.setRules(fluent.buildRules()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecFluent.java index ff77697c80..db73faad0a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecFluent.java @@ -1,99 +1,363 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.lang.Integer; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta3FlowSchemaSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildDistinguisherMethod instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3FlowDistinguisherMethod getDistinguisherMethod(); - public V1beta3FlowDistinguisherMethod buildDistinguisherMethod(); - public A withDistinguisherMethod(V1beta3FlowDistinguisherMethod distinguisherMethod); - public Boolean hasDistinguisherMethod(); - public V1beta3FlowSchemaSpecFluent.DistinguisherMethodNested withNewDistinguisherMethod(); - public V1beta3FlowSchemaSpecFluent.DistinguisherMethodNested withNewDistinguisherMethodLike(V1beta3FlowDistinguisherMethod item); - public V1beta3FlowSchemaSpecFluent.DistinguisherMethodNested editDistinguisherMethod(); - public V1beta3FlowSchemaSpecFluent.DistinguisherMethodNested editOrNewDistinguisherMethod(); - public V1beta3FlowSchemaSpecFluent.DistinguisherMethodNested editOrNewDistinguisherMethodLike(V1beta3FlowDistinguisherMethod item); - public Integer getMatchingPrecedence(); - public A withMatchingPrecedence(Integer matchingPrecedence); - public Boolean hasMatchingPrecedence(); - - /** - * This method has been deprecated, please use method buildPriorityLevelConfiguration instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3PriorityLevelConfigurationReference getPriorityLevelConfiguration(); - public V1beta3PriorityLevelConfigurationReference buildPriorityLevelConfiguration(); - public A withPriorityLevelConfiguration(V1beta3PriorityLevelConfigurationReference priorityLevelConfiguration); - public Boolean hasPriorityLevelConfiguration(); - public V1beta3FlowSchemaSpecFluent.PriorityLevelConfigurationNested withNewPriorityLevelConfiguration(); - public V1beta3FlowSchemaSpecFluent.PriorityLevelConfigurationNested withNewPriorityLevelConfigurationLike(V1beta3PriorityLevelConfigurationReference item); - public V1beta3FlowSchemaSpecFluent.PriorityLevelConfigurationNested editPriorityLevelConfiguration(); - public V1beta3FlowSchemaSpecFluent.PriorityLevelConfigurationNested editOrNewPriorityLevelConfiguration(); - public V1beta3FlowSchemaSpecFluent.PriorityLevelConfigurationNested editOrNewPriorityLevelConfigurationLike(V1beta3PriorityLevelConfigurationReference item); - public A addToRules(int index,V1beta3PolicyRulesWithSubjects item); - public A setToRules(int index,V1beta3PolicyRulesWithSubjects item); - public A addToRules(io.kubernetes.client.openapi.models.V1beta3PolicyRulesWithSubjects... items); - public A addAllToRules(Collection items); - public A removeFromRules(io.kubernetes.client.openapi.models.V1beta3PolicyRulesWithSubjects... items); - public A removeAllFromRules(Collection items); - public A removeMatchingFromRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules(); - public List buildRules(); - public V1beta3PolicyRulesWithSubjects buildRule(int index); - public V1beta3PolicyRulesWithSubjects buildFirstRule(); - public V1beta3PolicyRulesWithSubjects buildLastRule(); - public V1beta3PolicyRulesWithSubjects buildMatchingRule(Predicate predicate); - public Boolean hasMatchingRule(Predicate predicate); - public A withRules(List rules); - public A withRules(io.kubernetes.client.openapi.models.V1beta3PolicyRulesWithSubjects... rules); - public Boolean hasRules(); - public V1beta3FlowSchemaSpecFluent.RulesNested addNewRule(); - public V1beta3FlowSchemaSpecFluent.RulesNested addNewRuleLike(V1beta3PolicyRulesWithSubjects item); - public V1beta3FlowSchemaSpecFluent.RulesNested setNewRuleLike(int index,V1beta3PolicyRulesWithSubjects item); - public V1beta3FlowSchemaSpecFluent.RulesNested editRule(int index); - public V1beta3FlowSchemaSpecFluent.RulesNested editFirstRule(); - public V1beta3FlowSchemaSpecFluent.RulesNested editLastRule(); - public V1beta3FlowSchemaSpecFluent.RulesNested editMatchingRule(Predicate predicate); - public interface DistinguisherMethodNested extends Nested,V1beta3FlowDistinguisherMethodFluent>{ - public N and(); - public N endDistinguisherMethod(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3FlowSchemaSpecFluent> extends BaseFluent{ + public V1beta3FlowSchemaSpecFluent() { + } + + public V1beta3FlowSchemaSpecFluent(V1beta3FlowSchemaSpec instance) { + this.copyInstance(instance); + } + private V1beta3FlowDistinguisherMethodBuilder distinguisherMethod; + private Integer matchingPrecedence; + private V1beta3PriorityLevelConfigurationReferenceBuilder priorityLevelConfiguration; + private ArrayList rules; + + protected void copyInstance(V1beta3FlowSchemaSpec instance) { + instance = (instance != null ? instance : new V1beta3FlowSchemaSpec()); + if (instance != null) { + this.withDistinguisherMethod(instance.getDistinguisherMethod()); + this.withMatchingPrecedence(instance.getMatchingPrecedence()); + this.withPriorityLevelConfiguration(instance.getPriorityLevelConfiguration()); + this.withRules(instance.getRules()); + } + } + + public V1beta3FlowDistinguisherMethod buildDistinguisherMethod() { + return this.distinguisherMethod != null ? this.distinguisherMethod.build() : null; + } + + public A withDistinguisherMethod(V1beta3FlowDistinguisherMethod distinguisherMethod) { + this._visitables.remove("distinguisherMethod"); + if (distinguisherMethod != null) { + this.distinguisherMethod = new V1beta3FlowDistinguisherMethodBuilder(distinguisherMethod); + this._visitables.get("distinguisherMethod").add(this.distinguisherMethod); + } else { + this.distinguisherMethod = null; + this._visitables.get("distinguisherMethod").remove(this.distinguisherMethod); + } + return (A) this; + } + + public boolean hasDistinguisherMethod() { + return this.distinguisherMethod != null; + } + + public DistinguisherMethodNested withNewDistinguisherMethod() { + return new DistinguisherMethodNested(null); + } + + public DistinguisherMethodNested withNewDistinguisherMethodLike(V1beta3FlowDistinguisherMethod item) { + return new DistinguisherMethodNested(item); + } + + public DistinguisherMethodNested editDistinguisherMethod() { + return withNewDistinguisherMethodLike(java.util.Optional.ofNullable(buildDistinguisherMethod()).orElse(null)); + } + + public DistinguisherMethodNested editOrNewDistinguisherMethod() { + return withNewDistinguisherMethodLike(java.util.Optional.ofNullable(buildDistinguisherMethod()).orElse(new V1beta3FlowDistinguisherMethodBuilder().build())); + } + + public DistinguisherMethodNested editOrNewDistinguisherMethodLike(V1beta3FlowDistinguisherMethod item) { + return withNewDistinguisherMethodLike(java.util.Optional.ofNullable(buildDistinguisherMethod()).orElse(item)); + } + + public Integer getMatchingPrecedence() { + return this.matchingPrecedence; + } + + public A withMatchingPrecedence(Integer matchingPrecedence) { + this.matchingPrecedence = matchingPrecedence; + return (A) this; + } + + public boolean hasMatchingPrecedence() { + return this.matchingPrecedence != null; + } + + public V1beta3PriorityLevelConfigurationReference buildPriorityLevelConfiguration() { + return this.priorityLevelConfiguration != null ? this.priorityLevelConfiguration.build() : null; + } + + public A withPriorityLevelConfiguration(V1beta3PriorityLevelConfigurationReference priorityLevelConfiguration) { + this._visitables.remove("priorityLevelConfiguration"); + if (priorityLevelConfiguration != null) { + this.priorityLevelConfiguration = new V1beta3PriorityLevelConfigurationReferenceBuilder(priorityLevelConfiguration); + this._visitables.get("priorityLevelConfiguration").add(this.priorityLevelConfiguration); + } else { + this.priorityLevelConfiguration = null; + this._visitables.get("priorityLevelConfiguration").remove(this.priorityLevelConfiguration); + } + return (A) this; + } + + public boolean hasPriorityLevelConfiguration() { + return this.priorityLevelConfiguration != null; + } + + public PriorityLevelConfigurationNested withNewPriorityLevelConfiguration() { + return new PriorityLevelConfigurationNested(null); + } + + public PriorityLevelConfigurationNested withNewPriorityLevelConfigurationLike(V1beta3PriorityLevelConfigurationReference item) { + return new PriorityLevelConfigurationNested(item); + } + + public PriorityLevelConfigurationNested editPriorityLevelConfiguration() { + return withNewPriorityLevelConfigurationLike(java.util.Optional.ofNullable(buildPriorityLevelConfiguration()).orElse(null)); + } + + public PriorityLevelConfigurationNested editOrNewPriorityLevelConfiguration() { + return withNewPriorityLevelConfigurationLike(java.util.Optional.ofNullable(buildPriorityLevelConfiguration()).orElse(new V1beta3PriorityLevelConfigurationReferenceBuilder().build())); + } + + public PriorityLevelConfigurationNested editOrNewPriorityLevelConfigurationLike(V1beta3PriorityLevelConfigurationReference item) { + return withNewPriorityLevelConfigurationLike(java.util.Optional.ofNullable(buildPriorityLevelConfiguration()).orElse(item)); + } + + public A addToRules(int index,V1beta3PolicyRulesWithSubjects item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} + return (A)this; + } + + public A setToRules(int index,V1beta3PolicyRulesWithSubjects item) { + if (this.rules == null) {this.rules = new ArrayList();} + V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item); + if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} + return (A)this; + } + + public A addToRules(io.kubernetes.client.openapi.models.V1beta3PolicyRulesWithSubjects... items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1beta3PolicyRulesWithSubjects item : items) {V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; + } + + public A addAllToRules(Collection items) { + if (this.rules == null) {this.rules = new ArrayList();} + for (V1beta3PolicyRulesWithSubjects item : items) {V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; } - public interface PriorityLevelConfigurationNested extends Nested,V1beta3PriorityLevelConfigurationReferenceFluent>{ - public N and(); - public N endPriorityLevelConfiguration(); + + public A removeFromRules(io.kubernetes.client.openapi.models.V1beta3PolicyRulesWithSubjects... items) { + if (this.rules == null) return (A)this; + for (V1beta3PolicyRulesWithSubjects item : items) {V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeAllFromRules(Collection items) { + if (this.rules == null) return (A)this; + for (V1beta3PolicyRulesWithSubjects item : items) {V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").remove(builder); this.rules.remove(builder);} return (A)this; + } + + public A removeMatchingFromRules(Predicate predicate) { + if (rules == null) return (A) this; + final Iterator each = rules.iterator(); + final List visitables = _visitables.get("rules"); + while (each.hasNext()) { + V1beta3PolicyRulesWithSubjectsBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildRules() { + return this.rules != null ? build(rules) : null; + } + + public V1beta3PolicyRulesWithSubjects buildRule(int index) { + return this.rules.get(index).build(); + } + + public V1beta3PolicyRulesWithSubjects buildFirstRule() { + return this.rules.get(0).build(); + } + + public V1beta3PolicyRulesWithSubjects buildLastRule() { + return this.rules.get(rules.size() - 1).build(); + } + + public V1beta3PolicyRulesWithSubjects buildMatchingRule(Predicate predicate) { + for (V1beta3PolicyRulesWithSubjectsBuilder item : rules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingRule(Predicate predicate) { + for (V1beta3PolicyRulesWithSubjectsBuilder item : rules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withRules(List rules) { + if (this.rules != null) { + this._visitables.get("rules").clear(); + } + if (rules != null) { + this.rules = new ArrayList(); + for (V1beta3PolicyRulesWithSubjects item : rules) { + this.addToRules(item); + } + } else { + this.rules = null; + } + return (A) this; + } + + public A withRules(io.kubernetes.client.openapi.models.V1beta3PolicyRulesWithSubjects... rules) { + if (this.rules != null) { + this.rules.clear(); + _visitables.remove("rules"); + } + if (rules != null) { + for (V1beta3PolicyRulesWithSubjects item : rules) { + this.addToRules(item); + } + } + return (A) this; + } + + public boolean hasRules() { + return this.rules != null && !this.rules.isEmpty(); + } + + public RulesNested addNewRule() { + return new RulesNested(-1, null); + } + + public RulesNested addNewRuleLike(V1beta3PolicyRulesWithSubjects item) { + return new RulesNested(-1, item); + } + + public RulesNested setNewRuleLike(int index,V1beta3PolicyRulesWithSubjects item) { + return new RulesNested(index, item); + } + + public RulesNested editRule(int index) { + if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editFirstRule() { + if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); + return setNewRuleLike(0, buildRule(0)); + } + + public RulesNested editLastRule() { + int index = rules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); + return setNewRuleLike(index, buildRule(index)); + } + + public RulesNested editMatchingRule(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta3FlowDistinguisherMethodFluent> implements Nested{ + DistinguisherMethodNested(V1beta3FlowDistinguisherMethod item) { + this.builder = new V1beta3FlowDistinguisherMethodBuilder(this, item); + } + V1beta3FlowDistinguisherMethodBuilder builder; + + public N and() { + return (N) V1beta3FlowSchemaSpecFluent.this.withDistinguisherMethod(builder.build()); + } + + public N endDistinguisherMethod() { + return and(); + } + } - public interface RulesNested extends Nested,V1beta3PolicyRulesWithSubjectsFluent>{ - public N and(); - public N endRule(); + public class PriorityLevelConfigurationNested extends V1beta3PriorityLevelConfigurationReferenceFluent> implements Nested{ + PriorityLevelConfigurationNested(V1beta3PriorityLevelConfigurationReference item) { + this.builder = new V1beta3PriorityLevelConfigurationReferenceBuilder(this, item); + } + V1beta3PriorityLevelConfigurationReferenceBuilder builder; + + public N and() { + return (N) V1beta3FlowSchemaSpecFluent.this.withPriorityLevelConfiguration(builder.build()); + } + + public N endPriorityLevelConfiguration() { + return and(); + } + } + public class RulesNested extends V1beta3PolicyRulesWithSubjectsFluent> implements Nested{ + RulesNested(int index,V1beta3PolicyRulesWithSubjects item) { + this.index = index; + this.builder = new V1beta3PolicyRulesWithSubjectsBuilder(this, item); + } + V1beta3PolicyRulesWithSubjectsBuilder builder; + int index; + + public N and() { + return (N) V1beta3FlowSchemaSpecFluent.this.setToRules(index,builder.build()); + } + + public N endRule() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecFluentImpl.java deleted file mode 100644 index da20559fa6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaSpecFluentImpl.java +++ /dev/null @@ -1,301 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3FlowSchemaSpecFluentImpl> extends BaseFluent implements V1beta3FlowSchemaSpecFluent{ - public V1beta3FlowSchemaSpecFluentImpl() { - } - public V1beta3FlowSchemaSpecFluentImpl(V1beta3FlowSchemaSpec instance) { - if (instance != null) { - this.withDistinguisherMethod(instance.getDistinguisherMethod()); - this.withMatchingPrecedence(instance.getMatchingPrecedence()); - this.withPriorityLevelConfiguration(instance.getPriorityLevelConfiguration()); - this.withRules(instance.getRules()); - } - } - private V1beta3FlowDistinguisherMethodBuilder distinguisherMethod; - private Integer matchingPrecedence; - private V1beta3PriorityLevelConfigurationReferenceBuilder priorityLevelConfiguration; - private ArrayList rules; - - /** - * This method has been deprecated, please use method buildDistinguisherMethod instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3FlowDistinguisherMethod getDistinguisherMethod() { - return this.distinguisherMethod!=null ?this.distinguisherMethod.build():null; - } - public V1beta3FlowDistinguisherMethod buildDistinguisherMethod() { - return this.distinguisherMethod!=null ?this.distinguisherMethod.build():null; - } - public A withDistinguisherMethod(V1beta3FlowDistinguisherMethod distinguisherMethod) { - _visitables.get("distinguisherMethod").remove(this.distinguisherMethod); - if (distinguisherMethod!=null){ this.distinguisherMethod= new V1beta3FlowDistinguisherMethodBuilder(distinguisherMethod); _visitables.get("distinguisherMethod").add(this.distinguisherMethod);} else { this.distinguisherMethod = null; _visitables.get("distinguisherMethod").remove(this.distinguisherMethod); } return (A) this; - } - public Boolean hasDistinguisherMethod() { - return this.distinguisherMethod != null; - } - public V1beta3FlowSchemaSpecFluentImpl.DistinguisherMethodNested withNewDistinguisherMethod() { - return new V1beta3FlowSchemaSpecFluentImpl.DistinguisherMethodNestedImpl(); - } - public V1beta3FlowSchemaSpecFluentImpl.DistinguisherMethodNested withNewDistinguisherMethodLike(V1beta3FlowDistinguisherMethod item) { - return new V1beta3FlowSchemaSpecFluentImpl.DistinguisherMethodNestedImpl(item); - } - public V1beta3FlowSchemaSpecFluentImpl.DistinguisherMethodNested editDistinguisherMethod() { - return withNewDistinguisherMethodLike(getDistinguisherMethod()); - } - public V1beta3FlowSchemaSpecFluentImpl.DistinguisherMethodNested editOrNewDistinguisherMethod() { - return withNewDistinguisherMethodLike(getDistinguisherMethod() != null ? getDistinguisherMethod(): new V1beta3FlowDistinguisherMethodBuilder().build()); - } - public V1beta3FlowSchemaSpecFluentImpl.DistinguisherMethodNested editOrNewDistinguisherMethodLike(V1beta3FlowDistinguisherMethod item) { - return withNewDistinguisherMethodLike(getDistinguisherMethod() != null ? getDistinguisherMethod(): item); - } - public Integer getMatchingPrecedence() { - return this.matchingPrecedence; - } - public A withMatchingPrecedence(Integer matchingPrecedence) { - this.matchingPrecedence=matchingPrecedence; return (A) this; - } - public Boolean hasMatchingPrecedence() { - return this.matchingPrecedence != null; - } - - /** - * This method has been deprecated, please use method buildPriorityLevelConfiguration instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3PriorityLevelConfigurationReference getPriorityLevelConfiguration() { - return this.priorityLevelConfiguration!=null ?this.priorityLevelConfiguration.build():null; - } - public V1beta3PriorityLevelConfigurationReference buildPriorityLevelConfiguration() { - return this.priorityLevelConfiguration!=null ?this.priorityLevelConfiguration.build():null; - } - public A withPriorityLevelConfiguration(V1beta3PriorityLevelConfigurationReference priorityLevelConfiguration) { - _visitables.get("priorityLevelConfiguration").remove(this.priorityLevelConfiguration); - if (priorityLevelConfiguration!=null){ this.priorityLevelConfiguration= new V1beta3PriorityLevelConfigurationReferenceBuilder(priorityLevelConfiguration); _visitables.get("priorityLevelConfiguration").add(this.priorityLevelConfiguration);} else { this.priorityLevelConfiguration = null; _visitables.get("priorityLevelConfiguration").remove(this.priorityLevelConfiguration); } return (A) this; - } - public Boolean hasPriorityLevelConfiguration() { - return this.priorityLevelConfiguration != null; - } - public V1beta3FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested withNewPriorityLevelConfiguration() { - return new V1beta3FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNestedImpl(); - } - public V1beta3FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested withNewPriorityLevelConfigurationLike(V1beta3PriorityLevelConfigurationReference item) { - return new V1beta3FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNestedImpl(item); - } - public V1beta3FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested editPriorityLevelConfiguration() { - return withNewPriorityLevelConfigurationLike(getPriorityLevelConfiguration()); - } - public V1beta3FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested editOrNewPriorityLevelConfiguration() { - return withNewPriorityLevelConfigurationLike(getPriorityLevelConfiguration() != null ? getPriorityLevelConfiguration(): new V1beta3PriorityLevelConfigurationReferenceBuilder().build()); - } - public V1beta3FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested editOrNewPriorityLevelConfigurationLike(V1beta3PriorityLevelConfigurationReference item) { - return withNewPriorityLevelConfigurationLike(getPriorityLevelConfiguration() != null ? getPriorityLevelConfiguration(): item); - } - public A addToRules(int index,V1beta3PolicyRulesWithSubjects item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").add(index, builder); rules.add(index, builder);} - return (A)this; - } - public A setToRules(int index,V1beta3PolicyRulesWithSubjects item) { - if (this.rules == null) {this.rules = new ArrayList();} - V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item); - if (index < 0 || index >= rules.size()) { _visitables.get("rules").add(builder); rules.add(builder); } else { _visitables.get("rules").set(index, builder); rules.set(index, builder);} - return (A)this; - } - public A addToRules(io.kubernetes.client.openapi.models.V1beta3PolicyRulesWithSubjects... items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1beta3PolicyRulesWithSubjects item : items) {V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A addAllToRules(Collection items) { - if (this.rules == null) {this.rules = new ArrayList();} - for (V1beta3PolicyRulesWithSubjects item : items) {V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").add(builder);this.rules.add(builder);} return (A)this; - } - public A removeFromRules(io.kubernetes.client.openapi.models.V1beta3PolicyRulesWithSubjects... items) { - for (V1beta3PolicyRulesWithSubjects item : items) {V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeAllFromRules(Collection items) { - for (V1beta3PolicyRulesWithSubjects item : items) {V1beta3PolicyRulesWithSubjectsBuilder builder = new V1beta3PolicyRulesWithSubjectsBuilder(item);_visitables.get("rules").remove(builder);if (this.rules != null) {this.rules.remove(builder);}} return (A)this; - } - public A removeMatchingFromRules(Predicate predicate) { - if (rules == null) return (A) this; - final Iterator each = rules.iterator(); - final List visitables = _visitables.get("rules"); - while (each.hasNext()) { - V1beta3PolicyRulesWithSubjectsBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildRules instead. - * @return The buildable object. - */ - @Deprecated - public List getRules() { - return rules != null ? build(rules) : null; - } - public List buildRules() { - return rules != null ? build(rules) : null; - } - public V1beta3PolicyRulesWithSubjects buildRule(int index) { - return this.rules.get(index).build(); - } - public V1beta3PolicyRulesWithSubjects buildFirstRule() { - return this.rules.get(0).build(); - } - public V1beta3PolicyRulesWithSubjects buildLastRule() { - return this.rules.get(rules.size() - 1).build(); - } - public V1beta3PolicyRulesWithSubjects buildMatchingRule(Predicate predicate) { - for (V1beta3PolicyRulesWithSubjectsBuilder item: rules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingRule(Predicate predicate) { - for (V1beta3PolicyRulesWithSubjectsBuilder item: rules) { if(predicate.test(item)){ return true;} } return false; - } - public A withRules(List rules) { - if (this.rules != null) { _visitables.get("rules").clear();} - if (rules != null) {this.rules = new ArrayList(); for (V1beta3PolicyRulesWithSubjects item : rules){this.addToRules(item);}} else { this.rules = null;} return (A) this; - } - public A withRules(io.kubernetes.client.openapi.models.V1beta3PolicyRulesWithSubjects... rules) { - if (this.rules != null) {this.rules.clear(); _visitables.remove("rules"); } - if (rules != null) {for (V1beta3PolicyRulesWithSubjects item :rules){ this.addToRules(item);}} return (A) this; - } - public Boolean hasRules() { - return rules != null && !rules.isEmpty(); - } - public V1beta3FlowSchemaSpecFluentImpl.RulesNested addNewRule() { - return new V1beta3FlowSchemaSpecFluentImpl.RulesNestedImpl(); - } - public V1beta3FlowSchemaSpecFluentImpl.RulesNested addNewRuleLike(V1beta3PolicyRulesWithSubjects item) { - return new V1beta3FlowSchemaSpecFluentImpl.RulesNestedImpl(-1, item); - } - public V1beta3FlowSchemaSpecFluentImpl.RulesNested setNewRuleLike(int index,V1beta3PolicyRulesWithSubjects item) { - return new V1beta3FlowSchemaSpecFluentImpl.RulesNestedImpl(index, item); - } - public V1beta3FlowSchemaSpecFluentImpl.RulesNested editRule(int index) { - if (rules.size() <= index) throw new RuntimeException("Can't edit rules. Index exceeds size."); - return setNewRuleLike(index, buildRule(index)); - } - public V1beta3FlowSchemaSpecFluentImpl.RulesNested editFirstRule() { - if (rules.size() == 0) throw new RuntimeException("Can't edit first rules. The list is empty."); - return setNewRuleLike(0, buildRule(0)); - } - public V1beta3FlowSchemaSpecFluentImpl.RulesNested editLastRule() { - int index = rules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last rules. The list is empty."); - return setNewRuleLike(index, buildRule(index)); - } - public V1beta3FlowSchemaSpecFluentImpl.RulesNested editMatchingRule(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1beta3FlowDistinguisherMethodFluentImpl> implements V1beta3FlowSchemaSpecFluentImpl.DistinguisherMethodNested,Nested{ - DistinguisherMethodNestedImpl(V1beta3FlowDistinguisherMethod item) { - this.builder = new V1beta3FlowDistinguisherMethodBuilder(this, item); - } - DistinguisherMethodNestedImpl() { - this.builder = new V1beta3FlowDistinguisherMethodBuilder(this); - } - V1beta3FlowDistinguisherMethodBuilder builder; - public N and() { - return (N) V1beta3FlowSchemaSpecFluentImpl.this.withDistinguisherMethod(builder.build()); - } - public N endDistinguisherMethod() { - return and(); - } - - } - class PriorityLevelConfigurationNestedImpl extends V1beta3PriorityLevelConfigurationReferenceFluentImpl> implements V1beta3FlowSchemaSpecFluentImpl.PriorityLevelConfigurationNested,Nested{ - PriorityLevelConfigurationNestedImpl(V1beta3PriorityLevelConfigurationReference item) { - this.builder = new V1beta3PriorityLevelConfigurationReferenceBuilder(this, item); - } - PriorityLevelConfigurationNestedImpl() { - this.builder = new V1beta3PriorityLevelConfigurationReferenceBuilder(this); - } - V1beta3PriorityLevelConfigurationReferenceBuilder builder; - public N and() { - return (N) V1beta3FlowSchemaSpecFluentImpl.this.withPriorityLevelConfiguration(builder.build()); - } - public N endPriorityLevelConfiguration() { - return and(); - } - - } - class RulesNestedImpl extends V1beta3PolicyRulesWithSubjectsFluentImpl> implements V1beta3FlowSchemaSpecFluentImpl.RulesNested,Nested{ - RulesNestedImpl(int index,V1beta3PolicyRulesWithSubjects item) { - this.index = index; - this.builder = new V1beta3PolicyRulesWithSubjectsBuilder(this, item); - } - RulesNestedImpl() { - this.index = -1; - this.builder = new V1beta3PolicyRulesWithSubjectsBuilder(this); - } - V1beta3PolicyRulesWithSubjectsBuilder builder; - int index; - public N and() { - return (N) V1beta3FlowSchemaSpecFluentImpl.this.setToRules(index,builder.build()); - } - public N endRule() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusBuilder.java index 691e073365..def63219cd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3FlowSchemaStatusBuilder extends V1beta3FlowSchemaStatusFluentImpl implements VisitableBuilder{ +public class V1beta3FlowSchemaStatusBuilder extends V1beta3FlowSchemaStatusFluent implements VisitableBuilder{ public V1beta3FlowSchemaStatusBuilder() { - this(false); - } - public V1beta3FlowSchemaStatusBuilder(Boolean validationEnabled) { - this(new V1beta3FlowSchemaStatus(), validationEnabled); + this(new V1beta3FlowSchemaStatus()); } + public V1beta3FlowSchemaStatusBuilder(V1beta3FlowSchemaStatusFluent fluent) { - this(fluent, false); - } - public V1beta3FlowSchemaStatusBuilder(V1beta3FlowSchemaStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3FlowSchemaStatus(), validationEnabled); + this(fluent, new V1beta3FlowSchemaStatus()); } + public V1beta3FlowSchemaStatusBuilder(V1beta3FlowSchemaStatusFluent fluent,V1beta3FlowSchemaStatus instance) { - this(fluent, instance, false); - } - public V1beta3FlowSchemaStatusBuilder(V1beta3FlowSchemaStatusFluent fluent,V1beta3FlowSchemaStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3FlowSchemaStatusBuilder(V1beta3FlowSchemaStatus instance) { - this(instance,false); - } - public V1beta3FlowSchemaStatusBuilder(V1beta3FlowSchemaStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3FlowSchemaStatusFluent fluent; - Boolean validationEnabled; + public V1beta3FlowSchemaStatus build() { V1beta3FlowSchemaStatus buildable = new V1beta3FlowSchemaStatus(); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusFluent.java index 26a1f87f18..c559fbb28d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3FlowSchemaStatusFluent> extends Fluent{ - public A addToConditions(int index,V1beta3FlowSchemaCondition item); - public A setToConditions(int index,V1beta3FlowSchemaCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1beta3FlowSchemaCondition buildCondition(int index); - public V1beta3FlowSchemaCondition buildFirstCondition(); - public V1beta3FlowSchemaCondition buildLastCondition(); - public V1beta3FlowSchemaCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition... conditions); - public Boolean hasConditions(); - public V1beta3FlowSchemaStatusFluent.ConditionsNested addNewCondition(); - public V1beta3FlowSchemaStatusFluent.ConditionsNested addNewConditionLike(V1beta3FlowSchemaCondition item); - public V1beta3FlowSchemaStatusFluent.ConditionsNested setNewConditionLike(int index,V1beta3FlowSchemaCondition item); - public V1beta3FlowSchemaStatusFluent.ConditionsNested editCondition(int index); - public V1beta3FlowSchemaStatusFluent.ConditionsNested editFirstCondition(); - public V1beta3FlowSchemaStatusFluent.ConditionsNested editLastCondition(); - public V1beta3FlowSchemaStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public interface ConditionsNested extends Nested,V1beta3FlowSchemaConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3FlowSchemaStatusFluent> extends BaseFluent{ + public V1beta3FlowSchemaStatusFluent() { + } + + public V1beta3FlowSchemaStatusFluent(V1beta3FlowSchemaStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + + protected void copyInstance(V1beta3FlowSchemaStatus instance) { + instance = (instance != null ? instance : new V1beta3FlowSchemaStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + } + } + + public A addToConditions(int index,V1beta3FlowSchemaCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1beta3FlowSchemaCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1beta3FlowSchemaCondition item : items) {V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1beta3FlowSchemaCondition item : items) {V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition... items) { + if (this.conditions == null) return (A)this; + for (V1beta3FlowSchemaCondition item : items) {V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1beta3FlowSchemaCondition item : items) {V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1beta3FlowSchemaConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1beta3FlowSchemaCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1beta3FlowSchemaCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1beta3FlowSchemaCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1beta3FlowSchemaCondition buildMatchingCondition(Predicate predicate) { + for (V1beta3FlowSchemaConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1beta3FlowSchemaConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1beta3FlowSchemaCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1beta3FlowSchemaCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1beta3FlowSchemaCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1beta3FlowSchemaCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta3FlowSchemaConditionFluent> implements Nested{ + ConditionsNested(int index,V1beta3FlowSchemaCondition item) { + this.index = index; + this.builder = new V1beta3FlowSchemaConditionBuilder(this, item); + } + V1beta3FlowSchemaConditionBuilder builder; + int index; + + public N and() { + return (N) V1beta3FlowSchemaStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusFluentImpl.java deleted file mode 100644 index e1230bf845..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3FlowSchemaStatusFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3FlowSchemaStatusFluentImpl> extends BaseFluent implements V1beta3FlowSchemaStatusFluent{ - public V1beta3FlowSchemaStatusFluentImpl() { - } - public V1beta3FlowSchemaStatusFluentImpl(V1beta3FlowSchemaStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - } - } - private ArrayList conditions; - public A addToConditions(int index,V1beta3FlowSchemaCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1beta3FlowSchemaCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1beta3FlowSchemaCondition item : items) {V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1beta3FlowSchemaCondition item : items) {V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition... items) { - for (V1beta3FlowSchemaCondition item : items) {V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1beta3FlowSchemaCondition item : items) {V1beta3FlowSchemaConditionBuilder builder = new V1beta3FlowSchemaConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1beta3FlowSchemaConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1beta3FlowSchemaCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1beta3FlowSchemaCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1beta3FlowSchemaCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1beta3FlowSchemaCondition buildMatchingCondition(Predicate predicate) { - for (V1beta3FlowSchemaConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1beta3FlowSchemaConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1beta3FlowSchemaCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1beta3FlowSchemaCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1beta3FlowSchemaCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1beta3FlowSchemaStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1beta3FlowSchemaStatusFluentImpl.ConditionsNestedImpl(); - } - public V1beta3FlowSchemaStatusFluentImpl.ConditionsNested addNewConditionLike(V1beta3FlowSchemaCondition item) { - return new V1beta3FlowSchemaStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1beta3FlowSchemaStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1beta3FlowSchemaCondition item) { - return new V1beta3FlowSchemaStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1beta3FlowSchemaStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1beta3FlowSchemaStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1beta3FlowSchemaStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1beta3FlowSchemaStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1beta3FlowSchemaConditionFluentImpl> implements V1beta3FlowSchemaStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1beta3FlowSchemaCondition item) { - this.index = index; - this.builder = new V1beta3FlowSchemaConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1beta3FlowSchemaConditionBuilder(this); - } - V1beta3FlowSchemaConditionBuilder builder; - int index; - public N and() { - return (N) V1beta3FlowSchemaStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectBuilder.java index e0b936b734..2c8829d9e4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3GroupSubjectBuilder extends V1beta3GroupSubjectFluentImpl implements VisitableBuilder{ +public class V1beta3GroupSubjectBuilder extends V1beta3GroupSubjectFluent implements VisitableBuilder{ public V1beta3GroupSubjectBuilder() { - this(false); - } - public V1beta3GroupSubjectBuilder(Boolean validationEnabled) { - this(new V1beta3GroupSubject(), validationEnabled); + this(new V1beta3GroupSubject()); } + public V1beta3GroupSubjectBuilder(V1beta3GroupSubjectFluent fluent) { - this(fluent, false); - } - public V1beta3GroupSubjectBuilder(V1beta3GroupSubjectFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3GroupSubject(), validationEnabled); + this(fluent, new V1beta3GroupSubject()); } + public V1beta3GroupSubjectBuilder(V1beta3GroupSubjectFluent fluent,V1beta3GroupSubject instance) { - this(fluent, instance, false); - } - public V1beta3GroupSubjectBuilder(V1beta3GroupSubjectFluent fluent,V1beta3GroupSubject instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3GroupSubjectBuilder(V1beta3GroupSubject instance) { - this(instance,false); - } - public V1beta3GroupSubjectBuilder(V1beta3GroupSubject instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3GroupSubjectFluent fluent; - Boolean validationEnabled; + public V1beta3GroupSubject build() { V1beta3GroupSubject buildable = new V1beta3GroupSubject(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectFluent.java index 162c9d5596..696e0db0eb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3GroupSubjectFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3GroupSubjectFluent> extends BaseFluent{ + public V1beta3GroupSubjectFluent() { + } + public V1beta3GroupSubjectFluent(V1beta3GroupSubject instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1beta3GroupSubject instance) { + instance = (instance != null ? instance : new V1beta3GroupSubject()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3GroupSubjectFluent that = (V1beta3GroupSubjectFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectFluentImpl.java deleted file mode 100644 index 8c7d3cd40e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3GroupSubjectFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3GroupSubjectFluentImpl> extends BaseFluent implements V1beta3GroupSubjectFluent{ - public V1beta3GroupSubjectFluentImpl() { - } - public V1beta3GroupSubjectFluentImpl(V1beta3GroupSubject instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3GroupSubjectFluentImpl that = (V1beta3GroupSubjectFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseBuilder.java index 60fdd7e869..b743862129 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3LimitResponseBuilder extends V1beta3LimitResponseFluentImpl implements VisitableBuilder{ +public class V1beta3LimitResponseBuilder extends V1beta3LimitResponseFluent implements VisitableBuilder{ public V1beta3LimitResponseBuilder() { - this(false); - } - public V1beta3LimitResponseBuilder(Boolean validationEnabled) { - this(new V1beta3LimitResponse(), validationEnabled); + this(new V1beta3LimitResponse()); } + public V1beta3LimitResponseBuilder(V1beta3LimitResponseFluent fluent) { - this(fluent, false); - } - public V1beta3LimitResponseBuilder(V1beta3LimitResponseFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3LimitResponse(), validationEnabled); + this(fluent, new V1beta3LimitResponse()); } + public V1beta3LimitResponseBuilder(V1beta3LimitResponseFluent fluent,V1beta3LimitResponse instance) { - this(fluent, instance, false); - } - public V1beta3LimitResponseBuilder(V1beta3LimitResponseFluent fluent,V1beta3LimitResponse instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withQueuing(instance.getQueuing()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3LimitResponseBuilder(V1beta3LimitResponse instance) { - this(instance,false); - } - public V1beta3LimitResponseBuilder(V1beta3LimitResponse instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withQueuing(instance.getQueuing()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3LimitResponseFluent fluent; - Boolean validationEnabled; + public V1beta3LimitResponse build() { V1beta3LimitResponse buildable = new V1beta3LimitResponse(); - buildable.setQueuing(fluent.getQueuing()); + buildable.setQueuing(fluent.buildQueuing()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseFluent.java index 8a9df02176..d4d166a3a9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3LimitResponseFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildQueuing instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3QueuingConfiguration getQueuing(); - public V1beta3QueuingConfiguration buildQueuing(); - public A withQueuing(V1beta3QueuingConfiguration queuing); - public Boolean hasQueuing(); - public V1beta3LimitResponseFluent.QueuingNested withNewQueuing(); - public V1beta3LimitResponseFluent.QueuingNested withNewQueuingLike(V1beta3QueuingConfiguration item); - public V1beta3LimitResponseFluent.QueuingNested editQueuing(); - public V1beta3LimitResponseFluent.QueuingNested editOrNewQueuing(); - public V1beta3LimitResponseFluent.QueuingNested editOrNewQueuingLike(V1beta3QueuingConfiguration item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface QueuingNested extends Nested,V1beta3QueuingConfigurationFluent>{ - public N and(); - public N endQueuing(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3LimitResponseFluent> extends BaseFluent{ + public V1beta3LimitResponseFluent() { + } + + public V1beta3LimitResponseFluent(V1beta3LimitResponse instance) { + this.copyInstance(instance); + } + private V1beta3QueuingConfigurationBuilder queuing; + private String type; + + protected void copyInstance(V1beta3LimitResponse instance) { + instance = (instance != null ? instance : new V1beta3LimitResponse()); + if (instance != null) { + this.withQueuing(instance.getQueuing()); + this.withType(instance.getType()); + } + } + + public V1beta3QueuingConfiguration buildQueuing() { + return this.queuing != null ? this.queuing.build() : null; + } + + public A withQueuing(V1beta3QueuingConfiguration queuing) { + this._visitables.remove("queuing"); + if (queuing != null) { + this.queuing = new V1beta3QueuingConfigurationBuilder(queuing); + this._visitables.get("queuing").add(this.queuing); + } else { + this.queuing = null; + this._visitables.get("queuing").remove(this.queuing); + } + return (A) this; + } + + public boolean hasQueuing() { + return this.queuing != null; + } + + public QueuingNested withNewQueuing() { + return new QueuingNested(null); + } + + public QueuingNested withNewQueuingLike(V1beta3QueuingConfiguration item) { + return new QueuingNested(item); + } + + public QueuingNested editQueuing() { + return withNewQueuingLike(java.util.Optional.ofNullable(buildQueuing()).orElse(null)); + } + + public QueuingNested editOrNewQueuing() { + return withNewQueuingLike(java.util.Optional.ofNullable(buildQueuing()).orElse(new V1beta3QueuingConfigurationBuilder().build())); } + public QueuingNested editOrNewQueuingLike(V1beta3QueuingConfiguration item) { + return withNewQueuingLike(java.util.Optional.ofNullable(buildQueuing()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3LimitResponseFluent that = (V1beta3LimitResponseFluent) o; + if (!java.util.Objects.equals(queuing, that.queuing)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(queuing, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (queuing != null) { sb.append("queuing:"); sb.append(queuing + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class QueuingNested extends V1beta3QueuingConfigurationFluent> implements Nested{ + QueuingNested(V1beta3QueuingConfiguration item) { + this.builder = new V1beta3QueuingConfigurationBuilder(this, item); + } + V1beta3QueuingConfigurationBuilder builder; + + public N and() { + return (N) V1beta3LimitResponseFluent.this.withQueuing(builder.build()); + } + + public N endQueuing() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseFluentImpl.java deleted file mode 100644 index a0879fe49c..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitResponseFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3LimitResponseFluentImpl> extends BaseFluent implements V1beta3LimitResponseFluent{ - public V1beta3LimitResponseFluentImpl() { - } - public V1beta3LimitResponseFluentImpl(V1beta3LimitResponse instance) { - if (instance != null) { - this.withQueuing(instance.getQueuing()); - this.withType(instance.getType()); - } - } - private V1beta3QueuingConfigurationBuilder queuing; - private String type; - - /** - * This method has been deprecated, please use method buildQueuing instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3QueuingConfiguration getQueuing() { - return this.queuing!=null ?this.queuing.build():null; - } - public V1beta3QueuingConfiguration buildQueuing() { - return this.queuing!=null ?this.queuing.build():null; - } - public A withQueuing(V1beta3QueuingConfiguration queuing) { - _visitables.get("queuing").remove(this.queuing); - if (queuing!=null){ this.queuing= new V1beta3QueuingConfigurationBuilder(queuing); _visitables.get("queuing").add(this.queuing);} else { this.queuing = null; _visitables.get("queuing").remove(this.queuing); } return (A) this; - } - public Boolean hasQueuing() { - return this.queuing != null; - } - public V1beta3LimitResponseFluentImpl.QueuingNested withNewQueuing() { - return new V1beta3LimitResponseFluentImpl.QueuingNestedImpl(); - } - public V1beta3LimitResponseFluentImpl.QueuingNested withNewQueuingLike(V1beta3QueuingConfiguration item) { - return new V1beta3LimitResponseFluentImpl.QueuingNestedImpl(item); - } - public V1beta3LimitResponseFluentImpl.QueuingNested editQueuing() { - return withNewQueuingLike(getQueuing()); - } - public V1beta3LimitResponseFluentImpl.QueuingNested editOrNewQueuing() { - return withNewQueuingLike(getQueuing() != null ? getQueuing(): new V1beta3QueuingConfigurationBuilder().build()); - } - public V1beta3LimitResponseFluentImpl.QueuingNested editOrNewQueuingLike(V1beta3QueuingConfiguration item) { - return withNewQueuingLike(getQueuing() != null ? getQueuing(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3LimitResponseFluentImpl that = (V1beta3LimitResponseFluentImpl) o; - if (!java.util.Objects.equals(queuing, that.queuing)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(queuing, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (queuing != null) { sb.append("queuing:"); sb.append(queuing + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class QueuingNestedImpl extends V1beta3QueuingConfigurationFluentImpl> implements V1beta3LimitResponseFluentImpl.QueuingNested,Nested{ - QueuingNestedImpl(V1beta3QueuingConfiguration item) { - this.builder = new V1beta3QueuingConfigurationBuilder(this, item); - } - QueuingNestedImpl() { - this.builder = new V1beta3QueuingConfigurationBuilder(this); - } - V1beta3QueuingConfigurationBuilder builder; - public N and() { - return (N) V1beta3LimitResponseFluentImpl.this.withQueuing(builder.build()); - } - public N endQueuing() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationBuilder.java index bce71028ad..9effd377c2 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3LimitedPriorityLevelConfigurationBuilder extends V1beta3LimitedPriorityLevelConfigurationFluentImpl implements VisitableBuilder{ +public class V1beta3LimitedPriorityLevelConfigurationBuilder extends V1beta3LimitedPriorityLevelConfigurationFluent implements VisitableBuilder{ public V1beta3LimitedPriorityLevelConfigurationBuilder() { - this(false); - } - public V1beta3LimitedPriorityLevelConfigurationBuilder(Boolean validationEnabled) { - this(new V1beta3LimitedPriorityLevelConfiguration(), validationEnabled); + this(new V1beta3LimitedPriorityLevelConfiguration()); } + public V1beta3LimitedPriorityLevelConfigurationBuilder(V1beta3LimitedPriorityLevelConfigurationFluent fluent) { - this(fluent, false); - } - public V1beta3LimitedPriorityLevelConfigurationBuilder(V1beta3LimitedPriorityLevelConfigurationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3LimitedPriorityLevelConfiguration(), validationEnabled); + this(fluent, new V1beta3LimitedPriorityLevelConfiguration()); } + public V1beta3LimitedPriorityLevelConfigurationBuilder(V1beta3LimitedPriorityLevelConfigurationFluent fluent,V1beta3LimitedPriorityLevelConfiguration instance) { - this(fluent, instance, false); - } - public V1beta3LimitedPriorityLevelConfigurationBuilder(V1beta3LimitedPriorityLevelConfigurationFluent fluent,V1beta3LimitedPriorityLevelConfiguration instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withBorrowingLimitPercent(instance.getBorrowingLimitPercent()); - fluent.withLendablePercent(instance.getLendablePercent()); - fluent.withLimitResponse(instance.getLimitResponse()); - fluent.withNominalConcurrencyShares(instance.getNominalConcurrencyShares()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3LimitedPriorityLevelConfigurationBuilder(V1beta3LimitedPriorityLevelConfiguration instance) { - this(instance,false); - } - public V1beta3LimitedPriorityLevelConfigurationBuilder(V1beta3LimitedPriorityLevelConfiguration instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withBorrowingLimitPercent(instance.getBorrowingLimitPercent()); - this.withLendablePercent(instance.getLendablePercent()); - this.withLimitResponse(instance.getLimitResponse()); - this.withNominalConcurrencyShares(instance.getNominalConcurrencyShares()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3LimitedPriorityLevelConfigurationFluent fluent; - Boolean validationEnabled; + public V1beta3LimitedPriorityLevelConfiguration build() { V1beta3LimitedPriorityLevelConfiguration buildable = new V1beta3LimitedPriorityLevelConfiguration(); buildable.setBorrowingLimitPercent(fluent.getBorrowingLimitPercent()); buildable.setLendablePercent(fluent.getLendablePercent()); - buildable.setLimitResponse(fluent.getLimitResponse()); + buildable.setLimitResponse(fluent.buildLimitResponse()); buildable.setNominalConcurrencyShares(fluent.getNominalConcurrencyShares()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationFluent.java index d47eedbde7..bfa1036316 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationFluent.java @@ -1,44 +1,158 @@ package io.kubernetes.client.openapi.models; -import java.lang.Integer; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import java.lang.Integer; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta3LimitedPriorityLevelConfigurationFluent> extends Fluent{ - public Integer getBorrowingLimitPercent(); - public A withBorrowingLimitPercent(Integer borrowingLimitPercent); - public Boolean hasBorrowingLimitPercent(); - public Integer getLendablePercent(); - public A withLendablePercent(Integer lendablePercent); - public Boolean hasLendablePercent(); - - /** - * This method has been deprecated, please use method buildLimitResponse instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3LimitResponse getLimitResponse(); - public V1beta3LimitResponse buildLimitResponse(); - public A withLimitResponse(V1beta3LimitResponse limitResponse); - public Boolean hasLimitResponse(); - public V1beta3LimitedPriorityLevelConfigurationFluent.LimitResponseNested withNewLimitResponse(); - public V1beta3LimitedPriorityLevelConfigurationFluent.LimitResponseNested withNewLimitResponseLike(V1beta3LimitResponse item); - public V1beta3LimitedPriorityLevelConfigurationFluent.LimitResponseNested editLimitResponse(); - public V1beta3LimitedPriorityLevelConfigurationFluent.LimitResponseNested editOrNewLimitResponse(); - public V1beta3LimitedPriorityLevelConfigurationFluent.LimitResponseNested editOrNewLimitResponseLike(V1beta3LimitResponse item); - public Integer getNominalConcurrencyShares(); - public A withNominalConcurrencyShares(Integer nominalConcurrencyShares); - public Boolean hasNominalConcurrencyShares(); - public interface LimitResponseNested extends Nested,V1beta3LimitResponseFluent>{ - public N and(); - public N endLimitResponse(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3LimitedPriorityLevelConfigurationFluent> extends BaseFluent{ + public V1beta3LimitedPriorityLevelConfigurationFluent() { + } + + public V1beta3LimitedPriorityLevelConfigurationFluent(V1beta3LimitedPriorityLevelConfiguration instance) { + this.copyInstance(instance); + } + private Integer borrowingLimitPercent; + private Integer lendablePercent; + private V1beta3LimitResponseBuilder limitResponse; + private Integer nominalConcurrencyShares; + + protected void copyInstance(V1beta3LimitedPriorityLevelConfiguration instance) { + instance = (instance != null ? instance : new V1beta3LimitedPriorityLevelConfiguration()); + if (instance != null) { + this.withBorrowingLimitPercent(instance.getBorrowingLimitPercent()); + this.withLendablePercent(instance.getLendablePercent()); + this.withLimitResponse(instance.getLimitResponse()); + this.withNominalConcurrencyShares(instance.getNominalConcurrencyShares()); + } + } + + public Integer getBorrowingLimitPercent() { + return this.borrowingLimitPercent; + } + + public A withBorrowingLimitPercent(Integer borrowingLimitPercent) { + this.borrowingLimitPercent = borrowingLimitPercent; + return (A) this; + } + + public boolean hasBorrowingLimitPercent() { + return this.borrowingLimitPercent != null; + } + + public Integer getLendablePercent() { + return this.lendablePercent; + } + + public A withLendablePercent(Integer lendablePercent) { + this.lendablePercent = lendablePercent; + return (A) this; + } + + public boolean hasLendablePercent() { + return this.lendablePercent != null; + } + + public V1beta3LimitResponse buildLimitResponse() { + return this.limitResponse != null ? this.limitResponse.build() : null; + } + + public A withLimitResponse(V1beta3LimitResponse limitResponse) { + this._visitables.remove("limitResponse"); + if (limitResponse != null) { + this.limitResponse = new V1beta3LimitResponseBuilder(limitResponse); + this._visitables.get("limitResponse").add(this.limitResponse); + } else { + this.limitResponse = null; + this._visitables.get("limitResponse").remove(this.limitResponse); + } + return (A) this; + } + + public boolean hasLimitResponse() { + return this.limitResponse != null; + } + + public LimitResponseNested withNewLimitResponse() { + return new LimitResponseNested(null); + } + + public LimitResponseNested withNewLimitResponseLike(V1beta3LimitResponse item) { + return new LimitResponseNested(item); + } + + public LimitResponseNested editLimitResponse() { + return withNewLimitResponseLike(java.util.Optional.ofNullable(buildLimitResponse()).orElse(null)); + } + + public LimitResponseNested editOrNewLimitResponse() { + return withNewLimitResponseLike(java.util.Optional.ofNullable(buildLimitResponse()).orElse(new V1beta3LimitResponseBuilder().build())); + } + + public LimitResponseNested editOrNewLimitResponseLike(V1beta3LimitResponse item) { + return withNewLimitResponseLike(java.util.Optional.ofNullable(buildLimitResponse()).orElse(item)); + } + + public Integer getNominalConcurrencyShares() { + return this.nominalConcurrencyShares; + } + + public A withNominalConcurrencyShares(Integer nominalConcurrencyShares) { + this.nominalConcurrencyShares = nominalConcurrencyShares; + return (A) this; } + public boolean hasNominalConcurrencyShares() { + return this.nominalConcurrencyShares != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3LimitedPriorityLevelConfigurationFluent that = (V1beta3LimitedPriorityLevelConfigurationFluent) o; + if (!java.util.Objects.equals(borrowingLimitPercent, that.borrowingLimitPercent)) return false; + if (!java.util.Objects.equals(lendablePercent, that.lendablePercent)) return false; + if (!java.util.Objects.equals(limitResponse, that.limitResponse)) return false; + if (!java.util.Objects.equals(nominalConcurrencyShares, that.nominalConcurrencyShares)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(borrowingLimitPercent, lendablePercent, limitResponse, nominalConcurrencyShares, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (borrowingLimitPercent != null) { sb.append("borrowingLimitPercent:"); sb.append(borrowingLimitPercent + ","); } + if (lendablePercent != null) { sb.append("lendablePercent:"); sb.append(lendablePercent + ","); } + if (limitResponse != null) { sb.append("limitResponse:"); sb.append(limitResponse + ","); } + if (nominalConcurrencyShares != null) { sb.append("nominalConcurrencyShares:"); sb.append(nominalConcurrencyShares); } + sb.append("}"); + return sb.toString(); + } + public class LimitResponseNested extends V1beta3LimitResponseFluent> implements Nested{ + LimitResponseNested(V1beta3LimitResponse item) { + this.builder = new V1beta3LimitResponseBuilder(this, item); + } + V1beta3LimitResponseBuilder builder; + + public N and() { + return (N) V1beta3LimitedPriorityLevelConfigurationFluent.this.withLimitResponse(builder.build()); + } + + public N endLimitResponse() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationFluentImpl.java deleted file mode 100644 index cd67d5955f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3LimitedPriorityLevelConfigurationFluentImpl.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3LimitedPriorityLevelConfigurationFluentImpl> extends BaseFluent implements V1beta3LimitedPriorityLevelConfigurationFluent{ - public V1beta3LimitedPriorityLevelConfigurationFluentImpl() { - } - public V1beta3LimitedPriorityLevelConfigurationFluentImpl(V1beta3LimitedPriorityLevelConfiguration instance) { - if (instance != null) { - this.withBorrowingLimitPercent(instance.getBorrowingLimitPercent()); - this.withLendablePercent(instance.getLendablePercent()); - this.withLimitResponse(instance.getLimitResponse()); - this.withNominalConcurrencyShares(instance.getNominalConcurrencyShares()); - } - } - private Integer borrowingLimitPercent; - private Integer lendablePercent; - private V1beta3LimitResponseBuilder limitResponse; - private Integer nominalConcurrencyShares; - public Integer getBorrowingLimitPercent() { - return this.borrowingLimitPercent; - } - public A withBorrowingLimitPercent(Integer borrowingLimitPercent) { - this.borrowingLimitPercent=borrowingLimitPercent; return (A) this; - } - public Boolean hasBorrowingLimitPercent() { - return this.borrowingLimitPercent != null; - } - public Integer getLendablePercent() { - return this.lendablePercent; - } - public A withLendablePercent(Integer lendablePercent) { - this.lendablePercent=lendablePercent; return (A) this; - } - public Boolean hasLendablePercent() { - return this.lendablePercent != null; - } - - /** - * This method has been deprecated, please use method buildLimitResponse instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3LimitResponse getLimitResponse() { - return this.limitResponse!=null ?this.limitResponse.build():null; - } - public V1beta3LimitResponse buildLimitResponse() { - return this.limitResponse!=null ?this.limitResponse.build():null; - } - public A withLimitResponse(V1beta3LimitResponse limitResponse) { - _visitables.get("limitResponse").remove(this.limitResponse); - if (limitResponse!=null){ this.limitResponse= new V1beta3LimitResponseBuilder(limitResponse); _visitables.get("limitResponse").add(this.limitResponse);} else { this.limitResponse = null; _visitables.get("limitResponse").remove(this.limitResponse); } return (A) this; - } - public Boolean hasLimitResponse() { - return this.limitResponse != null; - } - public V1beta3LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested withNewLimitResponse() { - return new V1beta3LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNestedImpl(); - } - public V1beta3LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested withNewLimitResponseLike(V1beta3LimitResponse item) { - return new V1beta3LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNestedImpl(item); - } - public V1beta3LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested editLimitResponse() { - return withNewLimitResponseLike(getLimitResponse()); - } - public V1beta3LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested editOrNewLimitResponse() { - return withNewLimitResponseLike(getLimitResponse() != null ? getLimitResponse(): new V1beta3LimitResponseBuilder().build()); - } - public V1beta3LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested editOrNewLimitResponseLike(V1beta3LimitResponse item) { - return withNewLimitResponseLike(getLimitResponse() != null ? getLimitResponse(): item); - } - public Integer getNominalConcurrencyShares() { - return this.nominalConcurrencyShares; - } - public A withNominalConcurrencyShares(Integer nominalConcurrencyShares) { - this.nominalConcurrencyShares=nominalConcurrencyShares; return (A) this; - } - public Boolean hasNominalConcurrencyShares() { - return this.nominalConcurrencyShares != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3LimitedPriorityLevelConfigurationFluentImpl that = (V1beta3LimitedPriorityLevelConfigurationFluentImpl) o; - if (!java.util.Objects.equals(borrowingLimitPercent, that.borrowingLimitPercent)) return false; - - if (!java.util.Objects.equals(lendablePercent, that.lendablePercent)) return false; - - if (!java.util.Objects.equals(limitResponse, that.limitResponse)) return false; - - if (!java.util.Objects.equals(nominalConcurrencyShares, that.nominalConcurrencyShares)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(borrowingLimitPercent, lendablePercent, limitResponse, nominalConcurrencyShares, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (borrowingLimitPercent != null) { sb.append("borrowingLimitPercent:"); sb.append(borrowingLimitPercent + ","); } - if (lendablePercent != null) { sb.append("lendablePercent:"); sb.append(lendablePercent + ","); } - if (limitResponse != null) { sb.append("limitResponse:"); sb.append(limitResponse + ","); } - if (nominalConcurrencyShares != null) { sb.append("nominalConcurrencyShares:"); sb.append(nominalConcurrencyShares); } - sb.append("}"); - return sb.toString(); - } - class LimitResponseNestedImpl extends V1beta3LimitResponseFluentImpl> implements V1beta3LimitedPriorityLevelConfigurationFluentImpl.LimitResponseNested,Nested{ - LimitResponseNestedImpl(V1beta3LimitResponse item) { - this.builder = new V1beta3LimitResponseBuilder(this, item); - } - LimitResponseNestedImpl() { - this.builder = new V1beta3LimitResponseBuilder(this); - } - V1beta3LimitResponseBuilder builder; - public N and() { - return (N) V1beta3LimitedPriorityLevelConfigurationFluentImpl.this.withLimitResponse(builder.build()); - } - public N endLimitResponse() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleBuilder.java index b99e2ad3c7..bb7218982a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3NonResourcePolicyRuleBuilder extends V1beta3NonResourcePolicyRuleFluentImpl implements VisitableBuilder{ +public class V1beta3NonResourcePolicyRuleBuilder extends V1beta3NonResourcePolicyRuleFluent implements VisitableBuilder{ public V1beta3NonResourcePolicyRuleBuilder() { - this(false); - } - public V1beta3NonResourcePolicyRuleBuilder(Boolean validationEnabled) { - this(new V1beta3NonResourcePolicyRule(), validationEnabled); + this(new V1beta3NonResourcePolicyRule()); } + public V1beta3NonResourcePolicyRuleBuilder(V1beta3NonResourcePolicyRuleFluent fluent) { - this(fluent, false); - } - public V1beta3NonResourcePolicyRuleBuilder(V1beta3NonResourcePolicyRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3NonResourcePolicyRule(), validationEnabled); + this(fluent, new V1beta3NonResourcePolicyRule()); } + public V1beta3NonResourcePolicyRuleBuilder(V1beta3NonResourcePolicyRuleFluent fluent,V1beta3NonResourcePolicyRule instance) { - this(fluent, instance, false); - } - public V1beta3NonResourcePolicyRuleBuilder(V1beta3NonResourcePolicyRuleFluent fluent,V1beta3NonResourcePolicyRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNonResourceURLs(instance.getNonResourceURLs()); - fluent.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3NonResourcePolicyRuleBuilder(V1beta3NonResourcePolicyRule instance) { - this(instance,false); - } - public V1beta3NonResourcePolicyRuleBuilder(V1beta3NonResourcePolicyRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNonResourceURLs(instance.getNonResourceURLs()); - this.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3NonResourcePolicyRuleFluent fluent; - Boolean validationEnabled; + public V1beta3NonResourcePolicyRule build() { V1beta3NonResourcePolicyRule buildable = new V1beta3NonResourcePolicyRule(); buildable.setNonResourceURLs(fluent.getNonResourceURLs()); @@ -46,4 +28,5 @@ public V1beta3NonResourcePolicyRule build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleFluent.java index ab319fd5d6..a0be8a4d94 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleFluent.java @@ -1,47 +1,246 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; -import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1beta3NonResourcePolicyRuleFluent> extends Fluent{ - public A addToNonResourceURLs(int index,String item); - public A setToNonResourceURLs(int index,String item); - public A addToNonResourceURLs(java.lang.String... items); - public A addAllToNonResourceURLs(Collection items); - public A removeFromNonResourceURLs(java.lang.String... items); - public A removeAllFromNonResourceURLs(Collection items); - public List getNonResourceURLs(); - public String getNonResourceURL(int index); - public String getFirstNonResourceURL(); - public String getLastNonResourceURL(); - public String getMatchingNonResourceURL(Predicate predicate); - public Boolean hasMatchingNonResourceURL(Predicate predicate); - public A withNonResourceURLs(List nonResourceURLs); - public A withNonResourceURLs(java.lang.String... nonResourceURLs); - public Boolean hasNonResourceURLs(); - public A addToVerbs(int index,String item); - public A setToVerbs(int index,String item); - public A addToVerbs(java.lang.String... items); - public A addAllToVerbs(Collection items); - public A removeFromVerbs(java.lang.String... items); - public A removeAllFromVerbs(Collection items); - public List getVerbs(); - public String getVerb(int index); - public String getFirstVerb(); - public String getLastVerb(); - public String getMatchingVerb(Predicate predicate); - public Boolean hasMatchingVerb(Predicate predicate); - public A withVerbs(List verbs); - public A withVerbs(java.lang.String... verbs); - public Boolean hasVerbs(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3NonResourcePolicyRuleFluent> extends BaseFluent{ + public V1beta3NonResourcePolicyRuleFluent() { + } + public V1beta3NonResourcePolicyRuleFluent(V1beta3NonResourcePolicyRule instance) { + this.copyInstance(instance); + } + private List nonResourceURLs; + private List verbs; + + protected void copyInstance(V1beta3NonResourcePolicyRule instance) { + instance = (instance != null ? instance : new V1beta3NonResourcePolicyRule()); + if (instance != null) { + this.withNonResourceURLs(instance.getNonResourceURLs()); + this.withVerbs(instance.getVerbs()); + } + } + + public A addToNonResourceURLs(int index,String item) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + this.nonResourceURLs.add(index, item); + return (A)this; + } + + public A setToNonResourceURLs(int index,String item) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + this.nonResourceURLs.set(index, item); return (A)this; + } + + public A addToNonResourceURLs(java.lang.String... items) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; + } + + public A addAllToNonResourceURLs(Collection items) { + if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} + for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; + } + + public A removeFromNonResourceURLs(java.lang.String... items) { + if (this.nonResourceURLs == null) return (A)this; + for (String item : items) { this.nonResourceURLs.remove(item);} return (A)this; + } + + public A removeAllFromNonResourceURLs(Collection items) { + if (this.nonResourceURLs == null) return (A)this; + for (String item : items) { this.nonResourceURLs.remove(item);} return (A)this; + } + + public List getNonResourceURLs() { + return this.nonResourceURLs; + } + + public String getNonResourceURL(int index) { + return this.nonResourceURLs.get(index); + } + + public String getFirstNonResourceURL() { + return this.nonResourceURLs.get(0); + } + + public String getLastNonResourceURL() { + return this.nonResourceURLs.get(nonResourceURLs.size() - 1); + } + + public String getMatchingNonResourceURL(Predicate predicate) { + for (String item : nonResourceURLs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingNonResourceURL(Predicate predicate) { + for (String item : nonResourceURLs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNonResourceURLs(List nonResourceURLs) { + if (nonResourceURLs != null) { + this.nonResourceURLs = new ArrayList(); + for (String item : nonResourceURLs) { + this.addToNonResourceURLs(item); + } + } else { + this.nonResourceURLs = null; + } + return (A) this; + } + + public A withNonResourceURLs(java.lang.String... nonResourceURLs) { + if (this.nonResourceURLs != null) { + this.nonResourceURLs.clear(); + _visitables.remove("nonResourceURLs"); + } + if (nonResourceURLs != null) { + for (String item : nonResourceURLs) { + this.addToNonResourceURLs(item); + } + } + return (A) this; + } + + public boolean hasNonResourceURLs() { + return this.nonResourceURLs != null && !this.nonResourceURLs.isEmpty(); + } + + public A addToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.add(index, item); + return (A)this; + } + + public A setToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.set(index, item); return (A)this; + } + + public A addToVerbs(java.lang.String... items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A addAllToVerbs(Collection items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A removeFromVerbs(java.lang.String... items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public A removeAllFromVerbs(Collection items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public List getVerbs() { + return this.verbs; + } + + public String getVerb(int index) { + return this.verbs.get(index); + } + + public String getFirstVerb() { + return this.verbs.get(0); + } + + public String getLastVerb() { + return this.verbs.get(verbs.size() - 1); + } + + public String getMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVerbs(List verbs) { + if (verbs != null) { + this.verbs = new ArrayList(); + for (String item : verbs) { + this.addToVerbs(item); + } + } else { + this.verbs = null; + } + return (A) this; + } + + public A withVerbs(java.lang.String... verbs) { + if (this.verbs != null) { + this.verbs.clear(); + _visitables.remove("verbs"); + } + if (verbs != null) { + for (String item : verbs) { + this.addToVerbs(item); + } + } + return (A) this; + } + + public boolean hasVerbs() { + return this.verbs != null && !this.verbs.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3NonResourcePolicyRuleFluent that = (V1beta3NonResourcePolicyRuleFluent) o; + if (!java.util.Objects.equals(nonResourceURLs, that.nonResourceURLs)) return false; + if (!java.util.Objects.equals(verbs, that.verbs)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(nonResourceURLs, verbs, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (nonResourceURLs != null && !nonResourceURLs.isEmpty()) { sb.append("nonResourceURLs:"); sb.append(nonResourceURLs + ","); } + if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleFluentImpl.java deleted file mode 100644 index e2d26f7985..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3NonResourcePolicyRuleFluentImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3NonResourcePolicyRuleFluentImpl> extends BaseFluent implements V1beta3NonResourcePolicyRuleFluent{ - public V1beta3NonResourcePolicyRuleFluentImpl() { - } - public V1beta3NonResourcePolicyRuleFluentImpl(V1beta3NonResourcePolicyRule instance) { - if (instance != null) { - this.withNonResourceURLs(instance.getNonResourceURLs()); - this.withVerbs(instance.getVerbs()); - } - } - private List nonResourceURLs; - private List verbs; - public A addToNonResourceURLs(int index,String item) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - this.nonResourceURLs.add(index, item); - return (A)this; - } - public A setToNonResourceURLs(int index,String item) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - this.nonResourceURLs.set(index, item); return (A)this; - } - public A addToNonResourceURLs(java.lang.String... items) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; - } - public A addAllToNonResourceURLs(Collection items) { - if (this.nonResourceURLs == null) {this.nonResourceURLs = new ArrayList();} - for (String item : items) {this.nonResourceURLs.add(item);} return (A)this; - } - public A removeFromNonResourceURLs(java.lang.String... items) { - for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this; - } - public A removeAllFromNonResourceURLs(Collection items) { - for (String item : items) {if (this.nonResourceURLs!= null){ this.nonResourceURLs.remove(item);}} return (A)this; - } - public List getNonResourceURLs() { - return this.nonResourceURLs; - } - public String getNonResourceURL(int index) { - return this.nonResourceURLs.get(index); - } - public String getFirstNonResourceURL() { - return this.nonResourceURLs.get(0); - } - public String getLastNonResourceURL() { - return this.nonResourceURLs.get(nonResourceURLs.size() - 1); - } - public String getMatchingNonResourceURL(Predicate predicate) { - for (String item: nonResourceURLs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingNonResourceURL(Predicate predicate) { - for (String item: nonResourceURLs) { if(predicate.test(item)){ return true;} } return false; - } - public A withNonResourceURLs(List nonResourceURLs) { - if (nonResourceURLs != null) {this.nonResourceURLs = new ArrayList(); for (String item : nonResourceURLs){this.addToNonResourceURLs(item);}} else { this.nonResourceURLs = null;} return (A) this; - } - public A withNonResourceURLs(java.lang.String... nonResourceURLs) { - if (this.nonResourceURLs != null) {this.nonResourceURLs.clear(); _visitables.remove("nonResourceURLs"); } - if (nonResourceURLs != null) {for (String item :nonResourceURLs){ this.addToNonResourceURLs(item);}} return (A) this; - } - public Boolean hasNonResourceURLs() { - return nonResourceURLs != null && !nonResourceURLs.isEmpty(); - } - public A addToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.add(index, item); - return (A)this; - } - public A setToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.set(index, item); return (A)this; - } - public A addToVerbs(java.lang.String... items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A addAllToVerbs(Collection items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A removeFromVerbs(java.lang.String... items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public A removeAllFromVerbs(Collection items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public List getVerbs() { - return this.verbs; - } - public String getVerb(int index) { - return this.verbs.get(index); - } - public String getFirstVerb() { - return this.verbs.get(0); - } - public String getLastVerb() { - return this.verbs.get(verbs.size() - 1); - } - public String getMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return true;} } return false; - } - public A withVerbs(List verbs) { - if (verbs != null) {this.verbs = new ArrayList(); for (String item : verbs){this.addToVerbs(item);}} else { this.verbs = null;} return (A) this; - } - public A withVerbs(java.lang.String... verbs) { - if (this.verbs != null) {this.verbs.clear(); _visitables.remove("verbs"); } - if (verbs != null) {for (String item :verbs){ this.addToVerbs(item);}} return (A) this; - } - public Boolean hasVerbs() { - return verbs != null && !verbs.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3NonResourcePolicyRuleFluentImpl that = (V1beta3NonResourcePolicyRuleFluentImpl) o; - if (!java.util.Objects.equals(nonResourceURLs, that.nonResourceURLs)) return false; - - if (!java.util.Objects.equals(verbs, that.verbs)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(nonResourceURLs, verbs, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (nonResourceURLs != null && !nonResourceURLs.isEmpty()) { sb.append("nonResourceURLs:"); sb.append(nonResourceURLs + ","); } - if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsBuilder.java index 51622a6e75..3107c55073 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3PolicyRulesWithSubjectsBuilder extends V1beta3PolicyRulesWithSubjectsFluentImpl implements VisitableBuilder{ +public class V1beta3PolicyRulesWithSubjectsBuilder extends V1beta3PolicyRulesWithSubjectsFluent implements VisitableBuilder{ public V1beta3PolicyRulesWithSubjectsBuilder() { - this(false); - } - public V1beta3PolicyRulesWithSubjectsBuilder(Boolean validationEnabled) { - this(new V1beta3PolicyRulesWithSubjects(), validationEnabled); + this(new V1beta3PolicyRulesWithSubjects()); } + public V1beta3PolicyRulesWithSubjectsBuilder(V1beta3PolicyRulesWithSubjectsFluent fluent) { - this(fluent, false); - } - public V1beta3PolicyRulesWithSubjectsBuilder(V1beta3PolicyRulesWithSubjectsFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3PolicyRulesWithSubjects(), validationEnabled); + this(fluent, new V1beta3PolicyRulesWithSubjects()); } + public V1beta3PolicyRulesWithSubjectsBuilder(V1beta3PolicyRulesWithSubjectsFluent fluent,V1beta3PolicyRulesWithSubjects instance) { - this(fluent, instance, false); - } - public V1beta3PolicyRulesWithSubjectsBuilder(V1beta3PolicyRulesWithSubjectsFluent fluent,V1beta3PolicyRulesWithSubjects instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withNonResourceRules(instance.getNonResourceRules()); - fluent.withResourceRules(instance.getResourceRules()); - fluent.withSubjects(instance.getSubjects()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3PolicyRulesWithSubjectsBuilder(V1beta3PolicyRulesWithSubjects instance) { - this(instance,false); - } - public V1beta3PolicyRulesWithSubjectsBuilder(V1beta3PolicyRulesWithSubjects instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withNonResourceRules(instance.getNonResourceRules()); - this.withResourceRules(instance.getResourceRules()); - this.withSubjects(instance.getSubjects()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3PolicyRulesWithSubjectsFluent fluent; - Boolean validationEnabled; + public V1beta3PolicyRulesWithSubjects build() { V1beta3PolicyRulesWithSubjects buildable = new V1beta3PolicyRulesWithSubjects(); - buildable.setNonResourceRules(fluent.getNonResourceRules()); - buildable.setResourceRules(fluent.getResourceRules()); - buildable.setSubjects(fluent.getSubjects()); + buildable.setNonResourceRules(fluent.buildNonResourceRules()); + buildable.setResourceRules(fluent.buildResourceRules()); + buildable.setSubjects(fluent.buildSubjects()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsFluent.java index 070b4674fa..ad46977bd7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsFluent.java @@ -1,125 +1,571 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta3PolicyRulesWithSubjectsFluent> extends Fluent{ - public A addToNonResourceRules(int index,V1beta3NonResourcePolicyRule item); - public A setToNonResourceRules(int index,V1beta3NonResourcePolicyRule item); - public A addToNonResourceRules(io.kubernetes.client.openapi.models.V1beta3NonResourcePolicyRule... items); - public A addAllToNonResourceRules(Collection items); - public A removeFromNonResourceRules(io.kubernetes.client.openapi.models.V1beta3NonResourcePolicyRule... items); - public A removeAllFromNonResourceRules(Collection items); - public A removeMatchingFromNonResourceRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildNonResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getNonResourceRules(); - public List buildNonResourceRules(); - public V1beta3NonResourcePolicyRule buildNonResourceRule(int index); - public V1beta3NonResourcePolicyRule buildFirstNonResourceRule(); - public V1beta3NonResourcePolicyRule buildLastNonResourceRule(); - public V1beta3NonResourcePolicyRule buildMatchingNonResourceRule(Predicate predicate); - public Boolean hasMatchingNonResourceRule(Predicate predicate); - public A withNonResourceRules(List nonResourceRules); - public A withNonResourceRules(io.kubernetes.client.openapi.models.V1beta3NonResourcePolicyRule... nonResourceRules); - public Boolean hasNonResourceRules(); - public V1beta3PolicyRulesWithSubjectsFluent.NonResourceRulesNested addNewNonResourceRule(); - public V1beta3PolicyRulesWithSubjectsFluent.NonResourceRulesNested addNewNonResourceRuleLike(V1beta3NonResourcePolicyRule item); - public V1beta3PolicyRulesWithSubjectsFluent.NonResourceRulesNested setNewNonResourceRuleLike(int index,V1beta3NonResourcePolicyRule item); - public V1beta3PolicyRulesWithSubjectsFluent.NonResourceRulesNested editNonResourceRule(int index); - public V1beta3PolicyRulesWithSubjectsFluent.NonResourceRulesNested editFirstNonResourceRule(); - public V1beta3PolicyRulesWithSubjectsFluent.NonResourceRulesNested editLastNonResourceRule(); - public V1beta3PolicyRulesWithSubjectsFluent.NonResourceRulesNested editMatchingNonResourceRule(Predicate predicate); - public A addToResourceRules(int index,V1beta3ResourcePolicyRule item); - public A setToResourceRules(int index,V1beta3ResourcePolicyRule item); - public A addToResourceRules(io.kubernetes.client.openapi.models.V1beta3ResourcePolicyRule... items); - public A addAllToResourceRules(Collection items); - public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1beta3ResourcePolicyRule... items); - public A removeAllFromResourceRules(Collection items); - public A removeMatchingFromResourceRules(Predicate predicate); - - /** - * This method has been deprecated, please use method buildResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceRules(); - public List buildResourceRules(); - public V1beta3ResourcePolicyRule buildResourceRule(int index); - public V1beta3ResourcePolicyRule buildFirstResourceRule(); - public V1beta3ResourcePolicyRule buildLastResourceRule(); - public V1beta3ResourcePolicyRule buildMatchingResourceRule(Predicate predicate); - public Boolean hasMatchingResourceRule(Predicate predicate); - public A withResourceRules(List resourceRules); - public A withResourceRules(io.kubernetes.client.openapi.models.V1beta3ResourcePolicyRule... resourceRules); - public Boolean hasResourceRules(); - public V1beta3PolicyRulesWithSubjectsFluent.ResourceRulesNested addNewResourceRule(); - public V1beta3PolicyRulesWithSubjectsFluent.ResourceRulesNested addNewResourceRuleLike(V1beta3ResourcePolicyRule item); - public V1beta3PolicyRulesWithSubjectsFluent.ResourceRulesNested setNewResourceRuleLike(int index,V1beta3ResourcePolicyRule item); - public V1beta3PolicyRulesWithSubjectsFluent.ResourceRulesNested editResourceRule(int index); - public V1beta3PolicyRulesWithSubjectsFluent.ResourceRulesNested editFirstResourceRule(); - public V1beta3PolicyRulesWithSubjectsFluent.ResourceRulesNested editLastResourceRule(); - public V1beta3PolicyRulesWithSubjectsFluent.ResourceRulesNested editMatchingResourceRule(Predicate predicate); - public A addToSubjects(int index,V1beta3Subject item); - public A setToSubjects(int index,V1beta3Subject item); - public A addToSubjects(io.kubernetes.client.openapi.models.V1beta3Subject... items); - public A addAllToSubjects(Collection items); - public A removeFromSubjects(io.kubernetes.client.openapi.models.V1beta3Subject... items); - public A removeAllFromSubjects(Collection items); - public A removeMatchingFromSubjects(Predicate predicate); - - /** - * This method has been deprecated, please use method buildSubjects instead. - * @return The buildable object. - */ - @Deprecated - public List getSubjects(); - public List buildSubjects(); - public V1beta3Subject buildSubject(int index); - public V1beta3Subject buildFirstSubject(); - public V1beta3Subject buildLastSubject(); - public V1beta3Subject buildMatchingSubject(Predicate predicate); - public Boolean hasMatchingSubject(Predicate predicate); - public A withSubjects(List subjects); - public A withSubjects(io.kubernetes.client.openapi.models.V1beta3Subject... subjects); - public Boolean hasSubjects(); - public V1beta3PolicyRulesWithSubjectsFluent.SubjectsNested addNewSubject(); - public V1beta3PolicyRulesWithSubjectsFluent.SubjectsNested addNewSubjectLike(V1beta3Subject item); - public V1beta3PolicyRulesWithSubjectsFluent.SubjectsNested setNewSubjectLike(int index,V1beta3Subject item); - public V1beta3PolicyRulesWithSubjectsFluent.SubjectsNested editSubject(int index); - public V1beta3PolicyRulesWithSubjectsFluent.SubjectsNested editFirstSubject(); - public V1beta3PolicyRulesWithSubjectsFluent.SubjectsNested editLastSubject(); - public V1beta3PolicyRulesWithSubjectsFluent.SubjectsNested editMatchingSubject(Predicate predicate); - public interface NonResourceRulesNested extends Nested,V1beta3NonResourcePolicyRuleFluent>{ - public N and(); - public N endNonResourceRule(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3PolicyRulesWithSubjectsFluent> extends BaseFluent{ + public V1beta3PolicyRulesWithSubjectsFluent() { + } + + public V1beta3PolicyRulesWithSubjectsFluent(V1beta3PolicyRulesWithSubjects instance) { + this.copyInstance(instance); + } + private ArrayList nonResourceRules; + private ArrayList resourceRules; + private ArrayList subjects; + + protected void copyInstance(V1beta3PolicyRulesWithSubjects instance) { + instance = (instance != null ? instance : new V1beta3PolicyRulesWithSubjects()); + if (instance != null) { + this.withNonResourceRules(instance.getNonResourceRules()); + this.withResourceRules(instance.getResourceRules()); + this.withSubjects(instance.getSubjects()); + } + } + + public A addToNonResourceRules(int index,V1beta3NonResourcePolicyRule item) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item); + if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").add(index, builder); nonResourceRules.add(index, builder);} + return (A)this; + } + + public A setToNonResourceRules(int index,V1beta3NonResourcePolicyRule item) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item); + if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").set(index, builder); nonResourceRules.set(index, builder);} + return (A)this; + } + + public A addToNonResourceRules(io.kubernetes.client.openapi.models.V1beta3NonResourcePolicyRule... items) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + for (V1beta3NonResourcePolicyRule item : items) {V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; + } + + public A addAllToNonResourceRules(Collection items) { + if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} + for (V1beta3NonResourcePolicyRule item : items) {V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; + } + + public A removeFromNonResourceRules(io.kubernetes.client.openapi.models.V1beta3NonResourcePolicyRule... items) { + if (this.nonResourceRules == null) return (A)this; + for (V1beta3NonResourcePolicyRule item : items) {V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder); this.nonResourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromNonResourceRules(Collection items) { + if (this.nonResourceRules == null) return (A)this; + for (V1beta3NonResourcePolicyRule item : items) {V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder); this.nonResourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromNonResourceRules(Predicate predicate) { + if (nonResourceRules == null) return (A) this; + final Iterator each = nonResourceRules.iterator(); + final List visitables = _visitables.get("nonResourceRules"); + while (each.hasNext()) { + V1beta3NonResourcePolicyRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildNonResourceRules() { + return this.nonResourceRules != null ? build(nonResourceRules) : null; + } + + public V1beta3NonResourcePolicyRule buildNonResourceRule(int index) { + return this.nonResourceRules.get(index).build(); + } + + public V1beta3NonResourcePolicyRule buildFirstNonResourceRule() { + return this.nonResourceRules.get(0).build(); + } + + public V1beta3NonResourcePolicyRule buildLastNonResourceRule() { + return this.nonResourceRules.get(nonResourceRules.size() - 1).build(); + } + + public V1beta3NonResourcePolicyRule buildMatchingNonResourceRule(Predicate predicate) { + for (V1beta3NonResourcePolicyRuleBuilder item : nonResourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingNonResourceRule(Predicate predicate) { + for (V1beta3NonResourcePolicyRuleBuilder item : nonResourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNonResourceRules(List nonResourceRules) { + if (this.nonResourceRules != null) { + this._visitables.get("nonResourceRules").clear(); + } + if (nonResourceRules != null) { + this.nonResourceRules = new ArrayList(); + for (V1beta3NonResourcePolicyRule item : nonResourceRules) { + this.addToNonResourceRules(item); + } + } else { + this.nonResourceRules = null; + } + return (A) this; + } + + public A withNonResourceRules(io.kubernetes.client.openapi.models.V1beta3NonResourcePolicyRule... nonResourceRules) { + if (this.nonResourceRules != null) { + this.nonResourceRules.clear(); + _visitables.remove("nonResourceRules"); + } + if (nonResourceRules != null) { + for (V1beta3NonResourcePolicyRule item : nonResourceRules) { + this.addToNonResourceRules(item); + } + } + return (A) this; + } + + public boolean hasNonResourceRules() { + return this.nonResourceRules != null && !this.nonResourceRules.isEmpty(); + } + + public NonResourceRulesNested addNewNonResourceRule() { + return new NonResourceRulesNested(-1, null); + } + + public NonResourceRulesNested addNewNonResourceRuleLike(V1beta3NonResourcePolicyRule item) { + return new NonResourceRulesNested(-1, item); + } + + public NonResourceRulesNested setNewNonResourceRuleLike(int index,V1beta3NonResourcePolicyRule item) { + return new NonResourceRulesNested(index, item); + } + + public NonResourceRulesNested editNonResourceRule(int index) { + if (nonResourceRules.size() <= index) throw new RuntimeException("Can't edit nonResourceRules. Index exceeds size."); + return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); + } + + public NonResourceRulesNested editFirstNonResourceRule() { + if (nonResourceRules.size() == 0) throw new RuntimeException("Can't edit first nonResourceRules. The list is empty."); + return setNewNonResourceRuleLike(0, buildNonResourceRule(0)); + } + + public NonResourceRulesNested editLastNonResourceRule() { + int index = nonResourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last nonResourceRules. The list is empty."); + return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); + } + + public NonResourceRulesNested editMatchingNonResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").add(index, builder); resourceRules.add(index, builder);} + return (A)this; + } + + public A setToResourceRules(int index,V1beta3ResourcePolicyRule item) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item); + if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").set(index, builder); resourceRules.set(index, builder);} + return (A)this; + } + + public A addToResourceRules(io.kubernetes.client.openapi.models.V1beta3ResourcePolicyRule... items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1beta3ResourcePolicyRule item : items) {V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A addAllToResourceRules(Collection items) { + if (this.resourceRules == null) {this.resourceRules = new ArrayList();} + for (V1beta3ResourcePolicyRule item : items) {V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; + } + + public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1beta3ResourcePolicyRule... items) { + if (this.resourceRules == null) return (A)this; + for (V1beta3ResourcePolicyRule item : items) {V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeAllFromResourceRules(Collection items) { + if (this.resourceRules == null) return (A)this; + for (V1beta3ResourcePolicyRule item : items) {V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").remove(builder); this.resourceRules.remove(builder);} return (A)this; + } + + public A removeMatchingFromResourceRules(Predicate predicate) { + if (resourceRules == null) return (A) this; + final Iterator each = resourceRules.iterator(); + final List visitables = _visitables.get("resourceRules"); + while (each.hasNext()) { + V1beta3ResourcePolicyRuleBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildResourceRules() { + return this.resourceRules != null ? build(resourceRules) : null; + } + + public V1beta3ResourcePolicyRule buildResourceRule(int index) { + return this.resourceRules.get(index).build(); + } + + public V1beta3ResourcePolicyRule buildFirstResourceRule() { + return this.resourceRules.get(0).build(); + } + + public V1beta3ResourcePolicyRule buildLastResourceRule() { + return this.resourceRules.get(resourceRules.size() - 1).build(); + } + + public V1beta3ResourcePolicyRule buildMatchingResourceRule(Predicate predicate) { + for (V1beta3ResourcePolicyRuleBuilder item : resourceRules) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingResourceRule(Predicate predicate) { + for (V1beta3ResourcePolicyRuleBuilder item : resourceRules) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResourceRules(List resourceRules) { + if (this.resourceRules != null) { + this._visitables.get("resourceRules").clear(); + } + if (resourceRules != null) { + this.resourceRules = new ArrayList(); + for (V1beta3ResourcePolicyRule item : resourceRules) { + this.addToResourceRules(item); + } + } else { + this.resourceRules = null; + } + return (A) this; } - public interface ResourceRulesNested extends Nested,V1beta3ResourcePolicyRuleFluent>{ - public N and(); - public N endResourceRule(); + + public A withResourceRules(io.kubernetes.client.openapi.models.V1beta3ResourcePolicyRule... resourceRules) { + if (this.resourceRules != null) { + this.resourceRules.clear(); + _visitables.remove("resourceRules"); + } + if (resourceRules != null) { + for (V1beta3ResourcePolicyRule item : resourceRules) { + this.addToResourceRules(item); + } + } + return (A) this; + } + + public boolean hasResourceRules() { + return this.resourceRules != null && !this.resourceRules.isEmpty(); + } + + public ResourceRulesNested addNewResourceRule() { + return new ResourceRulesNested(-1, null); + } + + public ResourceRulesNested addNewResourceRuleLike(V1beta3ResourcePolicyRule item) { + return new ResourceRulesNested(-1, item); + } + + public ResourceRulesNested setNewResourceRuleLike(int index,V1beta3ResourcePolicyRule item) { + return new ResourceRulesNested(index, item); + } + + public ResourceRulesNested editResourceRule(int index) { + if (resourceRules.size() <= index) throw new RuntimeException("Can't edit resourceRules. Index exceeds size."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editFirstResourceRule() { + if (resourceRules.size() == 0) throw new RuntimeException("Can't edit first resourceRules. The list is empty."); + return setNewResourceRuleLike(0, buildResourceRule(0)); + } + + public ResourceRulesNested editLastResourceRule() { + int index = resourceRules.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last resourceRules. The list is empty."); + return setNewResourceRuleLike(index, buildResourceRule(index)); + } + + public ResourceRulesNested editMatchingResourceRule(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item); + if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").add(index, builder); subjects.add(index, builder);} + return (A)this; + } + + public A setToSubjects(int index,V1beta3Subject item) { + if (this.subjects == null) {this.subjects = new ArrayList();} + V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item); + if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").set(index, builder); subjects.set(index, builder);} + return (A)this; + } + + public A addToSubjects(io.kubernetes.client.openapi.models.V1beta3Subject... items) { + if (this.subjects == null) {this.subjects = new ArrayList();} + for (V1beta3Subject item : items) {V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; + } + + public A addAllToSubjects(Collection items) { + if (this.subjects == null) {this.subjects = new ArrayList();} + for (V1beta3Subject item : items) {V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; + } + + public A removeFromSubjects(io.kubernetes.client.openapi.models.V1beta3Subject... items) { + if (this.subjects == null) return (A)this; + for (V1beta3Subject item : items) {V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item);_visitables.get("subjects").remove(builder); this.subjects.remove(builder);} return (A)this; + } + + public A removeAllFromSubjects(Collection items) { + if (this.subjects == null) return (A)this; + for (V1beta3Subject item : items) {V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item);_visitables.get("subjects").remove(builder); this.subjects.remove(builder);} return (A)this; + } + + public A removeMatchingFromSubjects(Predicate predicate) { + if (subjects == null) return (A) this; + final Iterator each = subjects.iterator(); + final List visitables = _visitables.get("subjects"); + while (each.hasNext()) { + V1beta3SubjectBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildSubjects() { + return this.subjects != null ? build(subjects) : null; + } + + public V1beta3Subject buildSubject(int index) { + return this.subjects.get(index).build(); + } + + public V1beta3Subject buildFirstSubject() { + return this.subjects.get(0).build(); + } + + public V1beta3Subject buildLastSubject() { + return this.subjects.get(subjects.size() - 1).build(); + } + + public V1beta3Subject buildMatchingSubject(Predicate predicate) { + for (V1beta3SubjectBuilder item : subjects) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingSubject(Predicate predicate) { + for (V1beta3SubjectBuilder item : subjects) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withSubjects(List subjects) { + if (this.subjects != null) { + this._visitables.get("subjects").clear(); + } + if (subjects != null) { + this.subjects = new ArrayList(); + for (V1beta3Subject item : subjects) { + this.addToSubjects(item); + } + } else { + this.subjects = null; + } + return (A) this; + } + + public A withSubjects(io.kubernetes.client.openapi.models.V1beta3Subject... subjects) { + if (this.subjects != null) { + this.subjects.clear(); + _visitables.remove("subjects"); + } + if (subjects != null) { + for (V1beta3Subject item : subjects) { + this.addToSubjects(item); + } + } + return (A) this; + } + + public boolean hasSubjects() { + return this.subjects != null && !this.subjects.isEmpty(); + } + + public SubjectsNested addNewSubject() { + return new SubjectsNested(-1, null); + } + + public SubjectsNested addNewSubjectLike(V1beta3Subject item) { + return new SubjectsNested(-1, item); + } + + public SubjectsNested setNewSubjectLike(int index,V1beta3Subject item) { + return new SubjectsNested(index, item); + } + + public SubjectsNested editSubject(int index) { + if (subjects.size() <= index) throw new RuntimeException("Can't edit subjects. Index exceeds size."); + return setNewSubjectLike(index, buildSubject(index)); + } + + public SubjectsNested editFirstSubject() { + if (subjects.size() == 0) throw new RuntimeException("Can't edit first subjects. The list is empty."); + return setNewSubjectLike(0, buildSubject(0)); + } + + public SubjectsNested editLastSubject() { + int index = subjects.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last subjects. The list is empty."); + return setNewSubjectLike(index, buildSubject(index)); + } + + public SubjectsNested editMatchingSubject(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta3NonResourcePolicyRuleFluent> implements Nested{ + NonResourceRulesNested(int index,V1beta3NonResourcePolicyRule item) { + this.index = index; + this.builder = new V1beta3NonResourcePolicyRuleBuilder(this, item); + } + V1beta3NonResourcePolicyRuleBuilder builder; + int index; + + public N and() { + return (N) V1beta3PolicyRulesWithSubjectsFluent.this.setToNonResourceRules(index,builder.build()); + } + public N endNonResourceRule() { + return and(); + } + + } - public interface SubjectsNested extends Nested,V1beta3SubjectFluent>{ - public N and(); - public N endSubject(); + public class ResourceRulesNested extends V1beta3ResourcePolicyRuleFluent> implements Nested{ + ResourceRulesNested(int index,V1beta3ResourcePolicyRule item) { + this.index = index; + this.builder = new V1beta3ResourcePolicyRuleBuilder(this, item); + } + V1beta3ResourcePolicyRuleBuilder builder; + int index; + + public N and() { + return (N) V1beta3PolicyRulesWithSubjectsFluent.this.setToResourceRules(index,builder.build()); + } + public N endResourceRule() { + return and(); + } + + } + public class SubjectsNested extends V1beta3SubjectFluent> implements Nested{ + SubjectsNested(int index,V1beta3Subject item) { + this.index = index; + this.builder = new V1beta3SubjectBuilder(this, item); + } + V1beta3SubjectBuilder builder; + int index; + + public N and() { + return (N) V1beta3PolicyRulesWithSubjectsFluent.this.setToSubjects(index,builder.build()); + } + + public N endSubject() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsFluentImpl.java deleted file mode 100644 index 1199c5c990..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PolicyRulesWithSubjectsFluentImpl.java +++ /dev/null @@ -1,438 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3PolicyRulesWithSubjectsFluentImpl> extends BaseFluent implements V1beta3PolicyRulesWithSubjectsFluent{ - public V1beta3PolicyRulesWithSubjectsFluentImpl() { - } - public V1beta3PolicyRulesWithSubjectsFluentImpl(V1beta3PolicyRulesWithSubjects instance) { - if (instance != null) { - this.withNonResourceRules(instance.getNonResourceRules()); - this.withResourceRules(instance.getResourceRules()); - this.withSubjects(instance.getSubjects()); - } - } - private ArrayList nonResourceRules; - private ArrayList resourceRules; - private ArrayList subjects; - public A addToNonResourceRules(int index,V1beta3NonResourcePolicyRule item) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item); - if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").add(index, builder); nonResourceRules.add(index, builder);} - return (A)this; - } - public A setToNonResourceRules(int index,V1beta3NonResourcePolicyRule item) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item); - if (index < 0 || index >= nonResourceRules.size()) { _visitables.get("nonResourceRules").add(builder); nonResourceRules.add(builder); } else { _visitables.get("nonResourceRules").set(index, builder); nonResourceRules.set(index, builder);} - return (A)this; - } - public A addToNonResourceRules(io.kubernetes.client.openapi.models.V1beta3NonResourcePolicyRule... items) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - for (V1beta3NonResourcePolicyRule item : items) {V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; - } - public A addAllToNonResourceRules(Collection items) { - if (this.nonResourceRules == null) {this.nonResourceRules = new ArrayList();} - for (V1beta3NonResourcePolicyRule item : items) {V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").add(builder);this.nonResourceRules.add(builder);} return (A)this; - } - public A removeFromNonResourceRules(io.kubernetes.client.openapi.models.V1beta3NonResourcePolicyRule... items) { - for (V1beta3NonResourcePolicyRule item : items) {V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder);if (this.nonResourceRules != null) {this.nonResourceRules.remove(builder);}} return (A)this; - } - public A removeAllFromNonResourceRules(Collection items) { - for (V1beta3NonResourcePolicyRule item : items) {V1beta3NonResourcePolicyRuleBuilder builder = new V1beta3NonResourcePolicyRuleBuilder(item);_visitables.get("nonResourceRules").remove(builder);if (this.nonResourceRules != null) {this.nonResourceRules.remove(builder);}} return (A)this; - } - public A removeMatchingFromNonResourceRules(Predicate predicate) { - if (nonResourceRules == null) return (A) this; - final Iterator each = nonResourceRules.iterator(); - final List visitables = _visitables.get("nonResourceRules"); - while (each.hasNext()) { - V1beta3NonResourcePolicyRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildNonResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getNonResourceRules() { - return nonResourceRules != null ? build(nonResourceRules) : null; - } - public List buildNonResourceRules() { - return nonResourceRules != null ? build(nonResourceRules) : null; - } - public V1beta3NonResourcePolicyRule buildNonResourceRule(int index) { - return this.nonResourceRules.get(index).build(); - } - public V1beta3NonResourcePolicyRule buildFirstNonResourceRule() { - return this.nonResourceRules.get(0).build(); - } - public V1beta3NonResourcePolicyRule buildLastNonResourceRule() { - return this.nonResourceRules.get(nonResourceRules.size() - 1).build(); - } - public V1beta3NonResourcePolicyRule buildMatchingNonResourceRule(Predicate predicate) { - for (V1beta3NonResourcePolicyRuleBuilder item: nonResourceRules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingNonResourceRule(Predicate predicate) { - for (V1beta3NonResourcePolicyRuleBuilder item: nonResourceRules) { if(predicate.test(item)){ return true;} } return false; - } - public A withNonResourceRules(List nonResourceRules) { - if (this.nonResourceRules != null) { _visitables.get("nonResourceRules").clear();} - if (nonResourceRules != null) {this.nonResourceRules = new ArrayList(); for (V1beta3NonResourcePolicyRule item : nonResourceRules){this.addToNonResourceRules(item);}} else { this.nonResourceRules = null;} return (A) this; - } - public A withNonResourceRules(io.kubernetes.client.openapi.models.V1beta3NonResourcePolicyRule... nonResourceRules) { - if (this.nonResourceRules != null) {this.nonResourceRules.clear(); _visitables.remove("nonResourceRules"); } - if (nonResourceRules != null) {for (V1beta3NonResourcePolicyRule item :nonResourceRules){ this.addToNonResourceRules(item);}} return (A) this; - } - public Boolean hasNonResourceRules() { - return nonResourceRules != null && !nonResourceRules.isEmpty(); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested addNewNonResourceRule() { - return new V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNestedImpl(); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested addNewNonResourceRuleLike(V1beta3NonResourcePolicyRule item) { - return new V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNestedImpl(-1, item); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested setNewNonResourceRuleLike(int index,V1beta3NonResourcePolicyRule item) { - return new V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNestedImpl(index, item); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested editNonResourceRule(int index) { - if (nonResourceRules.size() <= index) throw new RuntimeException("Can't edit nonResourceRules. Index exceeds size."); - return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested editFirstNonResourceRule() { - if (nonResourceRules.size() == 0) throw new RuntimeException("Can't edit first nonResourceRules. The list is empty."); - return setNewNonResourceRuleLike(0, buildNonResourceRule(0)); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested editLastNonResourceRule() { - int index = nonResourceRules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last nonResourceRules. The list is empty."); - return setNewNonResourceRuleLike(index, buildNonResourceRule(index)); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested editMatchingNonResourceRule(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item); - if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").add(index, builder); resourceRules.add(index, builder);} - return (A)this; - } - public A setToResourceRules(int index,V1beta3ResourcePolicyRule item) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item); - if (index < 0 || index >= resourceRules.size()) { _visitables.get("resourceRules").add(builder); resourceRules.add(builder); } else { _visitables.get("resourceRules").set(index, builder); resourceRules.set(index, builder);} - return (A)this; - } - public A addToResourceRules(io.kubernetes.client.openapi.models.V1beta3ResourcePolicyRule... items) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - for (V1beta3ResourcePolicyRule item : items) {V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; - } - public A addAllToResourceRules(Collection items) { - if (this.resourceRules == null) {this.resourceRules = new ArrayList();} - for (V1beta3ResourcePolicyRule item : items) {V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").add(builder);this.resourceRules.add(builder);} return (A)this; - } - public A removeFromResourceRules(io.kubernetes.client.openapi.models.V1beta3ResourcePolicyRule... items) { - for (V1beta3ResourcePolicyRule item : items) {V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").remove(builder);if (this.resourceRules != null) {this.resourceRules.remove(builder);}} return (A)this; - } - public A removeAllFromResourceRules(Collection items) { - for (V1beta3ResourcePolicyRule item : items) {V1beta3ResourcePolicyRuleBuilder builder = new V1beta3ResourcePolicyRuleBuilder(item);_visitables.get("resourceRules").remove(builder);if (this.resourceRules != null) {this.resourceRules.remove(builder);}} return (A)this; - } - public A removeMatchingFromResourceRules(Predicate predicate) { - if (resourceRules == null) return (A) this; - final Iterator each = resourceRules.iterator(); - final List visitables = _visitables.get("resourceRules"); - while (each.hasNext()) { - V1beta3ResourcePolicyRuleBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildResourceRules instead. - * @return The buildable object. - */ - @Deprecated - public List getResourceRules() { - return resourceRules != null ? build(resourceRules) : null; - } - public List buildResourceRules() { - return resourceRules != null ? build(resourceRules) : null; - } - public V1beta3ResourcePolicyRule buildResourceRule(int index) { - return this.resourceRules.get(index).build(); - } - public V1beta3ResourcePolicyRule buildFirstResourceRule() { - return this.resourceRules.get(0).build(); - } - public V1beta3ResourcePolicyRule buildLastResourceRule() { - return this.resourceRules.get(resourceRules.size() - 1).build(); - } - public V1beta3ResourcePolicyRule buildMatchingResourceRule(Predicate predicate) { - for (V1beta3ResourcePolicyRuleBuilder item: resourceRules) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingResourceRule(Predicate predicate) { - for (V1beta3ResourcePolicyRuleBuilder item: resourceRules) { if(predicate.test(item)){ return true;} } return false; - } - public A withResourceRules(List resourceRules) { - if (this.resourceRules != null) { _visitables.get("resourceRules").clear();} - if (resourceRules != null) {this.resourceRules = new ArrayList(); for (V1beta3ResourcePolicyRule item : resourceRules){this.addToResourceRules(item);}} else { this.resourceRules = null;} return (A) this; - } - public A withResourceRules(io.kubernetes.client.openapi.models.V1beta3ResourcePolicyRule... resourceRules) { - if (this.resourceRules != null) {this.resourceRules.clear(); _visitables.remove("resourceRules"); } - if (resourceRules != null) {for (V1beta3ResourcePolicyRule item :resourceRules){ this.addToResourceRules(item);}} return (A) this; - } - public Boolean hasResourceRules() { - return resourceRules != null && !resourceRules.isEmpty(); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested addNewResourceRule() { - return new V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNestedImpl(); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested addNewResourceRuleLike(V1beta3ResourcePolicyRule item) { - return new V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNestedImpl(-1, item); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested setNewResourceRuleLike(int index,V1beta3ResourcePolicyRule item) { - return new V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNestedImpl(index, item); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested editResourceRule(int index) { - if (resourceRules.size() <= index) throw new RuntimeException("Can't edit resourceRules. Index exceeds size."); - return setNewResourceRuleLike(index, buildResourceRule(index)); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested editFirstResourceRule() { - if (resourceRules.size() == 0) throw new RuntimeException("Can't edit first resourceRules. The list is empty."); - return setNewResourceRuleLike(0, buildResourceRule(0)); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested editLastResourceRule() { - int index = resourceRules.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last resourceRules. The list is empty."); - return setNewResourceRuleLike(index, buildResourceRule(index)); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested editMatchingResourceRule(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item); - if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").add(index, builder); subjects.add(index, builder);} - return (A)this; - } - public A setToSubjects(int index,V1beta3Subject item) { - if (this.subjects == null) {this.subjects = new ArrayList();} - V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item); - if (index < 0 || index >= subjects.size()) { _visitables.get("subjects").add(builder); subjects.add(builder); } else { _visitables.get("subjects").set(index, builder); subjects.set(index, builder);} - return (A)this; - } - public A addToSubjects(io.kubernetes.client.openapi.models.V1beta3Subject... items) { - if (this.subjects == null) {this.subjects = new ArrayList();} - for (V1beta3Subject item : items) {V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; - } - public A addAllToSubjects(Collection items) { - if (this.subjects == null) {this.subjects = new ArrayList();} - for (V1beta3Subject item : items) {V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item);_visitables.get("subjects").add(builder);this.subjects.add(builder);} return (A)this; - } - public A removeFromSubjects(io.kubernetes.client.openapi.models.V1beta3Subject... items) { - for (V1beta3Subject item : items) {V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item);_visitables.get("subjects").remove(builder);if (this.subjects != null) {this.subjects.remove(builder);}} return (A)this; - } - public A removeAllFromSubjects(Collection items) { - for (V1beta3Subject item : items) {V1beta3SubjectBuilder builder = new V1beta3SubjectBuilder(item);_visitables.get("subjects").remove(builder);if (this.subjects != null) {this.subjects.remove(builder);}} return (A)this; - } - public A removeMatchingFromSubjects(Predicate predicate) { - if (subjects == null) return (A) this; - final Iterator each = subjects.iterator(); - final List visitables = _visitables.get("subjects"); - while (each.hasNext()) { - V1beta3SubjectBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildSubjects instead. - * @return The buildable object. - */ - @Deprecated - public List getSubjects() { - return subjects != null ? build(subjects) : null; - } - public List buildSubjects() { - return subjects != null ? build(subjects) : null; - } - public V1beta3Subject buildSubject(int index) { - return this.subjects.get(index).build(); - } - public V1beta3Subject buildFirstSubject() { - return this.subjects.get(0).build(); - } - public V1beta3Subject buildLastSubject() { - return this.subjects.get(subjects.size() - 1).build(); - } - public V1beta3Subject buildMatchingSubject(Predicate predicate) { - for (V1beta3SubjectBuilder item: subjects) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingSubject(Predicate predicate) { - for (V1beta3SubjectBuilder item: subjects) { if(predicate.test(item)){ return true;} } return false; - } - public A withSubjects(List subjects) { - if (this.subjects != null) { _visitables.get("subjects").clear();} - if (subjects != null) {this.subjects = new ArrayList(); for (V1beta3Subject item : subjects){this.addToSubjects(item);}} else { this.subjects = null;} return (A) this; - } - public A withSubjects(io.kubernetes.client.openapi.models.V1beta3Subject... subjects) { - if (this.subjects != null) {this.subjects.clear(); _visitables.remove("subjects"); } - if (subjects != null) {for (V1beta3Subject item :subjects){ this.addToSubjects(item);}} return (A) this; - } - public Boolean hasSubjects() { - return subjects != null && !subjects.isEmpty(); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNested addNewSubject() { - return new V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNestedImpl(); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNested addNewSubjectLike(V1beta3Subject item) { - return new V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNestedImpl(-1, item); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNested setNewSubjectLike(int index,V1beta3Subject item) { - return new V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNestedImpl(index, item); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNested editSubject(int index) { - if (subjects.size() <= index) throw new RuntimeException("Can't edit subjects. Index exceeds size."); - return setNewSubjectLike(index, buildSubject(index)); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNested editFirstSubject() { - if (subjects.size() == 0) throw new RuntimeException("Can't edit first subjects. The list is empty."); - return setNewSubjectLike(0, buildSubject(0)); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNested editLastSubject() { - int index = subjects.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last subjects. The list is empty."); - return setNewSubjectLike(index, buildSubject(index)); - } - public V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNested editMatchingSubject(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1beta3NonResourcePolicyRuleFluentImpl> implements V1beta3PolicyRulesWithSubjectsFluentImpl.NonResourceRulesNested,Nested{ - NonResourceRulesNestedImpl(int index,V1beta3NonResourcePolicyRule item) { - this.index = index; - this.builder = new V1beta3NonResourcePolicyRuleBuilder(this, item); - } - NonResourceRulesNestedImpl() { - this.index = -1; - this.builder = new V1beta3NonResourcePolicyRuleBuilder(this); - } - V1beta3NonResourcePolicyRuleBuilder builder; - int index; - public N and() { - return (N) V1beta3PolicyRulesWithSubjectsFluentImpl.this.setToNonResourceRules(index,builder.build()); - } - public N endNonResourceRule() { - return and(); - } - - } - class ResourceRulesNestedImpl extends V1beta3ResourcePolicyRuleFluentImpl> implements V1beta3PolicyRulesWithSubjectsFluentImpl.ResourceRulesNested,Nested{ - ResourceRulesNestedImpl(int index,V1beta3ResourcePolicyRule item) { - this.index = index; - this.builder = new V1beta3ResourcePolicyRuleBuilder(this, item); - } - ResourceRulesNestedImpl() { - this.index = -1; - this.builder = new V1beta3ResourcePolicyRuleBuilder(this); - } - V1beta3ResourcePolicyRuleBuilder builder; - int index; - public N and() { - return (N) V1beta3PolicyRulesWithSubjectsFluentImpl.this.setToResourceRules(index,builder.build()); - } - public N endResourceRule() { - return and(); - } - - } - class SubjectsNestedImpl extends V1beta3SubjectFluentImpl> implements V1beta3PolicyRulesWithSubjectsFluentImpl.SubjectsNested,Nested{ - SubjectsNestedImpl(int index,V1beta3Subject item) { - this.index = index; - this.builder = new V1beta3SubjectBuilder(this, item); - } - SubjectsNestedImpl() { - this.index = -1; - this.builder = new V1beta3SubjectBuilder(this); - } - V1beta3SubjectBuilder builder; - int index; - public N and() { - return (N) V1beta3PolicyRulesWithSubjectsFluentImpl.this.setToSubjects(index,builder.build()); - } - public N endSubject() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationBuilder.java index 3a59a5faa0..00c499e56f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3PriorityLevelConfigurationBuilder extends V1beta3PriorityLevelConfigurationFluentImpl implements VisitableBuilder{ +public class V1beta3PriorityLevelConfigurationBuilder extends V1beta3PriorityLevelConfigurationFluent implements VisitableBuilder{ public V1beta3PriorityLevelConfigurationBuilder() { - this(false); - } - public V1beta3PriorityLevelConfigurationBuilder(Boolean validationEnabled) { - this(new V1beta3PriorityLevelConfiguration(), validationEnabled); + this(new V1beta3PriorityLevelConfiguration()); } + public V1beta3PriorityLevelConfigurationBuilder(V1beta3PriorityLevelConfigurationFluent fluent) { - this(fluent, false); - } - public V1beta3PriorityLevelConfigurationBuilder(V1beta3PriorityLevelConfigurationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3PriorityLevelConfiguration(), validationEnabled); + this(fluent, new V1beta3PriorityLevelConfiguration()); } + public V1beta3PriorityLevelConfigurationBuilder(V1beta3PriorityLevelConfigurationFluent fluent,V1beta3PriorityLevelConfiguration instance) { - this(fluent, instance, false); - } - public V1beta3PriorityLevelConfigurationBuilder(V1beta3PriorityLevelConfigurationFluent fluent,V1beta3PriorityLevelConfiguration instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3PriorityLevelConfigurationBuilder(V1beta3PriorityLevelConfiguration instance) { - this(instance,false); - } - public V1beta3PriorityLevelConfigurationBuilder(V1beta3PriorityLevelConfiguration instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3PriorityLevelConfigurationFluent fluent; - Boolean validationEnabled; + public V1beta3PriorityLevelConfiguration build() { V1beta3PriorityLevelConfiguration buildable = new V1beta3PriorityLevelConfiguration(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionBuilder.java index 32887575f1..f44e8f39ab 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3PriorityLevelConfigurationConditionBuilder extends V1beta3PriorityLevelConfigurationConditionFluentImpl implements VisitableBuilder{ +public class V1beta3PriorityLevelConfigurationConditionBuilder extends V1beta3PriorityLevelConfigurationConditionFluent implements VisitableBuilder{ public V1beta3PriorityLevelConfigurationConditionBuilder() { - this(false); - } - public V1beta3PriorityLevelConfigurationConditionBuilder(Boolean validationEnabled) { - this(new V1beta3PriorityLevelConfigurationCondition(), validationEnabled); + this(new V1beta3PriorityLevelConfigurationCondition()); } + public V1beta3PriorityLevelConfigurationConditionBuilder(V1beta3PriorityLevelConfigurationConditionFluent fluent) { - this(fluent, false); - } - public V1beta3PriorityLevelConfigurationConditionBuilder(V1beta3PriorityLevelConfigurationConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3PriorityLevelConfigurationCondition(), validationEnabled); + this(fluent, new V1beta3PriorityLevelConfigurationCondition()); } + public V1beta3PriorityLevelConfigurationConditionBuilder(V1beta3PriorityLevelConfigurationConditionFluent fluent,V1beta3PriorityLevelConfigurationCondition instance) { - this(fluent, instance, false); - } - public V1beta3PriorityLevelConfigurationConditionBuilder(V1beta3PriorityLevelConfigurationConditionFluent fluent,V1beta3PriorityLevelConfigurationCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3PriorityLevelConfigurationConditionBuilder(V1beta3PriorityLevelConfigurationCondition instance) { - this(instance,false); - } - public V1beta3PriorityLevelConfigurationConditionBuilder(V1beta3PriorityLevelConfigurationCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3PriorityLevelConfigurationConditionFluent fluent; - Boolean validationEnabled; + public V1beta3PriorityLevelConfigurationCondition build() { V1beta3PriorityLevelConfigurationCondition buildable = new V1beta3PriorityLevelConfigurationCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V1beta3PriorityLevelConfigurationCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionFluent.java index f97fae9b0f..08b2141d7b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3PriorityLevelConfigurationConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3PriorityLevelConfigurationConditionFluent> extends BaseFluent{ + public V1beta3PriorityLevelConfigurationConditionFluent() { + } + public V1beta3PriorityLevelConfigurationConditionFluent(V1beta3PriorityLevelConfigurationCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V1beta3PriorityLevelConfigurationCondition instance) { + instance = (instance != null ? instance : new V1beta3PriorityLevelConfigurationCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3PriorityLevelConfigurationConditionFluent that = (V1beta3PriorityLevelConfigurationConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionFluentImpl.java deleted file mode 100644 index d4721efc24..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3PriorityLevelConfigurationConditionFluentImpl> extends BaseFluent implements V1beta3PriorityLevelConfigurationConditionFluent{ - public V1beta3PriorityLevelConfigurationConditionFluentImpl() { - } - public V1beta3PriorityLevelConfigurationConditionFluentImpl(V1beta3PriorityLevelConfigurationCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3PriorityLevelConfigurationConditionFluentImpl that = (V1beta3PriorityLevelConfigurationConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationFluent.java index 8a17c69c9c..9b2cb62467 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta3PriorityLevelConfigurationFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V1beta3PriorityLevelConfigurationFluent.MetadataNested withNewMetadata(); - public V1beta3PriorityLevelConfigurationFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V1beta3PriorityLevelConfigurationFluent.MetadataNested editMetadata(); - public V1beta3PriorityLevelConfigurationFluent.MetadataNested editOrNewMetadata(); - public V1beta3PriorityLevelConfigurationFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3PriorityLevelConfigurationSpec getSpec(); - public V1beta3PriorityLevelConfigurationSpec buildSpec(); - public A withSpec(V1beta3PriorityLevelConfigurationSpec spec); - public Boolean hasSpec(); - public V1beta3PriorityLevelConfigurationFluent.SpecNested withNewSpec(); - public V1beta3PriorityLevelConfigurationFluent.SpecNested withNewSpecLike(V1beta3PriorityLevelConfigurationSpec item); - public V1beta3PriorityLevelConfigurationFluent.SpecNested editSpec(); - public V1beta3PriorityLevelConfigurationFluent.SpecNested editOrNewSpec(); - public V1beta3PriorityLevelConfigurationFluent.SpecNested editOrNewSpecLike(V1beta3PriorityLevelConfigurationSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3PriorityLevelConfigurationStatus getStatus(); - public V1beta3PriorityLevelConfigurationStatus buildStatus(); - public A withStatus(V1beta3PriorityLevelConfigurationStatus status); - public Boolean hasStatus(); - public V1beta3PriorityLevelConfigurationFluent.StatusNested withNewStatus(); - public V1beta3PriorityLevelConfigurationFluent.StatusNested withNewStatusLike(V1beta3PriorityLevelConfigurationStatus item); - public V1beta3PriorityLevelConfigurationFluent.StatusNested editStatus(); - public V1beta3PriorityLevelConfigurationFluent.StatusNested editOrNewStatus(); - public V1beta3PriorityLevelConfigurationFluent.StatusNested editOrNewStatusLike(V1beta3PriorityLevelConfigurationStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3PriorityLevelConfigurationFluent> extends BaseFluent{ + public V1beta3PriorityLevelConfigurationFluent() { + } + + public V1beta3PriorityLevelConfigurationFluent(V1beta3PriorityLevelConfiguration instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V1beta3PriorityLevelConfigurationSpecBuilder spec; + private V1beta3PriorityLevelConfigurationStatusBuilder status; + + protected void copyInstance(V1beta3PriorityLevelConfiguration instance) { + instance = (instance != null ? instance : new V1beta3PriorityLevelConfiguration()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V1beta3PriorityLevelConfigurationSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V1beta3PriorityLevelConfigurationSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V1beta3PriorityLevelConfigurationSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V1beta3PriorityLevelConfigurationSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V1beta3PriorityLevelConfigurationSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V1beta3PriorityLevelConfigurationSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V1beta3PriorityLevelConfigurationSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V1beta3PriorityLevelConfigurationStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V1beta3PriorityLevelConfigurationStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V1beta3PriorityLevelConfigurationStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V1beta3PriorityLevelConfigurationStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V1beta3PriorityLevelConfigurationStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V1beta3PriorityLevelConfigurationStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3PriorityLevelConfigurationFluent that = (V1beta3PriorityLevelConfigurationFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V1beta3PriorityLevelConfigurationFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V1beta3PriorityLevelConfigurationStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V1beta3PriorityLevelConfigurationSpecFluent> implements Nested{ + SpecNested(V1beta3PriorityLevelConfigurationSpec item) { + this.builder = new V1beta3PriorityLevelConfigurationSpecBuilder(this, item); + } + V1beta3PriorityLevelConfigurationSpecBuilder builder; + + public N and() { + return (N) V1beta3PriorityLevelConfigurationFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V1beta3PriorityLevelConfigurationStatusFluent> implements Nested{ + StatusNested(V1beta3PriorityLevelConfigurationStatus item) { + this.builder = new V1beta3PriorityLevelConfigurationStatusBuilder(this, item); + } + V1beta3PriorityLevelConfigurationStatusBuilder builder; + + public N and() { + return (N) V1beta3PriorityLevelConfigurationFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationFluentImpl.java deleted file mode 100644 index ad558c644b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3PriorityLevelConfigurationFluentImpl> extends BaseFluent implements V1beta3PriorityLevelConfigurationFluent{ - public V1beta3PriorityLevelConfigurationFluentImpl() { - } - public V1beta3PriorityLevelConfigurationFluentImpl(V1beta3PriorityLevelConfiguration instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V1beta3PriorityLevelConfigurationSpecBuilder spec; - private V1beta3PriorityLevelConfigurationStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V1beta3PriorityLevelConfigurationFluentImpl.MetadataNested withNewMetadata() { - return new V1beta3PriorityLevelConfigurationFluentImpl.MetadataNestedImpl(); - } - public V1beta3PriorityLevelConfigurationFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V1beta3PriorityLevelConfigurationFluentImpl.MetadataNestedImpl(item); - } - public V1beta3PriorityLevelConfigurationFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1beta3PriorityLevelConfigurationFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V1beta3PriorityLevelConfigurationFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3PriorityLevelConfigurationSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V1beta3PriorityLevelConfigurationSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V1beta3PriorityLevelConfigurationSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V1beta3PriorityLevelConfigurationSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V1beta3PriorityLevelConfigurationFluentImpl.SpecNested withNewSpec() { - return new V1beta3PriorityLevelConfigurationFluentImpl.SpecNestedImpl(); - } - public V1beta3PriorityLevelConfigurationFluentImpl.SpecNested withNewSpecLike(V1beta3PriorityLevelConfigurationSpec item) { - return new V1beta3PriorityLevelConfigurationFluentImpl.SpecNestedImpl(item); - } - public V1beta3PriorityLevelConfigurationFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V1beta3PriorityLevelConfigurationFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V1beta3PriorityLevelConfigurationSpecBuilder().build()); - } - public V1beta3PriorityLevelConfigurationFluentImpl.SpecNested editOrNewSpecLike(V1beta3PriorityLevelConfigurationSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3PriorityLevelConfigurationStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V1beta3PriorityLevelConfigurationStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V1beta3PriorityLevelConfigurationStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V1beta3PriorityLevelConfigurationStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V1beta3PriorityLevelConfigurationFluentImpl.StatusNested withNewStatus() { - return new V1beta3PriorityLevelConfigurationFluentImpl.StatusNestedImpl(); - } - public V1beta3PriorityLevelConfigurationFluentImpl.StatusNested withNewStatusLike(V1beta3PriorityLevelConfigurationStatus item) { - return new V1beta3PriorityLevelConfigurationFluentImpl.StatusNestedImpl(item); - } - public V1beta3PriorityLevelConfigurationFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V1beta3PriorityLevelConfigurationFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V1beta3PriorityLevelConfigurationStatusBuilder().build()); - } - public V1beta3PriorityLevelConfigurationFluentImpl.StatusNested editOrNewStatusLike(V1beta3PriorityLevelConfigurationStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3PriorityLevelConfigurationFluentImpl that = (V1beta3PriorityLevelConfigurationFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1beta3PriorityLevelConfigurationFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V1beta3PriorityLevelConfigurationFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V1beta3PriorityLevelConfigurationSpecFluentImpl> implements V1beta3PriorityLevelConfigurationFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V1beta3PriorityLevelConfigurationSpec item) { - this.builder = new V1beta3PriorityLevelConfigurationSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V1beta3PriorityLevelConfigurationSpecBuilder(this); - } - V1beta3PriorityLevelConfigurationSpecBuilder builder; - public N and() { - return (N) V1beta3PriorityLevelConfigurationFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V1beta3PriorityLevelConfigurationStatusFluentImpl> implements V1beta3PriorityLevelConfigurationFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V1beta3PriorityLevelConfigurationStatus item) { - this.builder = new V1beta3PriorityLevelConfigurationStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V1beta3PriorityLevelConfigurationStatusBuilder(this); - } - V1beta3PriorityLevelConfigurationStatusBuilder builder; - public N and() { - return (N) V1beta3PriorityLevelConfigurationFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListBuilder.java index ca17823141..8b3eac19de 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3PriorityLevelConfigurationListBuilder extends V1beta3PriorityLevelConfigurationListFluentImpl implements VisitableBuilder{ +public class V1beta3PriorityLevelConfigurationListBuilder extends V1beta3PriorityLevelConfigurationListFluent implements VisitableBuilder{ public V1beta3PriorityLevelConfigurationListBuilder() { - this(false); - } - public V1beta3PriorityLevelConfigurationListBuilder(Boolean validationEnabled) { - this(new V1beta3PriorityLevelConfigurationList(), validationEnabled); + this(new V1beta3PriorityLevelConfigurationList()); } + public V1beta3PriorityLevelConfigurationListBuilder(V1beta3PriorityLevelConfigurationListFluent fluent) { - this(fluent, false); - } - public V1beta3PriorityLevelConfigurationListBuilder(V1beta3PriorityLevelConfigurationListFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3PriorityLevelConfigurationList(), validationEnabled); + this(fluent, new V1beta3PriorityLevelConfigurationList()); } + public V1beta3PriorityLevelConfigurationListBuilder(V1beta3PriorityLevelConfigurationListFluent fluent,V1beta3PriorityLevelConfigurationList instance) { - this(fluent, instance, false); - } - public V1beta3PriorityLevelConfigurationListBuilder(V1beta3PriorityLevelConfigurationListFluent fluent,V1beta3PriorityLevelConfigurationList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3PriorityLevelConfigurationListBuilder(V1beta3PriorityLevelConfigurationList instance) { - this(instance,false); - } - public V1beta3PriorityLevelConfigurationListBuilder(V1beta3PriorityLevelConfigurationList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3PriorityLevelConfigurationListFluent fluent; - Boolean validationEnabled; + public V1beta3PriorityLevelConfigurationList build() { V1beta3PriorityLevelConfigurationList buildable = new V1beta3PriorityLevelConfigurationList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListFluent.java index 316f435891..53ef57fe3d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3PriorityLevelConfigurationListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V1beta3PriorityLevelConfiguration item); - public A setToItems(int index,V1beta3PriorityLevelConfiguration item); - public A addToItems(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V1beta3PriorityLevelConfiguration buildItem(int index); - public V1beta3PriorityLevelConfiguration buildFirstItem(); - public V1beta3PriorityLevelConfiguration buildLastItem(); - public V1beta3PriorityLevelConfiguration buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration... items); - public Boolean hasItems(); - public V1beta3PriorityLevelConfigurationListFluent.ItemsNested addNewItem(); - public V1beta3PriorityLevelConfigurationListFluent.ItemsNested addNewItemLike(V1beta3PriorityLevelConfiguration item); - public V1beta3PriorityLevelConfigurationListFluent.ItemsNested setNewItemLike(int index,V1beta3PriorityLevelConfiguration item); - public V1beta3PriorityLevelConfigurationListFluent.ItemsNested editItem(int index); - public V1beta3PriorityLevelConfigurationListFluent.ItemsNested editFirstItem(); - public V1beta3PriorityLevelConfigurationListFluent.ItemsNested editLastItem(); - public V1beta3PriorityLevelConfigurationListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V1beta3PriorityLevelConfigurationListFluent.MetadataNested withNewMetadata(); - public V1beta3PriorityLevelConfigurationListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V1beta3PriorityLevelConfigurationListFluent.MetadataNested editMetadata(); - public V1beta3PriorityLevelConfigurationListFluent.MetadataNested editOrNewMetadata(); - public V1beta3PriorityLevelConfigurationListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V1beta3PriorityLevelConfigurationFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3PriorityLevelConfigurationListFluent> extends BaseFluent{ + public V1beta3PriorityLevelConfigurationListFluent() { + } + + public V1beta3PriorityLevelConfigurationListFluent(V1beta3PriorityLevelConfigurationList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V1beta3PriorityLevelConfigurationList instance) { + instance = (instance != null ? instance : new V1beta3PriorityLevelConfigurationList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V1beta3PriorityLevelConfiguration item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V1beta3PriorityLevelConfiguration item) { + if (this.items == null) {this.items = new ArrayList();} + V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta3PriorityLevelConfiguration item : items) {V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V1beta3PriorityLevelConfiguration item : items) {V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration... items) { + if (this.items == null) return (A)this; + for (V1beta3PriorityLevelConfiguration item : items) {V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V1beta3PriorityLevelConfiguration item : items) {V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V1beta3PriorityLevelConfigurationBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V1beta3PriorityLevelConfiguration buildItem(int index) { + return this.items.get(index).build(); + } + + public V1beta3PriorityLevelConfiguration buildFirstItem() { + return this.items.get(0).build(); + } + + public V1beta3PriorityLevelConfiguration buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V1beta3PriorityLevelConfiguration buildMatchingItem(Predicate predicate) { + for (V1beta3PriorityLevelConfigurationBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V1beta3PriorityLevelConfigurationBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V1beta3PriorityLevelConfiguration item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V1beta3PriorityLevelConfiguration item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V1beta3PriorityLevelConfiguration item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V1beta3PriorityLevelConfiguration item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3PriorityLevelConfigurationListFluent that = (V1beta3PriorityLevelConfigurationListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V1beta3PriorityLevelConfigurationFluent> implements Nested{ + ItemsNested(int index,V1beta3PriorityLevelConfiguration item) { + this.index = index; + this.builder = new V1beta3PriorityLevelConfigurationBuilder(this, item); + } + V1beta3PriorityLevelConfigurationBuilder builder; + int index; + public N and() { + return (N) V1beta3PriorityLevelConfigurationListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V1beta3PriorityLevelConfigurationListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListFluentImpl.java deleted file mode 100644 index a58af96751..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3PriorityLevelConfigurationListFluentImpl> extends BaseFluent implements V1beta3PriorityLevelConfigurationListFluent{ - public V1beta3PriorityLevelConfigurationListFluentImpl() { - } - public V1beta3PriorityLevelConfigurationListFluentImpl(V1beta3PriorityLevelConfigurationList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V1beta3PriorityLevelConfiguration item) { - if (this.items == null) {this.items = new ArrayList();} - V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V1beta3PriorityLevelConfiguration item) { - if (this.items == null) {this.items = new ArrayList();} - V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1beta3PriorityLevelConfiguration item : items) {V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V1beta3PriorityLevelConfiguration item : items) {V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration... items) { - for (V1beta3PriorityLevelConfiguration item : items) {V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V1beta3PriorityLevelConfiguration item : items) {V1beta3PriorityLevelConfigurationBuilder builder = new V1beta3PriorityLevelConfigurationBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V1beta3PriorityLevelConfigurationBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V1beta3PriorityLevelConfiguration buildItem(int index) { - return this.items.get(index).build(); - } - public V1beta3PriorityLevelConfiguration buildFirstItem() { - return this.items.get(0).build(); - } - public V1beta3PriorityLevelConfiguration buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V1beta3PriorityLevelConfiguration buildMatchingItem(Predicate predicate) { - for (V1beta3PriorityLevelConfigurationBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V1beta3PriorityLevelConfigurationBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V1beta3PriorityLevelConfiguration item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfiguration... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V1beta3PriorityLevelConfiguration item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNested addNewItem() { - return new V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNestedImpl(); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNested addNewItemLike(V1beta3PriorityLevelConfiguration item) { - return new V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNestedImpl(-1, item); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNested setNewItemLike(int index,V1beta3PriorityLevelConfiguration item) { - return new V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNestedImpl(index, item); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V1beta3PriorityLevelConfigurationListFluentImpl.MetadataNestedImpl(); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V1beta3PriorityLevelConfigurationListFluentImpl.MetadataNestedImpl(item); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V1beta3PriorityLevelConfigurationListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3PriorityLevelConfigurationListFluentImpl that = (V1beta3PriorityLevelConfigurationListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V1beta3PriorityLevelConfigurationFluentImpl> implements V1beta3PriorityLevelConfigurationListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V1beta3PriorityLevelConfiguration item) { - this.index = index; - this.builder = new V1beta3PriorityLevelConfigurationBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V1beta3PriorityLevelConfigurationBuilder(this); - } - V1beta3PriorityLevelConfigurationBuilder builder; - int index; - public N and() { - return (N) V1beta3PriorityLevelConfigurationListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1beta3PriorityLevelConfigurationListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V1beta3PriorityLevelConfigurationListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceBuilder.java index 830e53ee3b..822ece046d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3PriorityLevelConfigurationReferenceBuilder extends V1beta3PriorityLevelConfigurationReferenceFluentImpl implements VisitableBuilder{ +public class V1beta3PriorityLevelConfigurationReferenceBuilder extends V1beta3PriorityLevelConfigurationReferenceFluent implements VisitableBuilder{ public V1beta3PriorityLevelConfigurationReferenceBuilder() { - this(false); - } - public V1beta3PriorityLevelConfigurationReferenceBuilder(Boolean validationEnabled) { - this(new V1beta3PriorityLevelConfigurationReference(), validationEnabled); + this(new V1beta3PriorityLevelConfigurationReference()); } + public V1beta3PriorityLevelConfigurationReferenceBuilder(V1beta3PriorityLevelConfigurationReferenceFluent fluent) { - this(fluent, false); - } - public V1beta3PriorityLevelConfigurationReferenceBuilder(V1beta3PriorityLevelConfigurationReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3PriorityLevelConfigurationReference(), validationEnabled); + this(fluent, new V1beta3PriorityLevelConfigurationReference()); } + public V1beta3PriorityLevelConfigurationReferenceBuilder(V1beta3PriorityLevelConfigurationReferenceFluent fluent,V1beta3PriorityLevelConfigurationReference instance) { - this(fluent, instance, false); - } - public V1beta3PriorityLevelConfigurationReferenceBuilder(V1beta3PriorityLevelConfigurationReferenceFluent fluent,V1beta3PriorityLevelConfigurationReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3PriorityLevelConfigurationReferenceBuilder(V1beta3PriorityLevelConfigurationReference instance) { - this(instance,false); - } - public V1beta3PriorityLevelConfigurationReferenceBuilder(V1beta3PriorityLevelConfigurationReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3PriorityLevelConfigurationReferenceFluent fluent; - Boolean validationEnabled; + public V1beta3PriorityLevelConfigurationReference build() { V1beta3PriorityLevelConfigurationReference buildable = new V1beta3PriorityLevelConfigurationReference(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceFluent.java index c519210d63..f1cb480c86 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3PriorityLevelConfigurationReferenceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3PriorityLevelConfigurationReferenceFluent> extends BaseFluent{ + public V1beta3PriorityLevelConfigurationReferenceFluent() { + } + public V1beta3PriorityLevelConfigurationReferenceFluent(V1beta3PriorityLevelConfigurationReference instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1beta3PriorityLevelConfigurationReference instance) { + instance = (instance != null ? instance : new V1beta3PriorityLevelConfigurationReference()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3PriorityLevelConfigurationReferenceFluent that = (V1beta3PriorityLevelConfigurationReferenceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceFluentImpl.java deleted file mode 100644 index ced0019137..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationReferenceFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3PriorityLevelConfigurationReferenceFluentImpl> extends BaseFluent implements V1beta3PriorityLevelConfigurationReferenceFluent{ - public V1beta3PriorityLevelConfigurationReferenceFluentImpl() { - } - public V1beta3PriorityLevelConfigurationReferenceFluentImpl(V1beta3PriorityLevelConfigurationReference instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3PriorityLevelConfigurationReferenceFluentImpl that = (V1beta3PriorityLevelConfigurationReferenceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecBuilder.java index 4fdc186872..6c7affc45c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecBuilder.java @@ -1,49 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3PriorityLevelConfigurationSpecBuilder extends V1beta3PriorityLevelConfigurationSpecFluentImpl implements VisitableBuilder{ +public class V1beta3PriorityLevelConfigurationSpecBuilder extends V1beta3PriorityLevelConfigurationSpecFluent implements VisitableBuilder{ public V1beta3PriorityLevelConfigurationSpecBuilder() { - this(false); - } - public V1beta3PriorityLevelConfigurationSpecBuilder(Boolean validationEnabled) { - this(new V1beta3PriorityLevelConfigurationSpec(), validationEnabled); + this(new V1beta3PriorityLevelConfigurationSpec()); } + public V1beta3PriorityLevelConfigurationSpecBuilder(V1beta3PriorityLevelConfigurationSpecFluent fluent) { - this(fluent, false); - } - public V1beta3PriorityLevelConfigurationSpecBuilder(V1beta3PriorityLevelConfigurationSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3PriorityLevelConfigurationSpec(), validationEnabled); + this(fluent, new V1beta3PriorityLevelConfigurationSpec()); } + public V1beta3PriorityLevelConfigurationSpecBuilder(V1beta3PriorityLevelConfigurationSpecFluent fluent,V1beta3PriorityLevelConfigurationSpec instance) { - this(fluent, instance, false); - } - public V1beta3PriorityLevelConfigurationSpecBuilder(V1beta3PriorityLevelConfigurationSpecFluent fluent,V1beta3PriorityLevelConfigurationSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLimited(instance.getLimited()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3PriorityLevelConfigurationSpecBuilder(V1beta3PriorityLevelConfigurationSpec instance) { - this(instance,false); - } - public V1beta3PriorityLevelConfigurationSpecBuilder(V1beta3PriorityLevelConfigurationSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLimited(instance.getLimited()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3PriorityLevelConfigurationSpecFluent fluent; - Boolean validationEnabled; + public V1beta3PriorityLevelConfigurationSpec build() { V1beta3PriorityLevelConfigurationSpec buildable = new V1beta3PriorityLevelConfigurationSpec(); - buildable.setLimited(fluent.getLimited()); + buildable.setExempt(fluent.buildExempt()); + buildable.setLimited(fluent.buildLimited()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecFluent.java index 76574c705d..4766c7dc96 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecFluent.java @@ -1,38 +1,183 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta3PriorityLevelConfigurationSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildLimited instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3LimitedPriorityLevelConfiguration getLimited(); - public V1beta3LimitedPriorityLevelConfiguration buildLimited(); - public A withLimited(V1beta3LimitedPriorityLevelConfiguration limited); - public Boolean hasLimited(); - public V1beta3PriorityLevelConfigurationSpecFluent.LimitedNested withNewLimited(); - public V1beta3PriorityLevelConfigurationSpecFluent.LimitedNested withNewLimitedLike(V1beta3LimitedPriorityLevelConfiguration item); - public V1beta3PriorityLevelConfigurationSpecFluent.LimitedNested editLimited(); - public V1beta3PriorityLevelConfigurationSpecFluent.LimitedNested editOrNewLimited(); - public V1beta3PriorityLevelConfigurationSpecFluent.LimitedNested editOrNewLimitedLike(V1beta3LimitedPriorityLevelConfiguration item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface LimitedNested extends Nested,V1beta3LimitedPriorityLevelConfigurationFluent>{ - public N and(); - public N endLimited(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3PriorityLevelConfigurationSpecFluent> extends BaseFluent{ + public V1beta3PriorityLevelConfigurationSpecFluent() { + } + + public V1beta3PriorityLevelConfigurationSpecFluent(V1beta3PriorityLevelConfigurationSpec instance) { + this.copyInstance(instance); + } + private V1beta3ExemptPriorityLevelConfigurationBuilder exempt; + private V1beta3LimitedPriorityLevelConfigurationBuilder limited; + private String type; + + protected void copyInstance(V1beta3PriorityLevelConfigurationSpec instance) { + instance = (instance != null ? instance : new V1beta3PriorityLevelConfigurationSpec()); + if (instance != null) { + this.withExempt(instance.getExempt()); + this.withLimited(instance.getLimited()); + this.withType(instance.getType()); + } + } + + public V1beta3ExemptPriorityLevelConfiguration buildExempt() { + return this.exempt != null ? this.exempt.build() : null; + } + + public A withExempt(V1beta3ExemptPriorityLevelConfiguration exempt) { + this._visitables.remove("exempt"); + if (exempt != null) { + this.exempt = new V1beta3ExemptPriorityLevelConfigurationBuilder(exempt); + this._visitables.get("exempt").add(this.exempt); + } else { + this.exempt = null; + this._visitables.get("exempt").remove(this.exempt); + } + return (A) this; + } + + public boolean hasExempt() { + return this.exempt != null; + } + + public ExemptNested withNewExempt() { + return new ExemptNested(null); + } + + public ExemptNested withNewExemptLike(V1beta3ExemptPriorityLevelConfiguration item) { + return new ExemptNested(item); + } + + public ExemptNested editExempt() { + return withNewExemptLike(java.util.Optional.ofNullable(buildExempt()).orElse(null)); + } + + public ExemptNested editOrNewExempt() { + return withNewExemptLike(java.util.Optional.ofNullable(buildExempt()).orElse(new V1beta3ExemptPriorityLevelConfigurationBuilder().build())); + } + + public ExemptNested editOrNewExemptLike(V1beta3ExemptPriorityLevelConfiguration item) { + return withNewExemptLike(java.util.Optional.ofNullable(buildExempt()).orElse(item)); + } + + public V1beta3LimitedPriorityLevelConfiguration buildLimited() { + return this.limited != null ? this.limited.build() : null; + } + + public A withLimited(V1beta3LimitedPriorityLevelConfiguration limited) { + this._visitables.remove("limited"); + if (limited != null) { + this.limited = new V1beta3LimitedPriorityLevelConfigurationBuilder(limited); + this._visitables.get("limited").add(this.limited); + } else { + this.limited = null; + this._visitables.get("limited").remove(this.limited); + } + return (A) this; + } + + public boolean hasLimited() { + return this.limited != null; + } + + public LimitedNested withNewLimited() { + return new LimitedNested(null); + } + + public LimitedNested withNewLimitedLike(V1beta3LimitedPriorityLevelConfiguration item) { + return new LimitedNested(item); + } + + public LimitedNested editLimited() { + return withNewLimitedLike(java.util.Optional.ofNullable(buildLimited()).orElse(null)); + } + + public LimitedNested editOrNewLimited() { + return withNewLimitedLike(java.util.Optional.ofNullable(buildLimited()).orElse(new V1beta3LimitedPriorityLevelConfigurationBuilder().build())); + } + + public LimitedNested editOrNewLimitedLike(V1beta3LimitedPriorityLevelConfiguration item) { + return withNewLimitedLike(java.util.Optional.ofNullable(buildLimited()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3PriorityLevelConfigurationSpecFluent that = (V1beta3PriorityLevelConfigurationSpecFluent) o; + if (!java.util.Objects.equals(exempt, that.exempt)) return false; + if (!java.util.Objects.equals(limited, that.limited)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(exempt, limited, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (exempt != null) { sb.append("exempt:"); sb.append(exempt + ","); } + if (limited != null) { sb.append("limited:"); sb.append(limited + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class ExemptNested extends V1beta3ExemptPriorityLevelConfigurationFluent> implements Nested{ + ExemptNested(V1beta3ExemptPriorityLevelConfiguration item) { + this.builder = new V1beta3ExemptPriorityLevelConfigurationBuilder(this, item); + } + V1beta3ExemptPriorityLevelConfigurationBuilder builder; + + public N and() { + return (N) V1beta3PriorityLevelConfigurationSpecFluent.this.withExempt(builder.build()); + } + public N endExempt() { + return and(); + } + + } + public class LimitedNested extends V1beta3LimitedPriorityLevelConfigurationFluent> implements Nested{ + LimitedNested(V1beta3LimitedPriorityLevelConfiguration item) { + this.builder = new V1beta3LimitedPriorityLevelConfigurationBuilder(this, item); + } + V1beta3LimitedPriorityLevelConfigurationBuilder builder; + + public N and() { + return (N) V1beta3PriorityLevelConfigurationSpecFluent.this.withLimited(builder.build()); + } + + public N endLimited() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecFluentImpl.java deleted file mode 100644 index 6aa088b3b9..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationSpecFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3PriorityLevelConfigurationSpecFluentImpl> extends BaseFluent implements V1beta3PriorityLevelConfigurationSpecFluent{ - public V1beta3PriorityLevelConfigurationSpecFluentImpl() { - } - public V1beta3PriorityLevelConfigurationSpecFluentImpl(V1beta3PriorityLevelConfigurationSpec instance) { - if (instance != null) { - this.withLimited(instance.getLimited()); - this.withType(instance.getType()); - } - } - private V1beta3LimitedPriorityLevelConfigurationBuilder limited; - private String type; - - /** - * This method has been deprecated, please use method buildLimited instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3LimitedPriorityLevelConfiguration getLimited() { - return this.limited!=null ?this.limited.build():null; - } - public V1beta3LimitedPriorityLevelConfiguration buildLimited() { - return this.limited!=null ?this.limited.build():null; - } - public A withLimited(V1beta3LimitedPriorityLevelConfiguration limited) { - _visitables.get("limited").remove(this.limited); - if (limited!=null){ this.limited= new V1beta3LimitedPriorityLevelConfigurationBuilder(limited); _visitables.get("limited").add(this.limited);} else { this.limited = null; _visitables.get("limited").remove(this.limited); } return (A) this; - } - public Boolean hasLimited() { - return this.limited != null; - } - public V1beta3PriorityLevelConfigurationSpecFluentImpl.LimitedNested withNewLimited() { - return new V1beta3PriorityLevelConfigurationSpecFluentImpl.LimitedNestedImpl(); - } - public V1beta3PriorityLevelConfigurationSpecFluentImpl.LimitedNested withNewLimitedLike(V1beta3LimitedPriorityLevelConfiguration item) { - return new V1beta3PriorityLevelConfigurationSpecFluentImpl.LimitedNestedImpl(item); - } - public V1beta3PriorityLevelConfigurationSpecFluentImpl.LimitedNested editLimited() { - return withNewLimitedLike(getLimited()); - } - public V1beta3PriorityLevelConfigurationSpecFluentImpl.LimitedNested editOrNewLimited() { - return withNewLimitedLike(getLimited() != null ? getLimited(): new V1beta3LimitedPriorityLevelConfigurationBuilder().build()); - } - public V1beta3PriorityLevelConfigurationSpecFluentImpl.LimitedNested editOrNewLimitedLike(V1beta3LimitedPriorityLevelConfiguration item) { - return withNewLimitedLike(getLimited() != null ? getLimited(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3PriorityLevelConfigurationSpecFluentImpl that = (V1beta3PriorityLevelConfigurationSpecFluentImpl) o; - if (!java.util.Objects.equals(limited, that.limited)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(limited, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (limited != null) { sb.append("limited:"); sb.append(limited + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class LimitedNestedImpl extends V1beta3LimitedPriorityLevelConfigurationFluentImpl> implements V1beta3PriorityLevelConfigurationSpecFluentImpl.LimitedNested,Nested{ - LimitedNestedImpl(V1beta3LimitedPriorityLevelConfiguration item) { - this.builder = new V1beta3LimitedPriorityLevelConfigurationBuilder(this, item); - } - LimitedNestedImpl() { - this.builder = new V1beta3LimitedPriorityLevelConfigurationBuilder(this); - } - V1beta3LimitedPriorityLevelConfigurationBuilder builder; - public N and() { - return (N) V1beta3PriorityLevelConfigurationSpecFluentImpl.this.withLimited(builder.build()); - } - public N endLimited() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusBuilder.java index 1db8a6522f..c5d491cb26 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3PriorityLevelConfigurationStatusBuilder extends V1beta3PriorityLevelConfigurationStatusFluentImpl implements VisitableBuilder{ +public class V1beta3PriorityLevelConfigurationStatusBuilder extends V1beta3PriorityLevelConfigurationStatusFluent implements VisitableBuilder{ public V1beta3PriorityLevelConfigurationStatusBuilder() { - this(false); - } - public V1beta3PriorityLevelConfigurationStatusBuilder(Boolean validationEnabled) { - this(new V1beta3PriorityLevelConfigurationStatus(), validationEnabled); + this(new V1beta3PriorityLevelConfigurationStatus()); } + public V1beta3PriorityLevelConfigurationStatusBuilder(V1beta3PriorityLevelConfigurationStatusFluent fluent) { - this(fluent, false); - } - public V1beta3PriorityLevelConfigurationStatusBuilder(V1beta3PriorityLevelConfigurationStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3PriorityLevelConfigurationStatus(), validationEnabled); + this(fluent, new V1beta3PriorityLevelConfigurationStatus()); } + public V1beta3PriorityLevelConfigurationStatusBuilder(V1beta3PriorityLevelConfigurationStatusFluent fluent,V1beta3PriorityLevelConfigurationStatus instance) { - this(fluent, instance, false); - } - public V1beta3PriorityLevelConfigurationStatusBuilder(V1beta3PriorityLevelConfigurationStatusFluent fluent,V1beta3PriorityLevelConfigurationStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3PriorityLevelConfigurationStatusBuilder(V1beta3PriorityLevelConfigurationStatus instance) { - this(instance,false); - } - public V1beta3PriorityLevelConfigurationStatusBuilder(V1beta3PriorityLevelConfigurationStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3PriorityLevelConfigurationStatusFluent fluent; - Boolean validationEnabled; + public V1beta3PriorityLevelConfigurationStatus build() { V1beta3PriorityLevelConfigurationStatus buildable = new V1beta3PriorityLevelConfigurationStatus(); - buildable.setConditions(fluent.getConditions()); + buildable.setConditions(fluent.buildConditions()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusFluent.java index 86085bb0c3..62bebdf577 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusFluent.java @@ -1,55 +1,225 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3PriorityLevelConfigurationStatusFluent> extends Fluent{ - public A addToConditions(int index,V1beta3PriorityLevelConfigurationCondition item); - public A setToConditions(int index,V1beta3PriorityLevelConfigurationCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V1beta3PriorityLevelConfigurationCondition buildCondition(int index); - public V1beta3PriorityLevelConfigurationCondition buildFirstCondition(); - public V1beta3PriorityLevelConfigurationCondition buildLastCondition(); - public V1beta3PriorityLevelConfigurationCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition... conditions); - public Boolean hasConditions(); - public V1beta3PriorityLevelConfigurationStatusFluent.ConditionsNested addNewCondition(); - public V1beta3PriorityLevelConfigurationStatusFluent.ConditionsNested addNewConditionLike(V1beta3PriorityLevelConfigurationCondition item); - public V1beta3PriorityLevelConfigurationStatusFluent.ConditionsNested setNewConditionLike(int index,V1beta3PriorityLevelConfigurationCondition item); - public V1beta3PriorityLevelConfigurationStatusFluent.ConditionsNested editCondition(int index); - public V1beta3PriorityLevelConfigurationStatusFluent.ConditionsNested editFirstCondition(); - public V1beta3PriorityLevelConfigurationStatusFluent.ConditionsNested editLastCondition(); - public V1beta3PriorityLevelConfigurationStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public interface ConditionsNested extends Nested,V1beta3PriorityLevelConfigurationConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3PriorityLevelConfigurationStatusFluent> extends BaseFluent{ + public V1beta3PriorityLevelConfigurationStatusFluent() { + } + + public V1beta3PriorityLevelConfigurationStatusFluent(V1beta3PriorityLevelConfigurationStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + + protected void copyInstance(V1beta3PriorityLevelConfigurationStatus instance) { + instance = (instance != null ? instance : new V1beta3PriorityLevelConfigurationStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + } + } + + public A addToConditions(int index,V1beta3PriorityLevelConfigurationCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V1beta3PriorityLevelConfigurationCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1beta3PriorityLevelConfigurationCondition item : items) {V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V1beta3PriorityLevelConfigurationCondition item : items) {V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition... items) { + if (this.conditions == null) return (A)this; + for (V1beta3PriorityLevelConfigurationCondition item : items) {V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V1beta3PriorityLevelConfigurationCondition item : items) {V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V1beta3PriorityLevelConfigurationConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V1beta3PriorityLevelConfigurationCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V1beta3PriorityLevelConfigurationCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V1beta3PriorityLevelConfigurationCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V1beta3PriorityLevelConfigurationCondition buildMatchingCondition(Predicate predicate) { + for (V1beta3PriorityLevelConfigurationConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V1beta3PriorityLevelConfigurationConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; } + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V1beta3PriorityLevelConfigurationCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V1beta3PriorityLevelConfigurationCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V1beta3PriorityLevelConfigurationCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V1beta3PriorityLevelConfigurationCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i extends V1beta3PriorityLevelConfigurationConditionFluent> implements Nested{ + ConditionsNested(int index,V1beta3PriorityLevelConfigurationCondition item) { + this.index = index; + this.builder = new V1beta3PriorityLevelConfigurationConditionBuilder(this, item); + } + V1beta3PriorityLevelConfigurationConditionBuilder builder; + int index; + + public N and() { + return (N) V1beta3PriorityLevelConfigurationStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusFluentImpl.java deleted file mode 100644 index 0522c15c0e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3PriorityLevelConfigurationStatusFluentImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3PriorityLevelConfigurationStatusFluentImpl> extends BaseFluent implements V1beta3PriorityLevelConfigurationStatusFluent{ - public V1beta3PriorityLevelConfigurationStatusFluentImpl() { - } - public V1beta3PriorityLevelConfigurationStatusFluentImpl(V1beta3PriorityLevelConfigurationStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - } - } - private ArrayList conditions; - public A addToConditions(int index,V1beta3PriorityLevelConfigurationCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V1beta3PriorityLevelConfigurationCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1beta3PriorityLevelConfigurationCondition item : items) {V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V1beta3PriorityLevelConfigurationCondition item : items) {V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition... items) { - for (V1beta3PriorityLevelConfigurationCondition item : items) {V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V1beta3PriorityLevelConfigurationCondition item : items) {V1beta3PriorityLevelConfigurationConditionBuilder builder = new V1beta3PriorityLevelConfigurationConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V1beta3PriorityLevelConfigurationConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V1beta3PriorityLevelConfigurationCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V1beta3PriorityLevelConfigurationCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V1beta3PriorityLevelConfigurationCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V1beta3PriorityLevelConfigurationCondition buildMatchingCondition(Predicate predicate) { - for (V1beta3PriorityLevelConfigurationConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V1beta3PriorityLevelConfigurationConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V1beta3PriorityLevelConfigurationCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V1beta3PriorityLevelConfigurationCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V1beta3PriorityLevelConfigurationCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNested addNewCondition() { - return new V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNestedImpl(); - } - public V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNested addNewConditionLike(V1beta3PriorityLevelConfigurationCondition item) { - return new V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V1beta3PriorityLevelConfigurationCondition item) { - return new V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i extends V1beta3PriorityLevelConfigurationConditionFluentImpl> implements V1beta3PriorityLevelConfigurationStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V1beta3PriorityLevelConfigurationCondition item) { - this.index = index; - this.builder = new V1beta3PriorityLevelConfigurationConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V1beta3PriorityLevelConfigurationConditionBuilder(this); - } - V1beta3PriorityLevelConfigurationConditionBuilder builder; - int index; - public N and() { - return (N) V1beta3PriorityLevelConfigurationStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationBuilder.java index 1e8bef711e..3d68ffd3fb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3QueuingConfigurationBuilder extends V1beta3QueuingConfigurationFluentImpl implements VisitableBuilder{ +public class V1beta3QueuingConfigurationBuilder extends V1beta3QueuingConfigurationFluent implements VisitableBuilder{ public V1beta3QueuingConfigurationBuilder() { - this(false); - } - public V1beta3QueuingConfigurationBuilder(Boolean validationEnabled) { - this(new V1beta3QueuingConfiguration(), validationEnabled); + this(new V1beta3QueuingConfiguration()); } + public V1beta3QueuingConfigurationBuilder(V1beta3QueuingConfigurationFluent fluent) { - this(fluent, false); - } - public V1beta3QueuingConfigurationBuilder(V1beta3QueuingConfigurationFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3QueuingConfiguration(), validationEnabled); + this(fluent, new V1beta3QueuingConfiguration()); } + public V1beta3QueuingConfigurationBuilder(V1beta3QueuingConfigurationFluent fluent,V1beta3QueuingConfiguration instance) { - this(fluent, instance, false); - } - public V1beta3QueuingConfigurationBuilder(V1beta3QueuingConfigurationFluent fluent,V1beta3QueuingConfiguration instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withHandSize(instance.getHandSize()); - fluent.withQueueLengthLimit(instance.getQueueLengthLimit()); - fluent.withQueues(instance.getQueues()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3QueuingConfigurationBuilder(V1beta3QueuingConfiguration instance) { - this(instance,false); - } - public V1beta3QueuingConfigurationBuilder(V1beta3QueuingConfiguration instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withHandSize(instance.getHandSize()); - this.withQueueLengthLimit(instance.getQueueLengthLimit()); - this.withQueues(instance.getQueues()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3QueuingConfigurationFluent fluent; - Boolean validationEnabled; + public V1beta3QueuingConfiguration build() { V1beta3QueuingConfiguration buildable = new V1beta3QueuingConfiguration(); buildable.setHandSize(fluent.getHandSize()); @@ -49,4 +29,5 @@ public V1beta3QueuingConfiguration build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationFluent.java index 2b5d7dc66f..d68d3d2e38 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationFluent.java @@ -1,22 +1,98 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; -import java.lang.Boolean; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; +import java.lang.String; - /** - * Generated - */ -public interface V1beta3QueuingConfigurationFluent> extends Fluent{ - public Integer getHandSize(); - public A withHandSize(Integer handSize); - public Boolean hasHandSize(); - public Integer getQueueLengthLimit(); - public A withQueueLengthLimit(Integer queueLengthLimit); - public Boolean hasQueueLengthLimit(); - public Integer getQueues(); - public A withQueues(Integer queues); - public Boolean hasQueues(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3QueuingConfigurationFluent> extends BaseFluent{ + public V1beta3QueuingConfigurationFluent() { + } + public V1beta3QueuingConfigurationFluent(V1beta3QueuingConfiguration instance) { + this.copyInstance(instance); + } + private Integer handSize; + private Integer queueLengthLimit; + private Integer queues; + + protected void copyInstance(V1beta3QueuingConfiguration instance) { + instance = (instance != null ? instance : new V1beta3QueuingConfiguration()); + if (instance != null) { + this.withHandSize(instance.getHandSize()); + this.withQueueLengthLimit(instance.getQueueLengthLimit()); + this.withQueues(instance.getQueues()); + } + } + + public Integer getHandSize() { + return this.handSize; + } + + public A withHandSize(Integer handSize) { + this.handSize = handSize; + return (A) this; + } + + public boolean hasHandSize() { + return this.handSize != null; + } + + public Integer getQueueLengthLimit() { + return this.queueLengthLimit; + } + + public A withQueueLengthLimit(Integer queueLengthLimit) { + this.queueLengthLimit = queueLengthLimit; + return (A) this; + } + + public boolean hasQueueLengthLimit() { + return this.queueLengthLimit != null; + } + + public Integer getQueues() { + return this.queues; + } + + public A withQueues(Integer queues) { + this.queues = queues; + return (A) this; + } + + public boolean hasQueues() { + return this.queues != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3QueuingConfigurationFluent that = (V1beta3QueuingConfigurationFluent) o; + if (!java.util.Objects.equals(handSize, that.handSize)) return false; + if (!java.util.Objects.equals(queueLengthLimit, that.queueLengthLimit)) return false; + if (!java.util.Objects.equals(queues, that.queues)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(handSize, queueLengthLimit, queues, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (handSize != null) { sb.append("handSize:"); sb.append(handSize + ","); } + if (queueLengthLimit != null) { sb.append("queueLengthLimit:"); sb.append(queueLengthLimit + ","); } + if (queues != null) { sb.append("queues:"); sb.append(queues); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationFluentImpl.java deleted file mode 100644 index fc2162f48f..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3QueuingConfigurationFluentImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3QueuingConfigurationFluentImpl> extends BaseFluent implements V1beta3QueuingConfigurationFluent{ - public V1beta3QueuingConfigurationFluentImpl() { - } - public V1beta3QueuingConfigurationFluentImpl(V1beta3QueuingConfiguration instance) { - if (instance != null) { - this.withHandSize(instance.getHandSize()); - this.withQueueLengthLimit(instance.getQueueLengthLimit()); - this.withQueues(instance.getQueues()); - } - } - private Integer handSize; - private Integer queueLengthLimit; - private Integer queues; - public Integer getHandSize() { - return this.handSize; - } - public A withHandSize(Integer handSize) { - this.handSize=handSize; return (A) this; - } - public Boolean hasHandSize() { - return this.handSize != null; - } - public Integer getQueueLengthLimit() { - return this.queueLengthLimit; - } - public A withQueueLengthLimit(Integer queueLengthLimit) { - this.queueLengthLimit=queueLengthLimit; return (A) this; - } - public Boolean hasQueueLengthLimit() { - return this.queueLengthLimit != null; - } - public Integer getQueues() { - return this.queues; - } - public A withQueues(Integer queues) { - this.queues=queues; return (A) this; - } - public Boolean hasQueues() { - return this.queues != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3QueuingConfigurationFluentImpl that = (V1beta3QueuingConfigurationFluentImpl) o; - if (!java.util.Objects.equals(handSize, that.handSize)) return false; - - if (!java.util.Objects.equals(queueLengthLimit, that.queueLengthLimit)) return false; - - if (!java.util.Objects.equals(queues, that.queues)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(handSize, queueLengthLimit, queues, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (handSize != null) { sb.append("handSize:"); sb.append(handSize + ","); } - if (queueLengthLimit != null) { sb.append("queueLengthLimit:"); sb.append(queueLengthLimit + ","); } - if (queues != null) { sb.append("queues:"); sb.append(queues); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleBuilder.java index c4959862c5..17fd9d3588 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3ResourcePolicyRuleBuilder extends V1beta3ResourcePolicyRuleFluentImpl implements VisitableBuilder{ +public class V1beta3ResourcePolicyRuleBuilder extends V1beta3ResourcePolicyRuleFluent implements VisitableBuilder{ public V1beta3ResourcePolicyRuleBuilder() { - this(false); - } - public V1beta3ResourcePolicyRuleBuilder(Boolean validationEnabled) { - this(new V1beta3ResourcePolicyRule(), validationEnabled); + this(new V1beta3ResourcePolicyRule()); } + public V1beta3ResourcePolicyRuleBuilder(V1beta3ResourcePolicyRuleFluent fluent) { - this(fluent, false); - } - public V1beta3ResourcePolicyRuleBuilder(V1beta3ResourcePolicyRuleFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3ResourcePolicyRule(), validationEnabled); + this(fluent, new V1beta3ResourcePolicyRule()); } + public V1beta3ResourcePolicyRuleBuilder(V1beta3ResourcePolicyRuleFluent fluent,V1beta3ResourcePolicyRule instance) { - this(fluent, instance, false); - } - public V1beta3ResourcePolicyRuleBuilder(V1beta3ResourcePolicyRuleFluent fluent,V1beta3ResourcePolicyRule instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiGroups(instance.getApiGroups()); - fluent.withClusterScope(instance.getClusterScope()); - fluent.withNamespaces(instance.getNamespaces()); - fluent.withResources(instance.getResources()); - fluent.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3ResourcePolicyRuleBuilder(V1beta3ResourcePolicyRule instance) { - this(instance,false); - } - public V1beta3ResourcePolicyRuleBuilder(V1beta3ResourcePolicyRule instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withClusterScope(instance.getClusterScope()); - this.withNamespaces(instance.getNamespaces()); - this.withResources(instance.getResources()); - this.withVerbs(instance.getVerbs()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3ResourcePolicyRuleFluent fluent; - Boolean validationEnabled; + public V1beta3ResourcePolicyRule build() { V1beta3ResourcePolicyRule buildable = new V1beta3ResourcePolicyRule(); buildable.setApiGroups(fluent.getApiGroups()); @@ -55,4 +31,5 @@ public V1beta3ResourcePolicyRule build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleFluent.java index 3a52a8e890..f9f853671a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleFluent.java @@ -1,81 +1,464 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import java.util.ArrayList; import java.util.Collection; +import java.lang.Object; import java.util.List; import java.lang.String; import java.lang.Boolean; import java.util.function.Predicate; - /** - * Generated - */ -public interface V1beta3ResourcePolicyRuleFluent> extends Fluent{ - public A addToApiGroups(int index,String item); - public A setToApiGroups(int index,String item); - public A addToApiGroups(java.lang.String... items); - public A addAllToApiGroups(Collection items); - public A removeFromApiGroups(java.lang.String... items); - public A removeAllFromApiGroups(Collection items); - public List getApiGroups(); - public String getApiGroup(int index); - public String getFirstApiGroup(); - public String getLastApiGroup(); - public String getMatchingApiGroup(Predicate predicate); - public Boolean hasMatchingApiGroup(Predicate predicate); - public A withApiGroups(List apiGroups); - public A withApiGroups(java.lang.String... apiGroups); - public Boolean hasApiGroups(); - public Boolean getClusterScope(); - public A withClusterScope(Boolean clusterScope); - public Boolean hasClusterScope(); - public A addToNamespaces(int index,String item); - public A setToNamespaces(int index,String item); - public A addToNamespaces(java.lang.String... items); - public A addAllToNamespaces(Collection items); - public A removeFromNamespaces(java.lang.String... items); - public A removeAllFromNamespaces(Collection items); - public List getNamespaces(); - public String getNamespace(int index); - public String getFirstNamespace(); - public String getLastNamespace(); - public String getMatchingNamespace(Predicate predicate); - public Boolean hasMatchingNamespace(Predicate predicate); - public A withNamespaces(List namespaces); - public A withNamespaces(java.lang.String... namespaces); - public Boolean hasNamespaces(); - public A addToResources(int index,String item); - public A setToResources(int index,String item); - public A addToResources(java.lang.String... items); - public A addAllToResources(Collection items); - public A removeFromResources(java.lang.String... items); - public A removeAllFromResources(Collection items); - public List getResources(); - public String getResource(int index); - public String getFirstResource(); - public String getLastResource(); - public String getMatchingResource(Predicate predicate); - public Boolean hasMatchingResource(Predicate predicate); - public A withResources(List resources); - public A withResources(java.lang.String... resources); - public Boolean hasResources(); - public A addToVerbs(int index,String item); - public A setToVerbs(int index,String item); - public A addToVerbs(java.lang.String... items); - public A addAllToVerbs(Collection items); - public A removeFromVerbs(java.lang.String... items); - public A removeAllFromVerbs(Collection items); - public List getVerbs(); - public String getVerb(int index); - public String getFirstVerb(); - public String getLastVerb(); - public String getMatchingVerb(Predicate predicate); - public Boolean hasMatchingVerb(Predicate predicate); - public A withVerbs(List verbs); - public A withVerbs(java.lang.String... verbs); - public Boolean hasVerbs(); - public A withClusterScope(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3ResourcePolicyRuleFluent> extends BaseFluent{ + public V1beta3ResourcePolicyRuleFluent() { + } + public V1beta3ResourcePolicyRuleFluent(V1beta3ResourcePolicyRule instance) { + this.copyInstance(instance); + } + private List apiGroups; + private Boolean clusterScope; + private List namespaces; + private List resources; + private List verbs; + + protected void copyInstance(V1beta3ResourcePolicyRule instance) { + instance = (instance != null ? instance : new V1beta3ResourcePolicyRule()); + if (instance != null) { + this.withApiGroups(instance.getApiGroups()); + this.withClusterScope(instance.getClusterScope()); + this.withNamespaces(instance.getNamespaces()); + this.withResources(instance.getResources()); + this.withVerbs(instance.getVerbs()); + } + } + + public A addToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.add(index, item); + return (A)this; + } + + public A setToApiGroups(int index,String item) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + this.apiGroups.set(index, item); return (A)this; + } + + public A addToApiGroups(java.lang.String... items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A addAllToApiGroups(Collection items) { + if (this.apiGroups == null) {this.apiGroups = new ArrayList();} + for (String item : items) {this.apiGroups.add(item);} return (A)this; + } + + public A removeFromApiGroups(java.lang.String... items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public A removeAllFromApiGroups(Collection items) { + if (this.apiGroups == null) return (A)this; + for (String item : items) { this.apiGroups.remove(item);} return (A)this; + } + + public List getApiGroups() { + return this.apiGroups; + } + + public String getApiGroup(int index) { + return this.apiGroups.get(index); + } + + public String getFirstApiGroup() { + return this.apiGroups.get(0); + } + + public String getLastApiGroup() { + return this.apiGroups.get(apiGroups.size() - 1); + } + + public String getMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingApiGroup(Predicate predicate) { + for (String item : apiGroups) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withApiGroups(List apiGroups) { + if (apiGroups != null) { + this.apiGroups = new ArrayList(); + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } else { + this.apiGroups = null; + } + return (A) this; + } + + public A withApiGroups(java.lang.String... apiGroups) { + if (this.apiGroups != null) { + this.apiGroups.clear(); + _visitables.remove("apiGroups"); + } + if (apiGroups != null) { + for (String item : apiGroups) { + this.addToApiGroups(item); + } + } + return (A) this; + } + + public boolean hasApiGroups() { + return this.apiGroups != null && !this.apiGroups.isEmpty(); + } + + public Boolean getClusterScope() { + return this.clusterScope; + } + + public A withClusterScope(Boolean clusterScope) { + this.clusterScope = clusterScope; + return (A) this; + } + + public boolean hasClusterScope() { + return this.clusterScope != null; + } + + public A addToNamespaces(int index,String item) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + this.namespaces.add(index, item); + return (A)this; + } + + public A setToNamespaces(int index,String item) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + this.namespaces.set(index, item); return (A)this; + } + + public A addToNamespaces(java.lang.String... items) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + for (String item : items) {this.namespaces.add(item);} return (A)this; + } + + public A addAllToNamespaces(Collection items) { + if (this.namespaces == null) {this.namespaces = new ArrayList();} + for (String item : items) {this.namespaces.add(item);} return (A)this; + } + + public A removeFromNamespaces(java.lang.String... items) { + if (this.namespaces == null) return (A)this; + for (String item : items) { this.namespaces.remove(item);} return (A)this; + } + + public A removeAllFromNamespaces(Collection items) { + if (this.namespaces == null) return (A)this; + for (String item : items) { this.namespaces.remove(item);} return (A)this; + } + + public List getNamespaces() { + return this.namespaces; + } + + public String getNamespace(int index) { + return this.namespaces.get(index); + } + + public String getFirstNamespace() { + return this.namespaces.get(0); + } + + public String getLastNamespace() { + return this.namespaces.get(namespaces.size() - 1); + } + + public String getMatchingNamespace(Predicate predicate) { + for (String item : namespaces) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingNamespace(Predicate predicate) { + for (String item : namespaces) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withNamespaces(List namespaces) { + if (namespaces != null) { + this.namespaces = new ArrayList(); + for (String item : namespaces) { + this.addToNamespaces(item); + } + } else { + this.namespaces = null; + } + return (A) this; + } + + public A withNamespaces(java.lang.String... namespaces) { + if (this.namespaces != null) { + this.namespaces.clear(); + _visitables.remove("namespaces"); + } + if (namespaces != null) { + for (String item : namespaces) { + this.addToNamespaces(item); + } + } + return (A) this; + } + + public boolean hasNamespaces() { + return this.namespaces != null && !this.namespaces.isEmpty(); + } + + public A addToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.add(index, item); + return (A)this; + } + + public A setToResources(int index,String item) { + if (this.resources == null) {this.resources = new ArrayList();} + this.resources.set(index, item); return (A)this; + } + + public A addToResources(java.lang.String... items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A addAllToResources(Collection items) { + if (this.resources == null) {this.resources = new ArrayList();} + for (String item : items) {this.resources.add(item);} return (A)this; + } + + public A removeFromResources(java.lang.String... items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public A removeAllFromResources(Collection items) { + if (this.resources == null) return (A)this; + for (String item : items) { this.resources.remove(item);} return (A)this; + } + + public List getResources() { + return this.resources; + } + + public String getResource(int index) { + return this.resources.get(index); + } + + public String getFirstResource() { + return this.resources.get(0); + } + + public String getLastResource() { + return this.resources.get(resources.size() - 1); + } + + public String getMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingResource(Predicate predicate) { + for (String item : resources) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withResources(List resources) { + if (resources != null) { + this.resources = new ArrayList(); + for (String item : resources) { + this.addToResources(item); + } + } else { + this.resources = null; + } + return (A) this; + } + + public A withResources(java.lang.String... resources) { + if (this.resources != null) { + this.resources.clear(); + _visitables.remove("resources"); + } + if (resources != null) { + for (String item : resources) { + this.addToResources(item); + } + } + return (A) this; + } + + public boolean hasResources() { + return this.resources != null && !this.resources.isEmpty(); + } + + public A addToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.add(index, item); + return (A)this; + } + + public A setToVerbs(int index,String item) { + if (this.verbs == null) {this.verbs = new ArrayList();} + this.verbs.set(index, item); return (A)this; + } + + public A addToVerbs(java.lang.String... items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A addAllToVerbs(Collection items) { + if (this.verbs == null) {this.verbs = new ArrayList();} + for (String item : items) {this.verbs.add(item);} return (A)this; + } + + public A removeFromVerbs(java.lang.String... items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public A removeAllFromVerbs(Collection items) { + if (this.verbs == null) return (A)this; + for (String item : items) { this.verbs.remove(item);} return (A)this; + } + + public List getVerbs() { + return this.verbs; + } + + public String getVerb(int index) { + return this.verbs.get(index); + } + + public String getFirstVerb() { + return this.verbs.get(0); + } + + public String getLastVerb() { + return this.verbs.get(verbs.size() - 1); + } + + public String getMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return item; + } + } + return null; + } + + public boolean hasMatchingVerb(Predicate predicate) { + for (String item : verbs) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withVerbs(List verbs) { + if (verbs != null) { + this.verbs = new ArrayList(); + for (String item : verbs) { + this.addToVerbs(item); + } + } else { + this.verbs = null; + } + return (A) this; + } + + public A withVerbs(java.lang.String... verbs) { + if (this.verbs != null) { + this.verbs.clear(); + _visitables.remove("verbs"); + } + if (verbs != null) { + for (String item : verbs) { + this.addToVerbs(item); + } + } + return (A) this; + } + + public boolean hasVerbs() { + return this.verbs != null && !this.verbs.isEmpty(); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3ResourcePolicyRuleFluent that = (V1beta3ResourcePolicyRuleFluent) o; + if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; + if (!java.util.Objects.equals(clusterScope, that.clusterScope)) return false; + if (!java.util.Objects.equals(namespaces, that.namespaces)) return false; + if (!java.util.Objects.equals(resources, that.resources)) return false; + if (!java.util.Objects.equals(verbs, that.verbs)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiGroups, clusterScope, namespaces, resources, verbs, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } + if (clusterScope != null) { sb.append("clusterScope:"); sb.append(clusterScope + ","); } + if (namespaces != null && !namespaces.isEmpty()) { sb.append("namespaces:"); sb.append(namespaces + ","); } + if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } + if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } + sb.append("}"); + return sb.toString(); + } + + public A withClusterScope() { + return withClusterScope(true); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleFluentImpl.java deleted file mode 100644 index b8a18b0140..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ResourcePolicyRuleFluentImpl.java +++ /dev/null @@ -1,282 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.ArrayList; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.String; -import java.lang.Boolean; -import java.util.function.Predicate; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3ResourcePolicyRuleFluentImpl> extends BaseFluent implements V1beta3ResourcePolicyRuleFluent{ - public V1beta3ResourcePolicyRuleFluentImpl() { - } - public V1beta3ResourcePolicyRuleFluentImpl(V1beta3ResourcePolicyRule instance) { - if (instance != null) { - this.withApiGroups(instance.getApiGroups()); - this.withClusterScope(instance.getClusterScope()); - this.withNamespaces(instance.getNamespaces()); - this.withResources(instance.getResources()); - this.withVerbs(instance.getVerbs()); - } - } - private List apiGroups; - private Boolean clusterScope; - private List namespaces; - private List resources; - private List verbs; - public A addToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.add(index, item); - return (A)this; - } - public A setToApiGroups(int index,String item) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - this.apiGroups.set(index, item); return (A)this; - } - public A addToApiGroups(java.lang.String... items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A addAllToApiGroups(Collection items) { - if (this.apiGroups == null) {this.apiGroups = new ArrayList();} - for (String item : items) {this.apiGroups.add(item);} return (A)this; - } - public A removeFromApiGroups(java.lang.String... items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public A removeAllFromApiGroups(Collection items) { - for (String item : items) {if (this.apiGroups!= null){ this.apiGroups.remove(item);}} return (A)this; - } - public List getApiGroups() { - return this.apiGroups; - } - public String getApiGroup(int index) { - return this.apiGroups.get(index); - } - public String getFirstApiGroup() { - return this.apiGroups.get(0); - } - public String getLastApiGroup() { - return this.apiGroups.get(apiGroups.size() - 1); - } - public String getMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingApiGroup(Predicate predicate) { - for (String item: apiGroups) { if(predicate.test(item)){ return true;} } return false; - } - public A withApiGroups(List apiGroups) { - if (apiGroups != null) {this.apiGroups = new ArrayList(); for (String item : apiGroups){this.addToApiGroups(item);}} else { this.apiGroups = null;} return (A) this; - } - public A withApiGroups(java.lang.String... apiGroups) { - if (this.apiGroups != null) {this.apiGroups.clear(); _visitables.remove("apiGroups"); } - if (apiGroups != null) {for (String item :apiGroups){ this.addToApiGroups(item);}} return (A) this; - } - public Boolean hasApiGroups() { - return apiGroups != null && !apiGroups.isEmpty(); - } - public Boolean getClusterScope() { - return this.clusterScope; - } - public A withClusterScope(Boolean clusterScope) { - this.clusterScope=clusterScope; return (A) this; - } - public Boolean hasClusterScope() { - return this.clusterScope != null; - } - public A addToNamespaces(int index,String item) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - this.namespaces.add(index, item); - return (A)this; - } - public A setToNamespaces(int index,String item) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - this.namespaces.set(index, item); return (A)this; - } - public A addToNamespaces(java.lang.String... items) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - for (String item : items) {this.namespaces.add(item);} return (A)this; - } - public A addAllToNamespaces(Collection items) { - if (this.namespaces == null) {this.namespaces = new ArrayList();} - for (String item : items) {this.namespaces.add(item);} return (A)this; - } - public A removeFromNamespaces(java.lang.String... items) { - for (String item : items) {if (this.namespaces!= null){ this.namespaces.remove(item);}} return (A)this; - } - public A removeAllFromNamespaces(Collection items) { - for (String item : items) {if (this.namespaces!= null){ this.namespaces.remove(item);}} return (A)this; - } - public List getNamespaces() { - return this.namespaces; - } - public String getNamespace(int index) { - return this.namespaces.get(index); - } - public String getFirstNamespace() { - return this.namespaces.get(0); - } - public String getLastNamespace() { - return this.namespaces.get(namespaces.size() - 1); - } - public String getMatchingNamespace(Predicate predicate) { - for (String item: namespaces) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingNamespace(Predicate predicate) { - for (String item: namespaces) { if(predicate.test(item)){ return true;} } return false; - } - public A withNamespaces(List namespaces) { - if (namespaces != null) {this.namespaces = new ArrayList(); for (String item : namespaces){this.addToNamespaces(item);}} else { this.namespaces = null;} return (A) this; - } - public A withNamespaces(java.lang.String... namespaces) { - if (this.namespaces != null) {this.namespaces.clear(); _visitables.remove("namespaces"); } - if (namespaces != null) {for (String item :namespaces){ this.addToNamespaces(item);}} return (A) this; - } - public Boolean hasNamespaces() { - return namespaces != null && !namespaces.isEmpty(); - } - public A addToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.add(index, item); - return (A)this; - } - public A setToResources(int index,String item) { - if (this.resources == null) {this.resources = new ArrayList();} - this.resources.set(index, item); return (A)this; - } - public A addToResources(java.lang.String... items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A addAllToResources(Collection items) { - if (this.resources == null) {this.resources = new ArrayList();} - for (String item : items) {this.resources.add(item);} return (A)this; - } - public A removeFromResources(java.lang.String... items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public A removeAllFromResources(Collection items) { - for (String item : items) {if (this.resources!= null){ this.resources.remove(item);}} return (A)this; - } - public List getResources() { - return this.resources; - } - public String getResource(int index) { - return this.resources.get(index); - } - public String getFirstResource() { - return this.resources.get(0); - } - public String getLastResource() { - return this.resources.get(resources.size() - 1); - } - public String getMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingResource(Predicate predicate) { - for (String item: resources) { if(predicate.test(item)){ return true;} } return false; - } - public A withResources(List resources) { - if (resources != null) {this.resources = new ArrayList(); for (String item : resources){this.addToResources(item);}} else { this.resources = null;} return (A) this; - } - public A withResources(java.lang.String... resources) { - if (this.resources != null) {this.resources.clear(); _visitables.remove("resources"); } - if (resources != null) {for (String item :resources){ this.addToResources(item);}} return (A) this; - } - public Boolean hasResources() { - return resources != null && !resources.isEmpty(); - } - public A addToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.add(index, item); - return (A)this; - } - public A setToVerbs(int index,String item) { - if (this.verbs == null) {this.verbs = new ArrayList();} - this.verbs.set(index, item); return (A)this; - } - public A addToVerbs(java.lang.String... items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A addAllToVerbs(Collection items) { - if (this.verbs == null) {this.verbs = new ArrayList();} - for (String item : items) {this.verbs.add(item);} return (A)this; - } - public A removeFromVerbs(java.lang.String... items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public A removeAllFromVerbs(Collection items) { - for (String item : items) {if (this.verbs!= null){ this.verbs.remove(item);}} return (A)this; - } - public List getVerbs() { - return this.verbs; - } - public String getVerb(int index) { - return this.verbs.get(index); - } - public String getFirstVerb() { - return this.verbs.get(0); - } - public String getLastVerb() { - return this.verbs.get(verbs.size() - 1); - } - public String getMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return item;} } return null; - } - public Boolean hasMatchingVerb(Predicate predicate) { - for (String item: verbs) { if(predicate.test(item)){ return true;} } return false; - } - public A withVerbs(List verbs) { - if (verbs != null) {this.verbs = new ArrayList(); for (String item : verbs){this.addToVerbs(item);}} else { this.verbs = null;} return (A) this; - } - public A withVerbs(java.lang.String... verbs) { - if (this.verbs != null) {this.verbs.clear(); _visitables.remove("verbs"); } - if (verbs != null) {for (String item :verbs){ this.addToVerbs(item);}} return (A) this; - } - public Boolean hasVerbs() { - return verbs != null && !verbs.isEmpty(); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3ResourcePolicyRuleFluentImpl that = (V1beta3ResourcePolicyRuleFluentImpl) o; - if (!java.util.Objects.equals(apiGroups, that.apiGroups)) return false; - - if (!java.util.Objects.equals(clusterScope, that.clusterScope)) return false; - - if (!java.util.Objects.equals(namespaces, that.namespaces)) return false; - - if (!java.util.Objects.equals(resources, that.resources)) return false; - - if (!java.util.Objects.equals(verbs, that.verbs)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiGroups, clusterScope, namespaces, resources, verbs, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiGroups != null && !apiGroups.isEmpty()) { sb.append("apiGroups:"); sb.append(apiGroups + ","); } - if (clusterScope != null) { sb.append("clusterScope:"); sb.append(clusterScope + ","); } - if (namespaces != null && !namespaces.isEmpty()) { sb.append("namespaces:"); sb.append(namespaces + ","); } - if (resources != null && !resources.isEmpty()) { sb.append("resources:"); sb.append(resources + ","); } - if (verbs != null && !verbs.isEmpty()) { sb.append("verbs:"); sb.append(verbs); } - sb.append("}"); - return sb.toString(); - } - public A withClusterScope() { - return withClusterScope(true); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectBuilder.java index bf53164728..8c3b61ad87 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectBuilder.java @@ -1,44 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3ServiceAccountSubjectBuilder extends V1beta3ServiceAccountSubjectFluentImpl implements VisitableBuilder{ +public class V1beta3ServiceAccountSubjectBuilder extends V1beta3ServiceAccountSubjectFluent implements VisitableBuilder{ public V1beta3ServiceAccountSubjectBuilder() { - this(false); - } - public V1beta3ServiceAccountSubjectBuilder(Boolean validationEnabled) { - this(new V1beta3ServiceAccountSubject(), validationEnabled); + this(new V1beta3ServiceAccountSubject()); } + public V1beta3ServiceAccountSubjectBuilder(V1beta3ServiceAccountSubjectFluent fluent) { - this(fluent, false); - } - public V1beta3ServiceAccountSubjectBuilder(V1beta3ServiceAccountSubjectFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3ServiceAccountSubject(), validationEnabled); + this(fluent, new V1beta3ServiceAccountSubject()); } + public V1beta3ServiceAccountSubjectBuilder(V1beta3ServiceAccountSubjectFluent fluent,V1beta3ServiceAccountSubject instance) { - this(fluent, instance, false); - } - public V1beta3ServiceAccountSubjectBuilder(V1beta3ServiceAccountSubjectFluent fluent,V1beta3ServiceAccountSubject instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3ServiceAccountSubjectBuilder(V1beta3ServiceAccountSubject instance) { - this(instance,false); - } - public V1beta3ServiceAccountSubjectBuilder(V1beta3ServiceAccountSubject instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3ServiceAccountSubjectFluent fluent; - Boolean validationEnabled; + public V1beta3ServiceAccountSubject build() { V1beta3ServiceAccountSubject buildable = new V1beta3ServiceAccountSubject(); buildable.setName(fluent.getName()); @@ -46,4 +28,5 @@ public V1beta3ServiceAccountSubject build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectFluent.java index ea4d7df2ea..1783211f82 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectFluent.java @@ -1,19 +1,80 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3ServiceAccountSubjectFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - public String getNamespace(); - public A withNamespace(String namespace); - public Boolean hasNamespace(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3ServiceAccountSubjectFluent> extends BaseFluent{ + public V1beta3ServiceAccountSubjectFluent() { + } + public V1beta3ServiceAccountSubjectFluent(V1beta3ServiceAccountSubject instance) { + this.copyInstance(instance); + } + private String name; + private String namespace; + + protected void copyInstance(V1beta3ServiceAccountSubject instance) { + instance = (instance != null ? instance : new V1beta3ServiceAccountSubject()); + if (instance != null) { + this.withName(instance.getName()); + this.withNamespace(instance.getNamespace()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public String getNamespace() { + return this.namespace; + } + + public A withNamespace(String namespace) { + this.namespace = namespace; + return (A) this; + } + + public boolean hasNamespace() { + return this.namespace != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3ServiceAccountSubjectFluent that = (V1beta3ServiceAccountSubjectFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(namespace, that.namespace)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, namespace, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectFluentImpl.java deleted file mode 100644 index da26f91f86..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3ServiceAccountSubjectFluentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3ServiceAccountSubjectFluentImpl> extends BaseFluent implements V1beta3ServiceAccountSubjectFluent{ - public V1beta3ServiceAccountSubjectFluentImpl() { - } - public V1beta3ServiceAccountSubjectFluentImpl(V1beta3ServiceAccountSubject instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withNamespace(instance.getNamespace()); - } - } - private String name; - private String namespace; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public String getNamespace() { - return this.namespace; - } - public A withNamespace(String namespace) { - this.namespace=namespace; return (A) this; - } - public Boolean hasNamespace() { - return this.namespace != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3ServiceAccountSubjectFluentImpl that = (V1beta3ServiceAccountSubjectFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(namespace, that.namespace)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, namespace, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (namespace != null) { sb.append("namespace:"); sb.append(namespace); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectBuilder.java index 6b0d0f74a9..1983339c71 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3SubjectBuilder extends V1beta3SubjectFluentImpl implements VisitableBuilder{ +public class V1beta3SubjectBuilder extends V1beta3SubjectFluent implements VisitableBuilder{ public V1beta3SubjectBuilder() { - this(false); - } - public V1beta3SubjectBuilder(Boolean validationEnabled) { - this(new V1beta3Subject(), validationEnabled); + this(new V1beta3Subject()); } + public V1beta3SubjectBuilder(V1beta3SubjectFluent fluent) { - this(fluent, false); - } - public V1beta3SubjectBuilder(V1beta3SubjectFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3Subject(), validationEnabled); + this(fluent, new V1beta3Subject()); } + public V1beta3SubjectBuilder(V1beta3SubjectFluent fluent,V1beta3Subject instance) { - this(fluent, instance, false); - } - public V1beta3SubjectBuilder(V1beta3SubjectFluent fluent,V1beta3Subject instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withGroup(instance.getGroup()); - fluent.withKind(instance.getKind()); - fluent.withServiceAccount(instance.getServiceAccount()); - fluent.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3SubjectBuilder(V1beta3Subject instance) { - this(instance,false); - } - public V1beta3SubjectBuilder(V1beta3Subject instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withKind(instance.getKind()); - this.withServiceAccount(instance.getServiceAccount()); - this.withUser(instance.getUser()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3SubjectFluent fluent; - Boolean validationEnabled; + public V1beta3Subject build() { V1beta3Subject buildable = new V1beta3Subject(); - buildable.setGroup(fluent.getGroup()); + buildable.setGroup(fluent.buildGroup()); buildable.setKind(fluent.getKind()); - buildable.setServiceAccount(fluent.getServiceAccount()); - buildable.setUser(fluent.getUser()); + buildable.setServiceAccount(fluent.buildServiceAccount()); + buildable.setUser(fluent.buildUser()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectFluent.java index 2a075d2d2d..ee9595846d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectFluent.java @@ -1,78 +1,243 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V1beta3SubjectFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildGroup instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3GroupSubject getGroup(); - public V1beta3GroupSubject buildGroup(); - public A withGroup(V1beta3GroupSubject group); - public Boolean hasGroup(); - public V1beta3SubjectFluent.GroupNested withNewGroup(); - public V1beta3SubjectFluent.GroupNested withNewGroupLike(V1beta3GroupSubject item); - public V1beta3SubjectFluent.GroupNested editGroup(); - public V1beta3SubjectFluent.GroupNested editOrNewGroup(); - public V1beta3SubjectFluent.GroupNested editOrNewGroupLike(V1beta3GroupSubject item); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildServiceAccount instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3ServiceAccountSubject getServiceAccount(); - public V1beta3ServiceAccountSubject buildServiceAccount(); - public A withServiceAccount(V1beta3ServiceAccountSubject serviceAccount); - public Boolean hasServiceAccount(); - public V1beta3SubjectFluent.ServiceAccountNested withNewServiceAccount(); - public V1beta3SubjectFluent.ServiceAccountNested withNewServiceAccountLike(V1beta3ServiceAccountSubject item); - public V1beta3SubjectFluent.ServiceAccountNested editServiceAccount(); - public V1beta3SubjectFluent.ServiceAccountNested editOrNewServiceAccount(); - public V1beta3SubjectFluent.ServiceAccountNested editOrNewServiceAccountLike(V1beta3ServiceAccountSubject item); - - /** - * This method has been deprecated, please use method buildUser instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3UserSubject getUser(); - public V1beta3UserSubject buildUser(); - public A withUser(V1beta3UserSubject user); - public Boolean hasUser(); - public V1beta3SubjectFluent.UserNested withNewUser(); - public V1beta3SubjectFluent.UserNested withNewUserLike(V1beta3UserSubject item); - public V1beta3SubjectFluent.UserNested editUser(); - public V1beta3SubjectFluent.UserNested editOrNewUser(); - public V1beta3SubjectFluent.UserNested editOrNewUserLike(V1beta3UserSubject item); - public interface GroupNested extends Nested,V1beta3GroupSubjectFluent>{ - public N and(); - public N endGroup(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3SubjectFluent> extends BaseFluent{ + public V1beta3SubjectFluent() { + } + + public V1beta3SubjectFluent(V1beta3Subject instance) { + this.copyInstance(instance); + } + private V1beta3GroupSubjectBuilder group; + private String kind; + private V1beta3ServiceAccountSubjectBuilder serviceAccount; + private V1beta3UserSubjectBuilder user; + + protected void copyInstance(V1beta3Subject instance) { + instance = (instance != null ? instance : new V1beta3Subject()); + if (instance != null) { + this.withGroup(instance.getGroup()); + this.withKind(instance.getKind()); + this.withServiceAccount(instance.getServiceAccount()); + this.withUser(instance.getUser()); + } + } + + public V1beta3GroupSubject buildGroup() { + return this.group != null ? this.group.build() : null; + } + + public A withGroup(V1beta3GroupSubject group) { + this._visitables.remove("group"); + if (group != null) { + this.group = new V1beta3GroupSubjectBuilder(group); + this._visitables.get("group").add(this.group); + } else { + this.group = null; + this._visitables.get("group").remove(this.group); + } + return (A) this; + } + + public boolean hasGroup() { + return this.group != null; + } + + public GroupNested withNewGroup() { + return new GroupNested(null); + } + + public GroupNested withNewGroupLike(V1beta3GroupSubject item) { + return new GroupNested(item); + } + + public GroupNested editGroup() { + return withNewGroupLike(java.util.Optional.ofNullable(buildGroup()).orElse(null)); + } + + public GroupNested editOrNewGroup() { + return withNewGroupLike(java.util.Optional.ofNullable(buildGroup()).orElse(new V1beta3GroupSubjectBuilder().build())); + } + + public GroupNested editOrNewGroupLike(V1beta3GroupSubject item) { + return withNewGroupLike(java.util.Optional.ofNullable(buildGroup()).orElse(item)); + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1beta3ServiceAccountSubject buildServiceAccount() { + return this.serviceAccount != null ? this.serviceAccount.build() : null; + } + + public A withServiceAccount(V1beta3ServiceAccountSubject serviceAccount) { + this._visitables.remove("serviceAccount"); + if (serviceAccount != null) { + this.serviceAccount = new V1beta3ServiceAccountSubjectBuilder(serviceAccount); + this._visitables.get("serviceAccount").add(this.serviceAccount); + } else { + this.serviceAccount = null; + this._visitables.get("serviceAccount").remove(this.serviceAccount); + } + return (A) this; + } + + public boolean hasServiceAccount() { + return this.serviceAccount != null; + } + + public ServiceAccountNested withNewServiceAccount() { + return new ServiceAccountNested(null); + } + + public ServiceAccountNested withNewServiceAccountLike(V1beta3ServiceAccountSubject item) { + return new ServiceAccountNested(item); + } + + public ServiceAccountNested editServiceAccount() { + return withNewServiceAccountLike(java.util.Optional.ofNullable(buildServiceAccount()).orElse(null)); + } + + public ServiceAccountNested editOrNewServiceAccount() { + return withNewServiceAccountLike(java.util.Optional.ofNullable(buildServiceAccount()).orElse(new V1beta3ServiceAccountSubjectBuilder().build())); + } + + public ServiceAccountNested editOrNewServiceAccountLike(V1beta3ServiceAccountSubject item) { + return withNewServiceAccountLike(java.util.Optional.ofNullable(buildServiceAccount()).orElse(item)); + } + + public V1beta3UserSubject buildUser() { + return this.user != null ? this.user.build() : null; + } + + public A withUser(V1beta3UserSubject user) { + this._visitables.remove("user"); + if (user != null) { + this.user = new V1beta3UserSubjectBuilder(user); + this._visitables.get("user").add(this.user); + } else { + this.user = null; + this._visitables.get("user").remove(this.user); + } + return (A) this; + } + + public boolean hasUser() { + return this.user != null; + } + + public UserNested withNewUser() { + return new UserNested(null); + } + + public UserNested withNewUserLike(V1beta3UserSubject item) { + return new UserNested(item); + } + + public UserNested editUser() { + return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(null)); + } + + public UserNested editOrNewUser() { + return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(new V1beta3UserSubjectBuilder().build())); } - public interface ServiceAccountNested extends Nested,V1beta3ServiceAccountSubjectFluent>{ - public N and(); - public N endServiceAccount(); + + public UserNested editOrNewUserLike(V1beta3UserSubject item) { + return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3SubjectFluent that = (V1beta3SubjectFluent) o; + if (!java.util.Objects.equals(group, that.group)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(serviceAccount, that.serviceAccount)) return false; + if (!java.util.Objects.equals(user, that.user)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(group, kind, serviceAccount, user, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (group != null) { sb.append("group:"); sb.append(group + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (serviceAccount != null) { sb.append("serviceAccount:"); sb.append(serviceAccount + ","); } + if (user != null) { sb.append("user:"); sb.append(user); } + sb.append("}"); + return sb.toString(); + } + public class GroupNested extends V1beta3GroupSubjectFluent> implements Nested{ + GroupNested(V1beta3GroupSubject item) { + this.builder = new V1beta3GroupSubjectBuilder(this, item); + } + V1beta3GroupSubjectBuilder builder; + + public N and() { + return (N) V1beta3SubjectFluent.this.withGroup(builder.build()); + } + + public N endGroup() { + return and(); + } + } - public interface UserNested extends Nested,V1beta3UserSubjectFluent>{ - public N and(); - public N endUser(); + public class ServiceAccountNested extends V1beta3ServiceAccountSubjectFluent> implements Nested{ + ServiceAccountNested(V1beta3ServiceAccountSubject item) { + this.builder = new V1beta3ServiceAccountSubjectBuilder(this, item); + } + V1beta3ServiceAccountSubjectBuilder builder; + + public N and() { + return (N) V1beta3SubjectFluent.this.withServiceAccount(builder.build()); + } + + public N endServiceAccount() { + return and(); + } + } + public class UserNested extends V1beta3UserSubjectFluent> implements Nested{ + UserNested(V1beta3UserSubject item) { + this.builder = new V1beta3UserSubjectBuilder(this, item); + } + V1beta3UserSubjectBuilder builder; + + public N and() { + return (N) V1beta3SubjectFluent.this.withUser(builder.build()); + } + + public N endUser() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectFluentImpl.java deleted file mode 100644 index 6377ee258b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3SubjectFluentImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3SubjectFluentImpl> extends BaseFluent implements V1beta3SubjectFluent{ - public V1beta3SubjectFluentImpl() { - } - public V1beta3SubjectFluentImpl(V1beta3Subject instance) { - if (instance != null) { - this.withGroup(instance.getGroup()); - this.withKind(instance.getKind()); - this.withServiceAccount(instance.getServiceAccount()); - this.withUser(instance.getUser()); - } - } - private V1beta3GroupSubjectBuilder group; - private String kind; - private V1beta3ServiceAccountSubjectBuilder serviceAccount; - private V1beta3UserSubjectBuilder user; - - /** - * This method has been deprecated, please use method buildGroup instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3GroupSubject getGroup() { - return this.group!=null ?this.group.build():null; - } - public V1beta3GroupSubject buildGroup() { - return this.group!=null ?this.group.build():null; - } - public A withGroup(V1beta3GroupSubject group) { - _visitables.get("group").remove(this.group); - if (group!=null){ this.group= new V1beta3GroupSubjectBuilder(group); _visitables.get("group").add(this.group);} else { this.group = null; _visitables.get("group").remove(this.group); } return (A) this; - } - public Boolean hasGroup() { - return this.group != null; - } - public V1beta3SubjectFluentImpl.GroupNested withNewGroup() { - return new V1beta3SubjectFluentImpl.GroupNestedImpl(); - } - public V1beta3SubjectFluentImpl.GroupNested withNewGroupLike(V1beta3GroupSubject item) { - return new V1beta3SubjectFluentImpl.GroupNestedImpl(item); - } - public V1beta3SubjectFluentImpl.GroupNested editGroup() { - return withNewGroupLike(getGroup()); - } - public V1beta3SubjectFluentImpl.GroupNested editOrNewGroup() { - return withNewGroupLike(getGroup() != null ? getGroup(): new V1beta3GroupSubjectBuilder().build()); - } - public V1beta3SubjectFluentImpl.GroupNested editOrNewGroupLike(V1beta3GroupSubject item) { - return withNewGroupLike(getGroup() != null ? getGroup(): item); - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildServiceAccount instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3ServiceAccountSubject getServiceAccount() { - return this.serviceAccount!=null ?this.serviceAccount.build():null; - } - public V1beta3ServiceAccountSubject buildServiceAccount() { - return this.serviceAccount!=null ?this.serviceAccount.build():null; - } - public A withServiceAccount(V1beta3ServiceAccountSubject serviceAccount) { - _visitables.get("serviceAccount").remove(this.serviceAccount); - if (serviceAccount!=null){ this.serviceAccount= new V1beta3ServiceAccountSubjectBuilder(serviceAccount); _visitables.get("serviceAccount").add(this.serviceAccount);} else { this.serviceAccount = null; _visitables.get("serviceAccount").remove(this.serviceAccount); } return (A) this; - } - public Boolean hasServiceAccount() { - return this.serviceAccount != null; - } - public V1beta3SubjectFluentImpl.ServiceAccountNested withNewServiceAccount() { - return new V1beta3SubjectFluentImpl.ServiceAccountNestedImpl(); - } - public V1beta3SubjectFluentImpl.ServiceAccountNested withNewServiceAccountLike(V1beta3ServiceAccountSubject item) { - return new V1beta3SubjectFluentImpl.ServiceAccountNestedImpl(item); - } - public V1beta3SubjectFluentImpl.ServiceAccountNested editServiceAccount() { - return withNewServiceAccountLike(getServiceAccount()); - } - public V1beta3SubjectFluentImpl.ServiceAccountNested editOrNewServiceAccount() { - return withNewServiceAccountLike(getServiceAccount() != null ? getServiceAccount(): new V1beta3ServiceAccountSubjectBuilder().build()); - } - public V1beta3SubjectFluentImpl.ServiceAccountNested editOrNewServiceAccountLike(V1beta3ServiceAccountSubject item) { - return withNewServiceAccountLike(getServiceAccount() != null ? getServiceAccount(): item); - } - - /** - * This method has been deprecated, please use method buildUser instead. - * @return The buildable object. - */ - @Deprecated - public V1beta3UserSubject getUser() { - return this.user!=null ?this.user.build():null; - } - public V1beta3UserSubject buildUser() { - return this.user!=null ?this.user.build():null; - } - public A withUser(V1beta3UserSubject user) { - _visitables.get("user").remove(this.user); - if (user!=null){ this.user= new V1beta3UserSubjectBuilder(user); _visitables.get("user").add(this.user);} else { this.user = null; _visitables.get("user").remove(this.user); } return (A) this; - } - public Boolean hasUser() { - return this.user != null; - } - public V1beta3SubjectFluentImpl.UserNested withNewUser() { - return new V1beta3SubjectFluentImpl.UserNestedImpl(); - } - public V1beta3SubjectFluentImpl.UserNested withNewUserLike(V1beta3UserSubject item) { - return new V1beta3SubjectFluentImpl.UserNestedImpl(item); - } - public V1beta3SubjectFluentImpl.UserNested editUser() { - return withNewUserLike(getUser()); - } - public V1beta3SubjectFluentImpl.UserNested editOrNewUser() { - return withNewUserLike(getUser() != null ? getUser(): new V1beta3UserSubjectBuilder().build()); - } - public V1beta3SubjectFluentImpl.UserNested editOrNewUserLike(V1beta3UserSubject item) { - return withNewUserLike(getUser() != null ? getUser(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3SubjectFluentImpl that = (V1beta3SubjectFluentImpl) o; - if (!java.util.Objects.equals(group, that.group)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(serviceAccount, that.serviceAccount)) return false; - - if (!java.util.Objects.equals(user, that.user)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(group, kind, serviceAccount, user, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (group != null) { sb.append("group:"); sb.append(group + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (serviceAccount != null) { sb.append("serviceAccount:"); sb.append(serviceAccount + ","); } - if (user != null) { sb.append("user:"); sb.append(user); } - sb.append("}"); - return sb.toString(); - } - class GroupNestedImpl extends V1beta3GroupSubjectFluentImpl> implements V1beta3SubjectFluentImpl.GroupNested,Nested{ - GroupNestedImpl(V1beta3GroupSubject item) { - this.builder = new V1beta3GroupSubjectBuilder(this, item); - } - GroupNestedImpl() { - this.builder = new V1beta3GroupSubjectBuilder(this); - } - V1beta3GroupSubjectBuilder builder; - public N and() { - return (N) V1beta3SubjectFluentImpl.this.withGroup(builder.build()); - } - public N endGroup() { - return and(); - } - - } - class ServiceAccountNestedImpl extends V1beta3ServiceAccountSubjectFluentImpl> implements V1beta3SubjectFluentImpl.ServiceAccountNested,Nested{ - ServiceAccountNestedImpl(V1beta3ServiceAccountSubject item) { - this.builder = new V1beta3ServiceAccountSubjectBuilder(this, item); - } - ServiceAccountNestedImpl() { - this.builder = new V1beta3ServiceAccountSubjectBuilder(this); - } - V1beta3ServiceAccountSubjectBuilder builder; - public N and() { - return (N) V1beta3SubjectFluentImpl.this.withServiceAccount(builder.build()); - } - public N endServiceAccount() { - return and(); - } - - } - class UserNestedImpl extends V1beta3UserSubjectFluentImpl> implements V1beta3SubjectFluentImpl.UserNested,Nested{ - UserNestedImpl(V1beta3UserSubject item) { - this.builder = new V1beta3UserSubjectBuilder(this, item); - } - UserNestedImpl() { - this.builder = new V1beta3UserSubjectBuilder(this); - } - V1beta3UserSubjectBuilder builder; - public N and() { - return (N) V1beta3SubjectFluentImpl.this.withUser(builder.build()); - } - public N endUser() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectBuilder.java index 5197aa7f79..4dbaf3110a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectBuilder.java @@ -1,46 +1,31 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V1beta3UserSubjectBuilder extends V1beta3UserSubjectFluentImpl implements VisitableBuilder{ +public class V1beta3UserSubjectBuilder extends V1beta3UserSubjectFluent implements VisitableBuilder{ public V1beta3UserSubjectBuilder() { - this(false); - } - public V1beta3UserSubjectBuilder(Boolean validationEnabled) { - this(new V1beta3UserSubject(), validationEnabled); + this(new V1beta3UserSubject()); } + public V1beta3UserSubjectBuilder(V1beta3UserSubjectFluent fluent) { - this(fluent, false); - } - public V1beta3UserSubjectBuilder(V1beta3UserSubjectFluent fluent,Boolean validationEnabled) { - this(fluent, new V1beta3UserSubject(), validationEnabled); + this(fluent, new V1beta3UserSubject()); } + public V1beta3UserSubjectBuilder(V1beta3UserSubjectFluent fluent,V1beta3UserSubject instance) { - this(fluent, instance, false); - } - public V1beta3UserSubjectBuilder(V1beta3UserSubjectFluent fluent,V1beta3UserSubject instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V1beta3UserSubjectBuilder(V1beta3UserSubject instance) { - this(instance,false); - } - public V1beta3UserSubjectBuilder(V1beta3UserSubject instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V1beta3UserSubjectFluent fluent; - Boolean validationEnabled; + public V1beta3UserSubject build() { V1beta3UserSubject buildable = new V1beta3UserSubject(); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectFluent.java index 5b2525cd27..da95360bd3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectFluent.java @@ -1,16 +1,63 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V1beta3UserSubjectFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V1beta3UserSubjectFluent> extends BaseFluent{ + public V1beta3UserSubjectFluent() { + } + public V1beta3UserSubjectFluent(V1beta3UserSubject instance) { + this.copyInstance(instance); + } + private String name; + + protected void copyInstance(V1beta3UserSubject instance) { + instance = (instance != null ? instance : new V1beta3UserSubject()); + if (instance != null) { + this.withName(instance.getName()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V1beta3UserSubjectFluent that = (V1beta3UserSubjectFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectFluentImpl.java deleted file mode 100644 index be8880332a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V1beta3UserSubjectFluentImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V1beta3UserSubjectFluentImpl> extends BaseFluent implements V1beta3UserSubjectFluent{ - public V1beta3UserSubjectFluentImpl() { - } - public V1beta3UserSubjectFluentImpl(V1beta3UserSubject instance) { - if (instance != null) { - this.withName(instance.getName()); - } - } - private String name; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V1beta3UserSubjectFluentImpl that = (V1beta3UserSubjectFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceBuilder.java index 4f4affe983..4e52908186 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2ContainerResourceMetricSourceBuilder extends V2ContainerResourceMetricSourceFluentImpl implements VisitableBuilder{ +public class V2ContainerResourceMetricSourceBuilder extends V2ContainerResourceMetricSourceFluent implements VisitableBuilder{ public V2ContainerResourceMetricSourceBuilder() { - this(false); - } - public V2ContainerResourceMetricSourceBuilder(Boolean validationEnabled) { - this(new V2ContainerResourceMetricSource(), validationEnabled); + this(new V2ContainerResourceMetricSource()); } + public V2ContainerResourceMetricSourceBuilder(V2ContainerResourceMetricSourceFluent fluent) { - this(fluent, false); - } - public V2ContainerResourceMetricSourceBuilder(V2ContainerResourceMetricSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V2ContainerResourceMetricSource(), validationEnabled); + this(fluent, new V2ContainerResourceMetricSource()); } + public V2ContainerResourceMetricSourceBuilder(V2ContainerResourceMetricSourceFluent fluent,V2ContainerResourceMetricSource instance) { - this(fluent, instance, false); - } - public V2ContainerResourceMetricSourceBuilder(V2ContainerResourceMetricSourceFluent fluent,V2ContainerResourceMetricSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withContainer(instance.getContainer()); - fluent.withName(instance.getName()); - fluent.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2ContainerResourceMetricSourceBuilder(V2ContainerResourceMetricSource instance) { - this(instance,false); - } - public V2ContainerResourceMetricSourceBuilder(V2ContainerResourceMetricSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withContainer(instance.getContainer()); - this.withName(instance.getName()); - this.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2ContainerResourceMetricSourceFluent fluent; - Boolean validationEnabled; + public V2ContainerResourceMetricSource build() { V2ContainerResourceMetricSource buildable = new V2ContainerResourceMetricSource(); buildable.setContainer(fluent.getContainer()); buildable.setName(fluent.getName()); - buildable.setTarget(fluent.getTarget()); + buildable.setTarget(fluent.buildTarget()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceFluent.java index 3d5226e98c..d4c17a6d93 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceFluent.java @@ -1,41 +1,140 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2ContainerResourceMetricSourceFluent> extends Fluent{ - public String getContainer(); - public A withContainer(String container); - public Boolean hasContainer(); - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget(); - public V2MetricTarget buildTarget(); - public A withTarget(V2MetricTarget target); - public Boolean hasTarget(); - public V2ContainerResourceMetricSourceFluent.TargetNested withNewTarget(); - public V2ContainerResourceMetricSourceFluent.TargetNested withNewTargetLike(V2MetricTarget item); - public V2ContainerResourceMetricSourceFluent.TargetNested editTarget(); - public V2ContainerResourceMetricSourceFluent.TargetNested editOrNewTarget(); - public V2ContainerResourceMetricSourceFluent.TargetNested editOrNewTargetLike(V2MetricTarget item); - public interface TargetNested extends Nested,V2MetricTargetFluent>{ - public N and(); - public N endTarget(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2ContainerResourceMetricSourceFluent> extends BaseFluent{ + public V2ContainerResourceMetricSourceFluent() { + } + + public V2ContainerResourceMetricSourceFluent(V2ContainerResourceMetricSource instance) { + this.copyInstance(instance); + } + private String container; + private String name; + private V2MetricTargetBuilder target; + + protected void copyInstance(V2ContainerResourceMetricSource instance) { + instance = (instance != null ? instance : new V2ContainerResourceMetricSource()); + if (instance != null) { + this.withContainer(instance.getContainer()); + this.withName(instance.getName()); + this.withTarget(instance.getTarget()); + } + } + + public String getContainer() { + return this.container; + } + + public A withContainer(String container) { + this.container = container; + return (A) this; + } + + public boolean hasContainer() { + return this.container != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public V2MetricTarget buildTarget() { + return this.target != null ? this.target.build() : null; + } + + public A withTarget(V2MetricTarget target) { + this._visitables.remove("target"); + if (target != null) { + this.target = new V2MetricTargetBuilder(target); + this._visitables.get("target").add(this.target); + } else { + this.target = null; + this._visitables.get("target").remove(this.target); + } + return (A) this; + } + + public boolean hasTarget() { + return this.target != null; + } + + public TargetNested withNewTarget() { + return new TargetNested(null); + } + + public TargetNested withNewTargetLike(V2MetricTarget item) { + return new TargetNested(item); + } + + public TargetNested editTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(null)); + } + + public TargetNested editOrNewTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(new V2MetricTargetBuilder().build())); + } + + public TargetNested editOrNewTargetLike(V2MetricTarget item) { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(item)); } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2ContainerResourceMetricSourceFluent that = (V2ContainerResourceMetricSourceFluent) o; + if (!java.util.Objects.equals(container, that.container)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(target, that.target)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(container, name, target, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (container != null) { sb.append("container:"); sb.append(container + ","); } + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (target != null) { sb.append("target:"); sb.append(target); } + sb.append("}"); + return sb.toString(); + } + public class TargetNested extends V2MetricTargetFluent> implements Nested{ + TargetNested(V2MetricTarget item) { + this.builder = new V2MetricTargetBuilder(this, item); + } + V2MetricTargetBuilder builder; + + public N and() { + return (N) V2ContainerResourceMetricSourceFluent.this.withTarget(builder.build()); + } + + public N endTarget() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceFluentImpl.java deleted file mode 100644 index 6f09e8b78b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricSourceFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2ContainerResourceMetricSourceFluentImpl> extends BaseFluent implements V2ContainerResourceMetricSourceFluent{ - public V2ContainerResourceMetricSourceFluentImpl() { - } - public V2ContainerResourceMetricSourceFluentImpl(V2ContainerResourceMetricSource instance) { - if (instance != null) { - this.withContainer(instance.getContainer()); - this.withName(instance.getName()); - this.withTarget(instance.getTarget()); - } - } - private String container; - private String name; - private V2MetricTargetBuilder target; - public String getContainer() { - return this.container; - } - public A withContainer(String container) { - this.container=container; return (A) this; - } - public Boolean hasContainer() { - return this.container != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget() { - return this.target!=null ?this.target.build():null; - } - public V2MetricTarget buildTarget() { - return this.target!=null ?this.target.build():null; - } - public A withTarget(V2MetricTarget target) { - _visitables.get("target").remove(this.target); - if (target!=null){ this.target= new V2MetricTargetBuilder(target); _visitables.get("target").add(this.target);} else { this.target = null; _visitables.get("target").remove(this.target); } return (A) this; - } - public Boolean hasTarget() { - return this.target != null; - } - public V2ContainerResourceMetricSourceFluentImpl.TargetNested withNewTarget() { - return new V2ContainerResourceMetricSourceFluentImpl.TargetNestedImpl(); - } - public V2ContainerResourceMetricSourceFluentImpl.TargetNested withNewTargetLike(V2MetricTarget item) { - return new V2ContainerResourceMetricSourceFluentImpl.TargetNestedImpl(item); - } - public V2ContainerResourceMetricSourceFluentImpl.TargetNested editTarget() { - return withNewTargetLike(getTarget()); - } - public V2ContainerResourceMetricSourceFluentImpl.TargetNested editOrNewTarget() { - return withNewTargetLike(getTarget() != null ? getTarget(): new V2MetricTargetBuilder().build()); - } - public V2ContainerResourceMetricSourceFluentImpl.TargetNested editOrNewTargetLike(V2MetricTarget item) { - return withNewTargetLike(getTarget() != null ? getTarget(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2ContainerResourceMetricSourceFluentImpl that = (V2ContainerResourceMetricSourceFluentImpl) o; - if (!java.util.Objects.equals(container, that.container)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(target, that.target)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(container, name, target, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (container != null) { sb.append("container:"); sb.append(container + ","); } - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (target != null) { sb.append("target:"); sb.append(target); } - sb.append("}"); - return sb.toString(); - } - class TargetNestedImpl extends V2MetricTargetFluentImpl> implements V2ContainerResourceMetricSourceFluentImpl.TargetNested,Nested{ - TargetNestedImpl(V2MetricTarget item) { - this.builder = new V2MetricTargetBuilder(this, item); - } - TargetNestedImpl() { - this.builder = new V2MetricTargetBuilder(this); - } - V2MetricTargetBuilder builder; - public N and() { - return (N) V2ContainerResourceMetricSourceFluentImpl.this.withTarget(builder.build()); - } - public N endTarget() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusBuilder.java index 9841de3cb2..16ed430ca0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2ContainerResourceMetricStatusBuilder extends V2ContainerResourceMetricStatusFluentImpl implements VisitableBuilder{ +public class V2ContainerResourceMetricStatusBuilder extends V2ContainerResourceMetricStatusFluent implements VisitableBuilder{ public V2ContainerResourceMetricStatusBuilder() { - this(false); - } - public V2ContainerResourceMetricStatusBuilder(Boolean validationEnabled) { - this(new V2ContainerResourceMetricStatus(), validationEnabled); + this(new V2ContainerResourceMetricStatus()); } + public V2ContainerResourceMetricStatusBuilder(V2ContainerResourceMetricStatusFluent fluent) { - this(fluent, false); - } - public V2ContainerResourceMetricStatusBuilder(V2ContainerResourceMetricStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V2ContainerResourceMetricStatus(), validationEnabled); + this(fluent, new V2ContainerResourceMetricStatus()); } + public V2ContainerResourceMetricStatusBuilder(V2ContainerResourceMetricStatusFluent fluent,V2ContainerResourceMetricStatus instance) { - this(fluent, instance, false); - } - public V2ContainerResourceMetricStatusBuilder(V2ContainerResourceMetricStatusFluent fluent,V2ContainerResourceMetricStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withContainer(instance.getContainer()); - fluent.withCurrent(instance.getCurrent()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2ContainerResourceMetricStatusBuilder(V2ContainerResourceMetricStatus instance) { - this(instance,false); - } - public V2ContainerResourceMetricStatusBuilder(V2ContainerResourceMetricStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withContainer(instance.getContainer()); - this.withCurrent(instance.getCurrent()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2ContainerResourceMetricStatusFluent fluent; - Boolean validationEnabled; + public V2ContainerResourceMetricStatus build() { V2ContainerResourceMetricStatus buildable = new V2ContainerResourceMetricStatus(); buildable.setContainer(fluent.getContainer()); - buildable.setCurrent(fluent.getCurrent()); + buildable.setCurrent(fluent.buildCurrent()); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusFluent.java index 1bec5988b5..1b1c0d53cc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusFluent.java @@ -1,41 +1,140 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2ContainerResourceMetricStatusFluent> extends Fluent{ - public String getContainer(); - public A withContainer(String container); - public Boolean hasContainer(); - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent(); - public V2MetricValueStatus buildCurrent(); - public A withCurrent(V2MetricValueStatus current); - public Boolean hasCurrent(); - public V2ContainerResourceMetricStatusFluent.CurrentNested withNewCurrent(); - public V2ContainerResourceMetricStatusFluent.CurrentNested withNewCurrentLike(V2MetricValueStatus item); - public V2ContainerResourceMetricStatusFluent.CurrentNested editCurrent(); - public V2ContainerResourceMetricStatusFluent.CurrentNested editOrNewCurrent(); - public V2ContainerResourceMetricStatusFluent.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public interface CurrentNested extends Nested,V2MetricValueStatusFluent>{ - public N and(); - public N endCurrent(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2ContainerResourceMetricStatusFluent> extends BaseFluent{ + public V2ContainerResourceMetricStatusFluent() { + } + + public V2ContainerResourceMetricStatusFluent(V2ContainerResourceMetricStatus instance) { + this.copyInstance(instance); + } + private String container; + private V2MetricValueStatusBuilder current; + private String name; + + protected void copyInstance(V2ContainerResourceMetricStatus instance) { + instance = (instance != null ? instance : new V2ContainerResourceMetricStatus()); + if (instance != null) { + this.withContainer(instance.getContainer()); + this.withCurrent(instance.getCurrent()); + this.withName(instance.getName()); + } + } + + public String getContainer() { + return this.container; + } + + public A withContainer(String container) { + this.container = container; + return (A) this; + } + + public boolean hasContainer() { + return this.container != null; + } + + public V2MetricValueStatus buildCurrent() { + return this.current != null ? this.current.build() : null; + } + + public A withCurrent(V2MetricValueStatus current) { + this._visitables.remove("current"); + if (current != null) { + this.current = new V2MetricValueStatusBuilder(current); + this._visitables.get("current").add(this.current); + } else { + this.current = null; + this._visitables.get("current").remove(this.current); + } + return (A) this; + } + + public boolean hasCurrent() { + return this.current != null; + } + + public CurrentNested withNewCurrent() { + return new CurrentNested(null); + } + + public CurrentNested withNewCurrentLike(V2MetricValueStatus item) { + return new CurrentNested(item); + } + + public CurrentNested editCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(null)); + } + + public CurrentNested editOrNewCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(new V2MetricValueStatusBuilder().build())); + } + + public CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(item)); + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; } + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2ContainerResourceMetricStatusFluent that = (V2ContainerResourceMetricStatusFluent) o; + if (!java.util.Objects.equals(container, that.container)) return false; + if (!java.util.Objects.equals(current, that.current)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(container, current, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (container != null) { sb.append("container:"); sb.append(container + ","); } + if (current != null) { sb.append("current:"); sb.append(current + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + public class CurrentNested extends V2MetricValueStatusFluent> implements Nested{ + CurrentNested(V2MetricValueStatus item) { + this.builder = new V2MetricValueStatusBuilder(this, item); + } + V2MetricValueStatusBuilder builder; + + public N and() { + return (N) V2ContainerResourceMetricStatusFluent.this.withCurrent(builder.build()); + } + + public N endCurrent() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusFluentImpl.java deleted file mode 100644 index e626fd14bc..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ContainerResourceMetricStatusFluentImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2ContainerResourceMetricStatusFluentImpl> extends BaseFluent implements V2ContainerResourceMetricStatusFluent{ - public V2ContainerResourceMetricStatusFluentImpl() { - } - public V2ContainerResourceMetricStatusFluentImpl(V2ContainerResourceMetricStatus instance) { - if (instance != null) { - this.withContainer(instance.getContainer()); - this.withCurrent(instance.getCurrent()); - this.withName(instance.getName()); - } - } - private String container; - private V2MetricValueStatusBuilder current; - private String name; - public String getContainer() { - return this.container; - } - public A withContainer(String container) { - this.container=container; return (A) this; - } - public Boolean hasContainer() { - return this.container != null; - } - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent() { - return this.current!=null ?this.current.build():null; - } - public V2MetricValueStatus buildCurrent() { - return this.current!=null ?this.current.build():null; - } - public A withCurrent(V2MetricValueStatus current) { - _visitables.get("current").remove(this.current); - if (current!=null){ this.current= new V2MetricValueStatusBuilder(current); _visitables.get("current").add(this.current);} else { this.current = null; _visitables.get("current").remove(this.current); } return (A) this; - } - public Boolean hasCurrent() { - return this.current != null; - } - public V2ContainerResourceMetricStatusFluentImpl.CurrentNested withNewCurrent() { - return new V2ContainerResourceMetricStatusFluentImpl.CurrentNestedImpl(); - } - public V2ContainerResourceMetricStatusFluentImpl.CurrentNested withNewCurrentLike(V2MetricValueStatus item) { - return new V2ContainerResourceMetricStatusFluentImpl.CurrentNestedImpl(item); - } - public V2ContainerResourceMetricStatusFluentImpl.CurrentNested editCurrent() { - return withNewCurrentLike(getCurrent()); - } - public V2ContainerResourceMetricStatusFluentImpl.CurrentNested editOrNewCurrent() { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): new V2MetricValueStatusBuilder().build()); - } - public V2ContainerResourceMetricStatusFluentImpl.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): item); - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2ContainerResourceMetricStatusFluentImpl that = (V2ContainerResourceMetricStatusFluentImpl) o; - if (!java.util.Objects.equals(container, that.container)) return false; - - if (!java.util.Objects.equals(current, that.current)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(container, current, name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (container != null) { sb.append("container:"); sb.append(container + ","); } - if (current != null) { sb.append("current:"); sb.append(current + ","); } - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - class CurrentNestedImpl extends V2MetricValueStatusFluentImpl> implements V2ContainerResourceMetricStatusFluentImpl.CurrentNested,Nested{ - CurrentNestedImpl(V2MetricValueStatus item) { - this.builder = new V2MetricValueStatusBuilder(this, item); - } - CurrentNestedImpl() { - this.builder = new V2MetricValueStatusBuilder(this); - } - V2MetricValueStatusBuilder builder; - public N and() { - return (N) V2ContainerResourceMetricStatusFluentImpl.this.withCurrent(builder.build()); - } - public N endCurrent() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceBuilder.java index 2240bae2ae..367528df11 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2CrossVersionObjectReferenceBuilder extends V2CrossVersionObjectReferenceFluentImpl implements VisitableBuilder{ +public class V2CrossVersionObjectReferenceBuilder extends V2CrossVersionObjectReferenceFluent implements VisitableBuilder{ public V2CrossVersionObjectReferenceBuilder() { - this(false); - } - public V2CrossVersionObjectReferenceBuilder(Boolean validationEnabled) { - this(new V2CrossVersionObjectReference(), validationEnabled); + this(new V2CrossVersionObjectReference()); } + public V2CrossVersionObjectReferenceBuilder(V2CrossVersionObjectReferenceFluent fluent) { - this(fluent, false); - } - public V2CrossVersionObjectReferenceBuilder(V2CrossVersionObjectReferenceFluent fluent,Boolean validationEnabled) { - this(fluent, new V2CrossVersionObjectReference(), validationEnabled); + this(fluent, new V2CrossVersionObjectReference()); } + public V2CrossVersionObjectReferenceBuilder(V2CrossVersionObjectReferenceFluent fluent,V2CrossVersionObjectReference instance) { - this(fluent, instance, false); - } - public V2CrossVersionObjectReferenceBuilder(V2CrossVersionObjectReferenceFluent fluent,V2CrossVersionObjectReference instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2CrossVersionObjectReferenceBuilder(V2CrossVersionObjectReference instance) { - this(instance,false); - } - public V2CrossVersionObjectReferenceBuilder(V2CrossVersionObjectReference instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2CrossVersionObjectReferenceFluent fluent; - Boolean validationEnabled; + public V2CrossVersionObjectReference build() { V2CrossVersionObjectReference buildable = new V2CrossVersionObjectReference(); buildable.setApiVersion(fluent.getApiVersion()); @@ -49,4 +29,5 @@ public V2CrossVersionObjectReference build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceFluent.java index a0d8890f4e..9e990e59c4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceFluent.java @@ -1,22 +1,97 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2CrossVersionObjectReferenceFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - public String getName(); - public A withName(String name); - public Boolean hasName(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2CrossVersionObjectReferenceFluent> extends BaseFluent{ + public V2CrossVersionObjectReferenceFluent() { + } + public V2CrossVersionObjectReferenceFluent(V2CrossVersionObjectReference instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private String name; + + protected void copyInstance(V2CrossVersionObjectReference instance) { + instance = (instance != null ? instance : new V2CrossVersionObjectReference()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withName(instance.getName()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2CrossVersionObjectReferenceFluent that = (V2CrossVersionObjectReferenceFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceFluentImpl.java deleted file mode 100644 index 0442d640d6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2CrossVersionObjectReferenceFluentImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2CrossVersionObjectReferenceFluentImpl> extends BaseFluent implements V2CrossVersionObjectReferenceFluent{ - public V2CrossVersionObjectReferenceFluentImpl() { - } - public V2CrossVersionObjectReferenceFluentImpl(V2CrossVersionObjectReference instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withName(instance.getName()); - } - } - private String apiVersion; - private String kind; - private String name; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2CrossVersionObjectReferenceFluentImpl that = (V2CrossVersionObjectReferenceFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceBuilder.java index 62bb886ac5..bdf132a7f8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2ExternalMetricSourceBuilder extends V2ExternalMetricSourceFluentImpl implements VisitableBuilder{ +public class V2ExternalMetricSourceBuilder extends V2ExternalMetricSourceFluent implements VisitableBuilder{ public V2ExternalMetricSourceBuilder() { - this(false); - } - public V2ExternalMetricSourceBuilder(Boolean validationEnabled) { - this(new V2ExternalMetricSource(), validationEnabled); + this(new V2ExternalMetricSource()); } + public V2ExternalMetricSourceBuilder(V2ExternalMetricSourceFluent fluent) { - this(fluent, false); - } - public V2ExternalMetricSourceBuilder(V2ExternalMetricSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V2ExternalMetricSource(), validationEnabled); + this(fluent, new V2ExternalMetricSource()); } + public V2ExternalMetricSourceBuilder(V2ExternalMetricSourceFluent fluent,V2ExternalMetricSource instance) { - this(fluent, instance, false); - } - public V2ExternalMetricSourceBuilder(V2ExternalMetricSourceFluent fluent,V2ExternalMetricSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMetric(instance.getMetric()); - fluent.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2ExternalMetricSourceBuilder(V2ExternalMetricSource instance) { - this(instance,false); - } - public V2ExternalMetricSourceBuilder(V2ExternalMetricSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMetric(instance.getMetric()); - this.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2ExternalMetricSourceFluent fluent; - Boolean validationEnabled; + public V2ExternalMetricSource build() { V2ExternalMetricSource buildable = new V2ExternalMetricSource(); - buildable.setMetric(fluent.getMetric()); - buildable.setTarget(fluent.getTarget()); + buildable.setMetric(fluent.buildMetric()); + buildable.setTarget(fluent.buildTarget()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceFluent.java index 8d3e68eff6..e8661e0ec8 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2ExternalMetricSourceFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric(); - public V2MetricIdentifier buildMetric(); - public A withMetric(V2MetricIdentifier metric); - public Boolean hasMetric(); - public V2ExternalMetricSourceFluent.MetricNested withNewMetric(); - public V2ExternalMetricSourceFluent.MetricNested withNewMetricLike(V2MetricIdentifier item); - public V2ExternalMetricSourceFluent.MetricNested editMetric(); - public V2ExternalMetricSourceFluent.MetricNested editOrNewMetric(); - public V2ExternalMetricSourceFluent.MetricNested editOrNewMetricLike(V2MetricIdentifier item); - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget(); - public V2MetricTarget buildTarget(); - public A withTarget(V2MetricTarget target); - public Boolean hasTarget(); - public V2ExternalMetricSourceFluent.TargetNested withNewTarget(); - public V2ExternalMetricSourceFluent.TargetNested withNewTargetLike(V2MetricTarget item); - public V2ExternalMetricSourceFluent.TargetNested editTarget(); - public V2ExternalMetricSourceFluent.TargetNested editOrNewTarget(); - public V2ExternalMetricSourceFluent.TargetNested editOrNewTargetLike(V2MetricTarget item); - public interface MetricNested extends Nested,V2MetricIdentifierFluent>{ - public N and(); - public N endMetric(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2ExternalMetricSourceFluent> extends BaseFluent{ + public V2ExternalMetricSourceFluent() { + } + + public V2ExternalMetricSourceFluent(V2ExternalMetricSource instance) { + this.copyInstance(instance); + } + private V2MetricIdentifierBuilder metric; + private V2MetricTargetBuilder target; + + protected void copyInstance(V2ExternalMetricSource instance) { + instance = (instance != null ? instance : new V2ExternalMetricSource()); + if (instance != null) { + this.withMetric(instance.getMetric()); + this.withTarget(instance.getTarget()); + } + } + + public V2MetricIdentifier buildMetric() { + return this.metric != null ? this.metric.build() : null; + } + + public A withMetric(V2MetricIdentifier metric) { + this._visitables.remove("metric"); + if (metric != null) { + this.metric = new V2MetricIdentifierBuilder(metric); + this._visitables.get("metric").add(this.metric); + } else { + this.metric = null; + this._visitables.get("metric").remove(this.metric); + } + return (A) this; + } + + public boolean hasMetric() { + return this.metric != null; + } + + public MetricNested withNewMetric() { + return new MetricNested(null); } - public interface TargetNested extends Nested,V2MetricTargetFluent>{ - public N and(); - public N endTarget(); + + public MetricNested withNewMetricLike(V2MetricIdentifier item) { + return new MetricNested(item); + } + + public MetricNested editMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(null)); + } + + public MetricNested editOrNewMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(new V2MetricIdentifierBuilder().build())); + } + + public MetricNested editOrNewMetricLike(V2MetricIdentifier item) { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(item)); + } + + public V2MetricTarget buildTarget() { + return this.target != null ? this.target.build() : null; + } + + public A withTarget(V2MetricTarget target) { + this._visitables.remove("target"); + if (target != null) { + this.target = new V2MetricTargetBuilder(target); + this._visitables.get("target").add(this.target); + } else { + this.target = null; + this._visitables.get("target").remove(this.target); + } + return (A) this; + } + + public boolean hasTarget() { + return this.target != null; + } + + public TargetNested withNewTarget() { + return new TargetNested(null); + } + + public TargetNested withNewTargetLike(V2MetricTarget item) { + return new TargetNested(item); + } + + public TargetNested editTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(null)); + } + + public TargetNested editOrNewTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(new V2MetricTargetBuilder().build())); + } + + public TargetNested editOrNewTargetLike(V2MetricTarget item) { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2ExternalMetricSourceFluent that = (V2ExternalMetricSourceFluent) o; + if (!java.util.Objects.equals(metric, that.metric)) return false; + if (!java.util.Objects.equals(target, that.target)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(metric, target, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (metric != null) { sb.append("metric:"); sb.append(metric + ","); } + if (target != null) { sb.append("target:"); sb.append(target); } + sb.append("}"); + return sb.toString(); + } + public class MetricNested extends V2MetricIdentifierFluent> implements Nested{ + MetricNested(V2MetricIdentifier item) { + this.builder = new V2MetricIdentifierBuilder(this, item); + } + V2MetricIdentifierBuilder builder; + + public N and() { + return (N) V2ExternalMetricSourceFluent.this.withMetric(builder.build()); + } + + public N endMetric() { + return and(); + } + } + public class TargetNested extends V2MetricTargetFluent> implements Nested{ + TargetNested(V2MetricTarget item) { + this.builder = new V2MetricTargetBuilder(this, item); + } + V2MetricTargetBuilder builder; + + public N and() { + return (N) V2ExternalMetricSourceFluent.this.withTarget(builder.build()); + } + + public N endTarget() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceFluentImpl.java deleted file mode 100644 index 8f017502d0..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricSourceFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2ExternalMetricSourceFluentImpl> extends BaseFluent implements V2ExternalMetricSourceFluent{ - public V2ExternalMetricSourceFluentImpl() { - } - public V2ExternalMetricSourceFluentImpl(V2ExternalMetricSource instance) { - if (instance != null) { - this.withMetric(instance.getMetric()); - this.withTarget(instance.getTarget()); - } - } - private V2MetricIdentifierBuilder metric; - private V2MetricTargetBuilder target; - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric() { - return this.metric!=null ?this.metric.build():null; - } - public V2MetricIdentifier buildMetric() { - return this.metric!=null ?this.metric.build():null; - } - public A withMetric(V2MetricIdentifier metric) { - _visitables.get("metric").remove(this.metric); - if (metric!=null){ this.metric= new V2MetricIdentifierBuilder(metric); _visitables.get("metric").add(this.metric);} else { this.metric = null; _visitables.get("metric").remove(this.metric); } return (A) this; - } - public Boolean hasMetric() { - return this.metric != null; - } - public V2ExternalMetricSourceFluentImpl.MetricNested withNewMetric() { - return new V2ExternalMetricSourceFluentImpl.MetricNestedImpl(); - } - public V2ExternalMetricSourceFluentImpl.MetricNested withNewMetricLike(V2MetricIdentifier item) { - return new V2ExternalMetricSourceFluentImpl.MetricNestedImpl(item); - } - public V2ExternalMetricSourceFluentImpl.MetricNested editMetric() { - return withNewMetricLike(getMetric()); - } - public V2ExternalMetricSourceFluentImpl.MetricNested editOrNewMetric() { - return withNewMetricLike(getMetric() != null ? getMetric(): new V2MetricIdentifierBuilder().build()); - } - public V2ExternalMetricSourceFluentImpl.MetricNested editOrNewMetricLike(V2MetricIdentifier item) { - return withNewMetricLike(getMetric() != null ? getMetric(): item); - } - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget() { - return this.target!=null ?this.target.build():null; - } - public V2MetricTarget buildTarget() { - return this.target!=null ?this.target.build():null; - } - public A withTarget(V2MetricTarget target) { - _visitables.get("target").remove(this.target); - if (target!=null){ this.target= new V2MetricTargetBuilder(target); _visitables.get("target").add(this.target);} else { this.target = null; _visitables.get("target").remove(this.target); } return (A) this; - } - public Boolean hasTarget() { - return this.target != null; - } - public V2ExternalMetricSourceFluentImpl.TargetNested withNewTarget() { - return new V2ExternalMetricSourceFluentImpl.TargetNestedImpl(); - } - public V2ExternalMetricSourceFluentImpl.TargetNested withNewTargetLike(V2MetricTarget item) { - return new V2ExternalMetricSourceFluentImpl.TargetNestedImpl(item); - } - public V2ExternalMetricSourceFluentImpl.TargetNested editTarget() { - return withNewTargetLike(getTarget()); - } - public V2ExternalMetricSourceFluentImpl.TargetNested editOrNewTarget() { - return withNewTargetLike(getTarget() != null ? getTarget(): new V2MetricTargetBuilder().build()); - } - public V2ExternalMetricSourceFluentImpl.TargetNested editOrNewTargetLike(V2MetricTarget item) { - return withNewTargetLike(getTarget() != null ? getTarget(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2ExternalMetricSourceFluentImpl that = (V2ExternalMetricSourceFluentImpl) o; - if (!java.util.Objects.equals(metric, that.metric)) return false; - - if (!java.util.Objects.equals(target, that.target)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(metric, target, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (metric != null) { sb.append("metric:"); sb.append(metric + ","); } - if (target != null) { sb.append("target:"); sb.append(target); } - sb.append("}"); - return sb.toString(); - } - class MetricNestedImpl extends V2MetricIdentifierFluentImpl> implements V2ExternalMetricSourceFluentImpl.MetricNested,Nested{ - MetricNestedImpl(V2MetricIdentifier item) { - this.builder = new V2MetricIdentifierBuilder(this, item); - } - MetricNestedImpl() { - this.builder = new V2MetricIdentifierBuilder(this); - } - V2MetricIdentifierBuilder builder; - public N and() { - return (N) V2ExternalMetricSourceFluentImpl.this.withMetric(builder.build()); - } - public N endMetric() { - return and(); - } - - } - class TargetNestedImpl extends V2MetricTargetFluentImpl> implements V2ExternalMetricSourceFluentImpl.TargetNested,Nested{ - TargetNestedImpl(V2MetricTarget item) { - this.builder = new V2MetricTargetBuilder(this, item); - } - TargetNestedImpl() { - this.builder = new V2MetricTargetBuilder(this); - } - V2MetricTargetBuilder builder; - public N and() { - return (N) V2ExternalMetricSourceFluentImpl.this.withTarget(builder.build()); - } - public N endTarget() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusBuilder.java index 314fad2786..23ff22cb14 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2ExternalMetricStatusBuilder extends V2ExternalMetricStatusFluentImpl implements VisitableBuilder{ +public class V2ExternalMetricStatusBuilder extends V2ExternalMetricStatusFluent implements VisitableBuilder{ public V2ExternalMetricStatusBuilder() { - this(false); - } - public V2ExternalMetricStatusBuilder(Boolean validationEnabled) { - this(new V2ExternalMetricStatus(), validationEnabled); + this(new V2ExternalMetricStatus()); } + public V2ExternalMetricStatusBuilder(V2ExternalMetricStatusFluent fluent) { - this(fluent, false); - } - public V2ExternalMetricStatusBuilder(V2ExternalMetricStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V2ExternalMetricStatus(), validationEnabled); + this(fluent, new V2ExternalMetricStatus()); } + public V2ExternalMetricStatusBuilder(V2ExternalMetricStatusFluent fluent,V2ExternalMetricStatus instance) { - this(fluent, instance, false); - } - public V2ExternalMetricStatusBuilder(V2ExternalMetricStatusFluent fluent,V2ExternalMetricStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCurrent(instance.getCurrent()); - fluent.withMetric(instance.getMetric()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2ExternalMetricStatusBuilder(V2ExternalMetricStatus instance) { - this(instance,false); - } - public V2ExternalMetricStatusBuilder(V2ExternalMetricStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCurrent(instance.getCurrent()); - this.withMetric(instance.getMetric()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2ExternalMetricStatusFluent fluent; - Boolean validationEnabled; + public V2ExternalMetricStatus build() { V2ExternalMetricStatus buildable = new V2ExternalMetricStatus(); - buildable.setCurrent(fluent.getCurrent()); - buildable.setMetric(fluent.getMetric()); + buildable.setCurrent(fluent.buildCurrent()); + buildable.setMetric(fluent.buildMetric()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusFluent.java index b79e86cd5c..9e7c5c1f44 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2ExternalMetricStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent(); - public V2MetricValueStatus buildCurrent(); - public A withCurrent(V2MetricValueStatus current); - public Boolean hasCurrent(); - public V2ExternalMetricStatusFluent.CurrentNested withNewCurrent(); - public V2ExternalMetricStatusFluent.CurrentNested withNewCurrentLike(V2MetricValueStatus item); - public V2ExternalMetricStatusFluent.CurrentNested editCurrent(); - public V2ExternalMetricStatusFluent.CurrentNested editOrNewCurrent(); - public V2ExternalMetricStatusFluent.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item); - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric(); - public V2MetricIdentifier buildMetric(); - public A withMetric(V2MetricIdentifier metric); - public Boolean hasMetric(); - public V2ExternalMetricStatusFluent.MetricNested withNewMetric(); - public V2ExternalMetricStatusFluent.MetricNested withNewMetricLike(V2MetricIdentifier item); - public V2ExternalMetricStatusFluent.MetricNested editMetric(); - public V2ExternalMetricStatusFluent.MetricNested editOrNewMetric(); - public V2ExternalMetricStatusFluent.MetricNested editOrNewMetricLike(V2MetricIdentifier item); - public interface CurrentNested extends Nested,V2MetricValueStatusFluent>{ - public N and(); - public N endCurrent(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2ExternalMetricStatusFluent> extends BaseFluent{ + public V2ExternalMetricStatusFluent() { + } + + public V2ExternalMetricStatusFluent(V2ExternalMetricStatus instance) { + this.copyInstance(instance); + } + private V2MetricValueStatusBuilder current; + private V2MetricIdentifierBuilder metric; + + protected void copyInstance(V2ExternalMetricStatus instance) { + instance = (instance != null ? instance : new V2ExternalMetricStatus()); + if (instance != null) { + this.withCurrent(instance.getCurrent()); + this.withMetric(instance.getMetric()); + } + } + + public V2MetricValueStatus buildCurrent() { + return this.current != null ? this.current.build() : null; + } + + public A withCurrent(V2MetricValueStatus current) { + this._visitables.remove("current"); + if (current != null) { + this.current = new V2MetricValueStatusBuilder(current); + this._visitables.get("current").add(this.current); + } else { + this.current = null; + this._visitables.get("current").remove(this.current); + } + return (A) this; + } + + public boolean hasCurrent() { + return this.current != null; + } + + public CurrentNested withNewCurrent() { + return new CurrentNested(null); } - public interface MetricNested extends Nested,V2MetricIdentifierFluent>{ - public N and(); - public N endMetric(); + + public CurrentNested withNewCurrentLike(V2MetricValueStatus item) { + return new CurrentNested(item); + } + + public CurrentNested editCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(null)); + } + + public CurrentNested editOrNewCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(new V2MetricValueStatusBuilder().build())); + } + + public CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(item)); + } + + public V2MetricIdentifier buildMetric() { + return this.metric != null ? this.metric.build() : null; + } + + public A withMetric(V2MetricIdentifier metric) { + this._visitables.remove("metric"); + if (metric != null) { + this.metric = new V2MetricIdentifierBuilder(metric); + this._visitables.get("metric").add(this.metric); + } else { + this.metric = null; + this._visitables.get("metric").remove(this.metric); + } + return (A) this; + } + + public boolean hasMetric() { + return this.metric != null; + } + + public MetricNested withNewMetric() { + return new MetricNested(null); + } + + public MetricNested withNewMetricLike(V2MetricIdentifier item) { + return new MetricNested(item); + } + + public MetricNested editMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(null)); + } + + public MetricNested editOrNewMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(new V2MetricIdentifierBuilder().build())); + } + + public MetricNested editOrNewMetricLike(V2MetricIdentifier item) { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2ExternalMetricStatusFluent that = (V2ExternalMetricStatusFluent) o; + if (!java.util.Objects.equals(current, that.current)) return false; + if (!java.util.Objects.equals(metric, that.metric)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(current, metric, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (current != null) { sb.append("current:"); sb.append(current + ","); } + if (metric != null) { sb.append("metric:"); sb.append(metric); } + sb.append("}"); + return sb.toString(); + } + public class CurrentNested extends V2MetricValueStatusFluent> implements Nested{ + CurrentNested(V2MetricValueStatus item) { + this.builder = new V2MetricValueStatusBuilder(this, item); + } + V2MetricValueStatusBuilder builder; + + public N and() { + return (N) V2ExternalMetricStatusFluent.this.withCurrent(builder.build()); + } + + public N endCurrent() { + return and(); + } + } + public class MetricNested extends V2MetricIdentifierFluent> implements Nested{ + MetricNested(V2MetricIdentifier item) { + this.builder = new V2MetricIdentifierBuilder(this, item); + } + V2MetricIdentifierBuilder builder; + + public N and() { + return (N) V2ExternalMetricStatusFluent.this.withMetric(builder.build()); + } + + public N endMetric() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusFluentImpl.java deleted file mode 100644 index 4320fa1aa2..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ExternalMetricStatusFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2ExternalMetricStatusFluentImpl> extends BaseFluent implements V2ExternalMetricStatusFluent{ - public V2ExternalMetricStatusFluentImpl() { - } - public V2ExternalMetricStatusFluentImpl(V2ExternalMetricStatus instance) { - if (instance != null) { - this.withCurrent(instance.getCurrent()); - this.withMetric(instance.getMetric()); - } - } - private V2MetricValueStatusBuilder current; - private V2MetricIdentifierBuilder metric; - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent() { - return this.current!=null ?this.current.build():null; - } - public V2MetricValueStatus buildCurrent() { - return this.current!=null ?this.current.build():null; - } - public A withCurrent(V2MetricValueStatus current) { - _visitables.get("current").remove(this.current); - if (current!=null){ this.current= new V2MetricValueStatusBuilder(current); _visitables.get("current").add(this.current);} else { this.current = null; _visitables.get("current").remove(this.current); } return (A) this; - } - public Boolean hasCurrent() { - return this.current != null; - } - public V2ExternalMetricStatusFluentImpl.CurrentNested withNewCurrent() { - return new V2ExternalMetricStatusFluentImpl.CurrentNestedImpl(); - } - public V2ExternalMetricStatusFluentImpl.CurrentNested withNewCurrentLike(V2MetricValueStatus item) { - return new V2ExternalMetricStatusFluentImpl.CurrentNestedImpl(item); - } - public V2ExternalMetricStatusFluentImpl.CurrentNested editCurrent() { - return withNewCurrentLike(getCurrent()); - } - public V2ExternalMetricStatusFluentImpl.CurrentNested editOrNewCurrent() { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): new V2MetricValueStatusBuilder().build()); - } - public V2ExternalMetricStatusFluentImpl.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): item); - } - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric() { - return this.metric!=null ?this.metric.build():null; - } - public V2MetricIdentifier buildMetric() { - return this.metric!=null ?this.metric.build():null; - } - public A withMetric(V2MetricIdentifier metric) { - _visitables.get("metric").remove(this.metric); - if (metric!=null){ this.metric= new V2MetricIdentifierBuilder(metric); _visitables.get("metric").add(this.metric);} else { this.metric = null; _visitables.get("metric").remove(this.metric); } return (A) this; - } - public Boolean hasMetric() { - return this.metric != null; - } - public V2ExternalMetricStatusFluentImpl.MetricNested withNewMetric() { - return new V2ExternalMetricStatusFluentImpl.MetricNestedImpl(); - } - public V2ExternalMetricStatusFluentImpl.MetricNested withNewMetricLike(V2MetricIdentifier item) { - return new V2ExternalMetricStatusFluentImpl.MetricNestedImpl(item); - } - public V2ExternalMetricStatusFluentImpl.MetricNested editMetric() { - return withNewMetricLike(getMetric()); - } - public V2ExternalMetricStatusFluentImpl.MetricNested editOrNewMetric() { - return withNewMetricLike(getMetric() != null ? getMetric(): new V2MetricIdentifierBuilder().build()); - } - public V2ExternalMetricStatusFluentImpl.MetricNested editOrNewMetricLike(V2MetricIdentifier item) { - return withNewMetricLike(getMetric() != null ? getMetric(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2ExternalMetricStatusFluentImpl that = (V2ExternalMetricStatusFluentImpl) o; - if (!java.util.Objects.equals(current, that.current)) return false; - - if (!java.util.Objects.equals(metric, that.metric)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(current, metric, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (current != null) { sb.append("current:"); sb.append(current + ","); } - if (metric != null) { sb.append("metric:"); sb.append(metric); } - sb.append("}"); - return sb.toString(); - } - class CurrentNestedImpl extends V2MetricValueStatusFluentImpl> implements V2ExternalMetricStatusFluentImpl.CurrentNested,Nested{ - CurrentNestedImpl(V2MetricValueStatus item) { - this.builder = new V2MetricValueStatusBuilder(this, item); - } - CurrentNestedImpl() { - this.builder = new V2MetricValueStatusBuilder(this); - } - V2MetricValueStatusBuilder builder; - public N and() { - return (N) V2ExternalMetricStatusFluentImpl.this.withCurrent(builder.build()); - } - public N endCurrent() { - return and(); - } - - } - class MetricNestedImpl extends V2MetricIdentifierFluentImpl> implements V2ExternalMetricStatusFluentImpl.MetricNested,Nested{ - MetricNestedImpl(V2MetricIdentifier item) { - this.builder = new V2MetricIdentifierBuilder(this, item); - } - MetricNestedImpl() { - this.builder = new V2MetricIdentifierBuilder(this); - } - V2MetricIdentifierBuilder builder; - public N and() { - return (N) V2ExternalMetricStatusFluentImpl.this.withMetric(builder.build()); - } - public N endMetric() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyBuilder.java index 33887854f3..b2fad800eb 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2HPAScalingPolicyBuilder extends V2HPAScalingPolicyFluentImpl implements VisitableBuilder{ +public class V2HPAScalingPolicyBuilder extends V2HPAScalingPolicyFluent implements VisitableBuilder{ public V2HPAScalingPolicyBuilder() { - this(false); - } - public V2HPAScalingPolicyBuilder(Boolean validationEnabled) { - this(new V2HPAScalingPolicy(), validationEnabled); + this(new V2HPAScalingPolicy()); } + public V2HPAScalingPolicyBuilder(V2HPAScalingPolicyFluent fluent) { - this(fluent, false); - } - public V2HPAScalingPolicyBuilder(V2HPAScalingPolicyFluent fluent,Boolean validationEnabled) { - this(fluent, new V2HPAScalingPolicy(), validationEnabled); + this(fluent, new V2HPAScalingPolicy()); } + public V2HPAScalingPolicyBuilder(V2HPAScalingPolicyFluent fluent,V2HPAScalingPolicy instance) { - this(fluent, instance, false); - } - public V2HPAScalingPolicyBuilder(V2HPAScalingPolicyFluent fluent,V2HPAScalingPolicy instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPeriodSeconds(instance.getPeriodSeconds()); - fluent.withType(instance.getType()); - fluent.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2HPAScalingPolicyBuilder(V2HPAScalingPolicy instance) { - this(instance,false); - } - public V2HPAScalingPolicyBuilder(V2HPAScalingPolicy instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPeriodSeconds(instance.getPeriodSeconds()); - this.withType(instance.getType()); - this.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2HPAScalingPolicyFluent fluent; - Boolean validationEnabled; + public V2HPAScalingPolicy build() { V2HPAScalingPolicy buildable = new V2HPAScalingPolicy(); buildable.setPeriodSeconds(fluent.getPeriodSeconds()); @@ -49,4 +29,5 @@ public V2HPAScalingPolicy build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyFluent.java index c91c82f71b..ba8b87646e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyFluent.java @@ -1,23 +1,98 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2HPAScalingPolicyFluent> extends Fluent{ - public Integer getPeriodSeconds(); - public A withPeriodSeconds(Integer periodSeconds); - public Boolean hasPeriodSeconds(); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public Integer getValue(); - public A withValue(Integer value); - public Boolean hasValue(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2HPAScalingPolicyFluent> extends BaseFluent{ + public V2HPAScalingPolicyFluent() { + } + public V2HPAScalingPolicyFluent(V2HPAScalingPolicy instance) { + this.copyInstance(instance); + } + private Integer periodSeconds; + private String type; + private Integer value; + + protected void copyInstance(V2HPAScalingPolicy instance) { + instance = (instance != null ? instance : new V2HPAScalingPolicy()); + if (instance != null) { + this.withPeriodSeconds(instance.getPeriodSeconds()); + this.withType(instance.getType()); + this.withValue(instance.getValue()); + } + } + + public Integer getPeriodSeconds() { + return this.periodSeconds; + } + + public A withPeriodSeconds(Integer periodSeconds) { + this.periodSeconds = periodSeconds; + return (A) this; + } + + public boolean hasPeriodSeconds() { + return this.periodSeconds != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public Integer getValue() { + return this.value; + } + + public A withValue(Integer value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2HPAScalingPolicyFluent that = (V2HPAScalingPolicyFluent) o; + if (!java.util.Objects.equals(periodSeconds, that.periodSeconds)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(periodSeconds, type, value, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (periodSeconds != null) { sb.append("periodSeconds:"); sb.append(periodSeconds + ","); } + if (type != null) { sb.append("type:"); sb.append(type + ","); } + if (value != null) { sb.append("value:"); sb.append(value); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyFluentImpl.java deleted file mode 100644 index 6682a0b104..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingPolicyFluentImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2HPAScalingPolicyFluentImpl> extends BaseFluent implements V2HPAScalingPolicyFluent{ - public V2HPAScalingPolicyFluentImpl() { - } - public V2HPAScalingPolicyFluentImpl(V2HPAScalingPolicy instance) { - if (instance != null) { - this.withPeriodSeconds(instance.getPeriodSeconds()); - this.withType(instance.getType()); - this.withValue(instance.getValue()); - } - } - private Integer periodSeconds; - private String type; - private Integer value; - public Integer getPeriodSeconds() { - return this.periodSeconds; - } - public A withPeriodSeconds(Integer periodSeconds) { - this.periodSeconds=periodSeconds; return (A) this; - } - public Boolean hasPeriodSeconds() { - return this.periodSeconds != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public Integer getValue() { - return this.value; - } - public A withValue(Integer value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2HPAScalingPolicyFluentImpl that = (V2HPAScalingPolicyFluentImpl) o; - if (!java.util.Objects.equals(periodSeconds, that.periodSeconds)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(periodSeconds, type, value, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (periodSeconds != null) { sb.append("periodSeconds:"); sb.append(periodSeconds + ","); } - if (type != null) { sb.append("type:"); sb.append(type + ","); } - if (value != null) { sb.append("value:"); sb.append(value); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesBuilder.java index 083f0be07e..073ef595f5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2HPAScalingRulesBuilder extends V2HPAScalingRulesFluentImpl implements VisitableBuilder{ +public class V2HPAScalingRulesBuilder extends V2HPAScalingRulesFluent implements VisitableBuilder{ public V2HPAScalingRulesBuilder() { - this(false); - } - public V2HPAScalingRulesBuilder(Boolean validationEnabled) { - this(new V2HPAScalingRules(), validationEnabled); + this(new V2HPAScalingRules()); } + public V2HPAScalingRulesBuilder(V2HPAScalingRulesFluent fluent) { - this(fluent, false); - } - public V2HPAScalingRulesBuilder(V2HPAScalingRulesFluent fluent,Boolean validationEnabled) { - this(fluent, new V2HPAScalingRules(), validationEnabled); + this(fluent, new V2HPAScalingRules()); } + public V2HPAScalingRulesBuilder(V2HPAScalingRulesFluent fluent,V2HPAScalingRules instance) { - this(fluent, instance, false); - } - public V2HPAScalingRulesBuilder(V2HPAScalingRulesFluent fluent,V2HPAScalingRules instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withPolicies(instance.getPolicies()); - fluent.withSelectPolicy(instance.getSelectPolicy()); - fluent.withStabilizationWindowSeconds(instance.getStabilizationWindowSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2HPAScalingRulesBuilder(V2HPAScalingRules instance) { - this(instance,false); - } - public V2HPAScalingRulesBuilder(V2HPAScalingRules instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withPolicies(instance.getPolicies()); - this.withSelectPolicy(instance.getSelectPolicy()); - this.withStabilizationWindowSeconds(instance.getStabilizationWindowSeconds()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2HPAScalingRulesFluent fluent; - Boolean validationEnabled; + public V2HPAScalingRules build() { V2HPAScalingRules buildable = new V2HPAScalingRules(); - buildable.setPolicies(fluent.getPolicies()); + buildable.setPolicies(fluent.buildPolicies()); buildable.setSelectPolicy(fluent.getSelectPolicy()); buildable.setStabilizationWindowSeconds(fluent.getStabilizationWindowSeconds()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesFluent.java index 8da33d91f7..51026c1d6f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesFluent.java @@ -1,63 +1,260 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2HPAScalingRulesFluent> extends Fluent{ - public A addToPolicies(int index,V2HPAScalingPolicy item); - public A setToPolicies(int index,V2HPAScalingPolicy item); - public A addToPolicies(io.kubernetes.client.openapi.models.V2HPAScalingPolicy... items); - public A addAllToPolicies(Collection items); - public A removeFromPolicies(io.kubernetes.client.openapi.models.V2HPAScalingPolicy... items); - public A removeAllFromPolicies(Collection items); - public A removeMatchingFromPolicies(Predicate predicate); - - /** - * This method has been deprecated, please use method buildPolicies instead. - * @return The buildable object. - */ - @Deprecated - public List getPolicies(); - public List buildPolicies(); - public V2HPAScalingPolicy buildPolicy(int index); - public V2HPAScalingPolicy buildFirstPolicy(); - public V2HPAScalingPolicy buildLastPolicy(); - public V2HPAScalingPolicy buildMatchingPolicy(Predicate predicate); - public Boolean hasMatchingPolicy(Predicate predicate); - public A withPolicies(List policies); - public A withPolicies(io.kubernetes.client.openapi.models.V2HPAScalingPolicy... policies); - public Boolean hasPolicies(); - public V2HPAScalingRulesFluent.PoliciesNested addNewPolicy(); - public V2HPAScalingRulesFluent.PoliciesNested addNewPolicyLike(V2HPAScalingPolicy item); - public V2HPAScalingRulesFluent.PoliciesNested setNewPolicyLike(int index,V2HPAScalingPolicy item); - public V2HPAScalingRulesFluent.PoliciesNested editPolicy(int index); - public V2HPAScalingRulesFluent.PoliciesNested editFirstPolicy(); - public V2HPAScalingRulesFluent.PoliciesNested editLastPolicy(); - public V2HPAScalingRulesFluent.PoliciesNested editMatchingPolicy(Predicate predicate); - public String getSelectPolicy(); - public A withSelectPolicy(String selectPolicy); - public Boolean hasSelectPolicy(); - public Integer getStabilizationWindowSeconds(); - public A withStabilizationWindowSeconds(Integer stabilizationWindowSeconds); - public Boolean hasStabilizationWindowSeconds(); - public interface PoliciesNested extends Nested,V2HPAScalingPolicyFluent>{ - public N and(); - public N endPolicy(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2HPAScalingRulesFluent> extends BaseFluent{ + public V2HPAScalingRulesFluent() { + } + + public V2HPAScalingRulesFluent(V2HPAScalingRules instance) { + this.copyInstance(instance); + } + private ArrayList policies; + private String selectPolicy; + private Integer stabilizationWindowSeconds; + + protected void copyInstance(V2HPAScalingRules instance) { + instance = (instance != null ? instance : new V2HPAScalingRules()); + if (instance != null) { + this.withPolicies(instance.getPolicies()); + this.withSelectPolicy(instance.getSelectPolicy()); + this.withStabilizationWindowSeconds(instance.getStabilizationWindowSeconds()); + } + } + + public A addToPolicies(int index,V2HPAScalingPolicy item) { + if (this.policies == null) {this.policies = new ArrayList();} + V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item); + if (index < 0 || index >= policies.size()) { _visitables.get("policies").add(builder); policies.add(builder); } else { _visitables.get("policies").add(index, builder); policies.add(index, builder);} + return (A)this; + } + + public A setToPolicies(int index,V2HPAScalingPolicy item) { + if (this.policies == null) {this.policies = new ArrayList();} + V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item); + if (index < 0 || index >= policies.size()) { _visitables.get("policies").add(builder); policies.add(builder); } else { _visitables.get("policies").set(index, builder); policies.set(index, builder);} + return (A)this; + } + + public A addToPolicies(io.kubernetes.client.openapi.models.V2HPAScalingPolicy... items) { + if (this.policies == null) {this.policies = new ArrayList();} + for (V2HPAScalingPolicy item : items) {V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item);_visitables.get("policies").add(builder);this.policies.add(builder);} return (A)this; + } + + public A addAllToPolicies(Collection items) { + if (this.policies == null) {this.policies = new ArrayList();} + for (V2HPAScalingPolicy item : items) {V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item);_visitables.get("policies").add(builder);this.policies.add(builder);} return (A)this; + } + + public A removeFromPolicies(io.kubernetes.client.openapi.models.V2HPAScalingPolicy... items) { + if (this.policies == null) return (A)this; + for (V2HPAScalingPolicy item : items) {V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item);_visitables.get("policies").remove(builder); this.policies.remove(builder);} return (A)this; + } + + public A removeAllFromPolicies(Collection items) { + if (this.policies == null) return (A)this; + for (V2HPAScalingPolicy item : items) {V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item);_visitables.get("policies").remove(builder); this.policies.remove(builder);} return (A)this; + } + + public A removeMatchingFromPolicies(Predicate predicate) { + if (policies == null) return (A) this; + final Iterator each = policies.iterator(); + final List visitables = _visitables.get("policies"); + while (each.hasNext()) { + V2HPAScalingPolicyBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildPolicies() { + return this.policies != null ? build(policies) : null; + } + + public V2HPAScalingPolicy buildPolicy(int index) { + return this.policies.get(index).build(); + } + + public V2HPAScalingPolicy buildFirstPolicy() { + return this.policies.get(0).build(); + } + + public V2HPAScalingPolicy buildLastPolicy() { + return this.policies.get(policies.size() - 1).build(); + } + + public V2HPAScalingPolicy buildMatchingPolicy(Predicate predicate) { + for (V2HPAScalingPolicyBuilder item : policies) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingPolicy(Predicate predicate) { + for (V2HPAScalingPolicyBuilder item : policies) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withPolicies(List policies) { + if (this.policies != null) { + this._visitables.get("policies").clear(); + } + if (policies != null) { + this.policies = new ArrayList(); + for (V2HPAScalingPolicy item : policies) { + this.addToPolicies(item); + } + } else { + this.policies = null; + } + return (A) this; + } + + public A withPolicies(io.kubernetes.client.openapi.models.V2HPAScalingPolicy... policies) { + if (this.policies != null) { + this.policies.clear(); + _visitables.remove("policies"); + } + if (policies != null) { + for (V2HPAScalingPolicy item : policies) { + this.addToPolicies(item); + } + } + return (A) this; + } + + public boolean hasPolicies() { + return this.policies != null && !this.policies.isEmpty(); } + public PoliciesNested addNewPolicy() { + return new PoliciesNested(-1, null); + } + + public PoliciesNested addNewPolicyLike(V2HPAScalingPolicy item) { + return new PoliciesNested(-1, item); + } + + public PoliciesNested setNewPolicyLike(int index,V2HPAScalingPolicy item) { + return new PoliciesNested(index, item); + } + + public PoliciesNested editPolicy(int index) { + if (policies.size() <= index) throw new RuntimeException("Can't edit policies. Index exceeds size."); + return setNewPolicyLike(index, buildPolicy(index)); + } + + public PoliciesNested editFirstPolicy() { + if (policies.size() == 0) throw new RuntimeException("Can't edit first policies. The list is empty."); + return setNewPolicyLike(0, buildPolicy(0)); + } + + public PoliciesNested editLastPolicy() { + int index = policies.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last policies. The list is empty."); + return setNewPolicyLike(index, buildPolicy(index)); + } + + public PoliciesNested editMatchingPolicy(Predicate predicate) { + int index = -1; + for (int i=0;i extends V2HPAScalingPolicyFluent> implements Nested{ + PoliciesNested(int index,V2HPAScalingPolicy item) { + this.index = index; + this.builder = new V2HPAScalingPolicyBuilder(this, item); + } + V2HPAScalingPolicyBuilder builder; + int index; + + public N and() { + return (N) V2HPAScalingRulesFluent.this.setToPolicies(index,builder.build()); + } + + public N endPolicy() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesFluentImpl.java deleted file mode 100644 index 261480a7db..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HPAScalingRulesFluentImpl.java +++ /dev/null @@ -1,205 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.Collection; -import java.lang.Object; -import java.util.List; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2HPAScalingRulesFluentImpl> extends BaseFluent implements V2HPAScalingRulesFluent{ - public V2HPAScalingRulesFluentImpl() { - } - public V2HPAScalingRulesFluentImpl(V2HPAScalingRules instance) { - if (instance != null) { - this.withPolicies(instance.getPolicies()); - this.withSelectPolicy(instance.getSelectPolicy()); - this.withStabilizationWindowSeconds(instance.getStabilizationWindowSeconds()); - } - } - private ArrayList policies; - private String selectPolicy; - private Integer stabilizationWindowSeconds; - public A addToPolicies(int index,V2HPAScalingPolicy item) { - if (this.policies == null) {this.policies = new ArrayList();} - V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item); - if (index < 0 || index >= policies.size()) { _visitables.get("policies").add(builder); policies.add(builder); } else { _visitables.get("policies").add(index, builder); policies.add(index, builder);} - return (A)this; - } - public A setToPolicies(int index,V2HPAScalingPolicy item) { - if (this.policies == null) {this.policies = new ArrayList();} - V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item); - if (index < 0 || index >= policies.size()) { _visitables.get("policies").add(builder); policies.add(builder); } else { _visitables.get("policies").set(index, builder); policies.set(index, builder);} - return (A)this; - } - public A addToPolicies(io.kubernetes.client.openapi.models.V2HPAScalingPolicy... items) { - if (this.policies == null) {this.policies = new ArrayList();} - for (V2HPAScalingPolicy item : items) {V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item);_visitables.get("policies").add(builder);this.policies.add(builder);} return (A)this; - } - public A addAllToPolicies(Collection items) { - if (this.policies == null) {this.policies = new ArrayList();} - for (V2HPAScalingPolicy item : items) {V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item);_visitables.get("policies").add(builder);this.policies.add(builder);} return (A)this; - } - public A removeFromPolicies(io.kubernetes.client.openapi.models.V2HPAScalingPolicy... items) { - for (V2HPAScalingPolicy item : items) {V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item);_visitables.get("policies").remove(builder);if (this.policies != null) {this.policies.remove(builder);}} return (A)this; - } - public A removeAllFromPolicies(Collection items) { - for (V2HPAScalingPolicy item : items) {V2HPAScalingPolicyBuilder builder = new V2HPAScalingPolicyBuilder(item);_visitables.get("policies").remove(builder);if (this.policies != null) {this.policies.remove(builder);}} return (A)this; - } - public A removeMatchingFromPolicies(Predicate predicate) { - if (policies == null) return (A) this; - final Iterator each = policies.iterator(); - final List visitables = _visitables.get("policies"); - while (each.hasNext()) { - V2HPAScalingPolicyBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildPolicies instead. - * @return The buildable object. - */ - @Deprecated - public List getPolicies() { - return policies != null ? build(policies) : null; - } - public List buildPolicies() { - return policies != null ? build(policies) : null; - } - public V2HPAScalingPolicy buildPolicy(int index) { - return this.policies.get(index).build(); - } - public V2HPAScalingPolicy buildFirstPolicy() { - return this.policies.get(0).build(); - } - public V2HPAScalingPolicy buildLastPolicy() { - return this.policies.get(policies.size() - 1).build(); - } - public V2HPAScalingPolicy buildMatchingPolicy(Predicate predicate) { - for (V2HPAScalingPolicyBuilder item: policies) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingPolicy(Predicate predicate) { - for (V2HPAScalingPolicyBuilder item: policies) { if(predicate.test(item)){ return true;} } return false; - } - public A withPolicies(List policies) { - if (this.policies != null) { _visitables.get("policies").clear();} - if (policies != null) {this.policies = new ArrayList(); for (V2HPAScalingPolicy item : policies){this.addToPolicies(item);}} else { this.policies = null;} return (A) this; - } - public A withPolicies(io.kubernetes.client.openapi.models.V2HPAScalingPolicy... policies) { - if (this.policies != null) {this.policies.clear(); _visitables.remove("policies"); } - if (policies != null) {for (V2HPAScalingPolicy item :policies){ this.addToPolicies(item);}} return (A) this; - } - public Boolean hasPolicies() { - return policies != null && !policies.isEmpty(); - } - public V2HPAScalingRulesFluentImpl.PoliciesNested addNewPolicy() { - return new V2HPAScalingRulesFluentImpl.PoliciesNestedImpl(); - } - public V2HPAScalingRulesFluentImpl.PoliciesNested addNewPolicyLike(V2HPAScalingPolicy item) { - return new V2HPAScalingRulesFluentImpl.PoliciesNestedImpl(-1, item); - } - public V2HPAScalingRulesFluentImpl.PoliciesNested setNewPolicyLike(int index,V2HPAScalingPolicy item) { - return new V2HPAScalingRulesFluentImpl.PoliciesNestedImpl(index, item); - } - public V2HPAScalingRulesFluentImpl.PoliciesNested editPolicy(int index) { - if (policies.size() <= index) throw new RuntimeException("Can't edit policies. Index exceeds size."); - return setNewPolicyLike(index, buildPolicy(index)); - } - public V2HPAScalingRulesFluentImpl.PoliciesNested editFirstPolicy() { - if (policies.size() == 0) throw new RuntimeException("Can't edit first policies. The list is empty."); - return setNewPolicyLike(0, buildPolicy(0)); - } - public V2HPAScalingRulesFluentImpl.PoliciesNested editLastPolicy() { - int index = policies.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last policies. The list is empty."); - return setNewPolicyLike(index, buildPolicy(index)); - } - public V2HPAScalingRulesFluentImpl.PoliciesNested editMatchingPolicy(Predicate predicate) { - int index = -1; - for (int i=0;i extends V2HPAScalingPolicyFluentImpl> implements V2HPAScalingRulesFluentImpl.PoliciesNested,Nested{ - PoliciesNestedImpl(int index,V2HPAScalingPolicy item) { - this.index = index; - this.builder = new V2HPAScalingPolicyBuilder(this, item); - } - PoliciesNestedImpl() { - this.index = -1; - this.builder = new V2HPAScalingPolicyBuilder(this); - } - V2HPAScalingPolicyBuilder builder; - int index; - public N and() { - return (N) V2HPAScalingRulesFluentImpl.this.setToPolicies(index,builder.build()); - } - public N endPolicy() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorBuilder.java index a107931abb..6b0e41693b 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2HorizontalPodAutoscalerBehaviorBuilder extends V2HorizontalPodAutoscalerBehaviorFluentImpl implements VisitableBuilder{ +public class V2HorizontalPodAutoscalerBehaviorBuilder extends V2HorizontalPodAutoscalerBehaviorFluent implements VisitableBuilder{ public V2HorizontalPodAutoscalerBehaviorBuilder() { - this(false); - } - public V2HorizontalPodAutoscalerBehaviorBuilder(Boolean validationEnabled) { - this(new V2HorizontalPodAutoscalerBehavior(), validationEnabled); + this(new V2HorizontalPodAutoscalerBehavior()); } + public V2HorizontalPodAutoscalerBehaviorBuilder(V2HorizontalPodAutoscalerBehaviorFluent fluent) { - this(fluent, false); - } - public V2HorizontalPodAutoscalerBehaviorBuilder(V2HorizontalPodAutoscalerBehaviorFluent fluent,Boolean validationEnabled) { - this(fluent, new V2HorizontalPodAutoscalerBehavior(), validationEnabled); + this(fluent, new V2HorizontalPodAutoscalerBehavior()); } + public V2HorizontalPodAutoscalerBehaviorBuilder(V2HorizontalPodAutoscalerBehaviorFluent fluent,V2HorizontalPodAutoscalerBehavior instance) { - this(fluent, instance, false); - } - public V2HorizontalPodAutoscalerBehaviorBuilder(V2HorizontalPodAutoscalerBehaviorFluent fluent,V2HorizontalPodAutoscalerBehavior instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withScaleDown(instance.getScaleDown()); - fluent.withScaleUp(instance.getScaleUp()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2HorizontalPodAutoscalerBehaviorBuilder(V2HorizontalPodAutoscalerBehavior instance) { - this(instance,false); - } - public V2HorizontalPodAutoscalerBehaviorBuilder(V2HorizontalPodAutoscalerBehavior instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withScaleDown(instance.getScaleDown()); - this.withScaleUp(instance.getScaleUp()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2HorizontalPodAutoscalerBehaviorFluent fluent; - Boolean validationEnabled; + public V2HorizontalPodAutoscalerBehavior build() { V2HorizontalPodAutoscalerBehavior buildable = new V2HorizontalPodAutoscalerBehavior(); - buildable.setScaleDown(fluent.getScaleDown()); - buildable.setScaleUp(fluent.getScaleUp()); + buildable.setScaleDown(fluent.buildScaleDown()); + buildable.setScaleUp(fluent.buildScaleUp()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorFluent.java index 676420ce35..fd484e2f98 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2HorizontalPodAutoscalerBehaviorFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildScaleDown instead. - * @return The buildable object. - */ - @Deprecated - public V2HPAScalingRules getScaleDown(); - public V2HPAScalingRules buildScaleDown(); - public A withScaleDown(V2HPAScalingRules scaleDown); - public Boolean hasScaleDown(); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleDownNested withNewScaleDown(); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleDownNested withNewScaleDownLike(V2HPAScalingRules item); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleDownNested editScaleDown(); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleDownNested editOrNewScaleDown(); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleDownNested editOrNewScaleDownLike(V2HPAScalingRules item); - - /** - * This method has been deprecated, please use method buildScaleUp instead. - * @return The buildable object. - */ - @Deprecated - public V2HPAScalingRules getScaleUp(); - public V2HPAScalingRules buildScaleUp(); - public A withScaleUp(V2HPAScalingRules scaleUp); - public Boolean hasScaleUp(); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleUpNested withNewScaleUp(); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleUpNested withNewScaleUpLike(V2HPAScalingRules item); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleUpNested editScaleUp(); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleUpNested editOrNewScaleUp(); - public V2HorizontalPodAutoscalerBehaviorFluent.ScaleUpNested editOrNewScaleUpLike(V2HPAScalingRules item); - public interface ScaleDownNested extends Nested,V2HPAScalingRulesFluent>{ - public N and(); - public N endScaleDown(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2HorizontalPodAutoscalerBehaviorFluent> extends BaseFluent{ + public V2HorizontalPodAutoscalerBehaviorFluent() { + } + + public V2HorizontalPodAutoscalerBehaviorFluent(V2HorizontalPodAutoscalerBehavior instance) { + this.copyInstance(instance); + } + private V2HPAScalingRulesBuilder scaleDown; + private V2HPAScalingRulesBuilder scaleUp; + + protected void copyInstance(V2HorizontalPodAutoscalerBehavior instance) { + instance = (instance != null ? instance : new V2HorizontalPodAutoscalerBehavior()); + if (instance != null) { + this.withScaleDown(instance.getScaleDown()); + this.withScaleUp(instance.getScaleUp()); + } + } + + public V2HPAScalingRules buildScaleDown() { + return this.scaleDown != null ? this.scaleDown.build() : null; + } + + public A withScaleDown(V2HPAScalingRules scaleDown) { + this._visitables.remove("scaleDown"); + if (scaleDown != null) { + this.scaleDown = new V2HPAScalingRulesBuilder(scaleDown); + this._visitables.get("scaleDown").add(this.scaleDown); + } else { + this.scaleDown = null; + this._visitables.get("scaleDown").remove(this.scaleDown); + } + return (A) this; + } + + public boolean hasScaleDown() { + return this.scaleDown != null; + } + + public ScaleDownNested withNewScaleDown() { + return new ScaleDownNested(null); } - public interface ScaleUpNested extends Nested,V2HPAScalingRulesFluent>{ - public N and(); - public N endScaleUp(); + + public ScaleDownNested withNewScaleDownLike(V2HPAScalingRules item) { + return new ScaleDownNested(item); + } + + public ScaleDownNested editScaleDown() { + return withNewScaleDownLike(java.util.Optional.ofNullable(buildScaleDown()).orElse(null)); + } + + public ScaleDownNested editOrNewScaleDown() { + return withNewScaleDownLike(java.util.Optional.ofNullable(buildScaleDown()).orElse(new V2HPAScalingRulesBuilder().build())); + } + + public ScaleDownNested editOrNewScaleDownLike(V2HPAScalingRules item) { + return withNewScaleDownLike(java.util.Optional.ofNullable(buildScaleDown()).orElse(item)); + } + + public V2HPAScalingRules buildScaleUp() { + return this.scaleUp != null ? this.scaleUp.build() : null; + } + + public A withScaleUp(V2HPAScalingRules scaleUp) { + this._visitables.remove("scaleUp"); + if (scaleUp != null) { + this.scaleUp = new V2HPAScalingRulesBuilder(scaleUp); + this._visitables.get("scaleUp").add(this.scaleUp); + } else { + this.scaleUp = null; + this._visitables.get("scaleUp").remove(this.scaleUp); + } + return (A) this; + } + + public boolean hasScaleUp() { + return this.scaleUp != null; + } + + public ScaleUpNested withNewScaleUp() { + return new ScaleUpNested(null); + } + + public ScaleUpNested withNewScaleUpLike(V2HPAScalingRules item) { + return new ScaleUpNested(item); + } + + public ScaleUpNested editScaleUp() { + return withNewScaleUpLike(java.util.Optional.ofNullable(buildScaleUp()).orElse(null)); + } + + public ScaleUpNested editOrNewScaleUp() { + return withNewScaleUpLike(java.util.Optional.ofNullable(buildScaleUp()).orElse(new V2HPAScalingRulesBuilder().build())); + } + + public ScaleUpNested editOrNewScaleUpLike(V2HPAScalingRules item) { + return withNewScaleUpLike(java.util.Optional.ofNullable(buildScaleUp()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2HorizontalPodAutoscalerBehaviorFluent that = (V2HorizontalPodAutoscalerBehaviorFluent) o; + if (!java.util.Objects.equals(scaleDown, that.scaleDown)) return false; + if (!java.util.Objects.equals(scaleUp, that.scaleUp)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(scaleDown, scaleUp, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (scaleDown != null) { sb.append("scaleDown:"); sb.append(scaleDown + ","); } + if (scaleUp != null) { sb.append("scaleUp:"); sb.append(scaleUp); } + sb.append("}"); + return sb.toString(); + } + public class ScaleDownNested extends V2HPAScalingRulesFluent> implements Nested{ + ScaleDownNested(V2HPAScalingRules item) { + this.builder = new V2HPAScalingRulesBuilder(this, item); + } + V2HPAScalingRulesBuilder builder; + + public N and() { + return (N) V2HorizontalPodAutoscalerBehaviorFluent.this.withScaleDown(builder.build()); + } + + public N endScaleDown() { + return and(); + } + } + public class ScaleUpNested extends V2HPAScalingRulesFluent> implements Nested{ + ScaleUpNested(V2HPAScalingRules item) { + this.builder = new V2HPAScalingRulesBuilder(this, item); + } + V2HPAScalingRulesBuilder builder; + + public N and() { + return (N) V2HorizontalPodAutoscalerBehaviorFluent.this.withScaleUp(builder.build()); + } + + public N endScaleUp() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorFluentImpl.java deleted file mode 100644 index 75185573ce..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBehaviorFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2HorizontalPodAutoscalerBehaviorFluentImpl> extends BaseFluent implements V2HorizontalPodAutoscalerBehaviorFluent{ - public V2HorizontalPodAutoscalerBehaviorFluentImpl() { - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl(V2HorizontalPodAutoscalerBehavior instance) { - if (instance != null) { - this.withScaleDown(instance.getScaleDown()); - this.withScaleUp(instance.getScaleUp()); - } - } - private V2HPAScalingRulesBuilder scaleDown; - private V2HPAScalingRulesBuilder scaleUp; - - /** - * This method has been deprecated, please use method buildScaleDown instead. - * @return The buildable object. - */ - @Deprecated - public V2HPAScalingRules getScaleDown() { - return this.scaleDown!=null ?this.scaleDown.build():null; - } - public V2HPAScalingRules buildScaleDown() { - return this.scaleDown!=null ?this.scaleDown.build():null; - } - public A withScaleDown(V2HPAScalingRules scaleDown) { - _visitables.get("scaleDown").remove(this.scaleDown); - if (scaleDown!=null){ this.scaleDown= new V2HPAScalingRulesBuilder(scaleDown); _visitables.get("scaleDown").add(this.scaleDown);} else { this.scaleDown = null; _visitables.get("scaleDown").remove(this.scaleDown); } return (A) this; - } - public Boolean hasScaleDown() { - return this.scaleDown != null; - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleDownNested withNewScaleDown() { - return new V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleDownNestedImpl(); - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleDownNested withNewScaleDownLike(V2HPAScalingRules item) { - return new V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleDownNestedImpl(item); - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleDownNested editScaleDown() { - return withNewScaleDownLike(getScaleDown()); - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleDownNested editOrNewScaleDown() { - return withNewScaleDownLike(getScaleDown() != null ? getScaleDown(): new V2HPAScalingRulesBuilder().build()); - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleDownNested editOrNewScaleDownLike(V2HPAScalingRules item) { - return withNewScaleDownLike(getScaleDown() != null ? getScaleDown(): item); - } - - /** - * This method has been deprecated, please use method buildScaleUp instead. - * @return The buildable object. - */ - @Deprecated - public V2HPAScalingRules getScaleUp() { - return this.scaleUp!=null ?this.scaleUp.build():null; - } - public V2HPAScalingRules buildScaleUp() { - return this.scaleUp!=null ?this.scaleUp.build():null; - } - public A withScaleUp(V2HPAScalingRules scaleUp) { - _visitables.get("scaleUp").remove(this.scaleUp); - if (scaleUp!=null){ this.scaleUp= new V2HPAScalingRulesBuilder(scaleUp); _visitables.get("scaleUp").add(this.scaleUp);} else { this.scaleUp = null; _visitables.get("scaleUp").remove(this.scaleUp); } return (A) this; - } - public Boolean hasScaleUp() { - return this.scaleUp != null; - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleUpNested withNewScaleUp() { - return new V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleUpNestedImpl(); - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleUpNested withNewScaleUpLike(V2HPAScalingRules item) { - return new V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleUpNestedImpl(item); - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleUpNested editScaleUp() { - return withNewScaleUpLike(getScaleUp()); - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleUpNested editOrNewScaleUp() { - return withNewScaleUpLike(getScaleUp() != null ? getScaleUp(): new V2HPAScalingRulesBuilder().build()); - } - public V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleUpNested editOrNewScaleUpLike(V2HPAScalingRules item) { - return withNewScaleUpLike(getScaleUp() != null ? getScaleUp(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2HorizontalPodAutoscalerBehaviorFluentImpl that = (V2HorizontalPodAutoscalerBehaviorFluentImpl) o; - if (!java.util.Objects.equals(scaleDown, that.scaleDown)) return false; - - if (!java.util.Objects.equals(scaleUp, that.scaleUp)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(scaleDown, scaleUp, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (scaleDown != null) { sb.append("scaleDown:"); sb.append(scaleDown + ","); } - if (scaleUp != null) { sb.append("scaleUp:"); sb.append(scaleUp); } - sb.append("}"); - return sb.toString(); - } - class ScaleDownNestedImpl extends V2HPAScalingRulesFluentImpl> implements V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleDownNested,Nested{ - ScaleDownNestedImpl(V2HPAScalingRules item) { - this.builder = new V2HPAScalingRulesBuilder(this, item); - } - ScaleDownNestedImpl() { - this.builder = new V2HPAScalingRulesBuilder(this); - } - V2HPAScalingRulesBuilder builder; - public N and() { - return (N) V2HorizontalPodAutoscalerBehaviorFluentImpl.this.withScaleDown(builder.build()); - } - public N endScaleDown() { - return and(); - } - - } - class ScaleUpNestedImpl extends V2HPAScalingRulesFluentImpl> implements V2HorizontalPodAutoscalerBehaviorFluentImpl.ScaleUpNested,Nested{ - ScaleUpNestedImpl(V2HPAScalingRules item) { - this.builder = new V2HPAScalingRulesBuilder(this, item); - } - ScaleUpNestedImpl() { - this.builder = new V2HPAScalingRulesBuilder(this); - } - V2HPAScalingRulesBuilder builder; - public N and() { - return (N) V2HorizontalPodAutoscalerBehaviorFluentImpl.this.withScaleUp(builder.build()); - } - public N endScaleUp() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBuilder.java index aa9372709e..9c5037028e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2HorizontalPodAutoscalerBuilder extends V2HorizontalPodAutoscalerFluentImpl implements VisitableBuilder{ +public class V2HorizontalPodAutoscalerBuilder extends V2HorizontalPodAutoscalerFluent implements VisitableBuilder{ public V2HorizontalPodAutoscalerBuilder() { - this(false); - } - public V2HorizontalPodAutoscalerBuilder(Boolean validationEnabled) { - this(new V2HorizontalPodAutoscaler(), validationEnabled); + this(new V2HorizontalPodAutoscaler()); } + public V2HorizontalPodAutoscalerBuilder(V2HorizontalPodAutoscalerFluent fluent) { - this(fluent, false); - } - public V2HorizontalPodAutoscalerBuilder(V2HorizontalPodAutoscalerFluent fluent,Boolean validationEnabled) { - this(fluent, new V2HorizontalPodAutoscaler(), validationEnabled); + this(fluent, new V2HorizontalPodAutoscaler()); } + public V2HorizontalPodAutoscalerBuilder(V2HorizontalPodAutoscalerFluent fluent,V2HorizontalPodAutoscaler instance) { - this(fluent, instance, false); - } - public V2HorizontalPodAutoscalerBuilder(V2HorizontalPodAutoscalerFluent fluent,V2HorizontalPodAutoscaler instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - fluent.withSpec(instance.getSpec()); - fluent.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2HorizontalPodAutoscalerBuilder(V2HorizontalPodAutoscaler instance) { - this(instance,false); - } - public V2HorizontalPodAutoscalerBuilder(V2HorizontalPodAutoscaler instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2HorizontalPodAutoscalerFluent fluent; - Boolean validationEnabled; + public V2HorizontalPodAutoscaler build() { V2HorizontalPodAutoscaler buildable = new V2HorizontalPodAutoscaler(); buildable.setApiVersion(fluent.getApiVersion()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); - buildable.setSpec(fluent.getSpec()); - buildable.setStatus(fluent.getStatus()); + buildable.setMetadata(fluent.buildMetadata()); + buildable.setSpec(fluent.buildSpec()); + buildable.setStatus(fluent.buildStatus()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionBuilder.java index 526144b752..cc2f2b61a5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionBuilder.java @@ -1,50 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2HorizontalPodAutoscalerConditionBuilder extends V2HorizontalPodAutoscalerConditionFluentImpl implements VisitableBuilder{ +public class V2HorizontalPodAutoscalerConditionBuilder extends V2HorizontalPodAutoscalerConditionFluent implements VisitableBuilder{ public V2HorizontalPodAutoscalerConditionBuilder() { - this(false); - } - public V2HorizontalPodAutoscalerConditionBuilder(Boolean validationEnabled) { - this(new V2HorizontalPodAutoscalerCondition(), validationEnabled); + this(new V2HorizontalPodAutoscalerCondition()); } + public V2HorizontalPodAutoscalerConditionBuilder(V2HorizontalPodAutoscalerConditionFluent fluent) { - this(fluent, false); - } - public V2HorizontalPodAutoscalerConditionBuilder(V2HorizontalPodAutoscalerConditionFluent fluent,Boolean validationEnabled) { - this(fluent, new V2HorizontalPodAutoscalerCondition(), validationEnabled); + this(fluent, new V2HorizontalPodAutoscalerCondition()); } + public V2HorizontalPodAutoscalerConditionBuilder(V2HorizontalPodAutoscalerConditionFluent fluent,V2HorizontalPodAutoscalerCondition instance) { - this(fluent, instance, false); - } - public V2HorizontalPodAutoscalerConditionBuilder(V2HorizontalPodAutoscalerConditionFluent fluent,V2HorizontalPodAutoscalerCondition instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withLastTransitionTime(instance.getLastTransitionTime()); - fluent.withMessage(instance.getMessage()); - fluent.withReason(instance.getReason()); - fluent.withStatus(instance.getStatus()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2HorizontalPodAutoscalerConditionBuilder(V2HorizontalPodAutoscalerCondition instance) { - this(instance,false); - } - public V2HorizontalPodAutoscalerConditionBuilder(V2HorizontalPodAutoscalerCondition instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2HorizontalPodAutoscalerConditionFluent fluent; - Boolean validationEnabled; + public V2HorizontalPodAutoscalerCondition build() { V2HorizontalPodAutoscalerCondition buildable = new V2HorizontalPodAutoscalerCondition(); buildable.setLastTransitionTime(fluent.getLastTransitionTime()); @@ -55,4 +31,5 @@ public V2HorizontalPodAutoscalerCondition build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionFluent.java index fa85676276..f817f3593a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionFluent.java @@ -1,29 +1,132 @@ package io.kubernetes.client.openapi.models; import java.time.OffsetDateTime; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2HorizontalPodAutoscalerConditionFluent> extends Fluent{ - public OffsetDateTime getLastTransitionTime(); - public A withLastTransitionTime(OffsetDateTime lastTransitionTime); - public Boolean hasLastTransitionTime(); - public String getMessage(); - public A withMessage(String message); - public Boolean hasMessage(); - public String getReason(); - public A withReason(String reason); - public Boolean hasReason(); - public String getStatus(); - public A withStatus(String status); - public Boolean hasStatus(); - public String getType(); - public A withType(String type); - public Boolean hasType(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2HorizontalPodAutoscalerConditionFluent> extends BaseFluent{ + public V2HorizontalPodAutoscalerConditionFluent() { + } + public V2HorizontalPodAutoscalerConditionFluent(V2HorizontalPodAutoscalerCondition instance) { + this.copyInstance(instance); + } + private OffsetDateTime lastTransitionTime; + private String message; + private String reason; + private String status; + private String type; + + protected void copyInstance(V2HorizontalPodAutoscalerCondition instance) { + instance = (instance != null ? instance : new V2HorizontalPodAutoscalerCondition()); + if (instance != null) { + this.withLastTransitionTime(instance.getLastTransitionTime()); + this.withMessage(instance.getMessage()); + this.withReason(instance.getReason()); + this.withStatus(instance.getStatus()); + this.withType(instance.getType()); + } + } + + public OffsetDateTime getLastTransitionTime() { + return this.lastTransitionTime; + } + + public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { + this.lastTransitionTime = lastTransitionTime; + return (A) this; + } + + public boolean hasLastTransitionTime() { + return this.lastTransitionTime != null; + } + + public String getMessage() { + return this.message; + } + + public A withMessage(String message) { + this.message = message; + return (A) this; + } + + public boolean hasMessage() { + return this.message != null; + } + + public String getReason() { + return this.reason; + } + + public A withReason(String reason) { + this.reason = reason; + return (A) this; + } + + public boolean hasReason() { + return this.reason != null; + } + + public String getStatus() { + return this.status; + } + + public A withStatus(String status) { + this.status = status; + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2HorizontalPodAutoscalerConditionFluent that = (V2HorizontalPodAutoscalerConditionFluent) o; + if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; + if (!java.util.Objects.equals(message, that.message)) return false; + if (!java.util.Objects.equals(reason, that.reason)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } + if (message != null) { sb.append("message:"); sb.append(message + ","); } + if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } + if (status != null) { sb.append("status:"); sb.append(status + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionFluentImpl.java deleted file mode 100644 index 876fc3e61e..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerConditionFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.time.OffsetDateTime; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2HorizontalPodAutoscalerConditionFluentImpl> extends BaseFluent implements V2HorizontalPodAutoscalerConditionFluent{ - public V2HorizontalPodAutoscalerConditionFluentImpl() { - } - public V2HorizontalPodAutoscalerConditionFluentImpl(V2HorizontalPodAutoscalerCondition instance) { - if (instance != null) { - this.withLastTransitionTime(instance.getLastTransitionTime()); - this.withMessage(instance.getMessage()); - this.withReason(instance.getReason()); - this.withStatus(instance.getStatus()); - this.withType(instance.getType()); - } - } - private OffsetDateTime lastTransitionTime; - private String message; - private String reason; - private String status; - private String type; - public OffsetDateTime getLastTransitionTime() { - return this.lastTransitionTime; - } - public A withLastTransitionTime(OffsetDateTime lastTransitionTime) { - this.lastTransitionTime=lastTransitionTime; return (A) this; - } - public Boolean hasLastTransitionTime() { - return this.lastTransitionTime != null; - } - public String getMessage() { - return this.message; - } - public A withMessage(String message) { - this.message=message; return (A) this; - } - public Boolean hasMessage() { - return this.message != null; - } - public String getReason() { - return this.reason; - } - public A withReason(String reason) { - this.reason=reason; return (A) this; - } - public Boolean hasReason() { - return this.reason != null; - } - public String getStatus() { - return this.status; - } - public A withStatus(String status) { - this.status=status; return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2HorizontalPodAutoscalerConditionFluentImpl that = (V2HorizontalPodAutoscalerConditionFluentImpl) o; - if (!java.util.Objects.equals(lastTransitionTime, that.lastTransitionTime)) return false; - - if (!java.util.Objects.equals(message, that.message)) return false; - - if (!java.util.Objects.equals(reason, that.reason)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(lastTransitionTime, message, reason, status, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (lastTransitionTime != null) { sb.append("lastTransitionTime:"); sb.append(lastTransitionTime + ","); } - if (message != null) { sb.append("message:"); sb.append(message + ","); } - if (reason != null) { sb.append("reason:"); sb.append(reason + ","); } - if (status != null) { sb.append("status:"); sb.append(status + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerFluent.java index 9cfd7b625c..70b312c08a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerFluent.java @@ -1,81 +1,260 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2HorizontalPodAutoscalerFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata(); - public V1ObjectMeta buildMetadata(); - public A withMetadata(V1ObjectMeta metadata); - public Boolean hasMetadata(); - public V2HorizontalPodAutoscalerFluent.MetadataNested withNewMetadata(); - public V2HorizontalPodAutoscalerFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item); - public V2HorizontalPodAutoscalerFluent.MetadataNested editMetadata(); - public V2HorizontalPodAutoscalerFluent.MetadataNested editOrNewMetadata(); - public V2HorizontalPodAutoscalerFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item); - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V2HorizontalPodAutoscalerSpec getSpec(); - public V2HorizontalPodAutoscalerSpec buildSpec(); - public A withSpec(V2HorizontalPodAutoscalerSpec spec); - public Boolean hasSpec(); - public V2HorizontalPodAutoscalerFluent.SpecNested withNewSpec(); - public V2HorizontalPodAutoscalerFluent.SpecNested withNewSpecLike(V2HorizontalPodAutoscalerSpec item); - public V2HorizontalPodAutoscalerFluent.SpecNested editSpec(); - public V2HorizontalPodAutoscalerFluent.SpecNested editOrNewSpec(); - public V2HorizontalPodAutoscalerFluent.SpecNested editOrNewSpecLike(V2HorizontalPodAutoscalerSpec item); - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V2HorizontalPodAutoscalerStatus getStatus(); - public V2HorizontalPodAutoscalerStatus buildStatus(); - public A withStatus(V2HorizontalPodAutoscalerStatus status); - public Boolean hasStatus(); - public V2HorizontalPodAutoscalerFluent.StatusNested withNewStatus(); - public V2HorizontalPodAutoscalerFluent.StatusNested withNewStatusLike(V2HorizontalPodAutoscalerStatus item); - public V2HorizontalPodAutoscalerFluent.StatusNested editStatus(); - public V2HorizontalPodAutoscalerFluent.StatusNested editOrNewStatus(); - public V2HorizontalPodAutoscalerFluent.StatusNested editOrNewStatusLike(V2HorizontalPodAutoscalerStatus item); - public interface MetadataNested extends Nested,V1ObjectMetaFluent>{ - public N and(); - public N endMetadata(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2HorizontalPodAutoscalerFluent> extends BaseFluent{ + public V2HorizontalPodAutoscalerFluent() { + } + + public V2HorizontalPodAutoscalerFluent(V2HorizontalPodAutoscaler instance) { + this.copyInstance(instance); + } + private String apiVersion; + private String kind; + private V1ObjectMetaBuilder metadata; + private V2HorizontalPodAutoscalerSpecBuilder spec; + private V2HorizontalPodAutoscalerStatusBuilder status; + + protected void copyInstance(V2HorizontalPodAutoscaler instance) { + instance = (instance != null ? instance : new V2HorizontalPodAutoscaler()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + this.withSpec(instance.getSpec()); + this.withStatus(instance.getStatus()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public String getKind() { + return this.kind; + } + + public A withKind(String kind) { + this.kind = kind; + return (A) this; + } + + public boolean hasKind() { + return this.kind != null; + } + + public V1ObjectMeta buildMetadata() { + return this.metadata != null ? this.metadata.build() : null; + } + + public A withMetadata(V1ObjectMeta metadata) { + this._visitables.remove("metadata"); + if (metadata != null) { + this.metadata = new V1ObjectMetaBuilder(metadata); + this._visitables.get("metadata").add(this.metadata); + } else { + this.metadata = null; + this._visitables.get("metadata").remove(this.metadata); + } + return (A) this; + } + + public boolean hasMetadata() { + return this.metadata != null; + } + + public MetadataNested withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ObjectMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ObjectMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public V2HorizontalPodAutoscalerSpec buildSpec() { + return this.spec != null ? this.spec.build() : null; + } + + public A withSpec(V2HorizontalPodAutoscalerSpec spec) { + this._visitables.remove("spec"); + if (spec != null) { + this.spec = new V2HorizontalPodAutoscalerSpecBuilder(spec); + this._visitables.get("spec").add(this.spec); + } else { + this.spec = null; + this._visitables.get("spec").remove(this.spec); + } + return (A) this; + } + + public boolean hasSpec() { + return this.spec != null; + } + + public SpecNested withNewSpec() { + return new SpecNested(null); } - public interface SpecNested extends Nested,V2HorizontalPodAutoscalerSpecFluent>{ - public N and(); - public N endSpec(); + + public SpecNested withNewSpecLike(V2HorizontalPodAutoscalerSpec item) { + return new SpecNested(item); + } + + public SpecNested editSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(null)); + } + + public SpecNested editOrNewSpec() { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(new V2HorizontalPodAutoscalerSpecBuilder().build())); + } + + public SpecNested editOrNewSpecLike(V2HorizontalPodAutoscalerSpec item) { + return withNewSpecLike(java.util.Optional.ofNullable(buildSpec()).orElse(item)); + } + + public V2HorizontalPodAutoscalerStatus buildStatus() { + return this.status != null ? this.status.build() : null; + } + + public A withStatus(V2HorizontalPodAutoscalerStatus status) { + this._visitables.remove("status"); + if (status != null) { + this.status = new V2HorizontalPodAutoscalerStatusBuilder(status); + this._visitables.get("status").add(this.status); + } else { + this.status = null; + this._visitables.get("status").remove(this.status); + } + return (A) this; + } + + public boolean hasStatus() { + return this.status != null; + } + + public StatusNested withNewStatus() { + return new StatusNested(null); + } + + public StatusNested withNewStatusLike(V2HorizontalPodAutoscalerStatus item) { + return new StatusNested(item); + } + + public StatusNested editStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(null)); + } + + public StatusNested editOrNewStatus() { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(new V2HorizontalPodAutoscalerStatusBuilder().build())); + } + + public StatusNested editOrNewStatusLike(V2HorizontalPodAutoscalerStatus item) { + return withNewStatusLike(java.util.Optional.ofNullable(buildStatus()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2HorizontalPodAutoscalerFluent that = (V2HorizontalPodAutoscalerFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + if (!java.util.Objects.equals(spec, that.spec)) return false; + if (!java.util.Objects.equals(status, that.status)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } + if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } + if (status != null) { sb.append("status:"); sb.append(status); } + sb.append("}"); + return sb.toString(); + } + public class MetadataNested extends V1ObjectMetaFluent> implements Nested{ + MetadataNested(V1ObjectMeta item) { + this.builder = new V1ObjectMetaBuilder(this, item); + } + V1ObjectMetaBuilder builder; + + public N and() { + return (N) V2HorizontalPodAutoscalerFluent.this.withMetadata(builder.build()); + } + public N endMetadata() { + return and(); + } + + } - public interface StatusNested extends Nested,V2HorizontalPodAutoscalerStatusFluent>{ - public N and(); - public N endStatus(); + public class SpecNested extends V2HorizontalPodAutoscalerSpecFluent> implements Nested{ + SpecNested(V2HorizontalPodAutoscalerSpec item) { + this.builder = new V2HorizontalPodAutoscalerSpecBuilder(this, item); + } + V2HorizontalPodAutoscalerSpecBuilder builder; + + public N and() { + return (N) V2HorizontalPodAutoscalerFluent.this.withSpec(builder.build()); + } + public N endSpec() { + return and(); + } + + } + public class StatusNested extends V2HorizontalPodAutoscalerStatusFluent> implements Nested{ + StatusNested(V2HorizontalPodAutoscalerStatus item) { + this.builder = new V2HorizontalPodAutoscalerStatusBuilder(this, item); + } + V2HorizontalPodAutoscalerStatusBuilder builder; + + public N and() { + return (N) V2HorizontalPodAutoscalerFluent.this.withStatus(builder.build()); + } + + public N endStatus() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerFluentImpl.java deleted file mode 100644 index 3666402bc8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerFluentImpl.java +++ /dev/null @@ -1,232 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2HorizontalPodAutoscalerFluentImpl> extends BaseFluent implements V2HorizontalPodAutoscalerFluent{ - public V2HorizontalPodAutoscalerFluentImpl() { - } - public V2HorizontalPodAutoscalerFluentImpl(V2HorizontalPodAutoscaler instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - this.withSpec(instance.getSpec()); - this.withStatus(instance.getStatus()); - } - } - private String apiVersion; - private String kind; - private V1ObjectMetaBuilder metadata; - private V2HorizontalPodAutoscalerSpecBuilder spec; - private V2HorizontalPodAutoscalerStatusBuilder status; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public String getKind() { - return this.kind; - } - public A withKind(String kind) { - this.kind=kind; return (A) this; - } - public Boolean hasKind() { - return this.kind != null; - } - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ObjectMeta getMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public V1ObjectMeta buildMetadata() { - return this.metadata!=null ?this.metadata.build():null; - } - public A withMetadata(V1ObjectMeta metadata) { - _visitables.get("metadata").remove(this.metadata); - if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this; - } - public Boolean hasMetadata() { - return this.metadata != null; - } - public V2HorizontalPodAutoscalerFluentImpl.MetadataNested withNewMetadata() { - return new V2HorizontalPodAutoscalerFluentImpl.MetadataNestedImpl(); - } - public V2HorizontalPodAutoscalerFluentImpl.MetadataNested withNewMetadataLike(V1ObjectMeta item) { - return new V2HorizontalPodAutoscalerFluentImpl.MetadataNestedImpl(item); - } - public V2HorizontalPodAutoscalerFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V2HorizontalPodAutoscalerFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build()); - } - public V2HorizontalPodAutoscalerFluentImpl.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - - /** - * This method has been deprecated, please use method buildSpec instead. - * @return The buildable object. - */ - @Deprecated - public V2HorizontalPodAutoscalerSpec getSpec() { - return this.spec!=null ?this.spec.build():null; - } - public V2HorizontalPodAutoscalerSpec buildSpec() { - return this.spec!=null ?this.spec.build():null; - } - public A withSpec(V2HorizontalPodAutoscalerSpec spec) { - _visitables.get("spec").remove(this.spec); - if (spec!=null){ this.spec= new V2HorizontalPodAutoscalerSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this; - } - public Boolean hasSpec() { - return this.spec != null; - } - public V2HorizontalPodAutoscalerFluentImpl.SpecNested withNewSpec() { - return new V2HorizontalPodAutoscalerFluentImpl.SpecNestedImpl(); - } - public V2HorizontalPodAutoscalerFluentImpl.SpecNested withNewSpecLike(V2HorizontalPodAutoscalerSpec item) { - return new V2HorizontalPodAutoscalerFluentImpl.SpecNestedImpl(item); - } - public V2HorizontalPodAutoscalerFluentImpl.SpecNested editSpec() { - return withNewSpecLike(getSpec()); - } - public V2HorizontalPodAutoscalerFluentImpl.SpecNested editOrNewSpec() { - return withNewSpecLike(getSpec() != null ? getSpec(): new V2HorizontalPodAutoscalerSpecBuilder().build()); - } - public V2HorizontalPodAutoscalerFluentImpl.SpecNested editOrNewSpecLike(V2HorizontalPodAutoscalerSpec item) { - return withNewSpecLike(getSpec() != null ? getSpec(): item); - } - - /** - * This method has been deprecated, please use method buildStatus instead. - * @return The buildable object. - */ - @Deprecated - public V2HorizontalPodAutoscalerStatus getStatus() { - return this.status!=null ?this.status.build():null; - } - public V2HorizontalPodAutoscalerStatus buildStatus() { - return this.status!=null ?this.status.build():null; - } - public A withStatus(V2HorizontalPodAutoscalerStatus status) { - _visitables.get("status").remove(this.status); - if (status!=null){ this.status= new V2HorizontalPodAutoscalerStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this; - } - public Boolean hasStatus() { - return this.status != null; - } - public V2HorizontalPodAutoscalerFluentImpl.StatusNested withNewStatus() { - return new V2HorizontalPodAutoscalerFluentImpl.StatusNestedImpl(); - } - public V2HorizontalPodAutoscalerFluentImpl.StatusNested withNewStatusLike(V2HorizontalPodAutoscalerStatus item) { - return new V2HorizontalPodAutoscalerFluentImpl.StatusNestedImpl(item); - } - public V2HorizontalPodAutoscalerFluentImpl.StatusNested editStatus() { - return withNewStatusLike(getStatus()); - } - public V2HorizontalPodAutoscalerFluentImpl.StatusNested editOrNewStatus() { - return withNewStatusLike(getStatus() != null ? getStatus(): new V2HorizontalPodAutoscalerStatusBuilder().build()); - } - public V2HorizontalPodAutoscalerFluentImpl.StatusNested editOrNewStatusLike(V2HorizontalPodAutoscalerStatus item) { - return withNewStatusLike(getStatus() != null ? getStatus(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2HorizontalPodAutoscalerFluentImpl that = (V2HorizontalPodAutoscalerFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - if (!java.util.Objects.equals(spec, that.spec)) return false; - - if (!java.util.Objects.equals(status, that.status)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, kind, metadata, spec, status, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); } - if (spec != null) { sb.append("spec:"); sb.append(spec + ","); } - if (status != null) { sb.append("status:"); sb.append(status); } - sb.append("}"); - return sb.toString(); - } - class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V2HorizontalPodAutoscalerFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ObjectMeta item) { - this.builder = new V1ObjectMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ObjectMetaBuilder(this); - } - V1ObjectMetaBuilder builder; - public N and() { - return (N) V2HorizontalPodAutoscalerFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - class SpecNestedImpl extends V2HorizontalPodAutoscalerSpecFluentImpl> implements V2HorizontalPodAutoscalerFluentImpl.SpecNested,Nested{ - SpecNestedImpl(V2HorizontalPodAutoscalerSpec item) { - this.builder = new V2HorizontalPodAutoscalerSpecBuilder(this, item); - } - SpecNestedImpl() { - this.builder = new V2HorizontalPodAutoscalerSpecBuilder(this); - } - V2HorizontalPodAutoscalerSpecBuilder builder; - public N and() { - return (N) V2HorizontalPodAutoscalerFluentImpl.this.withSpec(builder.build()); - } - public N endSpec() { - return and(); - } - - } - class StatusNestedImpl extends V2HorizontalPodAutoscalerStatusFluentImpl> implements V2HorizontalPodAutoscalerFluentImpl.StatusNested,Nested{ - StatusNestedImpl(V2HorizontalPodAutoscalerStatus item) { - this.builder = new V2HorizontalPodAutoscalerStatusBuilder(this, item); - } - StatusNestedImpl() { - this.builder = new V2HorizontalPodAutoscalerStatusBuilder(this); - } - V2HorizontalPodAutoscalerStatusBuilder builder; - public N and() { - return (N) V2HorizontalPodAutoscalerFluentImpl.this.withStatus(builder.build()); - } - public N endStatus() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListBuilder.java index 9710dfbed6..27b3eb929e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListBuilder.java @@ -1,55 +1,34 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2HorizontalPodAutoscalerListBuilder extends V2HorizontalPodAutoscalerListFluentImpl implements VisitableBuilder{ +public class V2HorizontalPodAutoscalerListBuilder extends V2HorizontalPodAutoscalerListFluent implements VisitableBuilder{ public V2HorizontalPodAutoscalerListBuilder() { - this(false); - } - public V2HorizontalPodAutoscalerListBuilder(Boolean validationEnabled) { - this(new V2HorizontalPodAutoscalerList(), validationEnabled); + this(new V2HorizontalPodAutoscalerList()); } + public V2HorizontalPodAutoscalerListBuilder(V2HorizontalPodAutoscalerListFluent fluent) { - this(fluent, false); - } - public V2HorizontalPodAutoscalerListBuilder(V2HorizontalPodAutoscalerListFluent fluent,Boolean validationEnabled) { - this(fluent, new V2HorizontalPodAutoscalerList(), validationEnabled); + this(fluent, new V2HorizontalPodAutoscalerList()); } + public V2HorizontalPodAutoscalerListBuilder(V2HorizontalPodAutoscalerListFluent fluent,V2HorizontalPodAutoscalerList instance) { - this(fluent, instance, false); - } - public V2HorizontalPodAutoscalerListBuilder(V2HorizontalPodAutoscalerListFluent fluent,V2HorizontalPodAutoscalerList instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withApiVersion(instance.getApiVersion()); - fluent.withItems(instance.getItems()); - fluent.withKind(instance.getKind()); - fluent.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2HorizontalPodAutoscalerListBuilder(V2HorizontalPodAutoscalerList instance) { - this(instance,false); - } - public V2HorizontalPodAutoscalerListBuilder(V2HorizontalPodAutoscalerList instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2HorizontalPodAutoscalerListFluent fluent; - Boolean validationEnabled; + public V2HorizontalPodAutoscalerList build() { V2HorizontalPodAutoscalerList buildable = new V2HorizontalPodAutoscalerList(); buildable.setApiVersion(fluent.getApiVersion()); - buildable.setItems(fluent.getItems()); + buildable.setItems(fluent.buildItems()); buildable.setKind(fluent.getKind()); - buildable.setMetadata(fluent.getMetadata()); + buildable.setMetadata(fluent.buildMetadata()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListFluent.java index fe4e470637..d3ab7660b5 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListFluent.java @@ -1,82 +1,319 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; import java.lang.String; import java.util.function.Predicate; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; import java.util.Collection; +import java.lang.Object; import java.util.List; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2HorizontalPodAutoscalerListFluent> extends Fluent{ - public String getApiVersion(); - public A withApiVersion(String apiVersion); - public Boolean hasApiVersion(); - public A addToItems(int index,V2HorizontalPodAutoscaler item); - public A setToItems(int index,V2HorizontalPodAutoscaler item); - public A addToItems(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler... items); - public A addAllToItems(Collection items); - public A removeFromItems(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler... items); - public A removeAllFromItems(Collection items); - public A removeMatchingFromItems(Predicate predicate); - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems(); - public List buildItems(); - public V2HorizontalPodAutoscaler buildItem(int index); - public V2HorizontalPodAutoscaler buildFirstItem(); - public V2HorizontalPodAutoscaler buildLastItem(); - public V2HorizontalPodAutoscaler buildMatchingItem(Predicate predicate); - public Boolean hasMatchingItem(Predicate predicate); - public A withItems(List items); - public A withItems(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler... items); - public Boolean hasItems(); - public V2HorizontalPodAutoscalerListFluent.ItemsNested addNewItem(); - public V2HorizontalPodAutoscalerListFluent.ItemsNested addNewItemLike(V2HorizontalPodAutoscaler item); - public V2HorizontalPodAutoscalerListFluent.ItemsNested setNewItemLike(int index,V2HorizontalPodAutoscaler item); - public V2HorizontalPodAutoscalerListFluent.ItemsNested editItem(int index); - public V2HorizontalPodAutoscalerListFluent.ItemsNested editFirstItem(); - public V2HorizontalPodAutoscalerListFluent.ItemsNested editLastItem(); - public V2HorizontalPodAutoscalerListFluent.ItemsNested editMatchingItem(Predicate predicate); - public String getKind(); - public A withKind(String kind); - public Boolean hasKind(); - - /** - * This method has been deprecated, please use method buildMetadata instead. - * @return The buildable object. - */ - @Deprecated - public V1ListMeta getMetadata(); - public V1ListMeta buildMetadata(); - public A withMetadata(V1ListMeta metadata); - public Boolean hasMetadata(); - public V2HorizontalPodAutoscalerListFluent.MetadataNested withNewMetadata(); - public V2HorizontalPodAutoscalerListFluent.MetadataNested withNewMetadataLike(V1ListMeta item); - public V2HorizontalPodAutoscalerListFluent.MetadataNested editMetadata(); - public V2HorizontalPodAutoscalerListFluent.MetadataNested editOrNewMetadata(); - public V2HorizontalPodAutoscalerListFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item); - public interface ItemsNested extends Nested,V2HorizontalPodAutoscalerFluent>{ - public N and(); - public N endItem(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2HorizontalPodAutoscalerListFluent> extends BaseFluent{ + public V2HorizontalPodAutoscalerListFluent() { + } + + public V2HorizontalPodAutoscalerListFluent(V2HorizontalPodAutoscalerList instance) { + this.copyInstance(instance); + } + private String apiVersion; + private ArrayList items; + private String kind; + private V1ListMetaBuilder metadata; + + protected void copyInstance(V2HorizontalPodAutoscalerList instance) { + instance = (instance != null ? instance : new V2HorizontalPodAutoscalerList()); + if (instance != null) { + this.withApiVersion(instance.getApiVersion()); + this.withItems(instance.getItems()); + this.withKind(instance.getKind()); + this.withMetadata(instance.getMetadata()); + } + } + + public String getApiVersion() { + return this.apiVersion; + } + + public A withApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return (A) this; + } + + public boolean hasApiVersion() { + return this.apiVersion != null; + } + + public A addToItems(int index,V2HorizontalPodAutoscaler item) { + if (this.items == null) {this.items = new ArrayList();} + V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} + return (A)this; + } + + public A setToItems(int index,V2HorizontalPodAutoscaler item) { + if (this.items == null) {this.items = new ArrayList();} + V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item); + if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} + return (A)this; + } + + public A addToItems(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler... items) { + if (this.items == null) {this.items = new ArrayList();} + for (V2HorizontalPodAutoscaler item : items) {V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A addAllToItems(Collection items) { + if (this.items == null) {this.items = new ArrayList();} + for (V2HorizontalPodAutoscaler item : items) {V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; + } + + public A removeFromItems(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler... items) { + if (this.items == null) return (A)this; + for (V2HorizontalPodAutoscaler item : items) {V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeAllFromItems(Collection items) { + if (this.items == null) return (A)this; + for (V2HorizontalPodAutoscaler item : items) {V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item);_visitables.get("items").remove(builder); this.items.remove(builder);} return (A)this; + } + + public A removeMatchingFromItems(Predicate predicate) { + if (items == null) return (A) this; + final Iterator each = items.iterator(); + final List visitables = _visitables.get("items"); + while (each.hasNext()) { + V2HorizontalPodAutoscalerBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildItems() { + return this.items != null ? build(items) : null; + } + + public V2HorizontalPodAutoscaler buildItem(int index) { + return this.items.get(index).build(); + } + + public V2HorizontalPodAutoscaler buildFirstItem() { + return this.items.get(0).build(); + } + + public V2HorizontalPodAutoscaler buildLastItem() { + return this.items.get(items.size() - 1).build(); + } + + public V2HorizontalPodAutoscaler buildMatchingItem(Predicate predicate) { + for (V2HorizontalPodAutoscalerBuilder item : items) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingItem(Predicate predicate) { + for (V2HorizontalPodAutoscalerBuilder item : items) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withItems(List items) { + if (this.items != null) { + this._visitables.get("items").clear(); + } + if (items != null) { + this.items = new ArrayList(); + for (V2HorizontalPodAutoscaler item : items) { + this.addToItems(item); + } + } else { + this.items = null; + } + return (A) this; + } + + public A withItems(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler... items) { + if (this.items != null) { + this.items.clear(); + _visitables.remove("items"); + } + if (items != null) { + for (V2HorizontalPodAutoscaler item : items) { + this.addToItems(item); + } + } + return (A) this; + } + + public boolean hasItems() { + return this.items != null && !this.items.isEmpty(); + } + + public ItemsNested addNewItem() { + return new ItemsNested(-1, null); + } + + public ItemsNested addNewItemLike(V2HorizontalPodAutoscaler item) { + return new ItemsNested(-1, item); } - public interface MetadataNested extends Nested,V1ListMetaFluent>{ - public N and(); - public N endMetadata(); + + public ItemsNested setNewItemLike(int index,V2HorizontalPodAutoscaler item) { + return new ItemsNested(index, item); + } + + public ItemsNested editItem(int index) { + if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editFirstItem() { + if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); + return setNewItemLike(0, buildItem(0)); + } + + public ItemsNested editLastItem() { + int index = items.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); + return setNewItemLike(index, buildItem(index)); + } + + public ItemsNested editMatchingItem(Predicate predicate) { + int index = -1; + for (int i=0;i withNewMetadata() { + return new MetadataNested(null); + } + + public MetadataNested withNewMetadataLike(V1ListMeta item) { + return new MetadataNested(item); + } + + public MetadataNested editMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(null)); + } + + public MetadataNested editOrNewMetadata() { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(new V1ListMetaBuilder().build())); + } + + public MetadataNested editOrNewMetadataLike(V1ListMeta item) { + return withNewMetadataLike(java.util.Optional.ofNullable(buildMetadata()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2HorizontalPodAutoscalerListFluent that = (V2HorizontalPodAutoscalerListFluent) o; + if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; + if (!java.util.Objects.equals(items, that.items)) return false; + if (!java.util.Objects.equals(kind, that.kind)) return false; + if (!java.util.Objects.equals(metadata, that.metadata)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } + if (items != null && !items.isEmpty()) { sb.append("items:"); sb.append(items + ","); } + if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } + if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } + sb.append("}"); + return sb.toString(); + } + public class ItemsNested extends V2HorizontalPodAutoscalerFluent> implements Nested{ + ItemsNested(int index,V2HorizontalPodAutoscaler item) { + this.index = index; + this.builder = new V2HorizontalPodAutoscalerBuilder(this, item); + } + V2HorizontalPodAutoscalerBuilder builder; + int index; + public N and() { + return (N) V2HorizontalPodAutoscalerListFluent.this.setToItems(index,builder.build()); + } + + public N endItem() { + return and(); + } + + } + public class MetadataNested extends V1ListMetaFluent> implements Nested{ + MetadataNested(V1ListMeta item) { + this.builder = new V1ListMetaBuilder(this, item); + } + V1ListMetaBuilder builder; + + public N and() { + return (N) V2HorizontalPodAutoscalerListFluent.this.withMetadata(builder.build()); + } + + public N endMetadata() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListFluentImpl.java deleted file mode 100644 index 04d5263170..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerListFluentImpl.java +++ /dev/null @@ -1,259 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2HorizontalPodAutoscalerListFluentImpl> extends BaseFluent implements V2HorizontalPodAutoscalerListFluent{ - public V2HorizontalPodAutoscalerListFluentImpl() { - } - public V2HorizontalPodAutoscalerListFluentImpl(V2HorizontalPodAutoscalerList instance) { - if (instance != null) { - this.withApiVersion(instance.getApiVersion()); - this.withItems(instance.getItems()); - this.withKind(instance.getKind()); - this.withMetadata(instance.getMetadata()); - } - } - private String apiVersion; - private ArrayList items; - private String kind; - private V1ListMetaBuilder metadata; - public String getApiVersion() { - return this.apiVersion; - } - public A withApiVersion(String apiVersion) { - this.apiVersion=apiVersion; return (A) this; - } - public Boolean hasApiVersion() { - return this.apiVersion != null; - } - public A addToItems(int index,V2HorizontalPodAutoscaler item) { - if (this.items == null) {this.items = new ArrayList();} - V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").add(index, builder); items.add(index, builder);} - return (A)this; - } - public A setToItems(int index,V2HorizontalPodAutoscaler item) { - if (this.items == null) {this.items = new ArrayList();} - V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item); - if (index < 0 || index >= items.size()) { _visitables.get("items").add(builder); items.add(builder); } else { _visitables.get("items").set(index, builder); items.set(index, builder);} - return (A)this; - } - public A addToItems(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler... items) { - if (this.items == null) {this.items = new ArrayList();} - for (V2HorizontalPodAutoscaler item : items) {V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A addAllToItems(Collection items) { - if (this.items == null) {this.items = new ArrayList();} - for (V2HorizontalPodAutoscaler item : items) {V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item);_visitables.get("items").add(builder);this.items.add(builder);} return (A)this; - } - public A removeFromItems(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler... items) { - for (V2HorizontalPodAutoscaler item : items) {V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeAllFromItems(Collection items) { - for (V2HorizontalPodAutoscaler item : items) {V2HorizontalPodAutoscalerBuilder builder = new V2HorizontalPodAutoscalerBuilder(item);_visitables.get("items").remove(builder);if (this.items != null) {this.items.remove(builder);}} return (A)this; - } - public A removeMatchingFromItems(Predicate predicate) { - if (items == null) return (A) this; - final Iterator each = items.iterator(); - final List visitables = _visitables.get("items"); - while (each.hasNext()) { - V2HorizontalPodAutoscalerBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildItems instead. - * @return The buildable object. - */ - @Deprecated - public List getItems() { - return items != null ? build(items) : null; - } - public List buildItems() { - return items != null ? build(items) : null; - } - public V2HorizontalPodAutoscaler buildItem(int index) { - return this.items.get(index).build(); - } - public V2HorizontalPodAutoscaler buildFirstItem() { - return this.items.get(0).build(); - } - public V2HorizontalPodAutoscaler buildLastItem() { - return this.items.get(items.size() - 1).build(); - } - public V2HorizontalPodAutoscaler buildMatchingItem(Predicate predicate) { - for (V2HorizontalPodAutoscalerBuilder item: items) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingItem(Predicate predicate) { - for (V2HorizontalPodAutoscalerBuilder item: items) { if(predicate.test(item)){ return true;} } return false; - } - public A withItems(List items) { - if (this.items != null) { _visitables.get("items").clear();} - if (items != null) {this.items = new ArrayList(); for (V2HorizontalPodAutoscaler item : items){this.addToItems(item);}} else { this.items = null;} return (A) this; - } - public A withItems(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscaler... items) { - if (this.items != null) {this.items.clear(); _visitables.remove("items"); } - if (items != null) {for (V2HorizontalPodAutoscaler item :items){ this.addToItems(item);}} return (A) this; - } - public Boolean hasItems() { - return items != null && !items.isEmpty(); - } - public V2HorizontalPodAutoscalerListFluentImpl.ItemsNested addNewItem() { - return new V2HorizontalPodAutoscalerListFluentImpl.ItemsNestedImpl(); - } - public V2HorizontalPodAutoscalerListFluentImpl.ItemsNested addNewItemLike(V2HorizontalPodAutoscaler item) { - return new V2HorizontalPodAutoscalerListFluentImpl.ItemsNestedImpl(-1, item); - } - public V2HorizontalPodAutoscalerListFluentImpl.ItemsNested setNewItemLike(int index,V2HorizontalPodAutoscaler item) { - return new V2HorizontalPodAutoscalerListFluentImpl.ItemsNestedImpl(index, item); - } - public V2HorizontalPodAutoscalerListFluentImpl.ItemsNested editItem(int index) { - if (items.size() <= index) throw new RuntimeException("Can't edit items. Index exceeds size."); - return setNewItemLike(index, buildItem(index)); - } - public V2HorizontalPodAutoscalerListFluentImpl.ItemsNested editFirstItem() { - if (items.size() == 0) throw new RuntimeException("Can't edit first items. The list is empty."); - return setNewItemLike(0, buildItem(0)); - } - public V2HorizontalPodAutoscalerListFluentImpl.ItemsNested editLastItem() { - int index = items.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last items. The list is empty."); - return setNewItemLike(index, buildItem(index)); - } - public V2HorizontalPodAutoscalerListFluentImpl.ItemsNested editMatchingItem(Predicate predicate) { - int index = -1; - for (int i=0;i withNewMetadata() { - return new V2HorizontalPodAutoscalerListFluentImpl.MetadataNestedImpl(); - } - public V2HorizontalPodAutoscalerListFluentImpl.MetadataNested withNewMetadataLike(V1ListMeta item) { - return new V2HorizontalPodAutoscalerListFluentImpl.MetadataNestedImpl(item); - } - public V2HorizontalPodAutoscalerListFluentImpl.MetadataNested editMetadata() { - return withNewMetadataLike(getMetadata()); - } - public V2HorizontalPodAutoscalerListFluentImpl.MetadataNested editOrNewMetadata() { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build()); - } - public V2HorizontalPodAutoscalerListFluentImpl.MetadataNested editOrNewMetadataLike(V1ListMeta item) { - return withNewMetadataLike(getMetadata() != null ? getMetadata(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2HorizontalPodAutoscalerListFluentImpl that = (V2HorizontalPodAutoscalerListFluentImpl) o; - if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false; - - if (!java.util.Objects.equals(items, that.items)) return false; - - if (!java.util.Objects.equals(kind, that.kind)) return false; - - if (!java.util.Objects.equals(metadata, that.metadata)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(apiVersion, items, kind, metadata, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); } - if (items != null) { sb.append("items:"); sb.append(items + ","); } - if (kind != null) { sb.append("kind:"); sb.append(kind + ","); } - if (metadata != null) { sb.append("metadata:"); sb.append(metadata); } - sb.append("}"); - return sb.toString(); - } - class ItemsNestedImpl extends V2HorizontalPodAutoscalerFluentImpl> implements V2HorizontalPodAutoscalerListFluentImpl.ItemsNested,Nested{ - ItemsNestedImpl(int index,V2HorizontalPodAutoscaler item) { - this.index = index; - this.builder = new V2HorizontalPodAutoscalerBuilder(this, item); - } - ItemsNestedImpl() { - this.index = -1; - this.builder = new V2HorizontalPodAutoscalerBuilder(this); - } - V2HorizontalPodAutoscalerBuilder builder; - int index; - public N and() { - return (N) V2HorizontalPodAutoscalerListFluentImpl.this.setToItems(index,builder.build()); - } - public N endItem() { - return and(); - } - - } - class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V2HorizontalPodAutoscalerListFluentImpl.MetadataNested,Nested{ - MetadataNestedImpl(V1ListMeta item) { - this.builder = new V1ListMetaBuilder(this, item); - } - MetadataNestedImpl() { - this.builder = new V1ListMetaBuilder(this); - } - V1ListMetaBuilder builder; - public N and() { - return (N) V2HorizontalPodAutoscalerListFluentImpl.this.withMetadata(builder.build()); - } - public N endMetadata() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecBuilder.java index e10408ddc8..00de8c8f39 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecBuilder.java @@ -1,58 +1,35 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2HorizontalPodAutoscalerSpecBuilder extends V2HorizontalPodAutoscalerSpecFluentImpl implements VisitableBuilder{ +public class V2HorizontalPodAutoscalerSpecBuilder extends V2HorizontalPodAutoscalerSpecFluent implements VisitableBuilder{ public V2HorizontalPodAutoscalerSpecBuilder() { - this(false); - } - public V2HorizontalPodAutoscalerSpecBuilder(Boolean validationEnabled) { - this(new V2HorizontalPodAutoscalerSpec(), validationEnabled); + this(new V2HorizontalPodAutoscalerSpec()); } + public V2HorizontalPodAutoscalerSpecBuilder(V2HorizontalPodAutoscalerSpecFluent fluent) { - this(fluent, false); - } - public V2HorizontalPodAutoscalerSpecBuilder(V2HorizontalPodAutoscalerSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V2HorizontalPodAutoscalerSpec(), validationEnabled); + this(fluent, new V2HorizontalPodAutoscalerSpec()); } + public V2HorizontalPodAutoscalerSpecBuilder(V2HorizontalPodAutoscalerSpecFluent fluent,V2HorizontalPodAutoscalerSpec instance) { - this(fluent, instance, false); - } - public V2HorizontalPodAutoscalerSpecBuilder(V2HorizontalPodAutoscalerSpecFluent fluent,V2HorizontalPodAutoscalerSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withBehavior(instance.getBehavior()); - fluent.withMaxReplicas(instance.getMaxReplicas()); - fluent.withMetrics(instance.getMetrics()); - fluent.withMinReplicas(instance.getMinReplicas()); - fluent.withScaleTargetRef(instance.getScaleTargetRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2HorizontalPodAutoscalerSpecBuilder(V2HorizontalPodAutoscalerSpec instance) { - this(instance,false); - } - public V2HorizontalPodAutoscalerSpecBuilder(V2HorizontalPodAutoscalerSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withBehavior(instance.getBehavior()); - this.withMaxReplicas(instance.getMaxReplicas()); - this.withMetrics(instance.getMetrics()); - this.withMinReplicas(instance.getMinReplicas()); - this.withScaleTargetRef(instance.getScaleTargetRef()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2HorizontalPodAutoscalerSpecFluent fluent; - Boolean validationEnabled; + public V2HorizontalPodAutoscalerSpec build() { V2HorizontalPodAutoscalerSpec buildable = new V2HorizontalPodAutoscalerSpec(); - buildable.setBehavior(fluent.getBehavior()); + buildable.setBehavior(fluent.buildBehavior()); buildable.setMaxReplicas(fluent.getMaxReplicas()); - buildable.setMetrics(fluent.getMetrics()); + buildable.setMetrics(fluent.buildMetrics()); buildable.setMinReplicas(fluent.getMinReplicas()); - buildable.setScaleTargetRef(fluent.getScaleTargetRef()); + buildable.setScaleTargetRef(fluent.buildScaleTargetRef()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecFluent.java index 9d11ee38b4..d77d2095fc 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecFluent.java @@ -1,102 +1,380 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; -import java.lang.Integer; -import java.lang.Deprecated; +import io.kubernetes.client.fluent.BaseFluent; import java.util.Iterator; -import java.util.Collection; import java.util.List; -import java.lang.Boolean; +import java.lang.Integer; +import java.util.Collection; +import java.lang.Object; - /** - * Generated - */ -public interface V2HorizontalPodAutoscalerSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildBehavior instead. - * @return The buildable object. - */ - @Deprecated - public V2HorizontalPodAutoscalerBehavior getBehavior(); - public V2HorizontalPodAutoscalerBehavior buildBehavior(); - public A withBehavior(V2HorizontalPodAutoscalerBehavior behavior); - public Boolean hasBehavior(); - public V2HorizontalPodAutoscalerSpecFluent.BehaviorNested withNewBehavior(); - public V2HorizontalPodAutoscalerSpecFluent.BehaviorNested withNewBehaviorLike(V2HorizontalPodAutoscalerBehavior item); - public V2HorizontalPodAutoscalerSpecFluent.BehaviorNested editBehavior(); - public V2HorizontalPodAutoscalerSpecFluent.BehaviorNested editOrNewBehavior(); - public V2HorizontalPodAutoscalerSpecFluent.BehaviorNested editOrNewBehaviorLike(V2HorizontalPodAutoscalerBehavior item); - public Integer getMaxReplicas(); - public A withMaxReplicas(Integer maxReplicas); - public Boolean hasMaxReplicas(); - public A addToMetrics(int index,V2MetricSpec item); - public A setToMetrics(int index,V2MetricSpec item); - public A addToMetrics(io.kubernetes.client.openapi.models.V2MetricSpec... items); - public A addAllToMetrics(Collection items); - public A removeFromMetrics(io.kubernetes.client.openapi.models.V2MetricSpec... items); - public A removeAllFromMetrics(Collection items); - public A removeMatchingFromMetrics(Predicate predicate); - - /** - * This method has been deprecated, please use method buildMetrics instead. - * @return The buildable object. - */ - @Deprecated - public List getMetrics(); - public List buildMetrics(); - public V2MetricSpec buildMetric(int index); - public V2MetricSpec buildFirstMetric(); - public V2MetricSpec buildLastMetric(); - public V2MetricSpec buildMatchingMetric(Predicate predicate); - public Boolean hasMatchingMetric(Predicate predicate); - public A withMetrics(List metrics); - public A withMetrics(io.kubernetes.client.openapi.models.V2MetricSpec... metrics); - public Boolean hasMetrics(); - public V2HorizontalPodAutoscalerSpecFluent.MetricsNested addNewMetric(); - public V2HorizontalPodAutoscalerSpecFluent.MetricsNested addNewMetricLike(V2MetricSpec item); - public V2HorizontalPodAutoscalerSpecFluent.MetricsNested setNewMetricLike(int index,V2MetricSpec item); - public V2HorizontalPodAutoscalerSpecFluent.MetricsNested editMetric(int index); - public V2HorizontalPodAutoscalerSpecFluent.MetricsNested editFirstMetric(); - public V2HorizontalPodAutoscalerSpecFluent.MetricsNested editLastMetric(); - public V2HorizontalPodAutoscalerSpecFluent.MetricsNested editMatchingMetric(Predicate predicate); - public Integer getMinReplicas(); - public A withMinReplicas(Integer minReplicas); - public Boolean hasMinReplicas(); - - /** - * This method has been deprecated, please use method buildScaleTargetRef instead. - * @return The buildable object. - */ - @Deprecated - public V2CrossVersionObjectReference getScaleTargetRef(); - public V2CrossVersionObjectReference buildScaleTargetRef(); - public A withScaleTargetRef(V2CrossVersionObjectReference scaleTargetRef); - public Boolean hasScaleTargetRef(); - public V2HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested withNewScaleTargetRef(); - public V2HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested withNewScaleTargetRefLike(V2CrossVersionObjectReference item); - public V2HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested editScaleTargetRef(); - public V2HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested editOrNewScaleTargetRef(); - public V2HorizontalPodAutoscalerSpecFluent.ScaleTargetRefNested editOrNewScaleTargetRefLike(V2CrossVersionObjectReference item); - public interface BehaviorNested extends Nested,V2HorizontalPodAutoscalerBehaviorFluent>{ - public N and(); - public N endBehavior(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2HorizontalPodAutoscalerSpecFluent> extends BaseFluent{ + public V2HorizontalPodAutoscalerSpecFluent() { + } + + public V2HorizontalPodAutoscalerSpecFluent(V2HorizontalPodAutoscalerSpec instance) { + this.copyInstance(instance); + } + private V2HorizontalPodAutoscalerBehaviorBuilder behavior; + private Integer maxReplicas; + private ArrayList metrics; + private Integer minReplicas; + private V2CrossVersionObjectReferenceBuilder scaleTargetRef; + + protected void copyInstance(V2HorizontalPodAutoscalerSpec instance) { + instance = (instance != null ? instance : new V2HorizontalPodAutoscalerSpec()); + if (instance != null) { + this.withBehavior(instance.getBehavior()); + this.withMaxReplicas(instance.getMaxReplicas()); + this.withMetrics(instance.getMetrics()); + this.withMinReplicas(instance.getMinReplicas()); + this.withScaleTargetRef(instance.getScaleTargetRef()); + } + } + + public V2HorizontalPodAutoscalerBehavior buildBehavior() { + return this.behavior != null ? this.behavior.build() : null; + } + + public A withBehavior(V2HorizontalPodAutoscalerBehavior behavior) { + this._visitables.remove("behavior"); + if (behavior != null) { + this.behavior = new V2HorizontalPodAutoscalerBehaviorBuilder(behavior); + this._visitables.get("behavior").add(this.behavior); + } else { + this.behavior = null; + this._visitables.get("behavior").remove(this.behavior); + } + return (A) this; + } + + public boolean hasBehavior() { + return this.behavior != null; + } + + public BehaviorNested withNewBehavior() { + return new BehaviorNested(null); + } + + public BehaviorNested withNewBehaviorLike(V2HorizontalPodAutoscalerBehavior item) { + return new BehaviorNested(item); + } + + public BehaviorNested editBehavior() { + return withNewBehaviorLike(java.util.Optional.ofNullable(buildBehavior()).orElse(null)); + } + + public BehaviorNested editOrNewBehavior() { + return withNewBehaviorLike(java.util.Optional.ofNullable(buildBehavior()).orElse(new V2HorizontalPodAutoscalerBehaviorBuilder().build())); + } + + public BehaviorNested editOrNewBehaviorLike(V2HorizontalPodAutoscalerBehavior item) { + return withNewBehaviorLike(java.util.Optional.ofNullable(buildBehavior()).orElse(item)); + } + + public Integer getMaxReplicas() { + return this.maxReplicas; + } + + public A withMaxReplicas(Integer maxReplicas) { + this.maxReplicas = maxReplicas; + return (A) this; + } + + public boolean hasMaxReplicas() { + return this.maxReplicas != null; + } + + public A addToMetrics(int index,V2MetricSpec item) { + if (this.metrics == null) {this.metrics = new ArrayList();} + V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item); + if (index < 0 || index >= metrics.size()) { _visitables.get("metrics").add(builder); metrics.add(builder); } else { _visitables.get("metrics").add(index, builder); metrics.add(index, builder);} + return (A)this; + } + + public A setToMetrics(int index,V2MetricSpec item) { + if (this.metrics == null) {this.metrics = new ArrayList();} + V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item); + if (index < 0 || index >= metrics.size()) { _visitables.get("metrics").add(builder); metrics.add(builder); } else { _visitables.get("metrics").set(index, builder); metrics.set(index, builder);} + return (A)this; + } + + public A addToMetrics(io.kubernetes.client.openapi.models.V2MetricSpec... items) { + if (this.metrics == null) {this.metrics = new ArrayList();} + for (V2MetricSpec item : items) {V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item);_visitables.get("metrics").add(builder);this.metrics.add(builder);} return (A)this; + } + + public A addAllToMetrics(Collection items) { + if (this.metrics == null) {this.metrics = new ArrayList();} + for (V2MetricSpec item : items) {V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item);_visitables.get("metrics").add(builder);this.metrics.add(builder);} return (A)this; + } + + public A removeFromMetrics(io.kubernetes.client.openapi.models.V2MetricSpec... items) { + if (this.metrics == null) return (A)this; + for (V2MetricSpec item : items) {V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item);_visitables.get("metrics").remove(builder); this.metrics.remove(builder);} return (A)this; + } + + public A removeAllFromMetrics(Collection items) { + if (this.metrics == null) return (A)this; + for (V2MetricSpec item : items) {V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item);_visitables.get("metrics").remove(builder); this.metrics.remove(builder);} return (A)this; + } + + public A removeMatchingFromMetrics(Predicate predicate) { + if (metrics == null) return (A) this; + final Iterator each = metrics.iterator(); + final List visitables = _visitables.get("metrics"); + while (each.hasNext()) { + V2MetricSpecBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildMetrics() { + return this.metrics != null ? build(metrics) : null; + } + + public V2MetricSpec buildMetric(int index) { + return this.metrics.get(index).build(); + } + + public V2MetricSpec buildFirstMetric() { + return this.metrics.get(0).build(); + } + + public V2MetricSpec buildLastMetric() { + return this.metrics.get(metrics.size() - 1).build(); + } + + public V2MetricSpec buildMatchingMetric(Predicate predicate) { + for (V2MetricSpecBuilder item : metrics) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingMetric(Predicate predicate) { + for (V2MetricSpecBuilder item : metrics) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withMetrics(List metrics) { + if (this.metrics != null) { + this._visitables.get("metrics").clear(); + } + if (metrics != null) { + this.metrics = new ArrayList(); + for (V2MetricSpec item : metrics) { + this.addToMetrics(item); + } + } else { + this.metrics = null; + } + return (A) this; + } + + public A withMetrics(io.kubernetes.client.openapi.models.V2MetricSpec... metrics) { + if (this.metrics != null) { + this.metrics.clear(); + _visitables.remove("metrics"); + } + if (metrics != null) { + for (V2MetricSpec item : metrics) { + this.addToMetrics(item); + } + } + return (A) this; + } + + public boolean hasMetrics() { + return this.metrics != null && !this.metrics.isEmpty(); + } + + public MetricsNested addNewMetric() { + return new MetricsNested(-1, null); + } + + public MetricsNested addNewMetricLike(V2MetricSpec item) { + return new MetricsNested(-1, item); + } + + public MetricsNested setNewMetricLike(int index,V2MetricSpec item) { + return new MetricsNested(index, item); + } + + public MetricsNested editMetric(int index) { + if (metrics.size() <= index) throw new RuntimeException("Can't edit metrics. Index exceeds size."); + return setNewMetricLike(index, buildMetric(index)); + } + + public MetricsNested editFirstMetric() { + if (metrics.size() == 0) throw new RuntimeException("Can't edit first metrics. The list is empty."); + return setNewMetricLike(0, buildMetric(0)); + } + + public MetricsNested editLastMetric() { + int index = metrics.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last metrics. The list is empty."); + return setNewMetricLike(index, buildMetric(index)); + } + + public MetricsNested editMatchingMetric(Predicate predicate) { + int index = -1; + for (int i=0;i extends Nested,V2MetricSpecFluent>{ - public N and(); - public N endMetric(); + + public boolean hasScaleTargetRef() { + return this.scaleTargetRef != null; + } + + public ScaleTargetRefNested withNewScaleTargetRef() { + return new ScaleTargetRefNested(null); + } + + public ScaleTargetRefNested withNewScaleTargetRefLike(V2CrossVersionObjectReference item) { + return new ScaleTargetRefNested(item); + } + + public ScaleTargetRefNested editScaleTargetRef() { + return withNewScaleTargetRefLike(java.util.Optional.ofNullable(buildScaleTargetRef()).orElse(null)); + } + + public ScaleTargetRefNested editOrNewScaleTargetRef() { + return withNewScaleTargetRefLike(java.util.Optional.ofNullable(buildScaleTargetRef()).orElse(new V2CrossVersionObjectReferenceBuilder().build())); + } + + public ScaleTargetRefNested editOrNewScaleTargetRefLike(V2CrossVersionObjectReference item) { + return withNewScaleTargetRefLike(java.util.Optional.ofNullable(buildScaleTargetRef()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2HorizontalPodAutoscalerSpecFluent that = (V2HorizontalPodAutoscalerSpecFluent) o; + if (!java.util.Objects.equals(behavior, that.behavior)) return false; + if (!java.util.Objects.equals(maxReplicas, that.maxReplicas)) return false; + if (!java.util.Objects.equals(metrics, that.metrics)) return false; + if (!java.util.Objects.equals(minReplicas, that.minReplicas)) return false; + if (!java.util.Objects.equals(scaleTargetRef, that.scaleTargetRef)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(behavior, maxReplicas, metrics, minReplicas, scaleTargetRef, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (behavior != null) { sb.append("behavior:"); sb.append(behavior + ","); } + if (maxReplicas != null) { sb.append("maxReplicas:"); sb.append(maxReplicas + ","); } + if (metrics != null && !metrics.isEmpty()) { sb.append("metrics:"); sb.append(metrics + ","); } + if (minReplicas != null) { sb.append("minReplicas:"); sb.append(minReplicas + ","); } + if (scaleTargetRef != null) { sb.append("scaleTargetRef:"); sb.append(scaleTargetRef); } + sb.append("}"); + return sb.toString(); + } + public class BehaviorNested extends V2HorizontalPodAutoscalerBehaviorFluent> implements Nested{ + BehaviorNested(V2HorizontalPodAutoscalerBehavior item) { + this.builder = new V2HorizontalPodAutoscalerBehaviorBuilder(this, item); + } + V2HorizontalPodAutoscalerBehaviorBuilder builder; + + public N and() { + return (N) V2HorizontalPodAutoscalerSpecFluent.this.withBehavior(builder.build()); + } + public N endBehavior() { + return and(); + } + + } - public interface ScaleTargetRefNested extends Nested,V2CrossVersionObjectReferenceFluent>{ - public N and(); - public N endScaleTargetRef(); + public class MetricsNested extends V2MetricSpecFluent> implements Nested{ + MetricsNested(int index,V2MetricSpec item) { + this.index = index; + this.builder = new V2MetricSpecBuilder(this, item); + } + V2MetricSpecBuilder builder; + int index; + + public N and() { + return (N) V2HorizontalPodAutoscalerSpecFluent.this.setToMetrics(index,builder.build()); + } + public N endMetric() { + return and(); + } + + } + public class ScaleTargetRefNested extends V2CrossVersionObjectReferenceFluent> implements Nested{ + ScaleTargetRefNested(V2CrossVersionObjectReference item) { + this.builder = new V2CrossVersionObjectReferenceBuilder(this, item); + } + V2CrossVersionObjectReferenceBuilder builder; + + public N and() { + return (N) V2HorizontalPodAutoscalerSpecFluent.this.withScaleTargetRef(builder.build()); + } + + public N endScaleTargetRef() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecFluentImpl.java deleted file mode 100644 index 536c523a73..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerSpecFluentImpl.java +++ /dev/null @@ -1,315 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2HorizontalPodAutoscalerSpecFluentImpl> extends BaseFluent implements V2HorizontalPodAutoscalerSpecFluent{ - public V2HorizontalPodAutoscalerSpecFluentImpl() { - } - public V2HorizontalPodAutoscalerSpecFluentImpl(V2HorizontalPodAutoscalerSpec instance) { - if (instance != null) { - this.withBehavior(instance.getBehavior()); - this.withMaxReplicas(instance.getMaxReplicas()); - this.withMetrics(instance.getMetrics()); - this.withMinReplicas(instance.getMinReplicas()); - this.withScaleTargetRef(instance.getScaleTargetRef()); - } - } - private V2HorizontalPodAutoscalerBehaviorBuilder behavior; - private Integer maxReplicas; - private ArrayList metrics; - private Integer minReplicas; - private V2CrossVersionObjectReferenceBuilder scaleTargetRef; - - /** - * This method has been deprecated, please use method buildBehavior instead. - * @return The buildable object. - */ - @Deprecated - public V2HorizontalPodAutoscalerBehavior getBehavior() { - return this.behavior!=null ?this.behavior.build():null; - } - public V2HorizontalPodAutoscalerBehavior buildBehavior() { - return this.behavior!=null ?this.behavior.build():null; - } - public A withBehavior(V2HorizontalPodAutoscalerBehavior behavior) { - _visitables.get("behavior").remove(this.behavior); - if (behavior!=null){ this.behavior= new V2HorizontalPodAutoscalerBehaviorBuilder(behavior); _visitables.get("behavior").add(this.behavior);} else { this.behavior = null; _visitables.get("behavior").remove(this.behavior); } return (A) this; - } - public Boolean hasBehavior() { - return this.behavior != null; - } - public V2HorizontalPodAutoscalerSpecFluentImpl.BehaviorNested withNewBehavior() { - return new V2HorizontalPodAutoscalerSpecFluentImpl.BehaviorNestedImpl(); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.BehaviorNested withNewBehaviorLike(V2HorizontalPodAutoscalerBehavior item) { - return new V2HorizontalPodAutoscalerSpecFluentImpl.BehaviorNestedImpl(item); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.BehaviorNested editBehavior() { - return withNewBehaviorLike(getBehavior()); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.BehaviorNested editOrNewBehavior() { - return withNewBehaviorLike(getBehavior() != null ? getBehavior(): new V2HorizontalPodAutoscalerBehaviorBuilder().build()); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.BehaviorNested editOrNewBehaviorLike(V2HorizontalPodAutoscalerBehavior item) { - return withNewBehaviorLike(getBehavior() != null ? getBehavior(): item); - } - public Integer getMaxReplicas() { - return this.maxReplicas; - } - public A withMaxReplicas(Integer maxReplicas) { - this.maxReplicas=maxReplicas; return (A) this; - } - public Boolean hasMaxReplicas() { - return this.maxReplicas != null; - } - public A addToMetrics(int index,V2MetricSpec item) { - if (this.metrics == null) {this.metrics = new ArrayList();} - V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item); - if (index < 0 || index >= metrics.size()) { _visitables.get("metrics").add(builder); metrics.add(builder); } else { _visitables.get("metrics").add(index, builder); metrics.add(index, builder);} - return (A)this; - } - public A setToMetrics(int index,V2MetricSpec item) { - if (this.metrics == null) {this.metrics = new ArrayList();} - V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item); - if (index < 0 || index >= metrics.size()) { _visitables.get("metrics").add(builder); metrics.add(builder); } else { _visitables.get("metrics").set(index, builder); metrics.set(index, builder);} - return (A)this; - } - public A addToMetrics(io.kubernetes.client.openapi.models.V2MetricSpec... items) { - if (this.metrics == null) {this.metrics = new ArrayList();} - for (V2MetricSpec item : items) {V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item);_visitables.get("metrics").add(builder);this.metrics.add(builder);} return (A)this; - } - public A addAllToMetrics(Collection items) { - if (this.metrics == null) {this.metrics = new ArrayList();} - for (V2MetricSpec item : items) {V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item);_visitables.get("metrics").add(builder);this.metrics.add(builder);} return (A)this; - } - public A removeFromMetrics(io.kubernetes.client.openapi.models.V2MetricSpec... items) { - for (V2MetricSpec item : items) {V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item);_visitables.get("metrics").remove(builder);if (this.metrics != null) {this.metrics.remove(builder);}} return (A)this; - } - public A removeAllFromMetrics(Collection items) { - for (V2MetricSpec item : items) {V2MetricSpecBuilder builder = new V2MetricSpecBuilder(item);_visitables.get("metrics").remove(builder);if (this.metrics != null) {this.metrics.remove(builder);}} return (A)this; - } - public A removeMatchingFromMetrics(Predicate predicate) { - if (metrics == null) return (A) this; - final Iterator each = metrics.iterator(); - final List visitables = _visitables.get("metrics"); - while (each.hasNext()) { - V2MetricSpecBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildMetrics instead. - * @return The buildable object. - */ - @Deprecated - public List getMetrics() { - return metrics != null ? build(metrics) : null; - } - public List buildMetrics() { - return metrics != null ? build(metrics) : null; - } - public V2MetricSpec buildMetric(int index) { - return this.metrics.get(index).build(); - } - public V2MetricSpec buildFirstMetric() { - return this.metrics.get(0).build(); - } - public V2MetricSpec buildLastMetric() { - return this.metrics.get(metrics.size() - 1).build(); - } - public V2MetricSpec buildMatchingMetric(Predicate predicate) { - for (V2MetricSpecBuilder item: metrics) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingMetric(Predicate predicate) { - for (V2MetricSpecBuilder item: metrics) { if(predicate.test(item)){ return true;} } return false; - } - public A withMetrics(List metrics) { - if (this.metrics != null) { _visitables.get("metrics").clear();} - if (metrics != null) {this.metrics = new ArrayList(); for (V2MetricSpec item : metrics){this.addToMetrics(item);}} else { this.metrics = null;} return (A) this; - } - public A withMetrics(io.kubernetes.client.openapi.models.V2MetricSpec... metrics) { - if (this.metrics != null) {this.metrics.clear(); _visitables.remove("metrics"); } - if (metrics != null) {for (V2MetricSpec item :metrics){ this.addToMetrics(item);}} return (A) this; - } - public Boolean hasMetrics() { - return metrics != null && !metrics.isEmpty(); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNested addNewMetric() { - return new V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNestedImpl(); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNested addNewMetricLike(V2MetricSpec item) { - return new V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNestedImpl(-1, item); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNested setNewMetricLike(int index,V2MetricSpec item) { - return new V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNestedImpl(index, item); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNested editMetric(int index) { - if (metrics.size() <= index) throw new RuntimeException("Can't edit metrics. Index exceeds size."); - return setNewMetricLike(index, buildMetric(index)); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNested editFirstMetric() { - if (metrics.size() == 0) throw new RuntimeException("Can't edit first metrics. The list is empty."); - return setNewMetricLike(0, buildMetric(0)); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNested editLastMetric() { - int index = metrics.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last metrics. The list is empty."); - return setNewMetricLike(index, buildMetric(index)); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNested editMatchingMetric(Predicate predicate) { - int index = -1; - for (int i=0;i withNewScaleTargetRef() { - return new V2HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNestedImpl(); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested withNewScaleTargetRefLike(V2CrossVersionObjectReference item) { - return new V2HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNestedImpl(item); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested editScaleTargetRef() { - return withNewScaleTargetRefLike(getScaleTargetRef()); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested editOrNewScaleTargetRef() { - return withNewScaleTargetRefLike(getScaleTargetRef() != null ? getScaleTargetRef(): new V2CrossVersionObjectReferenceBuilder().build()); - } - public V2HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested editOrNewScaleTargetRefLike(V2CrossVersionObjectReference item) { - return withNewScaleTargetRefLike(getScaleTargetRef() != null ? getScaleTargetRef(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2HorizontalPodAutoscalerSpecFluentImpl that = (V2HorizontalPodAutoscalerSpecFluentImpl) o; - if (!java.util.Objects.equals(behavior, that.behavior)) return false; - - if (!java.util.Objects.equals(maxReplicas, that.maxReplicas)) return false; - - if (!java.util.Objects.equals(metrics, that.metrics)) return false; - - if (!java.util.Objects.equals(minReplicas, that.minReplicas)) return false; - - if (!java.util.Objects.equals(scaleTargetRef, that.scaleTargetRef)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(behavior, maxReplicas, metrics, minReplicas, scaleTargetRef, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (behavior != null) { sb.append("behavior:"); sb.append(behavior + ","); } - if (maxReplicas != null) { sb.append("maxReplicas:"); sb.append(maxReplicas + ","); } - if (metrics != null) { sb.append("metrics:"); sb.append(metrics + ","); } - if (minReplicas != null) { sb.append("minReplicas:"); sb.append(minReplicas + ","); } - if (scaleTargetRef != null) { sb.append("scaleTargetRef:"); sb.append(scaleTargetRef); } - sb.append("}"); - return sb.toString(); - } - class BehaviorNestedImpl extends V2HorizontalPodAutoscalerBehaviorFluentImpl> implements V2HorizontalPodAutoscalerSpecFluentImpl.BehaviorNested,Nested{ - BehaviorNestedImpl(V2HorizontalPodAutoscalerBehavior item) { - this.builder = new V2HorizontalPodAutoscalerBehaviorBuilder(this, item); - } - BehaviorNestedImpl() { - this.builder = new V2HorizontalPodAutoscalerBehaviorBuilder(this); - } - V2HorizontalPodAutoscalerBehaviorBuilder builder; - public N and() { - return (N) V2HorizontalPodAutoscalerSpecFluentImpl.this.withBehavior(builder.build()); - } - public N endBehavior() { - return and(); - } - - } - class MetricsNestedImpl extends V2MetricSpecFluentImpl> implements V2HorizontalPodAutoscalerSpecFluentImpl.MetricsNested,Nested{ - MetricsNestedImpl(int index,V2MetricSpec item) { - this.index = index; - this.builder = new V2MetricSpecBuilder(this, item); - } - MetricsNestedImpl() { - this.index = -1; - this.builder = new V2MetricSpecBuilder(this); - } - V2MetricSpecBuilder builder; - int index; - public N and() { - return (N) V2HorizontalPodAutoscalerSpecFluentImpl.this.setToMetrics(index,builder.build()); - } - public N endMetric() { - return and(); - } - - } - class ScaleTargetRefNestedImpl extends V2CrossVersionObjectReferenceFluentImpl> implements V2HorizontalPodAutoscalerSpecFluentImpl.ScaleTargetRefNested,Nested{ - ScaleTargetRefNestedImpl(V2CrossVersionObjectReference item) { - this.builder = new V2CrossVersionObjectReferenceBuilder(this, item); - } - ScaleTargetRefNestedImpl() { - this.builder = new V2CrossVersionObjectReferenceBuilder(this); - } - V2CrossVersionObjectReferenceBuilder builder; - public N and() { - return (N) V2HorizontalPodAutoscalerSpecFluentImpl.this.withScaleTargetRef(builder.build()); - } - public N endScaleTargetRef() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusBuilder.java index 1ef49f009d..58f0a5d50f 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusBuilder.java @@ -1,56 +1,30 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2HorizontalPodAutoscalerStatusBuilder extends V2HorizontalPodAutoscalerStatusFluentImpl implements VisitableBuilder{ +public class V2HorizontalPodAutoscalerStatusBuilder extends V2HorizontalPodAutoscalerStatusFluent implements VisitableBuilder{ public V2HorizontalPodAutoscalerStatusBuilder() { - this(false); - } - public V2HorizontalPodAutoscalerStatusBuilder(Boolean validationEnabled) { - this(new V2HorizontalPodAutoscalerStatus(), validationEnabled); + this(new V2HorizontalPodAutoscalerStatus()); } + public V2HorizontalPodAutoscalerStatusBuilder(V2HorizontalPodAutoscalerStatusFluent fluent) { - this(fluent, false); - } - public V2HorizontalPodAutoscalerStatusBuilder(V2HorizontalPodAutoscalerStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V2HorizontalPodAutoscalerStatus(), validationEnabled); + this(fluent, new V2HorizontalPodAutoscalerStatus()); } + public V2HorizontalPodAutoscalerStatusBuilder(V2HorizontalPodAutoscalerStatusFluent fluent,V2HorizontalPodAutoscalerStatus instance) { - this(fluent, instance, false); - } - public V2HorizontalPodAutoscalerStatusBuilder(V2HorizontalPodAutoscalerStatusFluent fluent,V2HorizontalPodAutoscalerStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withConditions(instance.getConditions()); - fluent.withCurrentMetrics(instance.getCurrentMetrics()); - fluent.withCurrentReplicas(instance.getCurrentReplicas()); - fluent.withDesiredReplicas(instance.getDesiredReplicas()); - fluent.withLastScaleTime(instance.getLastScaleTime()); - fluent.withObservedGeneration(instance.getObservedGeneration()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2HorizontalPodAutoscalerStatusBuilder(V2HorizontalPodAutoscalerStatus instance) { - this(instance,false); - } - public V2HorizontalPodAutoscalerStatusBuilder(V2HorizontalPodAutoscalerStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withCurrentMetrics(instance.getCurrentMetrics()); - this.withCurrentReplicas(instance.getCurrentReplicas()); - this.withDesiredReplicas(instance.getDesiredReplicas()); - this.withLastScaleTime(instance.getLastScaleTime()); - this.withObservedGeneration(instance.getObservedGeneration()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2HorizontalPodAutoscalerStatusFluent fluent; - Boolean validationEnabled; + public V2HorizontalPodAutoscalerStatus build() { V2HorizontalPodAutoscalerStatus buildable = new V2HorizontalPodAutoscalerStatus(); - buildable.setConditions(fluent.getConditions()); - buildable.setCurrentMetrics(fluent.getCurrentMetrics()); + buildable.setConditions(fluent.buildConditions()); + buildable.setCurrentMetrics(fluent.buildCurrentMetrics()); buildable.setCurrentReplicas(fluent.getCurrentReplicas()); buildable.setDesiredReplicas(fluent.getDesiredReplicas()); buildable.setLastScaleTime(fluent.getLastScaleTime()); @@ -58,4 +32,5 @@ public V2HorizontalPodAutoscalerStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusFluent.java index 140cbd36ed..1ad1936db9 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusFluent.java @@ -1,105 +1,469 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.util.ArrayList; +import java.lang.String; import java.util.function.Predicate; +import io.kubernetes.client.fluent.BaseFluent; +import java.util.Iterator; +import java.util.List; import java.lang.Integer; -import java.lang.Deprecated; import java.time.OffsetDateTime; import java.lang.Long; -import java.util.Iterator; import java.util.Collection; -import java.util.List; -import java.lang.Boolean; +import java.lang.Object; - /** - * Generated - */ -public interface V2HorizontalPodAutoscalerStatusFluent> extends Fluent{ - public A addToConditions(int index,V2HorizontalPodAutoscalerCondition item); - public A setToConditions(int index,V2HorizontalPodAutoscalerCondition item); - public A addToConditions(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerCondition... items); - public A addAllToConditions(Collection items); - public A removeFromConditions(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerCondition... items); - public A removeAllFromConditions(Collection items); - public A removeMatchingFromConditions(Predicate predicate); - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions(); - public List buildConditions(); - public V2HorizontalPodAutoscalerCondition buildCondition(int index); - public V2HorizontalPodAutoscalerCondition buildFirstCondition(); - public V2HorizontalPodAutoscalerCondition buildLastCondition(); - public V2HorizontalPodAutoscalerCondition buildMatchingCondition(Predicate predicate); - public Boolean hasMatchingCondition(Predicate predicate); - public A withConditions(List conditions); - public A withConditions(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerCondition... conditions); - public Boolean hasConditions(); - public V2HorizontalPodAutoscalerStatusFluent.ConditionsNested addNewCondition(); - public V2HorizontalPodAutoscalerStatusFluent.ConditionsNested addNewConditionLike(V2HorizontalPodAutoscalerCondition item); - public V2HorizontalPodAutoscalerStatusFluent.ConditionsNested setNewConditionLike(int index,V2HorizontalPodAutoscalerCondition item); - public V2HorizontalPodAutoscalerStatusFluent.ConditionsNested editCondition(int index); - public V2HorizontalPodAutoscalerStatusFluent.ConditionsNested editFirstCondition(); - public V2HorizontalPodAutoscalerStatusFluent.ConditionsNested editLastCondition(); - public V2HorizontalPodAutoscalerStatusFluent.ConditionsNested editMatchingCondition(Predicate predicate); - public A addToCurrentMetrics(int index,V2MetricStatus item); - public A setToCurrentMetrics(int index,V2MetricStatus item); - public A addToCurrentMetrics(io.kubernetes.client.openapi.models.V2MetricStatus... items); - public A addAllToCurrentMetrics(Collection items); - public A removeFromCurrentMetrics(io.kubernetes.client.openapi.models.V2MetricStatus... items); - public A removeAllFromCurrentMetrics(Collection items); - public A removeMatchingFromCurrentMetrics(Predicate predicate); - - /** - * This method has been deprecated, please use method buildCurrentMetrics instead. - * @return The buildable object. - */ - @Deprecated - public List getCurrentMetrics(); - public List buildCurrentMetrics(); - public V2MetricStatus buildCurrentMetric(int index); - public V2MetricStatus buildFirstCurrentMetric(); - public V2MetricStatus buildLastCurrentMetric(); - public V2MetricStatus buildMatchingCurrentMetric(Predicate predicate); - public Boolean hasMatchingCurrentMetric(Predicate predicate); - public A withCurrentMetrics(List currentMetrics); - public A withCurrentMetrics(io.kubernetes.client.openapi.models.V2MetricStatus... currentMetrics); - public Boolean hasCurrentMetrics(); - public V2HorizontalPodAutoscalerStatusFluent.CurrentMetricsNested addNewCurrentMetric(); - public V2HorizontalPodAutoscalerStatusFluent.CurrentMetricsNested addNewCurrentMetricLike(V2MetricStatus item); - public V2HorizontalPodAutoscalerStatusFluent.CurrentMetricsNested setNewCurrentMetricLike(int index,V2MetricStatus item); - public V2HorizontalPodAutoscalerStatusFluent.CurrentMetricsNested editCurrentMetric(int index); - public V2HorizontalPodAutoscalerStatusFluent.CurrentMetricsNested editFirstCurrentMetric(); - public V2HorizontalPodAutoscalerStatusFluent.CurrentMetricsNested editLastCurrentMetric(); - public V2HorizontalPodAutoscalerStatusFluent.CurrentMetricsNested editMatchingCurrentMetric(Predicate predicate); - public Integer getCurrentReplicas(); - public A withCurrentReplicas(Integer currentReplicas); - public Boolean hasCurrentReplicas(); - public Integer getDesiredReplicas(); - public A withDesiredReplicas(Integer desiredReplicas); - public Boolean hasDesiredReplicas(); - public OffsetDateTime getLastScaleTime(); - public A withLastScaleTime(OffsetDateTime lastScaleTime); - public Boolean hasLastScaleTime(); - public Long getObservedGeneration(); - public A withObservedGeneration(Long observedGeneration); - public Boolean hasObservedGeneration(); - public interface ConditionsNested extends Nested,V2HorizontalPodAutoscalerConditionFluent>{ - public N and(); - public N endCondition(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2HorizontalPodAutoscalerStatusFluent> extends BaseFluent{ + public V2HorizontalPodAutoscalerStatusFluent() { + } + + public V2HorizontalPodAutoscalerStatusFluent(V2HorizontalPodAutoscalerStatus instance) { + this.copyInstance(instance); + } + private ArrayList conditions; + private ArrayList currentMetrics; + private Integer currentReplicas; + private Integer desiredReplicas; + private OffsetDateTime lastScaleTime; + private Long observedGeneration; + + protected void copyInstance(V2HorizontalPodAutoscalerStatus instance) { + instance = (instance != null ? instance : new V2HorizontalPodAutoscalerStatus()); + if (instance != null) { + this.withConditions(instance.getConditions()); + this.withCurrentMetrics(instance.getCurrentMetrics()); + this.withCurrentReplicas(instance.getCurrentReplicas()); + this.withDesiredReplicas(instance.getDesiredReplicas()); + this.withLastScaleTime(instance.getLastScaleTime()); + this.withObservedGeneration(instance.getObservedGeneration()); + } + } + + public A addToConditions(int index,V2HorizontalPodAutoscalerCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} + return (A)this; + } + + public A setToConditions(int index,V2HorizontalPodAutoscalerCondition item) { + if (this.conditions == null) {this.conditions = new ArrayList();} + V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item); + if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} + return (A)this; + } + + public A addToConditions(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerCondition... items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V2HorizontalPodAutoscalerCondition item : items) {V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A addAllToConditions(Collection items) { + if (this.conditions == null) {this.conditions = new ArrayList();} + for (V2HorizontalPodAutoscalerCondition item : items) {V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; + } + + public A removeFromConditions(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerCondition... items) { + if (this.conditions == null) return (A)this; + for (V2HorizontalPodAutoscalerCondition item : items) {V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeAllFromConditions(Collection items) { + if (this.conditions == null) return (A)this; + for (V2HorizontalPodAutoscalerCondition item : items) {V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item);_visitables.get("conditions").remove(builder); this.conditions.remove(builder);} return (A)this; + } + + public A removeMatchingFromConditions(Predicate predicate) { + if (conditions == null) return (A) this; + final Iterator each = conditions.iterator(); + final List visitables = _visitables.get("conditions"); + while (each.hasNext()) { + V2HorizontalPodAutoscalerConditionBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildConditions() { + return this.conditions != null ? build(conditions) : null; + } + + public V2HorizontalPodAutoscalerCondition buildCondition(int index) { + return this.conditions.get(index).build(); + } + + public V2HorizontalPodAutoscalerCondition buildFirstCondition() { + return this.conditions.get(0).build(); + } + + public V2HorizontalPodAutoscalerCondition buildLastCondition() { + return this.conditions.get(conditions.size() - 1).build(); + } + + public V2HorizontalPodAutoscalerCondition buildMatchingCondition(Predicate predicate) { + for (V2HorizontalPodAutoscalerConditionBuilder item : conditions) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCondition(Predicate predicate) { + for (V2HorizontalPodAutoscalerConditionBuilder item : conditions) { + if (predicate.test(item)) { + return true; + } + } + return false; } - public interface CurrentMetricsNested extends Nested,V2MetricStatusFluent>{ - public N and(); - public N endCurrentMetric(); + + public A withConditions(List conditions) { + if (this.conditions != null) { + this._visitables.get("conditions").clear(); + } + if (conditions != null) { + this.conditions = new ArrayList(); + for (V2HorizontalPodAutoscalerCondition item : conditions) { + this.addToConditions(item); + } + } else { + this.conditions = null; + } + return (A) this; + } + + public A withConditions(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerCondition... conditions) { + if (this.conditions != null) { + this.conditions.clear(); + _visitables.remove("conditions"); + } + if (conditions != null) { + for (V2HorizontalPodAutoscalerCondition item : conditions) { + this.addToConditions(item); + } + } + return (A) this; + } + + public boolean hasConditions() { + return this.conditions != null && !this.conditions.isEmpty(); + } + + public ConditionsNested addNewCondition() { + return new ConditionsNested(-1, null); + } + + public ConditionsNested addNewConditionLike(V2HorizontalPodAutoscalerCondition item) { + return new ConditionsNested(-1, item); + } + + public ConditionsNested setNewConditionLike(int index,V2HorizontalPodAutoscalerCondition item) { + return new ConditionsNested(index, item); + } + + public ConditionsNested editCondition(int index) { + if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editFirstCondition() { + if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); + return setNewConditionLike(0, buildCondition(0)); + } + + public ConditionsNested editLastCondition() { + int index = conditions.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); + return setNewConditionLike(index, buildCondition(index)); + } + + public ConditionsNested editMatchingCondition(Predicate predicate) { + int index = -1; + for (int i=0;i();} + V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item); + if (index < 0 || index >= currentMetrics.size()) { _visitables.get("currentMetrics").add(builder); currentMetrics.add(builder); } else { _visitables.get("currentMetrics").add(index, builder); currentMetrics.add(index, builder);} + return (A)this; + } + + public A setToCurrentMetrics(int index,V2MetricStatus item) { + if (this.currentMetrics == null) {this.currentMetrics = new ArrayList();} + V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item); + if (index < 0 || index >= currentMetrics.size()) { _visitables.get("currentMetrics").add(builder); currentMetrics.add(builder); } else { _visitables.get("currentMetrics").set(index, builder); currentMetrics.set(index, builder);} + return (A)this; + } + + public A addToCurrentMetrics(io.kubernetes.client.openapi.models.V2MetricStatus... items) { + if (this.currentMetrics == null) {this.currentMetrics = new ArrayList();} + for (V2MetricStatus item : items) {V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item);_visitables.get("currentMetrics").add(builder);this.currentMetrics.add(builder);} return (A)this; + } + + public A addAllToCurrentMetrics(Collection items) { + if (this.currentMetrics == null) {this.currentMetrics = new ArrayList();} + for (V2MetricStatus item : items) {V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item);_visitables.get("currentMetrics").add(builder);this.currentMetrics.add(builder);} return (A)this; + } + + public A removeFromCurrentMetrics(io.kubernetes.client.openapi.models.V2MetricStatus... items) { + if (this.currentMetrics == null) return (A)this; + for (V2MetricStatus item : items) {V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item);_visitables.get("currentMetrics").remove(builder); this.currentMetrics.remove(builder);} return (A)this; + } + + public A removeAllFromCurrentMetrics(Collection items) { + if (this.currentMetrics == null) return (A)this; + for (V2MetricStatus item : items) {V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item);_visitables.get("currentMetrics").remove(builder); this.currentMetrics.remove(builder);} return (A)this; + } + + public A removeMatchingFromCurrentMetrics(Predicate predicate) { + if (currentMetrics == null) return (A) this; + final Iterator each = currentMetrics.iterator(); + final List visitables = _visitables.get("currentMetrics"); + while (each.hasNext()) { + V2MetricStatusBuilder builder = each.next(); + if (predicate.test(builder)) { + visitables.remove(builder); + each.remove(); + } + } + return (A)this; + } + + public List buildCurrentMetrics() { + return this.currentMetrics != null ? build(currentMetrics) : null; + } + + public V2MetricStatus buildCurrentMetric(int index) { + return this.currentMetrics.get(index).build(); + } + + public V2MetricStatus buildFirstCurrentMetric() { + return this.currentMetrics.get(0).build(); + } + + public V2MetricStatus buildLastCurrentMetric() { + return this.currentMetrics.get(currentMetrics.size() - 1).build(); + } + + public V2MetricStatus buildMatchingCurrentMetric(Predicate predicate) { + for (V2MetricStatusBuilder item : currentMetrics) { + if (predicate.test(item)) { + return item.build(); + } + } + return null; + } + + public boolean hasMatchingCurrentMetric(Predicate predicate) { + for (V2MetricStatusBuilder item : currentMetrics) { + if (predicate.test(item)) { + return true; + } + } + return false; + } + + public A withCurrentMetrics(List currentMetrics) { + if (this.currentMetrics != null) { + this._visitables.get("currentMetrics").clear(); + } + if (currentMetrics != null) { + this.currentMetrics = new ArrayList(); + for (V2MetricStatus item : currentMetrics) { + this.addToCurrentMetrics(item); + } + } else { + this.currentMetrics = null; + } + return (A) this; + } + + public A withCurrentMetrics(io.kubernetes.client.openapi.models.V2MetricStatus... currentMetrics) { + if (this.currentMetrics != null) { + this.currentMetrics.clear(); + _visitables.remove("currentMetrics"); + } + if (currentMetrics != null) { + for (V2MetricStatus item : currentMetrics) { + this.addToCurrentMetrics(item); + } + } + return (A) this; + } + + public boolean hasCurrentMetrics() { + return this.currentMetrics != null && !this.currentMetrics.isEmpty(); + } + + public CurrentMetricsNested addNewCurrentMetric() { + return new CurrentMetricsNested(-1, null); + } + + public CurrentMetricsNested addNewCurrentMetricLike(V2MetricStatus item) { + return new CurrentMetricsNested(-1, item); + } + + public CurrentMetricsNested setNewCurrentMetricLike(int index,V2MetricStatus item) { + return new CurrentMetricsNested(index, item); + } + + public CurrentMetricsNested editCurrentMetric(int index) { + if (currentMetrics.size() <= index) throw new RuntimeException("Can't edit currentMetrics. Index exceeds size."); + return setNewCurrentMetricLike(index, buildCurrentMetric(index)); + } + + public CurrentMetricsNested editFirstCurrentMetric() { + if (currentMetrics.size() == 0) throw new RuntimeException("Can't edit first currentMetrics. The list is empty."); + return setNewCurrentMetricLike(0, buildCurrentMetric(0)); + } + + public CurrentMetricsNested editLastCurrentMetric() { + int index = currentMetrics.size() - 1; + if (index < 0) throw new RuntimeException("Can't edit last currentMetrics. The list is empty."); + return setNewCurrentMetricLike(index, buildCurrentMetric(index)); + } + + public CurrentMetricsNested editMatchingCurrentMetric(Predicate predicate) { + int index = -1; + for (int i=0;i extends V2HorizontalPodAutoscalerConditionFluent> implements Nested{ + ConditionsNested(int index,V2HorizontalPodAutoscalerCondition item) { + this.index = index; + this.builder = new V2HorizontalPodAutoscalerConditionBuilder(this, item); + } + V2HorizontalPodAutoscalerConditionBuilder builder; + int index; + public N and() { + return (N) V2HorizontalPodAutoscalerStatusFluent.this.setToConditions(index,builder.build()); + } + + public N endCondition() { + return and(); + } + + } + public class CurrentMetricsNested extends V2MetricStatusFluent> implements Nested{ + CurrentMetricsNested(int index,V2MetricStatus item) { + this.index = index; + this.builder = new V2MetricStatusBuilder(this, item); + } + V2MetricStatusBuilder builder; + int index; + + public N and() { + return (N) V2HorizontalPodAutoscalerStatusFluent.this.setToCurrentMetrics(index,builder.build()); + } + + public N endCurrentMetric() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusFluentImpl.java deleted file mode 100644 index 308887c8a7..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2HorizontalPodAutoscalerStatusFluentImpl.java +++ /dev/null @@ -1,366 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.util.ArrayList; -import java.lang.String; -import java.util.function.Predicate; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.util.Iterator; -import java.util.List; -import java.lang.Boolean; -import java.lang.Integer; -import java.time.OffsetDateTime; -import java.lang.Long; -import java.util.Collection; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2HorizontalPodAutoscalerStatusFluentImpl> extends BaseFluent implements V2HorizontalPodAutoscalerStatusFluent{ - public V2HorizontalPodAutoscalerStatusFluentImpl() { - } - public V2HorizontalPodAutoscalerStatusFluentImpl(V2HorizontalPodAutoscalerStatus instance) { - if (instance != null) { - this.withConditions(instance.getConditions()); - this.withCurrentMetrics(instance.getCurrentMetrics()); - this.withCurrentReplicas(instance.getCurrentReplicas()); - this.withDesiredReplicas(instance.getDesiredReplicas()); - this.withLastScaleTime(instance.getLastScaleTime()); - this.withObservedGeneration(instance.getObservedGeneration()); - } - } - private ArrayList conditions; - private ArrayList currentMetrics; - private Integer currentReplicas; - private Integer desiredReplicas; - private OffsetDateTime lastScaleTime; - private Long observedGeneration; - public A addToConditions(int index,V2HorizontalPodAutoscalerCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").add(index, builder); conditions.add(index, builder);} - return (A)this; - } - public A setToConditions(int index,V2HorizontalPodAutoscalerCondition item) { - if (this.conditions == null) {this.conditions = new ArrayList();} - V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item); - if (index < 0 || index >= conditions.size()) { _visitables.get("conditions").add(builder); conditions.add(builder); } else { _visitables.get("conditions").set(index, builder); conditions.set(index, builder);} - return (A)this; - } - public A addToConditions(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerCondition... items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V2HorizontalPodAutoscalerCondition item : items) {V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A addAllToConditions(Collection items) { - if (this.conditions == null) {this.conditions = new ArrayList();} - for (V2HorizontalPodAutoscalerCondition item : items) {V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this; - } - public A removeFromConditions(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerCondition... items) { - for (V2HorizontalPodAutoscalerCondition item : items) {V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeAllFromConditions(Collection items) { - for (V2HorizontalPodAutoscalerCondition item : items) {V2HorizontalPodAutoscalerConditionBuilder builder = new V2HorizontalPodAutoscalerConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this; - } - public A removeMatchingFromConditions(Predicate predicate) { - if (conditions == null) return (A) this; - final Iterator each = conditions.iterator(); - final List visitables = _visitables.get("conditions"); - while (each.hasNext()) { - V2HorizontalPodAutoscalerConditionBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildConditions instead. - * @return The buildable object. - */ - @Deprecated - public List getConditions() { - return conditions != null ? build(conditions) : null; - } - public List buildConditions() { - return conditions != null ? build(conditions) : null; - } - public V2HorizontalPodAutoscalerCondition buildCondition(int index) { - return this.conditions.get(index).build(); - } - public V2HorizontalPodAutoscalerCondition buildFirstCondition() { - return this.conditions.get(0).build(); - } - public V2HorizontalPodAutoscalerCondition buildLastCondition() { - return this.conditions.get(conditions.size() - 1).build(); - } - public V2HorizontalPodAutoscalerCondition buildMatchingCondition(Predicate predicate) { - for (V2HorizontalPodAutoscalerConditionBuilder item: conditions) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCondition(Predicate predicate) { - for (V2HorizontalPodAutoscalerConditionBuilder item: conditions) { if(predicate.test(item)){ return true;} } return false; - } - public A withConditions(List conditions) { - if (this.conditions != null) { _visitables.get("conditions").clear();} - if (conditions != null) {this.conditions = new ArrayList(); for (V2HorizontalPodAutoscalerCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this; - } - public A withConditions(io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerCondition... conditions) { - if (this.conditions != null) {this.conditions.clear(); _visitables.remove("conditions"); } - if (conditions != null) {for (V2HorizontalPodAutoscalerCondition item :conditions){ this.addToConditions(item);}} return (A) this; - } - public Boolean hasConditions() { - return conditions != null && !conditions.isEmpty(); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNested addNewCondition() { - return new V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNestedImpl(); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNested addNewConditionLike(V2HorizontalPodAutoscalerCondition item) { - return new V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNestedImpl(-1, item); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNested setNewConditionLike(int index,V2HorizontalPodAutoscalerCondition item) { - return new V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNestedImpl(index, item); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNested editCondition(int index) { - if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size."); - return setNewConditionLike(index, buildCondition(index)); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNested editFirstCondition() { - if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty."); - return setNewConditionLike(0, buildCondition(0)); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNested editLastCondition() { - int index = conditions.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty."); - return setNewConditionLike(index, buildCondition(index)); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNested editMatchingCondition(Predicate predicate) { - int index = -1; - for (int i=0;i();} - V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item); - if (index < 0 || index >= currentMetrics.size()) { _visitables.get("currentMetrics").add(builder); currentMetrics.add(builder); } else { _visitables.get("currentMetrics").add(index, builder); currentMetrics.add(index, builder);} - return (A)this; - } - public A setToCurrentMetrics(int index,V2MetricStatus item) { - if (this.currentMetrics == null) {this.currentMetrics = new ArrayList();} - V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item); - if (index < 0 || index >= currentMetrics.size()) { _visitables.get("currentMetrics").add(builder); currentMetrics.add(builder); } else { _visitables.get("currentMetrics").set(index, builder); currentMetrics.set(index, builder);} - return (A)this; - } - public A addToCurrentMetrics(io.kubernetes.client.openapi.models.V2MetricStatus... items) { - if (this.currentMetrics == null) {this.currentMetrics = new ArrayList();} - for (V2MetricStatus item : items) {V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item);_visitables.get("currentMetrics").add(builder);this.currentMetrics.add(builder);} return (A)this; - } - public A addAllToCurrentMetrics(Collection items) { - if (this.currentMetrics == null) {this.currentMetrics = new ArrayList();} - for (V2MetricStatus item : items) {V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item);_visitables.get("currentMetrics").add(builder);this.currentMetrics.add(builder);} return (A)this; - } - public A removeFromCurrentMetrics(io.kubernetes.client.openapi.models.V2MetricStatus... items) { - for (V2MetricStatus item : items) {V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item);_visitables.get("currentMetrics").remove(builder);if (this.currentMetrics != null) {this.currentMetrics.remove(builder);}} return (A)this; - } - public A removeAllFromCurrentMetrics(Collection items) { - for (V2MetricStatus item : items) {V2MetricStatusBuilder builder = new V2MetricStatusBuilder(item);_visitables.get("currentMetrics").remove(builder);if (this.currentMetrics != null) {this.currentMetrics.remove(builder);}} return (A)this; - } - public A removeMatchingFromCurrentMetrics(Predicate predicate) { - if (currentMetrics == null) return (A) this; - final Iterator each = currentMetrics.iterator(); - final List visitables = _visitables.get("currentMetrics"); - while (each.hasNext()) { - V2MetricStatusBuilder builder = each.next(); - if (predicate.test(builder)) { - visitables.remove(builder); - each.remove(); - } - } - return (A)this; - } - - /** - * This method has been deprecated, please use method buildCurrentMetrics instead. - * @return The buildable object. - */ - @Deprecated - public List getCurrentMetrics() { - return currentMetrics != null ? build(currentMetrics) : null; - } - public List buildCurrentMetrics() { - return currentMetrics != null ? build(currentMetrics) : null; - } - public V2MetricStatus buildCurrentMetric(int index) { - return this.currentMetrics.get(index).build(); - } - public V2MetricStatus buildFirstCurrentMetric() { - return this.currentMetrics.get(0).build(); - } - public V2MetricStatus buildLastCurrentMetric() { - return this.currentMetrics.get(currentMetrics.size() - 1).build(); - } - public V2MetricStatus buildMatchingCurrentMetric(Predicate predicate) { - for (V2MetricStatusBuilder item: currentMetrics) { if(predicate.test(item)){ return item.build();} } return null; - } - public Boolean hasMatchingCurrentMetric(Predicate predicate) { - for (V2MetricStatusBuilder item: currentMetrics) { if(predicate.test(item)){ return true;} } return false; - } - public A withCurrentMetrics(List currentMetrics) { - if (this.currentMetrics != null) { _visitables.get("currentMetrics").clear();} - if (currentMetrics != null) {this.currentMetrics = new ArrayList(); for (V2MetricStatus item : currentMetrics){this.addToCurrentMetrics(item);}} else { this.currentMetrics = null;} return (A) this; - } - public A withCurrentMetrics(io.kubernetes.client.openapi.models.V2MetricStatus... currentMetrics) { - if (this.currentMetrics != null) {this.currentMetrics.clear(); _visitables.remove("currentMetrics"); } - if (currentMetrics != null) {for (V2MetricStatus item :currentMetrics){ this.addToCurrentMetrics(item);}} return (A) this; - } - public Boolean hasCurrentMetrics() { - return currentMetrics != null && !currentMetrics.isEmpty(); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNested addNewCurrentMetric() { - return new V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNestedImpl(); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNested addNewCurrentMetricLike(V2MetricStatus item) { - return new V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNestedImpl(-1, item); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNested setNewCurrentMetricLike(int index,V2MetricStatus item) { - return new V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNestedImpl(index, item); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNested editCurrentMetric(int index) { - if (currentMetrics.size() <= index) throw new RuntimeException("Can't edit currentMetrics. Index exceeds size."); - return setNewCurrentMetricLike(index, buildCurrentMetric(index)); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNested editFirstCurrentMetric() { - if (currentMetrics.size() == 0) throw new RuntimeException("Can't edit first currentMetrics. The list is empty."); - return setNewCurrentMetricLike(0, buildCurrentMetric(0)); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNested editLastCurrentMetric() { - int index = currentMetrics.size() - 1; - if (index < 0) throw new RuntimeException("Can't edit last currentMetrics. The list is empty."); - return setNewCurrentMetricLike(index, buildCurrentMetric(index)); - } - public V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNested editMatchingCurrentMetric(Predicate predicate) { - int index = -1; - for (int i=0;i extends V2HorizontalPodAutoscalerConditionFluentImpl> implements V2HorizontalPodAutoscalerStatusFluentImpl.ConditionsNested,Nested{ - ConditionsNestedImpl(int index,V2HorizontalPodAutoscalerCondition item) { - this.index = index; - this.builder = new V2HorizontalPodAutoscalerConditionBuilder(this, item); - } - ConditionsNestedImpl() { - this.index = -1; - this.builder = new V2HorizontalPodAutoscalerConditionBuilder(this); - } - V2HorizontalPodAutoscalerConditionBuilder builder; - int index; - public N and() { - return (N) V2HorizontalPodAutoscalerStatusFluentImpl.this.setToConditions(index,builder.build()); - } - public N endCondition() { - return and(); - } - - } - class CurrentMetricsNestedImpl extends V2MetricStatusFluentImpl> implements V2HorizontalPodAutoscalerStatusFluentImpl.CurrentMetricsNested,Nested{ - CurrentMetricsNestedImpl(int index,V2MetricStatus item) { - this.index = index; - this.builder = new V2MetricStatusBuilder(this, item); - } - CurrentMetricsNestedImpl() { - this.index = -1; - this.builder = new V2MetricStatusBuilder(this); - } - V2MetricStatusBuilder builder; - int index; - public N and() { - return (N) V2HorizontalPodAutoscalerStatusFluentImpl.this.setToCurrentMetrics(index,builder.build()); - } - public N endCurrentMetric() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierBuilder.java index c9760bb332..b1753330f0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2MetricIdentifierBuilder extends V2MetricIdentifierFluentImpl implements VisitableBuilder{ +public class V2MetricIdentifierBuilder extends V2MetricIdentifierFluent implements VisitableBuilder{ public V2MetricIdentifierBuilder() { - this(false); - } - public V2MetricIdentifierBuilder(Boolean validationEnabled) { - this(new V2MetricIdentifier(), validationEnabled); + this(new V2MetricIdentifier()); } + public V2MetricIdentifierBuilder(V2MetricIdentifierFluent fluent) { - this(fluent, false); - } - public V2MetricIdentifierBuilder(V2MetricIdentifierFluent fluent,Boolean validationEnabled) { - this(fluent, new V2MetricIdentifier(), validationEnabled); + this(fluent, new V2MetricIdentifier()); } + public V2MetricIdentifierBuilder(V2MetricIdentifierFluent fluent,V2MetricIdentifier instance) { - this(fluent, instance, false); - } - public V2MetricIdentifierBuilder(V2MetricIdentifierFluent fluent,V2MetricIdentifier instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withSelector(instance.getSelector()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2MetricIdentifierBuilder(V2MetricIdentifier instance) { - this(instance,false); - } - public V2MetricIdentifierBuilder(V2MetricIdentifier instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withSelector(instance.getSelector()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2MetricIdentifierFluent fluent; - Boolean validationEnabled; + public V2MetricIdentifier build() { V2MetricIdentifier buildable = new V2MetricIdentifier(); buildable.setName(fluent.getName()); - buildable.setSelector(fluent.getSelector()); + buildable.setSelector(fluent.buildSelector()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierFluent.java index 02f0d75bea..169195219c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2MetricIdentifierFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector(); - public V1LabelSelector buildSelector(); - public A withSelector(V1LabelSelector selector); - public Boolean hasSelector(); - public V2MetricIdentifierFluent.SelectorNested withNewSelector(); - public V2MetricIdentifierFluent.SelectorNested withNewSelectorLike(V1LabelSelector item); - public V2MetricIdentifierFluent.SelectorNested editSelector(); - public V2MetricIdentifierFluent.SelectorNested editOrNewSelector(); - public V2MetricIdentifierFluent.SelectorNested editOrNewSelectorLike(V1LabelSelector item); - public interface SelectorNested extends Nested,V1LabelSelectorFluent>{ - public N and(); - public N endSelector(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2MetricIdentifierFluent> extends BaseFluent{ + public V2MetricIdentifierFluent() { + } + + public V2MetricIdentifierFluent(V2MetricIdentifier instance) { + this.copyInstance(instance); + } + private String name; + private V1LabelSelectorBuilder selector; + + protected void copyInstance(V2MetricIdentifier instance) { + instance = (instance != null ? instance : new V2MetricIdentifier()); + if (instance != null) { + this.withName(instance.getName()); + this.withSelector(instance.getSelector()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public V1LabelSelector buildSelector() { + return this.selector != null ? this.selector.build() : null; + } + + public A withSelector(V1LabelSelector selector) { + this._visitables.remove("selector"); + if (selector != null) { + this.selector = new V1LabelSelectorBuilder(selector); + this._visitables.get("selector").add(this.selector); + } else { + this.selector = null; + this._visitables.get("selector").remove(this.selector); + } + return (A) this; + } + + public boolean hasSelector() { + return this.selector != null; + } + + public SelectorNested withNewSelector() { + return new SelectorNested(null); } + public SelectorNested withNewSelectorLike(V1LabelSelector item) { + return new SelectorNested(item); + } + + public SelectorNested editSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(null)); + } + + public SelectorNested editOrNewSelector() { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(new V1LabelSelectorBuilder().build())); + } + + public SelectorNested editOrNewSelectorLike(V1LabelSelector item) { + return withNewSelectorLike(java.util.Optional.ofNullable(buildSelector()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2MetricIdentifierFluent that = (V2MetricIdentifierFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(selector, that.selector)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, selector, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (selector != null) { sb.append("selector:"); sb.append(selector); } + sb.append("}"); + return sb.toString(); + } + public class SelectorNested extends V1LabelSelectorFluent> implements Nested{ + SelectorNested(V1LabelSelector item) { + this.builder = new V1LabelSelectorBuilder(this, item); + } + V1LabelSelectorBuilder builder; + + public N and() { + return (N) V2MetricIdentifierFluent.this.withSelector(builder.build()); + } + + public N endSelector() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierFluentImpl.java deleted file mode 100644 index bc3d14d13b..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricIdentifierFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2MetricIdentifierFluentImpl> extends BaseFluent implements V2MetricIdentifierFluent{ - public V2MetricIdentifierFluentImpl() { - } - public V2MetricIdentifierFluentImpl(V2MetricIdentifier instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withSelector(instance.getSelector()); - } - } - private String name; - private V1LabelSelectorBuilder selector; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - - /** - * This method has been deprecated, please use method buildSelector instead. - * @return The buildable object. - */ - @Deprecated - public V1LabelSelector getSelector() { - return this.selector!=null ?this.selector.build():null; - } - public V1LabelSelector buildSelector() { - return this.selector!=null ?this.selector.build():null; - } - public A withSelector(V1LabelSelector selector) { - _visitables.get("selector").remove(this.selector); - if (selector!=null){ this.selector= new V1LabelSelectorBuilder(selector); _visitables.get("selector").add(this.selector);} else { this.selector = null; _visitables.get("selector").remove(this.selector); } return (A) this; - } - public Boolean hasSelector() { - return this.selector != null; - } - public V2MetricIdentifierFluentImpl.SelectorNested withNewSelector() { - return new V2MetricIdentifierFluentImpl.SelectorNestedImpl(); - } - public V2MetricIdentifierFluentImpl.SelectorNested withNewSelectorLike(V1LabelSelector item) { - return new V2MetricIdentifierFluentImpl.SelectorNestedImpl(item); - } - public V2MetricIdentifierFluentImpl.SelectorNested editSelector() { - return withNewSelectorLike(getSelector()); - } - public V2MetricIdentifierFluentImpl.SelectorNested editOrNewSelector() { - return withNewSelectorLike(getSelector() != null ? getSelector(): new V1LabelSelectorBuilder().build()); - } - public V2MetricIdentifierFluentImpl.SelectorNested editOrNewSelectorLike(V1LabelSelector item) { - return withNewSelectorLike(getSelector() != null ? getSelector(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2MetricIdentifierFluentImpl that = (V2MetricIdentifierFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(selector, that.selector)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, selector, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (selector != null) { sb.append("selector:"); sb.append(selector); } - sb.append("}"); - return sb.toString(); - } - class SelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V2MetricIdentifierFluentImpl.SelectorNested,Nested{ - SelectorNestedImpl(V1LabelSelector item) { - this.builder = new V1LabelSelectorBuilder(this, item); - } - SelectorNestedImpl() { - this.builder = new V1LabelSelectorBuilder(this); - } - V1LabelSelectorBuilder builder; - public N and() { - return (N) V2MetricIdentifierFluentImpl.this.withSelector(builder.build()); - } - public N endSelector() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecBuilder.java index 0531fd458c..66dbf40191 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2MetricSpecBuilder extends V2MetricSpecFluentImpl implements VisitableBuilder{ +public class V2MetricSpecBuilder extends V2MetricSpecFluent implements VisitableBuilder{ public V2MetricSpecBuilder() { - this(false); - } - public V2MetricSpecBuilder(Boolean validationEnabled) { - this(new V2MetricSpec(), validationEnabled); + this(new V2MetricSpec()); } + public V2MetricSpecBuilder(V2MetricSpecFluent fluent) { - this(fluent, false); - } - public V2MetricSpecBuilder(V2MetricSpecFluent fluent,Boolean validationEnabled) { - this(fluent, new V2MetricSpec(), validationEnabled); + this(fluent, new V2MetricSpec()); } + public V2MetricSpecBuilder(V2MetricSpecFluent fluent,V2MetricSpec instance) { - this(fluent, instance, false); - } - public V2MetricSpecBuilder(V2MetricSpecFluent fluent,V2MetricSpec instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withContainerResource(instance.getContainerResource()); - fluent.withExternal(instance.getExternal()); - fluent.withObject(instance.getObject()); - fluent.withPods(instance.getPods()); - fluent.withResource(instance.getResource()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2MetricSpecBuilder(V2MetricSpec instance) { - this(instance,false); - } - public V2MetricSpecBuilder(V2MetricSpec instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withContainerResource(instance.getContainerResource()); - this.withExternal(instance.getExternal()); - this.withObject(instance.getObject()); - this.withPods(instance.getPods()); - this.withResource(instance.getResource()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2MetricSpecFluent fluent; - Boolean validationEnabled; + public V2MetricSpec build() { V2MetricSpec buildable = new V2MetricSpec(); - buildable.setContainerResource(fluent.getContainerResource()); - buildable.setExternal(fluent.getExternal()); - buildable.setObject(fluent.getObject()); - buildable.setPods(fluent.getPods()); - buildable.setResource(fluent.getResource()); + buildable.setContainerResource(fluent.buildContainerResource()); + buildable.setExternal(fluent.buildExternal()); + buildable.setObject(fluent.buildObject()); + buildable.setPods(fluent.buildPods()); + buildable.setResource(fluent.buildResource()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecFluent.java index 3ce71c146c..13cc598ba3 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecFluent.java @@ -1,118 +1,363 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2MetricSpecFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildContainerResource instead. - * @return The buildable object. - */ - @Deprecated - public V2ContainerResourceMetricSource getContainerResource(); - public V2ContainerResourceMetricSource buildContainerResource(); - public A withContainerResource(V2ContainerResourceMetricSource containerResource); - public Boolean hasContainerResource(); - public V2MetricSpecFluent.ContainerResourceNested withNewContainerResource(); - public V2MetricSpecFluent.ContainerResourceNested withNewContainerResourceLike(V2ContainerResourceMetricSource item); - public V2MetricSpecFluent.ContainerResourceNested editContainerResource(); - public V2MetricSpecFluent.ContainerResourceNested editOrNewContainerResource(); - public V2MetricSpecFluent.ContainerResourceNested editOrNewContainerResourceLike(V2ContainerResourceMetricSource item); - - /** - * This method has been deprecated, please use method buildExternal instead. - * @return The buildable object. - */ - @Deprecated - public V2ExternalMetricSource getExternal(); - public V2ExternalMetricSource buildExternal(); - public A withExternal(V2ExternalMetricSource external); - public Boolean hasExternal(); - public V2MetricSpecFluent.ExternalNested withNewExternal(); - public V2MetricSpecFluent.ExternalNested withNewExternalLike(V2ExternalMetricSource item); - public V2MetricSpecFluent.ExternalNested editExternal(); - public V2MetricSpecFluent.ExternalNested editOrNewExternal(); - public V2MetricSpecFluent.ExternalNested editOrNewExternalLike(V2ExternalMetricSource item); - - /** - * This method has been deprecated, please use method buildObject instead. - * @return The buildable object. - */ - @Deprecated - public V2ObjectMetricSource getObject(); - public V2ObjectMetricSource buildObject(); - public A withObject(V2ObjectMetricSource _object); - public Boolean hasObject(); - public V2MetricSpecFluent.ObjectNested withNewObject(); - public V2MetricSpecFluent.ObjectNested withNewObjectLike(V2ObjectMetricSource item); - public V2MetricSpecFluent.ObjectNested editObject(); - public V2MetricSpecFluent.ObjectNested editOrNewObject(); - public V2MetricSpecFluent.ObjectNested editOrNewObjectLike(V2ObjectMetricSource item); - - /** - * This method has been deprecated, please use method buildPods instead. - * @return The buildable object. - */ - @Deprecated - public V2PodsMetricSource getPods(); - public V2PodsMetricSource buildPods(); - public A withPods(V2PodsMetricSource pods); - public Boolean hasPods(); - public V2MetricSpecFluent.PodsNested withNewPods(); - public V2MetricSpecFluent.PodsNested withNewPodsLike(V2PodsMetricSource item); - public V2MetricSpecFluent.PodsNested editPods(); - public V2MetricSpecFluent.PodsNested editOrNewPods(); - public V2MetricSpecFluent.PodsNested editOrNewPodsLike(V2PodsMetricSource item); - - /** - * This method has been deprecated, please use method buildResource instead. - * @return The buildable object. - */ - @Deprecated - public V2ResourceMetricSource getResource(); - public V2ResourceMetricSource buildResource(); - public A withResource(V2ResourceMetricSource resource); - public Boolean hasResource(); - public V2MetricSpecFluent.ResourceNested withNewResource(); - public V2MetricSpecFluent.ResourceNested withNewResourceLike(V2ResourceMetricSource item); - public V2MetricSpecFluent.ResourceNested editResource(); - public V2MetricSpecFluent.ResourceNested editOrNewResource(); - public V2MetricSpecFluent.ResourceNested editOrNewResourceLike(V2ResourceMetricSource item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface ContainerResourceNested extends Nested,V2ContainerResourceMetricSourceFluent>{ - public N and(); - public N endContainerResource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2MetricSpecFluent> extends BaseFluent{ + public V2MetricSpecFluent() { + } + + public V2MetricSpecFluent(V2MetricSpec instance) { + this.copyInstance(instance); + } + private V2ContainerResourceMetricSourceBuilder containerResource; + private V2ExternalMetricSourceBuilder external; + private V2ObjectMetricSourceBuilder _object; + private V2PodsMetricSourceBuilder pods; + private V2ResourceMetricSourceBuilder resource; + private String type; + + protected void copyInstance(V2MetricSpec instance) { + instance = (instance != null ? instance : new V2MetricSpec()); + if (instance != null) { + this.withContainerResource(instance.getContainerResource()); + this.withExternal(instance.getExternal()); + this.withObject(instance.getObject()); + this.withPods(instance.getPods()); + this.withResource(instance.getResource()); + this.withType(instance.getType()); + } + } + + public V2ContainerResourceMetricSource buildContainerResource() { + return this.containerResource != null ? this.containerResource.build() : null; + } + + public A withContainerResource(V2ContainerResourceMetricSource containerResource) { + this._visitables.remove("containerResource"); + if (containerResource != null) { + this.containerResource = new V2ContainerResourceMetricSourceBuilder(containerResource); + this._visitables.get("containerResource").add(this.containerResource); + } else { + this.containerResource = null; + this._visitables.get("containerResource").remove(this.containerResource); + } + return (A) this; + } + + public boolean hasContainerResource() { + return this.containerResource != null; + } + + public ContainerResourceNested withNewContainerResource() { + return new ContainerResourceNested(null); + } + + public ContainerResourceNested withNewContainerResourceLike(V2ContainerResourceMetricSource item) { + return new ContainerResourceNested(item); + } + + public ContainerResourceNested editContainerResource() { + return withNewContainerResourceLike(java.util.Optional.ofNullable(buildContainerResource()).orElse(null)); + } + + public ContainerResourceNested editOrNewContainerResource() { + return withNewContainerResourceLike(java.util.Optional.ofNullable(buildContainerResource()).orElse(new V2ContainerResourceMetricSourceBuilder().build())); + } + + public ContainerResourceNested editOrNewContainerResourceLike(V2ContainerResourceMetricSource item) { + return withNewContainerResourceLike(java.util.Optional.ofNullable(buildContainerResource()).orElse(item)); + } + + public V2ExternalMetricSource buildExternal() { + return this.external != null ? this.external.build() : null; + } + + public A withExternal(V2ExternalMetricSource external) { + this._visitables.remove("external"); + if (external != null) { + this.external = new V2ExternalMetricSourceBuilder(external); + this._visitables.get("external").add(this.external); + } else { + this.external = null; + this._visitables.get("external").remove(this.external); + } + return (A) this; + } + + public boolean hasExternal() { + return this.external != null; + } + + public ExternalNested withNewExternal() { + return new ExternalNested(null); + } + + public ExternalNested withNewExternalLike(V2ExternalMetricSource item) { + return new ExternalNested(item); + } + + public ExternalNested editExternal() { + return withNewExternalLike(java.util.Optional.ofNullable(buildExternal()).orElse(null)); + } + + public ExternalNested editOrNewExternal() { + return withNewExternalLike(java.util.Optional.ofNullable(buildExternal()).orElse(new V2ExternalMetricSourceBuilder().build())); + } + + public ExternalNested editOrNewExternalLike(V2ExternalMetricSource item) { + return withNewExternalLike(java.util.Optional.ofNullable(buildExternal()).orElse(item)); + } + + public V2ObjectMetricSource buildObject() { + return this._object != null ? this._object.build() : null; + } + + public A withObject(V2ObjectMetricSource _object) { + this._visitables.remove("_object"); + if (_object != null) { + this._object = new V2ObjectMetricSourceBuilder(_object); + this._visitables.get("_object").add(this._object); + } else { + this._object = null; + this._visitables.get("_object").remove(this._object); + } + return (A) this; + } + + public boolean hasObject() { + return this._object != null; + } + + public ObjectNested withNewObject() { + return new ObjectNested(null); + } + + public ObjectNested withNewObjectLike(V2ObjectMetricSource item) { + return new ObjectNested(item); + } + + public ObjectNested editObject() { + return withNewObjectLike(java.util.Optional.ofNullable(buildObject()).orElse(null)); + } + + public ObjectNested editOrNewObject() { + return withNewObjectLike(java.util.Optional.ofNullable(buildObject()).orElse(new V2ObjectMetricSourceBuilder().build())); + } + + public ObjectNested editOrNewObjectLike(V2ObjectMetricSource item) { + return withNewObjectLike(java.util.Optional.ofNullable(buildObject()).orElse(item)); + } + + public V2PodsMetricSource buildPods() { + return this.pods != null ? this.pods.build() : null; + } + + public A withPods(V2PodsMetricSource pods) { + this._visitables.remove("pods"); + if (pods != null) { + this.pods = new V2PodsMetricSourceBuilder(pods); + this._visitables.get("pods").add(this.pods); + } else { + this.pods = null; + this._visitables.get("pods").remove(this.pods); + } + return (A) this; } - public interface ExternalNested extends Nested,V2ExternalMetricSourceFluent>{ - public N and(); - public N endExternal(); + + public boolean hasPods() { + return this.pods != null; + } + + public PodsNested withNewPods() { + return new PodsNested(null); + } + + public PodsNested withNewPodsLike(V2PodsMetricSource item) { + return new PodsNested(item); + } + + public PodsNested editPods() { + return withNewPodsLike(java.util.Optional.ofNullable(buildPods()).orElse(null)); + } + + public PodsNested editOrNewPods() { + return withNewPodsLike(java.util.Optional.ofNullable(buildPods()).orElse(new V2PodsMetricSourceBuilder().build())); + } + + public PodsNested editOrNewPodsLike(V2PodsMetricSource item) { + return withNewPodsLike(java.util.Optional.ofNullable(buildPods()).orElse(item)); + } + + public V2ResourceMetricSource buildResource() { + return this.resource != null ? this.resource.build() : null; + } + + public A withResource(V2ResourceMetricSource resource) { + this._visitables.remove("resource"); + if (resource != null) { + this.resource = new V2ResourceMetricSourceBuilder(resource); + this._visitables.get("resource").add(this.resource); + } else { + this.resource = null; + this._visitables.get("resource").remove(this.resource); + } + return (A) this; + } + + public boolean hasResource() { + return this.resource != null; + } + + public ResourceNested withNewResource() { + return new ResourceNested(null); + } + + public ResourceNested withNewResourceLike(V2ResourceMetricSource item) { + return new ResourceNested(item); + } + + public ResourceNested editResource() { + return withNewResourceLike(java.util.Optional.ofNullable(buildResource()).orElse(null)); + } + + public ResourceNested editOrNewResource() { + return withNewResourceLike(java.util.Optional.ofNullable(buildResource()).orElse(new V2ResourceMetricSourceBuilder().build())); + } + + public ResourceNested editOrNewResourceLike(V2ResourceMetricSource item) { + return withNewResourceLike(java.util.Optional.ofNullable(buildResource()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2MetricSpecFluent that = (V2MetricSpecFluent) o; + if (!java.util.Objects.equals(containerResource, that.containerResource)) return false; + if (!java.util.Objects.equals(external, that.external)) return false; + if (!java.util.Objects.equals(_object, that._object)) return false; + if (!java.util.Objects.equals(pods, that.pods)) return false; + if (!java.util.Objects.equals(resource, that.resource)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(containerResource, external, _object, pods, resource, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (containerResource != null) { sb.append("containerResource:"); sb.append(containerResource + ","); } + if (external != null) { sb.append("external:"); sb.append(external + ","); } + if (_object != null) { sb.append("_object:"); sb.append(_object + ","); } + if (pods != null) { sb.append("pods:"); sb.append(pods + ","); } + if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class ContainerResourceNested extends V2ContainerResourceMetricSourceFluent> implements Nested{ + ContainerResourceNested(V2ContainerResourceMetricSource item) { + this.builder = new V2ContainerResourceMetricSourceBuilder(this, item); + } + V2ContainerResourceMetricSourceBuilder builder; + public N and() { + return (N) V2MetricSpecFluent.this.withContainerResource(builder.build()); + } + + public N endContainerResource() { + return and(); + } + + } - public interface ObjectNested extends Nested,V2ObjectMetricSourceFluent>{ - public N and(); - public N endObject(); + public class ExternalNested extends V2ExternalMetricSourceFluent> implements Nested{ + ExternalNested(V2ExternalMetricSource item) { + this.builder = new V2ExternalMetricSourceBuilder(this, item); + } + V2ExternalMetricSourceBuilder builder; + public N and() { + return (N) V2MetricSpecFluent.this.withExternal(builder.build()); + } + + public N endExternal() { + return and(); + } + + } - public interface PodsNested extends Nested,V2PodsMetricSourceFluent>{ - public N and(); - public N endPods(); + public class ObjectNested extends V2ObjectMetricSourceFluent> implements Nested{ + ObjectNested(V2ObjectMetricSource item) { + this.builder = new V2ObjectMetricSourceBuilder(this, item); + } + V2ObjectMetricSourceBuilder builder; + + public N and() { + return (N) V2MetricSpecFluent.this.withObject(builder.build()); + } + public N endObject() { + return and(); + } + + } - public interface ResourceNested extends Nested,V2ResourceMetricSourceFluent>{ - public N and(); - public N endResource(); + public class PodsNested extends V2PodsMetricSourceFluent> implements Nested{ + PodsNested(V2PodsMetricSource item) { + this.builder = new V2PodsMetricSourceBuilder(this, item); + } + V2PodsMetricSourceBuilder builder; + + public N and() { + return (N) V2MetricSpecFluent.this.withPods(builder.build()); + } + public N endPods() { + return and(); + } + + } + public class ResourceNested extends V2ResourceMetricSourceFluent> implements Nested{ + ResourceNested(V2ResourceMetricSource item) { + this.builder = new V2ResourceMetricSourceBuilder(this, item); + } + V2ResourceMetricSourceBuilder builder; + + public N and() { + return (N) V2MetricSpecFluent.this.withResource(builder.build()); + } + + public N endResource() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecFluentImpl.java deleted file mode 100644 index ff5c84d625..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricSpecFluentImpl.java +++ /dev/null @@ -1,328 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2MetricSpecFluentImpl> extends BaseFluent implements V2MetricSpecFluent{ - public V2MetricSpecFluentImpl() { - } - public V2MetricSpecFluentImpl(V2MetricSpec instance) { - if (instance != null) { - this.withContainerResource(instance.getContainerResource()); - this.withExternal(instance.getExternal()); - this.withObject(instance.getObject()); - this.withPods(instance.getPods()); - this.withResource(instance.getResource()); - this.withType(instance.getType()); - } - } - private V2ContainerResourceMetricSourceBuilder containerResource; - private V2ExternalMetricSourceBuilder external; - private V2ObjectMetricSourceBuilder _object; - private V2PodsMetricSourceBuilder pods; - private V2ResourceMetricSourceBuilder resource; - private String type; - - /** - * This method has been deprecated, please use method buildContainerResource instead. - * @return The buildable object. - */ - @Deprecated - public V2ContainerResourceMetricSource getContainerResource() { - return this.containerResource!=null ?this.containerResource.build():null; - } - public V2ContainerResourceMetricSource buildContainerResource() { - return this.containerResource!=null ?this.containerResource.build():null; - } - public A withContainerResource(V2ContainerResourceMetricSource containerResource) { - _visitables.get("containerResource").remove(this.containerResource); - if (containerResource!=null){ this.containerResource= new V2ContainerResourceMetricSourceBuilder(containerResource); _visitables.get("containerResource").add(this.containerResource);} else { this.containerResource = null; _visitables.get("containerResource").remove(this.containerResource); } return (A) this; - } - public Boolean hasContainerResource() { - return this.containerResource != null; - } - public V2MetricSpecFluentImpl.ContainerResourceNested withNewContainerResource() { - return new V2MetricSpecFluentImpl.ContainerResourceNestedImpl(); - } - public V2MetricSpecFluentImpl.ContainerResourceNested withNewContainerResourceLike(V2ContainerResourceMetricSource item) { - return new V2MetricSpecFluentImpl.ContainerResourceNestedImpl(item); - } - public V2MetricSpecFluentImpl.ContainerResourceNested editContainerResource() { - return withNewContainerResourceLike(getContainerResource()); - } - public V2MetricSpecFluentImpl.ContainerResourceNested editOrNewContainerResource() { - return withNewContainerResourceLike(getContainerResource() != null ? getContainerResource(): new V2ContainerResourceMetricSourceBuilder().build()); - } - public V2MetricSpecFluentImpl.ContainerResourceNested editOrNewContainerResourceLike(V2ContainerResourceMetricSource item) { - return withNewContainerResourceLike(getContainerResource() != null ? getContainerResource(): item); - } - - /** - * This method has been deprecated, please use method buildExternal instead. - * @return The buildable object. - */ - @Deprecated - public V2ExternalMetricSource getExternal() { - return this.external!=null ?this.external.build():null; - } - public V2ExternalMetricSource buildExternal() { - return this.external!=null ?this.external.build():null; - } - public A withExternal(V2ExternalMetricSource external) { - _visitables.get("external").remove(this.external); - if (external!=null){ this.external= new V2ExternalMetricSourceBuilder(external); _visitables.get("external").add(this.external);} else { this.external = null; _visitables.get("external").remove(this.external); } return (A) this; - } - public Boolean hasExternal() { - return this.external != null; - } - public V2MetricSpecFluentImpl.ExternalNested withNewExternal() { - return new V2MetricSpecFluentImpl.ExternalNestedImpl(); - } - public V2MetricSpecFluentImpl.ExternalNested withNewExternalLike(V2ExternalMetricSource item) { - return new V2MetricSpecFluentImpl.ExternalNestedImpl(item); - } - public V2MetricSpecFluentImpl.ExternalNested editExternal() { - return withNewExternalLike(getExternal()); - } - public V2MetricSpecFluentImpl.ExternalNested editOrNewExternal() { - return withNewExternalLike(getExternal() != null ? getExternal(): new V2ExternalMetricSourceBuilder().build()); - } - public V2MetricSpecFluentImpl.ExternalNested editOrNewExternalLike(V2ExternalMetricSource item) { - return withNewExternalLike(getExternal() != null ? getExternal(): item); - } - - /** - * This method has been deprecated, please use method buildObject instead. - * @return The buildable object. - */ - @Deprecated - public V2ObjectMetricSource getObject() { - return this._object!=null ?this._object.build():null; - } - public V2ObjectMetricSource buildObject() { - return this._object!=null ?this._object.build():null; - } - public A withObject(V2ObjectMetricSource _object) { - _visitables.get("_object").remove(this._object); - if (_object!=null){ this._object= new V2ObjectMetricSourceBuilder(_object); _visitables.get("_object").add(this._object);} else { this._object = null; _visitables.get("_object").remove(this._object); } return (A) this; - } - public Boolean hasObject() { - return this._object != null; - } - public V2MetricSpecFluentImpl.ObjectNested withNewObject() { - return new V2MetricSpecFluentImpl.ObjectNestedImpl(); - } - public V2MetricSpecFluentImpl.ObjectNested withNewObjectLike(V2ObjectMetricSource item) { - return new V2MetricSpecFluentImpl.ObjectNestedImpl(item); - } - public V2MetricSpecFluentImpl.ObjectNested editObject() { - return withNewObjectLike(getObject()); - } - public V2MetricSpecFluentImpl.ObjectNested editOrNewObject() { - return withNewObjectLike(getObject() != null ? getObject(): new V2ObjectMetricSourceBuilder().build()); - } - public V2MetricSpecFluentImpl.ObjectNested editOrNewObjectLike(V2ObjectMetricSource item) { - return withNewObjectLike(getObject() != null ? getObject(): item); - } - - /** - * This method has been deprecated, please use method buildPods instead. - * @return The buildable object. - */ - @Deprecated - public V2PodsMetricSource getPods() { - return this.pods!=null ?this.pods.build():null; - } - public V2PodsMetricSource buildPods() { - return this.pods!=null ?this.pods.build():null; - } - public A withPods(V2PodsMetricSource pods) { - _visitables.get("pods").remove(this.pods); - if (pods!=null){ this.pods= new V2PodsMetricSourceBuilder(pods); _visitables.get("pods").add(this.pods);} else { this.pods = null; _visitables.get("pods").remove(this.pods); } return (A) this; - } - public Boolean hasPods() { - return this.pods != null; - } - public V2MetricSpecFluentImpl.PodsNested withNewPods() { - return new V2MetricSpecFluentImpl.PodsNestedImpl(); - } - public V2MetricSpecFluentImpl.PodsNested withNewPodsLike(V2PodsMetricSource item) { - return new V2MetricSpecFluentImpl.PodsNestedImpl(item); - } - public V2MetricSpecFluentImpl.PodsNested editPods() { - return withNewPodsLike(getPods()); - } - public V2MetricSpecFluentImpl.PodsNested editOrNewPods() { - return withNewPodsLike(getPods() != null ? getPods(): new V2PodsMetricSourceBuilder().build()); - } - public V2MetricSpecFluentImpl.PodsNested editOrNewPodsLike(V2PodsMetricSource item) { - return withNewPodsLike(getPods() != null ? getPods(): item); - } - - /** - * This method has been deprecated, please use method buildResource instead. - * @return The buildable object. - */ - @Deprecated - public V2ResourceMetricSource getResource() { - return this.resource!=null ?this.resource.build():null; - } - public V2ResourceMetricSource buildResource() { - return this.resource!=null ?this.resource.build():null; - } - public A withResource(V2ResourceMetricSource resource) { - _visitables.get("resource").remove(this.resource); - if (resource!=null){ this.resource= new V2ResourceMetricSourceBuilder(resource); _visitables.get("resource").add(this.resource);} else { this.resource = null; _visitables.get("resource").remove(this.resource); } return (A) this; - } - public Boolean hasResource() { - return this.resource != null; - } - public V2MetricSpecFluentImpl.ResourceNested withNewResource() { - return new V2MetricSpecFluentImpl.ResourceNestedImpl(); - } - public V2MetricSpecFluentImpl.ResourceNested withNewResourceLike(V2ResourceMetricSource item) { - return new V2MetricSpecFluentImpl.ResourceNestedImpl(item); - } - public V2MetricSpecFluentImpl.ResourceNested editResource() { - return withNewResourceLike(getResource()); - } - public V2MetricSpecFluentImpl.ResourceNested editOrNewResource() { - return withNewResourceLike(getResource() != null ? getResource(): new V2ResourceMetricSourceBuilder().build()); - } - public V2MetricSpecFluentImpl.ResourceNested editOrNewResourceLike(V2ResourceMetricSource item) { - return withNewResourceLike(getResource() != null ? getResource(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2MetricSpecFluentImpl that = (V2MetricSpecFluentImpl) o; - if (!java.util.Objects.equals(containerResource, that.containerResource)) return false; - - if (!java.util.Objects.equals(external, that.external)) return false; - - if (!java.util.Objects.equals(_object, that._object)) return false; - - if (!java.util.Objects.equals(pods, that.pods)) return false; - - if (!java.util.Objects.equals(resource, that.resource)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(containerResource, external, _object, pods, resource, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (containerResource != null) { sb.append("containerResource:"); sb.append(containerResource + ","); } - if (external != null) { sb.append("external:"); sb.append(external + ","); } - if (_object != null) { sb.append("_object:"); sb.append(_object + ","); } - if (pods != null) { sb.append("pods:"); sb.append(pods + ","); } - if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class ContainerResourceNestedImpl extends V2ContainerResourceMetricSourceFluentImpl> implements V2MetricSpecFluentImpl.ContainerResourceNested,Nested{ - ContainerResourceNestedImpl(V2ContainerResourceMetricSource item) { - this.builder = new V2ContainerResourceMetricSourceBuilder(this, item); - } - ContainerResourceNestedImpl() { - this.builder = new V2ContainerResourceMetricSourceBuilder(this); - } - V2ContainerResourceMetricSourceBuilder builder; - public N and() { - return (N) V2MetricSpecFluentImpl.this.withContainerResource(builder.build()); - } - public N endContainerResource() { - return and(); - } - - } - class ExternalNestedImpl extends V2ExternalMetricSourceFluentImpl> implements V2MetricSpecFluentImpl.ExternalNested,Nested{ - ExternalNestedImpl(V2ExternalMetricSource item) { - this.builder = new V2ExternalMetricSourceBuilder(this, item); - } - ExternalNestedImpl() { - this.builder = new V2ExternalMetricSourceBuilder(this); - } - V2ExternalMetricSourceBuilder builder; - public N and() { - return (N) V2MetricSpecFluentImpl.this.withExternal(builder.build()); - } - public N endExternal() { - return and(); - } - - } - class ObjectNestedImpl extends V2ObjectMetricSourceFluentImpl> implements V2MetricSpecFluentImpl.ObjectNested,Nested{ - ObjectNestedImpl(V2ObjectMetricSource item) { - this.builder = new V2ObjectMetricSourceBuilder(this, item); - } - ObjectNestedImpl() { - this.builder = new V2ObjectMetricSourceBuilder(this); - } - V2ObjectMetricSourceBuilder builder; - public N and() { - return (N) V2MetricSpecFluentImpl.this.withObject(builder.build()); - } - public N endObject() { - return and(); - } - - } - class PodsNestedImpl extends V2PodsMetricSourceFluentImpl> implements V2MetricSpecFluentImpl.PodsNested,Nested{ - PodsNestedImpl(V2PodsMetricSource item) { - this.builder = new V2PodsMetricSourceBuilder(this, item); - } - PodsNestedImpl() { - this.builder = new V2PodsMetricSourceBuilder(this); - } - V2PodsMetricSourceBuilder builder; - public N and() { - return (N) V2MetricSpecFluentImpl.this.withPods(builder.build()); - } - public N endPods() { - return and(); - } - - } - class ResourceNestedImpl extends V2ResourceMetricSourceFluentImpl> implements V2MetricSpecFluentImpl.ResourceNested,Nested{ - ResourceNestedImpl(V2ResourceMetricSource item) { - this.builder = new V2ResourceMetricSourceBuilder(this, item); - } - ResourceNestedImpl() { - this.builder = new V2ResourceMetricSourceBuilder(this); - } - V2ResourceMetricSourceBuilder builder; - public N and() { - return (N) V2MetricSpecFluentImpl.this.withResource(builder.build()); - } - public N endResource() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusBuilder.java index 21c2e11c79..53b73b229c 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusBuilder.java @@ -1,61 +1,36 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2MetricStatusBuilder extends V2MetricStatusFluentImpl implements VisitableBuilder{ +public class V2MetricStatusBuilder extends V2MetricStatusFluent implements VisitableBuilder{ public V2MetricStatusBuilder() { - this(false); - } - public V2MetricStatusBuilder(Boolean validationEnabled) { - this(new V2MetricStatus(), validationEnabled); + this(new V2MetricStatus()); } + public V2MetricStatusBuilder(V2MetricStatusFluent fluent) { - this(fluent, false); - } - public V2MetricStatusBuilder(V2MetricStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V2MetricStatus(), validationEnabled); + this(fluent, new V2MetricStatus()); } + public V2MetricStatusBuilder(V2MetricStatusFluent fluent,V2MetricStatus instance) { - this(fluent, instance, false); - } - public V2MetricStatusBuilder(V2MetricStatusFluent fluent,V2MetricStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withContainerResource(instance.getContainerResource()); - fluent.withExternal(instance.getExternal()); - fluent.withObject(instance.getObject()); - fluent.withPods(instance.getPods()); - fluent.withResource(instance.getResource()); - fluent.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2MetricStatusBuilder(V2MetricStatus instance) { - this(instance,false); - } - public V2MetricStatusBuilder(V2MetricStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withContainerResource(instance.getContainerResource()); - this.withExternal(instance.getExternal()); - this.withObject(instance.getObject()); - this.withPods(instance.getPods()); - this.withResource(instance.getResource()); - this.withType(instance.getType()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2MetricStatusFluent fluent; - Boolean validationEnabled; + public V2MetricStatus build() { V2MetricStatus buildable = new V2MetricStatus(); - buildable.setContainerResource(fluent.getContainerResource()); - buildable.setExternal(fluent.getExternal()); - buildable.setObject(fluent.getObject()); - buildable.setPods(fluent.getPods()); - buildable.setResource(fluent.getResource()); + buildable.setContainerResource(fluent.buildContainerResource()); + buildable.setExternal(fluent.buildExternal()); + buildable.setObject(fluent.buildObject()); + buildable.setPods(fluent.buildPods()); + buildable.setResource(fluent.buildResource()); buildable.setType(fluent.getType()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusFluent.java index f9bc9568cb..c51f29ae85 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusFluent.java @@ -1,118 +1,363 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; import java.lang.String; -import java.lang.Deprecated; -import java.lang.Boolean; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2MetricStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildContainerResource instead. - * @return The buildable object. - */ - @Deprecated - public V2ContainerResourceMetricStatus getContainerResource(); - public V2ContainerResourceMetricStatus buildContainerResource(); - public A withContainerResource(V2ContainerResourceMetricStatus containerResource); - public Boolean hasContainerResource(); - public V2MetricStatusFluent.ContainerResourceNested withNewContainerResource(); - public V2MetricStatusFluent.ContainerResourceNested withNewContainerResourceLike(V2ContainerResourceMetricStatus item); - public V2MetricStatusFluent.ContainerResourceNested editContainerResource(); - public V2MetricStatusFluent.ContainerResourceNested editOrNewContainerResource(); - public V2MetricStatusFluent.ContainerResourceNested editOrNewContainerResourceLike(V2ContainerResourceMetricStatus item); - - /** - * This method has been deprecated, please use method buildExternal instead. - * @return The buildable object. - */ - @Deprecated - public V2ExternalMetricStatus getExternal(); - public V2ExternalMetricStatus buildExternal(); - public A withExternal(V2ExternalMetricStatus external); - public Boolean hasExternal(); - public V2MetricStatusFluent.ExternalNested withNewExternal(); - public V2MetricStatusFluent.ExternalNested withNewExternalLike(V2ExternalMetricStatus item); - public V2MetricStatusFluent.ExternalNested editExternal(); - public V2MetricStatusFluent.ExternalNested editOrNewExternal(); - public V2MetricStatusFluent.ExternalNested editOrNewExternalLike(V2ExternalMetricStatus item); - - /** - * This method has been deprecated, please use method buildObject instead. - * @return The buildable object. - */ - @Deprecated - public V2ObjectMetricStatus getObject(); - public V2ObjectMetricStatus buildObject(); - public A withObject(V2ObjectMetricStatus _object); - public Boolean hasObject(); - public V2MetricStatusFluent.ObjectNested withNewObject(); - public V2MetricStatusFluent.ObjectNested withNewObjectLike(V2ObjectMetricStatus item); - public V2MetricStatusFluent.ObjectNested editObject(); - public V2MetricStatusFluent.ObjectNested editOrNewObject(); - public V2MetricStatusFluent.ObjectNested editOrNewObjectLike(V2ObjectMetricStatus item); - - /** - * This method has been deprecated, please use method buildPods instead. - * @return The buildable object. - */ - @Deprecated - public V2PodsMetricStatus getPods(); - public V2PodsMetricStatus buildPods(); - public A withPods(V2PodsMetricStatus pods); - public Boolean hasPods(); - public V2MetricStatusFluent.PodsNested withNewPods(); - public V2MetricStatusFluent.PodsNested withNewPodsLike(V2PodsMetricStatus item); - public V2MetricStatusFluent.PodsNested editPods(); - public V2MetricStatusFluent.PodsNested editOrNewPods(); - public V2MetricStatusFluent.PodsNested editOrNewPodsLike(V2PodsMetricStatus item); - - /** - * This method has been deprecated, please use method buildResource instead. - * @return The buildable object. - */ - @Deprecated - public V2ResourceMetricStatus getResource(); - public V2ResourceMetricStatus buildResource(); - public A withResource(V2ResourceMetricStatus resource); - public Boolean hasResource(); - public V2MetricStatusFluent.ResourceNested withNewResource(); - public V2MetricStatusFluent.ResourceNested withNewResourceLike(V2ResourceMetricStatus item); - public V2MetricStatusFluent.ResourceNested editResource(); - public V2MetricStatusFluent.ResourceNested editOrNewResource(); - public V2MetricStatusFluent.ResourceNested editOrNewResourceLike(V2ResourceMetricStatus item); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public interface ContainerResourceNested extends Nested,V2ContainerResourceMetricStatusFluent>{ - public N and(); - public N endContainerResource(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2MetricStatusFluent> extends BaseFluent{ + public V2MetricStatusFluent() { + } + + public V2MetricStatusFluent(V2MetricStatus instance) { + this.copyInstance(instance); + } + private V2ContainerResourceMetricStatusBuilder containerResource; + private V2ExternalMetricStatusBuilder external; + private V2ObjectMetricStatusBuilder _object; + private V2PodsMetricStatusBuilder pods; + private V2ResourceMetricStatusBuilder resource; + private String type; + + protected void copyInstance(V2MetricStatus instance) { + instance = (instance != null ? instance : new V2MetricStatus()); + if (instance != null) { + this.withContainerResource(instance.getContainerResource()); + this.withExternal(instance.getExternal()); + this.withObject(instance.getObject()); + this.withPods(instance.getPods()); + this.withResource(instance.getResource()); + this.withType(instance.getType()); + } + } + + public V2ContainerResourceMetricStatus buildContainerResource() { + return this.containerResource != null ? this.containerResource.build() : null; + } + + public A withContainerResource(V2ContainerResourceMetricStatus containerResource) { + this._visitables.remove("containerResource"); + if (containerResource != null) { + this.containerResource = new V2ContainerResourceMetricStatusBuilder(containerResource); + this._visitables.get("containerResource").add(this.containerResource); + } else { + this.containerResource = null; + this._visitables.get("containerResource").remove(this.containerResource); + } + return (A) this; + } + + public boolean hasContainerResource() { + return this.containerResource != null; + } + + public ContainerResourceNested withNewContainerResource() { + return new ContainerResourceNested(null); + } + + public ContainerResourceNested withNewContainerResourceLike(V2ContainerResourceMetricStatus item) { + return new ContainerResourceNested(item); + } + + public ContainerResourceNested editContainerResource() { + return withNewContainerResourceLike(java.util.Optional.ofNullable(buildContainerResource()).orElse(null)); + } + + public ContainerResourceNested editOrNewContainerResource() { + return withNewContainerResourceLike(java.util.Optional.ofNullable(buildContainerResource()).orElse(new V2ContainerResourceMetricStatusBuilder().build())); + } + + public ContainerResourceNested editOrNewContainerResourceLike(V2ContainerResourceMetricStatus item) { + return withNewContainerResourceLike(java.util.Optional.ofNullable(buildContainerResource()).orElse(item)); + } + + public V2ExternalMetricStatus buildExternal() { + return this.external != null ? this.external.build() : null; + } + + public A withExternal(V2ExternalMetricStatus external) { + this._visitables.remove("external"); + if (external != null) { + this.external = new V2ExternalMetricStatusBuilder(external); + this._visitables.get("external").add(this.external); + } else { + this.external = null; + this._visitables.get("external").remove(this.external); + } + return (A) this; + } + + public boolean hasExternal() { + return this.external != null; + } + + public ExternalNested withNewExternal() { + return new ExternalNested(null); + } + + public ExternalNested withNewExternalLike(V2ExternalMetricStatus item) { + return new ExternalNested(item); + } + + public ExternalNested editExternal() { + return withNewExternalLike(java.util.Optional.ofNullable(buildExternal()).orElse(null)); + } + + public ExternalNested editOrNewExternal() { + return withNewExternalLike(java.util.Optional.ofNullable(buildExternal()).orElse(new V2ExternalMetricStatusBuilder().build())); + } + + public ExternalNested editOrNewExternalLike(V2ExternalMetricStatus item) { + return withNewExternalLike(java.util.Optional.ofNullable(buildExternal()).orElse(item)); + } + + public V2ObjectMetricStatus buildObject() { + return this._object != null ? this._object.build() : null; + } + + public A withObject(V2ObjectMetricStatus _object) { + this._visitables.remove("_object"); + if (_object != null) { + this._object = new V2ObjectMetricStatusBuilder(_object); + this._visitables.get("_object").add(this._object); + } else { + this._object = null; + this._visitables.get("_object").remove(this._object); + } + return (A) this; + } + + public boolean hasObject() { + return this._object != null; + } + + public ObjectNested withNewObject() { + return new ObjectNested(null); + } + + public ObjectNested withNewObjectLike(V2ObjectMetricStatus item) { + return new ObjectNested(item); + } + + public ObjectNested editObject() { + return withNewObjectLike(java.util.Optional.ofNullable(buildObject()).orElse(null)); + } + + public ObjectNested editOrNewObject() { + return withNewObjectLike(java.util.Optional.ofNullable(buildObject()).orElse(new V2ObjectMetricStatusBuilder().build())); + } + + public ObjectNested editOrNewObjectLike(V2ObjectMetricStatus item) { + return withNewObjectLike(java.util.Optional.ofNullable(buildObject()).orElse(item)); + } + + public V2PodsMetricStatus buildPods() { + return this.pods != null ? this.pods.build() : null; + } + + public A withPods(V2PodsMetricStatus pods) { + this._visitables.remove("pods"); + if (pods != null) { + this.pods = new V2PodsMetricStatusBuilder(pods); + this._visitables.get("pods").add(this.pods); + } else { + this.pods = null; + this._visitables.get("pods").remove(this.pods); + } + return (A) this; } - public interface ExternalNested extends Nested,V2ExternalMetricStatusFluent>{ - public N and(); - public N endExternal(); + + public boolean hasPods() { + return this.pods != null; + } + + public PodsNested withNewPods() { + return new PodsNested(null); + } + + public PodsNested withNewPodsLike(V2PodsMetricStatus item) { + return new PodsNested(item); + } + + public PodsNested editPods() { + return withNewPodsLike(java.util.Optional.ofNullable(buildPods()).orElse(null)); + } + + public PodsNested editOrNewPods() { + return withNewPodsLike(java.util.Optional.ofNullable(buildPods()).orElse(new V2PodsMetricStatusBuilder().build())); + } + + public PodsNested editOrNewPodsLike(V2PodsMetricStatus item) { + return withNewPodsLike(java.util.Optional.ofNullable(buildPods()).orElse(item)); + } + + public V2ResourceMetricStatus buildResource() { + return this.resource != null ? this.resource.build() : null; + } + + public A withResource(V2ResourceMetricStatus resource) { + this._visitables.remove("resource"); + if (resource != null) { + this.resource = new V2ResourceMetricStatusBuilder(resource); + this._visitables.get("resource").add(this.resource); + } else { + this.resource = null; + this._visitables.get("resource").remove(this.resource); + } + return (A) this; + } + + public boolean hasResource() { + return this.resource != null; + } + + public ResourceNested withNewResource() { + return new ResourceNested(null); + } + + public ResourceNested withNewResourceLike(V2ResourceMetricStatus item) { + return new ResourceNested(item); + } + + public ResourceNested editResource() { + return withNewResourceLike(java.util.Optional.ofNullable(buildResource()).orElse(null)); + } + + public ResourceNested editOrNewResource() { + return withNewResourceLike(java.util.Optional.ofNullable(buildResource()).orElse(new V2ResourceMetricStatusBuilder().build())); + } + + public ResourceNested editOrNewResourceLike(V2ResourceMetricStatus item) { + return withNewResourceLike(java.util.Optional.ofNullable(buildResource()).orElse(item)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2MetricStatusFluent that = (V2MetricStatusFluent) o; + if (!java.util.Objects.equals(containerResource, that.containerResource)) return false; + if (!java.util.Objects.equals(external, that.external)) return false; + if (!java.util.Objects.equals(_object, that._object)) return false; + if (!java.util.Objects.equals(pods, that.pods)) return false; + if (!java.util.Objects.equals(resource, that.resource)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(containerResource, external, _object, pods, resource, type, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (containerResource != null) { sb.append("containerResource:"); sb.append(containerResource + ","); } + if (external != null) { sb.append("external:"); sb.append(external + ","); } + if (_object != null) { sb.append("_object:"); sb.append(_object + ","); } + if (pods != null) { sb.append("pods:"); sb.append(pods + ","); } + if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } + if (type != null) { sb.append("type:"); sb.append(type); } + sb.append("}"); + return sb.toString(); + } + public class ContainerResourceNested extends V2ContainerResourceMetricStatusFluent> implements Nested{ + ContainerResourceNested(V2ContainerResourceMetricStatus item) { + this.builder = new V2ContainerResourceMetricStatusBuilder(this, item); + } + V2ContainerResourceMetricStatusBuilder builder; + public N and() { + return (N) V2MetricStatusFluent.this.withContainerResource(builder.build()); + } + + public N endContainerResource() { + return and(); + } + + } - public interface ObjectNested extends Nested,V2ObjectMetricStatusFluent>{ - public N and(); - public N endObject(); + public class ExternalNested extends V2ExternalMetricStatusFluent> implements Nested{ + ExternalNested(V2ExternalMetricStatus item) { + this.builder = new V2ExternalMetricStatusBuilder(this, item); + } + V2ExternalMetricStatusBuilder builder; + public N and() { + return (N) V2MetricStatusFluent.this.withExternal(builder.build()); + } + + public N endExternal() { + return and(); + } + + } - public interface PodsNested extends Nested,V2PodsMetricStatusFluent>{ - public N and(); - public N endPods(); + public class ObjectNested extends V2ObjectMetricStatusFluent> implements Nested{ + ObjectNested(V2ObjectMetricStatus item) { + this.builder = new V2ObjectMetricStatusBuilder(this, item); + } + V2ObjectMetricStatusBuilder builder; + + public N and() { + return (N) V2MetricStatusFluent.this.withObject(builder.build()); + } + public N endObject() { + return and(); + } + + } - public interface ResourceNested extends Nested,V2ResourceMetricStatusFluent>{ - public N and(); - public N endResource(); + public class PodsNested extends V2PodsMetricStatusFluent> implements Nested{ + PodsNested(V2PodsMetricStatus item) { + this.builder = new V2PodsMetricStatusBuilder(this, item); + } + V2PodsMetricStatusBuilder builder; + + public N and() { + return (N) V2MetricStatusFluent.this.withPods(builder.build()); + } + public N endPods() { + return and(); + } + + } + public class ResourceNested extends V2ResourceMetricStatusFluent> implements Nested{ + ResourceNested(V2ResourceMetricStatus item) { + this.builder = new V2ResourceMetricStatusBuilder(this, item); + } + V2ResourceMetricStatusBuilder builder; + + public N and() { + return (N) V2MetricStatusFluent.this.withResource(builder.build()); + } + + public N endResource() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusFluentImpl.java deleted file mode 100644 index 41e4c44abf..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricStatusFluentImpl.java +++ /dev/null @@ -1,328 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2MetricStatusFluentImpl> extends BaseFluent implements V2MetricStatusFluent{ - public V2MetricStatusFluentImpl() { - } - public V2MetricStatusFluentImpl(V2MetricStatus instance) { - if (instance != null) { - this.withContainerResource(instance.getContainerResource()); - this.withExternal(instance.getExternal()); - this.withObject(instance.getObject()); - this.withPods(instance.getPods()); - this.withResource(instance.getResource()); - this.withType(instance.getType()); - } - } - private V2ContainerResourceMetricStatusBuilder containerResource; - private V2ExternalMetricStatusBuilder external; - private V2ObjectMetricStatusBuilder _object; - private V2PodsMetricStatusBuilder pods; - private V2ResourceMetricStatusBuilder resource; - private String type; - - /** - * This method has been deprecated, please use method buildContainerResource instead. - * @return The buildable object. - */ - @Deprecated - public V2ContainerResourceMetricStatus getContainerResource() { - return this.containerResource!=null ?this.containerResource.build():null; - } - public V2ContainerResourceMetricStatus buildContainerResource() { - return this.containerResource!=null ?this.containerResource.build():null; - } - public A withContainerResource(V2ContainerResourceMetricStatus containerResource) { - _visitables.get("containerResource").remove(this.containerResource); - if (containerResource!=null){ this.containerResource= new V2ContainerResourceMetricStatusBuilder(containerResource); _visitables.get("containerResource").add(this.containerResource);} else { this.containerResource = null; _visitables.get("containerResource").remove(this.containerResource); } return (A) this; - } - public Boolean hasContainerResource() { - return this.containerResource != null; - } - public V2MetricStatusFluentImpl.ContainerResourceNested withNewContainerResource() { - return new V2MetricStatusFluentImpl.ContainerResourceNestedImpl(); - } - public V2MetricStatusFluentImpl.ContainerResourceNested withNewContainerResourceLike(V2ContainerResourceMetricStatus item) { - return new V2MetricStatusFluentImpl.ContainerResourceNestedImpl(item); - } - public V2MetricStatusFluentImpl.ContainerResourceNested editContainerResource() { - return withNewContainerResourceLike(getContainerResource()); - } - public V2MetricStatusFluentImpl.ContainerResourceNested editOrNewContainerResource() { - return withNewContainerResourceLike(getContainerResource() != null ? getContainerResource(): new V2ContainerResourceMetricStatusBuilder().build()); - } - public V2MetricStatusFluentImpl.ContainerResourceNested editOrNewContainerResourceLike(V2ContainerResourceMetricStatus item) { - return withNewContainerResourceLike(getContainerResource() != null ? getContainerResource(): item); - } - - /** - * This method has been deprecated, please use method buildExternal instead. - * @return The buildable object. - */ - @Deprecated - public V2ExternalMetricStatus getExternal() { - return this.external!=null ?this.external.build():null; - } - public V2ExternalMetricStatus buildExternal() { - return this.external!=null ?this.external.build():null; - } - public A withExternal(V2ExternalMetricStatus external) { - _visitables.get("external").remove(this.external); - if (external!=null){ this.external= new V2ExternalMetricStatusBuilder(external); _visitables.get("external").add(this.external);} else { this.external = null; _visitables.get("external").remove(this.external); } return (A) this; - } - public Boolean hasExternal() { - return this.external != null; - } - public V2MetricStatusFluentImpl.ExternalNested withNewExternal() { - return new V2MetricStatusFluentImpl.ExternalNestedImpl(); - } - public V2MetricStatusFluentImpl.ExternalNested withNewExternalLike(V2ExternalMetricStatus item) { - return new V2MetricStatusFluentImpl.ExternalNestedImpl(item); - } - public V2MetricStatusFluentImpl.ExternalNested editExternal() { - return withNewExternalLike(getExternal()); - } - public V2MetricStatusFluentImpl.ExternalNested editOrNewExternal() { - return withNewExternalLike(getExternal() != null ? getExternal(): new V2ExternalMetricStatusBuilder().build()); - } - public V2MetricStatusFluentImpl.ExternalNested editOrNewExternalLike(V2ExternalMetricStatus item) { - return withNewExternalLike(getExternal() != null ? getExternal(): item); - } - - /** - * This method has been deprecated, please use method buildObject instead. - * @return The buildable object. - */ - @Deprecated - public V2ObjectMetricStatus getObject() { - return this._object!=null ?this._object.build():null; - } - public V2ObjectMetricStatus buildObject() { - return this._object!=null ?this._object.build():null; - } - public A withObject(V2ObjectMetricStatus _object) { - _visitables.get("_object").remove(this._object); - if (_object!=null){ this._object= new V2ObjectMetricStatusBuilder(_object); _visitables.get("_object").add(this._object);} else { this._object = null; _visitables.get("_object").remove(this._object); } return (A) this; - } - public Boolean hasObject() { - return this._object != null; - } - public V2MetricStatusFluentImpl.ObjectNested withNewObject() { - return new V2MetricStatusFluentImpl.ObjectNestedImpl(); - } - public V2MetricStatusFluentImpl.ObjectNested withNewObjectLike(V2ObjectMetricStatus item) { - return new V2MetricStatusFluentImpl.ObjectNestedImpl(item); - } - public V2MetricStatusFluentImpl.ObjectNested editObject() { - return withNewObjectLike(getObject()); - } - public V2MetricStatusFluentImpl.ObjectNested editOrNewObject() { - return withNewObjectLike(getObject() != null ? getObject(): new V2ObjectMetricStatusBuilder().build()); - } - public V2MetricStatusFluentImpl.ObjectNested editOrNewObjectLike(V2ObjectMetricStatus item) { - return withNewObjectLike(getObject() != null ? getObject(): item); - } - - /** - * This method has been deprecated, please use method buildPods instead. - * @return The buildable object. - */ - @Deprecated - public V2PodsMetricStatus getPods() { - return this.pods!=null ?this.pods.build():null; - } - public V2PodsMetricStatus buildPods() { - return this.pods!=null ?this.pods.build():null; - } - public A withPods(V2PodsMetricStatus pods) { - _visitables.get("pods").remove(this.pods); - if (pods!=null){ this.pods= new V2PodsMetricStatusBuilder(pods); _visitables.get("pods").add(this.pods);} else { this.pods = null; _visitables.get("pods").remove(this.pods); } return (A) this; - } - public Boolean hasPods() { - return this.pods != null; - } - public V2MetricStatusFluentImpl.PodsNested withNewPods() { - return new V2MetricStatusFluentImpl.PodsNestedImpl(); - } - public V2MetricStatusFluentImpl.PodsNested withNewPodsLike(V2PodsMetricStatus item) { - return new V2MetricStatusFluentImpl.PodsNestedImpl(item); - } - public V2MetricStatusFluentImpl.PodsNested editPods() { - return withNewPodsLike(getPods()); - } - public V2MetricStatusFluentImpl.PodsNested editOrNewPods() { - return withNewPodsLike(getPods() != null ? getPods(): new V2PodsMetricStatusBuilder().build()); - } - public V2MetricStatusFluentImpl.PodsNested editOrNewPodsLike(V2PodsMetricStatus item) { - return withNewPodsLike(getPods() != null ? getPods(): item); - } - - /** - * This method has been deprecated, please use method buildResource instead. - * @return The buildable object. - */ - @Deprecated - public V2ResourceMetricStatus getResource() { - return this.resource!=null ?this.resource.build():null; - } - public V2ResourceMetricStatus buildResource() { - return this.resource!=null ?this.resource.build():null; - } - public A withResource(V2ResourceMetricStatus resource) { - _visitables.get("resource").remove(this.resource); - if (resource!=null){ this.resource= new V2ResourceMetricStatusBuilder(resource); _visitables.get("resource").add(this.resource);} else { this.resource = null; _visitables.get("resource").remove(this.resource); } return (A) this; - } - public Boolean hasResource() { - return this.resource != null; - } - public V2MetricStatusFluentImpl.ResourceNested withNewResource() { - return new V2MetricStatusFluentImpl.ResourceNestedImpl(); - } - public V2MetricStatusFluentImpl.ResourceNested withNewResourceLike(V2ResourceMetricStatus item) { - return new V2MetricStatusFluentImpl.ResourceNestedImpl(item); - } - public V2MetricStatusFluentImpl.ResourceNested editResource() { - return withNewResourceLike(getResource()); - } - public V2MetricStatusFluentImpl.ResourceNested editOrNewResource() { - return withNewResourceLike(getResource() != null ? getResource(): new V2ResourceMetricStatusBuilder().build()); - } - public V2MetricStatusFluentImpl.ResourceNested editOrNewResourceLike(V2ResourceMetricStatus item) { - return withNewResourceLike(getResource() != null ? getResource(): item); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2MetricStatusFluentImpl that = (V2MetricStatusFluentImpl) o; - if (!java.util.Objects.equals(containerResource, that.containerResource)) return false; - - if (!java.util.Objects.equals(external, that.external)) return false; - - if (!java.util.Objects.equals(_object, that._object)) return false; - - if (!java.util.Objects.equals(pods, that.pods)) return false; - - if (!java.util.Objects.equals(resource, that.resource)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(containerResource, external, _object, pods, resource, type, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (containerResource != null) { sb.append("containerResource:"); sb.append(containerResource + ","); } - if (external != null) { sb.append("external:"); sb.append(external + ","); } - if (_object != null) { sb.append("_object:"); sb.append(_object + ","); } - if (pods != null) { sb.append("pods:"); sb.append(pods + ","); } - if (resource != null) { sb.append("resource:"); sb.append(resource + ","); } - if (type != null) { sb.append("type:"); sb.append(type); } - sb.append("}"); - return sb.toString(); - } - class ContainerResourceNestedImpl extends V2ContainerResourceMetricStatusFluentImpl> implements V2MetricStatusFluentImpl.ContainerResourceNested,Nested{ - ContainerResourceNestedImpl(V2ContainerResourceMetricStatus item) { - this.builder = new V2ContainerResourceMetricStatusBuilder(this, item); - } - ContainerResourceNestedImpl() { - this.builder = new V2ContainerResourceMetricStatusBuilder(this); - } - V2ContainerResourceMetricStatusBuilder builder; - public N and() { - return (N) V2MetricStatusFluentImpl.this.withContainerResource(builder.build()); - } - public N endContainerResource() { - return and(); - } - - } - class ExternalNestedImpl extends V2ExternalMetricStatusFluentImpl> implements V2MetricStatusFluentImpl.ExternalNested,Nested{ - ExternalNestedImpl(V2ExternalMetricStatus item) { - this.builder = new V2ExternalMetricStatusBuilder(this, item); - } - ExternalNestedImpl() { - this.builder = new V2ExternalMetricStatusBuilder(this); - } - V2ExternalMetricStatusBuilder builder; - public N and() { - return (N) V2MetricStatusFluentImpl.this.withExternal(builder.build()); - } - public N endExternal() { - return and(); - } - - } - class ObjectNestedImpl extends V2ObjectMetricStatusFluentImpl> implements V2MetricStatusFluentImpl.ObjectNested,Nested{ - ObjectNestedImpl(V2ObjectMetricStatus item) { - this.builder = new V2ObjectMetricStatusBuilder(this, item); - } - ObjectNestedImpl() { - this.builder = new V2ObjectMetricStatusBuilder(this); - } - V2ObjectMetricStatusBuilder builder; - public N and() { - return (N) V2MetricStatusFluentImpl.this.withObject(builder.build()); - } - public N endObject() { - return and(); - } - - } - class PodsNestedImpl extends V2PodsMetricStatusFluentImpl> implements V2MetricStatusFluentImpl.PodsNested,Nested{ - PodsNestedImpl(V2PodsMetricStatus item) { - this.builder = new V2PodsMetricStatusBuilder(this, item); - } - PodsNestedImpl() { - this.builder = new V2PodsMetricStatusBuilder(this); - } - V2PodsMetricStatusBuilder builder; - public N and() { - return (N) V2MetricStatusFluentImpl.this.withPods(builder.build()); - } - public N endPods() { - return and(); - } - - } - class ResourceNestedImpl extends V2ResourceMetricStatusFluentImpl> implements V2MetricStatusFluentImpl.ResourceNested,Nested{ - ResourceNestedImpl(V2ResourceMetricStatus item) { - this.builder = new V2ResourceMetricStatusBuilder(this, item); - } - ResourceNestedImpl() { - this.builder = new V2ResourceMetricStatusBuilder(this); - } - V2ResourceMetricStatusBuilder builder; - public N and() { - return (N) V2MetricStatusFluentImpl.this.withResource(builder.build()); - } - public N endResource() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetBuilder.java index deba163568..562f9f7bcd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetBuilder.java @@ -1,48 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2MetricTargetBuilder extends V2MetricTargetFluentImpl implements VisitableBuilder{ +public class V2MetricTargetBuilder extends V2MetricTargetFluent implements VisitableBuilder{ public V2MetricTargetBuilder() { - this(false); - } - public V2MetricTargetBuilder(Boolean validationEnabled) { - this(new V2MetricTarget(), validationEnabled); + this(new V2MetricTarget()); } + public V2MetricTargetBuilder(V2MetricTargetFluent fluent) { - this(fluent, false); - } - public V2MetricTargetBuilder(V2MetricTargetFluent fluent,Boolean validationEnabled) { - this(fluent, new V2MetricTarget(), validationEnabled); + this(fluent, new V2MetricTarget()); } + public V2MetricTargetBuilder(V2MetricTargetFluent fluent,V2MetricTarget instance) { - this(fluent, instance, false); - } - public V2MetricTargetBuilder(V2MetricTargetFluent fluent,V2MetricTarget instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAverageUtilization(instance.getAverageUtilization()); - fluent.withAverageValue(instance.getAverageValue()); - fluent.withType(instance.getType()); - fluent.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2MetricTargetBuilder(V2MetricTarget instance) { - this(instance,false); - } - public V2MetricTargetBuilder(V2MetricTarget instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAverageUtilization(instance.getAverageUtilization()); - this.withAverageValue(instance.getAverageValue()); - this.withType(instance.getType()); - this.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2MetricTargetFluent fluent; - Boolean validationEnabled; + public V2MetricTarget build() { V2MetricTarget buildable = new V2MetricTarget(); buildable.setAverageUtilization(fluent.getAverageUtilization()); @@ -52,4 +30,5 @@ public V2MetricTarget build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetFluent.java index 9a8eae372c..6a33069ed0 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetFluent.java @@ -1,29 +1,124 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.custom.Quantity; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2MetricTargetFluent> extends Fluent{ - public Integer getAverageUtilization(); - public A withAverageUtilization(Integer averageUtilization); - public Boolean hasAverageUtilization(); - public Quantity getAverageValue(); - public A withAverageValue(Quantity averageValue); - public Boolean hasAverageValue(); - public A withNewAverageValue(String value); - public String getType(); - public A withType(String type); - public Boolean hasType(); - public Quantity getValue(); - public A withValue(Quantity value); - public Boolean hasValue(); - public A withNewValue(String value); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2MetricTargetFluent> extends BaseFluent{ + public V2MetricTargetFluent() { + } + public V2MetricTargetFluent(V2MetricTarget instance) { + this.copyInstance(instance); + } + private Integer averageUtilization; + private Quantity averageValue; + private String type; + private Quantity value; + + protected void copyInstance(V2MetricTarget instance) { + instance = (instance != null ? instance : new V2MetricTarget()); + if (instance != null) { + this.withAverageUtilization(instance.getAverageUtilization()); + this.withAverageValue(instance.getAverageValue()); + this.withType(instance.getType()); + this.withValue(instance.getValue()); + } + } + + public Integer getAverageUtilization() { + return this.averageUtilization; + } + + public A withAverageUtilization(Integer averageUtilization) { + this.averageUtilization = averageUtilization; + return (A) this; + } + + public boolean hasAverageUtilization() { + return this.averageUtilization != null; + } + + public Quantity getAverageValue() { + return this.averageValue; + } + + public A withAverageValue(Quantity averageValue) { + this.averageValue = averageValue; + return (A) this; + } + + public boolean hasAverageValue() { + return this.averageValue != null; + } + + public A withNewAverageValue(String value) { + return (A)withAverageValue(new Quantity(value)); + } + + public String getType() { + return this.type; + } + + public A withType(String type) { + this.type = type; + return (A) this; + } + + public boolean hasType() { + return this.type != null; + } + + public Quantity getValue() { + return this.value; + } + + public A withValue(Quantity value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public A withNewValue(String value) { + return (A)withValue(new Quantity(value)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2MetricTargetFluent that = (V2MetricTargetFluent) o; + if (!java.util.Objects.equals(averageUtilization, that.averageUtilization)) return false; + if (!java.util.Objects.equals(averageValue, that.averageValue)) return false; + if (!java.util.Objects.equals(type, that.type)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(averageUtilization, averageValue, type, value, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (averageUtilization != null) { sb.append("averageUtilization:"); sb.append(averageUtilization + ","); } + if (averageValue != null) { sb.append("averageValue:"); sb.append(averageValue + ","); } + if (type != null) { sb.append("type:"); sb.append(type + ","); } + if (value != null) { sb.append("value:"); sb.append(value); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetFluentImpl.java deleted file mode 100644 index a78eb989e6..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricTargetFluentImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import io.kubernetes.client.custom.Quantity; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2MetricTargetFluentImpl> extends BaseFluent implements V2MetricTargetFluent{ - public V2MetricTargetFluentImpl() { - } - public V2MetricTargetFluentImpl(V2MetricTarget instance) { - if (instance != null) { - this.withAverageUtilization(instance.getAverageUtilization()); - this.withAverageValue(instance.getAverageValue()); - this.withType(instance.getType()); - this.withValue(instance.getValue()); - } - } - private Integer averageUtilization; - private Quantity averageValue; - private String type; - private Quantity value; - public Integer getAverageUtilization() { - return this.averageUtilization; - } - public A withAverageUtilization(Integer averageUtilization) { - this.averageUtilization=averageUtilization; return (A) this; - } - public Boolean hasAverageUtilization() { - return this.averageUtilization != null; - } - public Quantity getAverageValue() { - return this.averageValue; - } - public A withAverageValue(Quantity averageValue) { - this.averageValue=averageValue; return (A) this; - } - public Boolean hasAverageValue() { - return this.averageValue != null; - } - public A withNewAverageValue(String value) { - return (A)withAverageValue(new Quantity(value)); - } - public String getType() { - return this.type; - } - public A withType(String type) { - this.type=type; return (A) this; - } - public Boolean hasType() { - return this.type != null; - } - public Quantity getValue() { - return this.value; - } - public A withValue(Quantity value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - public A withNewValue(String value) { - return (A)withValue(new Quantity(value)); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2MetricTargetFluentImpl that = (V2MetricTargetFluentImpl) o; - if (!java.util.Objects.equals(averageUtilization, that.averageUtilization)) return false; - - if (!java.util.Objects.equals(averageValue, that.averageValue)) return false; - - if (!java.util.Objects.equals(type, that.type)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(averageUtilization, averageValue, type, value, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (averageUtilization != null) { sb.append("averageUtilization:"); sb.append(averageUtilization + ","); } - if (averageValue != null) { sb.append("averageValue:"); sb.append(averageValue + ","); } - if (type != null) { sb.append("type:"); sb.append(type + ","); } - if (value != null) { sb.append("value:"); sb.append(value); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusBuilder.java index 20d3ab7e1c..ce0a535a58 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusBuilder.java @@ -1,46 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2MetricValueStatusBuilder extends V2MetricValueStatusFluentImpl implements VisitableBuilder{ +public class V2MetricValueStatusBuilder extends V2MetricValueStatusFluent implements VisitableBuilder{ public V2MetricValueStatusBuilder() { - this(false); - } - public V2MetricValueStatusBuilder(Boolean validationEnabled) { - this(new V2MetricValueStatus(), validationEnabled); + this(new V2MetricValueStatus()); } + public V2MetricValueStatusBuilder(V2MetricValueStatusFluent fluent) { - this(fluent, false); - } - public V2MetricValueStatusBuilder(V2MetricValueStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V2MetricValueStatus(), validationEnabled); + this(fluent, new V2MetricValueStatus()); } + public V2MetricValueStatusBuilder(V2MetricValueStatusFluent fluent,V2MetricValueStatus instance) { - this(fluent, instance, false); - } - public V2MetricValueStatusBuilder(V2MetricValueStatusFluent fluent,V2MetricValueStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withAverageUtilization(instance.getAverageUtilization()); - fluent.withAverageValue(instance.getAverageValue()); - fluent.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2MetricValueStatusBuilder(V2MetricValueStatus instance) { - this(instance,false); - } - public V2MetricValueStatusBuilder(V2MetricValueStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withAverageUtilization(instance.getAverageUtilization()); - this.withAverageValue(instance.getAverageValue()); - this.withValue(instance.getValue()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2MetricValueStatusFluent fluent; - Boolean validationEnabled; + public V2MetricValueStatus build() { V2MetricValueStatus buildable = new V2MetricValueStatus(); buildable.setAverageUtilization(fluent.getAverageUtilization()); @@ -49,4 +29,5 @@ public V2MetricValueStatus build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusFluent.java index b5f66ab738..903b0b7c64 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusFluent.java @@ -1,26 +1,107 @@ package io.kubernetes.client.openapi.models; import java.lang.Integer; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.custom.Quantity; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2MetricValueStatusFluent> extends Fluent{ - public Integer getAverageUtilization(); - public A withAverageUtilization(Integer averageUtilization); - public Boolean hasAverageUtilization(); - public Quantity getAverageValue(); - public A withAverageValue(Quantity averageValue); - public Boolean hasAverageValue(); - public A withNewAverageValue(String value); - public Quantity getValue(); - public A withValue(Quantity value); - public Boolean hasValue(); - public A withNewValue(String value); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2MetricValueStatusFluent> extends BaseFluent{ + public V2MetricValueStatusFluent() { + } + public V2MetricValueStatusFluent(V2MetricValueStatus instance) { + this.copyInstance(instance); + } + private Integer averageUtilization; + private Quantity averageValue; + private Quantity value; + + protected void copyInstance(V2MetricValueStatus instance) { + instance = (instance != null ? instance : new V2MetricValueStatus()); + if (instance != null) { + this.withAverageUtilization(instance.getAverageUtilization()); + this.withAverageValue(instance.getAverageValue()); + this.withValue(instance.getValue()); + } + } + + public Integer getAverageUtilization() { + return this.averageUtilization; + } + + public A withAverageUtilization(Integer averageUtilization) { + this.averageUtilization = averageUtilization; + return (A) this; + } + + public boolean hasAverageUtilization() { + return this.averageUtilization != null; + } + + public Quantity getAverageValue() { + return this.averageValue; + } + + public A withAverageValue(Quantity averageValue) { + this.averageValue = averageValue; + return (A) this; + } + + public boolean hasAverageValue() { + return this.averageValue != null; + } + + public A withNewAverageValue(String value) { + return (A)withAverageValue(new Quantity(value)); + } + + public Quantity getValue() { + return this.value; + } + + public A withValue(Quantity value) { + this.value = value; + return (A) this; + } + + public boolean hasValue() { + return this.value != null; + } + + public A withNewValue(String value) { + return (A)withValue(new Quantity(value)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2MetricValueStatusFluent that = (V2MetricValueStatusFluent) o; + if (!java.util.Objects.equals(averageUtilization, that.averageUtilization)) return false; + if (!java.util.Objects.equals(averageValue, that.averageValue)) return false; + if (!java.util.Objects.equals(value, that.value)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(averageUtilization, averageValue, value, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (averageUtilization != null) { sb.append("averageUtilization:"); sb.append(averageUtilization + ","); } + if (averageValue != null) { sb.append("averageValue:"); sb.append(averageValue + ","); } + if (value != null) { sb.append("value:"); sb.append(value); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusFluentImpl.java deleted file mode 100644 index 9af566cba4..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2MetricValueStatusFluentImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.Integer; -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import io.kubernetes.client.custom.Quantity; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2MetricValueStatusFluentImpl> extends BaseFluent implements V2MetricValueStatusFluent{ - public V2MetricValueStatusFluentImpl() { - } - public V2MetricValueStatusFluentImpl(V2MetricValueStatus instance) { - if (instance != null) { - this.withAverageUtilization(instance.getAverageUtilization()); - this.withAverageValue(instance.getAverageValue()); - this.withValue(instance.getValue()); - } - } - private Integer averageUtilization; - private Quantity averageValue; - private Quantity value; - public Integer getAverageUtilization() { - return this.averageUtilization; - } - public A withAverageUtilization(Integer averageUtilization) { - this.averageUtilization=averageUtilization; return (A) this; - } - public Boolean hasAverageUtilization() { - return this.averageUtilization != null; - } - public Quantity getAverageValue() { - return this.averageValue; - } - public A withAverageValue(Quantity averageValue) { - this.averageValue=averageValue; return (A) this; - } - public Boolean hasAverageValue() { - return this.averageValue != null; - } - public A withNewAverageValue(String value) { - return (A)withAverageValue(new Quantity(value)); - } - public Quantity getValue() { - return this.value; - } - public A withValue(Quantity value) { - this.value=value; return (A) this; - } - public Boolean hasValue() { - return this.value != null; - } - public A withNewValue(String value) { - return (A)withValue(new Quantity(value)); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2MetricValueStatusFluentImpl that = (V2MetricValueStatusFluentImpl) o; - if (!java.util.Objects.equals(averageUtilization, that.averageUtilization)) return false; - - if (!java.util.Objects.equals(averageValue, that.averageValue)) return false; - - if (!java.util.Objects.equals(value, that.value)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(averageUtilization, averageValue, value, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (averageUtilization != null) { sb.append("averageUtilization:"); sb.append(averageUtilization + ","); } - if (averageValue != null) { sb.append("averageValue:"); sb.append(averageValue + ","); } - if (value != null) { sb.append("value:"); sb.append(value); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceBuilder.java index 1cbd74b67d..e4ba2b80de 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2ObjectMetricSourceBuilder extends V2ObjectMetricSourceFluentImpl implements VisitableBuilder{ +public class V2ObjectMetricSourceBuilder extends V2ObjectMetricSourceFluent implements VisitableBuilder{ public V2ObjectMetricSourceBuilder() { - this(false); - } - public V2ObjectMetricSourceBuilder(Boolean validationEnabled) { - this(new V2ObjectMetricSource(), validationEnabled); + this(new V2ObjectMetricSource()); } + public V2ObjectMetricSourceBuilder(V2ObjectMetricSourceFluent fluent) { - this(fluent, false); - } - public V2ObjectMetricSourceBuilder(V2ObjectMetricSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V2ObjectMetricSource(), validationEnabled); + this(fluent, new V2ObjectMetricSource()); } + public V2ObjectMetricSourceBuilder(V2ObjectMetricSourceFluent fluent,V2ObjectMetricSource instance) { - this(fluent, instance, false); - } - public V2ObjectMetricSourceBuilder(V2ObjectMetricSourceFluent fluent,V2ObjectMetricSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withDescribedObject(instance.getDescribedObject()); - fluent.withMetric(instance.getMetric()); - fluent.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2ObjectMetricSourceBuilder(V2ObjectMetricSource instance) { - this(instance,false); - } - public V2ObjectMetricSourceBuilder(V2ObjectMetricSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withDescribedObject(instance.getDescribedObject()); - this.withMetric(instance.getMetric()); - this.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2ObjectMetricSourceFluent fluent; - Boolean validationEnabled; + public V2ObjectMetricSource build() { V2ObjectMetricSource buildable = new V2ObjectMetricSource(); - buildable.setDescribedObject(fluent.getDescribedObject()); - buildable.setMetric(fluent.getMetric()); - buildable.setTarget(fluent.getTarget()); + buildable.setDescribedObject(fluent.buildDescribedObject()); + buildable.setMetric(fluent.buildMetric()); + buildable.setTarget(fluent.buildTarget()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceFluent.java index bb45cb6662..f4e7a38d0d 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceFluent.java @@ -1,74 +1,226 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2ObjectMetricSourceFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildDescribedObject instead. - * @return The buildable object. - */ - @Deprecated - public V2CrossVersionObjectReference getDescribedObject(); - public V2CrossVersionObjectReference buildDescribedObject(); - public A withDescribedObject(V2CrossVersionObjectReference describedObject); - public Boolean hasDescribedObject(); - public V2ObjectMetricSourceFluent.DescribedObjectNested withNewDescribedObject(); - public V2ObjectMetricSourceFluent.DescribedObjectNested withNewDescribedObjectLike(V2CrossVersionObjectReference item); - public V2ObjectMetricSourceFluent.DescribedObjectNested editDescribedObject(); - public V2ObjectMetricSourceFluent.DescribedObjectNested editOrNewDescribedObject(); - public V2ObjectMetricSourceFluent.DescribedObjectNested editOrNewDescribedObjectLike(V2CrossVersionObjectReference item); - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric(); - public V2MetricIdentifier buildMetric(); - public A withMetric(V2MetricIdentifier metric); - public Boolean hasMetric(); - public V2ObjectMetricSourceFluent.MetricNested withNewMetric(); - public V2ObjectMetricSourceFluent.MetricNested withNewMetricLike(V2MetricIdentifier item); - public V2ObjectMetricSourceFluent.MetricNested editMetric(); - public V2ObjectMetricSourceFluent.MetricNested editOrNewMetric(); - public V2ObjectMetricSourceFluent.MetricNested editOrNewMetricLike(V2MetricIdentifier item); - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget(); - public V2MetricTarget buildTarget(); - public A withTarget(V2MetricTarget target); - public Boolean hasTarget(); - public V2ObjectMetricSourceFluent.TargetNested withNewTarget(); - public V2ObjectMetricSourceFluent.TargetNested withNewTargetLike(V2MetricTarget item); - public V2ObjectMetricSourceFluent.TargetNested editTarget(); - public V2ObjectMetricSourceFluent.TargetNested editOrNewTarget(); - public V2ObjectMetricSourceFluent.TargetNested editOrNewTargetLike(V2MetricTarget item); - public interface DescribedObjectNested extends Nested,V2CrossVersionObjectReferenceFluent>{ - public N and(); - public N endDescribedObject(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2ObjectMetricSourceFluent> extends BaseFluent{ + public V2ObjectMetricSourceFluent() { + } + + public V2ObjectMetricSourceFluent(V2ObjectMetricSource instance) { + this.copyInstance(instance); + } + private V2CrossVersionObjectReferenceBuilder describedObject; + private V2MetricIdentifierBuilder metric; + private V2MetricTargetBuilder target; + + protected void copyInstance(V2ObjectMetricSource instance) { + instance = (instance != null ? instance : new V2ObjectMetricSource()); + if (instance != null) { + this.withDescribedObject(instance.getDescribedObject()); + this.withMetric(instance.getMetric()); + this.withTarget(instance.getTarget()); + } + } + + public V2CrossVersionObjectReference buildDescribedObject() { + return this.describedObject != null ? this.describedObject.build() : null; + } + + public A withDescribedObject(V2CrossVersionObjectReference describedObject) { + this._visitables.remove("describedObject"); + if (describedObject != null) { + this.describedObject = new V2CrossVersionObjectReferenceBuilder(describedObject); + this._visitables.get("describedObject").add(this.describedObject); + } else { + this.describedObject = null; + this._visitables.get("describedObject").remove(this.describedObject); + } + return (A) this; + } + + public boolean hasDescribedObject() { + return this.describedObject != null; + } + + public DescribedObjectNested withNewDescribedObject() { + return new DescribedObjectNested(null); + } + + public DescribedObjectNested withNewDescribedObjectLike(V2CrossVersionObjectReference item) { + return new DescribedObjectNested(item); + } + + public DescribedObjectNested editDescribedObject() { + return withNewDescribedObjectLike(java.util.Optional.ofNullable(buildDescribedObject()).orElse(null)); + } + + public DescribedObjectNested editOrNewDescribedObject() { + return withNewDescribedObjectLike(java.util.Optional.ofNullable(buildDescribedObject()).orElse(new V2CrossVersionObjectReferenceBuilder().build())); + } + + public DescribedObjectNested editOrNewDescribedObjectLike(V2CrossVersionObjectReference item) { + return withNewDescribedObjectLike(java.util.Optional.ofNullable(buildDescribedObject()).orElse(item)); + } + + public V2MetricIdentifier buildMetric() { + return this.metric != null ? this.metric.build() : null; + } + + public A withMetric(V2MetricIdentifier metric) { + this._visitables.remove("metric"); + if (metric != null) { + this.metric = new V2MetricIdentifierBuilder(metric); + this._visitables.get("metric").add(this.metric); + } else { + this.metric = null; + this._visitables.get("metric").remove(this.metric); + } + return (A) this; + } + + public boolean hasMetric() { + return this.metric != null; + } + + public MetricNested withNewMetric() { + return new MetricNested(null); + } + + public MetricNested withNewMetricLike(V2MetricIdentifier item) { + return new MetricNested(item); + } + + public MetricNested editMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(null)); + } + + public MetricNested editOrNewMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(new V2MetricIdentifierBuilder().build())); } - public interface MetricNested extends Nested,V2MetricIdentifierFluent>{ - public N and(); - public N endMetric(); + + public MetricNested editOrNewMetricLike(V2MetricIdentifier item) { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(item)); + } + + public V2MetricTarget buildTarget() { + return this.target != null ? this.target.build() : null; + } + + public A withTarget(V2MetricTarget target) { + this._visitables.remove("target"); + if (target != null) { + this.target = new V2MetricTargetBuilder(target); + this._visitables.get("target").add(this.target); + } else { + this.target = null; + this._visitables.get("target").remove(this.target); + } + return (A) this; + } + + public boolean hasTarget() { + return this.target != null; + } + + public TargetNested withNewTarget() { + return new TargetNested(null); + } + + public TargetNested withNewTargetLike(V2MetricTarget item) { + return new TargetNested(item); + } + + public TargetNested editTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(null)); + } + + public TargetNested editOrNewTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(new V2MetricTargetBuilder().build())); + } + + public TargetNested editOrNewTargetLike(V2MetricTarget item) { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2ObjectMetricSourceFluent that = (V2ObjectMetricSourceFluent) o; + if (!java.util.Objects.equals(describedObject, that.describedObject)) return false; + if (!java.util.Objects.equals(metric, that.metric)) return false; + if (!java.util.Objects.equals(target, that.target)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(describedObject, metric, target, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (describedObject != null) { sb.append("describedObject:"); sb.append(describedObject + ","); } + if (metric != null) { sb.append("metric:"); sb.append(metric + ","); } + if (target != null) { sb.append("target:"); sb.append(target); } + sb.append("}"); + return sb.toString(); + } + public class DescribedObjectNested extends V2CrossVersionObjectReferenceFluent> implements Nested{ + DescribedObjectNested(V2CrossVersionObjectReference item) { + this.builder = new V2CrossVersionObjectReferenceBuilder(this, item); + } + V2CrossVersionObjectReferenceBuilder builder; + + public N and() { + return (N) V2ObjectMetricSourceFluent.this.withDescribedObject(builder.build()); + } + public N endDescribedObject() { + return and(); + } + + } - public interface TargetNested extends Nested,V2MetricTargetFluent>{ - public N and(); - public N endTarget(); + public class MetricNested extends V2MetricIdentifierFluent> implements Nested{ + MetricNested(V2MetricIdentifier item) { + this.builder = new V2MetricIdentifierBuilder(this, item); + } + V2MetricIdentifierBuilder builder; + public N and() { + return (N) V2ObjectMetricSourceFluent.this.withMetric(builder.build()); + } + + public N endMetric() { + return and(); + } + + } + public class TargetNested extends V2MetricTargetFluent> implements Nested{ + TargetNested(V2MetricTarget item) { + this.builder = new V2MetricTargetBuilder(this, item); + } + V2MetricTargetBuilder builder; + + public N and() { + return (N) V2ObjectMetricSourceFluent.this.withTarget(builder.build()); + } + + public N endTarget() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceFluentImpl.java deleted file mode 100644 index 947fb20cd8..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricSourceFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2ObjectMetricSourceFluentImpl> extends BaseFluent implements V2ObjectMetricSourceFluent{ - public V2ObjectMetricSourceFluentImpl() { - } - public V2ObjectMetricSourceFluentImpl(V2ObjectMetricSource instance) { - if (instance != null) { - this.withDescribedObject(instance.getDescribedObject()); - this.withMetric(instance.getMetric()); - this.withTarget(instance.getTarget()); - } - } - private V2CrossVersionObjectReferenceBuilder describedObject; - private V2MetricIdentifierBuilder metric; - private V2MetricTargetBuilder target; - - /** - * This method has been deprecated, please use method buildDescribedObject instead. - * @return The buildable object. - */ - @Deprecated - public V2CrossVersionObjectReference getDescribedObject() { - return this.describedObject!=null ?this.describedObject.build():null; - } - public V2CrossVersionObjectReference buildDescribedObject() { - return this.describedObject!=null ?this.describedObject.build():null; - } - public A withDescribedObject(V2CrossVersionObjectReference describedObject) { - _visitables.get("describedObject").remove(this.describedObject); - if (describedObject!=null){ this.describedObject= new V2CrossVersionObjectReferenceBuilder(describedObject); _visitables.get("describedObject").add(this.describedObject);} else { this.describedObject = null; _visitables.get("describedObject").remove(this.describedObject); } return (A) this; - } - public Boolean hasDescribedObject() { - return this.describedObject != null; - } - public V2ObjectMetricSourceFluentImpl.DescribedObjectNested withNewDescribedObject() { - return new V2ObjectMetricSourceFluentImpl.DescribedObjectNestedImpl(); - } - public V2ObjectMetricSourceFluentImpl.DescribedObjectNested withNewDescribedObjectLike(V2CrossVersionObjectReference item) { - return new V2ObjectMetricSourceFluentImpl.DescribedObjectNestedImpl(item); - } - public V2ObjectMetricSourceFluentImpl.DescribedObjectNested editDescribedObject() { - return withNewDescribedObjectLike(getDescribedObject()); - } - public V2ObjectMetricSourceFluentImpl.DescribedObjectNested editOrNewDescribedObject() { - return withNewDescribedObjectLike(getDescribedObject() != null ? getDescribedObject(): new V2CrossVersionObjectReferenceBuilder().build()); - } - public V2ObjectMetricSourceFluentImpl.DescribedObjectNested editOrNewDescribedObjectLike(V2CrossVersionObjectReference item) { - return withNewDescribedObjectLike(getDescribedObject() != null ? getDescribedObject(): item); - } - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric() { - return this.metric!=null ?this.metric.build():null; - } - public V2MetricIdentifier buildMetric() { - return this.metric!=null ?this.metric.build():null; - } - public A withMetric(V2MetricIdentifier metric) { - _visitables.get("metric").remove(this.metric); - if (metric!=null){ this.metric= new V2MetricIdentifierBuilder(metric); _visitables.get("metric").add(this.metric);} else { this.metric = null; _visitables.get("metric").remove(this.metric); } return (A) this; - } - public Boolean hasMetric() { - return this.metric != null; - } - public V2ObjectMetricSourceFluentImpl.MetricNested withNewMetric() { - return new V2ObjectMetricSourceFluentImpl.MetricNestedImpl(); - } - public V2ObjectMetricSourceFluentImpl.MetricNested withNewMetricLike(V2MetricIdentifier item) { - return new V2ObjectMetricSourceFluentImpl.MetricNestedImpl(item); - } - public V2ObjectMetricSourceFluentImpl.MetricNested editMetric() { - return withNewMetricLike(getMetric()); - } - public V2ObjectMetricSourceFluentImpl.MetricNested editOrNewMetric() { - return withNewMetricLike(getMetric() != null ? getMetric(): new V2MetricIdentifierBuilder().build()); - } - public V2ObjectMetricSourceFluentImpl.MetricNested editOrNewMetricLike(V2MetricIdentifier item) { - return withNewMetricLike(getMetric() != null ? getMetric(): item); - } - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget() { - return this.target!=null ?this.target.build():null; - } - public V2MetricTarget buildTarget() { - return this.target!=null ?this.target.build():null; - } - public A withTarget(V2MetricTarget target) { - _visitables.get("target").remove(this.target); - if (target!=null){ this.target= new V2MetricTargetBuilder(target); _visitables.get("target").add(this.target);} else { this.target = null; _visitables.get("target").remove(this.target); } return (A) this; - } - public Boolean hasTarget() { - return this.target != null; - } - public V2ObjectMetricSourceFluentImpl.TargetNested withNewTarget() { - return new V2ObjectMetricSourceFluentImpl.TargetNestedImpl(); - } - public V2ObjectMetricSourceFluentImpl.TargetNested withNewTargetLike(V2MetricTarget item) { - return new V2ObjectMetricSourceFluentImpl.TargetNestedImpl(item); - } - public V2ObjectMetricSourceFluentImpl.TargetNested editTarget() { - return withNewTargetLike(getTarget()); - } - public V2ObjectMetricSourceFluentImpl.TargetNested editOrNewTarget() { - return withNewTargetLike(getTarget() != null ? getTarget(): new V2MetricTargetBuilder().build()); - } - public V2ObjectMetricSourceFluentImpl.TargetNested editOrNewTargetLike(V2MetricTarget item) { - return withNewTargetLike(getTarget() != null ? getTarget(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2ObjectMetricSourceFluentImpl that = (V2ObjectMetricSourceFluentImpl) o; - if (!java.util.Objects.equals(describedObject, that.describedObject)) return false; - - if (!java.util.Objects.equals(metric, that.metric)) return false; - - if (!java.util.Objects.equals(target, that.target)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(describedObject, metric, target, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (describedObject != null) { sb.append("describedObject:"); sb.append(describedObject + ","); } - if (metric != null) { sb.append("metric:"); sb.append(metric + ","); } - if (target != null) { sb.append("target:"); sb.append(target); } - sb.append("}"); - return sb.toString(); - } - class DescribedObjectNestedImpl extends V2CrossVersionObjectReferenceFluentImpl> implements V2ObjectMetricSourceFluentImpl.DescribedObjectNested,Nested{ - DescribedObjectNestedImpl(V2CrossVersionObjectReference item) { - this.builder = new V2CrossVersionObjectReferenceBuilder(this, item); - } - DescribedObjectNestedImpl() { - this.builder = new V2CrossVersionObjectReferenceBuilder(this); - } - V2CrossVersionObjectReferenceBuilder builder; - public N and() { - return (N) V2ObjectMetricSourceFluentImpl.this.withDescribedObject(builder.build()); - } - public N endDescribedObject() { - return and(); - } - - } - class MetricNestedImpl extends V2MetricIdentifierFluentImpl> implements V2ObjectMetricSourceFluentImpl.MetricNested,Nested{ - MetricNestedImpl(V2MetricIdentifier item) { - this.builder = new V2MetricIdentifierBuilder(this, item); - } - MetricNestedImpl() { - this.builder = new V2MetricIdentifierBuilder(this); - } - V2MetricIdentifierBuilder builder; - public N and() { - return (N) V2ObjectMetricSourceFluentImpl.this.withMetric(builder.build()); - } - public N endMetric() { - return and(); - } - - } - class TargetNestedImpl extends V2MetricTargetFluentImpl> implements V2ObjectMetricSourceFluentImpl.TargetNested,Nested{ - TargetNestedImpl(V2MetricTarget item) { - this.builder = new V2MetricTargetBuilder(this, item); - } - TargetNestedImpl() { - this.builder = new V2MetricTargetBuilder(this); - } - V2MetricTargetBuilder builder; - public N and() { - return (N) V2ObjectMetricSourceFluentImpl.this.withTarget(builder.build()); - } - public N endTarget() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusBuilder.java index 9088ef2684..4bb4e54ec7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusBuilder.java @@ -1,52 +1,33 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2ObjectMetricStatusBuilder extends V2ObjectMetricStatusFluentImpl implements VisitableBuilder{ +public class V2ObjectMetricStatusBuilder extends V2ObjectMetricStatusFluent implements VisitableBuilder{ public V2ObjectMetricStatusBuilder() { - this(false); - } - public V2ObjectMetricStatusBuilder(Boolean validationEnabled) { - this(new V2ObjectMetricStatus(), validationEnabled); + this(new V2ObjectMetricStatus()); } + public V2ObjectMetricStatusBuilder(V2ObjectMetricStatusFluent fluent) { - this(fluent, false); - } - public V2ObjectMetricStatusBuilder(V2ObjectMetricStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V2ObjectMetricStatus(), validationEnabled); + this(fluent, new V2ObjectMetricStatus()); } + public V2ObjectMetricStatusBuilder(V2ObjectMetricStatusFluent fluent,V2ObjectMetricStatus instance) { - this(fluent, instance, false); - } - public V2ObjectMetricStatusBuilder(V2ObjectMetricStatusFluent fluent,V2ObjectMetricStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCurrent(instance.getCurrent()); - fluent.withDescribedObject(instance.getDescribedObject()); - fluent.withMetric(instance.getMetric()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2ObjectMetricStatusBuilder(V2ObjectMetricStatus instance) { - this(instance,false); - } - public V2ObjectMetricStatusBuilder(V2ObjectMetricStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCurrent(instance.getCurrent()); - this.withDescribedObject(instance.getDescribedObject()); - this.withMetric(instance.getMetric()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2ObjectMetricStatusFluent fluent; - Boolean validationEnabled; + public V2ObjectMetricStatus build() { V2ObjectMetricStatus buildable = new V2ObjectMetricStatus(); - buildable.setCurrent(fluent.getCurrent()); - buildable.setDescribedObject(fluent.getDescribedObject()); - buildable.setMetric(fluent.getMetric()); + buildable.setCurrent(fluent.buildCurrent()); + buildable.setDescribedObject(fluent.buildDescribedObject()); + buildable.setMetric(fluent.buildMetric()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusFluent.java index 0213381767..f1c4bc2149 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusFluent.java @@ -1,74 +1,226 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Deprecated; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2ObjectMetricStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent(); - public V2MetricValueStatus buildCurrent(); - public A withCurrent(V2MetricValueStatus current); - public Boolean hasCurrent(); - public V2ObjectMetricStatusFluent.CurrentNested withNewCurrent(); - public V2ObjectMetricStatusFluent.CurrentNested withNewCurrentLike(V2MetricValueStatus item); - public V2ObjectMetricStatusFluent.CurrentNested editCurrent(); - public V2ObjectMetricStatusFluent.CurrentNested editOrNewCurrent(); - public V2ObjectMetricStatusFluent.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item); - - /** - * This method has been deprecated, please use method buildDescribedObject instead. - * @return The buildable object. - */ - @Deprecated - public V2CrossVersionObjectReference getDescribedObject(); - public V2CrossVersionObjectReference buildDescribedObject(); - public A withDescribedObject(V2CrossVersionObjectReference describedObject); - public Boolean hasDescribedObject(); - public V2ObjectMetricStatusFluent.DescribedObjectNested withNewDescribedObject(); - public V2ObjectMetricStatusFluent.DescribedObjectNested withNewDescribedObjectLike(V2CrossVersionObjectReference item); - public V2ObjectMetricStatusFluent.DescribedObjectNested editDescribedObject(); - public V2ObjectMetricStatusFluent.DescribedObjectNested editOrNewDescribedObject(); - public V2ObjectMetricStatusFluent.DescribedObjectNested editOrNewDescribedObjectLike(V2CrossVersionObjectReference item); - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric(); - public V2MetricIdentifier buildMetric(); - public A withMetric(V2MetricIdentifier metric); - public Boolean hasMetric(); - public V2ObjectMetricStatusFluent.MetricNested withNewMetric(); - public V2ObjectMetricStatusFluent.MetricNested withNewMetricLike(V2MetricIdentifier item); - public V2ObjectMetricStatusFluent.MetricNested editMetric(); - public V2ObjectMetricStatusFluent.MetricNested editOrNewMetric(); - public V2ObjectMetricStatusFluent.MetricNested editOrNewMetricLike(V2MetricIdentifier item); - public interface CurrentNested extends Nested,V2MetricValueStatusFluent>{ - public N and(); - public N endCurrent(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2ObjectMetricStatusFluent> extends BaseFluent{ + public V2ObjectMetricStatusFluent() { + } + + public V2ObjectMetricStatusFluent(V2ObjectMetricStatus instance) { + this.copyInstance(instance); + } + private V2MetricValueStatusBuilder current; + private V2CrossVersionObjectReferenceBuilder describedObject; + private V2MetricIdentifierBuilder metric; + + protected void copyInstance(V2ObjectMetricStatus instance) { + instance = (instance != null ? instance : new V2ObjectMetricStatus()); + if (instance != null) { + this.withCurrent(instance.getCurrent()); + this.withDescribedObject(instance.getDescribedObject()); + this.withMetric(instance.getMetric()); + } + } + + public V2MetricValueStatus buildCurrent() { + return this.current != null ? this.current.build() : null; + } + + public A withCurrent(V2MetricValueStatus current) { + this._visitables.remove("current"); + if (current != null) { + this.current = new V2MetricValueStatusBuilder(current); + this._visitables.get("current").add(this.current); + } else { + this.current = null; + this._visitables.get("current").remove(this.current); + } + return (A) this; + } + + public boolean hasCurrent() { + return this.current != null; + } + + public CurrentNested withNewCurrent() { + return new CurrentNested(null); + } + + public CurrentNested withNewCurrentLike(V2MetricValueStatus item) { + return new CurrentNested(item); + } + + public CurrentNested editCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(null)); + } + + public CurrentNested editOrNewCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(new V2MetricValueStatusBuilder().build())); + } + + public CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(item)); + } + + public V2CrossVersionObjectReference buildDescribedObject() { + return this.describedObject != null ? this.describedObject.build() : null; + } + + public A withDescribedObject(V2CrossVersionObjectReference describedObject) { + this._visitables.remove("describedObject"); + if (describedObject != null) { + this.describedObject = new V2CrossVersionObjectReferenceBuilder(describedObject); + this._visitables.get("describedObject").add(this.describedObject); + } else { + this.describedObject = null; + this._visitables.get("describedObject").remove(this.describedObject); + } + return (A) this; + } + + public boolean hasDescribedObject() { + return this.describedObject != null; + } + + public DescribedObjectNested withNewDescribedObject() { + return new DescribedObjectNested(null); + } + + public DescribedObjectNested withNewDescribedObjectLike(V2CrossVersionObjectReference item) { + return new DescribedObjectNested(item); + } + + public DescribedObjectNested editDescribedObject() { + return withNewDescribedObjectLike(java.util.Optional.ofNullable(buildDescribedObject()).orElse(null)); + } + + public DescribedObjectNested editOrNewDescribedObject() { + return withNewDescribedObjectLike(java.util.Optional.ofNullable(buildDescribedObject()).orElse(new V2CrossVersionObjectReferenceBuilder().build())); } - public interface DescribedObjectNested extends Nested,V2CrossVersionObjectReferenceFluent>{ - public N and(); - public N endDescribedObject(); + + public DescribedObjectNested editOrNewDescribedObjectLike(V2CrossVersionObjectReference item) { + return withNewDescribedObjectLike(java.util.Optional.ofNullable(buildDescribedObject()).orElse(item)); + } + + public V2MetricIdentifier buildMetric() { + return this.metric != null ? this.metric.build() : null; + } + + public A withMetric(V2MetricIdentifier metric) { + this._visitables.remove("metric"); + if (metric != null) { + this.metric = new V2MetricIdentifierBuilder(metric); + this._visitables.get("metric").add(this.metric); + } else { + this.metric = null; + this._visitables.get("metric").remove(this.metric); + } + return (A) this; + } + + public boolean hasMetric() { + return this.metric != null; + } + + public MetricNested withNewMetric() { + return new MetricNested(null); + } + + public MetricNested withNewMetricLike(V2MetricIdentifier item) { + return new MetricNested(item); + } + + public MetricNested editMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(null)); + } + + public MetricNested editOrNewMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(new V2MetricIdentifierBuilder().build())); + } + + public MetricNested editOrNewMetricLike(V2MetricIdentifier item) { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2ObjectMetricStatusFluent that = (V2ObjectMetricStatusFluent) o; + if (!java.util.Objects.equals(current, that.current)) return false; + if (!java.util.Objects.equals(describedObject, that.describedObject)) return false; + if (!java.util.Objects.equals(metric, that.metric)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(current, describedObject, metric, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (current != null) { sb.append("current:"); sb.append(current + ","); } + if (describedObject != null) { sb.append("describedObject:"); sb.append(describedObject + ","); } + if (metric != null) { sb.append("metric:"); sb.append(metric); } + sb.append("}"); + return sb.toString(); + } + public class CurrentNested extends V2MetricValueStatusFluent> implements Nested{ + CurrentNested(V2MetricValueStatus item) { + this.builder = new V2MetricValueStatusBuilder(this, item); + } + V2MetricValueStatusBuilder builder; + + public N and() { + return (N) V2ObjectMetricStatusFluent.this.withCurrent(builder.build()); + } + public N endCurrent() { + return and(); + } + + } - public interface MetricNested extends Nested,V2MetricIdentifierFluent>{ - public N and(); - public N endMetric(); + public class DescribedObjectNested extends V2CrossVersionObjectReferenceFluent> implements Nested{ + DescribedObjectNested(V2CrossVersionObjectReference item) { + this.builder = new V2CrossVersionObjectReferenceBuilder(this, item); + } + V2CrossVersionObjectReferenceBuilder builder; + public N and() { + return (N) V2ObjectMetricStatusFluent.this.withDescribedObject(builder.build()); + } + + public N endDescribedObject() { + return and(); + } + + } + public class MetricNested extends V2MetricIdentifierFluent> implements Nested{ + MetricNested(V2MetricIdentifier item) { + this.builder = new V2MetricIdentifierBuilder(this, item); + } + V2MetricIdentifierBuilder builder; + + public N and() { + return (N) V2ObjectMetricStatusFluent.this.withMetric(builder.build()); + } + + public N endMetric() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusFluentImpl.java deleted file mode 100644 index 8071c27819..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ObjectMetricStatusFluentImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Boolean; -import java.lang.Object; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2ObjectMetricStatusFluentImpl> extends BaseFluent implements V2ObjectMetricStatusFluent{ - public V2ObjectMetricStatusFluentImpl() { - } - public V2ObjectMetricStatusFluentImpl(V2ObjectMetricStatus instance) { - if (instance != null) { - this.withCurrent(instance.getCurrent()); - this.withDescribedObject(instance.getDescribedObject()); - this.withMetric(instance.getMetric()); - } - } - private V2MetricValueStatusBuilder current; - private V2CrossVersionObjectReferenceBuilder describedObject; - private V2MetricIdentifierBuilder metric; - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent() { - return this.current!=null ?this.current.build():null; - } - public V2MetricValueStatus buildCurrent() { - return this.current!=null ?this.current.build():null; - } - public A withCurrent(V2MetricValueStatus current) { - _visitables.get("current").remove(this.current); - if (current!=null){ this.current= new V2MetricValueStatusBuilder(current); _visitables.get("current").add(this.current);} else { this.current = null; _visitables.get("current").remove(this.current); } return (A) this; - } - public Boolean hasCurrent() { - return this.current != null; - } - public V2ObjectMetricStatusFluentImpl.CurrentNested withNewCurrent() { - return new V2ObjectMetricStatusFluentImpl.CurrentNestedImpl(); - } - public V2ObjectMetricStatusFluentImpl.CurrentNested withNewCurrentLike(V2MetricValueStatus item) { - return new V2ObjectMetricStatusFluentImpl.CurrentNestedImpl(item); - } - public V2ObjectMetricStatusFluentImpl.CurrentNested editCurrent() { - return withNewCurrentLike(getCurrent()); - } - public V2ObjectMetricStatusFluentImpl.CurrentNested editOrNewCurrent() { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): new V2MetricValueStatusBuilder().build()); - } - public V2ObjectMetricStatusFluentImpl.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): item); - } - - /** - * This method has been deprecated, please use method buildDescribedObject instead. - * @return The buildable object. - */ - @Deprecated - public V2CrossVersionObjectReference getDescribedObject() { - return this.describedObject!=null ?this.describedObject.build():null; - } - public V2CrossVersionObjectReference buildDescribedObject() { - return this.describedObject!=null ?this.describedObject.build():null; - } - public A withDescribedObject(V2CrossVersionObjectReference describedObject) { - _visitables.get("describedObject").remove(this.describedObject); - if (describedObject!=null){ this.describedObject= new V2CrossVersionObjectReferenceBuilder(describedObject); _visitables.get("describedObject").add(this.describedObject);} else { this.describedObject = null; _visitables.get("describedObject").remove(this.describedObject); } return (A) this; - } - public Boolean hasDescribedObject() { - return this.describedObject != null; - } - public V2ObjectMetricStatusFluentImpl.DescribedObjectNested withNewDescribedObject() { - return new V2ObjectMetricStatusFluentImpl.DescribedObjectNestedImpl(); - } - public V2ObjectMetricStatusFluentImpl.DescribedObjectNested withNewDescribedObjectLike(V2CrossVersionObjectReference item) { - return new V2ObjectMetricStatusFluentImpl.DescribedObjectNestedImpl(item); - } - public V2ObjectMetricStatusFluentImpl.DescribedObjectNested editDescribedObject() { - return withNewDescribedObjectLike(getDescribedObject()); - } - public V2ObjectMetricStatusFluentImpl.DescribedObjectNested editOrNewDescribedObject() { - return withNewDescribedObjectLike(getDescribedObject() != null ? getDescribedObject(): new V2CrossVersionObjectReferenceBuilder().build()); - } - public V2ObjectMetricStatusFluentImpl.DescribedObjectNested editOrNewDescribedObjectLike(V2CrossVersionObjectReference item) { - return withNewDescribedObjectLike(getDescribedObject() != null ? getDescribedObject(): item); - } - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric() { - return this.metric!=null ?this.metric.build():null; - } - public V2MetricIdentifier buildMetric() { - return this.metric!=null ?this.metric.build():null; - } - public A withMetric(V2MetricIdentifier metric) { - _visitables.get("metric").remove(this.metric); - if (metric!=null){ this.metric= new V2MetricIdentifierBuilder(metric); _visitables.get("metric").add(this.metric);} else { this.metric = null; _visitables.get("metric").remove(this.metric); } return (A) this; - } - public Boolean hasMetric() { - return this.metric != null; - } - public V2ObjectMetricStatusFluentImpl.MetricNested withNewMetric() { - return new V2ObjectMetricStatusFluentImpl.MetricNestedImpl(); - } - public V2ObjectMetricStatusFluentImpl.MetricNested withNewMetricLike(V2MetricIdentifier item) { - return new V2ObjectMetricStatusFluentImpl.MetricNestedImpl(item); - } - public V2ObjectMetricStatusFluentImpl.MetricNested editMetric() { - return withNewMetricLike(getMetric()); - } - public V2ObjectMetricStatusFluentImpl.MetricNested editOrNewMetric() { - return withNewMetricLike(getMetric() != null ? getMetric(): new V2MetricIdentifierBuilder().build()); - } - public V2ObjectMetricStatusFluentImpl.MetricNested editOrNewMetricLike(V2MetricIdentifier item) { - return withNewMetricLike(getMetric() != null ? getMetric(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2ObjectMetricStatusFluentImpl that = (V2ObjectMetricStatusFluentImpl) o; - if (!java.util.Objects.equals(current, that.current)) return false; - - if (!java.util.Objects.equals(describedObject, that.describedObject)) return false; - - if (!java.util.Objects.equals(metric, that.metric)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(current, describedObject, metric, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (current != null) { sb.append("current:"); sb.append(current + ","); } - if (describedObject != null) { sb.append("describedObject:"); sb.append(describedObject + ","); } - if (metric != null) { sb.append("metric:"); sb.append(metric); } - sb.append("}"); - return sb.toString(); - } - class CurrentNestedImpl extends V2MetricValueStatusFluentImpl> implements V2ObjectMetricStatusFluentImpl.CurrentNested,Nested{ - CurrentNestedImpl(V2MetricValueStatus item) { - this.builder = new V2MetricValueStatusBuilder(this, item); - } - CurrentNestedImpl() { - this.builder = new V2MetricValueStatusBuilder(this); - } - V2MetricValueStatusBuilder builder; - public N and() { - return (N) V2ObjectMetricStatusFluentImpl.this.withCurrent(builder.build()); - } - public N endCurrent() { - return and(); - } - - } - class DescribedObjectNestedImpl extends V2CrossVersionObjectReferenceFluentImpl> implements V2ObjectMetricStatusFluentImpl.DescribedObjectNested,Nested{ - DescribedObjectNestedImpl(V2CrossVersionObjectReference item) { - this.builder = new V2CrossVersionObjectReferenceBuilder(this, item); - } - DescribedObjectNestedImpl() { - this.builder = new V2CrossVersionObjectReferenceBuilder(this); - } - V2CrossVersionObjectReferenceBuilder builder; - public N and() { - return (N) V2ObjectMetricStatusFluentImpl.this.withDescribedObject(builder.build()); - } - public N endDescribedObject() { - return and(); - } - - } - class MetricNestedImpl extends V2MetricIdentifierFluentImpl> implements V2ObjectMetricStatusFluentImpl.MetricNested,Nested{ - MetricNestedImpl(V2MetricIdentifier item) { - this.builder = new V2MetricIdentifierBuilder(this, item); - } - MetricNestedImpl() { - this.builder = new V2MetricIdentifierBuilder(this); - } - V2MetricIdentifierBuilder builder; - public N and() { - return (N) V2ObjectMetricStatusFluentImpl.this.withMetric(builder.build()); - } - public N endMetric() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceBuilder.java index 505425faa1..d86c0ac8fd 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2PodsMetricSourceBuilder extends V2PodsMetricSourceFluentImpl implements VisitableBuilder{ +public class V2PodsMetricSourceBuilder extends V2PodsMetricSourceFluent implements VisitableBuilder{ public V2PodsMetricSourceBuilder() { - this(false); - } - public V2PodsMetricSourceBuilder(Boolean validationEnabled) { - this(new V2PodsMetricSource(), validationEnabled); + this(new V2PodsMetricSource()); } + public V2PodsMetricSourceBuilder(V2PodsMetricSourceFluent fluent) { - this(fluent, false); - } - public V2PodsMetricSourceBuilder(V2PodsMetricSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V2PodsMetricSource(), validationEnabled); + this(fluent, new V2PodsMetricSource()); } + public V2PodsMetricSourceBuilder(V2PodsMetricSourceFluent fluent,V2PodsMetricSource instance) { - this(fluent, instance, false); - } - public V2PodsMetricSourceBuilder(V2PodsMetricSourceFluent fluent,V2PodsMetricSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withMetric(instance.getMetric()); - fluent.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2PodsMetricSourceBuilder(V2PodsMetricSource instance) { - this(instance,false); - } - public V2PodsMetricSourceBuilder(V2PodsMetricSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withMetric(instance.getMetric()); - this.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2PodsMetricSourceFluent fluent; - Boolean validationEnabled; + public V2PodsMetricSource build() { V2PodsMetricSource buildable = new V2PodsMetricSource(); - buildable.setMetric(fluent.getMetric()); - buildable.setTarget(fluent.getTarget()); + buildable.setMetric(fluent.buildMetric()); + buildable.setTarget(fluent.buildTarget()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceFluent.java index 23871feb80..a7028113b7 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2PodsMetricSourceFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric(); - public V2MetricIdentifier buildMetric(); - public A withMetric(V2MetricIdentifier metric); - public Boolean hasMetric(); - public V2PodsMetricSourceFluent.MetricNested withNewMetric(); - public V2PodsMetricSourceFluent.MetricNested withNewMetricLike(V2MetricIdentifier item); - public V2PodsMetricSourceFluent.MetricNested editMetric(); - public V2PodsMetricSourceFluent.MetricNested editOrNewMetric(); - public V2PodsMetricSourceFluent.MetricNested editOrNewMetricLike(V2MetricIdentifier item); - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget(); - public V2MetricTarget buildTarget(); - public A withTarget(V2MetricTarget target); - public Boolean hasTarget(); - public V2PodsMetricSourceFluent.TargetNested withNewTarget(); - public V2PodsMetricSourceFluent.TargetNested withNewTargetLike(V2MetricTarget item); - public V2PodsMetricSourceFluent.TargetNested editTarget(); - public V2PodsMetricSourceFluent.TargetNested editOrNewTarget(); - public V2PodsMetricSourceFluent.TargetNested editOrNewTargetLike(V2MetricTarget item); - public interface MetricNested extends Nested,V2MetricIdentifierFluent>{ - public N and(); - public N endMetric(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2PodsMetricSourceFluent> extends BaseFluent{ + public V2PodsMetricSourceFluent() { + } + + public V2PodsMetricSourceFluent(V2PodsMetricSource instance) { + this.copyInstance(instance); + } + private V2MetricIdentifierBuilder metric; + private V2MetricTargetBuilder target; + + protected void copyInstance(V2PodsMetricSource instance) { + instance = (instance != null ? instance : new V2PodsMetricSource()); + if (instance != null) { + this.withMetric(instance.getMetric()); + this.withTarget(instance.getTarget()); + } + } + + public V2MetricIdentifier buildMetric() { + return this.metric != null ? this.metric.build() : null; + } + + public A withMetric(V2MetricIdentifier metric) { + this._visitables.remove("metric"); + if (metric != null) { + this.metric = new V2MetricIdentifierBuilder(metric); + this._visitables.get("metric").add(this.metric); + } else { + this.metric = null; + this._visitables.get("metric").remove(this.metric); + } + return (A) this; + } + + public boolean hasMetric() { + return this.metric != null; + } + + public MetricNested withNewMetric() { + return new MetricNested(null); } - public interface TargetNested extends Nested,V2MetricTargetFluent>{ - public N and(); - public N endTarget(); + + public MetricNested withNewMetricLike(V2MetricIdentifier item) { + return new MetricNested(item); + } + + public MetricNested editMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(null)); + } + + public MetricNested editOrNewMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(new V2MetricIdentifierBuilder().build())); + } + + public MetricNested editOrNewMetricLike(V2MetricIdentifier item) { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(item)); + } + + public V2MetricTarget buildTarget() { + return this.target != null ? this.target.build() : null; + } + + public A withTarget(V2MetricTarget target) { + this._visitables.remove("target"); + if (target != null) { + this.target = new V2MetricTargetBuilder(target); + this._visitables.get("target").add(this.target); + } else { + this.target = null; + this._visitables.get("target").remove(this.target); + } + return (A) this; + } + + public boolean hasTarget() { + return this.target != null; + } + + public TargetNested withNewTarget() { + return new TargetNested(null); + } + + public TargetNested withNewTargetLike(V2MetricTarget item) { + return new TargetNested(item); + } + + public TargetNested editTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(null)); + } + + public TargetNested editOrNewTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(new V2MetricTargetBuilder().build())); + } + + public TargetNested editOrNewTargetLike(V2MetricTarget item) { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2PodsMetricSourceFluent that = (V2PodsMetricSourceFluent) o; + if (!java.util.Objects.equals(metric, that.metric)) return false; + if (!java.util.Objects.equals(target, that.target)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(metric, target, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (metric != null) { sb.append("metric:"); sb.append(metric + ","); } + if (target != null) { sb.append("target:"); sb.append(target); } + sb.append("}"); + return sb.toString(); + } + public class MetricNested extends V2MetricIdentifierFluent> implements Nested{ + MetricNested(V2MetricIdentifier item) { + this.builder = new V2MetricIdentifierBuilder(this, item); + } + V2MetricIdentifierBuilder builder; + + public N and() { + return (N) V2PodsMetricSourceFluent.this.withMetric(builder.build()); + } + + public N endMetric() { + return and(); + } + } + public class TargetNested extends V2MetricTargetFluent> implements Nested{ + TargetNested(V2MetricTarget item) { + this.builder = new V2MetricTargetBuilder(this, item); + } + V2MetricTargetBuilder builder; + + public N and() { + return (N) V2PodsMetricSourceFluent.this.withTarget(builder.build()); + } + + public N endTarget() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceFluentImpl.java deleted file mode 100644 index 8203132f6a..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricSourceFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2PodsMetricSourceFluentImpl> extends BaseFluent implements V2PodsMetricSourceFluent{ - public V2PodsMetricSourceFluentImpl() { - } - public V2PodsMetricSourceFluentImpl(V2PodsMetricSource instance) { - if (instance != null) { - this.withMetric(instance.getMetric()); - this.withTarget(instance.getTarget()); - } - } - private V2MetricIdentifierBuilder metric; - private V2MetricTargetBuilder target; - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric() { - return this.metric!=null ?this.metric.build():null; - } - public V2MetricIdentifier buildMetric() { - return this.metric!=null ?this.metric.build():null; - } - public A withMetric(V2MetricIdentifier metric) { - _visitables.get("metric").remove(this.metric); - if (metric!=null){ this.metric= new V2MetricIdentifierBuilder(metric); _visitables.get("metric").add(this.metric);} else { this.metric = null; _visitables.get("metric").remove(this.metric); } return (A) this; - } - public Boolean hasMetric() { - return this.metric != null; - } - public V2PodsMetricSourceFluentImpl.MetricNested withNewMetric() { - return new V2PodsMetricSourceFluentImpl.MetricNestedImpl(); - } - public V2PodsMetricSourceFluentImpl.MetricNested withNewMetricLike(V2MetricIdentifier item) { - return new V2PodsMetricSourceFluentImpl.MetricNestedImpl(item); - } - public V2PodsMetricSourceFluentImpl.MetricNested editMetric() { - return withNewMetricLike(getMetric()); - } - public V2PodsMetricSourceFluentImpl.MetricNested editOrNewMetric() { - return withNewMetricLike(getMetric() != null ? getMetric(): new V2MetricIdentifierBuilder().build()); - } - public V2PodsMetricSourceFluentImpl.MetricNested editOrNewMetricLike(V2MetricIdentifier item) { - return withNewMetricLike(getMetric() != null ? getMetric(): item); - } - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget() { - return this.target!=null ?this.target.build():null; - } - public V2MetricTarget buildTarget() { - return this.target!=null ?this.target.build():null; - } - public A withTarget(V2MetricTarget target) { - _visitables.get("target").remove(this.target); - if (target!=null){ this.target= new V2MetricTargetBuilder(target); _visitables.get("target").add(this.target);} else { this.target = null; _visitables.get("target").remove(this.target); } return (A) this; - } - public Boolean hasTarget() { - return this.target != null; - } - public V2PodsMetricSourceFluentImpl.TargetNested withNewTarget() { - return new V2PodsMetricSourceFluentImpl.TargetNestedImpl(); - } - public V2PodsMetricSourceFluentImpl.TargetNested withNewTargetLike(V2MetricTarget item) { - return new V2PodsMetricSourceFluentImpl.TargetNestedImpl(item); - } - public V2PodsMetricSourceFluentImpl.TargetNested editTarget() { - return withNewTargetLike(getTarget()); - } - public V2PodsMetricSourceFluentImpl.TargetNested editOrNewTarget() { - return withNewTargetLike(getTarget() != null ? getTarget(): new V2MetricTargetBuilder().build()); - } - public V2PodsMetricSourceFluentImpl.TargetNested editOrNewTargetLike(V2MetricTarget item) { - return withNewTargetLike(getTarget() != null ? getTarget(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2PodsMetricSourceFluentImpl that = (V2PodsMetricSourceFluentImpl) o; - if (!java.util.Objects.equals(metric, that.metric)) return false; - - if (!java.util.Objects.equals(target, that.target)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(metric, target, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (metric != null) { sb.append("metric:"); sb.append(metric + ","); } - if (target != null) { sb.append("target:"); sb.append(target); } - sb.append("}"); - return sb.toString(); - } - class MetricNestedImpl extends V2MetricIdentifierFluentImpl> implements V2PodsMetricSourceFluentImpl.MetricNested,Nested{ - MetricNestedImpl(V2MetricIdentifier item) { - this.builder = new V2MetricIdentifierBuilder(this, item); - } - MetricNestedImpl() { - this.builder = new V2MetricIdentifierBuilder(this); - } - V2MetricIdentifierBuilder builder; - public N and() { - return (N) V2PodsMetricSourceFluentImpl.this.withMetric(builder.build()); - } - public N endMetric() { - return and(); - } - - } - class TargetNestedImpl extends V2MetricTargetFluentImpl> implements V2PodsMetricSourceFluentImpl.TargetNested,Nested{ - TargetNestedImpl(V2MetricTarget item) { - this.builder = new V2MetricTargetBuilder(this, item); - } - TargetNestedImpl() { - this.builder = new V2MetricTargetBuilder(this); - } - V2MetricTargetBuilder builder; - public N and() { - return (N) V2PodsMetricSourceFluentImpl.this.withTarget(builder.build()); - } - public N endTarget() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusBuilder.java index a5845b8ee2..ea302ebfd1 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2PodsMetricStatusBuilder extends V2PodsMetricStatusFluentImpl implements VisitableBuilder{ +public class V2PodsMetricStatusBuilder extends V2PodsMetricStatusFluent implements VisitableBuilder{ public V2PodsMetricStatusBuilder() { - this(false); - } - public V2PodsMetricStatusBuilder(Boolean validationEnabled) { - this(new V2PodsMetricStatus(), validationEnabled); + this(new V2PodsMetricStatus()); } + public V2PodsMetricStatusBuilder(V2PodsMetricStatusFluent fluent) { - this(fluent, false); - } - public V2PodsMetricStatusBuilder(V2PodsMetricStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V2PodsMetricStatus(), validationEnabled); + this(fluent, new V2PodsMetricStatus()); } + public V2PodsMetricStatusBuilder(V2PodsMetricStatusFluent fluent,V2PodsMetricStatus instance) { - this(fluent, instance, false); - } - public V2PodsMetricStatusBuilder(V2PodsMetricStatusFluent fluent,V2PodsMetricStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCurrent(instance.getCurrent()); - fluent.withMetric(instance.getMetric()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2PodsMetricStatusBuilder(V2PodsMetricStatus instance) { - this(instance,false); - } - public V2PodsMetricStatusBuilder(V2PodsMetricStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCurrent(instance.getCurrent()); - this.withMetric(instance.getMetric()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2PodsMetricStatusFluent fluent; - Boolean validationEnabled; + public V2PodsMetricStatus build() { V2PodsMetricStatus buildable = new V2PodsMetricStatus(); - buildable.setCurrent(fluent.getCurrent()); - buildable.setMetric(fluent.getMetric()); + buildable.setCurrent(fluent.buildCurrent()); + buildable.setMetric(fluent.buildMetric()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusFluent.java index bf72f8dcfb..cf08d6e1a4 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusFluent.java @@ -1,54 +1,166 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; import io.kubernetes.client.fluent.Nested; -import java.lang.Boolean; +import java.lang.String; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; - /** - * Generated - */ -public interface V2PodsMetricStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent(); - public V2MetricValueStatus buildCurrent(); - public A withCurrent(V2MetricValueStatus current); - public Boolean hasCurrent(); - public V2PodsMetricStatusFluent.CurrentNested withNewCurrent(); - public V2PodsMetricStatusFluent.CurrentNested withNewCurrentLike(V2MetricValueStatus item); - public V2PodsMetricStatusFluent.CurrentNested editCurrent(); - public V2PodsMetricStatusFluent.CurrentNested editOrNewCurrent(); - public V2PodsMetricStatusFluent.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item); - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric(); - public V2MetricIdentifier buildMetric(); - public A withMetric(V2MetricIdentifier metric); - public Boolean hasMetric(); - public V2PodsMetricStatusFluent.MetricNested withNewMetric(); - public V2PodsMetricStatusFluent.MetricNested withNewMetricLike(V2MetricIdentifier item); - public V2PodsMetricStatusFluent.MetricNested editMetric(); - public V2PodsMetricStatusFluent.MetricNested editOrNewMetric(); - public V2PodsMetricStatusFluent.MetricNested editOrNewMetricLike(V2MetricIdentifier item); - public interface CurrentNested extends Nested,V2MetricValueStatusFluent>{ - public N and(); - public N endCurrent(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2PodsMetricStatusFluent> extends BaseFluent{ + public V2PodsMetricStatusFluent() { + } + + public V2PodsMetricStatusFluent(V2PodsMetricStatus instance) { + this.copyInstance(instance); + } + private V2MetricValueStatusBuilder current; + private V2MetricIdentifierBuilder metric; + + protected void copyInstance(V2PodsMetricStatus instance) { + instance = (instance != null ? instance : new V2PodsMetricStatus()); + if (instance != null) { + this.withCurrent(instance.getCurrent()); + this.withMetric(instance.getMetric()); + } + } + + public V2MetricValueStatus buildCurrent() { + return this.current != null ? this.current.build() : null; + } + + public A withCurrent(V2MetricValueStatus current) { + this._visitables.remove("current"); + if (current != null) { + this.current = new V2MetricValueStatusBuilder(current); + this._visitables.get("current").add(this.current); + } else { + this.current = null; + this._visitables.get("current").remove(this.current); + } + return (A) this; + } + + public boolean hasCurrent() { + return this.current != null; + } + + public CurrentNested withNewCurrent() { + return new CurrentNested(null); } - public interface MetricNested extends Nested,V2MetricIdentifierFluent>{ - public N and(); - public N endMetric(); + + public CurrentNested withNewCurrentLike(V2MetricValueStatus item) { + return new CurrentNested(item); + } + + public CurrentNested editCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(null)); + } + + public CurrentNested editOrNewCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(new V2MetricValueStatusBuilder().build())); + } + + public CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(item)); + } + + public V2MetricIdentifier buildMetric() { + return this.metric != null ? this.metric.build() : null; + } + + public A withMetric(V2MetricIdentifier metric) { + this._visitables.remove("metric"); + if (metric != null) { + this.metric = new V2MetricIdentifierBuilder(metric); + this._visitables.get("metric").add(this.metric); + } else { + this.metric = null; + this._visitables.get("metric").remove(this.metric); + } + return (A) this; + } + + public boolean hasMetric() { + return this.metric != null; + } + + public MetricNested withNewMetric() { + return new MetricNested(null); + } + + public MetricNested withNewMetricLike(V2MetricIdentifier item) { + return new MetricNested(item); + } + + public MetricNested editMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(null)); + } + + public MetricNested editOrNewMetric() { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(new V2MetricIdentifierBuilder().build())); + } + + public MetricNested editOrNewMetricLike(V2MetricIdentifier item) { + return withNewMetricLike(java.util.Optional.ofNullable(buildMetric()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2PodsMetricStatusFluent that = (V2PodsMetricStatusFluent) o; + if (!java.util.Objects.equals(current, that.current)) return false; + if (!java.util.Objects.equals(metric, that.metric)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(current, metric, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (current != null) { sb.append("current:"); sb.append(current + ","); } + if (metric != null) { sb.append("metric:"); sb.append(metric); } + sb.append("}"); + return sb.toString(); + } + public class CurrentNested extends V2MetricValueStatusFluent> implements Nested{ + CurrentNested(V2MetricValueStatus item) { + this.builder = new V2MetricValueStatusBuilder(this, item); + } + V2MetricValueStatusBuilder builder; + + public N and() { + return (N) V2PodsMetricStatusFluent.this.withCurrent(builder.build()); + } + + public N endCurrent() { + return and(); + } + } + public class MetricNested extends V2MetricIdentifierFluent> implements Nested{ + MetricNested(V2MetricIdentifier item) { + this.builder = new V2MetricIdentifierBuilder(this, item); + } + V2MetricIdentifierBuilder builder; + + public N and() { + return (N) V2PodsMetricStatusFluent.this.withMetric(builder.build()); + } + + public N endMetric() { + return and(); + } + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusFluentImpl.java deleted file mode 100644 index cfdd608c6d..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2PodsMetricStatusFluentImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2PodsMetricStatusFluentImpl> extends BaseFluent implements V2PodsMetricStatusFluent{ - public V2PodsMetricStatusFluentImpl() { - } - public V2PodsMetricStatusFluentImpl(V2PodsMetricStatus instance) { - if (instance != null) { - this.withCurrent(instance.getCurrent()); - this.withMetric(instance.getMetric()); - } - } - private V2MetricValueStatusBuilder current; - private V2MetricIdentifierBuilder metric; - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent() { - return this.current!=null ?this.current.build():null; - } - public V2MetricValueStatus buildCurrent() { - return this.current!=null ?this.current.build():null; - } - public A withCurrent(V2MetricValueStatus current) { - _visitables.get("current").remove(this.current); - if (current!=null){ this.current= new V2MetricValueStatusBuilder(current); _visitables.get("current").add(this.current);} else { this.current = null; _visitables.get("current").remove(this.current); } return (A) this; - } - public Boolean hasCurrent() { - return this.current != null; - } - public V2PodsMetricStatusFluentImpl.CurrentNested withNewCurrent() { - return new V2PodsMetricStatusFluentImpl.CurrentNestedImpl(); - } - public V2PodsMetricStatusFluentImpl.CurrentNested withNewCurrentLike(V2MetricValueStatus item) { - return new V2PodsMetricStatusFluentImpl.CurrentNestedImpl(item); - } - public V2PodsMetricStatusFluentImpl.CurrentNested editCurrent() { - return withNewCurrentLike(getCurrent()); - } - public V2PodsMetricStatusFluentImpl.CurrentNested editOrNewCurrent() { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): new V2MetricValueStatusBuilder().build()); - } - public V2PodsMetricStatusFluentImpl.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): item); - } - - /** - * This method has been deprecated, please use method buildMetric instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricIdentifier getMetric() { - return this.metric!=null ?this.metric.build():null; - } - public V2MetricIdentifier buildMetric() { - return this.metric!=null ?this.metric.build():null; - } - public A withMetric(V2MetricIdentifier metric) { - _visitables.get("metric").remove(this.metric); - if (metric!=null){ this.metric= new V2MetricIdentifierBuilder(metric); _visitables.get("metric").add(this.metric);} else { this.metric = null; _visitables.get("metric").remove(this.metric); } return (A) this; - } - public Boolean hasMetric() { - return this.metric != null; - } - public V2PodsMetricStatusFluentImpl.MetricNested withNewMetric() { - return new V2PodsMetricStatusFluentImpl.MetricNestedImpl(); - } - public V2PodsMetricStatusFluentImpl.MetricNested withNewMetricLike(V2MetricIdentifier item) { - return new V2PodsMetricStatusFluentImpl.MetricNestedImpl(item); - } - public V2PodsMetricStatusFluentImpl.MetricNested editMetric() { - return withNewMetricLike(getMetric()); - } - public V2PodsMetricStatusFluentImpl.MetricNested editOrNewMetric() { - return withNewMetricLike(getMetric() != null ? getMetric(): new V2MetricIdentifierBuilder().build()); - } - public V2PodsMetricStatusFluentImpl.MetricNested editOrNewMetricLike(V2MetricIdentifier item) { - return withNewMetricLike(getMetric() != null ? getMetric(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2PodsMetricStatusFluentImpl that = (V2PodsMetricStatusFluentImpl) o; - if (!java.util.Objects.equals(current, that.current)) return false; - - if (!java.util.Objects.equals(metric, that.metric)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(current, metric, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (current != null) { sb.append("current:"); sb.append(current + ","); } - if (metric != null) { sb.append("metric:"); sb.append(metric); } - sb.append("}"); - return sb.toString(); - } - class CurrentNestedImpl extends V2MetricValueStatusFluentImpl> implements V2PodsMetricStatusFluentImpl.CurrentNested,Nested{ - CurrentNestedImpl(V2MetricValueStatus item) { - this.builder = new V2MetricValueStatusBuilder(this, item); - } - CurrentNestedImpl() { - this.builder = new V2MetricValueStatusBuilder(this); - } - V2MetricValueStatusBuilder builder; - public N and() { - return (N) V2PodsMetricStatusFluentImpl.this.withCurrent(builder.build()); - } - public N endCurrent() { - return and(); - } - - } - class MetricNestedImpl extends V2MetricIdentifierFluentImpl> implements V2PodsMetricStatusFluentImpl.MetricNested,Nested{ - MetricNestedImpl(V2MetricIdentifier item) { - this.builder = new V2MetricIdentifierBuilder(this, item); - } - MetricNestedImpl() { - this.builder = new V2MetricIdentifierBuilder(this); - } - V2MetricIdentifierBuilder builder; - public N and() { - return (N) V2PodsMetricStatusFluentImpl.this.withMetric(builder.build()); - } - public N endMetric() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceBuilder.java index 88b1571aed..3c8f9000ef 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2ResourceMetricSourceBuilder extends V2ResourceMetricSourceFluentImpl implements VisitableBuilder{ +public class V2ResourceMetricSourceBuilder extends V2ResourceMetricSourceFluent implements VisitableBuilder{ public V2ResourceMetricSourceBuilder() { - this(false); - } - public V2ResourceMetricSourceBuilder(Boolean validationEnabled) { - this(new V2ResourceMetricSource(), validationEnabled); + this(new V2ResourceMetricSource()); } + public V2ResourceMetricSourceBuilder(V2ResourceMetricSourceFluent fluent) { - this(fluent, false); - } - public V2ResourceMetricSourceBuilder(V2ResourceMetricSourceFluent fluent,Boolean validationEnabled) { - this(fluent, new V2ResourceMetricSource(), validationEnabled); + this(fluent, new V2ResourceMetricSource()); } + public V2ResourceMetricSourceBuilder(V2ResourceMetricSourceFluent fluent,V2ResourceMetricSource instance) { - this(fluent, instance, false); - } - public V2ResourceMetricSourceBuilder(V2ResourceMetricSourceFluent fluent,V2ResourceMetricSource instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withName(instance.getName()); - fluent.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2ResourceMetricSourceBuilder(V2ResourceMetricSource instance) { - this(instance,false); - } - public V2ResourceMetricSourceBuilder(V2ResourceMetricSource instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withName(instance.getName()); - this.withTarget(instance.getTarget()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2ResourceMetricSourceFluent fluent; - Boolean validationEnabled; + public V2ResourceMetricSource build() { V2ResourceMetricSource buildable = new V2ResourceMetricSource(); buildable.setName(fluent.getName()); - buildable.setTarget(fluent.getTarget()); + buildable.setTarget(fluent.buildTarget()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceFluent.java index 3657d1e5bd..0635239f8a 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2ResourceMetricSourceFluent> extends Fluent{ - public String getName(); - public A withName(String name); - public Boolean hasName(); - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget(); - public V2MetricTarget buildTarget(); - public A withTarget(V2MetricTarget target); - public Boolean hasTarget(); - public V2ResourceMetricSourceFluent.TargetNested withNewTarget(); - public V2ResourceMetricSourceFluent.TargetNested withNewTargetLike(V2MetricTarget item); - public V2ResourceMetricSourceFluent.TargetNested editTarget(); - public V2ResourceMetricSourceFluent.TargetNested editOrNewTarget(); - public V2ResourceMetricSourceFluent.TargetNested editOrNewTargetLike(V2MetricTarget item); - public interface TargetNested extends Nested,V2MetricTargetFluent>{ - public N and(); - public N endTarget(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2ResourceMetricSourceFluent> extends BaseFluent{ + public V2ResourceMetricSourceFluent() { + } + + public V2ResourceMetricSourceFluent(V2ResourceMetricSource instance) { + this.copyInstance(instance); + } + private String name; + private V2MetricTargetBuilder target; + + protected void copyInstance(V2ResourceMetricSource instance) { + instance = (instance != null ? instance : new V2ResourceMetricSource()); + if (instance != null) { + this.withName(instance.getName()); + this.withTarget(instance.getTarget()); + } + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public V2MetricTarget buildTarget() { + return this.target != null ? this.target.build() : null; + } + + public A withTarget(V2MetricTarget target) { + this._visitables.remove("target"); + if (target != null) { + this.target = new V2MetricTargetBuilder(target); + this._visitables.get("target").add(this.target); + } else { + this.target = null; + this._visitables.get("target").remove(this.target); + } + return (A) this; + } + + public boolean hasTarget() { + return this.target != null; + } + + public TargetNested withNewTarget() { + return new TargetNested(null); } + public TargetNested withNewTargetLike(V2MetricTarget item) { + return new TargetNested(item); + } + + public TargetNested editTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(null)); + } + + public TargetNested editOrNewTarget() { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(new V2MetricTargetBuilder().build())); + } + + public TargetNested editOrNewTargetLike(V2MetricTarget item) { + return withNewTargetLike(java.util.Optional.ofNullable(buildTarget()).orElse(item)); + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2ResourceMetricSourceFluent that = (V2ResourceMetricSourceFluent) o; + if (!java.util.Objects.equals(name, that.name)) return false; + if (!java.util.Objects.equals(target, that.target)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(name, target, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (name != null) { sb.append("name:"); sb.append(name + ","); } + if (target != null) { sb.append("target:"); sb.append(target); } + sb.append("}"); + return sb.toString(); + } + public class TargetNested extends V2MetricTargetFluent> implements Nested{ + TargetNested(V2MetricTarget item) { + this.builder = new V2MetricTargetBuilder(this, item); + } + V2MetricTargetBuilder builder; + + public N and() { + return (N) V2ResourceMetricSourceFluent.this.withTarget(builder.build()); + } + + public N endTarget() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceFluentImpl.java deleted file mode 100644 index ca68b6eabd..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricSourceFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2ResourceMetricSourceFluentImpl> extends BaseFluent implements V2ResourceMetricSourceFluent{ - public V2ResourceMetricSourceFluentImpl() { - } - public V2ResourceMetricSourceFluentImpl(V2ResourceMetricSource instance) { - if (instance != null) { - this.withName(instance.getName()); - this.withTarget(instance.getTarget()); - } - } - private String name; - private V2MetricTargetBuilder target; - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - - /** - * This method has been deprecated, please use method buildTarget instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricTarget getTarget() { - return this.target!=null ?this.target.build():null; - } - public V2MetricTarget buildTarget() { - return this.target!=null ?this.target.build():null; - } - public A withTarget(V2MetricTarget target) { - _visitables.get("target").remove(this.target); - if (target!=null){ this.target= new V2MetricTargetBuilder(target); _visitables.get("target").add(this.target);} else { this.target = null; _visitables.get("target").remove(this.target); } return (A) this; - } - public Boolean hasTarget() { - return this.target != null; - } - public V2ResourceMetricSourceFluentImpl.TargetNested withNewTarget() { - return new V2ResourceMetricSourceFluentImpl.TargetNestedImpl(); - } - public V2ResourceMetricSourceFluentImpl.TargetNested withNewTargetLike(V2MetricTarget item) { - return new V2ResourceMetricSourceFluentImpl.TargetNestedImpl(item); - } - public V2ResourceMetricSourceFluentImpl.TargetNested editTarget() { - return withNewTargetLike(getTarget()); - } - public V2ResourceMetricSourceFluentImpl.TargetNested editOrNewTarget() { - return withNewTargetLike(getTarget() != null ? getTarget(): new V2MetricTargetBuilder().build()); - } - public V2ResourceMetricSourceFluentImpl.TargetNested editOrNewTargetLike(V2MetricTarget item) { - return withNewTargetLike(getTarget() != null ? getTarget(): item); - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2ResourceMetricSourceFluentImpl that = (V2ResourceMetricSourceFluentImpl) o; - if (!java.util.Objects.equals(name, that.name)) return false; - - if (!java.util.Objects.equals(target, that.target)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(name, target, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (name != null) { sb.append("name:"); sb.append(name + ","); } - if (target != null) { sb.append("target:"); sb.append(target); } - sb.append("}"); - return sb.toString(); - } - class TargetNestedImpl extends V2MetricTargetFluentImpl> implements V2ResourceMetricSourceFluentImpl.TargetNested,Nested{ - TargetNestedImpl(V2MetricTarget item) { - this.builder = new V2MetricTargetBuilder(this, item); - } - TargetNestedImpl() { - this.builder = new V2MetricTargetBuilder(this); - } - V2MetricTargetBuilder builder; - public N and() { - return (N) V2ResourceMetricSourceFluentImpl.this.withTarget(builder.build()); - } - public N endTarget() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusBuilder.java index 0e132433c8..53ea7d421e 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusBuilder.java @@ -1,49 +1,32 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class V2ResourceMetricStatusBuilder extends V2ResourceMetricStatusFluentImpl implements VisitableBuilder{ +public class V2ResourceMetricStatusBuilder extends V2ResourceMetricStatusFluent implements VisitableBuilder{ public V2ResourceMetricStatusBuilder() { - this(false); - } - public V2ResourceMetricStatusBuilder(Boolean validationEnabled) { - this(new V2ResourceMetricStatus(), validationEnabled); + this(new V2ResourceMetricStatus()); } + public V2ResourceMetricStatusBuilder(V2ResourceMetricStatusFluent fluent) { - this(fluent, false); - } - public V2ResourceMetricStatusBuilder(V2ResourceMetricStatusFluent fluent,Boolean validationEnabled) { - this(fluent, new V2ResourceMetricStatus(), validationEnabled); + this(fluent, new V2ResourceMetricStatus()); } + public V2ResourceMetricStatusBuilder(V2ResourceMetricStatusFluent fluent,V2ResourceMetricStatus instance) { - this(fluent, instance, false); - } - public V2ResourceMetricStatusBuilder(V2ResourceMetricStatusFluent fluent,V2ResourceMetricStatus instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withCurrent(instance.getCurrent()); - fluent.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public V2ResourceMetricStatusBuilder(V2ResourceMetricStatus instance) { - this(instance,false); - } - public V2ResourceMetricStatusBuilder(V2ResourceMetricStatus instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withCurrent(instance.getCurrent()); - this.withName(instance.getName()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } V2ResourceMetricStatusFluent fluent; - Boolean validationEnabled; + public V2ResourceMetricStatus build() { V2ResourceMetricStatus buildable = new V2ResourceMetricStatus(); - buildable.setCurrent(fluent.getCurrent()); + buildable.setCurrent(fluent.buildCurrent()); buildable.setName(fluent.getName()); return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusFluent.java index d9858b5910..b25742fd69 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusFluent.java @@ -1,38 +1,123 @@ package io.kubernetes.client.openapi.models; -import java.lang.Deprecated; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; import io.kubernetes.client.fluent.Nested; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface V2ResourceMetricStatusFluent> extends Fluent{ - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent(); - public V2MetricValueStatus buildCurrent(); - public A withCurrent(V2MetricValueStatus current); - public Boolean hasCurrent(); - public V2ResourceMetricStatusFluent.CurrentNested withNewCurrent(); - public V2ResourceMetricStatusFluent.CurrentNested withNewCurrentLike(V2MetricValueStatus item); - public V2ResourceMetricStatusFluent.CurrentNested editCurrent(); - public V2ResourceMetricStatusFluent.CurrentNested editOrNewCurrent(); - public V2ResourceMetricStatusFluent.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item); - public String getName(); - public A withName(String name); - public Boolean hasName(); - public interface CurrentNested extends Nested,V2MetricValueStatusFluent>{ - public N and(); - public N endCurrent(); - +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class V2ResourceMetricStatusFluent> extends BaseFluent{ + public V2ResourceMetricStatusFluent() { + } + + public V2ResourceMetricStatusFluent(V2ResourceMetricStatus instance) { + this.copyInstance(instance); + } + private V2MetricValueStatusBuilder current; + private String name; + + protected void copyInstance(V2ResourceMetricStatus instance) { + instance = (instance != null ? instance : new V2ResourceMetricStatus()); + if (instance != null) { + this.withCurrent(instance.getCurrent()); + this.withName(instance.getName()); + } + } + + public V2MetricValueStatus buildCurrent() { + return this.current != null ? this.current.build() : null; + } + + public A withCurrent(V2MetricValueStatus current) { + this._visitables.remove("current"); + if (current != null) { + this.current = new V2MetricValueStatusBuilder(current); + this._visitables.get("current").add(this.current); + } else { + this.current = null; + this._visitables.get("current").remove(this.current); + } + return (A) this; + } + + public boolean hasCurrent() { + return this.current != null; + } + + public CurrentNested withNewCurrent() { + return new CurrentNested(null); + } + + public CurrentNested withNewCurrentLike(V2MetricValueStatus item) { + return new CurrentNested(item); + } + + public CurrentNested editCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(null)); + } + + public CurrentNested editOrNewCurrent() { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(new V2MetricValueStatusBuilder().build())); } + public CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { + return withNewCurrentLike(java.util.Optional.ofNullable(buildCurrent()).orElse(item)); + } + + public String getName() { + return this.name; + } + + public A withName(String name) { + this.name = name; + return (A) this; + } + + public boolean hasName() { + return this.name != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + V2ResourceMetricStatusFluent that = (V2ResourceMetricStatusFluent) o; + if (!java.util.Objects.equals(current, that.current)) return false; + if (!java.util.Objects.equals(name, that.name)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(current, name, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (current != null) { sb.append("current:"); sb.append(current + ","); } + if (name != null) { sb.append("name:"); sb.append(name); } + sb.append("}"); + return sb.toString(); + } + public class CurrentNested extends V2MetricValueStatusFluent> implements Nested{ + CurrentNested(V2MetricValueStatus item) { + this.builder = new V2MetricValueStatusBuilder(this, item); + } + V2MetricValueStatusBuilder builder; + + public N and() { + return (N) V2ResourceMetricStatusFluent.this.withCurrent(builder.build()); + } + + public N endCurrent() { + return and(); + } + + + } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusFluentImpl.java deleted file mode 100644 index 8c6f5b1339..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/V2ResourceMetricStatusFluentImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.Nested; -import java.lang.String; -import java.lang.Deprecated; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class V2ResourceMetricStatusFluentImpl> extends BaseFluent implements V2ResourceMetricStatusFluent{ - public V2ResourceMetricStatusFluentImpl() { - } - public V2ResourceMetricStatusFluentImpl(V2ResourceMetricStatus instance) { - if (instance != null) { - this.withCurrent(instance.getCurrent()); - this.withName(instance.getName()); - } - } - private V2MetricValueStatusBuilder current; - private String name; - - /** - * This method has been deprecated, please use method buildCurrent instead. - * @return The buildable object. - */ - @Deprecated - public V2MetricValueStatus getCurrent() { - return this.current!=null ?this.current.build():null; - } - public V2MetricValueStatus buildCurrent() { - return this.current!=null ?this.current.build():null; - } - public A withCurrent(V2MetricValueStatus current) { - _visitables.get("current").remove(this.current); - if (current!=null){ this.current= new V2MetricValueStatusBuilder(current); _visitables.get("current").add(this.current);} else { this.current = null; _visitables.get("current").remove(this.current); } return (A) this; - } - public Boolean hasCurrent() { - return this.current != null; - } - public V2ResourceMetricStatusFluentImpl.CurrentNested withNewCurrent() { - return new V2ResourceMetricStatusFluentImpl.CurrentNestedImpl(); - } - public V2ResourceMetricStatusFluentImpl.CurrentNested withNewCurrentLike(V2MetricValueStatus item) { - return new V2ResourceMetricStatusFluentImpl.CurrentNestedImpl(item); - } - public V2ResourceMetricStatusFluentImpl.CurrentNested editCurrent() { - return withNewCurrentLike(getCurrent()); - } - public V2ResourceMetricStatusFluentImpl.CurrentNested editOrNewCurrent() { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): new V2MetricValueStatusBuilder().build()); - } - public V2ResourceMetricStatusFluentImpl.CurrentNested editOrNewCurrentLike(V2MetricValueStatus item) { - return withNewCurrentLike(getCurrent() != null ? getCurrent(): item); - } - public String getName() { - return this.name; - } - public A withName(String name) { - this.name=name; return (A) this; - } - public Boolean hasName() { - return this.name != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - V2ResourceMetricStatusFluentImpl that = (V2ResourceMetricStatusFluentImpl) o; - if (!java.util.Objects.equals(current, that.current)) return false; - - if (!java.util.Objects.equals(name, that.name)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(current, name, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (current != null) { sb.append("current:"); sb.append(current + ","); } - if (name != null) { sb.append("name:"); sb.append(name); } - sb.append("}"); - return sb.toString(); - } - class CurrentNestedImpl extends V2MetricValueStatusFluentImpl> implements V2ResourceMetricStatusFluentImpl.CurrentNested,Nested{ - CurrentNestedImpl(V2MetricValueStatus item) { - this.builder = new V2MetricValueStatusBuilder(this, item); - } - CurrentNestedImpl() { - this.builder = new V2MetricValueStatusBuilder(this); - } - V2MetricValueStatusBuilder builder; - public N and() { - return (N) V2ResourceMetricStatusFluentImpl.this.withCurrent(builder.build()); - } - public N endCurrent() { - return and(); - } - - } - -} \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoBuilder.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoBuilder.java index 9e124f072c..1f4d7ea941 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoBuilder.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoBuilder.java @@ -1,58 +1,26 @@ package io.kubernetes.client.openapi.models; import io.kubernetes.client.fluent.VisitableBuilder; -import java.lang.Boolean; -public class VersionInfoBuilder extends VersionInfoFluentImpl implements VisitableBuilder{ +public class VersionInfoBuilder extends VersionInfoFluent implements VisitableBuilder{ public VersionInfoBuilder() { - this(false); - } - public VersionInfoBuilder(Boolean validationEnabled) { - this(new VersionInfo(), validationEnabled); + this(new VersionInfo()); } + public VersionInfoBuilder(VersionInfoFluent fluent) { - this(fluent, false); - } - public VersionInfoBuilder(VersionInfoFluent fluent,Boolean validationEnabled) { - this(fluent, new VersionInfo(), validationEnabled); + this(fluent, new VersionInfo()); } + public VersionInfoBuilder(VersionInfoFluent fluent,VersionInfo instance) { - this(fluent, instance, false); - } - public VersionInfoBuilder(VersionInfoFluent fluent,VersionInfo instance,Boolean validationEnabled) { - this.fluent = fluent; - if (instance != null) { - fluent.withBuildDate(instance.getBuildDate()); - fluent.withCompiler(instance.getCompiler()); - fluent.withGitCommit(instance.getGitCommit()); - fluent.withGitTreeState(instance.getGitTreeState()); - fluent.withGitVersion(instance.getGitVersion()); - fluent.withGoVersion(instance.getGoVersion()); - fluent.withMajor(instance.getMajor()); - fluent.withMinor(instance.getMinor()); - fluent.withPlatform(instance.getPlatform()); - } - this.validationEnabled = validationEnabled; + this.fluent = fluent; + fluent.copyInstance(instance); } + public VersionInfoBuilder(VersionInfo instance) { - this(instance,false); - } - public VersionInfoBuilder(VersionInfo instance,Boolean validationEnabled) { - this.fluent = this; - if (instance != null) { - this.withBuildDate(instance.getBuildDate()); - this.withCompiler(instance.getCompiler()); - this.withGitCommit(instance.getGitCommit()); - this.withGitTreeState(instance.getGitTreeState()); - this.withGitVersion(instance.getGitVersion()); - this.withGoVersion(instance.getGoVersion()); - this.withMajor(instance.getMajor()); - this.withMinor(instance.getMinor()); - this.withPlatform(instance.getPlatform()); - } - this.validationEnabled = validationEnabled; + this.fluent = this; + this.copyInstance(instance); } VersionInfoFluent fluent; - Boolean validationEnabled; + public VersionInfo build() { VersionInfo buildable = new VersionInfo(); buildable.setBuildDate(fluent.getBuildDate()); @@ -67,4 +35,5 @@ public VersionInfo build() { return buildable; } + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoFluent.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoFluent.java index 565799f70f..d839407173 100644 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoFluent.java +++ b/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoFluent.java @@ -1,40 +1,199 @@ package io.kubernetes.client.openapi.models; -import com.google.gson.annotations.SerializedName; -import io.kubernetes.client.fluent.Fluent; +import java.lang.SuppressWarnings; +import io.kubernetes.client.fluent.BaseFluent; +import java.lang.Object; import java.lang.String; -import java.lang.Boolean; - /** - * Generated - */ -public interface VersionInfoFluent> extends Fluent{ - public String getBuildDate(); - public A withBuildDate(String buildDate); - public Boolean hasBuildDate(); - public String getCompiler(); - public A withCompiler(String compiler); - public Boolean hasCompiler(); - public String getGitCommit(); - public A withGitCommit(String gitCommit); - public Boolean hasGitCommit(); - public String getGitTreeState(); - public A withGitTreeState(String gitTreeState); - public Boolean hasGitTreeState(); - public String getGitVersion(); - public A withGitVersion(String gitVersion); - public Boolean hasGitVersion(); - public String getGoVersion(); - public A withGoVersion(String goVersion); - public Boolean hasGoVersion(); - public String getMajor(); - public A withMajor(String major); - public Boolean hasMajor(); - public String getMinor(); - public A withMinor(String minor); - public Boolean hasMinor(); - public String getPlatform(); - public A withPlatform(String platform); - public Boolean hasPlatform(); +/** + * Generated + */ +@SuppressWarnings("unchecked") +public class VersionInfoFluent> extends BaseFluent{ + public VersionInfoFluent() { + } + public VersionInfoFluent(VersionInfo instance) { + this.copyInstance(instance); + } + private String buildDate; + private String compiler; + private String gitCommit; + private String gitTreeState; + private String gitVersion; + private String goVersion; + private String major; + private String minor; + private String platform; + + protected void copyInstance(VersionInfo instance) { + instance = (instance != null ? instance : new VersionInfo()); + if (instance != null) { + this.withBuildDate(instance.getBuildDate()); + this.withCompiler(instance.getCompiler()); + this.withGitCommit(instance.getGitCommit()); + this.withGitTreeState(instance.getGitTreeState()); + this.withGitVersion(instance.getGitVersion()); + this.withGoVersion(instance.getGoVersion()); + this.withMajor(instance.getMajor()); + this.withMinor(instance.getMinor()); + this.withPlatform(instance.getPlatform()); + } + } + + public String getBuildDate() { + return this.buildDate; + } + + public A withBuildDate(String buildDate) { + this.buildDate = buildDate; + return (A) this; + } + + public boolean hasBuildDate() { + return this.buildDate != null; + } + + public String getCompiler() { + return this.compiler; + } + + public A withCompiler(String compiler) { + this.compiler = compiler; + return (A) this; + } + + public boolean hasCompiler() { + return this.compiler != null; + } + + public String getGitCommit() { + return this.gitCommit; + } + + public A withGitCommit(String gitCommit) { + this.gitCommit = gitCommit; + return (A) this; + } + + public boolean hasGitCommit() { + return this.gitCommit != null; + } + + public String getGitTreeState() { + return this.gitTreeState; + } + + public A withGitTreeState(String gitTreeState) { + this.gitTreeState = gitTreeState; + return (A) this; + } + + public boolean hasGitTreeState() { + return this.gitTreeState != null; + } + + public String getGitVersion() { + return this.gitVersion; + } + + public A withGitVersion(String gitVersion) { + this.gitVersion = gitVersion; + return (A) this; + } + + public boolean hasGitVersion() { + return this.gitVersion != null; + } + + public String getGoVersion() { + return this.goVersion; + } + + public A withGoVersion(String goVersion) { + this.goVersion = goVersion; + return (A) this; + } + + public boolean hasGoVersion() { + return this.goVersion != null; + } + + public String getMajor() { + return this.major; + } + + public A withMajor(String major) { + this.major = major; + return (A) this; + } + + public boolean hasMajor() { + return this.major != null; + } + + public String getMinor() { + return this.minor; + } + + public A withMinor(String minor) { + this.minor = minor; + return (A) this; + } + + public boolean hasMinor() { + return this.minor != null; + } + + public String getPlatform() { + return this.platform; + } + + public A withPlatform(String platform) { + this.platform = platform; + return (A) this; + } + + public boolean hasPlatform() { + return this.platform != null; + } + + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + VersionInfoFluent that = (VersionInfoFluent) o; + if (!java.util.Objects.equals(buildDate, that.buildDate)) return false; + if (!java.util.Objects.equals(compiler, that.compiler)) return false; + if (!java.util.Objects.equals(gitCommit, that.gitCommit)) return false; + if (!java.util.Objects.equals(gitTreeState, that.gitTreeState)) return false; + if (!java.util.Objects.equals(gitVersion, that.gitVersion)) return false; + if (!java.util.Objects.equals(goVersion, that.goVersion)) return false; + if (!java.util.Objects.equals(major, that.major)) return false; + if (!java.util.Objects.equals(minor, that.minor)) return false; + if (!java.util.Objects.equals(platform, that.platform)) return false; + return true; + } + + public int hashCode() { + return java.util.Objects.hash(buildDate, compiler, gitCommit, gitTreeState, gitVersion, goVersion, major, minor, platform, super.hashCode()); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (buildDate != null) { sb.append("buildDate:"); sb.append(buildDate + ","); } + if (compiler != null) { sb.append("compiler:"); sb.append(compiler + ","); } + if (gitCommit != null) { sb.append("gitCommit:"); sb.append(gitCommit + ","); } + if (gitTreeState != null) { sb.append("gitTreeState:"); sb.append(gitTreeState + ","); } + if (gitVersion != null) { sb.append("gitVersion:"); sb.append(gitVersion + ","); } + if (goVersion != null) { sb.append("goVersion:"); sb.append(goVersion + ","); } + if (major != null) { sb.append("major:"); sb.append(major + ","); } + if (minor != null) { sb.append("minor:"); sb.append(minor + ","); } + if (platform != null) { sb.append("platform:"); sb.append(platform); } + sb.append("}"); + return sb.toString(); + } + + } \ No newline at end of file diff --git a/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoFluentImpl.java b/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoFluentImpl.java deleted file mode 100644 index 26fa3ef3ae..0000000000 --- a/fluent/src/main/java/io/kubernetes/client/openapi/models/VersionInfoFluentImpl.java +++ /dev/null @@ -1,163 +0,0 @@ -package io.kubernetes.client.openapi.models; - -import java.lang.SuppressWarnings; -import io.kubernetes.client.fluent.BaseFluent; -import java.lang.Object; -import java.lang.String; -import java.lang.Boolean; - - /** - * Generated - */ - @SuppressWarnings(value = "unchecked") - public class VersionInfoFluentImpl> extends BaseFluent implements VersionInfoFluent{ - public VersionInfoFluentImpl() { - } - public VersionInfoFluentImpl(VersionInfo instance) { - if (instance != null) { - this.withBuildDate(instance.getBuildDate()); - this.withCompiler(instance.getCompiler()); - this.withGitCommit(instance.getGitCommit()); - this.withGitTreeState(instance.getGitTreeState()); - this.withGitVersion(instance.getGitVersion()); - this.withGoVersion(instance.getGoVersion()); - this.withMajor(instance.getMajor()); - this.withMinor(instance.getMinor()); - this.withPlatform(instance.getPlatform()); - } - } - private String buildDate; - private String compiler; - private String gitCommit; - private String gitTreeState; - private String gitVersion; - private String goVersion; - private String major; - private String minor; - private String platform; - public String getBuildDate() { - return this.buildDate; - } - public A withBuildDate(String buildDate) { - this.buildDate=buildDate; return (A) this; - } - public Boolean hasBuildDate() { - return this.buildDate != null; - } - public String getCompiler() { - return this.compiler; - } - public A withCompiler(String compiler) { - this.compiler=compiler; return (A) this; - } - public Boolean hasCompiler() { - return this.compiler != null; - } - public String getGitCommit() { - return this.gitCommit; - } - public A withGitCommit(String gitCommit) { - this.gitCommit=gitCommit; return (A) this; - } - public Boolean hasGitCommit() { - return this.gitCommit != null; - } - public String getGitTreeState() { - return this.gitTreeState; - } - public A withGitTreeState(String gitTreeState) { - this.gitTreeState=gitTreeState; return (A) this; - } - public Boolean hasGitTreeState() { - return this.gitTreeState != null; - } - public String getGitVersion() { - return this.gitVersion; - } - public A withGitVersion(String gitVersion) { - this.gitVersion=gitVersion; return (A) this; - } - public Boolean hasGitVersion() { - return this.gitVersion != null; - } - public String getGoVersion() { - return this.goVersion; - } - public A withGoVersion(String goVersion) { - this.goVersion=goVersion; return (A) this; - } - public Boolean hasGoVersion() { - return this.goVersion != null; - } - public String getMajor() { - return this.major; - } - public A withMajor(String major) { - this.major=major; return (A) this; - } - public Boolean hasMajor() { - return this.major != null; - } - public String getMinor() { - return this.minor; - } - public A withMinor(String minor) { - this.minor=minor; return (A) this; - } - public Boolean hasMinor() { - return this.minor != null; - } - public String getPlatform() { - return this.platform; - } - public A withPlatform(String platform) { - this.platform=platform; return (A) this; - } - public Boolean hasPlatform() { - return this.platform != null; - } - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - VersionInfoFluentImpl that = (VersionInfoFluentImpl) o; - if (!java.util.Objects.equals(buildDate, that.buildDate)) return false; - - if (!java.util.Objects.equals(compiler, that.compiler)) return false; - - if (!java.util.Objects.equals(gitCommit, that.gitCommit)) return false; - - if (!java.util.Objects.equals(gitTreeState, that.gitTreeState)) return false; - - if (!java.util.Objects.equals(gitVersion, that.gitVersion)) return false; - - if (!java.util.Objects.equals(goVersion, that.goVersion)) return false; - - if (!java.util.Objects.equals(major, that.major)) return false; - - if (!java.util.Objects.equals(minor, that.minor)) return false; - - if (!java.util.Objects.equals(platform, that.platform)) return false; - - return true; - } - public int hashCode() { - return java.util.Objects.hash(buildDate, compiler, gitCommit, gitTreeState, gitVersion, goVersion, major, minor, platform, super.hashCode()); - } - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - if (buildDate != null) { sb.append("buildDate:"); sb.append(buildDate + ","); } - if (compiler != null) { sb.append("compiler:"); sb.append(compiler + ","); } - if (gitCommit != null) { sb.append("gitCommit:"); sb.append(gitCommit + ","); } - if (gitTreeState != null) { sb.append("gitTreeState:"); sb.append(gitTreeState + ","); } - if (gitVersion != null) { sb.append("gitVersion:"); sb.append(gitVersion + ","); } - if (goVersion != null) { sb.append("goVersion:"); sb.append(goVersion + ","); } - if (major != null) { sb.append("major:"); sb.append(major + ","); } - if (minor != null) { sb.append("minor:"); sb.append(minor + ","); } - if (platform != null) { sb.append("platform:"); sb.append(platform); } - sb.append("}"); - return sb.toString(); - } - -} \ No newline at end of file diff --git a/kubernetes/.openapi-generator/COMMIT b/kubernetes/.openapi-generator/COMMIT index 02b7b7049c..419aeaea04 100644 --- a/kubernetes/.openapi-generator/COMMIT +++ b/kubernetes/.openapi-generator/COMMIT @@ -1,2 +1,2 @@ -Requested Commit: v4.3.1 -Actual Commit: 003165c2c254ded7817760cc1d6f97af730d9d4d +Requested Commit/Tag : v4.3.1 +Actual Commit : 003165c2c254ded7817760cc1d6f97af730d9d4d diff --git a/kubernetes/.openapi-generator/swagger.json.sha256 b/kubernetes/.openapi-generator/swagger.json.sha256 index ad6e687382..67bf3d54b9 100644 --- a/kubernetes/.openapi-generator/swagger.json.sha256 +++ b/kubernetes/.openapi-generator/swagger.json.sha256 @@ -1 +1 @@ -56d06eb52679c174306991d7b8f5d210aa4e0a1d74a85a4124e7aa61b7e7cdee \ No newline at end of file +ef3717c25d7e722a1c938c6ee368aca8b43a81e86d61e1c44656a8028c586f6e \ No newline at end of file diff --git a/kubernetes/api/openapi.yaml b/kubernetes/api/openapi.yaml index afd8f7aae8..15bb8f670c 100644 --- a/kubernetes/api/openapi.yaml +++ b/kubernetes/api/openapi.yaml @@ -1,30 +1,12 @@ openapi: 3.0.1 info: title: Kubernetes - version: release-1.27 + version: release-1.28 servers: - url: / security: - BearerToken: [] paths: - /.well-known/openid-configuration/: - get: - description: get service account issuer OpenID configuration, also known as - the 'OIDC discovery doc' - operationId: getServiceAccountIssuerOpenIDConfiguration - responses: - "200": - content: - application/json: - schema: - type: string - description: OK - "401": - content: {} - description: Unauthorized - tags: - - WellKnown - x-accepts: application/json /api/: get: description: get available API versions @@ -898,7 +880,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Namespace' required: true @@ -950,7 +932,7 @@ paths: kind: Namespace version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/bindings: post: @@ -1002,7 +984,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Binding' required: true @@ -1054,7 +1036,7 @@ paths: kind: Binding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/configmaps: delete: @@ -1178,7 +1160,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -1206,7 +1188,7 @@ paths: kind: ConfigMap version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ConfigMap @@ -1386,7 +1368,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ConfigMap' required: true @@ -1438,7 +1420,7 @@ paths: kind: ConfigMap version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/configmaps/{name}: delete: @@ -1500,7 +1482,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -1540,7 +1522,7 @@ paths: kind: ConfigMap version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ConfigMap @@ -1651,16 +1633,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -1700,7 +1673,7 @@ paths: kind: ConfigMap version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ConfigMap @@ -1757,7 +1730,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ConfigMap' required: true @@ -1797,7 +1770,7 @@ paths: kind: ConfigMap version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/endpoints: delete: @@ -1921,7 +1894,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -1949,7 +1922,7 @@ paths: kind: Endpoints version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind Endpoints @@ -2129,7 +2102,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Endpoints' required: true @@ -2181,7 +2154,7 @@ paths: kind: Endpoints version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/endpoints/{name}: delete: @@ -2243,7 +2216,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -2283,7 +2256,7 @@ paths: kind: Endpoints version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified Endpoints @@ -2394,16 +2367,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -2443,7 +2407,7 @@ paths: kind: Endpoints version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified Endpoints @@ -2500,7 +2464,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Endpoints' required: true @@ -2540,7 +2504,7 @@ paths: kind: Endpoints version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/events: delete: @@ -2664,7 +2628,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -2692,7 +2656,7 @@ paths: kind: Event version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind Event @@ -2872,7 +2836,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/core.v1.Event' required: true @@ -2924,7 +2888,7 @@ paths: kind: Event version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/events/{name}: delete: @@ -2986,7 +2950,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -3026,7 +2990,7 @@ paths: kind: Event version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified Event @@ -3137,16 +3101,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -3186,7 +3141,7 @@ paths: kind: Event version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified Event @@ -3243,7 +3198,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/core.v1.Event' required: true @@ -3283,7 +3238,7 @@ paths: kind: Event version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/limitranges: delete: @@ -3407,7 +3362,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -3435,7 +3390,7 @@ paths: kind: LimitRange version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind LimitRange @@ -3615,7 +3570,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.LimitRange' required: true @@ -3667,7 +3622,7 @@ paths: kind: LimitRange version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/limitranges/{name}: delete: @@ -3729,7 +3684,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -3769,7 +3724,7 @@ paths: kind: LimitRange version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified LimitRange @@ -3880,16 +3835,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -3929,7 +3875,7 @@ paths: kind: LimitRange version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified LimitRange @@ -3986,7 +3932,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.LimitRange' required: true @@ -4026,7 +3972,7 @@ paths: kind: LimitRange version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/persistentvolumeclaims: delete: @@ -4150,7 +4096,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -4178,7 +4124,7 @@ paths: kind: PersistentVolumeClaim version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind PersistentVolumeClaim @@ -4358,7 +4304,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PersistentVolumeClaim' required: true @@ -4410,7 +4356,7 @@ paths: kind: PersistentVolumeClaim version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}: delete: @@ -4472,7 +4418,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -4512,7 +4458,7 @@ paths: kind: PersistentVolumeClaim version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified PersistentVolumeClaim @@ -4623,16 +4569,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -4672,7 +4609,7 @@ paths: kind: PersistentVolumeClaim version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified PersistentVolumeClaim @@ -4729,7 +4666,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PersistentVolumeClaim' required: true @@ -4769,7 +4706,7 @@ paths: kind: PersistentVolumeClaim version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status: get: @@ -4881,16 +4818,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -4930,7 +4858,7 @@ paths: kind: PersistentVolumeClaim version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified PersistentVolumeClaim @@ -4987,7 +4915,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PersistentVolumeClaim' required: true @@ -5027,7 +4955,7 @@ paths: kind: PersistentVolumeClaim version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/pods: delete: @@ -5151,7 +5079,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -5179,7 +5107,7 @@ paths: kind: Pod version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind Pod @@ -5359,7 +5287,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Pod' required: true @@ -5411,7 +5339,7 @@ paths: kind: Pod version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/pods/{name}: delete: @@ -5473,7 +5401,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -5513,7 +5441,7 @@ paths: kind: Pod version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified Pod @@ -5624,16 +5552,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -5673,7 +5592,7 @@ paths: kind: Pod version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified Pod @@ -5730,7 +5649,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Pod' required: true @@ -5770,7 +5689,7 @@ paths: kind: Pod version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/pods/{name}/attach: get: @@ -5959,7 +5878,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Binding' required: true @@ -6011,7 +5930,7 @@ paths: kind: Binding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers: get: @@ -6123,16 +6042,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -6172,7 +6082,7 @@ paths: kind: Pod version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace ephemeralcontainers of the specified Pod @@ -6229,7 +6139,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Pod' required: true @@ -6269,7 +6179,7 @@ paths: kind: Pod version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/pods/{name}/eviction: post: @@ -6327,7 +6237,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Eviction' required: true @@ -6379,7 +6289,7 @@ paths: kind: Eviction version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/pods/{name}/exec: get: @@ -7416,16 +7326,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -7465,7 +7366,7 @@ paths: kind: Pod version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified Pod @@ -7522,7 +7423,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Pod' required: true @@ -7562,7 +7463,7 @@ paths: kind: Pod version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/podtemplates: delete: @@ -7686,7 +7587,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -7714,7 +7615,7 @@ paths: kind: PodTemplate version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind PodTemplate @@ -7894,7 +7795,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PodTemplate' required: true @@ -7946,7 +7847,7 @@ paths: kind: PodTemplate version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/podtemplates/{name}: delete: @@ -8008,7 +7909,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -8048,7 +7949,7 @@ paths: kind: PodTemplate version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified PodTemplate @@ -8159,16 +8060,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -8208,7 +8100,7 @@ paths: kind: PodTemplate version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified PodTemplate @@ -8265,7 +8157,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PodTemplate' required: true @@ -8305,7 +8197,7 @@ paths: kind: PodTemplate version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/replicationcontrollers: delete: @@ -8429,7 +8321,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -8457,7 +8349,7 @@ paths: kind: ReplicationController version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ReplicationController @@ -8637,7 +8529,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ReplicationController' required: true @@ -8689,7 +8581,7 @@ paths: kind: ReplicationController version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/replicationcontrollers/{name}: delete: @@ -8751,7 +8643,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -8791,7 +8683,7 @@ paths: kind: ReplicationController version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ReplicationController @@ -8902,16 +8794,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -8951,7 +8834,7 @@ paths: kind: ReplicationController version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ReplicationController @@ -9008,7 +8891,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ReplicationController' required: true @@ -9048,7 +8931,7 @@ paths: kind: ReplicationController version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale: get: @@ -9160,16 +9043,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -9209,7 +9083,7 @@ paths: kind: Scale version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace scale of the specified ReplicationController @@ -9266,7 +9140,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Scale' required: true @@ -9306,7 +9180,7 @@ paths: kind: Scale version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status: get: @@ -9418,16 +9292,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -9467,7 +9332,7 @@ paths: kind: ReplicationController version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified ReplicationController @@ -9524,7 +9389,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ReplicationController' required: true @@ -9564,7 +9429,7 @@ paths: kind: ReplicationController version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/resourcequotas: delete: @@ -9688,7 +9553,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -9716,7 +9581,7 @@ paths: kind: ResourceQuota version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ResourceQuota @@ -9896,7 +9761,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ResourceQuota' required: true @@ -9948,7 +9813,7 @@ paths: kind: ResourceQuota version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/resourcequotas/{name}: delete: @@ -10010,7 +9875,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -10050,7 +9915,7 @@ paths: kind: ResourceQuota version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ResourceQuota @@ -10161,16 +10026,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -10210,7 +10066,7 @@ paths: kind: ResourceQuota version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ResourceQuota @@ -10267,7 +10123,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ResourceQuota' required: true @@ -10307,7 +10163,7 @@ paths: kind: ResourceQuota version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/resourcequotas/{name}/status: get: @@ -10419,16 +10275,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -10468,7 +10315,7 @@ paths: kind: ResourceQuota version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified ResourceQuota @@ -10525,7 +10372,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ResourceQuota' required: true @@ -10565,7 +10412,7 @@ paths: kind: ResourceQuota version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/secrets: delete: @@ -10689,7 +10536,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -10717,7 +10564,7 @@ paths: kind: Secret version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind Secret @@ -10897,7 +10744,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Secret' required: true @@ -10949,7 +10796,7 @@ paths: kind: Secret version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/secrets/{name}: delete: @@ -11011,7 +10858,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -11051,7 +10898,7 @@ paths: kind: Secret version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified Secret @@ -11162,16 +11009,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -11211,7 +11049,7 @@ paths: kind: Secret version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified Secret @@ -11268,7 +11106,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Secret' required: true @@ -11308,7 +11146,7 @@ paths: kind: Secret version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/serviceaccounts: delete: @@ -11432,7 +11270,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -11460,7 +11298,7 @@ paths: kind: ServiceAccount version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ServiceAccount @@ -11640,7 +11478,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ServiceAccount' required: true @@ -11692,7 +11530,7 @@ paths: kind: ServiceAccount version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/serviceaccounts/{name}: delete: @@ -11754,7 +11592,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -11794,7 +11632,7 @@ paths: kind: ServiceAccount version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ServiceAccount @@ -11905,16 +11743,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -11954,7 +11783,7 @@ paths: kind: ServiceAccount version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ServiceAccount @@ -12011,7 +11840,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ServiceAccount' required: true @@ -12051,7 +11880,7 @@ paths: kind: ServiceAccount version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/serviceaccounts/{name}/token: post: @@ -12109,7 +11938,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/authentication.v1.TokenRequest' required: true @@ -12161,7 +11990,7 @@ paths: kind: TokenRequest version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/services: delete: @@ -12285,7 +12114,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -12313,7 +12142,7 @@ paths: kind: Service version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind Service @@ -12493,7 +12322,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Service' required: true @@ -12545,7 +12374,7 @@ paths: kind: Service version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/services/{name}: delete: @@ -12607,7 +12436,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -12647,7 +12476,7 @@ paths: kind: Service version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified Service @@ -12758,16 +12587,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -12807,7 +12627,7 @@ paths: kind: Service version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified Service @@ -12864,7 +12684,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Service' required: true @@ -12904,7 +12724,7 @@ paths: kind: Service version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{namespace}/services/{name}/proxy: delete: @@ -13648,16 +13468,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -13697,7 +13508,7 @@ paths: kind: Service version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified Service @@ -13754,7 +13565,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Service' required: true @@ -13794,7 +13605,7 @@ paths: kind: Service version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{name}: delete: @@ -13850,7 +13661,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -13890,7 +13701,7 @@ paths: kind: Namespace version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified Namespace @@ -13989,16 +13800,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -14038,7 +13840,7 @@ paths: kind: Namespace version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified Namespace @@ -14089,7 +13891,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Namespace' required: true @@ -14129,7 +13931,7 @@ paths: kind: Namespace version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{name}/finalize: put: @@ -14181,7 +13983,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Namespace' required: true @@ -14221,7 +14023,7 @@ paths: kind: Namespace version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/namespaces/{name}/status: get: @@ -14321,16 +14123,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -14370,7 +14163,7 @@ paths: kind: Namespace version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified Namespace @@ -14421,7 +14214,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Namespace' required: true @@ -14461,7 +14254,7 @@ paths: kind: Namespace version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/nodes: delete: @@ -14579,7 +14372,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -14607,7 +14400,7 @@ paths: kind: Node version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind Node @@ -14775,7 +14568,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Node' required: true @@ -14827,7 +14620,7 @@ paths: kind: Node version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/nodes/{name}: delete: @@ -14883,7 +14676,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -14923,7 +14716,7 @@ paths: kind: Node version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified Node @@ -15022,16 +14815,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -15071,7 +14855,7 @@ paths: kind: Node version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified Node @@ -15122,7 +14906,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Node' required: true @@ -15162,7 +14946,7 @@ paths: kind: Node version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/nodes/{name}/proxy: delete: @@ -15782,16 +15566,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -15831,7 +15606,7 @@ paths: kind: Node version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified Node @@ -15882,7 +15657,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Node' required: true @@ -15922,7 +15697,7 @@ paths: kind: Node version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/persistentvolumeclaims: get: @@ -16164,7 +15939,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -16192,7 +15967,7 @@ paths: kind: PersistentVolume version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind PersistentVolume @@ -16360,7 +16135,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PersistentVolume' required: true @@ -16412,7 +16187,7 @@ paths: kind: PersistentVolume version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/persistentvolumes/{name}: delete: @@ -16468,7 +16243,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -16508,7 +16283,7 @@ paths: kind: PersistentVolume version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified PersistentVolume @@ -16607,16 +16382,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -16656,7 +16422,7 @@ paths: kind: PersistentVolume version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified PersistentVolume @@ -16707,7 +16473,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PersistentVolume' required: true @@ -16747,7 +16513,7 @@ paths: kind: PersistentVolume version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/persistentvolumes/{name}/status: get: @@ -16847,16 +16613,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -16896,7 +16653,7 @@ paths: kind: PersistentVolume version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified PersistentVolume @@ -16947,7 +16704,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PersistentVolume' required: true @@ -16987,7 +16744,7 @@ paths: kind: PersistentVolume version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /api/v1/pods: get: @@ -18084,7 +17841,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -18112,7 +17869,7 @@ paths: kind: MutatingWebhookConfiguration version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind MutatingWebhookConfiguration @@ -18280,7 +18037,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' required: true @@ -18332,7 +18089,7 @@ paths: kind: MutatingWebhookConfiguration version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}: delete: @@ -18388,7 +18145,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -18428,7 +18185,7 @@ paths: kind: MutatingWebhookConfiguration version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified MutatingWebhookConfiguration @@ -18527,109 +18284,100 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: + application/json: schema: $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' + application/yaml: + schema: + $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' + application/yaml: + schema: + $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - admissionregistration_v1 + x-kubernetes-action: patch + x-kubernetes-group-version-kind: + group: admissionregistration.k8s.io + kind: MutatingWebhookConfiguration + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + put: + description: replace the specified MutatingWebhookConfiguration + operationId: replaceMutatingWebhookConfiguration + parameters: + - description: name of the MutatingWebhookConfiguration + in: path + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + requestBody: + content: + application/json: schema: - $ref: '#/components/schemas/v1.Patch' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' - application/yaml: - schema: - $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' - application/yaml: - schema: - $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - admissionregistration_v1 - x-kubernetes-action: patch - x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io - kind: MutatingWebhookConfiguration - version: v1 - x-codegen-request-body-name: body - x-contentType: application/json-patch+json - x-accepts: application/json - put: - description: replace the specified MutatingWebhookConfiguration - operationId: replaceMutatingWebhookConfiguration - parameters: - - description: name of the MutatingWebhookConfiguration - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' + $ref: '#/components/schemas/v1.MutatingWebhookConfiguration' required: true responses: "200": @@ -18667,7 +18415,7 @@ paths: kind: MutatingWebhookConfiguration version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations: delete: @@ -18785,7 +18533,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -18813,7 +18561,7 @@ paths: kind: ValidatingWebhookConfiguration version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ValidatingWebhookConfiguration @@ -18981,7 +18729,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ValidatingWebhookConfiguration' required: true @@ -19033,7 +18781,7 @@ paths: kind: ValidatingWebhookConfiguration version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}: delete: @@ -19089,7 +18837,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -19129,7 +18877,7 @@ paths: kind: ValidatingWebhookConfiguration version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ValidatingWebhookConfiguration @@ -19228,16 +18976,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -19277,7 +19016,7 @@ paths: kind: ValidatingWebhookConfiguration version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ValidatingWebhookConfiguration @@ -19328,7 +19067,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ValidatingWebhookConfiguration' required: true @@ -19368,7 +19107,7 @@ paths: kind: ValidatingWebhookConfiguration version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/admissionregistration.k8s.io/v1/watch/mutatingwebhookconfigurations: {} /apis/admissionregistration.k8s.io/v1/watch/mutatingwebhookconfigurations/{name}: {} @@ -19513,7 +19252,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -19541,7 +19280,7 @@ paths: kind: ValidatingAdmissionPolicy version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ValidatingAdmissionPolicy @@ -19709,7 +19448,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicy' required: true @@ -19761,7 +19500,7 @@ paths: kind: ValidatingAdmissionPolicy version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}: delete: @@ -19817,7 +19556,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -19857,7 +19596,7 @@ paths: kind: ValidatingAdmissionPolicy version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ValidatingAdmissionPolicy @@ -19956,16 +19695,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -20005,7 +19735,7 @@ paths: kind: ValidatingAdmissionPolicy version: v1alpha1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ValidatingAdmissionPolicy @@ -20056,7 +19786,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicy' required: true @@ -20096,7 +19826,7 @@ paths: kind: ValidatingAdmissionPolicy version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status: get: @@ -20196,16 +19926,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -20245,7 +19966,7 @@ paths: kind: ValidatingAdmissionPolicy version: v1alpha1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified ValidatingAdmissionPolicy @@ -20296,7 +20017,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicy' required: true @@ -20336,7 +20057,7 @@ paths: kind: ValidatingAdmissionPolicy version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings: delete: @@ -20454,7 +20175,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -20482,7 +20203,7 @@ paths: kind: ValidatingAdmissionPolicyBinding version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ValidatingAdmissionPolicyBinding @@ -20650,7 +20371,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicyBinding' required: true @@ -20702,7 +20423,7 @@ paths: kind: ValidatingAdmissionPolicyBinding version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}: delete: @@ -20758,7 +20479,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -20798,7 +20519,7 @@ paths: kind: ValidatingAdmissionPolicyBinding version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ValidatingAdmissionPolicyBinding @@ -20897,16 +20618,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -20946,7 +20658,7 @@ paths: kind: ValidatingAdmissionPolicyBinding version: v1alpha1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ValidatingAdmissionPolicyBinding @@ -20997,7 +20709,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicyBinding' required: true @@ -21037,36 +20749,13 @@ paths: kind: ValidatingAdmissionPolicyBinding version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies: {} /apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies/{name}: {} /apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings: {} /apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings/{name}: {} - /apis/apiextensions.k8s.io/: - get: - description: get information of a group - operationId: getAPIGroup - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIGroup' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - apiextensions - x-accepts: application/json - /apis/apiextensions.k8s.io/v1/: + /apis/admissionregistration.k8s.io/v1beta1/: get: description: get available resources operationId: getAPIResources @@ -21087,12 +20776,12 @@ paths: content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-accepts: application/json - /apis/apiextensions.k8s.io/v1/customresourcedefinitions: + /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies: delete: - description: delete collection of CustomResourceDefinition - operationId: deleteCollectionCustomResourceDefinition + description: delete collection of ValidatingAdmissionPolicy + operationId: deleteCollectionValidatingAdmissionPolicy parameters: - description: If 'true', then the output is pretty printed. in: query @@ -21205,7 +20894,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -21226,18 +20915,18 @@ paths: content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind CustomResourceDefinition - operationId: listCustomResourceDefinition + description: list or watch objects of kind ValidatingAdmissionPolicy + operationId: listValidatingAdmissionPolicy parameters: - description: If 'true', then the output is pretty printed. in: query @@ -21333,34 +21022,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinitionList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyList' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinitionList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinitionList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinitionList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinitionList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyList' description: OK "401": content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-accepts: application/json post: - description: create a CustomResourceDefinition - operationId: createCustomResourceDefinition + description: create a ValidatingAdmissionPolicy + operationId: createValidatingAdmissionPolicy parameters: - description: If 'true', then the output is pretty printed. in: query @@ -21401,66 +21090,66 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: Accepted "401": content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}: + /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}: delete: - description: delete a CustomResourceDefinition - operationId: deleteCustomResourceDefinition + description: delete a ValidatingAdmissionPolicy + operationId: deleteValidatingAdmissionPolicy parameters: - - description: name of the CustomResourceDefinition + - description: name of the ValidatingAdmissionPolicy in: path name: name required: true @@ -21509,7 +21198,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -21542,20 +21231,20 @@ paths: content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified CustomResourceDefinition - operationId: readCustomResourceDefinition + description: read the specified ValidatingAdmissionPolicy + operationId: readValidatingAdmissionPolicy parameters: - - description: name of the CustomResourceDefinition + - description: name of the ValidatingAdmissionPolicy in: path name: name required: true @@ -21571,30 +21260,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: OK "401": content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-accepts: application/json patch: - description: partially update the specified CustomResourceDefinition - operationId: patchCustomResourceDefinition + description: partially update the specified ValidatingAdmissionPolicy + operationId: patchValidatingAdmissionPolicy parameters: - - description: name of the CustomResourceDefinition + - description: name of the ValidatingAdmissionPolicy in: path name: name required: true @@ -21648,16 +21337,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -21666,44 +21346,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: Created "401": content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified CustomResourceDefinition - operationId: replaceCustomResourceDefinition + description: replace the specified ValidatingAdmissionPolicy + operationId: replaceValidatingAdmissionPolicy parameters: - - description: name of the CustomResourceDefinition + - description: name of the ValidatingAdmissionPolicy in: path name: name required: true @@ -21748,54 +21428,54 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: Created "401": content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status: + /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status: get: - description: read status of the specified CustomResourceDefinition - operationId: readCustomResourceDefinitionStatus + description: read status of the specified ValidatingAdmissionPolicy + operationId: readValidatingAdmissionPolicyStatus parameters: - - description: name of the CustomResourceDefinition + - description: name of the ValidatingAdmissionPolicy in: path name: name required: true @@ -21811,30 +21491,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: OK "401": content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-accepts: application/json patch: - description: partially update status of the specified CustomResourceDefinition - operationId: patchCustomResourceDefinitionStatus + description: partially update status of the specified ValidatingAdmissionPolicy + operationId: patchValidatingAdmissionPolicyStatus parameters: - - description: name of the CustomResourceDefinition + - description: name of the ValidatingAdmissionPolicy in: path name: name required: true @@ -21888,16 +21568,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -21906,44 +21577,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: Created "401": content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified CustomResourceDefinition - operationId: replaceCustomResourceDefinitionStatus + description: replace status of the specified ValidatingAdmissionPolicy + operationId: replaceValidatingAdmissionPolicyStatus parameters: - - description: name of the CustomResourceDefinition + - description: name of the ValidatingAdmissionPolicy in: path name: name required: true @@ -21988,100 +21659,52 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/yaml: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CustomResourceDefinition' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' description: Created "401": content: {} description: Unauthorized tags: - - apiextensions_v1 + - admissionregistration_v1beta1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /apis/apiextensions.k8s.io/v1/watch/customresourcedefinitions: {} - /apis/apiextensions.k8s.io/v1/watch/customresourcedefinitions/{name}: {} - /apis/apiregistration.k8s.io/: - get: - description: get information of a group - operationId: getAPIGroup - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIGroup' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - apiregistration + x-contentType: application/json x-accepts: application/json - /apis/apiregistration.k8s.io/v1/: - get: - description: get available resources - operationId: getAPIResources - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - apiregistration_v1 - x-accepts: application/json - /apis/apiregistration.k8s.io/v1/apiservices: + /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings: delete: - description: delete collection of APIService - operationId: deleteCollectionAPIService + description: delete collection of ValidatingAdmissionPolicyBinding + operationId: deleteCollectionValidatingAdmissionPolicyBinding parameters: - description: If 'true', then the output is pretty printed. in: query @@ -22194,7 +21817,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -22215,18 +21838,18 @@ paths: content: {} description: Unauthorized tags: - - apiregistration_v1 + - admissionregistration_v1beta1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyBinding + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind APIService - operationId: listAPIService + description: list or watch objects of kind ValidatingAdmissionPolicyBinding + operationId: listValidatingAdmissionPolicyBinding parameters: - description: If 'true', then the output is pretty printed. in: query @@ -22322,34 +21945,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.APIServiceList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBindingList' application/yaml: schema: - $ref: '#/components/schemas/v1.APIServiceList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBindingList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIServiceList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBindingList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.APIServiceList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBindingList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.APIServiceList' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBindingList' description: OK "401": content: {} description: Unauthorized tags: - - apiregistration_v1 + - admissionregistration_v1beta1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyBinding + version: v1beta1 x-accepts: application/json post: - description: create an APIService - operationId: createAPIService + description: create a ValidatingAdmissionPolicyBinding + operationId: createValidatingAdmissionPolicyBinding parameters: - description: If 'true', then the output is pretty printed. in: query @@ -22390,66 +22013,66 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/yaml: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/yaml: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/yaml: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' description: Accepted "401": content: {} description: Unauthorized tags: - - apiregistration_v1 + - admissionregistration_v1beta1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyBinding + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apiregistration.k8s.io/v1/apiservices/{name}: + /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}: delete: - description: delete an APIService - operationId: deleteAPIService + description: delete a ValidatingAdmissionPolicyBinding + operationId: deleteValidatingAdmissionPolicyBinding parameters: - - description: name of the APIService + - description: name of the ValidatingAdmissionPolicyBinding in: path name: name required: true @@ -22498,7 +22121,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -22531,260 +22154,20 @@ paths: content: {} description: Unauthorized tags: - - apiregistration_v1 + - admissionregistration_v1beta1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - get: - description: read the specified APIService - operationId: readAPIService - parameters: - - description: name of the APIService - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIService' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIService' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIService' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - apiregistration_v1 - x-kubernetes-action: get - x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 - x-accepts: application/json - patch: - description: partially update the specified APIService - operationId: patchAPIService - parameters: - - description: name of the APIService - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. - in: query - name: force - schema: - type: boolean - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: - schema: - $ref: '#/components/schemas/v1.Patch' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIService' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIService' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIService' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIService' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIService' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIService' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - apiregistration_v1 - x-kubernetes-action: patch - x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 - x-codegen-request-body-name: body - x-contentType: application/json-patch+json - x-accepts: application/json - put: - description: replace the specified APIService - operationId: replaceAPIService - parameters: - - description: name of the APIService - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/v1.APIService' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIService' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIService' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIService' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIService' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIService' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIService' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - apiregistration_v1 - x-kubernetes-action: put - x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyBinding + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apiregistration.k8s.io/v1/apiservices/{name}/status: get: - description: read status of the specified APIService - operationId: readAPIServiceStatus + description: read the specified ValidatingAdmissionPolicyBinding + operationId: readValidatingAdmissionPolicyBinding parameters: - - description: name of the APIService + - description: name of the ValidatingAdmissionPolicyBinding in: path name: name required: true @@ -22800,30 +22183,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/yaml: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' description: OK "401": content: {} description: Unauthorized tags: - - apiregistration_v1 + - admissionregistration_v1beta1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyBinding + version: v1beta1 x-accepts: application/json patch: - description: partially update status of the specified APIService - operationId: patchAPIServiceStatus + description: partially update the specified ValidatingAdmissionPolicyBinding + operationId: patchValidatingAdmissionPolicyBinding parameters: - - description: name of the APIService + - description: name of the ValidatingAdmissionPolicyBinding in: path name: name required: true @@ -22877,16 +22260,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -22895,44 +22269,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/yaml: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/yaml: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' description: Created "401": content: {} description: Unauthorized tags: - - apiregistration_v1 + - admissionregistration_v1beta1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyBinding + version: v1beta1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified APIService - operationId: replaceAPIServiceStatus + description: replace the specified ValidatingAdmissionPolicyBinding + operationId: replaceValidatingAdmissionPolicyBinding parameters: - - description: name of the APIService + - description: name of the ValidatingAdmissionPolicyBinding in: path name: name required: true @@ -22977,51 +22351,53 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/yaml: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/yaml: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIService' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' description: Created "401": content: {} description: Unauthorized tags: - - apiregistration_v1 + - admissionregistration_v1beta1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: apiregistration.k8s.io - kind: APIService - version: v1 + group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyBinding + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apiregistration.k8s.io/v1/watch/apiservices: {} - /apis/apiregistration.k8s.io/v1/watch/apiservices/{name}: {} - /apis/apps/: + /apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicies: {} + /apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicies/{name}: {} + /apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicybindings: {} + /apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicybindings/{name}: {} + /apis/apiextensions.k8s.io/: get: description: get information of a group operationId: getAPIGroup @@ -23042,9 +22418,9 @@ paths: content: {} description: Unauthorized tags: - - apps + - apiextensions x-accepts: application/json - /apis/apps/v1/: + /apis/apiextensions.k8s.io/v1/: get: description: get available resources operationId: getAPIResources @@ -23065,391 +22441,13 @@ paths: content: {} description: Unauthorized tags: - - apps_v1 - x-accepts: application/json - /apis/apps/v1/controllerrevisions: - get: - description: list or watch objects of kind ControllerRevision - operationId: listControllerRevisionForAllNamespaces - parameters: - - description: allowWatchBookmarks requests watch events with type "BOOKMARK". - Servers that do not implement bookmarks may ignore this flag and bookmarks - are sent at the server's discretion. Clients should not assume bookmarks - are returned at any specific interval, nor may they assume the server will - send any BOOKMARK event during a session. If this is not a watch, this field - is ignored. - in: query - name: allowWatchBookmarks - schema: - type: boolean - - description: |- - The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". - - This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - in: query - name: continue - schema: - type: string - - description: A selector to restrict the list of returned objects by their - fields. Defaults to everything. - in: query - name: fieldSelector - schema: - type: string - - description: A selector to restrict the list of returned objects by their - labels. Defaults to everything. - in: query - name: labelSelector - schema: - type: string - - description: |- - limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. - - The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - in: query - name: limit - schema: - type: integer - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: |- - resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersion - schema: - type: string - - description: |- - resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersionMatch - schema: - type: string - - description: |- - `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. - - When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan - is interpreted as "data at least as new as the provided `resourceVersion`" - and the bookmark event is send when the state is synced - to a `resourceVersion` at least as fresh as the one provided by the ListOptions. - If `resourceVersion` is unset, this is interpreted as "consistent read" and the - bookmark event is send when the state is synced at least to the moment - when request started being processed. - - `resourceVersionMatch` set to any other value or unset - Invalid error is returned. - - Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. - in: query - name: sendInitialEvents - schema: - type: boolean - - description: Timeout for the list/watch call. This limits the duration of - the call, regardless of any activity or inactivity. - in: query - name: timeoutSeconds - schema: - type: integer - - description: Watch for changes to the described resources and return them - as a stream of add, update, and remove notifications. Specify resourceVersion. - in: query - name: watch - schema: - type: boolean - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' - application/json;stream=watch: - schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' - application/vnd.kubernetes.protobuf;stream=watch: - schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - apps_v1 - x-kubernetes-action: list - x-kubernetes-group-version-kind: - group: apps - kind: ControllerRevision - version: v1 - x-accepts: application/json - /apis/apps/v1/daemonsets: - get: - description: list or watch objects of kind DaemonSet - operationId: listDaemonSetForAllNamespaces - parameters: - - description: allowWatchBookmarks requests watch events with type "BOOKMARK". - Servers that do not implement bookmarks may ignore this flag and bookmarks - are sent at the server's discretion. Clients should not assume bookmarks - are returned at any specific interval, nor may they assume the server will - send any BOOKMARK event during a session. If this is not a watch, this field - is ignored. - in: query - name: allowWatchBookmarks - schema: - type: boolean - - description: |- - The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". - - This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - in: query - name: continue - schema: - type: string - - description: A selector to restrict the list of returned objects by their - fields. Defaults to everything. - in: query - name: fieldSelector - schema: - type: string - - description: A selector to restrict the list of returned objects by their - labels. Defaults to everything. - in: query - name: labelSelector - schema: - type: string - - description: |- - limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. - - The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - in: query - name: limit - schema: - type: integer - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: |- - resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersion - schema: - type: string - - description: |- - resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersionMatch - schema: - type: string - - description: |- - `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. - - When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan - is interpreted as "data at least as new as the provided `resourceVersion`" - and the bookmark event is send when the state is synced - to a `resourceVersion` at least as fresh as the one provided by the ListOptions. - If `resourceVersion` is unset, this is interpreted as "consistent read" and the - bookmark event is send when the state is synced at least to the moment - when request started being processed. - - `resourceVersionMatch` set to any other value or unset - Invalid error is returned. - - Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. - in: query - name: sendInitialEvents - schema: - type: boolean - - description: Timeout for the list/watch call. This limits the duration of - the call, regardless of any activity or inactivity. - in: query - name: timeoutSeconds - schema: - type: integer - - description: Watch for changes to the described resources and return them - as a stream of add, update, and remove notifications. Specify resourceVersion. - in: query - name: watch - schema: - type: boolean - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.DaemonSetList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.DaemonSetList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.DaemonSetList' - application/json;stream=watch: - schema: - $ref: '#/components/schemas/v1.DaemonSetList' - application/vnd.kubernetes.protobuf;stream=watch: - schema: - $ref: '#/components/schemas/v1.DaemonSetList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - apps_v1 - x-kubernetes-action: list - x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet - version: v1 - x-accepts: application/json - /apis/apps/v1/deployments: - get: - description: list or watch objects of kind Deployment - operationId: listDeploymentForAllNamespaces - parameters: - - description: allowWatchBookmarks requests watch events with type "BOOKMARK". - Servers that do not implement bookmarks may ignore this flag and bookmarks - are sent at the server's discretion. Clients should not assume bookmarks - are returned at any specific interval, nor may they assume the server will - send any BOOKMARK event during a session. If this is not a watch, this field - is ignored. - in: query - name: allowWatchBookmarks - schema: - type: boolean - - description: |- - The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". - - This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - in: query - name: continue - schema: - type: string - - description: A selector to restrict the list of returned objects by their - fields. Defaults to everything. - in: query - name: fieldSelector - schema: - type: string - - description: A selector to restrict the list of returned objects by their - labels. Defaults to everything. - in: query - name: labelSelector - schema: - type: string - - description: |- - limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. - - The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - in: query - name: limit - schema: - type: integer - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: |- - resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersion - schema: - type: string - - description: |- - resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersionMatch - schema: - type: string - - description: |- - `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. - - When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan - is interpreted as "data at least as new as the provided `resourceVersion`" - and the bookmark event is send when the state is synced - to a `resourceVersion` at least as fresh as the one provided by the ListOptions. - If `resourceVersion` is unset, this is interpreted as "consistent read" and the - bookmark event is send when the state is synced at least to the moment - when request started being processed. - - `resourceVersionMatch` set to any other value or unset - Invalid error is returned. - - Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. - in: query - name: sendInitialEvents - schema: - type: boolean - - description: Timeout for the list/watch call. This limits the duration of - the call, regardless of any activity or inactivity. - in: query - name: timeoutSeconds - schema: - type: integer - - description: Watch for changes to the described resources and return them - as a stream of add, update, and remove notifications. Specify resourceVersion. - in: query - name: watch - schema: - type: boolean - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.DeploymentList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.DeploymentList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.DeploymentList' - application/json;stream=watch: - schema: - $ref: '#/components/schemas/v1.DeploymentList' - application/vnd.kubernetes.protobuf;stream=watch: - schema: - $ref: '#/components/schemas/v1.DeploymentList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - apps_v1 - x-kubernetes-action: list - x-kubernetes-group-version-kind: - group: apps - kind: Deployment - version: v1 + - apiextensions_v1 x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/controllerrevisions: + /apis/apiextensions.k8s.io/v1/customresourcedefinitions: delete: - description: delete collection of ControllerRevision - operationId: deleteCollectionNamespacedControllerRevision + description: delete collection of CustomResourceDefinition + operationId: deleteCollectionCustomResourceDefinition parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -23561,7 +22559,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -23582,25 +22580,19 @@ paths: content: {} description: Unauthorized tags: - - apps_v1 + - apiextensions_v1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: apps - kind: ControllerRevision + group: apiextensions.k8s.io + kind: CustomResourceDefinition version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind ControllerRevision - operationId: listNamespacedControllerRevision + description: list or watch objects of kind CustomResourceDefinition + operationId: listCustomResourceDefinition parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -23695,41 +22687,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' + $ref: '#/components/schemas/v1.CustomResourceDefinitionList' application/yaml: schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' + $ref: '#/components/schemas/v1.CustomResourceDefinitionList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' + $ref: '#/components/schemas/v1.CustomResourceDefinitionList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' + $ref: '#/components/schemas/v1.CustomResourceDefinitionList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.ControllerRevisionList' + $ref: '#/components/schemas/v1.CustomResourceDefinitionList' description: OK "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiextensions_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: apps - kind: ControllerRevision + group: apiextensions.k8s.io + kind: CustomResourceDefinition version: v1 x-accepts: application/json post: - description: create a ControllerRevision - operationId: createNamespacedControllerRevision + description: create a CustomResourceDefinition + operationId: createCustomResourceDefinition parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -23769,77 +22755,71 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/yaml: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/yaml: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/yaml: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' description: Accepted "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiextensions_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: apps - kind: ControllerRevision + group: apiextensions.k8s.io + kind: CustomResourceDefinition version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}: + /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}: delete: - description: delete a ControllerRevision - operationId: deleteNamespacedControllerRevision + description: delete a CustomResourceDefinition + operationId: deleteCustomResourceDefinition parameters: - - description: name of the ControllerRevision + - description: name of the CustomResourceDefinition in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -23883,7 +22863,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -23916,31 +22896,25 @@ paths: content: {} description: Unauthorized tags: - - apps_v1 + - apiextensions_v1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: apps - kind: ControllerRevision + group: apiextensions.k8s.io + kind: CustomResourceDefinition version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified ControllerRevision - operationId: readNamespacedControllerRevision + description: read the specified CustomResourceDefinition + operationId: readCustomResourceDefinition parameters: - - description: name of the ControllerRevision + - description: name of the CustomResourceDefinition in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -23951,41 +22925,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/yaml: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' description: OK "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiextensions_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: apps - kind: ControllerRevision + group: apiextensions.k8s.io + kind: CustomResourceDefinition version: v1 x-accepts: application/json patch: - description: partially update the specified ControllerRevision - operationId: patchNamespacedControllerRevision + description: partially update the specified CustomResourceDefinition + operationId: patchCustomResourceDefinition parameters: - - description: name of the ControllerRevision + - description: name of the CustomResourceDefinition in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24034,16 +23002,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -24052,55 +23011,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/yaml: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/yaml: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' description: Created "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiextensions_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: apps - kind: ControllerRevision + group: apiextensions.k8s.io + kind: CustomResourceDefinition version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified ControllerRevision - operationId: replaceNamespacedControllerRevision + description: replace the specified CustomResourceDefinition + operationId: replaceCustomResourceDefinition parameters: - - description: name of the ControllerRevision + - description: name of the CustomResourceDefinition in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24140,59 +23093,332 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/yaml: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/yaml: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ControllerRevision' + $ref: '#/components/schemas/v1.CustomResourceDefinition' description: Created "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiextensions_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: apps - kind: ControllerRevision + group: apiextensions.k8s.io + kind: CustomResourceDefinition version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/daemonsets: - delete: - description: delete collection of DaemonSet - operationId: deleteCollectionNamespacedDaemonSet - parameters: - - description: object name and auth scope, such as for teams and projects + /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status: + get: + description: read status of the specified CustomResourceDefinition + operationId: readCustomResourceDefinitionStatus + parameters: + - description: name of the CustomResourceDefinition in: path - name: namespace + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apiextensions_v1 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: apiextensions.k8s.io + kind: CustomResourceDefinition + version: v1 + x-accepts: application/json + patch: + description: partially update status of the specified CustomResourceDefinition + operationId: patchCustomResourceDefinitionStatus + parameters: + - description: name of the CustomResourceDefinition + in: path + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. + in: query + name: force + schema: + type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Patch' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - apiextensions_v1 + x-kubernetes-action: patch + x-kubernetes-group-version-kind: + group: apiextensions.k8s.io + kind: CustomResourceDefinition + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + put: + description: replace status of the specified CustomResourceDefinition + operationId: replaceCustomResourceDefinitionStatus + parameters: + - description: name of the CustomResourceDefinition + in: path + name: name required: true schema: type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CustomResourceDefinition' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - apiextensions_v1 + x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: apiextensions.k8s.io + kind: CustomResourceDefinition + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/apiextensions.k8s.io/v1/watch/customresourcedefinitions: {} + /apis/apiextensions.k8s.io/v1/watch/customresourcedefinitions/{name}: {} + /apis/apiregistration.k8s.io/: + get: + description: get information of a group + operationId: getAPIGroup + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIGroup' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apiregistration + x-accepts: application/json + /apis/apiregistration.k8s.io/v1/: + get: + description: get available resources + operationId: getAPIResources + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apiregistration_v1 + x-accepts: application/json + /apis/apiregistration.k8s.io/v1/apiservices: + delete: + description: delete collection of APIService + operationId: deleteCollectionAPIService + parameters: - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24304,7 +23530,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -24325,25 +23551,19 @@ paths: content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet + group: apiregistration.k8s.io + kind: APIService version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind DaemonSet - operationId: listNamespacedDaemonSet + description: list or watch objects of kind APIService + operationId: listAPIService parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24438,41 +23658,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSetList' + $ref: '#/components/schemas/v1.APIServiceList' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSetList' + $ref: '#/components/schemas/v1.APIServiceList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSetList' + $ref: '#/components/schemas/v1.APIServiceList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.DaemonSetList' + $ref: '#/components/schemas/v1.APIServiceList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.DaemonSetList' + $ref: '#/components/schemas/v1.APIServiceList' description: OK "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet + group: apiregistration.k8s.io + kind: APIService version: v1 x-accepts: application/json post: - description: create a DaemonSet - operationId: createNamespacedDaemonSet + description: create an APIService + operationId: createAPIService parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24512,77 +23726,71 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: Accepted "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet + group: apiregistration.k8s.io + kind: APIService version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}: + /apis/apiregistration.k8s.io/v1/apiservices/{name}: delete: - description: delete a DaemonSet - operationId: deleteNamespacedDaemonSet + description: delete an APIService + operationId: deleteAPIService parameters: - - description: name of the DaemonSet + - description: name of the APIService in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24626,7 +23834,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -24659,31 +23867,25 @@ paths: content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet + group: apiregistration.k8s.io + kind: APIService version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified DaemonSet - operationId: readNamespacedDaemonSet + description: read the specified APIService + operationId: readAPIService parameters: - - description: name of the DaemonSet + - description: name of the APIService in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24694,41 +23896,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: OK "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet + group: apiregistration.k8s.io + kind: APIService version: v1 x-accepts: application/json patch: - description: partially update the specified DaemonSet - operationId: patchNamespacedDaemonSet + description: partially update the specified APIService + operationId: patchAPIService parameters: - - description: name of the DaemonSet + - description: name of the APIService in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24777,16 +23973,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -24795,55 +23982,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: Created "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet + group: apiregistration.k8s.io + kind: APIService version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified DaemonSet - operationId: replaceNamespacedDaemonSet + description: replace the specified APIService + operationId: replaceAPIService parameters: - - description: name of the DaemonSet + - description: name of the APIService in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24883,65 +24064,59 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: Created "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet + group: apiregistration.k8s.io + kind: APIService version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status: + /apis/apiregistration.k8s.io/v1/apiservices/{name}/status: get: - description: read status of the specified DaemonSet - operationId: readNamespacedDaemonSetStatus + description: read status of the specified APIService + operationId: readAPIServiceStatus parameters: - - description: name of the DaemonSet + - description: name of the APIService in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -24952,41 +24127,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: OK "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet + group: apiregistration.k8s.io + kind: APIService version: v1 x-accepts: application/json patch: - description: partially update status of the specified DaemonSet - operationId: patchNamespacedDaemonSetStatus + description: partially update status of the specified APIService + operationId: patchAPIServiceStatus parameters: - - description: name of the DaemonSet + - description: name of the APIService in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -25035,16 +24204,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -25053,55 +24213,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: Created "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: apps - kind: DaemonSet + group: apiregistration.k8s.io + kind: APIService version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified DaemonSet - operationId: replaceNamespacedDaemonSetStatus + description: replace status of the specified APIService + operationId: replaceAPIServiceStatus parameters: - - description: name of the DaemonSet + - description: name of the APIService in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -25141,52 +24295,472 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/yaml: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DaemonSet' + $ref: '#/components/schemas/v1.APIService' description: Created "401": content: {} description: Unauthorized tags: - - apps_v1 + - apiregistration_v1 x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: apiregistration.k8s.io + kind: APIService + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/apiregistration.k8s.io/v1/watch/apiservices: {} + /apis/apiregistration.k8s.io/v1/watch/apiservices/{name}: {} + /apis/apps/: + get: + description: get information of a group + operationId: getAPIGroup + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIGroup' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apps + x-accepts: application/json + /apis/apps/v1/: + get: + description: get available resources + operationId: getAPIResources + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-accepts: application/json + /apis/apps/v1/controllerrevisions: + get: + description: list or watch objects of kind ControllerRevision + operationId: listControllerRevisionForAllNamespaces + parameters: + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. + in: query + name: allowWatchBookmarks + schema: + type: boolean + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. + in: query + name: watch + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.ControllerRevisionList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.ControllerRevisionList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.ControllerRevisionList' + application/json;stream=watch: + schema: + $ref: '#/components/schemas/v1.ControllerRevisionList' + application/vnd.kubernetes.protobuf;stream=watch: + schema: + $ref: '#/components/schemas/v1.ControllerRevisionList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-kubernetes-action: list + x-kubernetes-group-version-kind: + group: apps + kind: ControllerRevision + version: v1 + x-accepts: application/json + /apis/apps/v1/daemonsets: + get: + description: list or watch objects of kind DaemonSet + operationId: listDaemonSetForAllNamespaces + parameters: + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. + in: query + name: allowWatchBookmarks + schema: + type: boolean + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. + in: query + name: watch + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + application/json;stream=watch: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + application/vnd.kubernetes.protobuf;stream=watch: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-kubernetes-action: list x-kubernetes-group-version-kind: group: apps kind: DaemonSet version: v1 - x-codegen-request-body-name: body - x-contentType: '*/*' x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/deployments: + /apis/apps/v1/deployments: + get: + description: list or watch objects of kind Deployment + operationId: listDeploymentForAllNamespaces + parameters: + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. + in: query + name: allowWatchBookmarks + schema: + type: boolean + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. + in: query + name: watch + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DeploymentList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.DeploymentList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.DeploymentList' + application/json;stream=watch: + schema: + $ref: '#/components/schemas/v1.DeploymentList' + application/vnd.kubernetes.protobuf;stream=watch: + schema: + $ref: '#/components/schemas/v1.DeploymentList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-kubernetes-action: list + x-kubernetes-group-version-kind: + group: apps + kind: Deployment + version: v1 + x-accepts: application/json + /apis/apps/v1/namespaces/{namespace}/controllerrevisions: delete: - description: delete collection of Deployment - operationId: deleteCollectionNamespacedDeployment + description: delete collection of ControllerRevision + operationId: deleteCollectionNamespacedControllerRevision parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -25305,7 +24879,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -25330,14 +24904,14 @@ paths: x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: ControllerRevision version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind Deployment - operationId: listNamespacedDeployment + description: list or watch objects of kind ControllerRevision + operationId: listNamespacedControllerRevision parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -25439,19 +25013,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.DeploymentList' + $ref: '#/components/schemas/v1.ControllerRevisionList' application/yaml: schema: - $ref: '#/components/schemas/v1.DeploymentList' + $ref: '#/components/schemas/v1.ControllerRevisionList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.DeploymentList' + $ref: '#/components/schemas/v1.ControllerRevisionList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.DeploymentList' + $ref: '#/components/schemas/v1.ControllerRevisionList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.DeploymentList' + $ref: '#/components/schemas/v1.ControllerRevisionList' description: OK "401": content: {} @@ -25461,12 +25035,12 @@ paths: x-kubernetes-action: list x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: ControllerRevision version: v1 x-accepts: application/json post: - description: create a Deployment - operationId: createNamespacedDeployment + description: create a ControllerRevision + operationId: createNamespacedControllerRevision parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -25513,46 +25087,46 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' description: Accepted "401": content: {} @@ -25562,17 +25136,17 @@ paths: x-kubernetes-action: post x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: ControllerRevision version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/deployments/{name}: + /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}: delete: - description: delete a Deployment - operationId: deleteNamespacedDeployment - parameters: - - description: name of the Deployment + description: delete a ControllerRevision + operationId: deleteNamespacedControllerRevision + parameters: + - description: name of the ControllerRevision in: path name: name required: true @@ -25627,7 +25201,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -25664,16 +25238,16 @@ paths: x-kubernetes-action: delete x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: ControllerRevision version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified Deployment - operationId: readNamespacedDeployment + description: read the specified ControllerRevision + operationId: readNamespacedControllerRevision parameters: - - description: name of the Deployment + - description: name of the ControllerRevision in: path name: name required: true @@ -25695,13 +25269,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' description: OK "401": content: {} @@ -25711,14 +25285,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: ControllerRevision version: v1 x-accepts: application/json patch: - description: partially update the specified Deployment - operationId: patchNamespacedDeployment + description: partially update the specified ControllerRevision + operationId: patchNamespacedControllerRevision parameters: - - description: name of the Deployment + - description: name of the ControllerRevision in: path name: name required: true @@ -25778,16 +25352,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -25796,25 +25361,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' description: Created "401": content: {} @@ -25824,16 +25389,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: ControllerRevision version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified Deployment - operationId: replaceNamespacedDeployment + description: replace the specified ControllerRevision + operationId: replaceNamespacedControllerRevision parameters: - - description: name of the Deployment + - description: name of the ControllerRevision in: path name: name required: true @@ -25884,34 +25449,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.ControllerRevision' description: Created "401": content: {} @@ -25921,17 +25486,401 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: ControllerRevision version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json + x-accepts: application/json + /apis/apps/v1/namespaces/{namespace}/daemonsets: + delete: + description: delete collection of DaemonSet + operationId: deleteCollectionNamespacedDaemonSet + parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: The duration in seconds before the object should be deleted. + Value must be non-negative integer. The value zero indicates delete immediately. + If this value is nil, the default grace period for the specified type will + be used. Defaults to a per object value if not specified. zero means delete + immediately. + in: query + name: gracePeriodSeconds + schema: + type: integer + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: 'Deprecated: please use the PropagationPolicy, this field will + be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, + the "orphan" finalizer will be added to/removed from the object''s finalizers + list. Either this field or PropagationPolicy may be set, but not both.' + in: query + name: orphanDependents + schema: + type: boolean + - description: 'Whether and how garbage collection will be performed. Either + this field or OrphanDependents may be set, but not both. The default policy + is decided by the existing finalizer set in the metadata.finalizers and + the resource-specific default policy. Acceptable values are: ''Orphan'' + - orphan the dependents; ''Background'' - allow the garbage collector to + delete the dependents in the background; ''Foreground'' - a cascading policy + that deletes all dependents in the foreground.' + in: query + name: propagationPolicy + schema: + type: string + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DeleteOptions' + required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Status' + application/yaml: + schema: + $ref: '#/components/schemas/v1.Status' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.Status' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-kubernetes-action: deletecollection + x-kubernetes-group-version-kind: + group: apps + kind: DaemonSet + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale: get: - description: read scale of the specified Deployment - operationId: readNamespacedDeploymentScale + description: list or watch objects of kind DaemonSet + operationId: listNamespacedDaemonSet parameters: - - description: name of the Scale + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. + in: query + name: allowWatchBookmarks + schema: + type: boolean + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. + in: query + name: watch + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + application/json;stream=watch: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + application/vnd.kubernetes.protobuf;stream=watch: + schema: + $ref: '#/components/schemas/v1.DaemonSetList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-kubernetes-action: list + x-kubernetes-group-version-kind: + group: apps + kind: DaemonSet + version: v1 + x-accepts: application/json + post: + description: create a DaemonSet + operationId: createNamespacedDaemonSet + parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + application/yaml: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + application/yaml: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + description: Created + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + application/yaml: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + description: Accepted + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-kubernetes-action: post + x-kubernetes-group-version-kind: + group: apps + kind: DaemonSet + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}: + delete: + description: delete a DaemonSet + operationId: deleteNamespacedDaemonSet + parameters: + - description: name of the DaemonSet in: path name: name required: true @@ -25948,18 +25897,119 @@ paths: name: pretty schema: type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: The duration in seconds before the object should be deleted. + Value must be non-negative integer. The value zero indicates delete immediately. + If this value is nil, the default grace period for the specified type will + be used. Defaults to a per object value if not specified. zero means delete + immediately. + in: query + name: gracePeriodSeconds + schema: + type: integer + - description: 'Deprecated: please use the PropagationPolicy, this field will + be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, + the "orphan" finalizer will be added to/removed from the object''s finalizers + list. Either this field or PropagationPolicy may be set, but not both.' + in: query + name: orphanDependents + schema: + type: boolean + - description: 'Whether and how garbage collection will be performed. Either + this field or OrphanDependents may be set, but not both. The default policy + is decided by the existing finalizer set in the metadata.finalizers and + the resource-specific default policy. Acceptable values are: ''Orphan'' + - orphan the dependents; ''Background'' - allow the garbage collector to + delete the dependents in the background; ''Foreground'' - a cascading policy + that deletes all dependents in the foreground.' + in: query + name: propagationPolicy + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DeleteOptions' + required: false responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.Status' application/yaml: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.Status' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.Status' + description: OK + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Status' + application/yaml: + schema: + $ref: '#/components/schemas/v1.Status' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.Status' + description: Accepted + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-kubernetes-action: delete + x-kubernetes-group-version-kind: + group: apps + kind: DaemonSet + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + get: + description: read the specified DaemonSet + operationId: readNamespacedDaemonSet + parameters: + - description: name of the DaemonSet + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + application/yaml: + schema: + $ref: '#/components/schemas/v1.DaemonSet' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.DaemonSet' description: OK "401": content: {} @@ -25968,15 +26018,15 @@ paths: - apps_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: autoscaling - kind: Scale + group: apps + kind: DaemonSet version: v1 x-accepts: application/json patch: - description: partially update scale of the specified Deployment - operationId: patchNamespacedDeploymentScale + description: partially update the specified DaemonSet + operationId: patchNamespacedDaemonSet parameters: - - description: name of the Scale + - description: name of the DaemonSet in: path name: name required: true @@ -26036,16 +26086,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -26054,25 +26095,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' application/yaml: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' application/yaml: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' description: Created "401": content: {} @@ -26081,17 +26122,17 @@ paths: - apps_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: autoscaling - kind: Scale + group: apps + kind: DaemonSet version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace scale of the specified Deployment - operationId: replaceNamespacedDeploymentScale + description: replace the specified DaemonSet + operationId: replaceNamespacedDaemonSet parameters: - - description: name of the Scale + - description: name of the DaemonSet in: path name: name required: true @@ -26142,34 +26183,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' application/yaml: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' application/yaml: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Scale' + $ref: '#/components/schemas/v1.DaemonSet' description: Created "401": content: {} @@ -26178,18 +26219,18 @@ paths: - apps_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: autoscaling - kind: Scale + group: apps + kind: DaemonSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status: + /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status: get: - description: read status of the specified Deployment - operationId: readNamespacedDeploymentStatus + description: read status of the specified DaemonSet + operationId: readNamespacedDaemonSetStatus parameters: - - description: name of the Deployment + - description: name of the DaemonSet in: path name: name required: true @@ -26211,13 +26252,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' description: OK "401": content: {} @@ -26227,14 +26268,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: DaemonSet version: v1 x-accepts: application/json patch: - description: partially update status of the specified Deployment - operationId: patchNamespacedDeploymentStatus + description: partially update status of the specified DaemonSet + operationId: patchNamespacedDaemonSetStatus parameters: - - description: name of the Deployment + - description: name of the DaemonSet in: path name: name required: true @@ -26294,16 +26335,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -26312,25 +26344,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' description: Created "401": content: {} @@ -26340,16 +26372,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: DaemonSet version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified Deployment - operationId: replaceNamespacedDeploymentStatus + description: replace status of the specified DaemonSet + operationId: replaceNamespacedDaemonSetStatus parameters: - - description: name of the Deployment + - description: name of the DaemonSet in: path name: name required: true @@ -26400,34 +26432,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/yaml: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Deployment' + $ref: '#/components/schemas/v1.DaemonSet' description: Created "401": content: {} @@ -26437,15 +26469,15 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: apps - kind: Deployment + kind: DaemonSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/replicasets: + /apis/apps/v1/namespaces/{namespace}/deployments: delete: - description: delete collection of ReplicaSet - operationId: deleteCollectionNamespacedReplicaSet + description: delete collection of Deployment + operationId: deleteCollectionNamespacedDeployment parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -26564,7 +26596,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -26589,14 +26621,14 @@ paths: x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind ReplicaSet - operationId: listNamespacedReplicaSet + description: list or watch objects of kind Deployment + operationId: listNamespacedDeployment parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -26698,19 +26730,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSetList' + $ref: '#/components/schemas/v1.DeploymentList' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSetList' + $ref: '#/components/schemas/v1.DeploymentList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSetList' + $ref: '#/components/schemas/v1.DeploymentList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.ReplicaSetList' + $ref: '#/components/schemas/v1.DeploymentList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.ReplicaSetList' + $ref: '#/components/schemas/v1.DeploymentList' description: OK "401": content: {} @@ -26720,12 +26752,12 @@ paths: x-kubernetes-action: list x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-accepts: application/json post: - description: create a ReplicaSet - operationId: createNamespacedReplicaSet + description: create a Deployment + operationId: createNamespacedDeployment parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -26772,46 +26804,46 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: Accepted "401": content: {} @@ -26821,17 +26853,17 @@ paths: x-kubernetes-action: post x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/replicasets/{name}: + /apis/apps/v1/namespaces/{namespace}/deployments/{name}: delete: - description: delete a ReplicaSet - operationId: deleteNamespacedReplicaSet + description: delete a Deployment + operationId: deleteNamespacedDeployment parameters: - - description: name of the ReplicaSet + - description: name of the Deployment in: path name: name required: true @@ -26886,7 +26918,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -26923,16 +26955,16 @@ paths: x-kubernetes-action: delete x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified ReplicaSet - operationId: readNamespacedReplicaSet + description: read the specified Deployment + operationId: readNamespacedDeployment parameters: - - description: name of the ReplicaSet + - description: name of the Deployment in: path name: name required: true @@ -26954,13 +26986,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: OK "401": content: {} @@ -26970,14 +27002,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-accepts: application/json patch: - description: partially update the specified ReplicaSet - operationId: patchNamespacedReplicaSet + description: partially update the specified Deployment + operationId: patchNamespacedDeployment parameters: - - description: name of the ReplicaSet + - description: name of the Deployment in: path name: name required: true @@ -27037,16 +27069,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -27055,25 +27078,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: Created "401": content: {} @@ -27083,16 +27106,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified ReplicaSet - operationId: replaceNamespacedReplicaSet + description: replace the specified Deployment + operationId: replaceNamespacedDeployment parameters: - - description: name of the ReplicaSet + - description: name of the Deployment in: path name: name required: true @@ -27143,34 +27166,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: Created "401": content: {} @@ -27180,15 +27203,15 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale: + /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale: get: - description: read scale of the specified ReplicaSet - operationId: readNamespacedReplicaSetScale + description: read scale of the specified Deployment + operationId: readNamespacedDeploymentScale parameters: - description: name of the Scale in: path @@ -27232,8 +27255,8 @@ paths: version: v1 x-accepts: application/json patch: - description: partially update scale of the specified ReplicaSet - operationId: patchNamespacedReplicaSetScale + description: partially update scale of the specified Deployment + operationId: patchNamespacedDeploymentScale parameters: - description: name of the Scale in: path @@ -27295,16 +27318,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -27344,11 +27358,11 @@ paths: kind: Scale version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace scale of the specified ReplicaSet - operationId: replaceNamespacedReplicaSetScale + description: replace scale of the specified Deployment + operationId: replaceNamespacedDeploymentScale parameters: - description: name of the Scale in: path @@ -27401,7 +27415,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Scale' required: true @@ -27441,14 +27455,14 @@ paths: kind: Scale version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status: + /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status: get: - description: read status of the specified ReplicaSet - operationId: readNamespacedReplicaSetStatus + description: read status of the specified Deployment + operationId: readNamespacedDeploymentStatus parameters: - - description: name of the ReplicaSet + - description: name of the Deployment in: path name: name required: true @@ -27470,13 +27484,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: OK "401": content: {} @@ -27486,14 +27500,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-accepts: application/json patch: - description: partially update status of the specified ReplicaSet - operationId: patchNamespacedReplicaSetStatus + description: partially update status of the specified Deployment + operationId: patchNamespacedDeploymentStatus parameters: - - description: name of the ReplicaSet + - description: name of the Deployment in: path name: name required: true @@ -27553,16 +27567,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -27571,25 +27576,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: Created "401": content: {} @@ -27599,16 +27604,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified ReplicaSet - operationId: replaceNamespacedReplicaSetStatus + description: replace status of the specified Deployment + operationId: replaceNamespacedDeploymentStatus parameters: - - description: name of the ReplicaSet + - description: name of the Deployment in: path name: name required: true @@ -27659,34 +27664,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSet' + $ref: '#/components/schemas/v1.Deployment' description: Created "401": content: {} @@ -27696,15 +27701,15 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: Deployment version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/statefulsets: + /apis/apps/v1/namespaces/{namespace}/replicasets: delete: - description: delete collection of StatefulSet - operationId: deleteCollectionNamespacedStatefulSet + description: delete collection of ReplicaSet + operationId: deleteCollectionNamespacedReplicaSet parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -27823,7 +27828,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -27848,14 +27853,14 @@ paths: x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind StatefulSet - operationId: listNamespacedStatefulSet + description: list or watch objects of kind ReplicaSet + operationId: listNamespacedReplicaSet parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -27957,19 +27962,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSetList' + $ref: '#/components/schemas/v1.ReplicaSetList' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSetList' + $ref: '#/components/schemas/v1.ReplicaSetList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSetList' + $ref: '#/components/schemas/v1.ReplicaSetList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.StatefulSetList' + $ref: '#/components/schemas/v1.ReplicaSetList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.StatefulSetList' + $ref: '#/components/schemas/v1.ReplicaSetList' description: OK "401": content: {} @@ -27979,12 +27984,12 @@ paths: x-kubernetes-action: list x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-accepts: application/json post: - description: create a StatefulSet - operationId: createNamespacedStatefulSet + description: create a ReplicaSet + operationId: createNamespacedReplicaSet parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -28031,46 +28036,46 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: Accepted "401": content: {} @@ -28080,17 +28085,17 @@ paths: x-kubernetes-action: post x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}: + /apis/apps/v1/namespaces/{namespace}/replicasets/{name}: delete: - description: delete a StatefulSet - operationId: deleteNamespacedStatefulSet + description: delete a ReplicaSet + operationId: deleteNamespacedReplicaSet parameters: - - description: name of the StatefulSet + - description: name of the ReplicaSet in: path name: name required: true @@ -28145,7 +28150,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -28182,16 +28187,16 @@ paths: x-kubernetes-action: delete x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified StatefulSet - operationId: readNamespacedStatefulSet + description: read the specified ReplicaSet + operationId: readNamespacedReplicaSet parameters: - - description: name of the StatefulSet + - description: name of the ReplicaSet in: path name: name required: true @@ -28213,13 +28218,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: OK "401": content: {} @@ -28229,14 +28234,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-accepts: application/json patch: - description: partially update the specified StatefulSet - operationId: patchNamespacedStatefulSet + description: partially update the specified ReplicaSet + operationId: patchNamespacedReplicaSet parameters: - - description: name of the StatefulSet + - description: name of the ReplicaSet in: path name: name required: true @@ -28296,16 +28301,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -28314,25 +28310,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: Created "401": content: {} @@ -28342,16 +28338,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified StatefulSet - operationId: replaceNamespacedStatefulSet + description: replace the specified ReplicaSet + operationId: replaceNamespacedReplicaSet parameters: - - description: name of the StatefulSet + - description: name of the ReplicaSet in: path name: name required: true @@ -28402,34 +28398,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: Created "401": content: {} @@ -28439,15 +28435,15 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale: + /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale: get: - description: read scale of the specified StatefulSet - operationId: readNamespacedStatefulSetScale + description: read scale of the specified ReplicaSet + operationId: readNamespacedReplicaSetScale parameters: - description: name of the Scale in: path @@ -28491,8 +28487,8 @@ paths: version: v1 x-accepts: application/json patch: - description: partially update scale of the specified StatefulSet - operationId: patchNamespacedStatefulSetScale + description: partially update scale of the specified ReplicaSet + operationId: patchNamespacedReplicaSetScale parameters: - description: name of the Scale in: path @@ -28554,16 +28550,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -28603,11 +28590,11 @@ paths: kind: Scale version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace scale of the specified StatefulSet - operationId: replaceNamespacedStatefulSetScale + description: replace scale of the specified ReplicaSet + operationId: replaceNamespacedReplicaSetScale parameters: - description: name of the Scale in: path @@ -28660,7 +28647,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Scale' required: true @@ -28700,14 +28687,14 @@ paths: kind: Scale version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status: + /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status: get: - description: read status of the specified StatefulSet - operationId: readNamespacedStatefulSetStatus + description: read status of the specified ReplicaSet + operationId: readNamespacedReplicaSetStatus parameters: - - description: name of the StatefulSet + - description: name of the ReplicaSet in: path name: name required: true @@ -28729,13 +28716,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: OK "401": content: {} @@ -28745,14 +28732,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-accepts: application/json patch: - description: partially update status of the specified StatefulSet - operationId: patchNamespacedStatefulSetStatus + description: partially update status of the specified ReplicaSet + operationId: patchNamespacedReplicaSetStatus parameters: - - description: name of the StatefulSet + - description: name of the ReplicaSet in: path name: name required: true @@ -28812,16 +28799,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -28830,25 +28808,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: Created "401": content: {} @@ -28858,16 +28836,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified StatefulSet - operationId: replaceNamespacedStatefulSetStatus + description: replace status of the specified ReplicaSet + operationId: replaceNamespacedReplicaSetStatus parameters: - - description: name of the StatefulSet + - description: name of the ReplicaSet in: path name: name required: true @@ -28918,34 +28896,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/yaml: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.StatefulSet' + $ref: '#/components/schemas/v1.ReplicaSet' description: Created "401": content: {} @@ -28955,26 +28933,27 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: apps - kind: StatefulSet + kind: ReplicaSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/replicasets: - get: - description: list or watch objects of kind ReplicaSet - operationId: listReplicaSetForAllNamespaces + /apis/apps/v1/namespaces/{namespace}/statefulsets: + delete: + description: delete collection of StatefulSet + operationId: deleteCollectionNamespacedStatefulSet parameters: - - description: allowWatchBookmarks requests watch events with type "BOOKMARK". - Servers that do not implement bookmarks may ignore this flag and bookmarks - are sent at the server's discretion. Clients should not assume bookmarks - are returned at any specific interval, nor may they assume the server will - send any BOOKMARK event during a session. If this is not a watch, this field - is ignored. + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. in: query - name: allowWatchBookmarks + name: pretty schema: - type: boolean + type: string - description: |- The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". @@ -28983,12 +28962,29 @@ paths: name: continue schema: type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string - description: A selector to restrict the list of returned objects by their fields. Defaults to everything. in: query name: fieldSelector schema: type: string + - description: The duration in seconds before the object should be deleted. + Value must be non-negative integer. The value zero indicates delete immediately. + If this value is nil, the default grace period for the specified type will + be used. Defaults to a per object value if not specified. zero means delete + immediately. + in: query + name: gracePeriodSeconds + schema: + type: integer - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. in: query @@ -29003,9 +28999,23 @@ paths: name: limit schema: type: integer - - description: If 'true', then the output is pretty printed. + - description: 'Deprecated: please use the PropagationPolicy, this field will + be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, + the "orphan" finalizer will be added to/removed from the object''s finalizers + list. Either this field or PropagationPolicy may be set, but not both.' in: query - name: pretty + name: orphanDependents + schema: + type: boolean + - description: 'Whether and how garbage collection will be performed. Either + this field or OrphanDependents may be set, but not both. The default policy + is decided by the existing finalizer set in the metadata.finalizers and + the resource-specific default policy. Acceptable values are: ''Orphan'' + - orphan the dependents; ''Background'' - allow the garbage collector to + delete the dependents in the background; ''Foreground'' - a cascading policy + that deletes all dependents in the foreground.' + in: query + name: propagationPolicy schema: type: string - description: |- @@ -29048,47 +29058,53 @@ paths: name: timeoutSeconds schema: type: integer - - description: Watch for changes to the described resources and return them - as a stream of add, update, and remove notifications. Specify resourceVersion. - in: query - name: watch - schema: - type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DeleteOptions' + required: false responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.ReplicaSetList' + $ref: '#/components/schemas/v1.Status' application/yaml: schema: - $ref: '#/components/schemas/v1.ReplicaSetList' + $ref: '#/components/schemas/v1.Status' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.ReplicaSetList' - application/json;stream=watch: - schema: - $ref: '#/components/schemas/v1.ReplicaSetList' - application/vnd.kubernetes.protobuf;stream=watch: - schema: - $ref: '#/components/schemas/v1.ReplicaSetList' + $ref: '#/components/schemas/v1.Status' description: OK "401": content: {} description: Unauthorized tags: - apps_v1 - x-kubernetes-action: list + x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: apps - kind: ReplicaSet + kind: StatefulSet version: v1 + x-codegen-request-body-name: body + x-contentType: application/json x-accepts: application/json - /apis/apps/v1/statefulsets: get: description: list or watch objects of kind StatefulSet - operationId: listStatefulSetForAllNamespaces + operationId: listNamespacedStatefulSet parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string - description: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks @@ -29127,11 +29143,6 @@ paths: name: limit schema: type: integer - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - description: |- resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. @@ -29208,72 +29219,21 @@ paths: kind: StatefulSet version: v1 x-accepts: application/json - /apis/apps/v1/watch/controllerrevisions: {} - /apis/apps/v1/watch/daemonsets: {} - /apis/apps/v1/watch/deployments: {} - /apis/apps/v1/watch/namespaces/{namespace}/controllerrevisions: {} - /apis/apps/v1/watch/namespaces/{namespace}/controllerrevisions/{name}: {} - /apis/apps/v1/watch/namespaces/{namespace}/daemonsets: {} - /apis/apps/v1/watch/namespaces/{namespace}/daemonsets/{name}: {} - /apis/apps/v1/watch/namespaces/{namespace}/deployments: {} - /apis/apps/v1/watch/namespaces/{namespace}/deployments/{name}: {} - /apis/apps/v1/watch/namespaces/{namespace}/replicasets: {} - /apis/apps/v1/watch/namespaces/{namespace}/replicasets/{name}: {} - /apis/apps/v1/watch/namespaces/{namespace}/statefulsets: {} - /apis/apps/v1/watch/namespaces/{namespace}/statefulsets/{name}: {} - /apis/apps/v1/watch/replicasets: {} - /apis/apps/v1/watch/statefulsets: {} - /apis/authentication.k8s.io/: - get: - description: get information of a group - operationId: getAPIGroup - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIGroup' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - authentication - x-accepts: application/json - /apis/authentication.k8s.io/v1/: - get: - description: get available resources - operationId: getAPIResources - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - authentication_v1 - x-accepts: application/json - /apis/authentication.k8s.io/v1/tokenreviews: post: - description: create a TokenReview - operationId: createTokenReview + description: create a StatefulSet + operationId: createNamespacedStatefulSet parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -29306,95 +29266,230 @@ paths: name: fieldValidation schema: type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.TokenReview' + $ref: '#/components/schemas/v1.StatefulSet' description: Accepted "401": content: {} description: Unauthorized tags: - - authentication_v1 + - apps_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: authentication.k8s.io - kind: TokenReview + group: apps + kind: StatefulSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json + x-accepts: application/json + /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}: + delete: + description: delete a StatefulSet + operationId: deleteNamespacedStatefulSet + parameters: + - description: name of the StatefulSet + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: The duration in seconds before the object should be deleted. + Value must be non-negative integer. The value zero indicates delete immediately. + If this value is nil, the default grace period for the specified type will + be used. Defaults to a per object value if not specified. zero means delete + immediately. + in: query + name: gracePeriodSeconds + schema: + type: integer + - description: 'Deprecated: please use the PropagationPolicy, this field will + be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, + the "orphan" finalizer will be added to/removed from the object''s finalizers + list. Either this field or PropagationPolicy may be set, but not both.' + in: query + name: orphanDependents + schema: + type: boolean + - description: 'Whether and how garbage collection will be performed. Either + this field or OrphanDependents may be set, but not both. The default policy + is decided by the existing finalizer set in the metadata.finalizers and + the resource-specific default policy. Acceptable values are: ''Orphan'' + - orphan the dependents; ''Background'' - allow the garbage collector to + delete the dependents in the background; ''Foreground'' - a cascading policy + that deletes all dependents in the foreground.' + in: query + name: propagationPolicy + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DeleteOptions' + required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Status' + application/yaml: + schema: + $ref: '#/components/schemas/v1.Status' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.Status' + description: OK + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Status' + application/yaml: + schema: + $ref: '#/components/schemas/v1.Status' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.Status' + description: Accepted + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-kubernetes-action: delete + x-kubernetes-group-version-kind: + group: apps + kind: StatefulSet + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json x-accepts: application/json - /apis/authentication.k8s.io/v1alpha1/: get: - description: get available resources - operationId: getAPIResources + description: read the specified StatefulSet + operationId: readNamespacedStatefulSet + parameters: + - description: name of the StatefulSet + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.APIResourceList' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1.APIResourceList' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIResourceList' + $ref: '#/components/schemas/v1.StatefulSet' description: OK "401": content: {} description: Unauthorized tags: - - authentication_v1alpha1 + - apps_v1 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: apps + kind: StatefulSet + version: v1 x-accepts: application/json - /apis/authentication.k8s.io/v1alpha1/selfsubjectreviews: - post: - description: create a SelfSubjectReview - operationId: createSelfSubjectReview + patch: + description: partially update the specified StatefulSet + operationId: patchNamespacedStatefulSet parameters: + - description: name of the StatefulSet + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -29406,6 +29501,8 @@ paths: - description: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). in: query name: fieldManager schema: @@ -29427,95 +29524,78 @@ paths: name: fieldValidation schema: type: string - - description: If 'true', then the output is pretty printed. + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. in: query - name: pretty + name: force schema: - type: string + type: boolean requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + $ref: '#/components/schemas/v1.Patch' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' description: Created - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' - application/yaml: - schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' - description: Accepted "401": content: {} description: Unauthorized tags: - - authentication_v1alpha1 - x-kubernetes-action: post + - apps_v1 + x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: authentication.k8s.io - kind: SelfSubjectReview - version: v1alpha1 + group: apps + kind: StatefulSet + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /apis/authentication.k8s.io/v1beta1/: - get: - description: get available resources - operationId: getAPIResources - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - authentication_v1beta1 + x-contentType: application/json x-accepts: application/json - /apis/authentication.k8s.io/v1beta1/selfsubjectreviews: - post: - description: create a SelfSubjectReview - operationId: createSelfSubjectReview + put: + description: replace the specified StatefulSet + operationId: replaceNamespacedStatefulSet parameters: + - description: name of the StatefulSet + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -29548,118 +29628,117 @@ paths: name: fieldValidation schema: type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + $ref: '#/components/schemas/v1.StatefulSet' description: Created - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' - application/yaml: - schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1beta1.SelfSubjectReview' - description: Accepted "401": content: {} description: Unauthorized tags: - - authentication_v1beta1 - x-kubernetes-action: post + - apps_v1 + x-kubernetes-action: put x-kubernetes-group-version-kind: - group: authentication.k8s.io - kind: SelfSubjectReview - version: v1beta1 + group: apps + kind: StatefulSet + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /apis/authorization.k8s.io/: - get: - description: get information of a group - operationId: getAPIGroup - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIGroup' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - authorization + x-contentType: application/json x-accepts: application/json - /apis/authorization.k8s.io/v1/: + /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale: get: - description: get available resources - operationId: getAPIResources + description: read scale of the specified StatefulSet + operationId: readNamespacedStatefulSetScale + parameters: + - description: name of the Scale + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.APIResourceList' + $ref: '#/components/schemas/v1.Scale' application/yaml: schema: - $ref: '#/components/schemas/v1.APIResourceList' + $ref: '#/components/schemas/v1.Scale' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIResourceList' + $ref: '#/components/schemas/v1.Scale' description: OK "401": content: {} description: Unauthorized tags: - - authorization_v1 + - apps_v1 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: autoscaling + kind: Scale + version: v1 x-accepts: application/json - /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews: - post: - description: create a LocalSubjectAccessReview - operationId: createNamespacedLocalSubjectAccessReview + patch: + description: partially update scale of the specified StatefulSet + operationId: patchNamespacedStatefulSetScale parameters: + - description: name of the Scale + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -29671,6 +29750,8 @@ paths: - description: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). in: query name: fieldManager schema: @@ -29692,78 +29773,78 @@ paths: name: fieldValidation schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. in: query - name: pretty + name: force schema: - type: string + type: boolean requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + $ref: '#/components/schemas/v1.Patch' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' application/yaml: schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' application/yaml: schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' description: Created - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' - application/yaml: - schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.LocalSubjectAccessReview' - description: Accepted "401": content: {} description: Unauthorized tags: - - authorization_v1 - x-kubernetes-action: post + - apps_v1 + x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: authorization.k8s.io - kind: LocalSubjectAccessReview + group: autoscaling + kind: Scale version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/authorization.k8s.io/v1/selfsubjectaccessreviews: - post: - description: create a SelfSubjectAccessReview - operationId: createSelfSubjectAccessReview + put: + description: replace scale of the specified StatefulSet + operationId: replaceNamespacedStatefulSetScale parameters: + - description: name of the Scale + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -29796,72 +29877,117 @@ paths: name: fieldValidation schema: type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' application/yaml: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' application/yaml: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + $ref: '#/components/schemas/v1.Scale' description: Created - "202": + "401": + content: {} + description: Unauthorized + tags: + - apps_v1 + x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: autoscaling + kind: Scale + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status: + get: + description: read status of the specified StatefulSet + operationId: readNamespacedStatefulSetStatus + parameters: + - description: name of the StatefulSet + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.SelfSubjectAccessReview' - description: Accepted + $ref: '#/components/schemas/v1.StatefulSet' + description: OK "401": content: {} description: Unauthorized tags: - - authorization_v1 - x-kubernetes-action: post + - apps_v1 + x-kubernetes-action: get x-kubernetes-group-version-kind: - group: authorization.k8s.io - kind: SelfSubjectAccessReview + group: apps + kind: StatefulSet version: v1 - x-codegen-request-body-name: body - x-contentType: '*/*' x-accepts: application/json - /apis/authorization.k8s.io/v1/selfsubjectrulesreviews: - post: - description: create a SelfSubjectRulesReview - operationId: createSelfSubjectRulesReview + patch: + description: partially update status of the specified StatefulSet + operationId: patchNamespacedStatefulSetStatus parameters: + - description: name of the StatefulSet + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -29873,6 +29999,8 @@ paths: - description: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). in: query name: fieldManager schema: @@ -29894,72 +30022,78 @@ paths: name: fieldValidation schema: type: string - - description: If 'true', then the output is pretty printed. + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. in: query - name: pretty + name: force schema: - type: string + type: boolean requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + $ref: '#/components/schemas/v1.Patch' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + $ref: '#/components/schemas/v1.StatefulSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + $ref: '#/components/schemas/v1.StatefulSet' description: Created - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' - application/yaml: - schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.SelfSubjectRulesReview' - description: Accepted "401": content: {} description: Unauthorized tags: - - authorization_v1 - x-kubernetes-action: post + - apps_v1 + x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: authorization.k8s.io - kind: SelfSubjectRulesReview + group: apps + kind: StatefulSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/authorization.k8s.io/v1/subjectaccessreviews: - post: - description: create a SubjectAccessReview - operationId: createSubjectAccessReview + put: + description: replace status of the specified StatefulSet + operationId: replaceNamespacedStatefulSetStatus parameters: + - description: name of the StatefulSet + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -29992,117 +30126,54 @@ paths: name: fieldValidation schema: type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' + $ref: '#/components/schemas/v1.StatefulSet' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' + $ref: '#/components/schemas/v1.StatefulSet' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' + $ref: '#/components/schemas/v1.StatefulSet' application/yaml: schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' + $ref: '#/components/schemas/v1.StatefulSet' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' + $ref: '#/components/schemas/v1.StatefulSet' description: Created - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' - application/yaml: - schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.SubjectAccessReview' - description: Accepted "401": content: {} description: Unauthorized tags: - - authorization_v1 - x-kubernetes-action: post + - apps_v1 + x-kubernetes-action: put x-kubernetes-group-version-kind: - group: authorization.k8s.io - kind: SubjectAccessReview + group: apps + kind: StatefulSet version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /apis/autoscaling/: - get: - description: get information of a group - operationId: getAPIGroup - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIGroup' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - autoscaling - x-accepts: application/json - /apis/autoscaling/v1/: - get: - description: get available resources - operationId: getAPIResources - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - autoscaling_v1 + x-contentType: application/json x-accepts: application/json - /apis/autoscaling/v1/horizontalpodautoscalers: + /apis/apps/v1/replicasets: get: - description: list or watch objects of kind HorizontalPodAutoscaler - operationId: listHorizontalPodAutoscalerForAllNamespaces + description: list or watch objects of kind ReplicaSet + operationId: listReplicaSetForAllNamespaces parameters: - description: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks @@ -30198,47 +30269,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.ReplicaSetList' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.ReplicaSetList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.ReplicaSetList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.ReplicaSetList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.ReplicaSetList' description: OK "401": content: {} description: Unauthorized tags: - - autoscaling_v1 + - apps_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler + group: apps + kind: ReplicaSet version: v1 x-accepts: application/json - /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers: - delete: - description: delete collection of HorizontalPodAutoscaler - operationId: deleteCollectionNamespacedHorizontalPodAutoscaler + /apis/apps/v1/statefulsets: + get: + description: list or watch objects of kind StatefulSet + operationId: listStatefulSetForAllNamespaces parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. in: query - name: pretty + name: allowWatchBookmarks schema: - type: string + type: boolean - description: |- The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". @@ -30247,29 +30317,12 @@ paths: name: continue schema: type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - description: A selector to restrict the list of returned objects by their fields. Defaults to everything. in: query name: fieldSelector schema: type: string - - description: The duration in seconds before the object should be deleted. - Value must be non-negative integer. The value zero indicates delete immediately. - If this value is nil, the default grace period for the specified type will - be used. Defaults to a per object value if not specified. zero means delete - immediately. - in: query - name: gracePeriodSeconds - schema: - type: integer - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. in: query @@ -30284,23 +30337,9 @@ paths: name: limit schema: type: integer - - description: 'Deprecated: please use the PropagationPolicy, this field will - be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, - the "orphan" finalizer will be added to/removed from the object''s finalizers - list. Either this field or PropagationPolicy may be set, but not both.' - in: query - name: orphanDependents - schema: - type: boolean - - description: 'Whether and how garbage collection will be performed. Either - this field or OrphanDependents may be set, but not both. The default policy - is decided by the existing finalizer set in the metadata.finalizers and - the resource-specific default policy. Acceptable values are: ''Orphan'' - - orphan the dependents; ''Background'' - allow the garbage collector to - delete the dependents in the background; ''Foreground'' - a cascading policy - that deletes all dependents in the foreground.' + - description: If 'true', then the output is pretty printed. in: query - name: propagationPolicy + name: pretty schema: type: string - description: |- @@ -30343,182 +30382,108 @@ paths: name: timeoutSeconds schema: type: integer - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/v1.DeleteOptions' - required: false - responses: - "200": - content: - application/json: + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. + in: query + name: watch + schema: + type: boolean + responses: + "200": + content: + application/json: schema: - $ref: '#/components/schemas/v1.Status' + $ref: '#/components/schemas/v1.StatefulSetList' application/yaml: schema: - $ref: '#/components/schemas/v1.Status' + $ref: '#/components/schemas/v1.StatefulSetList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Status' + $ref: '#/components/schemas/v1.StatefulSetList' + application/json;stream=watch: + schema: + $ref: '#/components/schemas/v1.StatefulSetList' + application/vnd.kubernetes.protobuf;stream=watch: + schema: + $ref: '#/components/schemas/v1.StatefulSetList' description: OK "401": content: {} description: Unauthorized tags: - - autoscaling_v1 - x-kubernetes-action: deletecollection + - apps_v1 + x-kubernetes-action: list x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler + group: apps + kind: StatefulSet version: v1 - x-codegen-request-body-name: body - x-contentType: '*/*' x-accepts: application/json + /apis/apps/v1/watch/controllerrevisions: {} + /apis/apps/v1/watch/daemonsets: {} + /apis/apps/v1/watch/deployments: {} + /apis/apps/v1/watch/namespaces/{namespace}/controllerrevisions: {} + /apis/apps/v1/watch/namespaces/{namespace}/controllerrevisions/{name}: {} + /apis/apps/v1/watch/namespaces/{namespace}/daemonsets: {} + /apis/apps/v1/watch/namespaces/{namespace}/daemonsets/{name}: {} + /apis/apps/v1/watch/namespaces/{namespace}/deployments: {} + /apis/apps/v1/watch/namespaces/{namespace}/deployments/{name}: {} + /apis/apps/v1/watch/namespaces/{namespace}/replicasets: {} + /apis/apps/v1/watch/namespaces/{namespace}/replicasets/{name}: {} + /apis/apps/v1/watch/namespaces/{namespace}/statefulsets: {} + /apis/apps/v1/watch/namespaces/{namespace}/statefulsets/{name}: {} + /apis/apps/v1/watch/replicasets: {} + /apis/apps/v1/watch/statefulsets: {} + /apis/authentication.k8s.io/: get: - description: list or watch objects of kind HorizontalPodAutoscaler - operationId: listNamespacedHorizontalPodAutoscaler - parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: allowWatchBookmarks requests watch events with type "BOOKMARK". - Servers that do not implement bookmarks may ignore this flag and bookmarks - are sent at the server's discretion. Clients should not assume bookmarks - are returned at any specific interval, nor may they assume the server will - send any BOOKMARK event during a session. If this is not a watch, this field - is ignored. - in: query - name: allowWatchBookmarks - schema: - type: boolean - - description: |- - The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". - - This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - in: query - name: continue - schema: - type: string - - description: A selector to restrict the list of returned objects by their - fields. Defaults to everything. - in: query - name: fieldSelector - schema: - type: string - - description: A selector to restrict the list of returned objects by their - labels. Defaults to everything. - in: query - name: labelSelector - schema: - type: string - - description: |- - limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. - - The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - in: query - name: limit - schema: - type: integer - - description: |- - resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersion - schema: - type: string - - description: |- - resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersionMatch - schema: - type: string - - description: |- - `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. - - When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan - is interpreted as "data at least as new as the provided `resourceVersion`" - and the bookmark event is send when the state is synced - to a `resourceVersion` at least as fresh as the one provided by the ListOptions. - If `resourceVersion` is unset, this is interpreted as "consistent read" and the - bookmark event is send when the state is synced at least to the moment - when request started being processed. - - `resourceVersionMatch` set to any other value or unset - Invalid error is returned. - - Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. - in: query - name: sendInitialEvents - schema: - type: boolean - - description: Timeout for the list/watch call. This limits the duration of - the call, regardless of any activity or inactivity. - in: query - name: timeoutSeconds - schema: - type: integer - - description: Watch for changes to the described resources and return them - as a stream of add, update, and remove notifications. Specify resourceVersion. - in: query - name: watch - schema: - type: boolean + description: get information of a group + operationId: getAPIGroup responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.APIGroup' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.APIGroup' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' - application/json;stream=watch: + $ref: '#/components/schemas/v1.APIGroup' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - authentication + x-accepts: application/json + /apis/authentication.k8s.io/v1/: + get: + description: get available resources + operationId: getAPIResources + responses: + "200": + content: + application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' - application/vnd.kubernetes.protobuf;stream=watch: + $ref: '#/components/schemas/v1.APIResourceList' + application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.APIResourceList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIResourceList' description: OK "401": content: {} description: Unauthorized tags: - - autoscaling_v1 - x-kubernetes-action: list - x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler - version: v1 + - authentication_v1 x-accepts: application/json + /apis/authentication.k8s.io/v1/selfsubjectreviews: post: - description: create a HorizontalPodAutoscaler - operationId: createNamespacedHorizontalPodAutoscaler + description: create a SelfSubjectReview + operationId: createSelfSubjectReview parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -30551,84 +30516,72 @@ paths: name: fieldValidation schema: type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectReview' description: Accepted "401": content: {} description: Unauthorized tags: - - autoscaling_v1 + - authentication_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler + group: authentication.k8s.io + kind: SelfSubjectReview version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}: - delete: - description: delete a HorizontalPodAutoscaler - operationId: deleteNamespacedHorizontalPodAutoscaler + /apis/authentication.k8s.io/v1/tokenreviews: + post: + description: create a TokenReview + operationId: createTokenReview parameters: - - description: name of the HorizontalPodAutoscaler - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -30637,144 +30590,119 @@ paths: name: dryRun schema: type: string - - description: The duration in seconds before the object should be deleted. - Value must be non-negative integer. The value zero indicates delete immediately. - If this value is nil, the default grace period for the specified type will - be used. Defaults to a per object value if not specified. zero means delete - immediately. + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. in: query - name: gracePeriodSeconds + name: fieldManager schema: - type: integer - - description: 'Deprecated: please use the PropagationPolicy, this field will - be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, - the "orphan" finalizer will be added to/removed from the object''s finalizers - list. Either this field or PropagationPolicy may be set, but not both.' + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' in: query - name: orphanDependents + name: fieldValidation schema: - type: boolean - - description: 'Whether and how garbage collection will be performed. Either - this field or OrphanDependents may be set, but not both. The default policy - is decided by the existing finalizer set in the metadata.finalizers and - the resource-specific default policy. Acceptable values are: ''Orphan'' - - orphan the dependents; ''Background'' - allow the garbage collector to - delete the dependents in the background; ''Foreground'' - a cascading policy - that deletes all dependents in the foreground.' + type: string + - description: If 'true', then the output is pretty printed. in: query - name: propagationPolicy + name: pretty schema: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.DeleteOptions' - required: false + $ref: '#/components/schemas/v1.TokenReview' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Status' + $ref: '#/components/schemas/v1.TokenReview' application/yaml: schema: - $ref: '#/components/schemas/v1.Status' + $ref: '#/components/schemas/v1.TokenReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Status' + $ref: '#/components/schemas/v1.TokenReview' description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.TokenReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1.TokenReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.TokenReview' + description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.Status' + $ref: '#/components/schemas/v1.TokenReview' application/yaml: schema: - $ref: '#/components/schemas/v1.Status' + $ref: '#/components/schemas/v1.TokenReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Status' + $ref: '#/components/schemas/v1.TokenReview' description: Accepted "401": content: {} description: Unauthorized tags: - - autoscaling_v1 - x-kubernetes-action: delete + - authentication_v1 + x-kubernetes-action: post x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler + group: authentication.k8s.io + kind: TokenReview version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json + /apis/authentication.k8s.io/v1alpha1/: get: - description: read the specified HorizontalPodAutoscaler - operationId: readNamespacedHorizontalPodAutoscaler - parameters: - - description: name of the HorizontalPodAutoscaler - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string + description: get available resources + operationId: getAPIResources responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.APIResourceList' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.APIResourceList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.APIResourceList' description: OK "401": content: {} description: Unauthorized tags: - - autoscaling_v1 - x-kubernetes-action: get - x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler - version: v1 + - authentication_v1alpha1 x-accepts: application/json - patch: - description: partially update the specified HorizontalPodAutoscaler - operationId: patchNamespacedHorizontalPodAutoscaler + /apis/authentication.k8s.io/v1alpha1/selfsubjectreviews: + post: + description: create a SelfSubjectReview + operationId: createSelfSubjectReview parameters: - - description: name of the HorizontalPodAutoscaler - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -30786,8 +30714,6 @@ paths: - description: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). in: query name: fieldManager schema: @@ -30809,87 +30735,95 @@ paths: name: fieldValidation schema: type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. + - description: If 'true', then the output is pretty printed. in: query - name: force + name: pretty schema: - type: boolean + type: string requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: - $ref: '#/components/schemas/v1.Patch' + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' description: Created + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha1.SelfSubjectReview' + description: Accepted "401": content: {} description: Unauthorized tags: - - autoscaling_v1 - x-kubernetes-action: patch + - authentication_v1alpha1 + x-kubernetes-action: post x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler - version: v1 + group: authentication.k8s.io + kind: SelfSubjectReview + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json - put: - description: replace the specified HorizontalPodAutoscaler - operationId: replaceNamespacedHorizontalPodAutoscaler + /apis/authentication.k8s.io/v1beta1/: + get: + description: get available resources + operationId: getAPIResources + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - authentication_v1beta1 + x-accepts: application/json + /apis/authentication.k8s.io/v1beta1/selfsubjectreviews: + post: + description: create a SelfSubjectReview + operationId: createSelfSubjectReview parameters: - - description: name of the HorizontalPodAutoscaler - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -30922,59 +30856,148 @@ paths: name: fieldValidation schema: type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' description: Created + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1beta1.SelfSubjectReview' + description: Accepted "401": content: {} description: Unauthorized tags: - - autoscaling_v1 - x-kubernetes-action: put + - authentication_v1beta1 + x-kubernetes-action: post x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler - version: v1 + group: authentication.k8s.io + kind: SelfSubjectReview + version: v1beta1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status: + /apis/authorization.k8s.io/: get: - description: read status of the specified HorizontalPodAutoscaler - operationId: readNamespacedHorizontalPodAutoscalerStatus + description: get information of a group + operationId: getAPIGroup + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIGroup' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - authorization + x-accepts: application/json + /apis/authorization.k8s.io/v1/: + get: + description: get available resources + operationId: getAPIResources + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - authorization_v1 + x-accepts: application/json + /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews: + post: + description: create a LocalSubjectAccessReview + operationId: createNamespacedLocalSubjectAccessReview parameters: - - description: name of the HorizontalPodAutoscaler - in: path - name: name - required: true + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation schema: type: string - description: object name and auth scope, such as for teams and projects @@ -30988,51 +31011,67 @@ paths: name: pretty schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + description: Created + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.LocalSubjectAccessReview' + description: Accepted "401": content: {} description: Unauthorized tags: - - autoscaling_v1 - x-kubernetes-action: get + - authorization_v1 + x-kubernetes-action: post x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler + group: authorization.k8s.io + kind: LocalSubjectAccessReview version: v1 + x-codegen-request-body-name: body + x-contentType: application/json x-accepts: application/json - patch: - description: partially update status of the specified HorizontalPodAutoscaler - operationId: patchNamespacedHorizontalPodAutoscalerStatus + /apis/authorization.k8s.io/v1/selfsubjectaccessreviews: + post: + description: create a SelfSubjectAccessReview + operationId: createSelfSubjectAccessReview parameters: - - description: name of the HorizontalPodAutoscaler - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -31044,8 +31083,6 @@ paths: - description: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). in: query name: fieldManager schema: @@ -31067,80 +31104,102 @@ paths: name: fieldValidation schema: type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. + - description: If 'true', then the output is pretty printed. in: query - name: force + name: pretty schema: - type: boolean + type: string requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: - $ref: '#/components/schemas/v1.Patch' + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' description: Created + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.SelfSubjectAccessReview' + description: Accepted "401": content: {} description: Unauthorized tags: - - autoscaling_v1 - x-kubernetes-action: patch + - authorization_v1 + x-kubernetes-action: post x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler + group: authorization.k8s.io + kind: SelfSubjectAccessReview version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json - put: - description: replace status of the specified HorizontalPodAutoscaler - operationId: replaceNamespacedHorizontalPodAutoscalerStatus + /apis/authorization.k8s.io/v1/selfsubjectrulesreviews: + post: + description: create a SelfSubjectRulesReview + operationId: createSelfSubjectRulesReview parameters: - - description: name of the HorizontalPodAutoscaler - in: path - name: name - required: true + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation schema: type: string - description: If 'true', then the output is pretty printed. @@ -31148,6 +31207,67 @@ paths: name: pretty schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + description: Created + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.SelfSubjectRulesReview' + description: Accepted + "401": + content: {} + description: Unauthorized + tags: + - authorization_v1 + x-kubernetes-action: post + x-kubernetes-group-version-kind: + group: authorization.k8s.io + kind: SelfSubjectRulesReview + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/authorization.k8s.io/v1/subjectaccessreviews: + post: + description: create a SubjectAccessReview + operationId: createSubjectAccessReview + parameters: - description: 'When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry @@ -31180,54 +31300,91 @@ paths: name: fieldValidation schema: type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SubjectAccessReview' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SubjectAccessReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SubjectAccessReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SubjectAccessReview' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SubjectAccessReview' application/yaml: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SubjectAccessReview' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.SubjectAccessReview' description: Created + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.SubjectAccessReview' + application/yaml: + schema: + $ref: '#/components/schemas/v1.SubjectAccessReview' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.SubjectAccessReview' + description: Accepted "401": content: {} description: Unauthorized tags: - - autoscaling_v1 - x-kubernetes-action: put + - authorization_v1 + x-kubernetes-action: post x-kubernetes-group-version-kind: - group: autoscaling - kind: HorizontalPodAutoscaler + group: authorization.k8s.io + kind: SubjectAccessReview version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/autoscaling/v1/watch/horizontalpodautoscalers: {} - /apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers: {} - /apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}: {} - /apis/autoscaling/v2/: + /apis/autoscaling/: + get: + description: get information of a group + operationId: getAPIGroup + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIGroup' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - autoscaling + x-accepts: application/json + /apis/autoscaling/v1/: get: description: get available resources operationId: getAPIResources @@ -31248,9 +31405,9 @@ paths: content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-accepts: application/json - /apis/autoscaling/v2/horizontalpodautoscalers: + /apis/autoscaling/v1/horizontalpodautoscalers: get: description: list or watch objects of kind HorizontalPodAutoscaler operationId: listHorizontalPodAutoscalerForAllNamespaces @@ -31349,32 +31506,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' description: OK "401": content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-accepts: application/json - /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers: + /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers: delete: description: delete collection of HorizontalPodAutoscaler operationId: deleteCollectionNamespacedHorizontalPodAutoscaler @@ -31496,7 +31653,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -31517,14 +31674,14 @@ paths: content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind HorizontalPodAutoscaler @@ -31630,30 +31787,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' + $ref: '#/components/schemas/v1.HorizontalPodAutoscalerList' description: OK "401": content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-accepts: application/json post: description: create a HorizontalPodAutoscaler @@ -31704,61 +31861,61 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: Accepted "401": content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}: + /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}: delete: description: delete a HorizontalPodAutoscaler operationId: deleteNamespacedHorizontalPodAutoscaler @@ -31818,7 +31975,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -31851,14 +32008,14 @@ paths: content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: delete x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified HorizontalPodAutoscaler @@ -31886,24 +32043,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: OK "401": content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-accepts: application/json patch: description: partially update the specified HorizontalPodAutoscaler @@ -31969,16 +32126,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -31987,38 +32135,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: Created "401": content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified HorizontalPodAutoscaler @@ -32075,49 +32223,49 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: Created "401": content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status: + /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status: get: description: read status of the specified HorizontalPodAutoscaler operationId: readNamespacedHorizontalPodAutoscalerStatus @@ -32144,24 +32292,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: OK "401": content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-accepts: application/json patch: description: partially update status of the specified HorizontalPodAutoscaler @@ -32227,16 +32375,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -32245,38 +32384,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: Created "401": content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified HorizontalPodAutoscaler @@ -32333,75 +32472,52 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' + $ref: '#/components/schemas/v1.HorizontalPodAutoscaler' description: Created "401": content: {} description: Unauthorized tags: - - autoscaling_v2 + - autoscaling_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: group: autoscaling kind: HorizontalPodAutoscaler - version: v2 + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/autoscaling/v2/watch/horizontalpodautoscalers: {} - /apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers: {} - /apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}: {} - /apis/batch/: - get: - description: get information of a group - operationId: getAPIGroup - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIGroup' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - batch - x-accepts: application/json - /apis/batch/v1/: + /apis/autoscaling/v1/watch/horizontalpodautoscalers: {} + /apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers: {} + /apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}: {} + /apis/autoscaling/v2/: get: description: get available resources operationId: getAPIResources @@ -32422,136 +32538,12 @@ paths: content: {} description: Unauthorized tags: - - batch_v1 - x-accepts: application/json - /apis/batch/v1/cronjobs: - get: - description: list or watch objects of kind CronJob - operationId: listCronJobForAllNamespaces - parameters: - - description: allowWatchBookmarks requests watch events with type "BOOKMARK". - Servers that do not implement bookmarks may ignore this flag and bookmarks - are sent at the server's discretion. Clients should not assume bookmarks - are returned at any specific interval, nor may they assume the server will - send any BOOKMARK event during a session. If this is not a watch, this field - is ignored. - in: query - name: allowWatchBookmarks - schema: - type: boolean - - description: |- - The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". - - This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - in: query - name: continue - schema: - type: string - - description: A selector to restrict the list of returned objects by their - fields. Defaults to everything. - in: query - name: fieldSelector - schema: - type: string - - description: A selector to restrict the list of returned objects by their - labels. Defaults to everything. - in: query - name: labelSelector - schema: - type: string - - description: |- - limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. - - The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - in: query - name: limit - schema: - type: integer - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: |- - resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersion - schema: - type: string - - description: |- - resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset - in: query - name: resourceVersionMatch - schema: - type: string - - description: |- - `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. - - When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan - is interpreted as "data at least as new as the provided `resourceVersion`" - and the bookmark event is send when the state is synced - to a `resourceVersion` at least as fresh as the one provided by the ListOptions. - If `resourceVersion` is unset, this is interpreted as "consistent read" and the - bookmark event is send when the state is synced at least to the moment - when request started being processed. - - `resourceVersionMatch` set to any other value or unset - Invalid error is returned. - - Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. - in: query - name: sendInitialEvents - schema: - type: boolean - - description: Timeout for the list/watch call. This limits the duration of - the call, regardless of any activity or inactivity. - in: query - name: timeoutSeconds - schema: - type: integer - - description: Watch for changes to the described resources and return them - as a stream of add, update, and remove notifications. Specify resourceVersion. - in: query - name: watch - schema: - type: boolean - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.CronJobList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.CronJobList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.CronJobList' - application/json;stream=watch: - schema: - $ref: '#/components/schemas/v1.CronJobList' - application/vnd.kubernetes.protobuf;stream=watch: - schema: - $ref: '#/components/schemas/v1.CronJobList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - batch_v1 - x-kubernetes-action: list - x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + - autoscaling_v2 x-accepts: application/json - /apis/batch/v1/jobs: + /apis/autoscaling/v2/horizontalpodautoscalers: get: - description: list or watch objects of kind Job - operationId: listJobForAllNamespaces + description: list or watch objects of kind HorizontalPodAutoscaler + operationId: listHorizontalPodAutoscalerForAllNamespaces parameters: - description: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks @@ -32647,35 +32639,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' application/yaml: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' description: OK "401": content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: batch - kind: Job - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-accepts: application/json - /apis/batch/v1/namespaces/{namespace}/cronjobs: + /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers: delete: - description: delete collection of CronJob - operationId: deleteCollectionNamespacedCronJob + description: delete collection of HorizontalPodAutoscaler + operationId: deleteCollectionNamespacedHorizontalPodAutoscaler parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -32794,7 +32786,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -32815,18 +32807,18 @@ paths: content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind CronJob - operationId: listNamespacedCronJob + description: list or watch objects of kind HorizontalPodAutoscaler + operationId: listNamespacedHorizontalPodAutoscaler parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -32928,34 +32920,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CronJobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.CronJobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.CronJobList' + $ref: '#/components/schemas/v2.HorizontalPodAutoscalerList' description: OK "401": content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-accepts: application/json post: - description: create a CronJob - operationId: createNamespacedCronJob + description: create a HorizontalPodAutoscaler + operationId: createNamespacedHorizontalPodAutoscaler parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -33002,66 +32994,66 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: Accepted "401": content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}: + /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}: delete: - description: delete a CronJob - operationId: deleteNamespacedCronJob + description: delete a HorizontalPodAutoscaler + operationId: deleteNamespacedHorizontalPodAutoscaler parameters: - - description: name of the CronJob + - description: name of the HorizontalPodAutoscaler in: path name: name required: true @@ -33116,7 +33108,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -33149,20 +33141,20 @@ paths: content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified CronJob - operationId: readNamespacedCronJob + description: read the specified HorizontalPodAutoscaler + operationId: readNamespacedHorizontalPodAutoscaler parameters: - - description: name of the CronJob + - description: name of the HorizontalPodAutoscaler in: path name: name required: true @@ -33184,30 +33176,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: OK "401": content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-accepts: application/json patch: - description: partially update the specified CronJob - operationId: patchNamespacedCronJob + description: partially update the specified HorizontalPodAutoscaler + operationId: patchNamespacedHorizontalPodAutoscaler parameters: - - description: name of the CronJob + - description: name of the HorizontalPodAutoscaler in: path name: name required: true @@ -33267,16 +33259,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -33285,44 +33268,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: Created "401": content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified CronJob - operationId: replaceNamespacedCronJob + description: replace the specified HorizontalPodAutoscaler + operationId: replaceNamespacedHorizontalPodAutoscaler parameters: - - description: name of the CronJob + - description: name of the HorizontalPodAutoscaler in: path name: name required: true @@ -33373,54 +33356,54 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: Created "401": content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status: + /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status: get: - description: read status of the specified CronJob - operationId: readNamespacedCronJobStatus + description: read status of the specified HorizontalPodAutoscaler + operationId: readNamespacedHorizontalPodAutoscalerStatus parameters: - - description: name of the CronJob + - description: name of the HorizontalPodAutoscaler in: path name: name required: true @@ -33442,30 +33425,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: OK "401": content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-accepts: application/json patch: - description: partially update status of the specified CronJob - operationId: patchNamespacedCronJobStatus + description: partially update status of the specified HorizontalPodAutoscaler + operationId: patchNamespacedHorizontalPodAutoscalerStatus parameters: - - description: name of the CronJob + - description: name of the HorizontalPodAutoscaler in: path name: name required: true @@ -33525,16 +33508,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -33543,44 +33517,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: Created "401": content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified CronJob - operationId: replaceNamespacedCronJobStatus + description: replace status of the specified HorizontalPodAutoscaler + operationId: replaceNamespacedHorizontalPodAutoscalerStatus parameters: - - description: name of the CronJob + - description: name of the HorizontalPodAutoscaler in: path name: name required: true @@ -33631,64 +33605,112 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/yaml: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CronJob' + $ref: '#/components/schemas/v2.HorizontalPodAutoscaler' description: Created "401": content: {} description: Unauthorized tags: - - batch_v1 + - autoscaling_v2 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: batch - kind: CronJob - version: v1 + group: autoscaling + kind: HorizontalPodAutoscaler + version: v2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/batch/v1/namespaces/{namespace}/jobs: - delete: - description: delete collection of Job - operationId: deleteCollectionNamespacedJob + /apis/autoscaling/v2/watch/horizontalpodautoscalers: {} + /apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers: {} + /apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}: {} + /apis/batch/: + get: + description: get information of a group + operationId: getAPIGroup + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIGroup' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - batch + x-accepts: application/json + /apis/batch/v1/: + get: + description: get available resources + operationId: getAPIResources + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - batch_v1 + x-accepts: application/json + /apis/batch/v1/cronjobs: + get: + description: list or watch objects of kind CronJob + operationId: listCronJobForAllNamespaces parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. in: query - name: pretty + name: allowWatchBookmarks schema: - type: string + type: boolean - description: |- The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". @@ -33697,29 +33719,12 @@ paths: name: continue schema: type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - description: A selector to restrict the list of returned objects by their fields. Defaults to everything. in: query name: fieldSelector schema: type: string - - description: The duration in seconds before the object should be deleted. - Value must be non-negative integer. The value zero indicates delete immediately. - If this value is nil, the default grace period for the specified type will - be used. Defaults to a per object value if not specified. zero means delete - immediately. - in: query - name: gracePeriodSeconds - schema: - type: integer - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. in: query @@ -33734,23 +33739,289 @@ paths: name: limit schema: type: integer - - description: 'Deprecated: please use the PropagationPolicy, this field will - be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, - the "orphan" finalizer will be added to/removed from the object''s finalizers - list. Either this field or PropagationPolicy may be set, but not both.' - in: query - name: orphanDependents - schema: - type: boolean - - description: 'Whether and how garbage collection will be performed. Either - this field or OrphanDependents may be set, but not both. The default policy - is decided by the existing finalizer set in the metadata.finalizers and - the resource-specific default policy. Acceptable values are: ''Orphan'' - - orphan the dependents; ''Background'' - allow the garbage collector to - delete the dependents in the background; ''Foreground'' - a cascading policy - that deletes all dependents in the foreground.' + - description: If 'true', then the output is pretty printed. in: query - name: propagationPolicy + name: pretty + schema: + type: string + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. + in: query + name: watch + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CronJobList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CronJobList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CronJobList' + application/json;stream=watch: + schema: + $ref: '#/components/schemas/v1.CronJobList' + application/vnd.kubernetes.protobuf;stream=watch: + schema: + $ref: '#/components/schemas/v1.CronJobList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - batch_v1 + x-kubernetes-action: list + x-kubernetes-group-version-kind: + group: batch + kind: CronJob + version: v1 + x-accepts: application/json + /apis/batch/v1/jobs: + get: + description: list or watch objects of kind Job + operationId: listJobForAllNamespaces + parameters: + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. + in: query + name: allowWatchBookmarks + schema: + type: boolean + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. + in: query + name: watch + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.JobList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.JobList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.JobList' + application/json;stream=watch: + schema: + $ref: '#/components/schemas/v1.JobList' + application/vnd.kubernetes.protobuf;stream=watch: + schema: + $ref: '#/components/schemas/v1.JobList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - batch_v1 + x-kubernetes-action: list + x-kubernetes-group-version-kind: + group: batch + kind: Job + version: v1 + x-accepts: application/json + /apis/batch/v1/namespaces/{namespace}/cronjobs: + delete: + description: delete collection of CronJob + operationId: deleteCollectionNamespacedCronJob + parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: The duration in seconds before the object should be deleted. + Value must be non-negative integer. The value zero indicates delete immediately. + If this value is nil, the default grace period for the specified type will + be used. Defaults to a per object value if not specified. zero means delete + immediately. + in: query + name: gracePeriodSeconds + schema: + type: integer + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: 'Deprecated: please use the PropagationPolicy, this field will + be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, + the "orphan" finalizer will be added to/removed from the object''s finalizers + list. Either this field or PropagationPolicy may be set, but not both.' + in: query + name: orphanDependents + schema: + type: boolean + - description: 'Whether and how garbage collection will be performed. Either + this field or OrphanDependents may be set, but not both. The default policy + is decided by the existing finalizer set in the metadata.finalizers and + the resource-specific default policy. Acceptable values are: ''Orphan'' + - orphan the dependents; ''Background'' - allow the garbage collector to + delete the dependents in the background; ''Foreground'' - a cascading policy + that deletes all dependents in the foreground.' + in: query + name: propagationPolicy schema: type: string - description: |- @@ -33795,7 +34066,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -33820,14 +34091,14 @@ paths: x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind Job - operationId: listNamespacedJob + description: list or watch objects of kind CronJob + operationId: listNamespacedCronJob parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -33929,19 +34200,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v1.CronJobList' application/yaml: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v1.CronJobList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v1.CronJobList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v1.CronJobList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.JobList' + $ref: '#/components/schemas/v1.CronJobList' description: OK "401": content: {} @@ -33951,12 +34222,12 @@ paths: x-kubernetes-action: list x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-accepts: application/json post: - description: create a Job - operationId: createNamespacedJob + description: create a CronJob + operationId: createNamespacedCronJob parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -34003,46 +34274,46 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: Accepted "401": content: {} @@ -34052,17 +34323,17 @@ paths: x-kubernetes-action: post x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/batch/v1/namespaces/{namespace}/jobs/{name}: + /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}: delete: - description: delete a Job - operationId: deleteNamespacedJob + description: delete a CronJob + operationId: deleteNamespacedCronJob parameters: - - description: name of the Job + - description: name of the CronJob in: path name: name required: true @@ -34117,7 +34388,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -34154,16 +34425,16 @@ paths: x-kubernetes-action: delete x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified Job - operationId: readNamespacedJob + description: read the specified CronJob + operationId: readNamespacedCronJob parameters: - - description: name of the Job + - description: name of the CronJob in: path name: name required: true @@ -34185,13 +34456,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: OK "401": content: {} @@ -34201,14 +34472,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-accepts: application/json patch: - description: partially update the specified Job - operationId: patchNamespacedJob + description: partially update the specified CronJob + operationId: patchNamespacedCronJob parameters: - - description: name of the Job + - description: name of the CronJob in: path name: name required: true @@ -34268,16 +34539,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -34286,25 +34548,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: Created "401": content: {} @@ -34314,16 +34576,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified Job - operationId: replaceNamespacedJob + description: replace the specified CronJob + operationId: replaceNamespacedCronJob parameters: - - description: name of the Job + - description: name of the CronJob in: path name: name required: true @@ -34374,34 +34636,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: Created "401": content: {} @@ -34411,17 +34673,17 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status: + /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status: get: - description: read status of the specified Job - operationId: readNamespacedJobStatus + description: read status of the specified CronJob + operationId: readNamespacedCronJobStatus parameters: - - description: name of the Job + - description: name of the CronJob in: path name: name required: true @@ -34443,13 +34705,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: OK "401": content: {} @@ -34459,14 +34721,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-accepts: application/json patch: - description: partially update status of the specified Job - operationId: patchNamespacedJobStatus + description: partially update status of the specified CronJob + operationId: patchNamespacedCronJobStatus parameters: - - description: name of the Job + - description: name of the CronJob in: path name: name required: true @@ -34526,16 +34788,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -34544,25 +34797,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: Created "401": content: {} @@ -34572,16 +34825,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified Job - operationId: replaceNamespacedJobStatus + description: replace status of the specified CronJob + operationId: replaceNamespacedCronJobStatus parameters: - - description: name of the Job + - description: name of the CronJob in: path name: name required: true @@ -34632,34 +34885,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/yaml: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Job' + $ref: '#/components/schemas/v1.CronJob' description: Created "401": content: {} @@ -34669,68 +34922,22 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: batch - kind: Job + kind: CronJob version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/batch/v1/watch/cronjobs: {} - /apis/batch/v1/watch/jobs: {} - /apis/batch/v1/watch/namespaces/{namespace}/cronjobs: {} - /apis/batch/v1/watch/namespaces/{namespace}/cronjobs/{name}: {} - /apis/batch/v1/watch/namespaces/{namespace}/jobs: {} - /apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}: {} - /apis/certificates.k8s.io/: - get: - description: get information of a group - operationId: getAPIGroup - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIGroup' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - certificates - x-accepts: application/json - /apis/certificates.k8s.io/v1/: - get: - description: get available resources - operationId: getAPIResources - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - certificates_v1 - x-accepts: application/json - /apis/certificates.k8s.io/v1/certificatesigningrequests: + /apis/batch/v1/namespaces/{namespace}/jobs: delete: - description: delete collection of CertificateSigningRequest - operationId: deleteCollectionCertificateSigningRequest + description: delete collection of Job + operationId: deleteCollectionNamespacedJob parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -34842,7 +35049,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -34863,19 +35070,25 @@ paths: content: {} description: Unauthorized tags: - - certificates_v1 + - batch_v1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind CertificateSigningRequest - operationId: listCertificateSigningRequest + description: list or watch objects of kind Job + operationId: listNamespacedJob parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -34970,35 +35183,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequestList' + $ref: '#/components/schemas/v1.JobList' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequestList' + $ref: '#/components/schemas/v1.JobList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequestList' + $ref: '#/components/schemas/v1.JobList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequestList' + $ref: '#/components/schemas/v1.JobList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequestList' + $ref: '#/components/schemas/v1.JobList' description: OK "401": content: {} description: Unauthorized tags: - - certificates_v1 + - batch_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-accepts: application/json post: - description: create a CertificateSigningRequest - operationId: createCertificateSigningRequest + description: create a Job + operationId: createNamespacedJob parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -35038,71 +35257,77 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: Accepted "401": content: {} description: Unauthorized tags: - - certificates_v1 + - batch_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}: + /apis/batch/v1/namespaces/{namespace}/jobs/{name}: delete: - description: delete a CertificateSigningRequest - operationId: deleteCertificateSigningRequest + description: delete a Job + operationId: deleteNamespacedJob parameters: - - description: name of the CertificateSigningRequest + - description: name of the Job in: path name: name required: true schema: type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -35146,7 +35371,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -35179,25 +35404,31 @@ paths: content: {} description: Unauthorized tags: - - certificates_v1 + - batch_v1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified CertificateSigningRequest - operationId: readCertificateSigningRequest + description: read the specified Job + operationId: readNamespacedJob parameters: - - description: name of the CertificateSigningRequest + - description: name of the Job in: path name: name required: true schema: type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -35208,35 +35439,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: OK "401": content: {} description: Unauthorized tags: - - certificates_v1 + - batch_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-accepts: application/json patch: - description: partially update the specified CertificateSigningRequest - operationId: patchCertificateSigningRequest + description: partially update the specified Job + operationId: patchNamespacedJob parameters: - - description: name of the CertificateSigningRequest + - description: name of the Job in: path name: name required: true schema: type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -35285,16 +35522,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -35303,49 +35531,55 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: Created "401": content: {} description: Unauthorized tags: - - certificates_v1 + - batch_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified CertificateSigningRequest - operationId: replaceCertificateSigningRequest + description: replace the specified Job + operationId: replaceNamespacedJob parameters: - - description: name of the CertificateSigningRequest + - description: name of the Job in: path name: name required: true schema: type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -35385,59 +35619,65 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: Created "401": content: {} description: Unauthorized tags: - - certificates_v1 + - batch_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval: + /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status: get: - description: read approval of the specified CertificateSigningRequest - operationId: readCertificateSigningRequestApproval + description: read status of the specified Job + operationId: readNamespacedJobStatus parameters: - - description: name of the CertificateSigningRequest + - description: name of the Job in: path name: name required: true schema: type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -35448,141 +35688,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: OK "401": content: {} description: Unauthorized tags: - - certificates_v1 + - batch_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-accepts: application/json patch: - description: partially update approval of the specified CertificateSigningRequest - operationId: patchCertificateSigningRequestApproval + description: partially update status of the specified Job + operationId: patchNamespacedJobStatus parameters: - - description: name of the CertificateSigningRequest + - description: name of the Job in: path name: name required: true schema: type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. - in: query - name: force - schema: - type: boolean - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: - schema: - $ref: '#/components/schemas/v1.Patch' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - application/yaml: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - application/yaml: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - certificates_v1 - x-kubernetes-action: patch - x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest - version: v1 - x-codegen-request-body-name: body - x-contentType: application/json-patch+json - x-accepts: application/json - put: - description: replace approval of the specified CertificateSigningRequest - operationId: replaceCertificateSigningRequestApproval - parameters: - - description: name of the CertificateSigningRequest + - description: object name and auth scope, such as for teams and projects in: path - name: name + name: namespace required: true schema: type: string @@ -35602,6 +35739,8 @@ paths: - description: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). in: query name: fieldManager schema: @@ -35623,97 +35762,70 @@ paths: name: fieldValidation schema: type: string + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. + in: query + name: force + schema: + type: boolean requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Patch' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: Created "401": content: {} description: Unauthorized tags: - - certificates_v1 - x-kubernetes-action: put + - batch_v1 + x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status: - get: - description: read status of the specified CertificateSigningRequest - operationId: readCertificateSigningRequestStatus + put: + description: replace status of the specified Job + operationId: replaceNamespacedJobStatus parameters: - - description: name of the CertificateSigningRequest + - description: name of the Job in: path name: name required: true schema: type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - application/yaml: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - certificates_v1 - x-kubernetes-action: get - x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest - version: v1 - x-accepts: application/json - patch: - description: partially update status of the specified CertificateSigningRequest - operationId: patchCertificateSigningRequestStatus - parameters: - - description: name of the CertificateSigningRequest + - description: object name and auth scope, such as for teams and projects in: path - name: name + name: namespace required: true schema: type: string @@ -35733,8 +35845,6 @@ paths: - description: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). in: query name: fieldManager schema: @@ -35756,160 +35866,80 @@ paths: name: fieldValidation schema: type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. - in: query - name: force - schema: - type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: + application/json: schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: - schema: - $ref: '#/components/schemas/v1.Patch' + $ref: '#/components/schemas/v1.Job' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.Job' description: Created "401": content: {} description: Unauthorized tags: - - certificates_v1 - x-kubernetes-action: patch + - batch_v1 + x-kubernetes-action: put x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest + group: batch + kind: Job version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json - put: - description: replace status of the specified CertificateSigningRequest - operationId: replaceCertificateSigningRequestStatus - parameters: - - description: name of the CertificateSigningRequest - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - required: true + /apis/batch/v1/watch/cronjobs: {} + /apis/batch/v1/watch/jobs: {} + /apis/batch/v1/watch/namespaces/{namespace}/cronjobs: {} + /apis/batch/v1/watch/namespaces/{namespace}/cronjobs/{name}: {} + /apis/batch/v1/watch/namespaces/{namespace}/jobs: {} + /apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}: {} + /apis/certificates.k8s.io/: + get: + description: get information of a group + operationId: getAPIGroup responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.APIGroup' application/yaml: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.APIGroup' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' + $ref: '#/components/schemas/v1.APIGroup' description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - application/yaml: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.CertificateSigningRequest' - description: Created "401": content: {} description: Unauthorized tags: - - certificates_v1 - x-kubernetes-action: put - x-kubernetes-group-version-kind: - group: certificates.k8s.io - kind: CertificateSigningRequest - version: v1 - x-codegen-request-body-name: body - x-contentType: '*/*' + - certificates x-accepts: application/json - /apis/certificates.k8s.io/v1/watch/certificatesigningrequests: {} - /apis/certificates.k8s.io/v1/watch/certificatesigningrequests/{name}: {} - /apis/certificates.k8s.io/v1alpha1/: + /apis/certificates.k8s.io/v1/: get: description: get available resources operationId: getAPIResources @@ -35930,12 +35960,12 @@ paths: content: {} description: Unauthorized tags: - - certificates_v1alpha1 + - certificates_v1 x-accepts: application/json - /apis/certificates.k8s.io/v1alpha1/clustertrustbundles: + /apis/certificates.k8s.io/v1/certificatesigningrequests: delete: - description: delete collection of ClusterTrustBundle - operationId: deleteCollectionClusterTrustBundle + description: delete collection of CertificateSigningRequest + operationId: deleteCollectionCertificateSigningRequest parameters: - description: If 'true', then the output is pretty printed. in: query @@ -36048,7 +36078,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -36069,18 +36099,18 @@ paths: content: {} description: Unauthorized tags: - - certificates_v1alpha1 + - certificates_v1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: certificates.k8s.io - kind: ClusterTrustBundle - version: v1alpha1 + kind: CertificateSigningRequest + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind ClusterTrustBundle - operationId: listClusterTrustBundle + description: list or watch objects of kind CertificateSigningRequest + operationId: listCertificateSigningRequest parameters: - description: If 'true', then the output is pretty printed. in: query @@ -36176,34 +36206,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' + $ref: '#/components/schemas/v1.CertificateSigningRequestList' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' + $ref: '#/components/schemas/v1.CertificateSigningRequestList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' + $ref: '#/components/schemas/v1.CertificateSigningRequestList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' + $ref: '#/components/schemas/v1.CertificateSigningRequestList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' + $ref: '#/components/schemas/v1.CertificateSigningRequestList' description: OK "401": content: {} description: Unauthorized tags: - - certificates_v1alpha1 + - certificates_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: group: certificates.k8s.io - kind: ClusterTrustBundle - version: v1alpha1 + kind: CertificateSigningRequest + version: v1 x-accepts: application/json post: - description: create a ClusterTrustBundle - operationId: createClusterTrustBundle + description: create a CertificateSigningRequest + operationId: createCertificateSigningRequest parameters: - description: If 'true', then the output is pretty printed. in: query @@ -36244,66 +36274,66 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: Accepted "401": content: {} description: Unauthorized tags: - - certificates_v1alpha1 + - certificates_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: group: certificates.k8s.io - kind: ClusterTrustBundle - version: v1alpha1 + kind: CertificateSigningRequest + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}: + /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}: delete: - description: delete a ClusterTrustBundle - operationId: deleteClusterTrustBundle + description: delete a CertificateSigningRequest + operationId: deleteCertificateSigningRequest parameters: - - description: name of the ClusterTrustBundle + - description: name of the CertificateSigningRequest in: path name: name required: true @@ -36352,7 +36382,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -36385,20 +36415,20 @@ paths: content: {} description: Unauthorized tags: - - certificates_v1alpha1 + - certificates_v1 x-kubernetes-action: delete x-kubernetes-group-version-kind: group: certificates.k8s.io - kind: ClusterTrustBundle - version: v1alpha1 + kind: CertificateSigningRequest + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified ClusterTrustBundle - operationId: readClusterTrustBundle + description: read the specified CertificateSigningRequest + operationId: readCertificateSigningRequest parameters: - - description: name of the ClusterTrustBundle + - description: name of the CertificateSigningRequest in: path name: name required: true @@ -36414,30 +36444,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: OK "401": content: {} description: Unauthorized tags: - - certificates_v1alpha1 + - certificates_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: group: certificates.k8s.io - kind: ClusterTrustBundle - version: v1alpha1 + kind: CertificateSigningRequest + version: v1 x-accepts: application/json patch: - description: partially update the specified ClusterTrustBundle - operationId: patchClusterTrustBundle + description: partially update the specified CertificateSigningRequest + operationId: patchCertificateSigningRequest parameters: - - description: name of the ClusterTrustBundle + - description: name of the CertificateSigningRequest in: path name: name required: true @@ -36491,16 +36521,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -36509,44 +36530,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: Created "401": content: {} description: Unauthorized tags: - - certificates_v1alpha1 + - certificates_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: group: certificates.k8s.io - kind: ClusterTrustBundle - version: v1alpha1 + kind: CertificateSigningRequest + version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified ClusterTrustBundle - operationId: replaceClusterTrustBundle + description: replace the specified CertificateSigningRequest + operationId: replaceCertificateSigningRequest parameters: - - description: name of the ClusterTrustBundle + - description: name of the CertificateSigningRequest in: path name: name required: true @@ -36591,231 +36612,540 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: Created "401": content: {} description: Unauthorized tags: - - certificates_v1alpha1 + - certificates_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: group: certificates.k8s.io - kind: ClusterTrustBundle - version: v1alpha1 + kind: CertificateSigningRequest + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles: {} - /apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles/{name}: {} - /apis/coordination.k8s.io/: + /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval: get: - description: get information of a group - operationId: getAPIGroup + description: read approval of the specified CertificateSigningRequest + operationId: readCertificateSigningRequestApproval + parameters: + - description: name of the CertificateSigningRequest + in: path + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.APIGroup' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1.APIGroup' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIGroup' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: OK "401": content: {} description: Unauthorized tags: - - coordination + - certificates_v1 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: certificates.k8s.io + kind: CertificateSigningRequest + version: v1 x-accepts: application/json - /apis/coordination.k8s.io/v1/: - get: - description: get available resources - operationId: getAPIResources + patch: + description: partially update approval of the specified CertificateSigningRequest + operationId: patchCertificateSigningRequestApproval + parameters: + - description: name of the CertificateSigningRequest + in: path + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. + in: query + name: force + schema: + type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Patch' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.APIResourceList' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1.APIResourceList' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.APIResourceList' + $ref: '#/components/schemas/v1.CertificateSigningRequest' description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + description: Created "401": content: {} description: Unauthorized tags: - - coordination_v1 + - certificates_v1 + x-kubernetes-action: patch + x-kubernetes-group-version-kind: + group: certificates.k8s.io + kind: CertificateSigningRequest + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json x-accepts: application/json - /apis/coordination.k8s.io/v1/leases: - get: - description: list or watch objects of kind Lease - operationId: listLeaseForAllNamespaces + put: + description: replace approval of the specified CertificateSigningRequest + operationId: replaceCertificateSigningRequestApproval parameters: - - description: allowWatchBookmarks requests watch events with type "BOOKMARK". - Servers that do not implement bookmarks may ignore this flag and bookmarks - are sent at the server's discretion. Clients should not assume bookmarks - are returned at any specific interval, nor may they assume the server will - send any BOOKMARK event during a session. If this is not a watch, this field - is ignored. - in: query - name: allowWatchBookmarks + - description: name of the CertificateSigningRequest + in: path + name: name + required: true schema: - type: boolean - - description: |- - The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". - - This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + type: string + - description: If 'true', then the output is pretty printed. in: query - name: continue + name: pretty schema: type: string - - description: A selector to restrict the list of returned objects by their - fields. Defaults to everything. + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' in: query - name: fieldSelector + name: dryRun schema: type: string - - description: A selector to restrict the list of returned objects by their - labels. Defaults to everything. + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. in: query - name: labelSelector + name: fieldManager schema: type: string - - description: |- - limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. - - The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' in: query - name: limit + name: fieldValidation schema: - type: integer + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - certificates_v1 + x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: certificates.k8s.io + kind: CertificateSigningRequest + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status: + get: + description: read status of the specified CertificateSigningRequest + operationId: readCertificateSigningRequestStatus + parameters: + - description: name of the CertificateSigningRequest + in: path + name: name + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty schema: type: string - - description: |- - resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - certificates_v1 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: certificates.k8s.io + kind: CertificateSigningRequest + version: v1 + x-accepts: application/json + patch: + description: partially update status of the specified CertificateSigningRequest + operationId: patchCertificateSigningRequestStatus + parameters: + - description: name of the CertificateSigningRequest + in: path + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. in: query - name: resourceVersion + name: pretty schema: type: string - - description: |- - resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' in: query - name: resourceVersionMatch + name: dryRun schema: type: string - - description: |- - `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. - - When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan - is interpreted as "data at least as new as the provided `resourceVersion`" - and the bookmark event is send when the state is synced - to a `resourceVersion` at least as fresh as the one provided by the ListOptions. - If `resourceVersion` is unset, this is interpreted as "consistent read" and the - bookmark event is send when the state is synced at least to the moment - when request started being processed. - - `resourceVersionMatch` set to any other value or unset - Invalid error is returned. - - Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). in: query - name: sendInitialEvents + name: fieldManager schema: - type: boolean - - description: Timeout for the list/watch call. This limits the duration of - the call, regardless of any activity or inactivity. + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' in: query - name: timeoutSeconds + name: fieldValidation schema: - type: integer - - description: Watch for changes to the described resources and return them - as a stream of add, update, and remove notifications. Specify resourceVersion. + type: string + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. in: query - name: watch + name: force schema: type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Patch' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.LeaseList' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/yaml: schema: - $ref: '#/components/schemas/v1.LeaseList' + $ref: '#/components/schemas/v1.CertificateSigningRequest' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.LeaseList' - application/json;stream=watch: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + description: OK + "201": + content: + application/json: schema: - $ref: '#/components/schemas/v1.LeaseList' - application/vnd.kubernetes.protobuf;stream=watch: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/yaml: schema: - $ref: '#/components/schemas/v1.LeaseList' - description: OK + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + description: Created "401": content: {} description: Unauthorized tags: - - coordination_v1 - x-kubernetes-action: list + - certificates_v1 + x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: coordination.k8s.io - kind: Lease + group: certificates.k8s.io + kind: CertificateSigningRequest version: v1 + x-codegen-request-body-name: body + x-contentType: application/json x-accepts: application/json - /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases: - delete: - description: delete collection of Lease - operationId: deleteCollectionNamespacedLease + put: + description: replace status of the specified CertificateSigningRequest + operationId: replaceCertificateSigningRequestStatus parameters: - - description: object name and auth scope, such as for teams and projects + - description: name of the CertificateSigningRequest in: path - name: namespace + name: name required: true schema: type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/yaml: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.CertificateSigningRequest' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - certificates_v1 + x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: certificates.k8s.io + kind: CertificateSigningRequest + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/certificates.k8s.io/v1/watch/certificatesigningrequests: {} + /apis/certificates.k8s.io/v1/watch/certificatesigningrequests/{name}: {} + /apis/certificates.k8s.io/v1alpha1/: + get: + description: get available resources + operationId: getAPIResources + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - certificates_v1alpha1 + x-accepts: application/json + /apis/certificates.k8s.io/v1alpha1/clustertrustbundles: + delete: + description: delete collection of ClusterTrustBundle + operationId: deleteCollectionClusterTrustBundle + parameters: - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -36927,7 +37257,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -36948,25 +37278,19 @@ paths: content: {} description: Unauthorized tags: - - coordination_v1 + - certificates_v1alpha1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: coordination.k8s.io - kind: Lease - version: v1 + group: certificates.k8s.io + kind: ClusterTrustBundle + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind Lease - operationId: listNamespacedLease + description: list or watch objects of kind ClusterTrustBundle + operationId: listClusterTrustBundle parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -37061,41 +37385,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.LeaseList' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' application/yaml: schema: - $ref: '#/components/schemas/v1.LeaseList' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.LeaseList' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.LeaseList' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.LeaseList' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundleList' description: OK "401": content: {} description: Unauthorized tags: - - coordination_v1 + - certificates_v1alpha1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: coordination.k8s.io - kind: Lease - version: v1 + group: certificates.k8s.io + kind: ClusterTrustBundle + version: v1alpha1 x-accepts: application/json post: - description: create a Lease - operationId: createNamespacedLease + description: create a ClusterTrustBundle + operationId: createClusterTrustBundle parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -37135,77 +37453,71 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/yaml: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/yaml: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/yaml: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' description: Accepted "401": content: {} description: Unauthorized tags: - - coordination_v1 + - certificates_v1alpha1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: coordination.k8s.io - kind: Lease - version: v1 + group: certificates.k8s.io + kind: ClusterTrustBundle + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}: + /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}: delete: - description: delete a Lease - operationId: deleteNamespacedLease + description: delete a ClusterTrustBundle + operationId: deleteClusterTrustBundle parameters: - - description: name of the Lease + - description: name of the ClusterTrustBundle in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -37249,7 +37561,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -37282,31 +37594,25 @@ paths: content: {} description: Unauthorized tags: - - coordination_v1 + - certificates_v1alpha1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: coordination.k8s.io - kind: Lease - version: v1 + group: certificates.k8s.io + kind: ClusterTrustBundle + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified Lease - operationId: readNamespacedLease + description: read the specified ClusterTrustBundle + operationId: readClusterTrustBundle parameters: - - description: name of the Lease + - description: name of the ClusterTrustBundle in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -37317,41 +37623,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/yaml: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' description: OK "401": content: {} description: Unauthorized tags: - - coordination_v1 + - certificates_v1alpha1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: coordination.k8s.io - kind: Lease - version: v1 + group: certificates.k8s.io + kind: ClusterTrustBundle + version: v1alpha1 x-accepts: application/json patch: - description: partially update the specified Lease - operationId: patchNamespacedLease + description: partially update the specified ClusterTrustBundle + operationId: patchClusterTrustBundle parameters: - - description: name of the Lease + - description: name of the ClusterTrustBundle in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -37400,16 +37700,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -37418,55 +37709,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/yaml: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/yaml: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' description: Created "401": content: {} description: Unauthorized tags: - - coordination_v1 + - certificates_v1alpha1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: coordination.k8s.io - kind: Lease - version: v1 + group: certificates.k8s.io + kind: ClusterTrustBundle + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified Lease - operationId: replaceNamespacedLease + description: replace the specified ClusterTrustBundle + operationId: replaceClusterTrustBundle parameters: - - description: name of the Lease + - description: name of the ClusterTrustBundle in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -37506,52 +37791,51 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/yaml: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/yaml: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Lease' + $ref: '#/components/schemas/v1alpha1.ClusterTrustBundle' description: Created "401": content: {} description: Unauthorized tags: - - coordination_v1 + - certificates_v1alpha1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: coordination.k8s.io - kind: Lease - version: v1 + group: certificates.k8s.io + kind: ClusterTrustBundle + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /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}: {} - /apis/discovery.k8s.io/: + /apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles: {} + /apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles/{name}: {} + /apis/coordination.k8s.io/: get: description: get information of a group operationId: getAPIGroup @@ -37572,9 +37856,9 @@ paths: content: {} description: Unauthorized tags: - - discovery + - coordination x-accepts: application/json - /apis/discovery.k8s.io/v1/: + /apis/coordination.k8s.io/v1/: get: description: get available resources operationId: getAPIResources @@ -37595,12 +37879,12 @@ paths: content: {} description: Unauthorized tags: - - discovery_v1 + - coordination_v1 x-accepts: application/json - /apis/discovery.k8s.io/v1/endpointslices: + /apis/coordination.k8s.io/v1/leases: get: - description: list or watch objects of kind EndpointSlice - operationId: listEndpointSliceForAllNamespaces + description: list or watch objects of kind Lease + operationId: listLeaseForAllNamespaces parameters: - description: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks @@ -37696,35 +37980,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' description: OK "401": content: {} description: Unauthorized tags: - - discovery_v1 + - coordination_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: discovery.k8s.io - kind: EndpointSlice + group: coordination.k8s.io + kind: Lease version: v1 x-accepts: application/json - /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices: + /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases: delete: - description: delete collection of EndpointSlice - operationId: deleteCollectionNamespacedEndpointSlice + description: delete collection of Lease + operationId: deleteCollectionNamespacedLease parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -37843,7 +38127,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -37864,18 +38148,18 @@ paths: content: {} description: Unauthorized tags: - - discovery_v1 + - coordination_v1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: discovery.k8s.io - kind: EndpointSlice + group: coordination.k8s.io + kind: Lease version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind EndpointSlice - operationId: listNamespacedEndpointSlice + description: list or watch objects of kind Lease + operationId: listNamespacedLease parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -37977,34 +38261,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.EndpointSliceList' + $ref: '#/components/schemas/v1.LeaseList' description: OK "401": content: {} description: Unauthorized tags: - - discovery_v1 + - coordination_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: discovery.k8s.io - kind: EndpointSlice + group: coordination.k8s.io + kind: Lease version: v1 x-accepts: application/json post: - description: create an EndpointSlice - operationId: createNamespacedEndpointSlice + description: create a Lease + operationId: createNamespacedLease parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -38051,66 +38335,66 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' description: Accepted "401": content: {} description: Unauthorized tags: - - discovery_v1 + - coordination_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: discovery.k8s.io - kind: EndpointSlice + group: coordination.k8s.io + kind: Lease version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}: + /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}: delete: - description: delete an EndpointSlice - operationId: deleteNamespacedEndpointSlice + description: delete a Lease + operationId: deleteNamespacedLease parameters: - - description: name of the EndpointSlice + - description: name of the Lease in: path name: name required: true @@ -38165,7 +38449,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -38198,20 +38482,20 @@ paths: content: {} description: Unauthorized tags: - - discovery_v1 + - coordination_v1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: discovery.k8s.io - kind: EndpointSlice + group: coordination.k8s.io + kind: Lease version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified EndpointSlice - operationId: readNamespacedEndpointSlice + description: read the specified Lease + operationId: readNamespacedLease parameters: - - description: name of the EndpointSlice + - description: name of the Lease in: path name: name required: true @@ -38233,30 +38517,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' description: OK "401": content: {} description: Unauthorized tags: - - discovery_v1 + - coordination_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: discovery.k8s.io - kind: EndpointSlice + group: coordination.k8s.io + kind: Lease version: v1 x-accepts: application/json patch: - description: partially update the specified EndpointSlice - operationId: patchNamespacedEndpointSlice + description: partially update the specified Lease + operationId: patchNamespacedLease parameters: - - description: name of the EndpointSlice + - description: name of the Lease in: path name: name required: true @@ -38316,16 +38600,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -38334,44 +38609,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' description: Created "401": content: {} description: Unauthorized tags: - - discovery_v1 + - coordination_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: discovery.k8s.io - kind: EndpointSlice + group: coordination.k8s.io + kind: Lease version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified EndpointSlice - operationId: replaceNamespacedEndpointSlice + description: replace the specified Lease + operationId: replaceNamespacedLease parameters: - - description: name of the EndpointSlice + - description: name of the Lease in: path name: name required: true @@ -38422,52 +38697,52 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/yaml: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.EndpointSlice' + $ref: '#/components/schemas/v1.Lease' description: Created "401": content: {} description: Unauthorized tags: - - discovery_v1 + - coordination_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: discovery.k8s.io - kind: EndpointSlice + group: coordination.k8s.io + kind: Lease version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /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}: {} - /apis/events.k8s.io/: + /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}: {} + /apis/discovery.k8s.io/: get: description: get information of a group operationId: getAPIGroup @@ -38488,9 +38763,9 @@ paths: content: {} description: Unauthorized tags: - - events + - discovery x-accepts: application/json - /apis/events.k8s.io/v1/: + /apis/discovery.k8s.io/v1/: get: description: get available resources operationId: getAPIResources @@ -38511,12 +38786,12 @@ paths: content: {} description: Unauthorized tags: - - events_v1 + - discovery_v1 x-accepts: application/json - /apis/events.k8s.io/v1/events: + /apis/discovery.k8s.io/v1/endpointslices: get: - description: list or watch objects of kind Event - operationId: listEventForAllNamespaces + description: list or watch objects of kind EndpointSlice + operationId: listEndpointSliceForAllNamespaces parameters: - description: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks @@ -38612,35 +38887,35 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' application/yaml: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' application/json;stream=watch: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' description: OK "401": content: {} description: Unauthorized tags: - - events_v1 + - discovery_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: events.k8s.io - kind: Event + group: discovery.k8s.io + kind: EndpointSlice version: v1 x-accepts: application/json - /apis/events.k8s.io/v1/namespaces/{namespace}/events: + /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices: delete: - description: delete collection of Event - operationId: deleteCollectionNamespacedEvent + description: delete collection of EndpointSlice + operationId: deleteCollectionNamespacedEndpointSlice parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -38759,7 +39034,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -38780,18 +39055,18 @@ paths: content: {} description: Unauthorized tags: - - events_v1 + - discovery_v1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: events.k8s.io - kind: Event + group: discovery.k8s.io + kind: EndpointSlice version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind Event - operationId: listNamespacedEvent + description: list or watch objects of kind EndpointSlice + operationId: listNamespacedEndpointSlice parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -38893,34 +39168,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' application/yaml: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' application/json;stream=watch: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/events.v1.EventList' + $ref: '#/components/schemas/v1.EndpointSliceList' description: OK "401": content: {} description: Unauthorized tags: - - events_v1 + - discovery_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: events.k8s.io - kind: Event + group: discovery.k8s.io + kind: EndpointSlice version: v1 x-accepts: application/json post: - description: create an Event - operationId: createNamespacedEvent + description: create an EndpointSlice + operationId: createNamespacedEndpointSlice parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -38967,66 +39242,66 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/yaml: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/yaml: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/yaml: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' description: Accepted "401": content: {} description: Unauthorized tags: - - events_v1 + - discovery_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: events.k8s.io - kind: Event + group: discovery.k8s.io + kind: EndpointSlice version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}: + /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}: delete: - description: delete an Event - operationId: deleteNamespacedEvent + description: delete an EndpointSlice + operationId: deleteNamespacedEndpointSlice parameters: - - description: name of the Event + - description: name of the EndpointSlice in: path name: name required: true @@ -39081,7 +39356,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -39114,20 +39389,20 @@ paths: content: {} description: Unauthorized tags: - - events_v1 + - discovery_v1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: events.k8s.io - kind: Event + group: discovery.k8s.io + kind: EndpointSlice version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified Event - operationId: readNamespacedEvent + description: read the specified EndpointSlice + operationId: readNamespacedEndpointSlice parameters: - - description: name of the Event + - description: name of the EndpointSlice in: path name: name required: true @@ -39149,30 +39424,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/yaml: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' description: OK "401": content: {} description: Unauthorized tags: - - events_v1 + - discovery_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: events.k8s.io - kind: Event + group: discovery.k8s.io + kind: EndpointSlice version: v1 x-accepts: application/json patch: - description: partially update the specified Event - operationId: patchNamespacedEvent + description: partially update the specified EndpointSlice + operationId: patchNamespacedEndpointSlice parameters: - - description: name of the Event + - description: name of the EndpointSlice in: path name: name required: true @@ -39232,16 +39507,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -39250,44 +39516,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/yaml: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/yaml: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' description: Created "401": content: {} description: Unauthorized tags: - - events_v1 + - discovery_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: events.k8s.io - kind: Event + group: discovery.k8s.io + kind: EndpointSlice version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified Event - operationId: replaceNamespacedEvent + description: replace the specified EndpointSlice + operationId: replaceNamespacedEndpointSlice parameters: - - description: name of the Event + - description: name of the EndpointSlice in: path name: name required: true @@ -39338,52 +39604,52 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/yaml: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/yaml: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/events.v1.Event' + $ref: '#/components/schemas/v1.EndpointSlice' description: Created "401": content: {} description: Unauthorized tags: - - events_v1 + - discovery_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: events.k8s.io - kind: Event + group: discovery.k8s.io + kind: EndpointSlice version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /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}: {} - /apis/flowcontrol.apiserver.k8s.io/: + /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}: {} + /apis/events.k8s.io/: get: description: get information of a group operationId: getAPIGroup @@ -39404,9 +39670,9 @@ paths: content: {} description: Unauthorized tags: - - flowcontrolApiserver + - events x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta2/: + /apis/events.k8s.io/v1/: get: description: get available resources operationId: getAPIResources @@ -39427,18 +39693,23 @@ paths: content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta2 + - events_v1 x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas: - delete: - description: delete collection of FlowSchema - operationId: deleteCollectionFlowSchema + /apis/events.k8s.io/v1/events: + get: + description: list or watch objects of kind Event + operationId: listEventForAllNamespaces parameters: - - description: If 'true', then the output is pretty printed. + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. in: query - name: pretty + name: allowWatchBookmarks schema: - type: string + type: boolean - description: |- The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". @@ -39447,29 +39718,12 @@ paths: name: continue schema: type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - description: A selector to restrict the list of returned objects by their fields. Defaults to everything. in: query name: fieldSelector schema: type: string - - description: The duration in seconds before the object should be deleted. - Value must be non-negative integer. The value zero indicates delete immediately. - If this value is nil, the default grace period for the specified type will - be used. Defaults to a per object value if not specified. zero means delete - immediately. - in: query - name: gracePeriodSeconds - schema: - type: integer - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. in: query @@ -39484,23 +39738,165 @@ paths: name: limit schema: type: integer - - description: 'Deprecated: please use the PropagationPolicy, this field will - be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, - the "orphan" finalizer will be added to/removed from the object''s finalizers - list. Either this field or PropagationPolicy may be set, but not both.' - in: query - name: orphanDependents - schema: - type: boolean - - description: 'Whether and how garbage collection will be performed. Either - this field or OrphanDependents may be set, but not both. The default policy - is decided by the existing finalizer set in the metadata.finalizers and - the resource-specific default policy. Acceptable values are: ''Orphan'' - - orphan the dependents; ''Background'' - allow the garbage collector to - delete the dependents in the background; ''Foreground'' - a cascading policy - that deletes all dependents in the foreground.' + - description: If 'true', then the output is pretty printed. in: query - name: propagationPolicy + name: pretty + schema: + type: string + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. + in: query + name: watch + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/events.v1.EventList' + application/yaml: + schema: + $ref: '#/components/schemas/events.v1.EventList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/events.v1.EventList' + application/json;stream=watch: + schema: + $ref: '#/components/schemas/events.v1.EventList' + application/vnd.kubernetes.protobuf;stream=watch: + schema: + $ref: '#/components/schemas/events.v1.EventList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - events_v1 + x-kubernetes-action: list + x-kubernetes-group-version-kind: + group: events.k8s.io + kind: Event + version: v1 + x-accepts: application/json + /apis/events.k8s.io/v1/namespaces/{namespace}/events: + delete: + description: delete collection of Event + operationId: deleteCollectionNamespacedEvent + parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: The duration in seconds before the object should be deleted. + Value must be non-negative integer. The value zero indicates delete immediately. + If this value is nil, the default grace period for the specified type will + be used. Defaults to a per object value if not specified. zero means delete + immediately. + in: query + name: gracePeriodSeconds + schema: + type: integer + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: 'Deprecated: please use the PropagationPolicy, this field will + be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, + the "orphan" finalizer will be added to/removed from the object''s finalizers + list. Either this field or PropagationPolicy may be set, but not both.' + in: query + name: orphanDependents + schema: + type: boolean + - description: 'Whether and how garbage collection will be performed. Either + this field or OrphanDependents may be set, but not both. The default policy + is decided by the existing finalizer set in the metadata.finalizers and + the resource-specific default policy. Acceptable values are: ''Orphan'' + - orphan the dependents; ''Background'' - allow the garbage collector to + delete the dependents in the background; ''Foreground'' - a cascading policy + that deletes all dependents in the foreground.' + in: query + name: propagationPolicy schema: type: string - description: |- @@ -39545,7 +39941,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -39566,19 +39962,25 @@ paths: content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta2 + - events_v1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 + group: events.k8s.io + kind: Event + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind FlowSchema - operationId: listFlowSchema + description: list or watch objects of kind Event + operationId: listNamespacedEvent parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -39673,35 +40075,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchemaList' + $ref: '#/components/schemas/events.v1.EventList' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchemaList' + $ref: '#/components/schemas/events.v1.EventList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchemaList' + $ref: '#/components/schemas/events.v1.EventList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1beta2.FlowSchemaList' + $ref: '#/components/schemas/events.v1.EventList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1beta2.FlowSchemaList' + $ref: '#/components/schemas/events.v1.EventList' description: OK "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta2 + - events_v1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 + group: events.k8s.io + kind: Event + version: v1 x-accepts: application/json post: - description: create a FlowSchema - operationId: createFlowSchema + description: create an Event + operationId: createNamespacedEvent parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -39741,71 +40149,77 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' description: Accepted "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta2 + - events_v1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 + group: events.k8s.io + kind: Event + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas/{name}: + /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}: delete: - description: delete a FlowSchema - operationId: deleteFlowSchema + description: delete an Event + operationId: deleteNamespacedEvent parameters: - - description: name of the FlowSchema + - description: name of the Event in: path name: name required: true schema: type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -39849,7 +40263,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -39882,25 +40296,31 @@ paths: content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta2 + - events_v1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 + group: events.k8s.io + kind: Event + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified FlowSchema - operationId: readFlowSchema + description: read the specified Event + operationId: readNamespacedEvent parameters: - - description: name of the FlowSchema + - description: name of the Event in: path name: name required: true schema: type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -39911,35 +40331,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' description: OK "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta2 + - events_v1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 + group: events.k8s.io + kind: Event + version: v1 x-accepts: application/json patch: - description: partially update the specified FlowSchema - operationId: patchFlowSchema + description: partially update the specified Event + operationId: patchNamespacedEvent parameters: - - description: name of the FlowSchema + - description: name of the Event in: path name: name required: true schema: type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -39988,16 +40414,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -40006,49 +40423,55 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' description: Created "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta2 + - events_v1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 + group: events.k8s.io + kind: Event + version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified FlowSchema - operationId: replaceFlowSchema + description: replace the specified Event + operationId: replaceNamespacedEvent parameters: - - description: name of the FlowSchema + - description: name of the Event in: path name: name required: true schema: type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -40088,292 +40511,101 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/events.v1.Event' description: Created "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta2 + - events_v1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 + group: events.k8s.io + kind: Event + version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas/{name}/status: + /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}: {} + /apis/flowcontrol.apiserver.k8s.io/: get: - description: read status of the specified FlowSchema - operationId: readFlowSchemaStatus - parameters: - - description: name of the FlowSchema - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string + description: get information of a group + operationId: getAPIGroup responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/v1.APIGroup' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/v1.APIGroup' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/v1.APIGroup' description: OK "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta2 - x-kubernetes-action: get - x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 - x-accepts: application/json - patch: - description: partially update status of the specified FlowSchema - operationId: patchFlowSchemaStatus - parameters: - - description: name of the FlowSchema - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. - in: query - name: force - schema: - type: boolean - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: - schema: - $ref: '#/components/schemas/v1.Patch' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - application/yaml: - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - application/yaml: - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - flowcontrolApiserver_v1beta2 - x-kubernetes-action: patch - x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 - x-codegen-request-body-name: body - x-contentType: application/json-patch+json + - flowcontrolApiserver x-accepts: application/json - put: - description: replace status of the specified FlowSchema - operationId: replaceFlowSchemaStatus - parameters: - - description: name of the FlowSchema - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - required: true + /apis/flowcontrol.apiserver.k8s.io/v1beta2/: + get: + description: get available resources + operationId: getAPIResources responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/v1.APIResourceList' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/v1.APIResourceList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' + $ref: '#/components/schemas/v1.APIResourceList' description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - application/yaml: - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1beta2.FlowSchema' - description: Created "401": content: {} description: Unauthorized tags: - flowcontrolApiserver_v1beta2 - x-kubernetes-action: put - x-kubernetes-group-version-kind: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta2 - x-codegen-request-body-name: body - x-contentType: '*/*' x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations: + /apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas: delete: - description: delete collection of PriorityLevelConfiguration - operationId: deleteCollectionPriorityLevelConfiguration + description: delete collection of FlowSchema + operationId: deleteCollectionFlowSchema parameters: - description: If 'true', then the output is pretty printed. in: query @@ -40486,7 +40718,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -40511,14 +40743,14 @@ paths: x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind PriorityLevelConfiguration - operationId: listPriorityLevelConfiguration + description: list or watch objects of kind FlowSchema + operationId: listFlowSchema parameters: - description: If 'true', then the output is pretty printed. in: query @@ -40614,19 +40846,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta2.FlowSchemaList' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta2.FlowSchemaList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta2.FlowSchemaList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta2.FlowSchemaList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta2.FlowSchemaList' description: OK "401": content: {} @@ -40636,12 +40868,12 @@ paths: x-kubernetes-action: list x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-accepts: application/json post: - description: create a PriorityLevelConfiguration - operationId: createPriorityLevelConfiguration + description: create a FlowSchema + operationId: createFlowSchema parameters: - description: If 'true', then the output is pretty printed. in: query @@ -40682,46 +40914,46 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: Accepted "401": content: {} @@ -40731,17 +40963,17 @@ paths: x-kubernetes-action: post x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations/{name}: + /apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas/{name}: delete: - description: delete a PriorityLevelConfiguration - operationId: deletePriorityLevelConfiguration + description: delete a FlowSchema + operationId: deleteFlowSchema parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -40790,7 +41022,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -40827,16 +41059,16 @@ paths: x-kubernetes-action: delete x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified PriorityLevelConfiguration - operationId: readPriorityLevelConfiguration + description: read the specified FlowSchema + operationId: readFlowSchema parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -40852,13 +41084,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: OK "401": content: {} @@ -40868,14 +41100,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-accepts: application/json patch: - description: partially update the specified PriorityLevelConfiguration - operationId: patchPriorityLevelConfiguration + description: partially update the specified FlowSchema + operationId: patchFlowSchema parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -40929,16 +41161,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -40947,25 +41170,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: Created "401": content: {} @@ -40975,16 +41198,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified PriorityLevelConfiguration - operationId: replacePriorityLevelConfiguration + description: replace the specified FlowSchema + operationId: replaceFlowSchema parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -41029,34 +41252,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: Created "401": content: {} @@ -41066,17 +41289,17 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations/{name}/status: + /apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas/{name}/status: get: - description: read status of the specified PriorityLevelConfiguration - operationId: readPriorityLevelConfigurationStatus + description: read status of the specified FlowSchema + operationId: readFlowSchemaStatus parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -41092,13 +41315,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: OK "401": content: {} @@ -41108,14 +41331,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-accepts: application/json patch: - description: partially update status of the specified PriorityLevelConfiguration - operationId: patchPriorityLevelConfigurationStatus + description: partially update status of the specified FlowSchema + operationId: patchFlowSchemaStatus parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -41169,16 +41392,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -41187,25 +41401,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: Created "401": content: {} @@ -41215,16 +41429,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified PriorityLevelConfiguration - operationId: replacePriorityLevelConfigurationStatus + description: replace status of the specified FlowSchema + operationId: replaceFlowSchemaStatus parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -41269,34 +41483,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta2.FlowSchema' description: Created "401": content: {} @@ -41306,42 +41520,15 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta2/watch/flowschemas: {} - /apis/flowcontrol.apiserver.k8s.io/v1beta2/watch/flowschemas/{name}: {} - /apis/flowcontrol.apiserver.k8s.io/v1beta2/watch/prioritylevelconfigurations: {} - /apis/flowcontrol.apiserver.k8s.io/v1beta2/watch/prioritylevelconfigurations/{name}: {} - /apis/flowcontrol.apiserver.k8s.io/v1beta3/: - get: - description: get available resources - operationId: getAPIResources - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - flowcontrolApiserver_v1beta3 - x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas: + /apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations: delete: - description: delete collection of FlowSchema - operationId: deleteCollectionFlowSchema + description: delete collection of PriorityLevelConfiguration + operationId: deleteCollectionPriorityLevelConfiguration parameters: - description: If 'true', then the output is pretty printed. in: query @@ -41454,7 +41641,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -41475,18 +41662,18 @@ paths: content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind FlowSchema - operationId: listFlowSchema + description: list or watch objects of kind PriorityLevelConfiguration + operationId: listPriorityLevelConfiguration parameters: - description: If 'true', then the output is pretty printed. in: query @@ -41582,34 +41769,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchemaList' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchemaList' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchemaList' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1beta3.FlowSchemaList' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1beta3.FlowSchemaList' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfigurationList' description: OK "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: list x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-accepts: application/json post: - description: create a FlowSchema - operationId: createFlowSchema + description: create a PriorityLevelConfiguration + operationId: createPriorityLevelConfiguration parameters: - description: If 'true', then the output is pretty printed. in: query @@ -41650,66 +41837,66 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: Accepted "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: post x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}: + /apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations/{name}: delete: - description: delete a FlowSchema - operationId: deleteFlowSchema + description: delete a PriorityLevelConfiguration + operationId: deletePriorityLevelConfiguration parameters: - - description: name of the FlowSchema + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -41758,7 +41945,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -41791,20 +41978,20 @@ paths: content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: delete x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified FlowSchema - operationId: readFlowSchema + description: read the specified PriorityLevelConfiguration + operationId: readPriorityLevelConfiguration parameters: - - description: name of the FlowSchema + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -41820,30 +42007,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: OK "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: get x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-accepts: application/json patch: - description: partially update the specified FlowSchema - operationId: patchFlowSchema + description: partially update the specified PriorityLevelConfiguration + operationId: patchPriorityLevelConfiguration parameters: - - description: name of the FlowSchema + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -41897,16 +42084,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -41915,44 +42093,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: Created "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: patch x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified FlowSchema - operationId: replaceFlowSchema + description: replace the specified PriorityLevelConfiguration + operationId: replacePriorityLevelConfiguration parameters: - - description: name of the FlowSchema + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -41997,54 +42175,54 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: Created "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: put x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status: + /apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations/{name}/status: get: - description: read status of the specified FlowSchema - operationId: readFlowSchemaStatus + description: read status of the specified PriorityLevelConfiguration + operationId: readPriorityLevelConfigurationStatus parameters: - - description: name of the FlowSchema + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -42060,30 +42238,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: OK "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: get x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-accepts: application/json patch: - description: partially update status of the specified FlowSchema - operationId: patchFlowSchemaStatus + description: partially update status of the specified PriorityLevelConfiguration + operationId: patchPriorityLevelConfigurationStatus parameters: - - description: name of the FlowSchema + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -42137,16 +42315,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -42155,44 +42324,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: Created "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: patch x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified FlowSchema - operationId: replaceFlowSchemaStatus + description: replace status of the specified PriorityLevelConfiguration + operationId: replacePriorityLevelConfigurationStatus parameters: - - description: name of the FlowSchema + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -42237,52 +42406,79 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.FlowSchema' + $ref: '#/components/schemas/v1beta2.PriorityLevelConfiguration' description: Created "401": content: {} description: Unauthorized tags: - - flowcontrolApiserver_v1beta3 + - flowcontrolApiserver_v1beta2 x-kubernetes-action: put x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - version: v1beta3 + kind: PriorityLevelConfiguration + version: v1beta2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations: + /apis/flowcontrol.apiserver.k8s.io/v1beta2/watch/flowschemas: {} + /apis/flowcontrol.apiserver.k8s.io/v1beta2/watch/flowschemas/{name}: {} + /apis/flowcontrol.apiserver.k8s.io/v1beta2/watch/prioritylevelconfigurations: {} + /apis/flowcontrol.apiserver.k8s.io/v1beta2/watch/prioritylevelconfigurations/{name}: {} + /apis/flowcontrol.apiserver.k8s.io/v1beta3/: + get: + description: get available resources + operationId: getAPIResources + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - flowcontrolApiserver_v1beta3 + x-accepts: application/json + /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas: delete: - description: delete collection of PriorityLevelConfiguration - operationId: deleteCollectionPriorityLevelConfiguration + description: delete collection of FlowSchema + operationId: deleteCollectionFlowSchema parameters: - description: If 'true', then the output is pretty printed. in: query @@ -42395,7 +42591,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -42420,14 +42616,14 @@ paths: x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind PriorityLevelConfiguration - operationId: listPriorityLevelConfiguration + description: list or watch objects of kind FlowSchema + operationId: listFlowSchema parameters: - description: If 'true', then the output is pretty printed. in: query @@ -42523,19 +42719,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta3.FlowSchemaList' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta3.FlowSchemaList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta3.FlowSchemaList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta3.FlowSchemaList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' + $ref: '#/components/schemas/v1beta3.FlowSchemaList' description: OK "401": content: {} @@ -42545,12 +42741,12 @@ paths: x-kubernetes-action: list x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-accepts: application/json post: - description: create a PriorityLevelConfiguration - operationId: createPriorityLevelConfiguration + description: create a FlowSchema + operationId: createFlowSchema parameters: - description: If 'true', then the output is pretty printed. in: query @@ -42591,46 +42787,46 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: Accepted "401": content: {} @@ -42640,17 +42836,17 @@ paths: x-kubernetes-action: post x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}: + /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}: delete: - description: delete a PriorityLevelConfiguration - operationId: deletePriorityLevelConfiguration + description: delete a FlowSchema + operationId: deleteFlowSchema parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -42699,7 +42895,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -42736,16 +42932,16 @@ paths: x-kubernetes-action: delete x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified PriorityLevelConfiguration - operationId: readPriorityLevelConfiguration + description: read the specified FlowSchema + operationId: readFlowSchema parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -42761,13 +42957,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: OK "401": content: {} @@ -42777,14 +42973,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-accepts: application/json patch: - description: partially update the specified PriorityLevelConfiguration - operationId: patchPriorityLevelConfiguration + description: partially update the specified FlowSchema + operationId: patchFlowSchema parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -42838,16 +43034,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -42856,25 +43043,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: Created "401": content: {} @@ -42884,16 +43071,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified PriorityLevelConfiguration - operationId: replacePriorityLevelConfiguration + description: replace the specified FlowSchema + operationId: replaceFlowSchema parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -42938,34 +43125,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: Created "401": content: {} @@ -42975,17 +43162,17 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status: + /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status: get: - description: read status of the specified PriorityLevelConfiguration - operationId: readPriorityLevelConfigurationStatus + description: read status of the specified FlowSchema + operationId: readFlowSchemaStatus parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -43001,13 +43188,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: OK "401": content: {} @@ -43017,14 +43204,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-accepts: application/json patch: - description: partially update status of the specified PriorityLevelConfiguration - operationId: patchPriorityLevelConfigurationStatus + description: partially update status of the specified FlowSchema + operationId: patchFlowSchemaStatus parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -43078,16 +43265,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -43096,25 +43274,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: Created "401": content: {} @@ -43124,16 +43302,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified PriorityLevelConfiguration - operationId: replacePriorityLevelConfigurationStatus + description: replace status of the specified FlowSchema + operationId: replaceFlowSchemaStatus parameters: - - description: name of the PriorityLevelConfiguration + - description: name of the FlowSchema in: path name: name required: true @@ -43178,34 +43356,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/yaml: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' + $ref: '#/components/schemas/v1beta3.FlowSchema' description: Created "401": content: {} @@ -43215,65 +43393,15 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration + kind: FlowSchema version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /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: {} - /apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/prioritylevelconfigurations/{name}: {} - /apis/internal.apiserver.k8s.io/: - get: - description: get information of a group - operationId: getAPIGroup - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIGroup' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIGroup' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - internalApiserver - x-accepts: application/json - /apis/internal.apiserver.k8s.io/v1alpha1/: - get: - description: get available resources - operationId: getAPIResources - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/yaml: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.APIResourceList' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - internalApiserver_v1alpha1 + x-contentType: application/json x-accepts: application/json - /apis/internal.apiserver.k8s.io/v1alpha1/storageversions: + /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations: delete: - description: delete collection of StorageVersion - operationId: deleteCollectionStorageVersion + description: delete collection of PriorityLevelConfiguration + operationId: deleteCollectionPriorityLevelConfiguration parameters: - description: If 'true', then the output is pretty printed. in: query @@ -43386,7 +43514,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -43407,18 +43535,18 @@ paths: content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind StorageVersion - operationId: listStorageVersion + description: list or watch objects of kind PriorityLevelConfiguration + operationId: listPriorityLevelConfiguration parameters: - description: If 'true', then the output is pretty printed. in: query @@ -43514,34 +43642,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersionList' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersionList' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersionList' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersionList' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersionList' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfigurationList' description: OK "401": content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-accepts: application/json post: - description: create a StorageVersion - operationId: createStorageVersion + description: create a PriorityLevelConfiguration + operationId: createPriorityLevelConfiguration parameters: - description: If 'true', then the output is pretty printed. in: query @@ -43582,66 +43710,66 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: Accepted "401": content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}: + /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}: delete: - description: delete a StorageVersion - operationId: deleteStorageVersion + description: delete a PriorityLevelConfiguration + operationId: deletePriorityLevelConfiguration parameters: - - description: name of the StorageVersion + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -43690,7 +43818,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -43723,20 +43851,20 @@ paths: content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified StorageVersion - operationId: readStorageVersion + description: read the specified PriorityLevelConfiguration + operationId: readPriorityLevelConfiguration parameters: - - description: name of the StorageVersion + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -43752,30 +43880,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: OK "401": content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-accepts: application/json patch: - description: partially update the specified StorageVersion - operationId: patchStorageVersion + description: partially update the specified PriorityLevelConfiguration + operationId: patchPriorityLevelConfiguration parameters: - - description: name of the StorageVersion + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -43829,16 +43957,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -43847,44 +43966,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: Created "401": content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified StorageVersion - operationId: replaceStorageVersion + description: replace the specified PriorityLevelConfiguration + operationId: replacePriorityLevelConfiguration parameters: - - description: name of the StorageVersion + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -43929,54 +44048,54 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: Created "401": content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status: + /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status: get: - description: read status of the specified StorageVersion - operationId: readStorageVersionStatus + description: read status of the specified PriorityLevelConfiguration + operationId: readPriorityLevelConfigurationStatus parameters: - - description: name of the StorageVersion + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -43992,30 +44111,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: OK "401": content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-accepts: application/json patch: - description: partially update status of the specified StorageVersion - operationId: patchStorageVersionStatus + description: partially update status of the specified PriorityLevelConfiguration + operationId: patchPriorityLevelConfigurationStatus parameters: - - description: name of the StorageVersion + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -44069,16 +44188,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -44087,44 +44197,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: Created "401": content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified StorageVersion - operationId: replaceStorageVersionStatus + description: replace status of the specified PriorityLevelConfiguration + operationId: replacePriorityLevelConfigurationStatus parameters: - - description: name of the StorageVersion + - description: name of the PriorityLevelConfiguration in: path name: name required: true @@ -44169,51 +44279,53 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/yaml: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1alpha1.StorageVersion' + $ref: '#/components/schemas/v1beta3.PriorityLevelConfiguration' description: Created "401": content: {} description: Unauthorized tags: - - internalApiserver_v1alpha1 + - flowcontrolApiserver_v1beta3 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: internal.apiserver.k8s.io - kind: StorageVersion - version: v1alpha1 + group: flowcontrol.apiserver.k8s.io + kind: PriorityLevelConfiguration + version: v1beta3 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions: {} - /apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions/{name}: {} - /apis/networking.k8s.io/: + /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: {} + /apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/prioritylevelconfigurations/{name}: {} + /apis/internal.apiserver.k8s.io/: get: description: get information of a group operationId: getAPIGroup @@ -44234,9 +44346,9 @@ paths: content: {} description: Unauthorized tags: - - networking + - internalApiserver x-accepts: application/json - /apis/networking.k8s.io/v1/: + /apis/internal.apiserver.k8s.io/v1alpha1/: get: description: get available resources operationId: getAPIResources @@ -44257,12 +44369,12 @@ paths: content: {} description: Unauthorized tags: - - networking_v1 + - internalApiserver_v1alpha1 x-accepts: application/json - /apis/networking.k8s.io/v1/ingressclasses: + /apis/internal.apiserver.k8s.io/v1alpha1/storageversions: delete: - description: delete collection of IngressClass - operationId: deleteCollectionIngressClass + description: delete collection of StorageVersion + operationId: deleteCollectionStorageVersion parameters: - description: If 'true', then the output is pretty printed. in: query @@ -44375,7 +44487,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -44396,18 +44508,18 @@ paths: content: {} description: Unauthorized tags: - - networking_v1 + - internalApiserver_v1alpha1 x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: IngressClass - version: v1 + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind IngressClass - operationId: listIngressClass + description: list or watch objects of kind StorageVersion + operationId: listStorageVersion parameters: - description: If 'true', then the output is pretty printed. in: query @@ -44503,34 +44615,34 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.IngressClassList' + $ref: '#/components/schemas/v1alpha1.StorageVersionList' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressClassList' + $ref: '#/components/schemas/v1alpha1.StorageVersionList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressClassList' + $ref: '#/components/schemas/v1alpha1.StorageVersionList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.IngressClassList' + $ref: '#/components/schemas/v1alpha1.StorageVersionList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.IngressClassList' + $ref: '#/components/schemas/v1alpha1.StorageVersionList' description: OK "401": content: {} description: Unauthorized tags: - - networking_v1 + - internalApiserver_v1alpha1 x-kubernetes-action: list x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: IngressClass - version: v1 + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 x-accepts: application/json post: - description: create an IngressClass - operationId: createIngressClass + description: create a StorageVersion + operationId: createStorageVersion parameters: - description: If 'true', then the output is pretty printed. in: query @@ -44571,66 +44683,66 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' description: Accepted "401": content: {} description: Unauthorized tags: - - networking_v1 + - internalApiserver_v1alpha1 x-kubernetes-action: post x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: IngressClass - version: v1 + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/networking.k8s.io/v1/ingressclasses/{name}: + /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}: delete: - description: delete an IngressClass - operationId: deleteIngressClass + description: delete a StorageVersion + operationId: deleteStorageVersion parameters: - - description: name of the IngressClass + - description: name of the StorageVersion in: path name: name required: true @@ -44679,7 +44791,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -44712,20 +44824,20 @@ paths: content: {} description: Unauthorized tags: - - networking_v1 + - internalApiserver_v1alpha1 x-kubernetes-action: delete x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: IngressClass - version: v1 + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified IngressClass - operationId: readIngressClass + description: read the specified StorageVersion + operationId: readStorageVersion parameters: - - description: name of the IngressClass + - description: name of the StorageVersion in: path name: name required: true @@ -44741,30 +44853,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' description: OK "401": content: {} description: Unauthorized tags: - - networking_v1 + - internalApiserver_v1alpha1 x-kubernetes-action: get x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: IngressClass - version: v1 + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 x-accepts: application/json patch: - description: partially update the specified IngressClass - operationId: patchIngressClass + description: partially update the specified StorageVersion + operationId: patchStorageVersion parameters: - - description: name of the IngressClass + - description: name of the StorageVersion in: path name: name required: true @@ -44818,16 +44930,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -44836,44 +44939,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' description: Created "401": content: {} description: Unauthorized tags: - - networking_v1 + - internalApiserver_v1alpha1 x-kubernetes-action: patch x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: IngressClass - version: v1 + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified IngressClass - operationId: replaceIngressClass + description: replace the specified StorageVersion + operationId: replaceStorageVersion parameters: - - description: name of the IngressClass + - description: name of the StorageVersion in: path name: name required: true @@ -44918,183 +45021,332 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressClass' + $ref: '#/components/schemas/v1alpha1.StorageVersion' description: Created "401": content: {} description: Unauthorized tags: - - networking_v1 + - internalApiserver_v1alpha1 x-kubernetes-action: put x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: IngressClass - version: v1 + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/networking.k8s.io/v1/ingresses: + /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status: get: - description: list or watch objects of kind Ingress - operationId: listIngressForAllNamespaces + description: read status of the specified StorageVersion + operationId: readStorageVersionStatus parameters: - - description: allowWatchBookmarks requests watch events with type "BOOKMARK". - Servers that do not implement bookmarks may ignore this flag and bookmarks - are sent at the server's discretion. Clients should not assume bookmarks - are returned at any specific interval, nor may they assume the server will - send any BOOKMARK event during a session. If this is not a watch, this field - is ignored. - in: query - name: allowWatchBookmarks + - description: name of the StorageVersion + in: path + name: name + required: true schema: - type: boolean - - description: |- - The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". - - This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + type: string + - description: If 'true', then the output is pretty printed. in: query - name: continue + name: pretty schema: type: string - - description: A selector to restrict the list of returned objects by their - fields. Defaults to everything. + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + application/yaml: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - internalApiserver_v1alpha1 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 + x-accepts: application/json + patch: + description: partially update status of the specified StorageVersion + operationId: patchStorageVersionStatus + parameters: + - description: name of the StorageVersion + in: path + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. in: query - name: fieldSelector + name: pretty schema: type: string - - description: A selector to restrict the list of returned objects by their - labels. Defaults to everything. + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' in: query - name: labelSelector + name: dryRun schema: type: string - - description: |- - limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. - - The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). in: query - name: limit + name: fieldManager schema: - type: integer - - description: If 'true', then the output is pretty printed. + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' in: query - name: pretty + name: fieldValidation schema: type: string - - description: |- - resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. in: query - name: resourceVersion + name: force + schema: + type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Patch' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + application/yaml: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + application/yaml: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - internalApiserver_v1alpha1 + x-kubernetes-action: patch + x-kubernetes-group-version-kind: + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + put: + description: replace status of the specified StorageVersion + operationId: replaceStorageVersionStatus + parameters: + - description: name of the StorageVersion + in: path + name: name + required: true schema: type: string - - description: |- - resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. - - Defaults to unset + - description: If 'true', then the output is pretty printed. in: query - name: resourceVersionMatch + name: pretty schema: type: string - - description: |- - `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. - - When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan - is interpreted as "data at least as new as the provided `resourceVersion`" - and the bookmark event is send when the state is synced - to a `resourceVersion` at least as fresh as the one provided by the ListOptions. - If `resourceVersion` is unset, this is interpreted as "consistent read" and the - bookmark event is send when the state is synced at least to the moment - when request started being processed. - - `resourceVersionMatch` set to any other value or unset - Invalid error is returned. - - Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' in: query - name: sendInitialEvents + name: dryRun schema: - type: boolean - - description: Timeout for the list/watch call. This limits the duration of - the call, regardless of any activity or inactivity. + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. in: query - name: timeoutSeconds + name: fieldManager schema: - type: integer - - description: Watch for changes to the described resources and return them - as a stream of add, update, and remove notifications. Specify resourceVersion. + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' in: query - name: watch + name: fieldValidation schema: - type: boolean + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.IngressList' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressList' + $ref: '#/components/schemas/v1alpha1.StorageVersion' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressList' - application/json;stream=watch: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + description: OK + "201": + content: + application/json: schema: - $ref: '#/components/schemas/v1.IngressList' - application/vnd.kubernetes.protobuf;stream=watch: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + application/yaml: schema: - $ref: '#/components/schemas/v1.IngressList' + $ref: '#/components/schemas/v1alpha1.StorageVersion' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha1.StorageVersion' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - internalApiserver_v1alpha1 + x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: internal.apiserver.k8s.io + kind: StorageVersion + version: v1alpha1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions: {} + /apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions/{name}: {} + /apis/networking.k8s.io/: + get: + description: get information of a group + operationId: getAPIGroup + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIGroup' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIGroup' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - networking + x-accepts: application/json + /apis/networking.k8s.io/v1/: + get: + description: get available resources + operationId: getAPIResources + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.APIResourceList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.APIResourceList' description: OK "401": content: {} description: Unauthorized tags: - networking_v1 - x-kubernetes-action: list - x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: Ingress - version: v1 x-accepts: application/json - /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses: + /apis/networking.k8s.io/v1/ingressclasses: delete: - description: delete collection of Ingress - operationId: deleteCollectionNamespacedIngress + description: delete collection of IngressClass + operationId: deleteCollectionIngressClass parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -45206,7 +45458,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -45231,21 +45483,15 @@ paths: x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: networking.k8s.io - kind: Ingress + kind: IngressClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind Ingress - operationId: listNamespacedIngress + description: list or watch objects of kind IngressClass + operationId: listIngressClass parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -45340,19 +45586,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.IngressList' + $ref: '#/components/schemas/v1.IngressClassList' application/yaml: schema: - $ref: '#/components/schemas/v1.IngressList' + $ref: '#/components/schemas/v1.IngressClassList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.IngressList' + $ref: '#/components/schemas/v1.IngressClassList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.IngressList' + $ref: '#/components/schemas/v1.IngressClassList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.IngressList' + $ref: '#/components/schemas/v1.IngressClassList' description: OK "401": content: {} @@ -45362,19 +45608,13 @@ paths: x-kubernetes-action: list x-kubernetes-group-version-kind: group: networking.k8s.io - kind: Ingress + kind: IngressClass version: v1 x-accepts: application/json post: - description: create an Ingress - operationId: createNamespacedIngress + description: create an IngressClass + operationId: createIngressClass parameters: - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -45414,46 +45654,46 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/yaml: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/yaml: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/yaml: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' description: Accepted "401": content: {} @@ -45463,28 +45703,22 @@ paths: x-kubernetes-action: post x-kubernetes-group-version-kind: group: networking.k8s.io - kind: Ingress + kind: IngressClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}: + /apis/networking.k8s.io/v1/ingressclasses/{name}: delete: - description: delete an Ingress - operationId: deleteNamespacedIngress + description: delete an IngressClass + operationId: deleteIngressClass parameters: - - description: name of the Ingress + - description: name of the IngressClass in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -45528,7 +45762,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -45565,27 +45799,21 @@ paths: x-kubernetes-action: delete x-kubernetes-group-version-kind: group: networking.k8s.io - kind: Ingress + kind: IngressClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified Ingress - operationId: readNamespacedIngress + description: read the specified IngressClass + operationId: readIngressClass parameters: - - description: name of the Ingress + - description: name of the IngressClass in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -45596,13 +45824,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/yaml: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' description: OK "401": content: {} @@ -45612,25 +45840,19 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: networking.k8s.io - kind: Ingress + kind: IngressClass version: v1 x-accepts: application/json patch: - description: partially update the specified Ingress - operationId: patchNamespacedIngress + description: partially update the specified IngressClass + operationId: patchIngressClass parameters: - - description: name of the Ingress + - description: name of the IngressClass in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -45679,16 +45901,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -45697,25 +45910,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/yaml: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/yaml: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' description: Created "401": content: {} @@ -45725,27 +45938,21 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: networking.k8s.io - kind: Ingress + kind: IngressClass version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified Ingress - operationId: replaceNamespacedIngress + description: replace the specified IngressClass + operationId: replaceIngressClass parameters: - - description: name of the Ingress + - description: name of the IngressClass in: path name: name required: true schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - description: If 'true', then the output is pretty printed. in: query name: pretty @@ -45785,34 +45992,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/yaml: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/yaml: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressClass' description: Created "401": content: {} @@ -45822,273 +46029,139 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: networking.k8s.io - kind: Ingress + kind: IngressClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status: + /apis/networking.k8s.io/v1/ingresses: get: - description: read status of the specified Ingress - operationId: readNamespacedIngressStatus + description: list or watch objects of kind Ingress + operationId: listIngressForAllNamespaces parameters: - - description: name of the Ingress - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. in: query - name: pretty - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.Ingress' - application/yaml: - schema: - $ref: '#/components/schemas/v1.Ingress' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.Ingress' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - networking_v1 - x-kubernetes-action: get - x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: Ingress - version: v1 - x-accepts: application/json - patch: - description: partially update status of the specified Ingress - operationId: patchNamespacedIngressStatus - parameters: - - description: name of the Ingress - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true + name: allowWatchBookmarks schema: - type: string - - description: If 'true', then the output is pretty printed. + type: boolean + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. in: query - name: pretty + name: continue schema: type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. in: query - name: dryRun + name: fieldSelector schema: type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. in: query - name: fieldManager + name: labelSelector schema: type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. in: query - name: fieldValidation + name: limit schema: - type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. + type: integer + - description: If 'true', then the output is pretty printed. in: query - name: force - schema: - type: boolean - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: - schema: - $ref: '#/components/schemas/v1.Patch' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.Ingress' - application/yaml: - schema: - $ref: '#/components/schemas/v1.Ingress' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.Ingress' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.Ingress' - application/yaml: - schema: - $ref: '#/components/schemas/v1.Ingress' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.Ingress' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - networking_v1 - x-kubernetes-action: patch - x-kubernetes-group-version-kind: - group: networking.k8s.io - kind: Ingress - version: v1 - x-codegen-request-body-name: body - x-contentType: application/json-patch+json - x-accepts: application/json - put: - description: replace status of the specified Ingress - operationId: replaceNamespacedIngressStatus - parameters: - - description: name of the Ingress - in: path - name: name - required: true + name: pretty schema: type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion schema: type: string - - description: If 'true', then the output is pretty printed. + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset in: query - name: pretty + name: resourceVersionMatch schema: type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. in: query - name: dryRun + name: sendInitialEvents schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. in: query - name: fieldManager + name: timeoutSeconds schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' + type: integer + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. in: query - name: fieldValidation + name: watch schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/v1.Ingress' - required: true + type: boolean responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressList' application/yaml: schema: - $ref: '#/components/schemas/v1.Ingress' + $ref: '#/components/schemas/v1.IngressList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.Ingress' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.Ingress' - application/yaml: + $ref: '#/components/schemas/v1.IngressList' + application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.Ingress' - application/vnd.kubernetes.protobuf: + $ref: '#/components/schemas/v1.IngressList' + application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.Ingress' - description: Created + $ref: '#/components/schemas/v1.IngressList' + description: OK "401": content: {} description: Unauthorized tags: - networking_v1 - x-kubernetes-action: put + x-kubernetes-action: list x-kubernetes-group-version-kind: group: networking.k8s.io kind: Ingress version: v1 - x-codegen-request-body-name: body - x-contentType: '*/*' x-accepts: application/json - /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies: + /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses: delete: - description: delete collection of NetworkPolicy - operationId: deleteCollectionNamespacedNetworkPolicy + description: delete collection of Ingress + operationId: deleteCollectionNamespacedIngress parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -46207,7 +46280,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -46232,14 +46305,14 @@ paths: x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: networking.k8s.io - kind: NetworkPolicy + kind: Ingress version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: list or watch objects of kind NetworkPolicy - operationId: listNamespacedNetworkPolicy + description: list or watch objects of kind Ingress + operationId: listNamespacedIngress parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -46341,19 +46414,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicyList' + $ref: '#/components/schemas/v1.IngressList' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicyList' + $ref: '#/components/schemas/v1.IngressList' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicyList' + $ref: '#/components/schemas/v1.IngressList' application/json;stream=watch: schema: - $ref: '#/components/schemas/v1.NetworkPolicyList' + $ref: '#/components/schemas/v1.IngressList' application/vnd.kubernetes.protobuf;stream=watch: schema: - $ref: '#/components/schemas/v1.NetworkPolicyList' + $ref: '#/components/schemas/v1.IngressList' description: OK "401": content: {} @@ -46363,12 +46436,12 @@ paths: x-kubernetes-action: list x-kubernetes-group-version-kind: group: networking.k8s.io - kind: NetworkPolicy + kind: Ingress version: v1 x-accepts: application/json post: - description: create a NetworkPolicy - operationId: createNamespacedNetworkPolicy + description: create an Ingress + operationId: createNamespacedIngress parameters: - description: object name and auth scope, such as for teams and projects in: path @@ -46415,46 +46488,46 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: Created "202": content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: Accepted "401": content: {} @@ -46464,17 +46537,17 @@ paths: x-kubernetes-action: post x-kubernetes-group-version-kind: group: networking.k8s.io - kind: NetworkPolicy + kind: Ingress version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}: + /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}: delete: - description: delete a NetworkPolicy - operationId: deleteNamespacedNetworkPolicy + description: delete an Ingress + operationId: deleteNamespacedIngress parameters: - - description: name of the NetworkPolicy + - description: name of the Ingress in: path name: name required: true @@ -46529,7 +46602,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -46566,16 +46639,16 @@ paths: x-kubernetes-action: delete x-kubernetes-group-version-kind: group: networking.k8s.io - kind: NetworkPolicy + kind: Ingress version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: - description: read the specified NetworkPolicy - operationId: readNamespacedNetworkPolicy + description: read the specified Ingress + operationId: readNamespacedIngress parameters: - - description: name of the NetworkPolicy + - description: name of the Ingress in: path name: name required: true @@ -46597,13 +46670,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: OK "401": content: {} @@ -46613,14 +46686,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: networking.k8s.io - kind: NetworkPolicy + kind: Ingress version: v1 x-accepts: application/json patch: - description: partially update the specified NetworkPolicy - operationId: patchNamespacedNetworkPolicy + description: partially update the specified Ingress + operationId: patchNamespacedIngress parameters: - - description: name of the NetworkPolicy + - description: name of the Ingress in: path name: name required: true @@ -46680,16 +46753,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -46698,25 +46762,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: Created "401": content: {} @@ -46726,16 +46790,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: networking.k8s.io - kind: NetworkPolicy + kind: Ingress version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace the specified NetworkPolicy - operationId: replaceNamespacedNetworkPolicy + description: replace the specified Ingress + operationId: replaceNamespacedIngress parameters: - - description: name of the NetworkPolicy + - description: name of the Ingress in: path name: name required: true @@ -46786,34 +46850,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: Created "401": content: {} @@ -46823,17 +46887,17 @@ paths: x-kubernetes-action: put x-kubernetes-group-version-kind: group: networking.k8s.io - kind: NetworkPolicy + kind: Ingress version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status: + /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status: get: - description: read status of the specified NetworkPolicy - operationId: readNamespacedNetworkPolicyStatus + description: read status of the specified Ingress + operationId: readNamespacedIngressStatus parameters: - - description: name of the NetworkPolicy + - description: name of the Ingress in: path name: name required: true @@ -46855,13 +46919,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: OK "401": content: {} @@ -46871,14 +46935,14 @@ paths: x-kubernetes-action: get x-kubernetes-group-version-kind: group: networking.k8s.io - kind: NetworkPolicy + kind: Ingress version: v1 x-accepts: application/json patch: - description: partially update status of the specified NetworkPolicy - operationId: patchNamespacedNetworkPolicyStatus + description: partially update status of the specified Ingress + operationId: patchNamespacedIngressStatus parameters: - - description: name of the NetworkPolicy + - description: name of the Ingress in: path name: name required: true @@ -46938,16 +47002,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -46956,25 +47011,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: Created "401": content: {} @@ -46984,16 +47039,16 @@ paths: x-kubernetes-action: patch x-kubernetes-group-version-kind: group: networking.k8s.io - kind: NetworkPolicy + kind: Ingress version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: - description: replace status of the specified NetworkPolicy - operationId: replaceNamespacedNetworkPolicyStatus + description: replace status of the specified Ingress + operationId: replaceNamespacedIngressStatus parameters: - - description: name of the NetworkPolicy + - description: name of the Ingress in: path name: name required: true @@ -47044,34 +47099,34 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: OK "201": content: application/json: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/yaml: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' application/vnd.kubernetes.protobuf: schema: - $ref: '#/components/schemas/v1.NetworkPolicy' + $ref: '#/components/schemas/v1.Ingress' description: Created "401": content: {} @@ -47079,17 +47134,751 @@ paths: tags: - networking_v1 x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: networking.k8s.io + kind: Ingress + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies: + delete: + description: delete collection of NetworkPolicy + operationId: deleteCollectionNamespacedNetworkPolicy + parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: The duration in seconds before the object should be deleted. + Value must be non-negative integer. The value zero indicates delete immediately. + If this value is nil, the default grace period for the specified type will + be used. Defaults to a per object value if not specified. zero means delete + immediately. + in: query + name: gracePeriodSeconds + schema: + type: integer + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: 'Deprecated: please use the PropagationPolicy, this field will + be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, + the "orphan" finalizer will be added to/removed from the object''s finalizers + list. Either this field or PropagationPolicy may be set, but not both.' + in: query + name: orphanDependents + schema: + type: boolean + - description: 'Whether and how garbage collection will be performed. Either + this field or OrphanDependents may be set, but not both. The default policy + is decided by the existing finalizer set in the metadata.finalizers and + the resource-specific default policy. Acceptable values are: ''Orphan'' + - orphan the dependents; ''Background'' - allow the garbage collector to + delete the dependents in the background; ''Foreground'' - a cascading policy + that deletes all dependents in the foreground.' + in: query + name: propagationPolicy + schema: + type: string + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DeleteOptions' + required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Status' + application/yaml: + schema: + $ref: '#/components/schemas/v1.Status' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.Status' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - networking_v1 + x-kubernetes-action: deletecollection x-kubernetes-group-version-kind: group: networking.k8s.io kind: NetworkPolicy version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json - /apis/networking.k8s.io/v1/networkpolicies: get: description: list or watch objects of kind NetworkPolicy - operationId: listNetworkPolicyForAllNamespaces + operationId: listNamespacedNetworkPolicy + parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: allowWatchBookmarks requests watch events with type "BOOKMARK". + Servers that do not implement bookmarks may ignore this flag and bookmarks + are sent at the server's discretion. Clients should not assume bookmarks + are returned at any specific interval, nor may they assume the server will + send any BOOKMARK event during a session. If this is not a watch, this field + is ignored. + in: query + name: allowWatchBookmarks + schema: + type: boolean + - description: |- + The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". + + This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + in: query + name: continue + schema: + type: string + - description: A selector to restrict the list of returned objects by their + fields. Defaults to everything. + in: query + name: fieldSelector + schema: + type: string + - description: A selector to restrict the list of returned objects by their + labels. Defaults to everything. + in: query + name: labelSelector + schema: + type: string + - description: |- + limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. + + The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + in: query + name: limit + schema: + type: integer + - description: |- + resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersion + schema: + type: string + - description: |- + resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. + + Defaults to unset + in: query + name: resourceVersionMatch + schema: + type: string + - description: |- + `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic "Bookmark" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. + + When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan + is interpreted as "data at least as new as the provided `resourceVersion`" + and the bookmark event is send when the state is synced + to a `resourceVersion` at least as fresh as the one provided by the ListOptions. + If `resourceVersion` is unset, this is interpreted as "consistent read" and the + bookmark event is send when the state is synced at least to the moment + when request started being processed. + - `resourceVersionMatch` set to any other value or unset + Invalid error is returned. + + Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward compatibility reasons) and to false otherwise. + in: query + name: sendInitialEvents + schema: + type: boolean + - description: Timeout for the list/watch call. This limits the duration of + the call, regardless of any activity or inactivity. + in: query + name: timeoutSeconds + schema: + type: integer + - description: Watch for changes to the described resources and return them + as a stream of add, update, and remove notifications. Specify resourceVersion. + in: query + name: watch + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicyList' + application/yaml: + schema: + $ref: '#/components/schemas/v1.NetworkPolicyList' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.NetworkPolicyList' + application/json;stream=watch: + schema: + $ref: '#/components/schemas/v1.NetworkPolicyList' + application/vnd.kubernetes.protobuf;stream=watch: + schema: + $ref: '#/components/schemas/v1.NetworkPolicyList' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - networking_v1 + x-kubernetes-action: list + x-kubernetes-group-version-kind: + group: networking.k8s.io + kind: NetworkPolicy + version: v1 + x-accepts: application/json + post: + description: create a NetworkPolicy + operationId: createNamespacedNetworkPolicy + parameters: + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/yaml: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/yaml: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + description: Created + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/yaml: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + description: Accepted + "401": + content: {} + description: Unauthorized + tags: + - networking_v1 + x-kubernetes-action: post + x-kubernetes-group-version-kind: + group: networking.k8s.io + kind: NetworkPolicy + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}: + delete: + description: delete a NetworkPolicy + operationId: deleteNamespacedNetworkPolicy + parameters: + - description: name of the NetworkPolicy + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: The duration in seconds before the object should be deleted. + Value must be non-negative integer. The value zero indicates delete immediately. + If this value is nil, the default grace period for the specified type will + be used. Defaults to a per object value if not specified. zero means delete + immediately. + in: query + name: gracePeriodSeconds + schema: + type: integer + - description: 'Deprecated: please use the PropagationPolicy, this field will + be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, + the "orphan" finalizer will be added to/removed from the object''s finalizers + list. Either this field or PropagationPolicy may be set, but not both.' + in: query + name: orphanDependents + schema: + type: boolean + - description: 'Whether and how garbage collection will be performed. Either + this field or OrphanDependents may be set, but not both. The default policy + is decided by the existing finalizer set in the metadata.finalizers and + the resource-specific default policy. Acceptable values are: ''Orphan'' + - orphan the dependents; ''Background'' - allow the garbage collector to + delete the dependents in the background; ''Foreground'' - a cascading policy + that deletes all dependents in the foreground.' + in: query + name: propagationPolicy + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.DeleteOptions' + required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Status' + application/yaml: + schema: + $ref: '#/components/schemas/v1.Status' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.Status' + description: OK + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Status' + application/yaml: + schema: + $ref: '#/components/schemas/v1.Status' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.Status' + description: Accepted + "401": + content: {} + description: Unauthorized + tags: + - networking_v1 + x-kubernetes-action: delete + x-kubernetes-group-version-kind: + group: networking.k8s.io + kind: NetworkPolicy + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + get: + description: read the specified NetworkPolicy + operationId: readNamespacedNetworkPolicy + parameters: + - description: name of the NetworkPolicy + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/yaml: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - networking_v1 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: networking.k8s.io + kind: NetworkPolicy + version: v1 + x-accepts: application/json + patch: + description: partially update the specified NetworkPolicy + operationId: patchNamespacedNetworkPolicy + parameters: + - description: name of the NetworkPolicy + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. + in: query + name: force + schema: + type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.Patch' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/yaml: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/yaml: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - networking_v1 + x-kubernetes-action: patch + x-kubernetes-group-version-kind: + group: networking.k8s.io + kind: NetworkPolicy + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + put: + description: replace the specified NetworkPolicy + operationId: replaceNamespacedNetworkPolicy + parameters: + - description: name of the NetworkPolicy + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/yaml: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/yaml: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.NetworkPolicy' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - networking_v1 + x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: networking.k8s.io + kind: NetworkPolicy + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/networking.k8s.io/v1/networkpolicies: + get: + description: list or watch objects of kind NetworkPolicy + operationId: listNetworkPolicyForAllNamespaces parameters: - description: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks @@ -47357,7 +48146,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -47385,7 +48174,7 @@ paths: kind: ClusterCIDR version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ClusterCIDR @@ -47553,7 +48342,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha1.ClusterCIDR' required: true @@ -47605,7 +48394,7 @@ paths: kind: ClusterCIDR version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/networking.k8s.io/v1alpha1/clustercidrs/{name}: delete: @@ -47661,7 +48450,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -47701,7 +48490,7 @@ paths: kind: ClusterCIDR version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ClusterCIDR @@ -47800,16 +48589,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -47849,7 +48629,7 @@ paths: kind: ClusterCIDR version: v1alpha1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ClusterCIDR @@ -47900,7 +48680,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha1.ClusterCIDR' required: true @@ -47940,7 +48720,7 @@ paths: kind: ClusterCIDR version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/networking.k8s.io/v1alpha1/ipaddresses: delete: @@ -48058,7 +48838,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -48086,7 +48866,7 @@ paths: kind: IPAddress version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind IPAddress @@ -48254,7 +49034,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha1.IPAddress' required: true @@ -48306,7 +49086,7 @@ paths: kind: IPAddress version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/networking.k8s.io/v1alpha1/ipaddresses/{name}: delete: @@ -48362,7 +49142,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -48402,7 +49182,7 @@ paths: kind: IPAddress version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified IPAddress @@ -48501,16 +49281,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -48550,7 +49321,7 @@ paths: kind: IPAddress version: v1alpha1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified IPAddress @@ -48601,7 +49372,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha1.IPAddress' required: true @@ -48641,7 +49412,7 @@ paths: kind: IPAddress version: v1alpha1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/networking.k8s.io/v1alpha1/watch/clustercidrs: {} /apis/networking.k8s.io/v1alpha1/watch/clustercidrs/{name}: {} @@ -48809,7 +49580,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -48837,7 +49608,7 @@ paths: kind: RuntimeClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind RuntimeClass @@ -49005,7 +49776,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.RuntimeClass' required: true @@ -49057,7 +49828,7 @@ paths: kind: RuntimeClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/node.k8s.io/v1/runtimeclasses/{name}: delete: @@ -49113,7 +49884,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -49153,7 +49924,7 @@ paths: kind: RuntimeClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified RuntimeClass @@ -49252,16 +50023,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -49301,7 +50063,7 @@ paths: kind: RuntimeClass version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified RuntimeClass @@ -49352,7 +50114,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.RuntimeClass' required: true @@ -49392,7 +50154,7 @@ paths: kind: RuntimeClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/node.k8s.io/v1/watch/runtimeclasses: {} /apis/node.k8s.io/v1/watch/runtimeclasses/{name}: {} @@ -49564,7 +50326,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -49592,7 +50354,7 @@ paths: kind: PodDisruptionBudget version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind PodDisruptionBudget @@ -49772,7 +50534,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PodDisruptionBudget' required: true @@ -49824,7 +50586,7 @@ paths: kind: PodDisruptionBudget version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}: delete: @@ -49886,7 +50648,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -49926,7 +50688,7 @@ paths: kind: PodDisruptionBudget version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified PodDisruptionBudget @@ -50037,16 +50799,256 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: + application/json: schema: $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/yaml: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/yaml: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - policy_v1 + x-kubernetes-action: patch + x-kubernetes-group-version-kind: + group: policy + kind: PodDisruptionBudget + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + put: + description: replace the specified PodDisruptionBudget + operationId: replaceNamespacedPodDisruptionBudget + parameters: + - description: name of the PodDisruptionBudget + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + requestBody: + content: + application/json: schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/yaml: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/yaml: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - policy_v1 + x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: policy + kind: PodDisruptionBudget + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status: + get: + description: read status of the specified PodDisruptionBudget + operationId: readNamespacedPodDisruptionBudgetStatus + parameters: + - description: name of the PodDisruptionBudget + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/yaml: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.PodDisruptionBudget' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - policy_v1 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: policy + kind: PodDisruptionBudget + version: v1 + x-accepts: application/json + patch: + description: partially update status of the specified PodDisruptionBudget + operationId: patchNamespacedPodDisruptionBudgetStatus + parameters: + - description: name of the PodDisruptionBudget + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. + in: query + name: force + schema: + type: boolean + requestBody: + content: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -50086,265 +51088,7 @@ paths: kind: PodDisruptionBudget version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json - x-accepts: application/json - put: - description: replace the specified PodDisruptionBudget - operationId: replaceNamespacedPodDisruptionBudget - parameters: - - description: name of the PodDisruptionBudget - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/yaml: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/yaml: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - policy_v1 - x-kubernetes-action: put - x-kubernetes-group-version-kind: - group: policy - kind: PodDisruptionBudget - version: v1 - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status: - get: - description: read status of the specified PodDisruptionBudget - operationId: readNamespacedPodDisruptionBudgetStatus - parameters: - - description: name of the PodDisruptionBudget - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/yaml: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - policy_v1 - x-kubernetes-action: get - x-kubernetes-group-version-kind: - group: policy - kind: PodDisruptionBudget - version: v1 - x-accepts: application/json - patch: - description: partially update status of the specified PodDisruptionBudget - operationId: patchNamespacedPodDisruptionBudgetStatus - parameters: - - description: name of the PodDisruptionBudget - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. - in: query - name: force - schema: - type: boolean - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: - schema: - $ref: '#/components/schemas/v1.Patch' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/yaml: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/yaml: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.PodDisruptionBudget' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - policy_v1 - x-kubernetes-action: patch - x-kubernetes-group-version-kind: - group: policy - kind: PodDisruptionBudget - version: v1 - x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified PodDisruptionBudget @@ -50401,7 +51145,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PodDisruptionBudget' required: true @@ -50441,7 +51185,7 @@ paths: kind: PodDisruptionBudget version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/policy/v1/poddisruptionbudgets: get: @@ -50732,7 +51476,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -50760,7 +51504,7 @@ paths: kind: ClusterRoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ClusterRoleBinding @@ -50928,7 +51672,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ClusterRoleBinding' required: true @@ -50980,7 +51724,7 @@ paths: kind: ClusterRoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}: delete: @@ -51036,7 +51780,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -51076,7 +51820,7 @@ paths: kind: ClusterRoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ClusterRoleBinding @@ -51175,16 +51919,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -51224,7 +51959,7 @@ paths: kind: ClusterRoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ClusterRoleBinding @@ -51275,7 +52010,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ClusterRoleBinding' required: true @@ -51315,7 +52050,7 @@ paths: kind: ClusterRoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/rbac.authorization.k8s.io/v1/clusterroles: delete: @@ -51433,7 +52168,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -51461,7 +52196,7 @@ paths: kind: ClusterRole version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ClusterRole @@ -51629,7 +52364,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ClusterRole' required: true @@ -51681,7 +52416,7 @@ paths: kind: ClusterRole version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}: delete: @@ -51737,7 +52472,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -51777,7 +52512,7 @@ paths: kind: ClusterRole version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ClusterRole @@ -51876,16 +52611,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -51925,7 +52651,7 @@ paths: kind: ClusterRole version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ClusterRole @@ -51976,7 +52702,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.ClusterRole' required: true @@ -52016,7 +52742,7 @@ paths: kind: ClusterRole version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings: delete: @@ -52140,7 +52866,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -52168,7 +52894,7 @@ paths: kind: RoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind RoleBinding @@ -52348,7 +53074,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.RoleBinding' required: true @@ -52400,7 +53126,7 @@ paths: kind: RoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}: delete: @@ -52462,7 +53188,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -52502,7 +53228,7 @@ paths: kind: RoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified RoleBinding @@ -52613,16 +53339,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -52662,7 +53379,7 @@ paths: kind: RoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified RoleBinding @@ -52719,7 +53436,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.RoleBinding' required: true @@ -52759,7 +53476,7 @@ paths: kind: RoleBinding version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles: delete: @@ -52883,7 +53600,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -52911,7 +53628,7 @@ paths: kind: Role version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind Role @@ -53091,7 +53808,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Role' required: true @@ -53143,7 +53860,7 @@ paths: kind: Role version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}: delete: @@ -53205,7 +53922,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -53245,7 +53962,7 @@ paths: kind: Role version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified Role @@ -53356,16 +54073,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -53405,7 +54113,7 @@ paths: kind: Role version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified Role @@ -53462,7 +54170,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.Role' required: true @@ -53502,7 +54210,7 @@ paths: kind: Role version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/rbac.authorization.k8s.io/v1/rolebindings: get: @@ -53930,7 +54638,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -53958,7 +54666,7 @@ paths: kind: PodSchedulingContext version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind PodSchedulingContext @@ -54138,7 +54846,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' required: true @@ -54190,7 +54898,7 @@ paths: kind: PodSchedulingContext version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}: delete: @@ -54252,7 +54960,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -54292,7 +55000,7 @@ paths: kind: PodSchedulingContext version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified PodSchedulingContext @@ -54403,16 +55111,256 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: + application/json: schema: $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/yaml: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/yaml: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - resource_v1alpha2 + x-kubernetes-action: patch + x-kubernetes-group-version-kind: + group: resource.k8s.io + kind: PodSchedulingContext + version: v1alpha2 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + put: + description: replace the specified PodSchedulingContext + operationId: replaceNamespacedPodSchedulingContext + parameters: + - description: name of the PodSchedulingContext + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + requestBody: + content: + application/json: schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/yaml: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/yaml: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - resource_v1alpha2 + x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: resource.k8s.io + kind: PodSchedulingContext + version: v1alpha2 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status: + get: + description: read status of the specified PodSchedulingContext + operationId: readNamespacedPodSchedulingContextStatus + parameters: + - description: name of the PodSchedulingContext + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/yaml: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - resource_v1alpha2 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: resource.k8s.io + kind: PodSchedulingContext + version: v1alpha2 + x-accepts: application/json + patch: + description: partially update status of the specified PodSchedulingContext + operationId: patchNamespacedPodSchedulingContextStatus + parameters: + - description: name of the PodSchedulingContext + in: path + name: name + required: true + schema: + type: string + - description: object name and auth scope, such as for teams and projects + in: path + name: namespace + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. + in: query + name: force + schema: + type: boolean + requestBody: + content: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -54452,265 +55400,7 @@ paths: kind: PodSchedulingContext version: v1alpha2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json - x-accepts: application/json - put: - description: replace the specified PodSchedulingContext - operationId: replaceNamespacedPodSchedulingContext - parameters: - - description: name of the PodSchedulingContext - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/yaml: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/yaml: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - resource_v1alpha2 - x-kubernetes-action: put - x-kubernetes-group-version-kind: - group: resource.k8s.io - kind: PodSchedulingContext - version: v1alpha2 - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status: - get: - description: read status of the specified PodSchedulingContext - operationId: readNamespacedPodSchedulingContextStatus - parameters: - - description: name of the PodSchedulingContext - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/yaml: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - resource_v1alpha2 - x-kubernetes-action: get - x-kubernetes-group-version-kind: - group: resource.k8s.io - kind: PodSchedulingContext - version: v1alpha2 - x-accepts: application/json - patch: - description: partially update status of the specified PodSchedulingContext - operationId: patchNamespacedPodSchedulingContextStatus - parameters: - - description: name of the PodSchedulingContext - in: path - name: name - required: true - schema: - type: string - - description: object name and auth scope, such as for teams and projects - in: path - name: namespace - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. - in: query - name: force - schema: - type: boolean - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: - schema: - $ref: '#/components/schemas/v1.Patch' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/yaml: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/yaml: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - resource_v1alpha2 - x-kubernetes-action: patch - x-kubernetes-group-version-kind: - group: resource.k8s.io - kind: PodSchedulingContext - version: v1alpha2 - x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified PodSchedulingContext @@ -54767,7 +55457,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha2.PodSchedulingContext' required: true @@ -54807,7 +55497,7 @@ paths: kind: PodSchedulingContext version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims: delete: @@ -54931,7 +55621,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -54959,7 +55649,7 @@ paths: kind: ResourceClaim version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ResourceClaim @@ -55139,7 +55829,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha2.ResourceClaim' required: true @@ -55191,7 +55881,7 @@ paths: kind: ResourceClaim version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}: delete: @@ -55253,7 +55943,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -55293,7 +55983,7 @@ paths: kind: ResourceClaim version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ResourceClaim @@ -55404,16 +56094,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -55453,7 +56134,7 @@ paths: kind: ResourceClaim version: v1alpha2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ResourceClaim @@ -55510,7 +56191,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha2.ResourceClaim' required: true @@ -55550,7 +56231,7 @@ paths: kind: ResourceClaim version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status: get: @@ -55662,16 +56343,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -55711,7 +56383,7 @@ paths: kind: ResourceClaim version: v1alpha2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified ResourceClaim @@ -55768,7 +56440,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha2.ResourceClaim' required: true @@ -55808,7 +56480,7 @@ paths: kind: ResourceClaim version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates: delete: @@ -55932,7 +56604,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -55960,7 +56632,7 @@ paths: kind: ResourceClaimTemplate version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ResourceClaimTemplate @@ -56140,7 +56812,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha2.ResourceClaimTemplate' required: true @@ -56192,7 +56864,7 @@ paths: kind: ResourceClaimTemplate version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}: delete: @@ -56254,7 +56926,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -56294,7 +56966,7 @@ paths: kind: ResourceClaimTemplate version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ResourceClaimTemplate @@ -56405,16 +57077,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -56454,7 +57117,7 @@ paths: kind: ResourceClaimTemplate version: v1alpha2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ResourceClaimTemplate @@ -56511,7 +57174,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha2.ResourceClaimTemplate' required: true @@ -56551,7 +57214,7 @@ paths: kind: ResourceClaimTemplate version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/resource.k8s.io/v1alpha2/podschedulingcontexts: get: @@ -57041,7 +57704,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -57069,7 +57732,7 @@ paths: kind: ResourceClass version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind ResourceClass @@ -57237,7 +57900,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha2.ResourceClass' required: true @@ -57289,7 +57952,7 @@ paths: kind: ResourceClass version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/resource.k8s.io/v1alpha2/resourceclasses/{name}: delete: @@ -57345,7 +58008,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -57385,7 +58048,7 @@ paths: kind: ResourceClass version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified ResourceClass @@ -57484,16 +58147,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -57533,7 +58187,7 @@ paths: kind: ResourceClass version: v1alpha2 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified ResourceClass @@ -57584,7 +58238,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1alpha2.ResourceClass' required: true @@ -57624,7 +58278,7 @@ paths: kind: ResourceClass version: v1alpha2 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts: {} /apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts/{name}: {} @@ -57799,7 +58453,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -57827,7 +58481,7 @@ paths: kind: PriorityClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind PriorityClass @@ -57995,7 +58649,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PriorityClass' required: true @@ -58047,7 +58701,7 @@ paths: kind: PriorityClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/scheduling.k8s.io/v1/priorityclasses/{name}: delete: @@ -58103,7 +58757,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -58143,7 +58797,7 @@ paths: kind: PriorityClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified PriorityClass @@ -58242,16 +58896,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -58291,7 +58936,7 @@ paths: kind: PriorityClass version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified PriorityClass @@ -58342,7 +58987,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.PriorityClass' required: true @@ -58382,7 +59027,7 @@ paths: kind: PriorityClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/scheduling.k8s.io/v1/watch/priorityclasses: {} /apis/scheduling.k8s.io/v1/watch/priorityclasses/{name}: {} @@ -58548,7 +59193,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -58576,7 +59221,7 @@ paths: kind: CSIDriver version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind CSIDriver @@ -58744,7 +59389,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.CSIDriver' required: true @@ -58796,7 +59441,7 @@ paths: kind: CSIDriver version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/csidrivers/{name}: delete: @@ -58852,7 +59497,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -58892,7 +59537,7 @@ paths: kind: CSIDriver version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified CSIDriver @@ -58991,16 +59636,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -59040,7 +59676,7 @@ paths: kind: CSIDriver version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified CSIDriver @@ -59091,7 +59727,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.CSIDriver' required: true @@ -59131,7 +59767,7 @@ paths: kind: CSIDriver version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/csinodes: delete: @@ -59249,7 +59885,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -59277,7 +59913,7 @@ paths: kind: CSINode version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind CSINode @@ -59445,7 +60081,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.CSINode' required: true @@ -59497,7 +60133,7 @@ paths: kind: CSINode version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/csinodes/{name}: delete: @@ -59553,7 +60189,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -59593,7 +60229,7 @@ paths: kind: CSINode version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified CSINode @@ -59692,16 +60328,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -59741,7 +60368,7 @@ paths: kind: CSINode version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified CSINode @@ -59792,7 +60419,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.CSINode' required: true @@ -59832,7 +60459,7 @@ paths: kind: CSINode version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/csistoragecapacities: get: @@ -60080,7 +60707,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -60108,7 +60735,7 @@ paths: kind: CSIStorageCapacity version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind CSIStorageCapacity @@ -60288,7 +60915,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.CSIStorageCapacity' required: true @@ -60340,7 +60967,7 @@ paths: kind: CSIStorageCapacity version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}: delete: @@ -60402,7 +61029,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -60442,7 +61069,7 @@ paths: kind: CSIStorageCapacity version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified CSIStorageCapacity @@ -60553,16 +61180,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -60602,7 +61220,7 @@ paths: kind: CSIStorageCapacity version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified CSIStorageCapacity @@ -60659,7 +61277,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.CSIStorageCapacity' required: true @@ -60699,7 +61317,7 @@ paths: kind: CSIStorageCapacity version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/storageclasses: delete: @@ -60817,7 +61435,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -60845,7 +61463,7 @@ paths: kind: StorageClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind StorageClass @@ -61013,7 +61631,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.StorageClass' required: true @@ -61065,7 +61683,7 @@ paths: kind: StorageClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/storageclasses/{name}: delete: @@ -61121,7 +61739,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -61161,7 +61779,7 @@ paths: kind: StorageClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified StorageClass @@ -61260,16 +61878,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -61309,7 +61918,7 @@ paths: kind: StorageClass version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified StorageClass @@ -61360,7 +61969,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.StorageClass' required: true @@ -61400,7 +62009,7 @@ paths: kind: StorageClass version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/volumeattachments: delete: @@ -61518,7 +62127,7 @@ paths: type: integer requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -61546,7 +62155,7 @@ paths: kind: VolumeAttachment version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch objects of kind VolumeAttachment @@ -61714,7 +62323,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.VolumeAttachment' required: true @@ -61766,7 +62375,7 @@ paths: kind: VolumeAttachment version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/volumeattachments/{name}: delete: @@ -61822,7 +62431,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -61862,7 +62471,7 @@ paths: kind: VolumeAttachment version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: read the specified VolumeAttachment @@ -61961,16 +62570,238 @@ paths: type: boolean requestBody: content: - application/json-patch+json: + application/json: schema: $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/yaml: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/yaml: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - storage_v1 + x-kubernetes-action: patch + x-kubernetes-group-version-kind: + group: storage.k8s.io + kind: VolumeAttachment + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + put: + description: replace the specified VolumeAttachment + operationId: replaceVolumeAttachment + parameters: + - description: name of the VolumeAttachment + in: path + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + requestBody: + content: + application/json: schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: + $ref: '#/components/schemas/v1.VolumeAttachment' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/yaml: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + description: OK + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/yaml: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + description: Created + "401": + content: {} + description: Unauthorized + tags: + - storage_v1 + x-kubernetes-action: put + x-kubernetes-group-version-kind: + group: storage.k8s.io + kind: VolumeAttachment + version: v1 + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /apis/storage.k8s.io/v1/volumeattachments/{name}/status: + get: + description: read status of the specified VolumeAttachment + operationId: readVolumeAttachmentStatus + parameters: + - description: name of the VolumeAttachment + in: path + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/yaml: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + application/vnd.kubernetes.protobuf: + schema: + $ref: '#/components/schemas/v1.VolumeAttachment' + description: OK + "401": + content: {} + description: Unauthorized + tags: + - storage_v1 + x-kubernetes-action: get + x-kubernetes-group-version-kind: + group: storage.k8s.io + kind: VolumeAttachment + version: v1 + x-accepts: application/json + patch: + description: partially update status of the specified VolumeAttachment + operationId: patchVolumeAttachmentStatus + parameters: + - description: name of the VolumeAttachment + in: path + name: name + required: true + schema: + type: string + - description: If 'true', then the output is pretty printed. + in: query + name: pretty + schema: + type: string + - description: 'When present, indicates that modifications should not be persisted. + An invalid or unrecognized dryRun directive will result in an error response + and no further processing of the request. Valid values are: - All: all dry + run stages will be processed' + in: query + name: dryRun + schema: + type: string + - description: fieldManager is a name associated with the actor or entity that + is making these changes. The value must be less than or 128 characters long, + and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + This field is required for apply requests (application/apply-patch) but + optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + in: query + name: fieldManager + schema: + type: string + - description: 'fieldValidation instructs the server on how to handle objects + in the request (POST/PUT/PATCH) containing unknown or duplicate fields. + Valid values are: - Ignore: This will ignore any unknown fields that are + silently dropped from the object, and will ignore all but the last duplicate + field that the decoder encounters. This is the default behavior prior to + v1.23. - Warn: This will send a warning via the standard warning response + header for each unknown field that is dropped from the object, and for each + duplicate field that is encountered. The request will still succeed if there + are no other errors, and will only persist the last of any duplicate fields. + This is the default in v1.23+ - Strict: This will fail the request with + a BadRequest error if any unknown fields would be dropped from the object, + or if any duplicate fields are present. The error returned from the server + will contain all unknown and duplicate fields encountered.' + in: query + name: fieldValidation + schema: + type: string + - description: Force is going to "force" Apply requests. It means user will + re-acquire conflicting fields owned by other people. Force flag must be + unset for non-apply patch requests. + in: query + name: force + schema: + type: boolean + requestBody: + content: + application/json: schema: $ref: '#/components/schemas/v1.Patch' required: true @@ -62010,247 +62841,7 @@ paths: kind: VolumeAttachment version: v1 x-codegen-request-body-name: body - x-contentType: application/json-patch+json - x-accepts: application/json - put: - description: replace the specified VolumeAttachment - operationId: replaceVolumeAttachment - parameters: - - description: name of the VolumeAttachment - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - requestBody: - content: - '*/*': - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/yaml: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/yaml: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - storage_v1 - x-kubernetes-action: put - x-kubernetes-group-version-kind: - group: storage.k8s.io - kind: VolumeAttachment - version: v1 - x-codegen-request-body-name: body - x-contentType: '*/*' - x-accepts: application/json - /apis/storage.k8s.io/v1/volumeattachments/{name}/status: - get: - description: read status of the specified VolumeAttachment - operationId: readVolumeAttachmentStatus - parameters: - - description: name of the VolumeAttachment - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/yaml: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - description: OK - "401": - content: {} - description: Unauthorized - tags: - - storage_v1 - x-kubernetes-action: get - x-kubernetes-group-version-kind: - group: storage.k8s.io - kind: VolumeAttachment - version: v1 - x-accepts: application/json - patch: - description: partially update status of the specified VolumeAttachment - operationId: patchVolumeAttachmentStatus - parameters: - - description: name of the VolumeAttachment - in: path - name: name - required: true - schema: - type: string - - description: If 'true', then the output is pretty printed. - in: query - name: pretty - schema: - type: string - - description: 'When present, indicates that modifications should not be persisted. - An invalid or unrecognized dryRun directive will result in an error response - and no further processing of the request. Valid values are: - All: all dry - run stages will be processed' - in: query - name: dryRun - schema: - type: string - - description: fieldManager is a name associated with the actor or entity that - is making these changes. The value must be less than or 128 characters long, - and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - This field is required for apply requests (application/apply-patch) but - optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - in: query - name: fieldManager - schema: - type: string - - description: 'fieldValidation instructs the server on how to handle objects - in the request (POST/PUT/PATCH) containing unknown or duplicate fields. - Valid values are: - Ignore: This will ignore any unknown fields that are - silently dropped from the object, and will ignore all but the last duplicate - field that the decoder encounters. This is the default behavior prior to - v1.23. - Warn: This will send a warning via the standard warning response - header for each unknown field that is dropped from the object, and for each - duplicate field that is encountered. The request will still succeed if there - are no other errors, and will only persist the last of any duplicate fields. - This is the default in v1.23+ - Strict: This will fail the request with - a BadRequest error if any unknown fields would be dropped from the object, - or if any duplicate fields are present. The error returned from the server - will contain all unknown and duplicate fields encountered.' - in: query - name: fieldValidation - schema: - type: string - - description: Force is going to "force" Apply requests. It means user will - re-acquire conflicting fields owned by other people. Force flag must be - unset for non-apply patch requests. - in: query - name: force - schema: - type: boolean - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/strategic-merge-patch+json: - schema: - $ref: '#/components/schemas/v1.Patch' - application/apply-patch+yaml: - schema: - $ref: '#/components/schemas/v1.Patch' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/yaml: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - description: OK - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/yaml: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - application/vnd.kubernetes.protobuf: - schema: - $ref: '#/components/schemas/v1.VolumeAttachment' - description: Created - "401": - content: {} - description: Unauthorized - tags: - - storage_v1 - x-kubernetes-action: patch - x-kubernetes-group-version-kind: - group: storage.k8s.io - kind: VolumeAttachment - version: v1 - x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified VolumeAttachment @@ -62301,7 +62892,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.VolumeAttachment' required: true @@ -62341,7 +62932,7 @@ paths: kind: VolumeAttachment version: v1 x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/storage.k8s.io/v1/watch/csidrivers: {} /apis/storage.k8s.io/v1/watch/csidrivers/{name}: {} @@ -62381,24 +62972,6 @@ paths: tags: - logs x-accepts: application/json - /openid/v1/jwks/: - get: - description: get service account issuer OpenID JSON Web Key Set (contains public - token verification keys) - operationId: getServiceAccountIssuerOpenIDKeyset - responses: - "200": - content: - application/jwk-set+json: - schema: - type: string - description: OK - "401": - content: {} - description: Unauthorized - tags: - - openid - x-accepts: application/jwk-set+json /version/: get: description: get the code version @@ -62510,7 +63083,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -62527,7 +63100,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch cluster scoped custom objects @@ -62689,7 +63262,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: type: object description: The JSON schema of the Resource to create. @@ -62707,7 +63280,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/{group}/{version}/namespaces/{namespace}/{plural}: delete: @@ -62779,7 +63352,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -62796,7 +63369,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: list or watch namespace scoped custom objects @@ -62968,7 +63541,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: type: object description: The JSON schema of the Resource to create. @@ -62986,7 +63559,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/{group}/{version}/{plural}/{name}: delete: @@ -63053,7 +63626,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -63070,7 +63643,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: Returns a cluster scoped custom object @@ -63169,10 +63742,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - type: object - application/merge-patch+json: + application/json: schema: type: object description: The JSON schema of the Resource to patch. @@ -63190,7 +63760,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified cluster scoped custom object @@ -63238,7 +63808,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: type: object description: The JSON schema of the Resource to replace. @@ -63256,7 +63826,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/{group}/{version}/{plural}/{name}/status: get: @@ -63363,11 +63933,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - description: The JSON schema of the Resource to patch. - type: object - application/merge-patch+json: + application/json: schema: description: The JSON schema of the Resource to patch. type: object @@ -63391,7 +63957,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the cluster scoped specified custom object @@ -63439,7 +64005,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: type: object required: true @@ -63474,7 +64040,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/{group}/{version}/{plural}/{name}/scale: get: @@ -63580,11 +64146,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - description: The JSON schema of the Resource to patch. - type: object - application/merge-patch+json: + application/json: schema: description: The JSON schema of the Resource to patch. type: object @@ -63608,7 +64170,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace scale of the specified cluster scoped custom object @@ -63656,7 +64218,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: type: object required: true @@ -63691,7 +64253,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}: delete: @@ -63764,7 +64326,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/v1.DeleteOptions' required: false @@ -63781,7 +64343,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json get: description: Returns a namespace scoped custom object @@ -63892,10 +64454,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - type: object - application/merge-patch+json: + application/json: schema: type: object description: The JSON schema of the Resource to patch. @@ -63913,7 +64472,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace the specified namespace scoped custom object @@ -63967,7 +64526,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: type: object description: The JSON schema of the Resource to replace. @@ -63985,7 +64544,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status: get: @@ -64104,15 +64663,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - description: The JSON schema of the Resource to patch. - type: object - application/merge-patch+json: - schema: - description: The JSON schema of the Resource to patch. - type: object - application/apply-patch+yaml: + application/json: schema: description: The JSON schema of the Resource to patch. type: object @@ -64136,7 +64687,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace status of the specified namespace scoped custom object @@ -64190,7 +64741,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: type: object required: true @@ -64225,7 +64776,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json x-accepts: application/json /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale: get: @@ -64344,15 +64895,7 @@ paths: type: boolean requestBody: content: - application/json-patch+json: - schema: - description: The JSON schema of the Resource to patch. - type: object - application/merge-patch+json: - schema: - description: The JSON schema of the Resource to patch. - type: object - application/apply-patch+yaml: + application/json: schema: description: The JSON schema of the Resource to patch. type: object @@ -64376,7 +64919,7 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: application/json-patch+json + x-contentType: application/json x-accepts: application/json put: description: replace scale of the specified namespace scoped custom object @@ -64430,7 +64973,7 @@ paths: type: string requestBody: content: - '*/*': + application/json: schema: type: object required: true @@ -64465,8 +65008,44 @@ paths: tags: - custom_objects x-codegen-request-body-name: body - x-contentType: '*/*' + x-contentType: application/json + x-accepts: application/json + /.well-known/openid-configuration: + get: + description: get service account issuer OpenID configuration, also known as + the 'OIDC discovery doc' + operationId: getServiceAccountIssuerOpenIDConfiguration + responses: + "200": + content: + application/json: + schema: + type: string + description: OK + "401": + content: {} + description: Unauthorized + tags: + - WellKnown x-accepts: application/json + /openid/v1/jwks: + get: + description: get service account issuer OpenID JSON Web Key Set (contains public + token verification keys) + operationId: getServiceAccountIssuerOpenIDKeyset + responses: + "200": + content: + application/jwk-set+json: + schema: + type: string + description: OK + "401": + content: {} + description: Unauthorized + tags: + - openid + x-accepts: application/jwk-set+json components: schemas: v1.MatchCondition: @@ -64609,7 +65188,7 @@ components: - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped - This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate. + This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. items: $ref: '#/components/schemas/v1.MatchCondition' type: array @@ -65561,7 +66140,7 @@ components: - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped - This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate. + This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. items: $ref: '#/components/schemas/v1.MatchCondition' type: array @@ -66632,18 +67211,51 @@ components: type: object x-kubernetes-map-type: atomic v1alpha1.ParamRef: - description: ParamRef references a parameter resource + description: ParamRef describes how to locate the params to be used as input + to expressions of rules applied by a policy binding. example: name: name namespace: namespace + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + parameterNotFoundAction: parameterNotFoundAction properties: name: - description: Name of the resource being referenced. + description: |- + `name` is the name of the resource being referenced. + + `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. type: string namespace: - description: Namespace of the referenced resource. Should be empty for the - cluster-scoped resources + description: |- + namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. + + A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. + + - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. + + - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. type: string + parameterNotFoundAction: + description: |- + `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. + + Allowed values are `Allow` or `Deny` Default to `Deny` + type: string + selector: + $ref: '#/components/schemas/v1.LabelSelector' type: object x-kubernetes-map-type: atomic v1alpha1.TypeChecking: @@ -66716,102 +67328,2325 @@ components: apiVersion: apiVersion kind: kind spec: - paramKind: - apiVersion: apiVersion - kind: kind - auditAnnotations: - - valueExpression: valueExpression - key: key - - valueExpression: valueExpression - key: key - matchConditions: - - expression: expression - name: name - - expression: expression + variables: + - expression: expression + name: name + - expression: expression + name: name + paramKind: + apiVersion: apiVersion + kind: kind + auditAnnotations: + - valueExpression: valueExpression + key: key + - valueExpression: valueExpression + key: key + matchConditions: + - expression: expression + name: name + - expression: expression + name: name + matchConstraints: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + validations: + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + failurePolicy: failurePolicy + status: + typeChecking: + expressionWarnings: + - fieldRef: fieldRef + warning: warning + - fieldRef: fieldRef + warning: warning + conditions: + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + observedGeneration: 0 + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + $ref: '#/components/schemas/v1.ObjectMeta' + spec: + $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicySpec' + status: + $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicyStatus' + type: object + x-kubernetes-group-version-kind: + - group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1alpha1 + x-implements: + - io.kubernetes.client.common.KubernetesObject + v1alpha1.ValidatingAdmissionPolicyBinding: + description: |- + 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. + example: + metadata: + generation: 6 + finalizers: + - finalizers + - finalizers + resourceVersion: resourceVersion + annotations: + key: annotations + generateName: generateName + deletionTimestamp: 2000-01-23T04:56:07.000+00:00 + labels: + key: labels + ownerReferences: + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + selfLink: selfLink + deletionGracePeriodSeconds: 0 + uid: uid + managedFields: + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + creationTimestamp: 2000-01-23T04:56:07.000+00:00 + name: name + namespace: namespace + apiVersion: apiVersion + kind: kind + spec: + paramRef: + name: name + namespace: namespace + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + parameterNotFoundAction: parameterNotFoundAction + policyName: policyName + matchResources: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + validationActions: + - validationActions + - validationActions + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + $ref: '#/components/schemas/v1.ObjectMeta' + spec: + $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicyBindingSpec' + type: object + x-kubernetes-group-version-kind: + - group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyBinding + version: v1alpha1 + x-implements: + - io.kubernetes.client.common.KubernetesObject + v1alpha1.ValidatingAdmissionPolicyBindingList: + description: ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. + example: + metadata: + remainingItemCount: 1 + continue: continue + resourceVersion: resourceVersion + selfLink: selfLink + apiVersion: apiVersion + kind: kind + items: + - metadata: + generation: 6 + finalizers: + - finalizers + - finalizers + resourceVersion: resourceVersion + annotations: + key: annotations + generateName: generateName + deletionTimestamp: 2000-01-23T04:56:07.000+00:00 + labels: + key: labels + ownerReferences: + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + selfLink: selfLink + deletionGracePeriodSeconds: 0 + uid: uid + managedFields: + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + creationTimestamp: 2000-01-23T04:56:07.000+00:00 + name: name + namespace: namespace + apiVersion: apiVersion + kind: kind + spec: + paramRef: + name: name + namespace: namespace + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + parameterNotFoundAction: parameterNotFoundAction + policyName: policyName + matchResources: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + validationActions: + - validationActions + - validationActions + - metadata: + generation: 6 + finalizers: + - finalizers + - finalizers + resourceVersion: resourceVersion + annotations: + key: annotations + generateName: generateName + deletionTimestamp: 2000-01-23T04:56:07.000+00:00 + labels: + key: labels + ownerReferences: + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + selfLink: selfLink + deletionGracePeriodSeconds: 0 + uid: uid + managedFields: + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + creationTimestamp: 2000-01-23T04:56:07.000+00:00 + name: name + namespace: namespace + apiVersion: apiVersion + kind: kind + spec: + paramRef: + name: name + namespace: namespace + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + parameterNotFoundAction: parameterNotFoundAction + policyName: policyName + matchResources: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + validationActions: + - validationActions + - validationActions + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + items: + description: List of PolicyBinding. + items: + $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicyBinding' + type: array + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + $ref: '#/components/schemas/v1.ListMeta' + type: object + x-kubernetes-group-version-kind: + - group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyBindingList + version: v1alpha1 + x-implements: + - io.kubernetes.client.common.KubernetesListObject + v1alpha1.ValidatingAdmissionPolicyBindingSpec: + description: ValidatingAdmissionPolicyBindingSpec is the specification of the + ValidatingAdmissionPolicyBinding. + example: + paramRef: + name: name + namespace: namespace + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + parameterNotFoundAction: parameterNotFoundAction + policyName: policyName + matchResources: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + validationActions: + - validationActions + - validationActions + properties: + matchResources: + $ref: '#/components/schemas/v1alpha1.MatchResources' + paramRef: + $ref: '#/components/schemas/v1alpha1.ParamRef' + policyName: + description: PolicyName references a ValidatingAdmissionPolicy name which + the ValidatingAdmissionPolicyBinding binds to. If the referenced resource + does not exist, this binding is considered invalid and will be ignored + Required. + type: string + validationActions: + description: |- + validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. + + Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. + + validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. + + The supported actions values are: + + "Deny" specifies that a validation failure results in a denied request. + + "Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. + + "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]"` + + Clients should expect to handle additional values by ignoring any values not recognized. + + "Deny" and "Warn" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. + + Required. + items: + type: string + type: array + x-kubernetes-list-type: set + type: object + v1alpha1.ValidatingAdmissionPolicyList: + description: ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. + example: + metadata: + remainingItemCount: 1 + continue: continue + resourceVersion: resourceVersion + selfLink: selfLink + apiVersion: apiVersion + kind: kind + items: + - metadata: + generation: 6 + finalizers: + - finalizers + - finalizers + resourceVersion: resourceVersion + annotations: + key: annotations + generateName: generateName + deletionTimestamp: 2000-01-23T04:56:07.000+00:00 + labels: + key: labels + ownerReferences: + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + selfLink: selfLink + deletionGracePeriodSeconds: 0 + uid: uid + managedFields: + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + creationTimestamp: 2000-01-23T04:56:07.000+00:00 + name: name + namespace: namespace + apiVersion: apiVersion + kind: kind + spec: + variables: + - expression: expression + name: name + - expression: expression + name: name + paramKind: + apiVersion: apiVersion + kind: kind + auditAnnotations: + - valueExpression: valueExpression + key: key + - valueExpression: valueExpression + key: key + matchConditions: + - expression: expression + name: name + - expression: expression + name: name + matchConstraints: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + validations: + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + failurePolicy: failurePolicy + status: + typeChecking: + expressionWarnings: + - fieldRef: fieldRef + warning: warning + - fieldRef: fieldRef + warning: warning + conditions: + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + observedGeneration: 0 + - metadata: + generation: 6 + finalizers: + - finalizers + - finalizers + resourceVersion: resourceVersion + annotations: + key: annotations + generateName: generateName + deletionTimestamp: 2000-01-23T04:56:07.000+00:00 + labels: + key: labels + ownerReferences: + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + selfLink: selfLink + deletionGracePeriodSeconds: 0 + uid: uid + managedFields: + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + creationTimestamp: 2000-01-23T04:56:07.000+00:00 + name: name + namespace: namespace + apiVersion: apiVersion + kind: kind + spec: + variables: + - expression: expression + name: name + - expression: expression + name: name + paramKind: + apiVersion: apiVersion + kind: kind + auditAnnotations: + - valueExpression: valueExpression + key: key + - valueExpression: valueExpression + key: key + matchConditions: + - expression: expression + name: name + - expression: expression + name: name + matchConstraints: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + validations: + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + failurePolicy: failurePolicy + status: + typeChecking: + expressionWarnings: + - fieldRef: fieldRef + warning: warning + - fieldRef: fieldRef + warning: warning + conditions: + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + observedGeneration: 0 + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + items: + description: List of ValidatingAdmissionPolicy. + items: + $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicy' + type: array + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + $ref: '#/components/schemas/v1.ListMeta' + type: object + x-kubernetes-group-version-kind: + - group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicyList + version: v1alpha1 + x-implements: + - io.kubernetes.client.common.KubernetesListObject + v1alpha1.ValidatingAdmissionPolicySpec: + description: ValidatingAdmissionPolicySpec is the specification of the desired + behavior of the AdmissionPolicy. + example: + variables: + - expression: expression + name: name + - expression: expression + name: name + paramKind: + apiVersion: apiVersion + kind: kind + auditAnnotations: + - valueExpression: valueExpression + key: key + - valueExpression: valueExpression + key: key + matchConditions: + - expression: expression + name: name + - expression: expression + name: name + matchConstraints: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + validations: + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + failurePolicy: failurePolicy + properties: + auditAnnotations: + description: auditAnnotations contains CEL expressions which are used to + produce audit annotations for the audit event of the API request. validations + and auditAnnotations may not both be empty; a least one of validations + or auditAnnotations is required. + items: + $ref: '#/components/schemas/v1alpha1.AuditAnnotation' + type: array + x-kubernetes-list-type: atomic + failurePolicy: + description: |- + failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. + + A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource. + + failurePolicy does not define how validations that evaluate to false are handled. + + When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced. + + Allowed values are Ignore or Fail. Defaults to Fail. + type: string + matchConditions: + description: |- + MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. + + If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. + + The exact matching logic is (in order): + 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + 3. If any matchCondition evaluates to an error (but none are FALSE): + - If failurePolicy=Fail, reject the request + - If failurePolicy=Ignore, the policy is skipped + items: + $ref: '#/components/schemas/v1alpha1.MatchCondition' + type: array + x-kubernetes-patch-strategy: merge + x-kubernetes-list-type: map + x-kubernetes-list-map-keys: + - name + x-kubernetes-patch-merge-key: name + matchConstraints: + $ref: '#/components/schemas/v1alpha1.MatchResources' + paramKind: + $ref: '#/components/schemas/v1alpha1.ParamKind' + validations: + description: Validations contain CEL expressions which is used to apply + the validation. Validations and AuditAnnotations may not both be empty; + a minimum of one Validations or AuditAnnotations is required. + items: + $ref: '#/components/schemas/v1alpha1.Validation' + type: array + x-kubernetes-list-type: atomic + variables: + description: |- + Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. + + The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. + items: + $ref: '#/components/schemas/v1alpha1.Variable' + type: array + x-kubernetes-patch-strategy: merge + x-kubernetes-list-type: map + x-kubernetes-list-map-keys: + - name + x-kubernetes-patch-merge-key: name + type: object + v1alpha1.ValidatingAdmissionPolicyStatus: + description: ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy. + example: + typeChecking: + expressionWarnings: + - fieldRef: fieldRef + warning: warning + - fieldRef: fieldRef + warning: warning + conditions: + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + observedGeneration: 0 + properties: + conditions: + description: The conditions represent the latest available observations + of a policy's current state. + items: + $ref: '#/components/schemas/v1.Condition' + type: array + x-kubernetes-list-type: map + x-kubernetes-list-map-keys: + - type + observedGeneration: + description: The generation observed by the controller. + format: int64 + type: integer + typeChecking: + $ref: '#/components/schemas/v1alpha1.TypeChecking' + type: object + v1alpha1.Validation: + description: Validation specifies the CEL expression which is used to apply + the validation. + example: + reason: reason + expression: expression + messageExpression: messageExpression + message: message + properties: + expression: + description: "Expression represents the expression which will be evaluated\ + \ by CEL. ref: https://github.com/google/cel-spec CEL expressions have\ + \ access to the contents of the API request/response, organized into CEL\ + \ variables as well as some other useful variables:\n\n- 'object' - The\ + \ object from the incoming request. The value is null for DELETE requests.\ + \ - 'oldObject' - The existing object. The value is null for CREATE requests.\ + \ - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\ + \ - 'params' - Parameter resource referred to by the policy binding being\ + \ evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject'\ + \ - The namespace object that the incoming object belongs to. The value\ + \ is null for cluster-scoped resources. - 'variables' - Map of composited\ + \ variables, from its name to its lazily evaluated value.\n For example,\ + \ a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer'\ + \ - A CEL Authorizer. May be used to perform authorization checks for\ + \ the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n\ + - 'authorizer.requestResource' - A CEL ResourceCheck constructed from\ + \ the 'authorizer' and configured with the\n request resource.\n\nThe\ + \ `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are\ + \ always accessible from the root of the object. No other metadata properties\ + \ are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*`\ + \ are accessible. Accessible property names are escaped according to the\ + \ following rules when accessed in the expression: - '__' escapes to '__underscores__'\ + \ - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes\ + \ to '__slash__' - Property names that exactly match a CEL RESERVED keyword\ + \ escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\"\ + , \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\"\ + , \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"\ + package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing\ + \ a property named \"namespace\": {\"Expression\": \"object.__namespace__\ + \ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\"\ + : \"object.x__dash__prop > 0\"}\n - Expression accessing a property named\ + \ \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"\ + }\n\nEquality on arrays with list type of 'set' or 'map' ignores element\ + \ order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type\ + \ use the semantics of the list type:\n - 'set': `X + Y` performs a union\ + \ where the array positions of all elements in `X` are preserved and\n\ + \ non-intersecting elements in `Y` are appended, retaining their partial\ + \ order.\n - 'map': `X + Y` performs a merge where the array positions\ + \ of all keys in `X` are preserved but the values\n are overwritten\ + \ by values in `Y` when the key sets of `X` and `Y` intersect. Elements\ + \ in `Y` with\n non-intersecting keys are appended, retaining their\ + \ partial order.\nRequired." + type: string + message: + description: 'Message represents the message displayed when validation fails. + The message is required if the Expression contains line breaks. The message + must not contain line breaks. If unset, the message is "failed rule: {Rule}". + e.g. "must be a URL with the host matching spec.host" If the Expression + contains line breaks. Message is required. The message must not contain + line breaks. If unset, the message is "failed Expression: {Expression}".' + type: string + messageExpression: + description: 'messageExpression declares a CEL expression that evaluates + to the validation failure message that is returned when this rule fails. + Since messageExpression is used as a failure message, it must evaluate + to a string. If both message and messageExpression are present on a validation, + then messageExpression will be used if validation fails. If messageExpression + results in a runtime error, the runtime error is logged, and the validation + failure message is produced as if the messageExpression field were unset. + If messageExpression evaluates to an empty string, a string with only + spaces, or a string that contains line breaks, then the validation failure + message will also be produced as if the messageExpression field were unset, + and the fact that messageExpression produced an empty string/string with + only spaces/string with line breaks will be logged. messageExpression + has access to all the same variables as the `expression` except for ''authorizer'' + and ''authorizer.requestResource''. Example: "object.x must be less than + max ("+string(params.max)+")"' + type: string + reason: + description: 'Reason represents a machine-readable description of why this + validation failed. If this is the first validation in the list to fail, + this reason, as well as the corresponding HTTP response code, are used + in the HTTP response to the client. The currently supported reasons are: + "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". If not + set, StatusReasonInvalid is used in the response to the client.' + type: string + required: + - expression + type: object + v1alpha1.Variable: + description: Variable is the definition of a variable that is used for composition. + example: + expression: expression + name: name + properties: + expression: + description: Expression is the expression that will be evaluated as the + value of the variable. The CEL expression has access to the same identifiers + as the CEL expressions in Validation. + type: string + name: + description: Name is the name of the variable. The name must be a valid + CEL identifier and unique among all variables. The variable can be accessed + in other expressions through `variables` For example, if name is "foo", + the variable will be available as `variables.foo` + type: string + required: + - expression + - name + type: object + v1beta1.AuditAnnotation: + description: AuditAnnotation describes how to produce an audit annotation for + an API request. + example: + valueExpression: valueExpression + key: key + properties: + key: + description: |- + key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. + + The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: "{ValidatingAdmissionPolicy name}/{key}". + + If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded. + + Required. + type: string + valueExpression: + description: |- + valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb. + + If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list. + + Required. + type: string + required: + - key + - valueExpression + type: object + v1beta1.ExpressionWarning: + description: ExpressionWarning is a warning information that targets a specific + expression. + example: + fieldRef: fieldRef + warning: warning + properties: + fieldRef: + description: The path to the field that refers the expression. For example, + the reference to the expression of the first item of validations is "spec.validations[0].expression" + type: string + warning: + description: The content of type checking information in a human-readable + form. Each line of the warning contains the type that the expression is + checked against, followed by the type check error from the compiler. + type: string + required: + - fieldRef + - warning + type: object + v1beta1.MatchCondition: + description: MatchCondition represents a condition which must be fulfilled for + a request to be sent to a webhook. + example: + expression: expression + name: name + properties: + expression: + description: |- + Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: + + 'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + request resource. + Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ + + Required. + type: string + name: + description: |- + Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') + + Required. + type: string + required: + - expression + - name + type: object + v1beta1.MatchResources: + description: 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) + example: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + properties: + excludeResourceRules: + description: ExcludeResourceRules describes what operations on what resources/subresources + the ValidatingAdmissionPolicy should not care about. The exclude rules + take precedence over include rules (if a resource matches both, it is + excluded) + items: + $ref: '#/components/schemas/v1beta1.NamedRuleWithOperations' + type: array + x-kubernetes-list-type: atomic + matchPolicy: + description: |- + matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". + + - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. + + - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. + + Defaults to "Equivalent" + type: string + namespaceSelector: + $ref: '#/components/schemas/v1.LabelSelector' + objectSelector: + $ref: '#/components/schemas/v1.LabelSelector' + resourceRules: + description: ResourceRules describes what operations on what resources/subresources + the ValidatingAdmissionPolicy matches. The policy cares about an operation + if it matches _any_ Rule. + items: + $ref: '#/components/schemas/v1beta1.NamedRuleWithOperations' + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + v1beta1.NamedRuleWithOperations: + description: NamedRuleWithOperations is a tuple of Operations and Resources + with ResourceNames. + example: + resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + properties: + apiGroups: + description: APIGroups is the API groups the resources belong to. '*' is + all groups. If '*' is present, the length of the slice must be one. Required. + items: + type: string + type: array + x-kubernetes-list-type: atomic + apiVersions: + description: APIVersions is the API versions the resources belong to. '*' + is all versions. If '*' is present, the length of the slice must be one. + Required. + items: + type: string + type: array + x-kubernetes-list-type: atomic + operations: + description: Operations is the operations the admission hook cares about + - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and + any future admission operations that are added. If '*' is present, the + length of the slice must be one. Required. + items: + type: string + type: array + x-kubernetes-list-type: atomic + resourceNames: + description: ResourceNames is an optional white list of names that the rule + applies to. An empty set means that everything is allowed. + items: + type: string + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Resources is a list of resources this rule applies to. + + For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. + + If wildcard is present, the validation rule will ensure resources do not overlap with each other. + + Depending on the enclosing object, subresources might not be allowed. Required. + items: + type: string + type: array + x-kubernetes-list-type: atomic + scope: + description: scope specifies the scope of this rule. Valid values are "Cluster", + "Namespaced", and "*" "Cluster" means that only cluster-scoped resources + will match this rule. Namespace API objects are cluster-scoped. "Namespaced" + means that only namespaced resources will match this rule. "*" means that + there are no scope restrictions. Subresources match the scope of their + parent resource. Default is "*". + type: string + type: object + x-kubernetes-map-type: atomic + v1beta1.ParamKind: + description: ParamKind is a tuple of Group Kind and Version. + example: + apiVersion: apiVersion + kind: kind + properties: + apiVersion: + description: APIVersion is the API group version the resources belong to. + In format of "group/version". Required. + type: string + kind: + description: Kind is the API kind the resources belong to. Required. + type: string + type: object + x-kubernetes-map-type: atomic + v1beta1.ParamRef: + description: ParamRef describes how to locate the params to be used as input + to expressions of rules applied by a policy binding. + example: + name: name + namespace: namespace + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + parameterNotFoundAction: parameterNotFoundAction + properties: + name: + description: |- + name is the name of the resource being referenced. + + One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. + + A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. + type: string + namespace: + description: |- + namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. + + A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. + + - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. + + - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. + type: string + parameterNotFoundAction: + description: |- + `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. + + Allowed values are `Allow` or `Deny` + + Required + type: string + selector: + $ref: '#/components/schemas/v1.LabelSelector' + type: object + x-kubernetes-map-type: atomic + v1beta1.TypeChecking: + description: TypeChecking contains results of type checking the expressions + in the ValidatingAdmissionPolicy + example: + expressionWarnings: + - fieldRef: fieldRef + warning: warning + - fieldRef: fieldRef + warning: warning + properties: + expressionWarnings: + description: The type checking warnings for each expression. + items: + $ref: '#/components/schemas/v1beta1.ExpressionWarning' + type: array + x-kubernetes-list-type: atomic + type: object + v1beta1.ValidatingAdmissionPolicy: + description: ValidatingAdmissionPolicy describes the definition of an admission + validation policy that accepts or rejects an object without changing it. + example: + metadata: + generation: 6 + finalizers: + - finalizers + - finalizers + resourceVersion: resourceVersion + annotations: + key: annotations + generateName: generateName + deletionTimestamp: 2000-01-23T04:56:07.000+00:00 + labels: + key: labels + ownerReferences: + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + selfLink: selfLink + deletionGracePeriodSeconds: 0 + uid: uid + managedFields: + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + creationTimestamp: 2000-01-23T04:56:07.000+00:00 + name: name + namespace: namespace + apiVersion: apiVersion + kind: kind + spec: + variables: + - expression: expression + name: name + - expression: expression + name: name + paramKind: + apiVersion: apiVersion + kind: kind + auditAnnotations: + - valueExpression: valueExpression + key: key + - valueExpression: valueExpression + key: key + matchConditions: + - expression: expression + name: name + - expression: expression + name: name + matchConstraints: + matchPolicy: matchPolicy + resourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + excludeResourceRules: + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + - resourceNames: + - resourceNames + - resourceNames + operations: + - operations + - operations + apiVersions: + - apiVersions + - apiVersions + scope: scope + resources: + - resources + - resources + apiGroups: + - apiGroups + - apiGroups + namespaceSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + objectSelector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + validations: + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + - reason: reason + expression: expression + messageExpression: messageExpression + message: message + failurePolicy: failurePolicy + status: + typeChecking: + expressionWarnings: + - fieldRef: fieldRef + warning: warning + - fieldRef: fieldRef + warning: warning + conditions: + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + - reason: reason + lastTransitionTime: 2000-01-23T04:56:07.000+00:00 + message: message + type: type + observedGeneration: 5 + status: status + observedGeneration: 0 + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + $ref: '#/components/schemas/v1.ObjectMeta' + spec: + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicySpec' + status: + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyStatus' + type: object + x-kubernetes-group-version-kind: + - group: admissionregistration.k8s.io + kind: ValidatingAdmissionPolicy + version: v1beta1 + x-implements: + - io.kubernetes.client.common.KubernetesObject + v1beta1.ValidatingAdmissionPolicyBinding: + description: |- + 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. + example: + metadata: + generation: 6 + finalizers: + - finalizers + - finalizers + resourceVersion: resourceVersion + annotations: + key: annotations + generateName: generateName + deletionTimestamp: 2000-01-23T04:56:07.000+00:00 + labels: + key: labels + ownerReferences: + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + selfLink: selfLink + deletionGracePeriodSeconds: 0 + uid: uid + managedFields: + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + creationTimestamp: 2000-01-23T04:56:07.000+00:00 + name: name + namespace: namespace + apiVersion: apiVersion + kind: kind + spec: + paramRef: name: name - matchConstraints: - matchPolicy: matchPolicy - resourceRules: - - resourceNames: - - resourceNames - - resourceNames - operations: - - operations - - operations - apiVersions: - - apiVersions - - apiVersions - scope: scope - resources: - - resources - - resources - apiGroups: - - apiGroups - - apiGroups - - resourceNames: - - resourceNames - - resourceNames - operations: - - operations - - operations - apiVersions: - - apiVersions - - apiVersions - scope: scope - resources: - - resources - - resources - apiGroups: - - apiGroups - - apiGroups - excludeResourceRules: - - resourceNames: - - resourceNames - - resourceNames - operations: - - operations - - operations - apiVersions: - - apiVersions - - apiVersions - scope: scope - resources: - - resources - - resources - apiGroups: - - apiGroups - - apiGroups - - resourceNames: - - resourceNames - - resourceNames - operations: - - operations - - operations - apiVersions: - - apiVersions - - apiVersions - scope: scope - resources: - - resources - - resources - apiGroups: - - apiGroups - - apiGroups - namespaceSelector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - objectSelector: + namespace: namespace + selector: matchExpressions: - values: - values @@ -66825,118 +69660,7 @@ components: operator: operator matchLabels: key: matchLabels - validations: - - reason: reason - expression: expression - messageExpression: messageExpression - message: message - - reason: reason - expression: expression - messageExpression: messageExpression - message: message - failurePolicy: failurePolicy - status: - typeChecking: - expressionWarnings: - - fieldRef: fieldRef - warning: warning - - fieldRef: fieldRef - warning: warning - conditions: - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status - observedGeneration: 0 - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - $ref: '#/components/schemas/v1.ObjectMeta' - spec: - $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicySpec' - status: - $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicyStatus' - type: object - x-kubernetes-group-version-kind: - - group: admissionregistration.k8s.io - kind: ValidatingAdmissionPolicy - version: v1alpha1 - x-implements: - - io.kubernetes.client.common.KubernetesObject - v1alpha1.ValidatingAdmissionPolicyBinding: - description: ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy - with paramerized resources. ValidatingAdmissionPolicyBinding and parameter - CRDs together define how cluster administrators configure policies for clusters. - example: - metadata: - generation: 6 - finalizers: - - finalizers - - finalizers - resourceVersion: resourceVersion - annotations: - key: annotations - generateName: generateName - deletionTimestamp: 2000-01-23T04:56:07.000+00:00 - labels: - key: labels - ownerReferences: - - uid: uid - controller: true - apiVersion: apiVersion - kind: kind - name: name - blockOwnerDeletion: true - - uid: uid - controller: true - apiVersion: apiVersion - kind: kind - name: name - blockOwnerDeletion: true - selfLink: selfLink - deletionGracePeriodSeconds: 0 - uid: uid - managedFields: - - apiVersion: apiVersion - fieldsV1: '{}' - manager: manager - subresource: subresource - time: 2000-01-23T04:56:07.000+00:00 - operation: operation - fieldsType: fieldsType - - apiVersion: apiVersion - fieldsV1: '{}' - manager: manager - subresource: subresource - time: 2000-01-23T04:56:07.000+00:00 - operation: operation - fieldsType: fieldsType - creationTimestamp: 2000-01-23T04:56:07.000+00:00 - name: name - namespace: namespace - apiVersion: apiVersion - kind: kind - spec: - paramRef: - name: name - namespace: namespace + parameterNotFoundAction: parameterNotFoundAction policyName: policyName matchResources: matchPolicy: matchPolicy @@ -67051,15 +69775,15 @@ components: metadata: $ref: '#/components/schemas/v1.ObjectMeta' spec: - $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicyBindingSpec' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBindingSpec' type: object x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicyBinding - version: v1alpha1 + version: v1beta1 x-implements: - io.kubernetes.client.common.KubernetesObject - v1alpha1.ValidatingAdmissionPolicyBindingList: + v1beta1.ValidatingAdmissionPolicyBindingList: description: ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. example: metadata: @@ -67122,6 +69846,21 @@ components: paramRef: name: name namespace: namespace + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + parameterNotFoundAction: parameterNotFoundAction policyName: policyName matchResources: matchPolicy: matchPolicy @@ -67274,6 +70013,21 @@ components: paramRef: name: name namespace: namespace + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + parameterNotFoundAction: parameterNotFoundAction policyName: policyName matchResources: matchPolicy: matchPolicy @@ -67383,7 +70137,7 @@ components: items: description: List of PolicyBinding. items: - $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicyBinding' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicyBinding' type: array kind: description: 'Kind is a string value representing the REST resource this @@ -67396,16 +70150,31 @@ components: x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicyBindingList - version: v1alpha1 + version: v1beta1 x-implements: - io.kubernetes.client.common.KubernetesListObject - v1alpha1.ValidatingAdmissionPolicyBindingSpec: + v1beta1.ValidatingAdmissionPolicyBindingSpec: description: ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. example: paramRef: name: name namespace: namespace + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + parameterNotFoundAction: parameterNotFoundAction policyName: policyName matchResources: matchPolicy: matchPolicy @@ -67508,9 +70277,9 @@ components: - validationActions properties: matchResources: - $ref: '#/components/schemas/v1alpha1.MatchResources' + $ref: '#/components/schemas/v1beta1.MatchResources' paramRef: - $ref: '#/components/schemas/v1alpha1.ParamRef' + $ref: '#/components/schemas/v1beta1.ParamRef' policyName: description: PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource @@ -67543,7 +70312,7 @@ components: type: array x-kubernetes-list-type: set type: object - v1alpha1.ValidatingAdmissionPolicyList: + v1beta1.ValidatingAdmissionPolicyList: description: ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. example: metadata: @@ -67603,6 +70372,11 @@ components: apiVersion: apiVersion kind: kind spec: + variables: + - expression: expression + name: name + - expression: expression + name: name paramKind: apiVersion: apiVersion kind: kind @@ -67792,6 +70566,11 @@ components: apiVersion: apiVersion kind: kind spec: + variables: + - expression: expression + name: name + - expression: expression + name: name paramKind: apiVersion: apiVersion kind: kind @@ -67941,7 +70720,7 @@ components: items: description: List of ValidatingAdmissionPolicy. items: - $ref: '#/components/schemas/v1alpha1.ValidatingAdmissionPolicy' + $ref: '#/components/schemas/v1beta1.ValidatingAdmissionPolicy' type: array kind: description: 'Kind is a string value representing the REST resource this @@ -67954,13 +70733,18 @@ components: x-kubernetes-group-version-kind: - group: admissionregistration.k8s.io kind: ValidatingAdmissionPolicyList - version: v1alpha1 + version: v1beta1 x-implements: - io.kubernetes.client.common.KubernetesListObject - v1alpha1.ValidatingAdmissionPolicySpec: + v1beta1.ValidatingAdmissionPolicySpec: description: ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. example: + variables: + - expression: expression + name: name + - expression: expression + name: name paramKind: apiVersion: apiVersion kind: kind @@ -68087,7 +70871,7 @@ components: and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required. items: - $ref: '#/components/schemas/v1alpha1.AuditAnnotation' + $ref: '#/components/schemas/v1beta1.AuditAnnotation' type: array x-kubernetes-list-type: atomic failurePolicy: @@ -68115,7 +70899,7 @@ components: - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped items: - $ref: '#/components/schemas/v1alpha1.MatchCondition' + $ref: '#/components/schemas/v1beta1.MatchCondition' type: array x-kubernetes-patch-strategy: merge x-kubernetes-list-type: map @@ -68123,20 +70907,34 @@ components: - name x-kubernetes-patch-merge-key: name matchConstraints: - $ref: '#/components/schemas/v1alpha1.MatchResources' + $ref: '#/components/schemas/v1beta1.MatchResources' paramKind: - $ref: '#/components/schemas/v1alpha1.ParamKind' + $ref: '#/components/schemas/v1beta1.ParamKind' validations: description: Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required. items: - $ref: '#/components/schemas/v1alpha1.Validation' + $ref: '#/components/schemas/v1beta1.Validation' type: array x-kubernetes-list-type: atomic + variables: + description: |- + Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. + + The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. + items: + $ref: '#/components/schemas/v1beta1.Variable' + type: array + x-kubernetes-patch-strategy: merge + x-kubernetes-list-type: map + x-kubernetes-list-map-keys: + - name + x-kubernetes-patch-merge-key: name type: object - v1alpha1.ValidatingAdmissionPolicyStatus: - description: ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy. + v1beta1.ValidatingAdmissionPolicyStatus: + description: ValidatingAdmissionPolicyStatus represents the status of an admission + validation policy. example: typeChecking: expressionWarnings: @@ -68173,9 +70971,9 @@ components: format: int64 type: integer typeChecking: - $ref: '#/components/schemas/v1alpha1.TypeChecking' + $ref: '#/components/schemas/v1beta1.TypeChecking' type: object - v1alpha1.Validation: + v1beta1.Validation: description: Validation specifies the CEL expression which is used to apply the validation. example: @@ -68193,7 +70991,11 @@ components: \ - 'oldObject' - The existing object. The value is null for CREATE requests.\ \ - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\ \ - 'params' - Parameter resource referred to by the policy binding being\ - \ evaluated. Only populated if the policy has a ParamKind. - 'authorizer'\ + \ evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject'\ + \ - The namespace object that the incoming object belongs to. The value\ + \ is null for cluster-scoped resources. - 'variables' - Map of composited\ + \ variables, from its name to its lazily evaluated value.\n For example,\ + \ a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer'\ \ - A CEL Authorizer. May be used to perform authorization checks for\ \ the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n\ - 'authorizer.requestResource' - A CEL ResourceCheck constructed from\ @@ -68260,6 +71062,29 @@ components: required: - expression type: object + v1beta1.Variable: + description: Variable is the definition of a variable that is used for composition. + A variable is defined as a named expression. + example: + expression: expression + name: name + properties: + expression: + description: Expression is the expression that will be evaluated as the + value of the variable. The CEL expression has access to the same identifiers + as the CEL expressions in Validation. + type: string + name: + description: Name is the name of the variable. The name must be a valid + CEL identifier and unique among all variables. The variable can be accessed + in other expressions through `variables` For example, if name is "foo", + the variable will be available as `variables.foo` + type: string + required: + - expression + - name + type: object + x-kubernetes-map-type: atomic v1alpha1.ServerStorageVersion: description: An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend. @@ -68269,6 +71094,9 @@ components: - decodableVersions - decodableVersions encodingVersion: encodingVersion + servedVersions: + - servedVersions + - servedVersions properties: apiServerID: description: The ID of the reporting API server. @@ -68284,6 +71112,13 @@ components: description: The API server encodes the object to this version when persisting it in the backend (e.g., etcd). type: string + servedVersions: + description: The API server can serve these versions. DecodableVersions + must include all ServedVersions. + items: + type: string + type: array + x-kubernetes-list-type: set type: object v1alpha1.StorageVersion: description: Storage version of a specific resource. @@ -68358,11 +71193,17 @@ components: - decodableVersions - decodableVersions encodingVersion: encodingVersion + servedVersions: + - servedVersions + - servedVersions - apiServerID: apiServerID decodableVersions: - decodableVersions - decodableVersions encodingVersion: encodingVersion + servedVersions: + - servedVersions + - servedVersions properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -68510,11 +71351,17 @@ components: - decodableVersions - decodableVersions encodingVersion: encodingVersion + servedVersions: + - servedVersions + - servedVersions - apiServerID: apiServerID decodableVersions: - decodableVersions - decodableVersions encodingVersion: encodingVersion + servedVersions: + - servedVersions + - servedVersions - metadata: generation: 6 finalizers: @@ -68585,11 +71432,17 @@ components: - decodableVersions - decodableVersions encodingVersion: encodingVersion + servedVersions: + - servedVersions + - servedVersions - apiServerID: apiServerID decodableVersions: - decodableVersions - decodableVersions encodingVersion: encodingVersion + servedVersions: + - servedVersions + - servedVersions properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -68641,11 +71494,17 @@ components: - decodableVersions - decodableVersions encodingVersion: encodingVersion + servedVersions: + - servedVersions + - servedVersions - apiServerID: apiServerID decodableVersions: - decodableVersions - decodableVersions encodingVersion: encodingVersion + servedVersions: + - servedVersions + - servedVersions properties: commonEncodingVersion: description: If all API server instances agree on the same encoding storage @@ -69886,46 +72745,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -69981,43 +72802,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -70029,9 +72813,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -70045,9 +72826,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -70085,8 +72863,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -70119,7 +72895,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -70135,11 +72910,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -70169,9 +72939,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -70180,6 +72948,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -70235,43 +73057,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -70283,9 +73068,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -70299,9 +73081,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -70339,8 +73118,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -70368,27 +73145,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -70552,6 +73413,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -70805,6 +73667,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -71059,6 +73922,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -71312,6 +74176,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -72874,46 +75739,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -72969,43 +75796,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -73017,9 +75807,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -73033,9 +75820,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -73073,8 +75857,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -73107,7 +75889,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -73123,11 +75904,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -73157,9 +75933,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -73168,6 +75942,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -73223,43 +76051,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -73271,9 +76062,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -73287,9 +76075,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -73327,8 +76112,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -73356,27 +76139,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -73540,6 +76407,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -73793,6 +76661,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -74047,6 +76916,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -74300,6 +77170,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -75797,46 +78668,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -75892,43 +78725,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -75940,9 +78736,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -75956,9 +78749,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -75996,8 +78786,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -76030,7 +78818,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -76046,11 +78833,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -76080,9 +78862,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -76091,6 +78871,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -76146,43 +78980,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -76194,9 +78991,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -76210,9 +79004,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -76250,8 +79041,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -76279,27 +79068,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -76463,6 +79336,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -76716,6 +79590,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -76970,6 +79845,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -77223,6 +80099,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -78701,46 +81578,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -78796,43 +81635,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -78844,9 +81646,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -78860,9 +81659,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -78900,8 +81696,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -78934,7 +81728,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -78950,11 +81743,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -78984,9 +81772,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -78995,6 +81781,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -79050,43 +81890,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -79098,9 +81901,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -79114,9 +81914,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -79154,8 +81951,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -79183,27 +81978,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -79367,6 +82246,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -79620,6 +82500,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -79874,6 +82755,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -80127,6 +83009,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -81731,46 +84614,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -81826,43 +84671,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -81874,9 +84682,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -81890,9 +84695,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -81930,8 +84732,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -81964,7 +84764,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -81980,11 +84779,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -82014,9 +84808,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -82025,6 +84817,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -82080,43 +84926,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -82128,9 +84937,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -82144,9 +84950,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -82184,8 +84987,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -82213,27 +85014,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -82397,6 +85282,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -82650,6 +85536,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -82904,6 +85791,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -83157,6 +86045,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -84727,46 +87616,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -84822,43 +87673,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -84870,9 +87684,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -84886,9 +87697,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -84926,8 +87734,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -84960,7 +87766,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -84976,11 +87781,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -85010,9 +87810,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -85021,6 +87819,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -85076,43 +87928,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -85124,9 +87939,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -85140,9 +87952,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -85180,8 +87989,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -85209,27 +88016,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -85393,6 +88284,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -85646,6 +88538,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -85900,6 +88793,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -86153,6 +89047,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -87653,46 +90548,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -87748,43 +90605,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -87796,9 +90616,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -87812,9 +90629,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -87852,8 +90666,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -87886,7 +90698,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -87902,11 +90713,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -87936,9 +90742,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -87947,6 +90751,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -88002,43 +90860,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -88050,9 +90871,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -88066,9 +90884,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -88106,8 +90921,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -88135,27 +90948,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -88319,6 +91216,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -88572,6 +91470,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -88826,6 +91725,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -89079,6 +91979,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -90561,46 +93462,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -90656,43 +93519,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -90704,9 +93530,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -90720,9 +93543,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -90760,8 +93580,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -90794,7 +93612,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -90810,11 +93627,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -90844,9 +93656,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -90855,6 +93665,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -90910,43 +93774,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -90958,9 +93785,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -90974,9 +93798,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -91014,8 +93835,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -91043,27 +93862,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -91227,6 +94130,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -91480,6 +94384,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -91734,6 +94639,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -91987,6 +94893,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -93596,46 +96503,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -93691,43 +96560,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -93739,9 +96571,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -93755,9 +96584,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -93795,8 +96621,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -93829,7 +96653,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -93845,11 +96668,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -93879,9 +96697,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -93890,6 +96706,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -93945,43 +96815,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -93993,9 +96826,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -94009,9 +96839,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -94049,8 +96876,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -94078,27 +96903,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -94262,6 +97171,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -94515,6 +97425,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -94769,6 +97680,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -95022,6 +97934,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -96576,46 +99489,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -96671,43 +99546,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -96719,9 +99557,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -96735,9 +99570,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -96775,8 +99607,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -96809,7 +99639,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -96825,11 +99654,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -96859,9 +99683,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -96870,6 +99692,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -96925,43 +99801,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -96973,9 +99812,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -96989,9 +99825,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -97029,8 +99862,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -97058,27 +99889,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -97242,6 +100157,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -97495,6 +100411,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -97749,6 +100666,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -98002,6 +100920,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -99490,46 +102409,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -99585,43 +102466,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -99633,9 +102477,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -99649,9 +102490,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -99689,8 +102527,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -99723,7 +102559,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -99739,11 +102574,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -99773,9 +102603,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -99784,6 +102612,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -99839,43 +102721,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -99887,9 +102732,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -99903,9 +102745,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -99943,8 +102782,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -99972,27 +102809,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -100156,6 +103077,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -100409,6 +103331,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -100663,6 +103586,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -100916,6 +103840,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -102385,46 +105310,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -102480,43 +105367,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -102528,9 +105378,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -102544,9 +105391,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -102584,8 +105428,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -102618,7 +105460,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -102634,11 +105475,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -102668,9 +105504,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -102679,6 +105513,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -102734,43 +105622,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -102782,9 +105633,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -102798,9 +105646,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -102838,8 +105683,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -102867,27 +105710,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -103051,6 +105978,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -103304,6 +106232,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -103558,6 +106487,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -103811,6 +106741,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -105432,46 +108363,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -105527,43 +108420,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -105575,9 +108431,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -105591,9 +108444,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -105631,8 +108481,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -105665,7 +108513,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -105681,11 +108528,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -105715,9 +108557,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -105726,6 +108566,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -105781,43 +108675,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -105829,9 +108686,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -105845,9 +108699,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -105885,8 +108736,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -105914,27 +108763,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -106098,6 +109031,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -106351,6 +109285,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -106605,6 +109540,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -106858,6 +109794,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -107449,10 +110386,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -107554,10 +110492,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -108639,46 +111578,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -108734,43 +111635,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -108782,9 +111646,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -108798,9 +111659,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -108838,8 +111696,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -108872,7 +111728,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -108888,11 +111743,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -108922,9 +111772,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -108933,6 +111781,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -108988,43 +111890,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -109036,9 +111901,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -109052,9 +111914,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -109092,8 +111951,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -109121,27 +111978,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -109305,6 +112246,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -109558,6 +112500,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -109812,6 +112755,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -110065,6 +113009,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -110656,10 +113601,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -110761,10 +113707,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -111781,46 +114728,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -111876,43 +114785,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -111924,9 +114796,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -111940,9 +114809,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -111980,8 +114846,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -112014,7 +114878,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -112030,11 +114893,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -112064,9 +114922,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -112075,6 +114931,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -112130,43 +115040,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -112178,9 +115051,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -112194,9 +115064,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -112234,8 +115101,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -112268,7 +115133,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -112284,6 +115148,91 @@ components: secretRef: name: name optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -112447,6 +115396,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -112700,6 +115650,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -112954,6 +115905,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -113207,6 +116159,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -113798,10 +116751,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -113903,10 +116857,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -114940,46 +117895,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -115035,6 +117952,152 @@ components: value: value - name: name value: value + ports: + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + volumeMounts: + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + lifecycle: + postStart: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + preStop: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + readinessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} env: - name: name value: value @@ -115072,6 +118135,78 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy + securityContext: + privileged: true + runAsUser: 1 + capabilities: + add: + - add + - add + drop: + - drop + - drop + seLinuxOptions: + role: role + level: level + type: type + user: user + seccompProfile: + localhostProfile: localhostProfile + type: type + windowsOptions: + gmsaCredentialSpec: gmsaCredentialSpec + runAsUserName: runAsUserName + hostProcess: true + gmsaCredentialSpecName: gmsaCredentialSpecName + procMount: procMount + allowPrivilegeEscalation: true + runAsGroup: 1 + runAsNonRoot: true + readOnlyRootFilesystem: true + startupProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value ports: - protocol: protocol hostIP: hostIP @@ -115083,9 +118218,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -115099,9 +118231,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -115139,8 +118268,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -115173,7 +118300,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -115189,11 +118315,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -115223,9 +118344,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -115234,61 +118353,6 @@ components: - name: name requests: {} limits: {} - securityContext: - privileged: true - runAsUser: 1 - capabilities: - add: - - add - - add - drop: - - drop - - drop - seLinuxOptions: - role: role - level: level - type: type - user: user - seccompProfile: - localhostProfile: localhostProfile - type: type - windowsOptions: - gmsaCredentialSpec: gmsaCredentialSpec - runAsUserName: runAsUserName - hostProcess: true - gmsaCredentialSpecName: gmsaCredentialSpecName - procMount: procMount - allowPrivilegeEscalation: true - runAsGroup: 1 - runAsNonRoot: true - readOnlyRootFilesystem: true - startupProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value env: - name: name value: value @@ -115326,123 +118390,16 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath - ports: - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 + restartPolicy: restartPolicy command: - command - command - volumeMounts: - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr args: - args - args - lifecycle: - postStart: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - preStop: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value name: name tty: true - readinessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -115606,6 +118563,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -115859,6 +118817,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -116113,6 +119072,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -116366,6 +119326,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -116957,10 +119918,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -117062,10 +120024,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -117262,6 +120225,112 @@ components: description: UID of the referent. type: string type: object + v1.SelfSubjectReview: + description: 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. + example: + metadata: + generation: 6 + finalizers: + - finalizers + - finalizers + resourceVersion: resourceVersion + annotations: + key: annotations + generateName: generateName + deletionTimestamp: 2000-01-23T04:56:07.000+00:00 + labels: + key: labels + ownerReferences: + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + - uid: uid + controller: true + apiVersion: apiVersion + kind: kind + name: name + blockOwnerDeletion: true + selfLink: selfLink + deletionGracePeriodSeconds: 0 + uid: uid + managedFields: + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + - apiVersion: apiVersion + fieldsV1: '{}' + manager: manager + subresource: subresource + time: 2000-01-23T04:56:07.000+00:00 + operation: operation + fieldsType: fieldsType + creationTimestamp: 2000-01-23T04:56:07.000+00:00 + name: name + namespace: namespace + apiVersion: apiVersion + kind: kind + status: + userInfo: + uid: uid + extra: + key: + - extra + - extra + groups: + - groups + - groups + username: username + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + $ref: '#/components/schemas/v1.ObjectMeta' + status: + $ref: '#/components/schemas/v1.SelfSubjectReviewStatus' + type: object + x-kubernetes-group-version-kind: + - group: authentication.k8s.io + kind: SelfSubjectReview + version: v1 + x-implements: + - io.kubernetes.client.common.KubernetesObject + v1.SelfSubjectReviewStatus: + description: SelfSubjectReviewStatus is filled by the kube-apiserver and sent + back to a user. + example: + userInfo: + uid: uid + extra: + key: + - extra + - extra + groups: + - groups + - groups + username: username + properties: + userInfo: + $ref: '#/components/schemas/v1.UserInfo' + type: object authentication.v1.TokenRequest: description: TokenRequest requests a token for a given service account. example: @@ -122794,46 +125863,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -122889,6 +125920,152 @@ components: value: value - name: name value: value + ports: + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + volumeMounts: + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + lifecycle: + postStart: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + preStop: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + readinessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} env: - name: name value: value @@ -122926,6 +126103,78 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy + securityContext: + privileged: true + runAsUser: 1 + capabilities: + add: + - add + - add + drop: + - drop + - drop + seLinuxOptions: + role: role + level: level + type: type + user: user + seccompProfile: + localhostProfile: localhostProfile + type: type + windowsOptions: + gmsaCredentialSpec: gmsaCredentialSpec + runAsUserName: runAsUserName + hostProcess: true + gmsaCredentialSpecName: gmsaCredentialSpecName + procMount: procMount + allowPrivilegeEscalation: true + runAsGroup: 1 + runAsNonRoot: true + readOnlyRootFilesystem: true + startupProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value ports: - protocol: protocol hostIP: hostIP @@ -122937,9 +126186,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -122953,9 +126199,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -122993,8 +126236,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -123027,7 +126268,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -123043,11 +126283,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -123077,9 +126312,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -123088,61 +126321,6 @@ components: - name: name requests: {} limits: {} - securityContext: - privileged: true - runAsUser: 1 - capabilities: - add: - - add - - add - drop: - - drop - - drop - seLinuxOptions: - role: role - level: level - type: type - user: user - seccompProfile: - localhostProfile: localhostProfile - type: type - windowsOptions: - gmsaCredentialSpec: gmsaCredentialSpec - runAsUserName: runAsUserName - hostProcess: true - gmsaCredentialSpecName: gmsaCredentialSpecName - procMount: procMount - allowPrivilegeEscalation: true - runAsGroup: 1 - runAsNonRoot: true - readOnlyRootFilesystem: true - startupProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value env: - name: name value: value @@ -123180,123 +126358,16 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath - ports: - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 + restartPolicy: restartPolicy command: - command - command - volumeMounts: - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr args: - args - args - lifecycle: - postStart: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - preStop: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value name: name tty: true - readinessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -123460,6 +126531,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -123713,6 +126785,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -123967,6 +127040,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -124220,6 +127294,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -124695,32 +127770,18 @@ components: weight: 1 hostPID: true backoffLimit: 1 + backoffLimitPerIndex: 5 manualSelector: true - parallelism: 5 + parallelism: 7 completions: 5 completionMode: completionMode - selector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - activeDeadlineSeconds: 6 podFailurePolicy: rules: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -124731,8 +127792,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -124740,12 +127801,29 @@ components: status: status - type: type status: status - ttlSecondsAfterFinished: 7 - startingDeadlineSeconds: 9 + ttlSecondsAfterFinished: 3 + podReplacementPolicy: podReplacementPolicy + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + maxFailedIndexes: 2 + activeDeadlineSeconds: 6 + startingDeadlineSeconds: 2 concurrencyPolicy: concurrencyPolicy timeZone: timeZone failedJobsHistoryLimit: 0 - successfulJobsHistoryLimit: 3 + successfulJobsHistoryLimit: 4 status: lastScheduleTime: 2000-01-23T04:56:07.000+00:00 active: @@ -125831,46 +128909,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -125926,43 +128966,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -125974,9 +128977,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -125990,9 +128990,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -126030,8 +129027,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -126064,7 +129059,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -126080,11 +129074,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -126114,9 +129103,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -126125,6 +129112,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -126180,43 +129221,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -126228,9 +129232,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -126244,9 +129245,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -126284,8 +129282,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -126313,27 +129309,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -126497,6 +129577,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -126750,6 +129831,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -127004,6 +130086,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -127257,6 +130340,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -127732,32 +130816,18 @@ components: weight: 1 hostPID: true backoffLimit: 1 + backoffLimitPerIndex: 5 manualSelector: true - parallelism: 5 + parallelism: 7 completions: 5 completionMode: completionMode - selector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - activeDeadlineSeconds: 6 podFailurePolicy: rules: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -127768,8 +130838,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -127777,12 +130847,29 @@ components: status: status - type: type status: status - ttlSecondsAfterFinished: 7 - startingDeadlineSeconds: 9 + ttlSecondsAfterFinished: 3 + podReplacementPolicy: podReplacementPolicy + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + maxFailedIndexes: 2 + activeDeadlineSeconds: 6 + startingDeadlineSeconds: 2 concurrencyPolicy: concurrencyPolicy timeZone: timeZone failedJobsHistoryLimit: 0 - successfulJobsHistoryLimit: 3 + successfulJobsHistoryLimit: 4 status: lastScheduleTime: 2000-01-23T04:56:07.000+00:00 active: @@ -128833,46 +131920,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -128928,6 +131977,152 @@ components: value: value - name: name value: value + ports: + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + volumeMounts: + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + lifecycle: + postStart: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + preStop: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + readinessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} env: - name: name value: value @@ -128965,6 +132160,78 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy + securityContext: + privileged: true + runAsUser: 1 + capabilities: + add: + - add + - add + drop: + - drop + - drop + seLinuxOptions: + role: role + level: level + type: type + user: user + seccompProfile: + localhostProfile: localhostProfile + type: type + windowsOptions: + gmsaCredentialSpec: gmsaCredentialSpec + runAsUserName: runAsUserName + hostProcess: true + gmsaCredentialSpecName: gmsaCredentialSpecName + procMount: procMount + allowPrivilegeEscalation: true + runAsGroup: 1 + runAsNonRoot: true + readOnlyRootFilesystem: true + startupProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value ports: - protocol: protocol hostIP: hostIP @@ -128976,9 +132243,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -128992,9 +132256,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -129032,8 +132293,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -129066,7 +132325,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -129082,11 +132340,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -129116,9 +132369,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -129127,61 +132378,6 @@ components: - name: name requests: {} limits: {} - securityContext: - privileged: true - runAsUser: 1 - capabilities: - add: - - add - - add - drop: - - drop - - drop - seLinuxOptions: - role: role - level: level - type: type - user: user - seccompProfile: - localhostProfile: localhostProfile - type: type - windowsOptions: - gmsaCredentialSpec: gmsaCredentialSpec - runAsUserName: runAsUserName - hostProcess: true - gmsaCredentialSpecName: gmsaCredentialSpecName - procMount: procMount - allowPrivilegeEscalation: true - runAsGroup: 1 - runAsNonRoot: true - readOnlyRootFilesystem: true - startupProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value env: - name: name value: value @@ -129219,123 +132415,16 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath - ports: - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 + restartPolicy: restartPolicy command: - command - command - volumeMounts: - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr args: - args - args - lifecycle: - postStart: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - preStop: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value name: name tty: true - readinessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -129499,6 +132588,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -129752,6 +132842,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -130006,6 +133097,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -130259,6 +133351,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -130734,32 +133827,18 @@ components: weight: 1 hostPID: true backoffLimit: 1 + backoffLimitPerIndex: 5 manualSelector: true - parallelism: 5 + parallelism: 7 completions: 5 completionMode: completionMode - selector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - activeDeadlineSeconds: 6 podFailurePolicy: rules: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -130770,8 +133849,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -130779,12 +133858,29 @@ components: status: status - type: type status: status - ttlSecondsAfterFinished: 7 - startingDeadlineSeconds: 9 + ttlSecondsAfterFinished: 3 + podReplacementPolicy: podReplacementPolicy + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + maxFailedIndexes: 2 + activeDeadlineSeconds: 6 + startingDeadlineSeconds: 2 concurrencyPolicy: concurrencyPolicy timeZone: timeZone failedJobsHistoryLimit: 0 - successfulJobsHistoryLimit: 3 + successfulJobsHistoryLimit: 4 status: lastScheduleTime: 2000-01-23T04:56:07.000+00:00 active: @@ -131817,46 +134913,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -131912,43 +134970,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -131960,9 +134981,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -131976,9 +134994,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -132016,8 +135031,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -132050,7 +135063,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -132066,11 +135078,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -132100,9 +135107,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -132111,6 +135116,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -132166,43 +135225,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -132214,9 +135236,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -132230,9 +135249,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -132270,8 +135286,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -132299,27 +135313,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -132483,6 +135581,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -132736,6 +135835,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -132990,6 +136090,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -133243,6 +136344,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -133718,32 +136820,18 @@ components: weight: 1 hostPID: true backoffLimit: 1 + backoffLimitPerIndex: 5 manualSelector: true - parallelism: 5 + parallelism: 7 completions: 5 completionMode: completionMode - selector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - activeDeadlineSeconds: 6 podFailurePolicy: rules: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -133754,8 +136842,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -133763,12 +136851,29 @@ components: status: status - type: type status: status - ttlSecondsAfterFinished: 7 - startingDeadlineSeconds: 9 + ttlSecondsAfterFinished: 3 + podReplacementPolicy: podReplacementPolicy + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + maxFailedIndexes: 2 + activeDeadlineSeconds: 6 + startingDeadlineSeconds: 2 concurrencyPolicy: concurrencyPolicy timeZone: timeZone failedJobsHistoryLimit: 0 - successfulJobsHistoryLimit: 3 + successfulJobsHistoryLimit: 4 properties: concurrencyPolicy: description: |- @@ -134839,46 +137944,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -134934,6 +138001,152 @@ components: value: value - name: name value: value + ports: + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + volumeMounts: + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + lifecycle: + postStart: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + preStop: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + readinessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} env: - name: name value: value @@ -134971,6 +138184,78 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy + securityContext: + privileged: true + runAsUser: 1 + capabilities: + add: + - add + - add + drop: + - drop + - drop + seLinuxOptions: + role: role + level: level + type: type + user: user + seccompProfile: + localhostProfile: localhostProfile + type: type + windowsOptions: + gmsaCredentialSpec: gmsaCredentialSpec + runAsUserName: runAsUserName + hostProcess: true + gmsaCredentialSpecName: gmsaCredentialSpecName + procMount: procMount + allowPrivilegeEscalation: true + runAsGroup: 1 + runAsNonRoot: true + readOnlyRootFilesystem: true + startupProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value ports: - protocol: protocol hostIP: hostIP @@ -134982,9 +138267,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -134998,9 +138280,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -135038,8 +138317,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -135072,7 +138349,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -135088,11 +138364,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -135122,9 +138393,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -135133,61 +138402,6 @@ components: - name: name requests: {} limits: {} - securityContext: - privileged: true - runAsUser: 1 - capabilities: - add: - - add - - add - drop: - - drop - - drop - seLinuxOptions: - role: role - level: level - type: type - user: user - seccompProfile: - localhostProfile: localhostProfile - type: type - windowsOptions: - gmsaCredentialSpec: gmsaCredentialSpec - runAsUserName: runAsUserName - hostProcess: true - gmsaCredentialSpecName: gmsaCredentialSpecName - procMount: procMount - allowPrivilegeEscalation: true - runAsGroup: 1 - runAsNonRoot: true - readOnlyRootFilesystem: true - startupProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value env: - name: name value: value @@ -135225,123 +138439,16 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath - ports: - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 + restartPolicy: restartPolicy command: - command - command - volumeMounts: - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr args: - args - args - lifecycle: - postStart: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - preStop: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value name: name tty: true - readinessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -135505,6 +138612,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -135758,6 +138866,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -136012,6 +139121,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -136265,6 +139375,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -136740,32 +139851,18 @@ components: weight: 1 hostPID: true backoffLimit: 1 + backoffLimitPerIndex: 5 manualSelector: true - parallelism: 5 + parallelism: 7 completions: 5 completionMode: completionMode - selector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - activeDeadlineSeconds: 6 podFailurePolicy: rules: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -136776,8 +139873,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -136785,13 +139882,31 @@ components: status: status - type: type status: status - ttlSecondsAfterFinished: 7 + ttlSecondsAfterFinished: 3 + podReplacementPolicy: podReplacementPolicy + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + maxFailedIndexes: 2 + activeDeadlineSeconds: 6 status: completionTime: 2000-01-23T04:56:07.000+00:00 completedIndexes: completedIndexes ready: 1 active: 0 startTime: 2000-01-23T04:56:07.000+00:00 + terminating: 5 uncountedTerminatedPods: failed: - failed @@ -136813,6 +139928,7 @@ components: type: type lastProbeTime: 2000-01-23T04:56:07.000+00:00 status: status + failedIndexes: failedIndexes succeeded: 5 properties: apiVersion: @@ -137865,46 +140981,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -137960,43 +141038,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -138008,9 +141049,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -138024,9 +141062,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -138064,8 +141099,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -138098,7 +141131,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -138114,11 +141146,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -138148,9 +141175,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -138159,6 +141184,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -138214,43 +141293,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -138262,9 +141304,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -138278,9 +141317,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -138318,8 +141354,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -138347,27 +141381,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -138531,6 +141649,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -138784,6 +141903,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -139038,6 +142158,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -139291,6 +142412,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -139766,32 +142888,18 @@ components: weight: 1 hostPID: true backoffLimit: 1 + backoffLimitPerIndex: 5 manualSelector: true - parallelism: 5 + parallelism: 7 completions: 5 completionMode: completionMode - selector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - activeDeadlineSeconds: 6 podFailurePolicy: rules: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -139802,8 +142910,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -139811,13 +142919,31 @@ components: status: status - type: type status: status - ttlSecondsAfterFinished: 7 + ttlSecondsAfterFinished: 3 + podReplacementPolicy: podReplacementPolicy + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + maxFailedIndexes: 2 + activeDeadlineSeconds: 6 status: completionTime: 2000-01-23T04:56:07.000+00:00 completedIndexes: completedIndexes ready: 1 active: 0 startTime: 2000-01-23T04:56:07.000+00:00 + terminating: 5 uncountedTerminatedPods: failed: - failed @@ -139839,6 +142965,7 @@ components: type: type lastProbeTime: 2000-01-23T04:56:07.000+00:00 status: status + failedIndexes: failedIndexes succeeded: 5 - metadata: generation: 6 @@ -140822,46 +143949,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -140917,6 +144006,152 @@ components: value: value - name: name value: value + ports: + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + volumeMounts: + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + lifecycle: + postStart: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + preStop: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + readinessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} env: - name: name value: value @@ -140954,6 +144189,78 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy + securityContext: + privileged: true + runAsUser: 1 + capabilities: + add: + - add + - add + drop: + - drop + - drop + seLinuxOptions: + role: role + level: level + type: type + user: user + seccompProfile: + localhostProfile: localhostProfile + type: type + windowsOptions: + gmsaCredentialSpec: gmsaCredentialSpec + runAsUserName: runAsUserName + hostProcess: true + gmsaCredentialSpecName: gmsaCredentialSpecName + procMount: procMount + allowPrivilegeEscalation: true + runAsGroup: 1 + runAsNonRoot: true + readOnlyRootFilesystem: true + startupProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value ports: - protocol: protocol hostIP: hostIP @@ -140965,9 +144272,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -140981,9 +144285,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -141021,8 +144322,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -141055,7 +144354,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -141071,11 +144369,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -141105,9 +144398,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -141116,61 +144407,6 @@ components: - name: name requests: {} limits: {} - securityContext: - privileged: true - runAsUser: 1 - capabilities: - add: - - add - - add - drop: - - drop - - drop - seLinuxOptions: - role: role - level: level - type: type - user: user - seccompProfile: - localhostProfile: localhostProfile - type: type - windowsOptions: - gmsaCredentialSpec: gmsaCredentialSpec - runAsUserName: runAsUserName - hostProcess: true - gmsaCredentialSpecName: gmsaCredentialSpecName - procMount: procMount - allowPrivilegeEscalation: true - runAsGroup: 1 - runAsNonRoot: true - readOnlyRootFilesystem: true - startupProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value env: - name: name value: value @@ -141208,123 +144444,16 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath - ports: - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 + restartPolicy: restartPolicy command: - command - command - volumeMounts: - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr args: - args - args - lifecycle: - postStart: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - preStop: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value name: name tty: true - readinessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -141488,6 +144617,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -141741,6 +144871,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -141995,6 +145126,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -142248,6 +145380,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -142723,32 +145856,18 @@ components: weight: 1 hostPID: true backoffLimit: 1 + backoffLimitPerIndex: 5 manualSelector: true - parallelism: 5 + parallelism: 7 completions: 5 completionMode: completionMode - selector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - activeDeadlineSeconds: 6 podFailurePolicy: rules: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -142759,8 +145878,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -142768,13 +145887,31 @@ components: status: status - type: type status: status - ttlSecondsAfterFinished: 7 + ttlSecondsAfterFinished: 3 + podReplacementPolicy: podReplacementPolicy + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + maxFailedIndexes: 2 + activeDeadlineSeconds: 6 status: completionTime: 2000-01-23T04:56:07.000+00:00 completedIndexes: completedIndexes ready: 1 active: 0 startTime: 2000-01-23T04:56:07.000+00:00 + terminating: 5 uncountedTerminatedPods: failed: - failed @@ -142796,6 +145933,7 @@ components: type: type lastProbeTime: 2000-01-23T04:56:07.000+00:00 status: status + failedIndexes: failedIndexes succeeded: 5 properties: apiVersion: @@ -143760,46 +146898,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -143855,43 +146955,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -143903,9 +146966,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -143919,9 +146979,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -143959,8 +147016,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -143993,7 +147048,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -144009,11 +147063,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -144043,9 +147092,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -144054,6 +147101,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -144109,43 +147210,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -144157,9 +147221,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -144173,9 +147234,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -144213,8 +147271,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -144242,27 +147298,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -144426,6 +147566,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -144679,6 +147820,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -144933,6 +148075,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -145186,6 +148329,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -145661,32 +148805,18 @@ components: weight: 1 hostPID: true backoffLimit: 1 + backoffLimitPerIndex: 5 manualSelector: true - parallelism: 5 + parallelism: 7 completions: 5 completionMode: completionMode - selector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - activeDeadlineSeconds: 6 podFailurePolicy: rules: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -145697,8 +148827,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -145706,7 +148836,24 @@ components: status: status - type: type status: status - ttlSecondsAfterFinished: 7 + ttlSecondsAfterFinished: 3 + podReplacementPolicy: podReplacementPolicy + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + maxFailedIndexes: 2 + activeDeadlineSeconds: 6 properties: activeDeadlineSeconds: description: Specifies the duration in seconds relative to the startTime @@ -145721,6 +148868,16 @@ components: Defaults to 6 format: int32 type: integer + backoffLimitPerIndex: + description: Specifies the limit for the number of retries within an index + before marking this index as failed. When enabled the number of failures + per index is kept in the pod's batch.kubernetes.io/job-index-failure-count + annotation. It can only be set when Job's completionMode=Indexed, and + the Pod's restart policy is Never. The field is immutable. This field + is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature + gate is enabled (disabled by default). + format: int32 + type: integer completionMode: description: |- completionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. @@ -145750,6 +148907,19 @@ components: You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector' type: boolean + maxFailedIndexes: + description: Specifies the maximal number of failed indexes before marking + the Job as failed, when backoffLimitPerIndex is set. Once the number of + failed indexes exceeds this number the entire Job is marked as Failed + and its execution is terminated. When left as null the job continues execution + of all of its indexes and is marked with the `Complete` Job condition. + It can only be specified when backoffLimitPerIndex is set. It can be null + or up to completions. It is required and must be less than or equal to + 10^4 when is completions greater than 10^5. This field is alpha-level. + It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled + (disabled by default). + format: int32 + type: integer parallelism: description: 'Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state @@ -145760,6 +148930,15 @@ components: type: integer podFailurePolicy: $ref: '#/components/schemas/v1.PodFailurePolicy' + podReplacementPolicy: + description: |- + podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods + when they are terminating (has a metadata.deletionTimestamp) or failed. + - Failed means to wait until a previously created Pod is fully terminated (has phase + Failed or Succeeded) before creating a replacement Pod. + + When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an alpha field. Enable JobPodReplacementPolicy to be able to use this field. + type: string selector: $ref: '#/components/schemas/v1.LabelSelector' suspend: @@ -145795,6 +148974,7 @@ components: ready: 1 active: 0 startTime: 2000-01-23T04:56:07.000+00:00 + terminating: 5 uncountedTerminatedPods: failed: - failed @@ -145816,6 +148996,7 @@ components: type: type lastProbeTime: 2000-01-23T04:56:07.000+00:00 status: status + failedIndexes: failedIndexes succeeded: 5 properties: active: @@ -145854,6 +149035,17 @@ components: description: The number of pods which reached phase Failed. format: int32 type: integer + failedIndexes: + description: FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. + The indexes are represented in the text format analogous as for the `completedIndexes` + field, ie. they are kept as decimal integers separated by commas. The + numbers are listed in increasing order. Three or more consecutive numbers + are compressed and represented by the first and last element of the series, + separated by a hyphen. For example, if the failed indexes are 1, 3, 4, + 5 and 7, they are represented as "1,3-5,7". This field is alpha-level. + It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled + (disabled by default). + type: string ready: description: |- The number of pods which have a Ready condition. @@ -145873,6 +149065,13 @@ components: description: The number of pods which reached phase Succeeded. format: int32 type: integer + terminating: + description: |- + The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp). + + This field is alpha-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (disabled by default). + format: int32 + type: integer uncountedTerminatedPods: $ref: '#/components/schemas/v1.UncountedTerminatedPods' type: object @@ -146860,46 +150059,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -146955,43 +150116,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -147003,9 +150127,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -147019,9 +150140,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -147059,8 +150177,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -147093,7 +150209,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -147109,11 +150224,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -147143,9 +150253,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -147154,6 +150262,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -147209,43 +150371,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -147257,9 +150382,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -147273,9 +150395,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -147313,8 +150432,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -147347,7 +150464,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -147363,6 +150479,91 @@ components: secretRef: name: name optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -147526,6 +150727,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -147779,6 +150981,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -148033,6 +151236,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -148286,6 +151490,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -148761,32 +151966,18 @@ components: weight: 1 hostPID: true backoffLimit: 1 + backoffLimitPerIndex: 5 manualSelector: true - parallelism: 5 + parallelism: 7 completions: 5 completionMode: completionMode - selector: - matchExpressions: - - values: - - values - - values - key: key - operator: operator - - values: - - values - - values - key: key - operator: operator - matchLabels: - key: matchLabels - activeDeadlineSeconds: 6 podFailurePolicy: rules: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -148797,8 +151988,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -148806,7 +151997,24 @@ components: status: status - type: type status: status - ttlSecondsAfterFinished: 7 + ttlSecondsAfterFinished: 3 + podReplacementPolicy: podReplacementPolicy + selector: + matchExpressions: + - values: + - values + - values + key: key + operator: operator + - values: + - values + - values + key: key + operator: operator + matchLabels: + key: matchLabels + maxFailedIndexes: 2 + activeDeadlineSeconds: 6 properties: metadata: $ref: '#/components/schemas/v1.ObjectMeta' @@ -148820,8 +152028,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -148832,8 +152040,8 @@ components: - onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -148865,8 +152073,8 @@ components: example: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator properties: containerName: @@ -148930,8 +152138,8 @@ components: onExitCodes: containerName: containerName values: - - 2 - - 2 + - 9 + - 9 operator: operator action: action onPodConditions: @@ -148946,6 +152154,10 @@ components: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. + - FailIndex: indicates that the pod's index is marked as Failed and will + not be restarted. + This value is alpha-level. It can be used when the + `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). - Ignore: indicates that the counter towards the .backoffLimit is not incremented and a replacement pod is created. - Count: indicates that the pod is handled in the default way - the @@ -148965,7 +152177,6 @@ components: x-kubernetes-list-type: atomic required: - action - - onPodConditions type: object v1.UncountedTerminatedPods: description: UncountedTerminatedPods holds UIDs of Pods that have terminated @@ -150922,9 +154133,7 @@ components: description: |- ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. - The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be -, where is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long). - - An existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed. + The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. type: string @@ -151760,6 +154969,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -151954,6 +155164,23 @@ components: x-kubernetes-list-type: atomic resources: $ref: '#/components/schemas/v1.ResourceRequirements' + restartPolicy: + description: 'RestartPolicy defines the restart behavior of individual containers + in a pod. This field may only be set for init containers, and the only + allowed value is "Always". For non-init containers or when this field + is not specified, the restart behavior is defined by the Pod''s restart + policy and the container type. Setting the RestartPolicy as "Always" for + the init container will have the following effect: this init container + will be continually restarted on exit until all regular containers have + terminated. Once all regular containers have completed, all init containers + with restartPolicy "Always" will be shut down. This lifecycle differs + from normal init containers and is often referred to as a "sidecar" container. + Although this init container still starts in the init container sequence, + it does not wait for the container to complete before proceeding to the + next init container. Instead, the next init container starts immediately + after this init container is started, or after any startupProbe has successfully + completed.' + type: string securityContext: $ref: '#/components/schemas/v1.SecurityContext' startupProbe: @@ -152509,6 +155736,8 @@ components: * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 + * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. type: string @@ -153267,46 +156496,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -153362,43 +156553,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -153410,9 +156564,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -153426,9 +156577,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -153466,8 +156614,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -153495,27 +156641,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true properties: args: description: 'Arguments to the entrypoint. The image''s CMD is used if this @@ -153597,6 +156827,11 @@ components: x-kubernetes-list-type: atomic resources: $ref: '#/components/schemas/v1.ResourceRequirements' + restartPolicy: + description: Restart policy for the container to manage the restart behavior + of each container within a pod. This may only be set for init containers. + You cannot set this field on ephemeral containers. + type: string securityContext: $ref: '#/components/schemas/v1.SecurityContext' startupProbe: @@ -154496,6 +157731,15 @@ components: description: IP address of the host file entry. type: string type: object + v1.HostIP: + description: HostIP represents a single IP address allocated to the host. + example: + ip: ip + properties: + ip: + description: IP is the IP address assigned to the host + type: string + type: object v1.HostPathVolumeSource: description: Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling. @@ -157032,6 +160276,7 @@ components: status: phase: phase reason: reason + lastPhaseTransitionTime: 2000-01-23T04:56:07.000+00:00 message: message properties: apiVersion: @@ -157148,10 +160393,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -157325,10 +160571,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -157430,10 +160677,11 @@ components: status: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -157548,10 +160796,11 @@ components: example: phase: phase allocatedResources: {} + allocatedResourceStatuses: + key: allocatedResourceStatuses accessModes: - accessModes - accessModes - resizeStatus: resizeStatus conditions: - reason: reason lastTransitionTime: 2000-01-23T04:56:07.000+00:00 @@ -157573,19 +160822,64 @@ components: items: type: string type: array + allocatedResourceStatuses: + additionalProperties: + type: string + description: "allocatedResourceStatuses stores status of resource being\ + \ resized for the given PVC. Key names follow standard Kubernetes label\ + \ syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage\ + \ - the capacity of the volume.\n\t* Custom resources must use implementation-defined\ + \ prefixed names such as \"example.com/my-custom-resource\"\nApart from\ + \ above values - keys that are unprefixed or have kubernetes.io prefix\ + \ are considered reserved and hence may not be used.\n\nClaimResourceStatus\ + \ can be in any of following states:\n\t- ControllerResizeInProgress:\n\ + \t\tState set when resize controller starts resizing the volume in control-plane.\n\ + \t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize\ + \ controller with a terminal error.\n\t- NodeResizePending:\n\t\tState\ + \ set when resize controller has finished resizing the volume but further\ + \ resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\ + \t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\ + \t\tState set when resizing has failed in kubelet with a terminal error.\ + \ Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding\ + \ a PVC for more capacity - this field can be one of the following states:\n\ + \t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\ + \n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\ + \n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\ + \n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\ + \n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\ + \nWhen this field is not set, it means that no resize operation is in\ + \ progress for the given PVC.\n\nA controller that receives PVC update\ + \ with previously unknown resourceName or ClaimResourceStatus should ignore\ + \ the update for the purpose it was designed. For example - a controller\ + \ that only is responsible for resizing capacity of the volume, should\ + \ ignore PVC updates that change other valid resources associated with\ + \ PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure\ + \ feature." + type: object + x-kubernetes-map-type: granular allocatedResources: additionalProperties: $ref: '#/components/schemas/resource.Quantity' - description: allocatedResources is the storage resource within AllocatedResources - tracks the capacity allocated to a PVC. It may be larger than the actual - capacity when a volume expansion operation is requested. For storage quota, - the larger value from allocatedResources and PVC.spec.resources is used. - If allocatedResources is not set, PVC.spec.resources alone is used for - quota calculation. If a volume expansion capacity request is lowered, - allocatedResources is only lowered if there are no expansion operations - in progress and if the actual volume capacity is equal or lower than the - requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature. + description: "allocatedResources tracks the resources allocated to a PVC\ + \ including its capacity. Key names follow standard Kubernetes label syntax.\ + \ Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the\ + \ capacity of the volume.\n\t* Custom resources must use implementation-defined\ + \ prefixed names such as \"example.com/my-custom-resource\"\nApart from\ + \ above values - keys that are unprefixed or have kubernetes.io prefix\ + \ are considered reserved and hence may not be used.\n\nCapacity reported\ + \ here may be larger than the actual capacity when a volume expansion\ + \ operation is requested. For storage quota, the larger value from allocatedResources\ + \ and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources\ + \ alone is used for quota calculation. If a volume expansion capacity\ + \ request is lowered, allocatedResources is only lowered if there are\ + \ no expansion operations in progress and if the actual volume capacity\ + \ is equal or lower than the requested capacity.\n\nA controller that\ + \ receives PVC update with previously unknown resourceName should ignore\ + \ the update for the purpose it was designed. For example - a controller\ + \ that only is responsible for resizing capacity of the volume, should\ + \ ignore PVC updates that change other valid resources associated with\ + \ PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure\ + \ feature." type: object capacity: additionalProperties: @@ -157605,12 +160899,6 @@ components: phase: description: phase represents the current phase of PersistentVolumeClaim. type: string - resizeStatus: - description: resizeStatus stores status of resize operation. ResizeStatus - is not set by default but when expansion is complete resizeStatus is set - to empty string by resize controller or kubelet. This is an alpha field - and requires enabling RecoverVolumeExpansionFailure feature. - type: string type: object v1.PersistentVolumeClaimTemplate: description: PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim @@ -158027,6 +161315,7 @@ components: status: phase: phase reason: reason + lastPhaseTransitionTime: 2000-01-23T04:56:07.000+00:00 message: message - metadata: generation: 6 @@ -158318,6 +161607,7 @@ components: status: phase: phase reason: reason + lastPhaseTransitionTime: 2000-01-23T04:56:07.000+00:00 message: message properties: apiVersion: @@ -158678,8 +161968,16 @@ components: example: phase: phase reason: reason + lastPhaseTransitionTime: 2000-01-23T04:56:07.000+00:00 message: message properties: + lastPhaseTransitionTime: + description: lastPhaseTransitionTime is the time the phase transitioned + from one to another and automatically resets to current time everytime + a volume phase transitions. This is an alpha field and requires enabling + PersistentVolumeLastPhaseTransitionTime feature. + format: date-time + type: string message: description: message is a human-readable message indicating details about why the volume is in this state. @@ -159648,46 +162946,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -159743,43 +163003,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -159791,9 +163014,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -159807,9 +163027,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -159847,8 +163064,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -159881,7 +163096,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -159897,11 +163111,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -159931,9 +163140,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -159942,6 +163149,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -159997,43 +163258,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -160045,9 +163269,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -160061,9 +163282,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -160101,8 +163319,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -160130,27 +163346,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -160314,6 +163614,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -160567,6 +163868,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -160821,6 +164123,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -161074,6 +164377,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -161550,6 +164854,11 @@ components: hostPID: true status: phase: phase + resourceClaimStatuses: + - resourceClaimName: resourceClaimName + name: name + - resourceClaimName: resourceClaimName + name: name reason: reason containerStatuses: - allocatedResources: {} @@ -161728,6 +165037,9 @@ components: message: message signal: 3 finishedAt: 2000-01-23T04:56:07.000+00:00 + hostIPs: + - ip: ip + - ip: ip resize: resize startTime: 2000-01-23T04:56:07.000+00:00 qosClass: qosClass @@ -162332,14 +165644,12 @@ components: type: string type: object v1.PodIP: - description: "IP address information for entries in the (plural) PodIPs field.\ - \ Each entry includes:\n\n\tIP: An IP address allocated to the pod. Routable\ - \ at least within the cluster." + description: PodIP represents a single IP address allocated to the pod. example: ip: ip properties: ip: - description: ip is an IP address (IPv4 or IPv6) assigned to the pod + description: IP is the IP address assigned to the pod type: string type: object v1.PodList: @@ -163286,46 +166596,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -163381,43 +166653,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -163429,9 +166664,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -163445,9 +166677,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -163485,8 +166714,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -163519,7 +166746,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -163535,11 +166761,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -163569,9 +166790,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -163580,6 +166799,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -163635,43 +166908,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -163683,9 +166919,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -163699,9 +166932,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -163739,8 +166969,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -163768,27 +166996,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -163952,6 +167264,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -164205,6 +167518,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -164459,6 +167773,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -164712,6 +168027,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -165188,6 +168504,11 @@ components: hostPID: true status: phase: phase + resourceClaimStatuses: + - resourceClaimName: resourceClaimName + name: name + - resourceClaimName: resourceClaimName + name: name reason: reason containerStatuses: - allocatedResources: {} @@ -165366,6 +168687,9 @@ components: message: message signal: 3 finishedAt: 2000-01-23T04:56:07.000+00:00 + hostIPs: + - ip: ip + - ip: ip resize: resize startTime: 2000-01-23T04:56:07.000+00:00 qosClass: qosClass @@ -166400,46 +169724,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -166495,43 +169781,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -166543,9 +169792,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -166559,9 +169805,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -166599,8 +169842,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -166633,7 +169874,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -166649,11 +169889,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -166683,9 +169918,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -166694,6 +169927,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -166749,43 +170036,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -166797,9 +170047,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -166813,9 +170060,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -166853,8 +170097,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -166882,27 +170124,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -167066,6 +170392,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -167319,6 +170646,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -167573,6 +170901,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -167826,6 +171155,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -168302,6 +171632,11 @@ components: hostPID: true status: phase: phase + resourceClaimStatuses: + - resourceClaimName: resourceClaimName + name: name + - resourceClaimName: resourceClaimName + name: name reason: reason containerStatuses: - allocatedResources: {} @@ -168480,6 +171815,9 @@ components: message: message signal: 3 finishedAt: 2000-01-23T04:56:07.000+00:00 + hostIPs: + - ip: ip + - ip: ip resize: resize startTime: 2000-01-23T04:56:07.000+00:00 qosClass: qosClass @@ -168655,6 +171993,28 @@ components: required: - name type: object + v1.PodResourceClaimStatus: + description: PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim + which references a ResourceClaimTemplate. It stores the generated name for + the corresponding ResourceClaim. + example: + resourceClaimName: resourceClaimName + name: name + properties: + name: + description: Name uniquely identifies this resource claim inside the pod. + This must match the name of an entry in pod.spec.resourceClaims, which + implies that the string must be a DNS_LABEL. + type: string + resourceClaimName: + description: ResourceClaimName is the name of the ResourceClaim that was + generated for the Pod in the namespace of the Pod. It this is unset, then + generating a ResourceClaim was not necessary. The pod.spec.resourceClaims + entry can be ignored in this case. + type: string + required: + - name + type: object v1.PodSchedulingGate: description: PodSchedulingGate is associated to a Pod to guard its scheduling. example: @@ -169655,46 +173015,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -169750,6 +173072,152 @@ components: value: value - name: name value: value + ports: + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + - protocol: protocol + hostIP: hostIP + name: name + containerPort: 4 + hostPort: 7 + volumeMounts: + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + - mountPath: mountPath + mountPropagation: mountPropagation + name: name + readOnly: true + subPath: subPath + subPathExpr: subPathExpr + lifecycle: + postStart: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + preStop: + tcpSocket: + port: port + host: host + exec: + command: + - command + - command + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + readinessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} env: - name: name value: value @@ -169787,6 +173255,78 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy + securityContext: + privileged: true + runAsUser: 1 + capabilities: + add: + - add + - add + drop: + - drop + - drop + seLinuxOptions: + role: role + level: level + type: type + user: user + seccompProfile: + localhostProfile: localhostProfile + type: type + windowsOptions: + gmsaCredentialSpec: gmsaCredentialSpec + runAsUserName: runAsUserName + hostProcess: true + gmsaCredentialSpecName: gmsaCredentialSpecName + procMount: procMount + allowPrivilegeEscalation: true + runAsGroup: 1 + runAsNonRoot: true + readOnlyRootFilesystem: true + startupProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value ports: - protocol: protocol hostIP: hostIP @@ -169798,9 +173338,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -169814,9 +173351,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -169854,8 +173388,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -169888,7 +173420,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -169904,11 +173435,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -169938,9 +173464,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -169949,61 +173473,6 @@ components: - name: name requests: {} limits: {} - securityContext: - privileged: true - runAsUser: 1 - capabilities: - add: - - add - - add - drop: - - drop - - drop - seLinuxOptions: - role: role - level: level - type: type - user: user - seccompProfile: - localhostProfile: localhostProfile - type: type - windowsOptions: - gmsaCredentialSpec: gmsaCredentialSpec - runAsUserName: runAsUserName - hostProcess: true - gmsaCredentialSpecName: gmsaCredentialSpecName - procMount: procMount - allowPrivilegeEscalation: true - runAsGroup: 1 - runAsNonRoot: true - readOnlyRootFilesystem: true - startupProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value env: - name: name value: value @@ -170041,123 +173510,16 @@ components: fieldRef: apiVersion: apiVersion fieldPath: fieldPath - ports: - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 - - protocol: protocol - hostIP: hostIP - name: name - containerPort: 4 - hostPort: 7 + restartPolicy: restartPolicy command: - command - command - volumeMounts: - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr - - mountPath: mountPath - mountPropagation: mountPropagation - name: name - readOnly: true - subPath: subPath - subPathExpr: subPathExpr args: - args - args - lifecycle: - postStart: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - preStop: - tcpSocket: - port: port - host: host - exec: - command: - - command - - command - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value name: name tty: true - readinessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -170321,6 +173683,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -170574,6 +173937,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -170828,6 +174192,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -171081,6 +174446,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -171844,6 +175210,11 @@ components: the pod cannot contact the control plane. example: phase: phase + resourceClaimStatuses: + - resourceClaimName: resourceClaimName + name: name + - resourceClaimName: resourceClaimName + name: name reason: reason containerStatuses: - allocatedResources: {} @@ -172022,6 +175393,9 @@ components: message: message signal: 3 finishedAt: 2000-01-23T04:56:07.000+00:00 + hostIPs: + - ip: ip + - ip: ip resize: resize startTime: 2000-01-23T04:56:07.000+00:00 qosClass: qosClass @@ -172143,9 +175517,23 @@ components: $ref: '#/components/schemas/v1.ContainerStatus' type: array hostIP: - description: IP address of the host to which the pod is assigned. Empty - if not yet scheduled. - type: string + description: hostIP holds the IP address of the host to which the pod is + assigned. Empty if the pod has not started yet. A pod can be assigned + to a node that has a problem in kubelet which in turns mean that HostIP + will not be updated even if there is a node is assigned to pod + type: string + hostIPs: + description: hostIPs holds the IP addresses allocated to the host. If this + field is specified, the first entry must match the hostIP field. This + list is empty if the pod has not started yet. A pod can be assigned to + a node that has a problem in kubelet which in turns means that HostIPs + will not be updated even if there is a node is assigned to this pod. + items: + $ref: '#/components/schemas/v1.HostIP' + type: array + x-kubernetes-patch-strategy: merge + x-kubernetes-list-type: atomic + x-kubernetes-patch-merge-key: ip initContainerStatuses: description: 'The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the @@ -172176,8 +175564,8 @@ components: More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase type: string podIP: - description: IP address allocated to the pod. Routable at least within the - cluster. Empty if not yet allocated. + description: podIP address allocated to the pod. Routable at least within + the cluster. Empty if not yet allocated. type: string podIPs: description: podIPs holds the IP addresses allocated to the pod. If this @@ -172203,6 +175591,16 @@ components: is empty if no resources resize is pending. Any changes to container resources will automatically set this to "Proposed" type: string + resourceClaimStatuses: + description: Status of resource claims. + items: + $ref: '#/components/schemas/v1.PodResourceClaimStatus' + type: array + x-kubernetes-patch-strategy: merge,retainKeys + x-kubernetes-list-type: map + x-kubernetes-list-map-keys: + - name + x-kubernetes-patch-merge-key: name startTime: description: RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) @@ -173146,46 +176544,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -173241,43 +176601,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -173289,9 +176612,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -173305,9 +176625,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -173345,8 +176662,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -173379,7 +176694,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -173395,11 +176709,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -173429,9 +176738,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -173440,6 +176747,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -173495,43 +176856,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -173543,9 +176867,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -173559,9 +176880,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -173599,8 +176917,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -173628,27 +176944,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -173812,6 +177212,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -174065,6 +177466,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -174319,6 +177721,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -174572,6 +177975,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -176059,46 +179463,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -176154,43 +179520,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -176202,9 +179531,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -176218,9 +179544,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -176258,8 +179581,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -176292,7 +179613,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -176308,11 +179628,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -176342,9 +179657,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -176353,6 +179666,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -176408,43 +179775,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -176456,9 +179786,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -176472,9 +179799,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -176512,8 +179836,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -176541,27 +179863,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -176725,6 +180131,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -176978,6 +180385,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -177232,6 +180640,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -177485,6 +180894,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -178939,46 +182349,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -179034,43 +182406,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -179082,9 +182417,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -179098,9 +182430,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -179138,8 +182467,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -179172,7 +182499,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -179188,11 +182514,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -179222,9 +182543,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -179233,6 +182552,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -179288,43 +182661,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -179336,9 +182672,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -179352,9 +182685,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -179392,8 +182722,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -179421,27 +182749,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -179605,6 +183017,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -179858,6 +183271,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -180112,6 +183526,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -180365,6 +183780,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -181849,46 +185265,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -181944,43 +185322,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -181992,9 +185333,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -182008,9 +185346,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -182048,8 +185383,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -182082,7 +185415,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -182098,11 +185430,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -182132,9 +185459,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -182143,6 +185468,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -182198,43 +185577,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -182246,9 +185588,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -182262,9 +185601,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -182302,8 +185638,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -182331,27 +185665,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -182515,6 +185933,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -182768,6 +186187,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -183022,6 +186442,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -183275,6 +186696,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -185160,46 +188582,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -185255,43 +188639,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -185303,9 +188650,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -185319,9 +188663,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -185359,8 +188700,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -185393,7 +188732,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -185409,11 +188747,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -185443,9 +188776,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -185454,6 +188785,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -185509,43 +188894,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -185557,9 +188905,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -185573,9 +188918,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -185613,8 +188955,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -185642,27 +188982,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -185826,6 +189250,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -186079,6 +189504,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -186333,6 +189759,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -186586,6 +190013,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -188128,46 +191556,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -188223,43 +191613,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -188271,9 +191624,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -188287,9 +191637,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -188327,8 +191674,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -188361,7 +191706,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -188377,11 +191721,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -188411,9 +191750,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -188422,6 +191759,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -188477,43 +191868,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -188525,9 +191879,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -188541,9 +191892,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -188581,8 +191929,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -188610,27 +191956,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -188794,6 +192224,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -189047,6 +192478,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -189301,6 +192733,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -189554,6 +192987,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -191030,46 +194464,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -191125,43 +194521,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -191173,9 +194532,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -191189,9 +194545,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -191229,8 +194582,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -191263,7 +194614,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -191279,11 +194629,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -191313,9 +194658,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -191324,6 +194667,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -191379,43 +194776,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -191427,9 +194787,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -191443,9 +194800,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -191483,8 +194837,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -191512,27 +194864,111 @@ components: value: value - name: name value: value - resizePolicy: - - resourceName: resourceName - restartPolicy: restartPolicy - - resourceName: resourceName - restartPolicy: restartPolicy + resizePolicy: + - resourceName: resourceName + restartPolicy: restartPolicy + - resourceName: resourceName + restartPolicy: restartPolicy + envFrom: + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + - configMapRef: + name: name + optional: true + prefix: prefix + secretRef: + name: name + optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true stdinOnce: true - envFrom: - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true - - configMapRef: - name: name - optional: true - prefix: prefix - secretRef: - name: name - optional: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -191696,6 +195132,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -191949,6 +195386,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -192203,6 +195641,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -192456,6 +195895,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -193914,46 +197354,8 @@ components: name: name - devicePath: devicePath name: name - image: image - imagePullPolicy: imagePullPolicy - livenessProbe: - terminationGracePeriodSeconds: 3 - failureThreshold: 5 - periodSeconds: 7 - tcpSocket: - port: port - host: host - timeoutSeconds: 2 - successThreshold: 9 - initialDelaySeconds: 2 - exec: - command: - - command - - command - grpc: - port: 5 - service: service - httpGet: - path: path - scheme: scheme - port: port - host: host - httpHeaders: - - name: name - value: value - - name: name - value: value stdin: true - targetContainerName: targetContainerName terminationMessagePolicy: terminationMessagePolicy - terminationMessagePath: terminationMessagePath - workingDir: workingDir - resources: - claims: - - name: name - - name: name - requests: {} - limits: {} securityContext: privileged: true runAsUser: 1 @@ -194009,43 +197411,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -194057,9 +197422,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -194073,9 +197435,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -194113,8 +197472,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -194147,7 +197504,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -194163,11 +197519,6 @@ components: secretRef: name: name optional: true - - volumeDevices: - - devicePath: devicePath - name: name - - devicePath: devicePath - name: name image: image imagePullPolicy: imagePullPolicy livenessProbe: @@ -194197,9 +197548,7 @@ components: value: value - name: name value: value - stdin: true targetContainerName: targetContainerName - terminationMessagePolicy: terminationMessagePolicy terminationMessagePath: terminationMessagePath workingDir: workingDir resources: @@ -194208,6 +197557,60 @@ components: - name: name requests: {} limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true + - volumeDevices: + - devicePath: devicePath + name: name + - devicePath: devicePath + name: name + stdin: true + terminationMessagePolicy: terminationMessagePolicy securityContext: privileged: true runAsUser: 1 @@ -194263,43 +197666,6 @@ components: value: value - name: name value: value - env: - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath - - name: name - value: value - valueFrom: - secretKeyRef: - name: name - optional: true - key: key - resourceFieldRef: - divisor: divisor - resource: resource - containerName: containerName - configMapKeyRef: - name: name - optional: true - key: key - fieldRef: - apiVersion: apiVersion - fieldPath: fieldPath ports: - protocol: protocol hostIP: hostIP @@ -194311,9 +197677,6 @@ components: name: name containerPort: 4 hostPort: 7 - command: - - command - - command volumeMounts: - mountPath: mountPath mountPropagation: mountPropagation @@ -194327,9 +197690,6 @@ components: readOnly: true subPath: subPath subPathExpr: subPathExpr - args: - - args - - args lifecycle: postStart: tcpSocket: @@ -194367,8 +197727,6 @@ components: value: value - name: name value: value - name: name - tty: true readinessProbe: terminationGracePeriodSeconds: 3 failureThreshold: 5 @@ -194401,7 +197759,6 @@ components: restartPolicy: restartPolicy - resourceName: resourceName restartPolicy: restartPolicy - stdinOnce: true envFrom: - configMapRef: name: name @@ -194417,6 +197774,91 @@ components: secretRef: name: name optional: true + image: image + imagePullPolicy: imagePullPolicy + livenessProbe: + terminationGracePeriodSeconds: 3 + failureThreshold: 5 + periodSeconds: 7 + tcpSocket: + port: port + host: host + timeoutSeconds: 2 + successThreshold: 9 + initialDelaySeconds: 2 + exec: + command: + - command + - command + grpc: + port: 5 + service: service + httpGet: + path: path + scheme: scheme + port: port + host: host + httpHeaders: + - name: name + value: value + - name: name + value: value + targetContainerName: targetContainerName + terminationMessagePath: terminationMessagePath + workingDir: workingDir + resources: + claims: + - name: name + - name: name + requests: {} + limits: {} + env: + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + - name: name + value: value + valueFrom: + secretKeyRef: + name: name + optional: true + key: key + resourceFieldRef: + divisor: divisor + resource: resource + containerName: containerName + configMapKeyRef: + name: name + optional: true + key: key + fieldRef: + apiVersion: apiVersion + fieldPath: fieldPath + restartPolicy: restartPolicy + command: + - command + - command + args: + - args + - args + name: name + tty: true + stdinOnce: true serviceAccount: serviceAccount priority: 1 restartPolicy: restartPolicy @@ -194580,6 +198022,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -194833,6 +198276,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -195087,6 +198531,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -195340,6 +198785,7 @@ components: name: name containerPort: 4 hostPort: 7 + restartPolicy: restartPolicy command: - command - command @@ -196531,7 +199977,8 @@ components: description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured - seccomp profile location. Must only be set if type is "Localhost". + seccomp profile location. Must be set if type is "Localhost". Must NOT + be set for any other type. type: string type: description: |- @@ -197799,10 +201246,17 @@ components: targetPort: targetPort properties: appProtocol: - description: The application protocol for this port. This field follows - standard Kubernetes label syntax. Un-prefixed names are reserved for IANA - standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). - Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + description: |- + The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: + + * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). + + * Kubernetes-defined prefixed names: + * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 + * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 + + * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. type: string name: description: The name of this port within the service. This must be a DNS_LABEL. @@ -198010,10 +201464,9 @@ components: on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified - and its meaning varies across implementations, and it cannot support dual-stack. - As of Kubernetes v1.24, users are encouraged to use implementation-specific - annotations when available. This field may be removed in a future API - version.' + and its meaning varies across implementations. Using it is non-portable + and it may not support dual-stack. Users are encouraged to use implementation-specific + annotations when available.' type: string loadBalancerSourceRanges: description: 'If specified and supported by the platform, this will restrict @@ -199224,13 +202677,10 @@ components: type: string hostProcess: description: HostProcess determines if a container should be run as a 'Host - Process' container. This field is alpha-level and will only be honored - by components that enable the WindowsHostProcessContainers feature flag. - Setting this field without the feature flag will result in errors when - validating the Pod. All of a Pod's containers must have the same effective + Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers - and non-HostProcess containers). In addition, if HostProcess is true - then HostNetwork must also be set to true. + and non-HostProcess containers). In addition, if HostProcess is true then + HostNetwork must also be set to true. type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container @@ -199371,6 +202821,8 @@ components: * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 + * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. type: string @@ -200207,6 +203659,32 @@ components: - count - lastObservedTime type: object + v1beta2.ExemptPriorityLevelConfiguration: + description: 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`. + example: + lendablePercent: 0 + nominalConcurrencyShares: 6 + properties: + lendablePercent: + description: |- + `lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + + LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + format: int32 + type: integer + nominalConcurrencyShares: + description: |- + `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: + + NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) + + Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero. + format: int32 + type: integer + type: object v1beta2.FlowDistinguisherMethod: description: FlowDistinguisherMethod specifies the method of a flow distinguisher. example: @@ -201051,9 +204529,9 @@ components: right now. example: queuing: - handSize: 5 - queues: 2 - queueLengthLimit: 5 + handSize: 2 + queues: 9 + queueLengthLimit: 7 type: type properties: queuing: @@ -201077,15 +204555,15 @@ components: - How are requests for this priority level limited? - What should be done with requests that exceed the limit? example: - lendablePercent: 1 - borrowingLimitPercent: 6 + lendablePercent: 5 + borrowingLimitPercent: 5 limitResponse: queuing: - handSize: 5 - queues: 2 - queueLengthLimit: 5 + handSize: 2 + queues: 9 + queueLengthLimit: 7 type: type - assuredConcurrencyShares: 0 + assuredConcurrencyShares: 1 properties: assuredConcurrencyShares: description: |- @@ -201300,15 +204778,18 @@ components: kind: kind spec: limited: - lendablePercent: 1 - borrowingLimitPercent: 6 + lendablePercent: 5 + borrowingLimitPercent: 5 limitResponse: queuing: - handSize: 5 - queues: 2 - queueLengthLimit: 5 + handSize: 2 + queues: 9 + queueLengthLimit: 7 type: type - assuredConcurrencyShares: 0 + assuredConcurrencyShares: 1 + exempt: + lendablePercent: 0 + nominalConcurrencyShares: 6 type: type status: conditions: @@ -201439,15 +204920,18 @@ components: kind: kind spec: limited: - lendablePercent: 1 - borrowingLimitPercent: 6 + lendablePercent: 5 + borrowingLimitPercent: 5 limitResponse: queuing: - handSize: 5 - queues: 2 - queueLengthLimit: 5 + handSize: 2 + queues: 9 + queueLengthLimit: 7 type: type - assuredConcurrencyShares: 0 + assuredConcurrencyShares: 1 + exempt: + lendablePercent: 0 + nominalConcurrencyShares: 6 type: type status: conditions: @@ -201511,15 +204995,18 @@ components: kind: kind spec: limited: - lendablePercent: 1 - borrowingLimitPercent: 6 + lendablePercent: 5 + borrowingLimitPercent: 5 limitResponse: queuing: - handSize: 5 - queues: 2 - queueLengthLimit: 5 + handSize: 2 + queues: 9 + queueLengthLimit: 7 type: type - assuredConcurrencyShares: 0 + assuredConcurrencyShares: 1 + exempt: + lendablePercent: 0 + nominalConcurrencyShares: 6 type: type status: conditions: @@ -201578,17 +205065,22 @@ components: priority level. example: limited: - lendablePercent: 1 - borrowingLimitPercent: 6 + lendablePercent: 5 + borrowingLimitPercent: 5 limitResponse: queuing: - handSize: 5 - queues: 2 - queueLengthLimit: 5 + handSize: 2 + queues: 9 + queueLengthLimit: 7 type: type - assuredConcurrencyShares: 0 + assuredConcurrencyShares: 1 + exempt: + lendablePercent: 0 + nominalConcurrencyShares: 6 type: type properties: + exempt: + $ref: '#/components/schemas/v1beta2.ExemptPriorityLevelConfiguration' limited: $ref: '#/components/schemas/v1beta2.LimitedPriorityLevelConfiguration' type: @@ -201606,6 +205098,7 @@ components: x-kubernetes-unions: - discriminator: type fields-to-discriminateBy: + exempt: Exempt limited: Limited v1beta2.PriorityLevelConfigurationStatus: description: PriorityLevelConfigurationStatus represents the current state of @@ -201635,9 +205128,9 @@ components: v1beta2.QueuingConfiguration: description: QueuingConfiguration holds the configuration parameters for queuing example: - handSize: 5 - queues: 2 - queueLengthLimit: 5 + handSize: 2 + queues: 9 + queueLengthLimit: 7 properties: handSize: description: '`handSize` is a small positive number that configures the @@ -201804,6 +205297,32 @@ components: required: - name type: object + v1beta3.ExemptPriorityLevelConfiguration: + description: 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`. + example: + lendablePercent: 0 + nominalConcurrencyShares: 6 + properties: + lendablePercent: + description: |- + `lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + + LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + format: int32 + type: integer + nominalConcurrencyShares: + description: |- + `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: + + NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) + + Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero. + format: int32 + type: integer + type: object v1beta3.FlowDistinguisherMethod: description: FlowDistinguisherMethod specifies the method of a flow distinguisher. example: @@ -202650,9 +206169,9 @@ components: right now. example: queuing: - handSize: 1 - queues: 5 - queueLengthLimit: 5 + handSize: 5 + queues: 7 + queueLengthLimit: 2 type: type properties: queuing: @@ -202676,15 +206195,15 @@ components: - How are requests for this priority level limited? - What should be done with requests that exceed the limit? example: - lendablePercent: 6 - borrowingLimitPercent: 0 + lendablePercent: 5 + borrowingLimitPercent: 1 limitResponse: queuing: - handSize: 1 - queues: 5 - queueLengthLimit: 5 + handSize: 5 + queues: 7 + queueLengthLimit: 2 type: type - nominalConcurrencyShares: 2 + nominalConcurrencyShares: 9 properties: borrowingLimitPercent: description: |- @@ -202708,9 +206227,9 @@ components: description: |- `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values: - NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[limited priority level k] NCS(k) + NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) - Bigger numbers mean a larger nominal concurrency limit, at the expense of every other Limited priority level. This field has a default value of 30. + Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of 30. format: int32 type: integer type: object @@ -202899,15 +206418,18 @@ components: kind: kind spec: limited: - lendablePercent: 6 - borrowingLimitPercent: 0 + lendablePercent: 5 + borrowingLimitPercent: 1 limitResponse: queuing: - handSize: 1 - queues: 5 - queueLengthLimit: 5 + handSize: 5 + queues: 7 + queueLengthLimit: 2 type: type - nominalConcurrencyShares: 2 + nominalConcurrencyShares: 9 + exempt: + lendablePercent: 0 + nominalConcurrencyShares: 6 type: type status: conditions: @@ -203038,15 +206560,18 @@ components: kind: kind spec: limited: - lendablePercent: 6 - borrowingLimitPercent: 0 + lendablePercent: 5 + borrowingLimitPercent: 1 limitResponse: queuing: - handSize: 1 - queues: 5 - queueLengthLimit: 5 + handSize: 5 + queues: 7 + queueLengthLimit: 2 type: type - nominalConcurrencyShares: 2 + nominalConcurrencyShares: 9 + exempt: + lendablePercent: 0 + nominalConcurrencyShares: 6 type: type status: conditions: @@ -203110,15 +206635,18 @@ components: kind: kind spec: limited: - lendablePercent: 6 - borrowingLimitPercent: 0 + lendablePercent: 5 + borrowingLimitPercent: 1 limitResponse: queuing: - handSize: 1 - queues: 5 - queueLengthLimit: 5 + handSize: 5 + queues: 7 + queueLengthLimit: 2 type: type - nominalConcurrencyShares: 2 + nominalConcurrencyShares: 9 + exempt: + lendablePercent: 0 + nominalConcurrencyShares: 6 type: type status: conditions: @@ -203177,17 +206705,22 @@ components: priority level. example: limited: - lendablePercent: 6 - borrowingLimitPercent: 0 + lendablePercent: 5 + borrowingLimitPercent: 1 limitResponse: queuing: - handSize: 1 - queues: 5 - queueLengthLimit: 5 + handSize: 5 + queues: 7 + queueLengthLimit: 2 type: type - nominalConcurrencyShares: 2 + nominalConcurrencyShares: 9 + exempt: + lendablePercent: 0 + nominalConcurrencyShares: 6 type: type properties: + exempt: + $ref: '#/components/schemas/v1beta3.ExemptPriorityLevelConfiguration' limited: $ref: '#/components/schemas/v1beta3.LimitedPriorityLevelConfiguration' type: @@ -203205,6 +206738,7 @@ components: x-kubernetes-unions: - discriminator: type fields-to-discriminateBy: + exempt: Exempt limited: Limited v1beta3.PriorityLevelConfigurationStatus: description: PriorityLevelConfigurationStatus represents the current state of @@ -203236,9 +206770,9 @@ components: v1beta3.QueuingConfiguration: description: QueuingConfiguration holds the configuration parameters for queuing example: - handSize: 1 - queues: 5 - queueLengthLimit: 5 + handSize: 5 + queues: 7 + queueLengthLimit: 2 properties: handSize: description: '`handSize` is a small positive number that configures the @@ -205019,20 +208553,6 @@ components: - protocol: protocol port: port endPort: 0 - status: - conditions: - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -205048,8 +208568,6 @@ components: $ref: '#/components/schemas/v1.ObjectMeta' spec: $ref: '#/components/schemas/v1.NetworkPolicySpec' - status: - $ref: '#/components/schemas/v1.NetworkPolicyStatus' type: object x-kubernetes-group-version-kind: - group: networking.k8s.io @@ -205634,20 +209152,6 @@ components: - protocol: protocol port: port endPort: 0 - status: - conditions: - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status - metadata: generation: 6 finalizers: @@ -206012,20 +209516,6 @@ components: - protocol: protocol port: port endPort: 0 - status: - conditions: - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -206487,35 +209977,6 @@ components: required: - podSelector type: object - v1.NetworkPolicyStatus: - description: NetworkPolicyStatus describes the current state of the NetworkPolicy. - example: - conditions: - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status - - reason: reason - lastTransitionTime: 2000-01-23T04:56:07.000+00:00 - message: message - type: type - observedGeneration: 5 - status: status - properties: - conditions: - description: conditions holds an array of metav1.Condition that describe - the state of the NetworkPolicy. Current service state - items: - $ref: '#/components/schemas/v1.Condition' - type: array - x-kubernetes-patch-strategy: merge - x-kubernetes-list-type: map - x-kubernetes-list-map-keys: - - type - x-kubernetes-patch-merge-key: type - type: object v1.ServiceBackendPort: description: ServiceBackendPort is the service port being referenced. example: @@ -214758,10 +218219,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -214848,10 +218313,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -215115,10 +218584,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -215205,10 +218678,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -215399,10 +218876,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -215489,10 +218970,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -215717,10 +219202,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -215807,10 +219296,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -216009,10 +219502,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -216202,10 +219699,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -216286,10 +219787,14 @@ components: uniqueItems: true maximum: 2.3021358869347655 x-kubernetes-validations: - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message - - messageExpression: messageExpression + - reason: reason + messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message additionalProperties: '{}' @@ -216543,10 +220048,27 @@ components: description: ValidationRule describes a validation rule written in the CEL expression language. example: + reason: reason messageExpression: messageExpression + fieldPath: fieldPath rule: rule message: message properties: + fieldPath: + description: 'fieldPath represents the field path returned when the validation + fails. It must be a relative JSON path (i.e. with array notation) scoped + to the location of this x-kubernetes-validations extension in the schema + and refer to an existing field. e.g. when validation checks if a specific + attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` + If the validation checks two lists must have unique attributes, the fieldPath + could be set to either of the list: e.g. `.testList` It does not support + list numeric index. It supports child operation to refer to an existing + field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) + for more info. Numeric index of array is not supported. For field name + which contains special characters, use `[''specialName'']` to refer the + field name. e.g. for attribute `foo.34$` appears in a list `testList`, + the fieldPath could be set to `.testList[''foo.34$'']`' + type: string message: description: 'Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message @@ -216569,6 +220091,16 @@ components: has access to all the same variables as the rule; the only difference is the return type. Example: "x must be less than max ("+string(self.max)+")"' type: string + reason: + description: 'reason provides a machine-readable validation failure reason + that is returned to the caller when a request fails this validation rule. + The HTTP status code returned to the caller will match the reason of the + reason of the first failed validation rule. The currently supported reasons + are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", + "FieldValueDuplicate". If not set, default to use "FieldValueInvalid". + All future added reasons must be accepted by clients when reading this + value and unknown reasons should be treated as FieldValueInvalid.' + type: string rule: description: "Rule represents the expression which will be evaluated by\ \ CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the\ @@ -217406,8 +220938,6 @@ components: key: description: key is the label key that the selector applies to. type: string - x-kubernetes-patch-strategy: merge - x-kubernetes-patch-merge-key: key operator: description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. diff --git a/kubernetes/docs/AdmissionregistrationV1Api.md b/kubernetes/docs/AdmissionregistrationV1Api.md index 5ef95517d2..58404bb261 100644 --- a/kubernetes/docs/AdmissionregistrationV1Api.md +++ b/kubernetes/docs/AdmissionregistrationV1Api.md @@ -90,7 +90,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -170,7 +170,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -268,7 +268,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -364,7 +364,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -446,7 +446,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -529,7 +529,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -858,7 +858,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -941,7 +941,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1166,7 +1166,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1247,7 +1247,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/AdmissionregistrationV1alpha1Api.md b/kubernetes/docs/AdmissionregistrationV1alpha1Api.md index d6fc36148c..31688477f3 100644 --- a/kubernetes/docs/AdmissionregistrationV1alpha1Api.md +++ b/kubernetes/docs/AdmissionregistrationV1alpha1Api.md @@ -93,7 +93,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -173,7 +173,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -271,7 +271,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -367,7 +367,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -449,7 +449,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -532,7 +532,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -861,7 +861,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -944,7 +944,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1027,7 +1027,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1324,7 +1324,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1405,7 +1405,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1486,7 +1486,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/AdmissionregistrationV1beta1Api.md b/kubernetes/docs/AdmissionregistrationV1beta1Api.md new file mode 100644 index 0000000000..b49139a4de --- /dev/null +++ b/kubernetes/docs/AdmissionregistrationV1beta1Api.md @@ -0,0 +1,1498 @@ +# AdmissionregistrationV1beta1Api + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createValidatingAdmissionPolicy**](AdmissionregistrationV1beta1Api.md#createValidatingAdmissionPolicy) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | +[**createValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1Api.md#createValidatingAdmissionPolicyBinding) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | +[**deleteCollectionValidatingAdmissionPolicy**](AdmissionregistrationV1beta1Api.md#deleteCollectionValidatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | +[**deleteCollectionValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1Api.md#deleteCollectionValidatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | +[**deleteValidatingAdmissionPolicy**](AdmissionregistrationV1beta1Api.md#deleteValidatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +[**deleteValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1Api.md#deleteValidatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +[**getAPIResources**](AdmissionregistrationV1beta1Api.md#getAPIResources) | **GET** /apis/admissionregistration.k8s.io/v1beta1/ | +[**listValidatingAdmissionPolicy**](AdmissionregistrationV1beta1Api.md#listValidatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | +[**listValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1Api.md#listValidatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | +[**patchValidatingAdmissionPolicy**](AdmissionregistrationV1beta1Api.md#patchValidatingAdmissionPolicy) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +[**patchValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1Api.md#patchValidatingAdmissionPolicyBinding) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +[**patchValidatingAdmissionPolicyStatus**](AdmissionregistrationV1beta1Api.md#patchValidatingAdmissionPolicyStatus) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | +[**readValidatingAdmissionPolicy**](AdmissionregistrationV1beta1Api.md#readValidatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +[**readValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1Api.md#readValidatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +[**readValidatingAdmissionPolicyStatus**](AdmissionregistrationV1beta1Api.md#readValidatingAdmissionPolicyStatus) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | +[**replaceValidatingAdmissionPolicy**](AdmissionregistrationV1beta1Api.md#replaceValidatingAdmissionPolicy) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +[**replaceValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1Api.md#replaceValidatingAdmissionPolicyBinding) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +[**replaceValidatingAdmissionPolicyStatus**](AdmissionregistrationV1beta1Api.md#replaceValidatingAdmissionPolicyStatus) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | + + + +# **createValidatingAdmissionPolicy** +> V1beta1ValidatingAdmissionPolicy createValidatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation) + + + +create a ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + V1beta1ValidatingAdmissionPolicy body = new V1beta1ValidatingAdmissionPolicy(); // V1beta1ValidatingAdmissionPolicy | + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + try { + V1beta1ValidatingAdmissionPolicy result = apiInstance.createValidatingAdmissionPolicy(body, pretty, dryRun, fieldManager, fieldValidation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#createValidatingAdmissionPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md)| | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] + **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**202** | Accepted | - | +**401** | Unauthorized | - | + + +# **createValidatingAdmissionPolicyBinding** +> V1beta1ValidatingAdmissionPolicyBinding createValidatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation) + + + +create a ValidatingAdmissionPolicyBinding + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + V1beta1ValidatingAdmissionPolicyBinding body = new V1beta1ValidatingAdmissionPolicyBinding(); // V1beta1ValidatingAdmissionPolicyBinding | + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + try { + V1beta1ValidatingAdmissionPolicyBinding result = apiInstance.createValidatingAdmissionPolicyBinding(body, pretty, dryRun, fieldManager, fieldValidation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#createValidatingAdmissionPolicyBinding"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**V1beta1ValidatingAdmissionPolicyBinding**](V1beta1ValidatingAdmissionPolicyBinding.md)| | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] + **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicyBinding**](V1beta1ValidatingAdmissionPolicyBinding.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**202** | Accepted | - | +**401** | Unauthorized | - | + + +# **deleteCollectionValidatingAdmissionPolicy** +> V1Status deleteCollectionValidatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body) + + + +delete collection of ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String _continue = "_continue_example"; // String | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldSelector = "fieldSelector_example"; // String | A selector to restrict the list of returned objects by their fields. Defaults to everything. + Integer gracePeriodSeconds = 56; // Integer | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + String labelSelector = "labelSelector_example"; // String | A selector to restrict the list of returned objects by their labels. Defaults to everything. + Integer limit = 56; // Integer | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + Boolean orphanDependents = true; // Boolean | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + String propagationPolicy = "propagationPolicy_example"; // String | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + String resourceVersion = "resourceVersion_example"; // String | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + String resourceVersionMatch = "resourceVersionMatch_example"; // String | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + Boolean sendInitialEvents = true; // Boolean | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + Integer timeoutSeconds = 56; // Integer | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + V1DeleteOptions body = new V1DeleteOptions(); // V1DeleteOptions | + try { + V1Status result = apiInstance.deleteCollectionValidatingAdmissionPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#deleteCollectionValidatingAdmissionPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **_continue** | **String**| The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldSelector** | **String**| A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] + **gracePeriodSeconds** | **Integer**| The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] + **labelSelector** | **String**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **limit** | **Integer**| limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] + **orphanDependents** | **Boolean**| Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] + **propagationPolicy** | **String**| Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] + **resourceVersion** | **String**| resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] + **resourceVersionMatch** | **String**| resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] + **sendInitialEvents** | **Boolean**| `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] + **timeoutSeconds** | **Integer**| Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] + **body** | [**V1DeleteOptions**](V1DeleteOptions.md)| | [optional] + +### Return type + +[**V1Status**](V1Status.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | + + +# **deleteCollectionValidatingAdmissionPolicyBinding** +> V1Status deleteCollectionValidatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body) + + + +delete collection of ValidatingAdmissionPolicyBinding + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String _continue = "_continue_example"; // String | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldSelector = "fieldSelector_example"; // String | A selector to restrict the list of returned objects by their fields. Defaults to everything. + Integer gracePeriodSeconds = 56; // Integer | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + String labelSelector = "labelSelector_example"; // String | A selector to restrict the list of returned objects by their labels. Defaults to everything. + Integer limit = 56; // Integer | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + Boolean orphanDependents = true; // Boolean | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + String propagationPolicy = "propagationPolicy_example"; // String | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + String resourceVersion = "resourceVersion_example"; // String | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + String resourceVersionMatch = "resourceVersionMatch_example"; // String | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + Boolean sendInitialEvents = true; // Boolean | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + Integer timeoutSeconds = 56; // Integer | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + V1DeleteOptions body = new V1DeleteOptions(); // V1DeleteOptions | + try { + V1Status result = apiInstance.deleteCollectionValidatingAdmissionPolicyBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#deleteCollectionValidatingAdmissionPolicyBinding"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **_continue** | **String**| The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldSelector** | **String**| A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] + **gracePeriodSeconds** | **Integer**| The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] + **labelSelector** | **String**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **limit** | **Integer**| limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] + **orphanDependents** | **Boolean**| Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] + **propagationPolicy** | **String**| Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] + **resourceVersion** | **String**| resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] + **resourceVersionMatch** | **String**| resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] + **sendInitialEvents** | **Boolean**| `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] + **timeoutSeconds** | **Integer**| Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] + **body** | [**V1DeleteOptions**](V1DeleteOptions.md)| | [optional] + +### Return type + +[**V1Status**](V1Status.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | + + +# **deleteValidatingAdmissionPolicy** +> V1Status deleteValidatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body) + + + +delete a ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicy + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + Integer gracePeriodSeconds = 56; // Integer | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + Boolean orphanDependents = true; // Boolean | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + String propagationPolicy = "propagationPolicy_example"; // String | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + V1DeleteOptions body = new V1DeleteOptions(); // V1DeleteOptions | + try { + V1Status result = apiInstance.deleteValidatingAdmissionPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#deleteValidatingAdmissionPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicy | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **gracePeriodSeconds** | **Integer**| The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] + **orphanDependents** | **Boolean**| Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] + **propagationPolicy** | **String**| Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] + **body** | [**V1DeleteOptions**](V1DeleteOptions.md)| | [optional] + +### Return type + +[**V1Status**](V1Status.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**202** | Accepted | - | +**401** | Unauthorized | - | + + +# **deleteValidatingAdmissionPolicyBinding** +> V1Status deleteValidatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body) + + + +delete a ValidatingAdmissionPolicyBinding + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicyBinding + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + Integer gracePeriodSeconds = 56; // Integer | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + Boolean orphanDependents = true; // Boolean | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + String propagationPolicy = "propagationPolicy_example"; // String | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + V1DeleteOptions body = new V1DeleteOptions(); // V1DeleteOptions | + try { + V1Status result = apiInstance.deleteValidatingAdmissionPolicyBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#deleteValidatingAdmissionPolicyBinding"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicyBinding | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **gracePeriodSeconds** | **Integer**| The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] + **orphanDependents** | **Boolean**| Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] + **propagationPolicy** | **String**| Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] + **body** | [**V1DeleteOptions**](V1DeleteOptions.md)| | [optional] + +### Return type + +[**V1Status**](V1Status.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**202** | Accepted | - | +**401** | Unauthorized | - | + + +# **getAPIResources** +> V1APIResourceList getAPIResources() + + + +get available resources + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + try { + V1APIResourceList result = apiInstance.getAPIResources(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#getAPIResources"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**V1APIResourceList**](V1APIResourceList.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | + + +# **listValidatingAdmissionPolicy** +> V1beta1ValidatingAdmissionPolicyList listValidatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch) + + + +list or watch objects of kind ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + Boolean allowWatchBookmarks = true; // Boolean | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + String _continue = "_continue_example"; // String | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + String fieldSelector = "fieldSelector_example"; // String | A selector to restrict the list of returned objects by their fields. Defaults to everything. + String labelSelector = "labelSelector_example"; // String | A selector to restrict the list of returned objects by their labels. Defaults to everything. + Integer limit = 56; // Integer | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + String resourceVersion = "resourceVersion_example"; // String | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + String resourceVersionMatch = "resourceVersionMatch_example"; // String | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + Boolean sendInitialEvents = true; // Boolean | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + Integer timeoutSeconds = 56; // Integer | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + Boolean watch = true; // Boolean | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + try { + V1beta1ValidatingAdmissionPolicyList result = apiInstance.listValidatingAdmissionPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#listValidatingAdmissionPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **allowWatchBookmarks** | **Boolean**| allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] + **_continue** | **String**| The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] + **fieldSelector** | **String**| A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] + **labelSelector** | **String**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **limit** | **Integer**| limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] + **resourceVersion** | **String**| resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] + **resourceVersionMatch** | **String**| resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] + **sendInitialEvents** | **Boolean**| `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] + **timeoutSeconds** | **Integer**| Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] + **watch** | **Boolean**| Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicyList**](V1beta1ValidatingAdmissionPolicyList.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | + + +# **listValidatingAdmissionPolicyBinding** +> V1beta1ValidatingAdmissionPolicyBindingList listValidatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch) + + + +list or watch objects of kind ValidatingAdmissionPolicyBinding + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + Boolean allowWatchBookmarks = true; // Boolean | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + String _continue = "_continue_example"; // String | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + String fieldSelector = "fieldSelector_example"; // String | A selector to restrict the list of returned objects by their fields. Defaults to everything. + String labelSelector = "labelSelector_example"; // String | A selector to restrict the list of returned objects by their labels. Defaults to everything. + Integer limit = 56; // Integer | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + String resourceVersion = "resourceVersion_example"; // String | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + String resourceVersionMatch = "resourceVersionMatch_example"; // String | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + Boolean sendInitialEvents = true; // Boolean | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + Integer timeoutSeconds = 56; // Integer | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + Boolean watch = true; // Boolean | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + try { + V1beta1ValidatingAdmissionPolicyBindingList result = apiInstance.listValidatingAdmissionPolicyBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#listValidatingAdmissionPolicyBinding"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **allowWatchBookmarks** | **Boolean**| allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] + **_continue** | **String**| The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] + **fieldSelector** | **String**| A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] + **labelSelector** | **String**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **limit** | **Integer**| limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] + **resourceVersion** | **String**| resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] + **resourceVersionMatch** | **String**| resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] + **sendInitialEvents** | **Boolean**| `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] + **timeoutSeconds** | **Integer**| Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] + **watch** | **Boolean**| Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicyBindingList**](V1beta1ValidatingAdmissionPolicyBindingList.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | + + +# **patchValidatingAdmissionPolicy** +> V1beta1ValidatingAdmissionPolicy patchValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force) + + + +partially update the specified ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicy + V1Patch body = new V1Patch(); // V1Patch | + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + try { + V1beta1ValidatingAdmissionPolicy result = apiInstance.patchValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation, force); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#patchValidatingAdmissionPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicy | + **body** | **V1Patch**| | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] + **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + **force** | **Boolean**| Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**401** | Unauthorized | - | + + +# **patchValidatingAdmissionPolicyBinding** +> V1beta1ValidatingAdmissionPolicyBinding patchValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force) + + + +partially update the specified ValidatingAdmissionPolicyBinding + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicyBinding + V1Patch body = new V1Patch(); // V1Patch | + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + try { + V1beta1ValidatingAdmissionPolicyBinding result = apiInstance.patchValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation, force); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#patchValidatingAdmissionPolicyBinding"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicyBinding | + **body** | **V1Patch**| | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] + **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + **force** | **Boolean**| Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicyBinding**](V1beta1ValidatingAdmissionPolicyBinding.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**401** | Unauthorized | - | + + +# **patchValidatingAdmissionPolicyStatus** +> V1beta1ValidatingAdmissionPolicy patchValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force) + + + +partially update status of the specified ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicy + V1Patch body = new V1Patch(); // V1Patch | + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + try { + V1beta1ValidatingAdmissionPolicy result = apiInstance.patchValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation, force); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#patchValidatingAdmissionPolicyStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicy | + **body** | **V1Patch**| | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] + **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + **force** | **Boolean**| Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**401** | Unauthorized | - | + + +# **readValidatingAdmissionPolicy** +> V1beta1ValidatingAdmissionPolicy readValidatingAdmissionPolicy(name, pretty) + + + +read the specified ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicy + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + try { + V1beta1ValidatingAdmissionPolicy result = apiInstance.readValidatingAdmissionPolicy(name, pretty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#readValidatingAdmissionPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicy | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | + + +# **readValidatingAdmissionPolicyBinding** +> V1beta1ValidatingAdmissionPolicyBinding readValidatingAdmissionPolicyBinding(name, pretty) + + + +read the specified ValidatingAdmissionPolicyBinding + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicyBinding + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + try { + V1beta1ValidatingAdmissionPolicyBinding result = apiInstance.readValidatingAdmissionPolicyBinding(name, pretty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#readValidatingAdmissionPolicyBinding"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicyBinding | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicyBinding**](V1beta1ValidatingAdmissionPolicyBinding.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | + + +# **readValidatingAdmissionPolicyStatus** +> V1beta1ValidatingAdmissionPolicy readValidatingAdmissionPolicyStatus(name, pretty) + + + +read status of the specified ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicy + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + try { + V1beta1ValidatingAdmissionPolicy result = apiInstance.readValidatingAdmissionPolicyStatus(name, pretty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#readValidatingAdmissionPolicyStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicy | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | + + +# **replaceValidatingAdmissionPolicy** +> V1beta1ValidatingAdmissionPolicy replaceValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation) + + + +replace the specified ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicy + V1beta1ValidatingAdmissionPolicy body = new V1beta1ValidatingAdmissionPolicy(); // V1beta1ValidatingAdmissionPolicy | + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + try { + V1beta1ValidatingAdmissionPolicy result = apiInstance.replaceValidatingAdmissionPolicy(name, body, pretty, dryRun, fieldManager, fieldValidation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#replaceValidatingAdmissionPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicy | + **body** | [**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md)| | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] + **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**401** | Unauthorized | - | + + +# **replaceValidatingAdmissionPolicyBinding** +> V1beta1ValidatingAdmissionPolicyBinding replaceValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation) + + + +replace the specified ValidatingAdmissionPolicyBinding + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicyBinding + V1beta1ValidatingAdmissionPolicyBinding body = new V1beta1ValidatingAdmissionPolicyBinding(); // V1beta1ValidatingAdmissionPolicyBinding | + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + try { + V1beta1ValidatingAdmissionPolicyBinding result = apiInstance.replaceValidatingAdmissionPolicyBinding(name, body, pretty, dryRun, fieldManager, fieldValidation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#replaceValidatingAdmissionPolicyBinding"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicyBinding | + **body** | [**V1beta1ValidatingAdmissionPolicyBinding**](V1beta1ValidatingAdmissionPolicyBinding.md)| | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] + **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicyBinding**](V1beta1ValidatingAdmissionPolicyBinding.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**401** | Unauthorized | - | + + +# **replaceValidatingAdmissionPolicyStatus** +> V1beta1ValidatingAdmissionPolicy replaceValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation) + + + +replace status of the specified ValidatingAdmissionPolicy + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AdmissionregistrationV1beta1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AdmissionregistrationV1beta1Api apiInstance = new AdmissionregistrationV1beta1Api(defaultClient); + String name = "name_example"; // String | name of the ValidatingAdmissionPolicy + V1beta1ValidatingAdmissionPolicy body = new V1beta1ValidatingAdmissionPolicy(); // V1beta1ValidatingAdmissionPolicy | + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + try { + V1beta1ValidatingAdmissionPolicy result = apiInstance.replaceValidatingAdmissionPolicyStatus(name, body, pretty, dryRun, fieldManager, fieldValidation); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AdmissionregistrationV1beta1Api#replaceValidatingAdmissionPolicyStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the ValidatingAdmissionPolicy | + **body** | [**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md)| | + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] + **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[**V1beta1ValidatingAdmissionPolicy**](V1beta1ValidatingAdmissionPolicy.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**401** | Unauthorized | - | + diff --git a/kubernetes/docs/ApiextensionsV1Api.md b/kubernetes/docs/ApiextensionsV1Api.md index 4b598669a6..71f6ee9306 100644 --- a/kubernetes/docs/ApiextensionsV1Api.md +++ b/kubernetes/docs/ApiextensionsV1Api.md @@ -86,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -184,7 +184,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -266,7 +266,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -505,7 +505,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -588,7 +588,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -813,7 +813,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -894,7 +894,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/ApiregistrationV1Api.md b/kubernetes/docs/ApiregistrationV1Api.md index 615144018f..204235cc58 100644 --- a/kubernetes/docs/ApiregistrationV1Api.md +++ b/kubernetes/docs/ApiregistrationV1Api.md @@ -86,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -170,7 +170,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -267,7 +267,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -505,7 +505,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -588,7 +588,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -813,7 +813,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -894,7 +894,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/AppsV1Api.md b/kubernetes/docs/AppsV1Api.md index cbb64ad1a4..bddce42189 100644 --- a/kubernetes/docs/AppsV1Api.md +++ b/kubernetes/docs/AppsV1Api.md @@ -139,7 +139,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -221,7 +221,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -303,7 +303,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -385,7 +385,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -467,7 +467,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -567,7 +567,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -665,7 +665,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -763,7 +763,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -861,7 +861,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -959,7 +959,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1043,7 +1043,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1128,7 +1128,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1213,7 +1213,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1298,7 +1298,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1383,7 +1383,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2444,7 +2444,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2529,7 +2529,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2614,7 +2614,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2699,7 +2699,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2784,7 +2784,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2869,7 +2869,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2954,7 +2954,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3039,7 +3039,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3124,7 +3124,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3209,7 +3209,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3294,7 +3294,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3379,7 +3379,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4350,7 +4350,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4433,7 +4433,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4516,7 +4516,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4599,7 +4599,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4682,7 +4682,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4765,7 +4765,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4848,7 +4848,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4931,7 +4931,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5014,7 +5014,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5097,7 +5097,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5180,7 +5180,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5263,7 +5263,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/AuthenticationV1Api.md b/kubernetes/docs/AuthenticationV1Api.md index 70650a0332..9722168a9c 100644 --- a/kubernetes/docs/AuthenticationV1Api.md +++ b/kubernetes/docs/AuthenticationV1Api.md @@ -4,10 +4,91 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**createSelfSubjectReview**](AuthenticationV1Api.md#createSelfSubjectReview) | **POST** /apis/authentication.k8s.io/v1/selfsubjectreviews | [**createTokenReview**](AuthenticationV1Api.md#createTokenReview) | **POST** /apis/authentication.k8s.io/v1/tokenreviews | [**getAPIResources**](AuthenticationV1Api.md#getAPIResources) | **GET** /apis/authentication.k8s.io/v1/ | + +# **createSelfSubjectReview** +> V1SelfSubjectReview createSelfSubjectReview(body, dryRun, fieldManager, fieldValidation, pretty) + + + +create a SelfSubjectReview + +### Example +```java +// Import classes: +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.auth.*; +import io.kubernetes.client.openapi.models.*; +import io.kubernetes.client.openapi.apis.AuthenticationV1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: BearerToken + ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); + BearerToken.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //BearerToken.setApiKeyPrefix("Token"); + + AuthenticationV1Api apiInstance = new AuthenticationV1Api(defaultClient); + V1SelfSubjectReview body = new V1SelfSubjectReview(); // V1SelfSubjectReview | + String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. + try { + V1SelfSubjectReview result = apiInstance.createSelfSubjectReview(body, dryRun, fieldManager, fieldValidation, pretty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationV1Api#createSelfSubjectReview"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**V1SelfSubjectReview**](V1SelfSubjectReview.md)| | + **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] + **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] + **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] + +### Return type + +[**V1SelfSubjectReview**](V1SelfSubjectReview.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**202** | Accepted | - | +**401** | Unauthorized | - | + # **createTokenReview** > V1TokenReview createTokenReview(body, dryRun, fieldManager, fieldValidation, pretty) @@ -77,7 +158,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/AuthenticationV1alpha1Api.md b/kubernetes/docs/AuthenticationV1alpha1Api.md index f06c55708e..efe23a7e36 100644 --- a/kubernetes/docs/AuthenticationV1alpha1Api.md +++ b/kubernetes/docs/AuthenticationV1alpha1Api.md @@ -77,7 +77,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/AuthenticationV1beta1Api.md b/kubernetes/docs/AuthenticationV1beta1Api.md index 618051c40a..cbf7c12d29 100644 --- a/kubernetes/docs/AuthenticationV1beta1Api.md +++ b/kubernetes/docs/AuthenticationV1beta1Api.md @@ -77,7 +77,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/AuthorizationV1Api.md b/kubernetes/docs/AuthorizationV1Api.md index be6f7fd832..ccfd992ea7 100644 --- a/kubernetes/docs/AuthorizationV1Api.md +++ b/kubernetes/docs/AuthorizationV1Api.md @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -162,7 +162,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -242,7 +242,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -322,7 +322,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/AutoscalingV1Api.md b/kubernetes/docs/AutoscalingV1Api.md index d5d3ed3d53..a76cf89644 100644 --- a/kubernetes/docs/AutoscalingV1Api.md +++ b/kubernetes/docs/AutoscalingV1Api.md @@ -89,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -189,7 +189,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -273,7 +273,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -606,7 +606,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -922,7 +922,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1005,7 +1005,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/AutoscalingV2Api.md b/kubernetes/docs/AutoscalingV2Api.md index ef92a28f7b..54bf207e7e 100644 --- a/kubernetes/docs/AutoscalingV2Api.md +++ b/kubernetes/docs/AutoscalingV2Api.md @@ -89,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -189,7 +189,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -273,7 +273,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -606,7 +606,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -922,7 +922,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1005,7 +1005,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/BatchV1Api.md b/kubernetes/docs/BatchV1Api.md index e942cf3d81..070c1f3ed0 100644 --- a/kubernetes/docs/BatchV1Api.md +++ b/kubernetes/docs/BatchV1Api.md @@ -100,7 +100,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -182,7 +182,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -282,7 +282,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -380,7 +380,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -464,7 +464,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -549,7 +549,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1064,7 +1064,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1149,7 +1149,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1234,7 +1234,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1319,7 +1319,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1698,7 +1698,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1781,7 +1781,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1864,7 +1864,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1947,7 +1947,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/CertificatesV1Api.md b/kubernetes/docs/CertificatesV1Api.md index b42915bac7..f120990785 100644 --- a/kubernetes/docs/CertificatesV1Api.md +++ b/kubernetes/docs/CertificatesV1Api.md @@ -89,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -173,7 +173,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -270,7 +270,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -508,7 +508,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -591,7 +591,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -674,7 +674,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -971,7 +971,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1052,7 +1052,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1133,7 +1133,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/CertificatesV1alpha1Api.md b/kubernetes/docs/CertificatesV1alpha1Api.md index 8faa3ee195..6b35640877 100644 --- a/kubernetes/docs/CertificatesV1alpha1Api.md +++ b/kubernetes/docs/CertificatesV1alpha1Api.md @@ -83,7 +83,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -167,7 +167,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -264,7 +264,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -502,7 +502,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -655,7 +655,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/CoordinationV1Api.md b/kubernetes/docs/CoordinationV1Api.md index 48ac2e8372..2e871fce08 100644 --- a/kubernetes/docs/CoordinationV1Api.md +++ b/kubernetes/docs/CoordinationV1Api.md @@ -86,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -186,7 +186,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -270,7 +270,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -603,7 +603,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -760,7 +760,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/CoreV1Api.md b/kubernetes/docs/CoreV1Api.md index 74f294d7d7..5d0a91ef47 100644 --- a/kubernetes/docs/CoreV1Api.md +++ b/kubernetes/docs/CoreV1Api.md @@ -3880,7 +3880,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3962,7 +3962,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4044,7 +4044,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4126,7 +4126,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4208,7 +4208,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4290,7 +4290,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4372,7 +4372,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4454,7 +4454,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4538,7 +4538,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4622,7 +4622,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4704,7 +4704,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4786,7 +4786,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4868,7 +4868,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -4950,7 +4950,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5032,7 +5032,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5114,7 +5114,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5198,7 +5198,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5278,7 +5278,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5358,7 +5358,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5458,7 +5458,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5556,7 +5556,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5654,7 +5654,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5752,7 +5752,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5850,7 +5850,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -5948,7 +5948,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6046,7 +6046,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6144,7 +6144,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6242,7 +6242,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6340,7 +6340,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6438,7 +6438,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6536,7 +6536,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6632,7 +6632,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6728,7 +6728,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6810,7 +6810,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6895,7 +6895,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -6980,7 +6980,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7065,7 +7065,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7150,7 +7150,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7235,7 +7235,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7320,7 +7320,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7405,7 +7405,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7490,7 +7490,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7575,7 +7575,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7660,7 +7660,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7745,7 +7745,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7830,7 +7830,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7913,7 +7913,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -7996,7 +7996,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -10689,7 +10689,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -10772,7 +10772,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -10857,7 +10857,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -10942,7 +10942,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11027,7 +11027,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11112,7 +11112,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11197,7 +11197,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11282,7 +11282,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11367,7 +11367,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11452,7 +11452,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11537,7 +11537,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11622,7 +11622,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11707,7 +11707,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11792,7 +11792,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11877,7 +11877,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -11962,7 +11962,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -12047,7 +12047,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -12132,7 +12132,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -12217,7 +12217,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -12302,7 +12302,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -12387,7 +12387,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -12470,7 +12470,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -12553,7 +12553,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -12636,7 +12636,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -12719,7 +12719,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -14800,7 +14800,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -14881,7 +14881,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -14962,7 +14962,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15045,7 +15045,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15128,7 +15128,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15211,7 +15211,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15294,7 +15294,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15377,7 +15377,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15460,7 +15460,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15543,7 +15543,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15626,7 +15626,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15709,7 +15709,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15792,7 +15792,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15875,7 +15875,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -15958,7 +15958,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16041,7 +16041,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16124,7 +16124,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16207,7 +16207,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16290,7 +16290,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16373,7 +16373,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16456,7 +16456,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16539,7 +16539,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16620,7 +16620,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16701,7 +16701,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16782,7 +16782,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -16863,7 +16863,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/CoreV1EndpointPort.md b/kubernetes/docs/CoreV1EndpointPort.md index e4938d07d8..f42230f70c 100644 --- a/kubernetes/docs/CoreV1EndpointPort.md +++ b/kubernetes/docs/CoreV1EndpointPort.md @@ -7,7 +7,7 @@ EndpointPort is a tuple that describes a single port. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**appProtocol** | **String** | The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. | [optional] +**appProtocol** | **String** | The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. | [optional] **name** | **String** | The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined. | [optional] **port** | **Integer** | The port number of the endpoint. | **protocol** | **String** | The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. | [optional] diff --git a/kubernetes/docs/CustomObjectsApi.md b/kubernetes/docs/CustomObjectsApi.md index e52247f096..0fa9503c93 100644 --- a/kubernetes/docs/CustomObjectsApi.md +++ b/kubernetes/docs/CustomObjectsApi.md @@ -106,7 +106,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -190,7 +190,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -276,7 +276,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -362,7 +362,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -450,7 +450,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -538,7 +538,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -1346,7 +1346,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -1430,7 +1430,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1514,7 +1514,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1600,7 +1600,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -1686,7 +1686,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1772,7 +1772,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1854,7 +1854,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -1936,7 +1936,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2019,7 +2019,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2104,7 +2104,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details @@ -2188,7 +2188,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2273,7 +2273,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/DiscoveryV1Api.md b/kubernetes/docs/DiscoveryV1Api.md index b119d835f3..5946401f0f 100644 --- a/kubernetes/docs/DiscoveryV1Api.md +++ b/kubernetes/docs/DiscoveryV1Api.md @@ -86,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -186,7 +186,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -270,7 +270,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -603,7 +603,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -760,7 +760,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/DiscoveryV1EndpointPort.md b/kubernetes/docs/DiscoveryV1EndpointPort.md index 866eab1bc1..c33ded56cb 100644 --- a/kubernetes/docs/DiscoveryV1EndpointPort.md +++ b/kubernetes/docs/DiscoveryV1EndpointPort.md @@ -7,7 +7,7 @@ EndpointPort represents a Port used by an EndpointSlice Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**appProtocol** | **String** | The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. | [optional] +**appProtocol** | **String** | The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. | [optional] **name** | **String** | name represents the name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. | [optional] **port** | **Integer** | port represents the port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. | [optional] **protocol** | **String** | protocol represents the IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. | [optional] diff --git a/kubernetes/docs/EventsV1Api.md b/kubernetes/docs/EventsV1Api.md index 31115f14b2..146d1bbd30 100644 --- a/kubernetes/docs/EventsV1Api.md +++ b/kubernetes/docs/EventsV1Api.md @@ -86,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -186,7 +186,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -270,7 +270,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -603,7 +603,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -760,7 +760,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/FlowcontrolApiserverV1beta2Api.md b/kubernetes/docs/FlowcontrolApiserverV1beta2Api.md index 8e72965ca8..13517eaff4 100644 --- a/kubernetes/docs/FlowcontrolApiserverV1beta2Api.md +++ b/kubernetes/docs/FlowcontrolApiserverV1beta2Api.md @@ -96,7 +96,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -176,7 +176,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -274,7 +274,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -370,7 +370,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -452,7 +452,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -535,7 +535,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -864,7 +864,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -947,7 +947,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1030,7 +1030,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1113,7 +1113,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1482,7 +1482,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1563,7 +1563,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1644,7 +1644,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1725,7 +1725,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/FlowcontrolApiserverV1beta3Api.md b/kubernetes/docs/FlowcontrolApiserverV1beta3Api.md index 9505f5d4b7..029ce46d4d 100644 --- a/kubernetes/docs/FlowcontrolApiserverV1beta3Api.md +++ b/kubernetes/docs/FlowcontrolApiserverV1beta3Api.md @@ -96,7 +96,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -176,7 +176,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -274,7 +274,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -370,7 +370,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -452,7 +452,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -535,7 +535,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -864,7 +864,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -947,7 +947,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1030,7 +1030,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1113,7 +1113,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1482,7 +1482,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1563,7 +1563,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1644,7 +1644,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1725,7 +1725,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/InternalApiserverV1alpha1Api.md b/kubernetes/docs/InternalApiserverV1alpha1Api.md index 50b29bfcd1..36b7b576e9 100644 --- a/kubernetes/docs/InternalApiserverV1alpha1Api.md +++ b/kubernetes/docs/InternalApiserverV1alpha1Api.md @@ -86,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -184,7 +184,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -266,7 +266,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -505,7 +505,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -588,7 +588,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -813,7 +813,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -894,7 +894,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/NetworkingV1Api.md b/kubernetes/docs/NetworkingV1Api.md index d7369c9afd..950cf5d032 100644 --- a/kubernetes/docs/NetworkingV1Api.md +++ b/kubernetes/docs/NetworkingV1Api.md @@ -23,17 +23,14 @@ Method | HTTP request | Description [**patchNamespacedIngress**](NetworkingV1Api.md#patchNamespacedIngress) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} | [**patchNamespacedIngressStatus**](NetworkingV1Api.md#patchNamespacedIngressStatus) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status | [**patchNamespacedNetworkPolicy**](NetworkingV1Api.md#patchNamespacedNetworkPolicy) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} | -[**patchNamespacedNetworkPolicyStatus**](NetworkingV1Api.md#patchNamespacedNetworkPolicyStatus) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status | [**readIngressClass**](NetworkingV1Api.md#readIngressClass) | **GET** /apis/networking.k8s.io/v1/ingressclasses/{name} | [**readNamespacedIngress**](NetworkingV1Api.md#readNamespacedIngress) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} | [**readNamespacedIngressStatus**](NetworkingV1Api.md#readNamespacedIngressStatus) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status | [**readNamespacedNetworkPolicy**](NetworkingV1Api.md#readNamespacedNetworkPolicy) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} | -[**readNamespacedNetworkPolicyStatus**](NetworkingV1Api.md#readNamespacedNetworkPolicyStatus) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status | [**replaceIngressClass**](NetworkingV1Api.md#replaceIngressClass) | **PUT** /apis/networking.k8s.io/v1/ingressclasses/{name} | [**replaceNamespacedIngress**](NetworkingV1Api.md#replaceNamespacedIngress) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} | [**replaceNamespacedIngressStatus**](NetworkingV1Api.md#replaceNamespacedIngressStatus) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status | [**replaceNamespacedNetworkPolicy**](NetworkingV1Api.md#replaceNamespacedNetworkPolicy) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} | -[**replaceNamespacedNetworkPolicyStatus**](NetworkingV1Api.md#replaceNamespacedNetworkPolicyStatus) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status | @@ -105,7 +102,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -187,7 +184,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -269,7 +266,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -367,7 +364,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -465,7 +462,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -563,7 +560,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -645,7 +642,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -730,7 +727,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -815,7 +812,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1418,7 +1415,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1503,7 +1500,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1588,7 +1585,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1673,92 +1670,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**201** | Created | - | -**401** | Unauthorized | - | - - -# **patchNamespacedNetworkPolicyStatus** -> V1NetworkPolicy patchNamespacedNetworkPolicyStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force) - - - -partially update status of the specified NetworkPolicy - -### Example -```java -// Import classes: -import io.kubernetes.client.openapi.ApiClient; -import io.kubernetes.client.openapi.ApiException; -import io.kubernetes.client.openapi.Configuration; -import io.kubernetes.client.openapi.auth.*; -import io.kubernetes.client.openapi.models.*; -import io.kubernetes.client.openapi.apis.NetworkingV1Api; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: BearerToken - ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); - BearerToken.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //BearerToken.setApiKeyPrefix("Token"); - - NetworkingV1Api apiInstance = new NetworkingV1Api(defaultClient); - String name = "name_example"; // String | name of the NetworkPolicy - String namespace = "namespace_example"; // String | object name and auth scope, such as for teams and projects - V1Patch body = new V1Patch(); // V1Patch | - String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. - String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - Boolean force = true; // Boolean | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - try { - V1NetworkPolicy result = apiInstance.patchNamespacedNetworkPolicyStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkingV1Api#patchNamespacedNetworkPolicyStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String**| name of the NetworkPolicy | - **namespace** | **String**| object name and auth scope, such as for teams and projects | - **body** | **V1Patch**| | - **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] - **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] - **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] - **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] - **force** | **Boolean**| Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] - -### Return type - -[**V1NetworkPolicy**](V1NetworkPolicy.md) - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2062,80 +1974,6 @@ Name | Type | Description | Notes **200** | OK | - | **401** | Unauthorized | - | - -# **readNamespacedNetworkPolicyStatus** -> V1NetworkPolicy readNamespacedNetworkPolicyStatus(name, namespace, pretty) - - - -read status of the specified NetworkPolicy - -### Example -```java -// Import classes: -import io.kubernetes.client.openapi.ApiClient; -import io.kubernetes.client.openapi.ApiException; -import io.kubernetes.client.openapi.Configuration; -import io.kubernetes.client.openapi.auth.*; -import io.kubernetes.client.openapi.models.*; -import io.kubernetes.client.openapi.apis.NetworkingV1Api; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: BearerToken - ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); - BearerToken.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //BearerToken.setApiKeyPrefix("Token"); - - NetworkingV1Api apiInstance = new NetworkingV1Api(defaultClient); - String name = "name_example"; // String | name of the NetworkPolicy - String namespace = "namespace_example"; // String | object name and auth scope, such as for teams and projects - String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. - try { - V1NetworkPolicy result = apiInstance.readNamespacedNetworkPolicyStatus(name, namespace, pretty); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkingV1Api#readNamespacedNetworkPolicyStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String**| name of the NetworkPolicy | - **namespace** | **String**| object name and auth scope, such as for teams and projects | - **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] - -### Return type - -[**V1NetworkPolicy**](V1NetworkPolicy.md) - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | - # **replaceIngressClass** > V1IngressClass replaceIngressClass(name, body, pretty, dryRun, fieldManager, fieldValidation) @@ -2207,7 +2045,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2290,7 +2128,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2373,7 +2211,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2456,90 +2294,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**201** | Created | - | -**401** | Unauthorized | - | - - -# **replaceNamespacedNetworkPolicyStatus** -> V1NetworkPolicy replaceNamespacedNetworkPolicyStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation) - - - -replace status of the specified NetworkPolicy - -### Example -```java -// Import classes: -import io.kubernetes.client.openapi.ApiClient; -import io.kubernetes.client.openapi.ApiException; -import io.kubernetes.client.openapi.Configuration; -import io.kubernetes.client.openapi.auth.*; -import io.kubernetes.client.openapi.models.*; -import io.kubernetes.client.openapi.apis.NetworkingV1Api; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: BearerToken - ApiKeyAuth BearerToken = (ApiKeyAuth) defaultClient.getAuthentication("BearerToken"); - BearerToken.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //BearerToken.setApiKeyPrefix("Token"); - - NetworkingV1Api apiInstance = new NetworkingV1Api(defaultClient); - String name = "name_example"; // String | name of the NetworkPolicy - String namespace = "namespace_example"; // String | object name and auth scope, such as for teams and projects - V1NetworkPolicy body = new V1NetworkPolicy(); // V1NetworkPolicy | - String pretty = "pretty_example"; // String | If 'true', then the output is pretty printed. - String dryRun = "dryRun_example"; // String | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - String fieldManager = "fieldManager_example"; // String | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - String fieldValidation = "fieldValidation_example"; // String | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - try { - V1NetworkPolicy result = apiInstance.replaceNamespacedNetworkPolicyStatus(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkingV1Api#replaceNamespacedNetworkPolicyStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **String**| name of the NetworkPolicy | - **namespace** | **String**| object name and auth scope, such as for teams and projects | - **body** | [**V1NetworkPolicy**](V1NetworkPolicy.md)| | - **pretty** | **String**| If 'true', then the output is pretty printed. | [optional] - **dryRun** | **String**| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] - **fieldManager** | **String**| fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] - **fieldValidation** | **String**| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] - -### Return type - -[**V1NetworkPolicy**](V1NetworkPolicy.md) - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/NetworkingV1alpha1Api.md b/kubernetes/docs/NetworkingV1alpha1Api.md index 3e69a38340..3d8ce737d4 100644 --- a/kubernetes/docs/NetworkingV1alpha1Api.md +++ b/kubernetes/docs/NetworkingV1alpha1Api.md @@ -90,7 +90,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -170,7 +170,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -254,7 +254,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -351,7 +351,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -447,7 +447,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -529,7 +529,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -858,7 +858,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -941,7 +941,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1166,7 +1166,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1247,7 +1247,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/NodeV1Api.md b/kubernetes/docs/NodeV1Api.md index 5d4f17bede..b58bc496b5 100644 --- a/kubernetes/docs/NodeV1Api.md +++ b/kubernetes/docs/NodeV1Api.md @@ -83,7 +83,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -181,7 +181,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -263,7 +263,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -502,7 +502,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -655,7 +655,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/OpenidApi.md b/kubernetes/docs/OpenidApi.md index 8139e95da9..136d8bc06f 100644 --- a/kubernetes/docs/OpenidApi.md +++ b/kubernetes/docs/OpenidApi.md @@ -4,7 +4,7 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getServiceAccountIssuerOpenIDKeyset**](OpenidApi.md#getServiceAccountIssuerOpenIDKeyset) | **GET** /openid/v1/jwks/ | +[**getServiceAccountIssuerOpenIDKeyset**](OpenidApi.md#getServiceAccountIssuerOpenIDKeyset) | **GET** /openid/v1/jwks | diff --git a/kubernetes/docs/PolicyV1Api.md b/kubernetes/docs/PolicyV1Api.md index 8622641b40..9afe0a8745 100644 --- a/kubernetes/docs/PolicyV1Api.md +++ b/kubernetes/docs/PolicyV1Api.md @@ -89,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -189,7 +189,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -273,7 +273,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -606,7 +606,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -691,7 +691,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -922,7 +922,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1005,7 +1005,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/RbacAuthorizationV1Api.md b/kubernetes/docs/RbacAuthorizationV1Api.md index 8dacc45765..094f40f2fc 100644 --- a/kubernetes/docs/RbacAuthorizationV1Api.md +++ b/kubernetes/docs/RbacAuthorizationV1Api.md @@ -106,7 +106,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -186,7 +186,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -268,7 +268,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -350,7 +350,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -434,7 +434,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -517,7 +517,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -614,7 +614,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -710,7 +710,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -808,7 +808,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -906,7 +906,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -990,7 +990,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1075,7 +1075,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1768,7 +1768,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1851,7 +1851,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1936,7 +1936,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2021,7 +2021,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2394,7 +2394,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2475,7 +2475,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2558,7 +2558,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2641,7 +2641,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/ResourceV1alpha2Api.md b/kubernetes/docs/ResourceV1alpha2Api.md index 58d264c700..f652c91a22 100644 --- a/kubernetes/docs/ResourceV1alpha2Api.md +++ b/kubernetes/docs/ResourceV1alpha2Api.md @@ -115,7 +115,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -197,7 +197,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -279,7 +279,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -359,7 +359,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -459,7 +459,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -557,7 +557,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -655,7 +655,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -751,7 +751,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -835,7 +835,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -920,7 +920,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1005,7 +1005,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1088,7 +1088,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1875,7 +1875,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1960,7 +1960,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2045,7 +2045,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2130,7 +2130,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2215,7 +2215,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2298,7 +2298,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2823,7 +2823,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2906,7 +2906,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2989,7 +2989,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3072,7 +3072,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3155,7 +3155,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3236,7 +3236,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/SchedulingV1Api.md b/kubernetes/docs/SchedulingV1Api.md index d7b04b8e8d..a1d73478bb 100644 --- a/kubernetes/docs/SchedulingV1Api.md +++ b/kubernetes/docs/SchedulingV1Api.md @@ -83,7 +83,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -181,7 +181,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -263,7 +263,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -502,7 +502,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -655,7 +655,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/StorageV1Api.md b/kubernetes/docs/StorageV1Api.md index e4c907651e..24acb89b71 100644 --- a/kubernetes/docs/StorageV1Api.md +++ b/kubernetes/docs/StorageV1Api.md @@ -115,7 +115,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -195,7 +195,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -277,7 +277,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -357,7 +357,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -437,7 +437,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -521,7 +521,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -604,7 +604,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -701,7 +701,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -797,7 +797,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -895,7 +895,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -991,7 +991,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1087,7 +1087,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1171,7 +1171,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1254,7 +1254,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -1337,7 +1337,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2028,7 +2028,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2111,7 +2111,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2196,7 +2196,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2279,7 +2279,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2362,7 +2362,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2445,7 +2445,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -2960,7 +2960,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3041,7 +3041,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3124,7 +3124,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3205,7 +3205,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3286,7 +3286,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details @@ -3367,7 +3367,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf ### HTTP response details diff --git a/kubernetes/docs/V1ClaimSource.md b/kubernetes/docs/V1ClaimSource.md index 424d246d48..6255ee212c 100644 --- a/kubernetes/docs/V1ClaimSource.md +++ b/kubernetes/docs/V1ClaimSource.md @@ -8,7 +8,7 @@ ClaimSource describes a reference to a ResourceClaim. Exactly one of these fiel Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **resourceClaimName** | **String** | ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod. | [optional] -**resourceClaimTemplateName** | **String** | ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be <pod name>-<resource name>, where <resource name> is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long). An existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. | [optional] +**resourceClaimTemplateName** | **String** | ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. | [optional] diff --git a/kubernetes/docs/V1Container.md b/kubernetes/docs/V1Container.md index 51baeed347..e0f6773e5a 100644 --- a/kubernetes/docs/V1Container.md +++ b/kubernetes/docs/V1Container.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **readinessProbe** | [**V1Probe**](V1Probe.md) | | [optional] **resizePolicy** | [**List<V1ContainerResizePolicy>**](V1ContainerResizePolicy.md) | Resources resize policy for the container. | [optional] **resources** | [**V1ResourceRequirements**](V1ResourceRequirements.md) | | [optional] +**restartPolicy** | **String** | RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. | [optional] **securityContext** | [**V1SecurityContext**](V1SecurityContext.md) | | [optional] **startupProbe** | [**V1Probe**](V1Probe.md) | | [optional] **stdin** | **Boolean** | Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. | [optional] diff --git a/kubernetes/docs/V1EphemeralContainer.md b/kubernetes/docs/V1EphemeralContainer.md index 96d278abda..2d2f392b2e 100644 --- a/kubernetes/docs/V1EphemeralContainer.md +++ b/kubernetes/docs/V1EphemeralContainer.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **readinessProbe** | [**V1Probe**](V1Probe.md) | | [optional] **resizePolicy** | [**List<V1ContainerResizePolicy>**](V1ContainerResizePolicy.md) | Resources resize policy for the container. | [optional] **resources** | [**V1ResourceRequirements**](V1ResourceRequirements.md) | | [optional] +**restartPolicy** | **String** | Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers. | [optional] **securityContext** | [**V1SecurityContext**](V1SecurityContext.md) | | [optional] **startupProbe** | [**V1Probe**](V1Probe.md) | | [optional] **stdin** | **Boolean** | Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. | [optional] diff --git a/kubernetes/docs/V1HostIP.md b/kubernetes/docs/V1HostIP.md new file mode 100644 index 0000000000..f397e328ed --- /dev/null +++ b/kubernetes/docs/V1HostIP.md @@ -0,0 +1,13 @@ + + +# V1HostIP + +HostIP represents a single IP address allocated to the host. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **String** | IP is the IP address assigned to the host | [optional] + + + diff --git a/kubernetes/docs/V1JobSpec.md b/kubernetes/docs/V1JobSpec.md index 55a6b2d4f6..8d35c1b7de 100644 --- a/kubernetes/docs/V1JobSpec.md +++ b/kubernetes/docs/V1JobSpec.md @@ -9,11 +9,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **activeDeadlineSeconds** | **Long** | Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. | [optional] **backoffLimit** | **Integer** | Specifies the number of retries before marking this job failed. Defaults to 6 | [optional] +**backoffLimitPerIndex** | **Integer** | Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). | [optional] **completionMode** | **String** | completionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job. | [optional] **completions** | **Integer** | Specifies the desired number of successfully finished pods the job should be run with. Setting to null means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ | [optional] **manualSelector** | **Boolean** | manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector | [optional] +**maxFailedIndexes** | **Integer** | Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). | [optional] **parallelism** | **Integer** | Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ | [optional] **podFailurePolicy** | [**V1PodFailurePolicy**](V1PodFailurePolicy.md) | | [optional] +**podReplacementPolicy** | **String** | podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods when they are terminating (has a metadata.deletionTimestamp) or failed. - Failed means to wait until a previously created Pod is fully terminated (has phase Failed or Succeeded) before creating a replacement Pod. When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an alpha field. Enable JobPodReplacementPolicy to be able to use this field. | [optional] **selector** | [**V1LabelSelector**](V1LabelSelector.md) | | [optional] **suspend** | **Boolean** | suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false. | [optional] **template** | [**V1PodTemplateSpec**](V1PodTemplateSpec.md) | | diff --git a/kubernetes/docs/V1JobStatus.md b/kubernetes/docs/V1JobStatus.md index 10e9c82414..de4591c963 100644 --- a/kubernetes/docs/V1JobStatus.md +++ b/kubernetes/docs/V1JobStatus.md @@ -12,9 +12,11 @@ Name | Type | Description | Notes **completionTime** | [**OffsetDateTime**](OffsetDateTime.md) | Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully. | [optional] **conditions** | [**List<V1JobCondition>**](V1JobCondition.md) | The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ | [optional] **failed** | **Integer** | The number of pods which reached phase Failed. | [optional] +**failedIndexes** | **String** | FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). | [optional] **ready** | **Integer** | The number of pods which have a Ready condition. This field is beta-level. The job controller populates the field when the feature gate JobReadyPods is enabled (enabled by default). | [optional] **startTime** | [**OffsetDateTime**](OffsetDateTime.md) | Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC. | [optional] **succeeded** | **Integer** | The number of pods which reached phase Succeeded. | [optional] +**terminating** | **Integer** | The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp). This field is alpha-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (disabled by default). | [optional] **uncountedTerminatedPods** | [**V1UncountedTerminatedPods**](V1UncountedTerminatedPods.md) | | [optional] diff --git a/kubernetes/docs/V1MutatingWebhook.md b/kubernetes/docs/V1MutatingWebhook.md index 21143d208b..217091725a 100644 --- a/kubernetes/docs/V1MutatingWebhook.md +++ b/kubernetes/docs/V1MutatingWebhook.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **admissionReviewVersions** | **List<String>** | AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. | **clientConfig** | [**AdmissionregistrationV1WebhookClientConfig**](AdmissionregistrationV1WebhookClientConfig.md) | | **failurePolicy** | **String** | FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. | [optional] -**matchConditions** | [**List<V1MatchCondition>**](V1MatchCondition.md) | MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate. | [optional] +**matchConditions** | [**List<V1MatchCondition>**](V1MatchCondition.md) | MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. | [optional] **matchPolicy** | **String** | matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to \"Equivalent\" | [optional] **name** | **String** | The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required. | **namespaceSelector** | [**V1LabelSelector**](V1LabelSelector.md) | | [optional] diff --git a/kubernetes/docs/V1NetworkPolicy.md b/kubernetes/docs/V1NetworkPolicy.md index 51ea0aba2c..01cf9fefd4 100644 --- a/kubernetes/docs/V1NetworkPolicy.md +++ b/kubernetes/docs/V1NetworkPolicy.md @@ -11,7 +11,6 @@ Name | Type | Description | Notes **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** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] **spec** | [**V1NetworkPolicySpec**](V1NetworkPolicySpec.md) | | [optional] -**status** | [**V1NetworkPolicyStatus**](V1NetworkPolicyStatus.md) | | [optional] ## Implemented Interfaces diff --git a/kubernetes/docs/V1NetworkPolicyStatus.md b/kubernetes/docs/V1NetworkPolicyStatus.md deleted file mode 100644 index 108355493c..0000000000 --- a/kubernetes/docs/V1NetworkPolicyStatus.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# V1NetworkPolicyStatus - -NetworkPolicyStatus describes the current state of the NetworkPolicy. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**conditions** | [**List<V1Condition>**](V1Condition.md) | conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. Current service state | [optional] - - - diff --git a/kubernetes/docs/V1PersistentVolumeClaimStatus.md b/kubernetes/docs/V1PersistentVolumeClaimStatus.md index 6b72093dda..59256c31d1 100644 --- a/kubernetes/docs/V1PersistentVolumeClaimStatus.md +++ b/kubernetes/docs/V1PersistentVolumeClaimStatus.md @@ -8,11 +8,11 @@ PersistentVolumeClaimStatus is the current status of a persistent volume claim. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **accessModes** | **List<String>** | accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 | [optional] -**allocatedResources** | [**Map<String, Quantity>**](Quantity.md) | allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. | [optional] +**allocatedResourceStatuses** | **Map<String, String>** | allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. ClaimResourceStatus can be in any of following states: - ControllerResizeInProgress: State set when resize controller starts resizing the volume in control-plane. - ControllerResizeFailed: State set when resize has failed in resize controller with a terminal error. - NodeResizePending: State set when resize controller has finished resizing the volume but further resizing of volume is needed on the node. - NodeResizeInProgress: State set when kubelet starts resizing the volume. - NodeResizeFailed: State set when resizing has failed in kubelet with a terminal error. Transient errors don't set NodeResizeFailed. For example: if expanding a PVC for more capacity - this field can be one of the following states: - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\" When this field is not set, it means that no resize operation is in progress for the given PVC. A controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. | [optional] +**allocatedResources** | [**Map<String, Quantity>**](Quantity.md) | allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. Capacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. A controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. | [optional] **capacity** | [**Map<String, Quantity>**](Quantity.md) | capacity represents the actual resources of the underlying volume. | [optional] **conditions** | [**List<V1PersistentVolumeClaimCondition>**](V1PersistentVolumeClaimCondition.md) | conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. | [optional] **phase** | **String** | phase represents the current phase of PersistentVolumeClaim. | [optional] -**resizeStatus** | **String** | resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. | [optional] diff --git a/kubernetes/docs/V1PersistentVolumeStatus.md b/kubernetes/docs/V1PersistentVolumeStatus.md index 8bb11a94b2..0e48378df7 100644 --- a/kubernetes/docs/V1PersistentVolumeStatus.md +++ b/kubernetes/docs/V1PersistentVolumeStatus.md @@ -7,6 +7,7 @@ PersistentVolumeStatus is the current status of a persistent volume. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**lastPhaseTransitionTime** | [**OffsetDateTime**](OffsetDateTime.md) | lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature. | [optional] **message** | **String** | message is a human-readable message indicating details about why the volume is in this state. | [optional] **phase** | **String** | phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase | [optional] **reason** | **String** | reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. | [optional] diff --git a/kubernetes/docs/V1PodFailurePolicyRule.md b/kubernetes/docs/V1PodFailurePolicyRule.md index 67ac71b08e..75143c4c95 100644 --- a/kubernetes/docs/V1PodFailurePolicyRule.md +++ b/kubernetes/docs/V1PodFailurePolicyRule.md @@ -7,9 +7,9 @@ PodFailurePolicyRule describes how a pod failure is handled when the requirement Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**action** | **String** | Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - Ignore: indicates that the counter towards the .backoffLimit is not incremented and a replacement pod is created. - Count: indicates that the pod is handled in the default way - the counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule. | +**action** | **String** | Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. This value is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). - Ignore: indicates that the counter towards the .backoffLimit is not incremented and a replacement pod is created. - Count: indicates that the pod is handled in the default way - the counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule. | **onExitCodes** | [**V1PodFailurePolicyOnExitCodesRequirement**](V1PodFailurePolicyOnExitCodesRequirement.md) | | [optional] -**onPodConditions** | [**List<V1PodFailurePolicyOnPodConditionsPattern>**](V1PodFailurePolicyOnPodConditionsPattern.md) | Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed. | +**onPodConditions** | [**List<V1PodFailurePolicyOnPodConditionsPattern>**](V1PodFailurePolicyOnPodConditionsPattern.md) | Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed. | [optional] diff --git a/kubernetes/docs/V1PodIP.md b/kubernetes/docs/V1PodIP.md index 59ed5ed31e..709c737c50 100644 --- a/kubernetes/docs/V1PodIP.md +++ b/kubernetes/docs/V1PodIP.md @@ -2,12 +2,12 @@ # V1PodIP -IP address information for entries in the (plural) PodIPs field. Each entry includes: IP: An IP address allocated to the pod. Routable at least within the cluster. +PodIP represents a single IP address allocated to the pod. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ip** | **String** | ip is an IP address (IPv4 or IPv6) assigned to the pod | [optional] +**ip** | **String** | IP is the IP address assigned to the pod | [optional] diff --git a/kubernetes/docs/V1PodResourceClaimStatus.md b/kubernetes/docs/V1PodResourceClaimStatus.md new file mode 100644 index 0000000000..2daf800680 --- /dev/null +++ b/kubernetes/docs/V1PodResourceClaimStatus.md @@ -0,0 +1,14 @@ + + +# V1PodResourceClaimStatus + +PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL. | +**resourceClaimName** | **String** | ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. It this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case. | [optional] + + + diff --git a/kubernetes/docs/V1PodStatus.md b/kubernetes/docs/V1PodStatus.md index ab4e651dd5..0f438b11ad 100644 --- a/kubernetes/docs/V1PodStatus.md +++ b/kubernetes/docs/V1PodStatus.md @@ -10,16 +10,18 @@ Name | Type | Description | Notes **conditions** | [**List<V1PodCondition>**](V1PodCondition.md) | Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions | [optional] **containerStatuses** | [**List<V1ContainerStatus>**](V1ContainerStatus.md) | The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status | [optional] **ephemeralContainerStatuses** | [**List<V1ContainerStatus>**](V1ContainerStatus.md) | Status for any ephemeral containers that have run in this pod. | [optional] -**hostIP** | **String** | IP address of the host to which the pod is assigned. Empty if not yet scheduled. | [optional] +**hostIP** | **String** | hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod | [optional] +**hostIPs** | [**List<V1HostIP>**](V1HostIP.md) | hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod. | [optional] **initContainerStatuses** | [**List<V1ContainerStatus>**](V1ContainerStatus.md) | The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status | [optional] **message** | **String** | A human readable message indicating details about why the pod is in this condition. | [optional] **nominatedNodeName** | **String** | nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled. | [optional] **phase** | **String** | The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values: Pending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase | [optional] -**podIP** | **String** | IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. | [optional] +**podIP** | **String** | podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. | [optional] **podIPs** | [**List<V1PodIP>**](V1PodIP.md) | podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet. | [optional] **qosClass** | **String** | The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes | [optional] **reason** | **String** | A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted' | [optional] **resize** | **String** | Status of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\" | [optional] +**resourceClaimStatuses** | [**List<V1PodResourceClaimStatus>**](V1PodResourceClaimStatus.md) | Status of resource claims. | [optional] **startTime** | [**OffsetDateTime**](OffsetDateTime.md) | RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod. | [optional] diff --git a/kubernetes/docs/V1SeccompProfile.md b/kubernetes/docs/V1SeccompProfile.md index e67fa39a48..1db673ef28 100644 --- a/kubernetes/docs/V1SeccompProfile.md +++ b/kubernetes/docs/V1SeccompProfile.md @@ -7,7 +7,7 @@ SeccompProfile defines a pod/container's seccomp profile settings. Only one prof Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**localhostProfile** | **String** | localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\". | [optional] +**localhostProfile** | **String** | localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is \"Localhost\". Must NOT be set for any other type. | [optional] **type** | **String** | type indicates which kind of seccomp profile will be applied. Valid options are: Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied. | diff --git a/kubernetes/docs/V1SelfSubjectReview.md b/kubernetes/docs/V1SelfSubjectReview.md new file mode 100644 index 0000000000..e60c044e9f --- /dev/null +++ b/kubernetes/docs/V1SelfSubjectReview.md @@ -0,0 +1,20 @@ + + +# V1SelfSubjectReview + +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. +## Properties + +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] +**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** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] +**status** | [**V1SelfSubjectReviewStatus**](V1SelfSubjectReviewStatus.md) | | [optional] + + +## Implemented Interfaces + +* io.kubernetes.client.common.KubernetesObject + + diff --git a/kubernetes/docs/V1SelfSubjectReviewStatus.md b/kubernetes/docs/V1SelfSubjectReviewStatus.md new file mode 100644 index 0000000000..59adcafe0c --- /dev/null +++ b/kubernetes/docs/V1SelfSubjectReviewStatus.md @@ -0,0 +1,13 @@ + + +# V1SelfSubjectReviewStatus + +SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userInfo** | [**V1UserInfo**](V1UserInfo.md) | | [optional] + + + diff --git a/kubernetes/docs/V1ServicePort.md b/kubernetes/docs/V1ServicePort.md index 2c28ada06b..99d71817b0 100644 --- a/kubernetes/docs/V1ServicePort.md +++ b/kubernetes/docs/V1ServicePort.md @@ -7,7 +7,7 @@ ServicePort contains information on service's port. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**appProtocol** | **String** | The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. | [optional] +**appProtocol** | **String** | The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. | [optional] **name** | **String** | The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. | [optional] **nodePort** | **Integer** | The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport | [optional] **port** | **Integer** | The port that will be exposed by this service. | diff --git a/kubernetes/docs/V1ServiceSpec.md b/kubernetes/docs/V1ServiceSpec.md index cd75c1e4e2..a03a9aca03 100644 --- a/kubernetes/docs/V1ServiceSpec.md +++ b/kubernetes/docs/V1ServiceSpec.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **ipFamilies** | **List<String>** | IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName. This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. | [optional] **ipFamilyPolicy** | **String** | IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName. | [optional] **loadBalancerClass** | **String** | loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. | [optional] -**loadBalancerIP** | **String** | Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations, and it cannot support dual-stack. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version. | [optional] +**loadBalancerIP** | **String** | Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available. | [optional] **loadBalancerSourceRanges** | **List<String>** | If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ | [optional] **ports** | [**List<V1ServicePort>**](V1ServicePort.md) | The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies | [optional] **publishNotReadyAddresses** | **Boolean** | publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered \"ready\" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior. | [optional] diff --git a/kubernetes/docs/V1ValidatingWebhook.md b/kubernetes/docs/V1ValidatingWebhook.md index 9016de43ee..ad2be24a46 100644 --- a/kubernetes/docs/V1ValidatingWebhook.md +++ b/kubernetes/docs/V1ValidatingWebhook.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **admissionReviewVersions** | **List<String>** | AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. | **clientConfig** | [**AdmissionregistrationV1WebhookClientConfig**](AdmissionregistrationV1WebhookClientConfig.md) | | **failurePolicy** | **String** | FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail. | [optional] -**matchConditions** | [**List<V1MatchCondition>**](V1MatchCondition.md) | MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate. | [optional] +**matchConditions** | [**List<V1MatchCondition>**](V1MatchCondition.md) | MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. | [optional] **matchPolicy** | **String** | matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. Defaults to \"Equivalent\" | [optional] **name** | **String** | The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required. | **namespaceSelector** | [**V1LabelSelector**](V1LabelSelector.md) | | [optional] diff --git a/kubernetes/docs/V1ValidationRule.md b/kubernetes/docs/V1ValidationRule.md index a0d58cd388..7975d98004 100644 --- a/kubernetes/docs/V1ValidationRule.md +++ b/kubernetes/docs/V1ValidationRule.md @@ -7,8 +7,10 @@ ValidationRule describes a validation rule written in the CEL expression languag Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**fieldPath** | **String** | fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. Numeric index of array is not supported. For field name which contains special characters, use `['specialName']` to refer the field name. e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` | [optional] **message** | **String** | Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" | [optional] **messageExpression** | **String** | MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a rule, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the rule; the only difference is the return type. Example: \"x must be less than max (\"+string(self.max)+\")\" | [optional] +**reason** | **String** | reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: \"FieldValueInvalid\", \"FieldValueForbidden\", \"FieldValueRequired\", \"FieldValueDuplicate\". If not set, default to use \"FieldValueInvalid\". All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. | [optional] **rule** | **String** | Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {\"rule\": \"self.status.actual <= self.spec.maxDesired\"} If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {\"rule\": \"self.components['Widget'].priority < 10\"} - Rule scoped to a list of integers: {\"rule\": \"self.values.all(value, value >= 0 && value < 100)\"} - Rule scoped to a string value: {\"rule\": \"self.startsWith('kube')\"} The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an \"unknown type\". An \"unknown type\" is recursively defined as: - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - An array where the items schema is of an \"unknown type\" - An object where the additionalProperties schema is of an \"unknown type\" Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Rule accessing a property named \"namespace\": {\"rule\": \"self.__namespace__ > 0\"} - Rule accessing a property named \"x-prop\": {\"rule\": \"self.x__dash__prop > 0\"} - Rule accessing a property named \"redact__d\": {\"rule\": \"self.redact__underscores__d > 0\"} Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. | diff --git a/kubernetes/docs/V1WindowsSecurityContextOptions.md b/kubernetes/docs/V1WindowsSecurityContextOptions.md index d9140e7ac0..8c9fb0fa08 100644 --- a/kubernetes/docs/V1WindowsSecurityContextOptions.md +++ b/kubernetes/docs/V1WindowsSecurityContextOptions.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **gmsaCredentialSpec** | **String** | GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. | [optional] **gmsaCredentialSpecName** | **String** | GMSACredentialSpecName is the name of the GMSA credential spec to use. | [optional] -**hostProcess** | **Boolean** | HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. | [optional] +**hostProcess** | **Boolean** | HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. | [optional] **runAsUserName** | **String** | The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. | [optional] diff --git a/kubernetes/docs/V1alpha1ParamRef.md b/kubernetes/docs/V1alpha1ParamRef.md index 56de1a13b9..3a23a70d3d 100644 --- a/kubernetes/docs/V1alpha1ParamRef.md +++ b/kubernetes/docs/V1alpha1ParamRef.md @@ -2,13 +2,15 @@ # V1alpha1ParamRef -ParamRef references a parameter resource +ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | Name of the resource being referenced. | [optional] -**namespace** | **String** | Namespace of the referenced resource. Should be empty for the cluster-scoped resources | [optional] +**name** | **String** | `name` is the name of the resource being referenced. `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. | [optional] +**namespace** | **String** | namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. | [optional] +**parameterNotFoundAction** | **String** | `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Default to `Deny` | [optional] +**selector** | [**V1LabelSelector**](V1LabelSelector.md) | | [optional] diff --git a/kubernetes/docs/V1alpha1ServerStorageVersion.md b/kubernetes/docs/V1alpha1ServerStorageVersion.md index eaa811c64c..0c5f787aac 100644 --- a/kubernetes/docs/V1alpha1ServerStorageVersion.md +++ b/kubernetes/docs/V1alpha1ServerStorageVersion.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **apiServerID** | **String** | The ID of the reporting API server. | [optional] **decodableVersions** | **List<String>** | The API server can decode objects encoded in these versions. The encodingVersion must be included in the decodableVersions. | [optional] **encodingVersion** | **String** | The API server encodes the object to this version when persisting it in the backend (e.g., etcd). | [optional] +**servedVersions** | **List<String>** | The API server can serve these versions. DecodableVersions must include all ServedVersions. | [optional] diff --git a/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyBinding.md b/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyBinding.md index 08c43b00fe..861c728e23 100644 --- a/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyBinding.md +++ b/kubernetes/docs/V1alpha1ValidatingAdmissionPolicyBinding.md @@ -2,7 +2,7 @@ # V1alpha1ValidatingAdmissionPolicyBinding -ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. +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. ## Properties Name | Type | Description | Notes diff --git a/kubernetes/docs/V1alpha1ValidatingAdmissionPolicySpec.md b/kubernetes/docs/V1alpha1ValidatingAdmissionPolicySpec.md index 957c3d735c..86445850f1 100644 --- a/kubernetes/docs/V1alpha1ValidatingAdmissionPolicySpec.md +++ b/kubernetes/docs/V1alpha1ValidatingAdmissionPolicySpec.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **matchConstraints** | [**V1alpha1MatchResources**](V1alpha1MatchResources.md) | | [optional] **paramKind** | [**V1alpha1ParamKind**](V1alpha1ParamKind.md) | | [optional] **validations** | [**List<V1alpha1Validation>**](V1alpha1Validation.md) | Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required. | [optional] +**variables** | [**List<V1alpha1Variable>**](V1alpha1Variable.md) | Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. | [optional] diff --git a/kubernetes/docs/V1alpha1Validation.md b/kubernetes/docs/V1alpha1Validation.md index 86eae83237..8c218791b7 100644 --- a/kubernetes/docs/V1alpha1Validation.md +++ b/kubernetes/docs/V1alpha1Validation.md @@ -7,7 +7,7 @@ Validation specifies the CEL expression which is used to apply the validation. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**expression** | **String** | Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required. | +**expression** | **String** | Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required. | **message** | **String** | Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\". | [optional] **messageExpression** | **String** | messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\" | [optional] **reason** | **String** | Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client. | [optional] diff --git a/kubernetes/docs/V1alpha1Variable.md b/kubernetes/docs/V1alpha1Variable.md new file mode 100644 index 0000000000..1921f934ea --- /dev/null +++ b/kubernetes/docs/V1alpha1Variable.md @@ -0,0 +1,14 @@ + + +# V1alpha1Variable + +Variable is the definition of a variable that is used for composition. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expression** | **String** | Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. | +**name** | **String** | Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo` | + + + diff --git a/kubernetes/docs/V1beta1AuditAnnotation.md b/kubernetes/docs/V1beta1AuditAnnotation.md new file mode 100644 index 0000000000..a3e872786f --- /dev/null +++ b/kubernetes/docs/V1beta1AuditAnnotation.md @@ -0,0 +1,14 @@ + + +# V1beta1AuditAnnotation + +AuditAnnotation describes how to produce an audit annotation for an API request. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\". If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded. Required. | +**valueExpression** | **String** | valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb. If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list. Required. | + + + diff --git a/kubernetes/docs/V1beta1ExpressionWarning.md b/kubernetes/docs/V1beta1ExpressionWarning.md new file mode 100644 index 0000000000..026153656d --- /dev/null +++ b/kubernetes/docs/V1beta1ExpressionWarning.md @@ -0,0 +1,14 @@ + + +# V1beta1ExpressionWarning + +ExpressionWarning is a warning information that targets a specific expression. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fieldRef** | **String** | The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\" | +**warning** | **String** | The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler. | + + + diff --git a/kubernetes/docs/V1beta1MatchCondition.md b/kubernetes/docs/V1beta1MatchCondition.md new file mode 100644 index 0000000000..5619ce28bd --- /dev/null +++ b/kubernetes/docs/V1beta1MatchCondition.md @@ -0,0 +1,14 @@ + + +# V1beta1MatchCondition + +MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expression** | **String** | Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: 'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ Required. | +**name** | **String** | Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') Required. | + + + diff --git a/kubernetes/docs/V1beta1MatchResources.md b/kubernetes/docs/V1beta1MatchResources.md new file mode 100644 index 0000000000..bc293b85c5 --- /dev/null +++ b/kubernetes/docs/V1beta1MatchResources.md @@ -0,0 +1,17 @@ + + +# V1beta1MatchResources + +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) +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**excludeResourceRules** | [**List<V1beta1NamedRuleWithOperations>**](V1beta1NamedRuleWithOperations.md) | ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) | [optional] +**matchPolicy** | **String** | matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. Defaults to \"Equivalent\" | [optional] +**namespaceSelector** | [**V1LabelSelector**](V1LabelSelector.md) | | [optional] +**objectSelector** | [**V1LabelSelector**](V1LabelSelector.md) | | [optional] +**resourceRules** | [**List<V1beta1NamedRuleWithOperations>**](V1beta1NamedRuleWithOperations.md) | ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule. | [optional] + + + diff --git a/kubernetes/docs/V1beta1NamedRuleWithOperations.md b/kubernetes/docs/V1beta1NamedRuleWithOperations.md new file mode 100644 index 0000000000..08476dfae1 --- /dev/null +++ b/kubernetes/docs/V1beta1NamedRuleWithOperations.md @@ -0,0 +1,18 @@ + + +# V1beta1NamedRuleWithOperations + +NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apiGroups** | **List<String>** | APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. | [optional] +**apiVersions** | **List<String>** | APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. | [optional] +**operations** | **List<String>** | Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. | [optional] +**resourceNames** | **List<String>** | ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. | [optional] +**resources** | **List<String>** | Resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/_*' means all subresources of pods. '*_/scale' means all scale subresources. '*_/_*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. Required. | [optional] +**scope** | **String** | scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\". | [optional] + + + diff --git a/kubernetes/docs/V1beta1ParamKind.md b/kubernetes/docs/V1beta1ParamKind.md new file mode 100644 index 0000000000..c2ff3170ae --- /dev/null +++ b/kubernetes/docs/V1beta1ParamKind.md @@ -0,0 +1,14 @@ + + +# V1beta1ParamKind + +ParamKind is a tuple of Group Kind and Version. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apiVersion** | **String** | APIVersion is the API group version the resources belong to. In format of \"group/version\". Required. | [optional] +**kind** | **String** | Kind is the API kind the resources belong to. Required. | [optional] + + + diff --git a/kubernetes/docs/V1beta1ParamRef.md b/kubernetes/docs/V1beta1ParamRef.md new file mode 100644 index 0000000000..559ac0b8ad --- /dev/null +++ b/kubernetes/docs/V1beta1ParamRef.md @@ -0,0 +1,16 @@ + + +# V1beta1ParamRef + +ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | name is the name of the resource being referenced. One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. | [optional] +**namespace** | **String** | namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. | [optional] +**parameterNotFoundAction** | **String** | `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Required | [optional] +**selector** | [**V1LabelSelector**](V1LabelSelector.md) | | [optional] + + + diff --git a/kubernetes/docs/V1beta1TypeChecking.md b/kubernetes/docs/V1beta1TypeChecking.md new file mode 100644 index 0000000000..066365bee5 --- /dev/null +++ b/kubernetes/docs/V1beta1TypeChecking.md @@ -0,0 +1,13 @@ + + +# V1beta1TypeChecking + +TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expressionWarnings** | [**List<V1beta1ExpressionWarning>**](V1beta1ExpressionWarning.md) | The type checking warnings for each expression. | [optional] + + + diff --git a/kubernetes/docs/V1beta1ValidatingAdmissionPolicy.md b/kubernetes/docs/V1beta1ValidatingAdmissionPolicy.md new file mode 100644 index 0000000000..915d7fe092 --- /dev/null +++ b/kubernetes/docs/V1beta1ValidatingAdmissionPolicy.md @@ -0,0 +1,21 @@ + + +# V1beta1ValidatingAdmissionPolicy + +ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. +## Properties + +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] +**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** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] +**spec** | [**V1beta1ValidatingAdmissionPolicySpec**](V1beta1ValidatingAdmissionPolicySpec.md) | | [optional] +**status** | [**V1beta1ValidatingAdmissionPolicyStatus**](V1beta1ValidatingAdmissionPolicyStatus.md) | | [optional] + + +## Implemented Interfaces + +* io.kubernetes.client.common.KubernetesObject + + diff --git a/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBinding.md b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBinding.md new file mode 100644 index 0000000000..333bfc036b --- /dev/null +++ b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBinding.md @@ -0,0 +1,20 @@ + + +# V1beta1ValidatingAdmissionPolicyBinding + +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. +## Properties + +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] +**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** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] +**spec** | [**V1beta1ValidatingAdmissionPolicyBindingSpec**](V1beta1ValidatingAdmissionPolicyBindingSpec.md) | | [optional] + + +## Implemented Interfaces + +* io.kubernetes.client.common.KubernetesObject + + diff --git a/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingList.md b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingList.md new file mode 100644 index 0000000000..32dffb1670 --- /dev/null +++ b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingList.md @@ -0,0 +1,20 @@ + + +# V1beta1ValidatingAdmissionPolicyBindingList + +ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. +## Properties + +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] +**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] + + +## Implemented Interfaces + +* io.kubernetes.client.common.KubernetesListObject + + diff --git a/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingSpec.md b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingSpec.md new file mode 100644 index 0000000000..4223bf54a5 --- /dev/null +++ b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyBindingSpec.md @@ -0,0 +1,16 @@ + + +# V1beta1ValidatingAdmissionPolicyBindingSpec + +ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**matchResources** | [**V1beta1MatchResources**](V1beta1MatchResources.md) | | [optional] +**paramRef** | [**V1beta1ParamRef**](V1beta1ParamRef.md) | | [optional] +**policyName** | **String** | PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. | [optional] +**validationActions** | **List<String>** | validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required. | [optional] + + + diff --git a/kubernetes/docs/V1beta1ValidatingAdmissionPolicyList.md b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyList.md new file mode 100644 index 0000000000..f680b16684 --- /dev/null +++ b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyList.md @@ -0,0 +1,20 @@ + + +# V1beta1ValidatingAdmissionPolicyList + +ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. +## Properties + +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] +**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] + + +## Implemented Interfaces + +* io.kubernetes.client.common.KubernetesListObject + + diff --git a/kubernetes/docs/V1beta1ValidatingAdmissionPolicySpec.md b/kubernetes/docs/V1beta1ValidatingAdmissionPolicySpec.md new file mode 100644 index 0000000000..1a29e2616f --- /dev/null +++ b/kubernetes/docs/V1beta1ValidatingAdmissionPolicySpec.md @@ -0,0 +1,19 @@ + + +# V1beta1ValidatingAdmissionPolicySpec + +ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auditAnnotations** | [**List<V1beta1AuditAnnotation>**](V1beta1AuditAnnotation.md) | auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required. | [optional] +**failurePolicy** | **String** | failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource. failurePolicy does not define how validations that evaluate to false are handled. When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced. Allowed values are Ignore or Fail. Defaults to Fail. | [optional] +**matchConditions** | [**List<V1beta1MatchCondition>**](V1beta1MatchCondition.md) | MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped | [optional] +**matchConstraints** | [**V1beta1MatchResources**](V1beta1MatchResources.md) | | [optional] +**paramKind** | [**V1beta1ParamKind**](V1beta1ParamKind.md) | | [optional] +**validations** | [**List<V1beta1Validation>**](V1beta1Validation.md) | Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required. | [optional] +**variables** | [**List<V1beta1Variable>**](V1beta1Variable.md) | Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. | [optional] + + + diff --git a/kubernetes/docs/V1beta1ValidatingAdmissionPolicyStatus.md b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyStatus.md new file mode 100644 index 0000000000..5ce1f5a422 --- /dev/null +++ b/kubernetes/docs/V1beta1ValidatingAdmissionPolicyStatus.md @@ -0,0 +1,15 @@ + + +# V1beta1ValidatingAdmissionPolicyStatus + +ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conditions** | [**List<V1Condition>**](V1Condition.md) | The conditions represent the latest available observations of a policy's current state. | [optional] +**observedGeneration** | **Long** | The generation observed by the controller. | [optional] +**typeChecking** | [**V1beta1TypeChecking**](V1beta1TypeChecking.md) | | [optional] + + + diff --git a/kubernetes/docs/V1beta1Validation.md b/kubernetes/docs/V1beta1Validation.md new file mode 100644 index 0000000000..1ad8510bb7 --- /dev/null +++ b/kubernetes/docs/V1beta1Validation.md @@ -0,0 +1,16 @@ + + +# V1beta1Validation + +Validation specifies the CEL expression which is used to apply the validation. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expression** | **String** | Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required. | +**message** | **String** | Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\". | [optional] +**messageExpression** | **String** | messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\" | [optional] +**reason** | **String** | Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client. | [optional] + + + diff --git a/kubernetes/docs/V1beta1Variable.md b/kubernetes/docs/V1beta1Variable.md new file mode 100644 index 0000000000..e9db0e2ff3 --- /dev/null +++ b/kubernetes/docs/V1beta1Variable.md @@ -0,0 +1,14 @@ + + +# V1beta1Variable + +Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expression** | **String** | Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. | +**name** | **String** | Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo` | + + + diff --git a/kubernetes/docs/V1beta2ExemptPriorityLevelConfiguration.md b/kubernetes/docs/V1beta2ExemptPriorityLevelConfiguration.md new file mode 100644 index 0000000000..9973609d23 --- /dev/null +++ b/kubernetes/docs/V1beta2ExemptPriorityLevelConfiguration.md @@ -0,0 +1,14 @@ + + +# V1beta2ExemptPriorityLevelConfiguration + +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`. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lendablePercent** | **Integer** | `lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) | [optional] +**nominalConcurrencyShares** | **Integer** | `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero. | [optional] + + + diff --git a/kubernetes/docs/V1beta2PriorityLevelConfigurationSpec.md b/kubernetes/docs/V1beta2PriorityLevelConfigurationSpec.md index 696a53983a..511f5d368c 100644 --- a/kubernetes/docs/V1beta2PriorityLevelConfigurationSpec.md +++ b/kubernetes/docs/V1beta2PriorityLevelConfigurationSpec.md @@ -7,6 +7,7 @@ PriorityLevelConfigurationSpec specifies the configuration of a priority level. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**exempt** | [**V1beta2ExemptPriorityLevelConfiguration**](V1beta2ExemptPriorityLevelConfiguration.md) | | [optional] **limited** | [**V1beta2LimitedPriorityLevelConfiguration**](V1beta2LimitedPriorityLevelConfiguration.md) | | [optional] **type** | **String** | `type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required. | diff --git a/kubernetes/docs/V1beta3ExemptPriorityLevelConfiguration.md b/kubernetes/docs/V1beta3ExemptPriorityLevelConfiguration.md new file mode 100644 index 0000000000..9a4a54feb4 --- /dev/null +++ b/kubernetes/docs/V1beta3ExemptPriorityLevelConfiguration.md @@ -0,0 +1,14 @@ + + +# V1beta3ExemptPriorityLevelConfiguration + +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`. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lendablePercent** | **Integer** | `lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) | [optional] +**nominalConcurrencyShares** | **Integer** | `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero. | [optional] + + + diff --git a/kubernetes/docs/V1beta3LimitedPriorityLevelConfiguration.md b/kubernetes/docs/V1beta3LimitedPriorityLevelConfiguration.md index ee8b30cfa7..b6871594d2 100644 --- a/kubernetes/docs/V1beta3LimitedPriorityLevelConfiguration.md +++ b/kubernetes/docs/V1beta3LimitedPriorityLevelConfiguration.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **borrowingLimitPercent** | **Integer** | `borrowingLimitPercent`, if present, configures a limit on how many seats this priority level can borrow from other priority levels. The limit is known as this level's BorrowingConcurrencyLimit (BorrowingCL) and is a limit on the total number of seats that this level may borrow at any one time. This field holds the ratio of that limit to the level's nominal concurrency limit. When this field is non-nil, it must hold a non-negative integer and the limit is calculated as follows. BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 ) The value of this field can be more than 100, implying that this priority level can borrow a number of seats that is greater than its own nominal concurrency limit (NominalCL). When this field is left `nil`, the limit is effectively infinite. | [optional] **lendablePercent** | **Integer** | `lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. The value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) | [optional] **limitResponse** | [**V1beta3LimitResponse**](V1beta3LimitResponse.md) | | [optional] -**nominalConcurrencyShares** | **Integer** | `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[limited priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other Limited priority level. This field has a default value of 30. | [optional] +**nominalConcurrencyShares** | **Integer** | `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of 30. | [optional] diff --git a/kubernetes/docs/V1beta3PriorityLevelConfigurationSpec.md b/kubernetes/docs/V1beta3PriorityLevelConfigurationSpec.md index cd54913492..33cd658731 100644 --- a/kubernetes/docs/V1beta3PriorityLevelConfigurationSpec.md +++ b/kubernetes/docs/V1beta3PriorityLevelConfigurationSpec.md @@ -7,6 +7,7 @@ PriorityLevelConfigurationSpec specifies the configuration of a priority level. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**exempt** | [**V1beta3ExemptPriorityLevelConfiguration**](V1beta3ExemptPriorityLevelConfiguration.md) | | [optional] **limited** | [**V1beta3LimitedPriorityLevelConfiguration**](V1beta3LimitedPriorityLevelConfiguration.md) | | [optional] **type** | **String** | `type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required. | diff --git a/kubernetes/docs/WellKnownApi.md b/kubernetes/docs/WellKnownApi.md index faad54c270..81527104ec 100644 --- a/kubernetes/docs/WellKnownApi.md +++ b/kubernetes/docs/WellKnownApi.md @@ -4,7 +4,7 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getServiceAccountIssuerOpenIDConfiguration**](WellKnownApi.md#getServiceAccountIssuerOpenIDConfiguration) | **GET** /.well-known/openid-configuration/ | +[**getServiceAccountIssuerOpenIDConfiguration**](WellKnownApi.md#getServiceAccountIssuerOpenIDConfiguration) | **GET** /.well-known/openid-configuration | diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiException.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiException.java index 93d9f1a38f..25846be158 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiException.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/ApiException.java @@ -15,7 +15,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; 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 694caf26c5..77bb757f6e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/Configuration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/Configuration.java @@ -12,7 +12,7 @@ */ package io.kubernetes.client.openapi; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); 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 ee4d61c2cf..783accaf0a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/JSON.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/JSON.java @@ -1,5 +1,5 @@ /* -Copyright 2021 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -14,412 +14,388 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; 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.kubernetes.client.gson.V1StatusPreProcessor; -import io.kubernetes.client.openapi.models.V1Status; +import io.gsonfire.TypeSelector; + +import io.kubernetes.client.openapi.models.*; +import okio.ByteString; + import java.io.IOException; import java.io.StringReader; import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; -import java.time.Instant; +import java.text.ParsePosition; import java.time.LocalDate; import java.time.OffsetDateTime; 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 okio.ByteString; +import java.util.HashMap; public class JSON { + private Gson gson; + private boolean isLenientOnJson = false; + private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; + } - private Gson gson; - - private 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() - .appendOffsetId() - .toFormatter(); - - private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - - private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - - private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = - new OffsetDateTimeTypeAdapter(RFC3339MICRO_FORMATTER); - - private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - - private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder(); - GsonBuilder builder = - fireBuilder - .registerPreProcessor(V1Status.class, new V1StatusPreProcessor()) - .createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException( - "missing discriminator field: <" + discriminatorField + ">"); + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator - * value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator( - Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException( - "cannot determine model class of name: <" + discriminatorValue + ">"); + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); + if (null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; } - return clazz; - } - public JSON() { - gson = - createGson() + public JSON() { + gson = createGson() .registerTypeAdapter(Date.class, dateTypeAdapter) .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) .registerTypeAdapter(byte[].class, byteArrayAdapter) .create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - * @return JSON - */ - public JSON setGson(Gson gson) { - this.gson = gson; - return this; - } - - public JSON setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - return this; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see - // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; - } else { - throw (e); - } - } - } - - /** Gson TypeAdapter for Byte Array type */ - public 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 - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } + /** + * Get Gson. + * + * @return Gson + */ + public Gson getGson() { + return gson; } - } - - /** Gson TypeAdapter for JSR310 OffsetDateTime type */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + /** + * Set Gson. + * + * @param gson Gson + * @return JSON + */ + public JSON setGson(Gson gson) { + this.gson = gson; + return this; } - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; + public JSON setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + return this; } - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public String serialize(Object obj) { + return gson.toJson(obj); } - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } } - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - 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); - } - } + /** + * Gson TypeAdapter for Byte Array type + */ + public class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } } - } - /** Gson TypeAdapter for JSR310 LocalDate type */ - public class LocalDateTypeAdapter extends TypeAdapter { + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - private DateTimeFormatter formatter; + private DateTimeFormatter formatter; - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } } - } - public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - return this; - } + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; - public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - return this; - } + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } - /** - * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" format - * will be used (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } - private DateFormat dateFormat; + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } - public SqlDateTypeAdapter() {} + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } } - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; + public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + return this; } - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } + public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + return this; } - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); } - return new java.sql.Date( - Instant.from(DateTimeFormatter.ISO_INSTANT.parse(date)).toEpochMilli()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } } - } - /** - * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be used. - */ - public static class DateTypeAdapter extends TypeAdapter { + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { - private DateFormat dateFormat; + private DateFormat dateFormat; - public DateTypeAdapter() {} + public DateTypeAdapter() {} - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = DateTimeFormatter.ISO_INSTANT.format(date.toInstant()); + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } } - out.value(value); - } - } - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); + @Override + public Date read(JsonReader in) throws IOException { try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return Date.from(Instant.from(DateTimeFormatter.ISO_INSTANT.parse(date))); - } catch (ParseException e) { - throw new JsonParseException(e); + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); } } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } } - } - public JSON setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - return this; - } + public JSON setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + return this; + } - public JSON setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - return this; - } } 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 e0dd2ea17b..d3367162d6 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/Pair.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/Pair.java @@ -12,7 +12,7 @@ */ package io.kubernetes.client.openapi; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; 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 97139d50d0..8b7039fdb7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/StringUtil.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/StringUtil.java @@ -12,7 +12,7 @@ */ package io.kubernetes.client.openapi; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") 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/AdmissionregistrationV1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1Api.java index ba26106b5c..84a92a7fcf 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 @@ -115,7 +115,7 @@ public okhttp3.Call createMutatingWebhookConfigurationCall(V1MutatingWebhookConf } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -269,7 +269,7 @@ public okhttp3.Call createValidatingWebhookConfigurationCall(V1ValidatingWebhook } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -466,7 +466,7 @@ public okhttp3.Call deleteCollectionMutatingWebhookConfigurationCall(String pret } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -679,7 +679,7 @@ public okhttp3.Call deleteCollectionValidatingWebhookConfigurationCall(String pr } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -855,7 +855,7 @@ public okhttp3.Call deleteMutatingWebhookConfigurationCall(String name, String p } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1018,7 +1018,7 @@ public okhttp3.Call deleteValidatingWebhookConfigurationCall(String name, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1672,7 +1672,7 @@ public okhttp3.Call patchMutatingWebhookConfigurationCall(String name, V1Patch b } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1840,7 +1840,7 @@ public okhttp3.Call patchValidatingWebhookConfigurationCall(String name, V1Patch } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2249,7 +2249,7 @@ public okhttp3.Call replaceMutatingWebhookConfigurationCall(String name, V1Mutat } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2409,7 +2409,7 @@ public okhttp3.Call replaceValidatingWebhookConfigurationCall(String name, V1Val } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1alpha1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1alpha1Api.java index 0ac67a62b2..4ad04882df 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1alpha1Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1alpha1Api.java @@ -115,7 +115,7 @@ public okhttp3.Call createValidatingAdmissionPolicyCall(V1alpha1ValidatingAdmiss } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -269,7 +269,7 @@ public okhttp3.Call createValidatingAdmissionPolicyBindingCall(V1alpha1Validatin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -466,7 +466,7 @@ public okhttp3.Call deleteCollectionValidatingAdmissionPolicyCall(String pretty, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -679,7 +679,7 @@ public okhttp3.Call deleteCollectionValidatingAdmissionPolicyBindingCall(String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -855,7 +855,7 @@ public okhttp3.Call deleteValidatingAdmissionPolicyCall(String name, String pret } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1018,7 +1018,7 @@ public okhttp3.Call deleteValidatingAdmissionPolicyBindingCall(String name, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1672,7 +1672,7 @@ public okhttp3.Call patchValidatingAdmissionPolicyCall(String name, V1Patch body } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1840,7 +1840,7 @@ public okhttp3.Call patchValidatingAdmissionPolicyBindingCall(String name, V1Pat } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2008,7 +2008,7 @@ public okhttp3.Call patchValidatingAdmissionPolicyStatusCall(String name, V1Patc } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2540,7 +2540,7 @@ public okhttp3.Call replaceValidatingAdmissionPolicyCall(String name, V1alpha1Va } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2700,7 +2700,7 @@ public okhttp3.Call replaceValidatingAdmissionPolicyBindingCall(String name, V1a } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2860,7 +2860,7 @@ public okhttp3.Call replaceValidatingAdmissionPolicyStatusCall(String name, V1al } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1beta1Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1beta1Api.java new file mode 100644 index 0000000000..790d89ea99 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AdmissionregistrationV1beta1Api.java @@ -0,0 +1,2967 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.apis; + +import io.kubernetes.client.openapi.ApiCallback; +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.ApiResponse; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.Pair; +import io.kubernetes.client.openapi.ProgressRequestBody; +import io.kubernetes.client.openapi.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import io.kubernetes.client.openapi.models.V1APIResourceList; +import io.kubernetes.client.openapi.models.V1DeleteOptions; +import io.kubernetes.client.custom.V1Patch; +import io.kubernetes.client.openapi.models.V1Status; +import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicy; +import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyBinding; +import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyBindingList; +import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyList; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AdmissionregistrationV1beta1Api { + private ApiClient localVarApiClient; + + public AdmissionregistrationV1beta1Api() { + this(Configuration.getDefaultApiClient()); + } + + public AdmissionregistrationV1beta1Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for createValidatingAdmissionPolicy + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call createValidatingAdmissionPolicyCall(V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldManager != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); + } + + if (fieldValidation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createValidatingAdmissionPolicyValidateBeforeCall(V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling createValidatingAdmissionPolicy(Async)"); + } + + + okhttp3.Call localVarCall = createValidatingAdmissionPolicyCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); + return localVarCall; + + } + + /** + * + * create a ValidatingAdmissionPolicy + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return V1beta1ValidatingAdmissionPolicy + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicy createValidatingAdmissionPolicy(V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + ApiResponse localVarResp = createValidatingAdmissionPolicyWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); + return localVarResp.getData(); + } + + /** + * + * create a ValidatingAdmissionPolicy + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicy> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public ApiResponse createValidatingAdmissionPolicyWithHttpInfo(V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + okhttp3.Call localVarCall = createValidatingAdmissionPolicyValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * create a ValidatingAdmissionPolicy + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call createValidatingAdmissionPolicyAsync(V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createValidatingAdmissionPolicyValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createValidatingAdmissionPolicyBinding + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call createValidatingAdmissionPolicyBindingCall(V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldManager != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); + } + + if (fieldValidation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createValidatingAdmissionPolicyBindingValidateBeforeCall(V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling createValidatingAdmissionPolicyBinding(Async)"); + } + + + okhttp3.Call localVarCall = createValidatingAdmissionPolicyBindingCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); + return localVarCall; + + } + + /** + * + * create a ValidatingAdmissionPolicyBinding + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return V1beta1ValidatingAdmissionPolicyBinding + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicyBinding createValidatingAdmissionPolicyBinding(V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + ApiResponse localVarResp = createValidatingAdmissionPolicyBindingWithHttpInfo(body, pretty, dryRun, fieldManager, fieldValidation); + return localVarResp.getData(); + } + + /** + * + * create a ValidatingAdmissionPolicyBinding + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicyBinding> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public ApiResponse createValidatingAdmissionPolicyBindingWithHttpInfo(V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + okhttp3.Call localVarCall = createValidatingAdmissionPolicyBindingValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * create a ValidatingAdmissionPolicyBinding + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call createValidatingAdmissionPolicyBindingAsync(V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createValidatingAdmissionPolicyBindingValidateBeforeCall(body, pretty, dryRun, fieldManager, fieldValidation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteCollectionValidatingAdmissionPolicy + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call deleteCollectionValidatingAdmissionPolicyCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (_continue != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldSelector != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); + } + + if (gracePeriodSeconds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); + } + + if (labelSelector != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (orphanDependents != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); + } + + if (propagationPolicy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); + } + + if (resourceVersion != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); + } + + if (resourceVersionMatch != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); + } + + if (sendInitialEvents != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); + } + + if (timeoutSeconds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCollectionValidatingAdmissionPolicyValidateBeforeCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); + return localVarCall; + + } + + /** + * + * delete collection of ValidatingAdmissionPolicy + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param body (optional) + * @return V1Status + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public V1Status deleteCollectionValidatingAdmissionPolicy(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body) throws ApiException { + ApiResponse localVarResp = deleteCollectionValidatingAdmissionPolicyWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); + return localVarResp.getData(); + } + + /** + * + * delete collection of ValidatingAdmissionPolicy + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param body (optional) + * @return ApiResponse<V1Status> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public ApiResponse deleteCollectionValidatingAdmissionPolicyWithHttpInfo(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body) throws ApiException { + okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * delete collection of ValidatingAdmissionPolicy + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call deleteCollectionValidatingAdmissionPolicyAsync(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteCollectionValidatingAdmissionPolicyBinding + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call deleteCollectionValidatingAdmissionPolicyBindingCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (_continue != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldSelector != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); + } + + if (gracePeriodSeconds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); + } + + if (labelSelector != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (orphanDependents != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); + } + + if (propagationPolicy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); + } + + if (resourceVersion != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); + } + + if (resourceVersionMatch != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); + } + + if (sendInitialEvents != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); + } + + if (timeoutSeconds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCollectionValidatingAdmissionPolicyBindingValidateBeforeCall(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyBindingCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); + return localVarCall; + + } + + /** + * + * delete collection of ValidatingAdmissionPolicyBinding + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param body (optional) + * @return V1Status + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public V1Status deleteCollectionValidatingAdmissionPolicyBinding(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body) throws ApiException { + ApiResponse localVarResp = deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body); + return localVarResp.getData(); + } + + /** + * + * delete collection of ValidatingAdmissionPolicyBinding + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param body (optional) + * @return ApiResponse<V1Status> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public ApiResponse deleteCollectionValidatingAdmissionPolicyBindingWithHttpInfo(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body) throws ApiException { + okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyBindingValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * delete collection of ValidatingAdmissionPolicyBinding + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call deleteCollectionValidatingAdmissionPolicyBindingAsync(String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCollectionValidatingAdmissionPolicyBindingValidateBeforeCall(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call deleteValidatingAdmissionPolicyCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (gracePeriodSeconds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); + } + + if (orphanDependents != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); + } + + if (propagationPolicy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteValidatingAdmissionPolicyValidateBeforeCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling deleteValidatingAdmissionPolicy(Async)"); + } + + + okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); + return localVarCall; + + } + + /** + * + * delete a ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param body (optional) + * @return V1Status + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
+ */ + public V1Status deleteValidatingAdmissionPolicy(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { + ApiResponse localVarResp = deleteValidatingAdmissionPolicyWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); + return localVarResp.getData(); + } + + /** + * + * delete a ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param body (optional) + * @return ApiResponse<V1Status> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
+ */ + public ApiResponse deleteValidatingAdmissionPolicyWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { + okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * delete a ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call deleteValidatingAdmissionPolicyAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call deleteValidatingAdmissionPolicyBindingCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (gracePeriodSeconds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("gracePeriodSeconds", gracePeriodSeconds)); + } + + if (orphanDependents != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("orphanDependents", orphanDependents)); + } + + if (propagationPolicy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("propagationPolicy", propagationPolicy)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteValidatingAdmissionPolicyBindingValidateBeforeCall(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling deleteValidatingAdmissionPolicyBinding(Async)"); + } + + + okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyBindingCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); + return localVarCall; + + } + + /** + * + * delete a ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param body (optional) + * @return V1Status + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
+ */ + public V1Status deleteValidatingAdmissionPolicyBinding(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { + ApiResponse localVarResp = deleteValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body); + return localVarResp.getData(); + } + + /** + * + * delete a ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param body (optional) + * @return ApiResponse<V1Status> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
+ */ + public ApiResponse deleteValidatingAdmissionPolicyBindingWithHttpInfo(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { + okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyBindingValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * delete a ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional) + * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. (optional) + * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. (optional) + * @param body (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call deleteValidatingAdmissionPolicyBindingAsync(String name, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteValidatingAdmissionPolicyBindingValidateBeforeCall(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAPIResources + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call getAPIResourcesCall(final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAPIResourcesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = getAPIResourcesCall(_callback); + return localVarCall; + + } + + /** + * + * get available resources + * @return V1APIResourceList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public V1APIResourceList getAPIResources() throws ApiException { + ApiResponse localVarResp = getAPIResourcesWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * + * get available resources + * @return ApiResponse<V1APIResourceList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public ApiResponse getAPIResourcesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getAPIResourcesValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * get available resources + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call getAPIResourcesAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAPIResourcesValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listValidatingAdmissionPolicy + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call listValidatingAdmissionPolicyCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (allowWatchBookmarks != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks)); + } + + if (_continue != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); + } + + if (fieldSelector != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); + } + + if (labelSelector != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (resourceVersion != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); + } + + if (resourceVersionMatch != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); + } + + if (sendInitialEvents != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); + } + + if (timeoutSeconds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); + } + + if (watch != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listValidatingAdmissionPolicyValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = listValidatingAdmissionPolicyCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); + return localVarCall; + + } + + /** + * + * list or watch objects of kind ValidatingAdmissionPolicy + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) + * @return V1beta1ValidatingAdmissionPolicyList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicyList listValidatingAdmissionPolicy(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { + ApiResponse localVarResp = listValidatingAdmissionPolicyWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); + return localVarResp.getData(); + } + + /** + * + * list or watch objects of kind ValidatingAdmissionPolicy + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicyList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public ApiResponse listValidatingAdmissionPolicyWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { + okhttp3.Call localVarCall = listValidatingAdmissionPolicyValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * list or watch objects of kind ValidatingAdmissionPolicy + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call listValidatingAdmissionPolicyAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listValidatingAdmissionPolicyValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listValidatingAdmissionPolicyBinding + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call listValidatingAdmissionPolicyBindingCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (allowWatchBookmarks != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("allowWatchBookmarks", allowWatchBookmarks)); + } + + if (_continue != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("continue", _continue)); + } + + if (fieldSelector != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldSelector", fieldSelector)); + } + + if (labelSelector != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("labelSelector", labelSelector)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (resourceVersion != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersion", resourceVersion)); + } + + if (resourceVersionMatch != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceVersionMatch", resourceVersionMatch)); + } + + if (sendInitialEvents != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sendInitialEvents", sendInitialEvents)); + } + + if (timeoutSeconds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeoutSeconds", timeoutSeconds)); + } + + if (watch != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("watch", watch)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", "application/json;stream=watch", "application/vnd.kubernetes.protobuf;stream=watch" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listValidatingAdmissionPolicyBindingValidateBeforeCall(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = listValidatingAdmissionPolicyBindingCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); + return localVarCall; + + } + + /** + * + * list or watch objects of kind ValidatingAdmissionPolicyBinding + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) + * @return V1beta1ValidatingAdmissionPolicyBindingList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicyBindingList listValidatingAdmissionPolicyBinding(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { + ApiResponse localVarResp = listValidatingAdmissionPolicyBindingWithHttpInfo(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch); + return localVarResp.getData(); + } + + /** + * + * list or watch objects of kind ValidatingAdmissionPolicyBinding + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicyBindingList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public ApiResponse listValidatingAdmissionPolicyBindingWithHttpInfo(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch) throws ApiException { + okhttp3.Call localVarCall = listValidatingAdmissionPolicyBindingValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * list or watch objects of kind ValidatingAdmissionPolicyBinding + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param allowWatchBookmarks allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional) + * @param _continue The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional) + * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional) + * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + * @param limit limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. (optional) + * @param resourceVersion resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param resourceVersionMatch resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset (optional) + * @param sendInitialEvents `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. (optional) + * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. (optional) + * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call listValidatingAdmissionPolicyBindingAsync(String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Boolean sendInitialEvents, Integer timeoutSeconds, Boolean watch, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listValidatingAdmissionPolicyBindingValidateBeforeCall(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, sendInitialEvents, timeoutSeconds, watch, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for patchValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call patchValidatingAdmissionPolicyCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldManager != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); + } + + if (fieldValidation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); + } + + if (force != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchValidatingAdmissionPolicyValidateBeforeCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling patchValidatingAdmissionPolicy(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling patchValidatingAdmissionPolicy(Async)"); + } + + + okhttp3.Call localVarCall = patchValidatingAdmissionPolicyCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); + return localVarCall; + + } + + /** + * + * partially update the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @return V1beta1ValidatingAdmissionPolicy + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicy patchValidatingAdmissionPolicy(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { + ApiResponse localVarResp = patchValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); + return localVarResp.getData(); + } + + /** + * + * partially update the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicy> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public ApiResponse patchValidatingAdmissionPolicyWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { + okhttp3.Call localVarCall = patchValidatingAdmissionPolicyValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * partially update the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call patchValidatingAdmissionPolicyAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchValidatingAdmissionPolicyValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for patchValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call patchValidatingAdmissionPolicyBindingCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldManager != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); + } + + if (fieldValidation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); + } + + if (force != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchValidatingAdmissionPolicyBindingValidateBeforeCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling patchValidatingAdmissionPolicyBinding(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling patchValidatingAdmissionPolicyBinding(Async)"); + } + + + okhttp3.Call localVarCall = patchValidatingAdmissionPolicyBindingCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); + return localVarCall; + + } + + /** + * + * partially update the specified ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @return V1beta1ValidatingAdmissionPolicyBinding + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicyBinding patchValidatingAdmissionPolicyBinding(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { + ApiResponse localVarResp = patchValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); + return localVarResp.getData(); + } + + /** + * + * partially update the specified ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicyBinding> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public ApiResponse patchValidatingAdmissionPolicyBindingWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { + okhttp3.Call localVarCall = patchValidatingAdmissionPolicyBindingValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * partially update the specified ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call patchValidatingAdmissionPolicyBindingAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchValidatingAdmissionPolicyBindingValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for patchValidatingAdmissionPolicyStatus + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call patchValidatingAdmissionPolicyStatusCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldManager != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); + } + + if (fieldValidation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); + } + + if (force != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchValidatingAdmissionPolicyStatusValidateBeforeCall(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling patchValidatingAdmissionPolicyStatus(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling patchValidatingAdmissionPolicyStatus(Async)"); + } + + + okhttp3.Call localVarCall = patchValidatingAdmissionPolicyStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); + return localVarCall; + + } + + /** + * + * partially update status of the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @return V1beta1ValidatingAdmissionPolicy + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicy patchValidatingAdmissionPolicyStatus(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { + ApiResponse localVarResp = patchValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation, force); + return localVarResp.getData(); + } + + /** + * + * partially update status of the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicy> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public ApiResponse patchValidatingAdmissionPolicyStatusWithHttpInfo(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { + okhttp3.Call localVarCall = patchValidatingAdmissionPolicyStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * partially update status of the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call patchValidatingAdmissionPolicyStatusAsync(String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchValidatingAdmissionPolicyStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for readValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call readValidatingAdmissionPolicyCall(String name, String pretty, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call readValidatingAdmissionPolicyValidateBeforeCall(String name, String pretty, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling readValidatingAdmissionPolicy(Async)"); + } + + + okhttp3.Call localVarCall = readValidatingAdmissionPolicyCall(name, pretty, _callback); + return localVarCall; + + } + + /** + * + * read the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @return V1beta1ValidatingAdmissionPolicy + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicy readValidatingAdmissionPolicy(String name, String pretty) throws ApiException { + ApiResponse localVarResp = readValidatingAdmissionPolicyWithHttpInfo(name, pretty); + return localVarResp.getData(); + } + + /** + * + * read the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicy> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public ApiResponse readValidatingAdmissionPolicyWithHttpInfo(String name, String pretty) throws ApiException { + okhttp3.Call localVarCall = readValidatingAdmissionPolicyValidateBeforeCall(name, pretty, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * read the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call readValidatingAdmissionPolicyAsync(String name, String pretty, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = readValidatingAdmissionPolicyValidateBeforeCall(name, pretty, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for readValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call readValidatingAdmissionPolicyBindingCall(String name, String pretty, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call readValidatingAdmissionPolicyBindingValidateBeforeCall(String name, String pretty, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling readValidatingAdmissionPolicyBinding(Async)"); + } + + + okhttp3.Call localVarCall = readValidatingAdmissionPolicyBindingCall(name, pretty, _callback); + return localVarCall; + + } + + /** + * + * read the specified ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @return V1beta1ValidatingAdmissionPolicyBinding + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicyBinding readValidatingAdmissionPolicyBinding(String name, String pretty) throws ApiException { + ApiResponse localVarResp = readValidatingAdmissionPolicyBindingWithHttpInfo(name, pretty); + return localVarResp.getData(); + } + + /** + * + * read the specified ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicyBinding> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public ApiResponse readValidatingAdmissionPolicyBindingWithHttpInfo(String name, String pretty) throws ApiException { + okhttp3.Call localVarCall = readValidatingAdmissionPolicyBindingValidateBeforeCall(name, pretty, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * read the specified ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call readValidatingAdmissionPolicyBindingAsync(String name, String pretty, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = readValidatingAdmissionPolicyBindingValidateBeforeCall(name, pretty, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for readValidatingAdmissionPolicyStatus + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call readValidatingAdmissionPolicyStatusCall(String name, String pretty, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call readValidatingAdmissionPolicyStatusValidateBeforeCall(String name, String pretty, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling readValidatingAdmissionPolicyStatus(Async)"); + } + + + okhttp3.Call localVarCall = readValidatingAdmissionPolicyStatusCall(name, pretty, _callback); + return localVarCall; + + } + + /** + * + * read status of the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @return V1beta1ValidatingAdmissionPolicy + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicy readValidatingAdmissionPolicyStatus(String name, String pretty) throws ApiException { + ApiResponse localVarResp = readValidatingAdmissionPolicyStatusWithHttpInfo(name, pretty); + return localVarResp.getData(); + } + + /** + * + * read status of the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicy> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public ApiResponse readValidatingAdmissionPolicyStatusWithHttpInfo(String name, String pretty) throws ApiException { + okhttp3.Call localVarCall = readValidatingAdmissionPolicyStatusValidateBeforeCall(name, pretty, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * read status of the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 OK -
401 Unauthorized -
+ */ + public okhttp3.Call readValidatingAdmissionPolicyStatusAsync(String name, String pretty, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = readValidatingAdmissionPolicyStatusValidateBeforeCall(name, pretty, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for replaceValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call replaceValidatingAdmissionPolicyCall(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldManager != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); + } + + if (fieldValidation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call replaceValidatingAdmissionPolicyValidateBeforeCall(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling replaceValidatingAdmissionPolicy(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling replaceValidatingAdmissionPolicy(Async)"); + } + + + okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); + return localVarCall; + + } + + /** + * + * replace the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return V1beta1ValidatingAdmissionPolicy + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicy replaceValidatingAdmissionPolicy(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + ApiResponse localVarResp = replaceValidatingAdmissionPolicyWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); + return localVarResp.getData(); + } + + /** + * + * replace the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicy> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public ApiResponse replaceValidatingAdmissionPolicyWithHttpInfo(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * replace the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call replaceValidatingAdmissionPolicyAsync(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for replaceValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call replaceValidatingAdmissionPolicyBindingCall(String name, V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldManager != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); + } + + if (fieldValidation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call replaceValidatingAdmissionPolicyBindingValidateBeforeCall(String name, V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling replaceValidatingAdmissionPolicyBinding(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling replaceValidatingAdmissionPolicyBinding(Async)"); + } + + + okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyBindingCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); + return localVarCall; + + } + + /** + * + * replace the specified ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return V1beta1ValidatingAdmissionPolicyBinding + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicyBinding replaceValidatingAdmissionPolicyBinding(String name, V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + ApiResponse localVarResp = replaceValidatingAdmissionPolicyBindingWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); + return localVarResp.getData(); + } + + /** + * + * replace the specified ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicyBinding> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public ApiResponse replaceValidatingAdmissionPolicyBindingWithHttpInfo(String name, V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyBindingValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * replace the specified ValidatingAdmissionPolicyBinding + * @param name name of the ValidatingAdmissionPolicyBinding (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call replaceValidatingAdmissionPolicyBindingAsync(String name, V1beta1ValidatingAdmissionPolicyBinding body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyBindingValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for replaceValidatingAdmissionPolicyStatus + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call replaceValidatingAdmissionPolicyStatusCall(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status" + .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldManager != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); + } + + if (fieldValidation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call replaceValidatingAdmissionPolicyStatusValidateBeforeCall(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling replaceValidatingAdmissionPolicyStatus(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling replaceValidatingAdmissionPolicyStatus(Async)"); + } + + + okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyStatusCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); + return localVarCall; + + } + + /** + * + * replace status of the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return V1beta1ValidatingAdmissionPolicy + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public V1beta1ValidatingAdmissionPolicy replaceValidatingAdmissionPolicyStatus(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + ApiResponse localVarResp = replaceValidatingAdmissionPolicyStatusWithHttpInfo(name, body, pretty, dryRun, fieldManager, fieldValidation); + return localVarResp.getData(); + } + + /** + * + * replace status of the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @return ApiResponse<V1beta1ValidatingAdmissionPolicy> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public ApiResponse replaceValidatingAdmissionPolicyStatusWithHttpInfo(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { + okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * replace status of the specified ValidatingAdmissionPolicy + * @param name name of the ValidatingAdmissionPolicy (required) + * @param body (required) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
+ */ + public okhttp3.Call replaceValidatingAdmissionPolicyStatusAsync(String name, V1beta1ValidatingAdmissionPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = replaceValidatingAdmissionPolicyStatusValidateBeforeCall(name, body, pretty, dryRun, fieldManager, fieldValidation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} 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 aca2ed018a..a0d967cf11 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 @@ -113,7 +113,7 @@ public okhttp3.Call createCustomResourceDefinitionCall(V1CustomResourceDefinitio } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -310,7 +310,7 @@ public okhttp3.Call deleteCollectionCustomResourceDefinitionCall(String pretty, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -486,7 +486,7 @@ public okhttp3.Call deleteCustomResourceDefinitionCall(String name, String prett } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -947,7 +947,7 @@ public okhttp3.Call patchCustomResourceDefinitionCall(String name, V1Patch body, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1115,7 +1115,7 @@ public okhttp3.Call patchCustomResourceDefinitionStatusCall(String name, V1Patch } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1524,7 +1524,7 @@ public okhttp3.Call replaceCustomResourceDefinitionCall(String name, V1CustomRes } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1684,7 +1684,7 @@ public okhttp3.Call replaceCustomResourceDefinitionStatusCall(String name, V1Cus } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 f7f2ee4586..e98c3cf2e3 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 @@ -113,7 +113,7 @@ public okhttp3.Call createAPIServiceCall(V1APIService body, String pretty, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -273,7 +273,7 @@ public okhttp3.Call deleteAPIServiceCall(String name, String pretty, String dryR } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -473,7 +473,7 @@ public okhttp3.Call deleteCollectionAPIServiceCall(String pretty, String _contin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -947,7 +947,7 @@ public okhttp3.Call patchAPIServiceCall(String name, V1Patch body, String pretty } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1115,7 +1115,7 @@ public okhttp3.Call patchAPIServiceStatusCall(String name, V1Patch body, String } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1524,7 +1524,7 @@ public okhttp3.Call replaceAPIServiceCall(String name, V1APIService body, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1684,7 +1684,7 @@ public okhttp3.Call replaceAPIServiceStatusCall(String name, V1APIService body, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 48c9a25125..498ba1d9c5 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 @@ -124,7 +124,7 @@ public okhttp3.Call createNamespacedControllerRevisionCall(String namespace, V1C } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -288,7 +288,7 @@ public okhttp3.Call createNamespacedDaemonSetCall(String namespace, V1DaemonSet } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -452,7 +452,7 @@ public okhttp3.Call createNamespacedDeploymentCall(String namespace, V1Deploymen } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -616,7 +616,7 @@ public okhttp3.Call createNamespacedReplicaSetCall(String namespace, V1ReplicaSe } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -780,7 +780,7 @@ public okhttp3.Call createNamespacedStatefulSetCall(String namespace, V1Stateful } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -987,7 +987,7 @@ public okhttp3.Call deleteCollectionNamespacedControllerRevisionCall(String name } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1210,7 +1210,7 @@ public okhttp3.Call deleteCollectionNamespacedDaemonSetCall(String namespace, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1433,7 +1433,7 @@ public okhttp3.Call deleteCollectionNamespacedDeploymentCall(String namespace, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1656,7 +1656,7 @@ public okhttp3.Call deleteCollectionNamespacedReplicaSetCall(String namespace, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1879,7 +1879,7 @@ public okhttp3.Call deleteCollectionNamespacedStatefulSetCall(String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2065,7 +2065,7 @@ public okhttp3.Call deleteNamespacedControllerRevisionCall(String name, String n } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2238,7 +2238,7 @@ public okhttp3.Call deleteNamespacedDaemonSetCall(String name, String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2411,7 +2411,7 @@ public okhttp3.Call deleteNamespacedDeploymentCall(String name, String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2584,7 +2584,7 @@ public okhttp3.Call deleteNamespacedReplicaSetCall(String name, String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2757,7 +2757,7 @@ public okhttp3.Call deleteNamespacedStatefulSetCall(String name, String namespac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5015,7 +5015,7 @@ public okhttp3.Call patchNamespacedControllerRevisionCall(String name, String na } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5193,7 +5193,7 @@ public okhttp3.Call patchNamespacedDaemonSetCall(String name, String namespace, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5371,7 +5371,7 @@ public okhttp3.Call patchNamespacedDaemonSetStatusCall(String name, String names } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5549,7 +5549,7 @@ public okhttp3.Call patchNamespacedDeploymentCall(String name, String namespace, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5727,7 +5727,7 @@ public okhttp3.Call patchNamespacedDeploymentScaleCall(String name, String names } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5905,7 +5905,7 @@ public okhttp3.Call patchNamespacedDeploymentStatusCall(String name, String name } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6083,7 +6083,7 @@ public okhttp3.Call patchNamespacedReplicaSetCall(String name, String namespace, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6261,7 +6261,7 @@ public okhttp3.Call patchNamespacedReplicaSetScaleCall(String name, String names } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6439,7 +6439,7 @@ public okhttp3.Call patchNamespacedReplicaSetStatusCall(String name, String name } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6617,7 +6617,7 @@ public okhttp3.Call patchNamespacedStatefulSetCall(String name, String namespace } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6795,7 +6795,7 @@ public okhttp3.Call patchNamespacedStatefulSetScaleCall(String name, String name } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6973,7 +6973,7 @@ public okhttp3.Call patchNamespacedStatefulSetStatusCall(String name, String nam } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -8742,7 +8742,7 @@ public okhttp3.Call replaceNamespacedControllerRevisionCall(String name, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -8912,7 +8912,7 @@ public okhttp3.Call replaceNamespacedDaemonSetCall(String name, String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9082,7 +9082,7 @@ public okhttp3.Call replaceNamespacedDaemonSetStatusCall(String name, String nam } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9252,7 +9252,7 @@ public okhttp3.Call replaceNamespacedDeploymentCall(String name, String namespac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9422,7 +9422,7 @@ public okhttp3.Call replaceNamespacedDeploymentScaleCall(String name, String nam } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9592,7 +9592,7 @@ public okhttp3.Call replaceNamespacedDeploymentStatusCall(String name, String na } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9762,7 +9762,7 @@ public okhttp3.Call replaceNamespacedReplicaSetCall(String name, String namespac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9932,7 +9932,7 @@ public okhttp3.Call replaceNamespacedReplicaSetScaleCall(String name, String nam } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -10102,7 +10102,7 @@ public okhttp3.Call replaceNamespacedReplicaSetStatusCall(String name, String na } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -10272,7 +10272,7 @@ public okhttp3.Call replaceNamespacedStatefulSetCall(String name, String namespa } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -10442,7 +10442,7 @@ public okhttp3.Call replaceNamespacedStatefulSetScaleCall(String name, String na } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -10612,7 +10612,7 @@ public okhttp3.Call replaceNamespacedStatefulSetStatusCall(String name, String n } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 051d0dc962..7c824818bb 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 @@ -27,6 +27,7 @@ import io.kubernetes.client.openapi.models.V1APIResourceList; +import io.kubernetes.client.openapi.models.V1SelfSubjectReview; import io.kubernetes.client.openapi.models.V1TokenReview; import java.lang.reflect.Type; @@ -54,6 +55,160 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + /** + * Build call for createSelfSubjectReview + * @param body (required) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call createSelfSubjectReviewCall(V1SelfSubjectReview body, String dryRun, String fieldManager, String fieldValidation, String pretty, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/apis/authentication.k8s.io/v1/selfsubjectreviews"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + + if (fieldManager != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); + } + + if (fieldValidation != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); + } + + if (pretty != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); + } + + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + final String[] localVarAccepts = { + "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "BearerToken" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createSelfSubjectReviewValidateBeforeCall(V1SelfSubjectReview body, String dryRun, String fieldManager, String fieldValidation, String pretty, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling createSelfSubjectReview(Async)"); + } + + + okhttp3.Call localVarCall = createSelfSubjectReviewCall(body, dryRun, fieldManager, fieldValidation, pretty, _callback); + return localVarCall; + + } + + /** + * + * create a SelfSubjectReview + * @param body (required) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @return V1SelfSubjectReview + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public V1SelfSubjectReview createSelfSubjectReview(V1SelfSubjectReview body, String dryRun, String fieldManager, String fieldValidation, String pretty) throws ApiException { + ApiResponse localVarResp = createSelfSubjectReviewWithHttpInfo(body, dryRun, fieldManager, fieldValidation, pretty); + return localVarResp.getData(); + } + + /** + * + * create a SelfSubjectReview + * @param body (required) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @return ApiResponse<V1SelfSubjectReview> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public ApiResponse createSelfSubjectReviewWithHttpInfo(V1SelfSubjectReview body, String dryRun, String fieldManager, String fieldValidation, String pretty) throws ApiException { + okhttp3.Call localVarCall = createSelfSubjectReviewValidateBeforeCall(body, dryRun, fieldManager, fieldValidation, pretty, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * create a SelfSubjectReview + * @param body (required) + * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) + * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) + * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + * @param pretty If 'true', then the output is pretty printed. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
201 Created -
202 Accepted -
401 Unauthorized -
+ */ + public okhttp3.Call createSelfSubjectReviewAsync(V1SelfSubjectReview body, String dryRun, String fieldManager, String fieldValidation, String pretty, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createSelfSubjectReviewValidateBeforeCall(body, dryRun, fieldManager, fieldValidation, pretty, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for createTokenReview * @param body (required) @@ -109,7 +264,7 @@ public okhttp3.Call createTokenReviewCall(V1TokenReview body, String dryRun, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 bbff62f398..865de49245 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 @@ -109,7 +109,7 @@ public okhttp3.Call createSelfSubjectReviewCall(V1alpha1SelfSubjectReview body, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 a9cf2c9f87..3be857a628 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 @@ -109,7 +109,7 @@ public okhttp3.Call createSelfSubjectReviewCall(V1beta1SelfSubjectReview body, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 79421720f1..79d9c74bf2 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 @@ -114,7 +114,7 @@ public okhttp3.Call createNamespacedLocalSubjectAccessReviewCall(String namespac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -276,7 +276,7 @@ public okhttp3.Call createSelfSubjectAccessReviewCall(V1SelfSubjectAccessReview } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -430,7 +430,7 @@ public okhttp3.Call createSelfSubjectRulesReviewCall(V1SelfSubjectRulesReview bo } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -584,7 +584,7 @@ public okhttp3.Call createSubjectAccessReviewCall(V1SubjectAccessReview body, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 d69dc288f6..8f2cd84177 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 @@ -115,7 +115,7 @@ public okhttp3.Call createNamespacedHorizontalPodAutoscalerCall(String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -322,7 +322,7 @@ public okhttp3.Call deleteCollectionNamespacedHorizontalPodAutoscalerCall(String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -508,7 +508,7 @@ public okhttp3.Call deleteNamespacedHorizontalPodAutoscalerCall(String name, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1182,7 +1182,7 @@ public okhttp3.Call patchNamespacedHorizontalPodAutoscalerCall(String name, Stri } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1360,7 +1360,7 @@ public okhttp3.Call patchNamespacedHorizontalPodAutoscalerStatusCall(String name } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1799,7 +1799,7 @@ public okhttp3.Call replaceNamespacedHorizontalPodAutoscalerCall(String name, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1969,7 +1969,7 @@ public okhttp3.Call replaceNamespacedHorizontalPodAutoscalerStatusCall(String na } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 01488403e2..79aca8448e 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 @@ -115,7 +115,7 @@ public okhttp3.Call createNamespacedHorizontalPodAutoscalerCall(String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -322,7 +322,7 @@ public okhttp3.Call deleteCollectionNamespacedHorizontalPodAutoscalerCall(String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -508,7 +508,7 @@ public okhttp3.Call deleteNamespacedHorizontalPodAutoscalerCall(String name, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1182,7 +1182,7 @@ public okhttp3.Call patchNamespacedHorizontalPodAutoscalerCall(String name, Stri } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1360,7 +1360,7 @@ public okhttp3.Call patchNamespacedHorizontalPodAutoscalerStatusCall(String name } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1799,7 +1799,7 @@ public okhttp3.Call replaceNamespacedHorizontalPodAutoscalerCall(String name, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1969,7 +1969,7 @@ public okhttp3.Call replaceNamespacedHorizontalPodAutoscalerStatusCall(String na } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 72dc2cca71..37b2753899 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 @@ -117,7 +117,7 @@ public okhttp3.Call createNamespacedCronJobCall(String namespace, V1CronJob body } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -281,7 +281,7 @@ public okhttp3.Call createNamespacedJobCall(String namespace, V1Job body, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -488,7 +488,7 @@ public okhttp3.Call deleteCollectionNamespacedCronJobCall(String namespace, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -711,7 +711,7 @@ public okhttp3.Call deleteCollectionNamespacedJobCall(String namespace, String p } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -897,7 +897,7 @@ public okhttp3.Call deleteNamespacedCronJobCall(String name, String namespace, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1070,7 +1070,7 @@ public okhttp3.Call deleteNamespacedJobCall(String name, String namespace, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2140,7 +2140,7 @@ public okhttp3.Call patchNamespacedCronJobCall(String name, String namespace, V1 } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2318,7 +2318,7 @@ public okhttp3.Call patchNamespacedCronJobStatusCall(String name, String namespa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2496,7 +2496,7 @@ public okhttp3.Call patchNamespacedJobCall(String name, String namespace, V1Patc } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2674,7 +2674,7 @@ public okhttp3.Call patchNamespacedJobStatusCall(String name, String namespace, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3379,7 +3379,7 @@ public okhttp3.Call replaceNamespacedCronJobCall(String name, String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3549,7 +3549,7 @@ public okhttp3.Call replaceNamespacedCronJobStatusCall(String name, String names } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3719,7 +3719,7 @@ public okhttp3.Call replaceNamespacedJobCall(String name, String namespace, V1Jo } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3889,7 +3889,7 @@ public okhttp3.Call replaceNamespacedJobStatusCall(String name, String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 7c919f5518..6ccbf67a02 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 @@ -113,7 +113,7 @@ public okhttp3.Call createCertificateSigningRequestCall(V1CertificateSigningRequ } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -273,7 +273,7 @@ public okhttp3.Call deleteCertificateSigningRequestCall(String name, String pret } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -473,7 +473,7 @@ public okhttp3.Call deleteCollectionCertificateSigningRequestCall(String pretty, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -947,7 +947,7 @@ public okhttp3.Call patchCertificateSigningRequestCall(String name, V1Patch body } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1115,7 +1115,7 @@ public okhttp3.Call patchCertificateSigningRequestApprovalCall(String name, V1Pa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1283,7 +1283,7 @@ public okhttp3.Call patchCertificateSigningRequestStatusCall(String name, V1Patc } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1815,7 +1815,7 @@ public okhttp3.Call replaceCertificateSigningRequestCall(String name, V1Certific } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1975,7 +1975,7 @@ public okhttp3.Call replaceCertificateSigningRequestApprovalCall(String name, V1 } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2135,7 +2135,7 @@ public okhttp3.Call replaceCertificateSigningRequestStatusCall(String name, V1Ce } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 4070ba853c..8a2b9fe745 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 @@ -113,7 +113,7 @@ public okhttp3.Call createClusterTrustBundleCall(V1alpha1ClusterTrustBundle body } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -273,7 +273,7 @@ public okhttp3.Call deleteClusterTrustBundleCall(String name, String pretty, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -473,7 +473,7 @@ public okhttp3.Call deleteCollectionClusterTrustBundleCall(String pretty, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -947,7 +947,7 @@ public okhttp3.Call patchClusterTrustBundleCall(String name, V1Patch body, Strin } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1233,7 +1233,7 @@ public okhttp3.Call replaceClusterTrustBundleCall(String name, V1alpha1ClusterTr } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 2df82caab4..e25126f786 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 @@ -115,7 +115,7 @@ public okhttp3.Call createNamespacedLeaseCall(String namespace, V1Lease body, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -322,7 +322,7 @@ public okhttp3.Call deleteCollectionNamespacedLeaseCall(String namespace, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -508,7 +508,7 @@ public okhttp3.Call deleteNamespacedLeaseCall(String name, String namespace, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1182,7 +1182,7 @@ public okhttp3.Call patchNamespacedLeaseCall(String name, String namespace, V1Pa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1488,7 +1488,7 @@ public okhttp3.Call replaceNamespacedLeaseCall(String name, String namespace, V1 } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 f0d839446b..c802918001 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 @@ -6745,7 +6745,7 @@ public okhttp3.Call createNamespaceCall(V1Namespace body, String pretty, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6901,7 +6901,7 @@ public okhttp3.Call createNamespacedBindingCall(String namespace, V1Binding body } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -7065,7 +7065,7 @@ public okhttp3.Call createNamespacedConfigMapCall(String namespace, V1ConfigMap } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -7229,7 +7229,7 @@ public okhttp3.Call createNamespacedEndpointsCall(String namespace, V1Endpoints } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -7393,7 +7393,7 @@ public okhttp3.Call createNamespacedEventCall(String namespace, CoreV1Event body } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -7557,7 +7557,7 @@ public okhttp3.Call createNamespacedLimitRangeCall(String namespace, V1LimitRang } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -7721,7 +7721,7 @@ public okhttp3.Call createNamespacedPersistentVolumeClaimCall(String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -7885,7 +7885,7 @@ public okhttp3.Call createNamespacedPodCall(String namespace, V1Pod body, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -8051,7 +8051,7 @@ public okhttp3.Call createNamespacedPodBindingCall(String name, String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -8225,7 +8225,7 @@ public okhttp3.Call createNamespacedPodEvictionCall(String name, String namespac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -8397,7 +8397,7 @@ public okhttp3.Call createNamespacedPodTemplateCall(String namespace, V1PodTempl } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -8561,7 +8561,7 @@ public okhttp3.Call createNamespacedReplicationControllerCall(String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -8725,7 +8725,7 @@ public okhttp3.Call createNamespacedResourceQuotaCall(String namespace, V1Resour } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -8889,7 +8889,7 @@ public okhttp3.Call createNamespacedSecretCall(String namespace, V1Secret body, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9053,7 +9053,7 @@ public okhttp3.Call createNamespacedServiceCall(String namespace, V1Service body } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9217,7 +9217,7 @@ public okhttp3.Call createNamespacedServiceAccountCall(String namespace, V1Servi } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9383,7 +9383,7 @@ public okhttp3.Call createNamespacedServiceAccountTokenCall(String name, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9553,7 +9553,7 @@ public okhttp3.Call createNodeCall(V1Node body, String pretty, String dryRun, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9707,7 +9707,7 @@ public okhttp3.Call createPersistentVolumeCall(V1PersistentVolume body, String p } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -9906,7 +9906,7 @@ public okhttp3.Call deleteCollectionNamespacedConfigMapCall(String namespace, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -10129,7 +10129,7 @@ public okhttp3.Call deleteCollectionNamespacedEndpointsCall(String namespace, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -10352,7 +10352,7 @@ public okhttp3.Call deleteCollectionNamespacedEventCall(String namespace, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -10575,7 +10575,7 @@ public okhttp3.Call deleteCollectionNamespacedLimitRangeCall(String namespace, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -10798,7 +10798,7 @@ public okhttp3.Call deleteCollectionNamespacedPersistentVolumeClaimCall(String n } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -11021,7 +11021,7 @@ public okhttp3.Call deleteCollectionNamespacedPodCall(String namespace, String p } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -11244,7 +11244,7 @@ public okhttp3.Call deleteCollectionNamespacedPodTemplateCall(String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -11467,7 +11467,7 @@ public okhttp3.Call deleteCollectionNamespacedReplicationControllerCall(String n } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -11690,7 +11690,7 @@ public okhttp3.Call deleteCollectionNamespacedResourceQuotaCall(String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -11913,7 +11913,7 @@ public okhttp3.Call deleteCollectionNamespacedSecretCall(String namespace, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -12136,7 +12136,7 @@ public okhttp3.Call deleteCollectionNamespacedServiceCall(String namespace, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -12359,7 +12359,7 @@ public okhttp3.Call deleteCollectionNamespacedServiceAccountCall(String namespac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -12580,7 +12580,7 @@ public okhttp3.Call deleteCollectionNodeCall(String pretty, String _continue, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -12793,7 +12793,7 @@ public okhttp3.Call deleteCollectionPersistentVolumeCall(String pretty, String _ } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -12969,7 +12969,7 @@ public okhttp3.Call deleteNamespaceCall(String name, String pretty, String dryRu } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -13134,7 +13134,7 @@ public okhttp3.Call deleteNamespacedConfigMapCall(String name, String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -13307,7 +13307,7 @@ public okhttp3.Call deleteNamespacedEndpointsCall(String name, String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -13480,7 +13480,7 @@ public okhttp3.Call deleteNamespacedEventCall(String name, String namespace, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -13653,7 +13653,7 @@ public okhttp3.Call deleteNamespacedLimitRangeCall(String name, String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -13826,7 +13826,7 @@ public okhttp3.Call deleteNamespacedPersistentVolumeClaimCall(String name, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -13999,7 +13999,7 @@ public okhttp3.Call deleteNamespacedPodCall(String name, String namespace, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -14172,7 +14172,7 @@ public okhttp3.Call deleteNamespacedPodTemplateCall(String name, String namespac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -14345,7 +14345,7 @@ public okhttp3.Call deleteNamespacedReplicationControllerCall(String name, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -14518,7 +14518,7 @@ public okhttp3.Call deleteNamespacedResourceQuotaCall(String name, String namesp } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -14691,7 +14691,7 @@ public okhttp3.Call deleteNamespacedSecretCall(String name, String namespace, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -14864,7 +14864,7 @@ public okhttp3.Call deleteNamespacedServiceCall(String name, String namespace, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -15037,7 +15037,7 @@ public okhttp3.Call deleteNamespacedServiceAccountCall(String name, String names } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -15208,7 +15208,7 @@ public okhttp3.Call deleteNodeCall(String name, String pretty, String dryRun, In } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -15371,7 +15371,7 @@ public okhttp3.Call deletePersistentVolumeCall(String name, String pretty, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -21163,7 +21163,7 @@ public okhttp3.Call patchNamespaceCall(String name, V1Patch body, String pretty, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -21331,7 +21331,7 @@ public okhttp3.Call patchNamespaceStatusCall(String name, V1Patch body, String p } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -21501,7 +21501,7 @@ public okhttp3.Call patchNamespacedConfigMapCall(String name, String namespace, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -21679,7 +21679,7 @@ public okhttp3.Call patchNamespacedEndpointsCall(String name, String namespace, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -21857,7 +21857,7 @@ public okhttp3.Call patchNamespacedEventCall(String name, String namespace, V1Pa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -22035,7 +22035,7 @@ public okhttp3.Call patchNamespacedLimitRangeCall(String name, String namespace, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -22213,7 +22213,7 @@ public okhttp3.Call patchNamespacedPersistentVolumeClaimCall(String name, String } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -22391,7 +22391,7 @@ public okhttp3.Call patchNamespacedPersistentVolumeClaimStatusCall(String name, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -22569,7 +22569,7 @@ public okhttp3.Call patchNamespacedPodCall(String name, String namespace, V1Patc } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -22747,7 +22747,7 @@ public okhttp3.Call patchNamespacedPodEphemeralcontainersCall(String name, Strin } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -22925,7 +22925,7 @@ public okhttp3.Call patchNamespacedPodStatusCall(String name, String namespace, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -23103,7 +23103,7 @@ public okhttp3.Call patchNamespacedPodTemplateCall(String name, String namespace } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -23281,7 +23281,7 @@ public okhttp3.Call patchNamespacedReplicationControllerCall(String name, String } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -23459,7 +23459,7 @@ public okhttp3.Call patchNamespacedReplicationControllerScaleCall(String name, S } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -23637,7 +23637,7 @@ public okhttp3.Call patchNamespacedReplicationControllerStatusCall(String name, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -23815,7 +23815,7 @@ public okhttp3.Call patchNamespacedResourceQuotaCall(String name, String namespa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -23993,7 +23993,7 @@ public okhttp3.Call patchNamespacedResourceQuotaStatusCall(String name, String n } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -24171,7 +24171,7 @@ public okhttp3.Call patchNamespacedSecretCall(String name, String namespace, V1P } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -24349,7 +24349,7 @@ public okhttp3.Call patchNamespacedServiceCall(String name, String namespace, V1 } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -24527,7 +24527,7 @@ public okhttp3.Call patchNamespacedServiceAccountCall(String name, String namesp } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -24705,7 +24705,7 @@ public okhttp3.Call patchNamespacedServiceStatusCall(String name, String namespa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -24881,7 +24881,7 @@ public okhttp3.Call patchNodeCall(String name, V1Patch body, String pretty, Stri } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -25049,7 +25049,7 @@ public okhttp3.Call patchNodeStatusCall(String name, V1Patch body, String pretty } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -25217,7 +25217,7 @@ public okhttp3.Call patchPersistentVolumeCall(String name, V1Patch body, String } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -25385,7 +25385,7 @@ public okhttp3.Call patchPersistentVolumeStatusCall(String name, V1Patch body, S } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -29133,7 +29133,7 @@ public okhttp3.Call replaceNamespaceCall(String name, V1Namespace body, String p } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -29293,7 +29293,7 @@ public okhttp3.Call replaceNamespaceFinalizeCall(String name, V1Namespace body, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -29453,7 +29453,7 @@ public okhttp3.Call replaceNamespaceStatusCall(String name, V1Namespace body, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -29615,7 +29615,7 @@ public okhttp3.Call replaceNamespacedConfigMapCall(String name, String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -29785,7 +29785,7 @@ public okhttp3.Call replaceNamespacedEndpointsCall(String name, String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -29955,7 +29955,7 @@ public okhttp3.Call replaceNamespacedEventCall(String name, String namespace, Co } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -30125,7 +30125,7 @@ public okhttp3.Call replaceNamespacedLimitRangeCall(String name, String namespac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -30295,7 +30295,7 @@ public okhttp3.Call replaceNamespacedPersistentVolumeClaimCall(String name, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -30465,7 +30465,7 @@ public okhttp3.Call replaceNamespacedPersistentVolumeClaimStatusCall(String name } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -30635,7 +30635,7 @@ public okhttp3.Call replaceNamespacedPodCall(String name, String namespace, V1Po } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -30805,7 +30805,7 @@ public okhttp3.Call replaceNamespacedPodEphemeralcontainersCall(String name, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -30975,7 +30975,7 @@ public okhttp3.Call replaceNamespacedPodStatusCall(String name, String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -31145,7 +31145,7 @@ public okhttp3.Call replaceNamespacedPodTemplateCall(String name, String namespa } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -31315,7 +31315,7 @@ public okhttp3.Call replaceNamespacedReplicationControllerCall(String name, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -31485,7 +31485,7 @@ public okhttp3.Call replaceNamespacedReplicationControllerScaleCall(String name, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -31655,7 +31655,7 @@ public okhttp3.Call replaceNamespacedReplicationControllerStatusCall(String name } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -31825,7 +31825,7 @@ public okhttp3.Call replaceNamespacedResourceQuotaCall(String name, String names } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -31995,7 +31995,7 @@ public okhttp3.Call replaceNamespacedResourceQuotaStatusCall(String name, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -32165,7 +32165,7 @@ public okhttp3.Call replaceNamespacedSecretCall(String name, String namespace, V } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -32335,7 +32335,7 @@ public okhttp3.Call replaceNamespacedServiceCall(String name, String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -32505,7 +32505,7 @@ public okhttp3.Call replaceNamespacedServiceAccountCall(String name, String name } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -32675,7 +32675,7 @@ public okhttp3.Call replaceNamespacedServiceStatusCall(String name, String names } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -32843,7 +32843,7 @@ public okhttp3.Call replaceNodeCall(String name, V1Node body, String pretty, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -33003,7 +33003,7 @@ public okhttp3.Call replaceNodeStatusCall(String name, V1Node body, String prett } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -33163,7 +33163,7 @@ public okhttp3.Call replacePersistentVolumeCall(String name, V1PersistentVolume } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -33323,7 +33323,7 @@ public okhttp3.Call replacePersistentVolumeStatusCall(String name, V1PersistentV } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 6e9eebe5d7..0d6254c1e9 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 @@ -108,7 +108,7 @@ public okhttp3.Call createClusterCustomObjectCall(String group, String version, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -278,7 +278,7 @@ public okhttp3.Call createNamespacedCustomObjectCall(String group, String versio } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -461,7 +461,7 @@ public okhttp3.Call deleteClusterCustomObjectCall(String group, String version, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -645,7 +645,7 @@ public okhttp3.Call deleteCollectionClusterCustomObjectCall(String group, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -826,7 +826,7 @@ public okhttp3.Call deleteCollectionNamespacedCustomObjectCall(String group, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1012,7 +1012,7 @@ public okhttp3.Call deleteNamespacedCustomObjectCall(String group, String versio } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2661,7 +2661,7 @@ public okhttp3.Call patchClusterCustomObjectCall(String group, String version, S } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2839,7 +2839,7 @@ public okhttp3.Call patchClusterCustomObjectScaleCall(String group, String versi } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3017,7 +3017,7 @@ public okhttp3.Call patchClusterCustomObjectStatusCall(String group, String vers } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3197,7 +3197,7 @@ public okhttp3.Call patchNamespacedCustomObjectCall(String group, String version } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3385,7 +3385,7 @@ public okhttp3.Call patchNamespacedCustomObjectScaleCall(String group, String ve } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3573,7 +3573,7 @@ public okhttp3.Call patchNamespacedCustomObjectStatusCall(String group, String v } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3754,7 +3754,7 @@ public okhttp3.Call replaceClusterCustomObjectCall(String group, String version, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3925,7 +3925,7 @@ public okhttp3.Call replaceClusterCustomObjectScaleCall(String group, String ver } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4099,7 +4099,7 @@ public okhttp3.Call replaceClusterCustomObjectStatusCall(String group, String ve } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4274,7 +4274,7 @@ public okhttp3.Call replaceNamespacedCustomObjectCall(String group, String versi } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4455,7 +4455,7 @@ public okhttp3.Call replaceNamespacedCustomObjectScaleCall(String group, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4639,7 +4639,7 @@ public okhttp3.Call replaceNamespacedCustomObjectStatusCall(String group, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 982110681f..1963ed05ef 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 @@ -115,7 +115,7 @@ public okhttp3.Call createNamespacedEndpointSliceCall(String namespace, V1Endpoi } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -322,7 +322,7 @@ public okhttp3.Call deleteCollectionNamespacedEndpointSliceCall(String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -508,7 +508,7 @@ public okhttp3.Call deleteNamespacedEndpointSliceCall(String name, String namesp } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1182,7 +1182,7 @@ public okhttp3.Call patchNamespacedEndpointSliceCall(String name, String namespa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1488,7 +1488,7 @@ public okhttp3.Call replaceNamespacedEndpointSliceCall(String name, String names } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 8a4f03214c..9d6d151c79 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 @@ -115,7 +115,7 @@ public okhttp3.Call createNamespacedEventCall(String namespace, EventsV1Event bo } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -322,7 +322,7 @@ public okhttp3.Call deleteCollectionNamespacedEventCall(String namespace, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -508,7 +508,7 @@ public okhttp3.Call deleteNamespacedEventCall(String name, String namespace, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1182,7 +1182,7 @@ public okhttp3.Call patchNamespacedEventCall(String name, String namespace, V1Pa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1488,7 +1488,7 @@ public okhttp3.Call replaceNamespacedEventCall(String name, String namespace, Ev } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta2Api.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta2Api.java index 14a6a7c496..4ab7e710a9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta2Api.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta2Api.java @@ -115,7 +115,7 @@ public okhttp3.Call createFlowSchemaCall(V1beta2FlowSchema body, String pretty, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -269,7 +269,7 @@ public okhttp3.Call createPriorityLevelConfigurationCall(V1beta2PriorityLevelCon } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -466,7 +466,7 @@ public okhttp3.Call deleteCollectionFlowSchemaCall(String pretty, String _contin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -679,7 +679,7 @@ public okhttp3.Call deleteCollectionPriorityLevelConfigurationCall(String pretty } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -855,7 +855,7 @@ public okhttp3.Call deleteFlowSchemaCall(String name, String pretty, String dryR } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1018,7 +1018,7 @@ public okhttp3.Call deletePriorityLevelConfigurationCall(String name, String pre } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1672,7 +1672,7 @@ public okhttp3.Call patchFlowSchemaCall(String name, V1Patch body, String pretty } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1840,7 +1840,7 @@ public okhttp3.Call patchFlowSchemaStatusCall(String name, V1Patch body, String } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2008,7 +2008,7 @@ public okhttp3.Call patchPriorityLevelConfigurationCall(String name, V1Patch bod } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2176,7 +2176,7 @@ public okhttp3.Call patchPriorityLevelConfigurationStatusCall(String name, V1Pat } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2831,7 +2831,7 @@ public okhttp3.Call replaceFlowSchemaCall(String name, V1beta2FlowSchema body, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2991,7 +2991,7 @@ public okhttp3.Call replaceFlowSchemaStatusCall(String name, V1beta2FlowSchema b } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3151,7 +3151,7 @@ public okhttp3.Call replacePriorityLevelConfigurationCall(String name, V1beta2Pr } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3311,7 +3311,7 @@ public okhttp3.Call replacePriorityLevelConfigurationStatusCall(String name, V1b } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 59f175981d..47cf316679 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 @@ -115,7 +115,7 @@ public okhttp3.Call createFlowSchemaCall(V1beta3FlowSchema body, String pretty, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -269,7 +269,7 @@ public okhttp3.Call createPriorityLevelConfigurationCall(V1beta3PriorityLevelCon } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -466,7 +466,7 @@ public okhttp3.Call deleteCollectionFlowSchemaCall(String pretty, String _contin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -679,7 +679,7 @@ public okhttp3.Call deleteCollectionPriorityLevelConfigurationCall(String pretty } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -855,7 +855,7 @@ public okhttp3.Call deleteFlowSchemaCall(String name, String pretty, String dryR } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1018,7 +1018,7 @@ public okhttp3.Call deletePriorityLevelConfigurationCall(String name, String pre } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1672,7 +1672,7 @@ public okhttp3.Call patchFlowSchemaCall(String name, V1Patch body, String pretty } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1840,7 +1840,7 @@ public okhttp3.Call patchFlowSchemaStatusCall(String name, V1Patch body, String } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2008,7 +2008,7 @@ public okhttp3.Call patchPriorityLevelConfigurationCall(String name, V1Patch bod } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2176,7 +2176,7 @@ public okhttp3.Call patchPriorityLevelConfigurationStatusCall(String name, V1Pat } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2831,7 +2831,7 @@ public okhttp3.Call replaceFlowSchemaCall(String name, V1beta3FlowSchema body, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2991,7 +2991,7 @@ public okhttp3.Call replaceFlowSchemaStatusCall(String name, V1beta3FlowSchema b } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3151,7 +3151,7 @@ public okhttp3.Call replacePriorityLevelConfigurationCall(String name, V1beta3Pr } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3311,7 +3311,7 @@ public okhttp3.Call replacePriorityLevelConfigurationStatusCall(String name, V1b } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 99eaf225d9..00084c702d 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 @@ -113,7 +113,7 @@ public okhttp3.Call createStorageVersionCall(V1alpha1StorageVersion body, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -310,7 +310,7 @@ public okhttp3.Call deleteCollectionStorageVersionCall(String pretty, String _co } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -486,7 +486,7 @@ public okhttp3.Call deleteStorageVersionCall(String name, String pretty, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -947,7 +947,7 @@ public okhttp3.Call patchStorageVersionCall(String name, V1Patch body, String pr } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1115,7 +1115,7 @@ public okhttp3.Call patchStorageVersionStatusCall(String name, V1Patch body, Str } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1524,7 +1524,7 @@ public okhttp3.Call replaceStorageVersionCall(String name, V1alpha1StorageVersio } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1684,7 +1684,7 @@ public okhttp3.Call replaceStorageVersionStatusCall(String name, V1alpha1Storage } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 882ef3d0ae..da3a487bdd 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 @@ -117,7 +117,7 @@ public okhttp3.Call createIngressClassCall(V1IngressClass body, String pretty, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -273,7 +273,7 @@ public okhttp3.Call createNamespacedIngressCall(String namespace, V1Ingress body } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -437,7 +437,7 @@ public okhttp3.Call createNamespacedNetworkPolicyCall(String namespace, V1Networ } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -642,7 +642,7 @@ public okhttp3.Call deleteCollectionIngressClassCall(String pretty, String _cont } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -857,7 +857,7 @@ public okhttp3.Call deleteCollectionNamespacedIngressCall(String namespace, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1080,7 +1080,7 @@ public okhttp3.Call deleteCollectionNamespacedNetworkPolicyCall(String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1264,7 +1264,7 @@ public okhttp3.Call deleteIngressClassCall(String name, String pretty, String dr } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1429,7 +1429,7 @@ public okhttp3.Call deleteNamespacedIngressCall(String name, String namespace, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1602,7 +1602,7 @@ public okhttp3.Call deleteNamespacedNetworkPolicyCall(String name, String namesp } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2863,7 +2863,7 @@ public okhttp3.Call patchIngressClassCall(String name, V1Patch body, String pret } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3033,7 +3033,7 @@ public okhttp3.Call patchNamespacedIngressCall(String name, String namespace, V1 } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3211,7 +3211,7 @@ public okhttp3.Call patchNamespacedIngressStatusCall(String name, String namespa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3389,7 +3389,7 @@ public okhttp3.Call patchNamespacedNetworkPolicyCall(String name, String namespa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3504,184 +3504,6 @@ public okhttp3.Call patchNamespacedNetworkPolicyAsync(String name, String namesp localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for patchNamespacedNetworkPolicyStatus - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param body (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
- */ - public okhttp3.Call patchNamespacedNetworkPolicyStatusCall(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status" - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())) - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - if (pretty != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); - } - - if (dryRun != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); - } - - if (fieldManager != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); - } - - if (fieldValidation != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); - } - - if (force != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); - } - - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = { - "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerToken" }; - return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call patchNamespacedNetworkPolicyStatusValidateBeforeCall(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'name' is set - if (name == null) { - throw new ApiException("Missing the required parameter 'name' when calling patchNamespacedNetworkPolicyStatus(Async)"); - } - - // verify the required parameter 'namespace' is set - if (namespace == null) { - throw new ApiException("Missing the required parameter 'namespace' when calling patchNamespacedNetworkPolicyStatus(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling patchNamespacedNetworkPolicyStatus(Async)"); - } - - - okhttp3.Call localVarCall = patchNamespacedNetworkPolicyStatusCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); - return localVarCall; - - } - - /** - * - * partially update status of the specified NetworkPolicy - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param body (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) - * @return V1NetworkPolicy - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
- */ - public V1NetworkPolicy patchNamespacedNetworkPolicyStatus(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { - ApiResponse localVarResp = patchNamespacedNetworkPolicyStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force); - return localVarResp.getData(); - } - - /** - * - * partially update status of the specified NetworkPolicy - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param body (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) - * @return ApiResponse<V1NetworkPolicy> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
- */ - public ApiResponse patchNamespacedNetworkPolicyStatusWithHttpInfo(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { - okhttp3.Call localVarCall = patchNamespacedNetworkPolicyStatusValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * partially update status of the specified NetworkPolicy - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param body (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional) - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - * @param force Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
- */ - public okhttp3.Call patchNamespacedNetworkPolicyStatusAsync(String name, String namespace, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = patchNamespacedNetworkPolicyStatusValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, force, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for readIngressClass * @param name name of the IngressClass (required) @@ -4204,139 +4026,6 @@ public okhttp3.Call readNamespacedNetworkPolicyAsync(String name, String namespa localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for readNamespacedNetworkPolicyStatus - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
- */ - public okhttp3.Call readNamespacedNetworkPolicyStatusCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status" - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())) - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - if (pretty != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); - } - - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = { - "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerToken" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call readNamespacedNetworkPolicyStatusValidateBeforeCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'name' is set - if (name == null) { - throw new ApiException("Missing the required parameter 'name' when calling readNamespacedNetworkPolicyStatus(Async)"); - } - - // verify the required parameter 'namespace' is set - if (namespace == null) { - throw new ApiException("Missing the required parameter 'namespace' when calling readNamespacedNetworkPolicyStatus(Async)"); - } - - - okhttp3.Call localVarCall = readNamespacedNetworkPolicyStatusCall(name, namespace, pretty, _callback); - return localVarCall; - - } - - /** - * - * read status of the specified NetworkPolicy - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @return V1NetworkPolicy - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
- */ - public V1NetworkPolicy readNamespacedNetworkPolicyStatus(String name, String namespace, String pretty) throws ApiException { - ApiResponse localVarResp = readNamespacedNetworkPolicyStatusWithHttpInfo(name, namespace, pretty); - return localVarResp.getData(); - } - - /** - * - * read status of the specified NetworkPolicy - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @return ApiResponse<V1NetworkPolicy> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
- */ - public ApiResponse readNamespacedNetworkPolicyStatusWithHttpInfo(String name, String namespace, String pretty) throws ApiException { - okhttp3.Call localVarCall = readNamespacedNetworkPolicyStatusValidateBeforeCall(name, namespace, pretty, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * read status of the specified NetworkPolicy - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 OK -
401 Unauthorized -
- */ - public okhttp3.Call readNamespacedNetworkPolicyStatusAsync(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = readNamespacedNetworkPolicyStatusValidateBeforeCall(name, namespace, pretty, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for replaceIngressClass * @param name name of the IngressClass (required) @@ -4393,7 +4082,7 @@ public okhttp3.Call replaceIngressClassCall(String name, V1IngressClass body, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4555,7 +4244,7 @@ public okhttp3.Call replaceNamespacedIngressCall(String name, String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4725,7 +4414,7 @@ public okhttp3.Call replaceNamespacedIngressStatusCall(String name, String names } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4895,7 +4584,7 @@ public okhttp3.Call replaceNamespacedNetworkPolicyCall(String name, String names } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5007,174 +4696,4 @@ public okhttp3.Call replaceNamespacedNetworkPolicyAsync(String name, String name localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for replaceNamespacedNetworkPolicyStatus - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param body (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
- */ - public okhttp3.Call replaceNamespacedNetworkPolicyStatusCall(String name, String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status" - .replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())) - .replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - if (pretty != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty)); - } - - if (dryRun != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); - } - - if (fieldManager != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldManager", fieldManager)); - } - - if (fieldValidation != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldValidation", fieldValidation)); - } - - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = { - "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "BearerToken" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call replaceNamespacedNetworkPolicyStatusValidateBeforeCall(String name, String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'name' is set - if (name == null) { - throw new ApiException("Missing the required parameter 'name' when calling replaceNamespacedNetworkPolicyStatus(Async)"); - } - - // verify the required parameter 'namespace' is set - if (namespace == null) { - throw new ApiException("Missing the required parameter 'namespace' when calling replaceNamespacedNetworkPolicyStatus(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling replaceNamespacedNetworkPolicyStatus(Async)"); - } - - - okhttp3.Call localVarCall = replaceNamespacedNetworkPolicyStatusCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); - return localVarCall; - - } - - /** - * - * replace status of the specified NetworkPolicy - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param body (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - * @return V1NetworkPolicy - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
- */ - public V1NetworkPolicy replaceNamespacedNetworkPolicyStatus(String name, String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { - ApiResponse localVarResp = replaceNamespacedNetworkPolicyStatusWithHttpInfo(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation); - return localVarResp.getData(); - } - - /** - * - * replace status of the specified NetworkPolicy - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param body (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - * @return ApiResponse<V1NetworkPolicy> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
- */ - public ApiResponse replaceNamespacedNetworkPolicyStatusWithHttpInfo(String name, String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation) throws ApiException { - okhttp3.Call localVarCall = replaceNamespacedNetworkPolicyStatusValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * replace status of the specified NetworkPolicy - * @param name name of the NetworkPolicy (required) - * @param namespace object name and auth scope, such as for teams and projects (required) - * @param body (required) - * @param pretty If 'true', then the output is pretty printed. (optional) - * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional) - * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional) - * @param fieldValidation fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
201 Created -
401 Unauthorized -
- */ - public okhttp3.Call replaceNamespacedNetworkPolicyStatusAsync(String name, String namespace, V1NetworkPolicy body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = replaceNamespacedNetworkPolicyStatusValidateBeforeCall(name, namespace, body, pretty, dryRun, fieldManager, fieldValidation, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } } 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 f517a69b6f..adaff83f03 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 @@ -115,7 +115,7 @@ public okhttp3.Call createClusterCIDRCall(V1alpha1ClusterCIDR body, String prett } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -269,7 +269,7 @@ public okhttp3.Call createIPAddressCall(V1alpha1IPAddress body, String pretty, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -429,7 +429,7 @@ public okhttp3.Call deleteClusterCIDRCall(String name, String pretty, String dry } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -629,7 +629,7 @@ public okhttp3.Call deleteCollectionClusterCIDRCall(String pretty, String _conti } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -842,7 +842,7 @@ public okhttp3.Call deleteCollectionIPAddressCall(String pretty, String _continu } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1018,7 +1018,7 @@ public okhttp3.Call deleteIPAddressCall(String name, String pretty, String dryRu } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1672,7 +1672,7 @@ public okhttp3.Call patchClusterCIDRCall(String name, V1Patch body, String prett } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1840,7 +1840,7 @@ public okhttp3.Call patchIPAddressCall(String name, V1Patch body, String pretty, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2249,7 +2249,7 @@ public okhttp3.Call replaceClusterCIDRCall(String name, V1alpha1ClusterCIDR body } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2409,7 +2409,7 @@ public okhttp3.Call replaceIPAddressCall(String name, V1alpha1IPAddress body, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 3a3f28fbbd..2290e84bd6 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 @@ -113,7 +113,7 @@ public okhttp3.Call createRuntimeClassCall(V1RuntimeClass body, String pretty, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -310,7 +310,7 @@ public okhttp3.Call deleteCollectionRuntimeClassCall(String pretty, String _cont } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -486,7 +486,7 @@ public okhttp3.Call deleteRuntimeClassCall(String name, String pretty, String dr } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -947,7 +947,7 @@ public okhttp3.Call patchRuntimeClassCall(String name, V1Patch body, String pret } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1233,7 +1233,7 @@ public okhttp3.Call replaceRuntimeClassCall(String name, V1RuntimeClass body, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 f80961c2e7..0a35dea6e3 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 @@ -68,7 +68,7 @@ public okhttp3.Call getServiceAccountIssuerOpenIDKeysetCall(final ApiCallback _c Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openid/v1/jwks/"; + String localVarPath = "/openid/v1/jwks"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); 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 ff969e7f2c..3e2c1ab33d 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 @@ -115,7 +115,7 @@ public okhttp3.Call createNamespacedPodDisruptionBudgetCall(String namespace, V1 } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -322,7 +322,7 @@ public okhttp3.Call deleteCollectionNamespacedPodDisruptionBudgetCall(String nam } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -508,7 +508,7 @@ public okhttp3.Call deleteNamespacedPodDisruptionBudgetCall(String name, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1182,7 +1182,7 @@ public okhttp3.Call patchNamespacedPodDisruptionBudgetCall(String name, String n } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1360,7 +1360,7 @@ public okhttp3.Call patchNamespacedPodDisruptionBudgetStatusCall(String name, St } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1799,7 +1799,7 @@ public okhttp3.Call replaceNamespacedPodDisruptionBudgetCall(String name, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1969,7 +1969,7 @@ public okhttp3.Call replaceNamespacedPodDisruptionBudgetStatusCall(String name, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 668d6e0da5..833515101c 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 @@ -119,7 +119,7 @@ public okhttp3.Call createClusterRoleCall(V1ClusterRole body, String pretty, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -273,7 +273,7 @@ public okhttp3.Call createClusterRoleBindingCall(V1ClusterRoleBinding body, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -429,7 +429,7 @@ public okhttp3.Call createNamespacedRoleCall(String namespace, V1Role body, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -593,7 +593,7 @@ public okhttp3.Call createNamespacedRoleBindingCall(String namespace, V1RoleBind } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -761,7 +761,7 @@ public okhttp3.Call deleteClusterRoleCall(String name, String pretty, String dry } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -924,7 +924,7 @@ public okhttp3.Call deleteClusterRoleBindingCall(String name, String pretty, Str } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1124,7 +1124,7 @@ public okhttp3.Call deleteCollectionClusterRoleCall(String pretty, String _conti } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1337,7 +1337,7 @@ public okhttp3.Call deleteCollectionClusterRoleBindingCall(String pretty, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1552,7 +1552,7 @@ public okhttp3.Call deleteCollectionNamespacedRoleCall(String namespace, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1775,7 +1775,7 @@ public okhttp3.Call deleteCollectionNamespacedRoleBindingCall(String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1961,7 +1961,7 @@ public okhttp3.Call deleteNamespacedRoleCall(String name, String namespace, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2134,7 +2134,7 @@ public okhttp3.Call deleteNamespacedRoleBindingCall(String name, String namespac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3588,7 +3588,7 @@ public okhttp3.Call patchClusterRoleCall(String name, V1Patch body, String prett } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3756,7 +3756,7 @@ public okhttp3.Call patchClusterRoleBindingCall(String name, V1Patch body, Strin } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3926,7 +3926,7 @@ public okhttp3.Call patchNamespacedRoleCall(String name, String namespace, V1Pat } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4104,7 +4104,7 @@ public okhttp3.Call patchNamespacedRoleBindingCall(String name, String namespace } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4787,7 +4787,7 @@ public okhttp3.Call replaceClusterRoleCall(String name, V1ClusterRole body, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4947,7 +4947,7 @@ public okhttp3.Call replaceClusterRoleBindingCall(String name, V1ClusterRoleBind } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5109,7 +5109,7 @@ public okhttp3.Call replaceNamespacedRoleCall(String name, String namespace, V1R } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5279,7 +5279,7 @@ public okhttp3.Call replaceNamespacedRoleBindingCall(String name, String namespa } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 92c5082e4b..1323f9c543 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 @@ -121,7 +121,7 @@ public okhttp3.Call createNamespacedPodSchedulingContextCall(String namespace, V } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -285,7 +285,7 @@ public okhttp3.Call createNamespacedResourceClaimCall(String namespace, V1alpha2 } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -449,7 +449,7 @@ public okhttp3.Call createNamespacedResourceClaimTemplateCall(String namespace, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -611,7 +611,7 @@ public okhttp3.Call createResourceClassCall(V1alpha2ResourceClass body, String p } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -810,7 +810,7 @@ public okhttp3.Call deleteCollectionNamespacedPodSchedulingContextCall(String na } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1033,7 +1033,7 @@ public okhttp3.Call deleteCollectionNamespacedResourceClaimCall(String namespace } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1256,7 +1256,7 @@ public okhttp3.Call deleteCollectionNamespacedResourceClaimTemplateCall(String n } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1477,7 +1477,7 @@ public okhttp3.Call deleteCollectionResourceClassCall(String pretty, String _con } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1655,7 +1655,7 @@ public okhttp3.Call deleteNamespacedPodSchedulingContextCall(String name, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1828,7 +1828,7 @@ public okhttp3.Call deleteNamespacedResourceClaimCall(String name, String namesp } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2001,7 +2001,7 @@ public okhttp3.Call deleteNamespacedResourceClaimTemplateCall(String name, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2172,7 +2172,7 @@ public okhttp3.Call deleteResourceClassCall(String name, String pretty, String d } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -3823,7 +3823,7 @@ public okhttp3.Call patchNamespacedPodSchedulingContextCall(String name, String } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4001,7 +4001,7 @@ public okhttp3.Call patchNamespacedPodSchedulingContextStatusCall(String name, S } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4179,7 +4179,7 @@ public okhttp3.Call patchNamespacedResourceClaimCall(String name, String namespa } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4357,7 +4357,7 @@ public okhttp3.Call patchNamespacedResourceClaimStatusCall(String name, String n } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4535,7 +4535,7 @@ public okhttp3.Call patchNamespacedResourceClaimTemplateCall(String name, String } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4711,7 +4711,7 @@ public okhttp3.Call patchResourceClassCall(String name, V1Patch body, String pre } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5664,7 +5664,7 @@ public okhttp3.Call replaceNamespacedPodSchedulingContextCall(String name, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5834,7 +5834,7 @@ public okhttp3.Call replaceNamespacedPodSchedulingContextStatusCall(String name, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6004,7 +6004,7 @@ public okhttp3.Call replaceNamespacedResourceClaimCall(String name, String names } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6174,7 +6174,7 @@ public okhttp3.Call replaceNamespacedResourceClaimStatusCall(String name, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6344,7 +6344,7 @@ public okhttp3.Call replaceNamespacedResourceClaimTemplateCall(String name, Stri } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6512,7 +6512,7 @@ public okhttp3.Call replaceResourceClassCall(String name, V1alpha2ResourceClass } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 5e65de4220..7547c089b3 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 @@ -113,7 +113,7 @@ public okhttp3.Call createPriorityClassCall(V1PriorityClass body, String pretty, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -310,7 +310,7 @@ public okhttp3.Call deleteCollectionPriorityClassCall(String pretty, String _con } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -486,7 +486,7 @@ public okhttp3.Call deletePriorityClassCall(String name, String pretty, String d } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -947,7 +947,7 @@ public okhttp3.Call patchPriorityClassCall(String name, V1Patch body, String pre } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1233,7 +1233,7 @@ public okhttp3.Call replacePriorityClassCall(String name, V1PriorityClass body, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 7229636269..c9dd673660 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 @@ -121,7 +121,7 @@ public okhttp3.Call createCSIDriverCall(V1CSIDriver body, String pretty, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -275,7 +275,7 @@ public okhttp3.Call createCSINodeCall(V1CSINode body, String pretty, String dryR } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -431,7 +431,7 @@ public okhttp3.Call createNamespacedCSIStorageCapacityCall(String namespace, V1C } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -593,7 +593,7 @@ public okhttp3.Call createStorageClassCall(V1StorageClass body, String pretty, S } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -747,7 +747,7 @@ public okhttp3.Call createVolumeAttachmentCall(V1VolumeAttachment body, String p } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -907,7 +907,7 @@ public okhttp3.Call deleteCSIDriverCall(String name, String pretty, String dryRu } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1070,7 +1070,7 @@ public okhttp3.Call deleteCSINodeCall(String name, String pretty, String dryRun, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1270,7 +1270,7 @@ public okhttp3.Call deleteCollectionCSIDriverCall(String pretty, String _continu } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1483,7 +1483,7 @@ public okhttp3.Call deleteCollectionCSINodeCall(String pretty, String _continue, } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1698,7 +1698,7 @@ public okhttp3.Call deleteCollectionNamespacedCSIStorageCapacityCall(String name } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1919,7 +1919,7 @@ public okhttp3.Call deleteCollectionStorageClassCall(String pretty, String _cont } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2132,7 +2132,7 @@ public okhttp3.Call deleteCollectionVolumeAttachmentCall(String pretty, String _ } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2310,7 +2310,7 @@ public okhttp3.Call deleteNamespacedCSIStorageCapacityCall(String name, String n } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2481,7 +2481,7 @@ public okhttp3.Call deleteStorageClassCall(String name, String pretty, String dr } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2644,7 +2644,7 @@ public okhttp3.Call deleteVolumeAttachmentCall(String name, String pretty, Strin } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4080,7 +4080,7 @@ public okhttp3.Call patchCSIDriverCall(String name, V1Patch body, String pretty, } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4248,7 +4248,7 @@ public okhttp3.Call patchCSINodeCall(String name, V1Patch body, String pretty, S } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4418,7 +4418,7 @@ public okhttp3.Call patchNamespacedCSIStorageCapacityCall(String name, String na } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4594,7 +4594,7 @@ public okhttp3.Call patchStorageClassCall(String name, V1Patch body, String pret } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4762,7 +4762,7 @@ public okhttp3.Call patchVolumeAttachmentCall(String name, V1Patch body, String } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -4930,7 +4930,7 @@ public okhttp3.Call patchVolumeAttachmentStatusCall(String name, V1Patch body, S } final String[] localVarContentTypes = { - "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", "application/apply-patch+yaml" + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -5841,7 +5841,7 @@ public okhttp3.Call replaceCSIDriverCall(String name, V1CSIDriver body, String p } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6001,7 +6001,7 @@ public okhttp3.Call replaceCSINodeCall(String name, V1CSINode body, String prett } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6163,7 +6163,7 @@ public okhttp3.Call replaceNamespacedCSIStorageCapacityCall(String name, String } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6331,7 +6331,7 @@ public okhttp3.Call replaceStorageClassCall(String name, V1StorageClass body, St } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6491,7 +6491,7 @@ public okhttp3.Call replaceVolumeAttachmentCall(String name, V1VolumeAttachment } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -6651,7 +6651,7 @@ public okhttp3.Call replaceVolumeAttachmentStatusCall(String name, V1VolumeAttac } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); 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 e88326e083..8c478f526b 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 @@ -68,7 +68,7 @@ public okhttp3.Call getServiceAccountIssuerOpenIDConfigurationCall(final ApiCall Object localVarPostBody = null; // create path and map variables - String localVarPath = "/.well-known/openid-configuration/"; + String localVarPath = "/.well-known/openid-configuration"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); 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 c94afe0220..8486355235 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 @@ -17,7 +17,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") 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/HttpBearerAuth.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/auth/HttpBearerAuth.java index 696a9be0fd..79a3f6ae77 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 @@ -17,7 +17,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; 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 e284f1dc96..fc7fea0ab1 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 @@ -27,7 +27,7 @@ * ServiceReference holds a reference to Service.legacy.k8s.io */ @ApiModel(description = "ServiceReference holds a reference to Service.legacy.k8s.io") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class AdmissionregistrationV1ServiceReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 e73e4ed582..5bdac79ff7 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 @@ -28,7 +28,7 @@ * WebhookClientConfig contains the information to make a TLS connection with the webhook */ @ApiModel(description = "WebhookClientConfig contains the information to make a TLS connection with the webhook") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class AdmissionregistrationV1WebhookClientConfig { public static final String SERIALIZED_NAME_CA_BUNDLE = "caBundle"; @SerializedName(SERIALIZED_NAME_CA_BUNDLE) 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 707451e0b2..ccf598cf5f 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 @@ -27,7 +27,7 @@ * ServiceReference holds a reference to Service.legacy.k8s.io */ @ApiModel(description = "ServiceReference holds a reference to Service.legacy.k8s.io") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class ApiextensionsV1ServiceReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 d1fe5bbef1..40b736b1e7 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 @@ -28,7 +28,7 @@ * WebhookClientConfig contains the information to make a TLS connection with the webhook. */ @ApiModel(description = "WebhookClientConfig contains the information to make a TLS connection with the webhook.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class ApiextensionsV1WebhookClientConfig { public static final String SERIALIZED_NAME_CA_BUNDLE = "caBundle"; @SerializedName(SERIALIZED_NAME_CA_BUNDLE) 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 0f65ca3140..c8ba6cde84 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 @@ -27,7 +27,7 @@ * ServiceReference holds a reference to Service.legacy.k8s.io */ @ApiModel(description = "ServiceReference holds a reference to Service.legacy.k8s.io") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class ApiregistrationV1ServiceReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 99c6166990..aba30eb3af 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 @@ -30,7 +30,7 @@ * TokenRequest requests a token for a given service account. */ @ApiModel(description = "TokenRequest requests a token for a given service account.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class AuthenticationV1TokenRequest implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 3d1ac507cf..a90445f3e6 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 @@ -27,7 +27,7 @@ * EndpointPort is a tuple that describes a single port. */ @ApiModel(description = "EndpointPort is a tuple that describes a single port.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class CoreV1EndpointPort { public static final String SERIALIZED_NAME_APP_PROTOCOL = "appProtocol"; @SerializedName(SERIALIZED_NAME_APP_PROTOCOL) @@ -53,11 +53,11 @@ public CoreV1EndpointPort appProtocol(String appProtocol) { } /** - * The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. + * The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. * @return appProtocol **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.") + @ApiModelProperty(value = "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.") public String getAppProtocol() { return appProtocol; 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 94f43a7477..a33f420aae 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 @@ -32,7 +32,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class CoreV1Event implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_ACTION = "action"; @SerializedName(SERIALIZED_NAME_ACTION) 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 f2c12a2e39..8059372c40 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 @@ -31,7 +31,7 @@ * EventList is a list of events. */ @ApiModel(description = "EventList is a list of events.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class CoreV1EventList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 1950240e11..de2b311df2 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 @@ -28,7 +28,7 @@ * EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. */ @ApiModel(description = "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class CoreV1EventSeries { public static final String SERIALIZED_NAME_COUNT = "count"; @SerializedName(SERIALIZED_NAME_COUNT) 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 b632dccd51..f8b27d1fd7 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 @@ -27,7 +27,7 @@ * EndpointPort represents a Port used by an EndpointSlice */ @ApiModel(description = "EndpointPort represents a Port used by an EndpointSlice") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class DiscoveryV1EndpointPort { public static final String SERIALIZED_NAME_APP_PROTOCOL = "appProtocol"; @SerializedName(SERIALIZED_NAME_APP_PROTOCOL) @@ -53,11 +53,11 @@ public DiscoveryV1EndpointPort appProtocol(String appProtocol) { } /** - * The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. + * The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. * @return appProtocol **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.") + @ApiModelProperty(value = "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.") public String getAppProtocol() { return appProtocol; 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 b2dab957ae..4424f9b545 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 @@ -32,7 +32,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class EventsV1Event implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_ACTION = "action"; @SerializedName(SERIALIZED_NAME_ACTION) 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 0d98d6953d..008d8d9aa7 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 @@ -31,7 +31,7 @@ * EventList is a list of Event objects. */ @ApiModel(description = "EventList is a list of Event objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class EventsV1EventList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 9e6ea82d12..d0c0c8f5d0 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 @@ -28,7 +28,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class EventsV1EventSeries { public static final String SERIALIZED_NAME_COUNT = "count"; @SerializedName(SERIALIZED_NAME_COUNT) 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 49547f15fe..c1a74c24a5 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 @@ -27,7 +27,7 @@ * TokenRequest contains parameters of a service account token. */ @ApiModel(description = "TokenRequest contains parameters of a service account token.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class StorageV1TokenRequest { public static final String SERIALIZED_NAME_AUDIENCE = "audience"; @SerializedName(SERIALIZED_NAME_AUDIENCE) 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 edd3234610..c43232d1d7 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 @@ -31,7 +31,7 @@ * APIGroup contains the name, the supported versions, and the preferred version of a group. */ @ApiModel(description = "APIGroup contains the name, the supported versions, and the preferred version of a group.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIGroup { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 da9e090a2f..ddf380bd1c 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 @@ -30,7 +30,7 @@ * APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis. */ @ApiModel(description = "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIGroupList { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 6b36137562..f696e1e689 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 @@ -29,7 +29,7 @@ * APIResource specifies the name of a resource and whether it is namespaced. */ @ApiModel(description = "APIResource specifies the name of a resource and whether it is namespaced.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIResource { public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) 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 9505247299..653971d4a0 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 @@ -30,7 +30,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. */ @ApiModel(description = "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIResourceList { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 20774f2d4a..bf192cefab 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 @@ -30,7 +30,7 @@ * APIService represents a server for a particular GroupVersion. Name must be \"version.group\". */ @ApiModel(description = "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIService implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 c16e87e5ee..4615faf53c 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 @@ -28,7 +28,7 @@ * APIServiceCondition describes the state of an APIService at a particular point */ @ApiModel(description = "APIServiceCondition describes the state of an APIService at a particular point") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIServiceCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 205d5e6dc3..3e83cb254c 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 @@ -31,7 +31,7 @@ * APIServiceList is a list of APIService objects. */ @ApiModel(description = "APIServiceList is a list of APIService objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIServiceList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a65f149d64..f2f03ebb76 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 @@ -28,7 +28,7 @@ * APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. */ @ApiModel(description = "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIServiceSpec { public static final String SERIALIZED_NAME_CA_BUNDLE = "caBundle"; @SerializedName(SERIALIZED_NAME_CA_BUNDLE) 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 7abfd7e6e2..41893aac58 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 @@ -30,7 +30,7 @@ * APIServiceStatus contains derived information about an API server */ @ApiModel(description = "APIServiceStatus contains derived information about an API server") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIServiceStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) 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 132a2aa2ec..ab009ed0f3 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 @@ -30,7 +30,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. */ @ApiModel(description = "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1APIVersions { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 b7eec40540..74d2aab968 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 @@ -27,7 +27,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1AWSElasticBlockStoreVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 6a97365b07..ed846f0032 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 @@ -30,7 +30,7 @@ * Affinity is a group of affinity scheduling rules. */ @ApiModel(description = "Affinity is a group of affinity scheduling rules.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Affinity { public static final String SERIALIZED_NAME_NODE_AFFINITY = "nodeAffinity"; @SerializedName(SERIALIZED_NAME_NODE_AFFINITY) 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 d00088e736..e6a8d9090e 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 @@ -30,7 +30,7 @@ * AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole */ @ApiModel(description = "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1AggregationRule { public static final String SERIALIZED_NAME_CLUSTER_ROLE_SELECTORS = "clusterRoleSelectors"; @SerializedName(SERIALIZED_NAME_CLUSTER_ROLE_SELECTORS) 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 876caa93ba..7130b0643f 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 @@ -27,7 +27,7 @@ * AttachedVolume describes a volume attached to a node */ @ApiModel(description = "AttachedVolume describes a volume attached to a node") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1AttachedVolume { public static final String SERIALIZED_NAME_DEVICE_PATH = "devicePath"; @SerializedName(SERIALIZED_NAME_DEVICE_PATH) 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 66a7daacf9..1780c3032b 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 @@ -27,7 +27,7 @@ * AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. */ @ApiModel(description = "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1AzureDiskVolumeSource { public static final String SERIALIZED_NAME_CACHING_MODE = "cachingMode"; @SerializedName(SERIALIZED_NAME_CACHING_MODE) 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 974ceaba1c..6fee031cd3 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 @@ -27,7 +27,7 @@ * AzureFile represents an Azure File Service mount on the host and bind mount to the pod. */ @ApiModel(description = "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1AzureFilePersistentVolumeSource { public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; @SerializedName(SERIALIZED_NAME_READ_ONLY) 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 44aaf5b979..5999aa88cf 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 @@ -27,7 +27,7 @@ * AzureFile represents an Azure File Service mount on the host and bind mount to the pod. */ @ApiModel(description = "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1AzureFileVolumeSource { public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; @SerializedName(SERIALIZED_NAME_READ_ONLY) 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 d777b600e0..07b3a7fcaf 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Binding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 c0e78a18ab..917259989d 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 @@ -27,7 +27,7 @@ * BoundObjectReference is a reference to an object that a token is bound to. */ @ApiModel(description = "BoundObjectReference is a reference to an object that a token is bound to.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1BoundObjectReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 cd37006a8b..0e8983a64f 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSIDriver implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 3ffbd86a34..3f09cf1dc9 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 @@ -31,7 +31,7 @@ * CSIDriverList is a collection of CSIDriver objects. */ @ApiModel(description = "CSIDriverList is a collection of CSIDriver objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSIDriverList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 f47eb78b4e..235919c122 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 @@ -30,7 +30,7 @@ * CSIDriverSpec is the specification of a CSIDriver. */ @ApiModel(description = "CSIDriverSpec is the specification of a CSIDriver.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSIDriverSpec { public static final String SERIALIZED_NAME_ATTACH_REQUIRED = "attachRequired"; @SerializedName(SERIALIZED_NAME_ATTACH_REQUIRED) 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 09b8154529..29109284d9 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSINode implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 897292ca0b..ef43d000b5 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 @@ -30,7 +30,7 @@ * CSINodeDriver holds information about the specification of one CSI driver installed on a node */ @ApiModel(description = "CSINodeDriver holds information about the specification of one CSI driver installed on a node") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSINodeDriver { public static final String SERIALIZED_NAME_ALLOCATABLE = "allocatable"; @SerializedName(SERIALIZED_NAME_ALLOCATABLE) 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 1493f68862..55b59ea8b8 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 @@ -31,7 +31,7 @@ * CSINodeList is a collection of CSINode objects. */ @ApiModel(description = "CSINodeList is a collection of CSINode objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSINodeList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a4249a82da..31704bbc27 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 @@ -30,7 +30,7 @@ * CSINodeSpec holds information about the specification of all CSI drivers installed on a node */ @ApiModel(description = "CSINodeSpec holds information about the specification of all CSI drivers installed on a node") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSINodeSpec { public static final String SERIALIZED_NAME_DRIVERS = "drivers"; @SerializedName(SERIALIZED_NAME_DRIVERS) 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 6e01ec2317..8e57e5031d 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 @@ -31,7 +31,7 @@ * Represents storage that is managed by an external CSI volume driver (Beta feature) */ @ApiModel(description = "Represents storage that is managed by an external CSI volume driver (Beta feature)") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSIPersistentVolumeSource { public static final String SERIALIZED_NAME_CONTROLLER_EXPAND_SECRET_REF = "controllerExpandSecretRef"; @SerializedName(SERIALIZED_NAME_CONTROLLER_EXPAND_SECRET_REF) 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 89b9699658..bbe02c992e 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSIStorageCapacity implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 73d536e087..955757c4f4 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 @@ -31,7 +31,7 @@ * CSIStorageCapacityList is a collection of CSIStorageCapacity objects. */ @ApiModel(description = "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSIStorageCapacityList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 bfcb27821d..da205e73dd 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 @@ -31,7 +31,7 @@ * Represents a source location of a volume to mount, managed by an external CSI driver */ @ApiModel(description = "Represents a source location of a volume to mount, managed by an external CSI driver") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CSIVolumeSource { public static final String SERIALIZED_NAME_DRIVER = "driver"; @SerializedName(SERIALIZED_NAME_DRIVER) 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 35928d6219..75b71f8575 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 @@ -29,7 +29,7 @@ * Adds and removes POSIX capabilities from running containers. */ @ApiModel(description = "Adds and removes POSIX capabilities from running containers.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Capabilities { public static final String SERIALIZED_NAME_ADD = "add"; @SerializedName(SERIALIZED_NAME_ADD) 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 7ce6260dc4..a9252663d7 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 @@ -30,7 +30,7 @@ * Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. */ @ApiModel(description = "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CephFSPersistentVolumeSource { public static final String SERIALIZED_NAME_MONITORS = "monitors"; @SerializedName(SERIALIZED_NAME_MONITORS) 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 d0e1004b1d..a3b880e7a9 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 @@ -30,7 +30,7 @@ * Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. */ @ApiModel(description = "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CephFSVolumeSource { public static final String SERIALIZED_NAME_MONITORS = "monitors"; @SerializedName(SERIALIZED_NAME_MONITORS) 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 9a0ab479cb..349ce3fefc 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CertificateSigningRequest implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 587b7201f0..34eaeba92e 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 @@ -28,7 +28,7 @@ * CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object */ @ApiModel(description = "CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CertificateSigningRequestCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 c802685e94..b3c393b490 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 @@ -31,7 +31,7 @@ * CertificateSigningRequestList is a collection of CertificateSigningRequest objects */ @ApiModel(description = "CertificateSigningRequestList is a collection of CertificateSigningRequest objects") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CertificateSigningRequestList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e6993fc24d..95032a4dde 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 @@ -31,7 +31,7 @@ * CertificateSigningRequestSpec contains the certificate request. */ @ApiModel(description = "CertificateSigningRequestSpec contains the certificate request.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CertificateSigningRequestSpec { public static final String SERIALIZED_NAME_EXPIRATION_SECONDS = "expirationSeconds"; @SerializedName(SERIALIZED_NAME_EXPIRATION_SECONDS) 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 87a15403a5..30c9036963 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 @@ -30,7 +30,7 @@ * CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate. */ @ApiModel(description = "CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CertificateSigningRequestStatus { public static final String SERIALIZED_NAME_CERTIFICATE = "certificate"; @SerializedName(SERIALIZED_NAME_CERTIFICATE) 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 80481fef24..e41a91bc2c 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 @@ -28,7 +28,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. */ @ApiModel(description = "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CinderPersistentVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 bd8db7b0d1..be825ce93d 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 @@ -28,7 +28,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. */ @ApiModel(description = "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CinderVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 c2a51d5448..9c5b50c5fc 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 @@ -27,7 +27,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ClaimSource { public static final String SERIALIZED_NAME_RESOURCE_CLAIM_NAME = "resourceClaimName"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLAIM_NAME) @@ -68,11 +68,11 @@ public V1ClaimSource resourceClaimTemplateName(String resourceClaimTemplateName) } /** - * ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be <pod name>-<resource name>, where <resource name> is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long). An existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. + * ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. * @return resourceClaimTemplateName **/ @javax.annotation.Nullable - @ApiModelProperty(value = "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be -, where is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long). An existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.") + @ApiModelProperty(value = "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.") public String getResourceClaimTemplateName() { return resourceClaimTemplateName; 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 bd1141ed6e..4a78bc42b0 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 @@ -27,7 +27,7 @@ * ClientIPConfig represents the configurations of Client IP based session affinity. */ @ApiModel(description = "ClientIPConfig represents the configurations of Client IP based session affinity.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ClientIPConfig { public static final String SERIALIZED_NAME_TIMEOUT_SECONDS = "timeoutSeconds"; @SerializedName(SERIALIZED_NAME_TIMEOUT_SECONDS) 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 c70d8d75f7..d838732e2c 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 @@ -32,7 +32,7 @@ * ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. */ @ApiModel(description = "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ClusterRole implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_AGGREGATION_RULE = "aggregationRule"; @SerializedName(SERIALIZED_NAME_AGGREGATION_RULE) 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 41434934d9..df51b731c4 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 @@ -32,7 +32,7 @@ * ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. */ @ApiModel(description = "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ClusterRoleBinding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 8f6b055168..c09a50b5b1 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 @@ -31,7 +31,7 @@ * ClusterRoleBindingList is a collection of ClusterRoleBindings */ @ApiModel(description = "ClusterRoleBindingList is a collection of ClusterRoleBindings") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ClusterRoleBindingList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 920d696ae5..ebba85c580 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 @@ -31,7 +31,7 @@ * ClusterRoleList is a collection of ClusterRoles */ @ApiModel(description = "ClusterRoleList is a collection of ClusterRoles") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ClusterRoleList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 d4ca9e5c67..989e95419a 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 @@ -27,7 +27,7 @@ * Information about the condition of a component. */ @ApiModel(description = "Information about the condition of a component.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ComponentCondition { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) 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 7dcb12e856..5287862af4 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 @@ -31,7 +31,7 @@ * ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+ */ @ApiModel(description = "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ComponentStatus implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 d99447d76e..5053405c51 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 @@ -31,7 +31,7 @@ * Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+ */ @ApiModel(description = "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ComponentStatusList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 991fe50758..96eb043e11 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 @@ -28,7 +28,7 @@ * Condition contains details for one aspect of the current state of this API Resource. */ @ApiModel(description = "Condition contains details for one aspect of the current state of this API Resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Condition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 300b7f77c2..bb96f9d75b 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 @@ -31,7 +31,7 @@ * ConfigMap holds configuration data for pods to consume. */ @ApiModel(description = "ConfigMap holds configuration data for pods to consume.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ConfigMap implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 edf6dd3792..31bd3ab18b 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 @@ -27,7 +27,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ConfigMapEnvSource { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 0ed2062a68..5fe7763cff 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 @@ -27,7 +27,7 @@ * Selects a key from a ConfigMap. */ @ApiModel(description = "Selects a key from a ConfigMap.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ConfigMapKeySelector { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) 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 02c4ed4e09..b74ec8139b 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 @@ -31,7 +31,7 @@ * ConfigMapList is a resource containing a list of ConfigMap objects. */ @ApiModel(description = "ConfigMapList is a resource containing a list of ConfigMap objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ConfigMapList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 ad8157b87b..25a1a0b5d0 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 @@ -27,7 +27,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 */ @ApiModel(description = "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") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ConfigMapNodeConfigSource { public static final String SERIALIZED_NAME_KUBELET_CONFIG_KEY = "kubeletConfigKey"; @SerializedName(SERIALIZED_NAME_KUBELET_CONFIG_KEY) 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 e6aca5f056..5296bfc44e 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 @@ -30,7 +30,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ConfigMapProjection { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) 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 2607cb002d..1fb19ce484 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ConfigMapVolumeSource { public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) 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 c3f5c8e7f8..a5c23dca8f 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 @@ -39,7 +39,7 @@ * A single application container that you want to run within a pod. */ @ApiModel(description = "A single application container that you want to run within a pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Container { public static final String SERIALIZED_NAME_ARGS = "args"; @SerializedName(SERIALIZED_NAME_ARGS) @@ -93,6 +93,10 @@ public class V1Container { @SerializedName(SERIALIZED_NAME_RESOURCES) private V1ResourceRequirements resources; + public static final String SERIALIZED_NAME_RESTART_POLICY = "restartPolicy"; + @SerializedName(SERIALIZED_NAME_RESTART_POLICY) + private String restartPolicy; + public static final String SERIALIZED_NAME_SECURITY_CONTEXT = "securityContext"; @SerializedName(SERIALIZED_NAME_SECURITY_CONTEXT) private V1SecurityContext securityContext; @@ -480,6 +484,29 @@ public void setResources(V1ResourceRequirements resources) { } + public V1Container restartPolicy(String restartPolicy) { + + this.restartPolicy = restartPolicy; + return this; + } + + /** + * RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. + * @return restartPolicy + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed.") + + public String getRestartPolicy() { + return restartPolicy; + } + + + public void setRestartPolicy(String restartPolicy) { + this.restartPolicy = restartPolicy; + } + + public V1Container securityContext(V1SecurityContext securityContext) { this.securityContext = securityContext; @@ -748,6 +775,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.readinessProbe, v1Container.readinessProbe) && Objects.equals(this.resizePolicy, v1Container.resizePolicy) && Objects.equals(this.resources, v1Container.resources) && + Objects.equals(this.restartPolicy, v1Container.restartPolicy) && Objects.equals(this.securityContext, v1Container.securityContext) && Objects.equals(this.startupProbe, v1Container.startupProbe) && Objects.equals(this.stdin, v1Container.stdin) && @@ -762,7 +790,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(args, command, env, envFrom, image, imagePullPolicy, lifecycle, livenessProbe, name, ports, readinessProbe, resizePolicy, resources, securityContext, startupProbe, stdin, stdinOnce, terminationMessagePath, terminationMessagePolicy, tty, volumeDevices, volumeMounts, workingDir); + return Objects.hash(args, command, env, envFrom, image, imagePullPolicy, lifecycle, livenessProbe, name, ports, readinessProbe, resizePolicy, resources, restartPolicy, securityContext, startupProbe, stdin, stdinOnce, terminationMessagePath, terminationMessagePolicy, tty, volumeDevices, volumeMounts, workingDir); } @@ -783,6 +811,7 @@ public String toString() { sb.append(" readinessProbe: ").append(toIndentedString(readinessProbe)).append("\n"); sb.append(" resizePolicy: ").append(toIndentedString(resizePolicy)).append("\n"); sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" restartPolicy: ").append(toIndentedString(restartPolicy)).append("\n"); sb.append(" securityContext: ").append(toIndentedString(securityContext)).append("\n"); sb.append(" startupProbe: ").append(toIndentedString(startupProbe)).append("\n"); sb.append(" stdin: ").append(toIndentedString(stdin)).append("\n"); 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 c1fd44175b..feebac88f3 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 @@ -29,7 +29,7 @@ * Describe a container image */ @ApiModel(description = "Describe a container image") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ContainerImage { public static final String SERIALIZED_NAME_NAMES = "names"; @SerializedName(SERIALIZED_NAME_NAMES) 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 46b12d9faa..d93bdd31d3 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 @@ -27,7 +27,7 @@ * ContainerPort represents a network port in a single container. */ @ApiModel(description = "ContainerPort represents a network port in a single container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ContainerPort { public static final String SERIALIZED_NAME_CONTAINER_PORT = "containerPort"; @SerializedName(SERIALIZED_NAME_CONTAINER_PORT) 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 3512895e50..3ddffa6695 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 @@ -27,7 +27,7 @@ * ContainerResizePolicy represents resource resize policy for the container. */ @ApiModel(description = "ContainerResizePolicy represents resource resize policy for the container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ContainerResizePolicy { public static final String SERIALIZED_NAME_RESOURCE_NAME = "resourceName"; @SerializedName(SERIALIZED_NAME_RESOURCE_NAME) 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 00fde3ec9a..fce803ffb8 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 @@ -30,7 +30,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. */ @ApiModel(description = "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ContainerState { public static final String SERIALIZED_NAME_RUNNING = "running"; @SerializedName(SERIALIZED_NAME_RUNNING) 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 a1118492d6..b8d847dc97 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 @@ -28,7 +28,7 @@ * ContainerStateRunning is a running state of a container. */ @ApiModel(description = "ContainerStateRunning is a running state of a container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ContainerStateRunning { public static final String SERIALIZED_NAME_STARTED_AT = "startedAt"; @SerializedName(SERIALIZED_NAME_STARTED_AT) 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 ac1dcf06a8..4f09d47fb1 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 @@ -28,7 +28,7 @@ * ContainerStateTerminated is a terminated state of a container. */ @ApiModel(description = "ContainerStateTerminated is a terminated state of a container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ContainerStateTerminated { public static final String SERIALIZED_NAME_CONTAINER_I_D = "containerID"; @SerializedName(SERIALIZED_NAME_CONTAINER_I_D) 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 4062803185..1737589cc2 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 @@ -27,7 +27,7 @@ * ContainerStateWaiting is a waiting state of a container. */ @ApiModel(description = "ContainerStateWaiting is a waiting state of a container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ContainerStateWaiting { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) 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 ececc1417f..6e7ee95d81 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 @@ -33,7 +33,7 @@ * ContainerStatus contains details for the current status of this container. */ @ApiModel(description = "ContainerStatus contains details for the current status of this container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ContainerStatus { public static final String SERIALIZED_NAME_ALLOCATED_RESOURCES = "allocatedResources"; @SerializedName(SERIALIZED_NAME_ALLOCATED_RESOURCES) 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 994e61c8fc..809e13d138 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 @@ -28,7 +28,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ControllerRevision implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 9ceadaf5cd..d5cf5d9820 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 @@ -31,7 +31,7 @@ * ControllerRevisionList is a resource containing a list of ControllerRevision objects. */ @ApiModel(description = "ControllerRevisionList is a resource containing a list of ControllerRevision objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ControllerRevisionList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 3fae9f3655..2d34dce261 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 @@ -30,7 +30,7 @@ * CronJob represents the configuration of a single cron job. */ @ApiModel(description = "CronJob represents the configuration of a single cron job.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CronJob implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 853473be36..aeae7358bc 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 @@ -31,7 +31,7 @@ * CronJobList is a collection of cron jobs. */ @ApiModel(description = "CronJobList is a collection of cron jobs.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CronJobList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 ca3bb18b02..e05eac9b0e 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 @@ -28,7 +28,7 @@ * CronJobSpec describes how the job execution will look like and when it will actually run. */ @ApiModel(description = "CronJobSpec describes how the job execution will look like and when it will actually run.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CronJobSpec { public static final String SERIALIZED_NAME_CONCURRENCY_POLICY = "concurrencyPolicy"; @SerializedName(SERIALIZED_NAME_CONCURRENCY_POLICY) 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 73bf705f01..faa0af805a 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 @@ -31,7 +31,7 @@ * CronJobStatus represents the current state of a cron job. */ @ApiModel(description = "CronJobStatus represents the current state of a cron job.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CronJobStatus { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) 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 bdb78acd78..f7fe39556b 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 @@ -27,7 +27,7 @@ * CrossVersionObjectReference contains enough information to let you identify the referred resource. */ @ApiModel(description = "CrossVersionObjectReference contains enough information to let you identify the referred resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CrossVersionObjectReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 818e458f7c..6f41f1d593 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 @@ -27,7 +27,7 @@ * CustomResourceColumnDefinition specifies a column for server side printing. */ @ApiModel(description = "CustomResourceColumnDefinition specifies a column for server side printing.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceColumnDefinition { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) 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 a46f8cdb51..616113942b 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 @@ -28,7 +28,7 @@ * CustomResourceConversion describes how to convert different versions of a CR. */ @ApiModel(description = "CustomResourceConversion describes how to convert different versions of a CR.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceConversion { public static final String SERIALIZED_NAME_STRATEGY = "strategy"; @SerializedName(SERIALIZED_NAME_STRATEGY) 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 af47499f57..172932d676 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 @@ -30,7 +30,7 @@ * CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. */ @ApiModel(description = "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceDefinition implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e0021ab26c..00237e8e1a 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 @@ -28,7 +28,7 @@ * CustomResourceDefinitionCondition contains details for the current condition of this pod. */ @ApiModel(description = "CustomResourceDefinitionCondition contains details for the current condition of this pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceDefinitionCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 c8b17eae8b..8b2d3f206e 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 @@ -31,7 +31,7 @@ * CustomResourceDefinitionList is a list of CustomResourceDefinition objects. */ @ApiModel(description = "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceDefinitionList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 4d2addc5bc..1cdb683897 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 @@ -29,7 +29,7 @@ * CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition */ @ApiModel(description = "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceDefinitionNames { public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) 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 1253954674..77a5576dc8 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 @@ -32,7 +32,7 @@ * CustomResourceDefinitionSpec describes how a user wants their resource to appear */ @ApiModel(description = "CustomResourceDefinitionSpec describes how a user wants their resource to appear") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceDefinitionSpec { public static final String SERIALIZED_NAME_CONVERSION = "conversion"; @SerializedName(SERIALIZED_NAME_CONVERSION) 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 d55ad8b477..53d729323b 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 @@ -31,7 +31,7 @@ * CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition */ @ApiModel(description = "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceDefinitionStatus { public static final String SERIALIZED_NAME_ACCEPTED_NAMES = "acceptedNames"; @SerializedName(SERIALIZED_NAME_ACCEPTED_NAMES) 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 760d0f0bc4..4f7efd2ed3 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 @@ -32,7 +32,7 @@ * CustomResourceDefinitionVersion describes a version for CRD. */ @ApiModel(description = "CustomResourceDefinitionVersion describes a version for CRD.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceDefinitionVersion { public static final String SERIALIZED_NAME_ADDITIONAL_PRINTER_COLUMNS = "additionalPrinterColumns"; @SerializedName(SERIALIZED_NAME_ADDITIONAL_PRINTER_COLUMNS) 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 bac8b91a05..7ecdaf34cc 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 @@ -27,7 +27,7 @@ * CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. */ @ApiModel(description = "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceSubresourceScale { public static final String SERIALIZED_NAME_LABEL_SELECTOR_PATH = "labelSelectorPath"; @SerializedName(SERIALIZED_NAME_LABEL_SELECTOR_PATH) 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 893da08496..de5eab9f2e 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 @@ -28,7 +28,7 @@ * CustomResourceSubresources defines the status and scale subresources for CustomResources. */ @ApiModel(description = "CustomResourceSubresources defines the status and scale subresources for CustomResources.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1CustomResourceSubresources { public static final String SERIALIZED_NAME_SCALE = "scale"; @SerializedName(SERIALIZED_NAME_SCALE) 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 a149900563..7550f4c849 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 @@ -28,7 +28,7 @@ * CustomResourceValidation is a list of validation methods for CustomResources. */ @ApiModel(description = "CustomResourceValidation is a list of validation methods for CustomResources.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") 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) 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 8fa6251bea..ff8717d8dc 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 @@ -27,7 +27,7 @@ * DaemonEndpoint contains information about a single Daemon endpoint. */ @ApiModel(description = "DaemonEndpoint contains information about a single Daemon endpoint.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DaemonEndpoint { public static final String SERIALIZED_NAME_PORT = "Port"; @SerializedName(SERIALIZED_NAME_PORT) 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 b7e4ffa335..a7ae091a4c 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 @@ -30,7 +30,7 @@ * DaemonSet represents the configuration of a daemon set. */ @ApiModel(description = "DaemonSet represents the configuration of a daemon set.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DaemonSet implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 4ae12b0826..8e603ff783 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 @@ -28,7 +28,7 @@ * DaemonSetCondition describes the state of a DaemonSet at a certain point. */ @ApiModel(description = "DaemonSetCondition describes the state of a DaemonSet at a certain point.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DaemonSetCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 4178f5a7e9..c836aebcf1 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 @@ -31,7 +31,7 @@ * DaemonSetList is a collection of daemon sets. */ @ApiModel(description = "DaemonSetList is a collection of daemon sets.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DaemonSetList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e4efa26edc..232ac7a044 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 @@ -30,7 +30,7 @@ * DaemonSetSpec is the specification of a daemon set. */ @ApiModel(description = "DaemonSetSpec is the specification of a daemon set.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DaemonSetSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) 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 28030febc9..7218a57748 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 @@ -30,7 +30,7 @@ * DaemonSetStatus represents the current status of a daemon set. */ @ApiModel(description = "DaemonSetStatus represents the current status of a daemon set.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DaemonSetStatus { public static final String SERIALIZED_NAME_COLLISION_COUNT = "collisionCount"; @SerializedName(SERIALIZED_NAME_COLLISION_COUNT) 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 f03dac89bb..495f0654e5 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 @@ -28,7 +28,7 @@ * DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. */ @ApiModel(description = "DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DaemonSetUpdateStrategy { public static final String SERIALIZED_NAME_ROLLING_UPDATE = "rollingUpdate"; @SerializedName(SERIALIZED_NAME_ROLLING_UPDATE) 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 cfa89a7ac9..dd6110195e 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 @@ -30,7 +30,7 @@ * DeleteOptions may be provided when deleting an API object. */ @ApiModel(description = "DeleteOptions may be provided when deleting an API object.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DeleteOptions { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 c265e85dcc..5ae0a9ba0a 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 @@ -30,7 +30,7 @@ * Deployment enables declarative updates for Pods and ReplicaSets. */ @ApiModel(description = "Deployment enables declarative updates for Pods and ReplicaSets.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Deployment implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 6bed35add0..e67297f202 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 @@ -28,7 +28,7 @@ * DeploymentCondition describes the state of a deployment at a certain point. */ @ApiModel(description = "DeploymentCondition describes the state of a deployment at a certain point.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DeploymentCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 61d7f1d190..68e0943a5e 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 @@ -31,7 +31,7 @@ * DeploymentList is a list of Deployments. */ @ApiModel(description = "DeploymentList is a list of Deployments.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DeploymentList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 de1dbfcbbd..e545ce8e15 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 @@ -30,7 +30,7 @@ * DeploymentSpec is the specification of the desired behavior of the Deployment. */ @ApiModel(description = "DeploymentSpec is the specification of the desired behavior of the Deployment.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DeploymentSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) 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 d3509b69a4..7144164e1c 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 @@ -30,7 +30,7 @@ * DeploymentStatus is the most recently observed status of the Deployment. */ @ApiModel(description = "DeploymentStatus is the most recently observed status of the Deployment.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DeploymentStatus { public static final String SERIALIZED_NAME_AVAILABLE_REPLICAS = "availableReplicas"; @SerializedName(SERIALIZED_NAME_AVAILABLE_REPLICAS) 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 241687df83..0e9d8856c0 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 @@ -28,7 +28,7 @@ * DeploymentStrategy describes how to replace existing pods with new ones. */ @ApiModel(description = "DeploymentStrategy describes how to replace existing pods with new ones.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DeploymentStrategy { public static final String SERIALIZED_NAME_ROLLING_UPDATE = "rollingUpdate"; @SerializedName(SERIALIZED_NAME_ROLLING_UPDATE) 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 57943b275f..5db995a0ab 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 @@ -30,7 +30,7 @@ * Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode. */ @ApiModel(description = "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DownwardAPIProjection { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) 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 0b7ff8376a..860065cccc 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 @@ -29,7 +29,7 @@ * DownwardAPIVolumeFile represents information to create the file containing the pod field */ @ApiModel(description = "DownwardAPIVolumeFile represents information to create the file containing the pod field") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DownwardAPIVolumeFile { public static final String SERIALIZED_NAME_FIELD_REF = "fieldRef"; @SerializedName(SERIALIZED_NAME_FIELD_REF) 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 0427bd5801..36e8942dbf 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 @@ -30,7 +30,7 @@ * DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. */ @ApiModel(description = "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1DownwardAPIVolumeSource { public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) 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 46bd878b62..bfc8955c3e 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 @@ -28,7 +28,7 @@ * Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling. */ @ApiModel(description = "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EmptyDirVolumeSource { public static final String SERIALIZED_NAME_MEDIUM = "medium"; @SerializedName(SERIALIZED_NAME_MEDIUM) 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 ec9b836454..667d05add6 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 @@ -34,7 +34,7 @@ * Endpoint represents a single logical \"backend\" implementing a service. */ @ApiModel(description = "Endpoint represents a single logical \"backend\" implementing a service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Endpoint { public static final String SERIALIZED_NAME_ADDRESSES = "addresses"; @SerializedName(SERIALIZED_NAME_ADDRESSES) 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 17e0347028..39f2ecd33a 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 @@ -28,7 +28,7 @@ * EndpointAddress is a tuple that describes single IP address. */ @ApiModel(description = "EndpointAddress is a tuple that describes single IP address.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EndpointAddress { public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; @SerializedName(SERIALIZED_NAME_HOSTNAME) 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 4469aeed9c..9b40e20a13 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 @@ -27,7 +27,7 @@ * EndpointConditions represents the current condition of an endpoint. */ @ApiModel(description = "EndpointConditions represents the current condition of an endpoint.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EndpointConditions { public static final String SERIALIZED_NAME_READY = "ready"; @SerializedName(SERIALIZED_NAME_READY) 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 76a4364775..21770f88e8 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 @@ -30,7 +30,7 @@ * EndpointHints provides hints describing how an endpoint should be consumed. */ @ApiModel(description = "EndpointHints provides hints describing how an endpoint should be consumed.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EndpointHints { public static final String SERIALIZED_NAME_FOR_ZONES = "forZones"; @SerializedName(SERIALIZED_NAME_FOR_ZONES) 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 537c7f3ff4..d185af77f3 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 @@ -32,7 +32,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EndpointSlice implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_ADDRESS_TYPE = "addressType"; @SerializedName(SERIALIZED_NAME_ADDRESS_TYPE) 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 90e9de1c6c..9e02626e12 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 @@ -31,7 +31,7 @@ * EndpointSliceList represents a list of endpoint slices */ @ApiModel(description = "EndpointSliceList represents a list of endpoint slices") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EndpointSliceList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e7a7a1da10..3d75e50d0f 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 @@ -31,7 +31,7 @@ * 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 ] */ @ApiModel(description = "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given: { 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 ]") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EndpointSubset { public static final String SERIALIZED_NAME_ADDRESSES = "addresses"; @SerializedName(SERIALIZED_NAME_ADDRESSES) 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 aaea76903b..80afbed124 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 @@ -31,7 +31,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}] }, ] */ @ApiModel(description = "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}] }, ]") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Endpoints implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 0af34d5422..4a6c6eab2b 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 @@ -31,7 +31,7 @@ * EndpointsList is a list of endpoints. */ @ApiModel(description = "EndpointsList is a list of endpoints.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EndpointsList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 74e2b6e70b..68a5715da8 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 @@ -29,7 +29,7 @@ * EnvFromSource represents the source of a set of ConfigMaps */ @ApiModel(description = "EnvFromSource represents the source of a set of ConfigMaps") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EnvFromSource { public static final String SERIALIZED_NAME_CONFIG_MAP_REF = "configMapRef"; @SerializedName(SERIALIZED_NAME_CONFIG_MAP_REF) 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 4b8a13e6fb..5a16a978b7 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 @@ -28,7 +28,7 @@ * EnvVar represents an environment variable present in a Container. */ @ApiModel(description = "EnvVar represents an environment variable present in a Container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EnvVar { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 155972b9bd..3a5dd5c59a 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 @@ -31,7 +31,7 @@ * EnvVarSource represents a source for the value of an EnvVar. */ @ApiModel(description = "EnvVarSource represents a source for the value of an EnvVar.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EnvVarSource { public static final String SERIALIZED_NAME_CONFIG_MAP_KEY_REF = "configMapKeyRef"; @SerializedName(SERIALIZED_NAME_CONFIG_MAP_KEY_REF) 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 52c01b5767..84045d833a 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 @@ -39,7 +39,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EphemeralContainer { public static final String SERIALIZED_NAME_ARGS = "args"; @SerializedName(SERIALIZED_NAME_ARGS) @@ -93,6 +93,10 @@ public class V1EphemeralContainer { @SerializedName(SERIALIZED_NAME_RESOURCES) private V1ResourceRequirements resources; + public static final String SERIALIZED_NAME_RESTART_POLICY = "restartPolicy"; + @SerializedName(SERIALIZED_NAME_RESTART_POLICY) + private String restartPolicy; + public static final String SERIALIZED_NAME_SECURITY_CONTEXT = "securityContext"; @SerializedName(SERIALIZED_NAME_SECURITY_CONTEXT) private V1SecurityContext securityContext; @@ -484,6 +488,29 @@ public void setResources(V1ResourceRequirements resources) { } + public V1EphemeralContainer restartPolicy(String restartPolicy) { + + this.restartPolicy = restartPolicy; + return this; + } + + /** + * Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers. + * @return restartPolicy + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers.") + + public String getRestartPolicy() { + return restartPolicy; + } + + + public void setRestartPolicy(String restartPolicy) { + this.restartPolicy = restartPolicy; + } + + public V1EphemeralContainer securityContext(V1SecurityContext securityContext) { this.securityContext = securityContext; @@ -775,6 +802,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.readinessProbe, v1EphemeralContainer.readinessProbe) && Objects.equals(this.resizePolicy, v1EphemeralContainer.resizePolicy) && Objects.equals(this.resources, v1EphemeralContainer.resources) && + Objects.equals(this.restartPolicy, v1EphemeralContainer.restartPolicy) && Objects.equals(this.securityContext, v1EphemeralContainer.securityContext) && Objects.equals(this.startupProbe, v1EphemeralContainer.startupProbe) && Objects.equals(this.stdin, v1EphemeralContainer.stdin) && @@ -790,7 +818,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(args, command, env, envFrom, image, imagePullPolicy, lifecycle, livenessProbe, name, ports, readinessProbe, resizePolicy, resources, securityContext, startupProbe, stdin, stdinOnce, targetContainerName, terminationMessagePath, terminationMessagePolicy, tty, volumeDevices, volumeMounts, workingDir); + return Objects.hash(args, command, env, envFrom, image, imagePullPolicy, lifecycle, livenessProbe, name, ports, readinessProbe, resizePolicy, resources, restartPolicy, securityContext, startupProbe, stdin, stdinOnce, targetContainerName, terminationMessagePath, terminationMessagePolicy, tty, volumeDevices, volumeMounts, workingDir); } @@ -811,6 +839,7 @@ public String toString() { sb.append(" readinessProbe: ").append(toIndentedString(readinessProbe)).append("\n"); sb.append(" resizePolicy: ").append(toIndentedString(resizePolicy)).append("\n"); sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" restartPolicy: ").append(toIndentedString(restartPolicy)).append("\n"); sb.append(" securityContext: ").append(toIndentedString(securityContext)).append("\n"); sb.append(" startupProbe: ").append(toIndentedString(startupProbe)).append("\n"); sb.append(" stdin: ").append(toIndentedString(stdin)).append("\n"); 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 1ac49af8d8..87ab1546f5 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 @@ -28,7 +28,7 @@ * Represents an ephemeral volume that is handled by a normal storage driver. */ @ApiModel(description = "Represents an ephemeral volume that is handled by a normal storage driver.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EphemeralVolumeSource { public static final String SERIALIZED_NAME_VOLUME_CLAIM_TEMPLATE = "volumeClaimTemplate"; @SerializedName(SERIALIZED_NAME_VOLUME_CLAIM_TEMPLATE) 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 7b76e8e544..9aa196c27a 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 @@ -27,7 +27,7 @@ * EventSource contains information for an event. */ @ApiModel(description = "EventSource contains information for an event.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1EventSource { public static final String SERIALIZED_NAME_COMPONENT = "component"; @SerializedName(SERIALIZED_NAME_COMPONENT) 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 6119dbd2b1..4453085f7c 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 @@ -29,7 +29,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. */ @ApiModel(description = "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Eviction implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 142093a216..3d3f5c8c17 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 @@ -29,7 +29,7 @@ * ExecAction describes a \"run in container\" action. */ @ApiModel(description = "ExecAction describes a \"run in container\" action.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ExecAction { public static final String SERIALIZED_NAME_COMMAND = "command"; @SerializedName(SERIALIZED_NAME_COMMAND) 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 f39c9270a2..589ffbb15d 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 @@ -27,7 +27,7 @@ * ExternalDocumentation allows referencing an external resource for extended documentation. */ @ApiModel(description = "ExternalDocumentation allows referencing an external resource for extended documentation.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ExternalDocumentation { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) 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 c0d69e2ebe..79ff3a7fad 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 @@ -29,7 +29,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. */ @ApiModel(description = "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1FCVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 21775648cf..001af9fd64 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 @@ -31,7 +31,7 @@ * FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin. */ @ApiModel(description = "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1FlexPersistentVolumeSource { public static final String SERIALIZED_NAME_DRIVER = "driver"; @SerializedName(SERIALIZED_NAME_DRIVER) 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 937c865057..2637558b06 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 @@ -31,7 +31,7 @@ * FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. */ @ApiModel(description = "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1FlexVolumeSource { public static final String SERIALIZED_NAME_DRIVER = "driver"; @SerializedName(SERIALIZED_NAME_DRIVER) 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 072e02eac3..32ff156ad8 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 @@ -27,7 +27,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. */ @ApiModel(description = "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1FlockerVolumeSource { public static final String SERIALIZED_NAME_DATASET_NAME = "datasetName"; @SerializedName(SERIALIZED_NAME_DATASET_NAME) 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 6d9ee459a9..4faa0ab754 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 @@ -27,7 +27,7 @@ * ForZone provides information about which zones should consume this endpoint. */ @ApiModel(description = "ForZone provides information about which zones should consume this endpoint.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ForZone { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 01f34adc4c..ad0bbe361b 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 @@ -27,7 +27,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1GCEPersistentDiskVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 1cdfa02fff..64b10f227c 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 @@ -26,7 +26,7 @@ /** * V1GRPCAction */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1GRPCAction { public static final String SERIALIZED_NAME_PORT = "port"; @SerializedName(SERIALIZED_NAME_PORT) 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 821515e065..19fb9f283d 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 @@ -27,7 +27,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. */ @ApiModel(description = "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling. 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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1GitRepoVolumeSource { public static final String SERIALIZED_NAME_DIRECTORY = "directory"; @SerializedName(SERIALIZED_NAME_DIRECTORY) 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 98a5132855..5528909399 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 @@ -27,7 +27,7 @@ * Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. */ @ApiModel(description = "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1GlusterfsPersistentVolumeSource { public static final String SERIALIZED_NAME_ENDPOINTS = "endpoints"; @SerializedName(SERIALIZED_NAME_ENDPOINTS) 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 ef4bb45f7b..c66dcc7ba6 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 @@ -27,7 +27,7 @@ * Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. */ @ApiModel(description = "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1GlusterfsVolumeSource { public static final String SERIALIZED_NAME_ENDPOINTS = "endpoints"; @SerializedName(SERIALIZED_NAME_ENDPOINTS) 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 f218d66cd9..a790d03636 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 @@ -27,7 +27,7 @@ * GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility. */ @ApiModel(description = "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1GroupVersionForDiscovery { public static final String SERIALIZED_NAME_GROUP_VERSION = "groupVersion"; @SerializedName(SERIALIZED_NAME_GROUP_VERSION) 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 050a5cae1d..a6bd08494e 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 @@ -31,7 +31,7 @@ * HTTPGetAction describes an action based on HTTP Get requests. */ @ApiModel(description = "HTTPGetAction describes an action based on HTTP Get requests.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1HTTPGetAction { public static final String SERIALIZED_NAME_HOST = "host"; @SerializedName(SERIALIZED_NAME_HOST) 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 b9c59060c3..8e6d180172 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 @@ -27,7 +27,7 @@ * HTTPHeader describes a custom header to be used in HTTP probes */ @ApiModel(description = "HTTPHeader describes a custom header to be used in HTTP probes") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1HTTPHeader { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 b0d772cff1..c296b06ab1 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 @@ -28,7 +28,7 @@ * HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend. */ @ApiModel(description = "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1HTTPIngressPath { public static final String SERIALIZED_NAME_BACKEND = "backend"; @SerializedName(SERIALIZED_NAME_BACKEND) 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 6dfe0e5767..5f80eb0cc3 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 @@ -30,7 +30,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 '#'. */ @ApiModel(description = "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1HTTPIngressRuleValue { public static final String SERIALIZED_NAME_PATHS = "paths"; @SerializedName(SERIALIZED_NAME_PATHS) 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 9764a5e95b..e06a4ab032 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 @@ -30,7 +30,7 @@ * configuration of a horizontal pod autoscaler. */ @ApiModel(description = "configuration of a horizontal pod autoscaler.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1HorizontalPodAutoscaler implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 b2ce888fa5..c208a6c13c 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 @@ -31,7 +31,7 @@ * list of horizontal pod autoscaler objects. */ @ApiModel(description = "list of horizontal pod autoscaler objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1HorizontalPodAutoscalerList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 189a3c9260..5df833ca2e 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 @@ -28,7 +28,7 @@ * specification of a horizontal pod autoscaler. */ @ApiModel(description = "specification of a horizontal pod autoscaler.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1HorizontalPodAutoscalerSpec { public static final String SERIALIZED_NAME_MAX_REPLICAS = "maxReplicas"; @SerializedName(SERIALIZED_NAME_MAX_REPLICAS) 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 d3722e886e..3502ce7008 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 @@ -28,7 +28,7 @@ * current status of a horizontal pod autoscaler */ @ApiModel(description = "current status of a horizontal pod autoscaler") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") 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) 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 ec426a2e5f..76aa005af1 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 @@ -29,7 +29,7 @@ * HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. */ @ApiModel(description = "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1HostAlias { public static final String SERIALIZED_NAME_HOSTNAMES = "hostnames"; @SerializedName(SERIALIZED_NAME_HOSTNAMES) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostIP.java similarity index 52% rename from kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatus.java rename to kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostIP.java index e539a96a80..2c54c87876 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1HostIP.java @@ -19,52 +19,41 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.kubernetes.client.openapi.models.V1Condition; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; /** - * NetworkPolicyStatus describes the current state of the NetworkPolicy. + * HostIP represents a single IP address allocated to the host. */ -@ApiModel(description = "NetworkPolicyStatus describes the current state of the NetworkPolicy.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") -public class V1NetworkPolicyStatus { - public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; - @SerializedName(SERIALIZED_NAME_CONDITIONS) - private List conditions = null; +@ApiModel(description = "HostIP represents a single IP address allocated to the host.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1HostIP { + public static final String SERIALIZED_NAME_IP = "ip"; + @SerializedName(SERIALIZED_NAME_IP) + private String ip; - public V1NetworkPolicyStatus conditions(List conditions) { + public V1HostIP ip(String ip) { - this.conditions = conditions; - return this; - } - - public V1NetworkPolicyStatus addConditionsItem(V1Condition conditionsItem) { - if (this.conditions == null) { - this.conditions = new ArrayList<>(); - } - this.conditions.add(conditionsItem); + this.ip = ip; return this; } /** - * conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. Current service state - * @return conditions + * IP is the IP address assigned to the host + * @return ip **/ @javax.annotation.Nullable - @ApiModelProperty(value = "conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. Current service state") + @ApiModelProperty(value = "IP is the IP address assigned to the host") - public List getConditions() { - return conditions; + public String getIp() { + return ip; } - public void setConditions(List conditions) { - this.conditions = conditions; + public void setIp(String ip) { + this.ip = ip; } @@ -76,21 +65,21 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - V1NetworkPolicyStatus v1NetworkPolicyStatus = (V1NetworkPolicyStatus) o; - return Objects.equals(this.conditions, v1NetworkPolicyStatus.conditions); + V1HostIP v1HostIP = (V1HostIP) o; + return Objects.equals(this.ip, v1HostIP.ip); } @Override public int hashCode() { - return Objects.hash(conditions); + return Objects.hash(ip); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class V1NetworkPolicyStatus {\n"); - sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); + sb.append("class V1HostIP {\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append("}"); return sb.toString(); } 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 ab07e087d0..8b3cf4dc57 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 @@ -27,7 +27,7 @@ * Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling. */ @ApiModel(description = "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1HostPathVolumeSource { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) 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 e24a644267..5ebed7df6d 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IPBlock { public static final String SERIALIZED_NAME_CIDR = "cidr"; @SerializedName(SERIALIZED_NAME_CIDR) 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 2cdbf41e24..687703a9fa 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 @@ -30,7 +30,7 @@ * ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. */ @ApiModel(description = "ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ISCSIPersistentVolumeSource { public static final String SERIALIZED_NAME_CHAP_AUTH_DISCOVERY = "chapAuthDiscovery"; @SerializedName(SERIALIZED_NAME_CHAP_AUTH_DISCOVERY) 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 dea152f676..7910e96a1d 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 @@ -30,7 +30,7 @@ * Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. */ @ApiModel(description = "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ISCSIVolumeSource { public static final String SERIALIZED_NAME_CHAP_AUTH_DISCOVERY = "chapAuthDiscovery"; @SerializedName(SERIALIZED_NAME_CHAP_AUTH_DISCOVERY) 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 93fc41549c..d2eb987606 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 @@ -30,7 +30,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. */ @ApiModel(description = "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Ingress implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 0b41f946b0..2bae8d3d33 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 @@ -29,7 +29,7 @@ * IngressBackend describes all endpoints for a given service and port. */ @ApiModel(description = "IngressBackend describes all endpoints for a given service and port.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressBackend { public static final String SERIALIZED_NAME_RESOURCE = "resource"; @SerializedName(SERIALIZED_NAME_RESOURCE) 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 d9ce7f58d3..e33faa0caa 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a24066e495..80ce3e0f9c 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 @@ -31,7 +31,7 @@ * IngressClassList is a collection of IngressClasses. */ @ApiModel(description = "IngressClassList is a collection of IngressClasses.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 9f01046a94..31f914f585 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 @@ -27,7 +27,7 @@ * IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource. */ @ApiModel(description = "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressClassParametersReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) 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 451a8458cb..9ad90c3fe7 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 @@ -28,7 +28,7 @@ * IngressClassSpec provides information about the class of an Ingress. */ @ApiModel(description = "IngressClassSpec provides information about the class of an Ingress.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressClassSpec { public static final String SERIALIZED_NAME_CONTROLLER = "controller"; @SerializedName(SERIALIZED_NAME_CONTROLLER) 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 d6498c40f7..7a336835f7 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 @@ -31,7 +31,7 @@ * IngressList is a collection of Ingress. */ @ApiModel(description = "IngressList is a collection of Ingress.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 67a632d5b2..e0db4734b4 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 @@ -30,7 +30,7 @@ * IngressLoadBalancerIngress represents the status of a load-balancer ingress point. */ @ApiModel(description = "IngressLoadBalancerIngress represents the status of a load-balancer ingress point.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressLoadBalancerIngress { public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; @SerializedName(SERIALIZED_NAME_HOSTNAME) 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 46413a3842..1fd26f1916 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 @@ -30,7 +30,7 @@ * IngressLoadBalancerStatus represents the status of a load-balancer. */ @ApiModel(description = "IngressLoadBalancerStatus represents the status of a load-balancer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressLoadBalancerStatus { public static final String SERIALIZED_NAME_INGRESS = "ingress"; @SerializedName(SERIALIZED_NAME_INGRESS) 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 b08485e13b..c99cfc2599 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 @@ -27,7 +27,7 @@ * IngressPortStatus represents the error condition of a service port */ @ApiModel(description = "IngressPortStatus represents the error condition of a service port") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressPortStatus { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) 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 8dd0793267..c5fb3acab3 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 @@ -28,7 +28,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. */ @ApiModel(description = "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressRule { public static final String SERIALIZED_NAME_HOST = "host"; @SerializedName(SERIALIZED_NAME_HOST) 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 ec8376cf19..38e8603a4a 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 @@ -28,7 +28,7 @@ * IngressServiceBackend references a Kubernetes Service as a Backend. */ @ApiModel(description = "IngressServiceBackend references a Kubernetes Service as a Backend.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressServiceBackend { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 1b815979b6..23f65dd89f 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 @@ -32,7 +32,7 @@ * IngressSpec describes the Ingress the user wishes to exist. */ @ApiModel(description = "IngressSpec describes the Ingress the user wishes to exist.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressSpec { public static final String SERIALIZED_NAME_DEFAULT_BACKEND = "defaultBackend"; @SerializedName(SERIALIZED_NAME_DEFAULT_BACKEND) 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 de760c6591..4a8b84e885 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 @@ -28,7 +28,7 @@ * IngressStatus describe the current state of the Ingress. */ @ApiModel(description = "IngressStatus describe the current state of the Ingress.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressStatus { public static final String SERIALIZED_NAME_LOAD_BALANCER = "loadBalancer"; @SerializedName(SERIALIZED_NAME_LOAD_BALANCER) 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 7876376435..49035fb36d 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 @@ -29,7 +29,7 @@ * IngressTLS describes the transport layer security associated with an ingress. */ @ApiModel(description = "IngressTLS describes the transport layer security associated with an ingress.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1IngressTLS { public static final String SERIALIZED_NAME_HOSTS = "hosts"; @SerializedName(SERIALIZED_NAME_HOSTS) 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 a6ee787abd..7a97a98396 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 @@ -33,7 +33,7 @@ * JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). */ @ApiModel(description = "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1JSONSchemaProps { public static final String SERIALIZED_NAME_$_REF = "$ref"; @SerializedName(SERIALIZED_NAME_$_REF) 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 a09a49c1d2..8bf5634cca 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 @@ -30,7 +30,7 @@ * Job represents the configuration of a single job. */ @ApiModel(description = "Job represents the configuration of a single job.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Job implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a56afe3401..385fa747be 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 @@ -28,7 +28,7 @@ * JobCondition describes current state of a job. */ @ApiModel(description = "JobCondition describes current state of a job.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1JobCondition { public static final String SERIALIZED_NAME_LAST_PROBE_TIME = "lastProbeTime"; @SerializedName(SERIALIZED_NAME_LAST_PROBE_TIME) 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 4861624e8e..9874a65a2f 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 @@ -31,7 +31,7 @@ * JobList is a collection of jobs. */ @ApiModel(description = "JobList is a collection of jobs.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1JobList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 26492a91c6..7dce8a5215 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 @@ -30,7 +30,7 @@ * JobSpec describes how the job execution will look like. */ @ApiModel(description = "JobSpec describes how the job execution will look like.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1JobSpec { public static final String SERIALIZED_NAME_ACTIVE_DEADLINE_SECONDS = "activeDeadlineSeconds"; @SerializedName(SERIALIZED_NAME_ACTIVE_DEADLINE_SECONDS) @@ -40,6 +40,10 @@ public class V1JobSpec { @SerializedName(SERIALIZED_NAME_BACKOFF_LIMIT) private Integer backoffLimit; + public static final String SERIALIZED_NAME_BACKOFF_LIMIT_PER_INDEX = "backoffLimitPerIndex"; + @SerializedName(SERIALIZED_NAME_BACKOFF_LIMIT_PER_INDEX) + private Integer backoffLimitPerIndex; + public static final String SERIALIZED_NAME_COMPLETION_MODE = "completionMode"; @SerializedName(SERIALIZED_NAME_COMPLETION_MODE) private String completionMode; @@ -52,6 +56,10 @@ public class V1JobSpec { @SerializedName(SERIALIZED_NAME_MANUAL_SELECTOR) private Boolean manualSelector; + public static final String SERIALIZED_NAME_MAX_FAILED_INDEXES = "maxFailedIndexes"; + @SerializedName(SERIALIZED_NAME_MAX_FAILED_INDEXES) + private Integer maxFailedIndexes; + public static final String SERIALIZED_NAME_PARALLELISM = "parallelism"; @SerializedName(SERIALIZED_NAME_PARALLELISM) private Integer parallelism; @@ -60,6 +68,10 @@ public class V1JobSpec { @SerializedName(SERIALIZED_NAME_POD_FAILURE_POLICY) private V1PodFailurePolicy podFailurePolicy; + public static final String SERIALIZED_NAME_POD_REPLACEMENT_POLICY = "podReplacementPolicy"; + @SerializedName(SERIALIZED_NAME_POD_REPLACEMENT_POLICY) + private String podReplacementPolicy; + public static final String SERIALIZED_NAME_SELECTOR = "selector"; @SerializedName(SERIALIZED_NAME_SELECTOR) private V1LabelSelector selector; @@ -123,6 +135,29 @@ public void setBackoffLimit(Integer backoffLimit) { } + public V1JobSpec backoffLimitPerIndex(Integer backoffLimitPerIndex) { + + this.backoffLimitPerIndex = backoffLimitPerIndex; + return this; + } + + /** + * Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). + * @return backoffLimitPerIndex + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).") + + public Integer getBackoffLimitPerIndex() { + return backoffLimitPerIndex; + } + + + public void setBackoffLimitPerIndex(Integer backoffLimitPerIndex) { + this.backoffLimitPerIndex = backoffLimitPerIndex; + } + + public V1JobSpec completionMode(String completionMode) { this.completionMode = completionMode; @@ -192,6 +227,29 @@ public void setManualSelector(Boolean manualSelector) { } + public V1JobSpec maxFailedIndexes(Integer maxFailedIndexes) { + + this.maxFailedIndexes = maxFailedIndexes; + return this; + } + + /** + * Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). + * @return maxFailedIndexes + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).") + + public Integer getMaxFailedIndexes() { + return maxFailedIndexes; + } + + + public void setMaxFailedIndexes(Integer maxFailedIndexes) { + this.maxFailedIndexes = maxFailedIndexes; + } + + public V1JobSpec parallelism(Integer parallelism) { this.parallelism = parallelism; @@ -238,6 +296,29 @@ public void setPodFailurePolicy(V1PodFailurePolicy podFailurePolicy) { } + public V1JobSpec podReplacementPolicy(String podReplacementPolicy) { + + this.podReplacementPolicy = podReplacementPolicy; + return this; + } + + /** + * podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods when they are terminating (has a metadata.deletionTimestamp) or failed. - Failed means to wait until a previously created Pod is fully terminated (has phase Failed or Succeeded) before creating a replacement Pod. When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an alpha field. Enable JobPodReplacementPolicy to be able to use this field. + * @return podReplacementPolicy + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods when they are terminating (has a metadata.deletionTimestamp) or failed. - Failed means to wait until a previously created Pod is fully terminated (has phase Failed or Succeeded) before creating a replacement Pod. When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an alpha field. Enable JobPodReplacementPolicy to be able to use this field.") + + public String getPodReplacementPolicy() { + return podReplacementPolicy; + } + + + public void setPodReplacementPolicy(String podReplacementPolicy) { + this.podReplacementPolicy = podReplacementPolicy; + } + + public V1JobSpec selector(V1LabelSelector selector) { this.selector = selector; @@ -340,11 +421,14 @@ public boolean equals(java.lang.Object o) { V1JobSpec v1JobSpec = (V1JobSpec) o; return Objects.equals(this.activeDeadlineSeconds, v1JobSpec.activeDeadlineSeconds) && Objects.equals(this.backoffLimit, v1JobSpec.backoffLimit) && + Objects.equals(this.backoffLimitPerIndex, v1JobSpec.backoffLimitPerIndex) && Objects.equals(this.completionMode, v1JobSpec.completionMode) && Objects.equals(this.completions, v1JobSpec.completions) && Objects.equals(this.manualSelector, v1JobSpec.manualSelector) && + Objects.equals(this.maxFailedIndexes, v1JobSpec.maxFailedIndexes) && Objects.equals(this.parallelism, v1JobSpec.parallelism) && Objects.equals(this.podFailurePolicy, v1JobSpec.podFailurePolicy) && + Objects.equals(this.podReplacementPolicy, v1JobSpec.podReplacementPolicy) && Objects.equals(this.selector, v1JobSpec.selector) && Objects.equals(this.suspend, v1JobSpec.suspend) && Objects.equals(this.template, v1JobSpec.template) && @@ -353,7 +437,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(activeDeadlineSeconds, backoffLimit, completionMode, completions, manualSelector, parallelism, podFailurePolicy, selector, suspend, template, ttlSecondsAfterFinished); + return Objects.hash(activeDeadlineSeconds, backoffLimit, backoffLimitPerIndex, completionMode, completions, manualSelector, maxFailedIndexes, parallelism, podFailurePolicy, podReplacementPolicy, selector, suspend, template, ttlSecondsAfterFinished); } @@ -363,11 +447,14 @@ public String toString() { sb.append("class V1JobSpec {\n"); sb.append(" activeDeadlineSeconds: ").append(toIndentedString(activeDeadlineSeconds)).append("\n"); sb.append(" backoffLimit: ").append(toIndentedString(backoffLimit)).append("\n"); + sb.append(" backoffLimitPerIndex: ").append(toIndentedString(backoffLimitPerIndex)).append("\n"); sb.append(" completionMode: ").append(toIndentedString(completionMode)).append("\n"); sb.append(" completions: ").append(toIndentedString(completions)).append("\n"); sb.append(" manualSelector: ").append(toIndentedString(manualSelector)).append("\n"); + sb.append(" maxFailedIndexes: ").append(toIndentedString(maxFailedIndexes)).append("\n"); sb.append(" parallelism: ").append(toIndentedString(parallelism)).append("\n"); sb.append(" podFailurePolicy: ").append(toIndentedString(podFailurePolicy)).append("\n"); + sb.append(" podReplacementPolicy: ").append(toIndentedString(podReplacementPolicy)).append("\n"); sb.append(" selector: ").append(toIndentedString(selector)).append("\n"); sb.append(" suspend: ").append(toIndentedString(suspend)).append("\n"); sb.append(" template: ").append(toIndentedString(template)).append("\n"); 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 7c35343963..665d49dced 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 @@ -32,7 +32,7 @@ * JobStatus represents the current state of a Job. */ @ApiModel(description = "JobStatus represents the current state of a Job.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1JobStatus { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) @@ -54,6 +54,10 @@ public class V1JobStatus { @SerializedName(SERIALIZED_NAME_FAILED) private Integer failed; + public static final String SERIALIZED_NAME_FAILED_INDEXES = "failedIndexes"; + @SerializedName(SERIALIZED_NAME_FAILED_INDEXES) + private String failedIndexes; + public static final String SERIALIZED_NAME_READY = "ready"; @SerializedName(SERIALIZED_NAME_READY) private Integer ready; @@ -66,6 +70,10 @@ public class V1JobStatus { @SerializedName(SERIALIZED_NAME_SUCCEEDED) private Integer succeeded; + public static final String SERIALIZED_NAME_TERMINATING = "terminating"; + @SerializedName(SERIALIZED_NAME_TERMINATING) + private Integer terminating; + public static final String SERIALIZED_NAME_UNCOUNTED_TERMINATED_PODS = "uncountedTerminatedPods"; @SerializedName(SERIALIZED_NAME_UNCOUNTED_TERMINATED_PODS) private V1UncountedTerminatedPods uncountedTerminatedPods; @@ -194,6 +202,29 @@ public void setFailed(Integer failed) { } + public V1JobStatus failedIndexes(String failedIndexes) { + + this.failedIndexes = failedIndexes; + return this; + } + + /** + * FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). + * @return failedIndexes + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).") + + public String getFailedIndexes() { + return failedIndexes; + } + + + public void setFailedIndexes(String failedIndexes) { + this.failedIndexes = failedIndexes; + } + + public V1JobStatus ready(Integer ready) { this.ready = ready; @@ -263,6 +294,29 @@ public void setSucceeded(Integer succeeded) { } + public V1JobStatus terminating(Integer terminating) { + + this.terminating = terminating; + return this; + } + + /** + * The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp). This field is alpha-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (disabled by default). + * @return terminating + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp). This field is alpha-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (disabled by default).") + + public Integer getTerminating() { + return terminating; + } + + + public void setTerminating(Integer terminating) { + this.terminating = terminating; + } + + public V1JobStatus uncountedTerminatedPods(V1UncountedTerminatedPods uncountedTerminatedPods) { this.uncountedTerminatedPods = uncountedTerminatedPods; @@ -300,15 +354,17 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.completionTime, v1JobStatus.completionTime) && Objects.equals(this.conditions, v1JobStatus.conditions) && Objects.equals(this.failed, v1JobStatus.failed) && + Objects.equals(this.failedIndexes, v1JobStatus.failedIndexes) && Objects.equals(this.ready, v1JobStatus.ready) && Objects.equals(this.startTime, v1JobStatus.startTime) && Objects.equals(this.succeeded, v1JobStatus.succeeded) && + Objects.equals(this.terminating, v1JobStatus.terminating) && Objects.equals(this.uncountedTerminatedPods, v1JobStatus.uncountedTerminatedPods); } @Override public int hashCode() { - return Objects.hash(active, completedIndexes, completionTime, conditions, failed, ready, startTime, succeeded, uncountedTerminatedPods); + return Objects.hash(active, completedIndexes, completionTime, conditions, failed, failedIndexes, ready, startTime, succeeded, terminating, uncountedTerminatedPods); } @@ -321,9 +377,11 @@ public String toString() { sb.append(" completionTime: ").append(toIndentedString(completionTime)).append("\n"); sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); sb.append(" failed: ").append(toIndentedString(failed)).append("\n"); + sb.append(" failedIndexes: ").append(toIndentedString(failedIndexes)).append("\n"); sb.append(" ready: ").append(toIndentedString(ready)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); sb.append(" succeeded: ").append(toIndentedString(succeeded)).append("\n"); + sb.append(" terminating: ").append(toIndentedString(terminating)).append("\n"); sb.append(" uncountedTerminatedPods: ").append(toIndentedString(uncountedTerminatedPods)).append("\n"); sb.append("}"); return sb.toString(); 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 a08f1ce045..b2a628983d 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 @@ -29,7 +29,7 @@ * JobTemplateSpec describes the data a Job should have when created from a template */ @ApiModel(description = "JobTemplateSpec describes the data a Job should have when created from a template") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1JobTemplateSpec { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) 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 4b6c811761..ff312e0734 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 @@ -27,7 +27,7 @@ * Maps a string key to a path within a volume. */ @ApiModel(description = "Maps a string key to a path within a volume.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1KeyToPath { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) 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 c6fb3eb88d..8d86fa951d 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 @@ -32,7 +32,7 @@ * 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. */ @ApiModel(description = "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LabelSelector { public static final String SERIALIZED_NAME_MATCH_EXPRESSIONS = "matchExpressions"; @SerializedName(SERIALIZED_NAME_MATCH_EXPRESSIONS) 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 38e7207968..63b59385f2 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 @@ -29,7 +29,7 @@ * A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. */ @ApiModel(description = "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LabelSelectorRequirement { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) 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 fb1c3fedeb..2faebcb63e 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 @@ -29,7 +29,7 @@ * Lease defines a lease concept. */ @ApiModel(description = "Lease defines a lease concept.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Lease implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 8e13f96b5d..6f8a4edbd5 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 @@ -31,7 +31,7 @@ * LeaseList is a list of Lease objects. */ @ApiModel(description = "LeaseList is a list of Lease objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LeaseList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e1fdb140ba..3edf6e728b 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 @@ -28,7 +28,7 @@ * LeaseSpec is a specification of a Lease. */ @ApiModel(description = "LeaseSpec is a specification of a Lease.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LeaseSpec { public static final String SERIALIZED_NAME_ACQUIRE_TIME = "acquireTime"; @SerializedName(SERIALIZED_NAME_ACQUIRE_TIME) 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 651399df82..1586a04de3 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 @@ -28,7 +28,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. */ @ApiModel(description = "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Lifecycle { public static final String SERIALIZED_NAME_POST_START = "postStart"; @SerializedName(SERIALIZED_NAME_POST_START) 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 03d4673428..d75d68c64a 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LifecycleHandler { public static final String SERIALIZED_NAME_EXEC = "exec"; @SerializedName(SERIALIZED_NAME_EXEC) 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 eadacb4a65..0701d70388 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 @@ -29,7 +29,7 @@ * LimitRange sets resource usage limits for each kind of resource in a Namespace. */ @ApiModel(description = "LimitRange sets resource usage limits for each kind of resource in a Namespace.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LimitRange implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a0c32460c8..5279648a14 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 @@ -31,7 +31,7 @@ * LimitRangeItem defines a min/max usage limit for any resource that matches on kind. */ @ApiModel(description = "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LimitRangeItem { public static final String SERIALIZED_NAME_DEFAULT = "default"; @SerializedName(SERIALIZED_NAME_DEFAULT) 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 ea542d6905..8337c621cb 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 @@ -31,7 +31,7 @@ * LimitRangeList is a list of LimitRange items. */ @ApiModel(description = "LimitRangeList is a list of LimitRange items.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LimitRangeList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 3dd09951ed..0a9eb8c891 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 @@ -30,7 +30,7 @@ * LimitRangeSpec defines a min/max usage limit for resources that match on kind. */ @ApiModel(description = "LimitRangeSpec defines a min/max usage limit for resources that match on kind.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LimitRangeSpec { public static final String SERIALIZED_NAME_LIMITS = "limits"; @SerializedName(SERIALIZED_NAME_LIMITS) 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 957b97a144..8852716c20 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 @@ -27,7 +27,7 @@ * ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. */ @ApiModel(description = "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ListMeta { public static final String SERIALIZED_NAME_CONTINUE = "continue"; @SerializedName(SERIALIZED_NAME_CONTINUE) 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 67f2e41b07..11afba5ad8 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 @@ -30,7 +30,7 @@ * LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point. */ @ApiModel(description = "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LoadBalancerIngress { public static final String SERIALIZED_NAME_HOSTNAME = "hostname"; @SerializedName(SERIALIZED_NAME_HOSTNAME) 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 1f832708c6..a2934fecf6 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 @@ -30,7 +30,7 @@ * LoadBalancerStatus represents the status of a load-balancer. */ @ApiModel(description = "LoadBalancerStatus represents the status of a load-balancer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LoadBalancerStatus { public static final String SERIALIZED_NAME_INGRESS = "ingress"; @SerializedName(SERIALIZED_NAME_INGRESS) 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 b108da3f9d..83e58a94f6 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 @@ -27,7 +27,7 @@ * LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. */ @ApiModel(description = "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LocalObjectReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 85f60b283d..1471f08322 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 @@ -30,7 +30,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. */ @ApiModel(description = "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LocalSubjectAccessReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 dde74c4008..50440a363b 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 @@ -27,7 +27,7 @@ * Local represents directly-attached storage with node affinity (Beta feature) */ @ApiModel(description = "Local represents directly-attached storage with node affinity (Beta feature)") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1LocalVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 2b734f83b5..946d0d712b 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 @@ -28,7 +28,7 @@ * ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. */ @ApiModel(description = "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ManagedFieldsEntry { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a48e2ef048..d855099a97 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 @@ -27,7 +27,7 @@ * MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook. */ @ApiModel(description = "MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1MatchCondition { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) 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 a23ac9db13..2c54a2d00c 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 @@ -33,7 +33,7 @@ * MutatingWebhook describes an admission webhook and the resources and operations it applies to. */ @ApiModel(description = "MutatingWebhook describes an admission webhook and the resources and operations it applies to.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1MutatingWebhook { public static final String SERIALIZED_NAME_ADMISSION_REVIEW_VERSIONS = "admissionReviewVersions"; @SerializedName(SERIALIZED_NAME_ADMISSION_REVIEW_VERSIONS) @@ -171,11 +171,11 @@ public V1MutatingWebhook addMatchConditionsItem(V1MatchCondition matchConditions } /** - * MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate. + * MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. * @return matchConditions **/ @javax.annotation.Nullable - @ApiModelProperty(value = "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate.") + @ApiModelProperty(value = "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.") public List getMatchConditions() { return matchConditions; 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 ae3f874da1..f9db9116a9 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 @@ -31,7 +31,7 @@ * MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. */ @ApiModel(description = "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1MutatingWebhookConfiguration implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 1f89f5ad51..6762a25d02 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 @@ -31,7 +31,7 @@ * MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. */ @ApiModel(description = "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1MutatingWebhookConfigurationList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 fc7d650b59..0709d5a4d9 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 @@ -27,7 +27,7 @@ * Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling. */ @ApiModel(description = "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NFSVolumeSource { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) 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 e8427f09de..ed0ce19fd5 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 @@ -30,7 +30,7 @@ * Namespace provides a scope for Names. Use of multiple namespaces is optional. */ @ApiModel(description = "Namespace provides a scope for Names. Use of multiple namespaces is optional.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Namespace implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 1f9191f9b1..610b9262b6 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 @@ -28,7 +28,7 @@ * NamespaceCondition contains details about state of namespace. */ @ApiModel(description = "NamespaceCondition contains details about state of namespace.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NamespaceCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 8f549a9f0c..c859d7e8e0 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 @@ -31,7 +31,7 @@ * NamespaceList is a list of Namespaces. */ @ApiModel(description = "NamespaceList is a list of Namespaces.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NamespaceList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 aaa12717d3..6eaaa1adb3 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 @@ -29,7 +29,7 @@ * NamespaceSpec describes the attributes on a Namespace. */ @ApiModel(description = "NamespaceSpec describes the attributes on a Namespace.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NamespaceSpec { public static final String SERIALIZED_NAME_FINALIZERS = "finalizers"; @SerializedName(SERIALIZED_NAME_FINALIZERS) 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 05cf4efbbc..6f0a9dc024 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 @@ -30,7 +30,7 @@ * NamespaceStatus is information about the current status of a Namespace. */ @ApiModel(description = "NamespaceStatus is information about the current status of a Namespace.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NamespaceStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) 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 9618c0a25f..e9776a4e92 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 @@ -20,7 +20,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1NetworkPolicySpec; -import io.kubernetes.client.openapi.models.V1NetworkPolicyStatus; import io.kubernetes.client.openapi.models.V1ObjectMeta; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -30,7 +29,7 @@ * NetworkPolicy describes what network traffic is allowed for a set of Pods */ @ApiModel(description = "NetworkPolicy describes what network traffic is allowed for a set of Pods") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NetworkPolicy implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) @@ -48,10 +47,6 @@ public class V1NetworkPolicy implements io.kubernetes.client.common.KubernetesOb @SerializedName(SERIALIZED_NAME_SPEC) private V1NetworkPolicySpec spec; - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private V1NetworkPolicyStatus status; - public V1NetworkPolicy apiVersion(String apiVersion) { @@ -145,29 +140,6 @@ public void setSpec(V1NetworkPolicySpec spec) { } - public V1NetworkPolicy status(V1NetworkPolicyStatus status) { - - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public V1NetworkPolicyStatus getStatus() { - return status; - } - - - public void setStatus(V1NetworkPolicyStatus status) { - this.status = status; - } - - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -180,13 +152,12 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.apiVersion, v1NetworkPolicy.apiVersion) && Objects.equals(this.kind, v1NetworkPolicy.kind) && Objects.equals(this.metadata, v1NetworkPolicy.metadata) && - Objects.equals(this.spec, v1NetworkPolicy.spec) && - Objects.equals(this.status, v1NetworkPolicy.status); + Objects.equals(this.spec, v1NetworkPolicy.spec); } @Override public int hashCode() { - return Objects.hash(apiVersion, kind, metadata, spec, status); + return Objects.hash(apiVersion, kind, metadata, spec); } @@ -198,7 +169,6 @@ public String toString() { sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" spec: ").append(toIndentedString(spec)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } 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 7043671d33..cdc1eaf414 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 @@ -31,7 +31,7 @@ * 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 */ @ApiModel(description = "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") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NetworkPolicyEgressRule { public static final String SERIALIZED_NAME_PORTS = "ports"; @SerializedName(SERIALIZED_NAME_PORTS) 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 19aba09b4c..71b083e478 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 @@ -31,7 +31,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NetworkPolicyIngressRule { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) 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 98d27d768b..22b1988004 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 @@ -31,7 +31,7 @@ * NetworkPolicyList is a list of NetworkPolicy objects. */ @ApiModel(description = "NetworkPolicyList is a list of NetworkPolicy objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NetworkPolicyList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a85694ea7b..c5d846c73e 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 @@ -29,7 +29,7 @@ * NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed */ @ApiModel(description = "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NetworkPolicyPeer { public static final String SERIALIZED_NAME_IP_BLOCK = "ipBlock"; @SerializedName(SERIALIZED_NAME_IP_BLOCK) 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 3ffbd4e7a3..a65797b6d2 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 @@ -28,7 +28,7 @@ * NetworkPolicyPort describes a port to allow traffic on */ @ApiModel(description = "NetworkPolicyPort describes a port to allow traffic on") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NetworkPolicyPort { public static final String SERIALIZED_NAME_END_PORT = "endPort"; @SerializedName(SERIALIZED_NAME_END_PORT) 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 d1d856c348..c1ebe4076d 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 @@ -32,7 +32,7 @@ * NetworkPolicySpec provides the specification of a NetworkPolicy */ @ApiModel(description = "NetworkPolicySpec provides the specification of a NetworkPolicy") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NetworkPolicySpec { public static final String SERIALIZED_NAME_EGRESS = "egress"; @SerializedName(SERIALIZED_NAME_EGRESS) 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 184c3e6912..d1e4fe7e83 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 @@ -30,7 +30,7 @@ * Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd). */ @ApiModel(description = "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Node implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 9194327ea9..fdc403c8ef 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 @@ -27,7 +27,7 @@ * NodeAddress contains information for the node's address. */ @ApiModel(description = "NodeAddress contains information for the node's address.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeAddress { public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) 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 f85dd8b447..ac9d39c8f2 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 @@ -31,7 +31,7 @@ * Node affinity is a group of node affinity scheduling rules. */ @ApiModel(description = "Node affinity is a group of node affinity scheduling rules.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") 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) 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 3985846bca..a93b389cad 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 @@ -28,7 +28,7 @@ * NodeCondition contains condition information for a node. */ @ApiModel(description = "NodeCondition contains condition information for a node.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeCondition { public static final String SERIALIZED_NAME_LAST_HEARTBEAT_TIME = "lastHeartbeatTime"; @SerializedName(SERIALIZED_NAME_LAST_HEARTBEAT_TIME) 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 fa6ff6c143..c37dc9eadc 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 @@ -28,7 +28,7 @@ * NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22 */ @ApiModel(description = "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeConfigSource { public static final String SERIALIZED_NAME_CONFIG_MAP = "configMap"; @SerializedName(SERIALIZED_NAME_CONFIG_MAP) 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 c7b14fd7b1..5aadd18792 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 @@ -28,7 +28,7 @@ * NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. */ @ApiModel(description = "NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeConfigStatus { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) 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 55eef2dc57..dc6ddcb4fd 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 @@ -28,7 +28,7 @@ * NodeDaemonEndpoints lists ports opened by daemons running on the Node. */ @ApiModel(description = "NodeDaemonEndpoints lists ports opened by daemons running on the Node.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeDaemonEndpoints { public static final String SERIALIZED_NAME_KUBELET_ENDPOINT = "kubeletEndpoint"; @SerializedName(SERIALIZED_NAME_KUBELET_ENDPOINT) 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 576ea717c9..6598b7bdd7 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 @@ -31,7 +31,7 @@ * NodeList is the whole list of all Nodes which have been registered with master. */ @ApiModel(description = "NodeList is the whole list of all Nodes which have been registered with master.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a4b0447096..595de86c4a 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 @@ -30,7 +30,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. */ @ApiModel(description = "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeSelector { public static final String SERIALIZED_NAME_NODE_SELECTOR_TERMS = "nodeSelectorTerms"; @SerializedName(SERIALIZED_NAME_NODE_SELECTOR_TERMS) 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 22fddb3289..43a08e16da 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 @@ -29,7 +29,7 @@ * A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. */ @ApiModel(description = "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeSelectorRequirement { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) 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 67f32569be..bf61a0d390 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 @@ -30,7 +30,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeSelectorTerm { public static final String SERIALIZED_NAME_MATCH_EXPRESSIONS = "matchExpressions"; @SerializedName(SERIALIZED_NAME_MATCH_EXPRESSIONS) 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 d990b57136..b9cda295f3 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 @@ -31,7 +31,7 @@ * NodeSpec describes the attributes that a node is created with. */ @ApiModel(description = "NodeSpec describes the attributes that a node is created with.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeSpec { public static final String SERIALIZED_NAME_CONFIG_SOURCE = "configSource"; @SerializedName(SERIALIZED_NAME_CONFIG_SOURCE) 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 0257ee813d..50f2926099 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 @@ -39,7 +39,7 @@ * NodeStatus is information about the current status of a node. */ @ApiModel(description = "NodeStatus is information about the current status of a node.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeStatus { public static final String SERIALIZED_NAME_ADDRESSES = "addresses"; @SerializedName(SERIALIZED_NAME_ADDRESSES) 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 9ef5fe1ad4..b9b4c5b9a4 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 @@ -27,7 +27,7 @@ * NodeSystemInfo is a set of ids/uuids to uniquely identify the node. */ @ApiModel(description = "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NodeSystemInfo { public static final String SERIALIZED_NAME_ARCHITECTURE = "architecture"; @SerializedName(SERIALIZED_NAME_ARCHITECTURE) 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 209a0ace11..855c4a440e 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 @@ -27,7 +27,7 @@ * NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface */ @ApiModel(description = "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NonResourceAttributes { public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) 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 99c03276b1..f64c33c891 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 @@ -29,7 +29,7 @@ * NonResourceRule holds information that describes a rule for the non-resource */ @ApiModel(description = "NonResourceRule holds information that describes a rule for the non-resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1NonResourceRule { public static final String SERIALIZED_NAME_NON_RESOURCE_U_R_LS = "nonResourceURLs"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_U_R_LS) 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 4120397fcd..fbfa3acc72 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 @@ -27,7 +27,7 @@ * ObjectFieldSelector selects an APIVersioned field of an object. */ @ApiModel(description = "ObjectFieldSelector selects an APIVersioned field of an object.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ObjectFieldSelector { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 4560b2c3e3..0a0c2ff3a8 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 @@ -34,7 +34,7 @@ * ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. */ @ApiModel(description = "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ObjectMeta { public static final String SERIALIZED_NAME_ANNOTATIONS = "annotations"; @SerializedName(SERIALIZED_NAME_ANNOTATIONS) 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 981f27a1d3..e6354e76b9 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 @@ -27,7 +27,7 @@ * ObjectReference contains enough information to let you inspect or modify the referred object. */ @ApiModel(description = "ObjectReference contains enough information to let you inspect or modify the referred object.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ObjectReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 ce8ce0d4a2..612737e824 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 @@ -31,7 +31,7 @@ * Overhead structure represents the resource overhead associated with running a pod. */ @ApiModel(description = "Overhead structure represents the resource overhead associated with running a pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Overhead { public static final String SERIALIZED_NAME_POD_FIXED = "podFixed"; @SerializedName(SERIALIZED_NAME_POD_FIXED) 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 70cc2ce6a4..627f87aed1 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 @@ -27,7 +27,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1OwnerReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 148c5b1ff2..742df2ab26 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 @@ -30,7 +30,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 */ @ApiModel(description = "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") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolume implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 b62ec0585e..4b64b83a34 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 @@ -30,7 +30,7 @@ * PersistentVolumeClaim is a user's request for and claim to a persistent volume */ @ApiModel(description = "PersistentVolumeClaim is a user's request for and claim to a persistent volume") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeClaim implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 f15ebaf157..69b134a946 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 @@ -28,7 +28,7 @@ * PersistentVolumeClaimCondition contains details about state of pvc */ @ApiModel(description = "PersistentVolumeClaimCondition contains details about state of pvc") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeClaimCondition { public static final String SERIALIZED_NAME_LAST_PROBE_TIME = "lastProbeTime"; @SerializedName(SERIALIZED_NAME_LAST_PROBE_TIME) 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 bdffc6e200..9f7696457a 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 @@ -31,7 +31,7 @@ * PersistentVolumeClaimList is a list of PersistentVolumeClaim items. */ @ApiModel(description = "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeClaimList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 c85888101e..cae4884788 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 @@ -33,7 +33,7 @@ * PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes */ @ApiModel(description = "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeClaimSpec { public static final String SERIALIZED_NAME_ACCESS_MODES = "accessModes"; @SerializedName(SERIALIZED_NAME_ACCESS_MODES) 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 7a8ffa2e34..3b97a1ca4e 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 @@ -33,12 +33,16 @@ * PersistentVolumeClaimStatus is the current status of a persistent volume claim. */ @ApiModel(description = "PersistentVolumeClaimStatus is the current status of a persistent volume claim.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeClaimStatus { public static final String SERIALIZED_NAME_ACCESS_MODES = "accessModes"; @SerializedName(SERIALIZED_NAME_ACCESS_MODES) private List accessModes = null; + public static final String SERIALIZED_NAME_ALLOCATED_RESOURCE_STATUSES = "allocatedResourceStatuses"; + @SerializedName(SERIALIZED_NAME_ALLOCATED_RESOURCE_STATUSES) + private Map allocatedResourceStatuses = null; + public static final String SERIALIZED_NAME_ALLOCATED_RESOURCES = "allocatedResources"; @SerializedName(SERIALIZED_NAME_ALLOCATED_RESOURCES) private Map allocatedResources = null; @@ -55,10 +59,6 @@ public class V1PersistentVolumeClaimStatus { @SerializedName(SERIALIZED_NAME_PHASE) private String phase; - public static final String SERIALIZED_NAME_RESIZE_STATUS = "resizeStatus"; - @SerializedName(SERIALIZED_NAME_RESIZE_STATUS) - private String resizeStatus; - public V1PersistentVolumeClaimStatus accessModes(List accessModes) { @@ -91,6 +91,37 @@ public void setAccessModes(List accessModes) { } + public V1PersistentVolumeClaimStatus allocatedResourceStatuses(Map allocatedResourceStatuses) { + + this.allocatedResourceStatuses = allocatedResourceStatuses; + return this; + } + + public V1PersistentVolumeClaimStatus putAllocatedResourceStatusesItem(String key, String allocatedResourceStatusesItem) { + if (this.allocatedResourceStatuses == null) { + this.allocatedResourceStatuses = new HashMap<>(); + } + this.allocatedResourceStatuses.put(key, allocatedResourceStatusesItem); + return this; + } + + /** + * allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. ClaimResourceStatus can be in any of following states: - ControllerResizeInProgress: State set when resize controller starts resizing the volume in control-plane. - ControllerResizeFailed: State set when resize has failed in resize controller with a terminal error. - NodeResizePending: State set when resize controller has finished resizing the volume but further resizing of volume is needed on the node. - NodeResizeInProgress: State set when kubelet starts resizing the volume. - NodeResizeFailed: State set when resizing has failed in kubelet with a terminal error. Transient errors don't set NodeResizeFailed. For example: if expanding a PVC for more capacity - this field can be one of the following states: - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\" When this field is not set, it means that no resize operation is in progress for the given PVC. A controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. + * @return allocatedResourceStatuses + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. ClaimResourceStatus can be in any of following states: - ControllerResizeInProgress: State set when resize controller starts resizing the volume in control-plane. - ControllerResizeFailed: State set when resize has failed in resize controller with a terminal error. - NodeResizePending: State set when resize controller has finished resizing the volume but further resizing of volume is needed on the node. - NodeResizeInProgress: State set when kubelet starts resizing the volume. - NodeResizeFailed: State set when resizing has failed in kubelet with a terminal error. Transient errors don't set NodeResizeFailed. For example: if expanding a PVC for more capacity - this field can be one of the following states: - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\" When this field is not set, it means that no resize operation is in progress for the given PVC. A controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.") + + public Map getAllocatedResourceStatuses() { + return allocatedResourceStatuses; + } + + + public void setAllocatedResourceStatuses(Map allocatedResourceStatuses) { + this.allocatedResourceStatuses = allocatedResourceStatuses; + } + + public V1PersistentVolumeClaimStatus allocatedResources(Map allocatedResources) { this.allocatedResources = allocatedResources; @@ -106,11 +137,11 @@ public V1PersistentVolumeClaimStatus putAllocatedResourcesItem(String key, Quant } /** - * allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. + * allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. Capacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. A controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. * @return allocatedResources **/ @javax.annotation.Nullable - @ApiModelProperty(value = "allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.") + @ApiModelProperty(value = "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. Capacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. A controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.") public Map getAllocatedResources() { return allocatedResources; @@ -207,29 +238,6 @@ public void setPhase(String phase) { } - public V1PersistentVolumeClaimStatus resizeStatus(String resizeStatus) { - - this.resizeStatus = resizeStatus; - return this; - } - - /** - * resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - * @return resizeStatus - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.") - - public String getResizeStatus() { - return resizeStatus; - } - - - public void setResizeStatus(String resizeStatus) { - this.resizeStatus = resizeStatus; - } - - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -240,16 +248,16 @@ public boolean equals(java.lang.Object o) { } V1PersistentVolumeClaimStatus v1PersistentVolumeClaimStatus = (V1PersistentVolumeClaimStatus) o; return Objects.equals(this.accessModes, v1PersistentVolumeClaimStatus.accessModes) && + Objects.equals(this.allocatedResourceStatuses, v1PersistentVolumeClaimStatus.allocatedResourceStatuses) && Objects.equals(this.allocatedResources, v1PersistentVolumeClaimStatus.allocatedResources) && Objects.equals(this.capacity, v1PersistentVolumeClaimStatus.capacity) && Objects.equals(this.conditions, v1PersistentVolumeClaimStatus.conditions) && - Objects.equals(this.phase, v1PersistentVolumeClaimStatus.phase) && - Objects.equals(this.resizeStatus, v1PersistentVolumeClaimStatus.resizeStatus); + Objects.equals(this.phase, v1PersistentVolumeClaimStatus.phase); } @Override public int hashCode() { - return Objects.hash(accessModes, allocatedResources, capacity, conditions, phase, resizeStatus); + return Objects.hash(accessModes, allocatedResourceStatuses, allocatedResources, capacity, conditions, phase); } @@ -258,11 +266,11 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1PersistentVolumeClaimStatus {\n"); sb.append(" accessModes: ").append(toIndentedString(accessModes)).append("\n"); + sb.append(" allocatedResourceStatuses: ").append(toIndentedString(allocatedResourceStatuses)).append("\n"); sb.append(" allocatedResources: ").append(toIndentedString(allocatedResources)).append("\n"); sb.append(" capacity: ").append(toIndentedString(capacity)).append("\n"); sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); sb.append(" phase: ").append(toIndentedString(phase)).append("\n"); - sb.append(" resizeStatus: ").append(toIndentedString(resizeStatus)).append("\n"); sb.append("}"); return sb.toString(); } 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 46b541e28a..5f13b01f7e 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 @@ -29,7 +29,7 @@ * PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource. */ @ApiModel(description = "PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeClaimTemplate { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) 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 215e499949..26fe835a38 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 @@ -27,7 +27,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). */ @ApiModel(description = "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeClaimVolumeSource { public static final String SERIALIZED_NAME_CLAIM_NAME = "claimName"; @SerializedName(SERIALIZED_NAME_CLAIM_NAME) 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 42af255e7c..b0e22413e1 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 @@ -31,7 +31,7 @@ * PersistentVolumeList is a list of PersistentVolume items. */ @ApiModel(description = "PersistentVolumeList is a list of PersistentVolume items.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 23310b61ee..aa5975b9fc 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 @@ -56,7 +56,7 @@ * PersistentVolumeSpec is the specification of a persistent volume. */ @ApiModel(description = "PersistentVolumeSpec is the specification of a persistent volume.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeSpec { public static final String SERIALIZED_NAME_ACCESS_MODES = "accessModes"; @SerializedName(SERIALIZED_NAME_ACCESS_MODES) 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 10bc985e5d..8f9d3f78af 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 @@ -22,13 +22,18 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.time.OffsetDateTime; /** * PersistentVolumeStatus is the current status of a persistent volume. */ @ApiModel(description = "PersistentVolumeStatus is the current status of a persistent volume.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PersistentVolumeStatus { + public static final String SERIALIZED_NAME_LAST_PHASE_TRANSITION_TIME = "lastPhaseTransitionTime"; + @SerializedName(SERIALIZED_NAME_LAST_PHASE_TRANSITION_TIME) + private OffsetDateTime lastPhaseTransitionTime; + public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) private String message; @@ -42,6 +47,29 @@ public class V1PersistentVolumeStatus { private String reason; + public V1PersistentVolumeStatus lastPhaseTransitionTime(OffsetDateTime lastPhaseTransitionTime) { + + this.lastPhaseTransitionTime = lastPhaseTransitionTime; + return this; + } + + /** + * lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature. + * @return lastPhaseTransitionTime + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature.") + + public OffsetDateTime getLastPhaseTransitionTime() { + return lastPhaseTransitionTime; + } + + + public void setLastPhaseTransitionTime(OffsetDateTime lastPhaseTransitionTime) { + this.lastPhaseTransitionTime = lastPhaseTransitionTime; + } + + public V1PersistentVolumeStatus message(String message) { this.message = message; @@ -120,14 +148,15 @@ public boolean equals(java.lang.Object o) { return false; } V1PersistentVolumeStatus v1PersistentVolumeStatus = (V1PersistentVolumeStatus) o; - return Objects.equals(this.message, v1PersistentVolumeStatus.message) && + return Objects.equals(this.lastPhaseTransitionTime, v1PersistentVolumeStatus.lastPhaseTransitionTime) && + Objects.equals(this.message, v1PersistentVolumeStatus.message) && Objects.equals(this.phase, v1PersistentVolumeStatus.phase) && Objects.equals(this.reason, v1PersistentVolumeStatus.reason); } @Override public int hashCode() { - return Objects.hash(message, phase, reason); + return Objects.hash(lastPhaseTransitionTime, message, phase, reason); } @@ -135,6 +164,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1PersistentVolumeStatus {\n"); + sb.append(" lastPhaseTransitionTime: ").append(toIndentedString(lastPhaseTransitionTime)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" phase: ").append(toIndentedString(phase)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); 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 2df217838f..9880e4d31d 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 @@ -27,7 +27,7 @@ * Represents a Photon Controller persistent disk resource. */ @ApiModel(description = "Represents a Photon Controller persistent disk resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PhotonPersistentDiskVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 70b2dec2f2..68e32dd78e 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 @@ -30,7 +30,7 @@ * Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. */ @ApiModel(description = "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Pod implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 b110b03325..ec06a32181 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 @@ -31,7 +31,7 @@ * Pod affinity is a group of inter pod affinity scheduling rules. */ @ApiModel(description = "Pod affinity is a group of inter pod affinity scheduling rules.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") 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) 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 577e8b8a95..b86823dafc 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 @@ -30,7 +30,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 */ @ApiModel(description = "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodAffinityTerm { public static final String SERIALIZED_NAME_LABEL_SELECTOR = "labelSelector"; @SerializedName(SERIALIZED_NAME_LABEL_SELECTOR) 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 ff46f1d5c7..05c9f21796 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 @@ -31,7 +31,7 @@ * Pod anti affinity is a group of inter pod anti affinity scheduling rules. */ @ApiModel(description = "Pod anti affinity is a group of inter pod anti affinity scheduling rules.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") 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) 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 d73c9ad1cb..b6e63a45f3 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 @@ -28,7 +28,7 @@ * PodCondition contains details for the current condition of this pod. */ @ApiModel(description = "PodCondition contains details for the current condition of this pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodCondition { public static final String SERIALIZED_NAME_LAST_PROBE_TIME = "lastProbeTime"; @SerializedName(SERIALIZED_NAME_LAST_PROBE_TIME) 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 cc2a1f08d0..bc865fca18 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 @@ -30,7 +30,7 @@ * PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. */ @ApiModel(description = "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodDNSConfig { public static final String SERIALIZED_NAME_NAMESERVERS = "nameservers"; @SerializedName(SERIALIZED_NAME_NAMESERVERS) 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 96020f58fd..9f06453648 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 @@ -27,7 +27,7 @@ * PodDNSConfigOption defines DNS resolver options of a pod. */ @ApiModel(description = "PodDNSConfigOption defines DNS resolver options of a pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodDNSConfigOption { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 8ffed398e6..dffb363fdf 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 @@ -30,7 +30,7 @@ * PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods */ @ApiModel(description = "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodDisruptionBudget implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 112dbcf1a7..d10c5a6c89 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 @@ -31,7 +31,7 @@ * PodDisruptionBudgetList is a collection of PodDisruptionBudgets. */ @ApiModel(description = "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodDisruptionBudgetList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 5ece64086e..df1aaeef01 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 @@ -29,7 +29,7 @@ * PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. */ @ApiModel(description = "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodDisruptionBudgetSpec { public static final String SERIALIZED_NAME_MAX_UNAVAILABLE = "maxUnavailable"; @SerializedName(SERIALIZED_NAME_MAX_UNAVAILABLE) 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 df0dd4e740..ecc5287beb 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 @@ -33,7 +33,7 @@ * PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. */ @ApiModel(description = "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodDisruptionBudgetStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) 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 68f4e156ae..b7a33e31f5 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 @@ -30,7 +30,7 @@ * PodFailurePolicy describes how failed pods influence the backoffLimit. */ @ApiModel(description = "PodFailurePolicy describes how failed pods influence the backoffLimit.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodFailurePolicy { public static final String SERIALIZED_NAME_RULES = "rules"; @SerializedName(SERIALIZED_NAME_RULES) 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 29c76d559f..9e095cb718 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodFailurePolicyOnExitCodesRequirement { public static final String SERIALIZED_NAME_CONTAINER_NAME = "containerName"; @SerializedName(SERIALIZED_NAME_CONTAINER_NAME) 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 ace6561a9c..003e4e4440 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 @@ -27,7 +27,7 @@ * PodFailurePolicyOnPodConditionsPattern describes a pattern for matching an actual pod condition type. */ @ApiModel(description = "PodFailurePolicyOnPodConditionsPattern describes a pattern for matching an actual pod condition type.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodFailurePolicyOnPodConditionsPattern { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) 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 95c9110fe9..79b6e3198e 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 @@ -31,7 +31,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodFailurePolicyRule { public static final String SERIALIZED_NAME_ACTION = "action"; @SerializedName(SERIALIZED_NAME_ACTION) @@ -43,7 +43,7 @@ public class V1PodFailurePolicyRule { public static final String SERIALIZED_NAME_ON_POD_CONDITIONS = "onPodConditions"; @SerializedName(SERIALIZED_NAME_ON_POD_CONDITIONS) - private List onPodConditions = new ArrayList<>(); + private List onPodConditions = null; public V1PodFailurePolicyRule action(String action) { @@ -53,10 +53,10 @@ public V1PodFailurePolicyRule action(String action) { } /** - * Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - Ignore: indicates that the counter towards the .backoffLimit is not incremented and a replacement pod is created. - Count: indicates that the pod is handled in the default way - the counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule. + * Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. This value is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). - Ignore: indicates that the counter towards the .backoffLimit is not incremented and a replacement pod is created. - Count: indicates that the pod is handled in the default way - the counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule. * @return action **/ - @ApiModelProperty(required = true, value = "Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - Ignore: indicates that the counter towards the .backoffLimit is not incremented and a replacement pod is created. - Count: indicates that the pod is handled in the default way - the counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.") + @ApiModelProperty(required = true, value = "Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are: - FailJob: indicates that the pod's job is marked as Failed and all running pods are terminated. - FailIndex: indicates that the pod's index is marked as Failed and will not be restarted. This value is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default). - Ignore: indicates that the counter towards the .backoffLimit is not incremented and a replacement pod is created. - Count: indicates that the pod is handled in the default way - the counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.") public String getAction() { return action; @@ -98,6 +98,9 @@ public V1PodFailurePolicyRule onPodConditions(List(); + } this.onPodConditions.add(onPodConditionsItem); return this; } @@ -106,7 +109,8 @@ public V1PodFailurePolicyRule addOnPodConditionsItem(V1PodFailurePolicyOnPodCond * Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed. * @return onPodConditions **/ - @ApiModelProperty(required = true, value = "Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed.") + @javax.annotation.Nullable + @ApiModelProperty(value = "Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed.") public List getOnPodConditions() { return onPodConditions; 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 b9c94ff1b2..b5e6b439c5 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 @@ -24,10 +24,10 @@ import java.io.IOException; /** - * IP address information for entries in the (plural) PodIPs field. Each entry includes: IP: An IP address allocated to the pod. Routable at least within the cluster. + * PodIP represents a single IP address allocated to the pod. */ -@ApiModel(description = "IP address information for entries in the (plural) PodIPs field. Each entry includes: IP: An IP address allocated to the pod. Routable at least within the cluster.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@ApiModel(description = "PodIP represents a single IP address allocated to the pod.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodIP { public static final String SERIALIZED_NAME_IP = "ip"; @SerializedName(SERIALIZED_NAME_IP) @@ -41,11 +41,11 @@ public V1PodIP ip(String ip) { } /** - * ip is an IP address (IPv4 or IPv6) assigned to the pod + * IP is the IP address assigned to the pod * @return ip **/ @javax.annotation.Nullable - @ApiModelProperty(value = "ip is an IP address (IPv4 or IPv6) assigned to the pod") + @ApiModelProperty(value = "IP is the IP address assigned to the pod") public String getIp() { return ip; 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 cc2248bb19..990f7cebec 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 @@ -31,7 +31,7 @@ * PodList is a list of Pods. */ @ApiModel(description = "PodList is a list of Pods.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 60176be465..c6b6d47677 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 @@ -27,7 +27,7 @@ * PodOS defines the OS parameters of a pod. */ @ApiModel(description = "PodOS defines the OS parameters of a pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodOS { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 92b4c647fb..32d38f7d5e 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 @@ -27,7 +27,7 @@ * PodReadinessGate contains the reference to a pod condition */ @ApiModel(description = "PodReadinessGate contains the reference to a pod condition") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodReadinessGate { public static final String SERIALIZED_NAME_CONDITION_TYPE = "conditionType"; @SerializedName(SERIALIZED_NAME_CONDITION_TYPE) 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 d7f92e97bc..7d9f57d607 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 @@ -28,7 +28,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodResourceClaim { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 new file mode 100644 index 0000000000..eff05fee66 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1PodResourceClaimStatus.java @@ -0,0 +1,126 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim. + */ +@ApiModel(description = "PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1PodResourceClaimStatus { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_RESOURCE_CLAIM_NAME = "resourceClaimName"; + @SerializedName(SERIALIZED_NAME_RESOURCE_CLAIM_NAME) + private String resourceClaimName; + + + public V1PodResourceClaimStatus name(String name) { + + this.name = name; + return this; + } + + /** + * Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL. + * @return name + **/ + @ApiModelProperty(required = true, value = "Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public V1PodResourceClaimStatus resourceClaimName(String resourceClaimName) { + + this.resourceClaimName = resourceClaimName; + return this; + } + + /** + * ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. It this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case. + * @return resourceClaimName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. It this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.") + + public String getResourceClaimName() { + return resourceClaimName; + } + + + public void setResourceClaimName(String resourceClaimName) { + this.resourceClaimName = resourceClaimName; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1PodResourceClaimStatus v1PodResourceClaimStatus = (V1PodResourceClaimStatus) o; + return Objects.equals(this.name, v1PodResourceClaimStatus.name) && + Objects.equals(this.resourceClaimName, v1PodResourceClaimStatus.resourceClaimName); + } + + @Override + public int hashCode() { + return Objects.hash(name, resourceClaimName); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1PodResourceClaimStatus {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" resourceClaimName: ").append(toIndentedString(resourceClaimName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 b9dc39e604..cc56182bf8 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 @@ -27,7 +27,7 @@ * PodSchedulingGate is associated to a Pod to guard its scheduling. */ @ApiModel(description = "PodSchedulingGate is associated to a Pod to guard its scheduling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodSchedulingGate { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 1962a7fbb5..d13b2433cb 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 @@ -33,7 +33,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. */ @ApiModel(description = "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodSecurityContext { public static final String SERIALIZED_NAME_FS_GROUP = "fsGroup"; @SerializedName(SERIALIZED_NAME_FS_GROUP) 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 639e7b1786..98cf773c3c 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 @@ -46,7 +46,7 @@ * PodSpec is a description of a pod. */ @ApiModel(description = "PodSpec is a description of a pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodSpec { public static final String SERIALIZED_NAME_ACTIVE_DEADLINE_SECONDS = "activeDeadlineSeconds"; @SerializedName(SERIALIZED_NAME_ACTIVE_DEADLINE_SECONDS) 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 47d2006680..6ea0025a95 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 @@ -20,8 +20,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.kubernetes.client.openapi.models.V1ContainerStatus; +import io.kubernetes.client.openapi.models.V1HostIP; import io.kubernetes.client.openapi.models.V1PodCondition; import io.kubernetes.client.openapi.models.V1PodIP; +import io.kubernetes.client.openapi.models.V1PodResourceClaimStatus; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; @@ -33,7 +35,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) @@ -51,6 +53,10 @@ public class V1PodStatus { @SerializedName(SERIALIZED_NAME_HOST_I_P) private String hostIP; + public static final String SERIALIZED_NAME_HOST_I_PS = "hostIPs"; + @SerializedName(SERIALIZED_NAME_HOST_I_PS) + private List hostIPs = null; + public static final String SERIALIZED_NAME_INIT_CONTAINER_STATUSES = "initContainerStatuses"; @SerializedName(SERIALIZED_NAME_INIT_CONTAINER_STATUSES) private List initContainerStatuses = null; @@ -87,6 +93,10 @@ public class V1PodStatus { @SerializedName(SERIALIZED_NAME_RESIZE) private String resize; + public static final String SERIALIZED_NAME_RESOURCE_CLAIM_STATUSES = "resourceClaimStatuses"; + @SerializedName(SERIALIZED_NAME_RESOURCE_CLAIM_STATUSES) + private List resourceClaimStatuses = null; + public static final String SERIALIZED_NAME_START_TIME = "startTime"; @SerializedName(SERIALIZED_NAME_START_TIME) private OffsetDateTime startTime; @@ -192,11 +202,11 @@ public V1PodStatus hostIP(String hostIP) { } /** - * IP address of the host to which the pod is assigned. Empty if not yet scheduled. + * hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod * @return hostIP **/ @javax.annotation.Nullable - @ApiModelProperty(value = "IP address of the host to which the pod is assigned. Empty if not yet scheduled.") + @ApiModelProperty(value = "hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod") public String getHostIP() { return hostIP; @@ -208,6 +218,37 @@ public void setHostIP(String hostIP) { } + public V1PodStatus hostIPs(List hostIPs) { + + this.hostIPs = hostIPs; + return this; + } + + public V1PodStatus addHostIPsItem(V1HostIP hostIPsItem) { + if (this.hostIPs == null) { + this.hostIPs = new ArrayList<>(); + } + this.hostIPs.add(hostIPsItem); + return this; + } + + /** + * hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod. + * @return hostIPs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod.") + + public List getHostIPs() { + return hostIPs; + } + + + public void setHostIPs(List hostIPs) { + this.hostIPs = hostIPs; + } + + public V1PodStatus initContainerStatuses(List initContainerStatuses) { this.initContainerStatuses = initContainerStatuses; @@ -315,11 +356,11 @@ public V1PodStatus podIP(String podIP) { } /** - * IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. + * podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. * @return podIP **/ @javax.annotation.Nullable - @ApiModelProperty(value = "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.") + @ApiModelProperty(value = "podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.") public String getPodIP() { return podIP; @@ -431,6 +472,37 @@ public void setResize(String resize) { } + public V1PodStatus resourceClaimStatuses(List resourceClaimStatuses) { + + this.resourceClaimStatuses = resourceClaimStatuses; + return this; + } + + public V1PodStatus addResourceClaimStatusesItem(V1PodResourceClaimStatus resourceClaimStatusesItem) { + if (this.resourceClaimStatuses == null) { + this.resourceClaimStatuses = new ArrayList<>(); + } + this.resourceClaimStatuses.add(resourceClaimStatusesItem); + return this; + } + + /** + * Status of resource claims. + * @return resourceClaimStatuses + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Status of resource claims.") + + public List getResourceClaimStatuses() { + return resourceClaimStatuses; + } + + + public void setResourceClaimStatuses(List resourceClaimStatuses) { + this.resourceClaimStatuses = resourceClaimStatuses; + } + + public V1PodStatus startTime(OffsetDateTime startTime) { this.startTime = startTime; @@ -467,6 +539,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.containerStatuses, v1PodStatus.containerStatuses) && Objects.equals(this.ephemeralContainerStatuses, v1PodStatus.ephemeralContainerStatuses) && Objects.equals(this.hostIP, v1PodStatus.hostIP) && + Objects.equals(this.hostIPs, v1PodStatus.hostIPs) && Objects.equals(this.initContainerStatuses, v1PodStatus.initContainerStatuses) && Objects.equals(this.message, v1PodStatus.message) && Objects.equals(this.nominatedNodeName, v1PodStatus.nominatedNodeName) && @@ -476,12 +549,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.qosClass, v1PodStatus.qosClass) && Objects.equals(this.reason, v1PodStatus.reason) && Objects.equals(this.resize, v1PodStatus.resize) && + Objects.equals(this.resourceClaimStatuses, v1PodStatus.resourceClaimStatuses) && Objects.equals(this.startTime, v1PodStatus.startTime); } @Override public int hashCode() { - return Objects.hash(conditions, containerStatuses, ephemeralContainerStatuses, hostIP, initContainerStatuses, message, nominatedNodeName, phase, podIP, podIPs, qosClass, reason, resize, startTime); + return Objects.hash(conditions, containerStatuses, ephemeralContainerStatuses, hostIP, hostIPs, initContainerStatuses, message, nominatedNodeName, phase, podIP, podIPs, qosClass, reason, resize, resourceClaimStatuses, startTime); } @@ -493,6 +567,7 @@ public String toString() { sb.append(" containerStatuses: ").append(toIndentedString(containerStatuses)).append("\n"); sb.append(" ephemeralContainerStatuses: ").append(toIndentedString(ephemeralContainerStatuses)).append("\n"); sb.append(" hostIP: ").append(toIndentedString(hostIP)).append("\n"); + sb.append(" hostIPs: ").append(toIndentedString(hostIPs)).append("\n"); sb.append(" initContainerStatuses: ").append(toIndentedString(initContainerStatuses)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" nominatedNodeName: ").append(toIndentedString(nominatedNodeName)).append("\n"); @@ -502,6 +577,7 @@ public String toString() { sb.append(" qosClass: ").append(toIndentedString(qosClass)).append("\n"); sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append(" resize: ").append(toIndentedString(resize)).append("\n"); + sb.append(" resourceClaimStatuses: ").append(toIndentedString(resourceClaimStatuses)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); sb.append("}"); return sb.toString(); 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 ce944c6f01..5e65bd99e4 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 @@ -29,7 +29,7 @@ * PodTemplate describes a template for creating copies of a predefined pod. */ @ApiModel(description = "PodTemplate describes a template for creating copies of a predefined pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodTemplate implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 75f15b5eac..ff1c42a505 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 @@ -31,7 +31,7 @@ * PodTemplateList is a list of PodTemplates. */ @ApiModel(description = "PodTemplateList is a list of PodTemplates.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodTemplateList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 f6556535e4..4f63bfc2db 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 @@ -29,7 +29,7 @@ * PodTemplateSpec describes the data a pod should have when created from a template */ @ApiModel(description = "PodTemplateSpec describes the data a pod should have when created from a template") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PodTemplateSpec { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) 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 3457495ec5..e78704222b 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 @@ -29,7 +29,7 @@ * 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. */ @ApiModel(description = "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PolicyRule { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) 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 2a7bd9e7c4..1cc865a10a 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 @@ -26,7 +26,7 @@ /** * V1PortStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PortStatus { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) 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 58ee66da1c..044613c3e1 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 @@ -27,7 +27,7 @@ * PortworxVolumeSource represents a Portworx volume resource. */ @ApiModel(description = "PortworxVolumeSource represents a Portworx volume resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PortworxVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 b740c73ab5..9193df86d3 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 @@ -27,7 +27,7 @@ * Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. */ @ApiModel(description = "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Preconditions { public static final String SERIALIZED_NAME_RESOURCE_VERSION = "resourceVersion"; @SerializedName(SERIALIZED_NAME_RESOURCE_VERSION) 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 86d344c419..5a94f03c3e 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 @@ -28,7 +28,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). */ @ApiModel(description = "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PreferredSchedulingTerm { public static final String SERIALIZED_NAME_PREFERENCE = "preference"; @SerializedName(SERIALIZED_NAME_PREFERENCE) 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 843e393920..7911af8d3f 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 @@ -28,7 +28,7 @@ * PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. */ @ApiModel(description = "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PriorityClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 011db8d035..762c423244 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 @@ -31,7 +31,7 @@ * PriorityClassList is a collection of priority classes. */ @ApiModel(description = "PriorityClassList is a collection of priority classes.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1PriorityClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 658b324c94..26c8328923 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 @@ -31,7 +31,7 @@ * Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. */ @ApiModel(description = "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Probe { public static final String SERIALIZED_NAME_EXEC = "exec"; @SerializedName(SERIALIZED_NAME_EXEC) 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 1c63df3e42..9a840fdf04 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 @@ -30,7 +30,7 @@ * Represents a projected volume source */ @ApiModel(description = "Represents a projected volume source") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ProjectedVolumeSource { public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) 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 2a382b2d6f..31515ef01b 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 @@ -27,7 +27,7 @@ * Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling. */ @ApiModel(description = "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1QuobyteVolumeSource { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) 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 f6c679eb89..37952259e6 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 @@ -30,7 +30,7 @@ * Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. */ @ApiModel(description = "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RBDPersistentVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 baf1b47a6b..e5d22019b3 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 @@ -30,7 +30,7 @@ * Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. */ @ApiModel(description = "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RBDVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 eb01f6fd2a..6481f3071c 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 @@ -30,7 +30,7 @@ * ReplicaSet ensures that a specified number of pod replicas are running at any given time. */ @ApiModel(description = "ReplicaSet ensures that a specified number of pod replicas are running at any given time.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicaSet implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 213b285eb9..94cdd91a22 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 @@ -28,7 +28,7 @@ * ReplicaSetCondition describes the state of a replica set at a certain point. */ @ApiModel(description = "ReplicaSetCondition describes the state of a replica set at a certain point.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicaSetCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 6d2bc1298c..0d7662888c 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 @@ -31,7 +31,7 @@ * ReplicaSetList is a collection of ReplicaSets. */ @ApiModel(description = "ReplicaSetList is a collection of ReplicaSets.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicaSetList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 ec46552d0b..6e8321ed19 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 @@ -29,7 +29,7 @@ * ReplicaSetSpec is the specification of a ReplicaSet. */ @ApiModel(description = "ReplicaSetSpec is the specification of a ReplicaSet.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicaSetSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) 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 cb8f127e52..92e5e7c268 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 @@ -30,7 +30,7 @@ * ReplicaSetStatus represents the current status of a ReplicaSet. */ @ApiModel(description = "ReplicaSetStatus represents the current status of a ReplicaSet.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicaSetStatus { public static final String SERIALIZED_NAME_AVAILABLE_REPLICAS = "availableReplicas"; @SerializedName(SERIALIZED_NAME_AVAILABLE_REPLICAS) 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 d71c608754..0c67e5224c 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 @@ -30,7 +30,7 @@ * ReplicationController represents the configuration of a replication controller. */ @ApiModel(description = "ReplicationController represents the configuration of a replication controller.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicationController implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 9c60e6835e..84c6428e1a 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 @@ -28,7 +28,7 @@ * ReplicationControllerCondition describes the state of a replication controller at a certain point. */ @ApiModel(description = "ReplicationControllerCondition describes the state of a replication controller at a certain point.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicationControllerCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 35fe8e1785..be9944129c 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 @@ -31,7 +31,7 @@ * ReplicationControllerList is a collection of replication controllers. */ @ApiModel(description = "ReplicationControllerList is a collection of replication controllers.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicationControllerList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a204b926aa..ff552fdb09 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 @@ -31,7 +31,7 @@ * ReplicationControllerSpec is the specification of a replication controller. */ @ApiModel(description = "ReplicationControllerSpec is the specification of a replication controller.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicationControllerSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) 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 3661812fa0..abf84541c1 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 @@ -30,7 +30,7 @@ * ReplicationControllerStatus represents the current status of a replication controller. */ @ApiModel(description = "ReplicationControllerStatus represents the current status of a replication controller.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ReplicationControllerStatus { public static final String SERIALIZED_NAME_AVAILABLE_REPLICAS = "availableReplicas"; @SerializedName(SERIALIZED_NAME_AVAILABLE_REPLICAS) 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 458ddb7d69..08f1d99bc4 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 @@ -27,7 +27,7 @@ * ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface */ @ApiModel(description = "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ResourceAttributes { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) 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 ac27cf2f33..5ee509157d 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 @@ -27,7 +27,7 @@ * ResourceClaim references one entry in PodSpec.ResourceClaims. */ @ApiModel(description = "ResourceClaim references one entry in PodSpec.ResourceClaims.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ResourceClaim { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 dd9f6d960b..1999d8d22c 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 @@ -28,7 +28,7 @@ * ResourceFieldSelector represents container resources (cpu, memory) and their output format */ @ApiModel(description = "ResourceFieldSelector represents container resources (cpu, memory) and their output format") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ResourceFieldSelector { public static final String SERIALIZED_NAME_CONTAINER_NAME = "containerName"; @SerializedName(SERIALIZED_NAME_CONTAINER_NAME) 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 eee273d0d2..50299aa2e0 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 @@ -30,7 +30,7 @@ * ResourceQuota sets aggregate quota restrictions enforced per namespace */ @ApiModel(description = "ResourceQuota sets aggregate quota restrictions enforced per namespace") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ResourceQuota implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 81d128d664..e97142f713 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 @@ -31,7 +31,7 @@ * ResourceQuotaList is a list of ResourceQuota items. */ @ApiModel(description = "ResourceQuotaList is a list of ResourceQuota items.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ResourceQuotaList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 791c75540f..f3c869a421 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 @@ -33,7 +33,7 @@ * ResourceQuotaSpec defines the desired hard limits to enforce for Quota. */ @ApiModel(description = "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ResourceQuotaSpec { public static final String SERIALIZED_NAME_HARD = "hard"; @SerializedName(SERIALIZED_NAME_HARD) 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 51113e88c7..4e5203acc3 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 @@ -31,7 +31,7 @@ * ResourceQuotaStatus defines the enforced hard limits and observed use. */ @ApiModel(description = "ResourceQuotaStatus defines the enforced hard limits and observed use.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ResourceQuotaStatus { public static final String SERIALIZED_NAME_HARD = "hard"; @SerializedName(SERIALIZED_NAME_HARD) 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 1da51ce780..5116a481ad 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 @@ -33,7 +33,7 @@ * ResourceRequirements describes the compute resource requirements. */ @ApiModel(description = "ResourceRequirements describes the compute resource requirements.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ResourceRequirements { public static final String SERIALIZED_NAME_CLAIMS = "claims"; @SerializedName(SERIALIZED_NAME_CLAIMS) 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 f442705046..ceff0a0792 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 @@ -29,7 +29,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ResourceRule { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) 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 87f309a51f..0340ddf7d7 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 @@ -31,7 +31,7 @@ * Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. */ @ApiModel(description = "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Role implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 d0568426de..2b84ef0c29 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 @@ -32,7 +32,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. */ @ApiModel(description = "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RoleBinding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 c4538846f1..7e48cbf779 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 @@ -31,7 +31,7 @@ * RoleBindingList is a collection of RoleBindings */ @ApiModel(description = "RoleBindingList is a collection of RoleBindings") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RoleBindingList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 3701e9e431..174b6bfba8 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 @@ -31,7 +31,7 @@ * RoleList is a collection of Roles */ @ApiModel(description = "RoleList is a collection of Roles") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RoleList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 3cebb45783..a87c4d9264 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 @@ -27,7 +27,7 @@ * RoleRef contains information that points to the role being used */ @ApiModel(description = "RoleRef contains information that points to the role being used") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RoleRef { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) 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 f585512ca1..410e19559c 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 @@ -28,7 +28,7 @@ * Spec to control the desired behavior of daemon set rolling update. */ @ApiModel(description = "Spec to control the desired behavior of daemon set rolling update.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RollingUpdateDaemonSet { public static final String SERIALIZED_NAME_MAX_SURGE = "maxSurge"; @SerializedName(SERIALIZED_NAME_MAX_SURGE) 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 aea27b0ec4..68d196ce04 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 @@ -28,7 +28,7 @@ * Spec to control the desired behavior of rolling update. */ @ApiModel(description = "Spec to control the desired behavior of rolling update.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RollingUpdateDeployment { public static final String SERIALIZED_NAME_MAX_SURGE = "maxSurge"; @SerializedName(SERIALIZED_NAME_MAX_SURGE) 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 451df13f38..6760ee2412 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 @@ -28,7 +28,7 @@ * RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. */ @ApiModel(description = "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RollingUpdateStatefulSetStrategy { public static final String SERIALIZED_NAME_MAX_UNAVAILABLE = "maxUnavailable"; @SerializedName(SERIALIZED_NAME_MAX_UNAVAILABLE) 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 6918f84394..3c5c6ef910 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 @@ -29,7 +29,7 @@ * RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. */ @ApiModel(description = "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RuleWithOperations { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) 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 70450d0bbe..386e721f6c 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 @@ -30,7 +30,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/ */ @ApiModel(description = "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/") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RuntimeClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 03a51b5ba7..682599d9cb 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 @@ -31,7 +31,7 @@ * RuntimeClassList is a list of RuntimeClass objects. */ @ApiModel(description = "RuntimeClassList is a list of RuntimeClass objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1RuntimeClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e1f718a1cc..ee7a976eb9 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 @@ -27,7 +27,7 @@ * SELinuxOptions are the labels to be applied to the container */ @ApiModel(description = "SELinuxOptions are the labels to be applied to the container") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SELinuxOptions { public static final String SERIALIZED_NAME_LEVEL = "level"; @SerializedName(SERIALIZED_NAME_LEVEL) 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 9f209d9cbe..6e6f3309d6 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 @@ -30,7 +30,7 @@ * Scale represents a scaling request for a resource. */ @ApiModel(description = "Scale represents a scaling request for a resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Scale implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a08f2d1266..b0d004ba2b 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 @@ -28,7 +28,7 @@ * ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume */ @ApiModel(description = "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ScaleIOPersistentVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 f6682376ab..f4c8a46a3e 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 @@ -28,7 +28,7 @@ * ScaleIOVolumeSource represents a persistent ScaleIO volume */ @ApiModel(description = "ScaleIOVolumeSource represents a persistent ScaleIO volume") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ScaleIOVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 090fae96df..877368bfaa 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 @@ -27,7 +27,7 @@ * ScaleSpec describes the attributes of a scale subresource. */ @ApiModel(description = "ScaleSpec describes the attributes of a scale subresource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ScaleSpec { public static final String SERIALIZED_NAME_REPLICAS = "replicas"; @SerializedName(SERIALIZED_NAME_REPLICAS) 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 2f3d22f336..8b0f454574 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 @@ -27,7 +27,7 @@ * ScaleStatus represents the current status of a scale subresource. */ @ApiModel(description = "ScaleStatus represents the current status of a scale subresource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ScaleStatus { public static final String SERIALIZED_NAME_REPLICAS = "replicas"; @SerializedName(SERIALIZED_NAME_REPLICAS) 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 c3f3790b8f..161a5ac4b8 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 @@ -32,7 +32,7 @@ * Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. */ @ApiModel(description = "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Scheduling { public static final String SERIALIZED_NAME_NODE_SELECTOR = "nodeSelector"; @SerializedName(SERIALIZED_NAME_NODE_SELECTOR) 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 5b7a58641a..7ab365ee63 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 @@ -30,7 +30,7 @@ * A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements. */ @ApiModel(description = "A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ScopeSelector { public static final String SERIALIZED_NAME_MATCH_EXPRESSIONS = "matchExpressions"; @SerializedName(SERIALIZED_NAME_MATCH_EXPRESSIONS) 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 d16531e63b..81144136af 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 @@ -29,7 +29,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. */ @ApiModel(description = "A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ScopedResourceSelectorRequirement { public static final String SERIALIZED_NAME_OPERATOR = "operator"; @SerializedName(SERIALIZED_NAME_OPERATOR) 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 63c0929211..38dd12a299 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 @@ -27,7 +27,7 @@ * SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set. */ @ApiModel(description = "SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SeccompProfile { public static final String SERIALIZED_NAME_LOCALHOST_PROFILE = "localhostProfile"; @SerializedName(SERIALIZED_NAME_LOCALHOST_PROFILE) @@ -45,11 +45,11 @@ public V1SeccompProfile localhostProfile(String localhostProfile) { } /** - * localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\". + * localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is \"Localhost\". Must NOT be set for any other type. * @return localhostProfile **/ @javax.annotation.Nullable - @ApiModelProperty(value = "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\".") + @ApiModelProperty(value = "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is \"Localhost\". Must NOT be set for any other type.") public String getLocalhostProfile() { return localhostProfile; 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 f3ecdb07bc..e311bf7a8c 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 @@ -31,7 +31,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. */ @ApiModel(description = "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Secret implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 aa392ab0d8..870d6249bd 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 @@ -27,7 +27,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SecretEnvSource { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 2dca285178..8cdf5b60a0 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 @@ -27,7 +27,7 @@ * SecretKeySelector selects a key of a Secret. */ @ApiModel(description = "SecretKeySelector selects a key of a Secret.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SecretKeySelector { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) 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 7dff127902..9d5d226b0e 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 @@ -31,7 +31,7 @@ * SecretList is a list of Secret. */ @ApiModel(description = "SecretList is a list of Secret.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SecretList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 cb3c9baf62..00940bb26e 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 @@ -30,7 +30,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SecretProjection { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) 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 1cf1167225..7c7e1b3b02 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 @@ -27,7 +27,7 @@ * SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace */ @ApiModel(description = "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SecretReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 a27e4945e3..027391f902 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SecretVolumeSource { public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) 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 6eb20822f1..0d93f295ae 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 @@ -31,7 +31,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. */ @ApiModel(description = "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SecurityContext { public static final String SERIALIZED_NAME_ALLOW_PRIVILEGE_ESCALATION = "allowPrivilegeEscalation"; @SerializedName(SERIALIZED_NAME_ALLOW_PRIVILEGE_ESCALATION) 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 87ca899e5e..7d97bfee53 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 @@ -30,7 +30,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 */ @ApiModel(description = "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SelfSubjectAccessReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 f9613f063c..43d5fd70fc 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 @@ -29,7 +29,7 @@ * SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set */ @ApiModel(description = "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SelfSubjectAccessReviewSpec { public static final String SERIALIZED_NAME_NON_RESOURCE_ATTRIBUTES = "nonResourceAttributes"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_ATTRIBUTES) 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 new file mode 100644 index 0000000000..2606dbf387 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReview.java @@ -0,0 +1,187 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1ObjectMeta; +import io.kubernetes.client.openapi.models.V1SelfSubjectReviewStatus; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * 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. + */ +@ApiModel(description = "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.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1SelfSubjectReview implements io.kubernetes.client.common.KubernetesObject { + public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; + @SerializedName(SERIALIZED_NAME_API_VERSION) + private String apiVersion; + + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private String kind; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + private V1ObjectMeta metadata; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private V1SelfSubjectReviewStatus status; + + + public V1SelfSubjectReview apiVersion(String apiVersion) { + + this.apiVersion = apiVersion; + return this; + } + + /** + * APIVersion defines the versioned 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 + * @return apiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "APIVersion defines the versioned 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") + + public String getApiVersion() { + return apiVersion; + } + + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + + public V1SelfSubjectReview kind(String kind) { + + this.kind = kind; + return this; + } + + /** + * Kind is a string value representing the 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 + * @return kind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Kind is a string value representing the 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") + + public String getKind() { + return kind; + } + + + public void setKind(String kind) { + this.kind = kind; + } + + + public V1SelfSubjectReview metadata(V1ObjectMeta metadata) { + + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ObjectMeta getMetadata() { + return metadata; + } + + + public void setMetadata(V1ObjectMeta metadata) { + this.metadata = metadata; + } + + + public V1SelfSubjectReview status(V1SelfSubjectReviewStatus status) { + + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1SelfSubjectReviewStatus getStatus() { + return status; + } + + + public void setStatus(V1SelfSubjectReviewStatus status) { + this.status = status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1SelfSubjectReview v1SelfSubjectReview = (V1SelfSubjectReview) o; + return Objects.equals(this.apiVersion, v1SelfSubjectReview.apiVersion) && + Objects.equals(this.kind, v1SelfSubjectReview.kind) && + Objects.equals(this.metadata, v1SelfSubjectReview.metadata) && + Objects.equals(this.status, v1SelfSubjectReview.status); + } + + @Override + public int hashCode() { + return Objects.hash(apiVersion, kind, metadata, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1SelfSubjectReview {\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..836e7dde2d --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1SelfSubjectReviewStatus.java @@ -0,0 +1,99 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1UserInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. + */ +@ApiModel(description = "SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1SelfSubjectReviewStatus { + public static final String SERIALIZED_NAME_USER_INFO = "userInfo"; + @SerializedName(SERIALIZED_NAME_USER_INFO) + private V1UserInfo userInfo; + + + public V1SelfSubjectReviewStatus userInfo(V1UserInfo userInfo) { + + this.userInfo = userInfo; + return this; + } + + /** + * Get userInfo + * @return userInfo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1UserInfo getUserInfo() { + return userInfo; + } + + + public void setUserInfo(V1UserInfo userInfo) { + this.userInfo = userInfo; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1SelfSubjectReviewStatus v1SelfSubjectReviewStatus = (V1SelfSubjectReviewStatus) o; + return Objects.equals(this.userInfo, v1SelfSubjectReviewStatus.userInfo); + } + + @Override + public int hashCode() { + return Objects.hash(userInfo); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1SelfSubjectReviewStatus {\n"); + sb.append(" userInfo: ").append(toIndentedString(userInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 2c363d4138..61e4d6ffdf 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SelfSubjectRulesReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a3820b4139..4a28aca446 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 @@ -27,7 +27,7 @@ * SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview. */ @ApiModel(description = "SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SelfSubjectRulesReviewSpec { public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; @SerializedName(SERIALIZED_NAME_NAMESPACE) 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 1864286198..5653b00fe4 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 @@ -27,7 +27,7 @@ * ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. */ @ApiModel(description = "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ServerAddressByClientCIDR { public static final String SERIALIZED_NAME_CLIENT_C_I_D_R = "clientCIDR"; @SerializedName(SERIALIZED_NAME_CLIENT_C_I_D_R) 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 1198064326..8890936892 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 @@ -30,7 +30,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. */ @ApiModel(description = "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Service implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 273ab4308e..5908c2460b 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 @@ -32,7 +32,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 */ @ApiModel(description = "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ServiceAccount implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 d5aafb4626..19b288ed82 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 @@ -31,7 +31,7 @@ * ServiceAccountList is a list of ServiceAccount objects */ @ApiModel(description = "ServiceAccountList is a list of ServiceAccount objects") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ServiceAccountList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 1fc0ac4a2e..67f827be4e 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 @@ -27,7 +27,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). */ @ApiModel(description = "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).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ServiceAccountTokenProjection { public static final String SERIALIZED_NAME_AUDIENCE = "audience"; @SerializedName(SERIALIZED_NAME_AUDIENCE) 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 b7ec693378..fbf754cddf 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 @@ -27,7 +27,7 @@ * ServiceBackendPort is the service port being referenced. */ @ApiModel(description = "ServiceBackendPort is the service port being referenced.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ServiceBackendPort { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 068753e433..c596d9a07a 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 @@ -31,7 +31,7 @@ * ServiceList holds a list of services. */ @ApiModel(description = "ServiceList holds a list of services.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ServiceList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 a3b57abc51..870f4a6989 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 @@ -28,7 +28,7 @@ * ServicePort contains information on service's port. */ @ApiModel(description = "ServicePort contains information on service's port.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ServicePort { public static final String SERIALIZED_NAME_APP_PROTOCOL = "appProtocol"; @SerializedName(SERIALIZED_NAME_APP_PROTOCOL) @@ -62,11 +62,11 @@ public V1ServicePort appProtocol(String appProtocol) { } /** - * The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + * The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. * @return appProtocol **/ @javax.annotation.Nullable - @ApiModelProperty(value = "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.") + @ApiModelProperty(value = "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.") public String getAppProtocol() { return appProtocol; 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 64a173833a..b747044474 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 @@ -33,7 +33,7 @@ * ServiceSpec describes the attributes that a user creates on a service. */ @ApiModel(description = "ServiceSpec describes the attributes that a user creates on a service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ServiceSpec { public static final String SERIALIZED_NAME_ALLOCATE_LOAD_BALANCER_NODE_PORTS = "allocateLoadBalancerNodePorts"; @SerializedName(SERIALIZED_NAME_ALLOCATE_LOAD_BALANCER_NODE_PORTS) @@ -396,11 +396,11 @@ public V1ServiceSpec loadBalancerIP(String loadBalancerIP) { } /** - * Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations, and it cannot support dual-stack. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version. + * Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available. * @return loadBalancerIP **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations, and it cannot support dual-stack. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version.") + @ApiModelProperty(value = "Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available.") public String getLoadBalancerIP() { return loadBalancerIP; 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 b08468656f..cfec25e274 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 @@ -31,7 +31,7 @@ * ServiceStatus represents the current status of a service. */ @ApiModel(description = "ServiceStatus represents the current status of a service.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ServiceStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) 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 7b87c9b8f4..fe19988196 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 @@ -28,7 +28,7 @@ * SessionAffinityConfig represents the configurations of session affinity. */ @ApiModel(description = "SessionAffinityConfig represents the configurations of session affinity.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SessionAffinityConfig { public static final String SERIALIZED_NAME_CLIENT_I_P = "clientIP"; @SerializedName(SERIALIZED_NAME_CLIENT_I_P) 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 97bd70c931..ae0c12500b 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatefulSet implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 5bed913f64..6a95cf68fe 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 @@ -28,7 +28,7 @@ * StatefulSetCondition describes the state of a statefulset at a certain point. */ @ApiModel(description = "StatefulSetCondition describes the state of a statefulset at a certain point.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatefulSetCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 8831771e46..5a441a9ab3 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 @@ -31,7 +31,7 @@ * StatefulSetList is a collection of StatefulSets. */ @ApiModel(description = "StatefulSetList is a collection of StatefulSets.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatefulSetList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 3a8df09402..16ff338dd9 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 @@ -27,7 +27,7 @@ * StatefulSetOrdinals describes the policy used for replica ordinal assignment in this StatefulSet. */ @ApiModel(description = "StatefulSetOrdinals describes the policy used for replica ordinal assignment in this StatefulSet.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatefulSetOrdinals { public static final String SERIALIZED_NAME_START = "start"; @SerializedName(SERIALIZED_NAME_START) 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 524cee93c0..93e0f7fcc7 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 @@ -27,7 +27,7 @@ * StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates. */ @ApiModel(description = "StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatefulSetPersistentVolumeClaimRetentionPolicy { public static final String SERIALIZED_NAME_WHEN_DELETED = "whenDeleted"; @SerializedName(SERIALIZED_NAME_WHEN_DELETED) 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 fd409a1759..773e5b8268 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 @@ -35,7 +35,7 @@ * A StatefulSetSpec is the specification of a StatefulSet. */ @ApiModel(description = "A StatefulSetSpec is the specification of a StatefulSet.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatefulSetSpec { public static final String SERIALIZED_NAME_MIN_READY_SECONDS = "minReadySeconds"; @SerializedName(SERIALIZED_NAME_MIN_READY_SECONDS) 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 dfe034a121..03d1c0fe35 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 @@ -30,7 +30,7 @@ * StatefulSetStatus represents the current state of a StatefulSet. */ @ApiModel(description = "StatefulSetStatus represents the current state of a StatefulSet.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatefulSetStatus { public static final String SERIALIZED_NAME_AVAILABLE_REPLICAS = "availableReplicas"; @SerializedName(SERIALIZED_NAME_AVAILABLE_REPLICAS) 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 110d3f9f14..2aa226fc72 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 @@ -28,7 +28,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatefulSetUpdateStrategy { public static final String SERIALIZED_NAME_ROLLING_UPDATE = "rollingUpdate"; @SerializedName(SERIALIZED_NAME_ROLLING_UPDATE) 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 7c6ddccfd5..83bc94eed7 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 @@ -29,7 +29,7 @@ * Status is a return value for calls that don't return other objects. */ @ApiModel(description = "Status is a return value for calls that don't return other objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Status { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 095e9dca26..f8b9a4dc7d 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 @@ -27,7 +27,7 @@ * StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. */ @ApiModel(description = "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatusCause { public static final String SERIALIZED_NAME_FIELD = "field"; @SerializedName(SERIALIZED_NAME_FIELD) 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 e9b55c746e..46244a9980 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 @@ -30,7 +30,7 @@ * 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. */ @ApiModel(description = "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StatusDetails { public static final String SERIALIZED_NAME_CAUSES = "causes"; @SerializedName(SERIALIZED_NAME_CAUSES) 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 17583c99b0..bc569e4646 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 @@ -33,7 +33,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") 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) 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 dc8f9f3dbe..b3e6d9003d 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 @@ -31,7 +31,7 @@ * StorageClassList is a collection of storage classes. */ @ApiModel(description = "StorageClassList is a collection of storage classes.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StorageClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 32e795133b..2a51f2e3e3 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 @@ -28,7 +28,7 @@ * Represents a StorageOS persistent volume resource. */ @ApiModel(description = "Represents a StorageOS persistent volume resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StorageOSPersistentVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 d8182b07fb..4a690c98b6 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 @@ -28,7 +28,7 @@ * Represents a StorageOS persistent volume resource. */ @ApiModel(description = "Represents a StorageOS persistent volume resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1StorageOSVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Subject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Subject.java index 2e82d8e125..a34b02567a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Subject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Subject.java @@ -27,7 +27,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. */ @ApiModel(description = "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Subject { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) 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 4e1d2b1264..110f86ec6b 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 @@ -30,7 +30,7 @@ * SubjectAccessReview checks whether or not a user or group can perform an action. */ @ApiModel(description = "SubjectAccessReview checks whether or not a user or group can perform an action.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SubjectAccessReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 be4e7d2a16..7b8d65b9b6 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 @@ -33,7 +33,7 @@ * SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set */ @ApiModel(description = "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SubjectAccessReviewSpec { public static final String SERIALIZED_NAME_EXTRA = "extra"; @SerializedName(SERIALIZED_NAME_EXTRA) 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 b526215c31..f6ec607f4f 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 @@ -27,7 +27,7 @@ * SubjectAccessReviewStatus */ @ApiModel(description = "SubjectAccessReviewStatus") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SubjectAccessReviewStatus { public static final String SERIALIZED_NAME_ALLOWED = "allowed"; @SerializedName(SERIALIZED_NAME_ALLOWED) 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 21c498f618..5b11b99e5e 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 @@ -31,7 +31,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1SubjectRulesReviewStatus { public static final String SERIALIZED_NAME_EVALUATION_ERROR = "evaluationError"; @SerializedName(SERIALIZED_NAME_EVALUATION_ERROR) 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 fba8982568..e833082a0a 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 @@ -27,7 +27,7 @@ * Sysctl defines a kernel parameter to be set */ @ApiModel(description = "Sysctl defines a kernel parameter to be set") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Sysctl { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 e87b8f42ea..95b2f15e4e 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 @@ -28,7 +28,7 @@ * TCPSocketAction describes an action based on opening a socket */ @ApiModel(description = "TCPSocketAction describes an action based on opening a socket") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TCPSocketAction { public static final String SERIALIZED_NAME_HOST = "host"; @SerializedName(SERIALIZED_NAME_HOST) 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 40244279a2..20b304d8e3 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 @@ -28,7 +28,7 @@ * The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint. */ @ApiModel(description = "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Taint { public static final String SERIALIZED_NAME_EFFECT = "effect"; @SerializedName(SERIALIZED_NAME_EFFECT) 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 528fe5dcf1..75844b3a7e 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 @@ -30,7 +30,7 @@ * TokenRequestSpec contains client provided parameters of a token request. */ @ApiModel(description = "TokenRequestSpec contains client provided parameters of a token request.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TokenRequestSpec { public static final String SERIALIZED_NAME_AUDIENCES = "audiences"; @SerializedName(SERIALIZED_NAME_AUDIENCES) 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 1b9def4d02..a7f2195015 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 @@ -28,7 +28,7 @@ * TokenRequestStatus is the result of a token request. */ @ApiModel(description = "TokenRequestStatus is the result of a token request.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TokenRequestStatus { public static final String SERIALIZED_NAME_EXPIRATION_TIMESTAMP = "expirationTimestamp"; @SerializedName(SERIALIZED_NAME_EXPIRATION_TIMESTAMP) 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 12bb14974a..73f8d9f008 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 @@ -30,7 +30,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. */ @ApiModel(description = "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TokenReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 b824b0f888..385d6cc694 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 @@ -29,7 +29,7 @@ * TokenReviewSpec is a description of the token authentication request. */ @ApiModel(description = "TokenReviewSpec is a description of the token authentication request.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TokenReviewSpec { public static final String SERIALIZED_NAME_AUDIENCES = "audiences"; @SerializedName(SERIALIZED_NAME_AUDIENCES) 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 f79acb8641..2546e61b1a 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 @@ -30,7 +30,7 @@ * TokenReviewStatus is the result of the token authentication request. */ @ApiModel(description = "TokenReviewStatus is the result of the token authentication request.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TokenReviewStatus { public static final String SERIALIZED_NAME_AUDIENCES = "audiences"; @SerializedName(SERIALIZED_NAME_AUDIENCES) 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 37f3ff6344..06c7faff1c 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 @@ -27,7 +27,7 @@ * The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>. */ @ApiModel(description = "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Toleration { public static final String SERIALIZED_NAME_EFFECT = "effect"; @SerializedName(SERIALIZED_NAME_EFFECT) 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 e4c9c4946e..354ddd80a9 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 @@ -29,7 +29,7 @@ * A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future. */ @ApiModel(description = "A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TopologySelectorLabelRequirement { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) 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 705851f2ef..483efc1e3d 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 @@ -30,7 +30,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TopologySelectorTerm { public static final String SERIALIZED_NAME_MATCH_LABEL_EXPRESSIONS = "matchLabelExpressions"; @SerializedName(SERIALIZED_NAME_MATCH_LABEL_EXPRESSIONS) 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 bf7bdbbed6..cf1bcc7f39 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 @@ -30,7 +30,7 @@ * TopologySpreadConstraint specifies how to spread matching pods among the given topology. */ @ApiModel(description = "TopologySpreadConstraint specifies how to spread matching pods among the given topology.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TopologySpreadConstraint { public static final String SERIALIZED_NAME_LABEL_SELECTOR = "labelSelector"; @SerializedName(SERIALIZED_NAME_LABEL_SELECTOR) 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 b2486faf45..59ea880d92 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 @@ -27,7 +27,7 @@ * TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace. */ @ApiModel(description = "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TypedLocalObjectReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) 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 defb22be3a..af67c0dd54 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 @@ -26,7 +26,7 @@ /** * V1TypedObjectReference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1TypedObjectReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) 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 4fd8d27898..c7c44be5c2 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 @@ -29,7 +29,7 @@ * UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters. */ @ApiModel(description = "UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1UncountedTerminatedPods { public static final String SERIALIZED_NAME_FAILED = "failed"; @SerializedName(SERIALIZED_NAME_FAILED) 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 7f0b00c210..7f6d2b1767 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 @@ -31,7 +31,7 @@ * UserInfo holds the information about the user needed to implement the user.Info interface. */ @ApiModel(description = "UserInfo holds the information about the user needed to implement the user.Info interface.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1UserInfo { public static final String SERIALIZED_NAME_EXTRA = "extra"; @SerializedName(SERIALIZED_NAME_EXTRA) 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 063610f11c..6c79248abf 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 @@ -33,7 +33,7 @@ * ValidatingWebhook describes an admission webhook and the resources and operations it applies to. */ @ApiModel(description = "ValidatingWebhook describes an admission webhook and the resources and operations it applies to.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ValidatingWebhook { public static final String SERIALIZED_NAME_ADMISSION_REVIEW_VERSIONS = "admissionReviewVersions"; @SerializedName(SERIALIZED_NAME_ADMISSION_REVIEW_VERSIONS) @@ -167,11 +167,11 @@ public V1ValidatingWebhook addMatchConditionsItem(V1MatchCondition matchConditio } /** - * MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate. + * MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. * @return matchConditions **/ @javax.annotation.Nullable - @ApiModelProperty(value = "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate.") + @ApiModelProperty(value = "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped. 2. If ALL matchConditions evaluate to TRUE, the webhook is called. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the error is ignored and the webhook is skipped This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.") public List getMatchConditions() { return matchConditions; 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 5638140979..0323e1f37e 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 @@ -31,7 +31,7 @@ * ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. */ @ApiModel(description = "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ValidatingWebhookConfiguration implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 80736c81ba..072d5e29f1 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 @@ -31,7 +31,7 @@ * ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. */ @ApiModel(description = "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ValidatingWebhookConfigurationList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 8fc4c1b48c..e059d0a96b 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 @@ -27,8 +27,12 @@ * ValidationRule describes a validation rule written in the CEL expression language. */ @ApiModel(description = "ValidationRule describes a validation rule written in the CEL expression language.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1ValidationRule { + public static final String SERIALIZED_NAME_FIELD_PATH = "fieldPath"; + @SerializedName(SERIALIZED_NAME_FIELD_PATH) + private String fieldPath; + public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) private String message; @@ -37,11 +41,38 @@ public class V1ValidationRule { @SerializedName(SERIALIZED_NAME_MESSAGE_EXPRESSION) private String messageExpression; + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + private String reason; + public static final String SERIALIZED_NAME_RULE = "rule"; @SerializedName(SERIALIZED_NAME_RULE) private String rule; + public V1ValidationRule fieldPath(String fieldPath) { + + this.fieldPath = fieldPath; + return this; + } + + /** + * fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. Numeric index of array is not supported. For field name which contains special characters, use `['specialName']` to refer the field name. e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` + * @return fieldPath + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. Numeric index of array is not supported. For field name which contains special characters, use `['specialName']` to refer the field name. e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']`") + + public String getFieldPath() { + return fieldPath; + } + + + public void setFieldPath(String fieldPath) { + this.fieldPath = fieldPath; + } + + public V1ValidationRule message(String message) { this.message = message; @@ -88,6 +119,29 @@ public void setMessageExpression(String messageExpression) { } + public V1ValidationRule reason(String reason) { + + this.reason = reason; + return this; + } + + /** + * reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: \"FieldValueInvalid\", \"FieldValueForbidden\", \"FieldValueRequired\", \"FieldValueDuplicate\". If not set, default to use \"FieldValueInvalid\". All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. + * @return reason + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: \"FieldValueInvalid\", \"FieldValueForbidden\", \"FieldValueRequired\", \"FieldValueDuplicate\". If not set, default to use \"FieldValueInvalid\". All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.") + + public String getReason() { + return reason; + } + + + public void setReason(String reason) { + this.reason = reason; + } + + public V1ValidationRule rule(String rule) { this.rule = rule; @@ -119,14 +173,16 @@ public boolean equals(java.lang.Object o) { return false; } V1ValidationRule v1ValidationRule = (V1ValidationRule) o; - return Objects.equals(this.message, v1ValidationRule.message) && + return Objects.equals(this.fieldPath, v1ValidationRule.fieldPath) && + Objects.equals(this.message, v1ValidationRule.message) && Objects.equals(this.messageExpression, v1ValidationRule.messageExpression) && + Objects.equals(this.reason, v1ValidationRule.reason) && Objects.equals(this.rule, v1ValidationRule.rule); } @Override public int hashCode() { - return Objects.hash(message, messageExpression, rule); + return Objects.hash(fieldPath, message, messageExpression, reason, rule); } @@ -134,8 +190,10 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1ValidationRule {\n"); + sb.append(" fieldPath: ").append(toIndentedString(fieldPath)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" messageExpression: ").append(toIndentedString(messageExpression)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); sb.append(" rule: ").append(toIndentedString(rule)).append("\n"); sb.append("}"); return sb.toString(); 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 9036823e6f..4f7f7f9210 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 @@ -56,7 +56,7 @@ * Volume represents a named volume in a pod that may be accessed by any container in the pod. */ @ApiModel(description = "Volume represents a named volume in a pod that may be accessed by any container in the pod.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1Volume { public static final String SERIALIZED_NAME_AWS_ELASTIC_BLOCK_STORE = "awsElasticBlockStore"; @SerializedName(SERIALIZED_NAME_AWS_ELASTIC_BLOCK_STORE) 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 53cd38d8be..3a7d08c47f 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 @@ -30,7 +30,7 @@ * VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced. */ @ApiModel(description = "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeAttachment implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 b92a23f2c7..eb3d89f31f 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 @@ -31,7 +31,7 @@ * VolumeAttachmentList is a collection of VolumeAttachment objects. */ @ApiModel(description = "VolumeAttachmentList is a collection of VolumeAttachment objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeAttachmentList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 421121f4d3..98b7dfd021 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 @@ -28,7 +28,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeAttachmentSource { public static final String SERIALIZED_NAME_INLINE_VOLUME_SPEC = "inlineVolumeSpec"; @SerializedName(SERIALIZED_NAME_INLINE_VOLUME_SPEC) 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 5d722db718..31a4da0554 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 @@ -28,7 +28,7 @@ * VolumeAttachmentSpec is the specification of a VolumeAttachment request. */ @ApiModel(description = "VolumeAttachmentSpec is the specification of a VolumeAttachment request.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeAttachmentSpec { public static final String SERIALIZED_NAME_ATTACHER = "attacher"; @SerializedName(SERIALIZED_NAME_ATTACHER) 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 724618866f..71d7343f9d 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 @@ -31,7 +31,7 @@ * VolumeAttachmentStatus is the status of a VolumeAttachment request. */ @ApiModel(description = "VolumeAttachmentStatus is the status of a VolumeAttachment request.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeAttachmentStatus { public static final String SERIALIZED_NAME_ATTACH_ERROR = "attachError"; @SerializedName(SERIALIZED_NAME_ATTACH_ERROR) 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 4036b23e26..54df2108c7 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 @@ -27,7 +27,7 @@ * volumeDevice describes a mapping of a raw block device within a container. */ @ApiModel(description = "volumeDevice describes a mapping of a raw block device within a container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeDevice { public static final String SERIALIZED_NAME_DEVICE_PATH = "devicePath"; @SerializedName(SERIALIZED_NAME_DEVICE_PATH) 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 704c0653f4..03dc8c7527 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 @@ -28,7 +28,7 @@ * VolumeError captures an error encountered during a volume operation. */ @ApiModel(description = "VolumeError captures an error encountered during a volume operation.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) 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 a0f74cc087..035cc0df0b 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 @@ -27,7 +27,7 @@ * VolumeMount describes a mounting of a Volume within a container. */ @ApiModel(description = "VolumeMount describes a mounting of a Volume within a container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeMount { public static final String SERIALIZED_NAME_MOUNT_PATH = "mountPath"; @SerializedName(SERIALIZED_NAME_MOUNT_PATH) 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 589b04dd8e..2bfc38e728 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 @@ -28,7 +28,7 @@ * VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. */ @ApiModel(description = "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeNodeAffinity { public static final String SERIALIZED_NAME_REQUIRED = "required"; @SerializedName(SERIALIZED_NAME_REQUIRED) 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 41dc6f18a8..cb24dd798f 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 @@ -27,7 +27,7 @@ * VolumeNodeResources is a set of resource limits for scheduling of volumes. */ @ApiModel(description = "VolumeNodeResources is a set of resource limits for scheduling of volumes.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeNodeResources { public static final String SERIALIZED_NAME_COUNT = "count"; @SerializedName(SERIALIZED_NAME_COUNT) 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 fc55c200fc..1e2162f710 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 @@ -31,7 +31,7 @@ * Projection that may be projected along with other supported volume types */ @ApiModel(description = "Projection that may be projected along with other supported volume types") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VolumeProjection { public static final String SERIALIZED_NAME_CONFIG_MAP = "configMap"; @SerializedName(SERIALIZED_NAME_CONFIG_MAP) 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 abfc0ee4e7..daaac3ea0c 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 @@ -27,7 +27,7 @@ * Represents a vSphere volume resource. */ @ApiModel(description = "Represents a vSphere volume resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1VsphereVirtualDiskVolumeSource { public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; @SerializedName(SERIALIZED_NAME_FS_TYPE) 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 7797d05592..093254d4fd 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 @@ -27,7 +27,7 @@ * Event represents a single event to a watched resource. */ @ApiModel(description = "Event represents a single event to a watched resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1WatchEvent { public static final String SERIALIZED_NAME_OBJECT = "object"; @SerializedName(SERIALIZED_NAME_OBJECT) 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 b025587d06..78f0dad7ea 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 @@ -30,7 +30,7 @@ * WebhookConversion describes how to call a conversion webhook */ @ApiModel(description = "WebhookConversion describes how to call a conversion webhook") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1WebhookConversion { public static final String SERIALIZED_NAME_CLIENT_CONFIG = "clientConfig"; @SerializedName(SERIALIZED_NAME_CLIENT_CONFIG) 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 2b99bc5da5..ea57333441 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 @@ -28,7 +28,7 @@ * The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) */ @ApiModel(description = "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1WeightedPodAffinityTerm { public static final String SERIALIZED_NAME_POD_AFFINITY_TERM = "podAffinityTerm"; @SerializedName(SERIALIZED_NAME_POD_AFFINITY_TERM) 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 17bca4193d..66adaaac81 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 @@ -27,7 +27,7 @@ * WindowsSecurityContextOptions contain Windows-specific options and credentials. */ @ApiModel(description = "WindowsSecurityContextOptions contain Windows-specific options and credentials.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1WindowsSecurityContextOptions { public static final String SERIALIZED_NAME_GMSA_CREDENTIAL_SPEC = "gmsaCredentialSpec"; @SerializedName(SERIALIZED_NAME_GMSA_CREDENTIAL_SPEC) @@ -99,11 +99,11 @@ public V1WindowsSecurityContextOptions hostProcess(Boolean hostProcess) { } /** - * HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. + * HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. * @return hostProcess **/ @javax.annotation.Nullable - @ApiModelProperty(value = "HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.") + @ApiModelProperty(value = "HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.") public Boolean getHostProcess() { return hostProcess; 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 5474518349..a2671461bf 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 @@ -27,7 +27,7 @@ * AuditAnnotation describes how to produce an audit annotation for an API request. */ @ApiModel(description = "AuditAnnotation describes how to produce an audit annotation for an API request.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1AuditAnnotation { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDR.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDR.java index c684df145e..a9196cfa37 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDR.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDR.java @@ -29,7 +29,7 @@ * ClusterCIDR represents a single configuration for per-Node Pod CIDR allocations when the MultiCIDRRangeAllocator is enabled (see the config for kube-controller-manager). A cluster may have any number of ClusterCIDR resources, all of which will be considered when allocating a CIDR for a Node. A ClusterCIDR is eligible to be used for a given Node when the node selector matches the node in question and has free CIDRs to allocate. In case of multiple matching ClusterCIDR resources, the allocator will attempt to break ties using internal heuristics, but any ClusterCIDR whose node selector matches the Node may be used. */ @ApiModel(description = "ClusterCIDR represents a single configuration for per-Node Pod CIDR allocations when the MultiCIDRRangeAllocator is enabled (see the config for kube-controller-manager). A cluster may have any number of ClusterCIDR resources, all of which will be considered when allocating a CIDR for a Node. A ClusterCIDR is eligible to be used for a given Node when the node selector matches the node in question and has free CIDRs to allocate. In case of multiple matching ClusterCIDR resources, the allocator will attempt to break ties using internal heuristics, but any ClusterCIDR whose node selector matches the Node may be used.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ClusterCIDR implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRList.java index 3b182d4d02..fe1cf3526d 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRList.java @@ -31,7 +31,7 @@ * ClusterCIDRList contains a list of ClusterCIDR. */ @ApiModel(description = "ClusterCIDRList contains a list of ClusterCIDR.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ClusterCIDRList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpec.java index e64b91c05d..8b06348da0 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ClusterCIDRSpec.java @@ -28,7 +28,7 @@ * ClusterCIDRSpec defines the desired state of ClusterCIDR. */ @ApiModel(description = "ClusterCIDRSpec defines the desired state of ClusterCIDR.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ClusterCIDRSpec { public static final String SERIALIZED_NAME_IPV4 = "ipv4"; @SerializedName(SERIALIZED_NAME_IPV4) 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 1f193328dd..12e5b86239 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ClusterTrustBundle implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 6161adf467..6b8e39aae2 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 @@ -31,7 +31,7 @@ * ClusterTrustBundleList is a collection of ClusterTrustBundle objects */ @ApiModel(description = "ClusterTrustBundleList is a collection of ClusterTrustBundle objects") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ClusterTrustBundleList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 f1b70156ec..ac8752e622 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 @@ -27,7 +27,7 @@ * ClusterTrustBundleSpec contains the signer and trust anchors. */ @ApiModel(description = "ClusterTrustBundleSpec contains the signer and trust anchors.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ClusterTrustBundleSpec { public static final String SERIALIZED_NAME_SIGNER_NAME = "signerName"; @SerializedName(SERIALIZED_NAME_SIGNER_NAME) 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 c371a099e8..5c2a3e042d 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 @@ -27,7 +27,7 @@ * ExpressionWarning is a warning information that targets a specific expression. */ @ApiModel(description = "ExpressionWarning is a warning information that targets a specific expression.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ExpressionWarning { public static final String SERIALIZED_NAME_FIELD_REF = "fieldRef"; @SerializedName(SERIALIZED_NAME_FIELD_REF) 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 3790dafa08..ebcb3653b0 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 @@ -29,7 +29,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 */ @ApiModel(description = "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") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1IPAddress implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 0d4a6de79b..ae90623a60 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 @@ -31,7 +31,7 @@ * IPAddressList contains a list of IPAddress. */ @ApiModel(description = "IPAddressList contains a list of IPAddress.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1IPAddressList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 105954c219..b0c422e273 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 @@ -28,7 +28,7 @@ * IPAddressSpec describe the attributes in an IP Address. */ @ApiModel(description = "IPAddressSpec describe the attributes in an IP Address.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1IPAddressSpec { public static final String SERIALIZED_NAME_PARENT_REF = "parentRef"; @SerializedName(SERIALIZED_NAME_PARENT_REF) 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 091586dcff..c4cec9dc86 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 @@ -26,7 +26,7 @@ /** * V1alpha1MatchCondition */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1MatchCondition { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) 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 5156f70f4b..c986531bb1 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 @@ -31,7 +31,7 @@ * 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) */ @ApiModel(description = "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)") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1MatchResources { public static final String SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES = "excludeResourceRules"; @SerializedName(SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES) 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 3dd57fbc98..27d4f9bab7 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 @@ -29,7 +29,7 @@ * NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. */ @ApiModel(description = "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1NamedRuleWithOperations { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) 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 796fa067b7..3aaa3d9f4e 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 @@ -27,7 +27,7 @@ * ParamKind is a tuple of Group Kind and Version. */ @ApiModel(description = "ParamKind is a tuple of Group Kind and Version.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ParamKind { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 fe56d5e9f4..c3b7dd84f2 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 @@ -19,15 +19,16 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import io.kubernetes.client.openapi.models.V1LabelSelector; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; /** - * ParamRef references a parameter resource + * ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. */ -@ApiModel(description = "ParamRef references a parameter resource") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@ApiModel(description = "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ParamRef { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -37,6 +38,14 @@ public class V1alpha1ParamRef { @SerializedName(SERIALIZED_NAME_NAMESPACE) private String namespace; + public static final String SERIALIZED_NAME_PARAMETER_NOT_FOUND_ACTION = "parameterNotFoundAction"; + @SerializedName(SERIALIZED_NAME_PARAMETER_NOT_FOUND_ACTION) + private String parameterNotFoundAction; + + public static final String SERIALIZED_NAME_SELECTOR = "selector"; + @SerializedName(SERIALIZED_NAME_SELECTOR) + private V1LabelSelector selector; + public V1alpha1ParamRef name(String name) { @@ -45,11 +54,11 @@ public V1alpha1ParamRef name(String name) { } /** - * Name of the resource being referenced. + * `name` is the name of the resource being referenced. `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. * @return name **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Name of the resource being referenced.") + @ApiModelProperty(value = "`name` is the name of the resource being referenced. `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.") public String getName() { return name; @@ -68,11 +77,11 @@ public V1alpha1ParamRef namespace(String namespace) { } /** - * Namespace of the referenced resource. Should be empty for the cluster-scoped resources + * namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. * @return namespace **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Namespace of the referenced resource. Should be empty for the cluster-scoped resources") + @ApiModelProperty(value = "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.") public String getNamespace() { return namespace; @@ -84,6 +93,52 @@ public void setNamespace(String namespace) { } + public V1alpha1ParamRef parameterNotFoundAction(String parameterNotFoundAction) { + + this.parameterNotFoundAction = parameterNotFoundAction; + return this; + } + + /** + * `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Default to `Deny` + * @return parameterNotFoundAction + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Default to `Deny`") + + public String getParameterNotFoundAction() { + return parameterNotFoundAction; + } + + + public void setParameterNotFoundAction(String parameterNotFoundAction) { + this.parameterNotFoundAction = parameterNotFoundAction; + } + + + public V1alpha1ParamRef selector(V1LabelSelector selector) { + + this.selector = selector; + return this; + } + + /** + * Get selector + * @return selector + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1LabelSelector getSelector() { + return selector; + } + + + public void setSelector(V1LabelSelector selector) { + this.selector = selector; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -94,12 +149,14 @@ public boolean equals(java.lang.Object o) { } V1alpha1ParamRef v1alpha1ParamRef = (V1alpha1ParamRef) o; return Objects.equals(this.name, v1alpha1ParamRef.name) && - Objects.equals(this.namespace, v1alpha1ParamRef.namespace); + Objects.equals(this.namespace, v1alpha1ParamRef.namespace) && + Objects.equals(this.parameterNotFoundAction, v1alpha1ParamRef.parameterNotFoundAction) && + Objects.equals(this.selector, v1alpha1ParamRef.selector); } @Override public int hashCode() { - return Objects.hash(name, namespace); + return Objects.hash(name, namespace, parameterNotFoundAction, selector); } @@ -109,6 +166,8 @@ public String toString() { sb.append("class V1alpha1ParamRef {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" parameterNotFoundAction: ").append(toIndentedString(parameterNotFoundAction)).append("\n"); + sb.append(" selector: ").append(toIndentedString(selector)).append("\n"); sb.append("}"); return sb.toString(); } 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 4686214c0e..a42624cb73 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 @@ -27,7 +27,7 @@ * ParentReference describes a reference to a parent object. */ @ApiModel(description = "ParentReference describes a reference to a parent object.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ParentReference { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) 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 a5045ca9fc..90b96f92fc 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1SelfSubjectReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 f6a2f5ace2..11405dc17c 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 @@ -28,7 +28,7 @@ * SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. */ @ApiModel(description = "SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1SelfSubjectReviewStatus { public static final String SERIALIZED_NAME_USER_INFO = "userInfo"; @SerializedName(SERIALIZED_NAME_USER_INFO) 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 06742039c7..d1c19c18a6 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 @@ -29,7 +29,7 @@ * An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend. */ @ApiModel(description = "An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ServerStorageVersion { public static final String SERIALIZED_NAME_API_SERVER_I_D = "apiServerID"; @SerializedName(SERIALIZED_NAME_API_SERVER_I_D) @@ -43,6 +43,10 @@ public class V1alpha1ServerStorageVersion { @SerializedName(SERIALIZED_NAME_ENCODING_VERSION) private String encodingVersion; + public static final String SERIALIZED_NAME_SERVED_VERSIONS = "servedVersions"; + @SerializedName(SERIALIZED_NAME_SERVED_VERSIONS) + private List servedVersions = null; + public V1alpha1ServerStorageVersion apiServerID(String apiServerID) { @@ -121,6 +125,37 @@ public void setEncodingVersion(String encodingVersion) { } + public V1alpha1ServerStorageVersion servedVersions(List servedVersions) { + + this.servedVersions = servedVersions; + return this; + } + + public V1alpha1ServerStorageVersion addServedVersionsItem(String servedVersionsItem) { + if (this.servedVersions == null) { + this.servedVersions = new ArrayList<>(); + } + this.servedVersions.add(servedVersionsItem); + return this; + } + + /** + * The API server can serve these versions. DecodableVersions must include all ServedVersions. + * @return servedVersions + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The API server can serve these versions. DecodableVersions must include all ServedVersions.") + + public List getServedVersions() { + return servedVersions; + } + + + public void setServedVersions(List servedVersions) { + this.servedVersions = servedVersions; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -132,12 +167,13 @@ public boolean equals(java.lang.Object o) { V1alpha1ServerStorageVersion v1alpha1ServerStorageVersion = (V1alpha1ServerStorageVersion) o; return Objects.equals(this.apiServerID, v1alpha1ServerStorageVersion.apiServerID) && Objects.equals(this.decodableVersions, v1alpha1ServerStorageVersion.decodableVersions) && - Objects.equals(this.encodingVersion, v1alpha1ServerStorageVersion.encodingVersion); + Objects.equals(this.encodingVersion, v1alpha1ServerStorageVersion.encodingVersion) && + Objects.equals(this.servedVersions, v1alpha1ServerStorageVersion.servedVersions); } @Override public int hashCode() { - return Objects.hash(apiServerID, decodableVersions, encodingVersion); + return Objects.hash(apiServerID, decodableVersions, encodingVersion, servedVersions); } @@ -148,6 +184,7 @@ public String toString() { sb.append(" apiServerID: ").append(toIndentedString(apiServerID)).append("\n"); sb.append(" decodableVersions: ").append(toIndentedString(decodableVersions)).append("\n"); sb.append(" encodingVersion: ").append(toIndentedString(encodingVersion)).append("\n"); + sb.append(" servedVersions: ").append(toIndentedString(servedVersions)).append("\n"); sb.append("}"); return sb.toString(); } 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 52d51dbb09..149ac41278 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 @@ -29,7 +29,7 @@ * Storage version of a specific resource. */ @ApiModel(description = "Storage version of a specific resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1StorageVersion implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e28141fb3d..b2aa4e9bd9 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 @@ -28,7 +28,7 @@ * Describes the state of the storageVersion at a certain point. */ @ApiModel(description = "Describes the state of the storageVersion at a certain point.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1StorageVersionCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 da12f98e97..5647908426 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 @@ -31,7 +31,7 @@ * A list of StorageVersions. */ @ApiModel(description = "A list of StorageVersions.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1StorageVersionList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 fd340affc2..d214843d16 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 @@ -31,7 +31,7 @@ * API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend. */ @ApiModel(description = "API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1StorageVersionStatus { public static final String SERIALIZED_NAME_COMMON_ENCODING_VERSION = "commonEncodingVersion"; @SerializedName(SERIALIZED_NAME_COMMON_ENCODING_VERSION) 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 0ecaa40034..456ea6a0bb 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 @@ -30,7 +30,7 @@ * TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy */ @ApiModel(description = "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1TypeChecking { public static final String SERIALIZED_NAME_EXPRESSION_WARNINGS = "expressionWarnings"; @SerializedName(SERIALIZED_NAME_EXPRESSION_WARNINGS) 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 d9db807f27..ec186cea0b 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 @@ -30,7 +30,7 @@ * ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. */ @ApiModel(description = "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ValidatingAdmissionPolicy implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e4970fb8d5..ae05d3102a 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 @@ -26,10 +26,10 @@ import java.io.IOException; /** - * ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. + * 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. */ -@ApiModel(description = "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@ApiModel(description = "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.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ValidatingAdmissionPolicyBinding implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 ed129e733d..84075b7ff2 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 @@ -31,7 +31,7 @@ * ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. */ @ApiModel(description = "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ValidatingAdmissionPolicyBindingList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 86b0583bd0..a47ca1f6c5 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 @@ -31,7 +31,7 @@ * ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. */ @ApiModel(description = "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ValidatingAdmissionPolicyBindingSpec { public static final String SERIALIZED_NAME_MATCH_RESOURCES = "matchResources"; @SerializedName(SERIALIZED_NAME_MATCH_RESOURCES) 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 64df37c930..67b4ccf040 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 @@ -31,7 +31,7 @@ * ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. */ @ApiModel(description = "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ValidatingAdmissionPolicyList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 48679fdf53..62fc2aab0b 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 @@ -24,6 +24,7 @@ import io.kubernetes.client.openapi.models.V1alpha1MatchResources; import io.kubernetes.client.openapi.models.V1alpha1ParamKind; import io.kubernetes.client.openapi.models.V1alpha1Validation; +import io.kubernetes.client.openapi.models.V1alpha1Variable; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; @@ -34,7 +35,7 @@ * ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. */ @ApiModel(description = "ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ValidatingAdmissionPolicySpec { public static final String SERIALIZED_NAME_AUDIT_ANNOTATIONS = "auditAnnotations"; @SerializedName(SERIALIZED_NAME_AUDIT_ANNOTATIONS) @@ -60,6 +61,10 @@ public class V1alpha1ValidatingAdmissionPolicySpec { @SerializedName(SERIALIZED_NAME_VALIDATIONS) private List validations = null; + public static final String SERIALIZED_NAME_VARIABLES = "variables"; + @SerializedName(SERIALIZED_NAME_VARIABLES) + private List variables = null; + public V1alpha1ValidatingAdmissionPolicySpec auditAnnotations(List auditAnnotations) { @@ -223,6 +228,37 @@ public void setValidations(List validations) { } + public V1alpha1ValidatingAdmissionPolicySpec variables(List variables) { + + this.variables = variables; + return this; + } + + public V1alpha1ValidatingAdmissionPolicySpec addVariablesItem(V1alpha1Variable variablesItem) { + if (this.variables == null) { + this.variables = new ArrayList<>(); + } + this.variables.add(variablesItem); + return this; + } + + /** + * Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. + * @return variables + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.") + + public List getVariables() { + return variables; + } + + + public void setVariables(List variables) { + this.variables = variables; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -237,12 +273,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.matchConditions, v1alpha1ValidatingAdmissionPolicySpec.matchConditions) && Objects.equals(this.matchConstraints, v1alpha1ValidatingAdmissionPolicySpec.matchConstraints) && Objects.equals(this.paramKind, v1alpha1ValidatingAdmissionPolicySpec.paramKind) && - Objects.equals(this.validations, v1alpha1ValidatingAdmissionPolicySpec.validations); + Objects.equals(this.validations, v1alpha1ValidatingAdmissionPolicySpec.validations) && + Objects.equals(this.variables, v1alpha1ValidatingAdmissionPolicySpec.variables); } @Override public int hashCode() { - return Objects.hash(auditAnnotations, failurePolicy, matchConditions, matchConstraints, paramKind, validations); + return Objects.hash(auditAnnotations, failurePolicy, matchConditions, matchConstraints, paramKind, validations, variables); } @@ -256,6 +293,7 @@ public String toString() { sb.append(" matchConstraints: ").append(toIndentedString(matchConstraints)).append("\n"); sb.append(" paramKind: ").append(toIndentedString(paramKind)).append("\n"); sb.append(" validations: ").append(toIndentedString(validations)).append("\n"); + sb.append(" variables: ").append(toIndentedString(variables)).append("\n"); sb.append("}"); return sb.toString(); } 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 56340965f3..fad0aa0f78 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 @@ -31,7 +31,7 @@ * ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy. */ @ApiModel(description = "ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1ValidatingAdmissionPolicyStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) 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 08e2627e90..41d0c8cea6 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 @@ -27,7 +27,7 @@ * Validation specifies the CEL expression which is used to apply the validation. */ @ApiModel(description = "Validation specifies the CEL expression which is used to apply the validation.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha1Validation { public static final String SERIALIZED_NAME_EXPRESSION = "expression"; @SerializedName(SERIALIZED_NAME_EXPRESSION) @@ -53,10 +53,10 @@ public V1alpha1Validation expression(String expression) { } /** - * Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required. + * Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required. * @return expression **/ - @ApiModelProperty(required = true, value = "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required.") + @ApiModelProperty(required = true, value = "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required.") public String getExpression() { return expression; 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 new file mode 100644 index 0000000000..6fe99eec93 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1alpha1Variable.java @@ -0,0 +1,125 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Variable is the definition of a variable that is used for composition. + */ +@ApiModel(description = "Variable is the definition of a variable that is used for composition.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1alpha1Variable { + public static final String SERIALIZED_NAME_EXPRESSION = "expression"; + @SerializedName(SERIALIZED_NAME_EXPRESSION) + private String expression; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1alpha1Variable expression(String expression) { + + this.expression = expression; + return this; + } + + /** + * Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. + * @return expression + **/ + @ApiModelProperty(required = true, value = "Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.") + + public String getExpression() { + return expression; + } + + + public void setExpression(String expression) { + this.expression = expression; + } + + + public V1alpha1Variable name(String name) { + + this.name = name; + return this; + } + + /** + * Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo` + * @return name + **/ + @ApiModelProperty(required = true, value = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1alpha1Variable v1alpha1Variable = (V1alpha1Variable) o; + return Objects.equals(this.expression, v1alpha1Variable.expression) && + Objects.equals(this.name, v1alpha1Variable.name); + } + + @Override + public int hashCode() { + return Objects.hash(expression, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1alpha1Variable {\n"); + sb.append(" expression: ").append(toIndentedString(expression)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 fa7e4f766e..3f54f9ce50 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 @@ -31,7 +31,7 @@ * AllocationResult contains attributes of an allocated resource. */ @ApiModel(description = "AllocationResult contains attributes of an allocated resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2AllocationResult { public static final String SERIALIZED_NAME_AVAILABLE_ON_NODES = "availableOnNodes"; @SerializedName(SERIALIZED_NAME_AVAILABLE_ON_NODES) 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 2d6c4e358b..cb92e38f38 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2PodSchedulingContext implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 9e40b4f6ac..abb8aaa93e 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 @@ -31,7 +31,7 @@ * PodSchedulingContextList is a collection of Pod scheduling objects. */ @ApiModel(description = "PodSchedulingContextList is a collection of Pod scheduling objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2PodSchedulingContextList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e1467d94f9..01d2ec60cc 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 @@ -29,7 +29,7 @@ * PodSchedulingContextSpec describes where resources for the Pod are needed. */ @ApiModel(description = "PodSchedulingContextSpec describes where resources for the Pod are needed.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2PodSchedulingContextSpec { public static final String SERIALIZED_NAME_POTENTIAL_NODES = "potentialNodes"; @SerializedName(SERIALIZED_NAME_POTENTIAL_NODES) 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 f530ee9736..d9b1a6cb9f 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 @@ -30,7 +30,7 @@ * PodSchedulingContextStatus describes where resources for the Pod can be allocated. */ @ApiModel(description = "PodSchedulingContextStatus describes where resources for the Pod can be allocated.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2PodSchedulingContextStatus { public static final String SERIALIZED_NAME_RESOURCE_CLAIMS = "resourceClaims"; @SerializedName(SERIALIZED_NAME_RESOURCE_CLAIMS) 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 3031532aa1..d5cf530b70 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaim implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 e259a0f33f..03b0d1a037 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 @@ -27,7 +27,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaimConsumerReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) 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 b016481bc3..b7ecd11192 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 @@ -31,7 +31,7 @@ * ResourceClaimList is a collection of claims. */ @ApiModel(description = "ResourceClaimList is a collection of claims.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaimList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 c37bdda35d..556086472c 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 @@ -27,7 +27,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. */ @ApiModel(description = "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaimParametersReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) 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 631521cb9d..323683b369 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 @@ -29,7 +29,7 @@ * ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode. */ @ApiModel(description = "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaimSchedulingStatus { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 21ec310a98..d9d44c26bb 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 @@ -28,7 +28,7 @@ * ResourceClaimSpec defines how a resource is to be allocated. */ @ApiModel(description = "ResourceClaimSpec defines how a resource is to be allocated.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaimSpec { public static final String SERIALIZED_NAME_ALLOCATION_MODE = "allocationMode"; @SerializedName(SERIALIZED_NAME_ALLOCATION_MODE) 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 6f53e944f8..cc6db3b203 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 @@ -31,7 +31,7 @@ * ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are. */ @ApiModel(description = "ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaimStatus { public static final String SERIALIZED_NAME_ALLOCATION = "allocation"; @SerializedName(SERIALIZED_NAME_ALLOCATION) 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 3ffc4e1655..4cddc66c03 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 @@ -29,7 +29,7 @@ * ResourceClaimTemplate is used to produce ResourceClaim objects. */ @ApiModel(description = "ResourceClaimTemplate is used to produce ResourceClaim objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaimTemplate implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 29b7c74d67..01a7fd5410 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 @@ -31,7 +31,7 @@ * ResourceClaimTemplateList is a collection of claim templates. */ @ApiModel(description = "ResourceClaimTemplateList is a collection of claim templates.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaimTemplateList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 1aa390d892..677288e111 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 @@ -29,7 +29,7 @@ * ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim. */ @ApiModel(description = "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClaimTemplateSpec { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) 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 c2c020fde2..3a218c0e9a 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 @@ -30,7 +30,7 @@ * ResourceClass is used by administrators to influence how resources are allocated. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. */ @ApiModel(description = "ResourceClass is used by administrators to influence how resources are allocated. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClass implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 5b7b44ee1e..4bae57e6a7 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 @@ -31,7 +31,7 @@ * ResourceClassList is a collection of classes. */ @ApiModel(description = "ResourceClassList is a collection of classes.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClassList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 1c31da76e8..52b324c6c3 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 @@ -27,7 +27,7 @@ * ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass. */ @ApiModel(description = "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceClassParametersReference { public static final String SERIALIZED_NAME_API_GROUP = "apiGroup"; @SerializedName(SERIALIZED_NAME_API_GROUP) 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 7dc7a90797..e4c68808c5 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 @@ -27,7 +27,7 @@ * ResourceHandle holds opaque resource data for processing by a specific kubelet plugin. */ @ApiModel(description = "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1alpha2ResourceHandle { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) 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 new file mode 100644 index 0000000000..55a84ba083 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1AuditAnnotation.java @@ -0,0 +1,125 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * AuditAnnotation describes how to produce an audit annotation for an API request. + */ +@ApiModel(description = "AuditAnnotation describes how to produce an audit annotation for an API request.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1AuditAnnotation { + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_VALUE_EXPRESSION = "valueExpression"; + @SerializedName(SERIALIZED_NAME_VALUE_EXPRESSION) + private String valueExpression; + + + public V1beta1AuditAnnotation key(String key) { + + this.key = key; + return this; + } + + /** + * key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\". If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded. Required. + * @return key + **/ + @ApiModelProperty(required = true, value = "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\". If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded. Required.") + + public String getKey() { + return key; + } + + + public void setKey(String key) { + this.key = key; + } + + + public V1beta1AuditAnnotation valueExpression(String valueExpression) { + + this.valueExpression = valueExpression; + return this; + } + + /** + * valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb. If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list. Required. + * @return valueExpression + **/ + @ApiModelProperty(required = true, value = "valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb. If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list. Required.") + + public String getValueExpression() { + return valueExpression; + } + + + public void setValueExpression(String valueExpression) { + this.valueExpression = valueExpression; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1AuditAnnotation v1beta1AuditAnnotation = (V1beta1AuditAnnotation) o; + return Objects.equals(this.key, v1beta1AuditAnnotation.key) && + Objects.equals(this.valueExpression, v1beta1AuditAnnotation.valueExpression); + } + + @Override + public int hashCode() { + return Objects.hash(key, valueExpression); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1AuditAnnotation {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" valueExpression: ").append(toIndentedString(valueExpression)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..99a7fe0e34 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ExpressionWarning.java @@ -0,0 +1,125 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ExpressionWarning is a warning information that targets a specific expression. + */ +@ApiModel(description = "ExpressionWarning is a warning information that targets a specific expression.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ExpressionWarning { + public static final String SERIALIZED_NAME_FIELD_REF = "fieldRef"; + @SerializedName(SERIALIZED_NAME_FIELD_REF) + private String fieldRef; + + public static final String SERIALIZED_NAME_WARNING = "warning"; + @SerializedName(SERIALIZED_NAME_WARNING) + private String warning; + + + public V1beta1ExpressionWarning fieldRef(String fieldRef) { + + this.fieldRef = fieldRef; + return this; + } + + /** + * The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\" + * @return fieldRef + **/ + @ApiModelProperty(required = true, value = "The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"") + + public String getFieldRef() { + return fieldRef; + } + + + public void setFieldRef(String fieldRef) { + this.fieldRef = fieldRef; + } + + + public V1beta1ExpressionWarning warning(String warning) { + + this.warning = warning; + return this; + } + + /** + * The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler. + * @return warning + **/ + @ApiModelProperty(required = true, value = "The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.") + + public String getWarning() { + return warning; + } + + + public void setWarning(String warning) { + this.warning = warning; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ExpressionWarning v1beta1ExpressionWarning = (V1beta1ExpressionWarning) o; + return Objects.equals(this.fieldRef, v1beta1ExpressionWarning.fieldRef) && + Objects.equals(this.warning, v1beta1ExpressionWarning.warning); + } + + @Override + public int hashCode() { + return Objects.hash(fieldRef, warning); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ExpressionWarning {\n"); + sb.append(" fieldRef: ").append(toIndentedString(fieldRef)).append("\n"); + sb.append(" warning: ").append(toIndentedString(warning)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..842bc24f06 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchCondition.java @@ -0,0 +1,125 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook. + */ +@ApiModel(description = "MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1MatchCondition { + public static final String SERIALIZED_NAME_EXPRESSION = "expression"; + @SerializedName(SERIALIZED_NAME_EXPRESSION) + private String expression; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1beta1MatchCondition expression(String expression) { + + this.expression = expression; + return this; + } + + /** + * Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: 'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ Required. + * @return expression + **/ + @ApiModelProperty(required = true, value = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: 'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ Required.") + + public String getExpression() { + return expression; + } + + + public void setExpression(String expression) { + this.expression = expression; + } + + + public V1beta1MatchCondition name(String name) { + + this.name = name; + return this; + } + + /** + * Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') Required. + * @return name + **/ + @ApiModelProperty(required = true, value = "Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') Required.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1MatchCondition v1beta1MatchCondition = (V1beta1MatchCondition) o; + return Objects.equals(this.expression, v1beta1MatchCondition.expression) && + Objects.equals(this.name, v1beta1MatchCondition.name); + } + + @Override + public int hashCode() { + return Objects.hash(expression, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1MatchCondition {\n"); + sb.append(" expression: ").append(toIndentedString(expression)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..97782da717 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1MatchResources.java @@ -0,0 +1,234 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1LabelSelector; +import io.kubernetes.client.openapi.models.V1beta1NamedRuleWithOperations; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 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) + */ +@ApiModel(description = "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)") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1MatchResources { + public static final String SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES = "excludeResourceRules"; + @SerializedName(SERIALIZED_NAME_EXCLUDE_RESOURCE_RULES) + private List excludeResourceRules = null; + + public static final String SERIALIZED_NAME_MATCH_POLICY = "matchPolicy"; + @SerializedName(SERIALIZED_NAME_MATCH_POLICY) + private String matchPolicy; + + public static final String SERIALIZED_NAME_NAMESPACE_SELECTOR = "namespaceSelector"; + @SerializedName(SERIALIZED_NAME_NAMESPACE_SELECTOR) + private V1LabelSelector namespaceSelector; + + public static final String SERIALIZED_NAME_OBJECT_SELECTOR = "objectSelector"; + @SerializedName(SERIALIZED_NAME_OBJECT_SELECTOR) + private V1LabelSelector objectSelector; + + public static final String SERIALIZED_NAME_RESOURCE_RULES = "resourceRules"; + @SerializedName(SERIALIZED_NAME_RESOURCE_RULES) + private List resourceRules = null; + + + public V1beta1MatchResources excludeResourceRules(List excludeResourceRules) { + + this.excludeResourceRules = excludeResourceRules; + return this; + } + + public V1beta1MatchResources addExcludeResourceRulesItem(V1beta1NamedRuleWithOperations excludeResourceRulesItem) { + if (this.excludeResourceRules == null) { + this.excludeResourceRules = new ArrayList<>(); + } + this.excludeResourceRules.add(excludeResourceRulesItem); + return this; + } + + /** + * ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) + * @return excludeResourceRules + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)") + + public List getExcludeResourceRules() { + return excludeResourceRules; + } + + + public void setExcludeResourceRules(List excludeResourceRules) { + this.excludeResourceRules = excludeResourceRules; + } + + + public V1beta1MatchResources matchPolicy(String matchPolicy) { + + this.matchPolicy = matchPolicy; + return this; + } + + /** + * matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. Defaults to \"Equivalent\" + * @return matchPolicy + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\". - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. Defaults to \"Equivalent\"") + + public String getMatchPolicy() { + return matchPolicy; + } + + + public void setMatchPolicy(String matchPolicy) { + this.matchPolicy = matchPolicy; + } + + + public V1beta1MatchResources namespaceSelector(V1LabelSelector namespaceSelector) { + + this.namespaceSelector = namespaceSelector; + return this; + } + + /** + * Get namespaceSelector + * @return namespaceSelector + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1LabelSelector getNamespaceSelector() { + return namespaceSelector; + } + + + public void setNamespaceSelector(V1LabelSelector namespaceSelector) { + this.namespaceSelector = namespaceSelector; + } + + + public V1beta1MatchResources objectSelector(V1LabelSelector objectSelector) { + + this.objectSelector = objectSelector; + return this; + } + + /** + * Get objectSelector + * @return objectSelector + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1LabelSelector getObjectSelector() { + return objectSelector; + } + + + public void setObjectSelector(V1LabelSelector objectSelector) { + this.objectSelector = objectSelector; + } + + + public V1beta1MatchResources resourceRules(List resourceRules) { + + this.resourceRules = resourceRules; + return this; + } + + public V1beta1MatchResources addResourceRulesItem(V1beta1NamedRuleWithOperations resourceRulesItem) { + if (this.resourceRules == null) { + this.resourceRules = new ArrayList<>(); + } + this.resourceRules.add(resourceRulesItem); + return this; + } + + /** + * ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule. + * @return resourceRules + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.") + + public List getResourceRules() { + return resourceRules; + } + + + public void setResourceRules(List resourceRules) { + this.resourceRules = resourceRules; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1MatchResources v1beta1MatchResources = (V1beta1MatchResources) o; + return Objects.equals(this.excludeResourceRules, v1beta1MatchResources.excludeResourceRules) && + Objects.equals(this.matchPolicy, v1beta1MatchResources.matchPolicy) && + Objects.equals(this.namespaceSelector, v1beta1MatchResources.namespaceSelector) && + Objects.equals(this.objectSelector, v1beta1MatchResources.objectSelector) && + Objects.equals(this.resourceRules, v1beta1MatchResources.resourceRules); + } + + @Override + public int hashCode() { + return Objects.hash(excludeResourceRules, matchPolicy, namespaceSelector, objectSelector, resourceRules); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1MatchResources {\n"); + sb.append(" excludeResourceRules: ").append(toIndentedString(excludeResourceRules)).append("\n"); + sb.append(" matchPolicy: ").append(toIndentedString(matchPolicy)).append("\n"); + sb.append(" namespaceSelector: ").append(toIndentedString(namespaceSelector)).append("\n"); + sb.append(" objectSelector: ").append(toIndentedString(objectSelector)).append("\n"); + sb.append(" resourceRules: ").append(toIndentedString(resourceRules)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..1b5aebfbcd --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1NamedRuleWithOperations.java @@ -0,0 +1,285 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. + */ +@ApiModel(description = "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1NamedRuleWithOperations { + public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; + @SerializedName(SERIALIZED_NAME_API_GROUPS) + private List apiGroups = null; + + public static final String SERIALIZED_NAME_API_VERSIONS = "apiVersions"; + @SerializedName(SERIALIZED_NAME_API_VERSIONS) + private List apiVersions = null; + + public static final String SERIALIZED_NAME_OPERATIONS = "operations"; + @SerializedName(SERIALIZED_NAME_OPERATIONS) + private List operations = null; + + public static final String SERIALIZED_NAME_RESOURCE_NAMES = "resourceNames"; + @SerializedName(SERIALIZED_NAME_RESOURCE_NAMES) + private List resourceNames = null; + + public static final String SERIALIZED_NAME_RESOURCES = "resources"; + @SerializedName(SERIALIZED_NAME_RESOURCES) + private List resources = null; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + private String scope; + + + public V1beta1NamedRuleWithOperations apiGroups(List apiGroups) { + + this.apiGroups = apiGroups; + return this; + } + + public V1beta1NamedRuleWithOperations addApiGroupsItem(String apiGroupsItem) { + if (this.apiGroups == null) { + this.apiGroups = new ArrayList<>(); + } + this.apiGroups.add(apiGroupsItem); + return this; + } + + /** + * APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. + * @return apiGroups + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.") + + public List getApiGroups() { + return apiGroups; + } + + + public void setApiGroups(List apiGroups) { + this.apiGroups = apiGroups; + } + + + public V1beta1NamedRuleWithOperations apiVersions(List apiVersions) { + + this.apiVersions = apiVersions; + return this; + } + + public V1beta1NamedRuleWithOperations addApiVersionsItem(String apiVersionsItem) { + if (this.apiVersions == null) { + this.apiVersions = new ArrayList<>(); + } + this.apiVersions.add(apiVersionsItem); + return this; + } + + /** + * APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. + * @return apiVersions + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.") + + public List getApiVersions() { + return apiVersions; + } + + + public void setApiVersions(List apiVersions) { + this.apiVersions = apiVersions; + } + + + public V1beta1NamedRuleWithOperations operations(List operations) { + + this.operations = operations; + return this; + } + + public V1beta1NamedRuleWithOperations addOperationsItem(String operationsItem) { + if (this.operations == null) { + this.operations = new ArrayList<>(); + } + this.operations.add(operationsItem); + return this; + } + + /** + * Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. + * @return operations + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.") + + public List getOperations() { + return operations; + } + + + public void setOperations(List operations) { + this.operations = operations; + } + + + public V1beta1NamedRuleWithOperations resourceNames(List resourceNames) { + + this.resourceNames = resourceNames; + return this; + } + + public V1beta1NamedRuleWithOperations addResourceNamesItem(String resourceNamesItem) { + if (this.resourceNames == null) { + this.resourceNames = new ArrayList<>(); + } + this.resourceNames.add(resourceNamesItem); + return this; + } + + /** + * ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + * @return resourceNames + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.") + + public List getResourceNames() { + return resourceNames; + } + + + public void setResourceNames(List resourceNames) { + this.resourceNames = resourceNames; + } + + + public V1beta1NamedRuleWithOperations resources(List resources) { + + this.resources = resources; + return this; + } + + public V1beta1NamedRuleWithOperations addResourcesItem(String resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add(resourcesItem); + return this; + } + + /** + * Resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/_*' means all subresources of pods. '*_/scale' means all scale subresources. '*_/_*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. Required. + * @return resources + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Resources is a list of resources this rule applies to. For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/_*' means all subresources of pods. '*_/scale' means all scale subresources. '*_/_*' means all resources and their subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. Depending on the enclosing object, subresources might not be allowed. Required.") + + public List getResources() { + return resources; + } + + + public void setResources(List resources) { + this.resources = resources; + } + + + public V1beta1NamedRuleWithOperations scope(String scope) { + + this.scope = scope; + return this; + } + + /** + * scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\". + * @return scope + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".") + + public String getScope() { + return scope; + } + + + public void setScope(String scope) { + this.scope = scope; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1NamedRuleWithOperations v1beta1NamedRuleWithOperations = (V1beta1NamedRuleWithOperations) o; + return Objects.equals(this.apiGroups, v1beta1NamedRuleWithOperations.apiGroups) && + Objects.equals(this.apiVersions, v1beta1NamedRuleWithOperations.apiVersions) && + Objects.equals(this.operations, v1beta1NamedRuleWithOperations.operations) && + Objects.equals(this.resourceNames, v1beta1NamedRuleWithOperations.resourceNames) && + Objects.equals(this.resources, v1beta1NamedRuleWithOperations.resources) && + Objects.equals(this.scope, v1beta1NamedRuleWithOperations.scope); + } + + @Override + public int hashCode() { + return Objects.hash(apiGroups, apiVersions, operations, resourceNames, resources, scope); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1NamedRuleWithOperations {\n"); + sb.append(" apiGroups: ").append(toIndentedString(apiGroups)).append("\n"); + sb.append(" apiVersions: ").append(toIndentedString(apiVersions)).append("\n"); + sb.append(" operations: ").append(toIndentedString(operations)).append("\n"); + sb.append(" resourceNames: ").append(toIndentedString(resourceNames)).append("\n"); + sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..5241ed583f --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamKind.java @@ -0,0 +1,127 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ParamKind is a tuple of Group Kind and Version. + */ +@ApiModel(description = "ParamKind is a tuple of Group Kind and Version.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ParamKind { + public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; + @SerializedName(SERIALIZED_NAME_API_VERSION) + private String apiVersion; + + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private String kind; + + + public V1beta1ParamKind apiVersion(String apiVersion) { + + this.apiVersion = apiVersion; + return this; + } + + /** + * APIVersion is the API group version the resources belong to. In format of \"group/version\". Required. + * @return apiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.") + + public String getApiVersion() { + return apiVersion; + } + + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + + public V1beta1ParamKind kind(String kind) { + + this.kind = kind; + return this; + } + + /** + * Kind is the API kind the resources belong to. Required. + * @return kind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Kind is the API kind the resources belong to. Required.") + + public String getKind() { + return kind; + } + + + public void setKind(String kind) { + this.kind = kind; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ParamKind v1beta1ParamKind = (V1beta1ParamKind) o; + return Objects.equals(this.apiVersion, v1beta1ParamKind.apiVersion) && + Objects.equals(this.kind, v1beta1ParamKind.kind); + } + + @Override + public int hashCode() { + return Objects.hash(apiVersion, kind); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ParamKind {\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..8eaa8c4296 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ParamRef.java @@ -0,0 +1,186 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1LabelSelector; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. + */ +@ApiModel(description = "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ParamRef { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; + @SerializedName(SERIALIZED_NAME_NAMESPACE) + private String namespace; + + public static final String SERIALIZED_NAME_PARAMETER_NOT_FOUND_ACTION = "parameterNotFoundAction"; + @SerializedName(SERIALIZED_NAME_PARAMETER_NOT_FOUND_ACTION) + private String parameterNotFoundAction; + + public static final String SERIALIZED_NAME_SELECTOR = "selector"; + @SerializedName(SERIALIZED_NAME_SELECTOR) + private V1LabelSelector selector; + + + public V1beta1ParamRef name(String name) { + + this.name = name; + return this; + } + + /** + * name is the name of the resource being referenced. One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "name is the name of the resource being referenced. One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public V1beta1ParamRef namespace(String namespace) { + + this.namespace = namespace; + return this; + } + + /** + * namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. + * @return namespace + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.") + + public String getNamespace() { + return namespace; + } + + + public void setNamespace(String namespace) { + this.namespace = namespace; + } + + + public V1beta1ParamRef parameterNotFoundAction(String parameterNotFoundAction) { + + this.parameterNotFoundAction = parameterNotFoundAction; + return this; + } + + /** + * `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Required + * @return parameterNotFoundAction + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. Allowed values are `Allow` or `Deny` Required") + + public String getParameterNotFoundAction() { + return parameterNotFoundAction; + } + + + public void setParameterNotFoundAction(String parameterNotFoundAction) { + this.parameterNotFoundAction = parameterNotFoundAction; + } + + + public V1beta1ParamRef selector(V1LabelSelector selector) { + + this.selector = selector; + return this; + } + + /** + * Get selector + * @return selector + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1LabelSelector getSelector() { + return selector; + } + + + public void setSelector(V1LabelSelector selector) { + this.selector = selector; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ParamRef v1beta1ParamRef = (V1beta1ParamRef) o; + return Objects.equals(this.name, v1beta1ParamRef.name) && + Objects.equals(this.namespace, v1beta1ParamRef.namespace) && + Objects.equals(this.parameterNotFoundAction, v1beta1ParamRef.parameterNotFoundAction) && + Objects.equals(this.selector, v1beta1ParamRef.selector); + } + + @Override + public int hashCode() { + return Objects.hash(name, namespace, parameterNotFoundAction, selector); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ParamRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" parameterNotFoundAction: ").append(toIndentedString(parameterNotFoundAction)).append("\n"); + sb.append(" selector: ").append(toIndentedString(selector)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 f901b7214c..9f3e22f40f 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta1SelfSubjectReview implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 8a1efbfff4..f711bb9d11 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 @@ -28,7 +28,7 @@ * SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. */ @ApiModel(description = "SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta1SelfSubjectReviewStatus { public static final String SERIALIZED_NAME_USER_INFO = "userInfo"; @SerializedName(SERIALIZED_NAME_USER_INFO) 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 new file mode 100644 index 0000000000..4217b04c00 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1TypeChecking.java @@ -0,0 +1,109 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1beta1ExpressionWarning; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy + */ +@ApiModel(description = "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1TypeChecking { + public static final String SERIALIZED_NAME_EXPRESSION_WARNINGS = "expressionWarnings"; + @SerializedName(SERIALIZED_NAME_EXPRESSION_WARNINGS) + private List expressionWarnings = null; + + + public V1beta1TypeChecking expressionWarnings(List expressionWarnings) { + + this.expressionWarnings = expressionWarnings; + return this; + } + + public V1beta1TypeChecking addExpressionWarningsItem(V1beta1ExpressionWarning expressionWarningsItem) { + if (this.expressionWarnings == null) { + this.expressionWarnings = new ArrayList<>(); + } + this.expressionWarnings.add(expressionWarningsItem); + return this; + } + + /** + * The type checking warnings for each expression. + * @return expressionWarnings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The type checking warnings for each expression.") + + public List getExpressionWarnings() { + return expressionWarnings; + } + + + public void setExpressionWarnings(List expressionWarnings) { + this.expressionWarnings = expressionWarnings; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1TypeChecking v1beta1TypeChecking = (V1beta1TypeChecking) o; + return Objects.equals(this.expressionWarnings, v1beta1TypeChecking.expressionWarnings); + } + + @Override + public int hashCode() { + return Objects.hash(expressionWarnings); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1TypeChecking {\n"); + sb.append(" expressionWarnings: ").append(toIndentedString(expressionWarnings)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..d928e99ec4 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicy.java @@ -0,0 +1,217 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1ObjectMeta; +import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicySpec; +import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyStatus; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. + */ +@ApiModel(description = "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ValidatingAdmissionPolicy implements io.kubernetes.client.common.KubernetesObject { + public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; + @SerializedName(SERIALIZED_NAME_API_VERSION) + private String apiVersion; + + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private String kind; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + private V1ObjectMeta metadata; + + public static final String SERIALIZED_NAME_SPEC = "spec"; + @SerializedName(SERIALIZED_NAME_SPEC) + private V1beta1ValidatingAdmissionPolicySpec spec; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private V1beta1ValidatingAdmissionPolicyStatus status; + + + public V1beta1ValidatingAdmissionPolicy apiVersion(String apiVersion) { + + this.apiVersion = apiVersion; + return this; + } + + /** + * APIVersion defines the versioned 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 + * @return apiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "APIVersion defines the versioned 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") + + public String getApiVersion() { + return apiVersion; + } + + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + + public V1beta1ValidatingAdmissionPolicy kind(String kind) { + + this.kind = kind; + return this; + } + + /** + * Kind is a string value representing the 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 + * @return kind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Kind is a string value representing the 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") + + public String getKind() { + return kind; + } + + + public void setKind(String kind) { + this.kind = kind; + } + + + public V1beta1ValidatingAdmissionPolicy metadata(V1ObjectMeta metadata) { + + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ObjectMeta getMetadata() { + return metadata; + } + + + public void setMetadata(V1ObjectMeta metadata) { + this.metadata = metadata; + } + + + public V1beta1ValidatingAdmissionPolicy spec(V1beta1ValidatingAdmissionPolicySpec spec) { + + this.spec = spec; + return this; + } + + /** + * Get spec + * @return spec + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta1ValidatingAdmissionPolicySpec getSpec() { + return spec; + } + + + public void setSpec(V1beta1ValidatingAdmissionPolicySpec spec) { + this.spec = spec; + } + + + public V1beta1ValidatingAdmissionPolicy status(V1beta1ValidatingAdmissionPolicyStatus status) { + + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta1ValidatingAdmissionPolicyStatus getStatus() { + return status; + } + + + public void setStatus(V1beta1ValidatingAdmissionPolicyStatus status) { + this.status = status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ValidatingAdmissionPolicy v1beta1ValidatingAdmissionPolicy = (V1beta1ValidatingAdmissionPolicy) o; + return Objects.equals(this.apiVersion, v1beta1ValidatingAdmissionPolicy.apiVersion) && + Objects.equals(this.kind, v1beta1ValidatingAdmissionPolicy.kind) && + Objects.equals(this.metadata, v1beta1ValidatingAdmissionPolicy.metadata) && + Objects.equals(this.spec, v1beta1ValidatingAdmissionPolicy.spec) && + Objects.equals(this.status, v1beta1ValidatingAdmissionPolicy.status); + } + + @Override + public int hashCode() { + return Objects.hash(apiVersion, kind, metadata, spec, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ValidatingAdmissionPolicy {\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" spec: ").append(toIndentedString(spec)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..e4599efc13 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBinding.java @@ -0,0 +1,187 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1ObjectMeta; +import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyBindingSpec; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * 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. + */ +@ApiModel(description = "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.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ValidatingAdmissionPolicyBinding implements io.kubernetes.client.common.KubernetesObject { + public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; + @SerializedName(SERIALIZED_NAME_API_VERSION) + private String apiVersion; + + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private String kind; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + private V1ObjectMeta metadata; + + public static final String SERIALIZED_NAME_SPEC = "spec"; + @SerializedName(SERIALIZED_NAME_SPEC) + private V1beta1ValidatingAdmissionPolicyBindingSpec spec; + + + public V1beta1ValidatingAdmissionPolicyBinding apiVersion(String apiVersion) { + + this.apiVersion = apiVersion; + return this; + } + + /** + * APIVersion defines the versioned 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 + * @return apiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "APIVersion defines the versioned 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") + + public String getApiVersion() { + return apiVersion; + } + + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + + public V1beta1ValidatingAdmissionPolicyBinding kind(String kind) { + + this.kind = kind; + return this; + } + + /** + * Kind is a string value representing the 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 + * @return kind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Kind is a string value representing the 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") + + public String getKind() { + return kind; + } + + + public void setKind(String kind) { + this.kind = kind; + } + + + public V1beta1ValidatingAdmissionPolicyBinding metadata(V1ObjectMeta metadata) { + + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ObjectMeta getMetadata() { + return metadata; + } + + + public void setMetadata(V1ObjectMeta metadata) { + this.metadata = metadata; + } + + + public V1beta1ValidatingAdmissionPolicyBinding spec(V1beta1ValidatingAdmissionPolicyBindingSpec spec) { + + this.spec = spec; + return this; + } + + /** + * Get spec + * @return spec + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta1ValidatingAdmissionPolicyBindingSpec getSpec() { + return spec; + } + + + public void setSpec(V1beta1ValidatingAdmissionPolicyBindingSpec spec) { + this.spec = spec; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ValidatingAdmissionPolicyBinding v1beta1ValidatingAdmissionPolicyBinding = (V1beta1ValidatingAdmissionPolicyBinding) o; + return Objects.equals(this.apiVersion, v1beta1ValidatingAdmissionPolicyBinding.apiVersion) && + Objects.equals(this.kind, v1beta1ValidatingAdmissionPolicyBinding.kind) && + Objects.equals(this.metadata, v1beta1ValidatingAdmissionPolicyBinding.metadata) && + Objects.equals(this.spec, v1beta1ValidatingAdmissionPolicyBinding.spec); + } + + @Override + public int hashCode() { + return Objects.hash(apiVersion, kind, metadata, spec); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ValidatingAdmissionPolicyBinding {\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" spec: ").append(toIndentedString(spec)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..80228c36fd --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingList.java @@ -0,0 +1,197 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1ListMeta; +import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicyBinding; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. + */ +@ApiModel(description = "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ValidatingAdmissionPolicyBindingList implements io.kubernetes.client.common.KubernetesListObject { + public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; + @SerializedName(SERIALIZED_NAME_API_VERSION) + private String apiVersion; + + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = null; + + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private String kind; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + private V1ListMeta metadata; + + + public V1beta1ValidatingAdmissionPolicyBindingList apiVersion(String apiVersion) { + + this.apiVersion = apiVersion; + return this; + } + + /** + * APIVersion defines the versioned 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 + * @return apiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "APIVersion defines the versioned 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") + + public String getApiVersion() { + return apiVersion; + } + + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + + public V1beta1ValidatingAdmissionPolicyBindingList items(List items) { + + this.items = items; + return this; + } + + public V1beta1ValidatingAdmissionPolicyBindingList addItemsItem(V1beta1ValidatingAdmissionPolicyBinding itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * List of PolicyBinding. + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "List of PolicyBinding.") + + public List getItems() { + return items; + } + + + public void setItems(List items) { + this.items = items; + } + + + public V1beta1ValidatingAdmissionPolicyBindingList kind(String kind) { + + this.kind = kind; + return this; + } + + /** + * Kind is a string value representing the 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 + * @return kind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Kind is a string value representing the 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") + + public String getKind() { + return kind; + } + + + public void setKind(String kind) { + this.kind = kind; + } + + + public V1beta1ValidatingAdmissionPolicyBindingList metadata(V1ListMeta metadata) { + + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ListMeta getMetadata() { + return metadata; + } + + + public void setMetadata(V1ListMeta metadata) { + this.metadata = metadata; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ValidatingAdmissionPolicyBindingList v1beta1ValidatingAdmissionPolicyBindingList = (V1beta1ValidatingAdmissionPolicyBindingList) o; + return Objects.equals(this.apiVersion, v1beta1ValidatingAdmissionPolicyBindingList.apiVersion) && + Objects.equals(this.items, v1beta1ValidatingAdmissionPolicyBindingList.items) && + Objects.equals(this.kind, v1beta1ValidatingAdmissionPolicyBindingList.kind) && + Objects.equals(this.metadata, v1beta1ValidatingAdmissionPolicyBindingList.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(apiVersion, items, kind, metadata); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ValidatingAdmissionPolicyBindingList {\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..3a1b45468e --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyBindingSpec.java @@ -0,0 +1,197 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1beta1MatchResources; +import io.kubernetes.client.openapi.models.V1beta1ParamRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. + */ +@ApiModel(description = "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ValidatingAdmissionPolicyBindingSpec { + public static final String SERIALIZED_NAME_MATCH_RESOURCES = "matchResources"; + @SerializedName(SERIALIZED_NAME_MATCH_RESOURCES) + private V1beta1MatchResources matchResources; + + public static final String SERIALIZED_NAME_PARAM_REF = "paramRef"; + @SerializedName(SERIALIZED_NAME_PARAM_REF) + private V1beta1ParamRef paramRef; + + public static final String SERIALIZED_NAME_POLICY_NAME = "policyName"; + @SerializedName(SERIALIZED_NAME_POLICY_NAME) + private String policyName; + + public static final String SERIALIZED_NAME_VALIDATION_ACTIONS = "validationActions"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ACTIONS) + private List validationActions = null; + + + public V1beta1ValidatingAdmissionPolicyBindingSpec matchResources(V1beta1MatchResources matchResources) { + + this.matchResources = matchResources; + return this; + } + + /** + * Get matchResources + * @return matchResources + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta1MatchResources getMatchResources() { + return matchResources; + } + + + public void setMatchResources(V1beta1MatchResources matchResources) { + this.matchResources = matchResources; + } + + + public V1beta1ValidatingAdmissionPolicyBindingSpec paramRef(V1beta1ParamRef paramRef) { + + this.paramRef = paramRef; + return this; + } + + /** + * Get paramRef + * @return paramRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta1ParamRef getParamRef() { + return paramRef; + } + + + public void setParamRef(V1beta1ParamRef paramRef) { + this.paramRef = paramRef; + } + + + public V1beta1ValidatingAdmissionPolicyBindingSpec policyName(String policyName) { + + this.policyName = policyName; + return this; + } + + /** + * PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. + * @return policyName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.") + + public String getPolicyName() { + return policyName; + } + + + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + + + public V1beta1ValidatingAdmissionPolicyBindingSpec validationActions(List validationActions) { + + this.validationActions = validationActions; + return this; + } + + public V1beta1ValidatingAdmissionPolicyBindingSpec addValidationActionsItem(String validationActionsItem) { + if (this.validationActions == null) { + this.validationActions = new ArrayList<>(); + } + this.validationActions.add(validationActionsItem); + return this; + } + + /** + * validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required. + * @return validationActions + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required.") + + public List getValidationActions() { + return validationActions; + } + + + public void setValidationActions(List validationActions) { + this.validationActions = validationActions; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ValidatingAdmissionPolicyBindingSpec v1beta1ValidatingAdmissionPolicyBindingSpec = (V1beta1ValidatingAdmissionPolicyBindingSpec) o; + return Objects.equals(this.matchResources, v1beta1ValidatingAdmissionPolicyBindingSpec.matchResources) && + Objects.equals(this.paramRef, v1beta1ValidatingAdmissionPolicyBindingSpec.paramRef) && + Objects.equals(this.policyName, v1beta1ValidatingAdmissionPolicyBindingSpec.policyName) && + Objects.equals(this.validationActions, v1beta1ValidatingAdmissionPolicyBindingSpec.validationActions); + } + + @Override + public int hashCode() { + return Objects.hash(matchResources, paramRef, policyName, validationActions); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ValidatingAdmissionPolicyBindingSpec {\n"); + sb.append(" matchResources: ").append(toIndentedString(matchResources)).append("\n"); + sb.append(" paramRef: ").append(toIndentedString(paramRef)).append("\n"); + sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); + sb.append(" validationActions: ").append(toIndentedString(validationActions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..1b69b1570f --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyList.java @@ -0,0 +1,197 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1ListMeta; +import io.kubernetes.client.openapi.models.V1beta1ValidatingAdmissionPolicy; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. + */ +@ApiModel(description = "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ValidatingAdmissionPolicyList implements io.kubernetes.client.common.KubernetesListObject { + public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; + @SerializedName(SERIALIZED_NAME_API_VERSION) + private String apiVersion; + + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = null; + + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private String kind; + + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + private V1ListMeta metadata; + + + public V1beta1ValidatingAdmissionPolicyList apiVersion(String apiVersion) { + + this.apiVersion = apiVersion; + return this; + } + + /** + * APIVersion defines the versioned 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 + * @return apiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "APIVersion defines the versioned 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") + + public String getApiVersion() { + return apiVersion; + } + + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + + public V1beta1ValidatingAdmissionPolicyList items(List items) { + + this.items = items; + return this; + } + + public V1beta1ValidatingAdmissionPolicyList addItemsItem(V1beta1ValidatingAdmissionPolicy itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * List of ValidatingAdmissionPolicy. + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "List of ValidatingAdmissionPolicy.") + + public List getItems() { + return items; + } + + + public void setItems(List items) { + this.items = items; + } + + + public V1beta1ValidatingAdmissionPolicyList kind(String kind) { + + this.kind = kind; + return this; + } + + /** + * Kind is a string value representing the 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 + * @return kind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Kind is a string value representing the 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") + + public String getKind() { + return kind; + } + + + public void setKind(String kind) { + this.kind = kind; + } + + + public V1beta1ValidatingAdmissionPolicyList metadata(V1ListMeta metadata) { + + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ListMeta getMetadata() { + return metadata; + } + + + public void setMetadata(V1ListMeta metadata) { + this.metadata = metadata; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ValidatingAdmissionPolicyList v1beta1ValidatingAdmissionPolicyList = (V1beta1ValidatingAdmissionPolicyList) o; + return Objects.equals(this.apiVersion, v1beta1ValidatingAdmissionPolicyList.apiVersion) && + Objects.equals(this.items, v1beta1ValidatingAdmissionPolicyList.items) && + Objects.equals(this.kind, v1beta1ValidatingAdmissionPolicyList.kind) && + Objects.equals(this.metadata, v1beta1ValidatingAdmissionPolicyList.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(apiVersion, items, kind, metadata); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ValidatingAdmissionPolicyList {\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..6e369f4f4a --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicySpec.java @@ -0,0 +1,312 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1beta1AuditAnnotation; +import io.kubernetes.client.openapi.models.V1beta1MatchCondition; +import io.kubernetes.client.openapi.models.V1beta1MatchResources; +import io.kubernetes.client.openapi.models.V1beta1ParamKind; +import io.kubernetes.client.openapi.models.V1beta1Validation; +import io.kubernetes.client.openapi.models.V1beta1Variable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. + */ +@ApiModel(description = "ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ValidatingAdmissionPolicySpec { + public static final String SERIALIZED_NAME_AUDIT_ANNOTATIONS = "auditAnnotations"; + @SerializedName(SERIALIZED_NAME_AUDIT_ANNOTATIONS) + private List auditAnnotations = null; + + public static final String SERIALIZED_NAME_FAILURE_POLICY = "failurePolicy"; + @SerializedName(SERIALIZED_NAME_FAILURE_POLICY) + private String failurePolicy; + + public static final String SERIALIZED_NAME_MATCH_CONDITIONS = "matchConditions"; + @SerializedName(SERIALIZED_NAME_MATCH_CONDITIONS) + private List matchConditions = null; + + public static final String SERIALIZED_NAME_MATCH_CONSTRAINTS = "matchConstraints"; + @SerializedName(SERIALIZED_NAME_MATCH_CONSTRAINTS) + private V1beta1MatchResources matchConstraints; + + public static final String SERIALIZED_NAME_PARAM_KIND = "paramKind"; + @SerializedName(SERIALIZED_NAME_PARAM_KIND) + private V1beta1ParamKind paramKind; + + public static final String SERIALIZED_NAME_VALIDATIONS = "validations"; + @SerializedName(SERIALIZED_NAME_VALIDATIONS) + private List validations = null; + + public static final String SERIALIZED_NAME_VARIABLES = "variables"; + @SerializedName(SERIALIZED_NAME_VARIABLES) + private List variables = null; + + + public V1beta1ValidatingAdmissionPolicySpec auditAnnotations(List auditAnnotations) { + + this.auditAnnotations = auditAnnotations; + return this; + } + + public V1beta1ValidatingAdmissionPolicySpec addAuditAnnotationsItem(V1beta1AuditAnnotation auditAnnotationsItem) { + if (this.auditAnnotations == null) { + this.auditAnnotations = new ArrayList<>(); + } + this.auditAnnotations.add(auditAnnotationsItem); + return this; + } + + /** + * auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required. + * @return auditAnnotations + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.") + + public List getAuditAnnotations() { + return auditAnnotations; + } + + + public void setAuditAnnotations(List auditAnnotations) { + this.auditAnnotations = auditAnnotations; + } + + + public V1beta1ValidatingAdmissionPolicySpec failurePolicy(String failurePolicy) { + + this.failurePolicy = failurePolicy; + return this; + } + + /** + * failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource. failurePolicy does not define how validations that evaluate to false are handled. When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced. Allowed values are Ignore or Fail. Defaults to Fail. + * @return failurePolicy + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource. failurePolicy does not define how validations that evaluate to false are handled. When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced. Allowed values are Ignore or Fail. Defaults to Fail.") + + public String getFailurePolicy() { + return failurePolicy; + } + + + public void setFailurePolicy(String failurePolicy) { + this.failurePolicy = failurePolicy; + } + + + public V1beta1ValidatingAdmissionPolicySpec matchConditions(List matchConditions) { + + this.matchConditions = matchConditions; + return this; + } + + public V1beta1ValidatingAdmissionPolicySpec addMatchConditionsItem(V1beta1MatchCondition matchConditionsItem) { + if (this.matchConditions == null) { + this.matchConditions = new ArrayList<>(); + } + this.matchConditions.add(matchConditionsItem); + return this; + } + + /** + * MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped + * @return matchConditions + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped") + + public List getMatchConditions() { + return matchConditions; + } + + + public void setMatchConditions(List matchConditions) { + this.matchConditions = matchConditions; + } + + + public V1beta1ValidatingAdmissionPolicySpec matchConstraints(V1beta1MatchResources matchConstraints) { + + this.matchConstraints = matchConstraints; + return this; + } + + /** + * Get matchConstraints + * @return matchConstraints + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta1MatchResources getMatchConstraints() { + return matchConstraints; + } + + + public void setMatchConstraints(V1beta1MatchResources matchConstraints) { + this.matchConstraints = matchConstraints; + } + + + public V1beta1ValidatingAdmissionPolicySpec paramKind(V1beta1ParamKind paramKind) { + + this.paramKind = paramKind; + return this; + } + + /** + * Get paramKind + * @return paramKind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta1ParamKind getParamKind() { + return paramKind; + } + + + public void setParamKind(V1beta1ParamKind paramKind) { + this.paramKind = paramKind; + } + + + public V1beta1ValidatingAdmissionPolicySpec validations(List validations) { + + this.validations = validations; + return this; + } + + public V1beta1ValidatingAdmissionPolicySpec addValidationsItem(V1beta1Validation validationsItem) { + if (this.validations == null) { + this.validations = new ArrayList<>(); + } + this.validations.add(validationsItem); + return this; + } + + /** + * Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required. + * @return validations + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.") + + public List getValidations() { + return validations; + } + + + public void setValidations(List validations) { + this.validations = validations; + } + + + public V1beta1ValidatingAdmissionPolicySpec variables(List variables) { + + this.variables = variables; + return this; + } + + public V1beta1ValidatingAdmissionPolicySpec addVariablesItem(V1beta1Variable variablesItem) { + if (this.variables == null) { + this.variables = new ArrayList<>(); + } + this.variables.add(variablesItem); + return this; + } + + /** + * Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. + * @return variables + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.") + + public List getVariables() { + return variables; + } + + + public void setVariables(List variables) { + this.variables = variables; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ValidatingAdmissionPolicySpec v1beta1ValidatingAdmissionPolicySpec = (V1beta1ValidatingAdmissionPolicySpec) o; + return Objects.equals(this.auditAnnotations, v1beta1ValidatingAdmissionPolicySpec.auditAnnotations) && + Objects.equals(this.failurePolicy, v1beta1ValidatingAdmissionPolicySpec.failurePolicy) && + Objects.equals(this.matchConditions, v1beta1ValidatingAdmissionPolicySpec.matchConditions) && + Objects.equals(this.matchConstraints, v1beta1ValidatingAdmissionPolicySpec.matchConstraints) && + Objects.equals(this.paramKind, v1beta1ValidatingAdmissionPolicySpec.paramKind) && + Objects.equals(this.validations, v1beta1ValidatingAdmissionPolicySpec.validations) && + Objects.equals(this.variables, v1beta1ValidatingAdmissionPolicySpec.variables); + } + + @Override + public int hashCode() { + return Objects.hash(auditAnnotations, failurePolicy, matchConditions, matchConstraints, paramKind, validations, variables); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ValidatingAdmissionPolicySpec {\n"); + sb.append(" auditAnnotations: ").append(toIndentedString(auditAnnotations)).append("\n"); + sb.append(" failurePolicy: ").append(toIndentedString(failurePolicy)).append("\n"); + sb.append(" matchConditions: ").append(toIndentedString(matchConditions)).append("\n"); + sb.append(" matchConstraints: ").append(toIndentedString(matchConstraints)).append("\n"); + sb.append(" paramKind: ").append(toIndentedString(paramKind)).append("\n"); + sb.append(" validations: ").append(toIndentedString(validations)).append("\n"); + sb.append(" variables: ").append(toIndentedString(variables)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..8613e8d839 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1ValidatingAdmissionPolicyStatus.java @@ -0,0 +1,168 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.openapi.models.V1Condition; +import io.kubernetes.client.openapi.models.V1beta1TypeChecking; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. + */ +@ApiModel(description = "ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1ValidatingAdmissionPolicyStatus { + public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; + @SerializedName(SERIALIZED_NAME_CONDITIONS) + private List conditions = null; + + public static final String SERIALIZED_NAME_OBSERVED_GENERATION = "observedGeneration"; + @SerializedName(SERIALIZED_NAME_OBSERVED_GENERATION) + private Long observedGeneration; + + public static final String SERIALIZED_NAME_TYPE_CHECKING = "typeChecking"; + @SerializedName(SERIALIZED_NAME_TYPE_CHECKING) + private V1beta1TypeChecking typeChecking; + + + public V1beta1ValidatingAdmissionPolicyStatus conditions(List conditions) { + + this.conditions = conditions; + return this; + } + + public V1beta1ValidatingAdmissionPolicyStatus addConditionsItem(V1Condition conditionsItem) { + if (this.conditions == null) { + this.conditions = new ArrayList<>(); + } + this.conditions.add(conditionsItem); + return this; + } + + /** + * The conditions represent the latest available observations of a policy's current state. + * @return conditions + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The conditions represent the latest available observations of a policy's current state.") + + public List getConditions() { + return conditions; + } + + + public void setConditions(List conditions) { + this.conditions = conditions; + } + + + public V1beta1ValidatingAdmissionPolicyStatus observedGeneration(Long observedGeneration) { + + this.observedGeneration = observedGeneration; + return this; + } + + /** + * The generation observed by the controller. + * @return observedGeneration + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The generation observed by the controller.") + + public Long getObservedGeneration() { + return observedGeneration; + } + + + public void setObservedGeneration(Long observedGeneration) { + this.observedGeneration = observedGeneration; + } + + + public V1beta1ValidatingAdmissionPolicyStatus typeChecking(V1beta1TypeChecking typeChecking) { + + this.typeChecking = typeChecking; + return this; + } + + /** + * Get typeChecking + * @return typeChecking + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta1TypeChecking getTypeChecking() { + return typeChecking; + } + + + public void setTypeChecking(V1beta1TypeChecking typeChecking) { + this.typeChecking = typeChecking; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1ValidatingAdmissionPolicyStatus v1beta1ValidatingAdmissionPolicyStatus = (V1beta1ValidatingAdmissionPolicyStatus) o; + return Objects.equals(this.conditions, v1beta1ValidatingAdmissionPolicyStatus.conditions) && + Objects.equals(this.observedGeneration, v1beta1ValidatingAdmissionPolicyStatus.observedGeneration) && + Objects.equals(this.typeChecking, v1beta1ValidatingAdmissionPolicyStatus.typeChecking); + } + + @Override + public int hashCode() { + return Objects.hash(conditions, observedGeneration, typeChecking); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1ValidatingAdmissionPolicyStatus {\n"); + sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); + sb.append(" observedGeneration: ").append(toIndentedString(observedGeneration)).append("\n"); + sb.append(" typeChecking: ").append(toIndentedString(typeChecking)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..140331e9bd --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Validation.java @@ -0,0 +1,184 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Validation specifies the CEL expression which is used to apply the validation. + */ +@ApiModel(description = "Validation specifies the CEL expression which is used to apply the validation.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1Validation { + public static final String SERIALIZED_NAME_EXPRESSION = "expression"; + @SerializedName(SERIALIZED_NAME_EXPRESSION) + private String expression; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_MESSAGE_EXPRESSION = "messageExpression"; + @SerializedName(SERIALIZED_NAME_MESSAGE_EXPRESSION) + private String messageExpression; + + public static final String SERIALIZED_NAME_REASON = "reason"; + @SerializedName(SERIALIZED_NAME_REASON) + private String reason; + + + public V1beta1Validation expression(String expression) { + + this.expression = expression; + return this; + } + + /** + * Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required. + * @return expression + **/ + @ApiModelProperty(required = true, value = "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\", \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\". Examples: - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"} - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"} - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"} Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and non-intersecting elements in `Y` are appended, retaining their partial order. - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with non-intersecting keys are appended, retaining their partial order. Required.") + + public String getExpression() { + return expression; + } + + + public void setExpression(String expression) { + this.expression = expression; + } + + + public V1beta1Validation message(String message) { + + this.message = message; + return this; + } + + /** + * Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\". + * @return message + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".") + + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + + public V1beta1Validation messageExpression(String messageExpression) { + + this.messageExpression = messageExpression; + return this; + } + + /** + * messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\" + * @return messageExpression + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"") + + public String getMessageExpression() { + return messageExpression; + } + + + public void setMessageExpression(String messageExpression) { + this.messageExpression = messageExpression; + } + + + public V1beta1Validation reason(String reason) { + + this.reason = reason; + return this; + } + + /** + * Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client. + * @return reason + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.") + + public String getReason() { + return reason; + } + + + public void setReason(String reason) { + this.reason = reason; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1Validation v1beta1Validation = (V1beta1Validation) o; + return Objects.equals(this.expression, v1beta1Validation.expression) && + Objects.equals(this.message, v1beta1Validation.message) && + Objects.equals(this.messageExpression, v1beta1Validation.messageExpression) && + Objects.equals(this.reason, v1beta1Validation.reason); + } + + @Override + public int hashCode() { + return Objects.hash(expression, message, messageExpression, reason); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1Validation {\n"); + sb.append(" expression: ").append(toIndentedString(expression)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" messageExpression: ").append(toIndentedString(messageExpression)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 new file mode 100644 index 0000000000..ce736c5c5b --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta1Variable.java @@ -0,0 +1,125 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. + */ +@ApiModel(description = "Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta1Variable { + public static final String SERIALIZED_NAME_EXPRESSION = "expression"; + @SerializedName(SERIALIZED_NAME_EXPRESSION) + private String expression; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1beta1Variable expression(String expression) { + + this.expression = expression; + return this; + } + + /** + * Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. + * @return expression + **/ + @ApiModelProperty(required = true, value = "Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.") + + public String getExpression() { + return expression; + } + + + public void setExpression(String expression) { + this.expression = expression; + } + + + public V1beta1Variable name(String name) { + + this.name = name; + return this; + } + + /** + * Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo` + * @return name + **/ + @ApiModelProperty(required = true, value = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta1Variable v1beta1Variable = (V1beta1Variable) o; + return Objects.equals(this.expression, v1beta1Variable.expression) && + Objects.equals(this.name, v1beta1Variable.name); + } + + @Override + public int hashCode() { + return Objects.hash(expression, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta1Variable {\n"); + sb.append(" expression: ").append(toIndentedString(expression)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfiguration.java new file mode 100644 index 0000000000..98c17cc544 --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ExemptPriorityLevelConfiguration.java @@ -0,0 +1,127 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * 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`. + */ +@ApiModel(description = "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`.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta2ExemptPriorityLevelConfiguration { + public static final String SERIALIZED_NAME_LENDABLE_PERCENT = "lendablePercent"; + @SerializedName(SERIALIZED_NAME_LENDABLE_PERCENT) + private Integer lendablePercent; + + public static final String SERIALIZED_NAME_NOMINAL_CONCURRENCY_SHARES = "nominalConcurrencyShares"; + @SerializedName(SERIALIZED_NAME_NOMINAL_CONCURRENCY_SHARES) + private Integer nominalConcurrencyShares; + + + public V1beta2ExemptPriorityLevelConfiguration lendablePercent(Integer lendablePercent) { + + this.lendablePercent = lendablePercent; + return this; + } + + /** + * `lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + * @return lendablePercent + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "`lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )") + + public Integer getLendablePercent() { + return lendablePercent; + } + + + public void setLendablePercent(Integer lendablePercent) { + this.lendablePercent = lendablePercent; + } + + + public V1beta2ExemptPriorityLevelConfiguration nominalConcurrencyShares(Integer nominalConcurrencyShares) { + + this.nominalConcurrencyShares = nominalConcurrencyShares; + return this; + } + + /** + * `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero. + * @return nominalConcurrencyShares + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero.") + + public Integer getNominalConcurrencyShares() { + return nominalConcurrencyShares; + } + + + public void setNominalConcurrencyShares(Integer nominalConcurrencyShares) { + this.nominalConcurrencyShares = nominalConcurrencyShares; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta2ExemptPriorityLevelConfiguration v1beta2ExemptPriorityLevelConfiguration = (V1beta2ExemptPriorityLevelConfiguration) o; + return Objects.equals(this.lendablePercent, v1beta2ExemptPriorityLevelConfiguration.lendablePercent) && + Objects.equals(this.nominalConcurrencyShares, v1beta2ExemptPriorityLevelConfiguration.nominalConcurrencyShares); + } + + @Override + public int hashCode() { + return Objects.hash(lendablePercent, nominalConcurrencyShares); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta2ExemptPriorityLevelConfiguration {\n"); + sb.append(" lendablePercent: ").append(toIndentedString(lendablePercent)).append("\n"); + sb.append(" nominalConcurrencyShares: ").append(toIndentedString(nominalConcurrencyShares)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethod.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethod.java index b2f43f2518..5779d74c24 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethod.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowDistinguisherMethod.java @@ -27,7 +27,7 @@ * FlowDistinguisherMethod specifies the method of a flow distinguisher. */ @ApiModel(description = "FlowDistinguisherMethod specifies the method of a flow distinguisher.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2FlowDistinguisherMethod { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchema.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchema.java index 69f013da1c..ef4c3a1c41 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchema.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchema.java @@ -30,7 +30,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\". */ @ApiModel(description = "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\".") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2FlowSchema implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaCondition.java index ae0965658d..ebfe0544c2 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaCondition.java @@ -28,7 +28,7 @@ * FlowSchemaCondition describes conditions for a FlowSchema. */ @ApiModel(description = "FlowSchemaCondition describes conditions for a FlowSchema.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2FlowSchemaCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaList.java index a90831900f..b0240d8503 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaList.java @@ -31,7 +31,7 @@ * FlowSchemaList is a list of FlowSchema objects. */ @ApiModel(description = "FlowSchemaList is a list of FlowSchema objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2FlowSchemaList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpec.java index 02dfae77f6..70404e63cd 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaSpec.java @@ -32,7 +32,7 @@ * FlowSchemaSpec describes how the FlowSchema's specification looks like. */ @ApiModel(description = "FlowSchemaSpec describes how the FlowSchema's specification looks like.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2FlowSchemaSpec { public static final String SERIALIZED_NAME_DISTINGUISHER_METHOD = "distinguisherMethod"; @SerializedName(SERIALIZED_NAME_DISTINGUISHER_METHOD) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatus.java index bd8d24128e..da497f6ea3 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2FlowSchemaStatus.java @@ -30,7 +30,7 @@ * FlowSchemaStatus represents the current state of a FlowSchema. */ @ApiModel(description = "FlowSchemaStatus represents the current state of a FlowSchema.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2FlowSchemaStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubject.java index 492536128a..b135ed46bc 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2GroupSubject.java @@ -27,7 +27,7 @@ * GroupSubject holds detailed information for group-kind subject. */ @ApiModel(description = "GroupSubject holds detailed information for group-kind subject.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2GroupSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponse.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponse.java index 1942b3f805..1bfebee556 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponse.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitResponse.java @@ -28,7 +28,7 @@ * LimitResponse defines how to handle requests that can not be executed right now. */ @ApiModel(description = "LimitResponse defines how to handle requests that can not be executed right now.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2LimitResponse { public static final String SERIALIZED_NAME_QUEUING = "queuing"; @SerializedName(SERIALIZED_NAME_QUEUING) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfiguration.java index df5a058ece..b3ba083c44 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2LimitedPriorityLevelConfiguration.java @@ -28,7 +28,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? */ @ApiModel(description = "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?") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2LimitedPriorityLevelConfiguration { public static final String SERIALIZED_NAME_ASSURED_CONCURRENCY_SHARES = "assuredConcurrencyShares"; @SerializedName(SERIALIZED_NAME_ASSURED_CONCURRENCY_SHARES) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRule.java index 866af01767..2788db752b 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2NonResourcePolicyRule.java @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2NonResourcePolicyRule { public static final String SERIALIZED_NAME_NON_RESOURCE_U_R_LS = "nonResourceURLs"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_U_R_LS) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjects.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjects.java index 23ec2bb03d..cf3ccfbb0c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjects.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PolicyRulesWithSubjects.java @@ -32,7 +32,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2PolicyRulesWithSubjects { public static final String SERIALIZED_NAME_NON_RESOURCE_RULES = "nonResourceRules"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_RULES) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfiguration.java index fc8cf91b09..4965c007ef 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfiguration.java @@ -30,7 +30,7 @@ * PriorityLevelConfiguration represents the configuration of a priority level. */ @ApiModel(description = "PriorityLevelConfiguration represents the configuration of a priority level.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2PriorityLevelConfiguration implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationCondition.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationCondition.java index ead2b19a23..aaab344768 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationCondition.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationCondition.java @@ -28,7 +28,7 @@ * PriorityLevelConfigurationCondition defines the condition of priority level. */ @ApiModel(description = "PriorityLevelConfigurationCondition defines the condition of priority level.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2PriorityLevelConfigurationCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationList.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationList.java index f5ced4b20b..13c2f0205f 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationList.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationList.java @@ -31,7 +31,7 @@ * PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. */ @ApiModel(description = "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2PriorityLevelConfigurationList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReference.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReference.java index 48bb506bbf..0d8b7bf6e9 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReference.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationReference.java @@ -27,7 +27,7 @@ * PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. */ @ApiModel(description = "PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2PriorityLevelConfigurationReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpec.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpec.java index 684c419a7e..b407e4b327 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpec.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationSpec.java @@ -19,6 +19,7 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import io.kubernetes.client.openapi.models.V1beta2ExemptPriorityLevelConfiguration; import io.kubernetes.client.openapi.models.V1beta2LimitedPriorityLevelConfiguration; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -28,8 +29,12 @@ * PriorityLevelConfigurationSpec specifies the configuration of a priority level. */ @ApiModel(description = "PriorityLevelConfigurationSpec specifies the configuration of a priority level.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2PriorityLevelConfigurationSpec { + public static final String SERIALIZED_NAME_EXEMPT = "exempt"; + @SerializedName(SERIALIZED_NAME_EXEMPT) + private V1beta2ExemptPriorityLevelConfiguration exempt; + public static final String SERIALIZED_NAME_LIMITED = "limited"; @SerializedName(SERIALIZED_NAME_LIMITED) private V1beta2LimitedPriorityLevelConfiguration limited; @@ -39,6 +44,29 @@ public class V1beta2PriorityLevelConfigurationSpec { private String type; + public V1beta2PriorityLevelConfigurationSpec exempt(V1beta2ExemptPriorityLevelConfiguration exempt) { + + this.exempt = exempt; + return this; + } + + /** + * Get exempt + * @return exempt + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta2ExemptPriorityLevelConfiguration getExempt() { + return exempt; + } + + + public void setExempt(V1beta2ExemptPriorityLevelConfiguration exempt) { + this.exempt = exempt; + } + + public V1beta2PriorityLevelConfigurationSpec limited(V1beta2LimitedPriorityLevelConfiguration limited) { this.limited = limited; @@ -93,13 +121,14 @@ public boolean equals(java.lang.Object o) { return false; } V1beta2PriorityLevelConfigurationSpec v1beta2PriorityLevelConfigurationSpec = (V1beta2PriorityLevelConfigurationSpec) o; - return Objects.equals(this.limited, v1beta2PriorityLevelConfigurationSpec.limited) && + return Objects.equals(this.exempt, v1beta2PriorityLevelConfigurationSpec.exempt) && + Objects.equals(this.limited, v1beta2PriorityLevelConfigurationSpec.limited) && Objects.equals(this.type, v1beta2PriorityLevelConfigurationSpec.type); } @Override public int hashCode() { - return Objects.hash(limited, type); + return Objects.hash(exempt, limited, type); } @@ -107,6 +136,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1beta2PriorityLevelConfigurationSpec {\n"); + sb.append(" exempt: ").append(toIndentedString(exempt)).append("\n"); sb.append(" limited: ").append(toIndentedString(limited)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatus.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatus.java index 7933da69d7..8368454a98 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatus.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2PriorityLevelConfigurationStatus.java @@ -30,7 +30,7 @@ * PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". */ @ApiModel(description = "PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2PriorityLevelConfigurationStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfiguration.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfiguration.java index b67a71dee0..ae016cd74a 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfiguration.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2QueuingConfiguration.java @@ -27,7 +27,7 @@ * QueuingConfiguration holds the configuration parameters for queuing */ @ApiModel(description = "QueuingConfiguration holds the configuration parameters for queuing") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2QueuingConfiguration { public static final String SERIALIZED_NAME_HAND_SIZE = "handSize"; @SerializedName(SERIALIZED_NAME_HAND_SIZE) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRule.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRule.java index eab3da362a..106e1a707e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRule.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ResourcePolicyRule.java @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2ResourcePolicyRule { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubject.java index 88f57e30d1..f2f1d28cf7 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2ServiceAccountSubject.java @@ -27,7 +27,7 @@ * ServiceAccountSubject holds detailed information for service-account-kind subject. */ @ApiModel(description = "ServiceAccountSubject holds detailed information for service-account-kind subject.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2ServiceAccountSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2Subject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2Subject.java index b3d4ba5310..76b714b070 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2Subject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2Subject.java @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2Subject { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) diff --git a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubject.java b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubject.java index 7bff2345a7..1a7180056c 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubject.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta2UserSubject.java @@ -27,7 +27,7 @@ * UserSubject holds detailed information for user-kind subject. */ @ApiModel(description = "UserSubject holds detailed information for user-kind subject.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta2UserSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 new file mode 100644 index 0000000000..671a16f43e --- /dev/null +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1beta3ExemptPriorityLevelConfiguration.java @@ -0,0 +1,127 @@ +/* +Copyright 2023 The Kubernetes Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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.models; + +import 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.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * 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`. + */ +@ApiModel(description = "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`.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") +public class V1beta3ExemptPriorityLevelConfiguration { + public static final String SERIALIZED_NAME_LENDABLE_PERCENT = "lendablePercent"; + @SerializedName(SERIALIZED_NAME_LENDABLE_PERCENT) + private Integer lendablePercent; + + public static final String SERIALIZED_NAME_NOMINAL_CONCURRENCY_SHARES = "nominalConcurrencyShares"; + @SerializedName(SERIALIZED_NAME_NOMINAL_CONCURRENCY_SHARES) + private Integer nominalConcurrencyShares; + + + public V1beta3ExemptPriorityLevelConfiguration lendablePercent(Integer lendablePercent) { + + this.lendablePercent = lendablePercent; + return this; + } + + /** + * `lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + * @return lendablePercent + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "`lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )") + + public Integer getLendablePercent() { + return lendablePercent; + } + + + public void setLendablePercent(Integer lendablePercent) { + this.lendablePercent = lendablePercent; + } + + + public V1beta3ExemptPriorityLevelConfiguration nominalConcurrencyShares(Integer nominalConcurrencyShares) { + + this.nominalConcurrencyShares = nominalConcurrencyShares; + return this; + } + + /** + * `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero. + * @return nominalConcurrencyShares + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero.") + + public Integer getNominalConcurrencyShares() { + return nominalConcurrencyShares; + } + + + public void setNominalConcurrencyShares(Integer nominalConcurrencyShares) { + this.nominalConcurrencyShares = nominalConcurrencyShares; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1beta3ExemptPriorityLevelConfiguration v1beta3ExemptPriorityLevelConfiguration = (V1beta3ExemptPriorityLevelConfiguration) o; + return Objects.equals(this.lendablePercent, v1beta3ExemptPriorityLevelConfiguration.lendablePercent) && + Objects.equals(this.nominalConcurrencyShares, v1beta3ExemptPriorityLevelConfiguration.nominalConcurrencyShares); + } + + @Override + public int hashCode() { + return Objects.hash(lendablePercent, nominalConcurrencyShares); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1beta3ExemptPriorityLevelConfiguration {\n"); + sb.append(" lendablePercent: ").append(toIndentedString(lendablePercent)).append("\n"); + sb.append(" nominalConcurrencyShares: ").append(toIndentedString(nominalConcurrencyShares)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} 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 36fd45e782..a2d8f8dfe7 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 @@ -27,7 +27,7 @@ * FlowDistinguisherMethod specifies the method of a flow distinguisher. */ @ApiModel(description = "FlowDistinguisherMethod specifies the method of a flow distinguisher.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3FlowDistinguisherMethod { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) 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 9b0b71f698..5166f9cf1d 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 @@ -30,7 +30,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\". */ @ApiModel(description = "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\".") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3FlowSchema implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 ea12f4a900..68312be96d 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 @@ -28,7 +28,7 @@ * FlowSchemaCondition describes conditions for a FlowSchema. */ @ApiModel(description = "FlowSchemaCondition describes conditions for a FlowSchema.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3FlowSchemaCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 b3a2d80ebb..65de65e287 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 @@ -31,7 +31,7 @@ * FlowSchemaList is a list of FlowSchema objects. */ @ApiModel(description = "FlowSchemaList is a list of FlowSchema objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3FlowSchemaList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 9d0defd10e..cf45f33dfe 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 @@ -32,7 +32,7 @@ * FlowSchemaSpec describes how the FlowSchema's specification looks like. */ @ApiModel(description = "FlowSchemaSpec describes how the FlowSchema's specification looks like.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3FlowSchemaSpec { public static final String SERIALIZED_NAME_DISTINGUISHER_METHOD = "distinguisherMethod"; @SerializedName(SERIALIZED_NAME_DISTINGUISHER_METHOD) 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 49ec50e843..ca56d2ea60 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 @@ -30,7 +30,7 @@ * FlowSchemaStatus represents the current state of a FlowSchema. */ @ApiModel(description = "FlowSchemaStatus represents the current state of a FlowSchema.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3FlowSchemaStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) 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 9be5c9943c..4f2bc34d01 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 @@ -27,7 +27,7 @@ * GroupSubject holds detailed information for group-kind subject. */ @ApiModel(description = "GroupSubject holds detailed information for group-kind subject.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3GroupSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 aa7564464b..761265609c 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 @@ -28,7 +28,7 @@ * LimitResponse defines how to handle requests that can not be executed right now. */ @ApiModel(description = "LimitResponse defines how to handle requests that can not be executed right now.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3LimitResponse { public static final String SERIALIZED_NAME_QUEUING = "queuing"; @SerializedName(SERIALIZED_NAME_QUEUING) 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 d252e40902..edaedd9399 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 @@ -28,7 +28,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? */ @ApiModel(description = "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?") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3LimitedPriorityLevelConfiguration { public static final String SERIALIZED_NAME_BORROWING_LIMIT_PERCENT = "borrowingLimitPercent"; @SerializedName(SERIALIZED_NAME_BORROWING_LIMIT_PERCENT) @@ -123,11 +123,11 @@ public V1beta3LimitedPriorityLevelConfiguration nominalConcurrencyShares(Integer } /** - * `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[limited priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other Limited priority level. This field has a default value of 30. + * `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of 30. * @return nominalConcurrencyShares **/ @javax.annotation.Nullable - @ApiModelProperty(value = "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[limited priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other Limited priority level. This field has a default value of 30.") + @ApiModelProperty(value = "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values: NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of 30.") public Integer getNominalConcurrencyShares() { return nominalConcurrencyShares; 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 44480c81ad..ddcd348bb6 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3NonResourcePolicyRule { public static final String SERIALIZED_NAME_NON_RESOURCE_U_R_LS = "nonResourceURLs"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_U_R_LS) 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 e3a7b0edbe..9edfaf7093 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 @@ -32,7 +32,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3PolicyRulesWithSubjects { public static final String SERIALIZED_NAME_NON_RESOURCE_RULES = "nonResourceRules"; @SerializedName(SERIALIZED_NAME_NON_RESOURCE_RULES) 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 04565d2c90..ddb3c59b8f 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 @@ -30,7 +30,7 @@ * PriorityLevelConfiguration represents the configuration of a priority level. */ @ApiModel(description = "PriorityLevelConfiguration represents the configuration of a priority level.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3PriorityLevelConfiguration implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 373b8069c0..ab98d926fc 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 @@ -28,7 +28,7 @@ * PriorityLevelConfigurationCondition defines the condition of priority level. */ @ApiModel(description = "PriorityLevelConfigurationCondition defines the condition of priority level.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3PriorityLevelConfigurationCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 d991f8471d..0d2192a07c 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 @@ -31,7 +31,7 @@ * PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. */ @ApiModel(description = "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3PriorityLevelConfigurationList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 d8ef363de5..5efe7ead95 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 @@ -27,7 +27,7 @@ * PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. */ @ApiModel(description = "PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3PriorityLevelConfigurationReference { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 30d248457f..ec0b3d46bf 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 @@ -19,6 +19,7 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import io.kubernetes.client.openapi.models.V1beta3ExemptPriorityLevelConfiguration; import io.kubernetes.client.openapi.models.V1beta3LimitedPriorityLevelConfiguration; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -28,8 +29,12 @@ * PriorityLevelConfigurationSpec specifies the configuration of a priority level. */ @ApiModel(description = "PriorityLevelConfigurationSpec specifies the configuration of a priority level.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3PriorityLevelConfigurationSpec { + public static final String SERIALIZED_NAME_EXEMPT = "exempt"; + @SerializedName(SERIALIZED_NAME_EXEMPT) + private V1beta3ExemptPriorityLevelConfiguration exempt; + public static final String SERIALIZED_NAME_LIMITED = "limited"; @SerializedName(SERIALIZED_NAME_LIMITED) private V1beta3LimitedPriorityLevelConfiguration limited; @@ -39,6 +44,29 @@ public class V1beta3PriorityLevelConfigurationSpec { private String type; + public V1beta3PriorityLevelConfigurationSpec exempt(V1beta3ExemptPriorityLevelConfiguration exempt) { + + this.exempt = exempt; + return this; + } + + /** + * Get exempt + * @return exempt + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1beta3ExemptPriorityLevelConfiguration getExempt() { + return exempt; + } + + + public void setExempt(V1beta3ExemptPriorityLevelConfiguration exempt) { + this.exempt = exempt; + } + + public V1beta3PriorityLevelConfigurationSpec limited(V1beta3LimitedPriorityLevelConfiguration limited) { this.limited = limited; @@ -93,13 +121,14 @@ public boolean equals(java.lang.Object o) { return false; } V1beta3PriorityLevelConfigurationSpec v1beta3PriorityLevelConfigurationSpec = (V1beta3PriorityLevelConfigurationSpec) o; - return Objects.equals(this.limited, v1beta3PriorityLevelConfigurationSpec.limited) && + return Objects.equals(this.exempt, v1beta3PriorityLevelConfigurationSpec.exempt) && + Objects.equals(this.limited, v1beta3PriorityLevelConfigurationSpec.limited) && Objects.equals(this.type, v1beta3PriorityLevelConfigurationSpec.type); } @Override public int hashCode() { - return Objects.hash(limited, type); + return Objects.hash(exempt, limited, type); } @@ -107,6 +136,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1beta3PriorityLevelConfigurationSpec {\n"); + sb.append(" exempt: ").append(toIndentedString(exempt)).append("\n"); sb.append(" limited: ").append(toIndentedString(limited)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); 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 fd867c7fb4..179f4aa771 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 @@ -30,7 +30,7 @@ * PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". */ @ApiModel(description = "PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3PriorityLevelConfigurationStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) 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 2ac419ac05..6834ef7615 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 @@ -27,7 +27,7 @@ * QueuingConfiguration holds the configuration parameters for queuing */ @ApiModel(description = "QueuingConfiguration holds the configuration parameters for queuing") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3QueuingConfiguration { public static final String SERIALIZED_NAME_HAND_SIZE = "handSize"; @SerializedName(SERIALIZED_NAME_HAND_SIZE) 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 c4eced6720..62e34383c1 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 @@ -29,7 +29,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3ResourcePolicyRule { public static final String SERIALIZED_NAME_API_GROUPS = "apiGroups"; @SerializedName(SERIALIZED_NAME_API_GROUPS) 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 b79954eb79..0994bdb850 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 @@ -27,7 +27,7 @@ * ServiceAccountSubject holds detailed information for service-account-kind subject. */ @ApiModel(description = "ServiceAccountSubject holds detailed information for service-account-kind subject.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3ServiceAccountSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 98f0ac585f..f30bc17af6 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 @@ -30,7 +30,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3Subject { public static final String SERIALIZED_NAME_GROUP = "group"; @SerializedName(SERIALIZED_NAME_GROUP) 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 8d04426dbc..a4b5e5fa24 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 @@ -27,7 +27,7 @@ * UserSubject holds detailed information for user-kind subject. */ @ApiModel(description = "UserSubject holds detailed information for user-kind subject.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V1beta3UserSubject { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 804bc7d294..6e4a79573a 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 @@ -28,7 +28,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2ContainerResourceMetricSource { public static final String SERIALIZED_NAME_CONTAINER = "container"; @SerializedName(SERIALIZED_NAME_CONTAINER) 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 5c3a162eaa..807a7c8dc4 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 @@ -28,7 +28,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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2ContainerResourceMetricStatus { public static final String SERIALIZED_NAME_CONTAINER = "container"; @SerializedName(SERIALIZED_NAME_CONTAINER) 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 5bf4791cfa..ffe2d77c5c 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 @@ -27,7 +27,7 @@ * CrossVersionObjectReference contains enough information to let you identify the referred resource. */ @ApiModel(description = "CrossVersionObjectReference contains enough information to let you identify the referred resource.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2CrossVersionObjectReference { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 2d5eff5567..e76eebb587 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 @@ -29,7 +29,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). */ @ApiModel(description = "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).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2ExternalMetricSource { public static final String SERIALIZED_NAME_METRIC = "metric"; @SerializedName(SERIALIZED_NAME_METRIC) 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 df6ccf283f..bc3be20e18 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 @@ -29,7 +29,7 @@ * ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. */ @ApiModel(description = "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2ExternalMetricStatus { public static final String SERIALIZED_NAME_CURRENT = "current"; @SerializedName(SERIALIZED_NAME_CURRENT) 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 2edd068cc5..8b865ae6df 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 @@ -27,7 +27,7 @@ * HPAScalingPolicy is a single policy which must hold true for a specified past interval. */ @ApiModel(description = "HPAScalingPolicy is a single policy which must hold true for a specified past interval.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2HPAScalingPolicy { public static final String SERIALIZED_NAME_PERIOD_SECONDS = "periodSeconds"; @SerializedName(SERIALIZED_NAME_PERIOD_SECONDS) 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 2ba68d79eb..283de894d2 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 @@ -30,7 +30,7 @@ * 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. */ @ApiModel(description = "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.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2HPAScalingRules { public static final String SERIALIZED_NAME_POLICIES = "policies"; @SerializedName(SERIALIZED_NAME_POLICIES) 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 cd7646b1a5..4da1e02b51 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 @@ -30,7 +30,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. */ @ApiModel(description = "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2HorizontalPodAutoscaler implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 c03324f7fa..f4b5b63c22 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 @@ -28,7 +28,7 @@ * HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). */ @ApiModel(description = "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2HorizontalPodAutoscalerBehavior { public static final String SERIALIZED_NAME_SCALE_DOWN = "scaleDown"; @SerializedName(SERIALIZED_NAME_SCALE_DOWN) 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 12e9ee0a60..9376e368cb 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 @@ -28,7 +28,7 @@ * HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. */ @ApiModel(description = "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2HorizontalPodAutoscalerCondition { public static final String SERIALIZED_NAME_LAST_TRANSITION_TIME = "lastTransitionTime"; @SerializedName(SERIALIZED_NAME_LAST_TRANSITION_TIME) 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 323b3613be..6195235905 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 @@ -31,7 +31,7 @@ * HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. */ @ApiModel(description = "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2HorizontalPodAutoscalerList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) 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 1ea5e24904..ee67664ed3 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 @@ -32,7 +32,7 @@ * HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. */ @ApiModel(description = "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2HorizontalPodAutoscalerSpec { public static final String SERIALIZED_NAME_BEHAVIOR = "behavior"; @SerializedName(SERIALIZED_NAME_BEHAVIOR) 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 d582ab45e2..351c83e01a 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 @@ -32,7 +32,7 @@ * HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. */ @ApiModel(description = "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2HorizontalPodAutoscalerStatus { public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; @SerializedName(SERIALIZED_NAME_CONDITIONS) 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 30b9752de2..84c8db2565 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 @@ -28,7 +28,7 @@ * MetricIdentifier defines the name and optionally selector for a metric */ @ApiModel(description = "MetricIdentifier defines the name and optionally selector for a metric") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2MetricIdentifier { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 754a63b7f7..860b1c433e 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 @@ -32,7 +32,7 @@ * MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). */ @ApiModel(description = "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2MetricSpec { public static final String SERIALIZED_NAME_CONTAINER_RESOURCE = "containerResource"; @SerializedName(SERIALIZED_NAME_CONTAINER_RESOURCE) 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 c4d42212ae..d10d25a97e 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 @@ -32,7 +32,7 @@ * MetricStatus describes the last-read state of a single metric. */ @ApiModel(description = "MetricStatus describes the last-read state of a single metric.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2MetricStatus { public static final String SERIALIZED_NAME_CONTAINER_RESOURCE = "containerResource"; @SerializedName(SERIALIZED_NAME_CONTAINER_RESOURCE) 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 476507132f..1fbf604385 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 @@ -28,7 +28,7 @@ * MetricTarget defines the target value, average value, or average utilization of a specific metric */ @ApiModel(description = "MetricTarget defines the target value, average value, or average utilization of a specific metric") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2MetricTarget { public static final String SERIALIZED_NAME_AVERAGE_UTILIZATION = "averageUtilization"; @SerializedName(SERIALIZED_NAME_AVERAGE_UTILIZATION) 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 a43de0a598..903a4921a8 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 @@ -28,7 +28,7 @@ * MetricValueStatus holds the current value for a metric */ @ApiModel(description = "MetricValueStatus holds the current value for a metric") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2MetricValueStatus { public static final String SERIALIZED_NAME_AVERAGE_UTILIZATION = "averageUtilization"; @SerializedName(SERIALIZED_NAME_AVERAGE_UTILIZATION) 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 2a8b70c0da..384bddef9c 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 @@ -30,7 +30,7 @@ * ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). */ @ApiModel(description = "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2ObjectMetricSource { public static final String SERIALIZED_NAME_DESCRIBED_OBJECT = "describedObject"; @SerializedName(SERIALIZED_NAME_DESCRIBED_OBJECT) 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 76cd02a285..b0bf3b6476 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 @@ -30,7 +30,7 @@ * ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). */ @ApiModel(description = "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2ObjectMetricStatus { public static final String SERIALIZED_NAME_CURRENT = "current"; @SerializedName(SERIALIZED_NAME_CURRENT) 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 06fe3b7ff9..914d1c5f45 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 @@ -29,7 +29,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. */ @ApiModel(description = "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2PodsMetricSource { public static final String SERIALIZED_NAME_METRIC = "metric"; @SerializedName(SERIALIZED_NAME_METRIC) 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 462b5ef14a..bf3f975f45 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 @@ -29,7 +29,7 @@ * PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). */ @ApiModel(description = "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2PodsMetricStatus { public static final String SERIALIZED_NAME_CURRENT = "current"; @SerializedName(SERIALIZED_NAME_CURRENT) 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 3b54710265..d8ec14f450 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 @@ -28,7 +28,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. */ @ApiModel(description = "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2ResourceMetricSource { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) 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 6e205f6f0f..c570415429 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 @@ -28,7 +28,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. */ @ApiModel(description = "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class V2ResourceMetricStatus { public static final String SERIALIZED_NAME_CURRENT = "current"; @SerializedName(SERIALIZED_NAME_CURRENT) 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 8fe47187b0..7ecabcf6e5 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 @@ -27,7 +27,7 @@ * Info contains versioning information. how we'll want to distribute that information. */ @ApiModel(description = "Info contains versioning information. how we'll want to distribute that information.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-18T15:05:57.863601Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-01T19:05:21.333462Z[Etc/UTC]") public class VersionInfo { public static final String SERIALIZED_NAME_BUILD_DATE = "buildDate"; @SerializedName(SERIALIZED_NAME_BUILD_DATE) diff --git a/kubernetes/swagger.json b/kubernetes/swagger.json index 178cf3881a..353afdb16e 100644 --- a/kubernetes/swagger.json +++ b/kubernetes/swagger.json @@ -37,7 +37,7 @@ "type": "string" }, "matchConditions": { - "description": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "description": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", "items": { "$ref": "#/definitions/v1.MatchCondition" }, @@ -257,7 +257,7 @@ "type": "string" }, "matchConditions": { - "description": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate.", + "description": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped\n\nThis is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.", "items": { "$ref": "#/definitions/v1.MatchCondition" }, @@ -559,15 +559,23 @@ "x-kubernetes-map-type": "atomic" }, "v1alpha1.ParamRef": { - "description": "ParamRef references a parameter resource", + "description": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", "properties": { "name": { - "description": "Name of the resource being referenced.", + "description": "`name` is the name of the resource being referenced.\n\n`name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", "type": "string" }, "namespace": { - "description": "Namespace of the referenced resource. Should be empty for the cluster-scoped resources", + "description": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", "type": "string" + }, + "parameterNotFoundAction": { + "description": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny` Default to `Deny`", + "type": "string" + }, + "selector": { + "$ref": "#/definitions/v1.LabelSelector", + "description": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset." } }, "type": "object", @@ -624,7 +632,7 @@ ] }, "v1alpha1.ValidatingAdmissionPolicyBinding": { - "description": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.", + "description": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.\n\nFor 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.\n\nThe 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.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -699,7 +707,7 @@ }, "paramRef": { "$ref": "#/definitions/v1alpha1.ParamRef", - "description": "ParamRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied." + "description": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param." }, "policyName": { "description": "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", @@ -794,6 +802,19 @@ }, "type": "array", "x-kubernetes-list-type": "atomic" + }, + "variables": { + "description": "Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.", + "items": { + "$ref": "#/definitions/v1alpha1.Variable" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" } }, "type": "object" @@ -828,7 +849,7 @@ "description": "Validation specifies the CEL expression which is used to apply the validation.", "properties": { "expression": { - "description": "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.", + "description": "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.", "type": "string" }, "message": { @@ -849,6 +870,510 @@ ], "type": "object" }, + "v1alpha1.Variable": { + "description": "Variable is the definition of a variable that is used for composition.", + "properties": { + "expression": { + "description": "Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.", + "type": "string" + }, + "name": { + "description": "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`", + "type": "string" + } + }, + "required": [ + "name", + "expression" + ], + "type": "object" + }, + "v1beta1.AuditAnnotation": { + "description": "AuditAnnotation describes how to produce an audit annotation for an API request.", + "properties": { + "key": { + "description": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.", + "type": "string" + }, + "valueExpression": { + "description": "valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.\n\nRequired.", + "type": "string" + } + }, + "required": [ + "key", + "valueExpression" + ], + "type": "object" + }, + "v1beta1.ExpressionWarning": { + "description": "ExpressionWarning is a warning information that targets a specific expression.", + "properties": { + "fieldRef": { + "description": "The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"", + "type": "string" + }, + "warning": { + "description": "The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.", + "type": "string" + } + }, + "required": [ + "fieldRef", + "warning" + ], + "type": "object" + }, + "v1beta1.MatchCondition": { + "description": "MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.", + "properties": { + "expression": { + "description": "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\nRequired.", + "type": "string" + }, + "name": { + "description": "Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\nRequired.", + "type": "string" + } + }, + "required": [ + "name", + "expression" + ], + "type": "object" + }, + "v1beta1.MatchResources": { + "description": "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)", + "properties": { + "excludeResourceRules": { + "description": "ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", + "items": { + "$ref": "#/definitions/v1beta1.NamedRuleWithOperations" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "matchPolicy": { + "description": "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.\n\nDefaults to \"Equivalent\"", + "type": "string" + }, + "namespaceSelector": { + "$ref": "#/definitions/v1.LabelSelector", + "description": "NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything." + }, + "objectSelector": { + "$ref": "#/definitions/v1.LabelSelector", + "description": "ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything." + }, + "resourceRules": { + "description": "ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.", + "items": { + "$ref": "#/definitions/v1beta1.NamedRuleWithOperations" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "v1beta1.NamedRuleWithOperations": { + "description": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", + "properties": { + "apiGroups": { + "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "apiVersions": { + "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "operations": { + "description": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "resources": { + "description": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "scope": { + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" + } + }, + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "v1beta1.ParamKind": { + "description": "ParamKind is a tuple of Group Kind and Version.", + "properties": { + "apiVersion": { + "description": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", + "type": "string" + }, + "kind": { + "description": "Kind is the API kind the resources belong to. Required.", + "type": "string" + } + }, + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "v1beta1.ParamRef": { + "description": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", + "properties": { + "name": { + "description": "name is the name of the resource being referenced.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.\n\nA single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.", + "type": "string" + }, + "namespace": { + "description": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", + "type": "string" + }, + "parameterNotFoundAction": { + "description": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny`\n\nRequired", + "type": "string" + }, + "selector": { + "$ref": "#/definitions/v1.LabelSelector", + "description": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset." + } + }, + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "v1beta1.TypeChecking": { + "description": "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy", + "properties": { + "expressionWarnings": { + "description": "The type checking warnings for each expression.", + "items": { + "$ref": "#/definitions/v1beta1.ExpressionWarning" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object" + }, + "v1beta1.ValidatingAdmissionPolicy": { + "description": "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata." + }, + "spec": { + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicySpec", + "description": "Specification of the desired behavior of the ValidatingAdmissionPolicy." + }, + "status": { + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyStatus", + "description": "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only." + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicy", + "version": "v1beta1" + } + ], + "x-implements": [ + "io.kubernetes.client.common.KubernetesObject" + ] + }, + "v1beta1.ValidatingAdmissionPolicyBinding": { + "description": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.\n\nFor 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.\n\nThe 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.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata." + }, + "spec": { + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBindingSpec", + "description": "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding." + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicyBinding", + "version": "v1beta1" + } + ], + "x-implements": [ + "io.kubernetes.client.common.KubernetesObject" + ] + }, + "v1beta1.ValidatingAdmissionPolicyBindingList": { + "description": "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of PolicyBinding.", + "items": { + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta", + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicyBindingList", + "version": "v1beta1" + } + ], + "x-implements": [ + "io.kubernetes.client.common.KubernetesListObject" + ] + }, + "v1beta1.ValidatingAdmissionPolicyBindingSpec": { + "description": "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.", + "properties": { + "matchResources": { + "$ref": "#/definitions/v1beta1.MatchResources", + "description": "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required." + }, + "paramRef": { + "$ref": "#/definitions/v1beta1.ParamRef", + "description": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param." + }, + "policyName": { + "description": "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", + "type": "string" + }, + "validationActions": { + "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "set" + } + }, + "type": "object" + }, + "v1beta1.ValidatingAdmissionPolicyList": { + "description": "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of ValidatingAdmissionPolicy.", + "items": { + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta", + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicyList", + "version": "v1beta1" + } + ], + "x-implements": [ + "io.kubernetes.client.common.KubernetesListObject" + ] + }, + "v1beta1.ValidatingAdmissionPolicySpec": { + "description": "ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.", + "properties": { + "auditAnnotations": { + "description": "auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.", + "items": { + "$ref": "#/definitions/v1beta1.AuditAnnotation" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "failurePolicy": { + "description": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nWhen failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", + "type": "string" + }, + "matchConditions": { + "description": "MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", + "items": { + "$ref": "#/definitions/v1beta1.MatchCondition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "matchConstraints": { + "$ref": "#/definitions/v1beta1.MatchResources", + "description": "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required." + }, + "paramKind": { + "$ref": "#/definitions/v1beta1.ParamKind", + "description": "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null." + }, + "validations": { + "description": "Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.", + "items": { + "$ref": "#/definitions/v1beta1.Validation" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "variables": { + "description": "Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.", + "items": { + "$ref": "#/definitions/v1beta1.Variable" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + } + }, + "type": "object" + }, + "v1beta1.ValidatingAdmissionPolicyStatus": { + "description": "ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.", + "properties": { + "conditions": { + "description": "The conditions represent the latest available observations of a policy's current state.", + "items": { + "$ref": "#/definitions/v1.Condition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + }, + "observedGeneration": { + "description": "The generation observed by the controller.", + "format": "int64", + "type": "integer" + }, + "typeChecking": { + "$ref": "#/definitions/v1beta1.TypeChecking", + "description": "The results of type checking for each expression. Presence of this field indicates the completion of the type checking." + } + }, + "type": "object" + }, + "v1beta1.Validation": { + "description": "Validation specifies the CEL expression which is used to apply the validation.", + "properties": { + "expression": { + "description": "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.", + "type": "string" + }, + "message": { + "description": "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".", + "type": "string" + }, + "messageExpression": { + "description": "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"", + "type": "string" + }, + "reason": { + "description": "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.", + "type": "string" + } + }, + "required": [ + "expression" + ], + "type": "object" + }, + "v1beta1.Variable": { + "description": "Variable is the definition of a variable that is used for composition. A variable is defined as a named expression.", + "properties": { + "expression": { + "description": "Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.", + "type": "string" + }, + "name": { + "description": "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is \"foo\", the variable will be available as `variables.foo`", + "type": "string" + } + }, + "required": [ + "name", + "expression" + ], + "type": "object", + "x-kubernetes-map-type": "atomic" + }, "v1alpha1.ServerStorageVersion": { "description": "An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend.", "properties": { @@ -867,6 +1392,14 @@ "encodingVersion": { "description": "The API server encodes the object to this version when persisting it in the backend (e.g., etcd).", "type": "string" + }, + "servedVersions": { + "description": "The API server can serve these versions. DecodableVersions must include all ServedVersions.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "set" } }, "type": "object" @@ -2040,6 +2573,48 @@ }, "type": "object" }, + "v1.SelfSubjectReview": { + "description": "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.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "status": { + "$ref": "#/definitions/v1.SelfSubjectReviewStatus", + "description": "Status is filled in by the server with the user attributes." + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "authentication.k8s.io", + "kind": "SelfSubjectReview", + "version": "v1" + } + ], + "x-implements": [ + "io.kubernetes.client.common.KubernetesObject" + ] + }, + "v1.SelfSubjectReviewStatus": { + "description": "SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.", + "properties": { + "userInfo": { + "$ref": "#/definitions/v1.UserInfo", + "description": "User attributes of the user making this request." + } + }, + "type": "object" + }, "authentication.v1.TokenRequest": { "description": "TokenRequest requests a token for a given service account.", "properties": { @@ -3799,6 +4374,11 @@ "format": "int32", "type": "integer" }, + "backoffLimitPerIndex": { + "description": "Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).", + "format": "int32", + "type": "integer" + }, "completionMode": { "description": "completionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nMore completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job.", "type": "string" @@ -3812,6 +4392,11 @@ "description": "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", "type": "boolean" }, + "maxFailedIndexes": { + "description": "Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).", + "format": "int32", + "type": "integer" + }, "parallelism": { "description": "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", "format": "int32", @@ -3821,6 +4406,10 @@ "$ref": "#/definitions/v1.PodFailurePolicy", "description": "Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure.\n\nThis field is beta-level. It can be used when the `JobPodFailurePolicy` feature gate is enabled (enabled by default)." }, + "podReplacementPolicy": { + "description": "podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods\n when they are terminating (has a metadata.deletionTimestamp) or failed.\n- Failed means to wait until a previously created Pod is fully terminated (has phase\n Failed or Succeeded) before creating a replacement Pod.\n\nWhen using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an alpha field. Enable JobPodReplacementPolicy to be able to use this field.", + "type": "string" + }, "selector": { "$ref": "#/definitions/v1.LabelSelector", "description": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" @@ -3876,6 +4465,10 @@ "format": "int32", "type": "integer" }, + "failedIndexes": { + "description": "FailedIndexes holds the failed indexes when backoffLimitPerIndex=true. The indexes are represented in the text format analogous as for the `completedIndexes` field, ie. they are kept as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the failed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\". This field is alpha-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).", + "type": "string" + }, "ready": { "description": "The number of pods which have a Ready condition.\n\nThis field is beta-level. The job controller populates the field when the feature gate JobReadyPods is enabled (enabled by default).", "format": "int32", @@ -3891,6 +4484,11 @@ "format": "int32", "type": "integer" }, + "terminating": { + "description": "The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp).\n\nThis field is alpha-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (disabled by default).", + "format": "int32", + "type": "integer" + }, "uncountedTerminatedPods": { "$ref": "#/definitions/v1.UncountedTerminatedPods", "description": "uncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status:\n\n1. Add the pod UID to the arrays in this field. 2. Remove the pod finalizer. 3. Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nOld jobs might not be tracked using this field, in which case the field remains null." @@ -3978,7 +4576,7 @@ "description": "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.", "properties": { "action": { - "description": "Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:\n\n- FailJob: indicates that the pod's job is marked as Failed and all\n running pods are terminated.\n- Ignore: indicates that the counter towards the .backoffLimit is not\n incremented and a replacement pod is created.\n- Count: indicates that the pod is handled in the default way - the\n counter towards the .backoffLimit is incremented.\nAdditional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.", + "description": "Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:\n\n- FailJob: indicates that the pod's job is marked as Failed and all\n running pods are terminated.\n- FailIndex: indicates that the pod's index is marked as Failed and will\n not be restarted.\n This value is alpha-level. It can be used when the\n `JobBackoffLimitPerIndex` feature gate is enabled (disabled by default).\n- Ignore: indicates that the counter towards the .backoffLimit is not\n incremented and a replacement pod is created.\n- Count: indicates that the pod is handled in the default way - the\n counter towards the .backoffLimit is incremented.\nAdditional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.", "type": "string" }, "onExitCodes": { @@ -3995,8 +4593,7 @@ } }, "required": [ - "action", - "onPodConditions" + "action" ], "type": "object" }, @@ -4819,7 +5416,7 @@ "type": "string" }, "resourceClaimTemplateName": { - "description": "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod.\n\nThe template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be -, where is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long).\n\nAn existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed.\n\nThis field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.", + "description": "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod.\n\nThe template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses.\n\nThis field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.", "type": "string" } }, @@ -5219,6 +5816,10 @@ "$ref": "#/definitions/v1.ResourceRequirements", "description": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" }, + "restartPolicy": { + "description": "RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed.", + "type": "string" + }, "securityContext": { "$ref": "#/definitions/v1.SecurityContext", "description": "SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" @@ -5602,7 +6203,7 @@ "description": "EndpointPort is a tuple that describes a single port.", "properties": { "appProtocol": { - "description": "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:\n\n* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).\n\n* Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540\n\n* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.", + "description": "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:\n\n* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).\n\n* Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540\n * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455\n * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455\n\n* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.", "type": "string" }, "name": { @@ -5869,6 +6470,10 @@ "$ref": "#/definitions/v1.ResourceRequirements", "description": "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod." }, + "restartPolicy": { + "description": "Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers.", + "type": "string" + }, "securityContext": { "$ref": "#/definitions/v1.SecurityContext", "description": "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext." @@ -6402,6 +7007,16 @@ }, "type": "object" }, + "v1.HostIP": { + "description": "HostIP represents a single IP address allocated to the host.", + "properties": { + "ip": { + "description": "IP is the IP address assigned to the host", + "type": "string" + } + }, + "type": "object" + }, "v1.HostPathVolumeSource": { "description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", "properties": { @@ -7618,11 +8233,19 @@ }, "type": "array" }, + "allocatedResourceStatuses": { + "additionalProperties": { + "type": "string" + }, + "description": "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "type": "object", + "x-kubernetes-map-type": "granular" + }, "allocatedResources": { "additionalProperties": { "$ref": "#/definitions/resource.Quantity" }, - "description": "allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "description": "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", "type": "object" }, "capacity": { @@ -7644,10 +8267,6 @@ "phase": { "description": "phase represents the current phase of PersistentVolumeClaim.", "type": "string" - }, - "resizeStatus": { - "description": "resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", - "type": "string" } }, "type": "object" @@ -7863,6 +8482,11 @@ "v1.PersistentVolumeStatus": { "description": "PersistentVolumeStatus is the current status of a persistent volume.", "properties": { + "lastPhaseTransitionTime": { + "description": "lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature.", + "format": "date-time", + "type": "string" + }, "message": { "description": "message is a human-readable message indicating details about why the volume is in this state.", "type": "string" @@ -8076,10 +8700,10 @@ "type": "object" }, "v1.PodIP": { - "description": "IP address information for entries in the (plural) PodIPs field. Each entry includes:\n\n\tIP: An IP address allocated to the pod. Routable at least within the cluster.", + "description": "PodIP represents a single IP address allocated to the pod.", "properties": { "ip": { - "description": "ip is an IP address (IPv4 or IPv6) assigned to the pod", + "description": "IP is the IP address assigned to the pod", "type": "string" } }, @@ -8166,6 +8790,23 @@ ], "type": "object" }, + "v1.PodResourceClaimStatus": { + "description": "PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim.", + "properties": { + "name": { + "description": "Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL.", + "type": "string" + }, + "resourceClaimName": { + "description": "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. It this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, "v1.PodSchedulingGate": { "description": "PodSchedulingGate is associated to a Pod to guard its scheduling.", "properties": { @@ -8501,9 +9142,19 @@ "type": "array" }, "hostIP": { - "description": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", + "description": "hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod", "type": "string" }, + "hostIPs": { + "description": "hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod.", + "items": { + "$ref": "#/definitions/v1.HostIP" + }, + "type": "array", + "x-kubernetes-list-type": "atomic", + "x-kubernetes-patch-merge-key": "ip", + "x-kubernetes-patch-strategy": "merge" + }, "initContainerStatuses": { "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "items": { @@ -8524,7 +9175,7 @@ "type": "string" }, "podIP": { - "description": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", + "description": "podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", "type": "string" }, "podIPs": { @@ -8548,6 +9199,19 @@ "description": "Status of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\"", "type": "string" }, + "resourceClaimStatuses": { + "description": "Status of resource claims.", + "items": { + "$ref": "#/definitions/v1.PodResourceClaimStatus" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge,retainKeys" + }, "startTime": { "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", "format": "date-time", @@ -9423,7 +10087,7 @@ "description": "SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.", "properties": { "localhostProfile": { - "description": "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is \"Localhost\".", + "description": "localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is \"Localhost\". Must NOT be set for any other type.", "type": "string" }, "type": { @@ -9869,7 +10533,7 @@ "description": "ServicePort contains information on service's port.", "properties": { "appProtocol": { - "description": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + "description": "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:\n\n* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).\n\n* Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540\n * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455\n * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455\n\n* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.", "type": "string" }, "name": { @@ -9960,7 +10624,7 @@ "type": "string" }, "loadBalancerIP": { - "description": "Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations, and it cannot support dual-stack. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version.", + "description": "Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available.", "type": "string" }, "loadBalancerSourceRanges": { @@ -10586,7 +11250,7 @@ "type": "string" }, "hostProcess": { - "description": "HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.", + "description": "HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.", "type": "boolean" }, "runAsUserName": { @@ -10680,7 +11344,7 @@ "description": "EndpointPort represents a Port used by an EndpointSlice", "properties": { "appProtocol": { - "description": "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:\n\n* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).\n\n* Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540\n\n* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.", + "description": "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:\n\n* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).\n\n* Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540\n * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455\n * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455\n\n* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.", "type": "string" }, "name": { @@ -10952,6 +11616,22 @@ ], "type": "object" }, + "v1beta2.ExemptPriorityLevelConfiguration": { + "description": "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`.", + "properties": { + "lendablePercent": { + "description": "`lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.\n\nLendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )", + "format": "int32", + "type": "integer" + }, + "nominalConcurrencyShares": { + "description": "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values:\n\nNominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)\n\nBigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "v1beta2.FlowDistinguisherMethod": { "description": "FlowDistinguisherMethod specifies the method of a flow distinguisher.", "properties": { @@ -11352,6 +12032,10 @@ "v1beta2.PriorityLevelConfigurationSpec": { "description": "PriorityLevelConfigurationSpec specifies the configuration of a priority level.", "properties": { + "exempt": { + "$ref": "#/definitions/v1beta2.ExemptPriorityLevelConfiguration", + "description": "`exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `\"Limited\"`. This field MAY be non-empty if `type` is `\"Exempt\"`. If empty and `type` is `\"Exempt\"` then the default values for `ExemptPriorityLevelConfiguration` apply." + }, "limited": { "$ref": "#/definitions/v1beta2.LimitedPriorityLevelConfiguration", "description": "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`." @@ -11369,6 +12053,7 @@ { "discriminator": "type", "fields-to-discriminateBy": { + "exempt": "Exempt", "limited": "Limited" } } @@ -11525,6 +12210,22 @@ ], "type": "object" }, + "v1beta3.ExemptPriorityLevelConfiguration": { + "description": "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`.", + "properties": { + "lendablePercent": { + "description": "`lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.\n\nLendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )", + "format": "int32", + "type": "integer" + }, + "nominalConcurrencyShares": { + "description": "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values:\n\nNominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)\n\nBigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "v1beta3.FlowDistinguisherMethod": { "description": "FlowDistinguisherMethod specifies the method of a flow distinguisher.", "properties": { @@ -11744,7 +12445,7 @@ "description": "`limitResponse` indicates what to do with requests that can not be executed right now" }, "nominalConcurrencyShares": { - "description": "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values:\n\nNominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[limited priority level k] NCS(k)\n\nBigger numbers mean a larger nominal concurrency limit, at the expense of every other Limited priority level. This field has a default value of 30.", + "description": "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values:\n\nNominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)\n\nBigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of 30.", "format": "int32", "type": "integer" } @@ -11927,6 +12628,10 @@ "v1beta3.PriorityLevelConfigurationSpec": { "description": "PriorityLevelConfigurationSpec specifies the configuration of a priority level.", "properties": { + "exempt": { + "$ref": "#/definitions/v1beta3.ExemptPriorityLevelConfiguration", + "description": "`exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `\"Limited\"`. This field MAY be non-empty if `type` is `\"Exempt\"`. If empty and `type` is `\"Exempt\"` then the default values for `ExemptPriorityLevelConfiguration` apply." + }, "limited": { "$ref": "#/definitions/v1beta3.LimitedPriorityLevelConfiguration", "description": "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`." @@ -11944,6 +12649,7 @@ { "discriminator": "type", "fields-to-discriminateBy": { + "exempt": "Exempt", "limited": "Limited" } } @@ -12527,10 +13233,6 @@ "spec": { "$ref": "#/definitions/v1.NetworkPolicySpec", "description": "spec represents the specification of the desired behavior for this NetworkPolicy." - }, - "status": { - "$ref": "#/definitions/v1.NetworkPolicyStatus", - "description": "status represents the current state of the NetworkPolicy. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, "type": "object", @@ -12694,25 +13396,6 @@ ], "type": "object" }, - "v1.NetworkPolicyStatus": { - "description": "NetworkPolicyStatus describes the current state of the NetworkPolicy.", - "properties": { - "conditions": { - "description": "conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. Current service state", - "items": { - "$ref": "#/definitions/v1.Condition" - }, - "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - } - }, - "type": "object" - }, "v1.ServiceBackendPort": { "description": "ServiceBackendPort is the service port being referenced.", "properties": { @@ -13303,7 +13986,7 @@ }, "roleRef": { "$ref": "#/definitions/v1.RoleRef", - "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error." + "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." }, "subjects": { "description": "Subjects holds references to the objects the role applies to.", @@ -13500,7 +14183,7 @@ }, "roleRef": { "$ref": "#/definitions/v1.RoleRef", - "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error." + "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." }, "subjects": { "description": "Subjects holds references to the objects the role applies to.", @@ -15501,6 +16184,10 @@ "v1.ValidationRule": { "description": "ValidationRule describes a validation rule written in the CEL expression language.", "properties": { + "fieldPath": { + "description": "fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. Numeric index of array is not supported. For field name which contains special characters, use `['specialName']` to refer the field name. e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']`", + "type": "string" + }, "message": { "description": "Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\"", "type": "string" @@ -15509,6 +16196,10 @@ "description": "MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a rule, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the rule; the only difference is the return type. Example: \"x must be less than max (\"+string(self.max)+\")\"", "type": "string" }, + "reason": { + "description": "reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: \"FieldValueInvalid\", \"FieldValueForbidden\", \"FieldValueRequired\", \"FieldValueDuplicate\". If not set, default to use \"FieldValueInvalid\". All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.", + "type": "string" + }, "rule": { "description": "Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {\"rule\": \"self.status.actual <= self.spec.maxDesired\"}\n\nIf the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map are accessible via CEL macros and functions such as `self.all(...)`. If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and functions. If the Rule is scoped to a scalar, `self` is bound to the scalar value. Examples: - Rule scoped to a map of objects: {\"rule\": \"self.components['Widget'].priority < 10\"} - Rule scoped to a list of integers: {\"rule\": \"self.values.all(value, value >= 0 && value < 100)\"} - Rule scoped to a string value: {\"rule\": \"self.startsWith('kube')\"}\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.\n\nUnknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an \"unknown type\". An \"unknown type\" is recursively defined as:\n - A schema with no type and x-kubernetes-preserve-unknown-fields set to true\n - An array where the items schema is of an \"unknown type\"\n - An object where the additionalProperties schema is of an \"unknown type\"\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Rule accessing a property named \"namespace\": {\"rule\": \"self.__namespace__ > 0\"}\n - Rule accessing a property named \"x-prop\": {\"rule\": \"self.x__dash__prop > 0\"}\n - Rule accessing a property named \"redact__d\": {\"rule\": \"self.redact__underscores__d > 0\"}\n\nEquality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.", "type": "string" @@ -16191,9 +16882,7 @@ "properties": { "key": { "description": "key is the label key that the selector applies to.", - "type": "string", - "x-kubernetes-patch-merge-key": "key", - "x-kubernetes-patch-strategy": "merge" + "type": "string" }, "operator": { "description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", @@ -17082,41 +17771,13 @@ }, "info": { "title": "Kubernetes", - "version": "release-1.27" + "version": "release-1.28" }, "paths": { - "/.well-known/openid-configuration/": { - "get": { - "description": "get service account issuer OpenID configuration, also known as the 'OIDC discovery doc'", - "operationId": "getServiceAccountIssuerOpenIDConfiguration", - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "WellKnown" - ] - } - }, "/api/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available API versions", "operationId": "getAPIVersions", @@ -17147,9 +17808,7 @@ "/api/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -17180,7 +17839,7 @@ "/api/v1/componentstatuses": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list objects of kind ComponentStatus", "operationId": "listComponentStatus", @@ -17298,7 +17957,7 @@ "/api/v1/componentstatuses/{name}": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ComponentStatus", "operationId": "readComponentStatus", @@ -17352,7 +18011,7 @@ "/api/v1/configmaps": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ConfigMap", "operationId": "listConfigMapForAllNamespaces", @@ -17470,7 +18129,7 @@ "/api/v1/endpoints": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Endpoints", "operationId": "listEndpointsForAllNamespaces", @@ -17588,7 +18247,7 @@ "/api/v1/events": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Event", "operationId": "listEventForAllNamespaces", @@ -17706,7 +18365,7 @@ "/api/v1/limitranges": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind LimitRange", "operationId": "listLimitRangeForAllNamespaces", @@ -17824,7 +18483,7 @@ "/api/v1/namespaces": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Namespace", "operationId": "listNamespace", @@ -17942,7 +18601,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Namespace", "operationId": "createNamespace", @@ -18061,7 +18720,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Binding", "operationId": "createNamespacedBinding", @@ -18121,7 +18780,7 @@ "/api/v1/namespaces/{namespace}/configmaps": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ConfigMap", "operationId": "deleteCollectionNamespacedConfigMap", @@ -18250,7 +18909,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ConfigMap", "operationId": "listNamespacedConfigMap", @@ -18376,7 +19035,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ConfigMap", "operationId": "createNamespacedConfigMap", @@ -18457,7 +19116,7 @@ "/api/v1/namespaces/{namespace}/configmaps/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ConfigMap", "operationId": "deleteNamespacedConfigMap", @@ -18536,7 +19195,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ConfigMap", "operationId": "readNamespacedConfigMap", @@ -18596,10 +19255,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ConfigMap", "operationId": "patchNamespacedConfigMap", @@ -18679,7 +19335,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ConfigMap", "operationId": "replaceNamespacedConfigMap", @@ -18754,7 +19410,7 @@ "/api/v1/namespaces/{namespace}/endpoints": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Endpoints", "operationId": "deleteCollectionNamespacedEndpoints", @@ -18883,7 +19539,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Endpoints", "operationId": "listNamespacedEndpoints", @@ -19009,7 +19665,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create Endpoints", "operationId": "createNamespacedEndpoints", @@ -19090,7 +19746,7 @@ "/api/v1/namespaces/{namespace}/endpoints/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete Endpoints", "operationId": "deleteNamespacedEndpoints", @@ -19169,7 +19825,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Endpoints", "operationId": "readNamespacedEndpoints", @@ -19229,10 +19885,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Endpoints", "operationId": "patchNamespacedEndpoints", @@ -19312,7 +19965,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Endpoints", "operationId": "replaceNamespacedEndpoints", @@ -19387,7 +20040,7 @@ "/api/v1/namespaces/{namespace}/events": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Event", "operationId": "deleteCollectionNamespacedEvent", @@ -19516,7 +20169,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Event", "operationId": "listNamespacedEvent", @@ -19642,7 +20295,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create an Event", "operationId": "createNamespacedEvent", @@ -19723,7 +20376,7 @@ "/api/v1/namespaces/{namespace}/events/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete an Event", "operationId": "deleteNamespacedEvent", @@ -19802,7 +20455,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Event", "operationId": "readNamespacedEvent", @@ -19862,10 +20515,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Event", "operationId": "patchNamespacedEvent", @@ -19945,7 +20595,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Event", "operationId": "replaceNamespacedEvent", @@ -20020,7 +20670,7 @@ "/api/v1/namespaces/{namespace}/limitranges": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of LimitRange", "operationId": "deleteCollectionNamespacedLimitRange", @@ -20149,7 +20799,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind LimitRange", "operationId": "listNamespacedLimitRange", @@ -20275,7 +20925,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a LimitRange", "operationId": "createNamespacedLimitRange", @@ -20356,7 +21006,7 @@ "/api/v1/namespaces/{namespace}/limitranges/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a LimitRange", "operationId": "deleteNamespacedLimitRange", @@ -20435,7 +21085,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified LimitRange", "operationId": "readNamespacedLimitRange", @@ -20495,10 +21145,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified LimitRange", "operationId": "patchNamespacedLimitRange", @@ -20578,7 +21225,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified LimitRange", "operationId": "replaceNamespacedLimitRange", @@ -20653,7 +21300,7 @@ "/api/v1/namespaces/{namespace}/persistentvolumeclaims": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of PersistentVolumeClaim", "operationId": "deleteCollectionNamespacedPersistentVolumeClaim", @@ -20782,7 +21429,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PersistentVolumeClaim", "operationId": "listNamespacedPersistentVolumeClaim", @@ -20908,7 +21555,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a PersistentVolumeClaim", "operationId": "createNamespacedPersistentVolumeClaim", @@ -20989,7 +21636,7 @@ "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a PersistentVolumeClaim", "operationId": "deleteNamespacedPersistentVolumeClaim", @@ -21068,7 +21715,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified PersistentVolumeClaim", "operationId": "readNamespacedPersistentVolumeClaim", @@ -21128,10 +21775,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified PersistentVolumeClaim", "operationId": "patchNamespacedPersistentVolumeClaim", @@ -21211,7 +21855,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified PersistentVolumeClaim", "operationId": "replaceNamespacedPersistentVolumeClaim", @@ -21286,7 +21930,7 @@ "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified PersistentVolumeClaim", "operationId": "readNamespacedPersistentVolumeClaimStatus", @@ -21346,10 +21990,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified PersistentVolumeClaim", "operationId": "patchNamespacedPersistentVolumeClaimStatus", @@ -21429,7 +22070,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified PersistentVolumeClaim", "operationId": "replaceNamespacedPersistentVolumeClaimStatus", @@ -21504,7 +22145,7 @@ "/api/v1/namespaces/{namespace}/pods": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Pod", "operationId": "deleteCollectionNamespacedPod", @@ -21633,7 +22274,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Pod", "operationId": "listNamespacedPod", @@ -21759,7 +22400,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Pod", "operationId": "createNamespacedPod", @@ -21840,7 +22481,7 @@ "/api/v1/namespaces/{namespace}/pods/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a Pod", "operationId": "deleteNamespacedPod", @@ -21919,7 +22560,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Pod", "operationId": "readNamespacedPod", @@ -21979,10 +22620,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Pod", "operationId": "patchNamespacedPod", @@ -22062,7 +22700,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Pod", "operationId": "replaceNamespacedPod", @@ -22137,7 +22775,7 @@ "/api/v1/namespaces/{namespace}/pods/{name}/attach": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "connect GET requests to attach of Pod", "operationId": "connectGetNamespacedPodAttach", @@ -22223,7 +22861,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "connect POST requests to attach of Pod", "operationId": "connectPostNamespacedPodAttach", @@ -22304,7 +22942,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create binding of a Pod", "operationId": "createNamespacedPodBinding", @@ -22364,7 +23002,7 @@ "/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read ephemeralcontainers of the specified Pod", "operationId": "readNamespacedPodEphemeralcontainers", @@ -22424,10 +23062,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update ephemeralcontainers of the specified Pod", "operationId": "patchNamespacedPodEphemeralcontainers", @@ -22507,7 +23142,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace ephemeralcontainers of the specified Pod", "operationId": "replaceNamespacedPodEphemeralcontainers", @@ -22628,7 +23263,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create eviction of a Pod", "operationId": "createNamespacedPodEviction", @@ -22688,7 +23323,7 @@ "/api/v1/namespaces/{namespace}/pods/{name}/exec": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "connect GET requests to exec of Pod", "operationId": "connectGetNamespacedPodExec", @@ -22781,7 +23416,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "connect POST requests to exec of Pod", "operationId": "connectPostNamespacedPodExec", @@ -22816,7 +23451,7 @@ "/api/v1/namespaces/{namespace}/pods/{name}/log": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read log of the specified Pod", "operationId": "readNamespacedPodLog", @@ -22935,7 +23570,7 @@ "/api/v1/namespaces/{namespace}/pods/{name}/portforward": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "connect GET requests to portforward of Pod", "operationId": "connectGetNamespacedPodPortforward", @@ -22993,7 +23628,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "connect POST requests to portforward of Pod", "operationId": "connectPostNamespacedPodPortforward", @@ -23028,7 +23663,7 @@ "/api/v1/namespaces/{namespace}/pods/{name}/proxy": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "connect DELETE requests to proxy of Pod", "operationId": "connectDeleteNamespacedPodProxy", @@ -23061,7 +23696,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "connect GET requests to proxy of Pod", "operationId": "connectGetNamespacedPodProxy", @@ -23094,7 +23729,7 @@ }, "head": { "consumes": [ - "*/*" + "application/json" ], "description": "connect HEAD requests to proxy of Pod", "operationId": "connectHeadNamespacedPodProxy", @@ -23127,7 +23762,7 @@ }, "options": { "consumes": [ - "*/*" + "application/json" ], "description": "connect OPTIONS requests to proxy of Pod", "operationId": "connectOptionsNamespacedPodProxy", @@ -23185,7 +23820,7 @@ ], "patch": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PATCH requests to proxy of Pod", "operationId": "connectPatchNamespacedPodProxy", @@ -23218,7 +23853,7 @@ }, "post": { "consumes": [ - "*/*" + "application/json" ], "description": "connect POST requests to proxy of Pod", "operationId": "connectPostNamespacedPodProxy", @@ -23251,7 +23886,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PUT requests to proxy of Pod", "operationId": "connectPutNamespacedPodProxy", @@ -23286,7 +23921,7 @@ "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "connect DELETE requests to proxy of Pod", "operationId": "connectDeleteNamespacedPodProxyWithPath", @@ -23319,7 +23954,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "connect GET requests to proxy of Pod", "operationId": "connectGetNamespacedPodProxyWithPath", @@ -23352,7 +23987,7 @@ }, "head": { "consumes": [ - "*/*" + "application/json" ], "description": "connect HEAD requests to proxy of Pod", "operationId": "connectHeadNamespacedPodProxyWithPath", @@ -23385,7 +24020,7 @@ }, "options": { "consumes": [ - "*/*" + "application/json" ], "description": "connect OPTIONS requests to proxy of Pod", "operationId": "connectOptionsNamespacedPodProxyWithPath", @@ -23451,7 +24086,7 @@ ], "patch": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PATCH requests to proxy of Pod", "operationId": "connectPatchNamespacedPodProxyWithPath", @@ -23484,7 +24119,7 @@ }, "post": { "consumes": [ - "*/*" + "application/json" ], "description": "connect POST requests to proxy of Pod", "operationId": "connectPostNamespacedPodProxyWithPath", @@ -23517,7 +24152,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PUT requests to proxy of Pod", "operationId": "connectPutNamespacedPodProxyWithPath", @@ -23552,7 +24187,7 @@ "/api/v1/namespaces/{namespace}/pods/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified Pod", "operationId": "readNamespacedPodStatus", @@ -23612,10 +24247,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified Pod", "operationId": "patchNamespacedPodStatus", @@ -23695,7 +24327,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified Pod", "operationId": "replaceNamespacedPodStatus", @@ -23770,7 +24402,7 @@ "/api/v1/namespaces/{namespace}/podtemplates": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of PodTemplate", "operationId": "deleteCollectionNamespacedPodTemplate", @@ -23899,7 +24531,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PodTemplate", "operationId": "listNamespacedPodTemplate", @@ -24025,7 +24657,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a PodTemplate", "operationId": "createNamespacedPodTemplate", @@ -24106,7 +24738,7 @@ "/api/v1/namespaces/{namespace}/podtemplates/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a PodTemplate", "operationId": "deleteNamespacedPodTemplate", @@ -24185,7 +24817,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified PodTemplate", "operationId": "readNamespacedPodTemplate", @@ -24245,10 +24877,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified PodTemplate", "operationId": "patchNamespacedPodTemplate", @@ -24328,7 +24957,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified PodTemplate", "operationId": "replaceNamespacedPodTemplate", @@ -24403,7 +25032,7 @@ "/api/v1/namespaces/{namespace}/replicationcontrollers": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ReplicationController", "operationId": "deleteCollectionNamespacedReplicationController", @@ -24532,7 +25161,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ReplicationController", "operationId": "listNamespacedReplicationController", @@ -24658,7 +25287,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ReplicationController", "operationId": "createNamespacedReplicationController", @@ -24739,7 +25368,7 @@ "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ReplicationController", "operationId": "deleteNamespacedReplicationController", @@ -24818,7 +25447,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ReplicationController", "operationId": "readNamespacedReplicationController", @@ -24878,10 +25507,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ReplicationController", "operationId": "patchNamespacedReplicationController", @@ -24961,7 +25587,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ReplicationController", "operationId": "replaceNamespacedReplicationController", @@ -25036,7 +25662,7 @@ "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read scale of the specified ReplicationController", "operationId": "readNamespacedReplicationControllerScale", @@ -25096,10 +25722,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update scale of the specified ReplicationController", "operationId": "patchNamespacedReplicationControllerScale", @@ -25179,7 +25802,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace scale of the specified ReplicationController", "operationId": "replaceNamespacedReplicationControllerScale", @@ -25254,7 +25877,7 @@ "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified ReplicationController", "operationId": "readNamespacedReplicationControllerStatus", @@ -25314,10 +25937,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified ReplicationController", "operationId": "patchNamespacedReplicationControllerStatus", @@ -25397,7 +26017,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified ReplicationController", "operationId": "replaceNamespacedReplicationControllerStatus", @@ -25472,7 +26092,7 @@ "/api/v1/namespaces/{namespace}/resourcequotas": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ResourceQuota", "operationId": "deleteCollectionNamespacedResourceQuota", @@ -25601,7 +26221,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ResourceQuota", "operationId": "listNamespacedResourceQuota", @@ -25727,7 +26347,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ResourceQuota", "operationId": "createNamespacedResourceQuota", @@ -25808,7 +26428,7 @@ "/api/v1/namespaces/{namespace}/resourcequotas/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ResourceQuota", "operationId": "deleteNamespacedResourceQuota", @@ -25887,7 +26507,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ResourceQuota", "operationId": "readNamespacedResourceQuota", @@ -25947,10 +26567,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ResourceQuota", "operationId": "patchNamespacedResourceQuota", @@ -26030,7 +26647,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ResourceQuota", "operationId": "replaceNamespacedResourceQuota", @@ -26105,7 +26722,7 @@ "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified ResourceQuota", "operationId": "readNamespacedResourceQuotaStatus", @@ -26165,10 +26782,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified ResourceQuota", "operationId": "patchNamespacedResourceQuotaStatus", @@ -26248,7 +26862,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified ResourceQuota", "operationId": "replaceNamespacedResourceQuotaStatus", @@ -26323,7 +26937,7 @@ "/api/v1/namespaces/{namespace}/secrets": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Secret", "operationId": "deleteCollectionNamespacedSecret", @@ -26452,7 +27066,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Secret", "operationId": "listNamespacedSecret", @@ -26578,7 +27192,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Secret", "operationId": "createNamespacedSecret", @@ -26659,7 +27273,7 @@ "/api/v1/namespaces/{namespace}/secrets/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a Secret", "operationId": "deleteNamespacedSecret", @@ -26738,7 +27352,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Secret", "operationId": "readNamespacedSecret", @@ -26798,10 +27412,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Secret", "operationId": "patchNamespacedSecret", @@ -26881,7 +27492,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Secret", "operationId": "replaceNamespacedSecret", @@ -26956,7 +27567,7 @@ "/api/v1/namespaces/{namespace}/serviceaccounts": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ServiceAccount", "operationId": "deleteCollectionNamespacedServiceAccount", @@ -27085,7 +27696,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ServiceAccount", "operationId": "listNamespacedServiceAccount", @@ -27211,7 +27822,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ServiceAccount", "operationId": "createNamespacedServiceAccount", @@ -27292,7 +27903,7 @@ "/api/v1/namespaces/{namespace}/serviceaccounts/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ServiceAccount", "operationId": "deleteNamespacedServiceAccount", @@ -27371,7 +27982,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ServiceAccount", "operationId": "readNamespacedServiceAccount", @@ -27431,10 +28042,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ServiceAccount", "operationId": "patchNamespacedServiceAccount", @@ -27514,7 +28122,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ServiceAccount", "operationId": "replaceNamespacedServiceAccount", @@ -27635,7 +28243,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create token of a ServiceAccount", "operationId": "createNamespacedServiceAccountToken", @@ -27695,7 +28303,7 @@ "/api/v1/namespaces/{namespace}/services": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Service", "operationId": "deleteCollectionNamespacedService", @@ -27824,7 +28432,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Service", "operationId": "listNamespacedService", @@ -27950,7 +28558,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Service", "operationId": "createNamespacedService", @@ -28031,7 +28639,7 @@ "/api/v1/namespaces/{namespace}/services/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a Service", "operationId": "deleteNamespacedService", @@ -28110,7 +28718,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Service", "operationId": "readNamespacedService", @@ -28170,10 +28778,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Service", "operationId": "patchNamespacedService", @@ -28253,7 +28858,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Service", "operationId": "replaceNamespacedService", @@ -28328,7 +28933,7 @@ "/api/v1/namespaces/{namespace}/services/{name}/proxy": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "connect DELETE requests to proxy of Service", "operationId": "connectDeleteNamespacedServiceProxy", @@ -28361,7 +28966,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "connect GET requests to proxy of Service", "operationId": "connectGetNamespacedServiceProxy", @@ -28394,7 +28999,7 @@ }, "head": { "consumes": [ - "*/*" + "application/json" ], "description": "connect HEAD requests to proxy of Service", "operationId": "connectHeadNamespacedServiceProxy", @@ -28427,7 +29032,7 @@ }, "options": { "consumes": [ - "*/*" + "application/json" ], "description": "connect OPTIONS requests to proxy of Service", "operationId": "connectOptionsNamespacedServiceProxy", @@ -28485,7 +29090,7 @@ ], "patch": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PATCH requests to proxy of Service", "operationId": "connectPatchNamespacedServiceProxy", @@ -28518,7 +29123,7 @@ }, "post": { "consumes": [ - "*/*" + "application/json" ], "description": "connect POST requests to proxy of Service", "operationId": "connectPostNamespacedServiceProxy", @@ -28551,7 +29156,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PUT requests to proxy of Service", "operationId": "connectPutNamespacedServiceProxy", @@ -28586,7 +29191,7 @@ "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "connect DELETE requests to proxy of Service", "operationId": "connectDeleteNamespacedServiceProxyWithPath", @@ -28619,7 +29224,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "connect GET requests to proxy of Service", "operationId": "connectGetNamespacedServiceProxyWithPath", @@ -28652,7 +29257,7 @@ }, "head": { "consumes": [ - "*/*" + "application/json" ], "description": "connect HEAD requests to proxy of Service", "operationId": "connectHeadNamespacedServiceProxyWithPath", @@ -28685,7 +29290,7 @@ }, "options": { "consumes": [ - "*/*" + "application/json" ], "description": "connect OPTIONS requests to proxy of Service", "operationId": "connectOptionsNamespacedServiceProxyWithPath", @@ -28751,7 +29356,7 @@ ], "patch": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PATCH requests to proxy of Service", "operationId": "connectPatchNamespacedServiceProxyWithPath", @@ -28784,7 +29389,7 @@ }, "post": { "consumes": [ - "*/*" + "application/json" ], "description": "connect POST requests to proxy of Service", "operationId": "connectPostNamespacedServiceProxyWithPath", @@ -28817,7 +29422,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PUT requests to proxy of Service", "operationId": "connectPutNamespacedServiceProxyWithPath", @@ -28852,7 +29457,7 @@ "/api/v1/namespaces/{namespace}/services/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified Service", "operationId": "readNamespacedServiceStatus", @@ -28912,10 +29517,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified Service", "operationId": "patchNamespacedServiceStatus", @@ -28995,7 +29597,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified Service", "operationId": "replaceNamespacedServiceStatus", @@ -29070,7 +29672,7 @@ "/api/v1/namespaces/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a Namespace", "operationId": "deleteNamespace", @@ -29149,7 +29751,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Namespace", "operationId": "readNamespace", @@ -29201,10 +29803,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Namespace", "operationId": "patchNamespace", @@ -29284,7 +29883,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Namespace", "operationId": "replaceNamespace", @@ -29397,7 +29996,7 @@ ], "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace finalize of the specified Namespace", "operationId": "replaceNamespaceFinalize", @@ -29451,7 +30050,7 @@ "/api/v1/namespaces/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified Namespace", "operationId": "readNamespaceStatus", @@ -29503,10 +30102,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified Namespace", "operationId": "patchNamespaceStatus", @@ -29586,7 +30182,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified Namespace", "operationId": "replaceNamespaceStatus", @@ -29661,7 +30257,7 @@ "/api/v1/nodes": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Node", "operationId": "deleteCollectionNode", @@ -29790,7 +30386,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Node", "operationId": "listNode", @@ -29908,7 +30504,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Node", "operationId": "createNode", @@ -29989,7 +30585,7 @@ "/api/v1/nodes/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a Node", "operationId": "deleteNode", @@ -30068,7 +30664,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Node", "operationId": "readNode", @@ -30120,10 +30716,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Node", "operationId": "patchNode", @@ -30203,7 +30796,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Node", "operationId": "replaceNode", @@ -30278,7 +30871,7 @@ "/api/v1/nodes/{name}/proxy": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "connect DELETE requests to proxy of Node", "operationId": "connectDeleteNodeProxy", @@ -30311,7 +30904,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "connect GET requests to proxy of Node", "operationId": "connectGetNodeProxy", @@ -30344,7 +30937,7 @@ }, "head": { "consumes": [ - "*/*" + "application/json" ], "description": "connect HEAD requests to proxy of Node", "operationId": "connectHeadNodeProxy", @@ -30377,7 +30970,7 @@ }, "options": { "consumes": [ - "*/*" + "application/json" ], "description": "connect OPTIONS requests to proxy of Node", "operationId": "connectOptionsNodeProxy", @@ -30427,7 +31020,7 @@ ], "patch": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PATCH requests to proxy of Node", "operationId": "connectPatchNodeProxy", @@ -30460,7 +31053,7 @@ }, "post": { "consumes": [ - "*/*" + "application/json" ], "description": "connect POST requests to proxy of Node", "operationId": "connectPostNodeProxy", @@ -30493,7 +31086,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PUT requests to proxy of Node", "operationId": "connectPutNodeProxy", @@ -30528,7 +31121,7 @@ "/api/v1/nodes/{name}/proxy/{path}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "connect DELETE requests to proxy of Node", "operationId": "connectDeleteNodeProxyWithPath", @@ -30561,7 +31154,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "connect GET requests to proxy of Node", "operationId": "connectGetNodeProxyWithPath", @@ -30594,7 +31187,7 @@ }, "head": { "consumes": [ - "*/*" + "application/json" ], "description": "connect HEAD requests to proxy of Node", "operationId": "connectHeadNodeProxyWithPath", @@ -30627,7 +31220,7 @@ }, "options": { "consumes": [ - "*/*" + "application/json" ], "description": "connect OPTIONS requests to proxy of Node", "operationId": "connectOptionsNodeProxyWithPath", @@ -30685,7 +31278,7 @@ ], "patch": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PATCH requests to proxy of Node", "operationId": "connectPatchNodeProxyWithPath", @@ -30718,7 +31311,7 @@ }, "post": { "consumes": [ - "*/*" + "application/json" ], "description": "connect POST requests to proxy of Node", "operationId": "connectPostNodeProxyWithPath", @@ -30751,7 +31344,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "connect PUT requests to proxy of Node", "operationId": "connectPutNodeProxyWithPath", @@ -30786,7 +31379,7 @@ "/api/v1/nodes/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified Node", "operationId": "readNodeStatus", @@ -30838,10 +31431,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified Node", "operationId": "patchNodeStatus", @@ -30921,7 +31511,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified Node", "operationId": "replaceNodeStatus", @@ -30996,7 +31586,7 @@ "/api/v1/persistentvolumeclaims": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PersistentVolumeClaim", "operationId": "listPersistentVolumeClaimForAllNamespaces", @@ -31114,7 +31704,7 @@ "/api/v1/persistentvolumes": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of PersistentVolume", "operationId": "deleteCollectionPersistentVolume", @@ -31243,7 +31833,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PersistentVolume", "operationId": "listPersistentVolume", @@ -31361,7 +31951,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a PersistentVolume", "operationId": "createPersistentVolume", @@ -31442,7 +32032,7 @@ "/api/v1/persistentvolumes/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a PersistentVolume", "operationId": "deletePersistentVolume", @@ -31521,7 +32111,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified PersistentVolume", "operationId": "readPersistentVolume", @@ -31573,10 +32163,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified PersistentVolume", "operationId": "patchPersistentVolume", @@ -31656,7 +32243,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified PersistentVolume", "operationId": "replacePersistentVolume", @@ -31731,7 +32318,7 @@ "/api/v1/persistentvolumes/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified PersistentVolume", "operationId": "readPersistentVolumeStatus", @@ -31783,10 +32370,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified PersistentVolume", "operationId": "patchPersistentVolumeStatus", @@ -31866,7 +32450,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified PersistentVolume", "operationId": "replacePersistentVolumeStatus", @@ -31941,7 +32525,7 @@ "/api/v1/pods": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Pod", "operationId": "listPodForAllNamespaces", @@ -32059,7 +32643,7 @@ "/api/v1/podtemplates": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PodTemplate", "operationId": "listPodTemplateForAllNamespaces", @@ -32177,7 +32761,7 @@ "/api/v1/replicationcontrollers": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ReplicationController", "operationId": "listReplicationControllerForAllNamespaces", @@ -32295,7 +32879,7 @@ "/api/v1/resourcequotas": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ResourceQuota", "operationId": "listResourceQuotaForAllNamespaces", @@ -32413,7 +32997,7 @@ "/api/v1/secrets": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Secret", "operationId": "listSecretForAllNamespaces", @@ -32531,7 +33115,7 @@ "/api/v1/serviceaccounts": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ServiceAccount", "operationId": "listServiceAccountForAllNamespaces", @@ -32649,7 +33233,7 @@ "/api/v1/services": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Service", "operationId": "listServiceForAllNamespaces", @@ -36481,9 +37065,7 @@ "/apis/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available API versions", "operationId": "getAPIVersions", @@ -36514,9 +37096,7 @@ "/apis/admissionregistration.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -36547,9 +37127,7 @@ "/apis/admissionregistration.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -36580,7 +37158,7 @@ "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of MutatingWebhookConfiguration", "operationId": "deleteCollectionMutatingWebhookConfiguration", @@ -36709,7 +37287,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind MutatingWebhookConfiguration", "operationId": "listMutatingWebhookConfiguration", @@ -36827,7 +37405,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a MutatingWebhookConfiguration", "operationId": "createMutatingWebhookConfiguration", @@ -36871,19 +37449,1904 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "MutatingWebhookConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}": { + "delete": { + "consumes": [ + "application/json" + ], + "description": "delete a MutatingWebhookConfiguration", + "operationId": "deleteMutatingWebhookConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "MutatingWebhookConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "get": { + "consumes": [ + "application/json" + ], + "description": "read the specified MutatingWebhookConfiguration", + "operationId": "readMutatingWebhookConfiguration", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "MutatingWebhookConfiguration", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the MutatingWebhookConfiguration", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json" + ], + "description": "partially update the specified MutatingWebhookConfiguration", + "operationId": "patchMutatingWebhookConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Patch" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "MutatingWebhookConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "application/json" + ], + "description": "replace the specified MutatingWebhookConfiguration", + "operationId": "replaceMutatingWebhookConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "MutatingWebhookConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations": { + "delete": { + "consumes": [ + "application/json" + ], + "description": "delete collection of ValidatingWebhookConfiguration", + "operationId": "deleteCollectionValidatingWebhookConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "get": { + "consumes": [ + "application/json" + ], + "description": "list or watch objects of kind ValidatingWebhookConfiguration", + "operationId": "listValidatingWebhookConfiguration", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfigurationList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1" + } + }, + "parameters": [ + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "application/json" + ], + "description": "create a ValidatingWebhookConfiguration", + "operationId": "createValidatingWebhookConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}": { + "delete": { + "consumes": [ + "application/json" + ], + "description": "delete a ValidatingWebhookConfiguration", + "operationId": "deleteValidatingWebhookConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "get": { + "consumes": [ + "application/json" + ], + "description": "read the specified ValidatingWebhookConfiguration", + "operationId": "readValidatingWebhookConfiguration", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the ValidatingWebhookConfiguration", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json" + ], + "description": "partially update the specified ValidatingWebhookConfiguration", + "operationId": "patchValidatingWebhookConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Patch" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "application/json" + ], + "description": "replace the specified ValidatingWebhookConfiguration", + "operationId": "replaceValidatingWebhookConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/admissionregistration.k8s.io/v1/watch/mutatingwebhookconfigurations": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/admissionregistration.k8s.io/v1/watch/mutatingwebhookconfigurations/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the MutatingWebhookConfiguration", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/admissionregistration.k8s.io/v1/watch/validatingwebhookconfigurations": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/admissionregistration.k8s.io/v1/watch/validatingwebhookconfigurations/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the ValidatingWebhookConfiguration", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/admissionregistration.k8s.io/v1alpha1/": { + "get": { + "consumes": [ + "application/json" + ], + "description": "get available resources", + "operationId": "getAPIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1alpha1" + ] + } + }, + "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies": { + "delete": { + "consumes": [ + "application/json" + ], + "description": "delete collection of ValidatingAdmissionPolicy", + "operationId": "deleteCollectionValidatingAdmissionPolicy", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1alpha1" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" + }, + "x-codegen-request-body-name": "body" + }, + "get": { + "consumes": [ + "application/json" + ], + "description": "list or watch objects of kind ValidatingAdmissionPolicy", + "operationId": "listValidatingAdmissionPolicy", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1alpha1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" + } + }, + "parameters": [ + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "application/json" + ], + "description": "create a ValidatingAdmissionPolicy", + "operationId": "createValidatingAdmissionPolicy", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1alpha1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}": { + "delete": { + "consumes": [ + "application/json" + ], + "description": "delete a ValidatingAdmissionPolicy", + "operationId": "deleteValidatingAdmissionPolicy", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1alpha1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" + }, + "x-codegen-request-body-name": "body" + }, + "get": { + "consumes": [ + "application/json" + ], + "description": "read the specified ValidatingAdmissionPolicy", + "operationId": "readValidatingAdmissionPolicy", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1alpha1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" + } + }, + "parameters": [ + { + "description": "name of the ValidatingAdmissionPolicy", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json" + ], + "description": "partially update the specified ValidatingAdmissionPolicy", + "operationId": "patchValidatingAdmissionPolicy", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Patch" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1alpha1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" + }, + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "application/json" + ], + "description": "replace the specified ValidatingAdmissionPolicy", + "operationId": "replaceValidatingAdmissionPolicy", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.MutatingWebhookConfiguration" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" } }, "401": { @@ -36894,103 +39357,24 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "MutatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a MutatingWebhookConfiguration", - "operationId": "deleteMutatingWebhookConfiguration", - "parameters": [ - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/v1.DeleteOptions" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "MutatingWebhookConfiguration", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - }, + "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], - "description": "read the specified MutatingWebhookConfiguration", - "operationId": "readMutatingWebhookConfiguration", + "description": "read status of the specified ValidatingAdmissionPolicy", + "operationId": "readValidatingAdmissionPolicyStatus", "produces": [ "application/json", "application/yaml", @@ -37000,7 +39384,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" } }, "401": { @@ -37011,18 +39395,18 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "MutatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the MutatingWebhookConfiguration", + "description": "name of the ValidatingAdmissionPolicy", "in": "path", "name": "name", "required": true, @@ -37039,13 +39423,10 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], - "description": "partially update the specified MutatingWebhookConfiguration", - "operationId": "patchMutatingWebhookConfiguration", + "description": "partially update status of the specified ValidatingAdmissionPolicy", + "operationId": "patchValidatingAdmissionPolicyStatus", "parameters": [ { "in": "body", @@ -37093,13 +39474,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" } }, "401": { @@ -37110,29 +39491,29 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "MutatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" }, "put": { "consumes": [ - "*/*" + "application/json" ], - "description": "replace the specified MutatingWebhookConfiguration", - "operationId": "replaceMutatingWebhookConfiguration", + "description": "replace status of the specified ValidatingAdmissionPolicy", + "operationId": "replaceValidatingAdmissionPolicyStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" } }, { @@ -37166,13 +39547,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.MutatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" } }, "401": { @@ -37183,24 +39564,24 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "MutatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicy", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations": { + "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings": { "delete": { "consumes": [ - "*/*" + "application/json" ], - "description": "delete collection of ValidatingWebhookConfiguration", - "operationId": "deleteCollectionValidatingWebhookConfiguration", + "description": "delete collection of ValidatingAdmissionPolicyBinding", + "operationId": "deleteCollectionValidatingAdmissionPolicyBinding", "parameters": [ { "in": "body", @@ -37314,22 +39695,22 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicyBinding", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" }, "get": { "consumes": [ - "*/*" + "application/json" ], - "description": "list or watch objects of kind ValidatingWebhookConfiguration", - "operationId": "listValidatingWebhookConfiguration", + "description": "list or watch objects of kind ValidatingAdmissionPolicyBinding", + "operationId": "listValidatingAdmissionPolicyBinding", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -37413,7 +39794,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfigurationList" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBindingList" } }, "401": { @@ -37424,13 +39805,13 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicyBinding", + "version": "v1alpha1" } }, "parameters": [ @@ -37444,17 +39825,17 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], - "description": "create a ValidatingWebhookConfiguration", - "operationId": "createValidatingWebhookConfiguration", + "description": "create a ValidatingAdmissionPolicyBinding", + "operationId": "createValidatingAdmissionPolicyBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, { @@ -37488,19 +39869,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, "401": { @@ -37511,24 +39892,24 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicyBinding", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], - "description": "delete a ValidatingWebhookConfiguration", - "operationId": "deleteValidatingWebhookConfiguration", + "description": "delete a ValidatingAdmissionPolicyBinding", + "operationId": "deleteValidatingAdmissionPolicyBinding", "parameters": [ { "in": "body", @@ -37592,22 +39973,22 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicyBinding", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" }, "get": { "consumes": [ - "*/*" + "application/json" ], - "description": "read the specified ValidatingWebhookConfiguration", - "operationId": "readValidatingWebhookConfiguration", + "description": "read the specified ValidatingAdmissionPolicyBinding", + "operationId": "readValidatingAdmissionPolicyBinding", "produces": [ "application/json", "application/yaml", @@ -37617,7 +39998,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, "401": { @@ -37628,18 +40009,18 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicyBinding", + "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the ValidatingWebhookConfiguration", + "description": "name of the ValidatingAdmissionPolicyBinding", "in": "path", "name": "name", "required": true, @@ -37656,13 +40037,10 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], - "description": "partially update the specified ValidatingWebhookConfiguration", - "operationId": "patchValidatingWebhookConfiguration", + "description": "partially update the specified ValidatingAdmissionPolicyBinding", + "operationId": "patchValidatingAdmissionPolicyBinding", "parameters": [ { "in": "body", @@ -37710,13 +40088,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, "401": { @@ -37727,29 +40105,29 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicyBinding", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" }, "put": { "consumes": [ - "*/*" + "application/json" ], - "description": "replace the specified ValidatingWebhookConfiguration", - "operationId": "replaceValidatingWebhookConfiguration", + "description": "replace the specified ValidatingAdmissionPolicyBinding", + "operationId": "replaceValidatingAdmissionPolicyBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, { @@ -37783,13 +40161,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.ValidatingWebhookConfiguration" + "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" } }, "401": { @@ -37800,18 +40178,18 @@ "https" ], "tags": [ - "admissionregistration_v1" + "admissionregistration_v1alpha1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingWebhookConfiguration", - "version": "v1" + "kind": "ValidatingAdmissionPolicyBinding", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1/watch/mutatingwebhookconfigurations": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -37892,7 +40270,7 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1/watch/mutatingwebhookconfigurations/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -37930,7 +40308,7 @@ "uniqueItems": true }, { - "description": "name of the MutatingWebhookConfiguration", + "description": "name of the ValidatingAdmissionPolicy", "in": "path", "name": "name", "required": true, @@ -37981,7 +40359,7 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1/watch/validatingwebhookconfigurations": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -38062,7 +40440,7 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1/watch/validatingwebhookconfigurations/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -38100,7 +40478,7 @@ "uniqueItems": true }, { - "description": "name of the ValidatingWebhookConfiguration", + "description": "name of the ValidatingAdmissionPolicyBinding", "in": "path", "name": "name", "required": true, @@ -38151,12 +40529,10 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/": { + "/apis/admissionregistration.k8s.io/v1beta1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -38180,14 +40556,14 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ] } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies": { + "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ValidatingAdmissionPolicy", "operationId": "deleteCollectionValidatingAdmissionPolicy", @@ -38304,19 +40680,19 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ValidatingAdmissionPolicy", "operationId": "listValidatingAdmissionPolicy", @@ -38403,7 +40779,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyList" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyList" } }, "401": { @@ -38414,13 +40790,13 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -38434,7 +40810,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ValidatingAdmissionPolicy", "operationId": "createValidatingAdmissionPolicy", @@ -38444,7 +40820,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, { @@ -38478,19 +40854,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "401": { @@ -38501,21 +40877,21 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}": { + "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ValidatingAdmissionPolicy", "operationId": "deleteValidatingAdmissionPolicy", @@ -38582,19 +40958,19 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ValidatingAdmissionPolicy", "operationId": "readValidatingAdmissionPolicy", @@ -38607,7 +40983,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "401": { @@ -38618,13 +40994,13 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -38646,10 +41022,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ValidatingAdmissionPolicy", "operationId": "patchValidatingAdmissionPolicy", @@ -38700,13 +41073,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "401": { @@ -38717,19 +41090,19 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ValidatingAdmissionPolicy", "operationId": "replaceValidatingAdmissionPolicy", @@ -38739,7 +41112,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, { @@ -38773,13 +41146,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "401": { @@ -38790,21 +41163,21 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status": { + "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified ValidatingAdmissionPolicy", "operationId": "readValidatingAdmissionPolicyStatus", @@ -38817,7 +41190,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "401": { @@ -38828,13 +41201,13 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -38856,10 +41229,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified ValidatingAdmissionPolicy", "operationId": "patchValidatingAdmissionPolicyStatus", @@ -38910,13 +41280,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "401": { @@ -38927,19 +41297,19 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified ValidatingAdmissionPolicy", "operationId": "replaceValidatingAdmissionPolicyStatus", @@ -38949,7 +41319,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, { @@ -38983,13 +41353,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicy" } }, "401": { @@ -39000,21 +41370,21 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings": { + "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ValidatingAdmissionPolicyBinding", "operationId": "deleteCollectionValidatingAdmissionPolicyBinding", @@ -39131,19 +41501,19 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicyBinding", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ValidatingAdmissionPolicyBinding", "operationId": "listValidatingAdmissionPolicyBinding", @@ -39230,7 +41600,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBindingList" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBindingList" } }, "401": { @@ -39241,13 +41611,13 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicyBinding", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -39261,7 +41631,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ValidatingAdmissionPolicyBinding", "operationId": "createValidatingAdmissionPolicyBinding", @@ -39271,7 +41641,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, { @@ -39305,19 +41675,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, "401": { @@ -39328,21 +41698,21 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicyBinding", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}": { + "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ValidatingAdmissionPolicyBinding", "operationId": "deleteValidatingAdmissionPolicyBinding", @@ -39409,19 +41779,19 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicyBinding", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ValidatingAdmissionPolicyBinding", "operationId": "readValidatingAdmissionPolicyBinding", @@ -39434,7 +41804,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, "401": { @@ -39445,13 +41815,13 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicyBinding", - "version": "v1alpha1" + "version": "v1beta1" } }, "parameters": [ @@ -39473,10 +41843,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ValidatingAdmissionPolicyBinding", "operationId": "patchValidatingAdmissionPolicyBinding", @@ -39527,13 +41894,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, "401": { @@ -39544,19 +41911,19 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicyBinding", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ValidatingAdmissionPolicyBinding", "operationId": "replaceValidatingAdmissionPolicyBinding", @@ -39566,7 +41933,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, { @@ -39600,13 +41967,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1beta1.ValidatingAdmissionPolicyBinding" } }, "401": { @@ -39617,18 +41984,18 @@ "https" ], "tags": [ - "admissionregistration_v1alpha1" + "admissionregistration_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", "kind": "ValidatingAdmissionPolicyBinding", - "version": "v1alpha1" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies": { + "/apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicies": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -39709,7 +42076,7 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies/{name}": { + "/apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicies/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -39798,7 +42165,7 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings": { + "/apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicybindings": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -39879,7 +42246,7 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings/{name}": { + "/apis/admissionregistration.k8s.io/v1beta1/watch/validatingadmissionpolicybindings/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -39971,9 +42338,7 @@ "/apis/apiextensions.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -40004,9 +42369,7 @@ "/apis/apiextensions.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -40037,7 +42400,7 @@ "/apis/apiextensions.k8s.io/v1/customresourcedefinitions": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of CustomResourceDefinition", "operationId": "deleteCollectionCustomResourceDefinition", @@ -40166,7 +42529,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind CustomResourceDefinition", "operationId": "listCustomResourceDefinition", @@ -40284,7 +42647,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a CustomResourceDefinition", "operationId": "createCustomResourceDefinition", @@ -40365,7 +42728,7 @@ "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a CustomResourceDefinition", "operationId": "deleteCustomResourceDefinition", @@ -40444,7 +42807,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified CustomResourceDefinition", "operationId": "readCustomResourceDefinition", @@ -40496,10 +42859,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified CustomResourceDefinition", "operationId": "patchCustomResourceDefinition", @@ -40579,7 +42939,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified CustomResourceDefinition", "operationId": "replaceCustomResourceDefinition", @@ -40654,7 +43014,7 @@ "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified CustomResourceDefinition", "operationId": "readCustomResourceDefinitionStatus", @@ -40706,10 +43066,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified CustomResourceDefinition", "operationId": "patchCustomResourceDefinitionStatus", @@ -40789,7 +43146,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified CustomResourceDefinition", "operationId": "replaceCustomResourceDefinitionStatus", @@ -41034,9 +43391,7 @@ "/apis/apiregistration.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -41067,9 +43422,7 @@ "/apis/apiregistration.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -41100,7 +43453,7 @@ "/apis/apiregistration.k8s.io/v1/apiservices": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of APIService", "operationId": "deleteCollectionAPIService", @@ -41229,7 +43582,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind APIService", "operationId": "listAPIService", @@ -41347,7 +43700,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create an APIService", "operationId": "createAPIService", @@ -41428,7 +43781,7 @@ "/apis/apiregistration.k8s.io/v1/apiservices/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete an APIService", "operationId": "deleteAPIService", @@ -41507,7 +43860,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified APIService", "operationId": "readAPIService", @@ -41559,10 +43912,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified APIService", "operationId": "patchAPIService", @@ -41642,7 +43992,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified APIService", "operationId": "replaceAPIService", @@ -41717,7 +44067,7 @@ "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified APIService", "operationId": "readAPIServiceStatus", @@ -41769,10 +44119,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified APIService", "operationId": "patchAPIServiceStatus", @@ -41852,7 +44199,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified APIService", "operationId": "replaceAPIServiceStatus", @@ -42097,9 +44444,7 @@ "/apis/apps/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -42130,9 +44475,7 @@ "/apis/apps/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -42163,7 +44506,7 @@ "/apis/apps/v1/controllerrevisions": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ControllerRevision", "operationId": "listControllerRevisionForAllNamespaces", @@ -42281,7 +44624,7 @@ "/apis/apps/v1/daemonsets": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind DaemonSet", "operationId": "listDaemonSetForAllNamespaces", @@ -42399,7 +44742,7 @@ "/apis/apps/v1/deployments": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Deployment", "operationId": "listDeploymentForAllNamespaces", @@ -42517,7 +44860,7 @@ "/apis/apps/v1/namespaces/{namespace}/controllerrevisions": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ControllerRevision", "operationId": "deleteCollectionNamespacedControllerRevision", @@ -42646,7 +44989,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ControllerRevision", "operationId": "listNamespacedControllerRevision", @@ -42772,7 +45115,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ControllerRevision", "operationId": "createNamespacedControllerRevision", @@ -42853,7 +45196,7 @@ "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ControllerRevision", "operationId": "deleteNamespacedControllerRevision", @@ -42932,7 +45275,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ControllerRevision", "operationId": "readNamespacedControllerRevision", @@ -42992,10 +45335,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ControllerRevision", "operationId": "patchNamespacedControllerRevision", @@ -43075,7 +45415,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ControllerRevision", "operationId": "replaceNamespacedControllerRevision", @@ -43150,7 +45490,7 @@ "/apis/apps/v1/namespaces/{namespace}/daemonsets": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of DaemonSet", "operationId": "deleteCollectionNamespacedDaemonSet", @@ -43279,7 +45619,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind DaemonSet", "operationId": "listNamespacedDaemonSet", @@ -43405,7 +45745,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a DaemonSet", "operationId": "createNamespacedDaemonSet", @@ -43486,7 +45826,7 @@ "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a DaemonSet", "operationId": "deleteNamespacedDaemonSet", @@ -43565,7 +45905,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified DaemonSet", "operationId": "readNamespacedDaemonSet", @@ -43625,10 +45965,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified DaemonSet", "operationId": "patchNamespacedDaemonSet", @@ -43708,7 +46045,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified DaemonSet", "operationId": "replaceNamespacedDaemonSet", @@ -43783,7 +46120,7 @@ "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified DaemonSet", "operationId": "readNamespacedDaemonSetStatus", @@ -43843,10 +46180,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified DaemonSet", "operationId": "patchNamespacedDaemonSetStatus", @@ -43926,7 +46260,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified DaemonSet", "operationId": "replaceNamespacedDaemonSetStatus", @@ -44001,7 +46335,7 @@ "/apis/apps/v1/namespaces/{namespace}/deployments": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Deployment", "operationId": "deleteCollectionNamespacedDeployment", @@ -44130,7 +46464,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Deployment", "operationId": "listNamespacedDeployment", @@ -44256,7 +46590,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Deployment", "operationId": "createNamespacedDeployment", @@ -44337,7 +46671,7 @@ "/apis/apps/v1/namespaces/{namespace}/deployments/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a Deployment", "operationId": "deleteNamespacedDeployment", @@ -44416,7 +46750,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Deployment", "operationId": "readNamespacedDeployment", @@ -44476,10 +46810,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Deployment", "operationId": "patchNamespacedDeployment", @@ -44559,7 +46890,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Deployment", "operationId": "replaceNamespacedDeployment", @@ -44634,7 +46965,7 @@ "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read scale of the specified Deployment", "operationId": "readNamespacedDeploymentScale", @@ -44694,10 +47025,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update scale of the specified Deployment", "operationId": "patchNamespacedDeploymentScale", @@ -44777,7 +47105,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace scale of the specified Deployment", "operationId": "replaceNamespacedDeploymentScale", @@ -44852,7 +47180,7 @@ "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified Deployment", "operationId": "readNamespacedDeploymentStatus", @@ -44912,10 +47240,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified Deployment", "operationId": "patchNamespacedDeploymentStatus", @@ -44995,7 +47320,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified Deployment", "operationId": "replaceNamespacedDeploymentStatus", @@ -45070,7 +47395,7 @@ "/apis/apps/v1/namespaces/{namespace}/replicasets": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ReplicaSet", "operationId": "deleteCollectionNamespacedReplicaSet", @@ -45199,7 +47524,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ReplicaSet", "operationId": "listNamespacedReplicaSet", @@ -45325,7 +47650,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ReplicaSet", "operationId": "createNamespacedReplicaSet", @@ -45406,7 +47731,7 @@ "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ReplicaSet", "operationId": "deleteNamespacedReplicaSet", @@ -45485,7 +47810,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ReplicaSet", "operationId": "readNamespacedReplicaSet", @@ -45545,10 +47870,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ReplicaSet", "operationId": "patchNamespacedReplicaSet", @@ -45628,7 +47950,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ReplicaSet", "operationId": "replaceNamespacedReplicaSet", @@ -45703,7 +48025,7 @@ "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read scale of the specified ReplicaSet", "operationId": "readNamespacedReplicaSetScale", @@ -45763,10 +48085,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update scale of the specified ReplicaSet", "operationId": "patchNamespacedReplicaSetScale", @@ -45846,7 +48165,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace scale of the specified ReplicaSet", "operationId": "replaceNamespacedReplicaSetScale", @@ -45921,7 +48240,7 @@ "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified ReplicaSet", "operationId": "readNamespacedReplicaSetStatus", @@ -45981,10 +48300,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified ReplicaSet", "operationId": "patchNamespacedReplicaSetStatus", @@ -46064,7 +48380,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified ReplicaSet", "operationId": "replaceNamespacedReplicaSetStatus", @@ -46139,7 +48455,7 @@ "/apis/apps/v1/namespaces/{namespace}/statefulsets": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of StatefulSet", "operationId": "deleteCollectionNamespacedStatefulSet", @@ -46268,7 +48584,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind StatefulSet", "operationId": "listNamespacedStatefulSet", @@ -46394,7 +48710,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a StatefulSet", "operationId": "createNamespacedStatefulSet", @@ -46475,7 +48791,7 @@ "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a StatefulSet", "operationId": "deleteNamespacedStatefulSet", @@ -46554,7 +48870,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified StatefulSet", "operationId": "readNamespacedStatefulSet", @@ -46614,10 +48930,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified StatefulSet", "operationId": "patchNamespacedStatefulSet", @@ -46697,7 +49010,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified StatefulSet", "operationId": "replaceNamespacedStatefulSet", @@ -46772,7 +49085,7 @@ "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read scale of the specified StatefulSet", "operationId": "readNamespacedStatefulSetScale", @@ -46832,10 +49145,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update scale of the specified StatefulSet", "operationId": "patchNamespacedStatefulSetScale", @@ -46915,7 +49225,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace scale of the specified StatefulSet", "operationId": "replaceNamespacedStatefulSetScale", @@ -46990,7 +49300,7 @@ "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified StatefulSet", "operationId": "readNamespacedStatefulSetStatus", @@ -47050,10 +49360,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified StatefulSet", "operationId": "patchNamespacedStatefulSetStatus", @@ -47133,7 +49440,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified StatefulSet", "operationId": "replaceNamespacedStatefulSetStatus", @@ -47208,7 +49515,7 @@ "/apis/apps/v1/replicasets": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ReplicaSet", "operationId": "listReplicaSetForAllNamespaces", @@ -47326,7 +49633,7 @@ "/apis/apps/v1/statefulsets": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind StatefulSet", "operationId": "listStatefulSetForAllNamespaces", @@ -48779,9 +51086,7 @@ "/apis/authentication.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -48812,9 +51117,7 @@ "/apis/authentication.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -48842,6 +51145,96 @@ ] } }, + "/apis/authentication.k8s.io/v1/selfsubjectreviews": { + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "application/json" + ], + "description": "create a SelfSubjectReview", + "operationId": "createSelfSubjectReview", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.SelfSubjectReview" + } + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.SelfSubjectReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.SelfSubjectReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.SelfSubjectReview" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "authentication_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "authentication.k8s.io", + "kind": "SelfSubjectReview", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, "/apis/authentication.k8s.io/v1/tokenreviews": { "parameters": [ { @@ -48875,7 +51268,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a TokenReview", "operationId": "createTokenReview", @@ -48935,9 +51328,7 @@ "/apis/authentication.k8s.io/v1alpha1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -48998,7 +51389,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a SelfSubjectReview", "operationId": "createSelfSubjectReview", @@ -49058,9 +51449,7 @@ "/apis/authentication.k8s.io/v1beta1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -49121,7 +51510,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a SelfSubjectReview", "operationId": "createSelfSubjectReview", @@ -49181,9 +51570,7 @@ "/apis/authorization.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -49214,9 +51601,7 @@ "/apis/authorization.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -49285,7 +51670,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a LocalSubjectAccessReview", "operationId": "createNamespacedLocalSubjectAccessReview", @@ -49375,7 +51760,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a SelfSubjectAccessReview", "operationId": "createSelfSubjectAccessReview", @@ -49465,7 +51850,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a SelfSubjectRulesReview", "operationId": "createSelfSubjectRulesReview", @@ -49555,7 +51940,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a SubjectAccessReview", "operationId": "createSubjectAccessReview", @@ -49615,9 +52000,7 @@ "/apis/autoscaling/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -49648,9 +52031,7 @@ "/apis/autoscaling/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -49681,7 +52062,7 @@ "/apis/autoscaling/v1/horizontalpodautoscalers": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind HorizontalPodAutoscaler", "operationId": "listHorizontalPodAutoscalerForAllNamespaces", @@ -49799,7 +52180,7 @@ "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of HorizontalPodAutoscaler", "operationId": "deleteCollectionNamespacedHorizontalPodAutoscaler", @@ -49928,7 +52309,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind HorizontalPodAutoscaler", "operationId": "listNamespacedHorizontalPodAutoscaler", @@ -50054,7 +52435,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a HorizontalPodAutoscaler", "operationId": "createNamespacedHorizontalPodAutoscaler", @@ -50135,7 +52516,7 @@ "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a HorizontalPodAutoscaler", "operationId": "deleteNamespacedHorizontalPodAutoscaler", @@ -50214,7 +52595,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified HorizontalPodAutoscaler", "operationId": "readNamespacedHorizontalPodAutoscaler", @@ -50274,10 +52655,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified HorizontalPodAutoscaler", "operationId": "patchNamespacedHorizontalPodAutoscaler", @@ -50357,7 +52735,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified HorizontalPodAutoscaler", "operationId": "replaceNamespacedHorizontalPodAutoscaler", @@ -50432,7 +52810,7 @@ "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified HorizontalPodAutoscaler", "operationId": "readNamespacedHorizontalPodAutoscalerStatus", @@ -50492,10 +52870,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified HorizontalPodAutoscaler", "operationId": "patchNamespacedHorizontalPodAutoscalerStatus", @@ -50575,7 +52950,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified HorizontalPodAutoscaler", "operationId": "replaceNamespacedHorizontalPodAutoscalerStatus", @@ -50917,9 +53292,7 @@ "/apis/autoscaling/v2/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -50950,7 +53323,7 @@ "/apis/autoscaling/v2/horizontalpodautoscalers": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind HorizontalPodAutoscaler", "operationId": "listHorizontalPodAutoscalerForAllNamespaces", @@ -51068,7 +53441,7 @@ "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of HorizontalPodAutoscaler", "operationId": "deleteCollectionNamespacedHorizontalPodAutoscaler", @@ -51197,7 +53570,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind HorizontalPodAutoscaler", "operationId": "listNamespacedHorizontalPodAutoscaler", @@ -51323,7 +53696,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a HorizontalPodAutoscaler", "operationId": "createNamespacedHorizontalPodAutoscaler", @@ -51404,7 +53777,7 @@ "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a HorizontalPodAutoscaler", "operationId": "deleteNamespacedHorizontalPodAutoscaler", @@ -51483,7 +53856,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified HorizontalPodAutoscaler", "operationId": "readNamespacedHorizontalPodAutoscaler", @@ -51543,10 +53916,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified HorizontalPodAutoscaler", "operationId": "patchNamespacedHorizontalPodAutoscaler", @@ -51626,7 +53996,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified HorizontalPodAutoscaler", "operationId": "replaceNamespacedHorizontalPodAutoscaler", @@ -51701,7 +54071,7 @@ "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified HorizontalPodAutoscaler", "operationId": "readNamespacedHorizontalPodAutoscalerStatus", @@ -51761,10 +54131,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified HorizontalPodAutoscaler", "operationId": "patchNamespacedHorizontalPodAutoscalerStatus", @@ -51844,7 +54211,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified HorizontalPodAutoscaler", "operationId": "replaceNamespacedHorizontalPodAutoscalerStatus", @@ -52186,9 +54553,7 @@ "/apis/batch/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -52219,9 +54584,7 @@ "/apis/batch/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -52252,7 +54615,7 @@ "/apis/batch/v1/cronjobs": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind CronJob", "operationId": "listCronJobForAllNamespaces", @@ -52370,7 +54733,7 @@ "/apis/batch/v1/jobs": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Job", "operationId": "listJobForAllNamespaces", @@ -52488,7 +54851,7 @@ "/apis/batch/v1/namespaces/{namespace}/cronjobs": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of CronJob", "operationId": "deleteCollectionNamespacedCronJob", @@ -52617,7 +54980,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind CronJob", "operationId": "listNamespacedCronJob", @@ -52743,7 +55106,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a CronJob", "operationId": "createNamespacedCronJob", @@ -52824,7 +55187,7 @@ "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a CronJob", "operationId": "deleteNamespacedCronJob", @@ -52903,7 +55266,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified CronJob", "operationId": "readNamespacedCronJob", @@ -52963,10 +55326,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified CronJob", "operationId": "patchNamespacedCronJob", @@ -53046,7 +55406,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified CronJob", "operationId": "replaceNamespacedCronJob", @@ -53121,7 +55481,7 @@ "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified CronJob", "operationId": "readNamespacedCronJobStatus", @@ -53181,10 +55541,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified CronJob", "operationId": "patchNamespacedCronJobStatus", @@ -53264,7 +55621,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified CronJob", "operationId": "replaceNamespacedCronJobStatus", @@ -53339,7 +55696,7 @@ "/apis/batch/v1/namespaces/{namespace}/jobs": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Job", "operationId": "deleteCollectionNamespacedJob", @@ -53468,7 +55825,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Job", "operationId": "listNamespacedJob", @@ -53594,7 +55951,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Job", "operationId": "createNamespacedJob", @@ -53675,7 +56032,7 @@ "/apis/batch/v1/namespaces/{namespace}/jobs/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a Job", "operationId": "deleteNamespacedJob", @@ -53754,7 +56111,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Job", "operationId": "readNamespacedJob", @@ -53814,10 +56171,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Job", "operationId": "patchNamespacedJob", @@ -53897,7 +56251,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Job", "operationId": "replaceNamespacedJob", @@ -53972,7 +56326,7 @@ "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified Job", "operationId": "readNamespacedJobStatus", @@ -54032,10 +56386,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified Job", "operationId": "patchNamespacedJobStatus", @@ -54115,7 +56466,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified Job", "operationId": "replaceNamespacedJobStatus", @@ -54724,9 +57075,7 @@ "/apis/certificates.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -54757,9 +57106,7 @@ "/apis/certificates.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -54790,7 +57137,7 @@ "/apis/certificates.k8s.io/v1/certificatesigningrequests": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of CertificateSigningRequest", "operationId": "deleteCollectionCertificateSigningRequest", @@ -54919,7 +57266,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind CertificateSigningRequest", "operationId": "listCertificateSigningRequest", @@ -55037,7 +57384,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a CertificateSigningRequest", "operationId": "createCertificateSigningRequest", @@ -55118,7 +57465,7 @@ "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a CertificateSigningRequest", "operationId": "deleteCertificateSigningRequest", @@ -55197,7 +57544,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified CertificateSigningRequest", "operationId": "readCertificateSigningRequest", @@ -55249,10 +57596,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified CertificateSigningRequest", "operationId": "patchCertificateSigningRequest", @@ -55332,7 +57676,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified CertificateSigningRequest", "operationId": "replaceCertificateSigningRequest", @@ -55407,7 +57751,7 @@ "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read approval of the specified CertificateSigningRequest", "operationId": "readCertificateSigningRequestApproval", @@ -55459,10 +57803,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update approval of the specified CertificateSigningRequest", "operationId": "patchCertificateSigningRequestApproval", @@ -55542,7 +57883,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace approval of the specified CertificateSigningRequest", "operationId": "replaceCertificateSigningRequestApproval", @@ -55617,7 +57958,7 @@ "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified CertificateSigningRequest", "operationId": "readCertificateSigningRequestStatus", @@ -55669,10 +58010,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified CertificateSigningRequest", "operationId": "patchCertificateSigningRequestStatus", @@ -55752,7 +58090,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified CertificateSigningRequest", "operationId": "replaceCertificateSigningRequestStatus", @@ -55997,9 +58335,7 @@ "/apis/certificates.k8s.io/v1alpha1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -56030,7 +58366,7 @@ "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ClusterTrustBundle", "operationId": "deleteCollectionClusterTrustBundle", @@ -56159,7 +58495,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ClusterTrustBundle", "operationId": "listClusterTrustBundle", @@ -56277,7 +58613,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ClusterTrustBundle", "operationId": "createClusterTrustBundle", @@ -56358,7 +58694,7 @@ "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ClusterTrustBundle", "operationId": "deleteClusterTrustBundle", @@ -56437,7 +58773,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ClusterTrustBundle", "operationId": "readClusterTrustBundle", @@ -56489,10 +58825,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ClusterTrustBundle", "operationId": "patchClusterTrustBundle", @@ -56572,7 +58905,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ClusterTrustBundle", "operationId": "replaceClusterTrustBundle", @@ -56817,9 +59150,7 @@ "/apis/coordination.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -56850,9 +59181,7 @@ "/apis/coordination.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -56883,7 +59212,7 @@ "/apis/coordination.k8s.io/v1/leases": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Lease", "operationId": "listLeaseForAllNamespaces", @@ -57001,7 +59330,7 @@ "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Lease", "operationId": "deleteCollectionNamespacedLease", @@ -57130,7 +59459,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Lease", "operationId": "listNamespacedLease", @@ -57256,7 +59585,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Lease", "operationId": "createNamespacedLease", @@ -57337,7 +59666,7 @@ "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a Lease", "operationId": "deleteNamespacedLease", @@ -57416,7 +59745,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Lease", "operationId": "readNamespacedLease", @@ -57476,10 +59805,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Lease", "operationId": "patchNamespacedLease", @@ -57559,7 +59885,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Lease", "operationId": "replaceNamespacedLease", @@ -57901,9 +60227,7 @@ "/apis/discovery.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -57934,9 +60258,7 @@ "/apis/discovery.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -57967,7 +60289,7 @@ "/apis/discovery.k8s.io/v1/endpointslices": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind EndpointSlice", "operationId": "listEndpointSliceForAllNamespaces", @@ -58085,7 +60407,7 @@ "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of EndpointSlice", "operationId": "deleteCollectionNamespacedEndpointSlice", @@ -58214,7 +60536,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind EndpointSlice", "operationId": "listNamespacedEndpointSlice", @@ -58340,7 +60662,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create an EndpointSlice", "operationId": "createNamespacedEndpointSlice", @@ -58421,7 +60743,7 @@ "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete an EndpointSlice", "operationId": "deleteNamespacedEndpointSlice", @@ -58500,7 +60822,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified EndpointSlice", "operationId": "readNamespacedEndpointSlice", @@ -58560,10 +60882,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified EndpointSlice", "operationId": "patchNamespacedEndpointSlice", @@ -58643,7 +60962,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified EndpointSlice", "operationId": "replaceNamespacedEndpointSlice", @@ -58985,9 +61304,7 @@ "/apis/events.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -59018,9 +61335,7 @@ "/apis/events.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -59051,7 +61366,7 @@ "/apis/events.k8s.io/v1/events": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Event", "operationId": "listEventForAllNamespaces", @@ -59169,7 +61484,7 @@ "/apis/events.k8s.io/v1/namespaces/{namespace}/events": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Event", "operationId": "deleteCollectionNamespacedEvent", @@ -59298,7 +61613,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Event", "operationId": "listNamespacedEvent", @@ -59424,7 +61739,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create an Event", "operationId": "createNamespacedEvent", @@ -59505,7 +61820,7 @@ "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete an Event", "operationId": "deleteNamespacedEvent", @@ -59584,7 +61899,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Event", "operationId": "readNamespacedEvent", @@ -59644,10 +61959,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Event", "operationId": "patchNamespacedEvent", @@ -59727,7 +62039,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Event", "operationId": "replaceNamespacedEvent", @@ -60069,9 +62381,7 @@ "/apis/flowcontrol.apiserver.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -60102,9 +62412,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta2/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -60135,7 +62443,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of FlowSchema", "operationId": "deleteCollectionFlowSchema", @@ -60264,7 +62572,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind FlowSchema", "operationId": "listFlowSchema", @@ -60382,7 +62690,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a FlowSchema", "operationId": "createFlowSchema", @@ -60463,7 +62771,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a FlowSchema", "operationId": "deleteFlowSchema", @@ -60542,7 +62850,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified FlowSchema", "operationId": "readFlowSchema", @@ -60594,10 +62902,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified FlowSchema", "operationId": "patchFlowSchema", @@ -60677,7 +62982,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified FlowSchema", "operationId": "replaceFlowSchema", @@ -60752,7 +63057,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta2/flowschemas/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified FlowSchema", "operationId": "readFlowSchemaStatus", @@ -60804,10 +63109,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified FlowSchema", "operationId": "patchFlowSchemaStatus", @@ -60887,7 +63189,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified FlowSchema", "operationId": "replaceFlowSchemaStatus", @@ -60962,7 +63264,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of PriorityLevelConfiguration", "operationId": "deleteCollectionPriorityLevelConfiguration", @@ -61091,7 +63393,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PriorityLevelConfiguration", "operationId": "listPriorityLevelConfiguration", @@ -61209,7 +63511,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a PriorityLevelConfiguration", "operationId": "createPriorityLevelConfiguration", @@ -61290,7 +63592,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a PriorityLevelConfiguration", "operationId": "deletePriorityLevelConfiguration", @@ -61369,7 +63671,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified PriorityLevelConfiguration", "operationId": "readPriorityLevelConfiguration", @@ -61421,10 +63723,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified PriorityLevelConfiguration", "operationId": "patchPriorityLevelConfiguration", @@ -61504,7 +63803,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified PriorityLevelConfiguration", "operationId": "replacePriorityLevelConfiguration", @@ -61579,7 +63878,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified PriorityLevelConfiguration", "operationId": "readPriorityLevelConfigurationStatus", @@ -61631,10 +63930,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified PriorityLevelConfiguration", "operationId": "patchPriorityLevelConfigurationStatus", @@ -61714,7 +64010,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified PriorityLevelConfiguration", "operationId": "replacePriorityLevelConfigurationStatus", @@ -62129,9 +64425,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta3/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -62162,7 +64456,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of FlowSchema", "operationId": "deleteCollectionFlowSchema", @@ -62291,7 +64585,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind FlowSchema", "operationId": "listFlowSchema", @@ -62409,7 +64703,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a FlowSchema", "operationId": "createFlowSchema", @@ -62490,7 +64784,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a FlowSchema", "operationId": "deleteFlowSchema", @@ -62569,7 +64863,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified FlowSchema", "operationId": "readFlowSchema", @@ -62621,10 +64915,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified FlowSchema", "operationId": "patchFlowSchema", @@ -62704,7 +64995,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified FlowSchema", "operationId": "replaceFlowSchema", @@ -62779,7 +65070,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified FlowSchema", "operationId": "readFlowSchemaStatus", @@ -62831,10 +65122,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified FlowSchema", "operationId": "patchFlowSchemaStatus", @@ -62914,7 +65202,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified FlowSchema", "operationId": "replaceFlowSchemaStatus", @@ -62989,7 +65277,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of PriorityLevelConfiguration", "operationId": "deleteCollectionPriorityLevelConfiguration", @@ -63118,7 +65406,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PriorityLevelConfiguration", "operationId": "listPriorityLevelConfiguration", @@ -63236,7 +65524,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a PriorityLevelConfiguration", "operationId": "createPriorityLevelConfiguration", @@ -63317,7 +65605,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a PriorityLevelConfiguration", "operationId": "deletePriorityLevelConfiguration", @@ -63396,7 +65684,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified PriorityLevelConfiguration", "operationId": "readPriorityLevelConfiguration", @@ -63448,10 +65736,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified PriorityLevelConfiguration", "operationId": "patchPriorityLevelConfiguration", @@ -63531,7 +65816,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified PriorityLevelConfiguration", "operationId": "replacePriorityLevelConfiguration", @@ -63606,7 +65891,7 @@ "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified PriorityLevelConfiguration", "operationId": "readPriorityLevelConfigurationStatus", @@ -63658,10 +65943,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified PriorityLevelConfiguration", "operationId": "patchPriorityLevelConfigurationStatus", @@ -63741,7 +66023,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified PriorityLevelConfiguration", "operationId": "replacePriorityLevelConfigurationStatus", @@ -64156,9 +66438,7 @@ "/apis/internal.apiserver.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -64189,9 +66469,7 @@ "/apis/internal.apiserver.k8s.io/v1alpha1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -64222,7 +66500,7 @@ "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of StorageVersion", "operationId": "deleteCollectionStorageVersion", @@ -64351,7 +66629,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind StorageVersion", "operationId": "listStorageVersion", @@ -64469,7 +66747,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a StorageVersion", "operationId": "createStorageVersion", @@ -64550,7 +66828,7 @@ "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a StorageVersion", "operationId": "deleteStorageVersion", @@ -64629,7 +66907,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified StorageVersion", "operationId": "readStorageVersion", @@ -64681,10 +66959,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified StorageVersion", "operationId": "patchStorageVersion", @@ -64764,7 +67039,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified StorageVersion", "operationId": "replaceStorageVersion", @@ -64839,7 +67114,7 @@ "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified StorageVersion", "operationId": "readStorageVersionStatus", @@ -64891,10 +67166,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified StorageVersion", "operationId": "patchStorageVersionStatus", @@ -64974,7 +67246,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified StorageVersion", "operationId": "replaceStorageVersionStatus", @@ -65219,9 +67491,7 @@ "/apis/networking.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -65252,9 +67522,7 @@ "/apis/networking.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -65285,7 +67553,7 @@ "/apis/networking.k8s.io/v1/ingressclasses": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of IngressClass", "operationId": "deleteCollectionIngressClass", @@ -65414,7 +67682,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind IngressClass", "operationId": "listIngressClass", @@ -65532,7 +67800,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create an IngressClass", "operationId": "createIngressClass", @@ -65613,7 +67881,7 @@ "/apis/networking.k8s.io/v1/ingressclasses/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete an IngressClass", "operationId": "deleteIngressClass", @@ -65692,7 +67960,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified IngressClass", "operationId": "readIngressClass", @@ -65744,10 +68012,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified IngressClass", "operationId": "patchIngressClass", @@ -65827,7 +68092,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified IngressClass", "operationId": "replaceIngressClass", @@ -65902,7 +68167,7 @@ "/apis/networking.k8s.io/v1/ingresses": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Ingress", "operationId": "listIngressForAllNamespaces", @@ -66020,7 +68285,7 @@ "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Ingress", "operationId": "deleteCollectionNamespacedIngress", @@ -66149,7 +68414,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Ingress", "operationId": "listNamespacedIngress", @@ -66275,7 +68540,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create an Ingress", "operationId": "createNamespacedIngress", @@ -66356,7 +68621,7 @@ "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete an Ingress", "operationId": "deleteNamespacedIngress", @@ -66435,7 +68700,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Ingress", "operationId": "readNamespacedIngress", @@ -66495,10 +68760,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Ingress", "operationId": "patchNamespacedIngress", @@ -66578,7 +68840,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Ingress", "operationId": "replaceNamespacedIngress", @@ -66653,7 +68915,7 @@ "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified Ingress", "operationId": "readNamespacedIngressStatus", @@ -66713,10 +68975,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified Ingress", "operationId": "patchNamespacedIngressStatus", @@ -66796,7 +69055,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified Ingress", "operationId": "replaceNamespacedIngressStatus", @@ -66871,7 +69130,7 @@ "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of NetworkPolicy", "operationId": "deleteCollectionNamespacedNetworkPolicy", @@ -67000,7 +69259,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind NetworkPolicy", "operationId": "listNamespacedNetworkPolicy", @@ -67126,7 +69385,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a NetworkPolicy", "operationId": "createNamespacedNetworkPolicy", @@ -67179,309 +69438,12 @@ "$ref": "#/definitions/v1.NetworkPolicy" } }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a NetworkPolicy", - "operationId": "deleteNamespacedNetworkPolicy", - "parameters": [ - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/v1.DeleteOptions" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified NetworkPolicy", - "operationId": "readNamespacedNetworkPolicy", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "parameters": [ - { - "description": "name of the NetworkPolicy", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed.", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified NetworkPolicy", - "operationId": "patchNamespacedNetworkPolicy", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1.Patch" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified NetworkPolicy", - "operationId": "replaceNamespacedNetworkPolicy", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" - } - }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.NetworkPolicy" + } + }, "401": { "description": "Unauthorized" } @@ -67492,7 +69454,7 @@ "tags": [ "networking_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", "kind": "NetworkPolicy", @@ -67501,13 +69463,92 @@ "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}/status": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}": { + "delete": { + "consumes": [ + "application/json" + ], + "description": "delete a NetworkPolicy", + "operationId": "deleteNamespacedNetworkPolicy", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, "get": { "consumes": [ - "*/*" + "application/json" ], - "description": "read status of the specified NetworkPolicy", - "operationId": "readNamespacedNetworkPolicyStatus", + "description": "read the specified NetworkPolicy", + "operationId": "readNamespacedNetworkPolicy", "produces": [ "application/json", "application/yaml", @@ -67564,13 +69605,10 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], - "description": "partially update status of the specified NetworkPolicy", - "operationId": "patchNamespacedNetworkPolicyStatus", + "description": "partially update the specified NetworkPolicy", + "operationId": "patchNamespacedNetworkPolicy", "parameters": [ { "in": "body", @@ -67647,10 +69685,10 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], - "description": "replace status of the specified NetworkPolicy", - "operationId": "replaceNamespacedNetworkPolicyStatus", + "description": "replace the specified NetworkPolicy", + "operationId": "replaceNamespacedNetworkPolicy", "parameters": [ { "in": "body", @@ -67722,7 +69760,7 @@ "/apis/networking.k8s.io/v1/networkpolicies": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind NetworkPolicy", "operationId": "listNetworkPolicyForAllNamespaces", @@ -68544,9 +70582,7 @@ "/apis/networking.k8s.io/v1alpha1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -68577,7 +70613,7 @@ "/apis/networking.k8s.io/v1alpha1/clustercidrs": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ClusterCIDR", "operationId": "deleteCollectionClusterCIDR", @@ -68706,7 +70742,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ClusterCIDR", "operationId": "listClusterCIDR", @@ -68824,7 +70860,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ClusterCIDR", "operationId": "createClusterCIDR", @@ -68905,7 +70941,7 @@ "/apis/networking.k8s.io/v1alpha1/clustercidrs/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ClusterCIDR", "operationId": "deleteClusterCIDR", @@ -68984,7 +71020,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ClusterCIDR", "operationId": "readClusterCIDR", @@ -69036,10 +71072,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ClusterCIDR", "operationId": "patchClusterCIDR", @@ -69119,7 +71152,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ClusterCIDR", "operationId": "replaceClusterCIDR", @@ -69194,7 +71227,7 @@ "/apis/networking.k8s.io/v1alpha1/ipaddresses": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of IPAddress", "operationId": "deleteCollectionIPAddress", @@ -69323,7 +71356,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind IPAddress", "operationId": "listIPAddress", @@ -69441,7 +71474,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create an IPAddress", "operationId": "createIPAddress", @@ -69522,7 +71555,7 @@ "/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete an IPAddress", "operationId": "deleteIPAddress", @@ -69601,7 +71634,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified IPAddress", "operationId": "readIPAddress", @@ -69653,10 +71686,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified IPAddress", "operationId": "patchIPAddress", @@ -69736,7 +71766,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified IPAddress", "operationId": "replaceIPAddress", @@ -70151,9 +72181,7 @@ "/apis/node.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -70184,9 +72212,7 @@ "/apis/node.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -70217,7 +72243,7 @@ "/apis/node.k8s.io/v1/runtimeclasses": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of RuntimeClass", "operationId": "deleteCollectionRuntimeClass", @@ -70346,7 +72372,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind RuntimeClass", "operationId": "listRuntimeClass", @@ -70464,7 +72490,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a RuntimeClass", "operationId": "createRuntimeClass", @@ -70545,7 +72571,7 @@ "/apis/node.k8s.io/v1/runtimeclasses/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a RuntimeClass", "operationId": "deleteRuntimeClass", @@ -70624,7 +72650,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified RuntimeClass", "operationId": "readRuntimeClass", @@ -70676,10 +72702,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified RuntimeClass", "operationId": "patchRuntimeClass", @@ -70759,7 +72782,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified RuntimeClass", "operationId": "replaceRuntimeClass", @@ -71004,9 +73027,7 @@ "/apis/policy/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -71037,9 +73058,7 @@ "/apis/policy/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -71070,7 +73089,7 @@ "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of PodDisruptionBudget", "operationId": "deleteCollectionNamespacedPodDisruptionBudget", @@ -71199,7 +73218,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PodDisruptionBudget", "operationId": "listNamespacedPodDisruptionBudget", @@ -71325,7 +73344,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a PodDisruptionBudget", "operationId": "createNamespacedPodDisruptionBudget", @@ -71406,7 +73425,7 @@ "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a PodDisruptionBudget", "operationId": "deleteNamespacedPodDisruptionBudget", @@ -71485,7 +73504,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified PodDisruptionBudget", "operationId": "readNamespacedPodDisruptionBudget", @@ -71545,10 +73564,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified PodDisruptionBudget", "operationId": "patchNamespacedPodDisruptionBudget", @@ -71628,7 +73644,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified PodDisruptionBudget", "operationId": "replaceNamespacedPodDisruptionBudget", @@ -71703,7 +73719,7 @@ "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified PodDisruptionBudget", "operationId": "readNamespacedPodDisruptionBudgetStatus", @@ -71763,10 +73779,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified PodDisruptionBudget", "operationId": "patchNamespacedPodDisruptionBudgetStatus", @@ -71846,7 +73859,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified PodDisruptionBudget", "operationId": "replaceNamespacedPodDisruptionBudgetStatus", @@ -71921,7 +73934,7 @@ "/apis/policy/v1/poddisruptionbudgets": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PodDisruptionBudget", "operationId": "listPodDisruptionBudgetForAllNamespaces", @@ -72306,9 +74319,7 @@ "/apis/rbac.authorization.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -72339,9 +74350,7 @@ "/apis/rbac.authorization.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -72372,7 +74381,7 @@ "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ClusterRoleBinding", "operationId": "deleteCollectionClusterRoleBinding", @@ -72501,7 +74510,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ClusterRoleBinding", "operationId": "listClusterRoleBinding", @@ -72619,7 +74628,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ClusterRoleBinding", "operationId": "createClusterRoleBinding", @@ -72700,7 +74709,7 @@ "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ClusterRoleBinding", "operationId": "deleteClusterRoleBinding", @@ -72779,7 +74788,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ClusterRoleBinding", "operationId": "readClusterRoleBinding", @@ -72831,10 +74840,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ClusterRoleBinding", "operationId": "patchClusterRoleBinding", @@ -72914,7 +74920,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ClusterRoleBinding", "operationId": "replaceClusterRoleBinding", @@ -72989,7 +74995,7 @@ "/apis/rbac.authorization.k8s.io/v1/clusterroles": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ClusterRole", "operationId": "deleteCollectionClusterRole", @@ -73118,7 +75124,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ClusterRole", "operationId": "listClusterRole", @@ -73236,7 +75242,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ClusterRole", "operationId": "createClusterRole", @@ -73317,7 +75323,7 @@ "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ClusterRole", "operationId": "deleteClusterRole", @@ -73396,7 +75402,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ClusterRole", "operationId": "readClusterRole", @@ -73448,10 +75454,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ClusterRole", "operationId": "patchClusterRole", @@ -73531,7 +75534,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ClusterRole", "operationId": "replaceClusterRole", @@ -73606,7 +75609,7 @@ "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of RoleBinding", "operationId": "deleteCollectionNamespacedRoleBinding", @@ -73735,7 +75738,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind RoleBinding", "operationId": "listNamespacedRoleBinding", @@ -73861,7 +75864,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a RoleBinding", "operationId": "createNamespacedRoleBinding", @@ -73942,7 +75945,7 @@ "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a RoleBinding", "operationId": "deleteNamespacedRoleBinding", @@ -74021,7 +76024,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified RoleBinding", "operationId": "readNamespacedRoleBinding", @@ -74081,10 +76084,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified RoleBinding", "operationId": "patchNamespacedRoleBinding", @@ -74164,7 +76164,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified RoleBinding", "operationId": "replaceNamespacedRoleBinding", @@ -74239,7 +76239,7 @@ "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of Role", "operationId": "deleteCollectionNamespacedRole", @@ -74368,7 +76368,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Role", "operationId": "listNamespacedRole", @@ -74494,7 +76494,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a Role", "operationId": "createNamespacedRole", @@ -74575,7 +76575,7 @@ "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a Role", "operationId": "deleteNamespacedRole", @@ -74654,7 +76654,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified Role", "operationId": "readNamespacedRole", @@ -74714,10 +76714,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified Role", "operationId": "patchNamespacedRole", @@ -74797,7 +76794,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified Role", "operationId": "replaceNamespacedRole", @@ -74872,7 +76869,7 @@ "/apis/rbac.authorization.k8s.io/v1/rolebindings": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind RoleBinding", "operationId": "listRoleBindingForAllNamespaces", @@ -74990,7 +76987,7 @@ "/apis/rbac.authorization.k8s.io/v1/roles": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind Role", "operationId": "listRoleForAllNamespaces", @@ -75982,9 +77979,7 @@ "/apis/resource.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -76015,9 +78010,7 @@ "/apis/resource.k8s.io/v1alpha2/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -76048,7 +78041,7 @@ "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of PodSchedulingContext", "operationId": "deleteCollectionNamespacedPodSchedulingContext", @@ -76177,7 +78170,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PodSchedulingContext", "operationId": "listNamespacedPodSchedulingContext", @@ -76303,7 +78296,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a PodSchedulingContext", "operationId": "createNamespacedPodSchedulingContext", @@ -76384,7 +78377,7 @@ "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a PodSchedulingContext", "operationId": "deleteNamespacedPodSchedulingContext", @@ -76463,7 +78456,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified PodSchedulingContext", "operationId": "readNamespacedPodSchedulingContext", @@ -76523,10 +78516,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified PodSchedulingContext", "operationId": "patchNamespacedPodSchedulingContext", @@ -76606,7 +78596,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified PodSchedulingContext", "operationId": "replaceNamespacedPodSchedulingContext", @@ -76681,7 +78671,7 @@ "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified PodSchedulingContext", "operationId": "readNamespacedPodSchedulingContextStatus", @@ -76741,10 +78731,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified PodSchedulingContext", "operationId": "patchNamespacedPodSchedulingContextStatus", @@ -76824,7 +78811,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified PodSchedulingContext", "operationId": "replaceNamespacedPodSchedulingContextStatus", @@ -76899,7 +78886,7 @@ "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ResourceClaim", "operationId": "deleteCollectionNamespacedResourceClaim", @@ -77028,7 +79015,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ResourceClaim", "operationId": "listNamespacedResourceClaim", @@ -77154,7 +79141,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ResourceClaim", "operationId": "createNamespacedResourceClaim", @@ -77235,7 +79222,7 @@ "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ResourceClaim", "operationId": "deleteNamespacedResourceClaim", @@ -77314,7 +79301,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ResourceClaim", "operationId": "readNamespacedResourceClaim", @@ -77374,10 +79361,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ResourceClaim", "operationId": "patchNamespacedResourceClaim", @@ -77457,7 +79441,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ResourceClaim", "operationId": "replaceNamespacedResourceClaim", @@ -77532,7 +79516,7 @@ "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified ResourceClaim", "operationId": "readNamespacedResourceClaimStatus", @@ -77592,10 +79576,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified ResourceClaim", "operationId": "patchNamespacedResourceClaimStatus", @@ -77675,7 +79656,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified ResourceClaim", "operationId": "replaceNamespacedResourceClaimStatus", @@ -77750,7 +79731,7 @@ "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ResourceClaimTemplate", "operationId": "deleteCollectionNamespacedResourceClaimTemplate", @@ -77879,7 +79860,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ResourceClaimTemplate", "operationId": "listNamespacedResourceClaimTemplate", @@ -78005,7 +79986,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ResourceClaimTemplate", "operationId": "createNamespacedResourceClaimTemplate", @@ -78086,7 +80067,7 @@ "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ResourceClaimTemplate", "operationId": "deleteNamespacedResourceClaimTemplate", @@ -78165,7 +80146,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ResourceClaimTemplate", "operationId": "readNamespacedResourceClaimTemplate", @@ -78225,10 +80206,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ResourceClaimTemplate", "operationId": "patchNamespacedResourceClaimTemplate", @@ -78308,7 +80286,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ResourceClaimTemplate", "operationId": "replaceNamespacedResourceClaimTemplate", @@ -78383,7 +80361,7 @@ "/apis/resource.k8s.io/v1alpha2/podschedulingcontexts": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PodSchedulingContext", "operationId": "listPodSchedulingContextForAllNamespaces", @@ -78501,7 +80479,7 @@ "/apis/resource.k8s.io/v1alpha2/resourceclaims": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ResourceClaim", "operationId": "listResourceClaimForAllNamespaces", @@ -78619,7 +80597,7 @@ "/apis/resource.k8s.io/v1alpha2/resourceclaimtemplates": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ResourceClaimTemplate", "operationId": "listResourceClaimTemplateForAllNamespaces", @@ -78737,7 +80715,7 @@ "/apis/resource.k8s.io/v1alpha2/resourceclasses": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of ResourceClass", "operationId": "deleteCollectionResourceClass", @@ -78866,7 +80844,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind ResourceClass", "operationId": "listResourceClass", @@ -78984,7 +80962,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a ResourceClass", "operationId": "createResourceClass", @@ -79065,7 +81043,7 @@ "/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a ResourceClass", "operationId": "deleteResourceClass", @@ -79144,7 +81122,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified ResourceClass", "operationId": "readResourceClass", @@ -79196,10 +81174,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified ResourceClass", "operationId": "patchResourceClass", @@ -79279,7 +81254,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified ResourceClass", "operationId": "replaceResourceClass", @@ -80325,9 +82300,7 @@ "/apis/scheduling.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -80358,9 +82331,7 @@ "/apis/scheduling.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -80391,7 +82362,7 @@ "/apis/scheduling.k8s.io/v1/priorityclasses": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of PriorityClass", "operationId": "deleteCollectionPriorityClass", @@ -80520,7 +82491,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind PriorityClass", "operationId": "listPriorityClass", @@ -80638,7 +82609,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a PriorityClass", "operationId": "createPriorityClass", @@ -80719,7 +82690,7 @@ "/apis/scheduling.k8s.io/v1/priorityclasses/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a PriorityClass", "operationId": "deletePriorityClass", @@ -80798,7 +82769,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified PriorityClass", "operationId": "readPriorityClass", @@ -80850,10 +82821,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified PriorityClass", "operationId": "patchPriorityClass", @@ -80933,7 +82901,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified PriorityClass", "operationId": "replacePriorityClass", @@ -81178,9 +83146,7 @@ "/apis/storage.k8s.io/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get information of a group", "operationId": "getAPIGroup", @@ -81211,9 +83177,7 @@ "/apis/storage.k8s.io/v1/": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json" ], "description": "get available resources", "operationId": "getAPIResources", @@ -81244,7 +83208,7 @@ "/apis/storage.k8s.io/v1/csidrivers": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of CSIDriver", "operationId": "deleteCollectionCSIDriver", @@ -81373,7 +83337,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind CSIDriver", "operationId": "listCSIDriver", @@ -81491,7 +83455,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a CSIDriver", "operationId": "createCSIDriver", @@ -81572,7 +83536,7 @@ "/apis/storage.k8s.io/v1/csidrivers/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a CSIDriver", "operationId": "deleteCSIDriver", @@ -81651,7 +83615,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified CSIDriver", "operationId": "readCSIDriver", @@ -81703,10 +83667,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified CSIDriver", "operationId": "patchCSIDriver", @@ -81786,7 +83747,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified CSIDriver", "operationId": "replaceCSIDriver", @@ -81861,7 +83822,7 @@ "/apis/storage.k8s.io/v1/csinodes": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of CSINode", "operationId": "deleteCollectionCSINode", @@ -81990,7 +83951,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind CSINode", "operationId": "listCSINode", @@ -82108,7 +84069,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a CSINode", "operationId": "createCSINode", @@ -82189,7 +84150,7 @@ "/apis/storage.k8s.io/v1/csinodes/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a CSINode", "operationId": "deleteCSINode", @@ -82268,7 +84229,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified CSINode", "operationId": "readCSINode", @@ -82320,10 +84281,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified CSINode", "operationId": "patchCSINode", @@ -82403,7 +84361,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified CSINode", "operationId": "replaceCSINode", @@ -82478,7 +84436,7 @@ "/apis/storage.k8s.io/v1/csistoragecapacities": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind CSIStorageCapacity", "operationId": "listCSIStorageCapacityForAllNamespaces", @@ -82596,7 +84554,7 @@ "/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of CSIStorageCapacity", "operationId": "deleteCollectionNamespacedCSIStorageCapacity", @@ -82725,7 +84683,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind CSIStorageCapacity", "operationId": "listNamespacedCSIStorageCapacity", @@ -82851,7 +84809,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a CSIStorageCapacity", "operationId": "createNamespacedCSIStorageCapacity", @@ -82932,7 +84890,7 @@ "/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a CSIStorageCapacity", "operationId": "deleteNamespacedCSIStorageCapacity", @@ -83011,7 +84969,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified CSIStorageCapacity", "operationId": "readNamespacedCSIStorageCapacity", @@ -83071,10 +85029,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified CSIStorageCapacity", "operationId": "patchNamespacedCSIStorageCapacity", @@ -83154,7 +85109,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified CSIStorageCapacity", "operationId": "replaceNamespacedCSIStorageCapacity", @@ -83229,7 +85184,7 @@ "/apis/storage.k8s.io/v1/storageclasses": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of StorageClass", "operationId": "deleteCollectionStorageClass", @@ -83358,7 +85313,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind StorageClass", "operationId": "listStorageClass", @@ -83476,7 +85431,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a StorageClass", "operationId": "createStorageClass", @@ -83557,7 +85512,7 @@ "/apis/storage.k8s.io/v1/storageclasses/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a StorageClass", "operationId": "deleteStorageClass", @@ -83636,7 +85591,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified StorageClass", "operationId": "readStorageClass", @@ -83688,10 +85643,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified StorageClass", "operationId": "patchStorageClass", @@ -83771,7 +85723,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified StorageClass", "operationId": "replaceStorageClass", @@ -83846,7 +85798,7 @@ "/apis/storage.k8s.io/v1/volumeattachments": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete collection of VolumeAttachment", "operationId": "deleteCollectionVolumeAttachment", @@ -83975,7 +85927,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "list or watch objects of kind VolumeAttachment", "operationId": "listVolumeAttachment", @@ -84093,7 +86045,7 @@ ], "post": { "consumes": [ - "*/*" + "application/json" ], "description": "create a VolumeAttachment", "operationId": "createVolumeAttachment", @@ -84174,7 +86126,7 @@ "/apis/storage.k8s.io/v1/volumeattachments/{name}": { "delete": { "consumes": [ - "*/*" + "application/json" ], "description": "delete a VolumeAttachment", "operationId": "deleteVolumeAttachment", @@ -84253,7 +86205,7 @@ }, "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read the specified VolumeAttachment", "operationId": "readVolumeAttachment", @@ -84305,10 +86257,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update the specified VolumeAttachment", "operationId": "patchVolumeAttachment", @@ -84388,7 +86337,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace the specified VolumeAttachment", "operationId": "replaceVolumeAttachment", @@ -84463,7 +86412,7 @@ "/apis/storage.k8s.io/v1/volumeattachments/{name}/status": { "get": { "consumes": [ - "*/*" + "application/json" ], "description": "read status of the specified VolumeAttachment", "operationId": "readVolumeAttachmentStatus", @@ -84515,10 +86464,7 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "description": "partially update status of the specified VolumeAttachment", "operationId": "patchVolumeAttachmentStatus", @@ -84598,7 +86544,7 @@ }, "put": { "consumes": [ - "*/*" + "application/json" ], "description": "replace status of the specified VolumeAttachment", "operationId": "replaceVolumeAttachmentStatus", @@ -85630,6 +87576,9 @@ ], "tags": [ "logs" + ], + "consumes": [ + "application/json" ] } }, @@ -85646,6 +87595,9 @@ ], "tags": [ "logs" + ], + "consumes": [ + "application/json" ] }, "parameters": [ @@ -85659,32 +87611,6 @@ } ] }, - "/openid/v1/jwks/": { - "get": { - "description": "get service account issuer OpenID JSON Web Key Set (contains public token verification keys)", - "operationId": "getServiceAccountIssuerOpenIDKeyset", - "produces": [ - "application/jwk-set+json" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "openid" - ] - } - }, "/version/": { "get": { "consumes": [ @@ -85738,7 +87664,7 @@ "custom_objects" ], "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json" @@ -85797,7 +87723,7 @@ "custom_objects" ], "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -85931,13 +87857,16 @@ "description": "Unauthorized" } }, + "consumes": [ + "application/json" + ], "x-codegen-request-body-name": "body" }, "delete": { "operationId": "deleteCollectionClusterCustomObject", "description": "Delete collection of cluster scoped custom objects", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json" @@ -86044,7 +87973,7 @@ "custom_objects" ], "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -86178,13 +88107,16 @@ "description": "Unauthorized" } }, + "consumes": [ + "application/json" + ], "x-codegen-request-body-name": "body" }, "delete": { "operationId": "deleteCollectionNamespacedCustomObject", "description": "Delete collection of namespace scoped custom objects", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json" @@ -86281,7 +88213,7 @@ "operationId": "getClusterCustomObject", "description": "Returns a cluster scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json" @@ -86308,7 +88240,7 @@ "operationId": "deleteClusterCustomObject", "description": "Deletes the specified cluster scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json" @@ -86373,8 +88305,7 @@ "operationId": "patchClusterCustomObject", "description": "patch the specified cluster scoped custom object", "consumes": [ - "application/json-patch+json", - "application/merge-patch+json" + "application/json" ], "produces": [ "application/json" @@ -86434,7 +88365,7 @@ "operationId": "replaceClusterCustomObject", "description": "replace the specified cluster scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json" @@ -86518,7 +88449,7 @@ "get": { "description": "read status of the specified cluster scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -86547,7 +88478,7 @@ "put": { "description": "replace status of the cluster scoped specified custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -86607,8 +88538,7 @@ "patch": { "description": "partially update status of the specified cluster scoped custom object", "consumes": [ - "application/json-patch+json", - "application/merge-patch+json" + "application/json" ], "produces": [ "application/json", @@ -86702,7 +88632,7 @@ "get": { "description": "read scale of the specified custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -86731,7 +88661,7 @@ "put": { "description": "replace scale of the specified cluster scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -86791,8 +88721,7 @@ "patch": { "description": "partially update scale of the specified cluster scoped custom object", "consumes": [ - "application/json-patch+json", - "application/merge-patch+json" + "application/json" ], "produces": [ "application/json", @@ -86894,7 +88823,7 @@ "operationId": "getNamespacedCustomObject", "description": "Returns a namespace scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json" @@ -86921,7 +88850,7 @@ "operationId": "deleteNamespacedCustomObject", "description": "Deletes the specified namespace scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json" @@ -86986,8 +88915,7 @@ "operationId": "patchNamespacedCustomObject", "description": "patch the specified namespace scoped custom object", "consumes": [ - "application/json-patch+json", - "application/merge-patch+json" + "application/json" ], "produces": [ "application/json" @@ -87047,7 +88975,7 @@ "operationId": "replaceNamespacedCustomObject", "description": "replace the specified namespace scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json" @@ -87138,7 +89066,7 @@ "get": { "description": "read status of the specified namespace scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -87167,7 +89095,7 @@ "put": { "description": "replace status of the specified namespace scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -87227,9 +89155,7 @@ "patch": { "description": "partially update status of the specified namespace scoped custom object", "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "produces": [ "application/json", @@ -87330,7 +89256,7 @@ "get": { "description": "read scale of the specified namespace scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -87359,7 +89285,7 @@ "put": { "description": "replace scale of the specified namespace scoped custom object", "consumes": [ - "*/*" + "application/json" ], "produces": [ "application/json", @@ -87419,9 +89345,7 @@ "patch": { "description": "partially update scale of the specified namespace scoped custom object", "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/apply-patch+yaml" + "application/json" ], "produces": [ "application/json", @@ -87480,6 +89404,64 @@ }, "x-codegen-request-body-name": "body" } + }, + "/.well-known/openid-configuration": { + "get": { + "description": "get service account issuer OpenID configuration, also known as the 'OIDC discovery doc'", + "operationId": "getServiceAccountIssuerOpenIDConfiguration", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "WellKnown" + ], + "consumes": [ + "application/json" + ] + } + }, + "/openid/v1/jwks": { + "get": { + "description": "get service account issuer OpenID JSON Web Key Set (contains public token verification keys)", + "operationId": "getServiceAccountIssuerOpenIDKeyset", + "produces": [ + "application/jwk-set+json" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "openid" + ], + "consumes": [ + "application/json" + ] + } } }, "security": [ From 2b331047578cae33c0f2db6aa7ff8f9a4965f792 Mon Sep 17 00:00:00 2001 From: Min Jin Date: Fri, 1 Dec 2023 12:50:16 -0800 Subject: [PATCH 2/2] adding back JSON related manual hacks Signed-off-by: Min Jin --- kubernetes/.openapi-generator-ignore | 2 + .../io/kubernetes/client/openapi/JSON.java | 122 +++++++++++------- .../kubernetes/client/openapi/JSONTest.java | 5 - 3 files changed, 75 insertions(+), 54 deletions(-) diff --git a/kubernetes/.openapi-generator-ignore b/kubernetes/.openapi-generator-ignore index be1199a064..a8f8548387 100644 --- a/kubernetes/.openapi-generator-ignore +++ b/kubernetes/.openapi-generator-ignore @@ -6,3 +6,5 @@ git_push.sh README.md pom.xml +# Remove when changes in kubernetes-client/java#366,#240 make into upstream openapi-generator +src/main/java/io/kubernetes/client/openapi/JSON.java 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 783accaf0a..5a9feaa43e 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/openapi/JSON.java +++ b/kubernetes/src/main/java/io/kubernetes/client/openapi/JSON.java @@ -1,5 +1,5 @@ /* -Copyright 2023 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -14,79 +14,102 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; 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.openapi.models.*; -import okio.ByteString; - +import io.kubernetes.client.gson.V1StatusPreProcessor; +import io.kubernetes.client.openapi.models.V1Status; import java.io.IOException; import java.io.StringReader; import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; -import java.text.ParsePosition; +import java.time.Instant; import java.time.LocalDate; import java.time.OffsetDateTime; 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 okio.ByteString; public class JSON { + private Gson gson; + private 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() + .appendOffsetId() + .toFormatter(); + private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + + private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = + new OffsetDateTimeTypeAdapter(RFC3339MICRO_FORMATTER); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - ; - GsonBuilder builder = fireBuilder.createGsonBuilder(); + GsonFireBuilder fireBuilder = new GsonFireBuilder(); + GsonBuilder builder = + fireBuilder + .registerPreProcessor(V1Status.class, new V1StatusPreProcessor()) + .createGsonBuilder(); return builder; } private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { JsonElement element = readElement.getAsJsonObject().get(discriminatorField); if (null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + throw new IllegalArgumentException( + "missing discriminator field: <" + discriminatorField + ">"); } return element.getAsString(); } /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * Returns the Java class that implements the OpenAPI schema for the specified discriminator + * value. * * @param classByDiscriminatorValue The map of discriminator values to Java classes. * @param discriminatorValue The value of the OpenAPI discriminator in the input data. * @return The Java class that implements the OpenAPI schema */ - private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + private static Class getClassByDiscriminator( + Map classByDiscriminatorValue, String discriminatorValue) { Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); if (null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + throw new IllegalArgumentException( + "cannot determine model class of name: <" + discriminatorValue + ">"); } return clazz; } public JSON() { - gson = createGson() - .registerTypeAdapter(Date.class, dateTypeAdapter) - .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) - .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) - .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) - .registerTypeAdapter(byte[].class, byteArrayAdapter) - .create(); + gson = + createGson() + .registerTypeAdapter(Date.class, dateTypeAdapter) + .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) + .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) + .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + .registerTypeAdapter(byte[].class, byteArrayAdapter) + .create(); } /** @@ -127,8 +150,8 @@ public String serialize(Object obj) { /** * Deserialize the given JSON string to Java object. * - * @param Type - * @param body The JSON string + * @param Type + * @param body The JSON string * @param returnType The type to deserialize into * @return The deserialized Java object */ @@ -137,7 +160,8 @@ public T deserialize(String body, Type returnType) { try { if (isLenientOnJson) { JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + // see + // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) jsonReader.setLenient(true); return gson.fromJson(jsonReader, returnType); } else { @@ -154,18 +178,19 @@ public T deserialize(String body, Type returnType) { } } - /** - * Gson TypeAdapter for Byte Array type - */ + /** Gson TypeAdapter for Byte Array type */ public 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 @@ -182,9 +207,7 @@ public byte[] read(JsonReader in) throws IOException { } } - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ + /** Gson TypeAdapter for JSR310 OffsetDateTime type */ public static class OffsetDateTimeTypeAdapter extends TypeAdapter { private DateTimeFormatter formatter; @@ -219,16 +242,19 @@ public OffsetDateTime read(JsonReader in) throws IOException { default: String date = in.nextString(); if (date.endsWith("+0000")) { - date = date.substring(0, date.length()-5) + "Z"; + 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); } } } - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ + /** Gson TypeAdapter for JSR310 LocalDate type */ public class LocalDateTypeAdapter extends TypeAdapter { private DateTimeFormatter formatter; @@ -278,9 +304,8 @@ public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { } /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). + * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" format + * will be used (more efficient than SimpleDateFormat). */ public static class SqlDateTypeAdapter extends TypeAdapter { @@ -323,7 +348,8 @@ 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( + Instant.from(DateTimeFormatter.ISO_INSTANT.parse(date)).toEpochMilli()); } catch (ParseException e) { throw new JsonParseException(e); } @@ -332,8 +358,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. + * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be used. */ public static class DateTypeAdapter extends TypeAdapter { @@ -358,7 +383,7 @@ public void write(JsonWriter out, Date date) throws IOException { if (dateFormat != null) { value = dateFormat.format(date); } else { - value = ISO8601Utils.format(date, true); + value = DateTimeFormatter.ISO_INSTANT.format(date.toInstant()); } out.value(value); } @@ -377,7 +402,7 @@ public Date read(JsonReader in) throws IOException { if (dateFormat != null) { return dateFormat.parse(date); } - return ISO8601Utils.parse(date, new ParsePosition(0)); + return Date.from(Instant.from(DateTimeFormatter.ISO_INSTANT.parse(date))); } catch (ParseException e) { throw new JsonParseException(e); } @@ -397,5 +422,4 @@ public JSON setSqlDateFormat(DateFormat dateFormat) { sqlDateTypeAdapter.setFormat(dateFormat); return this; } - } diff --git a/kubernetes/src/test/java/io/kubernetes/client/openapi/JSONTest.java b/kubernetes/src/test/java/io/kubernetes/client/openapi/JSONTest.java index b833f7ebe8..49b81ecf4f 100644 --- a/kubernetes/src/test/java/io/kubernetes/client/openapi/JSONTest.java +++ b/kubernetes/src/test/java/io/kubernetes/client/openapi/JSONTest.java @@ -25,7 +25,6 @@ public class JSONTest { private final JSON json = new JSON(); @Test - @Ignore // TODO: Re-enable this after adding the manual changes back: https://github.com/kubernetes-client/java/pull/2818 public void testSerializeByteArray() { final String plainText = "string that contains '=' when encoded"; final String base64String = json.serialize(plainText.getBytes()); @@ -42,7 +41,6 @@ public void testSerializeByteArray() { } @Test - @Ignore // TODO: Re-enable this after adding the manual changes back: https://github.com/kubernetes-client/java/pull/2818 public void testOffsetDateTime1e6Parse() { String timeStr = "\"2018-04-03T11:32:26.123456Z\""; OffsetDateTime dateTime = json.deserialize(timeStr, OffsetDateTime.class); @@ -51,7 +49,6 @@ public void testOffsetDateTime1e6Parse() { } @Test - @Ignore // TODO: Re-enable this after adding the manual changes back: https://github.com/kubernetes-client/java/pull/2818 public void testOffsetDateTime1e4Parse() { String timeStr = "\"2018-04-03T11:32:26.1234Z\""; OffsetDateTime dateTime = json.deserialize(timeStr, OffsetDateTime.class); @@ -61,7 +58,6 @@ public void testOffsetDateTime1e4Parse() { } @Test - @Ignore // TODO: Re-enable this after adding the manual changes back: https://github.com/kubernetes-client/java/pull/2818 public void testOffsetDateTime1e3Parse() { String timeStr = "\"2018-04-03T11:32:26.123Z\""; OffsetDateTime dateTime = json.deserialize(timeStr, OffsetDateTime.class); @@ -71,7 +67,6 @@ public void testOffsetDateTime1e3Parse() { } @Test - @Ignore // TODO: Re-enable this after adding the manual changes back: https://github.com/kubernetes-client/java/pull/2818 public void testOffsetDateTimeNoFractionParse() { String timeStr = "\"2018-04-03T11:32:26Z\""; OffsetDateTime dateTime = json.deserialize(timeStr, OffsetDateTime.class);